You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
133 lines
808 KiB
133 lines
808 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[223,7,9],{"+NIl":function(we,xe,z){(function(q){q(z("VrN/"))})(function(q){"use strict";q.defineMode("stex",function(G,D){"use strict";function K(C,A){C.cmdState.push(A)}function P(C){return C.cmdState.length>0?C.cmdState[C.cmdState.length-1]:null}function M(C){var A=C.cmdState.pop();A&&A.closeBracket()}function U(C){for(var A=C.cmdState,x=A.length-1;x>=0;x--){var d=A[x];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function _(C,A,x){return function(){this.name=C,this.bracketNo=0,this.style=A,this.styles=x,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var I={};I.importmodule=_("importmodule","tag",["string","builtin"]),I.documentclass=_("documentclass","tag",["","atom"]),I.usepackage=_("usepackage","tag",["atom"]),I.begin=_("begin","tag",["atom"]),I.end=_("end","tag",["atom"]),I.label=_("label","tag",["atom"]),I.ref=_("ref","tag",["atom"]),I.eqref=_("eqref","tag",["atom"]),I.cite=_("cite","tag",["atom"]),I.bibitem=_("bibitem","tag",["atom"]),I.Bibitem=_("Bibitem","tag",["atom"]),I.RBibitem=_("RBibitem","tag",["atom"]),I.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function R(C,A){C.f=A}function v(C,A){var x;if(C.match(/^\\[a-zA-Z@]+/)){var d=C.current().slice(1);return x=I.hasOwnProperty(d)?I[d]:I.DEFAULT,x=new x,K(A,x),R(A,L),x.style}if(C.match(/^\\[$&%#{}_]/))return"tag";if(C.match(/^\\[,;!\/\\]/))return"tag";if(C.match("\\["))return R(A,function(l,u){return S(l,u,"\\]")}),"keyword";if(C.match("\\("))return R(A,function(l,u){return S(l,u,"\\)")}),"keyword";if(C.match("$$"))return R(A,function(l,u){return S(l,u,"$$")}),"keyword";if(C.match("$"))return R(A,function(l,u){return S(l,u,"$")}),"keyword";var o=C.next();if(o=="%")return C.skipToEnd(),"comment";if(o=="}"||o=="]"){if(x=P(A),x)x.closeBracket(o),R(A,L);else return"error";return"bracket"}else return o=="{"||o=="["?(x=I.DEFAULT,x=new x,K(A,x),"bracket"):/\d/.test(o)?(C.eatWhile(/[\w.%]/),"atom"):(C.eatWhile(/[\w\-_]/),x=U(A),x.name=="begin"&&(x.argument=C.current()),x.styleIdentifier())}function S(C,A,x){if(C.eatSpace())return null;if(x&&C.match(x))return R(A,v),"keyword";if(C.match(/^\\[a-zA-Z@]+/))return"tag";if(C.match(/^[a-zA-Z]+/))return"variable-2";if(C.match(/^\\[$&%#{}_]/))return"tag";if(C.match(/^\\[,;!\/]/))return"tag";if(C.match(/^[\^_&]/))return"tag";if(C.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(C.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=C.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(C.skipToEnd(),"comment"):"error"}function L(C,A){var x=C.peek(),d;return x=="{"||x=="["?(d=P(A),d.openBracket(x),C.eat(x),R(A,v),"bracket"):/[ \t\r]/.test(x)?(C.eat(x),null):(R(A,v),M(A),v(C,A))}return{startState:function(){var C=D.inMathMode?function(A,x){return S(A,x)}:v;return{cmdState:[],f:C}},copyState:function(C){return{cmdState:C.cmdState.slice(),f:C.f}},token:function(C,A){return A.f(C,A)},blankLine:function(C){C.f=v,C.cmdState.length=0},lineComment:"%"}}),q.defineMIME("text/x-stex","stex"),q.defineMIME("text/x-latex","stex")})},"/GNS":function(we,xe,z){we.exports=z.p+"static/search1.c4136dd4.png"},"19Vz":function(we,xe,z){(function(q){q(z("VrN/"))})(function(q){q.defineOption("placeholder","",function(_,I,R){var v=R&&R!=q.Init;if(I&&!v)_.on("blur",P),_.on("change",M),_.on("swapDoc",M),q.on(_.getInputField(),"compositionupdate",_.state.placeholderCompose=function(){K(_)}),M(_);else if(!I&&v){_.off("blur",P),_.off("change",M),_.off("swapDoc",M),q.off(_.getInputField(),"compositionupdate",_.state.placeholderCompose),G(_);var S=_.getWrapperElement();S.className=S.className.replace(" CodeMirror-empty","")}I&&!_.hasFocus()&&P(_)});function G(_){_.state.placeholder&&(_.state.placeholder.parentNode.removeChild(_.state.placeholder),_.state.placeholder=null)}function D(_){G(_);var I=_.state.placeholder=document.createElement("pre");I.style.cssText="height: 0; overflow: visible",I.style.direction=_.getOption("direction"),I.className="CodeMirror-placeholder CodeMirror-line-like";var R=_.getOption("placeholder");typeof R=="string"&&(R=document.createTextNode(R)),I.appendChild(R),_.display.lineSpace.insertBefore(I,_.display.lineSpace.firstChild)}function K(_){setTimeout(function(){var I=!1,R=_.getInputField();R.nodeName=="TEXTAREA"?I=!R.value:_.lineCount()==1&&(I=!/[^\u200b]/.test(R.querySelector(".CodeMirror-line").textContent)),I?D(_):G(_)},20)}function P(_){U(_)&&D(_)}function M(_){var I=_.getWrapperElement(),R=U(_);I.className=I.className.replace(" CodeMirror-empty","")+(R?" CodeMirror-empty":""),R?D(_):G(_)}function U(_){return _.lineCount()===1&&_.getLine(0)===""}})},"1eCo":function(we,xe,z){(function(q){q(z("VrN/"))})(function(q){"use strict";var G={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},D={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};q.defineMode("xml",function(K,P){var M=K.indentUnit,U={},_=P.htmlMode?G:D;for(var I in _)U[I]=_[I];for(var I in P)U[I]=P[I];var R,v;function S(a,g){function p(B){return g.tokenize=B,B(a,g)}var E=a.next();if(E=="<")return a.eat("!")?a.eat("[")?a.match("CDATA[")?p(A("atom","]]>")):null:a.match("--")?p(A("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),p(x(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),g.tokenize=A("meta","?>"),"meta"):(R=a.eat("/")?"closeTag":"openTag",g.tokenize=L,"tag bracket");if(E=="&"){var O;return a.eat("#")?a.eat("x")?O=a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):O=a.eatWhile(/[\d]/)&&a.eat(";"):O=a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),O?"atom":"error"}else return a.eatWhile(/[^&<]/),null}S.isInText=!0;function L(a,g){var p=a.next();if(p==">"||p=="/"&&a.eat(">"))return g.tokenize=S,R=p==">"?"endTag":"selfcloseTag","tag bracket";if(p=="=")return R="equals",null;if(p=="<"){g.tokenize=S,g.state=u,g.tagName=g.tagStart=null;var E=g.tokenize(a,g);return E?E+" tag error":"tag error"}else return/[\'\"]/.test(p)?(g.tokenize=C(p),g.stringStartCol=a.column(),g.tokenize(a,g)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function C(a){var g=function(p,E){for(;!p.eol();)if(p.next()==a){E.tokenize=L;break}return"string"};return g.isInAttribute=!0,g}function A(a,g){return function(p,E){for(;!p.eol();){if(p.match(g)){E.tokenize=S;break}p.next()}return a}}function x(a){return function(g,p){for(var E;(E=g.next())!=null;){if(E=="<")return p.tokenize=x(a+1),p.tokenize(g,p);if(E==">")if(a==1){p.tokenize=S;break}else return p.tokenize=x(a-1),p.tokenize(g,p)}return"meta"}}function d(a,g,p){this.prev=a.context,this.tagName=g,this.indent=a.indented,this.startOfLine=p,(U.doNotIndent.hasOwnProperty(g)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function o(a){a.context&&(a.context=a.context.prev)}function l(a,g){for(var p;;){if(!a.context)return;if(p=a.context.tagName,!U.contextGrabbers.hasOwnProperty(p)||!U.contextGrabbers[p].hasOwnProperty(g))return;o(a)}}function u(a,g,p){return a=="openTag"?(p.tagStart=g.column(),T):a=="closeTag"?m:u}function T(a,g,p){return a=="word"?(p.tagName=g.current(),v="tag",y):U.allowMissingTagName&&a=="endTag"?(v="tag bracket",y(a,g,p)):(v="error",T)}function m(a,g,p){if(a=="word"){var E=g.current();return p.context&&p.context.tagName!=E&&U.implicitlyClosed.hasOwnProperty(p.context.tagName)&&o(p),p.context&&p.context.tagName==E||U.matchClosing===!1?(v="tag",h):(v="tag error",w)}else return U.allowMissingTagName&&a=="endTag"?(v="tag bracket",h(a,g,p)):(v="error",w)}function h(a,g,p){return a!="endTag"?(v="error",h):(o(p),u)}function w(a,g,p){return v="error",h(a,g,p)}function y(a,g,p){if(a=="word")return v="attribute",f;if(a=="endTag"||a=="selfcloseTag"){var E=p.tagName,O=p.tagStart;return p.tagName=p.tagStart=null,a=="selfcloseTag"||U.autoSelfClosers.hasOwnProperty(E)?l(p,E):(l(p,E),p.context=new d(p,E,O==p.indented)),u}return v="error",y}function f(a,g,p){return a=="equals"?c:(U.allowMissing||(v="error"),y(a,g,p))}function c(a,g,p){return a=="string"?s:a=="word"&&U.allowUnquoted?(v="string",y):(v="error",y(a,g,p))}function s(a,g,p){return a=="string"?s:y(a,g,p)}return{startState:function(a){var g={tokenize:S,state:u,indented:a||0,tagName:null,tagStart:null,context:null};return a!=null&&(g.baseIndent=a),g},token:function(a,g){if(!g.tagName&&a.sol()&&(g.indented=a.indentation()),a.eatSpace())return null;R=null;var p=g.tokenize(a,g);return(p||R)&&p!="comment"&&(v=null,g.state=g.state(R||p,a,g),v&&(p=v=="error"?p+" error":v)),p},indent:function(a,g,p){var E=a.context;if(a.tokenize.isInAttribute)return a.tagStart==a.indented?a.stringStartCol+1:a.indented+M;if(E&&E.noIndent)return q.Pass;if(a.tokenize!=L&&a.tokenize!=S)return p?p.match(/^(\s*)/)[0].length:0;if(a.tagName)return U.multilineTagIndentPastTag!==!1?a.tagStart+a.tagName.length+2:a.tagStart+M*(U.multilineTagIndentFactor||1);if(U.alignCDATA&&/<!\[CDATA\[/.test(g))return 0;var O=g&&/^<(\/)?([\w_:\.-]*)/.exec(g);if(O&&O[1])for(;E;)if(E.tagName==O[2]){E=E.prev;break}else if(U.implicitlyClosed.hasOwnProperty(E.tagName))E=E.prev;else break;else if(O)for(;E;){var B=U.contextGrabbers[E.tagName];if(B&&B.hasOwnProperty(O[2]))E=E.prev;else break}for(;E&&E.prev&&!E.startOfLine;)E=E.prev;return E?E.indent+M:a.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:U.htmlMode?"html":"xml",helperType:U.htmlMode?"html":"xml",skipAttribute:function(a){a.state==c&&(a.state=y)},xmlCurrentTag:function(a){return a.tagName?{name:a.tagName,close:a.type=="closeTag"}:null},xmlCurrentContext:function(a){for(var g=[],p=a.context;p;p=p.prev)p.tagName&&g.push(p.tagName);return g.reverse()}}}),q.defineMIME("text/xml","xml"),q.defineMIME("application/xml","xml"),q.mimeModes.hasOwnProperty("text/html")||q.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"2RCv":function(we,xe,z){"use strict";var q=z("Awhp"),G=z("KrTs"),D=z("+L6B"),K=z("2/Rp"),P=z("5NDa"),M=z("5rEg"),U=z("0Owb"),_=z("oBTY"),I=z("tJVT"),R=z("PpiC"),v=z("cDcd"),S=z.n(v),L=function(A){var x=A.InputRight,d=A.value,o=d===void 0?[]:d,l=A.onChange,u=l===void 0?function(){}:l,T=Object(R.a)(A,["InputRight","value","onChange"]),m=Object(v.useState)(),h=Object(I.a)(m,2),w=h[0],y=h[1],f=function(a){var g=o.filter(function(p,E){return E!==a});u(g)},c=function(a){if(a.preventDefault(),!w)return;u([].concat(Object(_.a)(o),[w])),y(null)};return S.a.createElement("div",null,S.a.createElement(M.a,Object(U.a)({},T,{value:w,onChange:function(a){return y(a.target.value)},onPressEnter:c,onBlur:c})),x,S.a.createElement("div",{className:"mt20"},o==null?void 0:o.map(function(s,a){return S.a.createElement(G.a,{className:"ml10 mr10",count:"x",onClick:function(){return f(a)}},S.a.createElement(K.a,{type:"primary",ghost:!0},s))})))};xe.a=L},"4qgm":function(we,xe){we.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5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pTOG7z5EQMy11i2cyu4COQqBDxaMq8BvXPVrN3JugiEiYClC0CY/bnVXQRii0DHWkEJbYKG95ABnmSX6LFdFnc0pxEISXTPWTxaN+Ztn+US3Wng3f5ii4A50U/hydOZeT94P8rkEj22y+KO5jQCRkT3eI6T5GnPHH/ea5foTgPv9hdbBLIS/RD58t7C7C0rAyfiEj22y+KO5jQCmYm+j3yeG5m97ZvgYVyiOw28219sEfATfTd5klozZ2vAR6b8U3GJHttlcUdzGgFF9J8gbyvmb/nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII="},"55Ip":function(we,xe,z){"use strict";z.d(xe,"a",function(){return l});var q=z("Ty5D"),G=z("dI71"),D=z("cDcd"),K=z.n(D),P=z("YS25"),M=z("17x9"),U=z.n(M),_=z("wx14"),I=z("zLVn"),R=z("9R94"),v=function(c){Object(G.a)(s,c);function s(){for(var g,p=arguments.length,E=new Array(p),O=0;O<p;O++)E[O]=arguments[O];return g=c.call.apply(c,[this].concat(E))||this,g.history=Object(P.a)(g.props),g}var a=s.prototype;return a.render=function(){return K.a.createElement(q.c,{history:this.history,children:this.props.children})},s}(K.a.Component),S=function(c){Object(G.a)(s,c);function s(){for(var g,p=arguments.length,E=new Array(p),O=0;O<p;O++)E[O]=arguments[O];return g=c.call.apply(c,[this].concat(E))||this,g.history=Object(P.b)(g.props),g}var a=s.prototype;return a.render=function(){return K.a.createElement(q.c,{history:this.history,children:this.props.children})},s}(K.a.Component),L=function(s,a){return typeof s=="function"?s(a):s},C=function(s,a){return typeof s=="string"?Object(P.c)(s,null,null,a):s},A=function(s){return s},x=K.a.forwardRef;typeof x=="undefined"&&(x=A);function d(c){return!!(c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)}var o=x(function(c,s){var a=c.innerRef,g=c.navigate,p=c.onClick,E=Object(I.a)(c,["innerRef","navigate","onClick"]),O=E.target,B=Object(_.a)({},E,{onClick:function(Q){try{p&&p(Q)}catch(F){throw Q.preventDefault(),F}!Q.defaultPrevented&&Q.button===0&&(!O||O==="_self")&&!d(Q)&&(Q.preventDefault(),g())}});return A!==x?B.ref=s||a:B.ref=a,K.a.createElement("a",B)}),l=x(function(c,s){var a=c.component,g=a===void 0?o:a,p=c.replace,E=c.to,O=c.innerRef,B=Object(I.a)(c,["component","replace","to","innerRef"]);return K.a.createElement(q.e.Consumer,null,function(W){W||Object(R.a)(!1);var Q=W.history,F=C(L(E,W.location),W.location),N=F?Q.createHref(F):"",X=Object(_.a)({},B,{href:N,navigate:function(){var oe=L(E,W.location),de=p?Q.replace:Q.push;de(oe)}});return A!==x?X.ref=s||O:X.innerRef=O,K.a.createElement(g,X)})});if(!1)var u,T;var m=function(s){return s},h=K.a.forwardRef;typeof h=="undefined"&&(h=m);function w(){for(var c=arguments.length,s=new Array(c),a=0;a<c;a++)s[a]=arguments[a];return s.filter(function(g){return g}).join(" ")}var y=h(function(c,s){var a=c["aria-current"],g=a===void 0?"page":a,p=c.activeClassName,E=p===void 0?"active":p,O=c.activeStyle,B=c.className,W=c.exact,Q=c.isActive,F=c.location,N=c.sensitive,X=c.strict,ee=c.style,oe=c.to,de=c.innerRef,Ce=Object(I.a)(c,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return K.a.createElement(q.e.Consumer,null,function(ge){ge||Object(R.a)(!1);var fe=F||ge.location,me=C(L(oe,fe),fe),pe=me.pathname,ie=pe&&pe.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ue=ie?Object(q.f)(fe.pathname,{path:ie,exact:W,sensitive:N,strict:X}):null,be=!!(Q?Q(ue,fe):ue),_e=be?w(B,E):B,Oe=be?Object(_.a)({},ee,{},O):ee,We=Object(_.a)({"aria-current":be&&g||null,className:_e,style:Oe,to:me},Ce);return m!==h?We.ref=s||de:We.innerRef=de,K.a.createElement(l,We)})});if(!1)var f},"5D2P":function(we,xe){we.exports="data:image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zJyU7+OonXVygIjWKKUOxCGFhaA4cj0AF/KS7z8D4DmMfpTIGdcQOgtgldZaJlpss9auA/B1q/Kgrhjm+08B3JuEF/ediE44T2IikiOP1Uqp7/IYDePeElFvXhwAY2nTqJCXkTiZ1XgBcT9jmplHxYEd4SR04kRER0ul0ur169dLWKVqYb7/IpVSjHB9IctSShzQWq9JQySMeyG/MI1ewhxYnqeYq2itnePYGPMmgO6iyAP4v5gTwBzl9Cta68RdnDHmWQAtz3WyOjRTTodZYSsRvZoRbLvWemeU7vDw8P2e532eETtSjZmf931/d31HtkguHdIWUw3oWmttm60NDQ1dVS6XZat6V8EOTMplitwpNJ5K7ALwQg5Da7XWszbnxphRAE/lwIxSnQnd5mMVGYWsZ///MvMK3/ePiFVjjFyADLSBvCyo0vuzj1VCo3J5kflgi5lPE9EKIprHzFIqtKO1PtiqWzLGyIb6oRyW5ZynBOCOHBhRqmNa61nHnhedjQZBcDsRycS7pg0E8kD+LZse3/d/agS5/I7XG0JpI4B9ebqsQN1NWuuWly2X7xVTvfestXfXarWDRHRTgT2aCMXMv3metzJp/5F4SymWhoaG5pfLZVlpL9k1a7VaVRs2bEi89HZyIOwu2b1tukQX3TL3OHGYsjw1GBwc7Oro6Kg7UthTA7mhn5yc3NfX1ycPQ5xbmhGYBSqPPYhINkMPAJDHHrJ4pWlTAOShx1FmvnSPPVoxbHxu43neAmauP7eRf2nTz2yI6FStViv0uc1/ndZCH8rgOooAAAAASUVORK5CYII="},"7Cbv":function(we,xe,z){"use strict";var q=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),G=new Uint8Array(16);function D(){if(!q)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return q(G)}var K=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function P(L){return typeof L=="string"&&K.test(L)}for(var M=P,U=[],_=0;_<256;++_)U.push((_+256).toString(16).substr(1));function I(L){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,A=(U[L[C+0]]+U[L[C+1]]+U[L[C+2]]+U[L[C+3]]+"-"+U[L[C+4]]+U[L[C+5]]+"-"+U[L[C+6]]+U[L[C+7]]+"-"+U[L[C+8]]+U[L[C+9]]+"-"+U[L[C+10]]+U[L[C+11]]+U[L[C+12]]+U[L[C+13]]+U[L[C+14]]+U[L[C+15]]).toLowerCase();if(!M(A))throw TypeError("Stringified UUID is invalid");return A}var R=I;function v(L,C,A){L=L||{};var x=L.random||(L.rng||D)();if(x[6]=x[6]&15|64,x[8]=x[8]&63|128,C){A=A||0;for(var d=0;d<16;++d)C[A+d]=x[d];return C}return R(x)}var S=xe.a=v},"7ZXX":function(we,xe,z){we.exports=z.p+"static/err.6e7c5817.png"},"7ahc":function(we,xe,z){"use strict";z.d(xe,"a",function(){return T});var q=z("k1fw"),G=z("0Owb"),D=z("+L6B"),K=z("2/Rp"),P=z("y8nQ"),M=z("Vl3Y"),U=z("tJVT"),_=z("OaEy"),I=z("2fM7"),R=z("cDcd"),v=z.n(R),S=z("VrN/"),L=z.n(S),C=z("p77/"),A=z.n(C),x=z("c5Ni"),d=z.n(x),o=I.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},u={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};xe.b=function(m){var h=m.callback,w=m.onCancel,y=Object(R.useState)("python"),f=Object(U.a)(y,2),c=f[0],s=f[1];function a(p){s(u[p][1])}function g(p){h(p)}return v.a.createElement(M.a,Object(G.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:g}),v.a.createElement(M.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},v.a.createElement(I.a,{onChange:a},Object.keys(u).map(function(p){return v.a.createElement(o,{key:p,value:p},u[p][0])}))),v.a.createElement(M.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},v.a.createElement(T,{mode:c})),v.a.createElement("div",{className:"flex-container flex-end"},v.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),v.a.createElement(K.a,{type:"ghost",onClick:w},"\u53D6\u6D88")))};function T(m){var h=m.value,w=m.onChange,y=m.mode,f=m.options,c=f===void 0?{}:f,s=Object(R.useRef)(),a=Object(R.useState)(),g=Object(U.a)(a,2),p=g[0],E=g[1];return Object(R.useEffect)(function(){if(p){function O(B){var W=B.getValue();w&&w(W)}return p.on("change",O),function(){p.off("change",O)}}},[p,w]),Object(R.useEffect)(function(){p&&p.setOption("mode",y)},[p,y]),Object(R.useEffect)(function(){p&&((h!==p.getValue()||h==="")&&setTimeout(function(){p.setValue(h||" ")},300))},[p,h]),Object(R.useEffect)(function(){if(s.current&&!p){var O=L.a.fromTextArea(s.current,Object(q.a)({mode:y,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},c));E(O)}},[s.current,p]),v.a.createElement("div",{className:"my-codemirror-container"},v.a.createElement("textarea",{ref:s}))}},"7ixt":function(we,xe,z){"use strict";z.d(xe,"a",function(){return D});var q={adjustX:1,adjustY:1},G=[0,0],D={left:{points:["cr","cl"],overflow:q,offset:[-4,0],targetOffset:G},right:{points:["cl","cr"],overflow:q,offset:[4,0],targetOffset:G},top:{points:["bc","tc"],overflow:q,offset:[0,-4],targetOffset:G},bottom:{points:["tc","bc"],overflow:q,offset:[0,4],targetOffset:G},topLeft:{points:["bl","tl"],overflow:q,offset:[0,-4],targetOffset:G},leftTop:{points:["tr","tl"],overflow:q,offset:[-4,0],targetOffset:G},topRight:{points:["br","tr"],overflow:q,offset:[0,-4],targetOffset:G},rightTop:{points:["tl","tr"],overflow:q,offset:[4,0],targetOffset:G},bottomRight:{points:["tr","br"],overflow:q,offset:[0,4],targetOffset:G},rightBottom:{points:["bl","br"],overflow:q,offset:[4,0],targetOffset:G},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,4],targetOffset:G},leftBottom:{points:["br","bl"],overflow:q,offset:[-4,0],targetOffset:G}},K=D},"7v3h":function(we,xe,z){we.exports=z.p+"static/empty2.dd73f390.png"},"8/bI":function(we,xe,z){we.exports=z.p+"static/empty.8918e228.png"},"8EBN":function(we,xe,z){(function(q){q(z("VrN/"))})(function(q){"use strict";q.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var G=0;G<q.modeInfo.length;G++){var D=q.modeInfo[G];D.mimes&&(D.mime=D.mimes[0])}q.findModeByMIME=function(K){K=K.toLowerCase();for(var P=0;P<q.modeInfo.length;P++){var M=q.modeInfo[P];if(M.mime==K)return M;if(M.mimes){for(var U=0;U<M.mimes.length;U++)if(M.mimes[U]==K)return M}}if(/\+xml$/.test(K))return q.findModeByMIME("application/xml");if(/\+json$/.test(K))return q.findModeByMIME("application/json")},q.findModeByExtension=function(K){K=K.toLowerCase();for(var P=0;P<q.modeInfo.length;P++){var M=q.modeInfo[P];if(M.ext){for(var U=0;U<M.ext.length;U++)if(M.ext[U]==K)return M}}},q.findModeByFileName=function(K){for(var P=0;P<q.modeInfo.length;P++){var M=q.modeInfo[P];if(M.file&&M.file.test(K))return M}var U=K.lastIndexOf("."),_=U>-1&&K.substring(U+1,K.length);if(_)return q.findModeByExtension(_)},q.findModeByName=function(K){K=K.toLowerCase();for(var P=0;P<q.modeInfo.length;P++){var M=q.modeInfo[P];if(M.name.toLowerCase()==K)return M;if(M.alias){for(var U=0;U<M.alias.length;U++)if(M.alias[U].toLowerCase()==K)return M}}}})},"8hTe":function(we,xe,z){we.exports={button:"button___1wy9m"}},"9Bee":function(we,xe,z){"use strict";var q=z("DYRE"),G=z("zeV3"),D=z("+L6B"),K=z("2/Rp"),P=z("k1fw"),M=z("tJVT"),U=z("cDcd"),_=z.n(U),I=z("vg9a"),R=z("DlQD"),v=z.n(R),S=z("rUJ1");function L(fe,me){var pe=fe.match(/^(\s+)(?:```)/);if(pe===null)return me;var ie=pe[1];return me.split(`
|
|
`).map(function(ue){var be=ue.match(/^\s+/);if(be===null)return ue;var _e=Object(M.a)(be,1),Oe=_e[0];return Oe.length>=ie.length?ue.slice(ie.length):ue}).join(`
|
|
`)}var C=[],A=["<ul>"],x=new v.a.Renderer,d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function o(){C.length=0,A=["<ul>"]}var l={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function u(fe,me,pe,ie){if(me>=fe.length||fe[me].level<=pe)return me;var ue=fe[me];ie.push("<li><a href='#"+ue.anchor+"'>"+ue.text+"</a>"),me++;var be=[];return me=u(fe,me,ue.level,be),be.length>0&&(ie.push("<ul>"),be.forEach(function(_e){ie.push(_e)}),ie.push("</ul>")),ie.push("</li>"),me=u(fe,me,pe,ie),me}function T(){return u(C,0,0,A),A.push("</ul>"),A.join("")}var m={heading:function(me){var pe=d.exec(me);if(pe)return{type:"heading",raw:pe[0],depth:pe[1].length,text:pe[2]}},fences:function(me){var pe=this.rules.block.fences.exec(me);if(pe){var ie=pe[0],ue=L(ie,pe[3]||""),be=pe[2]?pe[2].trim():pe[2];if(["latex","katex","math"].indexOf(be)>=0){var _e=y(),Oe=ue;ue=_e,f[_e]={type:"block",expression:Oe}}return{type:"code",raw:ie,lang:be,text:ue}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,w=0,y=function(){return"__special_katext_id_".concat(w++,"__")},f={};function c(){return f}function s(){w=0,f={}}function a(fe){return fe=fe.replace(h,function(me,pe){var ie=y();return f[ie]={type:"inline",expression:pe},ie}),fe}var g=x.listitem;x.listitem=function(fe){return g(a(fe))};var p=x.paragraph;x.paragraph=function(fe){return p(a(fe))};var E=x.tablecell;x.tablecell=function(fe,me){return E(a(fe),me)},x.code=function(fe,me,pe){var ie=(me||"").match(/\S*/)[0];return ie?["latex","katex","math"].indexOf(ie)>=0?"<p class='editormd-tex'>".concat(fe,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(me,'">').concat(pe?fe:Object(S.escape)(fe,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(pe?fe:Object(S.escape)(fe,!0))+"</code></pre>"},x.heading=function(fe,me,pe){var ie=this.options.headerPrefix+pe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return C.push({anchor:ie,level:me,text:fe}),"<h"+me+' id="'+ie+'">'+fe+"</h"+me+">"},v.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),v.a.use({tokenizer:m,renderer:x});var O=v.a,B=z("SJMd"),W=z("ulZh"),Q=z.n(W),F=z("m3rI"),N=z("Oy/b"),X=z("p5ED"),ee=z("8hTe"),oe=z.n(ee),de=/<pre[^>]*>/g;function Ce(fe){var me=document.createElement("div");return me.innerHTML=fe,me.childNodes.length===0?"":me.childNodes[0].nodeValue}var ge=xe.a=function(fe){var me=fe.value,pe=me===void 0?"":me,ie=fe.edit,ue=ie===void 0?!1:ie,be=fe.className,_e=fe.showTextOnly,Oe=fe.showLines,We=fe.replaces,Ve=fe.zoomImg,Le=fe.hasMask,Re=fe.style,De=Re===void 0?{}:Re,Ge=fe.stylesPrev,ze=Ge===void 0?{}:Ge,Te=String(pe),Ie=Object(U.useRef)(),Ye=Object(U.useRef)(),qe=Object(U.useState)(""),je=Object(M.a)(qe,2),Fe=je[0],rt=je[1],Ze=Object(U.useState)("office"),Je=Object(M.a)(Ze,2),Ee=Je[0],$e=Je[1],Qe=Object(U.useMemo)(function(){try{var ae=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Y=/\"\/api\/attachments\/|\"\/attachments\/download\//g,J=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Te=Te.replace(ae,"("+F.a.API_SERVER+"/api/attachments/").replace(Y,'"'+F.a.API_SERVER+"/api/attachments/").replace(J,'"'+F.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`)}catch(ve){}var Z=O(Te),te=c();if(Te.match(/\[TOC\]/)&&(Z=Z.replace("<p>[TOC]</p>",T()),o()),Z=Z.replace(/(__special_katext_id_\d+__)/g,function(ve,Se){var Xe=te[Se],it=Xe.type,tt=Xe.expression;return Object(N.renderToString)(Ce(tt)||"",{displayMode:it==="block",throwOnError:!1,output:"html"})}),Z=Z.replace(/▁/g,"\u2581\u2581\u2581"),s(),_e){var se=document.createElement("div");return se.innerHTML=Z,se.innerText}return setTimeout(function(){return le()},500),Z},[Te]),ye=Object(U.useRef)();l.WebkitLineClamp=Oe,Oe&&(De=Object(P.a)(Object(P.a)({},De),l));function Me(ae){var Y=ae.target;if(Y.tagName.toUpperCase()==="IMG"){if(Ve){var J=Y.getAttribute("src");rt(J),$e("image")}}else if(Y.tagName.toUpperCase()==="A"){var Z=Y.getAttribute("href");if(Z.indexOf("office")>-1)ae.preventDefault(),rt(Z),$e("office");else if(Z.indexOf("application/pdf")>-1)ae.preventDefault(),rt(Z),$e("pdf");else if(Z.indexOf("text/html")>-1)ae.preventDefault(),rt(Z),$e("html");else if(Z.startsWith("#")){ae.preventDefault();var te=document.getElementById(Z.replace("#",""));te&&te.scrollIntoView(!0)}}}var le=function(){var Y,J=(Y=ye.current)===null||Y===void 0?void 0:Y.querySelectorAll("video");J==null||J.forEach(function(Z){if(Z.oncontextmenu=function(){return!1},Z.src.indexOf(".m3u8")>-1&&!Z.canPlayType("application/vnd.apple.mpegurl")){if(Q.a.isSupported()){var te=new Q.a;te.loadSource(Z.src),te.attachMedia(Z)}}})};Object(U.useEffect)(function(){if(ye.current&&Qe&&(Qe.match(de)&&window.PR.prettyPrint()),ye.current)return ye.current.addEventListener("click",Me),function(){ye.current.removeEventListener("click",Me),s(),o()}},[Qe,ye.current,Me]);var ne=function(Y){if(!ue)return;Y.target.nodeName==="IMG"?(Ie.current.style.display="flex",Ie.current.style.width=Y.target.clientWidth+"px",Ie.current.style.height=Y.target.clientHeight+"px",Ie.current.style.top=Y.target.offsetTop+"px",Ie.current.style.left=Y.target.offsetLeft+"px",Ye.current.src=Y.target.getAttribute("src")):Ie.current.style.display="none"};return _.a.createElement("div",{style:{position:"relative"}},_.a.createElement("div",{ref:ye,style:Object(P.a)({},De),className:"".concat(be||""," markdown-body ").concat(oe.a.mdBody),onMouseOver:ne,dangerouslySetInnerHTML:{__html:Qe}}),_.a.createElement("div",{ref:Ie,className:oe.a.button},_.a.createElement(G.a,null,_.a.createElement(K.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),_.a.createElement(K.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),_.a.createElement("img",{ref:Ye,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),_.a.createElement(X.a,{close:!0,data:Fe,type:Fe!=null&&Fe.length?Ee:"",style:Object(P.a)({},ze),onClose:function(){return rt("")}}))}},"9VGf":function(we,xe,z){"use strict";z.d(xe,"a",function(){return D});var q=z("cDcd"),G=z.n(q);function D(K,P){var M=Object(q.useRef)();Object(q.useEffect)(function(){M.current=K}),Object(q.useEffect)(function(){function U(){M.current()}if(P!==null){var _=setInterval(U,P);return function(){return clearInterval(_)}}},[P])}},"A/g1":function(we,xe){we.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTp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oCloseTags",!1,function(I,R,v){if(v!=q.Init&&v&&I.removeKeyMap("autoCloseTags"),!R)return;var S={name:"autoCloseTags"};(typeof R!="object"||R.whenClosing!==!1)&&(S["'/'"]=function(L){return M(L)}),(typeof R!="object"||R.whenOpening!==!1)&&(S["'>'"]=function(L){return K(L)}),I.addKeyMap(S)});var G=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],D=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function K(I){if(I.getOption("disableInput"))return q.Pass;for(var R=I.listSelections(),v=[],S=I.getOption("autoCloseTags"),L=0;L<R.length;L++){if(!R[L].empty())return q.Pass;var C=R[L].head,A=I.getTokenAt(C),x=q.innerMode(I.getMode(),A.state),d=x.state,o=x.mode.xmlCurrentTag&&x.mode.xmlCurrentTag(d),l=o&&o.name;if(!l)return q.Pass;var u=x.mode.configuration=="html",T=typeof S=="object"&&S.dontCloseTags||u&&G,m=typeof S=="object"&&S.indentTags||u&&D;A.end>C.ch&&(l=l.slice(0,l.length-A.end+C.ch));var h=l.toLowerCase();if(!l||A.type=="string"&&(A.end!=C.ch||!/[\"\']/.test(A.string.charAt(A.string.length-1))||A.string.length==1)||A.type=="tag"&&o.close||A.string.indexOf("/")==C.ch-A.start-1||T&&U(T,h)>-1||_(I,x.mode.xmlCurrentContext&&x.mode.xmlCurrentContext(d)||[],l,C,!0))return q.Pass;var w=typeof S=="object"&&S.emptyTags;if(w&&U(w,l)>-1){v[L]={text:"/>",newPos:q.Pos(C.line,C.ch+2)};continue}var y=m&&U(m,h)>-1;v[L]={indent:y,text:">"+(y?`
|
|
|
|
`:"")+"</"+l+">",newPos:y?q.Pos(C.line+1,0):q.Pos(C.line,C.ch+1)}}for(var f=typeof S=="object"&&S.dontIndentOnAutoClose,L=R.length-1;L>=0;L--){var c=v[L];I.replaceRange(c.text,R[L].head,R[L].anchor,"+insert");var s=I.listSelections().slice(0);s[L]={head:c.newPos,anchor:c.newPos},I.setSelections(s),!f&&c.indent&&(I.indentLine(c.newPos.line,null,!0),I.indentLine(c.newPos.line+1,null,!0))}}function P(I,R){for(var v=I.listSelections(),S=[],L=R?"/":"</",C=I.getOption("autoCloseTags"),A=typeof C=="object"&&C.dontIndentOnSlash,x=0;x<v.length;x++){if(!v[x].empty())return q.Pass;var d=v[x].head,o=I.getTokenAt(d),l=q.innerMode(I.getMode(),o.state),u=l.state;if(R&&(o.type=="string"||o.string.charAt(0)!="<"||o.start!=d.ch-1))return q.Pass;var T,m=l.mode.name!="xml"&&I.getMode().name=="htmlmixed";if(m&&l.mode.name=="javascript")T=L+"script";else if(m&&l.mode.name=="css")T=L+"style";else{var h=l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(u);if(!h||h.length&&_(I,h,h[h.length-1],d))return q.Pass;T=L+h[h.length-1]}I.getLine(d.line).charAt(o.end)!=">"&&(T+=">"),S[x]=T}if(I.replaceSelections(S),v=I.listSelections(),!A)for(var x=0;x<v.length;x++)(x==v.length-1||v[x].head.line<v[x+1].head.line)&&I.indentLine(v[x].head.line)}function M(I){return I.getOption("disableInput")?q.Pass:P(I,!0)}q.commands.closeTag=function(I){return P(I)};function U(I,R){if(I.indexOf)return I.indexOf(R);for(var v=0,S=I.length;v<S;++v)if(I[v]==R)return v;return-1}function _(I,R,v,S,L){if(!q.scanForClosingTag)return!1;var C=Math.min(I.lastLine()+1,S.line+500),A=q.scanForClosingTag(I,S,null,C);if(!A||A.tag!=v)return!1;for(var x=L?1:0,d=R.length-1;d>=0&&R[d]==v;d--)++x;S=A.to;for(var d=1;d<x;d++){var o=q.scanForClosingTag(I,S,null,C);if(!o||o.tag!=v)return!1;S=o.to}return!0}})},BjJ7:function(we,xe,z){"use strict";z.d(xe,"d",function(){return G}),z.d(xe,"c",function(){return D}),z.d(xe,"e",function(){return K}),z.d(xe,"b",function(){return P}),z.d(xe,"a",function(){return U});var q=z("m3rI");function G(_){var I=!0;if(_.length>0){for(var R=0;R<_.length;R++)if(_[R].compile_success==0||!_[R].compile_success){I=!1;break}}else I=!1;return I}function D(_){for(var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",R=[],v=0;v<_.length;v++){var S=_[v],L=I?"".concat(I,"/").concat(S.name):"".concat(S.name);R.push({title:S.name,isLeaf:!(S.type==="tree"),key:L})}return R}function K(_,I,R){for(var v=0;v<_.length;v++){var S=_[v];if(S.key===I){S.children=R;break}S.children&&K(S.children,I,R)}return _}function P(_,I,R){var v;return function(){var S=this,L=arguments,C=function(){v=null,R||_.apply(S,L)},A=R&&!v;clearTimeout(v),v=setTimeout(C,I),A&&_.apply(S,L)}}var M=!0,U=q.a.API_SERVER},"C+DQ":function(we,xe,z){},CJF0:function(we,xe,z){"use strict";var q=z("14J3"),G=z("BMrR"),D=z("+L6B"),K=z("2/Rp"),P=z("jCWc"),M=z("kPKH"),U=z("PpiC"),_=z("cDcd"),I=z.n(_),R=z("Ty5D"),v=z("9kvl"),S=z("55Ip"),L=z("lzim"),C=z("nZ20"),A=z.n(C),x=function(o){var l,u,T,m,h=o.shixunsDetail,w=o.dispatch,y=o.loading,f=o.match,c=o.data,s=c===void 0?{}:c,a=o.title,g=Object(U.a)(o,["shixunsDetail","dispatch","loading","match","data","title"]),p=Object(R.i)(),E=!(((l=h.detail)===null||l===void 0?void 0:l.identity)>4||((u=h.detail)===null||u===void 0?void 0:u.identity)===void 0||((T=h.detail)===null||T===void 0?void 0:T.shixun_status)===2||((m=h.detail)===null||m===void 0?void 0:m.shixun_status)===1);return I.a.createElement("aside",{className:"bg-white mb10 pl20 pr20 ".concat(A.a.wrap)},I.a.createElement(G.a,{gutter:[20,20],align:"middle"},I.a.createElement(M.a,{flex:1},I.a.createElement("span",{className:A.a.icons},I.a.createElement("img",{src:L.e,width:"14"})),I.a.createElement("span",{className:"font16"},"\u7B2C ",s==null?void 0:s.position," \u5173\uFF1A",a)),I.a.createElement(M.a,null,(s==null?void 0:s.prev_challenge)&&I.a.createElement(K.a,{type:"primary",ghost:!0,className:"mt10 mr5",onClick:function(){var B,W=s.prev_challenge.st===0?"/editcheckpoint":"/editquestion",Q="/shixuns/".concat(p.id,"/challenges/").concat(s==null||((B=s.prev_challenge)===null||B===void 0)?void 0:B.id).concat(W);v.d.replace(Q)}},"\u4E0A\u4E00\u5173"),s.next_challenge&&I.a.createElement(K.a,{type:"primary",ghost:!0,className:"mt10 mr5",onClick:function(){var B,W=s.next_challenge.st===0?"/editcheckpoint":"/editquestion",Q="/shixuns/".concat(p.id,"/challenges/").concat(s==null||((B=s.next_challenge)===null||B===void 0)?void 0:B.id).concat(W);v.d.replace(Q)}},"\u4E0B\u4E00\u5173"),E&&I.a.createElement(K.a,{type:"primary"},I.a.createElement(S.a,{to:"/shixuns/".concat(p.id,"/challenges/newquestion")},"\u65B0\u589E\u9009\u62E9\u9898\u4EFB\u52A1")),E&&I.a.createElement(K.a,{type:"primary",className:"ml5"},I.a.createElement(S.a,{to:"/shixuns/".concat(p.id,"/challenges/new")},"\u65B0\u589E\u5B9E\u8DF5\u4EFB\u52A1")),I.a.createElement(K.a,{type:"primary",className:"ml5"},I.a.createElement(S.a,{to:"/shixuns/".concat(p.id,"/challenges")},"\u8FD4\u56DE")))))};xe.a=Object(v.a)(function(d){var o=d.shixunsDetail,l=d.newCourse,u=d.loading,T=d.globalSetting;return{shixunsDetail:o,newCourse:l,globalSetting:T,loading:u.effects}})(x)},DlQD:function(we,xe,z){(function(q,G){we.exports=G()})(this,function(){"use strict";function q(le,ne){for(var ae=0;ae<ne.length;ae++){var Y=ne[ae];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(le,Y.key,Y)}}function G(le,ne,ae){return ne&&q(le.prototype,ne),ae&&q(le,ae),le}function D(le,ne){if(!le)return;if(typeof le=="string")return K(le,ne);var ae=Object.prototype.toString.call(le).slice(8,-1);if(ae==="Object"&&le.constructor&&(ae=le.constructor.name),ae==="Map"||ae==="Set")return Array.from(le);if(ae==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ae))return K(le,ne)}function K(le,ne){(ne==null||ne>le.length)&&(ne=le.length);for(var ae=0,Y=new Array(ne);ae<ne;ae++)Y[ae]=le[ae];return Y}function P(le,ne){var ae;if(typeof Symbol=="undefined"||le[Symbol.iterator]==null){if(Array.isArray(le)||(ae=D(le))||ne&&le&&typeof le.length=="number"){ae&&(le=ae);var Y=0;return function(){return Y>=le.length?{done:!0}:{done:!1,value:le[Y++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return ae=le[Symbol.iterator](),ae.next.bind(ae)}function M(le,ne){return ne={exports:{}},le(ne,ne.exports),ne.exports}var U=M(function(le){function ne(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function ae(Y){le.exports.defaults=Y}le.exports={defaults:ne(),getDefaults:ne,changeDefaults:ae}}),_=U.defaults,I=U.getDefaults,R=U.changeDefaults,v=/[&<>"']/,S=/[&<>"']/g,L=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,A={"&":"&","<":"<",">":">",'"':""","'":"'"},x=function(ne){return A[ne]};function d(le,ne){if(ne){if(v.test(le))return le.replace(S,x)}else if(L.test(le))return le.replace(C,x);return le}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(le){return le.replace(o,function(ne,ae){return ae=ae.toLowerCase(),ae==="colon"?":":ae.charAt(0)==="#"?ae.charAt(1)==="x"?String.fromCharCode(parseInt(ae.substring(2),16)):String.fromCharCode(+ae.substring(1)):""})}var u=/(^|[^\[])\^/g;function T(le,ne){le=le.source||le,ne=ne||"";var ae={replace:function(J,Z){return Z=Z.source||Z,Z=Z.replace(u,"$1"),le=le.replace(J,Z),ae},getRegex:function(){return new RegExp(le,ne)}};return ae}var m=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function w(le,ne,ae){if(le){var Y;try{Y=decodeURIComponent(l(ae)).replace(m,"").toLowerCase()}catch(J){return null}if(Y.indexOf("javascript:")===0||Y.indexOf("vbscript:")===0||Y.indexOf("data:")===0)return null}ne&&!h.test(ae)&&(ae=a(ne,ae));try{ae=encodeURI(ae).replace(/%25/g,"%")}catch(J){return null}return ae}var y={},f=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,s=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(le,ne){y[" "+le]||(f.test(le)?y[" "+le]=le+"/":y[" "+le]=O(le,"/",!0)),le=y[" "+le];var ae=le.indexOf(":")===-1;return ne.substring(0,2)==="//"?ae?ne:le.replace(c,"$1")+ne:ne.charAt(0)==="/"?ae?ne:le.replace(s,"$1")+ne:le+ne}var g={exec:function(){}};function p(le){for(var ne=1,ae,Y;ne<arguments.length;ne++){ae=arguments[ne];for(Y in ae)Object.prototype.hasOwnProperty.call(ae,Y)&&(le[Y]=ae[Y])}return le}function E(le,ne){var ae=le.replace(/\|/g,function(Z,te,se){for(var ve=!1,Se=te;--Se>=0&&se[Se]==="\\";)ve=!ve;return ve?"|":" |"}),Y=ae.split(/ \|/),J=0;if(Y.length>ne)Y.splice(ne);else for(;Y.length<ne;)Y.push("");for(;J<Y.length;J++)Y[J]=Y[J].trim().replace(/\\\|/g,"|");return Y}function O(le,ne,ae){var Y=le.length;if(Y===0)return"";for(var J=0;J<Y;){var Z=le.charAt(Y-J-1);if(Z===ne&&!ae)J++;else if(Z!==ne&&ae)J++;else break}return le.substr(0,Y-J)}function B(le,ne){if(le.indexOf(ne[1])===-1)return-1;for(var ae=le.length,Y=0,J=0;J<ae;J++)if(le[J]==="\\")J++;else if(le[J]===ne[0])Y++;else if(le[J]===ne[1]&&(Y--,Y<0))return J;return-1}function W(le){le&&le.sanitize&&!le.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var Q={escape:d,unescape:l,edit:T,cleanUrl:w,resolveUrl:a,noopTest:g,merge:p,splitCells:E,rtrim:O,findClosingBracket:B,checkSanitizeDeprecation:W},F=U.defaults,N=Q.rtrim,X=Q.splitCells,ee=Q.escape,oe=Q.findClosingBracket;function de(le,ne,ae){var Y=ne.href,J=ne.title?ee(ne.title):null,Z=le[1].replace(/\\([\[\]])/g,"$1");return le[0].charAt(0)!=="!"?{type:"link",raw:ae,href:Y,title:J,text:Z}:{type:"image",raw:ae,href:Y,title:J,text:ee(Z)}}function Ce(le,ne){var ae=le.match(/^(\s+)(?:```)/);if(ae===null)return ne;var Y=ae[1];return ne.split(`
|
|
`).map(function(J){var Z=J.match(/^\s+/);if(Z===null)return J;var te=Z[0];return te.length>=Y.length?J.slice(Y.length):J}).join(`
|
|
`)}var ge=function(){function le(ae){this.options=ae||F}var ne=le.prototype;return ne.space=function(Y){var J=this.rules.block.newline.exec(Y);if(J)return J[0].length>1?{type:"space",raw:J[0]}:{raw:`
|
|
`}},ne.code=function(Y,J){var Z=this.rules.block.code.exec(Y);if(Z){var te=J[J.length-1];if(te&&te.type==="paragraph")return{raw:Z[0],text:Z[0].trimRight()};var se=Z[0].replace(/^ {4}/gm,"");return{type:"code",raw:Z[0],codeBlockStyle:"indented",text:this.options.pedantic?se:N(se,`
|
|
`)}}},ne.fences=function(Y){var J=this.rules.block.fences.exec(Y);if(J){var Z=J[0],te=Ce(Z,J[3]||"");return{type:"code",raw:Z,lang:J[2]?J[2].trim():J[2],text:te}}},ne.heading=function(Y){var J=this.rules.block.heading.exec(Y);if(J)return{type:"heading",raw:J[0],depth:J[1].length,text:J[2]}},ne.nptable=function(Y){var J=this.rules.block.nptable.exec(Y);if(J){var Z={type:"table",header:X(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
|
|
`):[],raw:J[0]};if(Z.header.length===Z.align.length){var te=Z.align.length,se;for(se=0;se<te;se++)/^ *-+: *$/.test(Z.align[se])?Z.align[se]="right":/^ *:-+: *$/.test(Z.align[se])?Z.align[se]="center":/^ *:-+ *$/.test(Z.align[se])?Z.align[se]="left":Z.align[se]=null;for(te=Z.cells.length,se=0;se<te;se++)Z.cells[se]=X(Z.cells[se],Z.header.length);return Z}}},ne.hr=function(Y){var J=this.rules.block.hr.exec(Y);if(J)return{type:"hr",raw:J[0]}},ne.blockquote=function(Y){var J=this.rules.block.blockquote.exec(Y);if(J){var Z=J[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:J[0],text:Z}}},ne.list=function(Y){var J=this.rules.block.list.exec(Y);if(J){for(var Z=J[0],te=J[2],se=te.length>1,ve=te[te.length-1]===")",Se={type:"list",raw:Z,ordered:se,start:se?+te.slice(0,-1):"",loose:!1,items:[]},Xe=J[0].match(this.rules.block.item),it=!1,tt,St,ft,ot,Lt,yt,Pt,At=Xe.length,dt=0;dt<At;dt++)tt=Xe[dt],Z=tt,St=tt.length,tt=tt.replace(/^ *([*+-]|\d+[.)]) */,""),~tt.indexOf(`
|
|
`)&&(St-=tt.length,tt=this.options.pedantic?tt.replace(/^ {1,4}/gm,""):tt.replace(new RegExp("^ {1,"+St+"}","gm"),"")),dt!==At-1&&(ft=this.rules.block.bullet.exec(Xe[dt+1])[0],(se?ft.length===1||!ve&&ft[ft.length-1]===")":ft.length>1||this.options.smartLists&&ft!==te)&&(ot=Xe.slice(dt+1).join(`
|
|
`),Se.raw=Se.raw.substring(0,Se.raw.length-ot.length),dt=At-1)),Lt=it||/\n\n(?!\s*$)/.test(tt),dt!==At-1&&(it=tt.charAt(tt.length-1)===`
|
|
`,Lt||(Lt=it)),Lt&&(Se.loose=!0),yt=/^\[[ xX]\] /.test(tt),Pt=void 0,yt&&(Pt=tt[1]!==" ",tt=tt.replace(/^\[[ xX]\] +/,"")),Se.items.push({type:"list_item",raw:Z,task:yt,checked:Pt,loose:Lt,text:tt});return Se}},ne.html=function(Y){var J=this.rules.block.html.exec(Y);if(J)return{type:this.options.sanitize?"paragraph":"html",raw:J[0],pre:!this.options.sanitizer&&(J[1]==="pre"||J[1]==="script"||J[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(J[0]):ee(J[0]):J[0]}},ne.def=function(Y){var J=this.rules.block.def.exec(Y);if(J){J[3]&&(J[3]=J[3].substring(1,J[3].length-1));var Z=J[1].toLowerCase().replace(/\s+/g," ");return{tag:Z,raw:J[0],href:J[2],title:J[3]}}},ne.table=function(Y){var J=this.rules.block.table.exec(Y);if(J){var Z={type:"table",header:X(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
|
|
`):[]};if(Z.header.length===Z.align.length){Z.raw=J[0];var te=Z.align.length,se;for(se=0;se<te;se++)/^ *-+: *$/.test(Z.align[se])?Z.align[se]="right":/^ *:-+: *$/.test(Z.align[se])?Z.align[se]="center":/^ *:-+ *$/.test(Z.align[se])?Z.align[se]="left":Z.align[se]=null;for(te=Z.cells.length,se=0;se<te;se++)Z.cells[se]=X(Z.cells[se].replace(/^ *\| *| *\| *$/g,""),Z.header.length);return Z}}},ne.lheading=function(Y){var J=this.rules.block.lheading.exec(Y);if(J)return{type:"heading",raw:J[0],depth:J[2].charAt(0)==="="?1:2,text:J[1]}},ne.paragraph=function(Y){var J=this.rules.block.paragraph.exec(Y);if(J)return{type:"paragraph",raw:J[0],text:J[1].charAt(J[1].length-1)===`
|
|
`?J[1].slice(0,-1):J[1]}},ne.text=function(Y,J){var Z=this.rules.block.text.exec(Y);if(Z){var te=J[J.length-1];return te&&te.type==="text"?{raw:Z[0],text:Z[0]}:{type:"text",raw:Z[0],text:Z[0]}}},ne.escape=function(Y){var J=this.rules.inline.escape.exec(Y);if(J)return{type:"escape",raw:J[0],text:ee(J[1])}},ne.tag=function(Y,J,Z){var te=this.rules.inline.tag.exec(Y);if(te)return!J&&/^<a /i.test(te[0])?J=!0:J&&/^<\/a>/i.test(te[0])&&(J=!1),!Z&&/^<(pre|code|kbd|script)(\s|>)/i.test(te[0])?Z=!0:Z&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(te[0])&&(Z=!1),{type:this.options.sanitize?"text":"html",raw:te[0],inLink:J,inRawBlock:Z,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(te[0]):ee(te[0]):te[0]}},ne.link=function(Y){var J=this.rules.inline.link.exec(Y);if(J){var Z=oe(J[2],"()");if(Z>-1){var te=J[0].indexOf("!")===0?5:4,se=te+J[1].length+Z;J[2]=J[2].substring(0,Z),J[0]=J[0].substring(0,se).trim(),J[3]=""}var ve=J[2],Se="";if(this.options.pedantic){var Xe=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ve);Xe?(ve=Xe[1],Se=Xe[3]):Se=""}else Se=J[3]?J[3].slice(1,-1):"";ve=ve.trim().replace(/^<([\s\S]*)>$/,"$1");var it=de(J,{href:ve&&ve.replace(this.rules.inline._escapes,"$1"),title:Se&&Se.replace(this.rules.inline._escapes,"$1")},J[0]);return it}},ne.reflink=function(Y,J){var Z;if((Z=this.rules.inline.reflink.exec(Y))||(Z=this.rules.inline.nolink.exec(Y))){var te=(Z[2]||Z[1]).replace(/\s+/g," ");if(te=J[te.toLowerCase()],!te||!te.href){var se=Z[0].charAt(0);return{type:"text",raw:se,text:se}}var ve=de(Z,te,Z[0]);return ve}},ne.strong=function(Y,J,Z){Z===void 0&&(Z="");var te=this.rules.inline.strong.start.exec(Y);if(te&&(!te[1]||te[1]&&(Z===""||this.rules.inline.punctuation.exec(Z)))){J=J.slice(-1*Y.length);var se=te[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;se.lastIndex=0;for(var ve;(te=se.exec(J))!=null;)if(ve=this.rules.inline.strong.middle.exec(J.slice(0,te.index+3)),ve)return{type:"strong",raw:Y.slice(0,ve[0].length),text:Y.slice(2,ve[0].length-2)}}},ne.em=function(Y,J,Z){Z===void 0&&(Z="");var te=this.rules.inline.em.start.exec(Y);if(te&&(!te[1]||te[1]&&(Z===""||this.rules.inline.punctuation.exec(Z)))){J=J.slice(-1*Y.length);var se=te[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;se.lastIndex=0;for(var ve;(te=se.exec(J))!=null;)if(ve=this.rules.inline.em.middle.exec(J.slice(0,te.index+2)),ve)return{type:"em",raw:Y.slice(0,ve[0].length),text:Y.slice(1,ve[0].length-1)}}},ne.codespan=function(Y){var J=this.rules.inline.code.exec(Y);if(J){var Z=J[2].replace(/\n/g," "),te=/[^ ]/.test(Z),se=Z.startsWith(" ")&&Z.endsWith(" ");return te&&se&&(Z=Z.substring(1,Z.length-1)),Z=ee(Z,!0),{type:"codespan",raw:J[0],text:Z}}},ne.br=function(Y){var J=this.rules.inline.br.exec(Y);if(J)return{type:"br",raw:J[0]}},ne.del=function(Y){var J=this.rules.inline.del.exec(Y);if(J)return{type:"del",raw:J[0],text:J[1]}},ne.autolink=function(Y,J){var Z=this.rules.inline.autolink.exec(Y);if(Z){var te,se;return Z[2]==="@"?(te=ee(this.options.mangle?J(Z[1]):Z[1]),se="mailto:"+te):(te=ee(Z[1]),se=te),{type:"link",raw:Z[0],text:te,href:se,tokens:[{type:"text",raw:te,text:te}]}}},ne.url=function(Y,J){var Z;if(Z=this.rules.inline.url.exec(Y)){var te,se;if(Z[2]==="@")te=ee(this.options.mangle?J(Z[0]):Z[0]),se="mailto:"+te;else{var ve;do ve=Z[0],Z[0]=this.rules.inline._backpedal.exec(Z[0])[0];while(ve!==Z[0]);te=ee(Z[0]),Z[1]==="www."?se="http://"+te:se=te}return{type:"link",raw:Z[0],text:te,href:se,tokens:[{type:"text",raw:te,text:te}]}}},ne.inlineText=function(Y,J,Z){var te=this.rules.inline.text.exec(Y);if(te){var se;return J?se=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(te[0]):ee(te[0]):te[0]:se=ee(this.options.smartypants?Z(te[0]):te[0]),{type:"text",raw:te[0],text:se}}},le}(),fe=Q.noopTest,me=Q.edit,pe=Q.merge,ie={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:fe,table:fe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ie._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ie._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ie.def=me(ie.def).replace("label",ie._label).replace("title",ie._title).getRegex(),ie.bullet=/(?:[*+-]|\d{1,9}[.)])/,ie.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ie.item=me(ie.item,"gm").replace(/bull/g,ie.bullet).getRegex(),ie.list=me(ie.list).replace(/bull/g,ie.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ie.def.source+")").getRegex(),ie._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ie._comment=/<!--(?!-?>)[\s\S]*?-->/,ie.html=me(ie.html,"i").replace("comment",ie._comment).replace("tag",ie._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ie.paragraph=me(ie._paragraph).replace("hr",ie.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ie._tag).getRegex(),ie.blockquote=me(ie.blockquote).replace("paragraph",ie.paragraph).getRegex(),ie.normal=pe({},ie),ie.gfm=pe({},ie.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),ie.gfm.nptable=me(ie.gfm.nptable).replace("hr",ie.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ie._tag).getRegex(),ie.gfm.table=me(ie.gfm.table).replace("hr",ie.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ie._tag).getRegex(),ie.pedantic=pe({},ie.normal,{html:me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ie._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:fe,paragraph:me(ie.normal._paragraph).replace("hr",ie.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",ie.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ue={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:fe,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:fe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ue._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ue.punctuation=me(ue.punctuation).replace(/punctuation/g,ue._punctuation).getRegex(),ue._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ue._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ue.em.start=me(ue.em.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.middle=me(ue.em.middle).replace(/punctuation/g,ue._punctuation).replace(/overlapSkip/g,ue._overlapSkip).getRegex(),ue.em.endAst=me(ue.em.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.endUnd=me(ue.em.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.start=me(ue.strong.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.middle=me(ue.strong.middle).replace(/punctuation/g,ue._punctuation).replace(/blockSkip/g,ue._blockSkip).getRegex(),ue.strong.endAst=me(ue.strong.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.endUnd=me(ue.strong.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.blockSkip=me(ue._blockSkip,"g").getRegex(),ue.overlapSkip=me(ue._overlapSkip,"g").getRegex(),ue._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ue._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ue._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ue.autolink=me(ue.autolink).replace("scheme",ue._scheme).replace("email",ue._email).getRegex(),ue._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ue.tag=me(ue.tag).replace("comment",ie._comment).replace("attribute",ue._attribute).getRegex(),ue._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ue._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ue._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ue.link=me(ue.link).replace("label",ue._label).replace("href",ue._href).replace("title",ue._title).getRegex(),ue.reflink=me(ue.reflink).replace("label",ue._label).getRegex(),ue.reflinkSearch=me(ue.reflinkSearch,"g").replace("reflink",ue.reflink).replace("nolink",ue.nolink).getRegex(),ue.normal=pe({},ue),ue.pedantic=pe({},ue.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:me(/^!?\[(label)\]\((.*?)\)/).replace("label",ue._label).getRegex(),reflink:me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ue._label).getRegex()}),ue.gfm=pe({},ue.normal,{escape:me(ue.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),ue.gfm.url=me(ue.gfm.url,"i").replace("email",ue.gfm._extended_email).getRegex(),ue.breaks=pe({},ue.gfm,{br:me(ue.br).replace("{2,}","*").getRegex(),text:me(ue.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var be={block:ie,inline:ue},_e=U.defaults,Oe=be.block,We=be.inline;function Ve(le){return le.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Le(le){var ne="",ae,Y,J=le.length;for(ae=0;ae<J;ae++)Y=le.charCodeAt(ae),Math.random()>.5&&(Y="x"+Y.toString(16)),ne+="&#"+Y+";";return ne}var Re=function(){function le(ae){this.tokens=[],this.tokens.links=Object.create(null),this.options=ae||_e,this.options.tokenizer=this.options.tokenizer||new ge,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Y={block:Oe.normal,inline:We.normal};this.options.pedantic?(Y.block=Oe.pedantic,Y.inline=We.pedantic):this.options.gfm&&(Y.block=Oe.gfm,this.options.breaks?Y.inline=We.breaks:Y.inline=We.gfm),this.tokenizer.rules=Y}le.lex=function(Y,J){var Z=new le(J);return Z.lex(Y)};var ne=le.prototype;return ne.lex=function(Y){return Y=Y.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(Y,this.tokens,!0),this.inline(this.tokens),this.tokens},ne.blockTokens=function(Y,J,Z){J===void 0&&(J=[]),Z===void 0&&(Z=!0),Y=Y.replace(/^ +$/gm,"");for(var te,se,ve,Se;Y;){if(te=this.tokenizer.space(Y)){Y=Y.substring(te.raw.length),te.type&&J.push(te);continue}if(te=this.tokenizer.code(Y,J)){Y=Y.substring(te.raw.length),te.type?J.push(te):(Se=J[J.length-1],Se.raw+=`
|
|
`+te.raw,Se.text+=`
|
|
`+te.text);continue}if(te=this.tokenizer.fences(Y)){Y=Y.substring(te.raw.length),J.push(te);continue}if(te=this.tokenizer.heading(Y)){Y=Y.substring(te.raw.length),J.push(te);continue}if(te=this.tokenizer.nptable(Y)){Y=Y.substring(te.raw.length),J.push(te);continue}if(te=this.tokenizer.hr(Y)){Y=Y.substring(te.raw.length),J.push(te);continue}if(te=this.tokenizer.blockquote(Y)){Y=Y.substring(te.raw.length),te.tokens=this.blockTokens(te.text,[],Z),J.push(te);continue}if(te=this.tokenizer.list(Y)){for(Y=Y.substring(te.raw.length),ve=te.items.length,se=0;se<ve;se++)te.items[se].tokens=this.blockTokens(te.items[se].text,[],!1);J.push(te);continue}if(te=this.tokenizer.html(Y)){Y=Y.substring(te.raw.length),J.push(te);continue}if(Z&&(te=this.tokenizer.def(Y))){Y=Y.substring(te.raw.length),this.tokens.links[te.tag]||(this.tokens.links[te.tag]={href:te.href,title:te.title});continue}if(te=this.tokenizer.table(Y)){Y=Y.substring(te.raw.length),J.push(te);continue}if(te=this.tokenizer.lheading(Y)){Y=Y.substring(te.raw.length),J.push(te);continue}if(Z&&(te=this.tokenizer.paragraph(Y))){Y=Y.substring(te.raw.length),J.push(te);continue}if(te=this.tokenizer.text(Y,J)){Y=Y.substring(te.raw.length),te.type?J.push(te):(Se=J[J.length-1],Se.raw+=`
|
|
`+te.raw,Se.text+=`
|
|
`+te.text);continue}if(Y){var Xe="Infinite loop on byte: "+Y.charCodeAt(0);if(this.options.silent){console.error(Xe);break}else throw new Error(Xe)}}return J},ne.inline=function(Y){var J,Z,te,se,ve,Se,Xe=Y.length;for(J=0;J<Xe;J++){Se=Y[J];switch(Se.type){case"paragraph":case"text":case"heading":{Se.tokens=[],this.inlineTokens(Se.text,Se.tokens);break}case"table":{for(Se.tokens={header:[],cells:[]},se=Se.header.length,Z=0;Z<se;Z++)Se.tokens.header[Z]=[],this.inlineTokens(Se.header[Z],Se.tokens.header[Z]);for(se=Se.cells.length,Z=0;Z<se;Z++)for(ve=Se.cells[Z],Se.tokens.cells[Z]=[],te=0;te<ve.length;te++)Se.tokens.cells[Z][te]=[],this.inlineTokens(ve[te],Se.tokens.cells[Z][te]);break}case"blockquote":{this.inline(Se.tokens);break}case"list":{for(se=Se.items.length,Z=0;Z<se;Z++)this.inline(Se.items[Z].tokens);break}}}return Y},ne.inlineTokens=function(Y,J,Z,te,se){J===void 0&&(J=[]),Z===void 0&&(Z=!1),te===void 0&&(te=!1),se===void 0&&(se="");var ve,Se=Y,Xe;if(this.tokens.links){var it=Object.keys(this.tokens.links);if(it.length>0)for(;(Xe=this.tokenizer.rules.inline.reflinkSearch.exec(Se))!=null;)it.includes(Xe[0].slice(Xe[0].lastIndexOf("[")+1,-1))&&(Se=Se.slice(0,Xe.index)+"["+"a".repeat(Xe[0].length-2)+"]"+Se.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Xe=this.tokenizer.rules.inline.blockSkip.exec(Se))!=null;)Se=Se.slice(0,Xe.index)+"["+"a".repeat(Xe[0].length-2)+"]"+Se.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Y;){if(ve=this.tokenizer.escape(Y)){Y=Y.substring(ve.raw.length),J.push(ve);continue}if(ve=this.tokenizer.tag(Y,Z,te)){Y=Y.substring(ve.raw.length),Z=ve.inLink,te=ve.inRawBlock,J.push(ve);continue}if(ve=this.tokenizer.link(Y)){Y=Y.substring(ve.raw.length),ve.type==="link"&&(ve.tokens=this.inlineTokens(ve.text,[],!0,te)),J.push(ve);continue}if(ve=this.tokenizer.reflink(Y,this.tokens.links)){Y=Y.substring(ve.raw.length),ve.type==="link"&&(ve.tokens=this.inlineTokens(ve.text,[],!0,te)),J.push(ve);continue}if(ve=this.tokenizer.strong(Y,Se,se)){Y=Y.substring(ve.raw.length),ve.tokens=this.inlineTokens(ve.text,[],Z,te),J.push(ve);continue}if(ve=this.tokenizer.em(Y,Se,se)){Y=Y.substring(ve.raw.length),ve.tokens=this.inlineTokens(ve.text,[],Z,te),J.push(ve);continue}if(ve=this.tokenizer.codespan(Y)){Y=Y.substring(ve.raw.length),J.push(ve);continue}if(ve=this.tokenizer.br(Y)){Y=Y.substring(ve.raw.length),J.push(ve);continue}if(ve=this.tokenizer.del(Y)){Y=Y.substring(ve.raw.length),ve.tokens=this.inlineTokens(ve.text,[],Z,te),J.push(ve);continue}if(ve=this.tokenizer.autolink(Y,Le)){Y=Y.substring(ve.raw.length),J.push(ve);continue}if(!Z&&(ve=this.tokenizer.url(Y,Le))){Y=Y.substring(ve.raw.length),J.push(ve);continue}if(ve=this.tokenizer.inlineText(Y,te,Ve)){Y=Y.substring(ve.raw.length),se=ve.raw.slice(-1),J.push(ve);continue}if(Y){var tt="Infinite loop on byte: "+Y.charCodeAt(0);if(this.options.silent){console.error(tt);break}else throw new Error(tt)}}return J},G(le,null,[{key:"rules",get:function(){return{block:Oe,inline:We}}}]),le}(),De=U.defaults,Ge=Q.cleanUrl,ze=Q.escape,Te=function(){function le(ae){this.options=ae||De}var ne=le.prototype;return ne.code=function(Y,J,Z){var te=(J||"").match(/\S*/)[0];if(this.options.highlight){var se=this.options.highlight(Y,te);se!=null&&se!==Y&&(Z=!0,Y=se)}return te?'<pre><code class="'+this.options.langPrefix+ze(te,!0)+'">'+(Z?Y:ze(Y,!0))+`</code></pre>
|
|
`:"<pre><code>"+(Z?Y:ze(Y,!0))+`</code></pre>
|
|
`},ne.blockquote=function(Y){return`<blockquote>
|
|
`+Y+`</blockquote>
|
|
`},ne.html=function(Y){return Y},ne.heading=function(Y,J,Z,te){return this.options.headerIds?"<h"+J+' id="'+this.options.headerPrefix+te.slug(Z)+'">'+Y+"</h"+J+`>
|
|
`:"<h"+J+">"+Y+"</h"+J+`>
|
|
`},ne.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},ne.list=function(Y,J,Z){var te=J?"ol":"ul",se=J&&Z!==1?' start="'+Z+'"':"";return"<"+te+se+`>
|
|
`+Y+"</"+te+`>
|
|
`},ne.listitem=function(Y){return"<li>"+Y+`</li>
|
|
`},ne.checkbox=function(Y){return"<input "+(Y?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ne.paragraph=function(Y){return"<p>"+Y+`</p>
|
|
`},ne.table=function(Y,J){return J&&(J="<tbody>"+J+"</tbody>"),`<table>
|
|
<thead>
|
|
`+Y+`</thead>
|
|
`+J+`</table>
|
|
`},ne.tablerow=function(Y){return`<tr>
|
|
`+Y+`</tr>
|
|
`},ne.tablecell=function(Y,J){var Z=J.header?"th":"td",te=J.align?"<"+Z+' align="'+J.align+'">':"<"+Z+">";return te+Y+"</"+Z+`>
|
|
`},ne.strong=function(Y){return"<strong>"+Y+"</strong>"},ne.em=function(Y){return"<em>"+Y+"</em>"},ne.codespan=function(Y){return"<code>"+Y+"</code>"},ne.br=function(){return this.options.xhtml?"<br/>":"<br>"},ne.del=function(Y){return"<del>"+Y+"</del>"},ne.link=function(Y,J,Z){if(Y=Ge(this.options.sanitize,this.options.baseUrl,Y),Y===null)return Z;var te='<a href="'+ze(Y)+'"';return J&&(te+=' title="'+J+'"'),te+=">"+Z+"</a>",te},ne.image=function(Y,J,Z){if(Y=Ge(this.options.sanitize,this.options.baseUrl,Y),Y===null)return Z;var te='<img src="'+Y+'" alt="'+Z+'"';return J&&(te+=' title="'+J+'"'),te+=this.options.xhtml?"/>":">",te},ne.text=function(Y){return Y},le}(),Ie=function(){function le(){}var ne=le.prototype;return ne.strong=function(Y){return Y},ne.em=function(Y){return Y},ne.codespan=function(Y){return Y},ne.del=function(Y){return Y},ne.html=function(Y){return Y},ne.text=function(Y){return Y},ne.link=function(Y,J,Z){return""+Z},ne.image=function(Y,J,Z){return""+Z},ne.br=function(){return""},le}(),Ye=function(){function le(){this.seen={}}var ne=le.prototype;return ne.slug=function(Y){var J=Y.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(J)){var Z=J;do this.seen[Z]++,J=Z+"-"+this.seen[Z];while(this.seen.hasOwnProperty(J))}return this.seen[J]=0,J},le}(),qe=U.defaults,je=Q.unescape,Fe=function(){function le(ae){this.options=ae||qe,this.options.renderer=this.options.renderer||new Te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ie,this.slugger=new Ye}le.parse=function(Y,J){var Z=new le(J);return Z.parse(Y)};var ne=le.prototype;return ne.parse=function(Y,J){J===void 0&&(J=!0);var Z="",te,se,ve,Se,Xe,it,tt,St,ft,ot,Lt,yt,Pt,At,dt,bt,Rt,It,Ft=Y.length;for(te=0;te<Ft;te++){ot=Y[te];switch(ot.type){case"space":continue;case"hr":{Z+=this.renderer.hr();continue}case"heading":{Z+=this.renderer.heading(this.parseInline(ot.tokens),ot.depth,je(this.parseInline(ot.tokens,this.textRenderer)),this.slugger);continue}case"code":{Z+=this.renderer.code(ot.text,ot.lang,ot.escaped);continue}case"table":{for(St="",tt="",Se=ot.header.length,se=0;se<Se;se++)tt+=this.renderer.tablecell(this.parseInline(ot.tokens.header[se]),{header:!0,align:ot.align[se]});for(St+=this.renderer.tablerow(tt),ft="",Se=ot.cells.length,se=0;se<Se;se++){for(it=ot.tokens.cells[se],tt="",Xe=it.length,ve=0;ve<Xe;ve++)tt+=this.renderer.tablecell(this.parseInline(it[ve]),{header:!1,align:ot.align[ve]});ft+=this.renderer.tablerow(tt)}Z+=this.renderer.table(St,ft);continue}case"blockquote":{ft=this.parse(ot.tokens),Z+=this.renderer.blockquote(ft);continue}case"list":{for(Lt=ot.ordered,yt=ot.start,Pt=ot.loose,Se=ot.items.length,ft="",se=0;se<Se;se++)dt=ot.items[se],bt=dt.checked,Rt=dt.task,At="",dt.task&&(It=this.renderer.checkbox(bt),Pt?dt.tokens.length>0&&dt.tokens[0].type==="text"?(dt.tokens[0].text=It+" "+dt.tokens[0].text,dt.tokens[0].tokens&&dt.tokens[0].tokens.length>0&&dt.tokens[0].tokens[0].type==="text"&&(dt.tokens[0].tokens[0].text=It+" "+dt.tokens[0].tokens[0].text)):dt.tokens.unshift({type:"text",text:It}):At+=It),At+=this.parse(dt.tokens,Pt),ft+=this.renderer.listitem(At,Rt,bt);Z+=this.renderer.list(ft,Lt,yt);continue}case"html":{Z+=this.renderer.html(ot.text);continue}case"paragraph":{Z+=this.renderer.paragraph(this.parseInline(ot.tokens));continue}case"text":{for(ft=ot.tokens?this.parseInline(ot.tokens):ot.text;te+1<Ft&&Y[te+1].type==="text";)ot=Y[++te],ft+=`
|
|
`+(ot.tokens?this.parseInline(ot.tokens):ot.text);Z+=J?this.renderer.paragraph(ft):ft;continue}default:{var rr='Token with "'+ot.type+'" type was not found.';if(this.options.silent){console.error(rr);return}else throw new Error(rr)}}}return Z},ne.parseInline=function(Y,J){J=J||this.renderer;var Z="",te,se,ve=Y.length;for(te=0;te<ve;te++){se=Y[te];switch(se.type){case"escape":{Z+=J.text(se.text);break}case"html":{Z+=J.html(se.text);break}case"link":{Z+=J.link(se.href,se.title,this.parseInline(se.tokens,J));break}case"image":{Z+=J.image(se.href,se.title,se.text);break}case"strong":{Z+=J.strong(this.parseInline(se.tokens,J));break}case"em":{Z+=J.em(this.parseInline(se.tokens,J));break}case"codespan":{Z+=J.codespan(se.text);break}case"br":{Z+=J.br();break}case"del":{Z+=J.del(this.parseInline(se.tokens,J));break}case"text":{Z+=J.text(se.text);break}default:{var Se='Token with "'+se.type+'" type was not found.';if(this.options.silent){console.error(Se);return}else throw new Error(Se)}}}return Z},le}(),rt=Q.merge,Ze=Q.checkSanitizeDeprecation,Je=Q.escape,Ee=U.getDefaults,$e=U.changeDefaults,Qe=U.defaults;function ye(le,ne,ae){if(typeof le=="undefined"||le===null)throw new Error("marked(): input parameter is undefined or null");if(typeof le!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(le)+", string expected");if(typeof ne=="function"&&(ae=ne,ne=null),ne=rt({},ye.defaults,ne||{}),Ze(ne),ae){var Y=ne.highlight,J;try{J=Re.lex(le,ne)}catch(ve){return ae(ve)}var Z=function(Se){var Xe;if(!Se)try{Xe=Fe.parse(J,ne)}catch(it){Se=it}return ne.highlight=Y,Se?ae(Se):ae(null,Xe)};if(!Y||Y.length<3)return Z();if(delete ne.highlight,!J.length)return Z();var te=0;ye.walkTokens(J,function(ve){ve.type==="code"&&(te++,setTimeout(function(){Y(ve.text,ve.lang,function(Se,Xe){if(Se)return Z(Se);Xe!=null&&Xe!==ve.text&&(ve.text=Xe,ve.escaped=!0),te--,te===0&&Z()})},0))}),te===0&&Z();return}try{var se=Re.lex(le,ne);return ne.walkTokens&&ye.walkTokens(se,ne.walkTokens),Fe.parse(se,ne)}catch(ve){if(ve.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ne.silent)return"<p>An error occurred:</p><pre>"+Je(ve.message+"",!0)+"</pre>";throw ve}}ye.options=ye.setOptions=function(le){return rt(ye.defaults,le),$e(ye.defaults),ye},ye.getDefaults=Ee,ye.defaults=Qe,ye.use=function(le){var ne=rt({},le);if(le.renderer&&function(){var Y=ye.defaults.renderer||new Te,J=function(se){var ve=Y[se];Y[se]=function(){for(var Se=arguments.length,Xe=new Array(Se),it=0;it<Se;it++)Xe[it]=arguments[it];var tt=le.renderer[se].apply(Y,Xe);return tt===!1&&(tt=ve.apply(Y,Xe)),tt}};for(var Z in le.renderer)J(Z);ne.renderer=Y}(),le.tokenizer&&function(){var Y=ye.defaults.tokenizer||new ge,J=function(se){var ve=Y[se];Y[se]=function(){for(var Se=arguments.length,Xe=new Array(Se),it=0;it<Se;it++)Xe[it]=arguments[it];var tt=le.tokenizer[se].apply(Y,Xe);return tt===!1&&(tt=ve.apply(Y,Xe)),tt}};for(var Z in le.tokenizer)J(Z);ne.tokenizer=Y}(),le.walkTokens){var ae=ye.defaults.walkTokens;ne.walkTokens=function(Y){le.walkTokens(Y),ae&&ae(Y)}}ye.setOptions(ne)},ye.walkTokens=function(le,ne){for(var ae=P(le),Y;!(Y=ae()).done;){var J=Y.value;ne(J);switch(J.type){case"table":{for(var Z=P(J.tokens.header),te;!(te=Z()).done;){var se=te.value;ye.walkTokens(se,ne)}for(var ve=P(J.tokens.cells),Se;!(Se=ve()).done;)for(var Xe=Se.value,it=P(Xe),tt;!(tt=it()).done;){var St=tt.value;ye.walkTokens(St,ne)}break}case"list":{ye.walkTokens(J.items,ne);break}default:J.tokens&&ye.walkTokens(J.tokens,ne)}}},ye.Parser=Fe,ye.parser=Fe.parse,ye.Renderer=Te,ye.TextRenderer=Ie,ye.Lexer=Re,ye.lexer=Re.lex,ye.Tokenizer=ge,ye.Slugger=Ye,ye.parse=ye;var Me=ye;return Me})},E7E6:function(we,xe){we.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADUCAYAAADZTGx+AAAgAElEQVR4Xu2dC3BU13nHv7MrIQkQQoCEtAIEAmxig4GACxhogpM6NY7jOKZO4nimwcFot23SNNNO02napJN0JjN9TNMm5eG3x4+YSeI3ftUGjCDGQMBgG4wxb+0u4mEeQhJI2tP539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fgCUCSumCNQsgvSymXSklLeF4lj9rhTtadQtAGIcR6KbWNS0fdydZYLp4DRF9snLQSjUZvjsViS4Wg26SUVi++NiYNjuWKBIQQR6Wkl30+3/q6urq3hBBXb+J3pSTZM/E0IMnFj0Qi10kp/4QotphILJJSjs1eRY6RbwkIIU4SyRYi32YhxBv19fUD9yLku3BZ8i8oQJLrcurUiWt6e8Wi3l7CyBiO8JvicXkXS/EOEokWv582+/2ypaZm3IFCrXhBA5Is9La2trqenp6biGi2lJhv0eZcxhVq4xRIuU8Qid1CCKyB31VSUrK1trY2WiBlz1rMQQVIqtpeuHBidEcHzZIy/iLSXtfyWrGsupEQIb7WiT4iot1CxF9Dh9LuESPGnTGXUmHFHvSApGoOzLm0tbU19vb2TpVSThGCphLJKVLSVCFoYrHCAwikpCNC0MdE4qCU9LEQ4qDf7/+4trb2aN/cRGFpeI6lLUpAMslMSulva2ub2NPT0+TzyUAsJup9PgpIKQNSinohtM/1RFRo5/1cFkJEpKSwEDIihAjHYhT2+WQkFhPhkpKSQ7W1tUdwsnmOOjWoHmdALDbn+fPnR3V2dgKW0ULEqmIxUSWlHCmErJJSVAlBVVIS3kcS4X9ULoQolVKWZnpHcaSU3UKI7szv1EUkzuNSKSEI7+eFkOelFOeFEOd8Pnz24fOZioqKcFVV1VmLVS3qx/4fQLyzKIIkCJoAAAAASUVORK5CYII="},ELLl:function(we,xe,z){(function(q){q(z("VrN/"))})(function(q){var G={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},D=q.Pos;q.defineOption("autoCloseBrackets",!1,function(A,x,d){d&&d!=q.Init&&(A.removeKeyMap(P),A.state.closeBrackets=null),x&&(M(K(x,"pairs")),A.state.closeBrackets=x,A.addKeyMap(P))});function K(A,x){return x=="pairs"&&typeof A=="string"?A:typeof A=="object"&&A[x]!=null?A[x]:G[x]}var P={Backspace:I,Enter:R};function M(A){for(var x=0;x<A.length;x++){var d=A.charAt(x),o="'"+d+"'";P[o]||(P[o]=U(d))}}M(G.pairs+"`");function U(A){return function(x){return S(x,A)}}function _(A){var x=A.state.closeBrackets;if(!x||x.override)return x;var d=A.getModeAt(A.getCursor());return d.closeBrackets||x}function I(A){var x=_(A);if(!x||A.getOption("disableInput"))return q.Pass;for(var d=K(x,"pairs"),o=A.listSelections(),l=0;l<o.length;l++){if(!o[l].empty())return q.Pass;var u=L(A,o[l].head);if(!u||d.indexOf(u)%2!=0)return q.Pass}for(var l=o.length-1;l>=0;l--){var T=o[l].head;A.replaceRange("",D(T.line,T.ch-1),D(T.line,T.ch+1),"+delete")}}function R(A){var x=_(A),d=x&&K(x,"explode");if(!d||A.getOption("disableInput"))return q.Pass;for(var o=A.listSelections(),l=0;l<o.length;l++){if(!o[l].empty())return q.Pass;var u=L(A,o[l].head);if(!u||d.indexOf(u)%2!=0)return q.Pass}A.operation(function(){var T=A.lineSeparator()||`
|
|
`;A.replaceSelection(T+T,null),A.execCommand("goCharLeft"),o=A.listSelections();for(var m=0;m<o.length;m++){var h=o[m].head.line;A.indentLine(h,null,!0),A.indentLine(h+1,null,!0)}})}function v(A){var x=q.cmpPos(A.anchor,A.head)>0;return{anchor:new D(A.anchor.line,A.anchor.ch+(x?-1:1)),head:new D(A.head.line,A.head.ch+(x?1:-1))}}function S(A,x){var d=_(A);if(!d||A.getOption("disableInput"))return q.Pass;var o=K(d,"pairs"),l=o.indexOf(x);if(l==-1)return q.Pass;for(var u=K(d,"closeBefore"),T=K(d,"triples"),m=o.charAt(l+1)==x,h=A.listSelections(),w=l%2==0,y,f=0;f<h.length;f++){var c=h[f],s=c.head,a,g=A.getRange(s,D(s.line,s.ch+1));if(w&&!c.empty())a="surround";else if((m||!w)&&g==x)m&&C(A,s)?a="both":T.indexOf(x)>=0&&A.getRange(s,D(s.line,s.ch+3))==x+x+x?a="skipThree":a="skip";else if(m&&s.ch>1&&T.indexOf(x)>=0&&A.getRange(D(s.line,s.ch-2),s)==x+x){if(s.ch>2&&/\bstring/.test(A.getTokenTypeAt(D(s.line,s.ch-2))))return q.Pass;a="addFour"}else if(m){var p=s.ch==0?" ":A.getRange(D(s.line,s.ch-1),s);if(!q.isWordChar(g)&&p!=x&&!q.isWordChar(p))a="both";else return q.Pass}else if(w&&(g.length===0||/\s/.test(g)||u.indexOf(g)>-1))a="both";else return q.Pass;if(!y)y=a;else if(y!=a)return q.Pass}var E=l%2?o.charAt(l-1):x,O=l%2?x:o.charAt(l+1);A.operation(function(){if(y=="skip")A.execCommand("goCharRight");else if(y=="skipThree")for(var B=0;B<3;B++)A.execCommand("goCharRight");else if(y=="surround"){for(var W=A.getSelections(),B=0;B<W.length;B++)W[B]=E+W[B]+O;A.replaceSelections(W,"around"),W=A.listSelections().slice();for(var B=0;B<W.length;B++)W[B]=v(W[B]);A.setSelections(W)}else y=="both"?(A.replaceSelection(E+O,null),A.triggerElectric(E+O),A.execCommand("goCharLeft")):y=="addFour"&&(A.replaceSelection(E+E+E+E,"before"),A.execCommand("goCharRight"))})}function L(A,x){var d=A.getRange(D(x.line,x.ch-1),D(x.line,x.ch+1));return d.length==2?d:null}function C(A,x){var d=A.getTokenAt(D(x.line,x.ch+1));return/\bstring/.test(d.type)&&d.start==x.ch&&(x.ch==0||!/\bstring/.test(A.getTokenTypeAt(x)))}})},FOrL:function(we,xe,z){we.exports=z.p+"static/nodata.a6b3f948.png"},FPkq:function(we,xe,z){we.exports=z.p+"static/qrCode.dd0fe9b2.png"},GABl:function(we,xe){we.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1Rn//e7dzYuioNRsHlSqRiUB2eUx0hbaKAHEAMWxiQ6PTUAUGCuIQNVOZ0xnrHUE5GHHIqOwCag8BlQiQnnUokgt5AEIK5GnBpIFXwjkAdl7vs7dkJCETXLvEj3/5d7v9/u+337nfN8554bowBHo16+3YRh3K7IPBHcRSIDI9QJ0AWkA8h0E3xM8DWAvde5x6Pqe+D17jnVUGLxWogqPp78SG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m04/aXIPQGJnwJs/OCTm8yEjYSDMLSurQPkI5CrcoK2ja0vobBTpsD3l2nKU/mGe43DFiV5Ksb8SNUCj9lrlhOUl5r8JwG9evjMBhDmdjkJYBp2luLPHHrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},Gytx:function(we,xe){we.exports=function(q,G,D,K){var P=D?D.call(K,q,G):void 0;if(P!==void 0)return!!P;if(q===G)return!0;if(typeof q!="object"||!q||typeof G!="object"||!G)return!1;var M=Object.keys(q),U=Object.keys(G);if(M.length!==U.length)return!1;for(var _=Object.prototype.hasOwnProperty.bind(G),I=0;I<M.length;I++){var R=M[I];if(!_(R))return!1;var v=q[R],S=G[R];if(P=D?D.call(K,v,S,R):void 0,P===!1||P===void 0&&v!==S)return!1}return!0}},HmJG:function(we,xe,z){},HpTS:function(we,xe,z){we.exports=z.p+"static/small_program.f74069ec.png"},JWDV:function(we,xe,z){we.exports=z.p+"static/charpter-white.5fa14f93.svg"},JeFH:function(we,xe){we.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qgVaWlHIggHMB+AA8K4TIbe2ek/FzKWUmgLGw7THQtLlCiBUn4z6j9ySa26SUMg3A+ZDyaljBMTC87mXrAUwSQtT+fxBOSqmbpjnaMIyrYJnToRvtQ/sOAJgihFh1ssvRSEFSysEAroJlXQZdp8VhXUEAS07UYGavBPSIQz10vacQ4vjJLJiUMgPAhZByJoQYyr0erZFYmFOFZK+GK7szGOB3Qoi/nsxycG9KQVLKKyDltbDMbBge5NYD87+twvxjNdhbZiIoJZZMysRpPqsShreXECL/ZBRMSjkAwM2wzIugG2k2gOW59fjgaDU2FNbjRI2Fm/r48eigdtz+TUKIF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nw7YEhAhCSr6pYULTv2R6aklBAwC5Y3uJief2VyqtEoHGG5rT/4nVVN+EPaCsBB0pkT0gyyyDpq+HEB8DWNTSa/PNbbgt/yal5NkxyzI90VRVdI3+HSFpmyuk0MeTeGXnkspgrE/0aGgfyxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h:function(we,xe,z){we.exports=z.p+"static/qrcode.2267e4d5.png"},LdHM:function(we,xe,z){"use strict";z.d(xe,"b",function(){return u}),z.d(xe,"a",function(){return m});var q=z("1OyB"),G=z("vuIU"),D=z("Ji7U"),K=z("LK+K"),P=z("cDcd"),M=z("rePB"),U=z("Ff2n"),_=z("ODXe"),I=z("4IlW"),R=z("bX4T"),v=z("YrtM"),S=z("TSYQ"),L=z.n(S),C=z("+nKL"),A=z("8OUc"),x=function(X,ee){var oe=X.prefixCls,de=X.id,Ce=X.flattenOptions,ge=X.childrenAsData,fe=X.values,me=X.searchValue,pe=X.multiple,ie=X.defaultActiveFirstOption,ue=X.height,be=X.itemHeight,_e=X.notFoundContent,Oe=X.open,We=X.menuItemSelectedIcon,Ve=X.virtual,Le=X.onSelect,Re=X.onToggleOpen,De=X.onActiveValue,Ge=X.onScroll,ze=X.onMouseEnter,Te="".concat(oe,"-item"),Ie=Object(v.a)(function(){return Ce},[Oe,Ce],function(Me,le){return le[0]&&Me[1]!==le[1]}),Ye=P.useRef(null),qe=function(le){le.preventDefault()},je=function(le){Ye.current&&Ye.current.scrollTo({index:le})},Fe=function(le){for(var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ae=Ie.length,Y=0;Y<ae;Y+=1){var J=(le+Y*ne+ae)%ae,Z=Ie[J],te=Z.group,se=Z.data;if(!te&&!se.disabled)return J}return-1},rt=P.useState(function(){return Fe(0)}),Ze=Object(_.a)(rt,2),Je=Ze[0],Ee=Ze[1],$e=function(le){Ee(le);var ne=Ie[le];if(!ne){De(null,-1);return}De(ne.data.value,le)};P.useEffect(function(){$e(ie!==!1?Fe(0):-1)},[Ie.length,me]),P.useEffect(function(){var Me=setTimeout(function(){if(!pe&&Oe&&fe.size===1){var le=Array.from(fe)[0],ne=Ie.findIndex(function(ae){var Y=ae.data;return Y.value===le});$e(ne),je(ne)}});return function(){return clearTimeout(Me)}},[Oe]);var Qe=function(le){le!==void 0&&Le(le,{selected:!fe.has(le)}),pe||Re(!1)};if(P.useImperativeHandle(ee,function(){return{onKeyDown:function(le){var ne=le.which;switch(ne){case I.a.UP:case I.a.DOWN:{var ae=0;if(ne===I.a.UP?ae=-1:ne===I.a.DOWN&&(ae=1),ae!==0){var Y=Fe(Je+ae,ae);je(Y),$e(Y)}break}case I.a.ENTER:{var J=Ie[Je];J&&!J.data.disabled?Qe(J.data.value):Qe(void 0),Oe&&le.preventDefault();break}case I.a.ESC:Re(!1)}},onKeyUp:function(){},scrollTo:function(le){je(le)}}}),Ie.length===0)return P.createElement("div",{role:"listbox",id:"".concat(de,"_list"),className:"".concat(Te,"-empty"),onMouseDown:qe},_e);function ye(Me){var le=Ie[Me];if(!le)return null;var ne=le.data||{},ae=ne.value,Y=ne.label,J=ne.children,Z=Object(R.a)(ne,!0),te=ge?J:Y;return le?P.createElement("div",Object.assign({"aria-label":typeof te=="string"?te:null},Z,{key:Me,role:"option",id:"".concat(de,"_list_").concat(Me),"aria-selected":fe.has(ae)}),ae):null}return P.createElement(P.Fragment,null,P.createElement("div",{role:"listbox",id:"".concat(de,"_list"),style:{height:0,width:0,overflow:"hidden"}},ye(Je-1),ye(Je),ye(Je+1)),P.createElement(C.a,{itemKey:"key",ref:Ye,data:Ie,height:ue,itemHeight:be,fullHeight:!1,onMouseDown:qe,onScroll:Ge,virtual:Ve,onMouseEnter:ze},function(Me,le){var ne,ae=Me.group,Y=Me.groupOption,J=Me.data,Z=J.label,te=J.key;if(ae)return P.createElement("div",{className:L()(Te,"".concat(Te,"-group"))},Z!==void 0?Z:te);var se=J.disabled,ve=J.value,Se=J.title,Xe=J.children,it=J.style,tt=J.className,St=Object(U.a)(J,["disabled","value","title","children","style","className"]),ft=fe.has(ve),ot="".concat(Te,"-option"),Lt=L()(Te,ot,tt,(ne={},Object(M.a)(ne,"".concat(ot,"-grouped"),Y),Object(M.a)(ne,"".concat(ot,"-active"),Je===le&&!se),Object(M.a)(ne,"".concat(ot,"-disabled"),se),Object(M.a)(ne,"".concat(ot,"-selected"),ft),ne)),yt=ge?Xe:Z,Pt=!We||typeof We=="function"||ft;return P.createElement("div",Object.assign({},St,{"aria-selected":ft,className:Lt,title:Se,onMouseMove:function(){if(Je===le||se)return;$e(le)},onClick:function(){se||Qe(ve)},style:it}),P.createElement("div",{className:"".concat(ot,"-content")},yt||ve),P.isValidElement(We)||ft,Pt&&P.createElement(A.a,{className:"".concat(Te,"-option-state"),customizeIcon:We,customizeIconProps:{isSelected:ft}},ft?"\u2713":null))}))},d=P.forwardRef(x);d.displayName="OptionList";var o=d,l=function(){return null};l.isSelectOption=!0;var u=l,T=function(){return null};T.isSelectOptGroup=!0;var m=T,h=z("VTBJ"),w=z("Zm9Q");function y(N){var X=N.key,ee=N.props,oe=ee.children,de=ee.value,Ce=Object(U.a)(ee,["children","value"]);return Object(h.a)({key:X,value:de!==void 0?de:X,children:oe},Ce)}function f(N){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(w.a)(N).map(function(ee,oe){if(!P.isValidElement(ee)||!ee.type)return null;var de=ee.type.isSelectOptGroup,Ce=ee.key,ge=ee.props,fe=ge.children,me=Object(U.a)(ge,["children"]);return X||!de?y(ee):Object(h.a)(Object(h.a)({key:"__RC_SELECT_GRP__".concat(Ce===null?oe:Ce,"__"),label:Ce},me),{},{options:f(fe)})}).filter(function(ee){return ee})}var c=z("2Qr1"),s=z("qNPg"),a=z("U8pU"),g=z("Kwbf"),p=z("WKfj");function E(N){var X=N.mode,ee=N.options,oe=N.children,de=N.backfill,Ce=N.allowClear,ge=N.placeholder,fe=N.getInputElement,me=N.showSearch,pe=N.onSearch,ie=N.defaultOpen,ue=N.autoFocus,be=N.labelInValue,_e=N.value,Oe=N.inputValue,We=N.optionLabelProp,Ve=X==="multiple"||X==="tags",Le=me!==void 0?me:Ve||X==="combobox",Re=ee||f(oe);if(Object(g.a)(X!=="tags"||Re.every(function(Te){return!Te.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),X==="tags"||X==="combobox"){var De=Re.some(function(Te){return Te.options?Te.options.some(function(Ie){return typeof("value"in Ie?Ie.value:Ie.key)=="number"}):typeof("value"in Te?Te.value:Te.key)=="number"});Object(g.a)(!De,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(g.a)(X!=="combobox"||!We,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(g.a)(X==="combobox"||!de,"`backfill` only works with `combobox` mode."),Object(g.a)(X==="combobox"||!fe,"`getInputElement` only work with `combobox` mode."),Object(g.b)(X!=="combobox"||!fe||!Ce||!ge,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),pe&&!Le&&X!=="combobox"&&X!=="tags"&&Object(g.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(g.b)(!ie||ue,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),_e!=null){var Ge=Object(p.d)(_e);Object(g.a)(!be||Ge.every(function(Te){return Object(a.a)(Te)==="object"&&("key"in Te||"value"in Te)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(g.a)(!Ve||Array.isArray(_e),"`value` should be array when `mode` is `multiple` or `tags`")}if(oe){var ze=null;Object(w.a)(oe).some(function(Te){if(!P.isValidElement(Te)||!Te.type)return!1;var Ie=Te.type;if(Ie.isSelectOption)return!1;if(Ie.isSelectOptGroup){var Ye=Object(w.a)(Te.props.children).every(function(qe){return!P.isValidElement(qe)||!Te.type||qe.type.isSelectOption?!0:(ze=qe.type,!1)});return!Ye}return ze=Ie,!0}),ze&&Object(g.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ze.displayName||ze.name||ze,"`.")),Object(g.a)(Oe===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var O=E,B=Object(s.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:f,flattenOptions:c.d,getLabeledValue:c.e,filterOptions:c.b,isValueDisabled:c.g,findValueOption:c.c,warningProps:O,fillOptionsWithMissingValue:c.a}),W=function(N){Object(D.a)(ee,N);var X=Object(K.a)(ee);function ee(){var oe;return Object(q.a)(this,ee),oe=X.apply(this,arguments),oe.selectRef=P.createRef(),oe.focus=function(){oe.selectRef.current.focus()},oe.blur=function(){oe.selectRef.current.blur()},oe}return Object(G.a)(ee,[{key:"render",value:function(){return P.createElement(B,Object.assign({ref:this.selectRef},this.props))}}]),ee}(P.Component);W.Option=u,W.OptGroup=m;var Q=W,F=xe.c=Q},M8RZ:function(we,xe,z){"use strict";z.d(xe,"a",function(){return I});var q=z("fWQN"),G=z("mtLc"),D=z("yKVA"),K=z("879j"),P=z("cDcd"),M=z.n(P),U=z("faye"),_=z.n(U),I=function(R){Object(D.a)(S,R);var v=Object(K.a)(S);function S(L){var C;Object(q.a)(this,S),C=v.call(this,L);var A=window.document;return C.node=A.createElement("div"),A.body.appendChild(C.node),C}return Object(G.a)(S,[{key:"render",value:function(){var C=this.props.children;return Object(U.createPortal)(C,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),S}(M.a.Component)},Nmxd:function(we,xe){we.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAA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L.prefixCls,x=L.id,d=L.overlayInnerStyle;return K.createElement("div",{className:"".concat(A,"-inner"),id:x,role:"tooltip",style:d},typeof C=="function"?C():C)},_=U,I=function(L,C){var A=L.overlayClassName,x=L.trigger,d=x===void 0?["hover"]:x,o=L.mouseEnterDelay,l=o===void 0?0:o,u=L.mouseLeaveDelay,T=u===void 0?.1:u,m=L.overlayStyle,h=L.prefixCls,w=h===void 0?"rc-tooltip":h,y=L.children,f=L.onVisibleChange,c=L.afterVisibleChange,s=L.transitionName,a=L.animation,g=L.placement,p=g===void 0?"right":g,E=L.align,O=E===void 0?{}:E,B=L.destroyTooltipOnHide,W=B===void 0?!1:B,Q=L.defaultVisible,F=L.getTooltipContainer,N=L.overlayInnerStyle,X=Object(D.a)(L,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),ee=Object(K.useRef)(null);Object(K.useImperativeHandle)(C,function(){return ee.current});var oe=Object(G.a)({},X);"visible"in L&&(oe.popupVisible=L.visible);var de=function(){var pe=L.arrowContent,ie=pe===void 0?null:pe,ue=L.overlay,be=L.id;return[K.createElement("div",{className:"".concat(w,"-arrow"),key:"arrow"},ie),K.createElement(_,{key:"content",prefixCls:w,id:be,overlay:ue,overlayInnerStyle:N})]},Ce=!1,ge=!1;if(typeof W=="boolean")Ce=W;else if(W&&Object(q.a)(W)==="object"){var fe=W.keepParent;Ce=fe===!0,ge=fe===!1}return K.createElement(P.a,Object.assign({popupClassName:A,prefixCls:w,popup:de,action:d,builtinPlacements:M.a,popupPlacement:p,ref:ee,popupAlign:O,getPopupContainer:F,onPopupVisibleChange:f,afterPopupVisibleChange:c,popupTransitionName:s,popupAnimation:a,defaultPopupVisible:Q,destroyPopupOnHide:Ce,autoDestroy:ge,mouseLeaveDelay:T,popupStyle:m,mouseEnterDelay:l},oe),y)},R=Object(K.forwardRef)(I),v=xe.a=R},Ohmc:function(we,xe,z){we.exports=z.p+"static/certificate.fc32dc1b.jpg"},Ot1p:function(we,xe,z){"use strict";var q=z("2qtc"),G=z("kLXV"),D=z("rAM+"),K=z("miYZ"),P=z("tsqr"),M=z("9og8"),U=z("tJVT"),_=z("jrin"),I=z("WmNS"),R=z.n(I),v=z("cDcd"),S=z.n(v),L=z("VrN/"),C=z.n(L),A=z("bdgK"),x=z("p77/"),d=z("Bd2K"),o=z("ELLl"),l=z("19Vz"),u=z("lZu9"),T=z("+NIl"),m=z("kSUc"),h=z("9Bee"),w=function(se){var ve=se.value,Se=ve===void 0?"":ve,Xe=se.className,it=se.showTextOnly,tt=se.showLines,St=se.style,ft=St===void 0?{}:St,ot=Object(v.useMemo)(function(){return""},[Se]);return S.a.createElement(S.a.Fragment,null,S.a.createElement("div",{dangerouslySetInnerHTML:{__html:ot}}))},y=z("0Owb"),f=z("dejd"),c=z("C+DQ"),s=z("1vsH"),a=z("m3rI"),g=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function p(se){var ve=se.onActionCallback,Se=se.title,Xe=se.icon,it=se.actionName,tt=se.className,St=tt===void 0?"":tt,ft=se.children;function ot(){ve(it)}return S.a.createElement("a",{title:Se,className:St,onClick:ot},S.a.createElement("i",{className:"md-iconfont ".concat(Xe)}),ft)}var E=function(se){var ve=se.watch,Se=se.showNullButton,Xe=se.onActionCallback,it=se.fullScreen,tt=se.insertTemp,St=se.hidetoolBar,ft=se.uuid,ot=se.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(s.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(s.G)("_educoder_session"),"&key=").concat(ft,"&api=").concat(encodeURIComponent(a.a.PROXY_SERVER)));var Lt=[].concat(g,[{title:"".concat(ve?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ve?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return S.a.createElement("ul",{className:"markdown-toolbar-container"},!St&&Lt.map(function(yt,Pt){return S.a.createElement("li",{key:Pt},yt.actionName?S.a.createElement(p,Object(y.a)({},yt,{onActionCallback:Xe})):S.a.createElement("span",{className:"v-line"}))}),Se?S.a.createElement("li",null,S.a.createElement(p,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Xe},S.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,tt&&S.a.createElement("li",null,S.a.createElement(p,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(tt),onActionCallback:Xe},S.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),S.a.createElement("li",{className:"btn-full-screen"},S.a.createElement(p,{icon:"".concat(it?"icon-shrink":"icon-enlarge"),title:it?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Xe})))},O=z("M8RZ"),B=z("+L6B"),W=z("2/Rp"),Q=z("y8nQ"),F=z("Vl3Y"),N=z("5NDa"),X=z("5rEg"),ee={labelCol:{span:4},wrapperCol:{span:20}},oe=function(se){var ve=se.callback,Se=se.onCancel;function Xe(it){ve(it)}return S.a.createElement(F.a,Object(y.a)({},ee,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Xe}),S.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},S.a.createElement(X.a,null)),S.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},S.a.createElement(X.a,null)),S.a.createElement("div",{className:"flex-container flex-end"},S.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),S.a.createElement(W.a,{type:"ghost",onClick:Se},"\u53D6\u6D88")))},de=z("7ahc"),Ce=z("HmJG"),ge=z("BjJ7"),fe=F.a.useForm,me={width:280,marginRight:10},pe={labelCol:{span:5},wrapperCol:{span:19}},ie=function(se){var ve=se.callback,Se=se.onCancel,Xe=fe(),it=Object(U.a)(Xe,1),tt=it[0];function St(Lt){ve(Lt)}function ft(Lt,yt){if(Lt.status===-1){P.b.error(Lt.message);return}tt.setFieldsValue({src:"/api/attachments/".concat(Lt.id),type:yt.type})}function ot(Lt){var yt=Lt.target.files[0];be(yt,ft)}return S.a.createElement(F.a,Object(y.a)({form:tt},pe,{className:"upload-image-panel",onFinish:St}),S.a.createElement(F.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},S.a.createElement("div",{className:"flex-container"},S.a.createElement(F.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},S.a.createElement(X.a,{style:me})),S.a.createElement(ue,{onFileChange:ot}))),S.a.createElement(F.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},S.a.createElement(X.a,{style:{width:264}})),S.a.createElement(F.a.Item,{style:{textAlign:"right"}},S.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),S.a.createElement(W.a,{type:"ghost",onClick:Se},"\u53D6\u6D88")))};function ue(se){var ve=se.onFileChange;return S.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",S.a.createElement("input",{type:"file",onChange:ve}))}function be(se,ve){if(!se)throw new String("\u6CA1\u6709\u6587\u4EF6");var Se=new FormData;Se.append("editormd-image-file",se),Se.append("file_param_name","editormd-image-file"),Se.append("byxhr","true");var Xe=new window.XMLHttpRequest;Xe.withCredentials=!0,Xe.addEventListener("load",function(it){ve(JSON.parse(it.target.responseText),se)},!1),Xe.addEventListener("error",function(it){console.error(it)},!1),Xe.open("POST","".concat(ge.a,"/api/attachments.json")),Xe.send(Se)}var _e=z("giR+"),Oe=z("fyUT"),We=z("7Kak"),Ve=z("9yH6"),Le=Ve.a.Group,Re={margin:"0 8px"},De=function(se){var ve=se.callback,Se=se.onCancel;function Xe(it){ve(it)}return S.a.createElement(F.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Xe},S.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},S.a.createElement("span",{style:Re},"\u5355\u5143\u683C\u6570\uFF1A"),S.a.createElement("span",{style:Re},"\u884C\u6570"),S.a.createElement(F.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},S.a.createElement(Oe.a,null)),S.a.createElement("span",{style:Re},"\u5217\u6570"),S.a.createElement(F.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},S.a.createElement(Oe.a,null))),S.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},S.a.createElement("span",{style:Re},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),S.a.createElement(F.a.Item,{name:"align"},S.a.createElement(Le,null,S.a.createElement(Ve.a,{value:"default"},S.a.createElement("i",{className:"fa fa-align-justify"})),S.a.createElement(Ve.a,{value:"left"},S.a.createElement("i",{className:"fa fa-align-left"})),S.a.createElement(Ve.a,{value:"center"},S.a.createElement("i",{className:"fa fa-align-center"})),S.a.createElement(Ve.a,{value:"right"},S.a.createElement("i",{className:"fa fa-align-right"}))))),S.a.createElement("div",{className:"flex-container flex-end"},S.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),S.a.createElement(W.a,{type:"ghost",onClick:Se},"\u53D6\u6D88")))},Ge=z("ErOA"),ze=z("7Cbv"),Te="link",Ie="upload-image",Ye="code-block",qe="add-table",je="------------",Fe={default:je,left:":".concat(je),center:":".concat(je,":"),right:"".concat(je,":")},rt=z("9VGf"),Ze,Je;function Ee(){}var $e=0,Qe=1e4,ye="\u2581",Me=`
|
|
**\u6A21\u677F\u6807\u9898**
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function le(se){return/^\d+$/.test(se)?"".concat(se,"px"):se}var ne=navigator.platform.toUpperCase().indexOf("MAC")>=0,ae=ne?"Cmd":"Ctrl",Y=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],J=(Ze={},Object(_.a)(Ze,ae+"-B","bold"),Object(_.a)(Ze,ae+"-I","italic"),Ze),Z=(Je={},Object(_.a)(Je,Te,"\u6DFB\u52A0\u94FE\u63A5"),Object(_.a)(Je,Ye,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(_.a)(Je,Ie,"\u6DFB\u52A0\u6587\u4EF6"),Object(_.a)(Je,qe,"\u6DFB\u52A0\u8868\u683C"),Je),te=xe.a=function(se){var ve=se.defaultValue,Se=ve===void 0?"":ve,Xe=se.onChange,it=se.width,tt=it===void 0?"100%":it,St=se.height,ft=St===void 0?400:St,ot=se.miniToolbar,Lt=ot===void 0?!1:ot,yt=se.isFocus,Pt=yt===void 0?!1:yt,At=se.watch,dt=se.insertTemp,bt=se.mode,Rt=bt===void 0?"markdown":bt,It=se.id,Ft=It===void 0?"markdown-editor-id":It,rr=se.showResizeBar,Mr=rr===void 0?!1:rr,xr=se.noStorage,tn=xr===void 0?!1:xr,Bt=se.showNullButton,ht=Bt===void 0?!1:Bt,Ne=se.hidetoolBar,_t=Ne===void 0?!1:Ne,gt=se.fullScreen,Wt=gt===void 0?!1:gt,Ct=se.onBlur,Yt=se.onCMBeforeChange,st=se.onFullScreen,Gr=se.className,ke=Gr===void 0?"":Gr,mt=se.disablePaste,zn=mt===void 0?!1:mt,En=se.placeholder,bn=En===void 0?"":En,rn=se.values,xn=rn===void 0?"":rn,vt=Object(v.useState)(null),Di=Object(U.a)(vt,2),Ue=Di[0],An=Di[1],Ar=Object(v.useState)(Se),Vn=Object(U.a)(Ar,2),nn=Vn[0],Sr=Vn[1],Qn=Object(v.useState)(At),Xn=Object(U.a)(Qn,2),Cr=Xn[0],Yn=Xn[1],Li=Object(v.useState)(Wt),Jn=Object(U.a)(Li,2),wr=Jn[0],Ri=Jn[1],aa=Object(v.useState)(""),Zn=Object(U.a)(aa,2),or=Zn[0],zr=Zn[1],oa=Object(v.useState)(0),an=Object(U.a)(oa,2),Dr=an[0],qn=an[1],sa=Object(v.useState)(ft),Ii=Object(U.a)(sa,2),Oi=Ii[0],Tn=Ii[1],Mi=Object(v.useState)(!1),Pi=Object(U.a)(Mi,2),la=Pi[0],Sn=Pi[1],on=Object(v.useRef)(Object(ze.a)()),sn=Object(v.useRef)(!1),Cn=Object(v.useRef)(),Ur=Object(v.useRef)(),Br=Object(v.useRef)(),Fr=Object(v.useRef)(),wn=Object(v.useRef)(),ki=function(){var at=Object(M.a)(R.a.mark(function pt(){var ut,xt;return R.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Nt.next=2,Object(Ge.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:on.current}});case 2:xt=Nt.sent,xt!=null&&(ut=xt.attachments)!==null&&ut!==void 0&&ut.length&&(console.log("cm:",Ue,Ur),xt.attachments.map(function(wt){wt.content_type.indexOf("image")>-1?Ue.replaceSelection(".concat(wt.content_type,")")):wt.content_type.indexOf("video")>-1?Ue.replaceSelection('<video width="100%" controls src="'.concat(a.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):wt.content_type.indexOf("pdf")>-1?Ue.replaceSelection('<a href="'.concat(a.a.API_SERVER,"/api/attachments/").concat(wt.id,"?type=").concat(wt.content_type,'&disposition=inline" target="_blank">').concat(wt.name,"</a>")):Ue.replaceSelection("[".concat(wt.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(wt.id,"?type=").concat(wt.content_type,")"))}));case 4:case"end":return Nt.stop()}},pt)}));return function(){return at.apply(this,arguments)}}();Object(v.useEffect)(function(){Sr(xn),Ue==null||Ue.setValue(xn)},[xn]),Object(v.useEffect)(function(){st==null||st(wr)},[wr]),Object(v.useEffect)(function(){if(Ur.current){var at=C.a.fromTextArea(Ur.current,{mode:Rt,lineNumbers:!Lt,lineWrapping:!0,value:Se,autoCloseTags:!0,autoCloseBrackets:!0});Pt&&at.focus();function pt(ut,xt){if(zn){xt.preventDefault();return}var Dt=xt.clipboardData;if(Dt){var Nt=Dt.types.toString(),wt=Dt.items;if(Nt==="Files"||Dt.types.indexOf("Files")>-1){if(xt.preventDefault(),Rt=="stex")return;try{var Qt,ur=wt[1];((Qt=wt[0])===null||Qt===void 0?void 0:Qt.kind)==="file"&&(ur=wt[0]);var Tt=ur.getAsFile(),jr=Tt.name.split(".").pop();be(Tt,function(Ot){if(Ot.id){var dr,nr,Tr;(Tt==null||((dr=Tt.type)===null||dr===void 0)?void 0:dr.indexOf("image"))>-1?at.replaceSelection(".concat(Ot.content_type,")")):(Tt==null||((nr=Tt.type)===null||nr===void 0)?void 0:nr.indexOf("video"))>-1?at.replaceSelection('<video width="100%" controls src="'.concat(a.a.API_SERVER,"/api/attachments/").concat(Ot.id,'"></video>')):(Tt==null||((Tr=Tt.type)===null||Tr===void 0)?void 0:Tr.indexOf("pdf"))>-1?at.replaceSelection('<a href="'.concat(a.a.API_SERVER,"/api/attachments/").concat(Ot.id,"?type=").concat(Tt.type,'&disposition=inline" target="_blank">').concat(Tt.name,"</a>")):Y.includes(jr)?at.replaceSelection('<a href="'.concat(a.a.API_SERVER,"/api/attachments/").concat(Ot.id,'?type=office&disposition=inline" target="_blank">').concat(Tt.name,"</a>")):at.replaceSelection("[".concat(Tt.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(Ot.id,"?type=").concat(Ot.content_type,")"))}else(Ot==null?void 0:Ot.status)===401&&(document.location.href="/user/login")})}catch(Ot){P.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return at.on("paste",pt),at.on("dragleave",function(ut,xt){Br.current.classList.remove("mouse-hover-md")}),at.on("dragover",function(ut,xt){Br.current.classList.add("mouse-hover-md")}),at.on("drop",function(ut,xt){Br.current.classList.add("mouse-hover-md");var Dt;if(Dt=xt.dataTransfer.files,Dt.length>0){xt.preventDefault(),xt.stopPropagation();for(var Nt=function(ur){var Tt=Dt[ur],jr=Tt.name.split(".").pop();be(Tt,function(Ot){if(Ot.id){var dr,nr,Tr;(Tt==null||((dr=Tt.type)===null||dr===void 0)?void 0:dr.indexOf("image"))>-1?at.replaceSelection(".concat(Ot.content_type,")")):(Tt==null||((nr=Tt.type)===null||nr===void 0)?void 0:nr.indexOf("video"))>-1?at.replaceSelection('<video width="100%" controls src="'.concat(a.a.API_SERVER,"/api/attachments/").concat(Ot.id,'"></video>')):(Tt==null||((Tr=Tt.type)===null||Tr===void 0)?void 0:Tr.indexOf("pdf"))>-1?at.replaceSelection('<a href="'.concat(a.a.API_SERVER,"/api/attachments/").concat(Ot.id,"?type=").concat(Tt.type,'&disposition=inline" target="_blank">').concat(Tt.name,"</a>")):Y.includes(jr)?at.replaceSelection('<a href="'.concat(a.a.API_SERVER,"/api/attachments/").concat(Ot.id,'?type=office&disposition=inline" target="_blank">').concat(Tt.name,"</a>")):at.replaceSelection("[".concat(Tt.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(Ot.id,"?type=").concat(Ot.content_type,")"))}else(Ot==null?void 0:Ot.status)===401&&(document.location.href="/user/login")})},wt=0;wt<Dt.length;wt++)Nt(wt)}}),An(at),function(){at.off("paste",pt)}}},[]);var yr=Object(v.useCallback)(function(){if(Br.current)try{}catch(at){console.log(at,"---- to set md editor body height")}},[Oi,Br,wr]);Object(v.useEffect)(function(){function at(){var ut=new A.default(function(xt){var Dt=Object(D.a)(xt),Nt;try{for(Dt.s();!(Nt=Dt.n()).done;){var wt=Nt.value;(wt.target.offsetHeight>0||wt.target.offsetWidth>0)&&(yr(),Ue.setSize("100%","100%"),Ue.refresh())}}catch(Qt){Dt.e(Qt)}finally{Dt.f()}});return ut.observe(Ur.current.parentElement),ut}if(Ue){var pt=at();return function(){pt.unobserve(Ur.current.parentElement)}}},[Ue,yr]),Object(v.useEffect)(function(){if(Ue){for(var at=[],pt=function(){var wt=xt[ut];Dt=Object(U.a)(wt,2);var Qt=Dt[0],ur=Dt[1],Tt=Object(_.a)({},Qt,function(){_i(ur)});at.push(Tt),Ue.addKeyMap(Tt)},ut=0,xt=Object.entries(J);ut<xt.length;ut++){var Dt;pt()}return Cn.current=setInterval(function(){sn.current&&ki()},4e3),function(){clearInterval(Cn.current);var Nt=Object(D.a)(at),wt;try{for(Nt.s();!(wt=Nt.n()).done;){var Qt=wt.value;Ue.removeKeyMap(Qt)}}catch(ur){Nt.e(ur)}finally{Nt.f()}}}},[Ue]),Object(v.useEffect)(function(){Wt!==wr&&Ri(Wt)},[Wt]),Object(rt.a)(function(){if(!tn&&Dr>0){var at=new Date().getTime(),pt=window.sessionStorage.getItem(Ft);at>=Dr+Qe&&(!pt||pt!==nn)&&(window.sessionStorage.setItem(Ft,nn),Sn(!0))}},Qe),Object(v.useEffect)(function(){Yn(At)},[Ue,At]),Object(v.useEffect)(function(){Ue&&(Pt&&Ue.focus())},[Ue,Pt]),Object(v.useEffect)(function(){if(Cr&&Ue){var at=Ue.getScrollerElement();function pt(ut){var xt=ut.target;if(wn.current){var Dt=xt.scrollTop/xt.scrollHeight;wn.current.scrollTop=wn.current.scrollHeight*Dt}}return at.addEventListener("scroll",pt),function(){at.removeEventListener("scroll",pt)}}},[Ue,Cr]),Object(v.useEffect)(function(){if(Ue&&Yt){function at(pt,ut){Yt(pt,ut)}return Ue.on("beforeChange",at),function(){Ue.off("beforeChange",at)}}},[Ue,Yt]),Object(v.useEffect)(function(){if(Ue&&Ct){function at(){Ct(Ue.getValue())}return Ue.on("blur",at),function(){Ue.off("blur",at)}}},[Ue,Ct]),Object(v.useEffect)(function(){if(Ue){function at(pt){var ut=pt.getValue();Sr(ut),qn(new Date().getTime()),pt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Xe&&Xe(ut)}return Ue.on("change",at),function(){Ue.off("change",at)}}},[Ue,Xe]),Object(v.useEffect)(function(){Ue&&(Se==null?(Ue.setValue(""),Sr("")):Se!==Ue.getValue()&&(Ue.setValue(Se),Sr(Se),Ue.setCursor(Ue.lineCount(),0)))},[Ue,Se]);var _i=Object(v.useCallback)(function(at){var pt=Ue.getCursor(),ut=Ue.getSelection(),xt=ut.split(`
|
|
`);switch(at){case"bold":return Ue.replaceSelection("**"+ut+"**"),ut===""&&Ue.setCursor(pt.line,pt.ch+2),Ue.focus();case"italic":return Ue.replaceSelection("*"+ut+"*"),ut===""&&Ue.setCursor(pt.line,pt.ch+1),Ue.focus();case"code":return Ue.replaceSelection("`"+ut+"`"),ut===""&&Ue.setCursor(pt.line,pt.ch+1),Ue.focus();case"inline-latex":return Ue.replaceSelection("`$$"+ut+"$$`"),ut===""&&Ue.setCursor(pt.line,pt.ch+3),Ue.focus();case"latex":return Ue.replaceSelection("```latex\n"+ut+"\n```"),Ue.setCursor(pt.line+1,ut.length+1),Ue.focus();case"line-break":return Ue.replaceSelection(`<br/>
|
|
`),Ue.focus();case"list-ul":return ut===""?Ue.replaceSelection("- "+ut):Ue.replaceSelection(xt.map(function(Dt){return Dt===""?"":"- ".concat(Dt)}).join(`
|
|
`)),Ue.focus();case"list-ol":return ut===""?Ue.replaceSelection("1. "+ut):Ue.replaceSelection(xt.map(function(Dt,Nt){return Dt===""?"":"".concat(Nt+1,". ").concat(Dt)}).join(`
|
|
`)),Ue.focus();case"add-null-ch":return ut===""&&Ue.setCursor(pt.line,pt.ch+1),Ue.replaceSelection(ye),Ue.focus();case"inster-template-1":return ut===""&&Ue.setCursor(pt.line,pt.ch),Ue.replaceSelection(Me),Ue.focus();case"eraser":return Ue.setValue(""),Ue.focus();case"trigger-watch":return Yn(!Cr),Ue.focus();case"trigger-full-screen":return Ri(!wr),Ue.focus();case Te:zr(Te);return;case Ye:zr(Ye);return;case Ie:zr(Ie);return;case qe:zr(qe);return;default:throw new Error}},[Ue,Cr,wr]),Dn=Object(v.useCallback)(function(at){zr("");switch(or){case Te:var pt=at.title,ut=at.link;return Ue.replaceSelection("[".concat(pt,"](").concat(ut,")")),Ue.focus();case Ye:var xt=at.language,Dt=at.content;return Ue.replaceSelection(["```"+xt,Dt,"```"].join(`
|
|
`)),Ue.focus();case Ie:var Nt=at.src,wt=at.alt;return wt?Ue.replaceSelection(".concat(Nt,' "').concat(wt,'" )')):Ue.replaceSelection("")),Ue.focus();case qe:for(var Qt=at.row,ur=at.col,Tt=at.align,jr=`
|
|
`,Ot=0;Ot<Qt;Ot++){for(var dr=[],nr=[],Tr=0;Tr<ur;Tr++)Ot===1&&nr.push(Fe[Tt]),dr.push(" ");Ot===1&&(jr+="| ".concat(nr.join(" | "),` |
|
|
`)),jr+="| ".concat(dr.join(ur===1?"":" | "),` |
|
|
`)}return Ue.replaceSelection(jr+`
|
|
`),Ue.focus();default:throw new Error}},[Ue,or]),$n=Object(v.useMemo)(function(){switch(or){case Te:return S.a.createElement(oe,{callback:Dn,onCancel:Vr});case Ye:return S.a.createElement(de.b,{callback:Dn,onCancel:Vr});case Ie:return S.a.createElement(ie,{callback:Dn,onCancel:Vr});case qe:return S.a.createElement(De,{callback:Dn,onCancel:Vr});default:return null}},[or]);function Vr(){zr("")}Object(v.useEffect)(function(){if(Fr.current){var at=Fr.current,pt=!1,ut=0;function xt(wt){pt=!0,ut=wt.pageY}function Dt(){pt=!1}function Nt(wt){if(pt){var Qt=wt.pageY-ut;Qt<0&&(Qt=0),Qt>300&&(Qt=300);var ur=ft+Qt+"px";Tn(ur)}}return at.addEventListener("mousedown",xt),document.addEventListener("mousemove",Nt),document.addEventListener("mouseup",Dt),function(){at.removeEventListener("mousedown",xt),document.removeEventListener("mousemove",Nt),document.removeEventListener("mouseup",Dt)}}},[Ue,Fr]),Object(v.useEffect)(function(){Tn(ft)},[ft]);var Pr=le(tt),ei=le(Oi),Lr={width:Pr,height:ei},ti=Object(v.useMemo)(function(){if(Dr){var at=new Date(Dr),pt=at.getHours(),ut=at.getMinutes(),xt=at.getSeconds();return pt=pt<10?"0"+pt:pt,ut=ut<10?"0"+ut:ut,xt=xt<10?"0"+xt:xt,"".concat(pt,":").concat(ut,":").concat(xt)}return 0},[Dr]);function Ni(){window.sessionStorage.removeItem(Ft),Sn(!1),qn(0)}function ln(){Sn(!1),qn(0),Ue.setValue(window.sessionStorage.getItem(Ft))}function ua(at,pt){var ut=Ue.getValue();ut=ut.replace(at,pt),Sr(ut),Ue==null||Ue.setValue(ut)}return S.a.createElement(v.Fragment,null,S.a.createElement("div",{className:"markdown-editor-wrapper",ref:Br},S.a.createElement("div",{className:"markdown-editor-container ".concat(ke," ").concat(Cr?"on-preview":""," ").concat(Lt?"mini":""," ").concat(wr?"full-screen":""),style:Lr},S.a.createElement(E,{insertTemp:dt,watch:Cr,fullScreen:wr,showNullButton:ht,onActionCallback:_i,hidetoolBar:_t,uuid:on.current,setOpenPhones:function(){sn.current=!0}}),S.a.createElement("div",{className:"markdown-editor-body"},S.a.createElement("div",{className:"codemirror-container"},S.a.createElement("textarea",{ref:Ur,placeholder:bn})),Cr?S.a.createElement("div",{ref:wn,className:"preview-container"},Rt==="stex"&&S.a.createElement(w,{value:nn}),Rt!=="stex"&&S.a.createElement(h.a,{edit:!0,value:nn,replaces:ua})):null))),Mr?S.a.createElement("a",{ref:Fr,className:"editor-resize"}):null,S.a.createElement(O.a,null,Z[or]?S.a.createElement(G.a,{centered:!0,title:Z[or],visible:!0,onCancel:Vr,footer:null,className:"markdown-popup-form"},$n):null))}},RMFE:function(we,xe){we.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0DBAgQiAoIdPQw1iJAgIBA+wYIECAQFRDo6GGsRYAAAYH2DRAgQCAqINDRw1iLAAECAu0bIECAQFRAoKOHsRYBAgQE2jdAgACBqIBARw9jLQIECAi0b4AAAQJRAYGOHsZaBAgQEGjfAAECBKICAh09jLUIECAg0L4BAgQIRAUEOnoYaxEgQECgfQMECBCICgh09DDWIkCAgED7BggQIBAVEOjoYaxFgAABgfYNECBAICog0NHDWIsAAQIC7RsgQIBAVECgo4exFgECBATaN0CAAIGogEBHD2MtAgQICLRvgAABAlEBgY4exloECBAQaN8AAQIEogICHT2MtQ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ache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/var z,q,G,D=!1,K,P;window.PR_SHOULD_USE_CONTINUATION=!0;var M,U;(function(){var _=window,I=["break,continue,do,else,for,if,return,while"],R=[I,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],v=[R,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],S=[v,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],L=[v,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],C=[v,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],A="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",x=[v,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],d="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",o=[I,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],l=[I,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],u=[I,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],T=[S,C,L,x,d,o,l,u],m=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,h="str",w="kwd",y="com",f="typ",c="lit",s="pun",a="pln",g="tag",p="dec",E="src",O="atn",B="atv",W="nocode",Q="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function F(Le){for(var Re=0,De=!1,Ge=!1,ze=0,Te=Le.length;ze<Te;++ze){var Ie=Le[ze];if(Ie.ignoreCase)Ge=!0;else if(/[a-z]/i.test(Ie.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){De=!0,Ge=!1;break}}var Ye={b:8,t:9,n:10,v:11,f:12,r:13};function qe(Je){var Ee=Je.charCodeAt(0);if(Ee!==92)return Ee;var $e=Je.charAt(1);return Ee=Ye[$e],Ee||("0"<=$e&&$e<="7"?parseInt(Je.substring(1),8):$e==="u"||$e==="x"?parseInt(Je.substring(2),16):Je.charCodeAt(1))}function je(Je){if(Je<32)return(Je<16?"\\x0":"\\x")+Je.toString(16);var Ee=String.fromCharCode(Je);return Ee==="\\"||Ee==="-"||Ee==="]"||Ee==="^"?"\\"+Ee:Ee}function Fe(Je){var Ee=Je.substring(1,Je.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),$e=[],Qe=Ee[0]==="^",ye=["["];Qe&&ye.push("^");for(var Me=Qe?1:0,le=Ee.length;Me<le;++Me){var ne=Ee[Me];if(/\\[bdsw]/i.test(ne))ye.push(ne);else{var ae=qe(ne),Y;Me+2<le&&Ee[Me+1]==="-"?(Y=qe(Ee[Me+2]),Me+=2):Y=ae,$e.push([ae,Y]),Y<65||ae>122||(Y<65||ae>90||$e.push([Math.max(65,ae)|32,Math.min(Y,90)|32]),Y<97||ae>122||$e.push([Math.max(97,ae)&~32,Math.min(Y,122)&~32]))}}$e.sort(function(se,ve){return se[0]-ve[0]||ve[1]-se[1]});for(var J=[],Z=[],Me=0;Me<$e.length;++Me){var te=$e[Me];te[0]<=Z[1]+1?Z[1]=Math.max(Z[1],te[1]):J.push(Z=te)}for(var Me=0;Me<J.length;++Me){var te=J[Me];ye.push(je(te[0])),te[1]>te[0]&&(te[1]+1>te[0]&&ye.push("-"),ye.push(je(te[1])))}return ye.push("]"),ye.join("")}function rt(Je){for(var Ee=Je.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),$e=Ee.length,Qe=[],ye=0,Me=0;ye<$e;++ye){var le=Ee[ye];if(le==="(")++Me;else if(le.charAt(0)==="\\"){var ne=+le.substring(1);ne&&(ne<=Me?Qe[ne]=-1:Ee[ye]=je(ne))}}for(var ye=1;ye<Qe.length;++ye)Qe[ye]===-1&&(Qe[ye]=++Re);for(var ye=0,Me=0;ye<$e;++ye){var le=Ee[ye];if(le==="(")++Me,Qe[Me]||(Ee[ye]="(?:");else if(le.charAt(0)==="\\"){var ne=+le.substring(1);ne&&ne<=Me&&(Ee[ye]="\\"+Qe[ne])}}for(var ye=0;ye<$e;++ye)Ee[ye]==="^"&&Ee[ye+1]!=="^"&&(Ee[ye]="");if(Je.ignoreCase&&De)for(var ye=0;ye<$e;++ye){var le=Ee[ye],ae=le.charAt(0);le.length>=2&&ae==="["?Ee[ye]=Fe(le):ae!=="\\"&&(Ee[ye]=le.replace(/[a-zA-Z]/g,function(Z){var te=Z.charCodeAt(0);return"["+String.fromCharCode(te&~32,te|32)+"]"}))}return Ee.join("")}for(var Ze=[],ze=0,Te=Le.length;ze<Te;++ze){var Ie=Le[ze];if(Ie.global||Ie.multiline)throw new Error(""+Ie);Ze.push("(?:"+rt(Ie)+")")}return new RegExp(Ze.join("|"),Ge?"gi":"g")}function N(Le,Re){var De=/(?:^|\s)nocode(?:\s|$)/,Ge=[],ze=0,Te=[],Ie=0;function Ye(qe){var je=qe.nodeType;if(je==1){if(De.test(qe.className))return;for(var Fe=qe.firstChild;Fe;Fe=Fe.nextSibling)Ye(Fe);var rt=qe.nodeName.toLowerCase();(rt==="br"||rt==="li")&&(Ge[Ie]=`
|
|
`,Te[Ie<<1]=ze++,Te[Ie++<<1|1]=qe)}else if(je==3||je==4){var Ze=qe.nodeValue;Ze.length&&(Re?Ze=Ze.replace(/\r\n?/g,`
|
|
`):Ze=Ze.replace(/[ \t\r\n]+/g," "),Ge[Ie]=Ze,Te[Ie<<1]=ze,ze+=Ze.length,Te[Ie++<<1|1]=qe)}}return Ye(Le),{sourceCode:Ge.join("").replace(/\n$/,""),spans:Te}}function X(Le,Re,De,Ge,ze){if(!De)return;var Te={sourceNode:Le,pre:1,langExtension:null,numberLines:null,sourceCode:De,spans:null,basePos:Re,decorations:null};Ge(Te),ze.push.apply(ze,Te.decorations)}var ee=/\S/;function oe(Le){for(var Re=void 0,De=Le.firstChild;De;De=De.nextSibling){var Ge=De.nodeType;Re=Ge===1?Re?Le:De:Ge===3&&ee.test(De.nodeValue)?Le:Re}return Re===Le?void 0:Re}function de(Le,Re){var De={},Ge;(function(){for(var Ie=Le.concat(Re),Ye=[],qe={},je=0,Fe=Ie.length;je<Fe;++je){var rt=Ie[je],Ze=rt[3];if(Ze)for(var Je=Ze.length;--Je>=0;)De[Ze.charAt(Je)]=rt;var Ee=rt[1],$e=""+Ee;qe.hasOwnProperty($e)||(Ye.push(Ee),qe[$e]=null)}Ye.push(/[\0-\uffff]/),Ge=F(Ye)})();var ze=Re.length,Te=function(Ie){for(var Ye=Ie.sourceCode,qe=Ie.basePos,je=Ie.sourceNode,Fe=[qe,a],rt=0,Ze=Ye.match(Ge)||[],Je={},Ee=0,$e=Ze.length;Ee<$e;++Ee){var Qe=Ze[Ee],ye=Je[Qe],Me=void 0,le;if(typeof ye=="string")le=!1;else{var ne=De[Qe.charAt(0)];if(ne)Me=Qe.match(ne[1]),ye=ne[0];else{for(var ae=0;ae<ze;++ae)if(ne=Re[ae],Me=Qe.match(ne[1]),Me){ye=ne[0];break}Me||(ye=a)}le=ye.length>=5&&ye.substring(0,5)==="lang-",le&&!(Me&&typeof Me[1]=="string")&&(le=!1,ye=E),le||(Je[Qe]=ye)}var Y=rt;if(rt+=Qe.length,!le)Fe.push(qe+Y,ye);else{var J=Me[1],Z=Qe.indexOf(J),te=Z+J.length;Me[2]&&(te=Qe.length-Me[2].length,Z=te-J.length);var se=ye.substring(5);X(je,qe+Y,Qe.substring(0,Z),Te,Fe),X(je,qe+Y+Z,J,ue(se,J),Fe),X(je,qe+Y+te,Qe.substring(te),Te,Fe)}}Ie.decorations=Fe};return Te}function Ce(Le){var Re=[],De=[];Le.tripleQuotedStrings?Re.push([h,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Le.multiLineStrings?Re.push([h,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Re.push([h,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Le.verbatimStrings&&De.push([h,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ge=Le.hashComments;Ge&&(Le.cStyleComments?(Ge>1?Re.push([y,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Re.push([y,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),De.push([h,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Re.push([y,/^#[^\r\n]*/,null,"#"])),Le.cStyleComments&&(De.push([y,/^\/\/[^\r\n]*/,null]),De.push([y,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ze=Le.regexLiterals;if(ze){var Te=ze>1?"":`
|
|
\r`,Ie=Te?".":"[\\S\\s]",Ye="/(?=[^/*"+Te+"])(?:[^/\\x5B\\x5C"+Te+"]|\\x5C"+Ie+"|\\x5B(?:[^\\x5C\\x5D"+Te+"]|\\x5C"+Ie+")*(?:\\x5D|$))+/";De.push(["lang-regex",RegExp("^"+Q+"("+Ye+")")])}var qe=Le.types;qe&&De.push([f,qe]);var je=(""+Le.keywords).replace(/^ | $/g,"");je.length&&De.push([w,new RegExp("^(?:"+je.replace(/[\s,]+/g,"|")+")\\b"),null]),Re.push([a,/^\s+/,null,` \r
|
|
\xA0`]);var Fe="^.[^\\s\\w.$@'\"`/\\\\]*";return Le.regexLiterals&&(Fe+="(?!s*/)"),De.push([c,/^@[a-z_$][a-z_$@0-9]*/i,null],[f,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[a,/^[a-z_$][a-z_$@0-9]*/i,null],[c,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[a,/^\\[\s\S]?/,null],[s,new RegExp(Fe),null]),de(Re,De)}var ge=Ce({keywords:T,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function fe(Le,Re,De){for(var Ge=/(?:^|\s)nocode(?:\s|$)/,ze=/\r\n?|\n/,Te=Le.ownerDocument,Ie=Te.createElement("li");Le.firstChild;)Ie.appendChild(Le.firstChild);var Ye=[Ie];function qe(Ee){var $e=Ee.nodeType;if($e==1&&!Ge.test(Ee.className))if(Ee.nodeName==="br")je(Ee),Ee.parentNode&&Ee.parentNode.removeChild(Ee);else for(var Qe=Ee.firstChild;Qe;Qe=Qe.nextSibling)qe(Qe);else if(($e==3||$e==4)&&De){var ye=Ee.nodeValue,Me=ye.match(ze);if(Me){var le=ye.substring(0,Me.index);Ee.nodeValue=le;var ne=ye.substring(Me.index+Me[0].length);if(ne){var ae=Ee.parentNode;ae.insertBefore(Te.createTextNode(ne),Ee.nextSibling)}je(Ee),le||Ee.parentNode.removeChild(Ee)}}}function je(Ee){for(;!Ee.nextSibling;)if(Ee=Ee.parentNode,!Ee)return;function $e(Me,le){var ne=le?Me.cloneNode(!1):Me,ae=Me.parentNode;if(ae){var Y=$e(ae,1),J=Me.nextSibling;Y.appendChild(ne);for(var Z=J;Z;Z=J)J=Z.nextSibling,Y.appendChild(Z)}return ne}for(var Qe=$e(Ee.nextSibling,0),ye;(ye=Qe.parentNode)&&ye.nodeType===1;)Qe=ye;Ye.push(Qe)}for(var Fe=0;Fe<Ye.length;++Fe)qe(Ye[Fe]);Re===(Re|0)&&Ye[0].setAttribute("value",Re);var rt=Te.createElement("ol");rt.className="linenums";for(var Ze=Math.max(0,Re-1|0)||0,Fe=0,Je=Ye.length;Fe<Je;++Fe)Ie=Ye[Fe],Ie.className="L"+(Fe+Ze)%10,Ie.firstChild||Ie.appendChild(Te.createTextNode("\xA0")),rt.appendChild(Ie);Le.appendChild(rt)}function me(Le){var Re=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Re=Re&&+Re[1]<=8;var De=/\n/g,Ge=Le.sourceCode,ze=Ge.length,Te=0,Ie=Le.spans,Ye=Ie.length,qe=0,je=Le.decorations,Fe=je.length,rt=0;je[Fe]=ze;var Ze,Je;for(Je=Ze=0;Je<Fe;)je[Je]!==je[Je+2]?(je[Ze++]=je[Je++],je[Ze++]=je[Je++]):Je+=2;for(Fe=Ze,Je=Ze=0;Je<Fe;){for(var Ee=je[Je],$e=je[Je+1],Qe=Je+2;Qe+2<=Fe&&je[Qe+1]===$e;)Qe+=2;je[Ze++]=Ee,je[Ze++]=$e,Je=Qe}Fe=je.length=Ze;var ye=Le.sourceNode,Me="";ye&&(Me=ye.style.display,ye.style.display="none");try{for(var le=null;qe<Ye;){var ne=Ie[qe],ae=Ie[qe+2]||ze,Y=je[rt+2]||ze,Qe=Math.min(ae,Y),J=Ie[qe+1],Z;if(J.nodeType!==1&&(Z=Ge.substring(Te,Qe))){Re&&(Z=Z.replace(De,"\r")),J.nodeValue=Z;var te=J.ownerDocument,se=te.createElement("span");se.className=je[rt+1];var ve=J.parentNode;ve.replaceChild(se,J),se.appendChild(J),Te<ae&&(Ie[qe+1]=J=te.createTextNode(Ge.substring(Qe,ae)),ve.insertBefore(J,se.nextSibling))}Te=Qe,Te>=ae&&(qe+=2),Te>=Y&&(rt+=2)}}finally{ye&&(ye.style.display=Me)}}var pe={};function ie(Le,Re){for(var De=Re.length;--De>=0;){var Ge=Re[De];pe.hasOwnProperty(Ge)?_.console&&console.warn("cannot override language handler %s",Ge):pe[Ge]=Le}}function ue(Le,Re){return Le&&pe.hasOwnProperty(Le)||(Le=/^\s*</.test(Re)?"default-markup":"default-code"),pe[Le]}ie(ge,["default-code"]),ie(de([],[[a,/^[^<?]+/],[p,/^<!\w[^>]*(?:>|$)/],[y,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[s,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),ie(de([[a,/^[\s]+/,null,` \r
|
|
`],[B,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[g,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[O,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[s,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),ie(de([],[[B,/^[\s\S]+/]]),["uq.val"]),ie(Ce({keywords:S,hashComments:!0,cStyleComments:!0,types:m}),["c","cc","cpp","cxx","cyc","m"]),ie(Ce({keywords:"null,true,false"}),["json"]),ie(Ce({keywords:C,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:m}),["cs"]),ie(Ce({keywords:L,cStyleComments:!0}),["java"]),ie(Ce({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ie(Ce({keywords:o,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ie(Ce({keywords:d,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ie(Ce({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ie(Ce({keywords:x,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ie(Ce({keywords:A,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ie(de([],[[h,/^[\s\S]+/]]),["regex"]);function be(Le){var Re=Le.langExtension;try{var De=N(Le.sourceNode,Le.pre),Ge=De.sourceCode;Le.sourceCode=Ge,Le.spans=De.spans,Le.basePos=0,ue(Re,Ge)(Le),me(Le)}catch(ze){_.console&&console.log(ze&&ze.stack||ze)}}function _e(Le,Re,De){var Ge=De||!1,ze=Re||null,Te=document.createElement("div");Te.innerHTML="<pre>"+Le+"</pre>",Te=Te.firstChild,Ge&&fe(Te,Ge,!0);var Ie={langExtension:ze,numberLines:Ge,sourceNode:Te,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return be(Ie),Te.innerHTML}function Oe(Le,Re){var De=Re||document.body,Ge=De.ownerDocument||document;function ze(ne){return De.getElementsByTagName(ne)}for(var Te=[ze("pre"),ze("code"),ze("xmp")],Ie=[],Ye=0;Ye<Te.length;++Ye)for(var qe=0,je=Te[Ye].length;qe<je;++qe)Ie.push(Te[Ye][qe]);Te=null;var Fe=Date;Fe.now||(Fe={now:function(){return+new Date}});var rt=0,Ze=/\blang(?:uage)?-([\w.]+)(?!\S)/,Je=/\bprettyprint\b/,Ee=/\bprettyprinted\b/,$e=/pre|xmp/i,Qe=/^code$/i,ye=/^(?:pre|code|xmp)$/i,Me={};function le(){for(var ne=_.PR_SHOULD_USE_CONTINUATION?Fe.now()+250:Infinity;rt<Ie.length&&Fe.now()<ne;rt++){for(var ae=Ie[rt],Y=Me,J=ae;J=J.previousSibling;){var Z=J.nodeType,te=(Z===7||Z===8)&&J.nodeValue;if(te?!/^\??prettify\b/.test(te):Z!==3||/\S/.test(J.nodeValue))break;if(te){Y={},te.replace(/\b(\w+)=([\w:.%+-]+)/g,function(At,dt,bt){Y[dt]=bt});break}}var se=ae.className;if((Y!==Me||Je.test(se))&&!Ee.test(se)){for(var ve=!1,Se=ae.parentNode;Se;Se=Se.parentNode){var Xe=Se.tagName;if(ye.test(Xe)&&Se.className&&Je.test(Se.className)){ve=!0;break}}if(!ve){ae.className+=" prettyprinted";var it=Y.lang;if(!it){it=se.match(Ze);var tt;!it&&(tt=oe(ae))&&Qe.test(tt.tagName)&&(it=tt.className.match(Ze)),it&&(it=it[1])}var St;if($e.test(ae.tagName))St=1;else{var ft=ae.currentStyle,ot=Ge.defaultView,Lt=ft?ft.whiteSpace:ot&&ot.getComputedStyle?ot.getComputedStyle(ae,null).getPropertyValue("white-space"):0;St=Lt&&Lt.substring(0,3)==="pre"}var yt=Y.linenums;(yt=yt==="true"||+yt)||(yt=se.match(/\blinenums\b(?::(\d+))?/),yt=yt?yt[1]&&yt[1].length?+yt[1]:!0:!1),yt&&fe(ae,yt,St);var Pt={langExtension:it,sourceNode:ae,numberLines:yt,pre:St,sourceCode:null,basePos:null,spans:null,decorations:null};be(Pt)}}}rt<Ie.length?_.setTimeout(le,250):typeof Le=="function"&&Le()}le()}var We=_.PR={createSimpleLexer:de,registerLangHandler:ie,sourceDecorator:Ce,PR_ATTRIB_NAME:O,PR_ATTRIB_VALUE:B,PR_COMMENT:y,PR_DECLARATION:p,PR_KEYWORD:w,PR_LITERAL:c,PR_NOCODE:W,PR_PLAIN:a,PR_PUNCTUATION:s,PR_SOURCE:E,PR_STRING:h,PR_TAG:g,PR_TYPE:f,prettyPrintOne:D?_.prettyPrintOne=_e:M=_e,prettyPrint:U=D?_.prettyPrint=Oe:U=Oe},Ve=_.define;typeof Ve=="function"&&Ve.amd&&Ve("google-code-prettify",[],function(){return We})})()},SMhR:function(we,xe){we.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcYAAAHGCAYAAADuYispAAAAAklEQVR4AewaftIAABHTSURBVO3BQY4cy5IEQdNA3//KNo2/8NU8XzCQyCpSReivSJKk/zmRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7yMiB/s7a5AWTTNhsgN9pmA2TTNp8MyI22uQHkv7TNDSCbttkAudE2bwJyo22eBGTTNhsgf7O2ecuJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpPGTD9c2nwzIk9pmA2TTNjeAPAnIpm1uANm0zQbIDSBPAXIDyKZtPhmQG22zAfLN2uaTAflUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGT74ckCe1zZOAbNpm0zYbIDfaZgPkRts8qW1utM0GyKZtntI2GyBPArJpmw2QTds8CcimbW4A+WRAntQ23+pEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0viJXtU2T2qbDZA3Adm0zZOAbNpm0zYbIJu2+VZtswGyaZsbbbMBsmmbDZBN29xoG32mE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJ3oVkCe1zZPaZgNk0zYbIJu2eRKQJwF5S9vcAPIkIJu2uQFk0zY32kbf6USSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnS+MmXa5t/WdtsgGza5psB+WRt8xQgN4DcaJtv1jYbIDfa5pO1jf5/J5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGTz4ckH9Z22yAbNpmA2TTNhsgm7bZANm0zQb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AuQFk0zZPAnKjbT7ViSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqTxkw/XNp8MyJOAbNrmRts8CcimbT5Z22yA3GibpwDZtM0NIJ+sbTZAbgB5U9s8qW02QDZt861OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2ffDkgT2qbJwF5UttsgLwJyJPa5gaQG0De0jY3gGza5gaQG22zAXKjbZ4EZAPkTUBuANm0zac6kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjR+ole1zZvaZgPkRtvcAPIkIJu22QDZtM3fCsiNttkAudE2TwKyaZtN22yAbNrmBpAbbbMBsgGyaZu3nEiSpHEiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaP9FHA3KjbTZAngRk0zafDMiTgPyptrkB5Eltc6Nt3gTkTW1zA8imbZ7UNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZdrm28G5JO1zQ0gN9pmA2QDZNM2GyCbtrnRNk8BcqNtNkA2QN7UNhsgTwKyaZsNkE3bvAnIjbb5VCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSBv2VFwH5m7XNk4Bs2uZJQJ7UNjeA3GibTwXkRttsgNxomw2QG22zAXKjbW4AeVLbbIDcaJsNkCe1zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJA36K5Ik6X9OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4/8ATrCgy9kbxW8AAAAASUVORK5CYII="},TGq3:function(we,xe,z){we.exports=z.p+"static/lockclose.365036e8.svg"},"VrN/":function(we,xe,z){(function(q,G){we.exports=G()})(this,function(){"use strict";var q=navigator.userAgent,G=navigator.platform,D=/gecko\/\d/i.test(q),K=/MSIE \d/.test(q),P=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(q),M=/Edge\/(\d+)/.exec(q),U=K||P||M,_=U&&(K?document.documentMode||6:+(M||P)[1]),I=!M&&/WebKit\//.test(q),R=I&&/Qt\/\d+\.\d+/.test(q),v=!M&&/Chrome\//.test(q),S=/Opera\//.test(q),L=/Apple Computer/.test(navigator.vendor),C=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(q),A=/PhantomJS/.test(q),x=!M&&/AppleWebKit/.test(q)&&/Mobile\/\w+/.test(q),d=/Android/.test(q),o=x||d||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(q),l=x||/Mac/.test(G),u=/\bCrOS\b/.test(q),T=/win/i.test(G),m=S&&q.match(/Version\/(\d*\.\d*)/);m&&(m=Number(m[1])),m&&m>=15&&(S=!1,I=!0);var h=l&&(R||S&&(m==null||m<12.11)),w=D||U&&_>=9;function y(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var f=function(e,t){var n=e.className,r=y(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function c(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function s(e,t){return c(e).appendChild(t)}function a(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var b=0;b<t.length;++b)i.appendChild(t[b]);return i}function g(e,t,n,r){var i=a(e,t,n,r);return i.setAttribute("role","presentation"),i}var p;document.createRange?p=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:p=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function E(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function O(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function B(e,t){var n=e.className;y(t).test(n)||(e.className+=(n?" ":"")+t)}function W(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!y(n[r]).test(t)&&(t+=" "+n[r]);return t}var Q=function(e){e.select()};x?Q=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:U&&(Q=function(e){try{e.select()}catch(t){}});function F(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function N(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function X(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var b=r||0,k=i||0;;){var j=e.indexOf(" ",b);if(j<0||j>=t)return k+(t-b);k+=j-b,k+=n-k%n,b=j+1}}var ee=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};ee.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ee.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function oe(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var de=50,Ce={toString:function(){return"CodeMirror.Pass"}},ge={scroll:!1},fe={origin:"*mouse"},me={origin:"+move"};function pe(e,t,n){for(var r=0,i=0;;){var b=e.indexOf(" ",r);b==-1&&(b=e.length);var k=b-r;if(b==e.length||i+k>=t)return r+Math.min(k,t-i);if(i+=b-r,i+=n-i%n,r=b+1,i>=t)return r}}var ie=[""];function ue(e){for(;ie.length<=e;)ie.push(be(ie)+" ");return ie[e]}function be(e){return e[e.length-1]}function _e(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Oe(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function We(){}function Ve(e,t){var n;return Object.create?n=Object.create(e):(We.prototype=e,n=new We),t&&N(t,n),n}var Le=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Re(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Le.test(e))}function De(e,t){return t?t.source.indexOf("\\w")>-1&&Re(e)?!0:t.test(e):Re(e)}function Ge(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ze=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Te(e){return e.charCodeAt(0)>=768&&ze.test(e)}function Ie(e,t,n){for(;(n<0?t>0:t<e.length)&&Te(e.charAt(t));)t+=n;return t}function Ye(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,b=r<0?Math.ceil(i):Math.floor(i);if(b==t)return e(b)?t:n;e(b)?n=b:t=b+r}}function qe(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,b=0;b<e.length;++b){var k=e[b];(k.from<n&&k.to>t||t==n&&k.to==t)&&(r(Math.max(k.from,t),Math.min(k.to,n),k.level==1?"rtl":"ltr",b),i=!0)}i||r(t,n,"ltr")}var je=null;function Fe(e,t,n){var r;je=null;for(var i=0;i<e.length;++i){var b=e[i];if(b.from<t&&b.to>t)return i;b.to==t&&(b.from!=b.to&&n=="before"?r=i:je=i),b.from==t&&(b.from!=b.to&&n!="before"?r=i:je=i)}return r!=null?r:je}var rt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(V){return V<=247?e.charAt(V):1424<=V&&V<=1524?"R":1536<=V&&V<=1785?t.charAt(V-1536):1774<=V&&V<=2220?"r":8192<=V&&V<=8203?"w":V==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,b=/[LRr]/,k=/[Lb1n]/,j=/[1n]/;function H(V,$,re){this.level=V,this.from=$,this.to=re}return function(V,$){var re=$=="ltr"?"L":"R";if(V.length==0||$=="ltr"&&!r.test(V))return!1;for(var he=V.length,ce=[],Ae=0;Ae<he;++Ae)ce.push(n(V.charCodeAt(Ae)));for(var Pe=0,Be=re;Pe<he;++Pe){var Ke=ce[Pe];Ke=="m"?ce[Pe]=Be:Be=Ke}for(var et=0,He=re;et<he;++et){var nt=ce[et];nt=="1"&&He=="r"?ce[et]="n":b.test(nt)&&(He=nt,nt=="r"&&(ce[et]="R"))}for(var ct=1,lt=ce[0];ct<he-1;++ct){var Et=ce[ct];Et=="+"&<=="1"&&ce[ct+1]=="1"?ce[ct]="1":Et==","&<==ce[ct+1]&&(lt=="1"||lt=="n")&&(ce[ct]=lt),lt=Et}for(var Ut=0;Ut<he;++Ut){var qt=ce[Ut];if(qt==",")ce[Ut]="N";else if(qt=="%"){var Kt=void 0;for(Kt=Ut+1;Kt<he&&ce[Kt]=="%";++Kt);for(var vr=Ut&&ce[Ut-1]=="!"||Kt<he&&ce[Kt]=="1"?"1":"N",hr=Ut;hr<Kt;++hr)ce[hr]=vr;Ut=Kt-1}}for(var zt=0,mr=re;zt<he;++zt){var tr=ce[zt];mr=="L"&&tr=="1"?ce[zt]="L":b.test(tr)&&(mr=tr)}for(var Xt=0;Xt<he;++Xt)if(i.test(ce[Xt])){var Vt=void 0;for(Vt=Xt+1;Vt<he&&i.test(ce[Vt]);++Vt);for(var Ht=(Xt?ce[Xt-1]:re)=="L",pr=(Vt<he?ce[Vt]:re)=="L",Hn=Ht==pr?Ht?"L":"R":re,en=Xt;en<Vt;++en)ce[en]=Hn;Xt=Vt-1}for(var ar=[],Nr,$t=0;$t<he;)if(k.test(ce[$t])){var Va=$t;for(++$t;$t<he&&k.test(ce[$t]);++$t);ar.push(new H(0,Va,$t))}else{var Hr=$t,vn=ar.length,yn=$=="rtl"?1:0;for(++$t;$t<he&&ce[$t]!="L";++$t);for(var lr=Hr;lr<$t;)if(j.test(ce[lr])){Hr<lr&&(ar.splice(vn,0,new H(1,Hr,lr)),vn+=yn);var Gn=lr;for(++lr;lr<$t&&j.test(ce[lr]);++lr);ar.splice(vn,0,new H(2,Gn,lr)),vn+=yn,Hr=lr}else++lr;Hr<$t&&ar.splice(vn,0,new H(1,Hr,$t))}return $=="ltr"&&(ar[0].level==1&&(Nr=V.match(/^\s+/))&&(ar[0].from=Nr[0].length,ar.unshift(new H(0,0,Nr[0].length))),be(ar).level==1&&(Nr=V.match(/\s+$/))&&(be(ar).to-=Nr[0].length,ar.push(new H(0,he-Nr[0].length,he)))),$=="rtl"?ar.reverse():ar}}();function Ze(e,t){var n=e.order;return n==null&&(n=e.order=rt(e.text,t)),n}var Je=[],Ee=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Je).concat(n)}};function $e(e,t){return e._handlers&&e._handlers[t]||Je}function Qe(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var b=oe(i,n);b>-1&&(r[t]=i.slice(0,b).concat(i.slice(b+1)))}}}function ye(e,t){var n=$e(e,t);if(!n.length)return;for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function Me(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ye(e,n||t.type,e,t),Z(t)||t.codemirrorIgnore}function le(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)oe(n,t[r])==-1&&n.push(t[r])}function ne(e,t){return $e(e,t).length>0}function ae(e){e.prototype.on=function(t,n){Ee(this,t,n)},e.prototype.off=function(t,n){Qe(this,t,n)}}function Y(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function J(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Z(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function te(e){Y(e),J(e)}function se(e){return e.target||e.srcElement}function ve(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),l&&e.ctrlKey&&t==1&&(t=3),t}var Se=function(){if(U&&_<9)return!1;var e=a("div");return"draggable"in e||"dragDrop"in e}(),Xe;function it(e){if(Xe==null){var t=a("span","\u200B");s(e,a("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Xe=t.offsetWidth<=1&&t.offsetHeight>2&&!(U&&_<8))}var n=Xe?a("span","\u200B"):a("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var tt;function St(e){if(tt!=null)return tt;var t=s(e,document.createTextNode("A\u062EA")),n=p(t,0,1).getBoundingClientRect(),r=p(t,1,2).getBoundingClientRect();return c(e),!n||n.left==n.right?!1:tt=r.right-n.right<3}var ft=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
|
`,t);i==-1&&(i=e.length);var b=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),k=b.indexOf("\r");k!=-1?(n.push(b.slice(0,k)),t+=k+1):(n.push(b),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ot=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Lt=function(){var e=a("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),yt=null;function Pt(e){if(yt!=null)return yt;var t=s(e,a("span","x")),n=t.getBoundingClientRect(),r=p(t,0,1).getBoundingClientRect();return yt=Math.abs(n.left-r.left)>1}var At={},dt={};function bt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),At[e]=t}function Rt(e,t){dt[e]=t}function It(e){if(typeof e=="string"&&dt.hasOwnProperty(e))e=dt[e];else if(e&&typeof e.name=="string"&&dt.hasOwnProperty(e.name)){var t=dt[e.name];typeof t=="string"&&(t={name:t}),e=Ve(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return It("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return It("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Ft(e,t){t=It(t);var n=At[t.name];if(!n)return Ft(e,"text/plain");var r=n(e,t);if(rr.hasOwnProperty(t.name)){var i=rr[t.name];for(var b in i){if(!i.hasOwnProperty(b))continue;r.hasOwnProperty(b)&&(r["_"+b]=r[b]),r[b]=i[b]}}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var k in t.modeProps)r[k]=t.modeProps[k];return r}var rr={};function Mr(e,t){var n=rr.hasOwnProperty(e)?rr[e]:rr[e]={};N(t,n)}function xr(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function tn(e,t){for(var n;e.innerMode&&!(n=e.innerMode(t),!n||n.mode==e);)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Bt(e,t,n){return e.startState?e.startState(t,n):!0}var ht=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};ht.prototype.eol=function(){return this.pos>=this.string.length},ht.prototype.sol=function(){return this.pos==this.lineStart},ht.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ht.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ht.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},ht.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},ht.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},ht.prototype.skipToEnd=function(){this.pos=this.string.length},ht.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ht.prototype.backUp=function(e){this.pos-=e},ht.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=X(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},ht.prototype.indentation=function(){return X(this.string,null,this.tabSize)-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},ht.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(k){return n?k.toLowerCase():k},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var b=this.string.slice(this.pos).match(e);return b&&b.index>0?null:(b&&t!==!1&&(this.pos+=b[0].length),b)}},ht.prototype.current=function(){return this.string.slice(this.start,this.pos)},ht.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ht.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ht.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ne(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],b=i.chunkSize();if(t<b){n=i;break}t-=b}return n.lines[t]}function _t(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(b){var k=b.text;i==n.line&&(k=k.slice(0,n.ch)),i==t.line&&(k=k.slice(t.ch)),r.push(k),++i}),r}function gt(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Wt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ct(e){if(e.parent==null)return null;for(var t=e.parent,n=oe(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;!(r.children[i]==t);++i)n+=r.children[i].chunkSize();return n+t.first}function Yt(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],b=i.height;if(t<b){e=i;continue e}t-=b,n+=i.chunkSize()}return n}while(!e.lines);for(var k=0;k<e.lines.length;++k){var j=e.lines[k],H=j.height;if(t<H)break;t-=H}return n+k}function st(e,t){return t>=e.first&&t<e.first+e.size}function Gr(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ke(e,t,n){if(n===void 0&&(n=null),!(this instanceof ke))return new ke(e,t,n);this.line=e,this.ch=t,this.sticky=n}function mt(e,t){return e.line-t.line||e.ch-t.ch}function zn(e,t){return e.sticky==t.sticky&&mt(e,t)==0}function En(e){return ke(e.line,e.ch)}function bn(e,t){return mt(e,t)<0?t:e}function rn(e,t){return mt(e,t)<0?e:t}function xn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function vt(e,t){if(t.line<e.first)return ke(e.first,0);var n=e.first+e.size-1;return t.line>n?ke(n,Ne(e,n).text.length):Di(t,Ne(e,t.line).text.length)}function Di(e,t){var n=e.ch;return n==null||n>t?ke(e.line,t):n<0?ke(e.line,0):e}function Ue(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=vt(e,t[r]);return n}var An=function(e,t){this.state=e,this.lookAhead=t},Ar=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Ar.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Ar.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Ar.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ar.fromSaved=function(e,t,n){return t instanceof An?new Ar(e,xr(e.mode,t.state),n,t.lookAhead):new Ar(e,xr(e.mode,t),n)},Ar.prototype.save=function(e){var t=e!==!1?xr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new An(t,this.maxLookAhead):t};function Vn(e,t,n,r){var i=[e.state.modeGen],b={};wr(e,t.text,e.doc.mode,n,function(V,$){return i.push(V,$)},b,r);for(var k=n.state,j=function(V){n.baseTokens=i;var $=e.state.overlays[V],re=1,he=0;n.state=!0,wr(e,t.text,$.mode,n,function(ce,Ae){for(var Pe=re;he<ce;){var Be=i[re];Be>ce&&i.splice(re,1,ce,i[re+1],Be),re+=2,he=Math.min(ce,Be)}if(!Ae)return;if($.opaque)i.splice(Pe,re-Pe,ce,"overlay "+Ae),re=Pe+2;else for(;Pe<re;Pe+=2){var Ke=i[Pe+1];i[Pe+1]=(Ke?Ke+" ":"")+"overlay "+Ae}},b),n.state=k,n.baseTokens=null,n.baseTokenPos=1},H=0;H<e.state.overlays.length;++H)j(H);return{styles:i,classes:b.bgClass||b.textClass?b:null}}function nn(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Sr(e,Ct(t)),i=t.text.length>e.options.maxHighlightLength&&xr(e.doc.mode,r.state),b=Vn(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=b.styles,b.classes?t.styleClasses=b.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Sr(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Ar(r,!0,t);var b=Ri(e,t,n),k=b>r.first&&Ne(r,b-1).stateAfter,j=k?Ar.fromSaved(r,k,b):new Ar(r,Bt(r.mode),b);return r.iter(b,t,function(H){Qn(e,H.text,j);var V=j.line;H.stateAfter=V==t-1||V%5==0||V>=i.viewFrom&&V<i.viewTo?j.save():null,j.nextLine()}),n&&(r.modeFrontier=j.line),j}function Qn(e,t,n,r){var i=e.doc.mode,b=new ht(t,e.options.tabSize,n);for(b.start=b.pos=r||0,t==""&&Xn(i,n.state);!b.eol();)Cr(i,b,n.state),b.start=b.pos}function Xn(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var n=tn(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}function Cr(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=tn(e,n).mode);var b=e.token(t,n);if(t.pos>t.start)return b}throw new Error("Mode "+e.name+" failed to advance stream.")}var Yn=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Li(e,t,n,r){var i=e.doc,b=i.mode,k;t=vt(i,t);var j=Ne(i,t.line),H=Sr(e,t.line,n),V=new ht(j.text,e.options.tabSize,H),$;for(r&&($=[]);(r||V.pos<t.ch)&&!V.eol();)V.start=V.pos,k=Cr(b,V,H.state),r&&$.push(new Yn(V,k,xr(i.mode,H.state)));return r?$:new Yn(V,k,H.state)}function Jn(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";t[r]==null?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function wr(e,t,n,r,i,b,k){var j=n.flattenSpans;j==null&&(j=e.options.flattenSpans);var H=0,V=null,$=new ht(t,e.options.tabSize,r),re,he=e.options.addModeClass&&[null];for(t==""&&Jn(Xn(n,r.state),b);!$.eol();){if($.pos>e.options.maxHighlightLength?(j=!1,k&&Qn(e,t,r,$.pos),$.pos=t.length,re=null):re=Jn(Cr(n,$,r.state,he),b),he){var ce=he[0].name;ce&&(re="m-"+(re?ce+" "+re:ce))}if(!j||V!=re){for(;H<$.start;)H=Math.min($.start,H+5e3),i(H,V);V=re}$.start=$.pos}for(;H<$.pos;){var Ae=Math.min($.pos,H+5e3);i(Ae,V),H=Ae}}function Ri(e,t,n){for(var r,i,b=e.doc,k=n?-1:t-(e.doc.mode.innerMode?1e3:100),j=t;j>k;--j){if(j<=b.first)return b.first;var H=Ne(b,j-1),V=H.stateAfter;if(V&&(!n||j+(V instanceof An?V.lookAhead:0)<=b.modeFrontier))return j;var $=X(H.text,null,e.options.tabSize);(i==null||r>$)&&(i=j-1,r=$)}return i}function aa(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var n=e.first,r=t-1;r>n;r--){var i=Ne(e,r).stateAfter;if(i&&(!(i instanceof An)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}var Zn=!1,or=!1;function zr(){Zn=!0}function oa(){or=!0}function an(e,t,n){this.marker=e,this.from=t,this.to=n}function Dr(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function qn(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function sa(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Ii(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var b=e[i],k=b.marker,j=b.from==null||(k.inclusiveLeft?b.from<=t:b.from<t);if(j||b.from==t&&k.type=="bookmark"&&(!n||!b.marker.insertLeft)){var H=b.to==null||(k.inclusiveRight?b.to>=t:b.to>t);(r||(r=[])).push(new an(k,b.from,H?null:b.to))}}return r}function Oi(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var b=e[i],k=b.marker,j=b.to==null||(k.inclusiveRight?b.to>=t:b.to>t);if(j||b.from==t&&k.type=="bookmark"&&(!n||b.marker.insertLeft)){var H=b.from==null||(k.inclusiveLeft?b.from<=t:b.from<t);(r||(r=[])).push(new an(k,H?null:b.from-t,b.to==null?null:b.to-t))}}return r}function Tn(e,t){if(t.full)return null;var n=st(e,t.from.line)&&Ne(e,t.from.line).markedSpans,r=st(e,t.to.line)&&Ne(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,b=t.to.ch,k=mt(t.from,t.to)==0,j=Ii(n,i,k),H=Oi(r,b,k),V=t.text.length==1,$=be(t.text).length+(V?i:0);if(j)for(var re=0;re<j.length;++re){var he=j[re];if(he.to==null){var ce=Dr(H,he.marker);ce?V&&(he.to=ce.to==null?null:ce.to+$):he.to=i}}if(H)for(var Ae=0;Ae<H.length;++Ae){var Pe=H[Ae];if(Pe.to!=null&&(Pe.to+=$),Pe.from==null){var Be=Dr(j,Pe.marker);Be||(Pe.from=$,V&&(j||(j=[])).push(Pe))}else Pe.from+=$,V&&(j||(j=[])).push(Pe)}j&&(j=Mi(j)),H&&H!=j&&(H=Mi(H));var Ke=[j];if(!V){var et=t.text.length-2,He;if(et>0&&j)for(var nt=0;nt<j.length;++nt)j[nt].to==null&&(He||(He=[])).push(new an(j[nt].marker,null,null));for(var ct=0;ct<et;++ct)Ke.push(He);Ke.push(H)}return Ke}function Mi(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Pi(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(ce){if(ce.markedSpans)for(var Ae=0;Ae<ce.markedSpans.length;++Ae){var Pe=ce.markedSpans[Ae].marker;Pe.readOnly&&(!r||oe(r,Pe)==-1)&&(r||(r=[])).push(Pe)}}),!r)return null;for(var i=[{from:t,to:n}],b=0;b<r.length;++b)for(var k=r[b],j=k.find(0),H=0;H<i.length;++H){var V=i[H];if(mt(V.to,j.from)<0||mt(V.from,j.to)>0)continue;var $=[H,1],re=mt(V.from,j.from),he=mt(V.to,j.to);(re<0||!k.inclusiveLeft&&!re)&&$.push({from:V.from,to:j.from}),(he>0||!k.inclusiveRight&&!he)&&$.push({from:j.to,to:V.to}),i.splice.apply(i,$),H+=$.length-3}return i}function la(e){var t=e.markedSpans;if(!t)return;for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}function Sn(e,t){if(!t)return;for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}function on(e){return e.inclusiveLeft?-1:0}function sn(e){return e.inclusiveRight?1:0}function Cn(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),b=mt(r.from,i.from)||on(e)-on(t);if(b)return-b;var k=mt(r.to,i.to)||sn(e)-sn(t);return k||t.id-e.id}function Ur(e,t){var n=or&&e.markedSpans,r;if(n)for(var i=void 0,b=0;b<n.length;++b)i=n[b],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||Cn(r,i.marker)<0)&&(r=i.marker);return r}function Br(e){return Ur(e,!0)}function Fr(e){return Ur(e,!1)}function wn(e,t){var n=or&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var b=n[i];b.marker.collapsed&&(b.from==null||b.from<t)&&(b.to==null||b.to>t)&&(!r||Cn(r,b.marker)<0)&&(r=b.marker)}return r}function ki(e,t,n,r,i){var b=Ne(e,t),k=or&&b.markedSpans;if(k)for(var j=0;j<k.length;++j){var H=k[j];if(!H.marker.collapsed)continue;var V=H.marker.find(0),$=mt(V.from,n)||on(H.marker)-on(i),re=mt(V.to,r)||sn(H.marker)-sn(i);if($>=0&&re<=0||$<=0&&re>=0)continue;if($<=0&&(H.marker.inclusiveRight&&i.inclusiveLeft?mt(V.to,n)>=0:mt(V.to,n)>0)||$>=0&&(H.marker.inclusiveRight&&i.inclusiveLeft?mt(V.from,r)<=0:mt(V.from,r)<0))return!0}}function yr(e){for(var t;t=Br(e);)e=t.find(-1,!0).line;return e}function _i(e){for(var t;t=Fr(e);)e=t.find(1,!0).line;return e}function Dn(e){for(var t,n;t=Fr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function $n(e,t){var n=Ne(e,t),r=yr(n);return n==r?t:Ct(r)}function Vr(e,t){if(t>e.lastLine())return t;var n=Ne(e,t),r;if(!Pr(e,n))return t;for(;r=Fr(n);)n=r.find(1,!0).line;return Ct(n)+1}function Pr(e,t){var n=or&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i){if(r=n[i],!r.marker.collapsed)continue;if(r.from==null)return!0;if(r.marker.widgetNode)continue;if(r.from==0&&r.marker.inclusiveLeft&&ei(e,t,r))return!0}}function ei(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return ei(e,r.line,Dr(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,b=0;b<t.markedSpans.length;++b)if(i=t.markedSpans[b],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&ei(e,t,i))return!0}function Lr(e){e=yr(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var b=n.parent;b;n=b,b=n.parent)for(var k=0;k<b.children.length;++k){var j=b.children[k];if(j==n)break;t+=j.height}return t}function ti(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Br(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=Fr(r);){var b=n.find(0,!0);t-=r.text.length-b.from.ch,r=b.to.line,t+=r.text.length-b.to.ch}return t}function Ni(e){var t=e.display,n=e.doc;t.maxLine=Ne(n,n.first),t.maxLineLength=ti(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=ti(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var ln=function(e,t,n){this.text=e,Sn(this,t),this.height=n?n(this):1};ln.prototype.lineNo=function(){return Ct(this)},ae(ln);function ua(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),la(e),Sn(e,n);var i=r?r(e):1;i!=e.height&&Wt(e,i)}function at(e){e.parent=null,la(e)}var pt={},ut={};function xt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ut:pt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Dt(e,t){var n=g("span",null,null,I?"padding-right: .1px":null),r={pre:g("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var b=i?t.rest[i-1]:t.line,k=void 0;r.pos=0,r.addToken=wt,St(e.display.measure)&&(k=Ze(b,e.doc.direction))&&(r.addToken=ur(r.addToken,k)),r.map=[];var j=t!=e.display.externalMeasured&&Ct(b);jr(b,r,nn(e,b,j)),b.styleClasses&&(b.styleClasses.bgClass&&(r.bgClass=W(b.styleClasses.bgClass,r.bgClass||"")),b.styleClasses.textClass&&(r.textClass=W(b.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(it(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(I){var H=r.content.lastChild;(/\bcm-tab\b/.test(H.className)||H.querySelector&&H.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=W(r.pre.className,r.textClass||"")),r}function Nt(e){var t=a("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function wt(e,t,n,r,i,b,k){if(!t)return;var j=e.splitSpaces?Qt(t,e.trailingSpace):t,H=e.cm.state.specialChars,V=!1,$;if(!H.test(t))e.col+=t.length,$=document.createTextNode(j),e.map.push(e.pos,e.pos+t.length,$),U&&_<9&&(V=!0),e.pos+=t.length;else{$=document.createDocumentFragment();for(var re=0;;){H.lastIndex=re;var he=H.exec(t),ce=he?he.index-re:t.length-re;if(ce){var Ae=document.createTextNode(j.slice(re,re+ce));U&&_<9?$.appendChild(a("span",[Ae])):$.appendChild(Ae),e.map.push(e.pos,e.pos+ce,Ae),e.col+=ce,e.pos+=ce}if(!he)break;re+=ce+1;var Pe=void 0;if(he[0]==" "){var Be=e.cm.options.tabSize,Ke=Be-e.col%Be;Pe=$.appendChild(a("span",ue(Ke),"cm-tab")),Pe.setAttribute("role","presentation"),Pe.setAttribute("cm-text"," "),e.col+=Ke}else he[0]=="\r"||he[0]==`
|
|
`?(Pe=$.appendChild(a("span",he[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Pe.setAttribute("cm-text",he[0]),e.col+=1):(Pe=e.cm.options.specialCharPlaceholder(he[0]),Pe.setAttribute("cm-text",he[0]),U&&_<9?$.appendChild(a("span",[Pe])):$.appendChild(Pe),e.col+=1);e.map.push(e.pos,e.pos+1,Pe),e.pos++}}if(e.trailingSpace=j.charCodeAt(t.length-1)==32,n||r||i||V||b||k){var et=n||"";r&&(et+=r),i&&(et+=i);var He=a("span",[$],et,b);if(k)for(var nt in k)k.hasOwnProperty(nt)&&nt!="style"&&nt!="class"&&He.setAttribute(nt,k[nt]);return e.content.appendChild(He)}e.content.appendChild($)}function Qt(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var b=e.charAt(i);b==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(b="\xA0"),r+=b,n=b==" "}return r}function ur(e,t){return function(n,r,i,b,k,j,H){i=i?i+" cm-force-border":"cm-force-border";for(var V=n.pos,$=V+r.length;;){for(var re=void 0,he=0;he<t.length&&!(re=t[he],re.to>V&&re.from<=V);he++);if(re.to>=$)return e(n,r,i,b,k,j,H);e(n,r.slice(0,re.to-V),i,b,null,j,H),b=null,r=r.slice(re.to-V),V=re.to}}}function Tt(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function jr(e,t,n){var r=e.markedSpans,i=e.text,b=0;if(!r){for(var k=1;k<n.length;k+=2)t.addToken(t,i.slice(b,b=n[k]),xt(n[k+1],t.cm.options));return}for(var j=i.length,H=0,V=1,$="",re,he,ce=0,Ae,Pe,Be,Ke,et;;){if(ce==H){Ae=Pe=Be=he="",et=null,Ke=null,ce=Infinity;for(var He=[],nt=void 0,ct=0;ct<r.length;++ct){var lt=r[ct],Et=lt.marker;if(Et.type=="bookmark"&<.from==H&&Et.widgetNode)He.push(Et);else if(lt.from<=H&&(lt.to==null||lt.to>H||Et.collapsed&<.to==H&<.from==H)){if(lt.to!=null&<.to!=H&&ce>lt.to&&(ce=lt.to,Pe=""),Et.className&&(Ae+=" "+Et.className),Et.css&&(he=(he?he+";":"")+Et.css),Et.startStyle&<.from==H&&(Be+=" "+Et.startStyle),Et.endStyle&<.to==ce&&(nt||(nt=[])).push(Et.endStyle,lt.to),Et.title&&((et||(et={})).title=Et.title),Et.attributes)for(var Ut in Et.attributes)(et||(et={}))[Ut]=Et.attributes[Ut];Et.collapsed&&(!Ke||Cn(Ke.marker,Et)<0)&&(Ke=lt)}else lt.from>H&&ce>lt.from&&(ce=lt.from)}if(nt)for(var qt=0;qt<nt.length;qt+=2)nt[qt+1]==ce&&(Pe+=" "+nt[qt]);if(!Ke||Ke.from==H)for(var Kt=0;Kt<He.length;++Kt)Tt(t,0,He[Kt]);if(Ke&&(Ke.from||0)==H){if(Tt(t,(Ke.to==null?j+1:Ke.to)-H,Ke.marker,Ke.from==null),Ke.to==null)return;Ke.to==H&&(Ke=!1)}}if(H>=j)break;for(var vr=Math.min(j,ce);;){if($){var hr=H+$.length;if(!Ke){var zt=hr>vr?$.slice(0,vr-H):$;t.addToken(t,zt,re?re+Ae:Ae,Be,H+zt.length==ce?Pe:"",he,et)}if(hr>=vr){$=$.slice(vr-H),H=vr;break}H=hr,Be=""}$=i.slice(b,b=n[V++]),re=xt(n[V++],t.cm.options)}}}function Ot(e,t,n){this.line=t,this.rest=Dn(t),this.size=this.rest?Ct(be(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Pr(e,t)}function dr(e,t,n){for(var r=[],i,b=t;b<n;b=i){var k=new Ot(e.doc,Ne(e.doc,b),b);i=b+k.size,r.push(k)}return r}var nr=null;function Tr(e){nr?nr.ops.push(e):e.ownsGroup=nr={ops:[e],delayedCallbacks:[]}}function Is(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Os(e,t){var n=e.ownsGroup;if(!n)return;try{Is(n)}finally{nr=null,t(n)}}var ri=null;function er(e,t){var n=$e(e,t);if(!n.length)return;var r=Array.prototype.slice.call(arguments,2),i;nr?i=nr.delayedCallbacks:ri?i=ri:(i=ri=[],setTimeout(Ms,0));for(var b=function(j){i.push(function(){return n[j].apply(null,r)})},k=0;k<n.length;++k)b(k)}function Ms(){var e=ri;ri=null;for(var t=0;t<e.length;++t)e[t]()}function Xa(e,t,n,r){for(var i=0;i<t.changes.length;i++){var b=t.changes[i];b=="text"?ks(e,t):b=="gutter"?Ja(e,t,n,r):b=="class"?da(e,t):b=="widget"&&_s(e,t,r)}t.changes=null}function ni(e){return e.node==e.text&&(e.node=a("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),U&&_<8&&(e.node.style.zIndex=2)),e.node}function Ps(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=ni(t);t.background=r.insertBefore(a("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Ya(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Dt(e,t)}function ks(e,t){var n=t.text.className,r=Ya(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,da(e,t)):n&&(t.text.className=n)}function da(e,t){Ps(e,t),t.line.wrapClass?ni(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Ja(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=ni(t);t.gutterBackground=a("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var b=t.line.gutterMarkers;if(e.options.lineNumbers||b){var k=ni(t),j=t.gutter=a("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(j),k.insertBefore(j,t.text),t.line.gutterClass&&(j.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!b||!b["CodeMirror-linenumbers"])&&(t.lineNumber=j.appendChild(a("div",Gr(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),b)for(var H=0;H<e.display.gutterSpecs.length;++H){var V=e.display.gutterSpecs[H].className,$=b.hasOwnProperty(V)&&b[V];$&&j.appendChild(a("div",[$],"CodeMirror-gutter-elt","left: "+r.gutterLeft[V]+"px; width: "+r.gutterWidth[V]+"px"))}}}function _s(e,t,n){t.alignable&&(t.alignable=null);for(var r=y("CodeMirror-linewidget"),i=t.node.firstChild,b=void 0;i;i=b)b=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Za(e,t,n)}function Ns(e,t,n,r){var i=Ya(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),da(e,t),Ja(e,t,n,r),Za(e,t,r),t.node}function Za(e,t,n){if(qa(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)qa(e,t.rest[r],t,n,!1)}function qa(e,t,n,r,i){if(!t.widgets)return;for(var b=ni(n),k=0,j=t.widgets;k<j.length;++k){var H=j[k],V=a("div",[H.node],"CodeMirror-linewidget"+(H.className?" "+H.className:""));H.handleMouseEvents||V.setAttribute("cm-ignore-events","true"),Us(H,V,n,r),e.display.input.setUneditable(V),i&&H.above?b.insertBefore(V,n.gutter||n.text):b.appendChild(V),er(H,"redraw")}}function Us(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function ii(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!E(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),s(t.display.measure,a("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Wr(e,t){for(var n=se(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute("cm-ignore-events")=="true"||n.parentNode==e.sizer&&n!=e.mover)return!0}function Ui(e){return e.lineSpace.offsetTop}function ca(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function $a(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=s(e.measure,a("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function kr(e){return de-e.display.nativeBarWidth}function un(e){return e.display.scroller.clientWidth-kr(e)-e.display.barWidth}function fa(e){return e.display.scroller.clientHeight-kr(e)-e.display.barHeight}function Bs(e,t,n){var r=e.options.lineWrapping,i=r&&un(e);if(!t.measure.heights||r&&t.measure.width!=i){var b=t.measure.heights=[];if(r){t.measure.width=i;for(var k=t.text.firstChild.getClientRects(),j=0;j<k.length-1;j++){var H=k[j],V=k[j+1];Math.abs(H.bottom-V.bottom)>2&&b.push((H.bottom+V.top)/2-n.top)}}b.push(n.bottom-n.top)}}function eo(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(Ct(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fs(e,t){t=yr(t);var n=Ct(t),r=e.display.externalMeasured=new Ot(e.doc,t,n);r.lineN=n;var i=r.built=Dt(e,r);return r.text=i.pre,s(e.display.lineMeasure,i.pre),r}function to(e,t,n,r){return _r(e,Ln(e,t),n,r)}function ha(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[fn(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function Ln(e,t){var n=Ct(t),r=ha(e,n);r&&!r.text?r=null:r&&r.changes&&(Xa(e,r,n,Ea(e)),e.curOp.forceUpdate=!0),r||(r=Fs(e,t));var i=eo(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function _r(e,t,n,r,i){t.before&&(n=-1);var b=n+(r||""),k;return t.cache.hasOwnProperty(b)?k=t.cache[b]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Bs(e,t.view,t.rect),t.hasHeights=!0),k=Ws(e,t,n,r),k.bogus||(t.cache[b]=k)),{left:k.left,right:k.right,top:i?k.rtop:k.top,bottom:i?k.rbottom:k.bottom}}var ro={left:0,right:0,top:0,bottom:0};function no(e,t,n){for(var r,i,b,k,j,H,V=0;V<e.length;V+=3)if(j=e[V],H=e[V+1],t<j?(i=0,b=1,k="left"):t<H?(i=t-j,b=i+1):(V==e.length-3||t==H&&e[V+3]>t)&&(b=H-j,i=b-1,t>=H&&(k="right")),i!=null){if(r=e[V+2],j==H&&n==(r.insertLeft?"left":"right")&&(k=n),n=="left"&&i==0)for(;V&&e[V-2]==e[V-3]&&e[V-1].insertLeft;)r=e[(V-=3)+2],k="left";if(n=="right"&&i==H-j)for(;V<e.length-3&&e[V+3]==e[V+4]&&!e[V+5].insertLeft;)r=e[(V+=3)+2],k="right";break}return{node:r,start:i,end:b,collapse:k,coverStart:j,coverEnd:H}}function js(e,t){var n=ro;if(t=="left")for(var r=0;r<e.length&&!((n=e[r]).left!=n.right);r++);else for(var i=e.length-1;i>=0&&!((n=e[i]).left!=n.right);i--);return n}function Ws(e,t,n,r){var i=no(t.map,n,r),b=i.node,k=i.start,j=i.end,H=i.collapse,V;if(b.nodeType==3){for(var $=0;$<4;$++){for(;k&&Te(t.line.text.charAt(i.coverStart+k));)--k;for(;i.coverStart+j<i.coverEnd&&Te(t.line.text.charAt(i.coverStart+j));)++j;if(U&&_<9&&k==0&&j==i.coverEnd-i.coverStart?V=b.parentNode.getBoundingClientRect():V=js(p(b,k,j).getClientRects(),r),V.left||V.right||k==0)break;j=k,k=k-1,H="right"}U&&_<11&&(V=Ks(e.display.measure,V))}else{k>0&&(H=r="right");var re;e.options.lineWrapping&&(re=b.getClientRects()).length>1?V=re[r=="right"?re.length-1:0]:V=b.getBoundingClientRect()}if(U&&_<9&&!k&&(!V||!V.left&&!V.right)){var he=b.parentNode.getClientRects()[0];he?V={left:he.left,right:he.left+In(e.display),top:he.top,bottom:he.bottom}:V=ro}for(var ce=V.top-t.rect.top,Ae=V.bottom-t.rect.top,Pe=(ce+Ae)/2,Be=t.view.measure.heights,Ke=0;Ke<Be.length-1&&!(Pe<Be[Ke]);Ke++);var et=Ke?Be[Ke-1]:0,He=Be[Ke],nt={left:(H=="right"?V.right:V.left)-t.rect.left,right:(H=="left"?V.left:V.right)-t.rect.left,top:et,bottom:He};return!V.left&&!V.right&&(nt.bogus=!0),e.options.singleCursorHeightPerLine||(nt.rtop=ce,nt.rbottom=Ae),nt}function Ks(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Pt(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function io(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function ao(e){e.display.externalMeasure=null,c(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)io(e.display.view[t])}function ai(e){ao(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function oo(){return v&&d?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function so(){return v&&d?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ma(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=ii(e.widgets[n]));return t}function Bi(e,t,n,r,i){if(!i){var b=ma(t);n.top+=b,n.bottom+=b}if(r=="line")return n;r||(r="local");var k=Lr(t);if(r=="local"?k+=Ui(e.display):k-=e.display.viewOffset,r=="page"||r=="window"){var j=e.display.lineSpace.getBoundingClientRect();k+=j.top+(r=="window"?0:so());var H=j.left+(r=="window"?0:oo());n.left+=H,n.right+=H}return n.top+=k,n.bottom+=k,n}function lo(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;if(n=="page")r-=oo(),i-=so();else if(n=="local"||!n){var b=e.display.sizer.getBoundingClientRect();r+=b.left,i+=b.top}var k=e.display.lineSpace.getBoundingClientRect();return{left:r-k.left,top:i-k.top}}function pa(e,t,n,r,i){return r||(r=Ne(e.doc,t.line)),Bi(e,r,to(e,r,t.ch,i),n)}function Rr(e,t,n,r,i,b){r=r||Ne(e.doc,t.line),i||(i=Ln(e,r));function k(Ae,Pe){var Be=_r(e,i,Ae,Pe?"right":"left",b);return Pe?Be.left=Be.right:Be.right=Be.left,Bi(e,r,Be,n)}var j=Ze(r,e.doc.direction),H=t.ch,V=t.sticky;if(H>=r.text.length?(H=r.text.length,V="before"):H<=0&&(H=0,V="after"),!j)return k(V=="before"?H-1:H,V=="before");function $(Ae,Pe,Be){var Ke=j[Pe],et=Ke.level==1;return k(Be?Ae-1:Ae,et!=Be)}var re=Fe(j,H,V),he=je,ce=$(H,re,V=="before");return he!=null&&(ce.other=$(H,he,V!="before")),ce}function uo(e,t){var n=0;t=vt(e.doc,t),e.options.lineWrapping||(n=In(e.display)*t.ch);var r=Ne(e.doc,t.line),i=Lr(r)+Ui(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function ga(e,t,n,r,i){var b=ke(e,t,n);return b.xRel=i,r&&(b.outside=r),b}function va(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return ga(r.first,0,null,-1,-1);var i=Yt(r,n),b=r.first+r.size-1;if(i>b)return ga(r.first+r.size-1,Ne(r,b).text.length,null,1,1);t<0&&(t=0);for(var k=Ne(r,i);;){var j=Hs(e,k,i,t,n),H=wn(k,j.ch+(j.xRel>0||j.outside>0?1:0));if(!H)return j;var V=H.find(1);if(V.line==i)return V;k=Ne(r,i=V.line)}}function co(e,t,n,r){r-=ma(t);var i=t.text.length,b=Ye(function(k){return _r(e,n,k-1).bottom<=r},i,0);return i=Ye(function(k){return _r(e,n,k).top>r},b,i),{begin:b,end:i}}function fo(e,t,n,r){n||(n=Ln(e,t));var i=Bi(e,t,_r(e,n,r),"line").top;return co(e,t,n,i)}function ya(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Hs(e,t,n,r,i){i-=Lr(t);var b=Ln(e,t),k=ma(t),j=0,H=t.text.length,V=!0,$=Ze(t,e.doc.direction);if($){var re=(e.options.lineWrapping?zs:Gs)(e,t,n,b,$,r,i);V=re.level!=1,j=V?re.from:re.to-1,H=V?re.to:re.from-1}var he=null,ce=null,Ae=Ye(function(ct){var lt=_r(e,b,ct);return lt.top+=k,lt.bottom+=k,ya(lt,r,i,!1)?(lt.top<=i&<.left<=r&&(he=ct,ce=lt),!0):!1},j,H),Pe,Be,Ke=!1;if(ce){var et=r-ce.left<ce.right-r,He=et==V;Ae=he+(He?0:1),Be=He?"after":"before",Pe=et?ce.left:ce.right}else{!V&&(Ae==H||Ae==j)&&Ae++,Be=Ae==0?"after":Ae==t.text.length?"before":_r(e,b,Ae-(V?1:0)).bottom+k<=i==V?"after":"before";var nt=Rr(e,ke(n,Ae,Be),"line",t,b);Pe=nt.left,Ke=i<nt.top?-1:i>=nt.bottom?1:0}return Ae=Ie(t.text,Ae,1),ga(n,Ae,Be,Ke,r-Pe)}function Gs(e,t,n,r,i,b,k){var j=Ye(function(re){var he=i[re],ce=he.level!=1;return ya(Rr(e,ke(n,ce?he.to:he.from,ce?"before":"after"),"line",t,r),b,k,!0)},0,i.length-1),H=i[j];if(j>0){var V=H.level!=1,$=Rr(e,ke(n,V?H.from:H.to,V?"after":"before"),"line",t,r);ya($,b,k,!0)&&$.top>k&&(H=i[j-1])}return H}function zs(e,t,n,r,i,b,k){var j=co(e,t,r,k),H=j.begin,V=j.end;/\s/.test(t.text.charAt(V-1))&&V--;for(var $=null,re=null,he=0;he<i.length;he++){var ce=i[he];if(ce.from>=V||ce.to<=H)continue;var Ae=ce.level!=1,Pe=_r(e,r,Ae?Math.min(V,ce.to)-1:Math.max(H,ce.from)).right,Be=Pe<b?b-Pe+1e9:Pe-b;(!$||re>Be)&&($=ce,re=Be)}return $||($=i[i.length-1]),$.from<H&&($={from:H,to:$.to,level:$.level}),$.to>V&&($={from:$.from,to:V,level:$.level}),$}var dn;function Rn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(dn==null){dn=a("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)dn.appendChild(document.createTextNode("x")),dn.appendChild(a("br"));dn.appendChild(document.createTextNode("x"))}s(e.measure,dn);var n=dn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),c(e.measure),n||1}function In(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=a("span","xxxxxxxxxx"),n=a("pre",[t],"CodeMirror-line-like");s(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Ea(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,b=t.gutters.firstChild,k=0;b;b=b.nextSibling,++k){var j=e.display.gutterSpecs[k].className;n[j]=b.offsetLeft+b.clientLeft+i,r[j]=b.clientWidth}return{fixedPos:ba(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ba(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ho(e){var t=Rn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/In(e.display)-3);return function(i){if(Pr(e.doc,i))return 0;var b=0;if(i.widgets)for(var k=0;k<i.widgets.length;k++)i.widgets[k].height&&(b+=i.widgets[k].height);return n?b+(Math.ceil(i.text.length/r)||1)*t:b+t}}function xa(e){var t=e.doc,n=ho(e);t.iter(function(r){var i=n(r);i!=r.height&&Wt(r,i)})}function cn(e,t,n,r){var i=e.display;if(!n&&se(t).getAttribute("cm-not-content")=="true")return null;var b,k,j=i.lineSpace.getBoundingClientRect();try{b=t.clientX-j.left,k=t.clientY-j.top}catch(re){return null}var H=va(e,b,k),V;if(r&&H.xRel>0&&(V=Ne(e.doc,H.line).text).length==H.ch){var $=X(V,V.length,e.options.tabSize)-V.length;H=ke(H.line,Math.max(0,Math.round((b-$a(e.display).left)/In(e.display))-$))}return H}function fn(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function cr(e,t,n,r){t==null&&(t=e.doc.first),n==null&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)or&&$n(e.doc,t)<i.viewTo&&Xr(e);else if(n<=i.viewFrom)or&&Vr(e.doc,n+r)>i.viewFrom?Xr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Xr(e);else if(t<=i.viewFrom){var b=Fi(e,n,n+r,1);b?(i.view=i.view.slice(b.index),i.viewFrom=b.lineN,i.viewTo+=r):Xr(e)}else if(n>=i.viewTo){var k=Fi(e,t,t,-1);k?(i.view=i.view.slice(0,k.index),i.viewTo=k.lineN):Xr(e)}else{var j=Fi(e,t,t,-1),H=Fi(e,n,n+r,1);j&&H?(i.view=i.view.slice(0,j.index).concat(dr(e,j.lineN,H.lineN)).concat(i.view.slice(H.index)),i.viewTo+=r):Xr(e)}var V=i.externalMeasured;V&&(n<V.lineN?V.lineN+=r:t<V.lineN+V.size&&(i.externalMeasured=null))}function Qr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),t<r.viewFrom||t>=r.viewTo)return;var b=r.view[fn(e,t)];if(b.node==null)return;var k=b.changes||(b.changes=[]);oe(k,n)==-1&&k.push(n)}function Xr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Fi(e,t,n,r){var i=fn(e,t),b,k=e.display.view;if(!or||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var j=e.display.viewFrom,H=0;H<i;H++)j+=k[H].size;if(j!=t){if(r>0){if(i==k.length-1)return null;b=j+k[i].size-t,i++}else b=j-t;t+=b,n+=b}for(;$n(e.doc,n)!=n;){if(i==(r<0?0:k.length-1))return null;n+=r*k[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Vs(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=dr(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=dr(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(fn(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(dr(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,fn(e,n)))),r.viewTo=n}function mo(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];!i.hidden&&(!i.node||i.changes)&&++n}return n}function oi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function po(e,t){t===void 0&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),b=r.selection=document.createDocumentFragment(),k=0;k<n.sel.ranges.length;k++){if(!t&&k==n.sel.primIndex)continue;var j=n.sel.ranges[k];if(j.from().line>=e.display.viewTo||j.to().line<e.display.viewFrom)continue;var H=j.empty();(H||e.options.showCursorWhenSelecting)&&go(e,j.head,i),H||Qs(e,j,b)}return r}function go(e,t,n){var r=Rr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(a("div","\xA0","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var b=n.appendChild(a("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));b.style.display="",b.style.left=r.other.left+"px",b.style.top=r.other.top+"px",b.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function ji(e,t){return e.top-t.top||e.left-t.left}function Qs(e,t,n){var r=e.display,i=e.doc,b=document.createDocumentFragment(),k=$a(e.display),j=k.left,H=Math.max(r.sizerWidth,un(e)-r.sizer.offsetLeft)-k.right,V=i.direction=="ltr";function $(He,nt,ct,lt){nt<0&&(nt=0),nt=Math.round(nt),lt=Math.round(lt),b.appendChild(a("div",null,"CodeMirror-selected","position: absolute; left: "+He+`px;
|
|
top: `+nt+"px; width: "+(ct==null?H-He:ct)+`px;
|
|
height: `+(lt-nt)+"px"))}function re(He,nt,ct){var lt=Ne(i,He),Et=lt.text.length,Ut,qt;function Kt(zt,mr){return pa(e,ke(He,zt),"div",lt,mr)}function vr(zt,mr,tr){var Xt=fo(e,lt,null,zt),Vt=mr=="ltr"==(tr=="after")?"left":"right",Ht=tr=="after"?Xt.begin:Xt.end-(/\s/.test(lt.text.charAt(Xt.end-1))?2:1);return Kt(Ht,Vt)[Vt]}var hr=Ze(lt,i.direction);return qe(hr,nt||0,ct==null?Et:ct,function(zt,mr,tr,Xt){var Vt=tr=="ltr",Ht=Kt(zt,Vt?"left":"right"),pr=Kt(mr-1,Vt?"right":"left"),Hn=nt==null&&zt==0,en=ct==null&&mr==Et,ar=Xt==0,Nr=!hr||Xt==hr.length-1;if(pr.top-Ht.top<=3){var $t=(V?Hn:en)&&ar,Va=(V?en:Hn)&&Nr,Hr=$t?j:(Vt?Ht:pr).left,vn=Va?H:(Vt?pr:Ht).right;$(Hr,Ht.top,vn-Hr,Ht.bottom)}else{var yn,lr,Gn,Qa;Vt?(yn=V&&Hn&&ar?j:Ht.left,lr=V?H:vr(zt,tr,"before"),Gn=V?j:vr(mr,tr,"after"),Qa=V&&en&&Nr?H:pr.right):(yn=V?vr(zt,tr,"before"):j,lr=!V&&Hn&&ar?H:Ht.right,Gn=!V&&en&&Nr?j:pr.left,Qa=V?vr(mr,tr,"after"):H),$(yn,Ht.top,lr-yn,Ht.bottom),Ht.bottom<pr.top&&$(j,Ht.bottom,null,pr.top),$(Gn,pr.top,Qa-Gn,pr.bottom)}(!Ut||ji(Ht,Ut)<0)&&(Ut=Ht),ji(pr,Ut)<0&&(Ut=pr),(!qt||ji(Ht,qt)<0)&&(qt=Ht),ji(pr,qt)<0&&(qt=pr)}),{start:Ut,end:qt}}var he=t.from(),ce=t.to();if(he.line==ce.line)re(he.line,he.ch,ce.ch);else{var Ae=Ne(i,he.line),Pe=Ne(i,ce.line),Be=yr(Ae)==yr(Pe),Ke=re(he.line,he.ch,Be?Ae.text.length+1:null).end,et=re(ce.line,Be?0:null,ce.ch).start;Be&&(Ke.top<et.top-2?($(Ke.right,Ke.top,null,Ke.bottom),$(j,et.top,et.left,et.bottom)):$(Ke.right,Ke.top,et.left-Ke.right,Ke.bottom)),Ke.bottom<et.top&&$(j,Ke.bottom,null,et.top)}n.appendChild(b)}function Aa(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||On(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function vo(e){e.state.focused||(e.display.input.focus(),Ta(e))}function yo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,On(e))},100)}function Ta(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ye(e,"focus",e,t),e.state.focused=!0,B(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),I&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Aa(e)}function On(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(ye(e,"blur",e,t),e.state.focused=!1,f(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Wi(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],b=e.options.lineWrapping,k=void 0,j=0;if(i.hidden)continue;if(U&&_<8){var H=i.node.offsetTop+i.node.offsetHeight;k=H-n,n=H}else{var V=i.node.getBoundingClientRect();k=V.bottom-V.top,!b&&i.text.firstChild&&(j=i.text.firstChild.getBoundingClientRect().right-V.left-1)}var $=i.line.height-k;if(($>.005||$<-.005)&&(Wt(i.line,k),Eo(i.line),i.rest))for(var re=0;re<i.rest.length;re++)Eo(i.rest[re]);if(j>e.display.sizerWidth){var he=Math.ceil(j/In(e.display));he>e.display.maxLineLength&&(e.display.maxLineLength=he,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function Eo(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Ki(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Ui(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,b=Yt(t,r),k=Yt(t,i);if(n&&n.ensure){var j=n.ensure.from.line,H=n.ensure.to.line;j<b?(b=j,k=Yt(t,Lr(Ne(t,j))+e.wrapper.clientHeight)):Math.min(H,t.lastLine())>=k&&(b=Yt(t,Lr(Ne(t,H))-e.wrapper.clientHeight),k=H)}return{from:b,to:Math.max(k,b+1)}}function Xs(e,t){if(Me(e,"scrollCursorIntoView"))return;var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!A){var b=a("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-n.viewOffset-Ui(e.display))+`px;
|
|
height: `+(t.bottom-t.top+kr(e)+n.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(b),b.scrollIntoView(i),e.display.lineSpace.removeChild(b)}}function Ys(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(t=t.ch?ke(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,n=t.sticky=="before"?ke(t.line,t.ch+1,"before"):t);for(var b=0;b<5;b++){var k=!1,j=Rr(e,t),H=!n||n==t?j:Rr(e,n);i={left:Math.min(j.left,H.left),top:Math.min(j.top,H.top)-r,right:Math.max(j.left,H.left),bottom:Math.max(j.bottom,H.bottom)+r};var V=Sa(e,i),$=e.doc.scrollTop,re=e.doc.scrollLeft;if(V.scrollTop!=null&&(li(e,V.scrollTop),Math.abs(e.doc.scrollTop-$)>1&&(k=!0)),V.scrollLeft!=null&&(hn(e,V.scrollLeft),Math.abs(e.doc.scrollLeft-re)>1&&(k=!0)),!k)break}return i}function Js(e,t){var n=Sa(e,t);n.scrollTop!=null&&li(e,n.scrollTop),n.scrollLeft!=null&&hn(e,n.scrollLeft)}function Sa(e,t){var n=e.display,r=Rn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,b=fa(e),k={};t.bottom-t.top>b&&(t.bottom=t.top+b);var j=e.doc.height+ca(n),H=t.top<r,V=t.bottom>j-r;if(t.top<i)k.scrollTop=H?0:t.top;else if(t.bottom>i+b){var $=Math.min(t.top,(V?j:t.bottom)-b);$!=i&&(k.scrollTop=$)}var re=e.options.fixedGutter?0:n.gutters.offsetWidth,he=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-re,ce=un(e)-n.gutters.offsetWidth,Ae=t.right-t.left>ce;return Ae&&(t.right=t.left+ce),t.left<10?k.scrollLeft=0:t.left<he?k.scrollLeft=Math.max(0,t.left+re-(Ae?0:10)):t.right>ce+he-3&&(k.scrollLeft=t.right+(Ae?0:10)-ce),k}function Ca(e,t){if(t==null)return;Hi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Mn(e){Hi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,n){(t!=null||n!=null)&&Hi(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Zs(e,t){Hi(e),e.curOp.scrollToPos=t}function Hi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=uo(e,t.from),r=uo(e,t.to);bo(e,n,r,t.margin)}}function bo(e,t,n,r){var i=Sa(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});si(e,i.scrollLeft,i.scrollTop)}function li(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;D||Da(e,{top:t}),xo(e,t,!0),D&&Da(e),ci(e,100)}function xo(e,t,n){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!n)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function hn(e,t,n,r){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)return;e.doc.scrollLeft=t,wo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ui(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+ca(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var mn=function(e,t,n){this.cm=n;var r=this.vert=a("div",[a("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=a("div",[a("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),Ee(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ee(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,U&&_<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};mn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var b=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+b)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},mn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},mn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},mn.prototype.zeroWidthHack=function(){var e=l&&!C?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ee,this.disableVert=new ee},mn.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto";function r(){var i=e.getBoundingClientRect(),b=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);b!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},mn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var di=function(){};di.prototype.update=function(){return{bottom:0,right:0}},di.prototype.setScrollLeft=function(){},di.prototype.setScrollTop=function(){},di.prototype.clear=function(){};function Pn(e,t){t||(t=ui(e));var n=e.display.barWidth,r=e.display.barHeight;Ao(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Wi(e),Ao(e,ui(e)),n=e.display.barWidth,r=e.display.barHeight}function Ao(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var To={native:mn,null:di};function So(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&f(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new To[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ee(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?hn(e,t):li(e,t)},e),e.display.scrollbars.addClass&&B(e.display.wrapper,e.display.scrollbars.addClass)}var qs=0;function pn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++qs},Tr(e.curOp)}function gn(e){var t=e.curOp;t&&Os(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;$s(n)})}function $s(e){for(var t=e.ops,n=0;n<t.length;n++)el(t[n]);for(var r=0;r<t.length;r++)tl(t[r]);for(var i=0;i<t.length;i++)rl(t[i]);for(var b=0;b<t.length;b++)nl(t[b]);for(var k=0;k<t.length;k++)il(t[k])}function el(e){var t=e.cm,n=t.display;ol(t),e.updateMaxLine&&Ni(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Gi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&wa(e.cm,e.update)}function rl(e){var t=e.cm,n=t.display;e.updatedDisplay&&Wi(t),e.barMeasure=ui(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=to(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-un(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function nl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&hn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==O();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Pn(t,e.barMeasure),e.updatedDisplay&&Ra(t,e.barMeasure),e.selectionChanged&&Aa(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&vo(e.cm)}function il(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Co(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&xo(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&hn(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ys(t,vt(r,e.scrollToPos.from),vt(r,e.scrollToPos.to),e.scrollToPos.margin);Xs(t,i)}var b=e.maybeHiddenMarkers,k=e.maybeUnhiddenMarkers;if(b)for(var j=0;j<b.length;++j)b[j].lines.length||ye(b[j],"hide");if(k)for(var H=0;H<k.length;++H)k[H].lines.length&&ye(k[H],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ye(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function gr(e,t){if(e.curOp)return t();pn(e);try{return t()}finally{gn(e)}}function Jt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);pn(e);try{return t.apply(e,arguments)}finally{gn(e)}}}function sr(e){return function(){if(this.curOp)return e.apply(this,arguments);pn(this);try{return e.apply(this,arguments)}finally{gn(this)}}}function Zt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);pn(t);try{return e.apply(this,arguments)}finally{gn(t)}}}function ci(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,F(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var n=+new Date+e.options.workTime,r=Sr(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(b){if(r.line>=e.display.viewFrom){var k=b.styles,j=b.text.length>e.options.maxHighlightLength?xr(t.mode,r.state):null,H=Vn(e,b,r,!0);j&&(r.state=j),b.styles=H.styles;var V=b.styleClasses,$=H.classes;$?b.styleClasses=$:V&&(b.styleClasses=null);for(var re=!k||k.length!=b.styles.length||V!=$&&(!V||!$||V.bgClass!=$.bgClass||V.textClass!=$.textClass),he=0;!re&&he<k.length;++he)re=k[he]!=b.styles[he];re&&i.push(r.line),b.stateAfter=r.save(),r.nextLine()}else b.text.length<=e.options.maxHighlightLength&&Qn(e,b.text,r),b.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ci(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&gr(e,function(){for(var b=0;b<i.length;b++)Qr(e,i[b],"text")})}var Gi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Ki(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=un(e),this.force=n,this.dims=Ea(e),this.events=[]};Gi.prototype.signal=function(e,t){ne(e,t)&&this.events.push(arguments)},Gi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ye.apply(null,this.events[e])};function ol(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=kr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=kr(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=O();if(!t||!E(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&E(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function ll(e){if(!e||!e.activeElt||e.activeElt==O())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&E(document.body,e.anchorNode)&&E(document.body,e.focusNode)){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function wa(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Xr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&mo(e)==0)return!1;Do(e)&&(Xr(e),t.dims=Ea(e));var i=r.first+r.size,b=Math.max(t.visible.from-e.options.viewportMargin,r.first),k=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<b&&b-n.viewFrom<20&&(b=Math.max(r.first,n.viewFrom)),n.viewTo>k&&n.viewTo-k<20&&(k=Math.min(i,n.viewTo)),or&&(b=$n(e.doc,b),k=Vr(e.doc,k));var j=b!=n.viewFrom||k!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Vs(e,b,k),n.viewOffset=Lr(Ne(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var H=mo(e);if(!j&&H==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var V=sl(e);return H>4&&(n.lineDiv.style.display="none"),ul(e,n.updateLineNumbers,t.dims),H>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,ll(V),c(n.cursorDiv),c(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,j&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ci(e,400)),n.updateLineNumbers=null,!0}function Co(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==un(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+ca(e.display)-fa(e),n.top)}),t.visible=Ki(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Ki(e.display,e.doc,n));if(!wa(e,t))break;Wi(e);var i=ui(e);oi(e),Pn(e,i),Ra(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Da(e,t){var n=new Gi(e,t);if(wa(e,n)){Wi(e),Co(e,n);var r=ui(e);oi(e),Pn(e,r),Ra(e,r),n.finish()}}function ul(e,t,n){var r=e.display,i=e.options.lineNumbers,b=r.lineDiv,k=b.firstChild;function j(Ae){var Pe=Ae.nextSibling;return I&&l&&e.display.currentWheelTarget==Ae?Ae.style.display="none":Ae.parentNode.removeChild(Ae),Pe}for(var H=r.view,V=r.viewFrom,$=0;$<H.length;$++){var re=H[$];if(!re.hidden)if(!re.node||re.node.parentNode!=b){var he=Ns(e,re,V,n);b.insertBefore(he,k)}else{for(;k!=re.node;)k=j(k);var ce=i&&t!=null&&t<=V&&re.lineNumber;re.changes&&(oe(re.changes,"gutter")>-1&&(ce=!1),Xa(e,re,V,n)),ce&&(c(re.lineNumber),re.lineNumber.appendChild(document.createTextNode(Gr(e.options,V)))),k=re.node.nextSibling}V+=re.size}for(;k;)k=j(k)}function La(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ra(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+kr(e)+"px"}function wo(e){var t=e.display,n=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var r=ba(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,b=r+"px",k=0;k<n.length;k++)if(!n[k].hidden){e.options.fixedGutter&&(n[k].gutter&&(n[k].gutter.style.left=b),n[k].gutterBackground&&(n[k].gutterBackground.style.left=b));var j=n[k].alignable;if(j)for(var H=0;H<j.length;H++)j[H].style.left=b}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}function Do(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Gr(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(a("div",[a("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),b=i.firstChild.offsetWidth,k=i.offsetWidth-b;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(b,r.lineGutter.offsetWidth-k)+1,r.lineNumWidth=r.lineNumInnerWidth+k,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",La(e.display),!0}return!1}function Ia(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var b=e[i],k=null;if(typeof b!="string"&&(k=b.style,b=b.className),b=="CodeMirror-linenumbers")if(t)r=!0;else continue;n.push({className:b,style:k})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Lo(e){var t=e.gutters,n=e.gutterSpecs;c(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],b=i.className,k=i.style,j=t.appendChild(a("div",null,"CodeMirror-gutter "+b));k&&(j.style.cssText=k),b=="CodeMirror-linenumbers"&&(e.lineGutter=j,j.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",La(e)}function fi(e){Lo(e.display),cr(e),wo(e)}function dl(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=a("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=a("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=g("div",null,"CodeMirror-code"),i.selectionDiv=a("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=a("div",null,"CodeMirror-cursors"),i.measure=a("div",null,"CodeMirror-measure"),i.lineMeasure=a("div",null,"CodeMirror-measure"),i.lineSpace=g("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var b=g("div",[i.lineSpace],"CodeMirror-lines");i.mover=a("div",[b],null,"position: relative"),i.sizer=a("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=a("div",null,null,"position: absolute; height: "+de+"px; width: 1px;"),i.gutters=a("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=a("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=a("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),U&&_<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!I&&!(D&&o)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Ia(r.gutters,r.lineNumbers),Lo(i),n.init(i)}var zi=0,Er=null;U?Er=-.53:D?Er=15:v?Er=-.7:L&&(Er=-1/3);function Ro(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function cl(e){var t=Ro(e);return t.x*=Er,t.y*=Er,t}function Io(e,t){var n=Ro(t),r=n.x,i=n.y,b=e.display,k=b.scroller,j=k.scrollWidth>k.clientWidth,H=k.scrollHeight>k.clientHeight;if(!(r&&j||i&&H))return;if(i&&l&&I){e:for(var V=t.target,$=b.view;V!=k;V=V.parentNode)for(var re=0;re<$.length;re++)if($[re].node==V){e.display.currentWheelTarget=V;break e}}if(r&&!D&&!S&&Er!=null){i&&H&&li(e,Math.max(0,k.scrollTop+i*Er)),hn(e,Math.max(0,k.scrollLeft+r*Er)),(!i||i&&H)&&Y(t),b.wheelStartX=null;return}if(i&&Er!=null){var he=i*Er,ce=e.doc.scrollTop,Ae=ce+b.wrapper.clientHeight;he<0?ce=Math.max(0,ce+he-50):Ae=Math.min(e.doc.height,Ae+he+50),Da(e,{top:ce,bottom:Ae})}zi<20&&(b.wheelStartX==null?(b.wheelStartX=k.scrollLeft,b.wheelStartY=k.scrollTop,b.wheelDX=r,b.wheelDY=i,setTimeout(function(){if(b.wheelStartX==null)return;var Pe=k.scrollLeft-b.wheelStartX,Be=k.scrollTop-b.wheelStartY,Ke=Be&&b.wheelDY&&Be/b.wheelDY||Pe&&b.wheelDX&&Pe/b.wheelDX;if(b.wheelStartX=b.wheelStartY=null,!Ke)return;Er=(Er*zi+Ke)/(zi+1),++zi},200)):(b.wheelDX+=r,b.wheelDY+=i))}var br=function(e,t){this.ranges=e,this.primIndex=t};br.prototype.primary=function(){return this.ranges[this.primIndex]},br.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!zn(n.anchor,r.anchor)||!zn(n.head,r.head))return!1}return!0},br.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Mt(En(this.ranges[t].anchor),En(this.ranges[t].head));return new br(e,this.primIndex)},br.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},br.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(mt(t,r.from())>=0&&mt(e,r.to())<=0)return n}return-1};var Mt=function(e,t){this.anchor=e,this.head=t};Mt.prototype.from=function(){return rn(this.anchor,this.head)},Mt.prototype.to=function(){return bn(this.anchor,this.head)},Mt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ir(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(he,ce){return mt(he.from(),ce.from())}),n=oe(t,i);for(var b=1;b<t.length;b++){var k=t[b],j=t[b-1],H=mt(j.to(),k.from());if(r&&!k.empty()?H>0:H>=0){var V=rn(j.from(),k.from()),$=bn(j.to(),k.to()),re=j.empty()?k.from()==k.head:j.from()==j.head;b<=n&&--n,t.splice(--b,2,new Mt(re?$:V,re?V:$))}}return new br(t,n)}function Yr(e,t){return new br([new Mt(e,t||e)],0)}function Jr(e){return e.text?ke(e.from.line+e.text.length-1,be(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Oo(e,t){if(mt(e,t.from)<0)return e;if(mt(e,t.to)<=0)return Jr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Jr(t).ch-t.to.ch),ke(n,r)}function Oa(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Mt(Oo(i.anchor,t),Oo(i.head,t)))}return Ir(e.cm,n,e.sel.primIndex)}function Mo(e,t,n){return e.line==t.line?ke(n.line,e.ch-t.ch+n.ch):ke(n.line+(e.line-t.line),e.ch)}function fl(e,t,n){for(var r=[],i=ke(e.first,0),b=i,k=0;k<t.length;k++){var j=t[k],H=Mo(j.from,i,b),V=Mo(Jr(j),i,b);if(i=j.to,b=V,n=="around"){var $=e.sel.ranges[k],re=mt($.head,$.anchor)<0;r[k]=new Mt(re?V:H,re?H:V)}else r[k]=new Mt(H,H)}return new br(r,e.sel.primIndex)}function Ma(e){e.doc.mode=Ft(e.options,e.doc.modeOption),hi(e)}function hi(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ci(e,100),e.state.modeGen++,e.curOp&&cr(e)}function Po(e,t){return t.from.ch==0&&t.to.ch==0&&be(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Pa(e,t,n,r){function i(et){return n?n[et]:null}function b(et,He,nt){ua(et,He,nt,r),er(et,"change",et,t)}function k(et,He){for(var nt=[],ct=et;ct<He;++ct)nt.push(new ln(V[ct],i(ct),r));return nt}var j=t.from,H=t.to,V=t.text,$=Ne(e,j.line),re=Ne(e,H.line),he=be(V),ce=i(V.length-1),Ae=H.line-j.line;if(t.full)e.insert(0,k(0,V.length)),e.remove(V.length,e.size-V.length);else if(Po(e,t)){var Pe=k(0,V.length-1);b(re,re.text,ce),Ae&&e.remove(j.line,Ae),Pe.length&&e.insert(j.line,Pe)}else if($==re)if(V.length==1)b($,$.text.slice(0,j.ch)+he+$.text.slice(H.ch),ce);else{var Be=k(1,V.length-1);Be.push(new ln(he+$.text.slice(H.ch),ce,r)),b($,$.text.slice(0,j.ch)+V[0],i(0)),e.insert(j.line+1,Be)}else if(V.length==1)b($,$.text.slice(0,j.ch)+V[0]+re.text.slice(H.ch),i(0)),e.remove(j.line+1,Ae);else{b($,$.text.slice(0,j.ch)+V[0],i(0)),b(re,he+re.text.slice(H.ch),ce);var Ke=k(1,V.length-1);Ae>1&&e.remove(j.line+1,Ae-1),e.insert(j.line+1,Ke)}er(e,"change",e,t)}function Zr(e,t,n){function r(i,b,k){if(i.linked)for(var j=0;j<i.linked.length;++j){var H=i.linked[j];if(H.doc==b)continue;var V=k&&H.sharedHist;if(n&&!V)continue;t(H.doc,V),r(H.doc,i,V)}}r(e,null,!0)}function ko(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,xa(e),Ma(e),_o(e),e.options.lineWrapping||Ni(e),e.options.mode=t.modeOption,cr(e)}function _o(e){(e.doc.direction=="rtl"?B:f)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){gr(e,function(){_o(e),cr(e)})}function Vi(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function ka(e,t){var n={from:En(t.from),to:Jr(t),text:_t(e,t.from,t.to)};return Bo(e,n,t.from.line,t.to.line+1),Zr(e,function(r){return Bo(r,n,t.from.line,t.to.line+1)},!0),n}function No(e){for(;e.length;){var t=be(e);if(t.ranges)e.pop();else break}}function ml(e,t){if(t)return No(e.done),be(e.done);if(e.done.length&&!be(e.done).ranges)return be(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),be(e.done)}function Uo(e,t,n,r){var i=e.history;i.undone.length=0;var b=+new Date,k,j;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>b-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(k=ml(i,i.lastOp==r)))j=be(k.changes),mt(t.from,t.to)==0&&mt(t.from,j.to)==0?j.to=Jr(t):k.changes.push(ka(e,t));else{var H=be(i.done);for((!H||!H.ranges)&&Qi(e.sel,i.done),k={changes:[ka(e,t)],generation:i.generation},i.done.push(k);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=b,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,j||ye(e,"historyAdded")}function pl(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,n,r){var i=e.history,b=r&&r.origin;n==i.lastSelOp||b&&i.lastSelOrigin==b&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==b||pl(e,b,be(i.done),t))?i.done[i.done.length-1]=t:Qi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=b,i.lastSelOp=n,r&&r.clearRedo!==!1&&No(i.undone)}function Qi(e,t){var n=be(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Bo(e,t,n,r){var i=t["spans_"+e.id],b=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(k){k.markedSpans&&((i||(i=t["spans_"+e.id]={}))[b]=k.markedSpans),++b})}function vl(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function yl(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(vl(n[i]));return r}function Fo(e,t){var n=yl(e,t),r=Tn(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var b=n[i],k=r[i];if(b&&k){e:for(var j=0;j<k.length;++j){for(var H=k[j],V=0;V<b.length;++V)if(b[V].marker==H.marker)continue e;b.push(H)}}else k&&(n[i]=k)}return n}function kn(e,t,n){for(var r=[],i=0;i<e.length;++i){var b=e[i];if(b.ranges){r.push(n?br.prototype.deepCopy.call(b):b);continue}var k=b.changes,j=[];r.push({changes:j});for(var H=0;H<k.length;++H){var V=k[H],$=void 0;if(j.push({from:V.from,to:V.to,text:V.text}),t)for(var re in V)($=re.match(/^spans_(\d+)$/))&&(oe(t,Number($[1]))>-1&&(be(j)[re]=V[re],delete V[re]))}}return r}function _a(e,t,n,r){if(r){var i=e.anchor;if(n){var b=mt(t,i)<0;b!=mt(n,i)<0?(i=t,t=n):b!=mt(t,n)<0&&(t=n)}return new Mt(i,t)}else return new Mt(n||t,t)}function Xi(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),ir(e,new br([_a(e.sel.primary(),t,n,i)],0),r)}function jo(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),b=0;b<e.sel.ranges.length;b++)r[b]=_a(e.sel.ranges[b],t[b],null,i);var k=Ir(e.cm,r,e.sel.primIndex);ir(e,k,n)}function Na(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,ir(e,Ir(e.cm,i,e.sel.primIndex),r)}function Wo(e,t,n,r){ir(e,Yr(t,n),r)}function El(e,t,n){var r={ranges:t.ranges,update:function(i){this.ranges=[];for(var b=0;b<i.length;b++)this.ranges[b]=new Mt(vt(e,i[b].anchor),vt(e,i[b].head))},origin:n&&n.origin};return ye(e,"beforeSelectionChange",e,r),e.cm&&ye(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Ir(e.cm,r.ranges,r.ranges.length-1):t}function Ko(e,t,n){var r=e.history.done,i=be(r);i&&i.ranges?(r[r.length-1]=t,Yi(e,t,n)):ir(e,t,n)}function ir(e,t,n){Yi(e,t,n),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Yi(e,t,n){(ne(e,"beforeSelectionChange")||e.cm&&ne(e.cm,"beforeSelectionChange"))&&(t=El(e,t,n));var r=n&&n.bias||(mt(t.primary().head,e.sel.primary().head)<0?-1:1);Ho(e,zo(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&Mn(e.cm)}function Ho(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,le(e.cm)),er(e,"cursorActivity",e)}function Go(e){Ho(e,zo(e,e.sel,null,!1))}function zo(e,t,n,r){for(var i,b=0;b<t.ranges.length;b++){var k=t.ranges[b],j=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[b],H=Ji(e,k.anchor,j&&j.anchor,n,r),V=Ji(e,k.head,j&&j.head,n,r);(i||H!=k.anchor||V!=k.head)&&(i||(i=t.ranges.slice(0,b)),i[b]=new Mt(H,V))}return i?Ir(e.cm,i,t.primIndex):t}function _n(e,t,n,r,i){var b=Ne(e,t.line);if(b.markedSpans)for(var k=0;k<b.markedSpans.length;++k){var j=b.markedSpans[k],H=j.marker,V="selectLeft"in H?!H.selectLeft:H.inclusiveLeft,$="selectRight"in H?!H.selectRight:H.inclusiveRight;if((j.from==null||(V?j.from<=t.ch:j.from<t.ch))&&(j.to==null||($?j.to>=t.ch:j.to>t.ch))){if(i&&(ye(H,"beforeCursorEnter"),H.explicitlyCleared))if(b.markedSpans){--k;continue}else break;if(!H.atomic)continue;if(n){var re=H.find(r<0?1:-1),he=void 0;if((r<0?$:V)&&(re=Vo(e,re,-r,re&&re.line==t.line?b:null)),re&&re.line==t.line&&(he=mt(re,n))&&(r<0?he<0:he>0))return _n(e,re,t,r,i)}var ce=H.find(r<0?-1:1);return(r<0?V:$)&&(ce=Vo(e,ce,r,ce.line==t.line?b:null)),ce?_n(e,ce,t,r,i):null}}return t}function Ji(e,t,n,r,i){var b=r||1,k=_n(e,t,n,b,i)||!i&&_n(e,t,n,b,!0)||_n(e,t,n,-b,i)||!i&&_n(e,t,n,-b,!0);return k||(e.cantEdit=!0,ke(e.first,0))}function Vo(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?vt(e,ke(t.line-1)):null:n>0&&t.ch==(r||Ne(e,t.line)).text.length?t.line<e.first+e.size-1?ke(t.line+1,0):null:new ke(t.line,t.ch+n)}function Qo(e){e.setSelection(ke(e.firstLine(),0),ke(e.lastLine()),ge)}function Xo(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(i,b,k,j){i&&(r.from=vt(e,i)),b&&(r.to=vt(e,b)),k&&(r.text=k),j!==void 0&&(r.origin=j)}),ye(e,"beforeChange",e,r),e.cm&&ye(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Nn(e,t,n){if(e.cm){if(!e.cm.curOp)return Jt(e.cm,Nn)(e,t,n);if(e.cm.state.suppressEdits)return}if((ne(e,"beforeChange")||e.cm&&ne(e.cm,"beforeChange"))&&(t=Xo(e,t,!0),!t))return;var r=Zn&&!n&&Pi(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Yo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Yo(e,t)}function Yo(e,t){if(t.text.length==1&&t.text[0]==""&&mt(t.from,t.to)==0)return;var n=Oa(e,t);Uo(e,t,n,e.cm?e.cm.curOp.id:NaN),mi(e,t,n,Tn(e,t));var r=[];Zr(e,function(i,b){!b&&oe(r,i.history)==-1&&($o(i.history,t),r.push(i.history)),mi(i,t,null,Tn(i,t))})}function Zi(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(r&&!n)return;for(var i=e.history,b,k=e.sel,j=t=="undo"?i.done:i.undone,H=t=="undo"?i.undone:i.done,V=0;V<j.length&&!(b=j[V],n?b.ranges&&!b.equals(e.sel):!b.ranges);V++);if(V==j.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(b=j.pop(),b.ranges){if(Qi(b,H),n&&!b.equals(e.sel)){ir(e,b,{clearRedo:!1});return}k=b}else if(r){j.push(b);return}else break;var $=[];Qi(k,H),H.push({changes:$,generation:i.generation}),i.generation=b.generation||++i.maxGeneration;for(var re=ne(e,"beforeChange")||e.cm&&ne(e.cm,"beforeChange"),he=function(Pe){var Be=b.changes[Pe];if(Be.origin=t,re&&!Xo(e,Be,!1))return j.length=0,{};$.push(ka(e,Be));var Ke=Pe?Oa(e,Be):be(j);mi(e,Be,Ke,Fo(e,Be)),!Pe&&e.cm&&e.cm.scrollIntoView({from:Be.from,to:Jr(Be)});var et=[];Zr(e,function(He,nt){!nt&&oe(et,He.history)==-1&&($o(He.history,Be),et.push(He.history)),mi(He,Be,null,Fo(He,Be))})},ce=b.changes.length-1;ce>=0;--ce){var Ae=he(ce);if(Ae)return Ae.v}}function Jo(e,t){if(t==0)return;if(e.first+=t,e.sel=new br(_e(e.sel.ranges,function(i){return new Mt(ke(i.anchor.line+t,i.anchor.ch),ke(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){cr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Qr(e.cm,r,"gutter")}}function mi(e,t,n,r){if(e.cm&&!e.cm.curOp)return Jt(e.cm,mi)(e,t,n,r);if(t.to.line<e.first){Jo(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Jo(e,i),t={from:ke(e.first,0),to:ke(t.to.line+i,t.to.ch),text:[be(t.text)],origin:t.origin}}var b=e.lastLine();t.to.line>b&&(t={from:t.from,to:ke(b,Ne(e,b).text.length),text:[t.text[0]],origin:t.origin}),t.removed=_t(e,t.from,t.to),n||(n=Oa(e,t)),e.cm?bl(e.cm,t,r):Pa(e,t,r),Yi(e,n,ge),e.cantEdit&&Ji(e,ke(e.firstLine(),0))&&(e.cantEdit=!1)}function bl(e,t,n){var r=e.doc,i=e.display,b=t.from,k=t.to,j=!1,H=b.line;e.options.lineWrapping||(H=Ct(yr(Ne(r,b.line))),r.iter(H,k.line+1,function(ce){if(ce==i.maxLine)return j=!0,!0})),r.sel.contains(t.from,t.to)>-1&&le(e),Pa(r,t,n,ho(e)),e.options.lineWrapping||(r.iter(H,b.line+t.text.length,function(ce){var Ae=ti(ce);Ae>i.maxLineLength&&(i.maxLine=ce,i.maxLineLength=Ae,i.maxLineChanged=!0,j=!1)}),j&&(e.curOp.updateMaxLine=!0)),aa(r,b.line),ci(e,400);var V=t.text.length-(k.line-b.line)-1;t.full?cr(e):b.line==k.line&&t.text.length==1&&!Po(e.doc,t)?Qr(e,b.line,"text"):cr(e,b.line,k.line+1,V);var $=ne(e,"changes"),re=ne(e,"change");if(re||$){var he={from:b,to:k,text:t.text,removed:t.removed,origin:t.origin};re&&er(e,"change",e,he),$&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(he)}e.display.selForContextMenu=null}function Un(e,t,n,r,i){var b;r||(r=n),mt(r,n)<0&&(b=[r,n],n=b[0],r=b[1]),typeof t=="string"&&(t=e.splitLines(t)),Nn(e,{from:n,to:r,text:t,origin:i})}function Zo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function qo(e,t,n,r){for(var i=0;i<e.length;++i){var b=e[i],k=!0;if(b.ranges){b.copied||(b=e[i]=b.deepCopy(),b.copied=!0);for(var j=0;j<b.ranges.length;j++)Zo(b.ranges[j].anchor,t,n,r),Zo(b.ranges[j].head,t,n,r);continue}for(var H=0;H<b.changes.length;++H){var V=b.changes[H];if(n<V.from.line)V.from=ke(V.from.line+r,V.from.ch),V.to=ke(V.to.line+r,V.to.ch);else if(t<=V.to.line){k=!1;break}}k||(e.splice(0,i+1),i=0)}}function $o(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;qo(e.done,n,r,i),qo(e.undone,n,r,i)}function pi(e,t,n,r){var i=t,b=t;return typeof t=="number"?b=Ne(e,xn(e,t)):i=Ct(t),i==null?null:(r(b,i)&&e.cm&&Qr(e.cm,i,n),b)}function gi(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}gi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,at(i),er(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function vi(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}vi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var b=Math.min(t,i-e),k=r.height;if(r.removeInner(e,b),this.height-=k-r.height,i==b&&(this.children.splice(n--,1),r.parent=null),(t-=b)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof gi))){var j=[];this.collapse(j),this.children=[new gi(j)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],b=i.chunkSize();if(e<=b){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var k=i.lines.length%25+25,j=k;j<i.lines.length;){var H=new gi(i.lines.slice(j,j+=25));i.height-=H.height,this.children.splice(++r,0,H),H.parent=this}i.lines=i.lines.slice(0,k),this.maybeSpill()}break}e-=b}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new vi(t);if(e.parent){e.size-=n.size,e.height-=n.height;var i=oe(e.parent.children,e);e.parent.children.splice(i+1,0,n)}else{var r=new vi(e.children);r.parent=e,e.children=[r,n],e=r}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],b=i.chunkSize();if(e<b){var k=Math.min(t,b-e);if(i.iterN(e,k,n))return!0;if((t-=k)==0)break;e=0}else e-=b}}};var yi=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};yi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ct(n);if(r==null||!t)return;for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var b=ii(this);Wt(n,Math.max(0,n.height-b)),e&&(gr(e,function(){es(e,n,-b),Qr(e,r,"widget")}),er(e,"lineWidgetCleared",e,this,r))},yi.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=ii(this)-t;if(!i)return;Pr(this.doc,r)||Wt(r,r.height+i),n&&gr(n,function(){n.curOp.forceUpdate=!0,es(n,r,i),er(n,"lineWidgetChanged",n,e,Ct(r))})},ae(yi);function es(e,t,n){Lr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ca(e,n)}function xl(e,t,n,r){var i=new yi(e,n,r),b=e.cm;return b&&i.noHScroll&&(b.display.alignWidgets=!0),pi(e,t,"widget",function(k){var j=k.widgets||(k.widgets=[]);if(i.insertAt==null?j.push(i):j.splice(Math.min(j.length-1,Math.max(0,i.insertAt)),0,i),i.line=k,b&&!Pr(e,k)){var H=Lr(k)<e.scrollTop;Wt(k,k.height+ii(i)),H&&Ca(b,i.height),b.curOp.forceUpdate=!0}return!0}),b&&er(b,"lineWidgetAdded",b,i,typeof t=="number"?t:Ct(t)),i}var ts=0,qr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ts};qr.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&pn(e),ne(this,"clear")){var n=this.find();n&&er(this,"clear",n.from,n.to)}for(var r=null,i=null,b=0;b<this.lines.length;++b){var k=this.lines[b],j=Dr(k.markedSpans,this);e&&!this.collapsed?Qr(e,Ct(k),"text"):e&&(j.to!=null&&(i=Ct(k)),j.from!=null&&(r=Ct(k))),k.markedSpans=qn(k.markedSpans,j),j.from==null&&this.collapsed&&!Pr(this.doc,k)&&e&&Wt(k,Rn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var H=0;H<this.lines.length;++H){var V=yr(this.lines[H]),$=ti(V);$>e.display.maxLineLength&&(e.display.maxLine=V,e.display.maxLineLength=$,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&cr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Go(e.doc)),e&&er(e,"markerCleared",e,this,r,i),t&&gn(e),this.parent&&this.parent.clear()},qr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var b=this.lines[i],k=Dr(b.markedSpans,this);if(k.from!=null&&(n=ke(t?b:Ct(b),k.from),e==-1))return n;if(k.to!=null&&(r=ke(t?b:Ct(b),k.to),e==1))return r}return n&&{from:n,to:r}},qr.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;if(!t||!r)return;gr(r,function(){var i=t.line,b=Ct(t.line),k=ha(r,b);if(k&&(io(k),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Pr(n.doc,i)&&n.height!=null){var j=n.height;n.height=null;var H=ii(n)-j;H&&Wt(i,i.height+H)}er(r,"markerChanged",r,e)})},qr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||oe(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},qr.prototype.detachLine=function(e){if(this.lines.splice(oe(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ae(qr);function Bn(e,t,n,r,i){if(r&&r.shared)return Al(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Jt(e.cm,Bn)(e,t,n,r,i);var b=new qr(e,i),k=mt(t,n);if(r&&N(r,b,!1),k>0||k==0&&b.clearWhenEmpty!==!1)return b;if(b.replacedWith&&(b.collapsed=!0,b.widgetNode=g("span",[b.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||b.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(b.widgetNode.insertLeft=!0)),b.collapsed){if(ki(e,t.line,t,n,b)||t.line!=n.line&&ki(e,n.line,t,n,b))throw new Error("Inserting collapsed marker partially overlapping an existing one");oa()}b.addToHistory&&Uo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var j=t.line,H=e.cm,V;if(e.iter(j,n.line+1,function(re){H&&b.collapsed&&!H.options.lineWrapping&&yr(re)==H.display.maxLine&&(V=!0),b.collapsed&&j!=t.line&&Wt(re,0),sa(re,new an(b,j==t.line?t.ch:null,j==n.line?n.ch:null)),++j}),b.collapsed&&e.iter(t.line,n.line+1,function(re){Pr(e,re)&&Wt(re,0)}),b.clearOnEnter&&Ee(b,"beforeCursorEnter",function(){return b.clear()}),b.readOnly&&(zr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),b.collapsed&&(b.id=++ts,b.atomic=!0),H){if(V&&(H.curOp.updateMaxLine=!0),b.collapsed)cr(H,t.line,n.line+1);else if(b.className||b.startStyle||b.endStyle||b.css||b.attributes||b.title)for(var $=t.line;$<=n.line;$++)Qr(H,$,"text");b.atomic&&Go(H.doc),er(H,"markerAdded",H,b)}return b}var Ei=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Ei.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();er(this,"clear")},Ei.prototype.find=function(e,t){return this.primary.find(e,t)},ae(Ei);function Al(e,t,n,r,i){r=N(r),r.shared=!1;var b=[Bn(e,t,n,r,i)],k=b[0],j=r.widgetNode;return Zr(e,function(H){j&&(r.widgetNode=j.cloneNode(!0)),b.push(Bn(H,vt(H,t),vt(H,n),r,i));for(var V=0;V<H.linked.length;++V)if(H.linked[V].isParent)return;k=be(b)}),new Ei(b,k)}function rs(e){return e.findMarks(ke(e.first,0),e.clipPos(ke(e.lastLine())),function(t){return t.parent})}function Tl(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),b=e.clipPos(i.from),k=e.clipPos(i.to);if(mt(b,k)){var j=Bn(e,b,k,r.primary,r.primary.type);r.markers.push(j),j.parent=r}}}function Sl(e){for(var t=function(r){var i=e[r],b=[i.primary.doc];Zr(i.primary.doc,function(H){return b.push(H)});for(var k=0;k<i.markers.length;k++){var j=i.markers[k];oe(b,j.doc)==-1&&(j.parent=null,i.markers.splice(k--,1))}},n=0;n<e.length;n++)t(n)}var Cl=0,fr=function(e,t,n,r,i){if(!(this instanceof fr))return new fr(e,t,n,r,i);n==null&&(n=0),vi.call(this,[new gi([new ln("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var b=ke(n,0);this.sel=Yr(b),this.history=new Vi(null),this.id=++Cl,this.modeOption=t,this.lineSep=r,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Pa(this,{from:b,to:b,text:e}),ir(this,Yr(b),ge)};fr.prototype=Ve(vi.prototype,{constructor:fr,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=gt(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Zt(function(e){var t=ke(this.first,0),n=this.first+this.size-1;Nn(this,{from:t,to:ke(n,Ne(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&si(this.cm,0,0),ir(this,Yr(t),ge)}),replaceRange:function(e,t,n,r){t=vt(this,t),n=n?vt(this,n):t,Un(this,e,t,n,r)},getRange:function(e,t,n){var r=_t(this,vt(this,e),vt(this,t));return n===!1?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(st(this,e))return Ne(this,e)},getLineNumber:function(e){return Ct(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Ne(this,e)),yr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return vt(this,e)},getCursor:function(e){var t=this.sel.primary(),n;return e==null||e=="head"?n=t.head:e=="anchor"?n=t.anchor:e=="end"||e=="to"||e===!1?n=t.to():n=t.from(),n},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Zt(function(e,t,n){Wo(this,vt(this,typeof e=="number"?ke(e,t||0):e),null,n)}),setSelection:Zt(function(e,t,n){Wo(this,vt(this,e),vt(this,t||e),n)}),extendSelection:Zt(function(e,t,n){Xi(this,vt(this,e),t&&vt(this,t),n)}),extendSelections:Zt(function(e,t){jo(this,Ue(this,e),t)}),extendSelectionsBy:Zt(function(e,t){var n=_e(this.sel.ranges,e);jo(this,Ue(this,n),t)}),setSelections:Zt(function(e,t,n){if(!e.length)return;for(var r=[],i=0;i<e.length;i++)r[i]=new Mt(vt(this,e[i].anchor),vt(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),ir(this,Ir(this.cm,r,t),n)}),addSelection:Zt(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Mt(vt(this,e),vt(this,t||e))),ir(this,Ir(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t=this.sel.ranges,n,r=0;r<t.length;r++){var i=_t(this,t[r].from(),t[r].to());n=n?n.concat(i):i}return e===!1?n:n.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=_t(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Zt(function(e,t,n){for(var r=[],i=this.sel,b=0;b<i.ranges.length;b++){var k=i.ranges[b];r[b]={from:k.from(),to:k.to(),text:this.splitLines(e[b]),origin:n}}for(var j=t&&t!="end"&&fl(this,r,t),H=r.length-1;H>=0;H--)Nn(this,r[H]);j?Ko(this,j):this.cm&&Mn(this.cm)}),undo:Zt(function(){Zi(this,"undo")}),redo:Zt(function(){Zi(this,"redo")}),undoSelection:Zt(function(){Zi(this,"undo",!0)}),redoSelection:Zt(function(){Zi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Vi(this.history.maxGeneration),Zr(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:kn(this.history.done),undone:kn(this.history.undone)}},setHistory:function(e){var t=this.history=new Vi(this.history.maxGeneration);t.done=kn(e.done.slice(0),null,!0),t.undone=kn(e.undone.slice(0),null,!0)},setGutterMarker:Zt(function(e,t,n){return pi(this,e,"gutter",function(r){var i=r.gutterMarkers||(r.gutterMarkers={});return i[t]=n,!n&&Ge(i)&&(r.gutterMarkers=null),!0})}),clearGutter:Zt(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&pi(t,n,"gutter",function(){return n.gutterMarkers[e]=null,Ge(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!st(this,e))return null;if(t=e,e=Ne(this,e),!e)return null}else if(t=Ct(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Zt(function(e,t,n){return pi(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[i])r[i]=n;else{if(y(n).test(r[i]))return!1;r[i]+=" "+n}return!0})}),removeLineClass:Zt(function(e,t,n){return pi(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",b=r[i];if(b)if(n==null)r[i]=null;else{var k=b.match(y(n));if(!k)return!1;var j=k.index+k[0].length;r[i]=b.slice(0,k.index)+(!k.index||j==b.length?"":" ")+b.slice(j)||null}else return!1;return!0})}),addLineWidget:Zt(function(e,t,n){return xl(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Bn(this,vt(this,e),vt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=vt(this,e),Bn(this,e,e,n,"bookmark")},findMarksAt:function(e){e=vt(this,e);var t=[],n=Ne(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=vt(this,e),t=vt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(b){var k=b.markedSpans;if(k)for(var j=0;j<k.length;j++){var H=k[j];!(H.to!=null&&i==e.line&&e.ch>=H.to||H.from==null&&i!=e.line||H.from!=null&&i==t.line&&H.from>=t.ch)&&(!n||n(H.marker))&&r.push(H.marker.parent||H.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var b=i.text.length+r;if(b>e)return t=e,!0;e-=b,++n}),vt(this,ke(n,t))},indexFromPos:function(e){e=vt(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+n}),t},copy:function(e){var t=new fr(gt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new fr(gt(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(r,rs(this)),r},unlinkDoc:function(e){if(e instanceof jt&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Sl(rs(this));break}if(e.history==this.history){var r=[e.id];Zr(e,function(i){return r.push(i.id)},!0),e.history=new Vi(null),e.history.done=kn(this.history.done,r),e.history.undone=kn(this.history.undone,r)}},iterLinkedDocs:function(e){Zr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):ft(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Zt(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&hl(this.cm)})}),fr.prototype.eachLine=fr.prototype.iter;var ns=0;function wl(e){var t=this;if(is(t),Me(t,e)||Wr(t.display,e))return;Y(e),U&&(ns=+new Date);var n=cn(t,e,!0),r=e.dataTransfer.files;if(!n||t.isReadOnly())return;if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,b=Array(i),k=0,j=function(){++k==i&&Jt(t,function(){n=vt(t.doc,n);var ce={from:n,to:n,text:t.doc.splitLines(b.filter(function(Ae){return Ae!=null}).join(t.doc.lineSeparator())),origin:"paste"};Nn(t.doc,ce),Ko(t.doc,Yr(vt(t.doc,n),vt(t.doc,Jr(ce))))})()},H=function(ce,Ae){if(t.options.allowDropFileTypes&&oe(t.options.allowDropFileTypes,ce.type)==-1){j();return}var Pe=new FileReader;Pe.onerror=function(){return j()},Pe.onload=function(){var Be=Pe.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Be)){j();return}b[Ae]=Be,j()},Pe.readAsText(ce)},V=0;V<r.length;V++)H(r[V],V);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var $=e.dataTransfer.getData("Text");if($){var re;if(t.state.draggingText&&!t.state.draggingText.copy&&(re=t.listSelections()),Yi(t.doc,Yr(n,n)),re)for(var he=0;he<re.length;++he)Un(t.doc,"",re[he].anchor,re[he].head,"drag");t.replaceSelection($,"around","paste"),t.display.input.focus()}}catch(ce){}}}function Dl(e,t){if(U&&(!e.state.draggingText||+new Date-ns<100)){te(t);return}if(Me(e,t)||Wr(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!L){var n=a("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",S&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),S&&n.parentNode.removeChild(n)}}function Ll(e,t){var n=cn(e,t);if(!n)return;var r=document.createDocumentFragment();go(e,n,r),e.display.dragCursor||(e.display.dragCursor=a("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),s(e.display.dragCursor,r)}function is(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function as(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var b=0;b<n.length;b++)e(n[b])})}var os=!1;function Rl(){if(os)return;Il(),os=!0}function Il(){var e;Ee(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,as(Ol)},100))}),Ee(window,"blur",function(){return as(On)})}function Ol(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var $r={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},bi=0;bi<10;bi++)$r[bi+48]=$r[bi+96]=String(bi);for(var qi=65;qi<=90;qi++)$r[qi]=String.fromCharCode(qi);for(var xi=1;xi<=12;xi++)$r[xi+111]=$r[xi+63235]="F"+xi;var Kr={};Kr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Kr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Kr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Kr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Kr.default=l?Kr.macDefault:Kr.pcDefault;function Ml(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,b,k=0;k<t.length-1;k++){var j=t[k];if(/^(cmd|meta|m)$/i.test(j))b=!0;else if(/^a(lt)?$/i.test(j))n=!0;else if(/^(c|ctrl|control)$/i.test(j))r=!0;else if(/^s(hift)?$/i.test(j))i=!0;else throw new Error("Unrecognized modifier name: "+j)}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),b&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Pl(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(r=="..."){delete e[n];continue}for(var i=_e(n.split(" "),Ml),b=0;b<i.length;b++){var k=void 0,j=void 0;b==i.length-1?(j=i.join(" "),k=r):(j=i.slice(0,b+1).join(" "),k="...");var H=t[j];if(!H)t[j]=k;else if(H!=k)throw new Error("Inconsistent bindings for "+j)}delete e[n]}for(var V in t)e[V]=t[V];return e}function Fn(e,t,n,r){t=$i(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&n(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Fn(e,t.fallthrough,n,r);for(var b=0;b<t.fallthrough.length;b++){var k=Fn(e,t.fallthrough[b],n,r);if(k)return k}}}function ss(e){var t=typeof e=="string"?e:$r[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function ls(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(h?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(h?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function us(e,t){if(S&&e.keyCode==34&&e.char)return!1;var n=$r[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),ls(n,e,t))}function $i(e){return typeof e=="string"?Kr[e]:e}function jn(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var b=t(n[i]);r.length&&mt(b.from,be(r).to)<=0;){var k=r.pop();if(mt(k.from,b.from)<0){b.from=k.from;break}}r.push(b)}gr(e,function(){for(var j=r.length-1;j>=0;j--)Un(e.doc,"",r[j].from,r[j].to,"+delete");Mn(e)})}function Ua(e,t,n){var r=Ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ba(e,t,n){var r=Ua(e,t.ch,n);return r==null?null:new ke(t.line,r,n<0?"after":"before")}function Fa(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var b=Ze(n,t.doc.direction);if(b){var k=i<0?be(b):b[0],j=i<0==(k.level==1),H=j?"after":"before",V;if(k.level>0||t.doc.direction=="rtl"){var $=Ln(t,n);V=i<0?n.text.length-1:0;var re=_r(t,$,V).top;V=Ye(function(he){return _r(t,$,he).top==re},i<0==(k.level==1)?k.from:k.to-1,V),H=="before"&&(V=Ua(n,V,1))}else V=i<0?k.to:k.from;return new ke(r,V,H)}}return new ke(r,i<0?n.text.length:0,i<0?"before":"after")}function kl(e,t,n,r){var i=Ze(t,e.doc.direction);if(!i)return Ba(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var b=Fe(i,n.ch,n.sticky),k=i[b];if(e.doc.direction=="ltr"&&k.level%2==0&&(r>0?k.to>n.ch:k.from<n.ch))return Ba(t,n,r);var j=function(Ke,et){return Ua(t,Ke instanceof ke?Ke.ch:Ke,et)},H,V=function(Ke){return e.options.lineWrapping?(H=H||Ln(e,t),fo(e,t,H,Ke)):{begin:0,end:t.text.length}},$=V(n.sticky=="before"?j(n,-1):n.ch);if(e.doc.direction=="rtl"||k.level==1){var re=k.level==1==r<0,he=j(n,re?1:-1);if(he!=null&&(re?he<=k.to&&he<=$.end:he>=k.from&&he>=$.begin)){var ce=re?"before":"after";return new ke(n.line,he,ce)}}var Ae=function(Ke,et,He){for(var nt=function(Ut,qt){return qt?new ke(n.line,j(Ut,1),"before"):new ke(n.line,Ut,"after")};Ke>=0&&Ke<i.length;Ke+=et){var ct=i[Ke],lt=et>0==(ct.level!=1),Et=lt?He.begin:j(He.end,-1);if(ct.from<=Et&&Et<ct.to)return nt(Et,lt);if(Et=lt?ct.from:j(ct.to,-1),He.begin<=Et&&Et<He.end)return nt(Et,lt)}},Pe=Ae(b+r,r,$);if(Pe)return Pe;var Be=r>0?$.end:j($.begin,-1);return Be!=null&&!(r>0&&Be==t.text.length)&&(Pe=Ae(r>0?0:i.length-1,r,V(Be)),Pe)?Pe:null}var Ai={selectAll:Qo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ge)},killLine:function(e){return jn(e,function(t){if(t.empty()){var n=Ne(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:ke(t.head.line+1,0)}:{from:t.head,to:ke(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return jn(e,function(t){return{from:ke(t.from().line,0),to:vt(e.doc,ke(t.to().line+1,0))}})},delLineLeft:function(e){return jn(e,function(t){return{from:ke(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return jn(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return jn(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ke(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ke(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return ds(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return cs(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return _l(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},me)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},me)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?cs(e,t.head):r},me)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var b=n[i].from(),k=X(e.getLine(b.line),b.ch,r);t.push(ue(r-k%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return gr(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){if(!t[r].empty())continue;var i=t[r].head,b=Ne(e.doc,i.line).text;if(b){if(i.ch==b.length&&(i=new ke(i.line,i.ch-1)),i.ch>0)i=new ke(i.line,i.ch+1),e.replaceRange(b.charAt(i.ch-1)+b.charAt(i.ch-2),ke(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var k=Ne(e.doc,i.line-1).text;k&&(i=new ke(i.line,1),e.replaceRange(b.charAt(0)+e.doc.lineSeparator()+k.charAt(k.length-1),ke(i.line-1,k.length-1),i,"+transpose"))}}n.push(new Mt(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return gr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Mn(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ds(e,t){var n=Ne(e.doc,t),r=yr(n);return r!=n&&(t=Ct(r)),Fa(!0,e,r,t,1)}function _l(e,t){var n=Ne(e.doc,t),r=_i(n);return r!=n&&(t=Ct(r)),Fa(!0,e,n,t,-1)}function cs(e,t){var n=ds(e,t.line),r=Ne(e.doc,n.line),i=Ze(r,e.doc.direction);if(!i||i[0].level==0){var b=Math.max(n.ch,r.text.search(/\S/)),k=t.line==n.line&&t.ch<=b&&t.ch;return ke(n.line,k?0:b,n.sticky)}return n}function ea(e,t,n){if(typeof t=="string"&&(t=Ai[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Ce}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function Nl(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Fn(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Fn(t,e.options.extraKeys,n,e)||Fn(t,e.options.keyMap,n,e)}var Ul=new ee;function Ti(e,t,n,r){var i=e.state.keySeq;if(i){if(ss(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ul.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),fs(e,i+" "+t,n,r))return!0}return fs(e,t,n,r)}function fs(e,t,n,r){var i=Nl(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&er(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(Y(n),Aa(e)),!!i}function hs(e,t){var n=us(t,!0);return n?t.shiftKey&&!e.state.keySeq?Ti(e,"Shift-"+n,t,function(r){return ea(e,r,!0)})||Ti(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return ea(e,r)}):Ti(e,n,t,function(r){return ea(e,r)}):!1}function Bl(e,t,n){return Ti(e,"'"+n+"'",t,function(r){return ea(e,r,!0)})}var ja=null;function ms(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=O(),Me(t,e))return;U&&_<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=hs(t,e);S&&(ja=r?n:null,!r&&n==88&&!Lt&&(l?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),D&&!l&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;B(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(f(t,"CodeMirror-crosshair"),Qe(document,"keyup",n),Qe(document,"mouseover",n))}Ee(document,"keyup",n),Ee(document,"mouseover",n)}function ps(e){e.keyCode==16&&(this.doc.sel.shift=!1),Me(this,e)}function gs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Wr(t.display,e)||Me(t,e)||e.ctrlKey&&!e.altKey||l&&e.metaKey)return;var n=e.keyCode,r=e.charCode;if(S&&n==ja){ja=null,Y(e);return}if(S&&(!e.which||e.which<10)&&hs(t,e))return;var i=String.fromCharCode(r==null?n:r);if(i=="\b")return;if(Bl(t,e,i))return;t.display.input.onKeyPress(e)}var jl=400,Wa=function(e,t,n){this.time=e,this.pos=t,this.button=n};Wa.prototype.compare=function(e,t,n){return this.time+jl>e&&mt(t,this.pos)==0&&n==this.button};var Si,Ci;function Wl(e,t){var n=+new Date;return Ci&&Ci.compare(n,e,t)?(Si=Ci=null,"triple"):Si&&Si.compare(n,e,t)?(Ci=new Wa(n,e,t),Si=null,"double"):(Si=new Wa(n,e,t),Ci=null,"single")}function vs(e){var t=this,n=t.display;if(Me(t,e)||n.activeTouch&&n.input.supportsTouch())return;if(n.input.ensurePolled(),n.shift=e.shiftKey,Wr(n,e)){I||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(Ka(t,e))return;var r=cn(t,e),i=ve(e),b=r?Wl(r,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),r&&Kl(t,i,r,b,e))return;i==1?r?Gl(t,r,b,e):se(e)==n.scroller&&Y(e):i==2?(r&&Xi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(w?t.display.input.onContextMenu(e):yo(t))}function Kl(e,t,n,r,i){var b="Click";return r=="double"?b="Double"+b:r=="triple"&&(b="Triple"+b),b=(t==1?"Left":t==2?"Middle":"Right")+b,Ti(e,ls(b,i),i,function(k){if(typeof k=="string"&&(k=Ai[k]),!k)return!1;var j=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),j=k(e,n)!=Ce}finally{e.state.suppressEdits=!1}return j})}function Hl(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var b=u?n.shiftKey&&n.metaKey:n.altKey;i.unit=b?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=l?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(l?n.altKey:n.ctrlKey)),i}function Gl(e,t,n,r){U?setTimeout(F(vo,e),0):e.curOp.focus=O();var i=Hl(e,n,r),b=e.doc.sel,k;e.options.dragDrop&&Se&&!e.isReadOnly()&&n=="single"&&(k=b.contains(t))>-1&&(mt((k=b.ranges[k]).from(),t)<0||t.xRel>0)&&(mt(k.to(),t)>0||t.xRel<0)?zl(e,r,t,i):Vl(e,r,t,i)}function zl(e,t,n,r){var i=e.display,b=!1,k=Jt(e,function(V){I&&(i.scroller.draggable=!1),e.state.draggingText=!1,Qe(i.wrapper.ownerDocument,"mouseup",k),Qe(i.wrapper.ownerDocument,"mousemove",j),Qe(i.scroller,"dragstart",H),Qe(i.scroller,"drop",k),b||(Y(V),r.addNew||Xi(e.doc,n,null,null,r.extend),I&&!L||U&&_==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),j=function(V){b=b||Math.abs(t.clientX-V.clientX)+Math.abs(t.clientY-V.clientY)>=10},H=function(){return b=!0};I&&(i.scroller.draggable=!0),e.state.draggingText=k,k.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),Ee(i.wrapper.ownerDocument,"mouseup",k),Ee(i.wrapper.ownerDocument,"mousemove",j),Ee(i.scroller,"dragstart",H),Ee(i.scroller,"drop",k),yo(e),setTimeout(function(){return i.input.focus()},20)}function ys(e,t,n){if(n=="char")return new Mt(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Mt(ke(t.line,0),vt(e.doc,ke(t.line+1,0)));var r=n(e,t);return new Mt(r.from,r.to)}function Vl(e,t,n,r){var i=e.display,b=e.doc;Y(t);var k,j,H=b.sel,V=H.ranges;if(r.addNew&&!r.extend?(j=b.sel.contains(n),j>-1?k=V[j]:k=new Mt(n,n)):(k=b.sel.primary(),j=b.sel.primIndex),r.unit=="rectangle")r.addNew||(k=new Mt(n,n)),n=cn(e,t,!0,!0),j=-1;else{var $=ys(e,n,r.unit);r.extend?k=_a(k,$.anchor,$.head,r.extend):k=$}r.addNew?j==-1?(j=V.length,ir(b,Ir(e,V.concat([k]),j),{scroll:!1,origin:"*mouse"})):V.length>1&&V[j].empty()&&r.unit=="char"&&!r.extend?(ir(b,Ir(e,V.slice(0,j).concat(V.slice(j+1)),0),{scroll:!1,origin:"*mouse"}),H=b.sel):Na(b,j,k,fe):(j=0,ir(b,new br([k],0),fe),H=b.sel);var re=n;function he(He){if(mt(re,He)==0)return;if(re=He,r.unit=="rectangle"){for(var nt=[],ct=e.options.tabSize,lt=X(Ne(b,n.line).text,n.ch,ct),Et=X(Ne(b,He.line).text,He.ch,ct),Ut=Math.min(lt,Et),qt=Math.max(lt,Et),Kt=Math.min(n.line,He.line),vr=Math.min(e.lastLine(),Math.max(n.line,He.line));Kt<=vr;Kt++){var hr=Ne(b,Kt).text,zt=pe(hr,Ut,ct);Ut==qt?nt.push(new Mt(ke(Kt,zt),ke(Kt,zt))):hr.length>zt&&nt.push(new Mt(ke(Kt,zt),ke(Kt,pe(hr,qt,ct))))}nt.length||nt.push(new Mt(n,n)),ir(b,Ir(e,H.ranges.slice(0,j).concat(nt),j),{origin:"*mouse",scroll:!1}),e.scrollIntoView(He)}else{var mr=k,tr=ys(e,He,r.unit),Xt=mr.anchor,Vt;mt(tr.anchor,Xt)>0?(Vt=tr.head,Xt=rn(mr.from(),tr.anchor)):(Vt=tr.anchor,Xt=bn(mr.to(),tr.head));var Ht=H.ranges.slice(0);Ht[j]=Ql(e,new Mt(vt(b,Xt),Vt)),ir(b,Ir(e,Ht,j),fe)}}var ce=i.wrapper.getBoundingClientRect(),Ae=0;function Pe(He){var nt=++Ae,ct=cn(e,He,!0,r.unit=="rectangle");if(!ct)return;if(mt(ct,re)!=0){e.curOp.focus=O(),he(ct);var lt=Ki(i,b);(ct.line>=lt.to||ct.line<lt.from)&&setTimeout(Jt(e,function(){Ae==nt&&Pe(He)}),150)}else{var Et=He.clientY<ce.top?-20:He.clientY>ce.bottom?20:0;Et&&setTimeout(Jt(e,function(){if(Ae!=nt)return;i.scroller.scrollTop+=Et,Pe(He)}),50)}}function Be(He){e.state.selectingText=!1,Ae=Infinity,He&&(Y(He),i.input.focus()),Qe(i.wrapper.ownerDocument,"mousemove",Ke),Qe(i.wrapper.ownerDocument,"mouseup",et),b.history.lastSelOrigin=null}var Ke=Jt(e,function(He){He.buttons===0||!ve(He)?Be(He):Pe(He)}),et=Jt(e,Be);e.state.selectingText=et,Ee(i.wrapper.ownerDocument,"mousemove",Ke),Ee(i.wrapper.ownerDocument,"mouseup",et)}function Ql(e,t){var n=t.anchor,r=t.head,i=Ne(e.doc,n.line);if(mt(n,r)==0&&n.sticky==r.sticky)return t;var b=Ze(i);if(!b)return t;var k=Fe(b,n.ch,n.sticky),j=b[k];if(j.from!=n.ch&&j.to!=n.ch)return t;var H=k+(j.from==n.ch==(j.level!=1)?0:1);if(H==0||H==b.length)return t;var V;if(r.line!=n.line)V=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var $=Fe(b,r.ch,r.sticky),re=$-k||(r.ch-n.ch)*(j.level==1?-1:1);$==H-1||$==H?V=re<0:V=re>0}var he=b[H+(V?-1:0)],ce=V==(he.level==1),Ae=ce?he.from:he.to,Pe=ce?"after":"before";return n.ch==Ae&&n.sticky==Pe?t:new Mt(new ke(n.line,Ae,Pe),r)}function Es(e,t,n,r){var i,b;if(t.touches)i=t.touches[0].clientX,b=t.touches[0].clientY;else try{i=t.clientX,b=t.clientY}catch(he){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Y(t);var k=e.display,j=k.lineDiv.getBoundingClientRect();if(b>j.bottom||!ne(e,n))return Z(t);b-=j.top-k.viewOffset;for(var H=0;H<e.display.gutterSpecs.length;++H){var V=k.gutters.childNodes[H];if(V&&V.getBoundingClientRect().right>=i){var $=Yt(e.doc,b),re=e.display.gutterSpecs[H];return ye(e,n,e,$,re.className,t),Z(t)}}}function Ka(e,t){return Es(e,t,"gutterClick",!0)}function bs(e,t){if(Wr(e.display,t)||Xl(e,t))return;if(Me(e,t,"contextmenu"))return;w||e.display.input.onContextMenu(t)}function Xl(e,t){return ne(e,"gutterContextMenu")?Es(e,t,"gutterContextMenu",!1):!1}function xs(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ai(e)}var Wn={toString:function(){return"CodeMirror.Init"}},As={},ta={};function Yl(e){var t=e.optionHandlers;function n(r,i,b,k){e.defaults[r]=i,b&&(t[r]=k?function(j,H,V){V!=Wn&&b(j,H,V)}:b)}e.defineOption=n,e.Init=Wn,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Ma(r)},!0),n("indentUnit",2,Ma,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){hi(r),ai(r),cr(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!i)return;var b=[],k=r.doc.first;r.doc.iter(function(H){for(var V=0;;){var $=H.text.indexOf(i,V);if($==-1)break;V=$+i.length,b.push(ke(k,$))}k++});for(var j=b.length-1;j>=0;j--)Un(r.doc,i,b[j],ke(b[j].line,b[j].ch+i.length))}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,i,b){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),b!=Wn&&r.refresh()}),n("specialCharPlaceholder",Nt,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",o?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!T),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){xs(r),fi(r)},!0),n("keyMap","default",function(r,i,b){var k=$i(i),j=b!=Wn&&$i(b);j&&j.detach&&j.detach(r,k),k.attach&&k.attach(r,j||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Zl,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Ia(i,r.options.lineNumbers),fi(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?ba(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Pn(r)},!0),n("scrollbarStyle","native",function(r){So(r),Pn(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Ia(r.options.gutters,i),fi(r)},!0),n("firstLineNumber",1,fi,!0),n("lineNumberFormatter",function(r){return r},fi,!0),n("showCursorWhenSelecting",!1,oi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(On(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,Jl),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,oi,!0),n("singleCursorHeightPerLine",!0,oi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,hi,!0),n("addModeClass",!1,hi,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,hi,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function Jl(e,t,n){var r=n&&n!=Wn;if(!t!=!r){var i=e.display.dragFunctions,b=t?Ee:Qe;b(e.display.scroller,"dragstart",i.start),b(e.display.scroller,"dragenter",i.enter),b(e.display.scroller,"dragover",i.over),b(e.display.scroller,"dragleave",i.leave),b(e.display.scroller,"drop",i.drop)}}function Zl(e){e.options.lineWrapping?(B(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(f(e.display.wrapper,"CodeMirror-wrap"),Ni(e)),xa(e),cr(e),ai(e),setTimeout(function(){return Pn(e)},100)}function jt(e,t){var n=this;if(!(this instanceof jt))return new jt(e,t);this.options=t=t?N(t):{},N(As,t,!1);var r=t.value;typeof r=="string"?r=new fr(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new jt.inputStyles[t.inputStyle](this),b=this.display=new dl(e,r,i,t);b.wrapper.CodeMirror=this,xs(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),So(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ee,keySeq:null,specialChars:null},t.autofocus&&!o&&b.input.focus(),U&&_<11&&setTimeout(function(){return n.display.input.reset(!0)},20),ql(this),Rl(),pn(this),this.curOp.forceUpdate=!0,ko(this,r),t.autofocus&&!o||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Ta(n)},20):On(this);for(var k in ta)ta.hasOwnProperty(k)&&ta[k](this,t[k],Wn);Do(this),t.finishInit&&t.finishInit(this);for(var j=0;j<Ha.length;++j)Ha[j](this);gn(this),I&&t.lineWrapping&&getComputedStyle(b.lineDiv).textRendering=="optimizelegibility"&&(b.lineDiv.style.textRendering="auto")}jt.defaults=As,jt.optionHandlers=ta;function ql(e){var t=e.display;Ee(t.scroller,"mousedown",Jt(e,vs)),U&&_<11?Ee(t.scroller,"dblclick",Jt(e,function(H){if(Me(e,H))return;var V=cn(e,H);if(!V||Ka(e,H)||Wr(e.display,H))return;Y(H);var $=e.findWordAt(V);Xi(e.doc,$.anchor,$.head)})):Ee(t.scroller,"dblclick",function(H){return Me(e,H)||Y(H)}),Ee(t.scroller,"contextmenu",function(H){return bs(e,H)}),Ee(t.input.getField(),"contextmenu",function(H){t.scroller.contains(H.target)||bs(e,H)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function b(H){if(H.touches.length!=1)return!1;var V=H.touches[0];return V.radiusX<=1&&V.radiusY<=1}function k(H,V){if(V.left==null)return!0;var $=V.left-H.left,re=V.top-H.top;return $*$+re*re>20*20}Ee(t.scroller,"touchstart",function(H){if(!Me(e,H)&&!b(H)&&!Ka(e,H)){t.input.ensurePolled(),clearTimeout(n);var V=+new Date;t.activeTouch={start:V,moved:!1,prev:V-r.end<=300?r:null},H.touches.length==1&&(t.activeTouch.left=H.touches[0].pageX,t.activeTouch.top=H.touches[0].pageY)}}),Ee(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ee(t.scroller,"touchend",function(H){var V=t.activeTouch;if(V&&!Wr(t,H)&&V.left!=null&&!V.moved&&new Date-V.start<300){var $=e.coordsChar(t.activeTouch,"page"),re;!V.prev||k(V,V.prev)?re=new Mt($,$):!V.prev.prev||k(V,V.prev.prev)?re=e.findWordAt($):re=new Mt(ke($.line,0),vt(e.doc,ke($.line+1,0))),e.setSelection(re.anchor,re.head),e.focus(),Y(H)}i()}),Ee(t.scroller,"touchcancel",i),Ee(t.scroller,"scroll",function(){t.scroller.clientHeight&&(li(e,t.scroller.scrollTop),hn(e,t.scroller.scrollLeft,!0),ye(e,"scroll",e))}),Ee(t.scroller,"mousewheel",function(H){return Io(e,H)}),Ee(t.scroller,"DOMMouseScroll",function(H){return Io(e,H)}),Ee(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(H){Me(e,H)||te(H)},over:function(H){Me(e,H)||(Ll(e,H),te(H))},start:function(H){return Dl(e,H)},drop:Jt(e,wl),leave:function(H){Me(e,H)||is(e)}};var j=t.input.getField();Ee(j,"keyup",function(H){return ps.call(e,H)}),Ee(j,"keydown",Jt(e,ms)),Ee(j,"keypress",Jt(e,gs)),Ee(j,"focus",function(H){return Ta(e,H)}),Ee(j,"blur",function(H){return On(e,H)})}var Ha=[];jt.defineInitHook=function(e){return Ha.push(e)};function wi(e,t,n,r){var i=e.doc,b;n==null&&(n="add"),n=="smart"&&(i.mode.indent?b=Sr(e,t).state:n="prev");var k=e.options.tabSize,j=Ne(i,t),H=X(j.text,null,k);j.stateAfter&&(j.stateAfter=null);var V=j.text.match(/^\s*/)[0],$;if(!r&&!/\S/.test(j.text))$=0,n="not";else if(n=="smart"&&($=i.mode.indent(b,j.text.slice(V.length),j.text),$==Ce||$>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?$=X(Ne(i,t-1).text,null,k):$=0:n=="add"?$=H+e.options.indentUnit:n=="subtract"?$=H-e.options.indentUnit:typeof n=="number"&&($=H+n),$=Math.max(0,$);var re="",he=0;if(e.options.indentWithTabs)for(var ce=Math.floor($/k);ce;--ce)he+=k,re+=" ";if(he<$&&(re+=ue($-he)),re!=V)return Un(i,re,ke(t,0),ke(t,V.length),"+input"),j.stateAfter=null,!0;for(var Ae=0;Ae<i.sel.ranges.length;Ae++){var Pe=i.sel.ranges[Ae];if(Pe.head.line==t&&Pe.head.ch<V.length){var Be=ke(t,V.length);Na(i,Ae,new Mt(Be,Be));break}}}var Or=null;function ra(e){Or=e}function Ga(e,t,n,r,i){var b=e.doc;e.display.shift=!1,r||(r=b.sel);var k=+new Date-200,j=i=="paste"||e.state.pasteIncoming>k,H=ft(t),V=null;if(j&&r.ranges.length>1)if(Or&&Or.text.join(`
|
|
`)==t){if(r.ranges.length%Or.text.length==0){V=[];for(var $=0;$<Or.text.length;$++)V.push(b.splitLines(Or.text[$]))}}else H.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(V=_e(H,function(Ke){return[Ke]}));for(var re=e.curOp.updateInput,he=r.ranges.length-1;he>=0;he--){var ce=r.ranges[he],Ae=ce.from(),Pe=ce.to();ce.empty()&&(n&&n>0?Ae=ke(Ae.line,Ae.ch-n):e.state.overwrite&&!j?Pe=ke(Pe.line,Math.min(Ne(b,Pe.line).text.length,Pe.ch+be(H).length)):j&&Or&&Or.lineWise&&Or.text.join(`
|
|
`)==H.join(`
|
|
`)&&(Ae=Pe=ke(Ae.line,0)));var Be={from:Ae,to:Pe,text:V?V[he%V.length]:H,origin:i||(j?"paste":e.state.cutIncoming>k?"cut":"+input")};Nn(e.doc,Be),er(e,"inputRead",e,Be)}t&&!j&&Ss(e,t),Mn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=re),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ts(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&gr(t,function(){return Ga(t,n,0,null,"paste")}),!0}function Ss(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)continue;var b=e.getModeAt(i.head),k=!1;if(b.electricChars){for(var j=0;j<b.electricChars.length;j++)if(t.indexOf(b.electricChars.charAt(j))>-1){k=wi(e,i.head.line,"smart");break}}else b.electricInput&&(b.electricInput.test(Ne(e.doc,i.head.line).text.slice(0,i.head.ch))&&(k=wi(e,i.head.line,"smart")));k&&er(e,"electricInput",e,i.head.line)}}function Cs(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,b={anchor:ke(i,0),head:ke(i+1,0)};n.push(b),t.push(e.getRange(b.anchor,b.head))}return{text:t,ranges:n}}function ws(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Ds(){var e=a("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=a("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return I?e.style.width="1000px":e.setAttribute("wrap","off"),x&&(e.style.border="1px solid black"),ws(e),t}function $l(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(r,i){var b=this.options,k=b[r];if(b[r]==i&&r!="mode")return;b[r]=i,t.hasOwnProperty(r)&&Jt(this,t[r])(this,i,k),ye(this,"optionChange",this,r)},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"]($i(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,b=0;b<i.length;++b)if(i[b]==r||i[b].name==r)return i.splice(b,1),!0},addOverlay:sr(function(r,i){var b=r.token?r:e.getMode(this.options,r);if(b.startState)throw new Error("Overlays may not be stateful.");Oe(this.state.overlays,{mode:b,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(k){return k.priority}),this.state.modeGen++,cr(this)}),removeOverlay:sr(function(r){for(var i=this.state.overlays,b=0;b<i.length;++b){var k=i[b].modeSpec;if(k==r||typeof r=="string"&&k.name==r){i.splice(b,1),this.state.modeGen++,cr(this);return}}}),indentLine:sr(function(r,i,b){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),st(this.doc,r)&&wi(this,r,i,b)}),indentSelection:sr(function(r){for(var i=this.doc.sel.ranges,b=-1,k=0;k<i.length;k++){var j=i[k];if(j.empty())j.head.line>b&&(wi(this,j.head.line,r,!0),b=j.head.line,k==this.doc.sel.primIndex&&Mn(this));else{var H=j.from(),V=j.to(),$=Math.max(b,H.line);b=Math.min(this.lastLine(),V.line-(V.ch?0:1))+1;for(var re=$;re<b;++re)wi(this,re,r);var he=this.doc.sel.ranges;H.ch==0&&i.length==he.length&&he[k].from().ch>0&&Na(this.doc,k,new Mt(H,he[k].to()),ge)}}}),getTokenAt:function(r,i){return Li(this,r,i)},getLineTokens:function(r,i){return Li(this,ke(r),i,!0)},getTokenTypeAt:function(r){r=vt(this.doc,r);var i=nn(this,Ne(this.doc,r.line)),b=0,k=(i.length-1)/2,j=r.ch,H;if(j==0)H=i[2];else for(;;){var V=b+k>>1;if((V?i[V*2-1]:0)>=j)k=V;else if(i[V*2+1]<j)b=V+1;else{H=i[V*2+2];break}}var $=H?H.indexOf("overlay "):-1;return $<0?H:$==0?null:H.slice(0,$-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var b=[];if(!n.hasOwnProperty(i))return b;var k=n[i],j=this.getModeAt(r);if(typeof j[i]=="string")k[j[i]]&&b.push(k[j[i]]);else if(j[i])for(var H=0;H<j[i].length;H++){var V=k[j[i][H]];V&&b.push(V)}else j.helperType&&k[j.helperType]?b.push(k[j.helperType]):k[j.name]&&b.push(k[j.name]);for(var $=0;$<k._global.length;$++){var re=k._global[$];re.pred(j,this)&&oe(b,re.val)==-1&&b.push(re.val)}return b},getStateAfter:function(r,i){var b=this.doc;return r=xn(b,r==null?b.first+b.size-1:r),Sr(this,r+1,i).state},cursorCoords:function(r,i){var b,k=this.doc.sel.primary();return r==null?b=k.head:typeof r=="object"?b=vt(this.doc,r):b=r?k.from():k.to(),Rr(this,b,i||"page")},charCoords:function(r,i){return pa(this,vt(this.doc,r),i||"page")},coordsChar:function(r,i){return r=lo(this,r,i||"page"),va(this,r.left,r.top)},lineAtHeight:function(r,i){return r=lo(this,{top:r,left:0},i||"page").top,Yt(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,b){var k=!1,j;if(typeof r=="number"){var H=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>H&&(r=H,k=!0),j=Ne(this.doc,r)}else j=r;return Bi(this,j,{top:0,left:0},i||"page",b||k).top+(k?this.doc.height-Lr(j):0)},defaultTextHeight:function(){return Rn(this.display)},defaultCharWidth:function(){return In(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,b,k,j){var H=this.display;r=Rr(this,vt(this.doc,r));var V=r.bottom,$=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),H.sizer.appendChild(i),k=="over")V=r.top;else if(k=="above"||k=="near"){var re=Math.max(H.wrapper.clientHeight,this.doc.height),he=Math.max(H.sizer.clientWidth,H.lineSpace.clientWidth);(k=="above"||r.bottom+i.offsetHeight>re)&&r.top>i.offsetHeight?V=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=re&&(V=r.bottom),$+i.offsetWidth>he&&($=he-i.offsetWidth)}i.style.top=V+"px",i.style.left=i.style.right="",j=="right"?($=H.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(j=="left"?$=0:j=="middle"&&($=(H.sizer.clientWidth-i.offsetWidth)/2),i.style.left=$+"px"),b&&Js(this,{left:$,top:V,right:$+i.offsetWidth,bottom:V+i.offsetHeight})},triggerOnKeyDown:sr(ms),triggerOnKeyPress:sr(gs),triggerOnKeyUp:ps,triggerOnMouseDown:sr(vs),execCommand:function(r){if(Ai.hasOwnProperty(r))return Ai[r].call(null,this)},triggerElectric:sr(function(r){Ss(this,r)}),findPosH:function(r,i,b,k){var j=1;i<0&&(j=-1,i=-i);for(var H=vt(this.doc,r),V=0;V<i&&!(H=za(this.doc,H,j,b,k),H.hitSide);++V);return H},moveH:sr(function(r,i){var b=this;this.extendSelectionsBy(function(k){return b.display.shift||b.doc.extend||k.empty()?za(b.doc,k.head,r,i,b.options.rtlMoveVisually):r<0?k.from():k.to()},me)}),deleteH:sr(function(r,i){var b=this.doc.sel,k=this.doc;b.somethingSelected()?k.replaceSelection("",null,"+delete"):jn(this,function(j){var H=za(k,j.head,r,i,!1);return r<0?{from:H,to:j.head}:{from:j.head,to:H}})}),findPosV:function(r,i,b,k){var j=1,H=k;i<0&&(j=-1,i=-i);for(var V=vt(this.doc,r),$=0;$<i;++$){var re=Rr(this,V,"div");if(H==null?H=re.left:re.left=H,V=Ls(this,re,j,b),V.hitSide)break}return V},moveV:sr(function(r,i){var b=this,k=this.doc,j=[],H=!this.display.shift&&!k.extend&&k.sel.somethingSelected();if(k.extendSelectionsBy(function($){if(H)return r<0?$.from():$.to();var re=Rr(b,$.head,"div");$.goalColumn!=null&&(re.left=$.goalColumn),j.push(re.left);var he=Ls(b,re,r,i);return i=="page"&&$==k.sel.primary()&&Ca(b,pa(b,he,"div").top-re.top),he},me),j.length)for(var V=0;V<k.sel.ranges.length;V++)k.sel.ranges[V].goalColumn=j[V]}),findWordAt:function(r){var i=this.doc,b=Ne(i,r.line).text,k=r.ch,j=r.ch;if(b){var H=this.getHelper(r,"wordChars");(r.sticky=="before"||j==b.length)&&k?--k:++j;for(var V=b.charAt(k),$=De(V,H)?function(re){return De(re,H)}:/\s/.test(V)?function(re){return/\s/.test(re)}:function(re){return!/\s/.test(re)&&!De(re)};k>0&&$(b.charAt(k-1));)--k;for(;j<b.length&&$(b.charAt(j));)++j}return new Mt(ke(r.line,k),ke(r.line,j))},toggleOverwrite:function(r){if(r!=null&&r==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?B(this.display.cursorDiv,"CodeMirror-overwrite"):f(this.display.cursorDiv,"CodeMirror-overwrite"),ye(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==O()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:sr(function(r,i){si(this,r,i)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-kr(this)-this.display.barHeight,width:r.scrollWidth-kr(this)-this.display.barWidth,clientHeight:fa(this),clientWidth:un(this)}},scrollIntoView:sr(function(r,i){r==null?(r={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof r=="number"?r={from:ke(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=i||0,r.from.line!=null?Zs(this,r):bo(this,r.from,r.to,r.margin)}),setSize:sr(function(r,i){var b=this,k=function(H){return typeof H=="number"||/^\d+$/.test(String(H))?H+"px":H};r!=null&&(this.display.wrapper.style.width=k(r)),i!=null&&(this.display.wrapper.style.height=k(i)),this.options.lineWrapping&&ao(this);var j=this.display.viewFrom;this.doc.iter(j,this.display.viewTo,function(H){if(H.widgets){for(var V=0;V<H.widgets.length;V++)if(H.widgets[V].noHScroll){Qr(b,j,"widget");break}}++j}),this.curOp.forceUpdate=!0,ye(this,"refresh",this)}),operation:function(r){return gr(this,r)},startOperation:function(){return pn(this)},endOperation:function(){return gn(this)},refresh:sr(function(){var r=this.display.cachedTextHeight;cr(this),this.curOp.forceUpdate=!0,ai(this),si(this,this.doc.scrollLeft,this.doc.scrollTop),La(this.display),(r==null||Math.abs(r-Rn(this.display))>.5||this.options.lineWrapping)&&xa(this),ye(this,"refresh",this)}),swapDoc:sr(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),ko(this,r),ai(this),this.display.input.reset(),si(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,er(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ae(e),e.registerHelper=function(r,i,b){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=b},e.registerGlobalHelper=function(r,i,b,k){e.registerHelper(r,i,k),n[r]._global.push({pred:b,val:k})}}function za(e,t,n,r,i){var b=t,k=n,j=Ne(e,t.line),H=i&&e.direction=="rtl"?-n:n;function V(){var et=t.line+H;return et<e.first||et>=e.first+e.size?!1:(t=new ke(et,t.ch,t.sticky),j=Ne(e,et))}function $(et){var He;if(r=="codepoint"){var nt=j.text.charCodeAt(t.ch+(r>0?0:-1));isNaN(nt)?He=null:He=new ke(t.line,Math.max(0,Math.min(j.text.length,t.ch+n*(nt>=55296&&nt<56320?2:1))),-n)}else i?He=kl(e.cm,j,t,n):He=Ba(j,t,n);if(He==null)if(!et&&V())t=Fa(i,e.cm,j,t.line,H);else return!1;else t=He;return!0}if(r=="char"||r=="codepoint")$();else if(r=="column")$(!0);else if(r=="word"||r=="group")for(var re=null,he=r=="group",ce=e.cm&&e.cm.getHelper(t,"wordChars"),Ae=!0;!(n<0&&!$(!Ae));Ae=!1){var Pe=j.text.charAt(t.ch)||`
|
|
`,Be=De(Pe,ce)?"w":he&&Pe==`
|
|
`?"n":!he||/\s/.test(Pe)?null:"p";if(he&&!Ae&&!Be&&(Be="s"),re&&re!=Be){n<0&&(n=1,$(),t.sticky="after");break}if(Be&&(re=Be),n>0&&!$(!Ae))break}var Ke=Ji(e,t,b,k,!0);return zn(b,Ke)&&(Ke.hitSide=!0),Ke}function Ls(e,t,n,r){var i=e.doc,b=t.left,k;if(r=="page"){var j=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),H=Math.max(j-.5*Rn(e.display),3);k=(n>0?t.bottom:t.top)+n*H}else r=="line"&&(k=n>0?t.bottom+3:t.top-3);for(var V;!(V=va(e,b,k),!V.outside);){if(n<0?k<=0:k>=i.height){V.hitSide=!0;break}k+=n*5}return V}var kt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};kt.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;ws(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function b(j){for(var H=j.target;H;H=H.parentNode){if(H==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(H.className))break}return!1}Ee(i,"paste",function(j){if(!b(j)||Me(r,j)||Ts(j,r))return;_<=11&&setTimeout(Jt(r,function(){return t.updateFromDOM()}),20)}),Ee(i,"compositionstart",function(j){t.composing={data:j.data,done:!1}}),Ee(i,"compositionupdate",function(j){t.composing||(t.composing={data:j.data,done:!1})}),Ee(i,"compositionend",function(j){t.composing&&(j.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ee(i,"touchstart",function(){return n.forceCompositionEnd()}),Ee(i,"input",function(){t.composing||t.readFromDOMSoon()});function k(j){if(!b(j)||Me(r,j))return;if(r.somethingSelected())ra({lineWise:!1,text:r.getSelections()}),j.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var H=Cs(r);ra({lineWise:!0,text:H.text}),j.type=="cut"&&r.operation(function(){r.setSelections(H.ranges,0,ge),r.replaceSelection("",null,"cut")})}else return;if(j.clipboardData){j.clipboardData.clearData();var V=Or.text.join(`
|
|
`);if(j.clipboardData.setData("Text",V),j.clipboardData.getData("Text")==V){j.preventDefault();return}}var $=Ds(),re=$.firstChild;r.display.lineSpace.insertBefore($,r.display.lineSpace.firstChild),re.value=Or.text.join(`
|
|
`);var he=document.activeElement;Q(re),setTimeout(function(){r.display.lineSpace.removeChild($),he.focus(),he==i&&n.showPrimarySelection()},50)}Ee(i,"copy",k),Ee(i,"cut",k)},kt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},kt.prototype.prepareSelection=function(){var e=po(this.cm,!1);return e.focus=document.activeElement==this.div,e},kt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},kt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},kt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var b=na(t,e.anchorNode,e.anchorOffset),k=na(t,e.focusNode,e.focusOffset);if(b&&!b.bad&&k&&!k.bad&&mt(rn(b,k),r)==0&&mt(bn(b,k),i)==0)return;var j=t.display.view,H=r.line>=t.display.viewFrom&&Rs(t,r)||{node:j[0].measure.map[2],offset:0},V=i.line<t.display.viewTo&&Rs(t,i);if(!V){var $=j[j.length-1].measure,re=$.maps?$.maps[$.maps.length-1]:$.map;V={node:re[re.length-1],offset:re[re.length-2]-re[re.length-3]}}if(!H||!V){e.removeAllRanges();return}var he=e.rangeCount&&e.getRangeAt(0),ce;try{ce=p(H.node,H.offset,V.offset,V.node)}catch(Ae){}ce&&(!D&&t.state.focused?(e.collapse(H.node,H.offset),ce.collapsed||(e.removeAllRanges(),e.addRange(ce))):(e.removeAllRanges(),e.addRange(ce)),he&&e.anchorNode==null?e.addRange(he):D&&this.startGracePeriod()),this.rememberSelection()},kt.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},kt.prototype.showMultipleSelections=function(e){s(this.cm.display.cursorDiv,e.cursors),s(this.cm.display.selectionDiv,e.selection)},kt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},kt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return E(this.div,t)},kt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},kt.prototype.blur=function(){this.div.blur()},kt.prototype.getField=function(){return this.div},kt.prototype.supportsTouch=function(){return!0},kt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():gr(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},kt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},kt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(d&&v&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var n=na(t,e.anchorNode,e.anchorOffset),r=na(t,e.focusNode,e.focusOffset);n&&r&&gr(t,function(){ir(t.doc,Yr(n,r),ge),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})},kt.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=ke(r.line-1,Ne(e.doc,r.line-1).length)),i.ch==Ne(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=ke(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var b,k,j;r.line==t.viewFrom||(b=fn(e,r.line))==0?(k=Ct(t.view[0].line),j=t.view[0].node):(k=Ct(t.view[b].line),j=t.view[b-1].node.nextSibling);var H=fn(e,i.line),V,$;if(H==t.view.length-1?(V=t.viewTo-1,$=t.lineDiv.lastChild):(V=Ct(t.view[H+1].line)-1,$=t.view[H+1].node.previousSibling),!j)return!1;for(var re=e.doc.splitLines(tu(e,j,$,k,V)),he=_t(e.doc,ke(k,0),ke(V,Ne(e.doc,V).text.length));re.length>1&&he.length>1;)if(be(re)==be(he))re.pop(),he.pop(),V--;else if(re[0]==he[0])re.shift(),he.shift(),k++;else break;for(var ce=0,Ae=0,Pe=re[0],Be=he[0],Ke=Math.min(Pe.length,Be.length);ce<Ke&&Pe.charCodeAt(ce)==Be.charCodeAt(ce);)++ce;for(var et=be(re),He=be(he),nt=Math.min(et.length-(re.length==1?ce:0),He.length-(he.length==1?ce:0));Ae<nt&&et.charCodeAt(et.length-Ae-1)==He.charCodeAt(He.length-Ae-1);)++Ae;if(re.length==1&&he.length==1&&k==r.line)for(;ce&&ce>r.ch&&et.charCodeAt(et.length-Ae-1)==He.charCodeAt(He.length-Ae-1);)ce--,Ae++;re[re.length-1]=et.slice(0,et.length-Ae).replace(/^\u200b+/,""),re[0]=re[0].slice(ce).replace(/\u200b+$/,"");var ct=ke(k,ce),lt=ke(V,he.length?be(he).length-Ae:0);if(re.length>1||re[0]||mt(ct,lt))return Un(e.doc,re,ct,lt,"+input"),!0},kt.prototype.ensurePolled=function(){this.forceCompositionEnd()},kt.prototype.reset=function(){this.forceCompositionEnd()},kt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},kt.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},kt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&gr(this.cm,function(){return cr(e.cm)})},kt.prototype.setUneditable=function(e){e.contentEditable="false"},kt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Jt(this.cm,Ga)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},kt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},kt.prototype.onContextMenu=function(){},kt.prototype.resetPosition=function(){},kt.prototype.needsContentAttribute=!0;function Rs(e,t){var n=ha(e,t.line);if(!n||n.hidden)return null;var r=Ne(e.doc,t.line),i=eo(n,r,t.line),b=Ze(r,e.doc.direction),k="left";if(b){var j=Fe(b,t.ch);k=j%2?"right":"left"}var H=no(i.map,t.ch,k);return H.offset=H.collapse=="right"?H.end:H.start,H}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Kn(e,t){return t&&(e.bad=!0),e}function tu(e,t,n,r,i){var b="",k=!1,j=e.doc.lineSeparator(),H=!1;function V(ce){return function(Ae){return Ae.id==ce}}function $(){k&&(b+=j,H&&(b+=j),k=H=!1)}function re(ce){ce&&($(),b+=ce)}function he(ce){if(ce.nodeType==1){var Ae=ce.getAttribute("cm-text");if(Ae){re(Ae);return}var Pe=ce.getAttribute("cm-marker"),Be;if(Pe){var Ke=e.findMarks(ke(r,0),ke(i+1,0),V(+Pe));Ke.length&&(Be=Ke[0].find(0))&&re(_t(e.doc,Be.from,Be.to).join(j));return}if(ce.getAttribute("contenteditable")=="false")return;var et=/^(pre|div|p|li|table|br)$/i.test(ce.nodeName);if(!/^br$/i.test(ce.nodeName)&&ce.textContent.length==0)return;et&&$();for(var He=0;He<ce.childNodes.length;He++)he(ce.childNodes[He]);/^(pre|p)$/i.test(ce.nodeName)&&(H=!0),et&&(k=!0)}else ce.nodeType==3&&re(ce.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(he(t),t==n);)t=t.nextSibling,H=!1;return b}function na(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return Kn(e.clipPos(ke(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var b=e.display.view[i];if(b.node==r)return ru(b,t,n)}}function ru(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!E(r,t))return Kn(ke(Ct(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var b=e.rest?be(e.rest):e.line;return Kn(ke(Ct(b),b.text.length),i)}var k=t.nodeType==3?t:null,j=t;for(!k&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(k=t.firstChild,n&&(n=k.nodeValue.length));j.parentNode!=r;)j=j.parentNode;var H=e.measure,V=H.maps;function $(Be,Ke,et){for(var He=-1;He<(V?V.length:0);He++)for(var nt=He<0?H.map:V[He],ct=0;ct<nt.length;ct+=3){var lt=nt[ct+2];if(lt==Be||lt==Ke){var Et=Ct(He<0?e.line:e.rest[He]),Ut=nt[ct]+et;return(et<0||lt!=Be)&&(Ut=nt[ct+(et?1:0)]),ke(Et,Ut)}}}var re=$(k,j,n);if(re)return Kn(re,i);for(var he=j.nextSibling,ce=k?k.nodeValue.length-n:0;he;he=he.nextSibling){if(re=$(he,he.firstChild,0),re)return Kn(ke(re.line,re.ch-ce),i);ce+=he.textContent.length}for(var Ae=j.previousSibling,Pe=n;Ae;Ae=Ae.previousSibling){if(re=$(Ae,Ae.firstChild,-1),re)return Kn(ke(re.line,re.ch+Pe),i);Pe+=Ae.textContent.length}}var Gt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ee,this.hasSelection=!1,this.composing=null};Gt.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),x&&(i.style.width="0px"),Ee(i,"input",function(){U&&_>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),Ee(i,"paste",function(k){if(Me(r,k)||Ts(k,r))return;r.state.pasteIncoming=+new Date,n.fastPoll()});function b(k){if(Me(r,k))return;if(r.somethingSelected())ra({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var j=Cs(r);ra({lineWise:!0,text:j.text}),k.type=="cut"?r.setSelections(j.ranges,null,ge):(n.prevInput="",i.value=j.text.join(`
|
|
`),Q(i))}else return;k.type=="cut"&&(r.state.cutIncoming=+new Date)}Ee(i,"cut",b),Ee(i,"copy",b),Ee(e.scroller,"paste",function(k){if(Wr(e,k)||Me(r,k))return;if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var j=new Event("paste");j.clipboardData=k.clipboardData,i.dispatchEvent(j)}),Ee(e.lineSpace,"selectstart",function(k){Wr(e,k)||Y(k)}),Ee(i,"compositionstart",function(){var k=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:k,range:r.markText(k,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ee(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Gt.prototype.createField=function(e){this.wrapper=Ds(),this.textarea=this.wrapper.firstChild},Gt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Gt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=po(e);if(e.options.moveInputWithCursor){var i=Rr(e,n.sel.primary().head,"div"),b=t.wrapper.getBoundingClientRect(),k=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+k.top-b.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+k.left-b.left))}return r},Gt.prototype.showSelection=function(e){var t=this.cm,n=t.display;s(n.cursorDiv,e.cursors),s(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Gt.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Q(this.textarea),U&&_>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",U&&_>=9&&(this.hasSelection=null))},Gt.prototype.getField=function(){return this.textarea},Gt.prototype.supportsTouch=function(){return!1},Gt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!o||O()!=this.textarea))try{this.textarea.focus()}catch(e){}},Gt.prototype.blur=function(){this.textarea.blur()},Gt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Gt.prototype.receivedFocus=function(){this.slowPoll()},Gt.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Gt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},Gt.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||ot(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(U&&_>=9&&this.hasSelection===i||l&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var b=i.charCodeAt(0);if(b==8203&&!r&&(r="\u200B"),b==8666)return this.reset(),this.cm.execCommand("undo")}for(var k=0,j=Math.min(r.length,i.length);k<j&&r.charCodeAt(k)==i.charCodeAt(k);)++k;return gr(t,function(){Ga(t,i.slice(k),r.length-k,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
|
`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Gt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Gt.prototype.onKeyPress=function(){U&&_>=9&&(this.hasSelection=null),this.fastPoll()},Gt.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var b=cn(n,e),k=r.scroller.scrollTop;if(!b||S)return;var j=n.options.resetSelectionOnContextMenu;j&&n.doc.sel.contains(b)==-1&&Jt(n,ir)(n.doc,Yr(b),ge);var H=i.style.cssText,V=t.wrapper.style.cssText,$=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-$.top-5)+"px; left: "+(e.clientX-$.left-5)+`px;
|
|
z-index: 1000; background: `+(U?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var re;I&&(re=window.scrollY),r.input.focus(),I&&window.scrollTo(null,re),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=ce,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function he(){if(i.selectionStart!=null){var Pe=n.somethingSelected(),Be="\u200B"+(Pe?i.value:"");i.value="\u21DA",i.value=Be,t.prevInput=Pe?"":"\u200B",i.selectionStart=1,i.selectionEnd=Be.length,r.selForContextMenu=n.doc.sel}}function ce(){if(t.contextMenuPending!=ce)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=V,i.style.cssText=H,U&&_<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=k),i.selectionStart!=null){(!U||U&&_<9)&&he();var Pe=0,Be=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Jt(n,Qo)(n):Pe++<10?r.detectingSelectAll=setTimeout(Be,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(Be,200)}}if(U&&_>=9&&he(),w){te(e);var Ae=function(){Qe(window,"mouseup",Ae),setTimeout(ce,20)};Ee(window,"mouseup",Ae)}else setTimeout(ce,50)},Gt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Gt.prototype.setUneditable=function(){},Gt.prototype.needsContentAttribute=!1;function nu(e,t){if(t=t?N(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=O();t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=j.getValue()}var i;if(e.form&&(Ee(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var b=e.form;i=b.submit;try{var k=b.submit=function(){r(),b.submit=i,b.submit(),b.submit=k}}catch(H){}}t.finishInit=function(H){H.save=r,H.getTextArea=function(){return e},H.toTextArea=function(){H.toTextArea=isNaN,r(),e.parentNode.removeChild(H.getWrapperElement()),e.style.display="",e.form&&(Qe(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var j=jt(function(H){return e.parentNode.insertBefore(H,e.nextSibling)},t);return j}function iu(e){e.off=Qe,e.on=Ee,e.wheelEventPixels=cl,e.Doc=fr,e.splitLines=ft,e.countColumn=X,e.findColumn=pe,e.isWordChar=Re,e.Pass=Ce,e.signal=ye,e.Line=ln,e.changeEnd=Jr,e.scrollbarModel=To,e.Pos=ke,e.cmpPos=mt,e.modes=At,e.mimeModes=dt,e.resolveMode=It,e.getMode=Ft,e.modeExtensions=rr,e.extendMode=Mr,e.copyState=xr,e.startState=Bt,e.innerMode=tn,e.commands=Ai,e.keyMap=Kr,e.keyName=us,e.isModifierKey=ss,e.lookupKey=Fn,e.normalizeKeyMap=Pl,e.StringStream=ht,e.SharedTextMarker=Ei,e.TextMarker=qr,e.LineWidget=yi,e.e_preventDefault=Y,e.e_stopPropagation=J,e.e_stop=te,e.addClass=B,e.contains=E,e.rmClass=f,e.keyNames=$r}Yl(jt),$l(jt);var au="iter insert remove copy getEditor constructor".split(" ");for(var ia in fr.prototype)fr.prototype.hasOwnProperty(ia)&&oe(au,ia)<0&&(jt.prototype[ia]=function(e){return function(){return e.apply(this.doc,arguments)}}(fr.prototype[ia]));return ae(fr),jt.inputStyles={textarea:Gt,contenteditable:kt},jt.defineMode=function(e){!jt.defaults.mode&&e!="null"&&(jt.defaults.mode=e),bt.apply(this,arguments)},jt.defineMIME=Rt,jt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),jt.defineMIME("text/plain","null"),jt.defineExtension=function(e,t){jt.prototype[e]=t},jt.defineDocExtension=function(e,t){fr.prototype[e]=t},jt.fromTextArea=nu,iu(jt),jt.version="5.58.2",jt})},W6BS:function(we,xe){we.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAVs0lEQVRoQ+2aa6xlZ3nff++677Xv+9zPHM/YHo+xwQ4E14GKKESkiFsSM8bYQBIEkaBEAkqbRmo/9FulSoX2Qz9GVVQJqUJBhKKA1KRJCIlowwdDDDa+jOd65syc275f1v1d1fOufYYE2ZhJZKRWXjOjvffaa6/1/p//8/yfyzuqLMuS/48P9RrA/8fZfY3B2yXQBHQpf185tBUK+SvH8uV2H/eK1/+jGfwRIBC5ks/Vq/yplq2Wqz+B/ONg5LNlrlz+Qhnot373iih+wgX/YIAivrJgjTKA9BKcYa/Uy/MnUEpD0S2AyzdKkMslZYklbwVYWZpXQSygrSVoc+4fcPzUAKtsom4xpIGiLCkMZbJGs1LkvOHPfJbrhRX5/CM/NDwJZlXiqBKlc7AEjg1aI2iVDXZpoeS9AFXlkmV1W8z+VACLE7dbMiWLE2CFADLgqig6SakCSs4jizcvAvBHMVkqxxhKkePqAs8S1mxyLUxqw6AYKLdtbMtGINpiKKUM07bc96dk9BUBykIFoNYVC/JewMkCDDh18p0so6w+GzfT+FoWC7Yl11curQpFVCoyJQsvDThP6crNdVldi0KLcwogyzJG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R5FMKvWBz/QyN2gqqsEjTBE1q7iU5znZsfN83i2+32zSbTXq9HisrK6yurtJoNH4ympf49rYAvhzL1b5JSZqmZqGTyZT+4Jj+cd+4+mg4Yh7F5Kk0xqK4Jb7rVP87w1KGpU6nR6vVNMAEkPzrdDqGxX/McVsAb/dBsh0mKWgxnzMajxgOhhwf9+n3j5nNZ7RbbbrdrgElYE5Aua57u4962etfNYAvx7YISJIkxrXFxdvtlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},Xsq0:function(we,xe,z){we.exports=z.p+"static/mainbanner.0a951716.jpg"},Y1PL:function(we,xe,z){"use strict";z.r(xe),z.d(xe,"ResizableTextArea",function(){return oe});var q=z("wx14"),G=z("1OyB"),D=z("vuIU"),K=z("Ji7U"),P=z("LK+K"),M=z("cDcd"),U=z("VTBJ"),_=z("rePB"),I=z("Zm9Q"),R=z("Kwbf"),v=z("c+Xe"),S=z("m+aA"),L=z("bdgK"),C=new Map;function A(ge){ge.forEach(function(fe){var me,pe=fe.target;(me=C.get(pe))===null||me===void 0||me.forEach(function(ie){return ie(pe)})})}var x=new L.default(A),d=null,o=null;function l(ge,fe){C.has(ge)||(C.set(ge,new Set),x.observe(ge)),C.get(ge).add(fe)}function u(ge,fe){C.has(ge)&&(C.get(ge).delete(fe),C.get(ge).size||(x.unobserve(ge),C.delete(ge)))}var T=function(ge){Object(K.a)(me,ge);var fe=Object(P.a)(me);function me(){return Object(G.a)(this,me),fe.apply(this,arguments)}return Object(D.a)(me,[{key:"render",value:function(){return this.props.children}}]),me}(M.Component),m=M.createContext(null);function h(ge){var fe=ge.children,me=ge.onBatchResize,pe=M.useRef(0),ie=M.useRef([]),ue=M.useContext(m),be=M.useCallback(function(_e,Oe,We){pe.current+=1;var Ve=pe.current;ie.current.push({size:_e,element:Oe,data:We}),Promise.resolve().then(function(){Ve===pe.current&&(me==null||me(ie.current),ie.current=[])}),ue==null||ue(_e,Oe,We)},[me,ue]);return M.createElement(m.Provider,{value:be},fe)}function w(ge){var fe=ge.children,me=ge.disabled,pe=M.useRef(null),ie=M.useRef(null),ue=M.useContext(m),be=M.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),_e=M.isValidElement(fe)&&Object(v.c)(fe),Oe=_e?fe.ref:null,We=M.useMemo(function(){return Object(v.a)(Oe,pe)},[Oe,pe]),Ve=M.useRef(ge);Ve.current=ge;var Le=M.useCallback(function(Re){var De=Ve.current,Ge=De.onResize,ze=De.data,Te=Re.getBoundingClientRect(),Ie=Te.width,Ye=Te.height,qe=Re.offsetWidth,je=Re.offsetHeight,Fe=Math.floor(Ie),rt=Math.floor(Ye);if(be.current.width!==Fe||be.current.height!==rt||be.current.offsetWidth!==qe||be.current.offsetHeight!==je){var Ze={width:Fe,height:rt,offsetWidth:qe,offsetHeight:je};be.current=Ze;var Je=qe===Math.round(Ie)?Ie:qe,Ee=je===Math.round(Ye)?Ye:je,$e=Object(U.a)(Object(U.a)({},Ze),{},{offsetWidth:Je,offsetHeight:Ee});ue==null||ue($e,Re,ze),Ge&&Promise.resolve().then(function(){Ge($e,Re)})}},[]);return M.useEffect(function(){var Re=Object(S.a)(pe.current)||Object(S.a)(ie.current);return Re&&!me&&l(Re,Le),function(){return u(Re,Le)}},[pe.current,me]),M.createElement(T,{ref:ie},_e?M.cloneElement(fe,{ref:We}):fe)}var y="rc-observer-key";function f(ge){var fe=ge.children,me=Object(I.a)(fe);return me.map(function(pe,ie){var ue=(pe==null?void 0:pe.key)||"".concat(y,"-").concat(ie);return M.createElement(w,Object(q.a)({},ge,{key:ue}),pe)})}f.Collection=h;var c=f,s=z("bT9E"),a=z("TSYQ"),g=z.n(a),p=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important
|
|
`,E=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],O={},B;function W(ge){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,me=ge.getAttribute("id")||ge.getAttribute("data-reactid")||ge.getAttribute("name");if(fe&&O[me])return O[me];var pe=window.getComputedStyle(ge),ie=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),be=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),_e=E.map(function(We){return"".concat(We,":").concat(pe.getPropertyValue(We))}).join(";"),Oe={sizingStyle:_e,paddingSize:ue,borderSize:be,boxSizing:ie};return fe&&me&&(O[me]=Oe),Oe}function Q(ge){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;B||(B=document.createElement("textarea"),B.setAttribute("tab-index","-1"),B.setAttribute("aria-hidden","true"),document.body.appendChild(B)),ge.getAttribute("wrap")?B.setAttribute("wrap",ge.getAttribute("wrap")):B.removeAttribute("wrap");var ie=W(ge,fe),ue=ie.paddingSize,be=ie.borderSize,_e=ie.boxSizing,Oe=ie.sizingStyle;B.setAttribute("style","".concat(Oe,";").concat(p)),B.value=ge.value||ge.placeholder||"";var We=Number.MIN_SAFE_INTEGER,Ve=Number.MAX_SAFE_INTEGER,Le=B.scrollHeight,Re;if(_e==="border-box"?Le+=be:_e==="content-box"&&(Le-=ue),me!==null||pe!==null){B.value=" ";var De=B.scrollHeight-ue;me!==null&&(We=De*me,_e==="border-box"&&(We=We+ue+be),Le=Math.max(We,Le)),pe!==null&&(Ve=De*pe,_e==="border-box"&&(Ve=Ve+ue+be),Re=Le>Ve?"":"hidden",Le=Math.min(Ve,Le))}return{height:Le,minHeight:We,maxHeight:Ve,overflowY:Re,resize:"none"}}var F=z("Gytx"),N=z.n(F),X;(function(ge){ge[ge.NONE=0]="NONE",ge[ge.RESIZING=1]="RESIZING",ge[ge.RESIZED=2]="RESIZED"})(X||(X={}));var ee=function(ge){Object(K.a)(me,ge);var fe=Object(P.a)(me);function me(pe){var ie;return Object(G.a)(this,me),ie=fe.call(this,pe),ie.nextFrameActionId=void 0,ie.resizeFrameId=void 0,ie.textArea=void 0,ie.saveTextArea=function(ue){ie.textArea=ue},ie.handleResize=function(ue){var be=ie.state.resizeStatus,_e=ie.props,Oe=_e.autoSize,We=_e.onResize;if(be!==X.NONE)return;typeof We=="function"&&We(ue),Oe&&ie.resizeOnNextFrame()},ie.resizeOnNextFrame=function(){cancelAnimationFrame(ie.nextFrameActionId),ie.nextFrameActionId=requestAnimationFrame(ie.resizeTextarea)},ie.resizeTextarea=function(){var ue=ie.props.autoSize;if(!ue||!ie.textArea)return;var be=ue.minRows,_e=ue.maxRows,Oe=Q(ie.textArea,!1,be,_e);ie.setState({textareaStyles:Oe,resizeStatus:X.RESIZING},function(){cancelAnimationFrame(ie.resizeFrameId),ie.resizeFrameId=requestAnimationFrame(function(){ie.setState({resizeStatus:X.RESIZED},function(){ie.resizeFrameId=requestAnimationFrame(function(){ie.setState({resizeStatus:X.NONE}),ie.fixFirefoxAutoScroll()})})})})},ie.renderTextArea=function(){var ue=ie.props,be=ue.prefixCls,_e=be===void 0?"rc-textarea":be,Oe=ue.autoSize,We=ue.onResize,Ve=ue.className,Le=ue.disabled,Re=ie.state,De=Re.textareaStyles,Ge=Re.resizeStatus,ze=Object(s.a)(ie.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Te=g()(_e,Ve,Object(_.a)({},"".concat(_e,"-disabled"),Le));"value"in ze&&(ze.value=ze.value||"");var Ie=Object(U.a)(Object(U.a)(Object(U.a)({},ie.props.style),De),Ge===X.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return M.createElement(c,{onResize:ie.handleResize,disabled:!(Oe||We)},M.createElement("textarea",Object(q.a)({},ze,{className:Te,style:Ie,ref:ie.saveTextArea})))},ie.state={textareaStyles:{},resizeStatus:X.NONE},ie}return Object(D.a)(me,[{key:"componentDidUpdate",value:function(ie){(ie.value!==this.props.value||!N()(ie.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var ie=this.textArea.selectionStart,ue=this.textArea.selectionEnd;this.textArea.setSelectionRange(ie,ue)}}catch(be){}}},{key:"render",value:function(){return this.renderTextArea()}}]),me}(M.Component),oe=ee,de=function(ge){Object(K.a)(me,ge);var fe=Object(P.a)(me);function me(pe){var ie;Object(G.a)(this,me),ie=fe.call(this,pe),ie.resizableTextArea=void 0,ie.focus=function(){ie.resizableTextArea.textArea.focus()},ie.saveTextArea=function(be){ie.resizableTextArea=be},ie.handleChange=function(be){var _e=ie.props.onChange;ie.setValue(be.target.value,function(){ie.resizableTextArea.resizeTextarea()}),_e&&_e(be)},ie.handleKeyDown=function(be){var _e=ie.props,Oe=_e.onPressEnter,We=_e.onKeyDown;be.keyCode===13&&Oe&&Oe(be),We&&We(be)};var ue=typeof pe.value=="undefined"||pe.value===null?pe.defaultValue:pe.value;return ie.state={value:ue},ie}return Object(D.a)(me,[{key:"setValue",value:function(ie,ue){"value"in this.props||this.setState({value:ie},ue)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return M.createElement(oe,Object(q.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ie){return"value"in ie?{value:ie.value}:null}}]),me}(M.Component),Ce=xe.default=de},ZpRC:function(we,xe,z){"use strict";function q(v){return typeof v=="object"&&v!=null&&v.nodeType===1}function G(v,S){return(!S||v!=="hidden")&&v!=="visible"&&v!=="clip"}function D(v,S){if(v.clientHeight<v.scrollHeight||v.clientWidth<v.scrollWidth){var L=getComputedStyle(v,null);return G(L.overflowY,S)||G(L.overflowX,S)||function(C){var A=function(x){if(!x.ownerDocument||!x.ownerDocument.defaultView)return null;try{return x.ownerDocument.defaultView.frameElement}catch(d){return null}}(C);return!!A&&(A.clientHeight<C.scrollHeight||A.clientWidth<C.scrollWidth)}(v)}return!1}function K(v,S,L,C,A,x,d,o){return x<v&&d>S||x>v&&d<S?0:x<=v&&o<=L||d>=S&&o>=L?x-v-C:d>S&&o<L||x<v&&o>L?d-S+A:0}var P=function(v,S){var L=window,C=S.scrollMode,A=S.block,x=S.inline,d=S.boundary,o=S.skipOverflowHiddenElements,l=typeof d=="function"?d:function(De){return De!==d};if(!q(v))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,T=[],m=v;q(m)&&l(m);){if((m=m.parentElement)===u){T.push(m);break}m!=null&&m===document.body&&D(m)&&!D(document.documentElement)||m!=null&&D(m,o)&&T.push(m)}for(var h=L.visualViewport?L.visualViewport.width:innerWidth,w=L.visualViewport?L.visualViewport.height:innerHeight,y=window.scrollX||pageXOffset,f=window.scrollY||pageYOffset,c=v.getBoundingClientRect(),s=c.height,a=c.width,g=c.top,p=c.right,E=c.bottom,O=c.left,B=A==="start"||A==="nearest"?g:A==="end"?E:g+s/2,W=x==="center"?O+a/2:x==="end"?p:O,Q=[],F=0;F<T.length;F++){var N=T[F],X=N.getBoundingClientRect(),ee=X.height,oe=X.width,de=X.top,Ce=X.right,ge=X.bottom,fe=X.left;if(C==="if-needed"&&g>=0&&O>=0&&E<=w&&p<=h&&g>=de&&E<=ge&&O>=fe&&p<=Ce)return Q;var me=getComputedStyle(N),pe=parseInt(me.borderLeftWidth,10),ie=parseInt(me.borderTopWidth,10),ue=parseInt(me.borderRightWidth,10),be=parseInt(me.borderBottomWidth,10),_e=0,Oe=0,We="offsetWidth"in N?N.offsetWidth-N.clientWidth-pe-ue:0,Ve="offsetHeight"in N?N.offsetHeight-N.clientHeight-ie-be:0;if(u===N)_e=A==="start"?B:A==="end"?B-w:A==="nearest"?K(f,f+w,w,ie,be,f+B,f+B+s,s):B-w/2,Oe=x==="start"?W:x==="center"?W-h/2:x==="end"?W-h:K(y,y+h,h,pe,ue,y+W,y+W+a,a),_e=Math.max(0,_e+f),Oe=Math.max(0,Oe+y);else{_e=A==="start"?B-de-ie:A==="end"?B-ge+be+Ve:A==="nearest"?K(de,ge,ee,ie,be+Ve,B,B+s,s):B-(de+ee/2)+Ve/2,Oe=x==="start"?W-fe-pe:x==="center"?W-(fe+oe/2)+We/2:x==="end"?W-Ce+ue+We:K(fe,Ce,oe,pe,ue+We,W,W+a,a);var Le=N.scrollLeft,Re=N.scrollTop;B+=Re-(_e=Math.max(0,Math.min(Re+_e,N.scrollHeight-ee+Ve))),W+=Le-(Oe=Math.max(0,Math.min(Le+Oe,N.scrollWidth-oe+We)))}Q.push({el:N,top:_e,left:Oe})}return Q};function M(v){return v===Object(v)&&Object.keys(v).length!==0}function U(v,S){S===void 0&&(S="auto");var L="scrollBehavior"in document.body.style;v.forEach(function(C){var A=C.el,x=C.top,d=C.left;A.scroll&&L?A.scroll({top:x,left:d,behavior:S}):(A.scrollTop=x,A.scrollLeft=d)})}function _(v){return v===!1?{block:"end",inline:"nearest"}:M(v)?v:{block:"start",inline:"nearest"}}function I(v,S){var L=!v.ownerDocument.documentElement.contains(v);if(M(S)&&typeof S.behavior=="function")return S.behavior(L?[]:P(v,S));if(L)return;var C=_(S);return U(P(v,C),C.behavior)}var R=xe.a=I},bT9E:function(we,xe,z){"use strict";z.d(xe,"a",function(){return G});var q=z("VTBJ");function G(D,K){var P=Object(q.a)({},D);return Array.isArray(K)&&K.forEach(function(M){delete P[M]}),P}},c5Ni:function(we,xe,z){},cRFk:function(we,xe,z){we.exports=z.p+"static/RepositoryNoneData.828085a8.png"},csWT:function(we,xe,z){we.exports=z.p+"static/choose.4ad1045f.svg"},dejd:function(we,xe,z){},djh8:function(we,xe,z){we.exports=z.p+"static/qrCode.42927872.png"},dmUQ:function(we,xe,z){"use strict";var q=z("Ff2n"),G=z("rePB"),D=z("1OyB"),K=z("vuIU"),P=z("Ji7U"),M=z("md7G"),U=z("foSv"),_=z("cDcd"),I=z.n(_),R=z("TSYQ"),v=z.n(R),S=z("4IlW");function L(s,a){var g=Object.keys(s);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(s);a&&(p=p.filter(function(E){return Object.getOwnPropertyDescriptor(s,E).enumerable})),g.push.apply(g,p)}return g}function C(s){for(var a=1;a<arguments.length;a++){var g=arguments[a]!=null?arguments[a]:{};a%2?L(Object(g),!0).forEach(function(p){Object(G.a)(s,p,g[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(g)):L(Object(g)).forEach(function(p){Object.defineProperty(s,p,Object.getOwnPropertyDescriptor(g,p))})}return s}function A(s){var a=x();return function(){var p=Object(U.a)(s),E;if(a){var O=Object(U.a)(this).constructor;E=Reflect.construct(p,arguments,O)}else E=p.apply(this,arguments);return Object(M.a)(this,E)}}function x(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(s){return!1}}function d(){}function o(s){s.preventDefault()}var l=function(a){return a.replace(/[^\w.-]+/g,"")},u=200,T=600,m=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,h=function(a){return a!=null},w=function(a,g){return g===a||typeof g=="number"&&typeof a=="number"&&isNaN(g)&&isNaN(a)},y=function(s){Object(P.a)(g,s);var a=A(g);function g(p){var E;Object(D.a)(this,g),E=a.call(this,p),E.onKeyDown=function(W){var Q=E.props,F=Q.onKeyDown,N=Q.onPressEnter;if(W.keyCode===S.a.UP){var X=E.getRatio(W);E.up(W,X,null),E.stop()}else if(W.keyCode===S.a.DOWN){var ee=E.getRatio(W);E.down(W,ee,null),E.stop()}else W.keyCode===S.a.ENTER&&N&&N(W);if(E.recordCursorPosition(),E.lastKeyCode=W.keyCode,F){for(var oe=arguments.length,de=new Array(oe>1?oe-1:0),Ce=1;Ce<oe;Ce++)de[Ce-1]=arguments[Ce];F.apply(void 0,[W].concat(de))}},E.onKeyUp=function(W){var Q=E.props.onKeyUp;if(E.stop(),E.recordCursorPosition(),Q){for(var F=arguments.length,N=new Array(F>1?F-1:0),X=1;X<F;X++)N[X-1]=arguments[X];Q.apply(void 0,[W].concat(N))}},E.onChange=function(W){var Q=E.props.onChange;E.state.focused&&(E.inputting=!0),E.rawInput=E.props.parser(E.getValueFromEvent(W)),E.setState({inputValue:E.rawInput}),Q(E.toNumber(E.rawInput))},E.onMouseUp=function(){var W=E.props.onMouseUp;E.recordCursorPosition(),W&&W.apply(void 0,arguments)},E.onFocus=function(){var W;E.setState({focused:!0}),(W=E.props).onFocus.apply(W,arguments)},E.onBlur=function(){var W=E.props.onBlur;E.inputting=!1,E.setState({focused:!1});var Q=E.getCurrentValidValue(E.state.inputValue),F=E.setValue(Q,d);if(W){var N=E.input.value,X=E.getInputDisplayValue({focus:!1,value:F});E.input.value=X&&Number(X),W.apply(void 0,arguments),E.input.value=N}},E.getRatio=function(W){var Q=1;return W.metaKey||W.ctrlKey?Q=.1:W.shiftKey&&(Q=10),Q},E.getFullNum=function(W){return isNaN(W)?W:/e/i.test(String(W))?Number(W).toFixed(18).replace(/\.?0+$/,""):W},E.getPrecision=function(W){if(h(E.props.precision))return E.props.precision;var Q=String(W);if(Q.indexOf("e-")>=0)return parseInt(Q.slice(Q.indexOf("e-")+2),10);var F=0;return Q.indexOf(".")>=0&&(F=Q.length-Q.indexOf(".")-1),F},E.getInputDisplayValue=function(W){var Q=W||E.state,F=Q.focused,N=Q.inputValue,X=Q.value,ee;F?ee=N:ee=E.toPrecisionAsStep(X),ee==null&&(ee="");var oe=E.formatWrapper(ee);return h(E.props.decimalSeparator)&&(oe=oe.toString().replace(".",E.props.decimalSeparator)),oe},E.recordCursorPosition=function(){try{E.cursorStart=E.input.selectionStart,E.cursorEnd=E.input.selectionEnd,E.currentValue=E.input.value,E.cursorBefore=E.input.value.substring(0,E.cursorStart),E.cursorAfter=E.input.value.substring(E.cursorEnd)}catch(W){}},E.restoreByAfter=function(W){if(W===void 0)return!1;var Q=E.input.value,F=Q.lastIndexOf(W);if(F===-1)return!1;var N=E.cursorBefore.length;return E.lastKeyCode===S.a.DELETE&&E.cursorBefore.charAt(N-1)===W[0]?(E.fixCaret(N,N),!0):F+W.length===Q.length?(E.fixCaret(F,F),!0):!1},E.partRestoreByAfter=function(W){return W===void 0?!1:Array.prototype.some.call(W,function(Q,F){var N=W.substring(F);return E.restoreByAfter(N)})},E.isNotCompleteNumber=function(W){return isNaN(W)||W===""||W===null||W&&W.toString().indexOf(".")===W.toString().length-1},E.stop=function(){E.autoStepTimer&&clearTimeout(E.autoStepTimer)},E.down=function(W,Q,F){E.pressingUpOrDown=!0,E.step("down",W,Q,F)},E.up=function(W,Q,F){E.pressingUpOrDown=!0,E.step("up",W,Q,F)},E.saveInput=function(W){E.input=W};var O=p.value;O===void 0&&(O=p.defaultValue),E.state={focused:p.autoFocus};var B=E.getValidValue(E.toNumber(O));return E.state=C(C({},E.state),{},{inputValue:E.toPrecisionAsStep(B),value:B}),E}return Object(K.a)(g,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(E){var O=this.props,B=O.value,W=O.onChange,Q=O.max,F=O.min,N=this.state.focused;if(E){if(!w(E.value,B)||!w(E.max,Q)||!w(E.min,F)){var X=N?B:this.getValidValue(B),ee;this.pressingUpOrDown?ee=X:this.inputting?ee=this.rawInput:ee=this.toPrecisionAsStep(X),this.setState({value:X,inputValue:ee})}var oe="value"in this.props?B:this.state.value;"max"in this.props&&E.max!==Q&&typeof oe=="number"&&oe>Q&&W&&W(Q),"min"in this.props&&E.min!==F&&typeof oe=="number"&&oe<F&&W&&W(F)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var de=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===S.a.BACKSPACE?de=this.cursorStart-1:this.lastKeyCode===S.a.DELETE&&(de=this.cursorStart):de=this.input.value.length,this.fixCaret(de,de)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case S.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case S.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ce){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(E){var O=E;return O===""?O="":this.isNotCompleteNumber(parseFloat(O))?O=this.state.value:O=this.getValidValue(O),this.toNumber(O)}},{key:"getValueFromEvent",value:function(E){var O=E.target.value.trim().replace(/。/g,".");return h(this.props.decimalSeparator)&&(O=O.replace(this.props.decimalSeparator,".")),O}},{key:"getValidValue",value:function(E){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,W=parseFloat(E);return isNaN(W)?E:(W<O&&(W=O),W>B&&(W=B),W)}},{key:"setValue",value:function(E,O){var B=this.props.precision,W=this.isNotCompleteNumber(parseFloat(E))?null:parseFloat(E),Q=this.state.value,F=Q===void 0?null:Q,N=this.state.inputValue,X=N===void 0?null:N,ee=typeof W=="number"?W.toFixed(B):"".concat(W),oe=W!==F||ee!=="".concat(X);return"value"in this.props?(X=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:X},O)):this.setState({value:W,inputValue:this.toPrecisionAsStep(E)},O),oe&&this.props.onChange(W),W}},{key:"getMaxPrecision",value:function(E){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,B=this.props,W=B.precision,Q=B.step;if(h(W))return W;var F=this.getPrecision(O),N=this.getPrecision(Q),X=this.getPrecision(E);return E?Math.max(X,F+N):F+N}},{key:"getPrecisionFactor",value:function(E){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,B=this.getMaxPrecision(E,O);return Math.pow(10,B)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(E){return this.props.formatter?this.props.formatter(E):E}},{key:"toPrecisionAsStep",value:function(E){if(this.isNotCompleteNumber(E)||E==="")return E;var O=Math.abs(this.getMaxPrecision(E));return isNaN(O)?E.toString():Number(E).toFixed(O)}},{key:"toNumber",value:function(E){var O=this.props.precision,B=this.state.focused,W=E&&E.length>16&&B;return this.isNotCompleteNumber(E)||W?E:h(O)?Math.round(E*Math.pow(10,O))/Math.pow(10,O):Number(E)}},{key:"upStep",value:function(E,O){var B=this.props.step,W=this.getPrecisionFactor(E,O),Q=Math.abs(this.getMaxPrecision(E,O)),F=((W*E+W*B*O)/W).toFixed(Q);return this.toNumber(F)}},{key:"downStep",value:function(E,O){var B=this.props.step,W=this.getPrecisionFactor(E,O),Q=Math.abs(this.getMaxPrecision(E,O)),F=((W*E-W*B*O)/W).toFixed(Q);return this.toNumber(F)}},{key:"step",value:function(E,O){var B=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Q=arguments.length>3?arguments[3]:void 0;this.stop(),O&&(O.persist(),O.preventDefault());var F=this.props;if(F.disabled)return;var N=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(N))return;var X=this["".concat(E,"Step")](N,W),ee=X>F.max||X<F.min;if(X>F.max?X=F.max:X<F.min&&(X=F.min),this.setValue(X,null),this.setState({focused:!0},function(){B.pressingUpOrDown=!1}),ee)return;this.autoStepTimer=setTimeout(function(){B[E](O,W,!0)},Q?u:T)}},{key:"fixCaret",value:function(E,O){if(E===void 0||O===void 0||!this.input||!this.input.value)return;try{var B=this.input.selectionStart,W=this.input.selectionEnd;(E!==B||O!==W)&&this.input.setSelectionRange(E,O)}catch(Q){}}},{key:"render",value:function(){var E,O=this.props,B=O.prefixCls,W=O.disabled,Q=O.readOnly,F=O.useTouch,N=O.autoComplete,X=O.upHandler,ee=O.downHandler,oe=O.className,de=O.max,Ce=O.min,ge=O.style,fe=O.title,me=O.onMouseEnter,pe=O.onMouseLeave,ie=O.onMouseOver,ue=O.onMouseOut,be=O.required,_e=O.onClick,Oe=O.tabIndex,We=O.type,Ve=O.placeholder,Le=O.id,Re=O.inputMode,De=O.pattern,Ge=O.step,ze=O.maxLength,Te=O.autoFocus,Ie=O.name,Ye=O.onPaste,qe=O.onInput,je=Object(q.a)(O,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),Fe=this.state,rt=Fe.value,Ze=Fe.focused,Je=v()(B,(E={},Object(G.a)(E,oe,!!oe),Object(G.a)(E,"".concat(B,"-disabled"),W),Object(G.a)(E,"".concat(B,"-focused"),Ze),E)),Ee={};Object.keys(je).forEach(function(te){(te.substr(0,5)==="data-"||te.substr(0,5)==="aria-"||te==="role")&&(Ee[te]=je[te])});var $e=!Q&&!W,Qe=this.getInputDisplayValue(null),ye=(rt||rt===0)&&(isNaN(rt)||Number(rt)>=de),Me=(rt||rt===0)&&(isNaN(rt)||Number(rt)<=Ce),le=ye||W||Q,ne=Me||W||Q,ae=v()("".concat(B,"-handler"),"".concat(B,"-handler-up"),Object(G.a)({},"".concat(B,"-handler-up-disabled"),le)),Y=v()("".concat(B,"-handler"),"".concat(B,"-handler-down"),Object(G.a)({},"".concat(B,"-handler-down-disabled"),ne)),J=F?{onTouchStart:le?d:this.up,onTouchEnd:this.stop}:{onMouseDown:le?d:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Z=F?{onTouchStart:ne?d:this.down,onTouchEnd:this.stop}:{onMouseDown:ne?d:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return I.a.createElement("div",{className:Je,style:ge,title:fe,onMouseEnter:me,onMouseLeave:pe,onMouseOver:ie,onMouseOut:ue,onFocus:function(){return null},onBlur:function(){return null}},I.a.createElement("div",{className:"".concat(B,"-handler-wrap")},I.a.createElement("span",Object.assign({unselectable:"on"},J,{role:"button","aria-label":"Increase Value","aria-disabled":le,className:ae}),X||I.a.createElement("span",{unselectable:"on",className:"".concat(B,"-handler-up-inner"),onClick:o})),I.a.createElement("span",Object.assign({unselectable:"on"},Z,{role:"button","aria-label":"Decrease Value","aria-disabled":ne,className:Y}),ee||I.a.createElement("span",{unselectable:"on",className:"".concat(B,"-handler-down-inner"),onClick:o}))),I.a.createElement("div",{className:"".concat(B,"-input-wrap")},I.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ce,"aria-valuemax":de,"aria-valuenow":rt,required:be,type:We,placeholder:Ve,onPaste:Ye,onClick:_e,onMouseUp:this.onMouseUp,className:"".concat(B,"-input"),tabIndex:Oe,autoComplete:N,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:$e?this.onKeyDown:d,onKeyUp:$e?this.onKeyUp:d,autoFocus:Te,maxLength:ze,readOnly:Q,disabled:W,max:de,min:Ce,step:Ge,name:Ie,title:fe,id:Le,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Qe),pattern:De,inputMode:Re,onInput:qe},Ee))))}}]),g}(I.a.Component);y.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:m,min:-m,step:1,style:{},onChange:d,onKeyDown:d,onPressEnter:d,onFocus:d,onBlur:d,parser:l,required:!1,autoComplete:"off"};var f=y,c=xe.a=f},is8o:function(we,xe,z){we.exports={flex_box_center:"flex_box_center___45jij",flex_space_between:"flex_space_between___2rBtS",flex_box_vertical_center:"flex_box_vertical_center___B3dEI",flex_box_center_end:"flex_box_center_end___1hlbx",flex_box_column:"flex_box_column___n3oa5",wrap:"wrap___2Ebga",modal:"modal___37ZgF",titleWrap:"titleWrap___dEwT4",required:"required___4a1a5",title:"title___1MHB3",colorGray:"colorGray___1tQ38",choiceWrap:"choiceWrap___2Ik_w",answer:"answer___3N5FQ",activeAnswer:"activeAnswer___3zdHK",deleteIcon:"deleteIcon___U7nIS",addIcon:"addIcon___2tuSF",editorWrap:"editorWrap___ZOK2K",htmlWrap:"htmlWrap___3X_dl",radio:"radio___wS7N0",color333:"color333___S1zDX",color999:"color999___VJwGv",questionType:"questionType___BHDve",questionChoices:"questionChoices___3YAfc"}},ji0R:function(we,xe,z){we.exports=z.p+"static/douyu.3e6df9ee.jpg"},kPWJ:function(we,xe,z){we.exports=z.p+"static/question.cb52bef9.gif"},kPYp:function(we,xe){we.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF8AAAAUCAYAAADr0+FaAAANEklEQVRYR8WZe5RX1XXHP/vce3/zHoaXgFp5DQyOQLRgUTEtDW1qYyVmZUGNklRdiRpKE3lHfPyc4TngIBgfC0wx1ixt1NRWal2kotbE2lbRiCIISBCGhzDAvGd+87v37K5z5zfDzMCM46pr9fw1a+45+5zz3fvs/d3fn4yr1F8Do0UIUb74UFR8Gm3IO/Wf8MThat7mOYnaDZUmNUF/htpWLlePK4xwCcoQICHQbOGoKDuM4U1p5r0Px1DNrDPrezzQs+qNPUh/o4xXj6tRJhlhGEqeQNrCCYXdGvGfFt5JNHLoozJp7WyvdI0OtR4LEK7CstUIWyJLTSRcLfCnvlAiUKSgCEfV8o6NeMVE/G53itOUiXX3Sxcx2ov4qhG+qjBWoFChWYUqIt6VgFeblR0H5lEL0oGyjKvU1yHezPviyHdZ0Ro180basvD398n77svIFTokK5vrgW8LTELJRwgA6bTSHcaBckot/yWGX2YZtv5untT0dJ7SpOZrAX9mL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FGXrjipZmzAMLIoM4ZZQqwmdh7Oaltv3E0id1lMlR1hRJnk8PK+H0mqu7DmHBDB4vw6HtneQ8N06YNalIp4HmF6X8EfV6ljRfk5EmNxJvIdn09ksdYIs7oV2d7h7uGrhUOEzP14ibzoNgXmC3wjQx3dbwZdwM6YcbHpNJFDKjxr4dHOunv3rcY9rANNC7dbR4WFkbhIP7ddFxSxTK3Cr0nzgFMz2+05Su37saTsWJRVS5VnuHnnAnmtp8vPnKne+1NY4jlZwtDfWpob6ijzhQ098fyLVmn/bJ97PMPtQJ5r8Dxck5VUMyqXP0wEzEHjNFHQR438rPPZtuyiKpTtmsdjrji7SGmJmBJrGYZSlIsyfYD7oaJVlVqEAwbejSJeafR5t6dOsfOGTuXMTTHeBExHmCzCaDTurLPEFWOlXqFKlI+s8prfwG92lnXVXkoq9HwTcD/KdSp8mGrmyVSaf+pJJmjff/gKHZaTxR3G8E1rKWyoY4MvbOwJfIdIcSUX+8Ic1yg6yT6Eb7Q1Wc4BORRk+RQZQ2DD3n8Y+Lwn4edT/cEcOd0xL6nmyn5knWghPzuL7JQQJMC0umjzafUbaG5J0XigjFSfeHuHYZXSJIH0Iz+VJtczBL6H58pLZAhTaVqKCmnYfoSWc4l6Tko/nscg8clvMtQPyOFUn/oRVCauJZcs+jeHJFLHOX1wFTW9MkEnyg0kP2EpitJ4+YVU/S8v1xqrW4H9MAAAAABJRU5ErkJggg=="},kSUc:function(we,xe,z){},kvPc:function(we,xe,z){"use strict";z.r(xe);var q=z("5Dmo"),G=z("3S7+"),D=z("P2fV"),K=z("NJEC"),P=z("14J3"),M=z("BMrR"),U=z("jCWc"),_=z("kPKH"),I=z("OaEy"),R=z("2fM7"),v=z("7Kak"),S=z("9yH6"),L=z("+L6B"),C=z("2/Rp"),A=z("5NDa"),x=z("5rEg"),d=z("miYZ"),o=z("tsqr"),l=z("k1fw"),u=z("9og8"),T=z("y8nQ"),m=z("Vl3Y"),h=z("tJVT"),w=z("PpiC"),y=z("WmNS"),f=z.n(y),c=z("cDcd"),s=z.n(c),a=z("9kvl"),g=z("Ot1p"),p=z("HBuW"),E=z("oBTY"),O=z("2qtc"),B=z("kLXV"),W=z("Ty5D"),Q=z("V0Rq"),F=z("9Bee"),N=z("is8o"),X=z.n(N),ee=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],oe=function(Oe,We){var Ve=Oe.problemset,Le=Oe.globalSetting,Re=Oe.loading,De=Oe.dispatch,Ge=Oe.onRef,ze=Ge===void 0?function(){}:Ge,Te=Oe.editData,Ie=Object(w.a)(Oe,["problemset","globalSetting","loading","dispatch","onRef","editData"]),Ye=Object(c.useState)([]),qe=Object(h.a)(Ye,2),je=qe[0],Fe=qe[1],rt=Object(c.useState)(),Ze=Object(h.a)(rt,2),Je=Ze[0],Ee=Ze[1],$e=Object(c.useState)([]),Qe=Object(h.a)($e,2),ye=Qe[0],Me=Qe[1],le=Object(c.useState)(""),ne=Object(h.a)(le,2),ae=ne[0],Y=ne[1],J=Object(c.useState)(5),Z=Object(h.a)(J,2),te=Z[0],se=Z[1],ve=Object(c.useState)(!1),Se=Object(h.a)(ve,2),Xe=Se[0],it=Se[1],tt=Object(W.i)();Object(c.useEffect)(function(){Fe(["","","",""])},[]),Object(c.useEffect)(function(){var Pt,At;if(!(Te!=null&&Te.challenge_id)){it(!0);return}Y(Te==null?void 0:Te.subject),se(parseInt(Te==null?void 0:Te.question_score)),Fe(Te==null||((Pt=Te.choose_contents)===null||Pt===void 0)?void 0:Pt.map(function(bt){return bt.option_name}));var dt=[];Te==null||((At=Te.standard_answer)===null||At===void 0)||At.split("").map(function(bt,Rt){dt.push(ee.indexOf(bt))}),Me(dt)},[Te]),Object(c.useImperativeHandle)(We,function(){return{onSave:ft,onReset:St,isEdit:Xe}});var St=function(){Fe(["","","",""]),Y(""),Me([])},ft=function(){var Pt=Object(u.a)(f.a.mark(function At(){var dt,bt;return f.a.wrap(function(It){for(;;)switch(It.prev=It.next){case 0:if(ae){It.next=3;break}return o.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),It.abrupt("return",!1);case 3:if(dt=je.findIndex(function(Ft){return!Ft}),!(dt>-1)){It.next=7;break}return o.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(ee[dt]," \u9009\u9879\u7684\u5185\u5BB9")),It.abrupt("return",!1);case 7:if(ye.length){It.next=10;break}return o.b.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),It.abrupt("return",!1);case 10:if(!(ye.length<1)){It.next=13;break}return o.b.info("\u8BF7\u9009\u62E9\u7B54\u6848"),It.abrupt("return",!1);case 13:return bt=je.map(function(Ft,rr){return{choice_text:Ft,is_answer:!!ye.includes(rr)}}),It.abrupt("return",{subject:ae,question:{cnt:bt.map(function(Ft){return Ft.choice_text})},choice:{answer:bt.map(function(Ft){return Ft.is_answer})}});case 15:case"end":return It.stop()}},At)}));return function(){return Pt.apply(this,arguments)}}(),ot=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Lt=function(){var Pt=Object(u.a)(f.a.mark(function At(dt){return f.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:Rt.t0=dt.id,Rt.next=Rt.t0==="del"?3:Rt.t0==="up"||Rt.t0==="down"?5:Rt.t0==="edit"?9:11;break;case 3:return B.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(u.a)(f.a.mark(function Ft(){return f.a.wrap(function(Mr){for(;;)switch(Mr.prev=Mr.next){case 0:return Mr.next=2,Object(Q.n)({id:Te.question_id});case 2:De({type:"exercise/editExercise",payload:Object(l.a)({},tt)});case 3:case"end":return Mr.stop()}},Ft)}))()}}),Rt.abrupt("break",11);case 5:return Rt.next=7,De({type:"exercise/exeriseMoveUpDown",payload:{id:Te.question_id,opr:dt.id}});case 7:return De({type:"exercise/editExercise",payload:Object(l.a)({},tt)}),Rt.abrupt("break",11);case 9:return it(!0),Rt.abrupt("break",11);case 11:case"end":return Rt.stop()}},At)}));return function(dt){return Pt.apply(this,arguments)}}(),yt=function(){var At;return s.a.createElement("aside",null,s.a.createElement("p",{className:X.a.titleWrap},s.a.createElement("span",{className:X.a.required},"*"),s.a.createElement("span",{className:X.a.title},"\u9898\u5E72\uFF1A")),s.a.createElement(g.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:ae,onChange:function(bt){return Y(bt)}}),s.a.createElement("p",{className:X.a.titleWrap},s.a.createElement("span",{className:X.a.required},"*"),s.a.createElement("span",{className:X.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",s.a.createElement("span",{className:X.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),je.map(function(dt,bt){return s.a.createElement("div",{className:X.a.choiceWrap,key:bt},s.a.createElement(G.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},s.a.createElement("div",{className:"".concat(X.a.answer," ").concat(ye.includes(bt)?X.a.activeAnswer:""),onClick:function(){ye.includes(bt)?Me(ye.filter(function(It){return It!==bt})):Me([].concat(Object(E.a)(ye),[bt]))}},ee[bt])),s.a.createElement("div",{className:X.a.editorWrap},Je===bt?s.a.createElement(g.a,{id:"single-question-option-".concat(bt),watch:!0,isFocus:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:dt,onChange:function(It){je[bt]=It,Fe(je)}}):s.a.createElement("div",{className:X.a.htmlWrap,onClick:function(){return Ee(bt)}},s.a.createElement(F.a,{value:dt}))),bt>1&&s.a.createElement(G.a,{title:"\u5220\u9664"},s.a.createElement("i",{className:"".concat(X.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return Fe(je.filter(function(It,Ft){return Ft!==bt}))}})),bt<7&&bt===je.length-1&&s.a.createElement(G.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},s.a.createElement("i",{className:"".concat(X.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return Fe([].concat(Object(E.a)(je),[""]))}})))}),s.a.createElement(M.a,{className:"mt10"},s.a.createElement(_.a,{flex:"1"},s.a.createElement("p",{className:"c-grey-999"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898")),s.a.createElement(_.a,null,"\u6807\u51C6\u7B54\u6848\uFF1A",s.a.createElement("span",{className:"c-orange"},ye==null||((At=ye.sort(function(dt,bt){return dt-bt}))===null||At===void 0)?void 0:At.map(function(dt){return ee[dt]})))))};return s.a.createElement("section",{className:X.a.wrap},yt())},de=Object(a.a)(function(_e){var Oe=_e.problemset,We=_e.loading,Ve=_e.globalSetting;return{problemset:Oe,globalSetting:Ve,loading:We.effects}},null,null,{forwardRef:!0})(Object(c.forwardRef)(oe)),Ce=z("1vsH"),ge=z("zEei"),fe=z.n(ge),me=z("CJF0"),pe=z("2RCv"),ie={1:[10,20],2:[30,40,50,60],3:[70,80,90,100]},ue=function(Oe){var We,Ve=Oe.shixunsDetail,Le=Oe.dispatch,Re=Oe.loading,De=Oe.match,Ge=Oe.location,ze=Object(w.a)(Oe,["shixunsDetail","dispatch","loading","match","location"]),Te=m.a.useForm(),Ie=Object(h.a)(Te,1),Ye=Ie[0],qe=Object(c.useState)({}),je=Object(h.a)(qe,2),Fe=je[0],rt=je[1],Ze=Object(c.useState)(!1),Je=Object(h.a)(Ze,2),Ee=Je[0],$e=Je[1],Qe=Object(c.useState)(!0),ye=Object(h.a)(Qe,2),Me=ye[0],le=ye[1],ne=Object(c.useState)(),ae=Object(h.a)(ne,2),Y=ae[0],J=ae[1],Z=Object(c.useState)([10,20]),te=Object(h.a)(Z,2),se=te[0],ve=te[1],Se=Object(c.useState)(!1),Xe=Object(h.a)(Se,2),it=Xe[0],tt=Xe[1],St=Object(c.useState)({}),ft=Object(h.a)(St,2),ot=ft[0],Lt=ft[1],yt=Ve.challengesEdit,Pt=Ve.editChallengesQuestion,At=Object(c.useRef)(),dt=function(){var Bt=Object(u.a)(f.a.mark(function ht(){var Ne;return f.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.next=2,Le({type:"shixunsDetail/getChallengesEdit",payload:Object(l.a)({},De.params)});case 2:Ne=gt.sent,Ye.setFieldsValue(Object(l.a)({},Ne));case 4:case"end":return gt.stop()}},ht)}));return function(){return Bt.apply(this,arguments)}}(),bt=function(){var Bt=Object(u.a)(f.a.mark(function ht(){var Ne;return f.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:if(!De.params.questionId){gt.next=7;break}return gt.next=3,Le({type:"shixunsDetail/getEditChallengesQuestion",payload:Object(l.a)({},De.params)});case 3:Ne=gt.sent,Ye.setFieldsValue({challenge_tag:Ne.tags,difficult:Ne.difficult,score:Ne.score,answer:Ne.answer}),ve(ie[Ne.difficult]),Lt(Ne);case 7:case"end":return gt.stop()}},ht)}));return function(){return Bt.apply(this,arguments)}}();Object(c.useEffect)(function(){dt(),De.params.questionId&&(J(!0),bt(),$e(!0))},[Ge.pathname]);var Rt=function(){var Bt=Object(u.a)(f.a.mark(function ht(){var Ne,_t,gt,Wt;return f.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return _t="",gt=Object(l.a)({},Fe),Yt.next=4,At.current.onSave();case 4:return Wt=Yt.sent,(Ne=Wt.choice)===null||Ne===void 0||Ne.answer.map(function(st,Gr){st&&(_t+=Ce.o[Gr])}),Yt.abrupt("return",{challenge_choose:{subject:Wt.subject,answer:Fe.task_pass,standard_answer:_t,score:Fe.score,difficult:Fe.difficult},challenge_tag:Fe.challenge_tag,question:Wt.question,choice:Wt.choice});case 7:case"end":return Yt.stop()}},ht)}));return function(){return Bt.apply(this,arguments)}}(),It=function(ht){var Ne=ie[ht],_t=Ne==null?void 0:Ne[0];ve(Ne),Ye.setFieldsValue({score:_t}),rt(Object(l.a)(Object(l.a)({},Ye.getFieldsValue()),{score:_t}))},Ft=function(ht,Ne){rt(Object(l.a)({},Ye.getFieldsValue())),"difficult"in ht&&It(ht.difficult)},rr=function(){var Bt=Object(u.a)(f.a.mark(function ht(){var Ne;return f.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.t0=p.w,gt.t1=l.a,gt.t2=l.a,gt.t3={},gt.next=6,Rt();case 6:return gt.t4=gt.sent,gt.t5=(0,gt.t2)(gt.t3,gt.t4),gt.t6=De.params,gt.t7=(0,gt.t1)(gt.t5,gt.t6),gt.next=12,(0,gt.t0)(gt.t7);case 12:Ne=gt.sent,(Ne==null?void 0:Ne.status)===1&&o.b.success("\u5220\u9664\u6210\u529F"),ze.history.replace("/shixuns/".concat(De.params.id,"/challenges/").concat(De.params.challengesId,"/editquestion"));case 15:case"end":return gt.stop()}},ht)}));return function(){return Bt.apply(this,arguments)}}(),Mr=function(){var Bt=Object(u.a)(f.a.mark(function ht(Ne){var _t,gt,Wt,Ct;return f.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:if(_t=Object(l.a)({},Fe),tt(!0),Me){st.next=20;break}return st.t0=p.c,st.t1=l.a,st.t2=l.a,st.t3={},st.next=9,Rt();case 9:return st.t4=st.sent,st.t5=(0,st.t2)(st.t3,st.t4),st.t6=De.params,st.t7=(0,st.t1)(st.t5,st.t6),st.next=15,(0,st.t0)(st.t7);case 15:gt=st.sent,tt(!1),gt.challenge_choose_id&&(o.b.success("\u64CD\u4F5C\u6210\u529F"),ze.history.replace("/shixuns/".concat(De.params.id,"/challenges/").concat(De.params.challengesId,"/editquestion/").concat(gt.challenge_choose_id))),st.next=45;break;case 20:if(!De.params.questionId){st.next=38;break}return st.t8=p.Nb,st.t9=l.a,st.t10=l.a,st.t11={},st.next=27,Rt();case 27:return st.t12=st.sent,st.t13=(0,st.t10)(st.t11,st.t12),st.t14=De.params,st.t15=(0,st.t9)(st.t13,st.t14),st.next=33,(0,st.t8)(st.t15);case 33:Wt=st.sent,tt(!1),Wt.challenge_choose_id&&o.b.success("\u64CD\u4F5C\u6210\u529F"),st.next=45;break;case 38:return _t.identifier=De.params.id,_t.st=1,st.next=42,Object(p.Mb)(Object(l.a)(Object(l.a)({},_t),De.params));case 42:Ct=st.sent,tt(!1),Ct.challenge_id&&o.b.success("\u64CD\u4F5C\u6210\u529F");case 45:case"end":return st.stop()}},ht)}));return function(Ne){return Bt.apply(this,arguments)}}(),xr=function(){var ht;return s.a.createElement("div",null,s.a.createElement("div",{className:fe.a.fieldWrap},s.a.createElement(m.a.Item,{name:"subject",label:"\u4EFB\u52A1\u540D\u79F0:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},s.a.createElement(x.a,{maxLength:60,suffix:"".concat(((ht=Fe.subject)===null||ht===void 0?void 0:ht.length)||0,"/60"),placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),s.a.createElement("div",{className:fe.a.mdWrap},s.a.createElement(m.a.Item,{name:"task_pass",label:"\u8FC7\u5173\u4EFB\u52A1:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:35e3,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},s.a.createElement(g.a,{watch:!0,defaultValue:yt.task_pass}))),s.a.createElement("div",{className:fe.a.backgroundFa},s.a.createElement("div",{className:"pt40 mb30"},s.a.createElement(m.a.Item,null,s.a.createElement(C.a,{size:"large",type:"primary",className:"".concat(fe.a.button," mr20"),htmlType:"submit",loading:it},"\u63D0\u4EA4"),s.a.createElement(C.a,{size:"large",type:"primary",ghost:!0,className:fe.a.button,onClick:function(){return a.d.push("/shixuns/".concat(De.params.id,"/challenges"))}},"\u53D6\u6D88")))))},tn=function(){var ht,Ne;return s.a.createElement("div",null,s.a.createElement("div",{className:"bg-white"},s.a.createElement(de,{ref:At,editData:ot})),s.a.createElement("div",{className:fe.a.mdWrap},s.a.createElement(m.a.Item,{name:"task_pass",label:"\u53C2\u8003\u7B54\u6848:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:35e3,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},s.a.createElement(g.a,{watch:!0,defaultValue:Me?Pt.answer:""})),s.a.createElement(m.a.Item,{name:"difficult",label:"\u96BE\u5EA6\u7CFB\u6570:",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6\u7CFB\u6570"}]},s.a.createElement(S.a.Group,{disabled:((ht=Ve.detail)===null||ht===void 0?void 0:ht.shixun_status)===2},s.a.createElement(S.a,{value:1},"\u7B80\u5355"),s.a.createElement(S.a,{value:2},"\u4E2D\u7B49"),s.a.createElement(S.a,{value:3},"\u56F0\u96BE"))),s.a.createElement(M.a,null,s.a.createElement(_.a,null,s.a.createElement(m.a.Item,{name:"score",label:"\u5956\u52B1\u7ECF\u9A8C\u503C:",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5956\u52B1\u7ECF\u9A8C\u503C"}]},s.a.createElement(R.a,{disabled:((Ne=Ve.detail)===null||Ne===void 0?void 0:Ne.shixun_status)===2},se.map(function(_t){return s.a.createElement(R.a.Option,{key:_t,value:_t},_t)})))),s.a.createElement(_.a,{flex:1},s.a.createElement("div",{className:"font12 c-light-black ml10 mt20"},"\u5982\u679C\u5B66\u5458\u7B54\u9898\u9519\u8BEF\uFF0C\u5219\u4E0D\u80FD\u5F97\u5230\u76F8\u5E94\u7684\u7ECF\u9A8C\u503C",s.a.createElement("br",null),"\u5982\u679C\u5B66\u5458\u6210\u529F\u5F97\u5230\u7ECF\u9A8C\u503C\uFF0C\u90A3\u4E48\u5C06\u540C\u65F6\u83B7\u5F97\u7B49\u503C\u7684\u91D1\u5E01\u5956\u52B1\uFF0C\u5982\uFF1A+10\u7ECF\u9A8C\u503C\u3001+10\u91D1\u5E01"))),s.a.createElement(m.a.Item,{name:"challenge_tag",label:s.a.createElement("div",null,"\u6280\u80FD\u6807\u7B7E ",s.a.createElement("span",{className:"pl20 font12 c-light-black"},"\u5B66\u5458\u7B54\u9898\u6B63\u786E\u5C06\u83B7\u5F97\u6280\u80FD\uFF0C\u5426\u5219\u4E0D\u80FD\u83B7\u5F97\u6280\u80FD\uFF08\u56DE\u8F66\u6DFB\u52A0\u6807\u7B7E\uFF09")),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6280\u80FD\u6807\u7B7E"}]},s.a.createElement(pe.a,{placeholder:"\u6DFB\u52A0\u6807\u7B7E"}))),s.a.createElement("div",{className:fe.a.backgroundFa},s.a.createElement(M.a,{className:"pt40 mb30"},s.a.createElement(_.a,{flex:1},s.a.createElement(m.a.Item,null,s.a.createElement(C.a,{size:"large",type:"primary",className:"".concat(fe.a.button," mr20"),htmlType:"submit",loading:it},"\u63D0\u4EA4"),s.a.createElement(C.a,{size:"large",type:"primary",ghost:!0,className:fe.a.button,onClick:function(){return a.d.push("/shixuns/".concat(De.params.id,"/challenges"))}},"\u53D6\u6D88"))),s.a.createElement(_.a,null,Y&&s.a.createElement(C.a,{size:"large",ghost:!0,className:"".concat(fe.a.button," ").concat(fe.a.deleteButton),onClick:rr},"\u5220\u9664")))))};return s.a.createElement("section",{className:fe.a.bg},s.a.createElement(me.a,{data:yt,title:"\u9009\u62E9\u9898"}),s.a.createElement(m.a,{form:Ye,className:fe.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:Ft,onFinish:Mr,initialValues:{difficult:1,score:10}},s.a.createElement("aside",{className:["bg-white",fe.a.navBar].join(" ")},s.a.createElement(K.a,{title:"\u5207\u6362\u524D\u8BF7\u786E\u8BA4\u5F53\u524D\u9009\u62E9\u9898\u5DF2\u63D0\u4EA4\uFF0C\u5426\u5219\u4E0D\u4F1A\u4FDD\u5B58\u4F60\u5F53\u524D\u6240\u6709\u8F93\u5165\uFF01",onConfirm:function(){a.d.replace("/shixuns/".concat(De.params.id,"/challenges/").concat(De.params.challengesId,"/editquestion"))}},s.a.createElement("strong",{className:"current"},"\u672C\u5173\u4EFB\u52A1")),yt==null||((We=yt.chooses)===null||We===void 0)?void 0:We.map(function(Bt,ht){return s.a.createElement(K.a,{title:"\u5207\u6362\u524D\u8BF7\u786E\u8BA4\u5F53\u524D\u9009\u62E9\u9898\u5DF2\u63D0\u4EA4\uFF0C\u5426\u5219\u4E0D\u4F1A\u4FDD\u5B58\u4F60\u5F53\u524D\u6240\u6709\u8F93\u5165\uFF01",onConfirm:function(){a.d.replace("/shixuns/".concat(De.params.id,"/challenges/").concat(De.params.challengesId,"/editquestion/").concat(Bt.choose_id))}},s.a.createElement("strong",{className:"current ".concat(De.params.questionId==Bt.choose_id&&Me?fe.a.actived:"")},Bt.type===1?"\u5355\u9009\u9898":"\u591A\u9009\u9898"))}),Me&&s.a.createElement(K.a,{title:"\u5207\u6362\u524D\u8BF7\u786E\u8BA4\u5F53\u524D\u9009\u62E9\u9898\u5DF2\u63D0\u4EA4\uFF0C\u5426\u5219\u4E0D\u4F1A\u4FDD\u5B58\u4F60\u5F53\u524D\u6240\u6709\u8F93\u5165\uFF01",onConfirm:function(){$e(!0),le(!1),Lt({}),At.current&&At.current.onReset(),Ye.resetFields()}},s.a.createElement(G.a,{title:"\u65B0\u589E\u9009\u62E9\u9898"},s.a.createElement("span",{className:fe.a.addButton,onClick:function(){}},"+"))),!Me&&s.a.createElement("strong",{className:fe.a.actived},"\u9009\u62E9\u9898")),!Ee&&xr(),Ee&&tn()))},be=xe.default=Object(a.a)(function(_e){var Oe=_e.shixunsDetail,We=_e.newCourse,Ve=_e.loading,Le=_e.globalSetting;return{shixunsDetail:Oe,newCourse:We,globalSetting:Le,loading:Ve.effects}})(ue)},l2Kq:function(we,xe,z){we.exports=z.p+"static/match_ad.24dc22fd.jpg"},lZu9:function(we,xe,z){(function(q){q(z("VrN/"),z("1eCo"),z("8EBN"))})(function(q){"use strict";q.defineMode("markdown",function(G,D){var K=q.getMode(G,"text/html"),P=K.name=="null";function M(F){if(q.findModeByName){var N=q.findModeByName(F);N&&(F=N.mime||N.mimes[0])}var X=q.getMode(G,F);return X.name=="null"?null:X}D.highlightFormatting===void 0&&(D.highlightFormatting=!1),D.maxBlockquoteDepth===void 0&&(D.maxBlockquoteDepth=0),D.taskLists===void 0&&(D.taskLists=!1),D.strikethrough===void 0&&(D.strikethrough=!1),D.emoji===void 0&&(D.emoji=!1),D.fencedCodeBlockHighlighting===void 0&&(D.fencedCodeBlockHighlighting=!0),D.fencedCodeBlockDefaultMode===void 0&&(D.fencedCodeBlockDefaultMode="text/plain"),D.xml===void 0&&(D.xml=!0),D.tokenTypeOverrides===void 0&&(D.tokenTypeOverrides={});var U={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var _ in U)U.hasOwnProperty(_)&&D.tokenTypeOverrides[_]&&(U[_]=D.tokenTypeOverrides[_]);var I=/^([*\-_])(?:\s*\1){2,}\s*$/,R=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,v=/^\[(x| )\](?=\s)/i,S=D.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,L=/^ {0,3}(?:\={1,}|-{2,})\s*$/,C=/^[^#!\[\]*_\\<>` "'(~:]+/,A=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,x=/^\s*\[[^\]]+?\]:.*$/,d=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,o=" ";function l(F,N,X){return N.f=N.inline=X,X(F,N)}function u(F,N,X){return N.f=N.block=X,X(F,N)}function T(F){return!F||!/\S/.test(F.string)}function m(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==w){var N=P;if(!N){var X=q.innerMode(K,F.htmlState);N=X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText}N&&(F.f=s,F.block=h,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function h(F,N){var X=F.column()===N.indentation,ee=T(N.prevLine.stream),oe=N.indentedCode,de=N.prevLine.hr,Ce=N.list!==!1,ge=(N.listStack[N.listStack.length-1]||0)+3;N.indentedCode=!1;var fe=N.indentation;if(N.indentationDiff===null&&(N.indentationDiff=N.indentation,Ce)){for(N.list=null;fe<N.listStack[N.listStack.length-1];)N.listStack.pop(),N.listStack.length?N.indentation=N.listStack[N.listStack.length-1]:N.list=!1;N.list!==!1&&(N.indentationDiff=fe-N.listStack[N.listStack.length-1])}var me=!ee&&!de&&!N.prevLine.header&&(!Ce||!oe)&&!N.prevLine.fencedCodeEnd,pe=(N.list===!1||de||ee)&&N.indentation<=ge&&F.match(I),ie=null;if(N.indentationDiff>=4&&(oe||N.prevLine.fencedCodeEnd||N.prevLine.header||ee))return F.skipToEnd(),N.indentedCode=!0,U.code;if(F.eatSpace())return null;if(X&&N.indentation<=ge&&(ie=F.match(S))&&ie[1].length<=6)return N.quote=0,N.header=ie[1].length,N.thisLine.header=!0,D.highlightFormatting&&(N.formatting="header"),N.f=N.inline,f(N);if(N.indentation<=ge&&F.eat(">"))return N.quote=X?1:N.quote+1,D.highlightFormatting&&(N.formatting="quote"),F.eatSpace(),f(N);if(!pe&&!N.setext&&X&&N.indentation<=ge&&(ie=F.match(R))){var ue=ie[1]?"ol":"ul";return N.indentation=fe+F.current().length,N.list=!0,N.quote=0,N.listStack.push(N.indentation),N.em=!1,N.strong=!1,N.code=!1,N.strikethrough=!1,D.taskLists&&F.match(v,!1)&&(N.taskList=!0),N.f=N.inline,D.highlightFormatting&&(N.formatting=["list","list-"+ue]),f(N)}else{if(X&&N.indentation<=ge&&(ie=F.match(A,!0)))return N.quote=0,N.fencedEndRE=new RegExp(ie[1]+"+ *$"),N.localMode=D.fencedCodeBlockHighlighting&&M(ie[2]||D.fencedCodeBlockDefaultMode),N.localMode&&(N.localState=q.startState(N.localMode)),N.f=N.block=y,D.highlightFormatting&&(N.formatting="code-block"),N.code=-1,f(N);if(N.setext||(!me||!Ce)&&!N.quote&&N.list===!1&&!N.code&&!pe&&!x.test(F.string)&&(ie=F.lookAhead(1))&&(ie=ie.match(L)))return N.setext?(N.header=N.setext,N.setext=0,F.skipToEnd(),D.highlightFormatting&&(N.formatting="header")):(N.header=ie[0].charAt(0)=="="?1:2,N.setext=N.header),N.thisLine.header=!0,N.f=N.inline,f(N);if(pe)return F.skipToEnd(),N.hr=!0,N.thisLine.hr=!0,U.hr;if(F.peek()==="[")return l(F,N,O)}return l(F,N,N.inline)}function w(F,N){var X=K.token(F,N.htmlState);if(!P){var ee=q.innerMode(K,N.htmlState);(ee.mode.name=="xml"&&ee.state.tagStart===null&&!ee.state.context&&ee.state.tokenize.isInText||N.md_inside&&F.current().indexOf(">")>-1)&&(N.f=s,N.block=h,N.htmlState=null)}return X}function y(F,N){var X=N.listStack[N.listStack.length-1]||0,ee=N.indentation<X,oe=X+3;if(N.fencedEndRE&&N.indentation<=oe&&(ee||F.match(N.fencedEndRE))){D.highlightFormatting&&(N.formatting="code-block");var de;return ee||(de=f(N)),N.localMode=N.localState=null,N.block=h,N.f=s,N.fencedEndRE=null,N.code=0,N.thisLine.fencedCodeEnd=!0,ee?u(F,N,N.block):de}else return N.localMode?N.localMode.token(F,N.localState):(F.skipToEnd(),U.code)}function f(F){var N=[];if(F.formatting){N.push(U.formatting),typeof F.formatting=="string"&&(F.formatting=[F.formatting]);for(var X=0;X<F.formatting.length;X++)N.push(U.formatting+"-"+F.formatting[X]),F.formatting[X]==="header"&&N.push(U.formatting+"-"+F.formatting[X]+"-"+F.header),F.formatting[X]==="quote"&&(!D.maxBlockquoteDepth||D.maxBlockquoteDepth>=F.quote?N.push(U.formatting+"-"+F.formatting[X]+"-"+F.quote):N.push("error"))}if(F.taskOpen)return N.push("meta"),N.length?N.join(" "):null;if(F.taskClosed)return N.push("property"),N.length?N.join(" "):null;if(F.linkHref?N.push(U.linkHref,"url"):(F.strong&&N.push(U.strong),F.em&&N.push(U.em),F.strikethrough&&N.push(U.strikethrough),F.emoji&&N.push(U.emoji),F.linkText&&N.push(U.linkText),F.code&&N.push(U.code),F.image&&N.push(U.image),F.imageAltText&&N.push(U.imageAltText,"link"),F.imageMarker&&N.push(U.imageMarker)),F.header&&N.push(U.header,U.header+"-"+F.header),F.quote&&(N.push(U.quote),!D.maxBlockquoteDepth||D.maxBlockquoteDepth>=F.quote?N.push(U.quote+"-"+F.quote):N.push(U.quote+"-"+D.maxBlockquoteDepth)),F.list!==!1){var ee=(F.listStack.length-1)%3;ee?ee===1?N.push(U.list2):N.push(U.list3):N.push(U.list1)}return F.trailingSpaceNewLine?N.push("trailing-space-new-line"):F.trailingSpace&&N.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),N.length?N.join(" "):null}function c(F,N){return F.match(C,!0)?f(N):void 0}function s(F,N){var X=N.text(F,N);if(typeof X!="undefined")return X;if(N.list)return N.list=null,f(N);if(N.taskList){var ee=F.match(v,!0)[1]===" ";return ee?N.taskOpen=!0:N.taskClosed=!0,D.highlightFormatting&&(N.formatting="task"),N.taskList=!1,f(N)}if(N.taskOpen=!1,N.taskClosed=!1,N.header&&F.match(/^#+$/,!0))return D.highlightFormatting&&(N.formatting="header"),f(N);var oe=F.next();if(N.linkTitle){N.linkTitle=!1;var de=oe;oe==="("&&(de=")"),de=(de+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ce="^\\s*(?:[^"+de+"\\\\]+|\\\\\\\\|\\\\.)"+de;if(F.match(new RegExp(Ce),!0))return U.linkHref}if(oe==="`"){var ge=N.formatting;D.highlightFormatting&&(N.formatting="code"),F.eatWhile("`");var fe=F.current().length;if(N.code==0&&(!N.quote||fe==1))return N.code=fe,f(N);if(fe==N.code){var me=f(N);return N.code=0,me}else return N.formatting=ge,f(N)}else if(N.code)return f(N);if(oe==="\\"&&(F.next(),D.highlightFormatting)){var pe=f(N),ie=U.formatting+"-escape";return pe?pe+" "+ie:ie}if(oe==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return N.imageMarker=!0,N.image=!0,D.highlightFormatting&&(N.formatting="image"),f(N);if(oe==="["&&N.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return N.imageMarker=!1,N.imageAltText=!0,D.highlightFormatting&&(N.formatting="image"),f(N);if(oe==="]"&&N.imageAltText){D.highlightFormatting&&(N.formatting="image");var pe=f(N);return N.imageAltText=!1,N.image=!1,N.inline=N.f=g,pe}if(oe==="["&&!N.image)return N.linkText&&F.match(/^.*?\]/)||(N.linkText=!0,D.highlightFormatting&&(N.formatting="link")),f(N);if(oe==="]"&&N.linkText){D.highlightFormatting&&(N.formatting="link");var pe=f(N);return N.linkText=!1,N.inline=N.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?g:s,pe}if(oe==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){N.f=N.inline=a,D.highlightFormatting&&(N.formatting="link");var pe=f(N);return pe?pe+=" ":pe="",pe+U.linkInline}if(oe==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){N.f=N.inline=a,D.highlightFormatting&&(N.formatting="link");var pe=f(N);return pe?pe+=" ":pe="",pe+U.linkEmail}if(D.xml&&oe==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ue=F.string.indexOf(">",F.pos);if(ue!=-1){var be=F.string.substring(F.start,ue);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(be)&&(N.md_inside=!0)}return F.backUp(1),N.htmlState=q.startState(K),u(F,N,w)}if(D.xml&&oe==="<"&&F.match(/^\/\w*?>/))return N.md_inside=!1,"tag";if(oe==="*"||oe==="_"){for(var _e=1,Oe=F.pos==1?" ":F.string.charAt(F.pos-2);_e<3&&F.eat(oe);)_e++;var We=F.peek()||" ",Ve=!/\s/.test(We)&&(!d.test(We)||/\s/.test(Oe)||d.test(Oe)),Le=!/\s/.test(Oe)&&(!d.test(Oe)||/\s/.test(We)||d.test(We)),Re=null,De=null;if(_e%2&&(!N.em&&Ve&&(oe==="*"||!Le||d.test(Oe))?Re=!0:N.em==oe&&Le&&(oe==="*"||!Ve||d.test(We))&&(Re=!1)),_e>1&&(!N.strong&&Ve&&(oe==="*"||!Le||d.test(Oe))?De=!0:N.strong==oe&&Le&&(oe==="*"||!Ve||d.test(We))&&(De=!1)),De!=null||Re!=null){D.highlightFormatting&&(N.formatting=Re==null?"strong":De==null?"em":"strong em"),Re===!0&&(N.em=oe),De===!0&&(N.strong=oe);var me=f(N);return Re===!1&&(N.em=!1),De===!1&&(N.strong=!1),me}}else if(oe===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return f(N);F.backUp(1)}if(D.strikethrough){if(oe==="~"&&F.eatWhile(oe)){if(N.strikethrough){D.highlightFormatting&&(N.formatting="strikethrough");var me=f(N);return N.strikethrough=!1,me}else if(F.match(/^[^\s]/,!1))return N.strikethrough=!0,D.highlightFormatting&&(N.formatting="strikethrough"),f(N)}else if(oe===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return f(N);F.backUp(2)}}if(D.emoji&&oe===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){N.emoji=!0,D.highlightFormatting&&(N.formatting="emoji");var Ge=f(N);return N.emoji=!1,Ge}return oe===" "&&(F.match(/^ +$/,!1)?N.trailingSpace++:N.trailingSpace&&(N.trailingSpaceNewLine=!0)),f(N)}function a(F,N){var X=F.next();if(X===">"){N.f=N.inline=s,D.highlightFormatting&&(N.formatting="link");var ee=f(N);return ee?ee+=" ":ee="",ee+U.linkInline}return F.match(/^[^>]+/,!0),U.linkInline}function g(F,N){if(F.eatSpace())return null;var X=F.next();return X==="("||X==="["?(N.f=N.inline=E(X==="("?")":"]"),D.highlightFormatting&&(N.formatting="link-string"),N.linkHref=!0,f(N)):"error"}var p={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function E(F){return function(N,X){var ee=N.next();if(ee===F){X.f=X.inline=s,D.highlightFormatting&&(X.formatting="link-string");var oe=f(X);return X.linkHref=!1,oe}return N.match(p[F]),X.linkHref=!0,f(X)}}function O(F,N){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(N.f=B,F.next(),D.highlightFormatting&&(N.formatting="link"),N.linkText=!0,f(N)):l(F,N,s)}function B(F,N){if(F.match(/^\]:/,!0)){N.f=N.inline=W,D.highlightFormatting&&(N.formatting="link");var X=f(N);return N.linkText=!1,X}return F.match(/^([^\]\\]|\\.)+/,!0),U.linkText}function W(F,N){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?N.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),N.f=N.inline=s,U.linkHref+" url")}var Q={startState:function(){return{f:h,prevLine:{stream:null},thisLine:{stream:null},block:h,htmlState:null,indentation:0,inline:s,text:c,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&q.copyState(K,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?q.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,N){if(N.formatting=!1,F!=N.thisLine.stream){if(N.header=0,N.hr=!1,F.match(/^\s*$/,!0))return m(N),null;if(N.prevLine=N.thisLine,N.thisLine={stream:F},N.taskList=!1,N.trailingSpace=0,N.trailingSpaceNewLine=!1,!N.localState&&(N.f=N.block,N.f!=w)){var X=F.match(/^\s*/,!0)[0].replace(/\t/g,o).length;if(N.indentation=X,N.indentationDiff=null,X>0)return null}}return N.f(F,N)},innerMode:function(F){return F.block==w?{state:F.htmlState,mode:K}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:Q}},indent:function(F,N,X){return F.block==w&&K.indent?K.indent(F.htmlState,N,X):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,N,X):q.Pass},blankLine:m,getType:f,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Q},"xml"),q.defineMIME("text/markdown","markdown"),q.defineMIME("text/x-markdown","markdown")})},lzim:function(we,xe,z){"use strict";var q=z("E7E6"),G=z.n(q);z.d(xe,"z",function(){return G.a});var D=z("/GNS"),K=z.n(D);z.d(xe,"y",function(){return K.a});var P=z("FOrL"),M=z.n(P);z.d(xe,"s",function(){return M.a});var U=z("HpTS"),_=z.n(U);z.d(xe,"A",function(){return _.a});var I=z("tWlo"),R=z.n(I);z.d(xe,"b",function(){return R.a});var v=z("7ZXX"),S=z.n(v);z.d(xe,"m",function(){return S.a});var L=z("GABl"),C=z.n(L);z.d(xe,"f",function(){return C.a});var A=z("onxn"),x=z.n(A);z.d(xe,"o",function(){return x.a});var d=z("nKGa"),o=z.n(d);z.d(xe,"n",function(){return o.a});var l=z("4qgm"),u=z.n(l);z.d(xe,"C",function(){return u.a});var T=z("JeFH"),m=z.n(T);z.d(xe,"c",function(){return m.a});var h=z("ji0R"),w=z.n(h);z.d(xe,"j",function(){return w.a});var y=z("W6BS"),f=z.n(y);z.d(xe,"D",function(){return f.a});var c=z("kPYp"),s=z.n(c);z.d(xe,"E",function(){return s.a});var a=z("nukY"),g=z.n(a),p=z("4u4S"),E=z.n(p),O=z("yslc"),B=z.n(O),W=z("l2Kq"),Q=z.n(W);z.d(xe,"r",function(){return Q.a});var F=z("RMFE"),N=z.n(F);z.d(xe,"p",function(){return N.a});var X=z("TGq3"),ee=z.n(X),oe=z("SMhR"),de=z.n(oe);z.d(xe,"B",function(){return de.a});var Ce=z("8/bI"),ge=z.n(Ce);z.d(xe,"k",function(){return ge.a});var fe=z("JWDV"),me=z.n(fe),pe=z("Xsq0"),ie=z.n(pe);z.d(xe,"q",function(){return ie.a});var ue=z("Ohmc"),be=z.n(ue);z.d(xe,"d",function(){return be.a});var _e=z("csWT"),Oe=z.n(_e);z.d(xe,"e",function(){return Oe.a});var We=z("7v3h"),Ve=z.n(We);z.d(xe,"l",function(){return Ve.a});var Le=z("cRFk"),Re=z.n(Le);z.d(xe,"x",function(){return Re.a});var De=z("kPWJ"),Ge=z.n(De);z.d(xe,"w",function(){return Ge.a});var ze=z("qgvg"),Te=z.n(ze);z.d(xe,"t",function(){return Te.a});var Ie=z("FPkq"),Ye=z.n(Ie);z.d(xe,"v",function(){return Ye.a});var qe=z("A/g1"),je=z.n(qe);z.d(xe,"g",function(){return je.a});var Fe=z("Nmxd"),rt=z.n(Fe);z.d(xe,"h",function(){return rt.a});var Ze=z("5D2P"),Je=z.n(Ze);z.d(xe,"i",function(){return Je.a});var Ee=z("djh8"),$e=z.n(Ee);z.d(xe,"u",function(){return $e.a});var Qe=z("Jq4h"),ye=z.n(Qe);z.d(xe,"a",function(){return ye.a})},nKGa:function(we,xe,z){we.exports=z.p+"static/export_exercise-template.f7655c19.png"},nZ20:function(we,xe,z){we.exports={icons:"icons___3O80F"}},nukY:function(we,xe){we.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAMkklEQVR4Xu2dWWwcSRnHv7Yd577v+74vkgWEQCAEy6IVWuCB62GVICFIYkcsvMC+LW8LL7BIiTiEhCweInjgPrRCC2KBJTBVYzm24yRO4ty3kziJj9ie+tC/d9oaT2b67ume7irJsjdbVf19X/266quvjjaEEG8w8yukk7ZAii1gMHODEOK3RPRSivXUqmXcAgb07+jomDk2NvYPZn4u4/bQ6qfUAiboSEKI5cz8XyJanVJdtVoZtsAE6EXYdzPzv4hoToZtolVPoQUmgV6E/QVm/hMRNaVQX61SRi3wDOiwg5Tya0qpn2TUJlrtFFqgIujFnv27zPztFOqsVcqgBaqCzsyGlPJXzPy5DNpFq5wyC1QFHXr29fVN6+/v/zszfyBlemt1MmYBW9Bhi3w+v7hQKJwkog0Zs41WN0UWcAS96K9vI6J3mHl+inTXqmTIAq5Ahz1yudxHDcN4k5mbM2QfrWpKLOAa9CLsB4ioLSW6azUyZAFPoBdh/w4RvZYhG2lVU2ABz6AXYf8FEb2cAv21ChmxgC/Qu7q6moeHh/9KRB/JiJ20mnVuAV+gQ+fu7u4FQ0ND/yGiLXVuAy1+BizgG/Ri2HEjEZ1k5kUZsJVWsY4tEAh06N3e3v7B8fHxt4hoWh3bIRbRm5qaaHx83NOzDcMg/DCz+RNlamhoMKtXSkX5mJrUHRh0SCml/CIzn8D+mJpInYKHNDY20p49e2hoaIguX75MIyMjrrRatWoVLVu2jJ48eUJnzpxxVcZPpunTp9POnTvNot3d3TQ8POynmsSUCQ1MIcSrzPx6YjSrIMiSJUvM3jCK9PTpU3r48KHrqhcvXkxr166lQqFAp06dMn+7SRp0N1Z6Nk+orS6E+Bkzf8WfKNGX2rdvH6EnjSINDAxQb2+v66p37NhBM2bMoNu3b9PVq1ddl9OguzbVpIyhgs7MTUKIvxDR8/7EibbU1q1byfI7w3pSc3MzTZk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ZtOne5hJaZpwoAG1GpXjhf/YXuxTK37pyLFPZSGErM7JleYCPVGRN7kreaXsp45OnY7aAwN3xvQcH1b1y65VabMwzMU5zQ79bMKmLHLm2GCEXC0jUkVRSLUF6hdW62c8n7WyzXHfsianBVAg16rqGCOerYt+E4tuOIbviR3suK+cBp1Zdpp0GRVRfZl4/XHD7AzTpnYSFWB0vHlzS2TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},osHv:function(we,xe,z){(function(q){q(z("VrN/"))})(function(q){"use strict";var G=q.Pos;function D(d,o){return d.line-o.line||d.ch-o.ch}var K="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",P=K+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",M=new RegExp("<(/?)(["+K+"]["+P+"]*)","g");function U(d,o,l,u){this.line=o,this.ch=l,this.cm=d,this.text=d.getLine(o),this.min=u?Math.max(u.from,d.firstLine()):d.firstLine(),this.max=u?Math.min(u.to-1,d.lastLine()):d.lastLine()}function _(d,o){var l=d.cm.getTokenTypeAt(G(d.line,o));return l&&/\btag\b/.test(l)}function I(d){return d.line>=d.max?void 0:(d.ch=0,d.text=d.cm.getLine(++d.line),!0)}function R(d){return d.line<=d.min?void 0:(d.text=d.cm.getLine(--d.line),d.ch=d.text.length,!0)}function v(d){for(;;){var o=d.text.indexOf(">",d.ch);if(o==-1){if(I(d))continue;return}if(!_(d,o+1)){d.ch=o+1;continue}var l=d.text.lastIndexOf("/",o),u=l>-1&&!/\S/.test(d.text.slice(l+1,o));return d.ch=o+1,u?"selfClose":"regular"}}function S(d){for(;;){var o=d.ch?d.text.lastIndexOf("<",d.ch-1):-1;if(o==-1){if(R(d))continue;return}if(!_(d,o+1)){d.ch=o;continue}M.lastIndex=o,d.ch=o;var l=M.exec(d.text);if(l&&l.index==o)return l}}function L(d){for(;;){M.lastIndex=d.ch;var o=M.exec(d.text);if(!o){if(I(d))continue;return}if(!_(d,o.index+1)){d.ch=o.index+1;continue}return d.ch=o.index+o[0].length,o}}function C(d){for(;;){var o=d.ch?d.text.lastIndexOf(">",d.ch-1):-1;if(o==-1){if(R(d))continue;return}if(!_(d,o+1)){d.ch=o;continue}var l=d.text.lastIndexOf("/",o),u=l>-1&&!/\S/.test(d.text.slice(l+1,o));return d.ch=o+1,u?"selfClose":"regular"}}function A(d,o){for(var l=[];;){var u=L(d),T,m=d.line,h=d.ch-(u?u[0].length:0);if(!u||!(T=v(d)))return;if(T=="selfClose")continue;if(u[1]){for(var w=l.length-1;w>=0;--w)if(l[w]==u[2]){l.length=w;break}if(w<0&&(!o||o==u[2]))return{tag:u[2],from:G(m,h),to:G(d.line,d.ch)}}else l.push(u[2])}}function x(d,o){for(var l=[];;){var u=C(d);if(!u)return;if(u=="selfClose"){S(d);continue}var T=d.line,m=d.ch,h=S(d);if(!h)return;if(h[1])l.push(h[2]);else{for(var w=l.length-1;w>=0;--w)if(l[w]==h[2]){l.length=w;break}if(w<0&&(!o||o==h[2]))return{tag:h[2],from:G(d.line,d.ch),to:G(T,m)}}}}q.registerHelper("fold","xml",function(d,o){for(var l=new U(d,o.line,0);;){var u=L(l);if(!u||l.line!=o.line)return;var T=v(l);if(!T)return;if(!u[1]&&T!="selfClose"){var m=G(l.line,l.ch),h=A(l,u[2]);return h&&D(h.from,m)>0?{from:m,to:h.from}:null}}}),q.findMatchingTag=function(d,o,l){var u=new U(d,o.line,o.ch,l);if(u.text.indexOf(">")==-1&&u.text.indexOf("<")==-1)return;var T=v(u),m=T&&G(u.line,u.ch),h=T&&S(u);if(!T||!h||D(u,o)>0)return;var w={from:G(u.line,u.ch),to:m,tag:h[2]};return T=="selfClose"?{open:w,close:null,at:"open"}:h[1]?{open:x(u,h[2]),close:w,at:"close"}:(u=new U(d,m.line,m.ch,l),{open:w,close:A(u,h[2]),at:"open"})},q.findEnclosingTag=function(d,o,l,u){for(var T=new U(d,o.line,o.ch,l);;){var m=x(T,u);if(!m)break;var h=new U(d,o.line,o.ch,l),w=A(h,m.tag);if(w)return{open:m,close:w}}},q.scanForClosingTag=function(d,o,l,u){var T=new U(d,o.line,o.ch,u?{from:0,to:u}:null);return A(T,l)}})},"p77/":function(we,xe,z){},qgvg:function(we,xe){we.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYge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SklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},rUJ1:function(we,xe){const z=/[&<>"']/,q=/[&<>"']/g,G=/[<>"']|&(?!#?\w+;)/,D=/[<>"']|&(?!#?\w+;)/g,K={"&":"&","<":"<",">":">",'"':""","'":"'"},P=y=>K[y];function M(y,f){if(f){if(z.test(y))return y.replace(q,P)}else if(G.test(y))return y.replace(D,P);return y}const U=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function _(y){return y.replace(U,(f,c)=>(c=c.toLowerCase(),c==="colon"?":":c.charAt(0)==="#"?c.charAt(1)==="x"?String.fromCharCode(parseInt(c.substring(2),16)):String.fromCharCode(+c.substring(1)):""))}const I=/(^|[^\[])\^/g;function R(y,f){y=y.source||y,f=f||"";const c={replace:(s,a)=>(a=a.source||a,a=a.replace(I,"$1"),y=y.replace(s,a),c),getRegex:()=>new RegExp(y,f)};return c}const v=/[^\w:]/g,S=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(y,f,c){if(y){let s;try{s=decodeURIComponent(_(c)).replace(v,"").toLowerCase()}catch(a){return null}if(s.indexOf("javascript:")===0||s.indexOf("vbscript:")===0||s.indexOf("data:")===0)return null}f&&!S.test(c)&&(c=o(f,c));try{c=encodeURI(c).replace(/%25/g,"%")}catch(s){return null}return c}const C={},A=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function o(y,f){C[" "+y]||(A.test(y)?C[" "+y]=y+"/":C[" "+y]=m(y,"/",!0)),y=C[" "+y];const c=y.indexOf(":")===-1;return f.substring(0,2)==="//"?c?f:y.replace(x,"$1")+f:f.charAt(0)==="/"?c?f:y.replace(d,"$1")+f:y+f}const l={exec:function(){}};function u(y){let f=1,c,s;for(;f<arguments.length;f++){c=arguments[f];for(s in c)Object.prototype.hasOwnProperty.call(c,s)&&(y[s]=c[s])}return y}function T(y,f){const c=y.replace(/\|/g,(g,p,E)=>{let O=!1,B=p;for(;--B>=0&&E[B]==="\\";)O=!O;return O?"|":" |"}),s=c.split(/ \|/);let a=0;if(s.length>f)s.splice(f);else for(;s.length<f;)s.push("");for(;a<s.length;a++)s[a]=s[a].trim().replace(/\\\|/g,"|");return s}function m(y,f,c){const s=y.length;if(s===0)return"";let a=0;for(;a<s;){const g=y.charAt(s-a-1);if(g===f&&!c)a++;else if(g!==f&&c)a++;else break}return y.substr(0,s-a)}function h(y,f){if(y.indexOf(f[1])===-1)return-1;const c=y.length;let s=0,a=0;for(;a<c;a++)if(y[a]==="\\")a++;else if(y[a]===f[0])s++;else if(y[a]===f[1]&&(s--,s<0))return a;return-1}function w(y){y&&y.sanitize&&!y.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}we.exports={escape:M,unescape:_,edit:R,cleanUrl:L,resolveUrl:o,noopTest:l,merge:u,splitCells:T,rtrim:m,findClosingBracket:h,checkSanitizeDeprecation:w}},tWlo:function(we,xe){we.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAY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this,function(){return function(q){var G={};function D(K){if(G[K])return G[K].exports;var P=G[K]={i:K,l:!1,exports:{}};return q[K].call(P.exports,P,P.exports,D),P.l=!0,P.exports}return D.m=q,D.c=G,D.d=function(K,P,M){D.o(K,P)||Object.defineProperty(K,P,{enumerable:!0,get:M})},D.r=function(K){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(K,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(K,"__esModule",{value:!0})},D.t=function(K,P){if(P&1&&(K=D(K)),P&8)return K;if(P&4&&typeof K=="object"&&K&&K.__esModule)return K;var M=Object.create(null);if(D.r(M),Object.defineProperty(M,"default",{enumerable:!0,value:K}),P&2&&typeof K!="string")for(var U in K)D.d(M,U,function(_){return K[_]}.bind(null,U));return M},D.n=function(K){var P=K&&K.__esModule?function(){return K.default}:function(){return K};return D.d(P,"a",P),P},D.o=function(K,P){return Object.prototype.hasOwnProperty.call(K,P)},D.p="/dist/",D(D.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(q,G,D){"use strict";var K=Object.prototype.hasOwnProperty,P="~";function M(){}Object.create&&(M.prototype=Object.create(null),new M().__proto__||(P=!1));function U(v,S,L){this.fn=v,this.context=S,this.once=L||!1}function _(v,S,L,C,A){if(typeof L!="function")throw new TypeError("The listener must be a function");var x=new U(L,C||v,A),d=P?P+S:S;return v._events[d]?v._events[d].fn?v._events[d]=[v._events[d],x]:v._events[d].push(x):(v._events[d]=x,v._eventsCount++),v}function I(v,S){--v._eventsCount===0?v._events=new M:delete v._events[S]}function R(){this._events=new M,this._eventsCount=0}R.prototype.eventNames=function(){var S=[],L,C;if(this._eventsCount===0)return S;for(C in L=this._events)K.call(L,C)&&S.push(P?C.slice(1):C);return Object.getOwnPropertySymbols?S.concat(Object.getOwnPropertySymbols(L)):S},R.prototype.listeners=function(S){var L=P?P+S:S,C=this._events[L];if(!C)return[];if(C.fn)return[C.fn];for(var A=0,x=C.length,d=new Array(x);A<x;A++)d[A]=C[A].fn;return d},R.prototype.listenerCount=function(S){var L=P?P+S:S,C=this._events[L];return C?C.fn?1:C.length:0},R.prototype.emit=function(S,L,C,A,x,d){var o=P?P+S:S;if(!this._events[o])return!1;var l=this._events[o],u=arguments.length,T,m;if(l.fn){l.once&&this.removeListener(S,l.fn,void 0,!0);switch(u){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,L),!0;case 3:return l.fn.call(l.context,L,C),!0;case 4:return l.fn.call(l.context,L,C,A),!0;case 5:return l.fn.call(l.context,L,C,A,x),!0;case 6:return l.fn.call(l.context,L,C,A,x,d),!0}for(m=1,T=new Array(u-1);m<u;m++)T[m-1]=arguments[m];l.fn.apply(l.context,T)}else{var h=l.length,w;for(m=0;m<h;m++){l[m].once&&this.removeListener(S,l[m].fn,void 0,!0);switch(u){case 1:l[m].fn.call(l[m].context);break;case 2:l[m].fn.call(l[m].context,L);break;case 3:l[m].fn.call(l[m].context,L,C);break;case 4:l[m].fn.call(l[m].context,L,C,A);break;default:if(!T)for(w=1,T=new Array(u-1);w<u;w++)T[w-1]=arguments[w];l[m].fn.apply(l[m].context,T)}}}return!0},R.prototype.on=function(S,L,C){return _(this,S,L,C,!1)},R.prototype.once=function(S,L,C){return _(this,S,L,C,!0)},R.prototype.removeListener=function(S,L,C,A){var x=P?P+S:S;if(!this._events[x])return this;if(!L)return I(this,x),this;var d=this._events[x];if(d.fn)d.fn===L&&(!A||d.once)&&(!C||d.context===C)&&I(this,x);else{for(var o=0,l=[],u=d.length;o<u;o++)(d[o].fn!==L||A&&!d[o].once||C&&d[o].context!==C)&&l.push(d[o]);l.length?this._events[x]=l.length===1?l[0]:l:I(this,x)}return this},R.prototype.removeAllListeners=function(S){var L;return S?(L=P?P+S:S,this._events[L]&&I(this,L)):(this._events=new M,this._eventsCount=0),this},R.prototype.off=R.prototype.removeListener,R.prototype.addListener=R.prototype.on,R.prefixed=P,R.EventEmitter=R,q.exports=R},"./node_modules/url-toolkit/src/url-toolkit.js":function(q,G,D){(function(K){var P=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,M=/^([^\/?#]*)([^]*)$/,U=/(?:\/|^)\.(?=\/)/g,_=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,I={buildAbsoluteURL:function(R,v,S){if(S=S||{},R=R.trim(),v=v.trim(),!v){if(!S.alwaysNormalize)return R;var L=I.parseURL(R);if(!L)throw new Error("Error trying to parse base URL.");return L.path=I.normalizePath(L.path),I.buildURLFromParts(L)}var C=I.parseURL(v);if(!C)throw new Error("Error trying to parse relative URL.");if(C.scheme)return S.alwaysNormalize?(C.path=I.normalizePath(C.path),I.buildURLFromParts(C)):v;var A=I.parseURL(R);if(!A)throw new Error("Error trying to parse base URL.");if(!A.netLoc&&A.path&&A.path[0]!=="/"){var x=M.exec(A.path);A.netLoc=x[1],A.path=x[2]}A.netLoc&&!A.path&&(A.path="/");var d={scheme:A.scheme,netLoc:C.netLoc,path:null,params:C.params,query:C.query,fragment:C.fragment};if(!C.netLoc&&(d.netLoc=A.netLoc,C.path[0]!=="/"))if(!C.path)d.path=A.path,C.params||(d.params=A.params,C.query||(d.query=A.query));else{var o=A.path,l=o.substring(0,o.lastIndexOf("/")+1)+C.path;d.path=I.normalizePath(l)}return d.path===null&&(d.path=S.alwaysNormalize?I.normalizePath(C.path):C.path),I.buildURLFromParts(d)},parseURL:function(R){var v=P.exec(R);return v?{scheme:v[1]||"",netLoc:v[2]||"",path:v[3]||"",params:v[4]||"",query:v[5]||"",fragment:v[6]||""}:null},normalizePath:function(R){for(R=R.split("").reverse().join("").replace(U,"");R.length!==(R=R.replace(_,"")).length;);return R.split("").reverse().join("")},buildURLFromParts:function(R){return R.scheme+R.netLoc+R.path+R.params+R.query+R.fragment}};q.exports=I})(this)},"./node_modules/webworkify-webpack/index.js":function(q,G,D){function K(S){var L={};function C(x){if(L[x])return L[x].exports;var d=L[x]={i:x,l:!1,exports:{}};return S[x].call(d.exports,d,d.exports,C),d.l=!0,d.exports}C.m=S,C.c=L,C.i=function(x){return x},C.d=function(x,d,o){C.o(x,d)||Object.defineProperty(x,d,{configurable:!1,enumerable:!0,get:o})},C.r=function(x){Object.defineProperty(x,"__esModule",{value:!0})},C.n=function(x){var d=x&&x.__esModule?function(){return x.default}:function(){return x};return C.d(d,"a",d),d},C.o=function(x,d){return Object.prototype.hasOwnProperty.call(x,d)},C.p="/",C.oe=function(x){throw console.error(x),x};var A=C(C.s=ENTRY_MODULE);return A.default||A}var P="[\\.|\\-|\\+|\\w|/|@]+",M="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+P+").*?\\)";function U(S){return(S+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function _(S){return!isNaN(1*S)}function I(S,L,C){var A={};A[C]=[];var x=L.toString(),d=x.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!d)return A;for(var o=d[1],l=new RegExp("(\\\\n|\\W)"+U(o)+M,"g"),u;u=l.exec(x);){if(u[3]==="dll-reference")continue;A[C].push(u[3])}for(l=new RegExp("\\("+U(o)+'\\("(dll-reference\\s('+P+'))"\\)\\)'+M,"g");u=l.exec(x);)S[u[2]]||(A[C].push(u[1]),S[u[2]]=D(u[1]).m),A[u[2]]=A[u[2]]||[],A[u[2]].push(u[4]);for(var T=Object.keys(A),m=0;m<T.length;m++)for(var h=0;h<A[T[m]].length;h++)_(A[T[m]][h])&&(A[T[m]][h]=1*A[T[m]][h]);return A}function R(S){var L=Object.keys(S);return L.reduce(function(C,A){return C||S[A].length>0},!1)}function v(S,L){for(var C={main:[L]},A={main:[]},x={main:{}};R(C);)for(var d=Object.keys(C),o=0;o<d.length;o++){var l=d[o],u=C[l],T=u.pop();if(x[l]=x[l]||{},x[l][T]||!S[l][T])continue;x[l][T]=!0,A[l]=A[l]||[],A[l].push(T);for(var m=I(S,S[l][T],l),h=Object.keys(m),w=0;w<h.length;w++)C[h[w]]=C[h[w]]||[],C[h[w]]=C[h[w]].concat(m[h[w]])}return A}q.exports=function(S,L){L=L||{};var C={main:D.m},A=L.all?{main:Object.keys(C.main)}:v(C,S),x="";Object.keys(A).filter(function(T){return T!=="main"}).forEach(function(T){for(var m=0;A[T][m];)m++;A[T].push(m),C[T][m]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",x=x+"var "+T+" = ("+K.toString().replace("ENTRY_MODULE",JSON.stringify(m))+")({"+A[T].map(function(h){return""+JSON.stringify(h)+": "+C[T][h].toString()}).join(",")+`});
|
|
`}),x=x+"new (("+K.toString().replace("ENTRY_MODULE",JSON.stringify(S))+")({"+A.main.map(function(T){return""+JSON.stringify(T)+": "+C.main[T].toString()}).join(",")+"}))(self);";var d=new window.Blob([x],{type:"text/javascript"});if(L.bare)return d;var o=window.URL||window.webkitURL||window.mozURL||window.msURL,l=o.createObjectURL(d),u=new window.Worker(l);return u.objectURL=l,u}},"./src/config.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"hlsDefaultConfig",function(){return w}),D.d(G,"mergeConfig",function(){return f}),D.d(G,"enableStreamingMode",function(){return c});var K=D("./src/controller/abr-controller.ts"),P=D("./src/controller/audio-stream-controller.ts"),M=D("./src/controller/audio-track-controller.ts"),U=D("./src/controller/subtitle-stream-controller.ts"),_=D("./src/controller/subtitle-track-controller.ts"),I=D("./src/controller/buffer-controller.ts"),R=D("./src/controller/timeline-controller.ts"),v=D("./src/controller/cap-level-controller.ts"),S=D("./src/controller/fps-controller.ts"),L=D("./src/controller/eme-controller.ts"),C=D("./src/controller/cmcd-controller.ts"),A=D("./src/utils/xhr-loader.ts"),x=D("./src/utils/fetch-loader.ts"),d=D("./src/utils/cues.ts"),o=D("./src/utils/mediakeys-helper.ts"),l=D("./src/utils/logger.ts");function u(){return u=Object.assign||function(s){for(var a=1;a<arguments.length;a++){var g=arguments[a];for(var p in g)Object.prototype.hasOwnProperty.call(g,p)&&(s[p]=g[p])}return s},u.apply(this,arguments)}function T(s,a){var g=Object.keys(s);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(s);a&&(p=p.filter(function(E){return Object.getOwnPropertyDescriptor(s,E).enumerable})),g.push.apply(g,p)}return g}function m(s){for(var a=1;a<arguments.length;a++){var g=arguments[a]!=null?arguments[a]:{};a%2?T(Object(g),!0).forEach(function(p){h(s,p,g[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(g)):T(Object(g)).forEach(function(p){Object.defineProperty(s,p,Object.getOwnPropertyDescriptor(g,p))})}return s}function h(s,a,g){return a in s?Object.defineProperty(s,a,{value:g,enumerable:!0,configurable:!0,writable:!0}):s[a]=g,s}var w=m(m({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,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:A.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:K.default,bufferController:I.default,capLevelController:v.default,fpsController:S.default,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:o.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},y()),{},{subtitleStreamController:U.SubtitleStreamController,subtitleTrackController:_.default,timelineController:R.TimelineController,audioStreamController:P.default,audioTrackController:M.default,emeController:L.default,cmcdController:C.default});function y(){return{cueHandler:d.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function f(s,a){if((a.liveSyncDurationCount||a.liveMaxLatencyDurationCount)&&(a.liveSyncDuration||a.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(a.liveMaxLatencyDurationCount!==void 0&&(a.liveSyncDurationCount===void 0||a.liveMaxLatencyDurationCount<=a.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(a.liveMaxLatencyDuration!==void 0&&(a.liveSyncDuration===void 0||a.liveMaxLatencyDuration<=a.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return u({},s,a)}function c(s){var a=s.loader;if(a!==x.default&&a!==A.default)l.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),s.progressive=!1;else{var g=Object(x.fetchSupported)();g&&(s.loader=x.default,s.progressive=!0,s.enableSoftwareAES=!0,l.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/polyfills/number.ts"),P=D("./src/utils/ewma-bandwidth-estimator.ts"),M=D("./src/events.ts"),U=D("./src/utils/buffer-helper.ts"),_=D("./src/errors.ts"),I=D("./src/types/loader.ts"),R=D("./src/utils/logger.ts");function v(C,A){for(var x=0;x<A.length;x++){var d=A[x];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(C,d.key,d)}}function S(C,A,x){return A&&v(C.prototype,A),x&&v(C,x),C}var L=function(){function C(x){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=x;var d=x.config;this.bwEstimator=new P.default(d.abrEwmaSlowVoD,d.abrEwmaFastVoD,d.abrEwmaDefaultEstimate),this.registerListeners()}var A=C.prototype;return A.registerListeners=function(){var d=this.hls;d.on(M.Events.FRAG_LOADING,this.onFragLoading,this),d.on(M.Events.FRAG_LOADED,this.onFragLoaded,this),d.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on(M.Events.ERROR,this.onError,this)},A.unregisterListeners=function(){var d=this.hls;d.off(M.Events.FRAG_LOADING,this.onFragLoading,this),d.off(M.Events.FRAG_LOADED,this.onFragLoaded,this),d.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off(M.Events.ERROR,this.onError,this)},A.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},A.onFragLoading=function(d,o){var l=o.frag;if(l.type===I.PlaylistLevelType.MAIN&&!this.timer){var u;this.fragCurrent=l,this.partCurrent=(u=o.part)!=null?u:null,this.timer=self.setInterval(this.onCheck,100)}},A.onLevelLoaded=function(d,o){var l=this.hls.config;o.details.live?this.bwEstimator.update(l.abrEwmaSlowLive,l.abrEwmaFastLive):this.bwEstimator.update(l.abrEwmaSlowVoD,l.abrEwmaFastVoD)},A._abandonRulesCheck=function(){var d=this.fragCurrent,o=this.partCurrent,l=this.hls,u=l.autoLevelEnabled,T=l.config,m=l.media;if(!d||!m)return;var h=o?o.stats:d.stats,w=o?o.duration:d.duration;if(h.aborted){R.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!u||m.paused||!m.playbackRate||!m.readyState)return;var y=performance.now()-h.loading.start,f=Math.abs(m.playbackRate);if(y<=500*w/f)return;var c=l.levels,s=l.minAutoLevel,a=c[d.level],g=h.total||Math.max(h.loaded,Math.round(w*a.maxBitrate/8)),p=Math.max(1,h.bwEstimate?h.bwEstimate/8:h.loaded*1e3/y),E=(g-h.loaded)/p,O=m.currentTime,B=(U.BufferHelper.bufferInfo(m,O,T.maxBufferHole).end-O)/f;if(B>=2*w/f||E<=B)return;var W=Number.POSITIVE_INFINITY,Q;for(Q=d.level-1;Q>s;Q--){var F=c[Q].maxBitrate;if(W=w*F/(8*.8*p),W<B)break}if(W>=E)return;var N=this.bwEstimator.getEstimate();R.logger.warn("Fragment "+d.sn+(o?" part "+o.index:"")+" of level "+d.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+Q+`
|
|
Current BW estimate: `+(Object(K.isFiniteNumber)(N)?(N/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+E.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+W.toFixed(3)+` s
|
|
Time to underbuffer: `+B.toFixed(3)+" s"),l.nextLoadLevel=Q,this.bwEstimator.sample(y,h.loaded),this.clearTimer(),d.loader&&(this.fragCurrent=this.partCurrent=null,d.loader.abort()),l.trigger(M.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:d,part:o,stats:h})},A.onFragLoaded=function(d,o){var l=o.frag,u=o.part;if(l.type===I.PlaylistLevelType.MAIN&&Object(K.isFiniteNumber)(l.sn)){var T=u?u.stats:l.stats,m=u?u.duration:l.duration;if(this.clearTimer(),this.lastLoadedFragLevel=l.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var h=this.hls.levels[l.level],w=(h.loaded?h.loaded.bytes:0)+T.loaded,y=(h.loaded?h.loaded.duration:0)+m;h.loaded={bytes:w,duration:y},h.realBitrate=Math.round(8*w/y)}if(l.bitrateTest){var f={stats:T,frag:l,part:u,id:l.type};this.onFragBuffered(M.Events.FRAG_BUFFERED,f),l.bitrateTest=!1}}},A.onFragBuffered=function(d,o){var l=o.frag,u=o.part,T=u?u.stats:l.stats;if(T.aborted)return;if(l.type!==I.PlaylistLevelType.MAIN||l.sn==="initSegment")return;var m=T.parsing.end-T.loading.start;this.bwEstimator.sample(m,T.loaded),T.bwEstimate=this.bwEstimator.getEstimate(),l.bitrateTest?this.bitrateTestDelay=m/1e3:this.bitrateTestDelay=0},A.onError=function(d,o){switch(o.details){case _.ErrorDetails.FRAG_LOAD_ERROR:case _.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},A.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},A.getNextABRAutoLevel=function(){var d=this.fragCurrent,o=this.partCurrent,l=this.hls,u=l.maxAutoLevel,T=l.config,m=l.minAutoLevel,h=l.media,w=o?o.duration:d?d.duration:0,y=h?h.currentTime:0,f=h&&h.playbackRate!==0?Math.abs(h.playbackRate):1,c=this.bwEstimator?this.bwEstimator.getEstimate():T.abrEwmaDefaultEstimate,s=(U.BufferHelper.bufferInfo(h,y,T.maxBufferHole).end-y)/f,a=this.findBestLevel(c,m,u,s,T.abrBandWidthFactor,T.abrBandWidthUpFactor);if(a>=0)return a;R.logger.trace((s?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var g=w?Math.min(w,T.maxStarvationDelay):T.maxStarvationDelay,p=T.abrBandWidthFactor,E=T.abrBandWidthUpFactor;if(!s){var O=this.bitrateTestDelay;if(O){var B=w?Math.min(w,T.maxLoadingDelay):T.maxLoadingDelay;g=B-O,R.logger.trace("bitrate test took "+Math.round(1e3*O)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*g)+" ms"),p=E=1}}return a=this.findBestLevel(c,m,u,s+g,p,E),Math.max(a,0)},A.findBestLevel=function(d,o,l,u,T,m){for(var h,w=this.fragCurrent,y=this.partCurrent,f=this.lastLoadedFragLevel,c=this.hls.levels,s=c[f],a=!!(s!=null&&(h=s.details)!==null&&h!==void 0&&h.live),g=s==null?void 0:s.codecSet,p=y?y.duration:w?w.duration:0,E=l;E>=o;E--){var O=c[E];if(!O||g&&O.codecSet!==g)continue;var B=O.details,W=(y?B==null?void 0:B.partTarget:B==null?void 0:B.averagetargetduration)||p,Q=void 0;E<=f?Q=T*d:Q=m*d;var F=c[E].maxBitrate,N=F*W/Q;if(R.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+E+"/"+Math.round(Q)+"/"+F+"/"+W+"/"+u+"/"+N),Q>F&&(!N||a&&!this.bitrateTestDelay||N<u))return E}return-1},S(C,[{key:"nextAutoLevel",get:function(){var d=this._nextAutoLevel,o=this.bwEstimator;if(d!==-1&&(!o||!o.canEstimate()))return d;var l=this.getNextABRAutoLevel();return d!==-1&&(l=Math.min(d,l)),l},set:function(d){this._nextAutoLevel=d}}]),C}();G.default=L},"./src/controller/audio-stream-controller.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/polyfills/number.ts"),P=D("./src/controller/base-stream-controller.ts"),M=D("./src/events.ts"),U=D("./src/utils/buffer-helper.ts"),_=D("./src/controller/fragment-tracker.ts"),I=D("./src/types/level.ts"),R=D("./src/types/loader.ts"),v=D("./src/loader/fragment.ts"),S=D("./src/demux/chunk-cache.ts"),L=D("./src/demux/transmuxer-interface.ts"),C=D("./src/types/transmuxer.ts"),A=D("./src/controller/fragment-finders.ts"),x=D("./src/utils/discontinuities.ts"),d=D("./src/errors.ts"),o=D("./src/utils/logger.ts");function l(){return l=Object.assign||function(w){for(var y=1;y<arguments.length;y++){var f=arguments[y];for(var c in f)Object.prototype.hasOwnProperty.call(f,c)&&(w[c]=f[c])}return w},l.apply(this,arguments)}function u(w,y){w.prototype=Object.create(y.prototype),w.prototype.constructor=w,T(w,y)}function T(w,y){return T=Object.setPrototypeOf||function(c,s){return c.__proto__=s,c},T(w,y)}var m=100,h=function(w){u(y,w);function y(c,s){var a;return a=w.call(this,c,s,"[audio-stream-controller]")||this,a.videoBuffer=null,a.videoTrackCC=-1,a.waitingVideoCC=-1,a.audioSwitch=!1,a.trackId=-1,a.waitingData=null,a.mainDetails=null,a.bufferFlushed=!1,a._registerListeners(),a}var f=y.prototype;return f.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},f._registerListeners=function(){var s=this.hls;s.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.on(M.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),s.on(M.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),s.on(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.on(M.Events.ERROR,this.onError,this),s.on(M.Events.BUFFER_RESET,this.onBufferReset,this),s.on(M.Events.BUFFER_CREATED,this.onBufferCreated,this),s.on(M.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),s.on(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this)},f._unregisterListeners=function(){var s=this.hls;s.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.off(M.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),s.off(M.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),s.off(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.off(M.Events.ERROR,this.onError,this),s.off(M.Events.BUFFER_RESET,this.onBufferReset,this),s.off(M.Events.BUFFER_CREATED,this.onBufferCreated,this),s.off(M.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),s.off(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this)},f.onInitPtsFound=function(s,a){var g=a.frag,p=a.id,E=a.initPTS;if(p==="main"){var O=g.cc;this.initPTS[g.cc]=E,this.log("InitPTS for cc: "+O+" found from main: "+E),this.videoTrackCC=O,this.state===P.State.WAITING_INIT_PTS&&this.tick()}},f.startLoad=function(s){if(!this.levels){this.startPosition=s,this.state=P.State.STOPPED;return}var a=this.lastCurrentTime;this.stopLoad(),this.setInterval(m),this.fragLoadError=0,a>0&&s===-1?(this.log("Override startPosition with lastCurrentTime @"+a.toFixed(3)),this.state=P.State.IDLE):(this.loadedmetadata=!1,this.state=P.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=s,this.tick()},f.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_TRACK:{var s,a=this.levels,g=this.trackId,p=a==null||((s=a[g])===null||s===void 0)?void 0:s.details;if(p){if(this.waitForCdnTuneIn(p))break;this.state=P.State.WAITING_INIT_PTS}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var E,O=performance.now(),B=this.retryDate;(!B||O>=B||(E=this.media)!==null&&E!==void 0&&E.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=P.State.IDLE);break}case P.State.WAITING_INIT_PTS:{var W=this.waitingData;if(W){var Q=W.frag,F=W.part,N=W.cache,X=W.complete;if(this.initPTS[Q.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.FRAG_LOADING;var ee=N.flush(),oe={frag:Q,part:F,payload:ee,networkDetails:null};this._handleFragmentLoadProgress(oe),X&&w.prototype._handleFragmentLoadComplete.call(this,oe)}else if(this.videoTrackCC!==this.waitingVideoCC)o.logger.log("Waiting fragment cc ("+Q.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var de=this.getLoadPosition(),Ce=U.BufferHelper.bufferInfo(this.mediaBuffer,de,this.config.maxBufferHole),ge=Object(A.fragmentWithinToleranceTest)(Ce.end,this.config.maxFragLookUpTolerance,Q);ge<0&&(o.logger.log("Waiting fragment cc ("+Q.cc+") @ "+Q.start+" cancelled because another fragment at "+Ce.end+" is needed"),this.clearWaitingFragment())}}else this.state=P.State.IDLE}}this.onTickEnd()},f.clearWaitingFragment=function(){var s=this.waitingData;s&&(this.fragmentTracker.removeFragment(s.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.IDLE)},f.onTickEnd=function(){var s=this.media;if(!s||!s.readyState)return;var a=this.mediaBuffer?this.mediaBuffer:s,g=a.buffered;!this.loadedmetadata&&g.length&&(this.loadedmetadata=!0),this.lastCurrentTime=s.currentTime},f.doTickIdle=function(){var s,a,g=this.hls,p=this.levels,E=this.media,O=this.trackId,B=g.config;if(!p||!p[O])return;if(!E&&(this.startFragRequested||!B.startFragPrefetch))return;var W=p[O],Q=W.details;if(!Q||Q.live&&this.levelLastLoaded!==O||this.waitForCdnTuneIn(Q)){this.state=P.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,v.ElementaryStreamTypes.AUDIO,R.PlaylistLevelType.AUDIO));var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,R.PlaylistLevelType.AUDIO);if(F===null)return;var N=F.len,X=this.getMaxBufferLength(),ee=this.audioSwitch;if(N>=X&&!ee)return;if(!ee&&this._streamEnded(F,Q)){g.trigger(M.Events.BUFFER_EOS,{type:"audio"}),this.state=P.State.ENDED;return}var oe=Q.fragments,de=oe[0].start,Ce=F.end;if(ee){var ge=this.getLoadPosition();Ce=ge,Q.PTSKnown&&ge<de&&((F.end>de||F.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),E.currentTime=de+.05))}var fe=this.getNextFragment(Ce,Q);if(!fe){this.bufferFlushed=!0;return}((s=fe.decryptdata)===null||s===void 0?void 0:s.keyFormat)==="identity"&&!((a=fe.decryptdata)!==null&&a!==void 0&&a.key)?this.loadKey(fe,Q):this.loadFragment(fe,Q,Ce)},f.getMaxBufferLength=function(){var s=w.prototype.getMaxBufferLength.call(this),a=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,R.PlaylistLevelType.MAIN);return a===null?s:Math.max(s,a.len)},f.onMediaDetaching=function(){this.videoBuffer=null,w.prototype.onMediaDetaching.call(this)},f.onAudioTracksUpdated=function(s,a){var g=a.audioTracks;this.resetTransmuxer(),this.levels=g.map(function(p){return new I.Level(p)})},f.onAudioTrackSwitching=function(s,a){var g=!!a.url;this.trackId=a.id;var p=this.fragCurrent;p!=null&&p.loader&&p.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),g?this.setInterval(m):this.resetTransmuxer(),g?(this.audioSwitch=!0,this.state=P.State.IDLE):this.state=P.State.STOPPED,this.tick()},f.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},f.onLevelLoaded=function(s,a){this.mainDetails=a.details},f.onAudioTrackLoaded=function(s,a){var g,p=this.levels,E=a.details,O=a.id;if(!p){this.warn("Audio tracks were reset while loading level "+O);return}this.log("Track "+O+" loaded ["+E.startSN+","+E.endSN+"],duration:"+E.totalduration);var B=p[O],W=0;if(E.live||(g=B.details)!==null&&g!==void 0&&g.live){var Q=this.mainDetails;if(E.fragments[0]||(E.deltaUpdateFailed=!0),E.deltaUpdateFailed||!Q)return;!B.details&&E.hasProgramDateTime&&Q.hasProgramDateTime?(Object(x.alignMediaPlaylistByPDT)(E,Q),W=E.fragments[0].start):W=this.alignPlaylists(E,B.details)}B.details=E,this.levelLastLoaded=O,!this.startFragRequested&&(this.mainDetails||!E.live)&&this.setStartPosition(B.details,W),this.state===P.State.WAITING_TRACK&&!this.waitForCdnTuneIn(E)&&(this.state=P.State.IDLE),this.tick()},f._handleFragmentLoadProgress=function(s){var a,g=s.frag,p=s.part,E=s.payload,O=this.config,B=this.trackId,W=this.levels;if(!W){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+g.sn+" of level "+g.level+" will not be buffered");return}var Q=W[B];console.assert(Q,"Audio track is defined on fragment load progress");var F=Q.details;console.assert(F,"Audio track details are defined on fragment load progress");var N=O.defaultAudioCodec||Q.audioCodec||"mp4a.40.2",X=this.transmuxer;X||(X=this.transmuxer=new L.default(this.hls,R.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ee=this.initPTS[g.cc],oe=(a=g.initSegment)===null||a===void 0?void 0:a.data;if(ee!==void 0){var de=!1,Ce=p?p.index:-1,ge=Ce!==-1,fe=new C.ChunkMetadata(g.level,g.sn,g.stats.chunkCount,E.byteLength,Ce,ge);X.push(E,oe,N,"",g,p,F.totalduration,de,fe,ee)}else{o.logger.log("Unknown video PTS for cc "+g.cc+", waiting for video PTS before demuxing audio frag "+g.sn+" of ["+F.startSN+" ,"+F.endSN+"],track "+B);var me=this.waitingData=this.waitingData||{frag:g,part:p,cache:new S.default,complete:!1},pe=me.cache;pe.push(new Uint8Array(E)),this.waitingVideoCC=this.videoTrackCC,this.state=P.State.WAITING_INIT_PTS}},f._handleFragmentLoadComplete=function(s){if(this.waitingData){this.waitingData.complete=!0;return}w.prototype._handleFragmentLoadComplete.call(this,s)},f.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},f.onBufferCreated=function(s,a){var g=a.tracks.audio;g&&(this.mediaBuffer=g.buffer),a.tracks.video&&(this.videoBuffer=a.tracks.video.buffer)},f.onFragBuffered=function(s,a){var g=a.frag,p=a.part;if(g.type!==R.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(g)){this.warn("Fragment "+g.sn+(p?" p: "+p.index:"")+" of level "+g.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}g.sn!=="initSegment"&&(this.fragPrevious=g,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(g,p)},f.onError=function(s,a){switch(a.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(R.PlaylistLevelType.AUDIO,a);break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==P.State.ERROR&&this.state!==P.State.STOPPED&&(this.state=a.fatal?P.State.ERROR:P.State.IDLE,this.warn(a.details+" while loading frag, switching to "+this.state+" state"));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if(a.parent==="audio"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var g=!0,p=this.getFwdBufferInfo(this.mediaBuffer,R.PlaylistLevelType.AUDIO);p&&p.len>.5&&(g=!this.reduceMaxBufferLength(p.len)),g&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,w.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},f.onBufferFlushed=function(s,a){var g=a.type;g===v.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},f._handleTransmuxComplete=function(s){var a,g="audio",p=this.hls,E=s.remuxResult,O=s.chunkMeta,B=this.getCurrentContext(O);if(!B){this.warn("The loading context changed while buffering fragment "+O.sn+" of level "+O.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(O.level);return}var W=B.frag,Q=B.part,F=E.audio,N=E.text,X=E.id3,ee=E.initSegment;if(this.fragContextChanged(W))return;if(this.state=P.State.PARSING,this.audioSwitch&&F&&this.completeAudioSwitch(),ee!=null&&ee.tracks&&(this._bufferInitSegment(ee.tracks,W,O),p.trigger(M.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:g,tracks:ee.tracks})),F){var oe=F.startPTS,de=F.endPTS,Ce=F.startDTS,ge=F.endDTS;Q&&(Q.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:de,startDTS:Ce,endDTS:ge}),W.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,oe,de,Ce,ge),this.bufferFragmentData(F,W,Q,O)}if(X!=null&&(a=X.samples)!==null&&a!==void 0&&a.length){var fe=l({frag:W,id:g},X);p.trigger(M.Events.FRAG_PARSING_METADATA,fe)}if(N){var me=l({frag:W,id:g},N);p.trigger(M.Events.FRAG_PARSING_USERDATA,me)}},f._bufferInitSegment=function(s,a,g){if(this.state!==P.State.PARSING)return;s.video&&delete s.video;var p=s.audio;if(!p)return;p.levelCodec=p.codec,p.id="audio",this.log("Init audio buffer, container:"+p.container+", codecs[parsed]=["+p.codec+"]"),this.hls.trigger(M.Events.BUFFER_CODECS,s);var E=p.initSegment;if(E!=null&&E.byteLength){var O={type:"audio",frag:a,part:null,chunkMeta:g,parent:a.type,data:E};this.hls.trigger(M.Events.BUFFER_APPENDING,O)}this.tick()},f.loadFragment=function(s,a,g){var p=this.fragmentTracker.getState(s);this.fragCurrent=s,(this.audioSwitch||p===_.FragmentState.NOT_LOADED||p===_.FragmentState.PARTIAL)&&(s.sn==="initSegment"?this._loadInitSegment(s):a.live&&!Object(K.isFiniteNumber)(this.initPTS[s.cc])?(this.log("Waiting for video PTS in continuity counter "+s.cc+" of live stream before loading audio fragment "+s.sn+" of level "+this.trackId),this.state=P.State.WAITING_INIT_PTS):(this.startFragRequested=!0,w.prototype.loadFragment.call(this,s,a,g)))},f.completeAudioSwitch=function(){var s=this.hls,a=this.media,g=this.trackId;a&&(this.log("Switching audio track : flushing all audio"),w.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,s.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:g})},y}(P.default);G.default=h},"./src/controller/audio-track-controller.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/events.ts"),P=D("./src/errors.ts"),M=D("./src/controller/base-playlist-controller.ts"),U=D("./src/types/loader.ts");function _(L,C){for(var A=0;A<C.length;A++){var x=C[A];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(L,x.key,x)}}function I(L,C,A){return C&&_(L.prototype,C),A&&_(L,A),L}function R(L,C){L.prototype=Object.create(C.prototype),L.prototype.constructor=L,v(L,C)}function v(L,C){return v=Object.setPrototypeOf||function(x,d){return x.__proto__=d,x},v(L,C)}var S=function(L){R(C,L);function C(x){var d;return d=L.call(this,x,"[audio-track-controller]")||this,d.tracks=[],d.groupId=null,d.tracksInGroup=[],d.trackId=-1,d.trackName="",d.selectDefaultTrack=!0,d.registerListeners(),d}var A=C.prototype;return A.registerListeners=function(){var d=this.hls;d.on(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.on(K.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(K.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.on(K.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.on(K.Events.ERROR,this.onError,this)},A.unregisterListeners=function(){var d=this.hls;d.off(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.off(K.Events.LEVEL_LOADING,this.onLevelLoading,this),d.off(K.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.off(K.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.off(K.Events.ERROR,this.onError,this)},A.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,L.prototype.destroy.call(this)},A.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},A.onManifestParsed=function(d,o){this.tracks=o.audioTracks||[]},A.onAudioTrackLoaded=function(d,o){var l=o.id,u=o.details,T=this.tracksInGroup[l];if(!T){this.warn("Invalid audio track id "+l);return}var m=T.details;T.details=o.details,this.log("audioTrack "+l+" loaded ["+u.startSN+"-"+u.endSN+"]"),l===this.trackId&&(this.retryCount=0,this.playlistLoaded(l,o,m))},A.onLevelLoading=function(d,o){this.switchLevel(o.level)},A.onLevelSwitching=function(d,o){this.switchLevel(o.level)},A.switchLevel=function(d){var o=this.hls.levels[d];if(!(o!=null&&o.audioGroupIds))return;var l=o.audioGroupIds[o.urlId];if(this.groupId!==l){this.groupId=l;var u=this.tracks.filter(function(m){return!l||m.groupId===l});this.selectDefaultTrack&&!u.some(function(m){return m.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=u;var T={audioTracks:u};this.log("Updating audio tracks, "+u.length+' track(s) found in "'+l+'" group-id'),this.hls.trigger(K.Events.AUDIO_TRACKS_UPDATED,T),this.selectInitialTrack()}},A.onError=function(d,o){if(L.prototype.onError.call(this,d,o),o.fatal||!o.context)return;o.context.type===U.PlaylistContextType.AUDIO_TRACK&&o.context.id===this.trackId&&o.context.groupId===this.groupId&&this.retryLoadingOrFail(o)},A.setAudioTrack=function(d){var o=this.tracksInGroup;if(d<0||d>=o.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var l=o[this.trackId];this.log("Now switching to audio-track index "+d);var u=o[d],T=u.id,m=u.groupId,h=m===void 0?"":m,w=u.name,y=u.type,f=u.url;if(this.trackId=d,this.trackName=w,this.selectDefaultTrack=!1,this.hls.trigger(K.Events.AUDIO_TRACK_SWITCHING,{id:T,groupId:h,name:w,type:y,url:f}),u.details&&!u.details.live)return;var c=this.switchParams(u.url,l==null?void 0:l.details);this.loadPlaylist(c)},A.selectInitialTrack=function(){var d=this.tracksInGroup;console.assert(d.length,"Initial audio track should be selected when tracks are known");var o=this.trackName,l=this.findTrackId(o)||this.findTrackId();l!==-1?this.setAudioTrack(l):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(K.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},A.findTrackId=function(d){for(var o=this.tracksInGroup,l=0;l<o.length;l++){var u=o[l];if((!this.selectDefaultTrack||u.default)&&(!d||d===u.name))return u.id}return-1},A.loadPlaylist=function(d){var o=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(o)){var l=o.id,u=o.groupId,T=o.url;if(d)try{T=d.addDirectives(T)}catch(m){this.warn("Could not construct new URL with HLS Delivery Directives: "+m)}this.log("loading audio-track playlist for id: "+l),this.clearTimer(),this.hls.trigger(K.Events.AUDIO_TRACK_LOADING,{url:T,id:l,groupId:u,deliveryDirectives:d||null})}},I(C,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(d){this.selectDefaultTrack=!1,this.setAudioTrack(d)}}]),C}(M.default);G.default=S},"./src/controller/base-playlist-controller.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return I});var K=D("./src/polyfills/number.ts"),P=D("./src/types/level.ts"),M=D("./src/controller/level-helper.ts"),U=D("./src/utils/logger.ts"),_=D("./src/errors.ts"),I=function(){function R(S,L){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=U.logger.log.bind(U.logger,L+":"),this.warn=U.logger.warn.bind(U.logger,L+":"),this.hls=S}var v=R.prototype;return v.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},v.onError=function(L,C){C.fatal&&C.type===_.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},v.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},v.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},v.stopLoad=function(){this.canLoad=!1,this.clearTimer()},v.switchParams=function(L,C){var A=C==null?void 0:C.renditionReports;if(A)for(var x=0;x<A.length;x++){var d=A[x],o=""+d.URI;if(o===L.substr(-o.length)){var l=parseInt(d["LAST-MSN"]),u=parseInt(d["LAST-PART"]);if(C&&this.hls.config.lowLatencyMode){var T=Math.min(C.age-C.partTarget,C.targetduration);u!==void 0&&T>C.partTarget&&(u+=1)}if(Object(K.isFiniteNumber)(l))return new P.HlsUrlParameters(l,Object(K.isFiniteNumber)(u)?u:void 0,P.HlsSkip.No)}}},v.loadPlaylist=function(L){},v.shouldLoadTrack=function(L){return this.canLoad&&L&&!!L.url&&(!L.details||L.details.live)},v.playlistLoaded=function(L,C,A){var x=this,d=C.details,o=C.stats,l=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(d.advancedDateTime=Date.now()-l,d.live||A!=null&&A.live){if(d.reloaded(A),A&&this.log("live playlist "+L+" "+(d.advanced?"REFRESHED "+d.lastPartSn+"-"+d.lastPartIndex:"MISSED")),A&&d.fragments.length>0&&Object(M.mergeDetails)(A,d),!this.canLoad||!d.live)return;var u,T=void 0,m=void 0;if(d.canBlockReload&&d.endSN&&d.advanced){var h=this.hls.config.lowLatencyMode,w=d.lastPartSn,y=d.endSN,f=d.lastPartIndex,c=f!==-1,s=w===y,a=h?0:f;c?(T=s?y+1:w,m=s?a:f+1):T=y+1;var g=d.age,p=g+d.ageHeader,E=Math.min(p-d.partTarget,d.targetduration*1.5);if(E>0){if(A&&E>A.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+A.tuneInGoal+" to: "+E+" with playlist age: "+d.age),E=0;else{var O=Math.floor(E/d.targetduration);if(T+=O,m!==void 0){var B=Math.round(E%d.targetduration/d.partTarget);m+=B}this.log("CDN Tune-in age: "+d.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+E+" skip sn "+O+" to part "+m)}d.tuneInGoal=E}if(u=this.getDeliveryDirectives(d,C.deliveryDirectives,T,m),h||!s){this.loadPlaylist(u);return}}else u=this.getDeliveryDirectives(d,C.deliveryDirectives,T,m);var W=Object(M.computeReloadInterval)(d,o);T!==void 0&&d.canBlockReload&&(W-=d.partTarget||1),this.log("reload live playlist "+L+" in "+Math.round(W)+" ms"),this.timer=self.setTimeout(function(){return x.loadPlaylist(u)},W)}else this.clearTimer()},v.getDeliveryDirectives=function(L,C,A,x){var d=Object(P.getSkipValue)(L,A);return C!=null&&C.skip&&L.deltaUpdateFailed&&(A=C.msn,x=C.part,d=P.HlsSkip.No),new P.HlsUrlParameters(A,x,d)},v.retryLoadingOrFail=function(L){var C=this,A=this.hls.config,x=this.retryCount<A.levelLoadingMaxRetry;if(x){var d;if(this.retryCount++,L.details.indexOf("LoadTimeOut")>-1&&(d=L.context)!==null&&d!==void 0&&d.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+L.details+'"'),this.loadPlaylist();else{var o=Math.min(Math.pow(2,this.retryCount)*A.levelLoadingRetryDelay,A.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return C.loadPlaylist()},o),this.warn("retry playlist loading #"+this.retryCount+" in "+o+' ms after "'+L.details+'"')}}else this.warn('cannot recover from error "'+L.details+'"'),this.clearTimer(),L.fatal=!0;return x},R}()},"./src/controller/base-stream-controller.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"State",function(){return y}),D.d(G,"default",function(){return f});var K=D("./src/polyfills/number.ts"),P=D("./src/task-loop.ts"),M=D("./src/controller/fragment-tracker.ts"),U=D("./src/utils/buffer-helper.ts"),_=D("./src/utils/logger.ts"),I=D("./src/events.ts"),R=D("./src/errors.ts"),v=D("./src/types/transmuxer.ts"),S=D("./src/utils/mp4-tools.ts"),L=D("./src/utils/discontinuities.ts"),C=D("./src/controller/fragment-finders.ts"),A=D("./src/controller/level-helper.ts"),x=D("./src/loader/fragment-loader.ts"),d=D("./src/crypt/decrypter.ts"),o=D("./src/utils/time-ranges.ts"),l=D("./src/types/loader.ts");function u(c,s){for(var a=0;a<s.length;a++){var g=s[a];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(c,g.key,g)}}function T(c,s,a){return s&&u(c.prototype,s),a&&u(c,a),c}function m(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function h(c,s){c.prototype=Object.create(s.prototype),c.prototype.constructor=c,w(c,s)}function w(c,s){return w=Object.setPrototypeOf||function(g,p){return g.__proto__=p,g},w(c,s)}var y={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},f=function(c){h(s,c);function s(g,p,E){var O;return O=c.call(this)||this,O.hls=void 0,O.fragPrevious=null,O.fragCurrent=null,O.fragmentTracker=void 0,O.transmuxer=null,O._state=y.STOPPED,O.media=void 0,O.mediaBuffer=void 0,O.config=void 0,O.bitrateTest=!1,O.lastCurrentTime=0,O.nextLoadPosition=0,O.startPosition=0,O.loadedmetadata=!1,O.fragLoadError=0,O.retryDate=0,O.levels=null,O.fragmentLoader=void 0,O.levelLastLoaded=null,O.startFragRequested=!1,O.decrypter=void 0,O.initPTS=[],O.onvseeking=null,O.onvended=null,O.logPrefix="",O.log=void 0,O.warn=void 0,O.logPrefix=E,O.log=_.logger.log.bind(_.logger,E+":"),O.warn=_.logger.warn.bind(_.logger,E+":"),O.hls=g,O.fragmentLoader=new x.default(g.config),O.fragmentTracker=p,O.config=g.config,O.decrypter=new d.default(g,g.config),g.on(I.Events.KEY_LOADED,O.onKeyLoaded,m(O)),O}var a=s.prototype;return a.doTick=function(){this.onTickEnd()},a.onTickEnd=function(){},a.startLoad=function(p){},a.stopLoad=function(){this.fragmentLoader.abort();var p=this.fragCurrent;p&&this.fragmentTracker.removeFragment(p),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=y.STOPPED},a._streamEnded=function(p,E){var O=this.fragCurrent,B=this.fragmentTracker;if(!E.live&&O&&O.sn===E.endSN&&!p.nextStart){var W=B.getState(O);return W===M.FragmentState.PARTIAL||W===M.FragmentState.OK}return!1},a.onMediaAttached=function(p,E){var O=this.media=this.mediaBuffer=E.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),O.addEventListener("seeking",this.onvseeking),O.addEventListener("ended",this.onvended);var B=this.config;this.levels&&B.autoStartLoad&&this.state===y.STOPPED&&this.startLoad(B.startPosition)},a.onMediaDetaching=function(){var p=this.media;p!=null&&p.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),p&&(p.removeEventListener("seeking",this.onvseeking),p.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},a.onMediaSeeking=function(){var p=this.config,E=this.fragCurrent,O=this.media,B=this.mediaBuffer,W=this.state,Q=O?O.currentTime:0,F=U.BufferHelper.bufferInfo(B||O,Q,p.maxBufferHole);if(this.log("media seeking to "+(Object(K.isFiniteNumber)(Q)?Q.toFixed(3):Q)+", state: "+W),W===y.ENDED)this.resetLoadingState();else if(E&&!F.len){var N=p.maxFragLookUpTolerance,X=E.start-N,ee=E.start+E.duration+N,oe=Q>ee;(Q<X||oe)&&(oe&&E.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),E.loader.abort()),this.resetLoadingState())}O&&(this.lastCurrentTime=Q),!this.loadedmetadata&&!F.len&&(this.nextLoadPosition=this.startPosition=Q),this.tickImmediate()},a.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},a.onKeyLoaded=function(p,E){if(this.state!==y.KEY_LOADING||E.frag!==this.fragCurrent||!this.levels)return;this.state=y.IDLE;var O=this.levels[E.frag.level].details;O&&this.loadFragment(E.frag,O,E.frag.start)},a.onHandlerDestroying=function(){this.stopLoad(),c.prototype.onHandlerDestroying.call(this)},a.onHandlerDestroyed=function(){this.state=y.STOPPED,this.hls.off(I.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,c.prototype.onHandlerDestroyed.call(this)},a.loadKey=function(p,E){this.log("Loading key for "+p.sn+" of ["+E.startSN+"-"+E.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+p.level),this.state=y.KEY_LOADING,this.fragCurrent=p,this.hls.trigger(I.Events.KEY_LOADING,{frag:p})},a.loadFragment=function(p,E,O){this._loadFragForPlayback(p,E,O)},a._loadFragForPlayback=function(p,E,O){var B=this,W=function(F){if(B.fragContextChanged(p)){B.warn("Fragment "+p.sn+(F.part?" p: "+F.part.index:"")+" of level "+p.level+" was dropped during download."),B.fragmentTracker.removeFragment(p);return}p.stats.chunkCount++,B._handleFragmentLoadProgress(F)};this._doFragLoad(p,E,O,W).then(function(Q){if(!Q)return;B.fragLoadError=0;var F=B.state;if(B.fragContextChanged(p)){(F===y.FRAG_LOADING||F===y.BACKTRACKING||!B.fragCurrent&&F===y.PARSING)&&(B.fragmentTracker.removeFragment(p),B.state=y.IDLE);return}if("payload"in Q&&(B.log("Loaded fragment "+p.sn+" of level "+p.level),B.hls.trigger(I.Events.FRAG_LOADED,Q),B.state===y.BACKTRACKING)){B.fragmentTracker.backtrack(p,Q),B.resetFragmentLoading(p);return}B._handleFragmentLoadComplete(Q)}).catch(function(Q){B.warn(Q),B.resetFragmentLoading(p)})},a.flushMainBuffer=function(p,E,O){if(O===void 0&&(O=null),!(p-E))return;var B={startOffset:p,endOffset:E,type:O};this.fragLoadError=0,this.hls.trigger(I.Events.BUFFER_FLUSHING,B)},a._loadInitSegment=function(p){var E=this;this._doFragLoad(p).then(function(O){if(!O||E.fragContextChanged(p)||!E.levels)throw new Error("init load aborted");return O}).then(function(O){var B=E.hls,W=O.payload,Q=p.decryptdata;if(W&&W.byteLength>0&&Q&&Q.key&&Q.iv&&Q.method==="AES-128"){var F=self.performance.now();return E.decrypter.webCryptoDecrypt(new Uint8Array(W),Q.key.buffer,Q.iv.buffer).then(function(N){var X=self.performance.now();return B.trigger(I.Events.FRAG_DECRYPTED,{frag:p,payload:N,stats:{tstart:F,tdecrypt:X}}),O.payload=N,O})}return O}).then(function(O){var B=E.fragCurrent,W=E.hls,Q=E.levels;if(!Q)throw new Error("init load aborted, missing levels");var F=Q[p.level].details;console.assert(F,"Level details are defined when init segment is loaded");var N=p.stats;E.state=y.IDLE,E.fragLoadError=0,p.data=new Uint8Array(O.payload),N.parsing.start=N.buffering.start=self.performance.now(),N.parsing.end=N.buffering.end=self.performance.now(),O.frag===B&&W.trigger(I.Events.FRAG_BUFFERED,{stats:N,frag:B,part:null,id:p.type}),E.tick()}).catch(function(O){E.warn(O),E.resetFragmentLoading(p)})},a.fragContextChanged=function(p){var E=this.fragCurrent;return!p||!E||p.level!==E.level||p.sn!==E.sn||p.urlId!==E.urlId},a.fragBufferedComplete=function(p,E){var O=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+p.type+" sn: "+p.sn+(E?" part: "+E.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+p.level+" "+o.default.toString(U.BufferHelper.getBuffered(O))),this.state=y.IDLE,this.tick()},a._handleFragmentLoadComplete=function(p){var E=this.transmuxer;if(!E)return;var O=p.frag,B=p.part,W=p.partsLoaded,Q=!W||W.length===0||W.some(function(N){return!N}),F=new v.ChunkMetadata(O.level,O.sn,O.stats.chunkCount+1,0,B?B.index:-1,!Q);E.flush(F)},a._handleFragmentLoadProgress=function(p){},a._doFragLoad=function(p,E,O,B){var W=this;if(O===void 0&&(O=null),!this.levels)throw new Error("frag load aborted, missing levels");if(O=Math.max(p.start,O||0),this.config.lowLatencyMode&&E){var Q=E.partList;if(Q&&B){O>p.end&&E.fragmentHint&&(p=E.fragmentHint);var F=this.getNextPart(Q,p,O);if(F>-1){var N=Q[F];return this.log("Loading part sn: "+p.sn+" p: "+N.index+" cc: "+p.cc+" of playlist ["+E.startSN+"-"+E.endSN+"] parts [0-"+F+"-"+(Q.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+p.level+", target: "+parseFloat(O.toFixed(3))),this.nextLoadPosition=N.start+N.duration,this.state=y.FRAG_LOADING,this.hls.trigger(I.Events.FRAG_LOADING,{frag:p,part:Q[F],targetBufferTime:O}),this.doFragPartsLoad(p,Q,F,B).catch(function(X){return W.handleFragLoadError(X)})}else if(!p.url||this.loadedEndOfParts(Q,O))return Promise.resolve(null)}}return this.log("Loading fragment "+p.sn+" cc: "+p.cc+" "+(E?"of ["+E.startSN+"-"+E.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+p.level+", target: "+parseFloat(O.toFixed(3))),Object(K.isFiniteNumber)(p.sn)&&!this.bitrateTest&&(this.nextLoadPosition=p.start+p.duration),this.state=y.FRAG_LOADING,this.hls.trigger(I.Events.FRAG_LOADING,{frag:p,targetBufferTime:O}),this.fragmentLoader.load(p,B).catch(function(X){return W.handleFragLoadError(X)})},a.doFragPartsLoad=function(p,E,O,B){var W=this;return new Promise(function(Q,F){var N=[],X=function ee(oe){var de=E[oe];W.fragmentLoader.loadPart(p,de,B).then(function(Ce){N[de.index]=Ce;var ge=Ce.part;W.hls.trigger(I.Events.FRAG_LOADED,Ce);var fe=E[oe+1];if(fe&&fe.fragment===p)ee(oe+1);else return Q({frag:p,part:ge,partsLoaded:N})}).catch(F)};X(O)})},a.handleFragLoadError=function(p){var E=p.data;return E&&E.details===R.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(E.frag,E.part):this.hls.trigger(I.Events.ERROR,E),null},a._handleTransmuxerFlush=function(p){var E=this.getCurrentContext(p);if(!E||this.state!==y.PARSING){this.fragCurrent||(this.state=y.IDLE);return}var O=E.frag,B=E.part,W=E.level,Q=self.performance.now();O.stats.parsing.end=Q,B&&(B.stats.parsing.end=Q),this.updateLevelTiming(O,B,W,p.partial)},a.getCurrentContext=function(p){var E=this.levels,O=p.level,B=p.sn,W=p.part;if(!E||!E[O])return this.warn("Levels object was unset while buffering fragment "+B+" of level "+O+". The current chunk will not be buffered."),null;var Q=E[O],F=W>-1?Object(A.getPartWith)(Q,B,W):null,N=F?F.fragment:Object(A.getFragmentWithSN)(Q,B,this.fragCurrent);return N?{frag:N,part:F,level:Q}:null},a.bufferFragmentData=function(p,E,O,B){if(!p||this.state!==y.PARSING)return;var W=p.data1,Q=p.data2,F=W;if(W&&Q&&(F=Object(S.appendUint8Array)(W,Q)),!F||!F.length)return;var N={type:p.type,frag:E,part:O,chunkMeta:B,parent:E.type,data:F};this.hls.trigger(I.Events.BUFFER_APPENDING,N),p.dropped&&p.independent&&!O&&this.flushBufferGap(E)},a.flushBufferGap=function(p){var E=this.media;if(!E)return;if(!U.BufferHelper.isBuffered(E,E.currentTime)){this.flushMainBuffer(0,p.start);return}var O=E.currentTime,B=U.BufferHelper.bufferInfo(E,O,0),W=p.duration,Q=Math.min(this.config.maxFragLookUpTolerance*2,W*.25),F=Math.max(Math.min(p.start-Q,B.end-Q),O+Q);p.start-F>Q&&this.flushMainBuffer(F,p.start)},a.getFwdBufferInfo=function(p,E){var O=this.config,B=this.getLoadPosition();if(!Object(K.isFiniteNumber)(B))return null;var W=U.BufferHelper.bufferInfo(p,B,O.maxBufferHole);if(W.len===0&&W.nextStart!==void 0){var Q=this.fragmentTracker.getBufferedFrag(B,E);if(Q&&W.nextStart<Q.end)return U.BufferHelper.bufferInfo(p,B,Math.max(W.nextStart,O.maxBufferHole))}return W},a.getMaxBufferLength=function(p){var E=this.config,O;return p?O=Math.max(8*E.maxBufferSize/p,E.maxBufferLength):O=E.maxBufferLength,Math.min(O,E.maxMaxBufferLength)},a.reduceMaxBufferLength=function(p){var E=this.config,O=p||E.maxBufferLength;return E.maxMaxBufferLength>=O?(E.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+E.maxMaxBufferLength+"s"),!0):!1},a.getNextFragment=function(p,E){var O,B,W=E.fragments,Q=W.length;if(!Q)return null;var F=this.config,N=W[0].start,X;if(E.live){var ee=F.initialLiveManifestSize;if(Q<ee)return this.warn("Not enough fragments to start playback (have: "+Q+", need: "+ee+")"),null;!E.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(X=this.getInitialLiveFragment(E,W),this.startPosition=X?this.hls.liveSyncPosition||X.start:p)}else p<=N&&(X=W[0]);if(!X){var oe=F.lowLatencyMode?E.partEnd:E.fragmentEnd;X=this.getFragmentAtPosition(p,oe,E)}return(O=X)!==null&&O!==void 0&&O.initSegment&&!((B=X)!==null&&B!==void 0&&B.initSegment.data)&&!this.bitrateTest&&(X=X.initSegment),X},a.getNextPart=function(p,E,O){for(var B=-1,W=!1,Q=!0,F=0,N=p.length;F<N;F++){var X=p[F];if(Q=Q&&!X.independent,B>-1&&O<X.start)break;var ee=X.loaded;!ee&&(W||X.independent||Q)&&X.fragment===E&&(B=F),W=ee}return B},a.loadedEndOfParts=function(p,E){var O=p[p.length-1];return O&&E>O.start&&O.loaded},a.getInitialLiveFragment=function(p,E){var O=this.fragPrevious,B=null;if(O){if(p.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+O.programDateTime),B=Object(C.findFragmentByPDT)(E,O.endProgramDateTime,this.config.maxFragLookUpTolerance)),!B){var W=O.sn+1;if(W>=p.startSN&&W<=p.endSN){var Q=E[W-p.startSN];O.cc===Q.cc&&(B=Q,this.log("Live playlist, switching playlist, load frag with next SN: "+B.sn))}B||(B=Object(C.findFragWithCC)(E,O.cc),B&&this.log("Live playlist, switching playlist, load frag with same CC: "+B.sn))}}else{var F=this.hls.liveSyncPosition;F!==null&&(B=this.getFragmentAtPosition(F,this.bitrateTest?p.fragmentEnd:p.edge,p))}return B},a.getFragmentAtPosition=function(p,E,O){var B=this.config,W=this.fragPrevious,Q=O.fragments,F=O.endSN,N=O.fragmentHint,X=B.maxFragLookUpTolerance,ee=!!(B.lowLatencyMode&&O.partList&&N);ee&&N&&!this.bitrateTest&&(Q=Q.concat(N),F=N.sn);var oe;if(p<E){var de=p>E-X?0:X;oe=Object(C.findFragmentByPTS)(W,Q,p,de)}else oe=Q[Q.length-1];if(oe){var Ce=oe.sn-O.startSN,ge=W&&oe.level===W.level,fe=Q[Ce+1],me=this.fragmentTracker.getState(oe);if(me===M.FragmentState.BACKTRACKED){oe=null;for(var pe=Ce;Q[pe]&&this.fragmentTracker.getState(Q[pe])===M.FragmentState.BACKTRACKED;)W?oe=Q[pe--]:oe=Q[--pe];oe||(oe=fe)}else W&&oe.sn===W.sn&&!ee&&(ge&&(oe.sn<F&&this.fragmentTracker.getState(fe)!==M.FragmentState.OK?(this.log("SN "+oe.sn+" just loaded, load next one: "+fe.sn),oe=fe):oe=null))}return oe},a.synchronizeToLiveEdge=function(p){var E=this.config,O=this.media;if(!O)return;var B=this.hls.liveSyncPosition,W=O.currentTime,Q=p.fragments[0].start,F=p.edge,N=W>=Q-E.maxFragLookUpTolerance&&W<=F;if(B!==null&&O.duration>B&&(W<B||!N)){var X=E.liveMaxLatencyDuration!==void 0?E.liveMaxLatencyDuration:E.liveMaxLatencyDurationCount*p.targetduration;(!N&&O.readyState<4||W<F-X)&&(this.loadedmetadata||(this.nextLoadPosition=B),O.readyState&&(this.warn("Playback: "+W.toFixed(3)+" is located too far from the end of live sliding playlist: "+F+", reset currentTime to : "+B.toFixed(3)),O.currentTime=B))}},a.alignPlaylists=function(p,E){var O=this.levels,B=this.levelLastLoaded,W=this.fragPrevious,Q=B!==null?O[B]:null,F=p.fragments.length;if(!F)return this.warn("No fragments in live playlist"),0;var N=p.fragments[0].start,X=!E,ee=p.alignedSliding&&Object(K.isFiniteNumber)(N);if(X||!ee&&!N){Object(L.alignStream)(W,Q,p);var oe=p.fragments[0].start;return this.log("Live playlist sliding: "+oe.toFixed(2)+" start-sn: "+(E?E.startSN:"na")+"->"+p.startSN+" prev-sn: "+(W?W.sn:"na")+" fragments: "+F),oe}return N},a.waitForCdnTuneIn=function(p){var E=3;return p.live&&p.canBlockReload&&p.tuneInGoal>Math.max(p.partHoldBack,p.partTarget*E)},a.setStartPosition=function(p,E){var O=this.startPosition;if(O<E&&(O=-1),O===-1||this.lastCurrentTime===-1){var B=p.startTimeOffset;Object(K.isFiniteNumber)(B)?(O=E+B,B<0&&(O+=p.totalduration),O=Math.min(Math.max(E,O),E+p.totalduration),this.log("Start time offset "+B+" found in playlist, adjust startPosition to "+O),this.startPosition=O):p.live?O=this.hls.liveSyncPosition||E:this.startPosition=O=0,this.lastCurrentTime=O}this.nextLoadPosition=O},a.getLoadPosition=function(){var p=this.media,E=0;return this.loadedmetadata&&p?E=p.currentTime:this.nextLoadPosition&&(E=this.nextLoadPosition),E},a.handleFragLoadAborted=function(p,E){this.transmuxer&&p.sn!=="initSegment"&&p.stats.aborted&&(this.warn("Fragment "+p.sn+(E?" part"+E.index:"")+" of level "+p.level+" was aborted"),this.resetFragmentLoading(p))},a.resetFragmentLoading=function(p){(!this.fragCurrent||!this.fragContextChanged(p))&&(this.state=y.IDLE)},a.onFragmentOrKeyLoadError=function(p,E){if(E.fatal)return;var O=E.frag;if(!O||O.type!==p)return;var B=this.fragCurrent;console.assert(B&&O.sn===B.sn&&O.level===B.level&&O.urlId===B.urlId,"Frag load error must match current frag to retry");var W=this.config;if(this.fragLoadError+1<=W.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(O.level))return;var Q=Math.min(Math.pow(2,this.fragLoadError)*W.fragLoadingRetryDelay,W.fragLoadingMaxRetryTimeout);this.warn("Fragment "+O.sn+" of "+p+" "+O.level+" failed to load, retrying in "+Q+"ms"),this.retryDate=self.performance.now()+Q,this.fragLoadError++,this.state=y.FRAG_LOADING_WAITING_RETRY}else E.levelRetry?(p===l.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=y.IDLE):(_.logger.error(E.details+" reaches max retry, redispatch as fatal ..."),E.fatal=!0,this.hls.stopLoad(),this.state=y.ERROR)},a.afterBufferFlushed=function(p,E,O){if(!p)return;var B=U.BufferHelper.getBuffered(p);this.fragmentTracker.detectEvictedFragments(E,B,O),this.state===y.ENDED&&this.resetLoadingState()},a.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=y.IDLE},a.resetLiveStartWhenNotLoaded=function(p){if(!this.loadedmetadata){this.startFragRequested=!1;var E=this.levels?this.levels[p].details:null;if(E!=null&&E.live)return this.startPosition=-1,this.setStartPosition(E,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},a.updateLevelTiming=function(p,E,O,B){var W=this,Q=O.details;console.assert(!!Q,"level.details must be defined");var F=Object.keys(p.elementaryStreams).reduce(function(N,X){var ee=p.elementaryStreams[X];if(ee){var oe=ee.endPTS-ee.startPTS;if(oe<=0)return W.warn("Could not parse fragment "+p.sn+" "+X+" duration reliably ("+oe+") resetting transmuxer to fallback to playlist timing"),W.resetTransmuxer(),N||!1;var de=B?0:Object(A.updateFragPTSDTS)(Q,p,ee.startPTS,ee.endPTS,ee.startDTS,ee.endDTS);return W.hls.trigger(I.Events.LEVEL_PTS_UPDATED,{details:Q,level:O,drift:de,type:X,frag:p,start:ee.startPTS,end:ee.endPTS}),!0}return N},!1);F?(this.state=y.PARSED,this.hls.trigger(I.Events.FRAG_PARSED,{frag:p,part:E})):this.resetLoadingState()},a.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},T(s,[{key:"state",get:function(){return this._state},set:function(p){var E=this._state;E!==p&&(this._state=p,this.log(E+"->"+p))}}]),s}(P.default)},"./src/controller/buffer-controller.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return C});var K=D("./src/polyfills/number.ts"),P=D("./src/events.ts"),M=D("./src/utils/logger.ts"),U=D("./src/errors.ts"),_=D("./src/utils/buffer-helper.ts"),I=D("./src/utils/mediasource-helper.ts"),R=D("./src/loader/fragment.ts"),v=D("./src/controller/buffer-operation-queue.ts"),S=Object(I.getMediaSource)(),L=/([ha]vc.)(?:\.[^.,]+)+/,C=function(){function A(d){var o=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var l=o.hls,u=o.media,T=o.mediaSource;M.logger.log("[buffer-controller]: Media source opened"),u&&(o.updateMediaElementDuration(),l.trigger(P.Events.MEDIA_ATTACHED,{media:u})),T&&T.removeEventListener("sourceopen",o._onMediaSourceOpen),o.checkPendingTracks()},this._onMediaSourceClose=function(){M.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){M.logger.log("[buffer-controller]: Media source ended")},this.hls=d,this._initSourceBuffer(),this.registerListeners()}var x=A.prototype;return x.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},x.destroy=function(){this.unregisterListeners(),this.details=null},x.registerListeners=function(){var o=this.hls;o.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(P.Events.BUFFER_RESET,this.onBufferReset,this),o.on(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),o.on(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.on(P.Events.BUFFER_EOS,this.onBufferEos,this),o.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),o.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),o.on(P.Events.FRAG_PARSED,this.onFragParsed,this),o.on(P.Events.FRAG_CHANGED,this.onFragChanged,this)},x.unregisterListeners=function(){var o=this.hls;o.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(P.Events.BUFFER_RESET,this.onBufferReset,this),o.off(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),o.off(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.off(P.Events.BUFFER_EOS,this.onBufferEos,this),o.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),o.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),o.off(P.Events.FRAG_PARSED,this.onFragParsed,this),o.off(P.Events.FRAG_CHANGED,this.onFragChanged,this)},x._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new v.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},x.onManifestParsed=function(o,l){var u=2;(l.audio&&!l.video||!l.altAudio)&&(u=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=u,this.details=null,M.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},x.onMediaAttaching=function(o,l){var u=this.media=l.media;if(u&&S){var T=this.mediaSource=new S;T.addEventListener("sourceopen",this._onMediaSourceOpen),T.addEventListener("sourceended",this._onMediaSourceEnded),T.addEventListener("sourceclose",this._onMediaSourceClose),u.src=self.URL.createObjectURL(T),this._objectUrl=u.src}},x.onMediaDetaching=function(){var o=this.media,l=this.mediaSource,u=this._objectUrl;if(l){if(M.logger.log("[buffer-controller]: media source detaching"),l.readyState==="open")try{l.endOfStream()}catch(T){M.logger.warn("[buffer-controller]: onMediaDetaching: "+T.message+" while calling endOfStream")}this.onBufferReset(),l.removeEventListener("sourceopen",this._onMediaSourceOpen),l.removeEventListener("sourceended",this._onMediaSourceEnded),l.removeEventListener("sourceclose",this._onMediaSourceClose),o&&(u&&self.URL.revokeObjectURL(u),o.src===u?(o.removeAttribute("src"),o.load()):M.logger.warn("[buffer-controller]: 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.hls.trigger(P.Events.MEDIA_DETACHED,void 0)},x.onBufferReset=function(){var o=this;this.getSourceBufferTypes().forEach(function(l){var u=o.sourceBuffer[l];try{u&&(o.removeBufferListeners(l),o.mediaSource&&o.mediaSource.removeSourceBuffer(u),o.sourceBuffer[l]=void 0)}catch(T){M.logger.warn("[buffer-controller]: Failed to reset the "+l+" buffer",T)}}),this._initSourceBuffer()},x.onBufferCodecs=function(o,l){var u=this,T=this.getSourceBufferTypes().length;if(Object.keys(l).forEach(function(m){if(T){var h=u.tracks[m];if(h&&typeof h.buffer.changeType=="function"){var w=l[m],y=w.codec,f=w.levelCodec,c=w.container,s=(h.levelCodec||h.codec).replace(L,"$1"),a=(f||y).replace(L,"$1");if(s!==a){var g=c+";codecs="+(f||y);u.appendChangeType(m,g)}}}else u.pendingTracks[m]=l[m]}),T)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},x.appendChangeType=function(o,l){var u=this,T=this.operationQueue,m={execute:function(){var w=u.sourceBuffer[o];w&&(M.logger.log("[buffer-controller]: changing "+o+" sourceBuffer type to "+l),w.changeType(l)),T.shiftAndExecuteNext(o)},onStart:function(){},onComplete:function(){},onError:function(w){M.logger.warn("[buffer-controller]: Failed to change "+o+" SourceBuffer type",w)}};T.append(m,o)},x.onBufferAppending=function(o,l){var u=this,T=this.hls,m=this.operationQueue,h=this.tracks,w=l.data,y=l.type,f=l.frag,c=l.part,s=l.chunkMeta,a=s.buffering[y],g=self.performance.now();a.start=g;var p=f.stats.buffering,E=c?c.stats.buffering:null;p.start===0&&(p.start=g),E&&E.start===0&&(E.start=g);var O=h.audio,B=y==="audio"&&s.id===1&&(O==null?void 0:O.container)==="audio/mpeg",W={execute:function(){if(a.executeStart=self.performance.now(),B){var F=u.sourceBuffer[y];if(F){var N=f.start-F.timestampOffset;Math.abs(N)>=.1&&(M.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+f.start+" (delta: "+N+") sn: "+f.sn+")"),F.timestampOffset=f.start)}}u.appendExecutor(w,y)},onStart:function(){},onComplete:function(){var F=self.performance.now();a.executeEnd=a.end=F,p.first===0&&(p.first=F),E&&E.first===0&&(E.first=F);var N=u.sourceBuffer,X={};for(var ee in N)X[ee]=_.BufferHelper.getBuffered(N[ee]);u.appendError=0,u.hls.trigger(P.Events.BUFFER_APPENDED,{type:y,frag:f,part:c,chunkMeta:s,parent:f.type,timeRanges:X})},onError:function(F){M.logger.error("[buffer-controller]: Error encountered while trying to append to the "+y+" SourceBuffer",F);var N={type:U.ErrorTypes.MEDIA_ERROR,parent:f.type,details:U.ErrorDetails.BUFFER_APPEND_ERROR,err:F,fatal:!1};F.code===DOMException.QUOTA_EXCEEDED_ERR?N.details=U.ErrorDetails.BUFFER_FULL_ERROR:(u.appendError++,N.details=U.ErrorDetails.BUFFER_APPEND_ERROR,u.appendError>T.config.appendErrorMaxRetry&&(M.logger.error("[buffer-controller]: Failed "+T.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),N.fatal=!0)),T.trigger(P.Events.ERROR,N)}};m.append(W,y)},x.onBufferFlushing=function(o,l){var u=this,T=this.operationQueue,m=function(w){return{execute:u.removeExecutor.bind(u,w,l.startOffset,l.endOffset),onStart:function(){},onComplete:function(){u.hls.trigger(P.Events.BUFFER_FLUSHED,{type:w})},onError:function(f){M.logger.warn("[buffer-controller]: Failed to remove from "+w+" SourceBuffer",f)}}};l.type?T.append(m(l.type),l.type):this.getSourceBufferTypes().forEach(function(h){T.append(m(h),h)})},x.onFragParsed=function(o,l){var u=this,T=l.frag,m=l.part,h=[],w=m?m.elementaryStreams:T.elementaryStreams;w[R.ElementaryStreamTypes.AUDIOVIDEO]?h.push("audiovideo"):(w[R.ElementaryStreamTypes.AUDIO]&&h.push("audio"),w[R.ElementaryStreamTypes.VIDEO]&&h.push("video"));var y=function(){var c=self.performance.now();T.stats.buffering.end=c,m&&(m.stats.buffering.end=c);var s=m?m.stats:T.stats;u.hls.trigger(P.Events.FRAG_BUFFERED,{frag:T,part:m,stats:s,id:T.type})};h.length===0&&M.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+T.type+" level: "+T.level+" sn: "+T.sn),this.blockBuffers(y,h)},x.onFragChanged=function(o,l){this.flushBackBuffer()},x.onBufferEos=function(o,l){var u=this,T=this.getSourceBufferTypes().reduce(function(m,h){var w=u.sourceBuffer[h];return(!l.type||l.type===h)&&(w&&!w.ended&&(w.ended=!0,M.logger.log("[buffer-controller]: "+h+" sourceBuffer now EOS"))),m&&!!(!w||w.ended)},!0);T&&this.blockBuffers(function(){var m=u.mediaSource;if(!m||m.readyState!=="open")return;m.endOfStream()})},x.onLevelUpdated=function(o,l){var u=l.details;if(!u.fragments.length)return;this.details=u,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},x.flushBackBuffer=function(){var o=this.hls,l=this.details,u=this.media,T=this.sourceBuffer;if(!u||l===null)return;var m=this.getSourceBufferTypes();if(!m.length)return;var h=l.live&&o.config.liveBackBufferLength!==null?o.config.liveBackBufferLength:o.config.backBufferLength;if(!Object(K.isFiniteNumber)(h)||h<0)return;var w=u.currentTime,y=l.levelTargetDuration,f=Math.max(h,y),c=Math.floor(w/y)*y-f;m.forEach(function(s){var a=T[s];if(a){var g=_.BufferHelper.getBuffered(a);g.length>0&&c>g.start(0)&&(o.trigger(P.Events.BACK_BUFFER_REACHED,{bufferEnd:c}),l.live&&o.trigger(P.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:c}),o.trigger(P.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:c,type:s}))}})},x.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var o=this.details,l=this.hls,u=this.media,T=this.mediaSource,m=o.fragments[0].start+o.totalduration,h=u.duration,w=Object(K.isFiniteNumber)(T.duration)?T.duration:0;o.live&&l.config.liveDurationInfinity?(M.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),T.duration=Infinity,this.updateSeekableRange(o)):(m>w&&m>h||!Object(K.isFiniteNumber)(h))&&(M.logger.log("[buffer-controller]: Updating Media Source duration to "+m.toFixed(3)),T.duration=m)},x.updateSeekableRange=function(o){var l=this.mediaSource,u=o.fragments,T=u.length;if(T&&o.live&&l!==null&&l!==void 0&&l.setLiveSeekableRange){var m=Math.max(0,u[0].start),h=Math.max(m,m+o.totalduration);l.setLiveSeekableRange(m,h)}},x.checkPendingTracks=function(){var o=this.bufferCodecEventsExpected,l=this.operationQueue,u=this.pendingTracks,T=Object.keys(u).length;if(T&&!o||T===2){this.createSourceBuffers(u),this.pendingTracks={};var m=this.getSourceBufferTypes();if(m.length===0){this.hls.trigger(P.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}m.forEach(function(h){l.executeNext(h)})}},x.createSourceBuffers=function(o){var l=this.sourceBuffer,u=this.mediaSource;if(!u)throw Error("createSourceBuffers called when mediaSource was null");var T=0;for(var m in o)if(!l[m]){var h=o[m];if(!h)throw Error("source buffer exists for track "+m+", however track does not");var w=h.levelCodec||h.codec,y=h.container+";codecs="+w;M.logger.log("[buffer-controller]: creating sourceBuffer("+y+")");try{var f=l[m]=u.addSourceBuffer(y),c=m;this.addBufferListener(c,"updatestart",this._onSBUpdateStart),this.addBufferListener(c,"updateend",this._onSBUpdateEnd),this.addBufferListener(c,"error",this._onSBUpdateError),this.tracks[m]={buffer:f,codec:w,container:h.container,levelCodec:h.levelCodec,id:h.id},T++}catch(s){M.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+s.message),this.hls.trigger(P.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:s,mimeType:y})}}T&&this.hls.trigger(P.Events.BUFFER_CREATED,{tracks:this.tracks})},x._onSBUpdateStart=function(o){var l=this.operationQueue,u=l.current(o);u.onStart()},x._onSBUpdateEnd=function(o){var l=this.operationQueue,u=l.current(o);u.onComplete(),l.shiftAndExecuteNext(o)},x._onSBUpdateError=function(o,l){M.logger.error("[buffer-controller]: "+o+" SourceBuffer error",l),this.hls.trigger(P.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var u=this.operationQueue.current(o);u&&u.onError(l)},x.removeExecutor=function(o,l,u){var T=this.media,m=this.mediaSource,h=this.operationQueue,w=this.sourceBuffer,y=w[o];if(!T||!m||!y){M.logger.warn("[buffer-controller]: Attempting to remove from the "+o+" SourceBuffer, but it does not exist"),h.shiftAndExecuteNext(o);return}var f=Object(K.isFiniteNumber)(T.duration)?T.duration:Infinity,c=Object(K.isFiniteNumber)(m.duration)?m.duration:Infinity,s=Math.max(0,l),a=Math.min(u,f,c);a>s?(M.logger.log("[buffer-controller]: Removing ["+s+","+a+"] from the "+o+" SourceBuffer"),console.assert(!y.updating,o+" sourceBuffer must not be updating"),y.remove(s,a)):h.shiftAndExecuteNext(o)},x.appendExecutor=function(o,l){var u=this.operationQueue,T=this.sourceBuffer,m=T[l];if(!m){M.logger.warn("[buffer-controller]: Attempting to append to the "+l+" SourceBuffer, but it does not exist"),u.shiftAndExecuteNext(l);return}m.ended=!1,console.assert(!m.updating,l+" sourceBuffer must not be updating"),m.appendBuffer(o)},x.blockBuffers=function(o,l){var u=this;if(l===void 0&&(l=this.getSourceBufferTypes()),!l.length){M.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(o);return}var T=this.operationQueue,m=l.map(function(h){return T.appendBlocker(h)});Promise.all(m).then(function(){o(),l.forEach(function(h){var w=u.sourceBuffer[h];(!w||!w.updating)&&T.shiftAndExecuteNext(h)})})},x.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},x.addBufferListener=function(o,l,u){var T=this.sourceBuffer[o];if(!T)return;var m=u.bind(this,o);this.listeners[o].push({event:l,listener:m}),T.addEventListener(l,m)},x.removeBufferListeners=function(o){var l=this.sourceBuffer[o];if(!l)return;this.listeners[o].forEach(function(u){l.removeEventListener(u.event,u.listener)})},A}()},"./src/controller/buffer-operation-queue.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return P});var K=D("./src/utils/logger.ts"),P=function(){function M(_){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=_}var U=M.prototype;return U.append=function(I,R){var v=this.queues[R];v.push(I),v.length===1&&this.buffers[R]&&this.executeNext(R)},U.insertAbort=function(I,R){var v=this.queues[R];v.unshift(I),this.executeNext(R)},U.appendBlocker=function(I){var R,v=new Promise(function(L){R=L}),S={execute:R,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(S,I),v},U.executeNext=function(I){var R=this.buffers,v=this.queues,S=R[I],L=v[I];if(L.length){var C=L[0];try{C.execute()}catch(A){K.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),C.onError(A),(!S||!S.updating)&&(L.shift(),this.executeNext(I))}}},U.shiftAndExecuteNext=function(I){this.queues[I].shift(),this.executeNext(I)},U.current=function(I){return this.queues[I][0]},M}()},"./src/controller/cap-level-controller.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/events.ts");function P(_,I){for(var R=0;R<I.length;R++){var v=I[R];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(_,v.key,v)}}function M(_,I,R){return I&&P(_.prototype,I),R&&P(_,R),_}var U=function(){function _(R){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=R,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var I=_.prototype;return I.setStreamController=function(v){this.streamController=v},I.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},I.registerListeners=function(){var v=this.hls;v.on(K.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),v.on(K.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),v.on(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.on(K.Events.BUFFER_CODECS,this.onBufferCodecs,this),v.on(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},I.unregisterListener=function(){var v=this.hls;v.off(K.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),v.off(K.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),v.off(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.off(K.Events.BUFFER_CODECS,this.onBufferCodecs,this),v.off(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},I.onFpsDropLevelCapping=function(v,S){_.isLevelAllowed(S.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(S.droppedLevel)},I.onMediaAttaching=function(v,S){this.media=S.media instanceof HTMLVideoElement?S.media:null},I.onManifestParsed=function(v,S){var L=this.hls;this.restrictedLevels=[],this.firstLevel=S.firstLevel,L.config.capLevelToPlayerSize&&S.video&&this.startCapping()},I.onBufferCodecs=function(v,S){var L=this.hls;L.config.capLevelToPlayerSize&&S.video&&this.startCapping()},I.onMediaDetaching=function(){this.stopCapping()},I.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var v=this.hls.levels;if(v.length){var S=this.hls;S.autoLevelCapping=this.getMaxLevel(v.length-1),S.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=S.autoLevelCapping}}},I.getMaxLevel=function(v){var S=this,L=this.hls.levels;if(!L.length)return-1;var C=L.filter(function(A,x){return _.isLevelAllowed(x,S.restrictedLevels)&&x<=v});return this.clientRect=null,_.getMaxLevelByMediaSize(C,this.mediaWidth,this.mediaHeight)},I.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},I.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},I.getDimensions=function(){if(this.clientRect)return this.clientRect;var v=this.media,S={width:0,height:0};if(v){var L=v.getBoundingClientRect();S.width=L.width,S.height=L.height,!S.width&&!S.height&&(S.width=L.right-L.left||v.width||0,S.height=L.bottom-L.top||v.height||0)}return this.clientRect=S,S},_.isLevelAllowed=function(v,S){return S===void 0&&(S=[]),S.indexOf(v)===-1},_.getMaxLevelByMediaSize=function(v,S,L){if(!v||!v.length)return-1;for(var C=function(l,u){return u?l.width!==u.width||l.height!==u.height:!0},A=v.length-1,x=0;x<v.length;x+=1){var d=v[x];if((d.width>=S||d.height>=L)&&C(d,v[x+1])){A=x;break}}return A},M(_,[{key:"mediaWidth",get:function(){return this.getDimensions().width*_.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*_.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var v=1;try{v=self.devicePixelRatio}catch(S){}return v}}]),_}();G.default=U},"./src/controller/cmcd-controller.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return C});var K=D("./src/events.ts"),P=D("./src/types/cmcd.ts"),M=D("./src/utils/buffer-helper.ts"),U=D("./src/utils/logger.ts");function _(A,x){for(var d=0;d<x.length;d++){var o=x[d];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(A,o.key,o)}}function I(A,x,d){return x&&_(A.prototype,x),d&&_(A,d),A}function R(A,x){var d=typeof Symbol!="undefined"&&A[Symbol.iterator]||A["@@iterator"];if(d)return(d=d.call(A)).next.bind(d);if(Array.isArray(A)||(d=v(A))||x&&A&&typeof A.length=="number"){d&&(A=d);var o=0;return function(){return o>=A.length?{done:!0}:{done:!1,value:A[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(A,x){if(!A)return;if(typeof A=="string")return S(A,x);var d=Object.prototype.toString.call(A).slice(8,-1);if(d==="Object"&&A.constructor&&(d=A.constructor.name),d==="Map"||d==="Set")return Array.from(A);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return S(A,x)}function S(A,x){(x==null||x>A.length)&&(x=A.length);for(var d=0,o=new Array(x);d<x;d++)o[d]=A[d];return o}function L(){return L=Object.assign||function(A){for(var x=1;x<arguments.length;x++){var d=arguments[x];for(var o in d)Object.prototype.hasOwnProperty.call(d,o)&&(A[o]=d[o])}return A},L.apply(this,arguments)}var C=function(){function A(d){var o=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){o.initialized&&(o.starved=!0),o.buffering=!0},this.onPlaying=function(){o.initialized||(o.initialized=!0),o.buffering=!1},this.applyPlaylistData=function(T){try{o.apply(T,{ot:P.CMCDObjectType.MANIFEST,su:!o.initialized})}catch(m){U.logger.warn("Could not generate manifest CMCD data.",m)}},this.applyFragmentData=function(T){try{var m=T.frag,h=o.hls.levels[m.level],w=o.getObjectType(m),y={d:m.duration*1e3,ot:w};(w===P.CMCDObjectType.VIDEO||w===P.CMCDObjectType.AUDIO||w==P.CMCDObjectType.MUXED)&&(y.br=h.bitrate/1e3,y.tb=o.getTopBandwidth(w),y.bl=o.getBufferLength(w)),o.apply(T,y)}catch(f){U.logger.warn("Could not generate segment CMCD data.",f)}},this.hls=d;var l=this.config=d.config,u=l.cmcd;u!=null&&(l.pLoader=this.createPlaylistLoader(),l.fLoader=this.createFragmentLoader(),this.sid=u.sessionId||A.uuid(),this.cid=u.contentId,this.useHeaders=u.useHeaders===!0,this.registerListeners())}var x=A.prototype;return x.registerListeners=function(){var o=this.hls;o.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.on(K.Events.MEDIA_DETACHED,this.onMediaDetached,this),o.on(K.Events.BUFFER_CREATED,this.onBufferCreated,this)},x.unregisterListeners=function(){var o=this.hls;o.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.off(K.Events.MEDIA_DETACHED,this.onMediaDetached,this),o.off(K.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},x.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},x.onMediaAttached=function(o,l){this.media=l.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},x.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},x.onBufferCreated=function(o,l){var u,T;this.audioBuffer=(u=l.tracks.audio)===null||u===void 0?void 0:u.buffer,this.videoBuffer=(T=l.tracks.video)===null||T===void 0?void 0:T.buffer},x.createData=function(){var o;return{v:P.CMCDVersion,sf:P.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(o=this.media)===null||o===void 0?void 0:o.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},x.apply=function(o,l){l===void 0&&(l={}),L(l,this.createData());var u=l.ot===P.CMCDObjectType.INIT||l.ot===P.CMCDObjectType.VIDEO||l.ot===P.CMCDObjectType.MUXED;if(this.starved&&u&&(l.bs=!0,l.su=!0,this.starved=!1),l.su==null&&(l.su=this.buffering),this.useHeaders){var T=A.toHeaders(l);if(!Object.keys(T).length)return;o.headers||(o.headers={}),L(o.headers,T)}else{var m=A.toQuery(l);if(!m)return;o.url=A.appendQueryToUri(o.url,m)}},x.getObjectType=function(o){var l=o.type;return l==="subtitle"?P.CMCDObjectType.TIMED_TEXT:o.sn==="initSegment"?P.CMCDObjectType.INIT:l==="audio"?P.CMCDObjectType.AUDIO:l==="main"?this.hls.audioTracks.length?P.CMCDObjectType.VIDEO:P.CMCDObjectType.MUXED:void 0},x.getTopBandwidth=function(o){for(var l=0,u=o===P.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,T=R(u),m;!(m=T()).done;){var h=m.value;h.bitrate>l&&(l=h.bitrate)}return l>0?l:NaN},x.getBufferLength=function(o){var l=this.hls.media,u=o===P.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!u||!l)return NaN;var T=M.BufferHelper.bufferInfo(u,l.currentTime,this.config.maxBufferHole);return T.len*1e3},x.createPlaylistLoader=function(){var o=this.config.pLoader,l=this.applyPlaylistData,u=o||this.config.loader;return function(){function T(h){this.loader=void 0,this.loader=new u(h)}var m=T.prototype;return m.destroy=function(){this.loader.destroy()},m.abort=function(){this.loader.abort()},m.load=function(w,y,f){l(w),this.loader.load(w,y,f)},I(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},x.createFragmentLoader=function(){var o=this.config.fLoader,l=this.applyFragmentData,u=o||this.config.loader;return function(){function T(h){this.loader=void 0,this.loader=new u(h)}var m=T.prototype;return m.destroy=function(){this.loader.destroy()},m.abort=function(){this.loader.abort()},m.load=function(w,y,f){l(w),this.loader.load(w,y,f)},I(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},A.uuid=function(){var o=URL.createObjectURL(new Blob),l=o.toString();return URL.revokeObjectURL(o),l.substr(l.lastIndexOf("/")+1)},A.serialize=function(o){for(var l=[],u=function(B){return!Number.isNaN(B)&&B!=null&&B!==""&&B!==!1},T=function(B){return Math.round(B)},m=function(B){return T(B/100)*100},h=function(B){return encodeURIComponent(B)},w={br:T,d:T,bl:m,dl:m,mtp:m,nor:h,rtp:m,tb:T},y=Object.keys(o||{}).sort(),f=R(y),c;!(c=f()).done;){var s=c.value,a=o[s];if(!u(a))continue;if(s==="v"&&a===1)continue;if(s=="pr"&&a===1)continue;var g=w[s];g&&(a=g(a));var p=typeof a,E=void 0;s==="ot"||s==="sf"||s==="st"?E=s+"="+a:p==="boolean"?E=s:p==="number"?E=s+"="+a:E=s+"="+JSON.stringify(a),l.push(E)}return l.join(",")},A.toHeaders=function(o){for(var l=Object.keys(o),u={},T=["Object","Request","Session","Status"],m=[{},{},{},{}],h={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},w=0,y=l;w<y.length;w++){var f=y[w],c=h[f]!=null?h[f]:1;m[c][f]=o[f]}for(var s=0;s<m.length;s++){var a=A.serialize(m[s]);a&&(u["CMCD-"+T[s]]=a)}return u},A.toQuery=function(o){return"CMCD="+encodeURIComponent(A.serialize(o))},A.appendQueryToUri=function(o,l){if(!l)return o;var u=o.includes("?")?"&":"?";return""+o+u+l},A}()},"./src/controller/eme-controller.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/events.ts"),P=D("./src/errors.ts"),M=D("./src/utils/logger.ts"),U=D("./src/utils/mediakeys-helper.ts");function _(C,A){for(var x=0;x<A.length;x++){var d=A[x];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(C,d.key,d)}}function I(C,A,x){return A&&_(C.prototype,A),x&&_(C,x),C}var R=3,v=function(A,x,d){var o={audioCapabilities:[],videoCapabilities:[]};return A.forEach(function(l){o.audioCapabilities.push({contentType:'audio/mp4; codecs="'+l+'"',robustness:d.audioRobustness||""})}),x.forEach(function(l){o.videoCapabilities.push({contentType:'video/mp4; codecs="'+l+'"',robustness:d.videoRobustness||""})}),[o]},S=function(A,x,d,o){switch(A){case U.KeySystems.WIDEVINE:return v(x,d,o);default:throw new Error("Unknown key-system: "+A)}},L=function(){function C(x){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=x,this._config=x.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var A=C.prototype;return A.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},A._registerListeners=function(){this.hls.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(K.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(K.Events.MANIFEST_PARSED,this.onManifestParsed,this)},A._unregisterListeners=function(){this.hls.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(K.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(K.Events.MANIFEST_PARSED,this.onManifestParsed,this)},A.getLicenseServerUrl=function(d){switch(d){case U.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+d+'"')},A._attemptKeySystemAccess=function(d,o,l){var u=this,T=S(d,o,l,this._drmSystemOptions);M.logger.log("Requesting encrypted media key-system access");var m=this.requestMediaKeySystemAccess(d,T);this.mediaKeysPromise=m.then(function(h){return u._onMediaKeySystemAccessObtained(d,h)}),m.catch(function(h){M.logger.error('Failed to obtain key-system "'+d+'" access:',h)})},A._onMediaKeySystemAccessObtained=function(d,o){var l=this;M.logger.log('Access for key-system "'+d+'" obtained');var u={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:o,mediaKeySystemDomain:d};this._mediaKeysList.push(u);var T=Promise.resolve().then(function(){return o.createMediaKeys()}).then(function(m){return u.mediaKeys=m,M.logger.log('Media-keys created for key-system "'+d+'"'),l._onMediaKeysCreated(),m});return T.catch(function(m){M.logger.error("Failed to create media-keys:",m)}),T},A._onMediaKeysCreated=function(){var d=this;this._mediaKeysList.forEach(function(o){o.mediaKeysSession||(o.mediaKeysSession=o.mediaKeys.createSession(),d._onNewMediaKeySession(o.mediaKeysSession))})},A._onNewMediaKeySession=function(d){var o=this;M.logger.log("New key-system session "+d.sessionId),d.addEventListener("message",function(l){o._onKeySessionMessage(d,l.message)},!1)},A._onKeySessionMessage=function(d,o){M.logger.log("Got EME message event, creating license request"),this._requestLicense(o,function(l){M.logger.log("Received license data (length: "+(l&&l.byteLength)+"), updating key-session"),d.update(l)})},A.onMediaEncrypted=function(d){var o=this;if(M.logger.log('Media is encrypted using "'+d.initDataType+'" init data type'),!this.mediaKeysPromise){M.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(K.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var l=function(T){if(!o._media)return;o._attemptSetMediaKeys(T),o._generateRequestWithPreferredKeySession(d.initDataType,d.initData)};this.mediaKeysPromise.then(l).catch(l)},A._attemptSetMediaKeys=function(d){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var o=this._mediaKeysList[0];if(!o||!o.mediaKeys){M.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(K.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}M.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(o.mediaKeys),this._hasSetMediaKeys=!0}},A._generateRequestWithPreferredKeySession=function(d,o){var l=this,u=this._mediaKeysList[0];if(!u){M.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(K.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(u.mediaKeysSessionInitialized){M.logger.warn("Key-Session already initialized but requested again");return}var T=u.mediaKeysSession;if(!T){M.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(K.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!o){M.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(K.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}M.logger.log('Generating key-session request for "'+d+'" init data type'),u.mediaKeysSessionInitialized=!0,T.generateRequest(d,o).then(function(){M.logger.debug("Key-session generation succeeded")}).catch(function(m){M.logger.error("Error generating key-session request:",m),l.hls.trigger(K.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},A._createLicenseXhr=function(d,o,l){var u=new XMLHttpRequest;u.responseType="arraybuffer",u.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,u,d,o,l);var T=this._licenseXhrSetup;if(T)try{T.call(this.hls,u,d),T=void 0}catch(m){M.logger.error(m)}try{u.readyState||u.open("POST",d,!0),T&&T.call(this.hls,u,d)}catch(m){throw new Error("issue setting up KeySystem license XHR "+m)}return u},A._onLicenseRequestReadyStageChange=function(d,o,l,u){switch(d.readyState){case 4:if(d.status===200){this._requestLicenseFailureCount=0,M.logger.log("License request succeeded");var T=d.response,m=this._licenseResponseCallback;if(m)try{T=m.call(this.hls,d,o)}catch(w){M.logger.error(w)}u(T)}else{if(M.logger.error("License Request XHR failed ("+o+"). Status: "+d.status+" ("+d.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>R){this.hls.trigger(K.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var h=R-this._requestLicenseFailureCount+1;M.logger.warn("Retrying license request, "+h+" attempts left"),this._requestLicense(l,u)}break}},A._generateLicenseRequestChallenge=function(d,o){switch(d.mediaKeySystemDomain){case U.KeySystems.WIDEVINE:return o}throw new Error("unsupported key-system: "+d.mediaKeySystemDomain)},A._requestLicense=function(d,o){M.logger.log("Requesting content license for key-system");var l=this._mediaKeysList[0];if(!l){M.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(K.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var u=this.getLicenseServerUrl(l.mediaKeySystemDomain),T=this._createLicenseXhr(u,d,o);M.logger.log("Sending license request to URL: "+u);var m=this._generateLicenseRequestChallenge(l,d);T.send(m)}catch(h){M.logger.error("Failure requesting DRM license: "+h),this.hls.trigger(K.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},A.onMediaAttached=function(d,o){if(!this._emeEnabled)return;var l=o.media;this._media=l,l.addEventListener("encrypted",this._onMediaEncrypted)},A.onMediaDetached=function(){var d=this._media,o=this._mediaKeysList;if(!d)return;d.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(o.map(function(l){if(l.mediaKeysSession)return l.mediaKeysSession.close().catch(function(){})})).then(function(){return d.setMediaKeys(null)}).catch(function(){})},A.onManifestParsed=function(d,o){if(!this._emeEnabled)return;var l=o.levels.map(function(T){return T.audioCodec}).filter(function(T){return!!T}),u=o.levels.map(function(T){return T.videoCodec}).filter(function(T){return!!T});this._attemptKeySystemAccess(U.KeySystems.WIDEVINE,l,u)},I(C,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),C}();G.default=L},"./src/controller/fps-controller.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/events.ts"),P=D("./src/utils/logger.ts"),M=function(){function U(I){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=I,this.registerListeners()}var _=U.prototype;return _.setStreamController=function(R){this.streamController=R},_.registerListeners=function(){this.hls.on(K.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},_.unregisterListeners=function(){this.hls.off(K.Events.MEDIA_ATTACHING,this.onMediaAttaching)},_.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},_.onMediaAttaching=function(R,v){var S=this.hls.config;if(S.capLevelOnFPSDrop){var L=v.media instanceof self.HTMLVideoElement?v.media:null;this.media=L,L&&typeof L.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),S.fpsDroppedMonitoringPeriod)}},_.checkFPS=function(R,v,S){var L=performance.now();if(v){if(this.lastTime){var C=L-this.lastTime,A=S-this.lastDroppedFrames,x=v-this.lastDecodedFrames,d=1e3*A/C,o=this.hls;if(o.trigger(K.Events.FPS_DROP,{currentDropped:A,currentDecoded:x,totalDroppedFrames:S}),d>0&&A>o.config.fpsDroppedMonitoringThreshold*x){var l=o.currentLevel;P.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(o.autoLevelCapping===-1||o.autoLevelCapping>=l)&&(l=l-1,o.trigger(K.Events.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:o.currentLevel}),o.autoLevelCapping=l,this.streamController.nextLevelSwitch())}}this.lastTime=L,this.lastDroppedFrames=S,this.lastDecodedFrames=v}},_.checkFPSInterval=function(){var R=this.media;if(R)if(this.isVideoPlaybackQualityAvailable){var v=R.getVideoPlaybackQuality();this.checkFPS(R,v.totalVideoFrames,v.droppedVideoFrames)}else this.checkFPS(R,R.webkitDecodedFrameCount,R.webkitDroppedFrameCount)},U}();G.default=M},"./src/controller/fragment-finders.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"findFragmentByPDT",function(){return M}),D.d(G,"findFragmentByPTS",function(){return U}),D.d(G,"fragmentWithinToleranceTest",function(){return _}),D.d(G,"pdtWithinToleranceTest",function(){return I}),D.d(G,"findFragWithCC",function(){return R});var K=D("./src/polyfills/number.ts"),P=D("./src/utils/binary-search.ts");function M(v,S,L){if(S===null||!Array.isArray(v)||!v.length||!Object(K.isFiniteNumber)(S))return null;var C=v[0].programDateTime;if(S<(C||0))return null;var A=v[v.length-1].endProgramDateTime;if(S>=(A||0))return null;L=L||0;for(var x=0;x<v.length;++x){var d=v[x];if(I(S,L,d))return d}return null}function U(v,S,L,C){L===void 0&&(L=0),C===void 0&&(C=0);var A=null;if(v?A=S[v.sn-S[0].sn+1]||null:L===0&&S[0].start===0&&(A=S[0]),A&&_(L,C,A)===0)return A;var x=P.default.search(S,_.bind(null,L,C));return x||A}function _(v,S,L){v===void 0&&(v=0),S===void 0&&(S=0);var C=Math.min(S,L.duration+(L.deltaPTS?L.deltaPTS:0));return L.start+L.duration-C<=v?1:L.start-C>v&&L.start?-1:0}function I(v,S,L){var C=Math.min(S,L.duration+(L.deltaPTS?L.deltaPTS:0))*1e3,A=L.endProgramDateTime||0;return A-C>v}function R(v,S){return P.default.search(v,function(L){return L.cc<S?1:L.cc>S?-1:0})}},"./src/controller/fragment-tracker.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"FragmentState",function(){return M}),D.d(G,"FragmentTracker",function(){return U});var K=D("./src/events.ts"),P=D("./src/types/loader.ts"),M;(function(R){R.NOT_LOADED="NOT_LOADED",R.BACKTRACKED="BACKTRACKED",R.APPENDING="APPENDING",R.PARTIAL="PARTIAL",R.OK="OK"})(M||(M={}));var U=function(){function R(S){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=S,this._registerListeners()}var v=R.prototype;return v._registerListeners=function(){var L=this.hls;L.on(K.Events.BUFFER_APPENDED,this.onBufferAppended,this),L.on(K.Events.FRAG_BUFFERED,this.onFragBuffered,this),L.on(K.Events.FRAG_LOADED,this.onFragLoaded,this)},v._unregisterListeners=function(){var L=this.hls;L.off(K.Events.BUFFER_APPENDED,this.onBufferAppended,this),L.off(K.Events.FRAG_BUFFERED,this.onFragBuffered,this),L.off(K.Events.FRAG_LOADED,this.onFragLoaded,this)},v.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},v.getAppendedFrag=function(L,C){if(C===P.PlaylistLevelType.MAIN){var A=this.activeFragment,x=this.activeParts;if(!A)return null;if(x)for(var d=x.length;d--;){var o=x[d],l=o?o.end:A.appendedPTS;if(o.start<=L&&l!==void 0&&L<=l)return d>9&&(this.activeParts=x.slice(d-9)),o}else if(A.start<=L&&A.appendedPTS!==void 0&&L<=A.appendedPTS)return A}return this.getBufferedFrag(L,C)},v.getBufferedFrag=function(L,C){for(var A=this.fragments,x=Object.keys(A),d=x.length;d--;){var o=A[x[d]];if((o==null?void 0:o.body.type)===C&&o.buffered){var l=o.body;if(l.start<=L&&L<=l.end)return l}}return null},v.detectEvictedFragments=function(L,C,A){var x=this;Object.keys(this.fragments).forEach(function(d){var o=x.fragments[d];if(!o)return;if(!o.buffered){o.body.type===A&&x.removeFragment(o.body);return}var l=o.range[L];if(!l)return;l.time.some(function(u){var T=!x.isTimeBuffered(u.startPTS,u.endPTS,C);return T&&x.removeFragment(o.body),T})})},v.detectPartialFragments=function(L){var C=this,A=this.timeRanges,x=L.frag,d=L.part;if(!A||x.sn==="initSegment")return;var o=I(x),l=this.fragments[o];if(!l)return;Object.keys(A).forEach(function(u){var T=x.elementaryStreams[u];if(!T)return;var m=A[u],h=d!==null||T.partial===!0;l.range[u]=C.getBufferedTimes(x,d,h,m)}),l.backtrack=l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body)},v.fragBuffered=function(L){var C=I(L),A=this.fragments[C];A&&(A.backtrack=A.loaded=null,A.buffered=!0)},v.getBufferedTimes=function(L,C,A,x){for(var d={time:[],partial:A},o=C?C.start:L.start,l=C?C.end:L.end,u=L.minEndPTS||l,T=L.maxStartPTS||o,m=0;m<x.length;m++){var h=x.start(m)-this.bufferPadding,w=x.end(m)+this.bufferPadding;if(T>=h&&u<=w){d.time.push({startPTS:Math.max(o,x.start(m)),endPTS:Math.min(l,x.end(m))});break}else if(o<w&&l>h)d.partial=!0,d.time.push({startPTS:Math.max(o,x.start(m)),endPTS:Math.min(l,x.end(m))});else if(l<=h)break}return d},v.getPartialFragment=function(L){var C=null,A,x,d,o=0,l=this.bufferPadding,u=this.fragments;return Object.keys(u).forEach(function(T){var m=u[T];if(!m)return;_(m)&&(x=m.body.start-l,d=m.body.end+l,L>=x&&L<=d&&(A=Math.min(L-x,d-L),o<=A&&(C=m.body,o=A)))}),C},v.getState=function(L){var C=I(L),A=this.fragments[C];return A?A.buffered?_(A)?M.PARTIAL:M.OK:A.backtrack?M.BACKTRACKED:M.APPENDING:M.NOT_LOADED},v.backtrack=function(L,C){var A=I(L),x=this.fragments[A];if(!x||x.backtrack)return null;var d=x.backtrack=C||x.loaded;return x.loaded=null,d},v.getBacktrackData=function(L){var C=I(L),A=this.fragments[C];if(A){var x,d=A.backtrack;if(d!=null&&(x=d.payload)!==null&&x!==void 0&&x.byteLength)return d;this.removeFragment(L)}return null},v.isTimeBuffered=function(L,C,A){for(var x,d,o=0;o<A.length;o++){if(x=A.start(o)-this.bufferPadding,d=A.end(o)+this.bufferPadding,L>=x&&C<=d)return!0;if(C<=x)return!1}return!1},v.onFragLoaded=function(L,C){var A=C.frag,x=C.part;if(A.sn==="initSegment"||A.bitrateTest||x)return;var d=I(A);this.fragments[d]={body:A,loaded:C,backtrack:null,buffered:!1,range:Object.create(null)}},v.onBufferAppended=function(L,C){var A=this,x=C.frag,d=C.part,o=C.timeRanges;if(x.type===P.PlaylistLevelType.MAIN)if(this.activeFragment=x,d){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(d)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach(function(u){var T=o[u];if(A.detectEvictedFragments(u,T),!d)for(var m=0;m<T.length;m++)x.appendedPTS=Math.max(T.end(m),x.appendedPTS||0)})},v.onFragBuffered=function(L,C){this.detectPartialFragments(C)},v.hasFragment=function(L){var C=I(L);return!!this.fragments[C]},v.removeFragmentsInRange=function(L,C,A){var x=this;Object.keys(this.fragments).forEach(function(d){var o=x.fragments[d];if(!o)return;if(o.buffered){var l=o.body;l.type===A&&l.start<C&&l.end>L&&x.removeFragment(l)}})},v.removeFragment=function(L){var C=I(L);L.stats.loaded=0,L.clearElementaryStreamInfo(),delete this.fragments[C]},v.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},R}();function _(R){var v,S;return R.buffered&&(((v=R.range.video)===null||v===void 0?void 0:v.partial)||((S=R.range.audio)===null||S===void 0?void 0:S.partial))}function I(R){return R.type+"_"+R.level+"_"+R.urlId+"_"+R.sn}},"./src/controller/gap-controller.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"STALL_MINIMUM_DURATION_MS",function(){return _}),D.d(G,"MAX_START_GAP_JUMP",function(){return I}),D.d(G,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return R}),D.d(G,"SKIP_BUFFER_RANGE_START",function(){return v}),D.d(G,"default",function(){return S});var K=D("./src/utils/buffer-helper.ts"),P=D("./src/errors.ts"),M=D("./src/events.ts"),U=D("./src/utils/logger.ts"),_=250,I=2,R=.1,v=.05,S=function(){function L(A,x,d,o){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=A,this.media=x,this.fragmentTracker=d,this.hls=o}var C=L.prototype;return C.destroy=function(){this.hls=this.fragmentTracker=this.media=null},C.poll=function(x){var d=this.config,o=this.media,l=this.stalled,u=o.currentTime,T=o.seeking,m=this.seeking&&!T,h=!this.seeking&&T;if(this.seeking=T,u!==x){if(this.moved=!0,l!==null){if(this.stallReported){var w=self.performance.now()-l;U.logger.warn("playback not stuck anymore @"+u+", after "+Math.round(w)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((h||m)&&(this.stalled=null),o.paused||o.ended||o.playbackRate===0||!K.BufferHelper.getBuffered(o).length)return;var y=K.BufferHelper.bufferInfo(o,u,0),f=y.len>0,c=y.nextStart||0;if(!f&&!c)return;if(T){var s=y.len>I,a=!c||c-u>I&&!this.fragmentTracker.getPartialFragment(u);if(s||a)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var g,p=Math.max(c,y.start||0)-u,E=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,O=E==null||((g=E.details)===null||g===void 0)?void 0:g.live,B=O?E.details.targetduration*2:I;if(p>0&&p<=B){this._trySkipBufferHole(null);return}}var W=self.performance.now();if(l===null){this.stalled=W;return}var Q=W-l;!T&&Q>=_&&this._reportStall(y.len);var F=K.BufferHelper.bufferInfo(o,u,d.maxBufferHole);this._tryFixBufferStall(F,Q)},C._tryFixBufferStall=function(x,d){var o=this.config,l=this.fragmentTracker,u=this.media,T=u.currentTime,m=l.getPartialFragment(T);if(m){var h=this._trySkipBufferHole(m);if(h)return}x.len>o.maxBufferHole&&d>o.highBufferWatchdogPeriod*1e3&&(U.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},C._reportStall=function(x){var d=this.hls,o=this.media,l=this.stallReported;l||(this.stallReported=!0,U.logger.warn("Playback stalling at @"+o.currentTime+" due to low buffer (buffer="+x+")"),d.trigger(M.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:x}))},C._trySkipBufferHole=function(x){for(var d=this.config,o=this.hls,l=this.media,u=l.currentTime,T=0,m=K.BufferHelper.getBuffered(l),h=0;h<m.length;h++){var w=m.start(h);if(u+d.maxBufferHole>=T&&u<w){var y=Math.max(w+v,l.currentTime+R);return U.logger.warn("skipping hole, adjusting currentTime from "+u+" to "+y),this.moved=!0,this.stalled=null,l.currentTime=y,x&&o.trigger(M.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+u+" to "+y,frag:x}),y}T=m.end(h)}return 0},C._tryNudgeBuffer=function(){var x=this.config,d=this.hls,o=this.media,l=o.currentTime,u=(this.nudgeRetry||0)+1;if(this.nudgeRetry=u,u<x.nudgeMaxRetry){var T=l+u*x.nudgeOffset;U.logger.warn("Nudging 'currentTime' from "+l+" to "+T),o.currentTime=T,d.trigger(M.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else U.logger.error("Playhead still not moving while enough data buffered @"+l+" after "+x.nudgeMaxRetry+" nudges"),d.trigger(M.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},L}()},"./src/controller/id3-track-controller.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/events.ts"),P=D("./src/utils/texttrack-utils.ts"),M=D("./src/demux/id3.ts"),U=.25,_=function(){function I(v){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=v,this._registerListeners()}var R=I.prototype;return R.destroy=function(){this._unregisterListeners()},R._registerListeners=function(){var S=this.hls;S.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),S.on(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),S.on(K.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),S.on(K.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R._unregisterListeners=function(){var S=this.hls;S.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),S.off(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),S.off(K.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),S.off(K.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R.onMediaAttached=function(S,L){this.media=L.media},R.onMediaDetaching=function(){if(!this.id3Track)return;Object(P.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},R.getID3Track=function(S){if(!this.media)return;for(var L=0;L<S.length;L++){var C=S[L];if(C.kind==="metadata"&&C.label==="id3")return Object(P.sendAddTrackEvent)(C,this.media),C}return this.media.addTextTrack("metadata","id3")},R.onFragParsingMetadata=function(S,L){if(!this.media)return;var C=L.frag,A=L.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var x=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,d=0;d<A.length;d++){var o=M.getID3Frames(A[d].data);if(o){var l=A[d].pts,u=d<A.length-1?A[d+1].pts:C.end,T=u-l;T<=0&&(u=l+U);for(var m=0;m<o.length;m++){var h=o[m];if(!M.isTimeStampFrame(h)){var w=new x(l,u,"");w.value=h,this.id3Track.addCue(w)}}}}},R.onBufferFlushing=function(S,L){var C=L.startOffset,A=L.endOffset,x=L.type;if(!x||x==="audio"){var d=this.id3Track;d&&Object(P.removeCuesInRange)(d,C,A)}},I}();G.default=_},"./src/controller/latency-controller.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return I});var K=D("./src/errors.ts"),P=D("./src/events.ts"),M=D("./src/utils/logger.ts");function U(R,v){for(var S=0;S<v.length;S++){var L=v[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(R,L.key,L)}}function _(R,v,S){return v&&U(R.prototype,v),S&&U(R,S),R}var I=function(){function R(S){var L=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return L.timeupdate()},this.hls=S,this.config=S.config,this.registerListeners()}var v=R.prototype;return v.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},v.registerListeners=function(){this.hls.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(P.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){this.hls.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(P.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(P.Events.ERROR,this.onError)},v.onMediaAttached=function(L,C){this.media=C.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},v.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},v.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},v.onLevelUpdated=function(L,C){var A=C.details;this.levelDetails=A,A.advanced&&this.timeupdate(),!A.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},v.onError=function(L,C){if(C.details!==K.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,M.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},v.timeupdate=function(){var L=this.media,C=this.levelDetails;if(!L||!C)return;this.currentTime=L.currentTime;var A=this.computeLatency();if(A===null)return;this._latency=A;var x=this.config,d=x.lowLatencyMode,o=x.maxLiveSyncPlaybackRate;if(!d||o===1)return;var l=this.targetLatency;if(l===null)return;var u=A-l,T=Math.min(this.maxLatency,l+C.targetduration),m=u<T;if(C.live&&m&&u>.05&&this.forwardBufferLength>1){var h=Math.min(2,Math.max(1,o)),w=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20;L.playbackRate=Math.min(h,Math.max(1,w))}else L.playbackRate!==1&&L.playbackRate!==0&&(L.playbackRate=1)},v.estimateLiveEdge=function(){var L=this.levelDetails;return L===null?null:L.edge+L.age},v.computeLatency=function(){var L=this.estimateLiveEdge();return L===null?null:L-this.currentTime},_(R,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var L=this.config,C=this.levelDetails;return L.liveMaxLatencyDuration!==void 0?L.liveMaxLatencyDuration:C?L.liveMaxLatencyDurationCount*C.targetduration:0}},{key:"targetLatency",get:function(){var L=this.levelDetails;if(L===null)return null;var C=L.holdBack,A=L.partHoldBack,x=L.targetduration,d=this.config,o=d.liveSyncDuration,l=d.liveSyncDurationCount,u=d.lowLatencyMode,T=this.hls.userConfig,m=u&&A||C;(T.liveSyncDuration||T.liveSyncDurationCount||m===0)&&(m=o!==void 0?o:l*x);var h=x,w=1;return m+Math.min(this.stallCount*w,h)}},{key:"liveSyncPosition",get:function(){var L=this.estimateLiveEdge(),C=this.targetLatency,A=this.levelDetails;if(L===null||C===null||A===null)return null;var x=A.edge,d=L-C-this.edgeStalled,o=x-A.totalduration,l=x-(this.config.lowLatencyMode&&A.partTarget||A.targetduration);return Math.min(Math.max(o,d),l)}},{key:"drift",get:function(){var L=this.levelDetails;return L===null?1:L.drift}},{key:"edgeStalled",get:function(){var L=this.levelDetails;if(L===null)return 0;var C=(this.config.lowLatencyMode&&L.partTarget||L.targetduration)*3;return Math.max(L.age-C,0)}},{key:"forwardBufferLength",get:function(){var L=this.media,C=this.levelDetails;if(!L||!C)return 0;var A=L.buffered.length;return A?L.buffered.end(A-1):C.edge-this.currentTime}}]),R}()},"./src/controller/level-controller.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return d});var K=D("./src/types/level.ts"),P=D("./src/events.ts"),M=D("./src/errors.ts"),U=D("./src/utils/codecs.ts"),_=D("./src/controller/level-helper.ts"),I=D("./src/controller/base-playlist-controller.ts"),R=D("./src/types/loader.ts");function v(){return v=Object.assign||function(o){for(var l=1;l<arguments.length;l++){var u=arguments[l];for(var T in u)Object.prototype.hasOwnProperty.call(u,T)&&(o[T]=u[T])}return o},v.apply(this,arguments)}function S(o,l){for(var u=0;u<l.length;u++){var T=l[u];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(o,T.key,T)}}function L(o,l,u){return l&&S(o.prototype,l),u&&S(o,u),o}function C(o,l){o.prototype=Object.create(l.prototype),o.prototype.constructor=o,A(o,l)}function A(o,l){return A=Object.setPrototypeOf||function(T,m){return T.__proto__=m,T},A(o,l)}var x=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),d=function(o){C(l,o);function l(T){var m;return m=o.call(this,T,"[level-controller]")||this,m._levels=[],m._firstLevel=-1,m._startLevel=void 0,m.currentLevelIndex=-1,m.manualLevelIndex=-1,m.onParsedComplete=void 0,m._registerListeners(),m}var u=l.prototype;return u._registerListeners=function(){var m=this.hls;m.on(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),m.on(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),m.on(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),m.on(P.Events.FRAG_LOADED,this.onFragLoaded,this),m.on(P.Events.ERROR,this.onError,this)},u._unregisterListeners=function(){var m=this.hls;m.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),m.off(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),m.off(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),m.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),m.off(P.Events.ERROR,this.onError,this)},u.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,o.prototype.destroy.call(this)},u.startLoad=function(){var m=this._levels;m.forEach(function(h){h.loadError=0}),o.prototype.startLoad.call(this)},u.onManifestLoaded=function(m,h){var w=[],y=[],f=[],c,s={},a,g=!1,p=!1,E=!1;if(h.levels.forEach(function(Q){var F=Q.attrs;g=g||!!(Q.width&&Q.height),p=p||!!Q.videoCodec,E=E||!!Q.audioCodec,x&&Q.audioCodec&&Q.audioCodec.indexOf("mp4a.40.34")!==-1&&(Q.audioCodec=void 0);var N=Q.bitrate+"-"+Q.attrs.RESOLUTION+"-"+Q.attrs.CODECS;a=s[N],a?a.url.push(Q.url):(a=new K.Level(Q),s[N]=a,w.push(a)),F&&(F.AUDIO&&Object(_.addGroupId)(a,"audio",F.AUDIO),F.SUBTITLES&&Object(_.addGroupId)(a,"text",F.SUBTITLES))}),(g||p)&&E&&(w=w.filter(function(Q){var F=Q.videoCodec,N=Q.width,X=Q.height;return!!F||!!(N&&X)})),w=w.filter(function(Q){var F=Q.audioCodec,N=Q.videoCodec;return(!F||Object(U.isCodecSupportedInMp4)(F,"audio"))&&(!N||Object(U.isCodecSupportedInMp4)(N,"video"))}),h.audioTracks&&(y=h.audioTracks.filter(function(Q){return!Q.audioCodec||Object(U.isCodecSupportedInMp4)(Q.audioCodec,"audio")}),Object(_.assignTrackIdsByGroup)(y)),h.subtitles&&(f=h.subtitles,Object(_.assignTrackIdsByGroup)(f)),w.length>0){c=w[0].bitrate,w.sort(function(Q,F){return Q.bitrate-F.bitrate}),this._levels=w;for(var O=0;O<w.length;O++)if(w[O].bitrate===c){this._firstLevel=O,this.log("manifest loaded, "+w.length+" level(s) found, first bitrate: "+c);break}var B=E&&!p,W={levels:w,audioTracks:y,subtitleTracks:f,firstLevel:this._firstLevel,stats:h.stats,audio:E,video:p,altAudio:!B&&y.some(function(Q){return!!Q.url})};this.hls.trigger(P.Events.MANIFEST_PARSED,W),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(P.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:h.url,reason:"no level with compatible codecs found in manifest"})},u.onError=function(m,h){if(o.prototype.onError.call(this,m,h),h.fatal)return;var w=h.context,y=this._levels[this.currentLevelIndex];if(w&&(w.type===R.PlaylistContextType.AUDIO_TRACK&&y.audioGroupIds&&w.groupId===y.audioGroupIds[y.urlId]||w.type===R.PlaylistContextType.SUBTITLE_TRACK&&y.textGroupIds&&w.groupId===y.textGroupIds[y.urlId])){this.redundantFailover(this.currentLevelIndex);return}var f=!1,c=!0,s;switch(h.details){case M.ErrorDetails.FRAG_LOAD_ERROR:case M.ErrorDetails.FRAG_LOAD_TIMEOUT:case M.ErrorDetails.KEY_LOAD_ERROR:case M.ErrorDetails.KEY_LOAD_TIMEOUT:if(h.frag){var a=this._levels[h.frag.level];a?(a.fragmentError++,a.fragmentError>this.hls.config.fragLoadingMaxRetry&&(s=h.frag.level)):s=h.frag.level}break;case M.ErrorDetails.LEVEL_LOAD_ERROR:case M.ErrorDetails.LEVEL_LOAD_TIMEOUT:w&&(w.deliveryDirectives&&(c=!1),s=w.level),f=!0;break;case M.ErrorDetails.REMUX_ALLOC_ERROR:s=h.level,f=!0;break}s!==void 0&&this.recoverLevel(h,s,f,c)},u.recoverLevel=function(m,h,w,y){var f=m.details,c=this._levels[h];if(c.loadError++,w){var s=this.retryLoadingOrFail(m);if(s)m.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(y){var a=c.url.length;if(a>1&&c.loadError<a)m.levelRetry=!0,this.redundantFailover(h);else if(this.manualLevelIndex===-1){var g=h===0?this._levels.length-1:h-1;this.currentLevelIndex!==g&&this._levels[g].loadError===0&&(this.warn(f+": switch to "+g),m.levelRetry=!0,this.hls.nextAutoLevel=g)}}},u.redundantFailover=function(m){var h=this._levels[m],w=h.url.length;if(w>1){var y=(h.urlId+1)%w;this.warn("Switching to redundant URL-id "+y),this._levels.forEach(function(f){f.urlId=y}),this.level=m}},u.onFragLoaded=function(m,h){var w=h.frag;if(w!==void 0&&w.type===R.PlaylistLevelType.MAIN){var y=this._levels[w.level];y!==void 0&&(y.fragmentError=0,y.loadError=0)}},u.onLevelLoaded=function(m,h){var w,y=h.level,f=h.details,c=this._levels[y];if(!c){var s;this.warn("Invalid level index "+y),(s=h.deliveryDirectives)!==null&&s!==void 0&&s.skip&&(f.deltaUpdateFailed=!0);return}y===this.currentLevelIndex?(c.fragmentError===0&&(c.loadError=0,this.retryCount=0),this.playlistLoaded(y,h,c.details)):(w=h.deliveryDirectives)!==null&&w!==void 0&&w.skip&&(f.deltaUpdateFailed=!0)},u.onAudioTrackSwitched=function(m,h){var w=this.hls.levels[this.currentLevelIndex];if(!w)return;if(w.audioGroupIds){for(var y=-1,f=this.hls.audioTracks[h.id].groupId,c=0;c<w.audioGroupIds.length;c++)if(w.audioGroupIds[c]===f){y=c;break}y!==w.urlId&&(w.urlId=y,this.startLoad())}},u.loadPlaylist=function(m){var h=this.currentLevelIndex,w=this._levels[h];if(this.canLoad&&w&&w.url.length>0){var y=w.urlId,f=w.url[y];if(m)try{f=m.addDirectives(f)}catch(c){this.warn("Could not construct new URL with HLS Delivery Directives: "+c)}this.log("Attempt loading level index "+h+(m?" at sn "+m.msn+" part "+m.part:"")+" with URL-id "+y+" "+f),this.clearTimer(),this.hls.trigger(P.Events.LEVEL_LOADING,{url:f,level:h,id:y,deliveryDirectives:m||null})}},u.removeLevel=function(m,h){var w=function(c,s){return s!==h},y=this._levels.filter(function(f,c){return c!==m?!0:f.url.length>1&&h!==void 0?(f.url=f.url.filter(w),f.audioGroupIds&&(f.audioGroupIds=f.audioGroupIds.filter(w)),f.textGroupIds&&(f.textGroupIds=f.textGroupIds.filter(w)),f.urlId=0,!0):!1}).map(function(f,c){var s=f.details;return s!=null&&s.fragments&&s.fragments.forEach(function(a){a.level=c}),f});this._levels=y,this.hls.trigger(P.Events.LEVELS_UPDATED,{levels:y})},L(l,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(m){var h,w=this._levels;if(w.length===0)return;if(this.currentLevelIndex===m&&(h=w[m])!==null&&h!==void 0&&h.details)return;if(m<0||m>=w.length){var y=m<0;if(this.hls.trigger(P.Events.ERROR,{type:M.ErrorTypes.OTHER_ERROR,details:M.ErrorDetails.LEVEL_SWITCH_ERROR,level:m,fatal:y,reason:"invalid level idx"}),y)return;m=Math.min(m,w.length-1)}this.clearTimer();var f=this.currentLevelIndex,c=w[f],s=w[m];this.log("switching to level "+m+" from "+f),this.currentLevelIndex=m;var a=v({},s,{level:m,maxBitrate:s.maxBitrate,uri:s.uri,urlId:s.urlId});delete a._urlId,this.hls.trigger(P.Events.LEVEL_SWITCHING,a);var g=s.details;if(!g||g.live){var p=this.switchParams(s.uri,c==null?void 0:c.details);this.loadPlaylist(p)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(m){this.manualLevelIndex=m,this._startLevel===void 0&&(this._startLevel=m),m!==-1&&(this.level=m)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(m){this._firstLevel=m}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var m=this.hls.config.startLevel;return m!==void 0?m:this._firstLevel}else return this._startLevel},set:function(m){this._startLevel=m}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(m){this.level=m,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=m)}}]),l}(I.default)},"./src/controller/level-helper.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"addGroupId",function(){return M}),D.d(G,"assignTrackIdsByGroup",function(){return U}),D.d(G,"updatePTS",function(){return _}),D.d(G,"updateFragPTSDTS",function(){return R}),D.d(G,"mergeDetails",function(){return v}),D.d(G,"mapPartIntersection",function(){return S}),D.d(G,"mapFragmentIntersection",function(){return L}),D.d(G,"adjustSliding",function(){return C}),D.d(G,"addSliding",function(){return A}),D.d(G,"computeReloadInterval",function(){return x}),D.d(G,"getFragmentWithSN",function(){return d}),D.d(G,"getPartWith",function(){return o});var K=D("./src/polyfills/number.ts"),P=D("./src/utils/logger.ts");function M(l,u,T){switch(u){case"audio":l.audioGroupIds||(l.audioGroupIds=[]),l.audioGroupIds.push(T);break;case"text":l.textGroupIds||(l.textGroupIds=[]),l.textGroupIds.push(T);break}}function U(l){var u={};l.forEach(function(T){var m=T.groupId||"";T.id=u[m]=u[m]||0,u[m]++})}function _(l,u,T){var m=l[u],h=l[T];I(m,h)}function I(l,u){var T=u.startPTS;if(Object(K.isFiniteNumber)(T)){var m=0,h;u.sn>l.sn?(m=T-l.start,h=l):(m=l.start-T,h=u),h.duration!==m&&(h.duration=m)}else if(u.sn>l.sn){var w=l.cc===u.cc;w&&l.minEndPTS?u.start=l.start+(l.minEndPTS-l.start):u.start=l.start+l.duration}else u.start=Math.max(l.start-u.duration,0)}function R(l,u,T,m,h,w){var y=m-T;y<=0&&(P.logger.warn("Fragment should have a positive duration",u),m=T+u.duration,w=h+u.duration);var f=T,c=m,s=u.startPTS,a=u.endPTS;if(Object(K.isFiniteNumber)(s)){var g=Math.abs(s-T);Object(K.isFiniteNumber)(u.deltaPTS)?u.deltaPTS=Math.max(g,u.deltaPTS):u.deltaPTS=g,f=Math.max(T,s),T=Math.min(T,s),h=Math.min(h,u.startDTS),c=Math.min(m,a),m=Math.max(m,a),w=Math.max(w,u.endDTS)}u.duration=m-T;var p=T-u.start;u.appendedPTS=m,u.start=u.startPTS=T,u.maxStartPTS=f,u.startDTS=h,u.endPTS=m,u.minEndPTS=c,u.endDTS=w;var E=u.sn;if(!l||E<l.startSN||E>l.endSN)return 0;var O,B=E-l.startSN,W=l.fragments;for(W[B]=u,O=B;O>0;O--)I(W[O],W[O-1]);for(O=B;O<W.length-1;O++)I(W[O],W[O+1]);return l.fragmentHint&&I(W[W.length-1],l.fragmentHint),l.PTSKnown=l.alignedSliding=!0,p}function v(l,u){for(var T=null,m=l.fragments,h=m.length-1;h>=0;h--){var w=m[h].initSegment;if(w){T=w;break}}l.fragmentHint&&delete l.fragmentHint.endPTS;var y=0,f;if(L(l,u,function(O,B){O.relurl&&(y=O.cc-B.cc),Object(K.isFiniteNumber)(O.startPTS)&&Object(K.isFiniteNumber)(O.endPTS)&&(B.start=B.startPTS=O.startPTS,B.startDTS=O.startDTS,B.appendedPTS=O.appendedPTS,B.maxStartPTS=O.maxStartPTS,B.endPTS=O.endPTS,B.endDTS=O.endDTS,B.minEndPTS=O.minEndPTS,B.duration=O.endPTS-O.startPTS,B.duration&&(f=B),u.PTSKnown=u.alignedSliding=!0),B.elementaryStreams=O.elementaryStreams,B.loader=O.loader,B.stats=O.stats,B.urlId=O.urlId,O.initSegment&&(B.initSegment=O.initSegment,T=O.initSegment)}),T){var c=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments;c.forEach(function(O){var B;(!O.initSegment||O.initSegment.relurl===((B=T)===null||B===void 0?void 0:B.relurl))&&(O.initSegment=T)})}if(u.skippedSegments&&(u.deltaUpdateFailed=u.fragments.some(function(O){return!O}),u.deltaUpdateFailed)){P.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var s=u.skippedSegments;s--;)u.fragments.shift();u.startSN=u.fragments[0].sn,u.startCC=u.fragments[0].cc}var a=u.fragments;if(y){P.logger.warn("discontinuity sliding from playlist, take drift into account");for(var g=0;g<a.length;g++)a[g].cc+=y}u.skippedSegments&&(u.startCC=u.fragments[0].cc),S(l.partList,u.partList,function(O,B){B.elementaryStreams=O.elementaryStreams,B.stats=O.stats}),f?R(u,f,f.startPTS,f.endPTS,f.startDTS,f.endDTS):C(l,u),a.length&&(u.totalduration=u.edge-a[0].start),u.driftStartTime=l.driftStartTime,u.driftStart=l.driftStart;var p=u.advancedDateTime;if(u.advanced&&p){var E=u.edge;u.driftStart||(u.driftStartTime=p,u.driftStart=E),u.driftEndTime=p,u.driftEnd=E}else u.driftEndTime=l.driftEndTime,u.driftEnd=l.driftEnd,u.advancedDateTime=l.advancedDateTime}function S(l,u,T){if(l&&u)for(var m=0,h=0,w=l.length;h<=w;h++){var y=l[h],f=u[h+m];y&&f&&y.index===f.index&&y.fragment.sn===f.fragment.sn?T(y,f):m--}}function L(l,u,T){for(var m=u.skippedSegments,h=Math.max(l.startSN,u.startSN)-u.startSN,w=(l.fragmentHint?1:0)+(m?u.endSN:Math.min(l.endSN,u.endSN))-u.startSN,y=u.startSN-l.startSN,f=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments,c=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,s=h;s<=w;s++){var a=c[y+s],g=f[s];m&&!g&&s<m&&(g=u.fragments[s]=a),a&&g&&T(a,g)}}function C(l,u){var T=u.startSN+u.skippedSegments-l.startSN,m=l.fragments;if(T<0||T>=m.length)return;A(u,m[T].start)}function A(l,u){if(u){for(var T=l.fragments,m=l.skippedSegments;m<T.length;m++)T[m].start+=u;l.fragmentHint&&(l.fragmentHint.start+=u)}}function x(l,u){var T=1e3*l.levelTargetDuration,m=T/2,h=l.age,w=h>0&&h<T*3,y=u.loading.end-u.loading.start,f,c=l.availabilityDelay;if(l.updated===!1)if(w){var s=333*l.misses;f=Math.max(Math.min(m,y*2),s),l.availabilityDelay=(l.availabilityDelay||0)+f}else f=m;else w?(c=Math.min(c||T/2,h),l.availabilityDelay=c,f=c+T-h):f=T-y;return Math.round(f)}function d(l,u,T){if(!l||!l.details)return null;var m=l.details,h=m.fragments[u-m.startSN];return h||(h=m.fragmentHint,h&&h.sn===u?h:u<m.startSN&&T&&T.sn===u?T:null)}function o(l,u,T){if(!l||!l.details)return null;var m=l.details.partList;if(m)for(var h=m.length;h--;){var w=m[h];if(w.index===T&&w.fragment.sn===u)return w}return null}},"./src/controller/stream-controller.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return m});var K=D("./src/polyfills/number.ts"),P=D("./src/controller/base-stream-controller.ts"),M=D("./src/is-supported.ts"),U=D("./src/events.ts"),_=D("./src/utils/buffer-helper.ts"),I=D("./src/controller/fragment-tracker.ts"),R=D("./src/types/loader.ts"),v=D("./src/loader/fragment.ts"),S=D("./src/demux/transmuxer-interface.ts"),L=D("./src/types/transmuxer.ts"),C=D("./src/controller/gap-controller.ts"),A=D("./src/errors.ts"),x=D("./src/utils/logger.ts");function d(h,w){for(var y=0;y<w.length;y++){var f=w[y];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(h,f.key,f)}}function o(h,w,y){return w&&d(h.prototype,w),y&&d(h,y),h}function l(h,w){h.prototype=Object.create(w.prototype),h.prototype.constructor=h,u(h,w)}function u(h,w){return u=Object.setPrototypeOf||function(f,c){return f.__proto__=c,f},u(h,w)}var T=100,m=function(h){l(w,h);function w(f,c){var s;return s=h.call(this,f,c,"[stream-controller]")||this,s.audioCodecSwap=!1,s.gapController=null,s.level=-1,s._forceStartLoad=!1,s.altAudio=!1,s.audioOnly=!1,s.fragPlaying=null,s.onvplaying=null,s.onvseeked=null,s.fragLastKbps=0,s.stalled=!1,s.couldBacktrack=!1,s.audioCodecSwitch=!1,s.videoBuffer=null,s._registerListeners(),s}var y=w.prototype;return y._registerListeners=function(){var c=this.hls;c.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.on(U.Events.LEVEL_LOADING,this.onLevelLoading,this),c.on(U.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.on(U.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),c.on(U.Events.ERROR,this.onError,this),c.on(U.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),c.on(U.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),c.on(U.Events.BUFFER_CREATED,this.onBufferCreated,this),c.on(U.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),c.on(U.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),c.on(U.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y._unregisterListeners=function(){var c=this.hls;c.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.off(U.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.off(U.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),c.off(U.Events.ERROR,this.onError,this),c.off(U.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),c.off(U.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),c.off(U.Events.BUFFER_CREATED,this.onBufferCreated,this),c.off(U.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),c.off(U.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),c.off(U.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},y.startLoad=function(c){if(this.levels){var s=this.lastCurrentTime,a=this.hls;if(this.stopLoad(),this.setInterval(T),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var g=a.startLevel;g===-1&&(a.config.testBandwidth?(g=0,this.bitrateTest=!0):g=a.nextAutoLevel),this.level=a.nextLoadLevel=g,this.loadedmetadata=!1}s>0&&c===-1&&(this.log("Override startPosition with lastCurrentTime @"+s.toFixed(3)),c=s),this.state=P.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=c,this.tick()}else this._forceStartLoad=!0,this.state=P.State.STOPPED},y.stopLoad=function(){this._forceStartLoad=!1,h.prototype.stopLoad.call(this)},y.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_LEVEL:{var c,s=this.levels,a=this.level,g=s==null||((c=s[a])===null||c===void 0)?void 0:c.details;if(g&&(!g.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(g))break;this.state=P.State.IDLE;break}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var p,E=self.performance.now(),O=this.retryDate;(!O||E>=O||(p=this.media)!==null&&p!==void 0&&p.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=P.State.IDLE)}break;default:break}this.onTickEnd()},y.onTickEnd=function(){h.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},y.doTickIdle=function(){var c,s,a=this.hls,g=this.levelLastLoaded,p=this.levels,E=this.media,O=a.config,B=a.nextLoadLevel;if(g===null||!E&&(this.startFragRequested||!O.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!p||!p[B])return;var W=p[B];this.level=a.nextLoadLevel=B;var Q=W.details;if(!Q||this.state===P.State.WAITING_LEVEL||Q.live&&this.levelLastLoaded!==B){this.state=P.State.WAITING_LEVEL;return}var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:E,R.PlaylistLevelType.MAIN);if(F===null)return;var N=F.len,X=this.getMaxBufferLength(W.maxBitrate);if(N>=X)return;if(this._streamEnded(F,Q)){var ee={};this.altAudio&&(ee.type="video"),this.hls.trigger(U.Events.BUFFER_EOS,ee),this.state=P.State.ENDED;return}var oe=F.end,de=this.getNextFragment(oe,Q);if(this.couldBacktrack&&!this.fragPrevious&&de&&de.sn!=="initSegment"){var Ce=de.sn-Q.startSN;Ce>1&&(de=Q.fragments[Ce-1],this.fragmentTracker.removeFragment(de))}if(de&&this.fragmentTracker.getState(de)===I.FragmentState.OK&&this.nextLoadPosition>oe){var ge=this.audioOnly&&!this.altAudio?v.ElementaryStreamTypes.AUDIO:v.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(E,ge,R.PlaylistLevelType.MAIN),de=this.getNextFragment(this.nextLoadPosition,Q)}if(!de)return;de.initSegment&&!de.initSegment.data&&!this.bitrateTest&&(de=de.initSegment),((c=de.decryptdata)===null||c===void 0?void 0:c.keyFormat)==="identity"&&!((s=de.decryptdata)!==null&&s!==void 0&&s.key)?this.loadKey(de,Q):this.loadFragment(de,Q,oe)},y.loadFragment=function(c,s,a){var g,p=this.fragmentTracker.getState(c);if(this.fragCurrent=c,p===I.FragmentState.BACKTRACKED){var E=this.fragmentTracker.getBacktrackData(c);if(E){this._handleFragmentLoadProgress(E),this._handleFragmentLoadComplete(E);return}else p=I.FragmentState.NOT_LOADED}p===I.FragmentState.NOT_LOADED||p===I.FragmentState.PARTIAL?c.sn==="initSegment"?this._loadInitSegment(c):this.bitrateTest?(c.bitrateTest=!0,this.log("Fragment "+c.sn+" of level "+c.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(c)):(this.startFragRequested=!0,h.prototype.loadFragment.call(this,c,s,a)):p===I.FragmentState.APPENDING?this.reduceMaxBufferLength(c.duration)&&this.fragmentTracker.removeFragment(c):((g=this.media)===null||g===void 0?void 0:g.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},y.getAppendedFrag=function(c){var s=this.fragmentTracker.getAppendedFrag(c,R.PlaylistLevelType.MAIN);return s&&"fragment"in s?s.fragment:s},y.getBufferedFrag=function(c){return this.fragmentTracker.getBufferedFrag(c,R.PlaylistLevelType.MAIN)},y.followingBufferedFrag=function(c){return c?this.getBufferedFrag(c.end+.5):null},y.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},y.nextLevelSwitch=function(){var c=this.levels,s=this.media;if(s!=null&&s.readyState){var a,g=this.getAppendedFrag(s.currentTime);if(g&&g.start>1&&this.flushMainBuffer(0,g.start-1),!s.paused&&c){var p=this.hls.nextLoadLevel,E=c[p],O=this.fragLastKbps;O&&this.fragCurrent?a=this.fragCurrent.duration*E.maxBitrate/(1e3*O)+1:a=0}else a=0;var B=this.getBufferedFrag(s.currentTime+a);if(B){var W=this.followingBufferedFrag(B);if(W){this.abortCurrentFrag();var Q=W.maxStartPTS?W.maxStartPTS:W.start,F=W.duration,N=Math.max(B.end,Q+Math.min(Math.max(F-this.config.maxFragLookUpTolerance,F*.5),F*.75));this.flushMainBuffer(N,Number.POSITIVE_INFINITY)}}}},y.abortCurrentFrag=function(){var c=this.fragCurrent;this.fragCurrent=null,c!=null&&c.loader&&c.loader.abort(),this.state===P.State.KEY_LOADING&&(this.state=P.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},y.flushMainBuffer=function(c,s){h.prototype.flushMainBuffer.call(this,c,s,this.altAudio?"video":null)},y.onMediaAttached=function(c,s){h.prototype.onMediaAttached.call(this,c,s);var a=s.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),a.addEventListener("playing",this.onvplaying),a.addEventListener("seeked",this.onvseeked),this.gapController=new C.default(this.config,a,this.fragmentTracker,this.hls)},y.onMediaDetaching=function(){var c=this.media;c&&(c.removeEventListener("playing",this.onvplaying),c.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),h.prototype.onMediaDetaching.call(this)},y.onMediaPlaying=function(){this.tick()},y.onMediaSeeked=function(){var c=this.media,s=c?c.currentTime:null;Object(K.isFiniteNumber)(s)&&this.log("Media seeked to "+s.toFixed(3)),this.tick()},y.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(U.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},y.onManifestParsed=function(c,s){var a=!1,g=!1,p;s.levels.forEach(function(E){p=E.audioCodec,p&&(p.indexOf("mp4a.40.2")!==-1&&(a=!0),p.indexOf("mp4a.40.5")!==-1&&(g=!0))}),this.audioCodecSwitch=a&&g&&!Object(M.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=s.levels,this.startFragRequested=!1},y.onLevelLoading=function(c,s){var a=this.levels;if(!a||this.state!==P.State.IDLE)return;var g=a[s.level];(!g.details||g.details.live&&this.levelLastLoaded!==s.level||this.waitForCdnTuneIn(g.details))&&(this.state=P.State.WAITING_LEVEL)},y.onLevelLoaded=function(c,s){var a,g=this.levels,p=s.level,E=s.details,O=E.totalduration;if(!g){this.warn("Levels were reset while loading level "+p);return}this.log("Level "+p+" loaded ["+E.startSN+","+E.endSN+"], cc ["+E.startCC+", "+E.endCC+"] duration:"+O);var B=this.fragCurrent;B&&(this.state===P.State.FRAG_LOADING||this.state===P.State.FRAG_LOADING_WAITING_RETRY)&&(B.level!==s.level&&B.loader&&(this.state=P.State.IDLE,B.loader.abort()));var W=g[p],Q=0;if(E.live||(a=W.details)!==null&&a!==void 0&&a.live){if(E.fragments[0]||(E.deltaUpdateFailed=!0),E.deltaUpdateFailed)return;Q=this.alignPlaylists(E,W.details)}if(W.details=E,this.levelLastLoaded=p,this.hls.trigger(U.Events.LEVEL_UPDATED,{details:E,level:p}),this.state===P.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(E))return;this.state=P.State.IDLE}this.startFragRequested?E.live&&this.synchronizeToLiveEdge(E):this.setStartPosition(E,Q),this.tick()},y._handleFragmentLoadProgress=function(c){var s,a=c.frag,g=c.part,p=c.payload,E=this.levels;if(!E){this.warn("Levels were reset while fragment load was in progress. Fragment "+a.sn+" of level "+a.level+" will not be buffered");return}var O=E[a.level],B=O.details;if(!B){this.warn("Dropping fragment "+a.sn+" of level "+a.level+" after level details were reset");return}var W=O.videoCodec,Q=B.PTSKnown||!B.live,F=(s=a.initSegment)===null||s===void 0?void 0:s.data,N=this._getAudioCodec(O),X=this.transmuxer=this.transmuxer||new S.default(this.hls,R.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ee=g?g.index:-1,oe=ee!==-1,de=new L.ChunkMetadata(a.level,a.sn,a.stats.chunkCount,p.byteLength,ee,oe),Ce=this.initPTS[a.cc];X.push(p,F,N,W,a,g,B.totalduration,Q,de,Ce)},y.onAudioTrackSwitching=function(c,s){var a=this.altAudio,g=!!s.url,p=s.id;if(!g){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var E=this.fragCurrent;E!=null&&E.loader&&(this.log("Switching to main audio track, cancel main fragment load"),E.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var O=this.hls;a&&O.trigger(U.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),O.trigger(U.Events.AUDIO_TRACK_SWITCHED,{id:p})}},y.onAudioTrackSwitched=function(c,s){var a=s.id,g=!!this.hls.audioTracks[a].url;if(g){var p=this.videoBuffer;p&&this.mediaBuffer!==p&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=p)}this.altAudio=g,this.tick()},y.onBufferCreated=function(c,s){var a=s.tracks,g,p,E=!1;for(var O in a){var B=a[O];if(B.id==="main"){if(p=O,g=B,O==="video"){var W=a[O];W&&(this.videoBuffer=W.buffer)}}else E=!0}E&&g?(this.log("Alternate track found, use "+p+".buffered to schedule main fragment loading"),this.mediaBuffer=g.buffer):this.mediaBuffer=this.media},y.onFragBuffered=function(c,s){var a=s.frag,g=s.part;if(a&&a.type!==R.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(a)){this.warn("Fragment "+a.sn+(g?" p: "+g.index:"")+" of level "+a.level+" finished buffering, but was aborted. state: "+this.state),this.state===P.State.PARSED&&(this.state=P.State.IDLE);return}var p=g?g.stats:a.stats;this.fragLastKbps=Math.round(8*p.total/(p.buffering.end-p.loading.first)),a.sn!=="initSegment"&&(this.fragPrevious=a),this.fragBufferedComplete(a,g)},y.onError=function(c,s){switch(s.details){case A.ErrorDetails.FRAG_LOAD_ERROR:case A.ErrorDetails.FRAG_LOAD_TIMEOUT:case A.ErrorDetails.KEY_LOAD_ERROR:case A.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(R.PlaylistLevelType.MAIN,s);break;case A.ErrorDetails.LEVEL_LOAD_ERROR:case A.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==P.State.ERROR&&(s.fatal?(this.warn(""+s.details),this.state=P.State.ERROR):!s.levelRetry&&this.state===P.State.WAITING_LEVEL&&(this.state=P.State.IDLE));break;case A.ErrorDetails.BUFFER_FULL_ERROR:if(s.parent==="main"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var a=!0,g=this.getFwdBufferInfo(this.media,R.PlaylistLevelType.MAIN);g&&g.len>.5&&(a=!this.reduceMaxBufferLength(g.len)),a&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},y.checkBuffer=function(){var c=this.media,s=this.gapController;if(!c||!s||!c.readyState)return;var a=_.BufferHelper.getBuffered(c);!this.loadedmetadata&&a.length?(this.loadedmetadata=!0,this.seekToStartPos()):s.poll(this.lastCurrentTime),this.lastCurrentTime=c.currentTime},y.onFragLoadEmergencyAborted=function(){this.state=P.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},y.onBufferFlushed=function(c,s){var a=s.type;if(a!==v.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var g=(a===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(g,a,R.PlaylistLevelType.MAIN)}},y.onLevelsUpdated=function(c,s){this.levels=s.levels},y.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},y.seekToStartPos=function(){var c=this.media,s=c.currentTime,a=this.startPosition;if(a>=0&&s<a){if(c.seeking){x.logger.log("could not seek to "+a+", already seeking at "+s);return}var g=_.BufferHelper.getBuffered(c),p=g.length?g.start(0):0,E=p-a;E>0&&(E<this.config.maxBufferHole||E<this.config.maxFragLookUpTolerance)&&(x.logger.log("adjusting start position by "+E+" to match buffer start"),a+=E,this.startPosition=a),this.log("seek to target start position "+a+" from current time "+s),c.currentTime=a}},y._getAudioCodec=function(c){var s=this.config.defaultAudioCodec||c.audioCodec;return this.audioCodecSwap&&s&&(this.log("Swapping audio codec"),s.indexOf("mp4a.40.5")!==-1?s="mp4a.40.2":s="mp4a.40.5"),s},y._loadBitrateTestFrag=function(c){var s=this;this._doFragLoad(c).then(function(a){var g=s.hls;if(!a||g.nextLoadLevel||s.fragContextChanged(c))return;s.fragLoadError=0,s.state=P.State.IDLE,s.startFragRequested=!1,s.bitrateTest=!1;var p=c.stats;p.parsing.start=p.parsing.end=p.buffering.start=p.buffering.end=self.performance.now(),g.trigger(U.Events.FRAG_LOADED,a)})},y._handleTransmuxComplete=function(c){var s,a="main",g=this.hls,p=c.remuxResult,E=c.chunkMeta,O=this.getCurrentContext(E);if(!O){this.warn("The loading context changed while buffering fragment "+E.sn+" of level "+E.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(E.level);return}var B=O.frag,W=O.part,Q=O.level,F=p.video,N=p.text,X=p.id3,ee=p.initSegment,oe=this.altAudio?void 0:p.audio;if(this.fragContextChanged(B))return;if(this.state=P.State.PARSING,ee){ee.tracks&&(this._bufferInitSegment(Q,ee.tracks,B,E),g.trigger(U.Events.FRAG_PARSING_INIT_SEGMENT,{frag:B,id:a,tracks:ee.tracks}));var de=ee.initPTS,Ce=ee.timescale;Object(K.isFiniteNumber)(de)&&(this.initPTS[B.cc]=de,g.trigger(U.Events.INIT_PTS_FOUND,{frag:B,id:a,initPTS:de,timescale:Ce}))}if(F&&p.independent!==!1){if(Q.details){var ge=F.startPTS,fe=F.endPTS,me=F.startDTS,pe=F.endDTS;if(W)W.elementaryStreams[F.type]={startPTS:ge,endPTS:fe,startDTS:me,endDTS:pe};else if(F.firstKeyFrame&&F.independent&&(this.couldBacktrack=!0),F.dropped&&F.independent){var ie=this.getLoadPosition()+this.config.maxBufferHole;if(ie<ge){this.backtrack(B);return}B.setElementaryStreamInfo(F.type,B.start,fe,B.start,pe,!0)}B.setElementaryStreamInfo(F.type,ge,fe,me,pe),this.bufferFragmentData(F,B,W,E)}}else if(p.independent===!1){this.backtrack(B);return}if(oe){var ue=oe.startPTS,be=oe.endPTS,_e=oe.startDTS,Oe=oe.endDTS;W&&(W.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:ue,endPTS:be,startDTS:_e,endDTS:Oe}),B.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,ue,be,_e,Oe),this.bufferFragmentData(oe,B,W,E)}if(X!=null&&(s=X.samples)!==null&&s!==void 0&&s.length){var We={frag:B,id:a,samples:X.samples};g.trigger(U.Events.FRAG_PARSING_METADATA,We)}if(N){var Ve={frag:B,id:a,samples:N.samples};g.trigger(U.Events.FRAG_PARSING_USERDATA,Ve)}},y._bufferInitSegment=function(c,s,a,g){var p=this;if(this.state!==P.State.PARSING)return;this.audioOnly=!!s.audio&&!s.video,this.altAudio&&!this.audioOnly&&delete s.audio;var E=s.audio,O=s.video,B=s.audiovideo;if(E){var W=c.audioCodec,Q=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(W&&(W.indexOf("mp4a.40.5")!==-1?W="mp4a.40.2":W="mp4a.40.5"),E.metadata.channelCount!==1&&Q.indexOf("firefox")===-1&&(W="mp4a.40.5")),Q.indexOf("android")!==-1&&E.container!=="audio/mpeg"&&(W="mp4a.40.2",this.log("Android: force audio codec to "+W)),c.audioCodec&&c.audioCodec!==W&&this.log('Swapping manifest audio codec "'+c.audioCodec+'" for "'+W+'"'),E.levelCodec=W,E.id="main",this.log("Init audio buffer, container:"+E.container+", codecs[selected/level/parsed]=["+(W||"")+"/"+(c.audioCodec||"")+"/"+E.codec+"]")}O&&(O.levelCodec=c.videoCodec,O.id="main",this.log("Init video buffer, container:"+O.container+", codecs[level/parsed]=["+(c.videoCodec||"")+"/"+O.codec+"]")),B&&this.log("Init audiovideo buffer, container:"+B.container+", codecs[level/parsed]=["+(c.attrs.CODECS||"")+"/"+B.codec+"]"),this.hls.trigger(U.Events.BUFFER_CODECS,s),Object.keys(s).forEach(function(F){var N=s[F],X=N.initSegment;X!=null&&X.byteLength&&p.hls.trigger(U.Events.BUFFER_APPENDING,{type:F,data:X,frag:a,part:null,chunkMeta:g,parent:a.type})}),this.tick()},y.backtrack=function(c){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(c);var s=this.fragmentTracker.backtrack(c);this.fragPrevious=null,this.nextLoadPosition=c.start,s?this.resetFragmentLoading(c):this.state=P.State.BACKTRACKING},y.checkFragmentChanged=function(){var c=this.media,s=null;if(c&&c.readyState>1&&c.seeking===!1){var a=c.currentTime;if(_.BufferHelper.isBuffered(c,a)?s=this.getAppendedFrag(a):_.BufferHelper.isBuffered(c,a+.1)&&(s=this.getAppendedFrag(a+.1)),s){var g=this.fragPlaying,p=s.level;(!g||s.sn!==g.sn||g.level!==p||s.urlId!==g.urlId)&&(this.hls.trigger(U.Events.FRAG_CHANGED,{frag:s}),(!g||g.level!==p)&&this.hls.trigger(U.Events.LEVEL_SWITCHED,{level:p}),this.fragPlaying=s)}}},o(w,[{key:"nextLevel",get:function(){var c=this.nextBufferedFrag;return c?c.level:-1}},{key:"currentLevel",get:function(){var c=this.media;if(c){var s=this.getAppendedFrag(c.currentTime);if(s)return s.level}return-1}},{key:"nextBufferedFrag",get:function(){var c=this.media;if(c){var s=this.getAppendedFrag(c.currentTime);return this.followingBufferedFrag(s)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),w}(P.default)},"./src/controller/subtitle-stream-controller.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"SubtitleStreamController",function(){return l});var K=D("./src/events.ts"),P=D("./src/utils/logger.ts"),M=D("./src/utils/buffer-helper.ts"),U=D("./src/controller/fragment-finders.ts"),_=D("./src/utils/discontinuities.ts"),I=D("./src/controller/level-helper.ts"),R=D("./src/controller/fragment-tracker.ts"),v=D("./src/controller/base-stream-controller.ts"),S=D("./src/types/loader.ts"),L=D("./src/types/level.ts");function C(u,T){for(var m=0;m<T.length;m++){var h=T[m];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(u,h.key,h)}}function A(u,T,m){return T&&C(u.prototype,T),m&&C(u,m),u}function x(u,T){u.prototype=Object.create(T.prototype),u.prototype.constructor=u,d(u,T)}function d(u,T){return d=Object.setPrototypeOf||function(h,w){return h.__proto__=w,h},d(u,T)}var o=500,l=function(u){x(T,u);function T(h,w){var y;return y=u.call(this,h,w,"[subtitle-stream-controller]")||this,y.levels=[],y.currentTrackId=-1,y.tracksBuffered=[],y.mainDetails=null,y._registerListeners(),y}var m=T.prototype;return m.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},m._registerListeners=function(){var w=this.hls;w.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.on(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.on(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.on(K.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.on(K.Events.ERROR,this.onError,this),w.on(K.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),w.on(K.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),w.on(K.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),w.on(K.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),w.on(K.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},m._unregisterListeners=function(){var w=this.hls;w.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.off(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.off(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.off(K.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.off(K.Events.ERROR,this.onError,this),w.off(K.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),w.off(K.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),w.off(K.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),w.off(K.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),w.off(K.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},m.startLoad=function(){this.stopLoad(),this.state=v.State.IDLE,this.setInterval(o),this.tick()},m.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},m.onLevelLoaded=function(w,y){this.mainDetails=y.details},m.onSubtitleFragProcessed=function(w,y){var f=y.frag,c=y.success;if(this.fragPrevious=f,this.state=v.State.IDLE,!c)return;var s=this.tracksBuffered[this.currentTrackId];if(!s)return;for(var a,g=f.start,p=0;p<s.length;p++)if(g>=s[p].start&&g<=s[p].end){a=s[p];break}var E=f.start+f.duration;a?a.end=E:(a={start:g,end:E},s.push(a)),this.fragmentTracker.fragBuffered(f)},m.onBufferFlushing=function(w,y){var f=y.startOffset,c=y.endOffset;if(f===0&&c!==Number.POSITIVE_INFINITY){var s=this.currentTrackId,a=this.levels;if(!a.length||!a[s]||!a[s].details)return;var g=a[s].details,p=g.targetduration,E=c-p;if(E<=0)return;y.endOffsetSubtitles=Math.max(0,E),this.tracksBuffered.forEach(function(O){for(var B=0;B<O.length;){if(O[B].end<=E){O.shift();continue}else if(O[B].start<E)O[B].start=E;else break;B++}}),this.fragmentTracker.removeFragmentsInRange(f,E,S.PlaylistLevelType.SUBTITLE)}},m.onError=function(w,y){var f,c=y.frag;if(!c||c.type!==S.PlaylistLevelType.SUBTITLE)return;(f=this.fragCurrent)!==null&&f!==void 0&&f.loader&&this.fragCurrent.loader.abort(),this.state=v.State.IDLE},m.onSubtitleTracksUpdated=function(w,y){var f=this,c=y.subtitleTracks;this.tracksBuffered=[],this.levels=c.map(function(s){return new L.Level(s)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(s){f.tracksBuffered[s.id]=[]}),this.mediaBuffer=null},m.onSubtitleTrackSwitch=function(w,y){if(this.currentTrackId=y.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var f=this.levels[this.currentTrackId];f!=null&&f.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,f&&this.setInterval(o)},m.onSubtitleTrackLoaded=function(w,y){var f,c=y.details,s=y.id,a=this.currentTrackId,g=this.levels;if(!g.length)return;var p=g[a];if(s>=g.length||s!==a||!p)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,c.live||(f=p.details)!==null&&f!==void 0&&f.live){var E=this.mainDetails;if(c.deltaUpdateFailed||!E)return;var O=E.fragments[0];if(!p.details)c.hasProgramDateTime&&E.hasProgramDateTime?Object(_.alignMediaPlaylistByPDT)(c,E):O&&Object(I.addSliding)(c,O.start);else{var B=this.alignPlaylists(c,p.details);B===0&&O&&Object(I.addSliding)(c,O.start)}}if(p.details=c,this.levelLastLoaded=s,this.tick(),c.live&&!this.fragCurrent&&this.media&&this.state===v.State.IDLE){var W=Object(U.findFragmentByPTS)(null,c.fragments,this.media.currentTime,0);W||(this.warn("Subtitle playlist not aligned with playback"),p.details=void 0)}},m._handleFragmentLoadComplete=function(w){var y=w.frag,f=w.payload,c=y.decryptdata,s=this.hls;if(this.fragContextChanged(y))return;if(f&&f.byteLength>0&&c&&c.key&&c.iv&&c.method==="AES-128"){var a=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(f),c.key.buffer,c.iv.buffer).then(function(g){var p=performance.now();s.trigger(K.Events.FRAG_DECRYPTED,{frag:y,payload:g,stats:{tstart:a,tdecrypt:p}})})}},m.doTick=function(){if(!this.media){this.state=v.State.IDLE;return}if(this.state===v.State.IDLE){var w,y=this.currentTrackId,f=this.levels;if(!f.length||!f[y]||!f[y].details)return;var c=f[y].details,s=c.targetduration,a=this.config,g=this.media,p=M.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,g.currentTime-s,a.maxBufferHole),E=p.end,O=p.len,B=this.getMaxBufferLength()+s;if(O>B)return;console.assert(c,"Subtitle track details are defined on idle subtitle stream controller tick");var W=c.fragments,Q=W.length,F=c.edge,N,X=this.fragPrevious;if(E<F){var ee=a.maxFragLookUpTolerance;X&&c.hasProgramDateTime&&(N=Object(U.findFragmentByPDT)(W,X.endProgramDateTime,ee)),N||(N=Object(U.findFragmentByPTS)(X,W,E,ee),!N&&X&&X.start<W[0].start&&(N=W[0]))}else N=W[Q-1];(w=N)!==null&&w!==void 0&&w.encrypted?(P.logger.log("Loading key for "+N.sn),this.state=v.State.KEY_LOADING,this.hls.trigger(K.Events.KEY_LOADING,{frag:N})):N&&this.fragmentTracker.getState(N)===R.FragmentState.NOT_LOADED&&this.loadFragment(N,c,E)}},m.loadFragment=function(w,y,f){this.fragCurrent=w,u.prototype.loadFragment.call(this,w,y,f)},A(T,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),T}(v.default)},"./src/controller/subtitle-track-controller.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/events.ts"),P=D("./src/utils/texttrack-utils.ts"),M=D("./src/controller/base-playlist-controller.ts"),U=D("./src/types/loader.ts");function _(C,A){for(var x=0;x<A.length;x++){var d=A[x];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(C,d.key,d)}}function I(C,A,x){return A&&_(C.prototype,A),x&&_(C,x),C}function R(C,A){C.prototype=Object.create(A.prototype),C.prototype.constructor=C,v(C,A)}function v(C,A){return v=Object.setPrototypeOf||function(d,o){return d.__proto__=o,d},v(C,A)}var S=function(C){R(A,C);function A(d){var o;return o=C.call(this,d,"[subtitle-track-controller]")||this,o.media=null,o.tracks=[],o.groupId=null,o.tracksInGroup=[],o.trackId=-1,o.selectDefaultTrack=!0,o.queuedDefaultTrack=-1,o.trackChangeListener=function(){return o.onTextTracksChanged()},o.asyncPollTrackChange=function(){return o.pollTrackChange(0)},o.useTextTrackPolling=!1,o.subtitlePollingInterval=-1,o.subtitleDisplay=!0,o.registerListeners(),o}var x=A.prototype;return x.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,C.prototype.destroy.call(this)},x.registerListeners=function(){var o=this.hls;o.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.on(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(K.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(K.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.on(K.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),o.on(K.Events.ERROR,this.onError,this)},x.unregisterListeners=function(){var o=this.hls;o.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.off(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(K.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(K.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.off(K.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),o.off(K.Events.ERROR,this.onError,this)},x.onMediaAttached=function(o,l){if(this.media=l.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},x.pollTrackChange=function(o){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,o)},x.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var o=L(this.media.textTracks);o.forEach(function(l){Object(P.clearCurrentCues)(l)}),this.subtitleTrack=-1,this.media=null},x.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},x.onManifestParsed=function(o,l){this.tracks=l.subtitleTracks},x.onSubtitleTrackLoaded=function(o,l){var u=l.id,T=l.details,m=this.trackId,h=this.tracksInGroup[m];if(!h){this.warn("Invalid subtitle track id "+u);return}var w=h.details;h.details=l.details,this.log("subtitle track "+u+" loaded ["+T.startSN+"-"+T.endSN+"]"),u===this.trackId&&(this.retryCount=0,this.playlistLoaded(u,l,w))},x.onLevelLoading=function(o,l){this.switchLevel(l.level)},x.onLevelSwitching=function(o,l){this.switchLevel(l.level)},x.switchLevel=function(o){var l=this.hls.levels[o];if(!(l!=null&&l.textGroupIds))return;var u=l.textGroupIds[l.urlId];if(this.groupId!==u){var T=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,m=this.tracks.filter(function(y){return!u||y.groupId===u});this.tracksInGroup=m;var h=this.findTrackId(T==null?void 0:T.name)||this.findTrackId();this.groupId=u;var w={subtitleTracks:m};this.log("Updating subtitle tracks, "+m.length+' track(s) found in "'+u+'" group-id'),this.hls.trigger(K.Events.SUBTITLE_TRACKS_UPDATED,w),h!==-1&&this.setSubtitleTrack(h,T)}},x.findTrackId=function(o){for(var l=this.tracksInGroup,u=0;u<l.length;u++){var T=l[u];if((!this.selectDefaultTrack||T.default)&&(!o||o===T.name))return T.id}return-1},x.onError=function(o,l){if(C.prototype.onError.call(this,o,l),l.fatal||!l.context)return;l.context.type===U.PlaylistContextType.SUBTITLE_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},x.loadPlaylist=function(o){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var u=l.id,T=l.groupId,m=l.url;if(o)try{m=o.addDirectives(m)}catch(h){this.warn("Could not construct new URL with HLS Delivery Directives: "+h)}this.log("Loading subtitle playlist for id "+u),this.hls.trigger(K.Events.SUBTITLE_TRACK_LOADING,{url:m,id:u,groupId:T,deliveryDirectives:o||null})}},x.toggleTrackModes=function(o){var l=this,u=this.media,T=this.subtitleDisplay,m=this.trackId;if(!u)return;var h=L(u.textTracks),w=h.filter(function(c){return c.groupId===l.groupId});if(o===-1)[].slice.call(h).forEach(function(c){c.mode="disabled"});else{var y=w[m];y&&(y.mode="disabled")}var f=w[o];f&&(f.mode=T?"showing":"hidden")},x.setSubtitleTrack=function(o,l){var u,T=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=o;return}if(this.trackId!==o&&this.toggleTrackModes(o),this.trackId===o&&(o===-1||(u=T[o])!==null&&u!==void 0&&u.details)||o<-1||o>=T.length)return;this.clearTimer();var m=T[o];if(this.log("Switching to subtitle track "+o),this.trackId=o,m){var h=m.id,w=m.groupId,y=w===void 0?"":w,f=m.name,c=m.type,s=m.url;this.hls.trigger(K.Events.SUBTITLE_TRACK_SWITCH,{id:h,groupId:y,name:f,type:c,url:s});var a=this.switchParams(m.url,l==null?void 0:l.details);this.loadPlaylist(a)}else this.hls.trigger(K.Events.SUBTITLE_TRACK_SWITCH,{id:o})},x.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var o=-1,l=L(this.media.textTracks),u=0;u<l.length;u++)if(l[u].mode==="hidden")o=u;else if(l[u].mode==="showing"){o=u;break}this.subtitleTrack!==o&&(this.subtitleTrack=o)},I(A,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(o){this.selectDefaultTrack=!1;var l=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(o,l)}}]),A}(M.default);function L(C){for(var A=[],x=0;x<C.length;x++){var d=C[x];d.kind==="subtitles"&&d.label&&A.push(C[x])}return A}G.default=S},"./src/controller/timeline-controller.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"TimelineController",function(){return L});var K=D("./src/polyfills/number.ts"),P=D("./src/events.ts"),M=D("./src/utils/cea-608-parser.ts"),U=D("./src/utils/output-filter.ts"),_=D("./src/utils/webvtt-parser.ts"),I=D("./src/utils/texttrack-utils.ts"),R=D("./src/utils/imsc1-ttml-parser.ts"),v=D("./src/types/loader.ts"),S=D("./src/utils/logger.ts"),L=function(){function d(l){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=x(),this.captionsProperties=void 0,this.hls=l,this.config=l.config,this.Cues=l.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var u=new U.default(this,"textTrack1"),T=new U.default(this,"textTrack2"),m=new U.default(this,"textTrack3"),h=new U.default(this,"textTrack4");this.cea608Parser1=new M.default(1,u,T),this.cea608Parser2=new M.default(3,m,h)}l.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),l.on(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.on(P.Events.FRAG_LOADING,this.onFragLoading,this),l.on(P.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.on(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),l.on(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var o=d.prototype;return o.destroy=function(){var u=this.hls;u.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),u.off(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),u.off(P.Events.FRAG_LOADING,this.onFragLoading,this),u.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),u.off(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),u.off(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.off(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),u.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},o.addCues=function(u,T,m,h,w){for(var y=!1,f=w.length;f--;){var c=w[f],s=A(c[0],c[1],T,m);if(s>=0&&(c[0]=Math.min(c[0],T),c[1]=Math.max(c[1],m),y=!0,s/(m-T)>.5))return}if(y||w.push([T,m]),this.config.renderTextTracksNatively){var a=this.captionsTracks[u];this.Cues.newCue(a,T,m,h)}else{var g=this.Cues.newCue(null,T,m,h);this.hls.trigger(P.Events.CUES_PARSED,{type:"captions",cues:g,track:u})}},o.onInitPtsFound=function(u,T){var m=this,h=T.frag,w=T.id,y=T.initPTS,f=T.timescale,c=this.unparsedVttFrags;w==="main"&&(this.initPTS[h.cc]=y,this.timescale[h.cc]=f),c.length&&(this.unparsedVttFrags=[],c.forEach(function(s){m.onFragLoaded(P.Events.FRAG_LOADED,s)}))},o.getExistingTrack=function(u){var T=this.media;if(T)for(var m=0;m<T.textTracks.length;m++){var h=T.textTracks[m];if(h[u])return h}return null},o.createCaptionsTrack=function(u){this.config.renderTextTracksNatively?this.createNativeTrack(u):this.createNonNativeTrack(u)},o.createNativeTrack=function(u){if(this.captionsTracks[u])return;var T=this.captionsProperties,m=this.captionsTracks,h=this.media,w=T[u],y=w.label,f=w.languageCode,c=this.getExistingTrack(u);if(c)m[u]=c,Object(I.clearCurrentCues)(m[u]),Object(I.sendAddTrackEvent)(m[u],h);else{var s=this.createTextTrack("captions",y,f);s&&(s[u]=!0,m[u]=s)}},o.createNonNativeTrack=function(u){if(this.nonNativeCaptionsTracks[u])return;var T=this.captionsProperties[u];if(!T)return;var m=T.label,h={_id:u,label:m,kind:"captions",default:T.media?!!T.media.default:!1,closedCaptions:T.media};this.nonNativeCaptionsTracks[u]=h,this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[h]})},o.createTextTrack=function(u,T,m){var h=this.media;return h?h.addTextTrack(u,T,m):void 0},o.onMediaAttaching=function(u,T){this.media=T.media,this._cleanTracks()},o.onMediaDetaching=function(){var u=this.captionsTracks;Object.keys(u).forEach(function(T){Object(I.clearCurrentCues)(u[T]),delete u[T]}),this.nonNativeCaptionsTracks={}},o.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=x(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},o._cleanTracks=function(){var u=this.media;if(!u)return;var T=u.textTracks;if(T)for(var m=0;m<T.length;m++)Object(I.clearCurrentCues)(T[m])},o.onSubtitleTracksUpdated=function(u,T){var m=this;this.textTracks=[];var h=T.subtitleTracks||[],w=h.some(function(s){return s.textCodec===R.IMSC1_CODEC});if(this.config.enableWebVTT||w&&this.config.enableIMSC1){var y=this.tracks&&h&&this.tracks.length===h.length;if(this.tracks=h||[],this.config.renderTextTracksNatively){var f=this.media?this.media.textTracks:[];this.tracks.forEach(function(s,a){var g;if(a<f.length){for(var p=null,E=0;E<f.length;E++)if(C(f[E],s)){p=f[E];break}p&&(g=p)}g?Object(I.clearCurrentCues)(g):(g=m.createTextTrack("subtitles",s.name,s.lang),g&&(g.mode="disabled")),g&&(g.groupId=s.groupId,m.textTracks.push(g))})}else if(!y&&this.tracks&&this.tracks.length){var c=this.tracks.map(function(s){return{label:s.name,kind:s.type.toLowerCase(),default:s.default,subtitleTrack:s}});this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:c})}}},o.onManifestLoaded=function(u,T){var m=this;this.config.enableCEA708Captions&&T.captions&&T.captions.forEach(function(h){var w=/(?:CC|SERVICE)([1-4])/.exec(h.instreamId);if(!w)return;var y="textTrack"+w[1],f=m.captionsProperties[y];if(!f)return;f.label=h.name,h.lang&&(f.languageCode=h.lang),f.media=h})},o.onFragLoading=function(u,T){var m=this.cea608Parser1,h=this.cea608Parser2,w=this.lastSn,y=this.lastPartIndex;if(!this.enabled||!(m&&h))return;if(T.frag.type===v.PlaylistLevelType.MAIN){var f,c,s=T.frag.sn,a=(f=T==null||((c=T.part)===null||c===void 0)?void 0:c.index)!=null?f:-1;s===w+1||s===w&&a===y+1||(m.reset(),h.reset()),this.lastSn=s,this.lastPartIndex=a}},o.onFragLoaded=function(u,T){var m=T.frag,h=T.payload,w=this.initPTS,y=this.unparsedVttFrags;if(m.type===v.PlaylistLevelType.SUBTITLE)if(h.byteLength){if(!Object(K.isFiniteNumber)(w[m.cc])){y.push(T),w.length&&this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:m,error:new Error("Missing initial subtitle PTS")});return}var f=m.decryptdata;if(f==null||f.key==null||f.method!=="AES-128"){var c=this.tracks[m.level],s=this.vttCCs;s[m.cc]||(s[m.cc]={start:m.start,prevCC:this.prevCC,new:!0},this.prevCC=m.cc),c&&c.textCodec===R.IMSC1_CODEC?this._parseIMSC1(m,h):this._parseVTTs(m,h,s)}}else this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:m,error:new Error("Empty subtitle payload")})},o._parseIMSC1=function(u,T){var m=this,h=this.hls;Object(R.parseIMSC1)(T,this.initPTS[u.cc],this.timescale[u.cc],function(w){m._appendCues(w,u.level),h.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(w){S.logger.log("Failed to parse IMSC1: "+w),h.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:w})})},o._parseVTTs=function(u,T,m){var h=this,w=this.hls;Object(_.parseWebVTT)(T,this.initPTS[u.cc],this.timescale[u.cc],m,u.cc,u.start,function(y){h._appendCues(y,u.level),w.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(y){h._fallbackToIMSC1(u,T),S.logger.log("Failed to parse VTT cue: "+y),w.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:y})})},o._fallbackToIMSC1=function(u,T){var m=this,h=this.tracks[u.level];h.textCodec||Object(R.parseIMSC1)(T,this.initPTS[u.cc],this.timescale[u.cc],function(){h.textCodec=R.IMSC1_CODEC,m._parseIMSC1(u,T)},function(){h.textCodec="wvtt"})},o._appendCues=function(u,T){var m=this.hls;if(this.config.renderTextTracksNatively){var h=this.textTracks[T];if(h.mode==="disabled")return;u.forEach(function(f){return Object(I.addCueToTrack)(h,f)})}else{var w=this.tracks[T],y=w.default?"default":"subtitles"+T;m.trigger(P.Events.CUES_PARSED,{type:"subtitles",cues:u,track:y})}},o.onFragDecrypted=function(u,T){var m=T.frag;if(m.type===v.PlaylistLevelType.SUBTITLE){if(!Object(K.isFiniteNumber)(this.initPTS[m.cc])){this.unparsedVttFrags.push(T);return}this.onFragLoaded(P.Events.FRAG_LOADED,T)}},o.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},o.onFragParsingUserdata=function(u,T){var m=this.cea608Parser1,h=this.cea608Parser2;if(!this.enabled||!(m&&h))return;for(var w=0;w<T.samples.length;w++){var y=T.samples[w].bytes;if(y){var f=this.extractCea608Data(y);m.addData(T.samples[w].pts,f[0]),h.addData(T.samples[w].pts,f[1])}}},o.onBufferFlushing=function(u,T){var m=T.startOffset,h=T.endOffset,w=T.endOffsetSubtitles,y=T.type,f=this.media;if(!f||f.currentTime<h)return;if(!y||y==="video"){var c=this.captionsTracks;Object.keys(c).forEach(function(a){return Object(I.removeCuesInRange)(c[a],m,h)})}if(this.config.renderTextTracksNatively&&(m===0&&w!==void 0)){var s=this.textTracks;Object.keys(s).forEach(function(a){return Object(I.removeCuesInRange)(s[a],m,w)})}},o.extractCea608Data=function(u){for(var T=u[0]&31,m=2,h=[[],[]],w=0;w<T;w++){var y=u[m++],f=127&u[m++],c=127&u[m++],s=(4&y)!==0,a=3&y;if(f===0&&c===0)continue;s&&((a===0||a===1)&&(h[a].push(f),h[a].push(c)))}return h},d}();function C(d,o){return d&&d.label===o.name&&!(d.textTrack1||d.textTrack2)}function A(d,o,l,u){return Math.min(o,u)-Math.max(d,l)}function x(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return K});var K=function(){function P(U,_){this.subtle=void 0,this.aesIV=void 0,this.subtle=U,this.aesIV=_}var M=P.prototype;return M.decrypt=function(_,I){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},I,_)},P}()},"./src/crypt/aes-decryptor.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"removePadding",function(){return P}),D.d(G,"default",function(){return M});var K=D("./src/utils/typed-array.ts");function P(U){var _=U.byteLength,I=_&&new DataView(U.buffer).getUint8(_-1);return I?Object(K.sliceUint8)(U,0,_-I):U}var M=function(){function U(){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.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var _=U.prototype;return _.uint8ArrayToUint32Array_=function(R){for(var v=new DataView(R),S=new Uint32Array(4),L=0;L<4;L++)S[L]=v.getUint32(L*4);return S},_.initTable=function(){var R=this.sBox,v=this.invSBox,S=this.subMix,L=S[0],C=S[1],A=S[2],x=S[3],d=this.invSubMix,o=d[0],l=d[1],u=d[2],T=d[3],m=new Uint32Array(256),h=0,w=0,y=0;for(y=0;y<256;y++)y<128?m[y]=y<<1:m[y]=y<<1^283;for(y=0;y<256;y++){var f=w^w<<1^w<<2^w<<3^w<<4;f=f>>>8^f&255^99,R[h]=f,v[f]=h;var c=m[h],s=m[c],a=m[s],g=m[f]*257^f*16843008;L[h]=g<<24|g>>>8,C[h]=g<<16|g>>>16,A[h]=g<<8|g>>>24,x[h]=g,g=a*16843009^s*65537^c*257^h*16843008,o[f]=g<<24|g>>>8,l[f]=g<<16|g>>>16,u[f]=g<<8|g>>>24,T[f]=g,h?(h=c^m[m[m[a^c]]],w^=m[m[w]]):h=w=1}},_.expandKey=function(R){for(var v=this.uint8ArrayToUint32Array_(R),S=!0,L=0;L<v.length&&S;)S=v[L]===this.key[L],L++;if(S)return;this.key=v;var C=this.keySize=v.length;if(C!==4&&C!==6&&C!==8)throw new Error("Invalid aes key size="+C);var A=this.ksRows=(C+6+1)*4,x,d,o=this.keySchedule=new Uint32Array(A),l=this.invKeySchedule=new Uint32Array(A),u=this.sBox,T=this.rcon,m=this.invSubMix,h=m[0],w=m[1],y=m[2],f=m[3],c,s;for(x=0;x<A;x++){if(x<C){c=o[x]=v[x];continue}s=c,x%C===0?(s=s<<8|s>>>24,s=u[s>>>24]<<24|u[s>>>16&255]<<16|u[s>>>8&255]<<8|u[s&255],s^=T[x/C|0]<<24):C>6&&x%C===4&&(s=u[s>>>24]<<24|u[s>>>16&255]<<16|u[s>>>8&255]<<8|u[s&255]),o[x]=c=(o[x-C]^s)>>>0}for(d=0;d<A;d++)x=A-d,d&3?s=o[x]:s=o[x-4],d<4||x<=4?l[d]=s:l[d]=h[u[s>>>24]]^w[u[s>>>16&255]]^y[u[s>>>8&255]]^f[u[s&255]],l[d]=l[d]>>>0},_.networkToHostOrderSwap=function(R){return R<<24|(R&65280)<<8|(R&16711680)>>8|R>>>24},_.decrypt=function(R,v,S){for(var L=this.keySize+6,C=this.invKeySchedule,A=this.invSBox,x=this.invSubMix,d=x[0],o=x[1],l=x[2],u=x[3],T=this.uint8ArrayToUint32Array_(S),m=T[0],h=T[1],w=T[2],y=T[3],f=new Int32Array(R),c=new Int32Array(f.length),s,a,g,p,E,O,B,W,Q,F,N,X,ee,oe,de=this.networkToHostOrderSwap;v<f.length;){for(Q=de(f[v]),F=de(f[v+1]),N=de(f[v+2]),X=de(f[v+3]),E=Q^C[0],O=X^C[1],B=N^C[2],W=F^C[3],ee=4,oe=1;oe<L;oe++)s=d[E>>>24]^o[O>>16&255]^l[B>>8&255]^u[W&255]^C[ee],a=d[O>>>24]^o[B>>16&255]^l[W>>8&255]^u[E&255]^C[ee+1],g=d[B>>>24]^o[W>>16&255]^l[E>>8&255]^u[O&255]^C[ee+2],p=d[W>>>24]^o[E>>16&255]^l[O>>8&255]^u[B&255]^C[ee+3],E=s,O=a,B=g,W=p,ee=ee+4;s=A[E>>>24]<<24^A[O>>16&255]<<16^A[B>>8&255]<<8^A[W&255]^C[ee],a=A[O>>>24]<<24^A[B>>16&255]<<16^A[W>>8&255]<<8^A[E&255]^C[ee+1],g=A[B>>>24]<<24^A[W>>16&255]<<16^A[E>>8&255]<<8^A[O&255]^C[ee+2],p=A[W>>>24]<<24^A[E>>16&255]<<16^A[O>>8&255]<<8^A[B&255]^C[ee+3],c[v]=de(s^m),c[v+1]=de(p^h),c[v+2]=de(g^w),c[v+3]=de(a^y),m=Q,h=F,w=N,y=X,v=v+4}return c.buffer},U}()},"./src/crypt/decrypter.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return v});var K=D("./src/crypt/aes-crypto.ts"),P=D("./src/crypt/fast-aes-key.ts"),M=D("./src/crypt/aes-decryptor.ts"),U=D("./src/utils/logger.ts"),_=D("./src/utils/mp4-tools.ts"),I=D("./src/utils/typed-array.ts"),R=16,v=function(){function S(C,A,x){var d=x===void 0?{}:x,o=d.removePKCS7Padding,l=o===void 0?!0:o;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=C,this.config=A,this.removePKCS7Padding=l,l)try{var u=self.crypto;u&&(this.subtle=u.subtle||u.webkitSubtle)}catch(T){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var L=S.prototype;return L.destroy=function(){this.observer=null},L.isSync=function(){return this.config.enableSoftwareAES},L.flush=function(){var A=this.currentResult;if(!A){this.reset();return}var x=new Uint8Array(A);return this.reset(),this.removePKCS7Padding?Object(M.removePadding)(x):x},L.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},L.decrypt=function(A,x,d,o){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(A),x,d);var l=this.flush();l&&o(l.buffer)}else this.webCryptoDecrypt(new Uint8Array(A),x,d).then(o)},L.softwareDecrypt=function(A,x,d){var o=this.currentIV,l=this.currentResult,u=this.remainderData;this.logOnce("JS AES decrypt"),u&&(A=Object(_.appendUint8Array)(u,A),this.remainderData=null);var T=this.getValidChunk(A);if(!T.length)return null;o&&(d=o);var m=this.softwareDecrypter;m||(m=this.softwareDecrypter=new M.default),m.expandKey(x);var h=l;return this.currentResult=m.decrypt(T.buffer,0,d),this.currentIV=Object(I.sliceUint8)(T,-16).buffer,h||null},L.webCryptoDecrypt=function(A,x,d){var o=this,l=this.subtle;return(this.key!==x||!this.fastAesKey)&&(this.key=x,this.fastAesKey=new P.default(l,x)),this.fastAesKey.expandKey().then(function(u){if(!l)return Promise.reject(new Error("web crypto not initialized"));var T=new K.default(l,d);return T.decrypt(A.buffer,u)}).catch(function(u){return o.onWebCryptoError(u,A,x,d)})},L.onWebCryptoError=function(A,x,d,o){return U.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",A),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(x,d,o)},L.getValidChunk=function(A){var x=A,d=A.length-A.length%R;return d!==A.length&&(x=Object(I.sliceUint8)(A,0,d),this.remainderData=Object(I.sliceUint8)(A,d)),x},L.logOnce=function(A){if(!this.logEnabled)return;U.logger.log("[decrypter.ts]: "+A),this.logEnabled=!1},S}()},"./src/crypt/fast-aes-key.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return K});var K=function(){function P(U,_){this.subtle=void 0,this.key=void 0,this.subtle=U,this.key=_}var M=P.prototype;return M.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},P}()},"./src/demux/aacdemuxer.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/demux/base-audio-demuxer.ts"),P=D("./src/demux/adts.ts"),M=D("./src/utils/logger.ts"),U=D("./src/demux/id3.ts");function _(v,S){v.prototype=Object.create(S.prototype),v.prototype.constructor=v,I(v,S)}function I(v,S){return I=Object.setPrototypeOf||function(C,A){return C.__proto__=A,C},I(v,S)}var R=function(v){_(S,v);function S(C,A){var x;return x=v.call(this)||this,x.observer=void 0,x.config=void 0,x.observer=C,x.config=A,x}var L=S.prototype;return L.resetInitSegment=function(A,x,d){v.prototype.resetInitSegment.call(this,A,x,d),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:A,duration:d,inputTimeScale:9e4,dropped:0}},S.probe=function(A){if(!A)return!1;for(var x=U.getID3Data(A,0)||[],d=x.length,o=A.length;d<o;d++)if(P.probe(A,d))return M.logger.log("ADTS sync word found !"),!0;return!1},L.canParse=function(A,x){return P.canParse(A,x)},L.appendFrame=function(A,x,d){P.initTrackConfig(A,this.observer,x,d,A.manifestCodec);var o=P.appendFrame(A,x,d,this.initPTS,this.frameIndex);if(o&&o.missing===0)return o},S}(K.default);R.minProbeByteLength=9,G.default=R},"./src/demux/adts.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"getAudioConfig",function(){return U}),D.d(G,"isHeaderPattern",function(){return _}),D.d(G,"getHeaderLength",function(){return I}),D.d(G,"getFullFrameLength",function(){return R}),D.d(G,"canGetFrameLength",function(){return v}),D.d(G,"isHeader",function(){return S}),D.d(G,"canParse",function(){return L}),D.d(G,"probe",function(){return C}),D.d(G,"initTrackConfig",function(){return A}),D.d(G,"getFrameDuration",function(){return x}),D.d(G,"parseFrameHeader",function(){return d}),D.d(G,"appendFrame",function(){return o});var K=D("./src/utils/logger.ts"),P=D("./src/errors.ts"),M=D("./src/events.ts");function U(l,u,T,m){var h,w,y,f,c=navigator.userAgent.toLowerCase(),s=m,a=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];h=((u[T+2]&192)>>>6)+1;var g=(u[T+2]&60)>>>2;if(g>a.length-1){l.trigger(M.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+g});return}return y=(u[T+2]&1)<<2,y|=(u[T+3]&192)>>>6,K.logger.log("manifest codec:"+m+", ADTS type:"+h+", samplingIndex:"+g),/firefox/i.test(c)?g>=6?(h=5,f=new Array(4),w=g-3):(h=2,f=new Array(2),w=g):c.indexOf("android")!==-1?(h=2,f=new Array(2),w=g):(h=5,f=new Array(4),m&&(m.indexOf("mp4a.40.29")!==-1||m.indexOf("mp4a.40.5")!==-1)||!m&&g>=6?w=g-3:((m&&m.indexOf("mp4a.40.2")!==-1&&(g>=6&&y===1||/vivaldi/i.test(c))||!m&&y===1)&&(h=2,f=new Array(2)),w=g)),f[0]=h<<3,f[0]|=(g&14)>>1,f[1]|=(g&1)<<7,f[1]|=y<<3,h===5&&(f[1]|=(w&14)>>1,f[2]=(w&1)<<7,f[2]|=2<<2,f[3]=0),{config:f,samplerate:a[g],channelCount:y,codec:"mp4a.40."+h,manifestCodec:s}}function _(l,u){return l[u]===255&&(l[u+1]&246)===240}function I(l,u){return l[u+1]&1?7:9}function R(l,u){return(l[u+3]&3)<<11|l[u+4]<<3|(l[u+5]&224)>>>5}function v(l,u){return u+5<l.length}function S(l,u){return u+1<l.length&&_(l,u)}function L(l,u){return v(l,u)&&_(l,u)&&R(l,u)<=l.length-u}function C(l,u){if(S(l,u)){var T=I(l,u);if(u+T>=l.length)return!1;var m=R(l,u);if(m<=T)return!1;var h=u+m;return h===l.length||S(l,h)}return!1}function A(l,u,T,m,h){if(!l.samplerate){var w=U(u,T,m,h);if(!w)return;l.config=w.config,l.samplerate=w.samplerate,l.channelCount=w.channelCount,l.codec=w.codec,l.manifestCodec=w.manifestCodec,K.logger.log("parsed codec:"+l.codec+", rate:"+w.samplerate+", channels:"+w.channelCount)}}function x(l){return 1024*9e4/l}function d(l,u,T,m,h){var w=I(l,u),y=R(l,u);if(y-=w,y>0){var f=T+m*h;return{headerLength:w,frameLength:y,stamp:f}}}function o(l,u,T,m,h){var w=x(l.samplerate),y=d(u,T,m,h,w);if(y){var f=y.frameLength,c=y.headerLength,s=y.stamp,a=c+f,g=Math.max(0,T+a-u.length),p;g?(p=new Uint8Array(a-c),p.set(u.subarray(T+c,u.length),0)):p=u.subarray(T+c,T+a);var E={unit:p,pts:s};return g||l.samples.push(E),{sample:E,length:a,missing:g}}}},"./src/demux/base-audio-demuxer.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"initPTSFn",function(){return R});var K=D("./src/polyfills/number.ts"),P=D("./src/demux/id3.ts"),M=D("./src/demux/dummy-demuxed-track.ts"),U=D("./src/utils/mp4-tools.ts"),_=D("./src/utils/typed-array.ts"),I=function(){function v(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var S=v.prototype;return S.resetInitSegment=function(C,A,x){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},S.resetTimeStamp=function(){},S.resetContiguity=function(){},S.canParse=function(C,A){return!1},S.appendFrame=function(C,A,x){},S.demux=function(C,A){this.cachedData&&(C=Object(U.appendUint8Array)(this.cachedData,C),this.cachedData=null);var x=P.getID3Data(C,0),d=x?x.length:0,o,l,u=this._audioTrack,T=this._id3Track,m=x?P.getTimeStamp(x):void 0,h=C.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=R(m,A)),x&&x.length>0&&T.samples.push({pts:this.initPTS,dts:this.initPTS,data:x}),l=this.initPTS;d<h;){if(this.canParse(C,d)){var w=this.appendFrame(u,C,d);w?(this.frameIndex++,l=w.sample.pts,d+=w.length,o=d):d=h}else P.canParse(C,d)?(x=P.getID3Data(C,d),T.samples.push({pts:l,dts:l,data:x}),d+=x.length,o=d):d++;if(d===h&&o!==h){var y=Object(_.sliceUint8)(C,o);this.cachedData?this.cachedData=Object(U.appendUint8Array)(this.cachedData,y):this.cachedData=y}}return{audioTrack:u,avcTrack:Object(M.dummyTrack)(),id3Track:T,textTrack:Object(M.dummyTrack)()}},S.demuxSampleAes=function(C,A,x){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},S.flush=function(C){var A=this.cachedData;return A&&(this.cachedData=null,this.demux(A,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(M.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(M.dummyTrack)()}},S.destroy=function(){},v}(),R=function(S,L){return Object(K.isFiniteNumber)(S)?S*90:L*9e4};G.default=I},"./src/demux/chunk-cache.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return K});var K=function(){function M(){this.chunks=[],this.dataLength=0}var U=M.prototype;return U.push=function(I){this.chunks.push(I),this.dataLength+=I.length},U.flush=function(){var I=this.chunks,R=this.dataLength,v;if(I.length)I.length===1?v=I[0]:v=P(I,R);else return new Uint8Array(0);return this.reset(),v},U.reset=function(){this.chunks.length=0,this.dataLength=0},M}();function P(M,U){for(var _=new Uint8Array(U),I=0,R=0;R<M.length;R++){var v=M[R];_.set(v,I),I+=v.length}return _}},"./src/demux/dummy-demuxed-track.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"dummyTrack",function(){return K});function K(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/utils/logger.ts"),P=function(){function M(_){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=_,this.bytesAvailable=_.byteLength,this.word=0,this.bitsAvailable=0}var U=M.prototype;return U.loadWord=function(){var I=this.data,R=this.bytesAvailable,v=I.byteLength-R,S=new Uint8Array(4),L=Math.min(4,R);if(L===0)throw new Error("no bytes available");S.set(I.subarray(v,v+L)),this.word=new DataView(S.buffer).getUint32(0),this.bitsAvailable=L*8,this.bytesAvailable-=L},U.skipBits=function(I){var R;this.bitsAvailable>I?(this.word<<=I,this.bitsAvailable-=I):(I-=this.bitsAvailable,R=I>>3,I-=R>>3,this.bytesAvailable-=R,this.loadWord(),this.word<<=I,this.bitsAvailable-=I)},U.readBits=function(I){var R=Math.min(this.bitsAvailable,I),v=this.word>>>32-R;return I>32&&K.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=R,this.bitsAvailable>0?this.word<<=R:this.bytesAvailable>0&&this.loadWord(),R=I-R,R>0&&this.bitsAvailable?v<<R|this.readBits(R):v},U.skipLZ=function(){var I;for(I=0;I<this.bitsAvailable;++I)if((this.word&2147483648>>>I)!==0)return this.word<<=I,this.bitsAvailable-=I,I;return this.loadWord(),I+this.skipLZ()},U.skipUEG=function(){this.skipBits(1+this.skipLZ())},U.skipEG=function(){this.skipBits(1+this.skipLZ())},U.readUEG=function(){var I=this.skipLZ();return this.readBits(I+1)-1},U.readEG=function(){var I=this.readUEG();return 1&I?1+I>>>1:-1*(I>>>1)},U.readBoolean=function(){return this.readBits(1)===1},U.readUByte=function(){return this.readBits(8)},U.readUShort=function(){return this.readBits(16)},U.readUInt=function(){return this.readBits(32)},U.skipScalingList=function(I){for(var R=8,v=8,S,L=0;L<I;L++)v!==0&&(S=this.readEG(),v=(R+S+256)%256),R=v===0?R:v},U.readSPS=function(){var I=0,R=0,v=0,S=0,L,C,A,x=this.readUByte.bind(this),d=this.readBits.bind(this),o=this.readUEG.bind(this),l=this.readBoolean.bind(this),u=this.skipBits.bind(this),T=this.skipEG.bind(this),m=this.skipUEG.bind(this),h=this.skipScalingList.bind(this);x();var w=x();if(d(5),u(3),x(),m(),w===100||w===110||w===122||w===244||w===44||w===83||w===86||w===118||w===128){var y=o();if(y===3&&u(1),m(),m(),u(1),l())for(C=y!==3?8:12,A=0;A<C;A++)l()&&(A<6?h(16):h(64))}m();var f=o();if(f===0)o();else if(f===1)for(u(1),T(),T(),L=o(),A=0;A<L;A++)T();m(),u(1);var c=o(),s=o(),a=d(1);a===0&&u(1),u(1),l()&&(I=o(),R=o(),v=o(),S=o());var g=[1,1];if(l()&&l()){var p=x();switch(p){case 1:g=[1,1];break;case 2:g=[12,11];break;case 3:g=[10,11];break;case 4:g=[16,11];break;case 5:g=[40,33];break;case 6:g=[24,11];break;case 7:g=[20,11];break;case 8:g=[32,11];break;case 9:g=[80,33];break;case 10:g=[18,11];break;case 11:g=[15,11];break;case 12:g=[64,33];break;case 13:g=[160,99];break;case 14:g=[4,3];break;case 15:g=[3,2];break;case 16:g=[2,1];break;case 255:{g=[x()<<8|x(),x()<<8|x()];break}}}return{width:Math.ceil((c+1)*16-I*2-R*2),height:(2-a)*(s+1)*16-(a?2:4)*(v+S),pixelRatio:g}},U.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},M}();G.default=P},"./src/demux/id3.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"isHeader",function(){return K}),D.d(G,"isFooter",function(){return P}),D.d(G,"getID3Data",function(){return M}),D.d(G,"canParse",function(){return _}),D.d(G,"getTimeStamp",function(){return I}),D.d(G,"isTimeStampFrame",function(){return R}),D.d(G,"getID3Frames",function(){return S}),D.d(G,"decodeFrame",function(){return L}),D.d(G,"utf8ArrayToStr",function(){return o}),D.d(G,"testables",function(){return l});var K=function(h,w){return w+10<=h.length&&(h[w]===73&&h[w+1]===68&&h[w+2]===51&&(h[w+3]<255&&h[w+4]<255&&(h[w+6]<128&&h[w+7]<128&&h[w+8]<128&&h[w+9]<128)))},P=function(h,w){return w+10<=h.length&&(h[w]===51&&h[w+1]===68&&h[w+2]===73&&(h[w+3]<255&&h[w+4]<255&&(h[w+6]<128&&h[w+7]<128&&h[w+8]<128&&h[w+9]<128)))},M=function(h,w){for(var y=w,f=0;K(h,w);){f+=10;var c=U(h,w+6);f+=c,P(h,w+10)&&(f+=10),w+=f}return f>0?h.subarray(y,y+f):void 0},U=function(h,w){var y=0;return y=(h[w]&127)<<21,y|=(h[w+1]&127)<<14,y|=(h[w+2]&127)<<7,y|=h[w+3]&127,y},_=function(h,w){return K(h,w)&&U(h,w+6)+10<=h.length-w},I=function(h){for(var w=S(h),y=0;y<w.length;y++){var f=w[y];if(R(f))return d(f)}return},R=function(h){return h&&h.key==="PRIV"&&h.info==="com.apple.streaming.transportStreamTimestamp"},v=function(h){var w=String.fromCharCode(h[0],h[1],h[2],h[3]),y=U(h,4),f=10;return{type:w,size:y,data:h.subarray(f,f+y)}},S=function(h){for(var w=0,y=[];K(h,w);){var f=U(h,w+6);w+=10;for(var c=w+f;w+8<c;){var s=v(h.subarray(w)),a=L(s);a&&y.push(a),w+=s.size+10}P(h,w)&&(w+=10)}return y},L=function(h){return h.type==="PRIV"?C(h):h.type[0]==="W"?x(h):A(h)},C=function(h){if(h.size<2)return;var w=o(h.data,!0),y=new Uint8Array(h.data.subarray(w.length+1));return{key:h.type,info:w,data:y.buffer}},A=function(h){if(h.size<2)return;if(h.type==="TXXX"){var w=1,y=o(h.data.subarray(w),!0);w+=y.length+1;var f=o(h.data.subarray(w));return{key:h.type,info:y,data:f}}var c=o(h.data.subarray(1));return{key:h.type,data:c}},x=function(h){if(h.type==="WXXX"){if(h.size<2)return;var w=1,y=o(h.data.subarray(w),!0);w+=y.length+1;var f=o(h.data.subarray(w));return{key:h.type,info:y,data:f}}var c=o(h.data);return{key:h.type,data:c}},d=function(h){if(h.data.byteLength===8){var w=new Uint8Array(h.data),y=w[3]&1,f=(w[4]<<23)+(w[5]<<15)+(w[6]<<7)+w[7];return f/=45,y&&(f+=4772185884e-2),Math.round(f)}return},o=function(h,w){w===void 0&&(w=!1);var y=T();if(y){var f=y.decode(h);if(w){var c=f.indexOf("\0");return c!==-1?f.substring(0,c):f}return f.replace(/\0/g,"")}for(var s=h.length,a,g,p,E="",O=0;O<s;){if(a=h[O++],a===0&&w)return E;if(a===0||a===3)continue;switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:E+=String.fromCharCode(a);break;case 12:case 13:g=h[O++],E+=String.fromCharCode((a&31)<<6|g&63);break;case 14:g=h[O++],p=h[O++],E+=String.fromCharCode((a&15)<<12|(g&63)<<6|(p&63)<<0);break;default:}}return E},l={decodeTextFrame:A},u;function T(){return!u&&typeof self.TextDecoder!="undefined"&&(u=new self.TextDecoder("utf-8")),u}},"./src/demux/mp3demuxer.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/demux/base-audio-demuxer.ts"),P=D("./src/demux/id3.ts"),M=D("./src/utils/logger.ts"),U=D("./src/demux/mpegaudio.ts");function _(v,S){v.prototype=Object.create(S.prototype),v.prototype.constructor=v,I(v,S)}function I(v,S){return I=Object.setPrototypeOf||function(C,A){return C.__proto__=A,C},I(v,S)}var R=function(v){_(S,v);function S(){return v.apply(this,arguments)||this}var L=S.prototype;return L.resetInitSegment=function(A,x,d){v.prototype.resetInitSegment.call(this,A,x,d),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:A,duration:d,inputTimeScale:9e4,dropped:0}},S.probe=function(A){if(!A)return!1;for(var x=P.getID3Data(A,0)||[],d=x.length,o=A.length;d<o;d++)if(U.probe(A,d))return M.logger.log("MPEG Audio sync word found !"),!0;return!1},L.canParse=function(A,x){return U.canParse(A,x)},L.appendFrame=function(A,x,d){return this.initPTS===null?void 0:U.appendFrame(A,x,d,this.initPTS,this.frameIndex)},S}(K.default);R.minProbeByteLength=4,G.default=R},"./src/demux/mp4demuxer.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/utils/mp4-tools.ts"),P=D("./src/demux/dummy-demuxed-track.ts"),M=function(){function U(I,R){this.remainderData=null,this.config=void 0,this.config=R}var _=U.prototype;return _.resetTimeStamp=function(){},_.resetInitSegment=function(){},_.resetContiguity=function(){},U.probe=function(R){return Object(K.findBox)({data:R,start:0,end:Math.min(R.length,16384)},["moof"]).length>0},_.demux=function(R){var v=R,S=Object(P.dummyTrack)();if(this.config.progressive){this.remainderData&&(v=Object(K.appendUint8Array)(this.remainderData,R));var L=Object(K.segmentValidRange)(v);this.remainderData=L.remainder,S.samples=L.valid||new Uint8Array}else S.samples=v;return{audioTrack:Object(P.dummyTrack)(),avcTrack:S,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},_.flush=function(){var R=Object(P.dummyTrack)();return R.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(P.dummyTrack)(),avcTrack:R,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},_.demuxSampleAes=function(R,v,S){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},_.destroy=function(){},U}();M.minProbeByteLength=1024,G.default=M},"./src/demux/mpegaudio.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"appendFrame",function(){return I}),D.d(G,"parseHeader",function(){return R}),D.d(G,"isHeaderPattern",function(){return v}),D.d(G,"isHeader",function(){return S}),D.d(G,"canParse",function(){return L}),D.d(G,"probe",function(){return C});var K=null,P=[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],M=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],U=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],_=[0,1,1,4];function I(A,x,d,o,l){if(d+24>x.length)return;var u=R(x,d);if(u&&d+u.frameLength<=x.length){var T=u.samplesPerFrame*9e4/u.sampleRate,m=o+l*T,h={unit:x.subarray(d,d+u.frameLength),pts:m,dts:m};return A.config=[],A.channelCount=u.channelCount,A.samplerate=u.sampleRate,A.samples.push(h),{sample:h,length:u.frameLength,missing:0}}}function R(A,x){var d=A[x+1]>>3&3,o=A[x+1]>>1&3,l=A[x+2]>>4&15,u=A[x+2]>>2&3;if(d!==1&&l!==0&&l!==15&&u!==3){var T=A[x+2]>>1&1,m=A[x+3]>>6,h=d===3?3-o:o===3?3:4,w=P[h*14+l-1]*1e3,y=d===3?0:d===2?1:2,f=M[y*3+u],c=m===3?1:2,s=U[d][o],a=_[o],g=s*8*a,p=Math.floor(s*w/f+T)*a;if(K===null){var E=navigator.userAgent||"",O=E.match(/Chrome\/(\d+)/i);K=O?parseInt(O[1]):0}var B=!!K&&K<=87;return B&&o===2&&w>=224e3&&m===0&&(A[x+3]=A[x+3]|128),{sampleRate:f,channelCount:c,frameLength:p,samplesPerFrame:g}}}function v(A,x){return A[x]===255&&(A[x+1]&224)===224&&(A[x+1]&6)!==0}function S(A,x){return x+1<A.length&&v(A,x)}function L(A,x){var d=4;return v(A,x)&&d<=A.length-x}function C(A,x){if(x+1<A.length&&v(A,x)){var d=4,o=R(A,x),l=d;o!=null&&o.frameLength&&(l=o.frameLength);var u=x+l;return u===A.length||S(A,u)}return!1}},"./src/demux/sample-aes.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/crypt/decrypter.ts"),P=D("./src/demux/tsdemuxer.ts"),M=function(){function U(I,R,v){this.keyData=void 0,this.decrypter=void 0,this.keyData=v,this.decrypter=new K.default(I,R,{removePKCS7Padding:!1})}var _=U.prototype;return _.decryptBuffer=function(R,v){this.decrypter.decrypt(R,this.keyData.key.buffer,this.keyData.iv.buffer,v)},_.decryptAacSample=function(R,v,S,L){var C=R[v].unit,A=C.subarray(16,C.length-C.length%16),x=A.buffer.slice(A.byteOffset,A.byteOffset+A.length),d=this;this.decryptBuffer(x,function(o){var l=new Uint8Array(o);C.set(l,16),L||d.decryptAacSamples(R,v+1,S)})},_.decryptAacSamples=function(R,v,S){for(;;v++){if(v>=R.length){S();return}if(R[v].unit.length<32)continue;var L=this.decrypter.isSync();if(this.decryptAacSample(R,v,S,L),!L)return}},_.getAvcEncryptedData=function(R){for(var v=Math.floor((R.length-48)/160)*16+16,S=new Int8Array(v),L=0,C=32;C<=R.length-16;C+=160,L+=16)S.set(R.subarray(C,C+16),L);return S},_.getAvcDecryptedUnit=function(R,v){for(var S=new Uint8Array(v),L=0,C=32;C<=R.length-16;C+=160,L+=16)R.set(S.subarray(L,L+16),C);return R},_.decryptAvcSample=function(R,v,S,L,C,A){var x=Object(P.discardEPB)(C.data),d=this.getAvcEncryptedData(x),o=this;this.decryptBuffer(d.buffer,function(l){C.data=o.getAvcDecryptedUnit(x,l),A||o.decryptAvcSamples(R,v,S+1,L)})},_.decryptAvcSamples=function(R,v,S,L){if(R instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;v++,S=0){if(v>=R.length){L();return}for(var C=R[v].units;!(S>=C.length);S++){var A=C[S];if(A.data.length<=48||A.type!==1&&A.type!==5)continue;var x=this.decrypter.isSync();if(this.decryptAvcSample(R,v,S,L,A,x),!x)return}}},U}();G.default=M},"./src/demux/transmuxer-interface.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return C});var K=D("./node_modules/webworkify-webpack/index.js"),P=D.n(K),M=D("./src/events.ts"),U=D("./src/demux/transmuxer.ts"),_=D("./src/utils/logger.ts"),I=D("./src/errors.ts"),R=D("./src/utils/mediasource-helper.ts"),v=D("./node_modules/eventemitter3/index.js"),S=D.n(v),L=Object(R.getMediaSource)()||{isTypeSupported:function(){return!1}},C=function(){function A(d,o,l,u){var T=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=d,this.id=o,this.onTransmuxComplete=l,this.onFlush=u;var m=d.config,h=function(s,a){a=a||{},a.frag=T.frag,a.id=T.id,d.trigger(s,a)};this.observer=new v.EventEmitter,this.observer.on(M.Events.FRAG_DECRYPTED,h),this.observer.on(M.Events.ERROR,h);var w={mp4:L.isTypeSupported("video/mp4"),mpeg:L.isTypeSupported("audio/mpeg"),mp3:L.isTypeSupported('audio/mp4; codecs="mp3"')},y=navigator.vendor;if(m.enableWorker&&typeof Worker!="undefined"){_.logger.log("demuxing in webworker");var f;try{f=this.worker=K("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),f.addEventListener("message",this.onwmsg),f.onerror=function(c){d.trigger(M.Events.ERROR,{type:I.ErrorTypes.OTHER_ERROR,details:I.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(c.message+" ("+c.filename+":"+c.lineno+")")})},f.postMessage({cmd:"init",typeSupported:w,vendor:y,id:o,config:JSON.stringify(m)})}catch(c){_.logger.warn("Error in worker:",c),_.logger.error("Error while initializing DemuxerWorker, fallback to inline"),f&&self.URL.revokeObjectURL(f.objectURL),this.transmuxer=new U.default(this.observer,w,m,y,o),this.worker=null}}else this.transmuxer=new U.default(this.observer,w,m,y,o)}var x=A.prototype;return x.destroy=function(){var o=this.worker;if(o)o.removeEventListener("message",this.onwmsg),o.terminate(),this.worker=null;else{var l=this.transmuxer;l&&(l.destroy(),this.transmuxer=null)}var u=this.observer;u&&u.removeAllListeners(),this.observer=null},x.push=function(o,l,u,T,m,h,w,y,f,c){var s=this;f.transmuxing.start=self.performance.now();var a=this.transmuxer,g=this.worker,p=h?h.start:m.start,E=m.decryptdata,O=this.frag,B=!(O&&m.cc===O.cc),W=!(O&&f.level===O.level),Q=O?f.sn-O.sn:-1,F=this.part?f.part-this.part.index:1,N=!W&&(Q===1||Q===0&&F===1),X=self.performance.now();(W||Q||m.stats.parsing.start===0)&&(m.stats.parsing.start=X),h&&(F||!N)&&(h.stats.parsing.start=X);var ee=new U.TransmuxState(B,N,y,W,p);if(!N||B){_.logger.log("[transmuxer-interface, "+m.type+"]: Starting new transmux session for sn: "+f.sn+" p: "+f.part+" level: "+f.level+" id: "+f.id+`
|
|
discontinuity: `+B+`
|
|
trackSwitch: `+W+`
|
|
contiguous: `+N+`
|
|
accurateTimeOffset: `+y+`
|
|
timeOffset: `+p);var oe=new U.TransmuxConfig(u,T,l,w,c);this.configureTransmuxer(oe)}if(this.frag=m,this.part=h,g)g.postMessage({cmd:"demux",data:o,decryptdata:E,chunkMeta:f,state:ee},o instanceof ArrayBuffer?[o]:[]);else if(a){var de=a.push(o,E,f,ee);Object(U.isPromise)(de)?de.then(function(Ce){s.handleTransmuxComplete(Ce)}):this.handleTransmuxComplete(de)}},x.flush=function(o){var l=this;o.transmuxing.start=self.performance.now();var u=this.transmuxer,T=this.worker;if(T)T.postMessage({cmd:"flush",chunkMeta:o});else if(u){var m=u.flush(o);Object(U.isPromise)(m)?m.then(function(h){l.handleFlushResult(h,o)}):this.handleFlushResult(m,o)}},x.handleFlushResult=function(o,l){var u=this;o.forEach(function(T){u.handleTransmuxComplete(T)}),this.onFlush(l)},x.onWorkerMessage=function(o){var l=o.data,u=this.hls;switch(l.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.id=this.id,u.trigger(l.event,l.data);break}}},x.configureTransmuxer=function(o){var l=this.worker,u=this.transmuxer;l?l.postMessage({cmd:"configure",config:o}):u&&u.configure(o)},x.handleTransmuxComplete=function(o){o.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(o)},A}()},"./src/demux/transmuxer-worker.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return I});var K=D("./src/demux/transmuxer.ts"),P=D("./src/events.ts"),M=D("./src/utils/logger.ts"),U=D("./node_modules/eventemitter3/index.js"),_=D.n(U);function I(C){var A=new U.EventEmitter,x=function(o,l){C.postMessage({event:o,data:l})};A.on(P.Events.FRAG_DECRYPTED,x),A.on(P.Events.ERROR,x),C.addEventListener("message",function(d){var o=d.data;switch(o.cmd){case"init":{var l=JSON.parse(o.config);C.transmuxer=new K.default(A,o.typeSupported,l,o.vendor,o.id),Object(M.enableLogs)(l.debug),x("init",null);break}case"configure":{C.transmuxer.configure(o.config);break}case"demux":{var u=C.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(K.isPromise)(u)?u.then(function(h){R(C,h)}):R(C,u);break}case"flush":{var T=o.chunkMeta,m=C.transmuxer.flush(T);Object(K.isPromise)(m)?m.then(function(h){S(C,h,T)}):S(C,m,T);break}default:break}})}function R(C,A){if(L(A.remuxResult))return;var x=[],d=A.remuxResult,o=d.audio,l=d.video;o&&v(x,o),l&&v(x,l),C.postMessage({event:"transmuxComplete",data:A},x)}function v(C,A){A.data1&&C.push(A.data1.buffer),A.data2&&C.push(A.data2.buffer)}function S(C,A,x){A.forEach(function(d){R(C,d)}),C.postMessage({event:"flush",data:x})}function L(C){return!C.audio&&!C.video&&!C.text&&!C.id3&&!C.initSegment}},"./src/demux/transmuxer.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return l}),D.d(G,"isPromise",function(){return m}),D.d(G,"TransmuxConfig",function(){return h}),D.d(G,"TransmuxState",function(){return w});var K=D("./src/events.ts"),P=D("./src/errors.ts"),M=D("./src/crypt/decrypter.ts"),U=D("./src/demux/aacdemuxer.ts"),_=D("./src/demux/mp4demuxer.ts"),I=D("./src/demux/tsdemuxer.ts"),R=D("./src/demux/mp3demuxer.ts"),v=D("./src/remux/mp4-remuxer.ts"),S=D("./src/remux/passthrough-remuxer.ts"),L=D("./src/demux/chunk-cache.ts"),C=D("./src/utils/mp4-tools.ts"),A=D("./src/utils/logger.ts"),x;try{x=self.performance.now.bind(self.performance)}catch(y){A.logger.debug("Unable to use Performance API on this environment"),x=self.Date.now}var d=[{demux:I.default,remux:v.default},{demux:_.default,remux:S.default},{demux:U.default,remux:v.default},{demux:R.default,remux:v.default}],o=1024;d.forEach(function(y){var f=y.demux;o=Math.max(o,f.minProbeByteLength)});var l=function(){function y(c,s,a,g,p){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new L.default,this.observer=c,this.typeSupported=s,this.config=a,this.vendor=g,this.id=p}var f=y.prototype;return f.configure=function(s){this.transmuxConfig=s,this.decrypter&&this.decrypter.reset()},f.push=function(s,a,g,p){var E=this,O=g.transmuxing;O.executeStart=x();var B=new Uint8Array(s),W=this.cache,Q=this.config,F=this.currentTransmuxState,N=this.transmuxConfig;p&&(this.currentTransmuxState=p);var X=u(B,a);if(X&&X.method==="AES-128"){var ee=this.getDecrypter();if(Q.enableSoftwareAES){var oe=ee.softwareDecrypt(B,X.key.buffer,X.iv.buffer);if(!oe)return O.executeEnd=x(),T(g);B=new Uint8Array(oe)}else return this.decryptionPromise=ee.webCryptoDecrypt(B,X.key.buffer,X.iv.buffer).then(function(Re){var De=E.push(Re,null,g);return E.decryptionPromise=null,De}),this.decryptionPromise}var de=p||F,Ce=de.contiguous,ge=de.discontinuity,fe=de.trackSwitch,me=de.accurateTimeOffset,pe=de.timeOffset,ie=N.audioCodec,ue=N.videoCodec,be=N.defaultInitPts,_e=N.duration,Oe=N.initSegmentData;if((ge||fe)&&this.resetInitSegment(Oe,ie,ue,_e),ge&&this.resetInitialTimestamp(be),Ce||this.resetContiguity(),this.needsProbing(B,ge,fe)){if(W.dataLength){var We=W.flush();B=Object(C.appendUint8Array)(We,B)}this.configureTransmuxer(B,N)}var Ve=this.transmux(B,X,pe,me,g),Le=this.currentTransmuxState;return Le.contiguous=!0,Le.discontinuity=!1,Le.trackSwitch=!1,O.executeEnd=x(),Ve},f.flush=function(s){var a=this,g=s.transmuxing;g.executeStart=x();var p=this.decrypter,E=this.cache,O=this.currentTransmuxState,B=this.decryptionPromise;if(B)return B.then(function(){return a.flush(s)});var W=[],Q=O.timeOffset;if(p){var F=p.flush();F&&W.push(this.push(F,null,s))}var N=E.dataLength;E.reset();var X=this.demuxer,ee=this.remuxer;if(!X||!ee)return N>=o&&this.observer.emit(K.Events.ERROR,K.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),g.executeEnd=x(),[T(s)];var oe=X.flush(Q);return m(oe)?oe.then(function(de){return a.flushRemux(W,de,s),W}):(this.flushRemux(W,oe,s),W)},f.flushRemux=function(s,a,g){var p=a.audioTrack,E=a.avcTrack,O=a.id3Track,B=a.textTrack,W=this.currentTransmuxState,Q=W.accurateTimeOffset,F=W.timeOffset;A.logger.log("[transmuxer.ts]: Flushed fragment "+g.sn+(g.part>-1?" p: "+g.part:"")+" of level "+g.level);var N=this.remuxer.remux(p,E,O,B,F,Q,!0,this.id);s.push({remuxResult:N,chunkMeta:g}),g.transmuxing.executeEnd=x()},f.resetInitialTimestamp=function(s){var a=this.demuxer,g=this.remuxer;if(!a||!g)return;a.resetTimeStamp(s),g.resetTimeStamp(s)},f.resetContiguity=function(){var s=this.demuxer,a=this.remuxer;if(!s||!a)return;s.resetContiguity(),a.resetNextTimestamp()},f.resetInitSegment=function(s,a,g,p){var E=this.demuxer,O=this.remuxer;if(!E||!O)return;E.resetInitSegment(a,g,p),O.resetInitSegment(s,a,g)},f.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},f.transmux=function(s,a,g,p,E){var O;return a&&a.method==="SAMPLE-AES"?O=this.transmuxSampleAes(s,a,g,p,E):O=this.transmuxUnencrypted(s,g,p,E),O},f.transmuxUnencrypted=function(s,a,g,p){var E=this.demuxer.demux(s,a,!1,!this.config.progressive),O=E.audioTrack,B=E.avcTrack,W=E.id3Track,Q=E.textTrack,F=this.remuxer.remux(O,B,W,Q,a,g,!1,this.id);return{remuxResult:F,chunkMeta:p}},f.transmuxSampleAes=function(s,a,g,p,E){var O=this;return this.demuxer.demuxSampleAes(s,a,g).then(function(B){var W=O.remuxer.remux(B.audioTrack,B.avcTrack,B.id3Track,B.textTrack,g,p,!1,O.id);return{remuxResult:W,chunkMeta:E}})},f.configureTransmuxer=function(s,a){for(var g=this.config,p=this.observer,E=this.typeSupported,O=this.vendor,B=a.audioCodec,W=a.defaultInitPts,Q=a.duration,F=a.initSegmentData,N=a.videoCodec,X,ee=0,oe=d.length;ee<oe;ee++)if(d[ee].demux.probe(s)){X=d[ee];break}X||(A.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),X={demux:_.default,remux:S.default});var de=this.demuxer,Ce=this.remuxer,ge=X.remux,fe=X.demux;(!Ce||!(Ce instanceof ge))&&(this.remuxer=new ge(p,g,E,O)),(!de||!(de instanceof fe))&&(this.demuxer=new fe(p,g,E),this.probe=fe.probe),this.resetInitSegment(F,B,N,Q),this.resetInitialTimestamp(W)},f.needsProbing=function(s,a,g){return!this.demuxer||!this.remuxer||a||g},f.getDecrypter=function(){var s=this.decrypter;return s||(s=this.decrypter=new M.default(this.observer,this.config)),s},y}();function u(y,f){var c=null;return y.byteLength>0&&f!=null&&f.key!=null&&f.iv!==null&&f.method!=null&&(c=f),c}var T=function(f){return{remuxResult:{},chunkMeta:f}};function m(y){return"then"in y&&y.then instanceof Function}var h=function(f,c,s,a,g){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=f,this.videoCodec=c,this.initSegmentData=s,this.duration=a,this.defaultInitPts=g},w=function(f,c,s,a,g){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=f,this.contiguous=c,this.accurateTimeOffset=s,this.trackSwitch=a,this.timeOffset=g}},"./src/demux/tsdemuxer.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"discardEPB",function(){return T});var K=D("./src/demux/adts.ts"),P=D("./src/demux/mpegaudio.ts"),M=D("./src/demux/exp-golomb.ts"),U=D("./src/demux/id3.ts"),_=D("./src/demux/sample-aes.ts"),I=D("./src/events.ts"),R=D("./src/utils/mp4-tools.ts"),v=D("./src/utils/logger.ts"),S=D("./src/errors.ts"),L={video:1,audio:2,id3:3,text:4},C=function(){function m(w,y,f){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=w,this.config=y,this.typeSupported=f}m.probe=function(y){var f=m.syncOffset(y);return f<0?!1:(f&&v.logger.warn("MPEG2-TS detected but first sync word found @ offset "+f+", junk ahead ?"),!0)},m.syncOffset=function(y){for(var f=Math.min(1e3,y.length-3*188),c=0;c<f;){if(y[c]===71&&y[c+188]===71&&y[c+2*188]===71)return c;c++}return-1},m.createTrack=function(y,f){return{container:y==="video"||y==="audio"?"video/mp2t":void 0,type:y,id:L[y],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:y==="audio"?f:void 0}};var h=m.prototype;return h.resetInitSegment=function(y,f,c){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=m.createTrack("video",c),this._audioTrack=m.createTrack("audio",c),this._id3Track=m.createTrack("id3",c),this._txtTrack=m.createTrack("text",c),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=y,this.videoCodec=f,this._duration=c},h.resetTimeStamp=function(){},h.resetContiguity=function(){var y=this._audioTrack,f=this._avcTrack,c=this._id3Track;y&&(y.pesData=null),f&&(f.pesData=null),c&&(c.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},h.demux=function(y,f,c,s){c===void 0&&(c=!1),s===void 0&&(s=!1),c||(this.sampleAes=null);var a,g=this._avcTrack,p=this._audioTrack,E=this._id3Track,O=g.pid,B=g.pesData,W=p.pid,Q=E.pid,F=p.pesData,N=E.pesData,X=!1,ee=this.pmtParsed,oe=this._pmtId,de=y.length;if(this.remainderData&&(y=Object(R.appendUint8Array)(this.remainderData,y),de=y.length,this.remainderData=null),de<188&&!s)return this.remainderData=y,{audioTrack:p,avcTrack:g,id3Track:E,textTrack:this._txtTrack};var Ce=Math.max(0,m.syncOffset(y));de-=(de+Ce)%188,de<y.byteLength&&!s&&(this.remainderData=new Uint8Array(y.buffer,de,y.buffer.byteLength-de));for(var ge=Ce;ge<de;ge+=188)if(y[ge]===71){var fe=!!(y[ge+1]&64),me=((y[ge+1]&31)<<8)+y[ge+2],pe=(y[ge+3]&48)>>4,ie=void 0;if(pe>1){if(ie=ge+5+y[ge+4],ie===ge+188)continue}else ie=ge+4;switch(me){case O:fe&&(B&&(a=o(B))&&this.parseAVCPES(a,!1),B={data:[],size:0}),B&&(B.data.push(y.subarray(ie,ge+188)),B.size+=ge+188-ie);break;case W:fe&&(F&&(a=o(F))&&(p.isAAC?this.parseAACPES(a):this.parseMPEGPES(a)),F={data:[],size:0}),F&&(F.data.push(y.subarray(ie,ge+188)),F.size+=ge+188-ie);break;case Q:fe&&(N&&(a=o(N))&&this.parseID3PES(a),N={data:[],size:0}),N&&(N.data.push(y.subarray(ie,ge+188)),N.size+=ge+188-ie);break;case 0:fe&&(ie+=y[ie]+1),oe=this._pmtId=x(y,ie);break;case oe:{fe&&(ie+=y[ie]+1);var ue=d(y,ie,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,c);O=ue.avc,O>0&&(g.pid=O),W=ue.audio,W>0&&(p.pid=W,p.isAAC=ue.isAAC),Q=ue.id3,Q>0&&(E.pid=Q),X&&!ee&&(v.logger.log("reparse from beginning"),X=!1,ge=Ce-188),ee=this.pmtParsed=!0;break}case 17:case 8191:break;default:X=!0;break}}else this.observer.emit(I.Events.ERROR,I.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});g.pesData=B,p.pesData=F,E.pesData=N;var be={audioTrack:p,avcTrack:g,id3Track:E,textTrack:this._txtTrack};return s&&this.extractRemainingSamples(be),be},h.flush=function(){var y=this.remainderData;this.remainderData=null;var f;return y?f=this.demux(y,-1,!1,!0):f={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(f),this.sampleAes?this.decrypt(f,this.sampleAes):f},h.extractRemainingSamples=function(y){var f=y.audioTrack,c=y.avcTrack,s=y.id3Track,a=c.pesData,g=f.pesData,p=s.pesData,E;a&&(E=o(a))?(this.parseAVCPES(E,!0),c.pesData=null):c.pesData=a,g&&(E=o(g))?(f.isAAC?this.parseAACPES(E):this.parseMPEGPES(E),f.pesData=null):(g!=null&&g.size&&v.logger.log("last AAC PES packet truncated,might overlap between fragments"),f.pesData=g),p&&(E=o(p))?(this.parseID3PES(E),s.pesData=null):s.pesData=p},h.demuxSampleAes=function(y,f,c){var s=this.demux(y,c,!0,!this.config.progressive),a=this.sampleAes=new _.default(this.observer,this.config,f);return this.decrypt(s,a)},h.decrypt=function(y,f){return new Promise(function(c){var s=y.audioTrack,a=y.avcTrack;s.samples&&s.isAAC?f.decryptAacSamples(s.samples,0,function(){a.samples?f.decryptAvcSamples(a.samples,0,0,function(){c(y)}):c(y)}):a.samples&&f.decryptAvcSamples(a.samples,0,0,function(){c(y)})})},h.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},h.parseAVCPES=function(y,f){var c=this,s=this._avcTrack,a=this.parseAVCNALu(y.data),g=!1,p=this.avcSample,E,O=!1;y.data=null,p&&a.length&&!s.audFound&&(l(p,s),p=this.avcSample=A(!1,y.pts,y.dts,"")),a.forEach(function(B){switch(B.type){case 1:{E=!0,p||(p=c.avcSample=A(!0,y.pts,y.dts,"")),g&&(p.debug+="NDR "),p.frame=!0;var W=B.data;if(O&&W.length>4){var Q=new M.default(W).readSliceType();(Q===2||Q===4||Q===7||Q===9)&&(p.key=!0)}break}case 5:E=!0,p||(p=c.avcSample=A(!0,y.pts,y.dts,"")),g&&(p.debug+="IDR "),p.key=!0,p.frame=!0;break;case 6:{E=!0,g&&p&&(p.debug+="SEI ");var F=new M.default(T(B.data));F.readUByte();for(var N=0,X=0,ee=!1,oe=0;!ee&&F.bytesAvailable>1;){N=0;do oe=F.readUByte(),N+=oe;while(oe===255);X=0;do oe=F.readUByte(),X+=oe;while(oe===255);if(N===4&&F.bytesAvailable!==0){ee=!0;var de=F.readUByte();if(de===181){var Ce=F.readUShort();if(Ce===49){var ge=F.readUInt();if(ge===1195456820){var fe=F.readUByte();if(fe===3){for(var me=F.readUByte(),pe=F.readUByte(),ie=31&me,ue=[me,pe],be=0;be<ie;be++)ue.push(F.readUByte()),ue.push(F.readUByte()),ue.push(F.readUByte());u(c._txtTrack.samples,{type:3,pts:y.pts,bytes:ue})}}}}}else if(N===5&&F.bytesAvailable!==0){if(ee=!0,X>16){for(var _e=[],Oe=0;Oe<16;Oe++)_e.push(F.readUByte().toString(16)),(Oe===3||Oe===5||Oe===7||Oe===9)&&_e.push("-");for(var We=X-16,Ve=new Uint8Array(We),Le=0;Le<We;Le++)Ve[Le]=F.readUByte();u(c._txtTrack.samples,{pts:y.pts,payloadType:N,uuid:_e.join(""),userData:Object(U.utf8ArrayToStr)(Ve),userDataBytes:Ve})}}else if(X<F.bytesAvailable)for(var Re=0;Re<X;Re++)F.readUByte()}break}case 7:if(E=!0,O=!0,g&&p&&(p.debug+="SPS "),!s.sps){var De=new M.default(B.data),Ge=De.readSPS();s.width=Ge.width,s.height=Ge.height,s.pixelRatio=Ge.pixelRatio,s.sps=[B.data],s.duration=c._duration;for(var ze=B.data.subarray(1,4),Te="avc1.",Ie=0;Ie<3;Ie++){var Ye=ze[Ie].toString(16);Ye.length<2&&(Ye="0"+Ye),Te+=Ye}s.codec=Te}break;case 8:E=!0,g&&p&&(p.debug+="PPS "),s.pps||(s.pps=[B.data]);break;case 9:E=!1,s.audFound=!0,p&&l(p,s),p=c.avcSample=A(!1,y.pts,y.dts,g?"AUD ":"");break;case 12:E=!1;break;default:E=!1,p&&(p.debug+="unknown NAL "+B.type+" ");break}if(p&&E){var qe=p.units;qe.push(B)}}),f&&p&&(l(p,s),this.avcSample=null)},h.getLastNalUnit=function(){var y,f=this.avcSample,c;if(!f||f.units.length===0){var s=this._avcTrack.samples;f=s[s.length-1]}if((y=f)!==null&&y!==void 0&&y.units){var a=f.units;c=a[a.length-1]}return c},h.parseAVCNALu=function(y){var f=y.byteLength,c=this._avcTrack,s=c.naluState||0,a=s,g=[],p=0,E,O,B,W=-1,Q=0;for(s===-1&&(W=0,Q=y[0]&31,s=0,p=1);p<f;){if(E=y[p++],!s){s=E?0:1;continue}if(s===1){s=E?0:2;continue}if(!E)s=3;else if(E===1){if(W>=0){var F={data:y.subarray(W,p-s-1),type:Q};g.push(F)}else{var N=this.getLastNalUnit();if(N&&(a&&p<=4-a&&(N.state&&(N.data=N.data.subarray(0,N.data.byteLength-a))),O=p-s-1,O>0)){var X=new Uint8Array(N.data.byteLength+O);X.set(N.data,0),X.set(y.subarray(0,O),N.data.byteLength),N.data=X,N.state=0}}p<f?(B=y[p]&31,W=p,Q=B,s=0):s=-1}else s=0}if(W>=0&&s>=0){var ee={data:y.subarray(W,f),type:Q,state:s};g.push(ee)}if(g.length===0){var oe=this.getLastNalUnit();if(oe){var de=new Uint8Array(oe.data.byteLength+y.byteLength);de.set(oe.data,0),de.set(y,oe.data.byteLength),oe.data=de}}return c.naluState=s,g},h.parseAACPES=function(y){var f=0,c=this._audioTrack,s=this.aacOverFlow,a=y.data;if(s){this.aacOverFlow=null;var g=s.sample.unit.byteLength,p=Math.min(s.missing,g),E=g-p;s.sample.unit.set(a.subarray(0,p),E),c.samples.push(s.sample),f=s.missing}var O,B;for(O=f,B=a.length;O<B-1&&!K.isHeader(a,O);O++);if(O!==f){var W,Q;if(O<B-1?(W="AAC PES did not start with ADTS header,offset:"+O,Q=!1):(W="no ADTS header found in AAC PES",Q=!0),v.logger.warn("parsing error:"+W),this.observer.emit(I.Events.ERROR,I.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.FRAG_PARSING_ERROR,fatal:Q,reason:W}),Q)return}K.initTrackConfig(c,this.observer,a,O,this.audioCodec);var F;if(y.pts!==void 0)F=y.pts;else if(s){var N=K.getFrameDuration(c.samplerate);F=s.sample.pts+N}else{v.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var X=0;O<B;)if(K.isHeader(a,O)){if(O+5<B){var ee=K.appendFrame(c,a,O,F,X);if(ee)if(ee.missing)this.aacOverFlow=ee;else{O+=ee.length,X++;continue}}break}else O++},h.parseMPEGPES=function(y){var f=y.data,c=f.length,s=0,a=0,g=y.pts;if(g===void 0){v.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;a<c;)if(P.isHeader(f,a)){var p=P.appendFrame(this._audioTrack,f,a,g,s);if(p)a+=p.length,s++;else break}else a++},h.parseID3PES=function(y){if(y.pts===void 0){v.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(y)},m}();C.minProbeByteLength=188;function A(m,h,w,y){return{key:m,frame:!1,pts:h,dts:w,units:[],debug:y,length:0}}function x(m,h){return(m[h+10]&31)<<8|m[h+11]}function d(m,h,w,y){var f={audio:-1,avc:-1,id3:-1,isAAC:!0},c=(m[h+1]&15)<<8|m[h+2],s=h+3+c-4,a=(m[h+10]&15)<<8|m[h+11];for(h+=12+a;h<s;){var g=(m[h+1]&31)<<8|m[h+2];switch(m[h]){case 207:if(!y){v.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:f.audio===-1&&(f.audio=g);break;case 21:f.id3===-1&&(f.id3=g);break;case 219:if(!y){v.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:f.avc===-1&&(f.avc=g);break;case 3:case 4:w?f.audio===-1&&(f.audio=g,f.isAAC=!1):v.logger.log("MPEG audio found, not supported in this browser");break;case 36:v.logger.warn("Unsupported HEVC stream type found");break;default:break}h+=((m[h+3]&15)<<8|m[h+4])+5}return f}function o(m){var h=0,w,y,f,c,s,a=m.data;if(!m||m.size===0)return null;for(;a[0].length<19&&a.length>1;){var g=new Uint8Array(a[0].length+a[1].length);g.set(a[0]),g.set(a[1],a[0].length),a[0]=g,a.splice(1,1)}w=a[0];var p=(w[0]<<16)+(w[1]<<8)+w[2];if(p===1){if(y=(w[4]<<8)+w[5],y&&y>m.size-6)return null;var E=w[7];E&192&&(c=(w[9]&14)*536870912+(w[10]&255)*4194304+(w[11]&254)*16384+(w[12]&255)*128+(w[13]&254)/2,E&64?(s=(w[14]&14)*536870912+(w[15]&255)*4194304+(w[16]&254)*16384+(w[17]&255)*128+(w[18]&254)/2,c-s>60*9e4&&(v.logger.warn(Math.round((c-s)/9e4)+"s delta between PTS and DTS, align them"),c=s)):s=c),f=w[8];var O=f+9;if(m.size<=O)return null;m.size-=O;for(var B=new Uint8Array(m.size),W=0,Q=a.length;W<Q;W++){w=a[W];var F=w.byteLength;if(O)if(O>F){O-=F;continue}else w=w.subarray(O),F-=O,O=0;B.set(w,h),h+=F}return y&&(y-=f+3),{data:B,pts:c,dts:s,len:y}}return null}function l(m,h){if(m.units.length&&m.frame){if(m.pts===void 0){var w=h.samples,y=w.length;if(y){var f=w[y-1];m.pts=f.pts,m.dts=f.dts}else{h.dropped++;return}}h.samples.push(m)}m.debug.length&&v.logger.log(m.pts+"/"+m.dts+":"+m.debug)}function u(m,h){var w=m.length;if(w>0){if(h.pts>=m[w-1].pts)m.push(h);else for(var y=w-1;y>=0;y--)if(h.pts<m[y].pts){m.splice(y,0,h);break}}else m.push(h)}function T(m){for(var h=m.byteLength,w=[],y=1;y<h-2;)m[y]===0&&m[y+1]===0&&m[y+2]===3?(w.push(y+2),y+=2):y++;if(w.length===0)return m;var f=h-w.length,c=new Uint8Array(f),s=0;for(y=0;y<f;s++,y++)s===w[0]&&(s++,w.shift()),c[y]=m[s];return c}G.default=C},"./src/errors.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"ErrorTypes",function(){return K}),D.d(G,"ErrorDetails",function(){return P});var K;(function(M){M.NETWORK_ERROR="networkError",M.MEDIA_ERROR="mediaError",M.KEY_SYSTEM_ERROR="keySystemError",M.MUX_ERROR="muxError",M.OTHER_ERROR="otherError"})(K||(K={}));var P;(function(M){M.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",M.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",M.KEY_SYSTEM_NO_SESSION="keySystemNoSession",M.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",M.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",M.MANIFEST_LOAD_ERROR="manifestLoadError",M.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",M.MANIFEST_PARSING_ERROR="manifestParsingError",M.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",M.LEVEL_EMPTY_ERROR="levelEmptyError",M.LEVEL_LOAD_ERROR="levelLoadError",M.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",M.LEVEL_SWITCH_ERROR="levelSwitchError",M.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",M.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",M.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",M.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",M.FRAG_LOAD_ERROR="fragLoadError",M.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",M.FRAG_DECRYPT_ERROR="fragDecryptError",M.FRAG_PARSING_ERROR="fragParsingError",M.REMUX_ALLOC_ERROR="remuxAllocError",M.KEY_LOAD_ERROR="keyLoadError",M.KEY_LOAD_TIMEOUT="keyLoadTimeOut",M.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",M.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",M.BUFFER_APPEND_ERROR="bufferAppendError",M.BUFFER_APPENDING_ERROR="bufferAppendingError",M.BUFFER_STALLED_ERROR="bufferStalledError",M.BUFFER_FULL_ERROR="bufferFullError",M.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",M.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",M.INTERNAL_EXCEPTION="internalException",M.INTERNAL_ABORTED="aborted",M.UNKNOWN="unknown"})(P||(P={}))},"./src/events.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"Events",function(){return K});var K;(function(P){P.MEDIA_ATTACHING="hlsMediaAttaching",P.MEDIA_ATTACHED="hlsMediaAttached",P.MEDIA_DETACHING="hlsMediaDetaching",P.MEDIA_DETACHED="hlsMediaDetached",P.BUFFER_RESET="hlsBufferReset",P.BUFFER_CODECS="hlsBufferCodecs",P.BUFFER_CREATED="hlsBufferCreated",P.BUFFER_APPENDING="hlsBufferAppending",P.BUFFER_APPENDED="hlsBufferAppended",P.BUFFER_EOS="hlsBufferEos",P.BUFFER_FLUSHING="hlsBufferFlushing",P.BUFFER_FLUSHED="hlsBufferFlushed",P.MANIFEST_LOADING="hlsManifestLoading",P.MANIFEST_LOADED="hlsManifestLoaded",P.MANIFEST_PARSED="hlsManifestParsed",P.LEVEL_SWITCHING="hlsLevelSwitching",P.LEVEL_SWITCHED="hlsLevelSwitched",P.LEVEL_LOADING="hlsLevelLoading",P.LEVEL_LOADED="hlsLevelLoaded",P.LEVEL_UPDATED="hlsLevelUpdated",P.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",P.LEVELS_UPDATED="hlsLevelsUpdated",P.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",P.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",P.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",P.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",P.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",P.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",P.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",P.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",P.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",P.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",P.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",P.CUES_PARSED="hlsCuesParsed",P.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",P.INIT_PTS_FOUND="hlsInitPtsFound",P.FRAG_LOADING="hlsFragLoading",P.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",P.FRAG_LOADED="hlsFragLoaded",P.FRAG_DECRYPTED="hlsFragDecrypted",P.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",P.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",P.FRAG_PARSING_METADATA="hlsFragParsingMetadata",P.FRAG_PARSED="hlsFragParsed",P.FRAG_BUFFERED="hlsFragBuffered",P.FRAG_CHANGED="hlsFragChanged",P.FPS_DROP="hlsFpsDrop",P.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",P.ERROR="hlsError",P.DESTROYING="hlsDestroying",P.KEY_LOADING="hlsKeyLoading",P.KEY_LOADED="hlsKeyLoaded",P.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",P.BACK_BUFFER_REACHED="hlsBackBufferReached"})(K||(K={}))},"./src/hls.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return m});var K=D("./node_modules/url-toolkit/src/url-toolkit.js"),P=D.n(K),M=D("./src/loader/playlist-loader.ts"),U=D("./src/loader/key-loader.ts"),_=D("./src/controller/id3-track-controller.ts"),I=D("./src/controller/latency-controller.ts"),R=D("./src/controller/level-controller.ts"),v=D("./src/controller/fragment-tracker.ts"),S=D("./src/controller/stream-controller.ts"),L=D("./src/is-supported.ts"),C=D("./src/utils/logger.ts"),A=D("./src/config.ts"),x=D("./node_modules/eventemitter3/index.js"),d=D.n(x),o=D("./src/events.ts"),l=D("./src/errors.ts");function u(h,w){for(var y=0;y<w.length;y++){var f=w[y];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(h,f.key,f)}}function T(h,w,y){return w&&u(h.prototype,w),y&&u(h,y),h}var m=function(){h.isSupported=function(){return Object(L.isSupported)()};function h(y){y===void 0&&(y={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new x.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var f=this.config=Object(A.mergeConfig)(h.DefaultConfig,y);this.userConfig=y,Object(C.enableLogs)(f.debug),this._autoLevelCapping=-1,f.progressive&&Object(A.enableStreamingMode)(f);var c=f.abrController,s=f.bufferController,a=f.capLevelController,g=f.fpsController,p=this.abrController=new c(this),E=this.bufferController=new s(this),O=this.capLevelController=new a(this),B=new g(this),W=new M.default(this),Q=new U.default(this),F=new _.default(this),N=this.levelController=new R.default(this),X=new v.FragmentTracker(this),ee=this.streamController=new S.default(this,X);O.setStreamController(ee),B.setStreamController(ee);var oe=[N,ee];this.networkControllers=oe;var de=[W,Q,p,E,O,B,F,X];this.audioTrackController=this.createController(f.audioTrackController,null,oe),this.createController(f.audioStreamController,X,oe),this.subtitleTrackController=this.createController(f.subtitleTrackController,null,oe),this.createController(f.subtitleStreamController,X,oe),this.createController(f.timelineController,null,de),this.emeController=this.createController(f.emeController,null,de),this.cmcdController=this.createController(f.cmcdController,null,de),this.latencyController=this.createController(I.default,null,de),this.coreComponents=de}var w=h.prototype;return w.createController=function(f,c,s){if(f){var a=c?new f(this,c):new f(this);return s&&s.push(a),a}return null},w.on=function(f,c,s){s===void 0&&(s=this),this._emitter.on(f,c,s)},w.once=function(f,c,s){s===void 0&&(s=this),this._emitter.once(f,c,s)},w.removeAllListeners=function(f){this._emitter.removeAllListeners(f)},w.off=function(f,c,s,a){s===void 0&&(s=this),this._emitter.off(f,c,s,a)},w.listeners=function(f){return this._emitter.listeners(f)},w.emit=function(f,c,s){return this._emitter.emit(f,c,s)},w.trigger=function(f,c){if(this.config.debug)return this.emit(f,f,c);try{return this.emit(f,f,c)}catch(s){C.logger.error("An internal error happened while handling event "+f+'. Error message: "'+s.message+'". Here is a stacktrace:',s),this.trigger(o.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:f,error:s})}return!1},w.listenerCount=function(f){return this._emitter.listenerCount(f)},w.destroy=function(){C.logger.log("destroy"),this.trigger(o.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(f){return f.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(f){return f.destroy()}),this.coreComponents.length=0},w.attachMedia=function(f){C.logger.log("attachMedia"),this._media=f,this.trigger(o.Events.MEDIA_ATTACHING,{media:f})},w.detachMedia=function(){C.logger.log("detachMedia"),this.trigger(o.Events.MEDIA_DETACHING,void 0),this._media=null},w.loadSource=function(f){this.stopLoad();var c=this.media,s=this.url,a=this.url=K.buildAbsoluteURL(self.location.href,f,{alwaysNormalize:!0});C.logger.log("loadSource:"+a),c&&s&&s!==a&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(c)),this.trigger(o.Events.MANIFEST_LOADING,{url:f})},w.startLoad=function(f){f===void 0&&(f=-1),C.logger.log("startLoad("+f+")"),this.networkControllers.forEach(function(c){c.startLoad(f)})},w.stopLoad=function(){C.logger.log("stopLoad"),this.networkControllers.forEach(function(f){f.stopLoad()})},w.swapAudioCodec=function(){C.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},w.recoverMediaError=function(){C.logger.log("recoverMediaError");var f=this._media;this.detachMedia(),f&&this.attachMedia(f)},w.removeLevel=function(f,c){c===void 0&&(c=0),this.levelController.removeLevel(f,c)},T(h,[{key:"levels",get:function(){var f=this.levelController.levels;return f||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(f){C.logger.log("set currentLevel:"+f),this.loadLevel=f,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(f){C.logger.log("set nextLevel:"+f),this.levelController.manualLevel=f,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(f){C.logger.log("set loadLevel:"+f),this.levelController.manualLevel=f}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(f){this.levelController.nextLoadLevel=f}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(f){C.logger.log("set firstLevel:"+f),this.levelController.firstLevel=f}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(f){C.logger.log("set startLevel:"+f),f!==-1&&(f=Math.max(f,this.minAutoLevel)),this.levelController.startLevel=f}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(f){var c=!!f;c!==this.config.capLevelToPlayerSize&&(c?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=c)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(f){this._autoLevelCapping!==f&&(C.logger.log("set autoLevelCapping:"+f),this._autoLevelCapping=f)}},{key:"bandwidthEstimate",get:function(){var f=this.abrController.bwEstimator;return f?f.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var f=this.levels,c=this.config.minAutoBitrate;if(!f)return 0;for(var s=f.length,a=0;a<s;a++)if(f[a].maxBitrate>c)return a;return 0}},{key:"maxAutoLevel",get:function(){var f=this.levels,c=this.autoLevelCapping,s;return c===-1&&f&&f.length?s=f.length-1:s=c,s}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(f){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,f)}},{key:"audioTracks",get:function(){var f=this.audioTrackController;return f?f.audioTracks:[]}},{key:"audioTrack",get:function(){var f=this.audioTrackController;return f?f.audioTrack:-1},set:function(f){var c=this.audioTrackController;c&&(c.audioTrack=f)}},{key:"subtitleTracks",get:function(){var f=this.subtitleTrackController;return f?f.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var f=this.subtitleTrackController;return f?f.subtitleTrack:-1},set:function(f){var c=this.subtitleTrackController;c&&(c.subtitleTrack=f)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var f=this.subtitleTrackController;return f?f.subtitleDisplay:!1},set:function(f){var c=this.subtitleTrackController;c&&(c.subtitleDisplay=f)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(f){this.config.lowLatencyMode=f}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return o.Events}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return h.defaultConfig?h.defaultConfig:A.hlsDefaultConfig},set:function(f){h.defaultConfig=f}}]),h}();m.defaultConfig=void 0},"./src/is-supported.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"isSupported",function(){return M}),D.d(G,"changeTypeSupported",function(){return U});var K=D("./src/utils/mediasource-helper.ts");function P(){return self.SourceBuffer||self.WebKitSourceBuffer}function M(){var _=Object(K.getMediaSource)();if(!_)return!1;var I=P(),R=_&&typeof _.isTypeSupported=="function"&&_.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),v=!I||I.prototype&&typeof I.prototype.appendBuffer=="function"&&typeof I.prototype.remove=="function";return!!R&&!!v}function U(){var _,I=P();return typeof(I==null||((_=I.prototype)===null||_===void 0)?void 0:_.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return C}),D.d(G,"LoadError",function(){return x});var K=D("./src/polyfills/number.ts"),P=D("./src/errors.ts");function M(d,o){d.prototype=Object.create(o.prototype),d.prototype.constructor=d,v(d,o)}function U(d){var o=typeof Map=="function"?new Map:void 0;return U=function(u){if(u===null||!R(u))return u;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(typeof o!="undefined"){if(o.has(u))return o.get(u);o.set(u,T)}function T(){return _(u,arguments,S(this).constructor)}return T.prototype=Object.create(u.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),v(T,u)},U(d)}function _(d,o,l){return I()?_=Reflect.construct:_=function(T,m,h){var w=[null];w.push.apply(w,m);var y=Function.bind.apply(T,w),f=new y;return h&&v(f,h.prototype),f},_.apply(null,arguments)}function I(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(d){return!1}}function R(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function v(d,o){return v=Object.setPrototypeOf||function(u,T){return u.__proto__=T,u},v(d,o)}function S(d){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},S(d)}var L=Math.pow(2,17),C=function(){function d(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var o=d.prototype;return o.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},o.abort=function(){this.loader&&this.loader.abort()},o.load=function(u,T){var m=this,h=u.url;if(!h)return Promise.reject(new x({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,networkDetails:null},"Fragment does not have a "+(h?"part list":"url")));this.abort();var w=this.config,y=w.fLoader,f=w.loader;return new Promise(function(c,s){m.loader&&m.loader.destroy();var a=m.loader=u.loader=y?new y(w):new f(w),g=A(u),p={timeout:w.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:w.fragLoadingMaxRetryTimeout,highWaterMark:L};u.stats=a.stats,a.load(g,p,{onSuccess:function(O,B,W,Q){m.resetLoader(u,a),c({frag:u,part:null,payload:O.data,networkDetails:Q})},onError:function(O,B,W){m.resetLoader(u,a),s(new x({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,response:O,networkDetails:W}))},onAbort:function(O,B,W){m.resetLoader(u,a),s(new x({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,networkDetails:W}))},onTimeout:function(O,B,W){m.resetLoader(u,a),s(new x({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,networkDetails:W}))},onProgress:function(O,B,W,Q){T&&T({frag:u,part:null,payload:W,networkDetails:Q})}})})},o.loadPart=function(u,T,m){var h=this;this.abort();var w=this.config,y=w.fLoader,f=w.loader;return new Promise(function(c,s){h.loader&&h.loader.destroy();var a=h.loader=u.loader=y?new y(w):new f(w),g=A(u,T),p={timeout:w.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:w.fragLoadingMaxRetryTimeout,highWaterMark:L};T.stats=a.stats,a.load(g,p,{onSuccess:function(O,B,W,Q){h.resetLoader(u,a),h.updateStatsFromPart(u,T);var F={frag:u,part:T,payload:O.data,networkDetails:Q};m(F),c(F)},onError:function(O,B,W){h.resetLoader(u,a),s(new x({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,part:T,response:O,networkDetails:W}))},onAbort:function(O,B,W){u.stats.aborted=T.stats.aborted,h.resetLoader(u,a),s(new x({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,part:T,networkDetails:W}))},onTimeout:function(O,B,W){h.resetLoader(u,a),s(new x({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,part:T,networkDetails:W}))}})})},o.updateStatsFromPart=function(u,T){var m=u.stats,h=T.stats,w=h.total;if(m.loaded+=h.loaded,w){var y=Math.round(u.duration/T.duration),f=Math.min(Math.round(m.loaded/w),y),c=y-f,s=c*Math.round(m.loaded/f);m.total=m.loaded+s}else m.total=Math.max(m.loaded,m.total);var a=m.loading,g=h.loading;a.start?a.first+=g.first-g.start:(a.start=g.start,a.first=g.first),a.end=g.end},o.resetLoader=function(u,T){u.loader=null,this.loader===T&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),T.destroy()},d}();function A(d,o){o===void 0&&(o=null);var l=o||d,u={frag:d,part:o,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},T=l.byteRangeStartOffset,m=l.byteRangeEndOffset;return Object(K.isFiniteNumber)(T)&&Object(K.isFiniteNumber)(m)&&(u.rangeStart=T,u.rangeEnd=m),u}var x=function(d){M(o,d);function o(l){for(var u,T=arguments.length,m=new Array(T>1?T-1:0),h=1;h<T;h++)m[h-1]=arguments[h];return u=d.call.apply(d,[this].concat(m))||this,u.data=void 0,u.data=l,u}return o}(U(Error))},"./src/loader/fragment.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"ElementaryStreamTypes",function(){return C}),D.d(G,"BaseSegment",function(){return A}),D.d(G,"Fragment",function(){return x}),D.d(G,"Part",function(){return d});var K=D("./src/polyfills/number.ts"),P=D("./node_modules/url-toolkit/src/url-toolkit.js"),M=D.n(P),U=D("./src/utils/logger.ts"),_=D("./src/loader/level-key.ts"),I=D("./src/loader/load-stats.ts");function R(o,l){o.prototype=Object.create(l.prototype),o.prototype.constructor=o,v(o,l)}function v(o,l){return v=Object.setPrototypeOf||function(T,m){return T.__proto__=m,T},v(o,l)}function S(o,l){for(var u=0;u<l.length;u++){var T=l[u];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(o,T.key,T)}}function L(o,l,u){return l&&S(o.prototype,l),u&&S(o,u),o}var C;(function(o){o.AUDIO="audio",o.VIDEO="video",o.AUDIOVIDEO="audiovideo"})(C||(C={}));var A=function(){function o(u){var T;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(T={},T[C.AUDIO]=null,T[C.VIDEO]=null,T[C.AUDIOVIDEO]=null,T),this.baseurl=u}var l=o.prototype;return l.setByteRange=function(T,m){var h=T.split("@",2),w=[];h.length===1?w[0]=m?m.byteRangeEndOffset:0:w[0]=parseInt(h[1]),w[1]=parseInt(h[0])+w[0],this._byteRange=w},L(o,[{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:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(P.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(T){this._url=T}}]),o}(),x=function(o){R(l,o);function l(T,m){var h;return h=o.call(this,m)||this,h._decryptdata=null,h.rawProgramDateTime=null,h.programDateTime=null,h.tagList=[],h.duration=0,h.sn=0,h.levelkey=void 0,h.type=void 0,h.loader=null,h.level=-1,h.cc=0,h.startPTS=void 0,h.endPTS=void 0,h.appendedPTS=void 0,h.startDTS=void 0,h.endDTS=void 0,h.start=0,h.deltaPTS=void 0,h.maxStartPTS=void 0,h.minEndPTS=void 0,h.stats=new I.LoadStats,h.urlId=0,h.data=void 0,h.bitrateTest=!1,h.title=null,h.initSegment=null,h.type=T,h}var u=l.prototype;return u.createInitializationVector=function(m){for(var h=new Uint8Array(16),w=12;w<16;w++)h[w]=m>>8*(15-w)&255;return h},u.setDecryptDataFromLevelKey=function(m,h){var w=m;return(m==null?void 0:m.method)==="AES-128"&&m.uri&&!m.iv&&(w=_.LevelKey.fromURI(m.uri),w.method=m.method,w.iv=this.createInitializationVector(h),w.keyFormat="identity"),w},u.setElementaryStreamInfo=function(m,h,w,y,f,c){c===void 0&&(c=!1);var s=this.elementaryStreams,a=s[m];if(!a){s[m]={startPTS:h,endPTS:w,startDTS:y,endDTS:f,partial:c};return}a.startPTS=Math.min(a.startPTS,h),a.endPTS=Math.max(a.endPTS,w),a.startDTS=Math.min(a.startDTS,y),a.endDTS=Math.max(a.endDTS,f)},u.clearElementaryStreamInfo=function(){var m=this.elementaryStreams;m[C.AUDIO]=null,m[C.VIDEO]=null,m[C.AUDIOVIDEO]=null},L(l,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var m=this.sn;typeof m!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&U.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),m=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,m)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(K.isFiniteNumber)(this.programDateTime))return null;var m=Object(K.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+m*1e3}},{key:"encrypted",get:function(){var m;return!!((m=this.decryptdata)!==null&&m!==void 0&&m.keyFormat&&this.decryptdata.uri)}}]),l}(A),d=function(o){R(l,o);function l(u,T,m,h,w){var y;y=o.call(this,m)||this,y.fragOffset=0,y.duration=0,y.gap=!1,y.independent=!1,y.relurl=void 0,y.fragment=void 0,y.index=void 0,y.stats=new I.LoadStats,y.duration=u.decimalFloatingPoint("DURATION"),y.gap=u.bool("GAP"),y.independent=u.bool("INDEPENDENT"),y.relurl=u.enumeratedString("URI"),y.fragment=T,y.index=h;var f=u.enumeratedString("BYTERANGE");return f&&y.setByteRange(f,w),w&&(y.fragOffset=w.fragOffset+w.duration),y}return L(l,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var T=this.elementaryStreams;return!!(T.audio||T.video||T.audiovideo)}}]),l}(A)},"./src/loader/key-loader.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return U});var K=D("./src/events.ts"),P=D("./src/errors.ts"),M=D("./src/utils/logger.ts"),U=function(){function _(R){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=R,this._registerListeners()}var I=_.prototype;return I._registerListeners=function(){this.hls.on(K.Events.KEY_LOADING,this.onKeyLoading,this)},I._unregisterListeners=function(){this.hls.off(K.Events.KEY_LOADING,this.onKeyLoading)},I.destroy=function(){this._unregisterListeners();for(var v in this.loaders){var S=this.loaders[v];S&&S.destroy()}this.loaders={}},I.onKeyLoading=function(v,S){var L=S.frag,C=L.type,A=this.loaders[C];if(!L.decryptdata){M.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var x=L.decryptdata.uri;if(x!==this.decrypturl||this.decryptkey===null){var d=this.hls.config;if(A&&(M.logger.warn("abort previous key loader for type:"+C),A.abort()),!x){M.logger.warn("key uri is falsy");return}var o=d.loader,l=L.loader=this.loaders[C]=new o(d);this.decrypturl=x,this.decryptkey=null;var u={url:x,frag:L,responseType:"arraybuffer"},T={timeout:d.fragLoadingTimeOut,maxRetry:0,retryDelay:d.fragLoadingRetryDelay,maxRetryDelay:d.fragLoadingMaxRetryTimeout,highWaterMark:0},m={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(u,T,m)}else this.decryptkey&&(L.decryptdata.key=this.decryptkey,this.hls.trigger(K.Events.KEY_LOADED,{frag:L}))},I.loadsuccess=function(v,S,L){var C=L.frag;if(!C.decryptdata){M.logger.error("after key load, decryptdata unset");return}this.decryptkey=C.decryptdata.key=new Uint8Array(v.data),C.loader=null,delete this.loaders[C.type],this.hls.trigger(K.Events.KEY_LOADED,{frag:C})},I.loaderror=function(v,S){var L=S.frag,C=L.loader;C&&C.abort(),delete this.loaders[L.type],this.hls.trigger(K.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:L,response:v})},I.loadtimeout=function(v,S){var L=S.frag,C=L.loader;C&&C.abort(),delete this.loaders[L.type],this.hls.trigger(K.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:L})},_}()},"./src/loader/level-details.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"LevelDetails",function(){return _});var K=D("./src/polyfills/number.ts");function P(I,R){for(var v=0;v<R.length;v++){var S=R[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(I,S.key,S)}}function M(I,R,v){return R&&P(I.prototype,R),v&&P(I,v),I}var U=10,_=function(){function I(v){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=v}var R=I.prototype;return R.reloaded=function(S){if(!S){this.advanced=!0,this.updated=!0;return}var L=this.lastPartSn-S.lastPartSn,C=this.lastPartIndex-S.lastPartIndex;this.updated=this.endSN!==S.endSN||!!C||!!L,this.advanced=this.endSN>S.endSN||L>0||L===0&&C>0,this.updated||this.advanced?this.misses=Math.floor(S.misses*.6):this.misses=S.misses+1,this.availabilityDelay=S.availabilityDelay},M(I,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(K.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||U}},{key:"drift",get:function(){var S=this.driftEndTime-this.driftStartTime;if(S>0){var L=this.driftEnd-this.driftStart;return L*1e3/S}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var S;return(S=this.partList)!==null&&S!==void 0&&S.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var S;return(S=this.fragments)!==null&&S!==void 0&&S.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var S;return(S=this.partList)!==null&&S!==void 0&&S.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var S;return(S=this.partList)!==null&&S!==void 0&&S.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),I}()},"./src/loader/level-key.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"LevelKey",function(){return _});var K=D("./node_modules/url-toolkit/src/url-toolkit.js"),P=D.n(K);function M(I,R){for(var v=0;v<R.length;v++){var S=R[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(I,S.key,S)}}function U(I,R,v){return R&&M(I.prototype,R),v&&M(I,v),I}var _=function(){I.fromURL=function(v,S){return new I(v,S)},I.fromURI=function(v){return new I(v)};function I(R,v){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,v?this._uri=Object(K.buildAbsoluteURL)(R,v,{alwaysNormalize:!0}):this._uri=R}return U(I,[{key:"uri",get:function(){return this._uri}}]),I}()},"./src/loader/load-stats.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"LoadStats",function(){return K});var K=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return l});var K=D("./src/polyfills/number.ts"),P=D("./node_modules/url-toolkit/src/url-toolkit.js"),M=D.n(P),U=D("./src/loader/fragment.ts"),_=D("./src/loader/level-details.ts"),I=D("./src/loader/level-key.ts"),R=D("./src/utils/attr-list.ts"),v=D("./src/utils/logger.ts"),S=D("./src/utils/codecs.ts"),L=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,C=/#EXT-X-MEDIA:(.*)/g,A=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),x=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),d=/\.(mp4|m4s|m4v|m4a)$/i;function o(w){var y,f;return d.test((y=(f=P.parseURL(w))===null||f===void 0?void 0:f.path)!=null?y:"")}var l=function(){function w(){}return w.findGroup=function(f,c){for(var s=0;s<f.length;s++){var a=f[s];if(a.id===c)return a}},w.convertAVC1ToAVCOTI=function(f){var c=f.split(".");if(c.length>2){var s=c.shift()+".";return s+=parseInt(c.shift()).toString(16),s+=("000"+parseInt(c.shift()).toString(16)).substr(-4),s}return f},w.resolve=function(f,c){return P.buildAbsoluteURL(c,f,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(f,c){var s=[],a={},g=!1;L.lastIndex=0;for(var p;(p=L.exec(f))!=null;)if(p[1]){var E=new R.AttrList(p[1]),O={attrs:E,bitrate:E.decimalInteger("AVERAGE-BANDWIDTH")||E.decimalInteger("BANDWIDTH"),name:E.NAME,url:w.resolve(p[2],c)},B=E.decimalResolution("RESOLUTION");B&&(O.width=B.width,O.height=B.height),u((E.CODECS||"").split(/[ ,]+/).filter(function(Q){return Q}),O),O.videoCodec&&O.videoCodec.indexOf("avc1")!==-1&&(O.videoCodec=w.convertAVC1ToAVCOTI(O.videoCodec)),s.push(O)}else if(p[3]){var W=new R.AttrList(p[3]);W["DATA-ID"]&&(g=!0,a[W["DATA-ID"]]=W)}return{levels:s,sessionData:g?a:null}},w.parseMasterPlaylistMedia=function(f,c,s,a){a===void 0&&(a=[]);var g,p=[],E=0;for(C.lastIndex=0;(g=C.exec(f))!==null;){var O=new R.AttrList(g[1]);if(O.TYPE===s){var B={attrs:O,bitrate:0,id:E++,groupId:O["GROUP-ID"],instreamId:O["INSTREAM-ID"],name:O.NAME||O.LANGUAGE||"",type:s,default:O.bool("DEFAULT"),autoselect:O.bool("AUTOSELECT"),forced:O.bool("FORCED"),lang:O.LANGUAGE,url:O.URI?w.resolve(O.URI,c):""};if(a.length){var W=w.findGroup(a,B.groupId)||a[0];T(B,W,"audioCodec"),T(B,W,"textCodec")}p.push(B)}}return p},w.parseLevelPlaylist=function(f,c,s,a,g){var p=new _.LevelDetails(c),E=p.fragments,O=null,B=0,W=0,Q=0,F=0,N=null,X=new U.Fragment(a,c),ee,oe,de,Ce=-1,ge=!1;for(A.lastIndex=0,p.m3u8=f;(ee=A.exec(f))!==null;){ge&&(ge=!1,X=new U.Fragment(a,c),X.start=Q,X.sn=B,X.cc=F,X.level=s,O&&(X.initSegment=O,X.rawProgramDateTime=O.rawProgramDateTime));var fe=ee[1];if(fe){X.duration=parseFloat(fe);var me=(" "+ee[2]).slice(1);X.title=me||null,X.tagList.push(me?["INF",fe,me]:["INF",fe])}else if(ee[3])Object(K.isFiniteNumber)(X.duration)&&(X.start=Q,de&&(X.levelkey=de),X.sn=B,X.level=s,X.cc=F,X.urlId=g,E.push(X),X.relurl=(" "+ee[3]).slice(1),h(X,N),N=X,Q+=X.duration,B++,W=0,ge=!0);else if(ee[4]){var pe=(" "+ee[4]).slice(1);N?X.setByteRange(pe,N):X.setByteRange(pe)}else if(ee[5])X.rawProgramDateTime=(" "+ee[5]).slice(1),X.tagList.push(["PROGRAM-DATE-TIME",X.rawProgramDateTime]),Ce===-1&&(Ce=E.length);else{if(ee=ee[0].match(x),!ee){v.logger.warn("No matches on slow regex match for level playlist!");continue}for(oe=1;oe<ee.length&&!(typeof ee[oe]!="undefined");oe++);var ie=(" "+ee[oe]).slice(1),ue=(" "+ee[oe+1]).slice(1),be=ee[oe+2]?(" "+ee[oe+2]).slice(1):"";switch(ie){case"PLAYLIST-TYPE":p.type=ue.toUpperCase();break;case"MEDIA-SEQUENCE":B=p.startSN=parseInt(ue);break;case"SKIP":{var _e=new R.AttrList(ue),Oe=_e.decimalInteger("SKIPPED-SEGMENTS");if(Object(K.isFiniteNumber)(Oe)){p.skippedSegments=Oe;for(var We=Oe;We--;)E.unshift(null);B+=Oe}var Ve=_e.enumeratedString("RECENTLY-REMOVED-DATERANGES");Ve&&(p.recentlyRemovedDateranges=Ve.split(" "));break}case"TARGETDURATION":p.targetduration=parseFloat(ue);break;case"VERSION":p.version=parseInt(ue);break;case"EXTM3U":break;case"ENDLIST":p.live=!1;break;case"#":(ue||be)&&X.tagList.push(be?[ue,be]:[ue]);break;case"DIS":F++;case"GAP":X.tagList.push([ie]);break;case"BITRATE":X.tagList.push([ie,ue]);break;case"DISCONTINUITY-SEQ":F=parseInt(ue);break;case"KEY":{var Le,Re=new R.AttrList(ue),De=Re.enumeratedString("METHOD"),Ge=Re.URI,ze=Re.hexadecimalInteger("IV"),Te=Re.enumeratedString("KEYFORMATVERSIONS"),Ie=Re.enumeratedString("KEYID"),Ye=(Le=Re.enumeratedString("KEYFORMAT"))!=null?Le:"identity",qe=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(qe.indexOf(Ye)>-1){v.logger.warn("Keyformat "+Ye+" is not supported from the manifest");continue}else if(Ye!=="identity")continue;De&&(de=I.LevelKey.fromURL(c,Ge),Ge&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(De)>=0&&(de.method=De,de.keyFormat=Ye,Ie&&(de.keyID=Ie),Te&&(de.keyFormatVersions=Te),de.iv=ze));break}case"START":{var je=new R.AttrList(ue),Fe=je.decimalFloatingPoint("TIME-OFFSET");Object(K.isFiniteNumber)(Fe)&&(p.startTimeOffset=Fe);break}case"MAP":{var rt=new R.AttrList(ue);X.relurl=rt.URI,rt.BYTERANGE&&X.setByteRange(rt.BYTERANGE),X.level=s,X.sn="initSegment",de&&(X.levelkey=de),X.initSegment=null,O=X,ge=!0;break}case"SERVER-CONTROL":{var Ze=new R.AttrList(ue);p.canBlockReload=Ze.bool("CAN-BLOCK-RELOAD"),p.canSkipUntil=Ze.optionalFloat("CAN-SKIP-UNTIL",0),p.canSkipDateRanges=p.canSkipUntil>0&&Ze.bool("CAN-SKIP-DATERANGES"),p.partHoldBack=Ze.optionalFloat("PART-HOLD-BACK",0),p.holdBack=Ze.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Je=new R.AttrList(ue);p.partTarget=Je.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ee=p.partList;Ee||(Ee=p.partList=[]);var $e=W>0?Ee[Ee.length-1]:void 0,Qe=W++,ye=new U.Part(new R.AttrList(ue),X,c,Qe,$e);Ee.push(ye),X.duration+=ye.duration;break}case"PRELOAD-HINT":{var Me=new R.AttrList(ue);p.preloadHint=Me;break}case"RENDITION-REPORT":{var le=new R.AttrList(ue);p.renditionReports=p.renditionReports||[],p.renditionReports.push(le);break}default:v.logger.warn("line parsed but not handled: "+ee);break}}}N&&!N.relurl?(E.pop(),Q-=N.duration,p.partList&&(p.fragmentHint=N)):p.partList&&(h(X,N),X.cc=F,p.fragmentHint=X);var ne=E.length,ae=E[0],Y=E[ne-1];if(Q+=p.skippedSegments*p.targetduration,Q>0&&ne&&Y){p.averagetargetduration=Q/ne;var J=Y.sn;p.endSN=J!=="initSegment"?J:0,ae&&(p.startCC=ae.cc,ae.initSegment||p.fragments.every(function(Z){return Z.relurl&&o(Z.relurl)})&&(v.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),X=new U.Fragment(a,c),X.relurl=Y.relurl,X.level=s,X.sn="initSegment",ae.initSegment=X,p.needSidxRanges=!0))}else p.endSN=0,p.startCC=0;return p.fragmentHint&&(Q+=p.fragmentHint.duration),p.totalduration=Q,p.endCC=F,Ce>0&&m(E,Ce),p},w}();function u(w,y){["video","audio","text"].forEach(function(f){var c=w.filter(function(a){return Object(S.isCodecType)(a,f)});if(c.length){var s=c.filter(function(a){return a.lastIndexOf("avc1",0)===0||a.lastIndexOf("mp4a",0)===0});y[f+"Codec"]=s.length>0?s[0]:c[0],w=w.filter(function(a){return c.indexOf(a)===-1})}}),y.unknownCodecs=w}function T(w,y,f){var c=y[f];c&&(w[f]=c)}function m(w,y){for(var f=w[y],c=y;c--;){var s=w[c];if(!s)return;s.programDateTime=f.programDateTime-s.duration*1e3,f=s}}function h(w,y){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):y!=null&&y.programDateTime&&(w.programDateTime=y.endProgramDateTime),Object(K.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/polyfills/number.ts"),P=D("./src/events.ts"),M=D("./src/errors.ts"),U=D("./src/utils/logger.ts"),_=D("./src/utils/mp4-tools.ts"),I=D("./src/loader/m3u8-parser.ts"),R=D("./src/types/loader.ts"),v=D("./src/utils/attr-list.ts");function S(A){var x=A.type;switch(x){case R.PlaylistContextType.AUDIO_TRACK:return R.PlaylistLevelType.AUDIO;case R.PlaylistContextType.SUBTITLE_TRACK:return R.PlaylistLevelType.SUBTITLE;default:return R.PlaylistLevelType.MAIN}}function L(A,x){var d=A.url;return(d===void 0||d.indexOf("data:")===0)&&(d=x.url),d}var C=function(){function A(d){this.hls=void 0,this.loaders=Object.create(null),this.hls=d,this.registerListeners()}var x=A.prototype;return x.registerListeners=function(){var o=this.hls;o.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.on(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},x.unregisterListeners=function(){var o=this.hls;o.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.off(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},x.createInternalLoader=function(o){var l=this.hls.config,u=l.pLoader,T=l.loader,m=u||T,h=new m(l);return o.loader=h,this.loaders[o.type]=h,h},x.getInternalLoader=function(o){return this.loaders[o.type]},x.resetInternalLoader=function(o){this.loaders[o]&&delete this.loaders[o]},x.destroyInternalLoaders=function(){for(var o in this.loaders){var l=this.loaders[o];l&&l.destroy(),this.resetInternalLoader(o)}},x.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},x.onManifestLoading=function(o,l){var u=l.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:R.PlaylistContextType.MANIFEST,url:u,deliveryDirectives:null})},x.onLevelLoading=function(o,l){var u=l.id,T=l.level,m=l.url,h=l.deliveryDirectives;this.load({id:u,groupId:null,level:T,responseType:"text",type:R.PlaylistContextType.LEVEL,url:m,deliveryDirectives:h})},x.onAudioTrackLoading=function(o,l){var u=l.id,T=l.groupId,m=l.url,h=l.deliveryDirectives;this.load({id:u,groupId:T,level:null,responseType:"text",type:R.PlaylistContextType.AUDIO_TRACK,url:m,deliveryDirectives:h})},x.onSubtitleTrackLoading=function(o,l){var u=l.id,T=l.groupId,m=l.url,h=l.deliveryDirectives;this.load({id:u,groupId:T,level:null,responseType:"text",type:R.PlaylistContextType.SUBTITLE_TRACK,url:m,deliveryDirectives:h})},x.load=function(o){var l,u=this.hls.config,T=this.getInternalLoader(o);if(T){var m=T.context;if(m&&m.url===o.url){U.logger.trace("[playlist-loader]: playlist request ongoing");return}U.logger.log("[playlist-loader]: aborting previous loader for type: "+o.type),T.abort()}var h,w,y,f;switch(o.type){case R.PlaylistContextType.MANIFEST:h=u.manifestLoadingMaxRetry,w=u.manifestLoadingTimeOut,y=u.manifestLoadingRetryDelay,f=u.manifestLoadingMaxRetryTimeout;break;case R.PlaylistContextType.LEVEL:case R.PlaylistContextType.AUDIO_TRACK:case R.PlaylistContextType.SUBTITLE_TRACK:h=0,w=u.levelLoadingTimeOut;break;default:h=u.levelLoadingMaxRetry,w=u.levelLoadingTimeOut,y=u.levelLoadingRetryDelay,f=u.levelLoadingMaxRetryTimeout;break}if(T=this.createInternalLoader(o),(l=o.deliveryDirectives)!==null&&l!==void 0&&l.part){var c;if(o.type===R.PlaylistContextType.LEVEL&&o.level!==null?c=this.hls.levels[o.level].details:o.type===R.PlaylistContextType.AUDIO_TRACK&&o.id!==null?c=this.hls.audioTracks[o.id].details:o.type===R.PlaylistContextType.SUBTITLE_TRACK&&o.id!==null&&(c=this.hls.subtitleTracks[o.id].details),c){var s=c.partTarget,a=c.targetduration;s&&a&&(w=Math.min(Math.max(s*3,a*.8)*1e3,w))}}var g={timeout:w,maxRetry:h,retryDelay:y,maxRetryDelay:f,highWaterMark:0},p={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};T.load(o,g,p)},x.loadsuccess=function(o,l,u,T){if(T===void 0&&(T=null),u.isSidxRequest){this.handleSidxRequest(o,u),this.handlePlaylistLoaded(o,l,u,T);return}this.resetInternalLoader(u.type);var m=o.data;if(m.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(o,u,"no EXTM3U delimiter",T);return}l.parsing.start=performance.now(),m.indexOf("#EXTINF:")>0||m.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(o,l,u,T):this.handleMasterPlaylist(o,l,u,T)},x.loaderror=function(o,l,u){u===void 0&&(u=null),this.handleNetworkError(l,u,!1,o)},x.loadtimeout=function(o,l,u){u===void 0&&(u=null),this.handleNetworkError(l,u,!0)},x.handleMasterPlaylist=function(o,l,u,T){var m=this.hls,h=o.data,w=L(o,u),y=I.default.parseMasterPlaylist(h,w),f=y.levels,c=y.sessionData;if(!f.length){this.handleManifestParsingError(o,u,"no level found in manifest",T);return}var s=f.map(function(B){return{id:B.attrs.AUDIO,audioCodec:B.audioCodec}}),a=f.map(function(B){return{id:B.attrs.SUBTITLES,textCodec:B.textCodec}}),g=I.default.parseMasterPlaylistMedia(h,w,"AUDIO",s),p=I.default.parseMasterPlaylistMedia(h,w,"SUBTITLES",a),E=I.default.parseMasterPlaylistMedia(h,w,"CLOSED-CAPTIONS");if(g.length){var O=g.some(function(B){return!B.url});!O&&f[0].audioCodec&&!f[0].attrs.AUDIO&&(U.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),g.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new v.AttrList({}),bitrate:0,url:""}))}m.trigger(P.Events.MANIFEST_LOADED,{levels:f,audioTracks:g,subtitles:p,captions:E,url:w,stats:l,networkDetails:T,sessionData:c})},x.handleTrackOrLevelPlaylist=function(o,l,u,T){var m=this.hls,h=u.id,w=u.level,y=u.type,f=L(o,u),c=Object(K.isFiniteNumber)(h)?h:0,s=Object(K.isFiniteNumber)(w)?w:c,a=S(u),g=I.default.parseLevelPlaylist(o.data,f,s,a,c);if(!g.fragments.length){m.trigger(P.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:f,reason:"no fragments found in level",level:typeof u.level=="number"?u.level:void 0});return}if(y===R.PlaylistContextType.MANIFEST){var p={attrs:new v.AttrList({}),bitrate:0,details:g,name:"",url:f};m.trigger(P.Events.MANIFEST_LOADED,{levels:[p],audioTracks:[],url:f,stats:l,networkDetails:T,sessionData:null})}if(l.parsing.end=performance.now(),g.needSidxRanges){var E,O=(E=g.fragments[0].initSegment)===null||E===void 0?void 0:E.url;this.load({url:O,isSidxRequest:!0,type:y,level:w,levelDetails:g,id:h,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}u.levelDetails=g,this.handlePlaylistLoaded(o,l,u,T)},x.handleSidxRequest=function(o,l){var u=Object(_.parseSegmentIndex)(new Uint8Array(o.data));if(!u)return;var T=u.references,m=l.levelDetails;T.forEach(function(h,w){var y=h.info,f=m.fragments[w];f.byteRange.length===0&&f.setByteRange(String(1+y.end-y.start)+"@"+String(y.start)),f.initSegment&&f.initSegment.setByteRange(String(u.moovEndOffset)+"@0")})},x.handleManifestParsingError=function(o,l,u,T){this.hls.trigger(P.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:l.type===R.PlaylistContextType.MANIFEST,url:o.url,reason:u,response:o,context:l,networkDetails:T})},x.handleNetworkError=function(o,l,u,T){u===void 0&&(u=!1),U.logger.warn("[playlist-loader]: A network "+(u?"timeout":"error")+" occurred while loading "+o.type+" level: "+o.level+" id: "+o.id+' group-id: "'+o.groupId+'"');var m=M.ErrorDetails.UNKNOWN,h=!1,w=this.getInternalLoader(o);switch(o.type){case R.PlaylistContextType.MANIFEST:m=u?M.ErrorDetails.MANIFEST_LOAD_TIMEOUT:M.ErrorDetails.MANIFEST_LOAD_ERROR,h=!0;break;case R.PlaylistContextType.LEVEL:m=u?M.ErrorDetails.LEVEL_LOAD_TIMEOUT:M.ErrorDetails.LEVEL_LOAD_ERROR,h=!1;break;case R.PlaylistContextType.AUDIO_TRACK:m=u?M.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:M.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,h=!1;break;case R.PlaylistContextType.SUBTITLE_TRACK:m=u?M.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:M.ErrorDetails.SUBTITLE_LOAD_ERROR,h=!1;break}w&&this.resetInternalLoader(o.type);var y={type:M.ErrorTypes.NETWORK_ERROR,details:m,fatal:h,url:o.url,loader:w,context:o,networkDetails:l};T&&(y.response=T),this.hls.trigger(P.Events.ERROR,y)},x.handlePlaylistLoaded=function(o,l,u,T){var m=u.type,h=u.level,w=u.id,y=u.groupId,f=u.loader,c=u.levelDetails,s=u.deliveryDirectives;if(!(c!=null&&c.targetduration)){this.handleManifestParsingError(o,u,"invalid target duration",T);return}if(!f)return;c.live&&(f.getCacheAge&&(c.ageHeader=f.getCacheAge()||0),(!f.getCacheAge||isNaN(c.ageHeader))&&(c.ageHeader=0));switch(m){case R.PlaylistContextType.MANIFEST:case R.PlaylistContextType.LEVEL:this.hls.trigger(P.Events.LEVEL_LOADED,{details:c,level:h||0,id:w||0,stats:l,networkDetails:T,deliveryDirectives:s});break;case R.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(P.Events.AUDIO_TRACK_LOADED,{details:c,id:w||0,groupId:y||"",stats:l,networkDetails:T,deliveryDirectives:s});break;case R.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADED,{details:c,id:w||0,groupId:y||"",stats:l,networkDetails:T,deliveryDirectives:s});break}},A}();G.default=C},"./src/polyfills/number.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"isFiniteNumber",function(){return K}),D.d(G,"MAX_SAFE_INTEGER",function(){return P});var K=Number.isFinite||function(M){return typeof M=="number"&&isFinite(M)},P=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(q,G,D){"use strict";D.r(G);var K=function(){function P(){}return P.getSilentFrame=function(U,_){switch(U){case"mp4a.40.2":if(_===1)return new Uint8Array([0,200,0,128,35,128]);if(_===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(_===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(_===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(_===5)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)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)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)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)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]);break}return},P}();G.default=K},"./src/remux/mp4-generator.ts":function(q,G,D){"use strict";D.r(G);var K=Math.pow(2,32)-1,P=function(){function M(){}return M.init=function(){M.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:[]};var _;for(_ in M.types)M.types.hasOwnProperty(_)&&(M.types[_]=[_.charCodeAt(0),_.charCodeAt(1),_.charCodeAt(2),_.charCodeAt(3)]);var I=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]),R=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]);M.HDLR_TYPES={video:I,audio:R};var v=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),S=new Uint8Array([0,0,0,0,0,0,0,0]);M.STTS=M.STSC=M.STCO=S,M.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),M.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),M.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var L=new Uint8Array([105,115,111,109]),C=new Uint8Array([97,118,99,49]),A=new Uint8Array([0,0,0,1]);M.FTYP=M.box(M.types.ftyp,L,A,L,C),M.DINF=M.box(M.types.dinf,M.box(M.types.dref,v))},M.box=function(_){for(var I=8,R=arguments.length,v=new Array(R>1?R-1:0),S=1;S<R;S++)v[S-1]=arguments[S];for(var L=v.length,C=L;L--;)I+=v[L].byteLength;var A=new Uint8Array(I);for(A[0]=I>>24&255,A[1]=I>>16&255,A[2]=I>>8&255,A[3]=I&255,A.set(_,4),L=0,I=8;L<C;L++)A.set(v[L],I),I+=v[L].byteLength;return A},M.hdlr=function(_){return M.box(M.types.hdlr,M.HDLR_TYPES[_])},M.mdat=function(_){return M.box(M.types.mdat,_)},M.mdhd=function(_,I){I*=_;var R=Math.floor(I/(K+1)),v=Math.floor(I%(K+1));return M.box(M.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,_>>24&255,_>>16&255,_>>8&255,_&255,R>>24,R>>16&255,R>>8&255,R&255,v>>24,v>>16&255,v>>8&255,v&255,85,196,0,0]))},M.mdia=function(_){return M.box(M.types.mdia,M.mdhd(_.timescale,_.duration),M.hdlr(_.type),M.minf(_))},M.mfhd=function(_){return M.box(M.types.mfhd,new Uint8Array([0,0,0,0,_>>24,_>>16&255,_>>8&255,_&255]))},M.minf=function(_){return _.type==="audio"?M.box(M.types.minf,M.box(M.types.smhd,M.SMHD),M.DINF,M.stbl(_)):M.box(M.types.minf,M.box(M.types.vmhd,M.VMHD),M.DINF,M.stbl(_))},M.moof=function(_,I,R){return M.box(M.types.moof,M.mfhd(_),M.traf(R,I))},M.moov=function(_){for(var I=_.length,R=[];I--;)R[I]=M.trak(_[I]);return M.box.apply(null,[M.types.moov,M.mvhd(_[0].timescale,_[0].duration)].concat(R).concat(M.mvex(_)))},M.mvex=function(_){for(var I=_.length,R=[];I--;)R[I]=M.trex(_[I]);return M.box.apply(null,[M.types.mvex].concat(R))},M.mvhd=function(_,I){I*=_;var R=Math.floor(I/(K+1)),v=Math.floor(I%(K+1)),S=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,_>>24&255,_>>16&255,_>>8&255,_&255,R>>24,R>>16&255,R>>8&255,R&255,v>>24,v>>16&255,v>>8&255,v&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return M.box(M.types.mvhd,S)},M.sdtp=function(_){var I=_.samples||[],R=new Uint8Array(4+I.length),v,S;for(v=0;v<I.length;v++)S=I[v].flags,R[v+4]=S.dependsOn<<4|S.isDependedOn<<2|S.hasRedundancy;return M.box(M.types.sdtp,R)},M.stbl=function(_){return M.box(M.types.stbl,M.stsd(_),M.box(M.types.stts,M.STTS),M.box(M.types.stsc,M.STSC),M.box(M.types.stsz,M.STSZ),M.box(M.types.stco,M.STCO))},M.avc1=function(_){var I=[],R=[],v,S,L;for(v=0;v<_.sps.length;v++)S=_.sps[v],L=S.byteLength,I.push(L>>>8&255),I.push(L&255),I=I.concat(Array.prototype.slice.call(S));for(v=0;v<_.pps.length;v++)S=_.pps[v],L=S.byteLength,R.push(L>>>8&255),R.push(L&255),R=R.concat(Array.prototype.slice.call(S));var C=M.box(M.types.avcC,new Uint8Array([1,I[3],I[4],I[5],252|3,224|_.sps.length].concat(I).concat([_.pps.length]).concat(R))),A=_.width,x=_.height,d=_.pixelRatio[0],o=_.pixelRatio[1];return M.box(M.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,A>>8&255,A&255,x>>8&255,x&255,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]),C,M.box(M.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),M.box(M.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,d&255,o>>24,o>>16&255,o>>8&255,o&255])))},M.esds=function(_){var I=_.config.length;return 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(_.config).concat([6,1,2]))},M.mp4a=function(_){var I=_.samplerate;return M.box(M.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,_.channelCount,0,16,0,0,0,0,I>>8&255,I&255,0,0]),M.box(M.types.esds,M.esds(_)))},M.mp3=function(_){var I=_.samplerate;return M.box(M.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,_.channelCount,0,16,0,0,0,0,I>>8&255,I&255,0,0]))},M.stsd=function(_){return _.type==="audio"?!_.isAAC&&_.codec==="mp3"?M.box(M.types.stsd,M.STSD,M.mp3(_)):M.box(M.types.stsd,M.STSD,M.mp4a(_)):M.box(M.types.stsd,M.STSD,M.avc1(_))},M.tkhd=function(_){var I=_.id,R=_.duration*_.timescale,v=_.width,S=_.height,L=Math.floor(R/(K+1)),C=Math.floor(R%(K+1));return M.box(M.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,I>>24&255,I>>16&255,I>>8&255,I&255,0,0,0,0,L>>24,L>>16&255,L>>8&255,L&255,C>>24,C>>16&255,C>>8&255,C&255,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,v>>8&255,v&255,0,0,S>>8&255,S&255,0,0]))},M.traf=function(_,I){var R=M.sdtp(_),v=_.id,S=Math.floor(I/(K+1)),L=Math.floor(I%(K+1));return M.box(M.types.traf,M.box(M.types.tfhd,new Uint8Array([0,0,0,0,v>>24,v>>16&255,v>>8&255,v&255])),M.box(M.types.tfdt,new Uint8Array([1,0,0,0,S>>24,S>>16&255,S>>8&255,S&255,L>>24,L>>16&255,L>>8&255,L&255])),M.trun(_,R.length+16+20+8+16+8+8),R)},M.trak=function(_){return _.duration=_.duration||4294967295,M.box(M.types.trak,M.tkhd(_),M.mdia(_))},M.trex=function(_){var I=_.id;return M.box(M.types.trex,new Uint8Array([0,0,0,0,I>>24,I>>16&255,I>>8&255,I&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},M.trun=function(_,I){var R=_.samples||[],v=R.length,S=12+16*v,L=new Uint8Array(S),C,A,x,d,o,l;for(I+=8+S,L.set([0,0,15,1,v>>>24&255,v>>>16&255,v>>>8&255,v&255,I>>>24&255,I>>>16&255,I>>>8&255,I&255],0),C=0;C<v;C++)A=R[C],x=A.duration,d=A.size,o=A.flags,l=A.cts,L.set([x>>>24&255,x>>>16&255,x>>>8&255,x&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,o.degradPrio&240<<8,o.degradPrio&15,l>>>24&255,l>>>16&255,l>>>8&255,l&255],12+16*C);return M.box(M.types.trun,L)},M.initSegment=function(_){M.types||M.init();var I=M.moov(_),R=new Uint8Array(M.FTYP.byteLength+I.byteLength);return R.set(M.FTYP),R.set(I,M.FTYP.byteLength),R},M}();P.types=void 0,P.HDLR_TYPES=void 0,P.STTS=void 0,P.STSC=void 0,P.STCO=void 0,P.STSZ=void 0,P.VMHD=void 0,P.SMHD=void 0,P.STSD=void 0,P.FTYP=void 0,P.DINF=void 0,G.default=P},"./src/remux/mp4-remuxer.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return l}),D.d(G,"normalizePts",function(){return u});var K=D("./src/polyfills/number.ts"),P=D("./src/remux/aac-helper.ts"),M=D("./src/remux/mp4-generator.ts"),U=D("./src/events.ts"),_=D("./src/errors.ts"),I=D("./src/utils/logger.ts"),R=D("./src/types/loader.ts"),v=D("./src/utils/timescale-conversion.ts");function S(){return S=Object.assign||function(w){for(var y=1;y<arguments.length;y++){var f=arguments[y];for(var c in f)Object.prototype.hasOwnProperty.call(f,c)&&(w[c]=f[c])}return w},S.apply(this,arguments)}var L=10*1e3,C=1024,A=1152,x=null,d=null,o=!1,l=function(){function w(f,c,s,a){if(a===void 0&&(a=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=f,this.config=c,this.typeSupported=s,this.ISGenerated=!1,x===null){var g=navigator.userAgent||"",p=g.match(/Chrome\/(\d+)/i);x=p?parseInt(p[1]):0}if(d===null){var E=navigator.userAgent.match(/Safari\/(\d+)/i);d=E?parseInt(E[1]):0}o=!!x&&x<75||!!d&&d<600}var y=w.prototype;return y.destroy=function(){},y.resetTimeStamp=function(c){I.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=c},y.resetNextTimestamp=function(){I.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},y.resetInitSegment=function(){I.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},y.getVideoStartPts=function(c){var s=!1,a=c.reduce(function(g,p){var E=p.pts-g;return E<-4294967296?(s=!0,u(g,p.pts)):E>0?g:p.pts},c[0].pts);return s&&I.logger.debug("PTS rollover detected"),a},y.remux=function(c,s,a,g,p,E,O,B){var W,Q,F,N,X,ee,oe=p,de=p,Ce=c.pid>-1,ge=s.pid>-1,fe=s.samples.length,me=c.samples.length>0,pe=fe>1,ie=(!Ce||me)&&(!ge||pe)||this.ISGenerated||O;if(ie){this.ISGenerated||(F=this.generateIS(c,s,p));var ue=this.isVideoContiguous,be=-1;if(pe&&(be=T(s.samples),!ue&&this.config.forceKeyFrameOnDiscontinuity))if(ee=!0,be>0){I.logger.warn("[mp4-remuxer]: Dropped "+be+" out of "+fe+" video samples due to a missing keyframe");var _e=this.getVideoStartPts(s.samples);s.samples=s.samples.slice(be),s.dropped+=be,de+=(s.samples[0].pts-_e)/(s.timescale||9e4)}else be===-1&&(I.logger.warn("[mp4-remuxer]: No keyframe found out of "+fe+" video samples"),ee=!1);if(this.ISGenerated){if(me&&pe){var Oe=this.getVideoStartPts(s.samples),We=u(c.samples[0].pts,Oe)-Oe,Ve=We/s.inputTimeScale;oe+=Math.max(0,Ve),de+=Math.max(0,-Ve)}if(me){if(c.samplerate||(I.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),F=this.generateIS(c,s,p)),Q=this.remuxAudio(c,oe,this.isAudioContiguous,E,ge||pe||B===R.PlaylistLevelType.AUDIO?de:void 0),pe){var Le=Q?Q.endPTS-Q.startPTS:0;s.inputTimeScale||(I.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),F=this.generateIS(c,s,p)),W=this.remuxVideo(s,de,ue,Le)}}else pe&&(W=this.remuxVideo(s,de,ue,0));W&&(W.firstKeyFrame=be,W.independent=be!==-1)}}return this.ISGenerated&&(a.samples.length&&(X=this.remuxID3(a,p)),g.samples.length&&(N=this.remuxText(g,p))),{audio:Q,video:W,initSegment:F,independent:ee,text:N,id3:X}},y.generateIS=function(c,s,a){var g=c.samples,p=s.samples,E=this.typeSupported,O={},B=!Object(K.isFiniteNumber)(this._initPTS),W="audio/mp4",Q,F,N;if(B&&(Q=F=Infinity),c.config&&g.length&&(c.timescale=c.samplerate,c.isAAC||(E.mpeg?(W="audio/mpeg",c.codec=""):E.mp3&&(c.codec="mp3")),O.audio={id:"audio",container:W,codec:c.codec,initSegment:!c.isAAC&&E.mpeg?new Uint8Array(0):M.default.initSegment([c]),metadata:{channelCount:c.channelCount}},B&&(N=c.inputTimeScale,Q=F=g[0].pts-Math.round(N*a))),s.sps&&s.pps&&p.length&&(s.timescale=s.inputTimeScale,O.video={id:"main",container:"video/mp4",codec:s.codec,initSegment:M.default.initSegment([s]),metadata:{width:s.width,height:s.height}},B)){N=s.inputTimeScale;var X=this.getVideoStartPts(p),ee=Math.round(N*a);F=Math.min(F,u(p[0].dts,X)-ee),Q=Math.min(Q,X-ee)}if(Object.keys(O).length)return this.ISGenerated=!0,B&&(this._initPTS=Q,this._initDTS=F),{tracks:O,initPTS:Q,timescale:N}},y.remuxVideo=function(c,s,a,g){var p=c.inputTimeScale,E=c.samples,O=[],B=E.length,W=this._initPTS,Q=this.nextAvcDts,F=8,N,X,ee,oe=Number.POSITIVE_INFINITY,de=Number.NEGATIVE_INFINITY,Ce=0,ge=!1;if(!a||Q===null){var fe=s*p,me=E[0].pts-u(E[0].dts,E[0].pts);Q=fe-me}for(var pe=0;pe<B;pe++){var ie=E[pe];if(ie.pts=u(ie.pts-W,Q),ie.dts=u(ie.dts-W,Q),ie.dts>ie.pts){var ue=9e4*.2;Ce=Math.max(Math.min(Ce,ie.pts-ie.dts),-1*ue)}ie.dts<E[pe>0?pe-1:pe].dts&&(ge=!0)}ge&&E.sort(function(St,ft){var ot=St.dts-ft.dts,Lt=St.pts-ft.pts;return ot||Lt}),X=E[0].dts,ee=E[E.length-1].dts;var be=Math.round((ee-X)/(B-1));if(Ce<0){if(Ce<be*-2){I.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(v.toMsFromMpegTsClock)(-be,!0)+" ms");for(var _e=Ce,Oe=0;Oe<B;Oe++)E[Oe].dts=_e=Math.max(_e,E[Oe].pts-be),E[Oe].pts=Math.max(_e,E[Oe].pts)}else{I.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(v.toMsFromMpegTsClock)(Ce,!0)+" ms to overcome this issue");for(var We=0;We<B;We++)E[We].dts=E[We].dts+Ce}X=E[0].dts}if(a){var Ve=X-Q,Le=Ve>be,Re=Ve<-1;if(Le||Re){Le?I.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(Ve,!0)+" ms ("+Ve+"dts) hole between fragments detected, filling it"):I.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(-Ve,!0)+" ms ("+Ve+"dts) overlapping between fragments detected"),X=Q;var De=E[0].pts-Ve;E[0].dts=X,E[0].pts=De,I.logger.log("Video: First PTS/DTS adjusted: "+Object(v.toMsFromMpegTsClock)(De,!0)+"/"+Object(v.toMsFromMpegTsClock)(X,!0)+", delta: "+Object(v.toMsFromMpegTsClock)(Ve,!0)+" ms")}}o&&(X=Math.max(0,X));for(var Ge=0,ze=0,Te=0;Te<B;Te++){for(var Ie=E[Te],Ye=Ie.units,qe=Ye.length,je=0,Fe=0;Fe<qe;Fe++)je+=Ye[Fe].data.length;ze+=je,Ge+=qe,Ie.length=je,Ie.dts=Math.max(Ie.dts,X),Ie.pts=Math.max(Ie.pts,Ie.dts,0),oe=Math.min(Ie.pts,oe),de=Math.max(Ie.pts,de)}ee=E[B-1].dts;var rt=ze+4*Ge+8,Ze;try{Ze=new Uint8Array(rt)}catch(St){this.observer.emit(U.Events.ERROR,U.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:rt,reason:"fail allocating video mdat "+rt});return}var Je=new DataView(Ze.buffer);Je.setUint32(0,rt),Ze.set(M.default.types.mdat,4);for(var Ee=0;Ee<B;Ee++){for(var $e=E[Ee],Qe=$e.units,ye=0,Me=0,le=Qe.length;Me<le;Me++){var ne=Qe[Me],ae=ne.data,Y=ne.data.byteLength;Je.setUint32(F,Y),F+=4,Ze.set(ae,F),F+=Y,ye+=4+Y}if(Ee<B-1)N=E[Ee+1].dts-$e.dts;else{var J=this.config,Z=$e.dts-E[Ee>0?Ee-1:Ee].dts;if(J.stretchShortVideoTrack&&this.nextAudioPts!==null){var te=Math.floor(J.maxBufferHole*p),se=(g?oe+g*p:this.nextAudioPts)-$e.pts;se>te?(N=se-Z,N<0&&(N=Z),I.logger.log("[mp4-remuxer]: It is approximately "+se/90+" ms to the next segment; using duration "+N/90+" ms for the last video frame.")):N=Z}else N=Z}var ve=Math.round($e.pts-$e.dts);O.push(new m($e.key,N,ye,ve))}if(O.length&&x&&x<70){var Se=O[0].flags;Se.dependsOn=2,Se.isNonSync=0}console.assert(N!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=Q=ee+N,this.isVideoContiguous=!0;var Xe=M.default.moof(c.sequenceNumber++,X,S({},c,{samples:O})),it="video",tt={data1:Xe,data2:Ze,startPTS:oe/p,endPTS:(de+N)/p,startDTS:X/p,endDTS:Q/p,type:it,hasAudio:!1,hasVideo:!0,nb:O.length,dropped:c.dropped};return c.samples=[],c.dropped=0,console.assert(Ze.length,"MDAT length must not be zero"),tt},y.remuxAudio=function(c,s,a,g,p){var E=c.inputTimeScale,O=c.samplerate?c.samplerate:E,B=E/O,W=c.isAAC?C:A,Q=W*B,F=this._initPTS,N=!c.isAAC&&this.typeSupported.mpeg,X=[],ee=c.samples,oe=N?0:8,de=this.nextAudioPts||-1,Ce=s*E;if(this.isAudioContiguous=a=a||ee.length&&de>0&&(g&&Math.abs(Ce-de)<9e3||Math.abs(u(ee[0].pts-F,Ce)-de)<20*Q),ee.forEach(function(ae){ae.pts=u(ae.pts-F,Ce)}),!a||de<0){if(ee=ee.filter(function(ae){return ae.pts>=0}),!ee.length)return;p===0?de=0:g?de=Math.max(0,Ce):de=ee[0].pts}if(c.isAAC)for(var ge=p!==void 0,fe=this.config.maxAudioFramesDrift,me=0,pe=de;me<ee.length;me++){var ie=ee[me],ue=ie.pts,be=ue-pe,_e=Math.abs(1e3*be/E);if(be<=-fe*Q&&ge)me===0&&(I.logger.warn("Audio frame @ "+(ue/E).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*be/E)+" ms."),this.nextAudioPts=de=pe=ue);else if(be>=fe*Q&&_e<L&&ge){var Oe=Math.round(be/Q);pe=ue-Oe*Q,pe<0&&(Oe--,pe+=Q),me===0&&(this.nextAudioPts=de=pe),I.logger.warn("[mp4-remuxer]: Injecting "+Oe+" audio frame @ "+(pe/E).toFixed(3)+"s due to "+Math.round(1e3*be/E)+" ms gap.");for(var We=0;We<Oe;We++){var Ve=Math.max(pe,0),Le=P.default.getSilentFrame(c.manifestCodec||c.codec,c.channelCount);Le||(I.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Le=ie.unit.subarray()),ee.splice(me,0,{unit:Le,pts:Ve}),pe+=Q,me++}}ie.pts=pe,pe+=Q}for(var Re=null,De=null,Ge,ze=0,Te=ee.length;Te--;)ze+=ee[Te].unit.byteLength;for(var Ie=0,Ye=ee.length;Ie<Ye;Ie++){var qe=ee[Ie],je=qe.unit,Fe=qe.pts;if(De!==null){var rt=X[Ie-1];rt.duration=Math.round((Fe-De)/B)}else if(a&&c.isAAC&&(Fe=de),Re=Fe,ze>0){ze+=oe;try{Ge=new Uint8Array(ze)}catch(ae){this.observer.emit(U.Events.ERROR,U.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ze,reason:"fail allocating audio mdat "+ze});return}if(!N){var Ze=new DataView(Ge.buffer);Ze.setUint32(0,ze),Ge.set(M.default.types.mdat,4)}}else return;Ge.set(je,oe);var Je=je.byteLength;oe+=Je,X.push(new m(!0,W,Je,0)),De=Fe}var Ee=X.length;if(!Ee)return;var $e=X[X.length-1];this.nextAudioPts=de=De+B*$e.duration;var Qe=N?new Uint8Array(0):M.default.moof(c.sequenceNumber++,Re/B,S({},c,{samples:X}));c.samples=[];var ye=Re/E,Me=de/E,le="audio",ne={data1:Qe,data2:Ge,startPTS:ye,endPTS:Me,startDTS:ye,endDTS:Me,type:le,hasAudio:!0,hasVideo:!1,nb:Ee};return this.isAudioContiguous=!0,console.assert(Ge.length,"MDAT length must not be zero"),ne},y.remuxEmptyAudio=function(c,s,a,g){var p=c.inputTimeScale,E=c.samplerate?c.samplerate:p,O=p/E,B=this.nextAudioPts,W=(B!==null?B:g.startDTS*p)+this._initDTS,Q=g.endDTS*p+this._initDTS,F=O*C,N=Math.ceil((Q-W)/F),X=P.default.getSilentFrame(c.manifestCodec||c.codec,c.channelCount);if(I.logger.warn("[mp4-remuxer]: remux empty Audio"),!X){I.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ee=[],oe=0;oe<N;oe++){var de=W+oe*F;ee.push({unit:X,pts:de,dts:de})}return c.samples=ee,this.remuxAudio(c,s,a,!1)},y.remuxID3=function(c,s){var a=c.samples.length;if(!a)return;for(var g=c.inputTimeScale,p=this._initPTS,E=this._initDTS,O=0;O<a;O++){var B=c.samples[O];B.pts=u(B.pts-p,s*g)/g,B.dts=u(B.dts-E,s*g)/g}var W=c.samples;return c.samples=[],{samples:W}},y.remuxText=function(c,s){var a=c.samples.length;if(!a)return;for(var g=c.inputTimeScale,p=this._initPTS,E=0;E<a;E++){var O=c.samples[E];O.pts=u(O.pts-p,s*g)/g}c.samples.sort(function(W,Q){return W.pts-Q.pts});var B=c.samples;return c.samples=[],{samples:B}},w}();function u(w,y){var f;if(y===null)return w;for(y<w?f=-8589934592:f=8589934592;Math.abs(w-y)>4294967296;)w+=f;return w}function T(w){for(var y=0;y<w.length;y++)if(w[y].key)return y;return-1}var m=function(y,f,c,s){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=f,this.size=c,this.cts=s,this.flags=new h(y)},h=function(y){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=y?2:1,this.isNonSync=y?0:1}},"./src/remux/passthrough-remuxer.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/polyfills/number.ts"),P=D("./src/utils/mp4-tools.ts"),M=D("./src/loader/fragment.ts"),U=D("./src/utils/logger.ts"),_=function(){function v(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var S=v.prototype;return S.destroy=function(){},S.resetTimeStamp=function(C){this.initPTS=C,this.lastEndDTS=null},S.resetNextTimestamp=function(){this.lastEndDTS=null},S.resetInitSegment=function(C,A,x){this.audioCodec=A,this.videoCodec=x,this.generateInitSegment(C),this.emitInitSegment=!0},S.generateInitSegment=function(C){var A=this.audioCodec,x=this.videoCodec;if(!C||!C.byteLength){this.initTracks=void 0,this.initData=void 0;return}var d=this.initData=Object(P.parseInitSegment)(C);A||(A=R(d.audio,M.ElementaryStreamTypes.AUDIO)),x||(x=R(d.video,M.ElementaryStreamTypes.VIDEO));var o={};d.audio&&d.video?o.audiovideo={container:"video/mp4",codec:A+","+x,initSegment:C,id:"main"}:d.audio?o.audio={container:"audio/mp4",codec:A,initSegment:C,id:"audio"}:d.video?o.video={container:"video/mp4",codec:x,initSegment:C,id:"main"}:U.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=o},S.remux=function(C,A,x,d,o){var l=this.initPTS,u=this.lastEndDTS,T={audio:void 0,video:void 0,text:d,id3:x,initSegment:void 0};Object(K.isFiniteNumber)(u)||(u=this.lastEndDTS=o||0);var m=A.samples;if(!m||!m.length)return T;var h={initPTS:void 0,timescale:1},w=this.initData;if((!w||!w.length)&&(this.generateInitSegment(m),w=this.initData),!w||!w.length)return U.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),T;this.emitInitSegment&&(h.tracks=this.initTracks,this.emitInitSegment=!1),Object(K.isFiniteNumber)(l)||(this.initPTS=h.initPTS=l=I(w,m,u));var y=Object(P.getDuration)(m,w),f=u,c=y+f;Object(P.offsetStartDTS)(w,m,l),y>0?this.lastEndDTS=c:(U.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var s=!!w.audio,a=!!w.video,g="";s&&(g+="audio"),a&&(g+="video");var p={data1:m,startPTS:f,startDTS:f,endPTS:c,endDTS:c,type:g,hasAudio:s,hasVideo:a,nb:1,dropped:0};return T.audio=p.type==="audio"?p:void 0,T.video=p.type!=="audio"?p:void 0,T.text=d,T.id3=x,T.initSegment=h,T},v}(),I=function(S,L,C){return Object(P.getStartDTS)(S,L)-C};function R(v,S){var L=v==null?void 0:v.codec;return L&&L.length>4?L:L==="hvc1"?"hvc1.1.c.L120.90":L==="av01"?"av01.0.04M.08":L==="avc1"||S===M.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}G.default=_},"./src/task-loop.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return K});var K=function(){function P(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var M=P.prototype;return M.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},M.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},M.onHandlerDestroyed=function(){},M.hasInterval=function(){return!!this._tickInterval},M.hasNextTick=function(){return!!this._tickTimer},M.setInterval=function(_){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,_),!0)},M.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},M.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},M.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},M.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},M.doTick=function(){},P}()},"./src/types/cmcd.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"CMCDVersion",function(){return K}),D.d(G,"CMCDObjectType",function(){return P}),D.d(G,"CMCDStreamingFormat",function(){return M}),D.d(G,"CMCDStreamType",function(){return U});var K=1,P;(function(_){_.MANIFEST="m",_.AUDIO="a",_.VIDEO="v",_.MUXED="av",_.INIT="i",_.CAPTION="c",_.TIMED_TEXT="tt",_.KEY="k",_.OTHER="o"})(P||(P={}));var M;(function(_){_.DASH="d",_.HLS="h",_.SMOOTH="s",_.OTHER="o"})(M||(M={}));var U;(function(_){_.VOD="v",_.LIVE="l"})(U||(U={}))},"./src/types/level.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"HlsSkip",function(){return M}),D.d(G,"getSkipValue",function(){return U}),D.d(G,"HlsUrlParameters",function(){return _}),D.d(G,"Level",function(){return I});function K(R,v){for(var S=0;S<v.length;S++){var L=v[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(R,L.key,L)}}function P(R,v,S){return v&&K(R.prototype,v),S&&K(R,S),R}var M;(function(R){R.No="",R.Yes="YES",R.v2="v2"})(M||(M={}));function U(R,v){var S=R.canSkipUntil,L=R.canSkipDateRanges,C=R.endSN,A=v!==void 0?v-C:0;return S&&A<S?L?M.v2:M.Yes:M.No}var _=function(){function R(S,L,C){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=S,this.part=L,this.skip=C}var v=R.prototype;return v.addDirectives=function(L){var C=new self.URL(L);return this.msn!==void 0&&C.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&C.searchParams.set("_HLS_part",this.part.toString()),this.skip&&C.searchParams.set("_HLS_skip",this.skip),C.toString()},R}(),I=function(){function R(v){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[v.url],this.attrs=v.attrs,this.bitrate=v.bitrate,v.details&&(this.details=v.details),this.id=v.id||0,this.name=v.name,this.width=v.width||0,this.height=v.height||0,this.audioCodec=v.audioCodec,this.videoCodec=v.videoCodec,this.unknownCodecs=v.unknownCodecs,this.codecSet=[v.videoCodec,v.audioCodec].filter(function(S){return S}).join(",").replace(/\.[^.,]+/g,"")}return P(R,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(S){var L=S%this.url.length;this._urlId!==L&&(this.details=void 0,this._urlId=L)}}]),R}()},"./src/types/loader.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"PlaylistContextType",function(){return K}),D.d(G,"PlaylistLevelType",function(){return P});var K;(function(M){M.MANIFEST="manifest",M.LEVEL="level",M.AUDIO_TRACK="audioTrack",M.SUBTITLE_TRACK="subtitleTrack"})(K||(K={}));var P;(function(M){M.MAIN="main",M.AUDIO="audio",M.SUBTITLE="subtitle"})(P||(P={}))},"./src/types/transmuxer.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"ChunkMetadata",function(){return K});var K=function(U,_,I,R,v,S){R===void 0&&(R=0),v===void 0&&(v=-1),S===void 0&&(S=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=P(),this.buffering={audio:P(),video:P(),audiovideo:P()},this.level=U,this.sn=_,this.id=I,this.size=R,this.part=v,this.partial=S};function P(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"AttrList",function(){return M});var K=/^(\d+)x(\d+)$/,P=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,M=function(){function U(I){typeof I=="string"&&(I=U.parseAttrList(I));for(var R in I)I.hasOwnProperty(R)&&(this[R]=I[R])}var _=U.prototype;return _.decimalInteger=function(R){var v=parseInt(this[R],10);return v>Number.MAX_SAFE_INTEGER?Infinity:v},_.hexadecimalInteger=function(R){if(this[R]){var v=(this[R]||"0x").slice(2);v=(v.length&1?"0":"")+v;for(var S=new Uint8Array(v.length/2),L=0;L<v.length/2;L++)S[L]=parseInt(v.slice(L*2,L*2+2),16);return S}else return null},_.hexadecimalIntegerAsNumber=function(R){var v=parseInt(this[R],16);return v>Number.MAX_SAFE_INTEGER?Infinity:v},_.decimalFloatingPoint=function(R){return parseFloat(this[R])},_.optionalFloat=function(R,v){var S=this[R];return S?parseFloat(S):v},_.enumeratedString=function(R){return this[R]},_.bool=function(R){return this[R]==="YES"},_.decimalResolution=function(R){var v=K.exec(this[R]);return v===null?void 0:{width:parseInt(v[1],10),height:parseInt(v[2],10)}},U.parseAttrList=function(R){var v,S={},L='"';for(P.lastIndex=0;(v=P.exec(R))!==null;){var C=v[2];C.indexOf(L)===0&&C.lastIndexOf(L)===C.length-1&&(C=C.slice(1,-1)),S[v[1]]=C}return S},U}()},"./src/utils/binary-search.ts":function(q,G,D){"use strict";D.r(G);var K={search:function(M,U){for(var _=0,I=M.length-1,R=null,v=null;_<=I;){R=(_+I)/2|0,v=M[R];var S=U(v);if(S>0)_=R+1;else if(S<0)I=R-1;else return v}return null}};G.default=K},"./src/utils/buffer-helper.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"BufferHelper",function(){return M});var K=D("./src/utils/logger.ts"),P={length:0,start:function(){return 0},end:function(){return 0}},M=function(){function U(){}return U.isBuffered=function(I,R){try{if(I){for(var v=U.getBuffered(I),S=0;S<v.length;S++)if(R>=v.start(S)&&R<=v.end(S))return!0}}catch(L){}return!1},U.bufferInfo=function(I,R,v){try{if(I){var S=U.getBuffered(I),L=[],C;for(C=0;C<S.length;C++)L.push({start:S.start(C),end:S.end(C)});return this.bufferedInfo(L,R,v)}}catch(A){}return{len:0,start:R,end:R,nextStart:void 0}},U.bufferedInfo=function(I,R,v){R=Math.max(0,R),I.sort(function(h,w){var y=h.start-w.start;return y||w.end-h.end});var S=[];if(v)for(var L=0;L<I.length;L++){var C=S.length;if(C){var A=S[C-1].end;I[L].start-A<v?I[L].end>A&&(S[C-1].end=I[L].end):S.push(I[L])}else S.push(I[L])}else S=I;for(var x=0,d,o=R,l=R,u=0;u<S.length;u++){var T=S[u].start,m=S[u].end;if(R+v>=T&&R<m)o=T,l=m,x=l-R;else if(R+v<T){d=T;break}}return{len:x,start:o||0,end:l||0,nextStart:d}},U.getBuffered=function(I){try{return I.buffered}catch(R){return K.logger.log("failed to get media.buffered",R),P}},U}()},"./src/utils/cea-608-parser.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"Row",function(){return l}),D.d(G,"CaptionScreen",function(){return u});var K=D("./src/utils/logger.ts"),P={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},M=function(c){var s=c;return P.hasOwnProperty(c)&&(s=P[c]),String.fromCharCode(s)},U=15,_=100,I={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},R={17:2,18:4,21:6,22:8,23:10,19:13,20:15},v={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},S={25:2,26:4,29:6,30:8,31:10,27:13,28:15},L=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],C;(function(f){f[f.ERROR=0]="ERROR",f[f.TEXT=1]="TEXT",f[f.WARNING=2]="WARNING",f[f.INFO=2]="INFO",f[f.DEBUG=3]="DEBUG",f[f.DATA=3]="DATA"})(C||(C={}));var A=function(){function f(){this.time=null,this.verboseLevel=C.ERROR}var c=f.prototype;return c.log=function(a,g){this.verboseLevel>=a&&K.logger.log(this.time+" ["+a+"] "+g)},f}(),x=function(c){for(var s=[],a=0;a<c.length;a++)s.push(c[a].toString(16));return s},d=function(){function f(s,a,g,p,E){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=s||"white",this.underline=a||!1,this.italics=g||!1,this.background=p||"black",this.flash=E||!1}var c=f.prototype;return c.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},c.setStyles=function(a){for(var g=["foreground","underline","italics","background","flash"],p=0;p<g.length;p++){var E=g[p];a.hasOwnProperty(E)&&(this[E]=a[E])}},c.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},c.equals=function(a){return this.foreground===a.foreground&&this.underline===a.underline&&this.italics===a.italics&&this.background===a.background&&this.flash===a.flash},c.copy=function(a){this.foreground=a.foreground,this.underline=a.underline,this.italics=a.italics,this.background=a.background,this.flash=a.flash},c.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},f}(),o=function(){function f(s,a,g,p,E,O){this.uchar=void 0,this.penState=void 0,this.uchar=s||" ",this.penState=new d(a,g,p,E,O)}var c=f.prototype;return c.reset=function(){this.uchar=" ",this.penState.reset()},c.setChar=function(a,g){this.uchar=a,this.penState.copy(g)},c.setPenState=function(a){this.penState.copy(a)},c.equals=function(a){return this.uchar===a.uchar&&this.penState.equals(a.penState)},c.copy=function(a){this.uchar=a.uchar,this.penState.copy(a.penState)},c.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},f}(),l=function(){function f(s){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var a=0;a<_;a++)this.chars.push(new o);this.logger=s,this.pos=0,this.currPenState=new d}var c=f.prototype;return c.equals=function(a){for(var g=!0,p=0;p<_;p++)if(!this.chars[p].equals(a.chars[p])){g=!1;break}return g},c.copy=function(a){for(var g=0;g<_;g++)this.chars[g].copy(a.chars[g])},c.isEmpty=function(){for(var a=!0,g=0;g<_;g++)if(!this.chars[g].isEmpty()){a=!1;break}return a},c.setCursor=function(a){this.pos!==a&&(this.pos=a),this.pos<0?(this.logger.log(C.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>_&&(this.logger.log(C.DEBUG,"Too large cursor position "+this.pos),this.pos=_)},c.moveCursor=function(a){var g=this.pos+a;if(a>1)for(var p=this.pos+1;p<g+1;p++)this.chars[p].setPenState(this.currPenState);this.setCursor(g)},c.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},c.insertChar=function(a){a>=144&&this.backSpace();var g=M(a);if(this.pos>=_){this.logger.log(C.ERROR,"Cannot insert "+a.toString(16)+" ("+g+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(g,this.currPenState),this.moveCursor(1)},c.clearFromPos=function(a){var g;for(g=a;g<_;g++)this.chars[g].reset()},c.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},c.clearToEndOfRow=function(){this.clearFromPos(this.pos)},c.getTextString=function(){for(var a=[],g=!0,p=0;p<_;p++){var E=this.chars[p].uchar;E!==" "&&(g=!1),a.push(E)}return g?"":a.join("")},c.setPenStyles=function(a){this.currPenState.setStyles(a);var g=this.chars[this.pos];g.setPenState(this.currPenState)},f}(),u=function(){function f(s){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var a=0;a<U;a++)this.rows.push(new l(s));this.logger=s,this.currRow=U-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var c=f.prototype;return c.reset=function(){for(var a=0;a<U;a++)this.rows[a].clear();this.currRow=U-1},c.equals=function(a){for(var g=!0,p=0;p<U;p++)if(!this.rows[p].equals(a.rows[p])){g=!1;break}return g},c.copy=function(a){for(var g=0;g<U;g++)this.rows[g].copy(a.rows[g])},c.isEmpty=function(){for(var a=!0,g=0;g<U;g++)if(!this.rows[g].isEmpty()){a=!1;break}return a},c.backSpace=function(){var a=this.rows[this.currRow];a.backSpace()},c.clearToEndOfRow=function(){var a=this.rows[this.currRow];a.clearToEndOfRow()},c.insertChar=function(a){var g=this.rows[this.currRow];g.insertChar(a)},c.setPen=function(a){var g=this.rows[this.currRow];g.setPenStyles(a)},c.moveCursor=function(a){var g=this.rows[this.currRow];g.moveCursor(a)},c.setCursor=function(a){this.logger.log(C.INFO,"setCursor: "+a);var g=this.rows[this.currRow];g.setCursor(a)},c.setPAC=function(a){this.logger.log(C.INFO,"pacData = "+JSON.stringify(a));var g=a.row-1;if(this.nrRollUpRows&&g<this.nrRollUpRows-1&&(g=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==g){for(var p=0;p<U;p++)this.rows[p].clear();var E=this.currRow+1-this.nrRollUpRows,O=this.lastOutputScreen;if(O){var B=O.rows[E].cueStartTime,W=this.logger.time;if(B&&W!==null&&B<W)for(var Q=0;Q<this.nrRollUpRows;Q++)this.rows[g-this.nrRollUpRows+Q+1].copy(O.rows[E+Q])}}this.currRow=g;var F=this.rows[this.currRow];if(a.indent!==null){var N=a.indent,X=Math.max(N-1,0);F.setCursor(a.indent),a.color=F.chars[X].penState.foreground}var ee={foreground:a.color,underline:a.underline,italics:a.italics,background:"black",flash:!1};this.setPen(ee)},c.setBkgData=function(a){this.logger.log(C.INFO,"bkgData = "+JSON.stringify(a)),this.backSpace(),this.setPen(a),this.insertChar(32)},c.setRollUpRows=function(a){this.nrRollUpRows=a},c.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(C.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(C.TEXT,this.getDisplayText());var a=this.currRow+1-this.nrRollUpRows,g=this.rows.splice(a,1)[0];g.clear(),this.rows.splice(this.currRow,0,g),this.logger.log(C.INFO,"Rolling up")},c.getDisplayText=function(a){a=a||!1;for(var g=[],p="",E=-1,O=0;O<U;O++){var B=this.rows[O].getTextString();B&&(E=O+1,a?g.push("Row "+E+": '"+B+"'"):g.push(B.trim()))}return g.length>0&&(a?p="["+g.join(" | ")+"]":p=g.join(`
|
|
`)),p},c.getTextAndFormat=function(){return this.rows},f}(),T=function(){function f(s,a,g){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=s,this.outputFilter=a,this.mode=null,this.verbose=0,this.displayedMemory=new u(g),this.nonDisplayedMemory=new u(g),this.lastOutputScreen=new u(g),this.currRollUpRow=this.displayedMemory.rows[U-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=g}var c=f.prototype;return c.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[U-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},c.getHandler=function(){return this.outputFilter},c.setHandler=function(a){this.outputFilter=a},c.setPAC=function(a){this.writeScreen.setPAC(a)},c.setBkgData=function(a){this.writeScreen.setBkgData(a)},c.setMode=function(a){if(a===this.mode)return;this.mode=a,this.logger.log(C.INFO,"MODE="+a),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=a},c.insertChars=function(a){for(var g=0;g<a.length;g++)this.writeScreen.insertChar(a[g]);var p=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(C.INFO,p+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(C.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},c.ccRCL=function(){this.logger.log(C.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},c.ccBS=function(){if(this.logger.log(C.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},c.ccAOF=function(){},c.ccAON=function(){},c.ccDER=function(){this.logger.log(C.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},c.ccRU=function(a){this.logger.log(C.INFO,"RU("+a+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(a)},c.ccFON=function(){this.logger.log(C.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},c.ccRDC=function(){this.logger.log(C.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},c.ccTR=function(){this.logger.log(C.INFO,"TR"),this.setMode("MODE_TEXT")},c.ccRTD=function(){this.logger.log(C.INFO,"RTD"),this.setMode("MODE_TEXT")},c.ccEDM=function(){this.logger.log(C.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},c.ccCR=function(){this.logger.log(C.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},c.ccENM=function(){this.logger.log(C.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},c.ccEOC=function(){if(this.logger.log(C.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var a=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=a,this.writeScreen=this.nonDisplayedMemory,this.logger.log(C.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},c.ccTO=function(a){this.logger.log(C.INFO,"TO("+a+") - Tab Offset"),this.writeScreen.moveCursor(a)},c.ccMIDROW=function(a){var g={flash:!1};if(g.underline=a%2===1,g.italics=a>=46,g.italics)g.foreground="white";else{var p=Math.floor(a/2)-16,E=["white","green","blue","cyan","red","yellow","magenta"];g.foreground=E[p]}this.logger.log(C.INFO,"MIDROW: "+JSON.stringify(g)),this.writeScreen.setPen(g)},c.outputDataUpdate=function(a){a===void 0&&(a=!1);var g=this.logger.time;if(g===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=g:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,g,this.lastOutputScreen),a&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:g),this.lastOutputScreen.copy(this.displayedMemory))},c.cueSplitAtTime=function(a){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,a,this.displayedMemory),this.cueStartTime=a))},f}(),m=function(){function f(s,a,g){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var p=new A;this.channels=[null,new T(s,a,p),new T(s+1,g,p)],this.cmdHistory=y(),this.logger=p}var c=f.prototype;return c.getHandler=function(a){return this.channels[a].getHandler()},c.setHandler=function(a,g){this.channels[a].setHandler(g)},c.addData=function(a,g){var p,E,O,B=!1;this.logger.time=a;for(var W=0;W<g.length;W+=2){if(E=g[W]&127,O=g[W+1]&127,E===0&&O===0)continue;if(this.logger.log(C.DATA,"["+x([g[W],g[W+1]])+"] -> ("+x([E,O])+")"),p=this.parseCmd(E,O),p||(p=this.parseMidrow(E,O)),p||(p=this.parsePAC(E,O)),p||(p=this.parseBackgroundAttributes(E,O)),!p&&(B=this.parseChars(E,O),B)){var Q=this.currentChannel;if(Q&&Q>0){var F=this.channels[Q];F.insertChars(B)}else this.logger.log(C.WARNING,"No channel found yet. TEXT-MODE?")}!p&&!B&&this.logger.log(C.WARNING,"Couldn't parse cleaned data "+x([E,O])+" orig: "+x([g[W],g[W+1]]))}},c.parseCmd=function(a,g){var p=this.cmdHistory,E=(a===20||a===28||a===21||a===29)&&g>=32&&g<=47,O=(a===23||a===31)&&g>=33&&g<=35;if(!(E||O))return!1;if(w(a,g,p))return h(null,null,p),this.logger.log(C.DEBUG,"Repeated command ("+x([a,g])+") is dropped"),!0;var B=a===20||a===21||a===23?1:2,W=this.channels[B];return a===20||a===21||a===28||a===29?g===32?W.ccRCL():g===33?W.ccBS():g===34?W.ccAOF():g===35?W.ccAON():g===36?W.ccDER():g===37?W.ccRU(2):g===38?W.ccRU(3):g===39?W.ccRU(4):g===40?W.ccFON():g===41?W.ccRDC():g===42?W.ccTR():g===43?W.ccRTD():g===44?W.ccEDM():g===45?W.ccCR():g===46?W.ccENM():g===47&&W.ccEOC():W.ccTO(g-32),h(a,g,p),this.currentChannel=B,!0},c.parseMidrow=function(a,g){var p=0;if((a===17||a===25)&&g>=32&&g<=47){if(a===17?p=1:p=2,p!==this.currentChannel)return this.logger.log(C.ERROR,"Mismatch channel in midrow parsing"),!1;var E=this.channels[p];return E?(E.ccMIDROW(g),this.logger.log(C.DEBUG,"MIDROW ("+x([a,g])+")"),!0):!1}return!1},c.parsePAC=function(a,g){var p,E=this.cmdHistory,O=(a>=17&&a<=23||a>=25&&a<=31)&&g>=64&&g<=127,B=(a===16||a===24)&&g>=64&&g<=95;if(!(O||B))return!1;if(w(a,g,E))return h(null,null,E),!0;var W=a<=23?1:2;g>=64&&g<=95?p=W===1?I[a]:v[a]:p=W===1?R[a]:S[a];var Q=this.channels[W];return Q?(Q.setPAC(this.interpretPAC(p,g)),h(a,g,E),this.currentChannel=W,!0):!1},c.interpretPAC=function(a,g){var p,E={color:null,italics:!1,indent:null,underline:!1,row:a};return g>95?p=g-96:p=g-64,E.underline=(p&1)===1,p<=13?E.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(p/2)]:p<=15?(E.italics=!0,E.color="white"):E.indent=Math.floor((p-16)/2)*4,E},c.parseChars=function(a,g){var p,E=null,O=null;if(a>=25?(p=2,O=a-8):(p=1,O=a),O>=17&&O<=19){var B;O===17?B=g+80:O===18?B=g+112:B=g+144,this.logger.log(C.INFO,"Special char '"+M(B)+"' in channel "+p),E=[B]}else a>=32&&a<=127&&(E=g===0?[a]:[a,g]);if(E){var W=x(E);this.logger.log(C.DEBUG,"Char codes = "+W.join(",")),h(a,g,this.cmdHistory)}return E},c.parseBackgroundAttributes=function(a,g){var p=(a===16||a===24)&&g>=32&&g<=47,E=(a===23||a===31)&&g>=45&&g<=47;if(!(p||E))return!1;var O,B={};a===16||a===24?(O=Math.floor((g-32)/2),B.background=L[O],g%2===1&&(B.background=B.background+"_semi")):g===45?B.background="transparent":(B.foreground="black",g===47&&(B.underline=!0));var W=a<=23?1:2,Q=this.channels[W];return Q.setBkgData(B),h(a,g,this.cmdHistory),!0},c.reset=function(){for(var a=0;a<Object.keys(this.channels).length;a++){var g=this.channels[a];g&&g.reset()}this.cmdHistory=y()},c.cueSplitAtTime=function(a){for(var g=0;g<this.channels.length;g++){var p=this.channels[g];p&&p.cueSplitAtTime(a)}},f}();function h(f,c,s){s.a=f,s.b=c}function w(f,c,s){return s.a===f&&s.b===c}function y(){return{a:null,b:null}}G.default=m},"./src/utils/codecs.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"isCodecType",function(){return P}),D.d(G,"isCodecSupportedInMp4",function(){return M});var K={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,av01:!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},text:{stpp:!0,wvtt:!0}};function P(U,_){var I=K[_];return!!I&&I[U.slice(0,4)]===!0}function M(U,_){return MediaSource.isTypeSupported((_||"video")+'/mp4;codecs="'+U+'"')}},"./src/utils/cues.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/utils/vttparser.ts"),P=D("./src/utils/webvtt-parser.ts"),M=D("./src/utils/texttrack-utils.ts"),U=/\s/,_={newCue:function(R,v,S,L){for(var C=[],A,x,d,o,l,u=self.VTTCue||self.TextTrackCue,T=0;T<L.rows.length;T++)if(A=L.rows[T],d=!0,o=0,l="",!A.isEmpty()){for(var m=0;m<A.chars.length;m++)U.test(A.chars[m].uchar)&&d?o++:(l+=A.chars[m].uchar,d=!1);A.cueStartTime=v,v===S&&(S+=1e-4),o>=16?o--:o++;var h=Object(K.fixLineBreaks)(l.trim()),w=Object(P.generateCueId)(v,S,h);(!R||!R.cues||!R.cues.getCueById(w))&&(x=new u(v,S,h),x.id=w,x.line=T+1,x.align="left",x.position=10+Math.min(80,Math.floor(o*8/32)*10),C.push(x))}return R&&C.length&&(C.sort(function(y,f){return y.line==="auto"||f.line==="auto"?0:y.line>8&&f.line>8?f.line-y.line:y.line-f.line}),C.forEach(function(y){return Object(M.addCueToTrack)(R,y)})),C}};G.default=_},"./src/utils/discontinuities.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"findFirstFragWithCC",function(){return U}),D.d(G,"shouldAlignOnDiscontinuities",function(){return _}),D.d(G,"findDiscontinuousReferenceFrag",function(){return I}),D.d(G,"adjustSlidingStart",function(){return v}),D.d(G,"alignStream",function(){return S}),D.d(G,"alignPDT",function(){return C}),D.d(G,"alignFragmentByPDTDelta",function(){return A}),D.d(G,"alignMediaPlaylistByPDT",function(){return x});var K=D("./src/polyfills/number.ts"),P=D("./src/utils/logger.ts"),M=D("./src/controller/level-helper.ts");function U(d,o){for(var l=null,u=0,T=d.length;u<T;u++){var m=d[u];if(m&&m.cc===o){l=m;break}}return l}function _(d,o,l){return!!(o.details&&(l.endCC>l.startCC||d&&d.cc<l.startCC))}function I(d,o){var l=d.fragments,u=o.fragments;if(!u.length||!l.length){P.logger.log("No fragments to align");return}var T=U(l,u[0].cc);if(!T||T&&!T.startPTS){P.logger.log("No frag in previous level to align on");return}return T}function R(d,o){if(d){var l=d.start+o;d.start=d.startPTS=l,d.endPTS=l+d.duration}}function v(d,o){for(var l=o.fragments,u=0,T=l.length;u<T;u++)R(l[u],d);o.fragmentHint&&R(o.fragmentHint,d),o.alignedSliding=!0}function S(d,o,l){if(!o)return;L(d,l,o),!l.alignedSliding&&o.details&&C(l,o.details),!l.alignedSliding&&o.details&&!l.skippedSegments&&Object(M.adjustSliding)(o.details,l)}function L(d,o,l){if(_(d,l,o)){var u=I(l.details,o);u&&Object(K.isFiniteNumber)(u.start)&&(P.logger.log("Adjusting PTS using last level due to CC increase within current level "+o.url),v(u.start,o))}}function C(d,o){if(!o.fragments.length||!d.hasProgramDateTime||!o.hasProgramDateTime)return;var l=o.fragments[0].programDateTime,u=d.fragments[0].programDateTime,T=(u-l)/1e3+o.fragments[0].start;T&&Object(K.isFiniteNumber)(T)&&(P.logger.log("Adjusting PTS using programDateTime delta "+(u-l)+"ms, sliding:"+T.toFixed(3)+" "+d.url+" "),v(T,d))}function A(d,o){var l=d.programDateTime;if(!l)return;var u=(l-o)/1e3;d.start=d.startPTS=u,d.endPTS=u+d.duration}function x(d,o){if(!o.fragments.length||!d.hasProgramDateTime||!o.hasProgramDateTime)return;var l=o.fragments[0].programDateTime,u=o.fragments[0].start,T=l-u*1e3;d.fragments.forEach(function(m){A(m,T)}),d.fragmentHint&&A(d.fragmentHint,T),d.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/utils/ewma.ts"),P=function(){function M(_,I,R){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=R,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new K.default(_),this.fast_=new K.default(I)}var U=M.prototype;return U.update=function(I,R){var v=this.slow_,S=this.fast_;this.slow_.halfLife!==I&&(this.slow_=new K.default(I,v.getEstimate(),v.getTotalWeight())),this.fast_.halfLife!==R&&(this.fast_=new K.default(R,S.getEstimate(),S.getTotalWeight()))},U.sample=function(I,R){I=Math.max(I,this.minDelayMs_);var v=8*R,S=I/1e3,L=v/S;this.fast_.sample(S,L),this.slow_.sample(S,L)},U.canEstimate=function(){var I=this.fast_;return I&&I.getTotalWeight()>=this.minWeight_},U.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},U.destroy=function(){},M}();G.default=P},"./src/utils/ewma.ts":function(q,G,D){"use strict";D.r(G);var K=function(){function P(U,_,I){_===void 0&&(_=0),I===void 0&&(I=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=U,this.alpha_=U?Math.exp(Math.log(.5)/U):0,this.estimate_=_,this.totalWeight_=I}var M=P.prototype;return M.sample=function(_,I){var R=Math.pow(this.alpha_,_);this.estimate_=I*(1-R)+R*this.estimate_,this.totalWeight_+=_},M.getTotalWeight=function(){return this.totalWeight_},M.getEstimate=function(){if(this.alpha_){var _=1-Math.pow(this.alpha_,this.totalWeight_);if(_)return this.estimate_/_}return this.estimate_},P}();G.default=K},"./src/utils/fetch-loader.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"fetchSupported",function(){return A});var K=D("./src/polyfills/number.ts"),P=D("./src/loader/load-stats.ts"),M=D("./src/demux/chunk-cache.ts");function U(u,T){u.prototype=Object.create(T.prototype),u.prototype.constructor=u,S(u,T)}function _(u){var T=typeof Map=="function"?new Map:void 0;return _=function(h){if(h===null||!v(h))return h;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(typeof T!="undefined"){if(T.has(h))return T.get(h);T.set(h,w)}function w(){return I(h,arguments,L(this).constructor)}return w.prototype=Object.create(h.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),S(w,h)},_(u)}function I(u,T,m){return R()?I=Reflect.construct:I=function(w,y,f){var c=[null];c.push.apply(c,y);var s=Function.bind.apply(w,c),a=new s;return f&&S(a,f.prototype),a},I.apply(null,arguments)}function R(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(u){return!1}}function v(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function S(u,T){return S=Object.setPrototypeOf||function(h,w){return h.__proto__=w,h},S(u,T)}function L(u){return L=Object.setPrototypeOf?Object.getPrototypeOf:function(m){return m.__proto__||Object.getPrototypeOf(m)},L(u)}function C(){return C=Object.assign||function(u){for(var T=1;T<arguments.length;T++){var m=arguments[T];for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&(u[h]=m[h])}return u},C.apply(this,arguments)}function A(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(u){}return!1}var x=function(){function u(m){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=m.fetchSetup||o,this.controller=new self.AbortController,this.stats=new P.LoadStats}var T=u.prototype;return T.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},T.abortInternal=function(){var h=this.response;(!h||!h.ok)&&(this.stats.aborted=!0,this.controller.abort())},T.abort=function(){var h;this.abortInternal(),(h=this.callbacks)!==null&&h!==void 0&&h.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},T.load=function(h,w,y){var f=this,c=this.stats;if(c.loading.start)throw new Error("Loader can only be used once.");c.loading.start=self.performance.now();var s=d(h,this.controller.signal),a=y.onProgress,g=h.responseType==="arraybuffer",p=g?"byteLength":"length";this.context=h,this.config=w,this.callbacks=y,this.request=this.fetchSetup(h,s),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){f.abortInternal(),y.onTimeout(c,h,f.response)},w.timeout),self.fetch(this.request).then(function(E){if(f.response=f.loader=E,!E.ok){var O=E.status,B=E.statusText;throw new l(B||"fetch, bad network response",O,E)}return c.loading.first=Math.max(self.performance.now(),c.loading.start),c.total=parseInt(E.headers.get("Content-Length")||"0"),a&&Object(K.isFiniteNumber)(w.highWaterMark)?f.loadProgressively(E,c,h,w.highWaterMark,a):g?E.arrayBuffer():E.text()}).then(function(E){var O=f.response;self.clearTimeout(f.requestTimeout),c.loading.end=Math.max(self.performance.now(),c.loading.first),c.loaded=c.total=E[p];var B={url:O.url,data:E};a&&!Object(K.isFiniteNumber)(w.highWaterMark)&&a(c,h,E,O),y.onSuccess(B,c,h,O)}).catch(function(E){if(self.clearTimeout(f.requestTimeout),c.aborted)return;var O=E.code||0;y.onError({code:O,text:E.message},h,E.details)})},T.getCacheAge=function(){var h=null;if(this.response){var w=this.response.headers.get("age");h=w?parseFloat(w):null}return h},T.loadProgressively=function(h,w,y,f,c){f===void 0&&(f=0);var s=new M.default,a=h.body.getReader(),g=function p(){return a.read().then(function(E){if(E.done)return s.dataLength&&c(w,y,s.flush(),h),Promise.resolve(new ArrayBuffer(0));var O=E.value,B=O.length;return w.loaded+=B,B<f||s.dataLength?(s.push(O),s.dataLength>=f&&c(w,y,s.flush(),h)):c(w,y,O,h),p()}).catch(function(){return Promise.reject()})};return g()},u}();function d(u,T){var m={method:"GET",mode:"cors",credentials:"same-origin",signal:T,headers:new self.Headers(C({},u.headers))};return u.rangeEnd&&m.headers.set("Range","bytes="+u.rangeStart+"-"+String(u.rangeEnd-1)),m}function o(u,T){return new self.Request(u.url,T)}var l=function(u){U(T,u);function T(m,h,w){var y;return y=u.call(this,m)||this,y.code=void 0,y.details=void 0,y.code=h,y.details=w,y}return T}(_(Error));G.default=x},"./src/utils/imsc1-ttml-parser.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"IMSC1_CODEC",function(){return v}),D.d(G,"parseIMSC1",function(){return A});var K=D("./src/utils/mp4-tools.ts"),P=D("./src/utils/vttparser.ts"),M=D("./src/utils/vttcue.ts"),U=D("./src/demux/id3.ts"),_=D("./src/utils/timescale-conversion.ts"),I=D("./src/utils/webvtt-parser.ts");function R(){return R=Object.assign||function(f){for(var c=1;c<arguments.length;c++){var s=arguments[c];for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(f[a]=s[a])}return f},R.apply(this,arguments)}var v="stpp.ttml.im1t",S=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,L=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,C={left:"start",center:"center",right:"end",start:"start",end:"end"};function A(f,c,s,a,g){var p=Object(K.findBox)(new Uint8Array(f),["mdat"]);if(p.length===0){g(new Error("Could not parse IMSC1 mdat"));return}var E=p[0],O=Object(U.utf8ArrayToStr)(new Uint8Array(f,E.start,E.end-E.start)),B=Object(_.toTimescaleFromScale)(c,1,s);try{a(x(O,B))}catch(W){g(W)}}function x(f,c){var s=new DOMParser,a=s.parseFromString(f,"text/xml"),g=a.getElementsByTagName("tt")[0];if(!g)throw new Error("Invalid ttml");var p={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},E=Object.keys(p).reduce(function(F,N){return F[N]=g.getAttribute("ttp:"+N)||p[N],F},{}),O=g.getAttribute("xml:space")!=="preserve",B=o(d(g,"styling","style")),W=o(d(g,"layout","region")),Q=d(g,"body","[begin]");return[].map.call(Q,function(F){var N=l(F,O);if(!N||!F.hasAttribute("begin"))return null;var X=h(F.getAttribute("begin"),E),ee=h(F.getAttribute("dur"),E),oe=h(F.getAttribute("end"),E);if(X===null)throw m(F);if(oe===null){if(ee===null)throw m(F);oe=X+ee}var de=new M.default(X-c,oe-c,N);de.id=Object(I.generateCueId)(de.startTime,de.endTime,de.text);var Ce=W[F.getAttribute("region")],ge=B[F.getAttribute("style")];de.position=10,de.size=80;var fe=u(Ce,ge),me=fe.textAlign;if(me){var pe=C[me];pe&&(de.lineAlign=pe),de.align=me}return R(de,fe),de}).filter(function(F){return F!==null})}function d(f,c,s){var a=f.getElementsByTagName(c)[0];return a?[].slice.call(a.querySelectorAll(s)):[]}function o(f){return f.reduce(function(c,s){var a=s.getAttribute("xml:id");return a&&(c[a]=s),c},{})}function l(f,c){return[].slice.call(f.childNodes).reduce(function(s,a,g){var p;return a.nodeName==="br"&&g?s+`
|
|
`:(p=a.childNodes)!==null&&p!==void 0&&p.length?l(a,c):c?s+a.textContent.trim().replace(/\s+/g," "):s+a.textContent},"")}function u(f,c){var s="http://www.w3.org/ns/ttml#styling",a=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return a.reduce(function(g,p){var E=T(c,s,p)||T(f,s,p);return E&&(g[p]=E),g},{})}function T(f,c,s){return f.hasAttributeNS(c,s)?f.getAttributeNS(c,s):null}function m(f){return new Error("Could not parse ttml timestamp "+f)}function h(f,c){if(!f)return null;var s=Object(P.parseTimeStamp)(f);return s===null&&(S.test(f)?s=w(f,c):L.test(f)&&(s=y(f,c))),s}function w(f,c){var s=S.exec(f),a=(s[4]|0)+(s[5]|0)/c.subFrameRate;return(s[1]|0)*3600+(s[2]|0)*60+(s[3]|0)+a/c.frameRate}function y(f,c){var s=L.exec(f),a=Number(s[1]),g=s[2];switch(g){case"h":return a*3600;case"m":return a*60;case"ms":return a*1e3;case"f":return a/c.frameRate;case"t":return a/c.tickRate}return a}},"./src/utils/logger.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"enableLogs",function(){return I}),D.d(G,"logger",function(){return R});var K=function(){},P={trace:K,debug:K,log:K,warn:K,info:K,error:K},M=P;function U(v){var S=self.console[v];return S?S.bind(self.console,"["+v+"] >"):K}function _(v){for(var S=arguments.length,L=new Array(S>1?S-1:0),C=1;C<S;C++)L[C-1]=arguments[C];L.forEach(function(A){M[A]=v[A]?v[A].bind(v):U(A)})}function I(v){if(self.console&&v===!0||typeof v=="object"){_(v,"debug","log","info","warn","error");try{M.log()}catch(S){M=P}}else M=P}var R=M},"./src/utils/mediakeys-helper.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"KeySystems",function(){return K}),D.d(G,"requestMediaKeySystemAccess",function(){return P});var K;(function(M){M.WIDEVINE="com.widevine.alpha",M.PLAYREADY="com.microsoft.playready"})(K||(K={}));var P=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"getMediaSource",function(){return K});function K(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"bin2str",function(){return _}),D.d(G,"readUint16",function(){return I}),D.d(G,"readUint32",function(){return R}),D.d(G,"writeUint32",function(){return v}),D.d(G,"findBox",function(){return S}),D.d(G,"parseSegmentIndex",function(){return L}),D.d(G,"parseInitSegment",function(){return C}),D.d(G,"getStartDTS",function(){return A}),D.d(G,"getDuration",function(){return x}),D.d(G,"computeRawDurationFromSamples",function(){return d}),D.d(G,"offsetStartDTS",function(){return o}),D.d(G,"segmentValidRange",function(){return l}),D.d(G,"appendUint8Array",function(){return u});var K=D("./src/utils/typed-array.ts"),P=D("./src/loader/fragment.ts"),M=Math.pow(2,32)-1,U=[].push;function _(T){return String.fromCharCode.apply(null,T)}function I(T,m){"data"in T&&(m+=T.start,T=T.data);var h=T[m]<<8|T[m+1];return h<0?65536+h:h}function R(T,m){"data"in T&&(m+=T.start,T=T.data);var h=T[m]<<24|T[m+1]<<16|T[m+2]<<8|T[m+3];return h<0?4294967296+h:h}function v(T,m,h){"data"in T&&(m+=T.start,T=T.data),T[m]=h>>24,T[m+1]=h>>16&255,T[m+2]=h>>8&255,T[m+3]=h&255}function S(T,m){var h=[];if(!m.length)return h;var w,y,f;"data"in T?(w=T.data,y=T.start,f=T.end):(w=T,y=0,f=w.byteLength);for(var c=y;c<f;){var s=R(w,c),a=_(w.subarray(c+4,c+8)),g=s>1?c+s:f;if(a===m[0])if(m.length===1)h.push({data:w,start:c+8,end:g});else{var p=S({data:w,start:c+8,end:g},m.slice(1));p.length&&U.apply(h,p)}c=g}return h}function L(T){var m=S(T,["moov"]),h=m[0],w=h?h.end:null,y=S(T,["sidx"]);if(!y||!y[0])return null;var f=[],c=y[0],s=c.data[0],a=s===0?8:16,g=R(c,a);a+=4;var p=0,E=0;s===0?a+=8:a+=16,a+=2;var O=c.end+E,B=I(c,a);a+=2;for(var W=0;W<B;W++){var Q=a,F=R(c,Q);Q+=4;var N=F&2147483647,X=(F&2147483648)>>>31;if(X===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ee=R(c,Q);Q+=4,f.push({referenceSize:N,subsegmentDuration:ee,info:{duration:ee/g,start:O,end:O+N-1}}),O+=N,Q+=4,a=Q}return{earliestPresentationTime:p,timescale:g,version:s,referencesCount:B,references:f,moovEndOffset:w}}function C(T){for(var m=[],h=S(T,["moov","trak"]),w=0;w<h.length;w++){var y=h[w],f=S(y,["tkhd"])[0];if(f){var c=f.data[f.start],s=c===0?12:20,a=R(f,s),g=S(y,["mdia","mdhd"])[0];if(g){c=g.data[g.start],s=c===0?12:20;var p=R(g,s),E=S(y,["mdia","hdlr"])[0];if(E){var O=_(E.data.subarray(E.start+8,E.start+12)),B={soun:P.ElementaryStreamTypes.AUDIO,vide:P.ElementaryStreamTypes.VIDEO}[O];if(B){var W=S(y,["mdia","minf","stbl","stsd"])[0],Q=void 0;W&&(Q=_(W.data.subarray(W.start+12,W.start+16))),m[a]={timescale:p,type:B},m[B]={timescale:p,id:a,codec:Q}}}}}}var F=S(T,["moov","mvex","trex"]);return F.forEach(function(N){var X=R(N,4),ee=m[X];ee&&(ee.default={duration:R(N,12),flags:R(N,20)})}),m}function A(T,m){return S(m,["moof","traf"]).reduce(function(h,w){var y=S(w,["tfdt"])[0],f=y.data[y.start],c=S(w,["tfhd"]).reduce(function(s,a){var g=R(a,4),p=T[g];if(p){var E=R(y,4);f===1&&(E*=Math.pow(2,32),E+=R(y,8));var O=p.timescale||9e4,B=E/O;if(isFinite(B)&&(s===null||B<s))return B}return s},null);return c!==null&&isFinite(c)&&(h===null||c<h)?c:h},null)||0}function x(T,m){for(var h=0,w=0,y=0,f=S(T,["moof","traf"]),c=0;c<f.length;c++){var s=f[c],a=S(s,["tfhd"])[0],g=R(a,4),p=m[g];if(!p)continue;var E=p.default,O=R(a,0)|(E==null?void 0:E.flags),B=E==null?void 0:E.duration;O&8&&(O&2?B=R(a,12):B=R(a,8));for(var W=p.timescale||9e4,Q=S(s,["trun"]),F=0;F<Q.length;F++){if(B){var N=R(Q[F],4);h=B*N}else h=d(Q[F]);p.type===P.ElementaryStreamTypes.VIDEO?w+=h/W:p.type===P.ElementaryStreamTypes.AUDIO&&(y+=h/W)}}if(w===0&&y===0){var X=L(T);if(X!=null&&X.references)return X.references.reduce(function(ee,oe){return ee+oe.info.duration||0},0)}return w||y}function d(T){var m=R(T,0),h=8;m&1&&(h+=4),m&4&&(h+=4);for(var w=0,y=R(T,4),f=0;f<y;f++){if(m&256){var c=R(T,h);w+=c,h+=4}m&512&&(h+=4),m&1024&&(h+=4),m&2048&&(h+=4)}return w}function o(T,m,h){S(m,["moof","traf"]).forEach(function(w){S(w,["tfhd"]).forEach(function(y){var f=R(y,4),c=T[f];if(!c)return;var s=c.timescale||9e4;S(w,["tfdt"]).forEach(function(a){var g=a.data[a.start],p=R(a,4);if(g===0)v(a,4,p-h*s);else{p*=Math.pow(2,32),p+=R(a,8),p-=h*s,p=Math.max(p,0);var E=Math.floor(p/(M+1)),O=Math.floor(p%(M+1));v(a,4,E),v(a,8,O)}})})})}function l(T){var m={valid:null,remainder:null},h=S(T,["moof"]);if(h){if(h.length<2)return m.remainder=T,m}else return m;var w=h[h.length-1];return m.valid=Object(K.sliceUint8)(T,0,w.start-8),m.remainder=Object(K.sliceUint8)(T,w.start-8),m}function u(T,m){var h=new Uint8Array(T.length+m.length);return h.set(T),h.set(m,T.length),h}},"./src/utils/output-filter.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"default",function(){return K});var K=function(){function P(U,_){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=U,this.trackName=_}var M=P.prototype;return M.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},M.newCue=function(_,I,R){(this.startTime===null||this.startTime>_)&&(this.startTime=_),this.endTime=I,this.screen=R,this.timelineController.createCaptionsTrack(this.trackName)},M.reset=function(){this.cueRanges=[]},P}()},"./src/utils/texttrack-utils.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"sendAddTrackEvent",function(){return P}),D.d(G,"addCueToTrack",function(){return M}),D.d(G,"clearCurrentCues",function(){return U}),D.d(G,"removeCuesInRange",function(){return _}),D.d(G,"getCuesInRange",function(){return R});var K=D("./src/utils/logger.ts");function P(v,S){var L;try{L=new Event("addtrack")}catch(C){L=document.createEvent("Event"),L.initEvent("addtrack",!1,!1)}L.track=v,S.dispatchEvent(L)}function M(v,S){var L=v.mode;if(L==="disabled"&&(v.mode="hidden"),v.cues&&!v.cues.getCueById(S.id))try{if(v.addCue(S),!v.cues.getCueById(S.id))throw new Error("addCue is failed for: "+S)}catch(A){K.logger.debug("[texttrack-utils]: "+A);var C=new self.TextTrackCue(S.startTime,S.endTime,S.text);C.id=S.id,v.addCue(C)}L==="disabled"&&(v.mode=L)}function U(v){var S=v.mode;if(S==="disabled"&&(v.mode="hidden"),v.cues)for(var L=v.cues.length;L--;)v.removeCue(v.cues[L]);S==="disabled"&&(v.mode=S)}function _(v,S,L){var C=v.mode;if(C==="disabled"&&(v.mode="hidden"),v.cues&&v.cues.length>0)for(var A=R(v.cues,S,L),x=0;x<A.length;x++)v.removeCue(A[x]);C==="disabled"&&(v.mode=C)}function I(v,S){if(S<v[0].startTime)return 0;var L=v.length-1;if(S>v[L].endTime)return-1;for(var C=0,A=L;C<=A;){var x=Math.floor((A+C)/2);if(S<v[x].startTime)A=x-1;else if(S>v[x].startTime&&C<L)C=x+1;else return x}return v[C].startTime-S<S-v[A].startTime?C:A}function R(v,S,L){var C=[],A=I(v,S);if(A>-1)for(var x=A,d=v.length;x<d;x++){var o=v[x];if(o.startTime>=S&&o.endTime<=L)C.push(o);else if(o.startTime>L)return C}return C}},"./src/utils/time-ranges.ts":function(q,G,D){"use strict";D.r(G);var K={toString:function(M){for(var U="",_=M.length,I=0;I<_;I++)U+="["+M.start(I).toFixed(3)+","+M.end(I).toFixed(3)+"]";return U}};G.default=K},"./src/utils/timescale-conversion.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"toTimescaleFromBase",function(){return P}),D.d(G,"toTimescaleFromScale",function(){return M}),D.d(G,"toMsFromMpegTsClock",function(){return U}),D.d(G,"toMpegTsClockFromTimescale",function(){return _});var K=9e4;function P(I,R,v,S){v===void 0&&(v=1),S===void 0&&(S=!1);var L=I*R*v;return S?Math.round(L):L}function M(I,R,v,S){return v===void 0&&(v=1),S===void 0&&(S=!1),P(I,R,1/v,S)}function U(I,R){return R===void 0&&(R=!1),P(I,1e3,1/K,R)}function _(I,R){return R===void 0&&(R=1),P(I,K,1/R)}},"./src/utils/typed-array.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"sliceUint8",function(){return K});function K(P,M,U){return Uint8Array.prototype.slice?P.slice(M,U):new Uint8Array(Array.prototype.slice.call(P,M,U))}},"./src/utils/vttcue.ts":function(q,G,D){"use strict";D.r(G),G.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var K=["","lr","rl"],P=["start","middle","end","left","right"];function M(v,S){if(typeof S!="string")return!1;if(!Array.isArray(v))return!1;var L=S.toLowerCase();return~v.indexOf(L)?L:!1}function U(v){return M(K,v)}function _(v){return M(P,v)}function I(v){for(var S=arguments.length,L=new Array(S>1?S-1:0),C=1;C<S;C++)L[C-1]=arguments[C];for(var A=1;A<arguments.length;A++){var x=arguments[A];for(var d in x)v[d]=x[d]}return v}function R(v,S,L){var C=this,A={enumerable:!0};C.hasBeenReset=!1;var x="",d=!1,o=v,l=S,u=L,T=null,m="",h=!0,w="auto",y="start",f=50,c="middle",s=50,a="middle";Object.defineProperty(C,"id",I({},A,{get:function(){return x},set:function(p){x=""+p}})),Object.defineProperty(C,"pauseOnExit",I({},A,{get:function(){return d},set:function(p){d=!!p}})),Object.defineProperty(C,"startTime",I({},A,{get:function(){return o},set:function(p){if(typeof p!="number")throw new TypeError("Start time must be set to a number.");o=p,this.hasBeenReset=!0}})),Object.defineProperty(C,"endTime",I({},A,{get:function(){return l},set:function(p){if(typeof p!="number")throw new TypeError("End time must be set to a number.");l=p,this.hasBeenReset=!0}})),Object.defineProperty(C,"text",I({},A,{get:function(){return u},set:function(p){u=""+p,this.hasBeenReset=!0}})),Object.defineProperty(C,"region",I({},A,{get:function(){return T},set:function(p){T=p,this.hasBeenReset=!0}})),Object.defineProperty(C,"vertical",I({},A,{get:function(){return m},set:function(p){var E=U(p);if(E===!1)throw new SyntaxError("An invalid or illegal string was specified.");m=E,this.hasBeenReset=!0}})),Object.defineProperty(C,"snapToLines",I({},A,{get:function(){return h},set:function(p){h=!!p,this.hasBeenReset=!0}})),Object.defineProperty(C,"line",I({},A,{get:function(){return w},set:function(p){if(typeof p!="number"&&p!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");w=p,this.hasBeenReset=!0}})),Object.defineProperty(C,"lineAlign",I({},A,{get:function(){return y},set:function(p){var E=_(p);if(!E)throw new SyntaxError("An invalid or illegal string was specified.");y=E,this.hasBeenReset=!0}})),Object.defineProperty(C,"position",I({},A,{get:function(){return f},set:function(p){if(p<0||p>100)throw new Error("Position must be between 0 and 100.");f=p,this.hasBeenReset=!0}})),Object.defineProperty(C,"positionAlign",I({},A,{get:function(){return c},set:function(p){var E=_(p);if(!E)throw new SyntaxError("An invalid or illegal string was specified.");c=E,this.hasBeenReset=!0}})),Object.defineProperty(C,"size",I({},A,{get:function(){return s},set:function(p){if(p<0||p>100)throw new Error("Size must be between 0 and 100.");s=p,this.hasBeenReset=!0}})),Object.defineProperty(C,"align",I({},A,{get:function(){return a},set:function(p){var E=_(p);if(!E)throw new SyntaxError("An invalid or illegal string was specified.");a=E,this.hasBeenReset=!0}})),C.displayState=void 0}return R.prototype.getCueAsHTML=function(){var v=self.WebVTT;return v.convertCueToDOMTree(self,this.text)},R}()},"./src/utils/vttparser.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"parseTimeStamp",function(){return M}),D.d(G,"fixLineBreaks",function(){return S}),D.d(G,"VTTParser",function(){return L});var K=D("./src/utils/vttcue.ts"),P=function(){function C(){}var A=C.prototype;return A.decode=function(d,o){if(!d)return"";if(typeof d!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(d))},C}();function M(C){function A(d,o,l,u){return(d|0)*3600+(o|0)*60+(l|0)+parseFloat(u||0)}var x=C.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return x?parseFloat(x[2])>59?A(x[2],x[3],0,x[4]):A(x[1],x[2],x[3],x[4]):null}var U=function(){function C(){this.values=Object.create(null)}var A=C.prototype;return A.set=function(d,o){!this.get(d)&&o!==""&&(this.values[d]=o)},A.get=function(d,o,l){return l?this.has(d)?this.values[d]:o[l]:this.has(d)?this.values[d]:o},A.has=function(d){return d in this.values},A.alt=function(d,o,l){for(var u=0;u<l.length;++u)if(o===l[u]){this.set(d,o);break}},A.integer=function(d,o){/^-?\d+$/.test(o)&&this.set(d,parseInt(o,10))},A.percent=function(d,o){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(o)){var l=parseFloat(o);if(l>=0&&l<=100)return this.set(d,l),!0}return!1},C}();function _(C,A,x,d){var o=d?C.split(d):[C];for(var l in o){if(typeof o[l]!="string")continue;var u=o[l].split(x);if(u.length!==2)continue;var T=u[0],m=u[1];A(T,m)}}var I=new K.default(0,0,""),R=I.align==="middle"?"middle":"center";function v(C,A,x){var d=C;function o(){var T=M(C);if(T===null)throw new Error("Malformed timestamp: "+d);return C=C.replace(/^[^\sa-zA-Z-]+/,""),T}function l(T,m){var h=new U;_(T,function(f,c){var s;switch(f){case"region":for(var a=x.length-1;a>=0;a--)if(x[a].id===c){h.set(f,x[a].region);break}break;case"vertical":h.alt(f,c,["rl","lr"]);break;case"line":s=c.split(","),h.integer(f,s[0]),h.percent(f,s[0])&&h.set("snapToLines",!1),h.alt(f,s[0],["auto"]),s.length===2&&h.alt("lineAlign",s[1],["start",R,"end"]);break;case"position":s=c.split(","),h.percent(f,s[0]),s.length===2&&h.alt("positionAlign",s[1],["start",R,"end","line-left","line-right","auto"]);break;case"size":h.percent(f,c);break;case"align":h.alt(f,c,["start",R,"end","left","right"]);break}},/:/,/\s/),m.region=h.get("region",null),m.vertical=h.get("vertical","");var w=h.get("line","auto");w==="auto"&&I.line===-1&&(w=-1),m.line=w,m.lineAlign=h.get("lineAlign","start"),m.snapToLines=h.get("snapToLines",!0),m.size=h.get("size",100),m.align=h.get("align",R);var y=h.get("position","auto");y==="auto"&&I.position===50&&(y=m.align==="start"||m.align==="left"?0:m.align==="end"||m.align==="right"?100:50),m.position=y}function u(){C=C.replace(/^\s+/,"")}if(u(),A.startTime=o(),u(),C.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+d);C=C.substr(3),u(),A.endTime=o(),u(),l(C,A)}function S(C){return C.replace(/<br(?: \/)?>/gi,`
|
|
`)}var L=function(){function C(){this.state="INITIAL",this.buffer="",this.decoder=new P,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var A=C.prototype;return A.parse=function(d){var o=this;d&&(o.buffer+=o.decoder.decode(d,{stream:!0}));function l(){var y=o.buffer,f=0;for(y=S(y);f<y.length&&y[f]!=="\r"&&y[f]!==`
|
|
`;)++f;var c=y.substr(0,f);return y[f]==="\r"&&++f,y[f]===`
|
|
`&&++f,o.buffer=y.substr(f),c}function u(y){_(y,function(f,c){},/:/)}try{var T="";if(o.state==="INITIAL"){if(!/\r\n|\n/.test(o.buffer))return this;T=l();var m=T.match(/^()?WEBVTT([ \t].*)?$/);if(!m||!m[0])throw new Error("Malformed WebVTT signature.");o.state="HEADER"}for(var h=!1;o.buffer;){if(!/\r\n|\n/.test(o.buffer))return this;h?h=!1:T=l();switch(o.state){case"HEADER":/:/.test(T)?u(T):T||(o.state="ID");continue;case"NOTE":T||(o.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(T)){o.state="NOTE";break}if(!T)continue;if(o.cue=new K.default(0,0,""),o.state="CUE",T.indexOf("-->")===-1){o.cue.id=T;continue}case"CUE":if(!o.cue){o.state="BADCUE";continue}try{v(T,o.cue,o.regionList)}catch(y){o.cue=null,o.state="BADCUE";continue}o.state="CUETEXT";continue;case"CUETEXT":{var w=T.indexOf("-->")!==-1;if(!T||w&&(h=!0)){o.oncue&&o.cue&&o.oncue(o.cue),o.cue=null,o.state="ID";continue}if(o.cue===null)continue;o.cue.text&&(o.cue.text+=`
|
|
`),o.cue.text+=T}continue;case"BADCUE":T||(o.state="ID")}}}catch(y){o.state==="CUETEXT"&&o.cue&&o.oncue&&o.oncue(o.cue),o.cue=null,o.state=o.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},A.flush=function(){var d=this;try{if((d.cue||d.state==="HEADER")&&(d.buffer+=`
|
|
|
|
`,d.parse()),d.state==="INITIAL"||d.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(o){d.onparsingerror&&d.onparsingerror(o)}return d.onflush&&d.onflush(),this},C}()},"./src/utils/webvtt-parser.ts":function(q,G,D){"use strict";D.r(G),D.d(G,"generateCueId",function(){return L}),D.d(G,"parseWebVTT",function(){return A});var K=D("./src/polyfills/number.ts"),P=D("./src/utils/vttparser.ts"),M=D("./src/demux/id3.ts"),U=D("./src/utils/timescale-conversion.ts"),_=D("./src/remux/mp4-remuxer.ts"),I=/\r\n|\n\r|\n|\r/g,R=function(d,o,l){return l===void 0&&(l=0),d.substr(l,o.length)===o},v=function(d){var o=parseInt(d.substr(-3)),l=parseInt(d.substr(-6,2)),u=parseInt(d.substr(-9,2)),T=d.length>9?parseInt(d.substr(0,d.indexOf(":"))):0;if(!Object(K.isFiniteNumber)(o)||!Object(K.isFiniteNumber)(l)||!Object(K.isFiniteNumber)(u)||!Object(K.isFiniteNumber)(T))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+d);return o+=1e3*l,o+=60*1e3*u,o+=60*60*1e3*T,o},S=function(d){for(var o=5381,l=d.length;l;)o=o*33^d.charCodeAt(--l);return(o>>>0).toString()};function L(x,d,o){return S(x.toString())+S(d.toString())+S(o)}var C=function(d,o,l){var u=d[o],T=d[u.prevCC];if(!T||!T.new&&u.new){d.ccOffset=d.presentationOffset=u.start,u.new=!1;return}for(;(m=T)!==null&&m!==void 0&&m.new;){var m;d.ccOffset+=u.start-T.start,u.new=!1,u=T,T=d[u.prevCC]}d.presentationOffset=l};function A(x,d,o,l,u,T,m,h){var w=new P.VTTParser,y=Object(M.utf8ArrayToStr)(new Uint8Array(x)).trim().replace(I,`
|
|
`).split(`
|
|
`),f=[],c=Object(U.toMpegTsClockFromTimescale)(d,o),s="00:00.000",a=0,g=0,p,E=!0,O=!1;w.oncue=function(B){var W=l[u],Q=l.ccOffset,F=(a-c)/9e4;if(W!=null&&W.new&&(g!==void 0?Q=l.ccOffset=W.start:C(l,u,F)),F&&(Q=F-l.presentationOffset),O){var N=B.endTime-B.startTime,X=Object(_.normalizePts)((B.startTime+Q-g)*9e4,T*9e4)/9e4;B.startTime=X,B.endTime=X+N}var ee=B.text.trim();B.text=decodeURIComponent(encodeURIComponent(ee)),B.id||(B.id=L(B.startTime,B.endTime,ee)),B.endTime>0&&f.push(B)},w.onparsingerror=function(B){p=B},w.onflush=function(){if(p){h(p);return}m(f)},y.forEach(function(B){if(E)if(R(B,"X-TIMESTAMP-MAP=")){E=!1,O=!0,B.substr(16).split(",").forEach(function(W){R(W,"LOCAL:")?s=W.substr(6):R(W,"MPEGTS:")&&(a=parseInt(W.substr(7)))});try{g=v(s)/1e3}catch(W){O=!1,p=W}return}else B===""&&(E=!1);w.parse(B+`
|
|
`)}),w.flush()}},"./src/utils/xhr-loader.ts":function(q,G,D){"use strict";D.r(G);var K=D("./src/utils/logger.ts"),P=D("./src/loader/load-stats.ts"),M=/^age:\s*[\d.]+\s*$/m,U=function(){function _(R){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=R?R.xhrSetup:null,this.stats=new P.LoadStats,this.retryDelay=0}var I=_.prototype;return I.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},I.abortInternal=function(){var v=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),v&&(v.onreadystatechange=null,v.onprogress=null,v.readyState!==4&&(this.stats.aborted=!0,v.abort()))},I.abort=function(){var v;this.abortInternal(),(v=this.callbacks)!==null&&v!==void 0&&v.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},I.load=function(v,S,L){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=v,this.config=S,this.callbacks=L,this.retryDelay=S.retryDelay,this.loadInternal()},I.loadInternal=function(){var v=this.config,S=this.context;if(!v)return;var L=this.loader=new self.XMLHttpRequest,C=this.stats;C.loading.first=0,C.loaded=0;var A=this.xhrSetup;try{if(A)try{A(L,S.url)}catch(o){L.open("GET",S.url,!0),A(L,S.url)}L.readyState||L.open("GET",S.url,!0);var x=this.context.headers;if(x)for(var d in x)L.setRequestHeader(d,x[d])}catch(o){this.callbacks.onError({code:L.status,text:o.message},S,L);return}S.rangeEnd&&L.setRequestHeader("Range","bytes="+S.rangeStart+"-"+(S.rangeEnd-1)),L.onreadystatechange=this.readystatechange.bind(this),L.onprogress=this.loadprogress.bind(this),L.responseType=S.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),v.timeout),L.send()},I.readystatechange=function(){var v=this.context,S=this.loader,L=this.stats;if(!v||!S)return;var C=S.readyState,A=this.config;if(L.aborted)return;if(C>=2)if(self.clearTimeout(this.requestTimeout),L.loading.first===0&&(L.loading.first=Math.max(self.performance.now(),L.loading.start)),C===4){S.onreadystatechange=null,S.onprogress=null;var x=S.status;if(x>=200&&x<300){L.loading.end=Math.max(self.performance.now(),L.loading.first);var d,o;if(v.responseType==="arraybuffer"?(d=S.response,o=d.byteLength):(d=S.responseText,o=d.length),L.loaded=L.total=o,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(L,v,d,S),!this.callbacks)return;var u={url:S.responseURL,data:d};this.callbacks.onSuccess(u,L,v,S)}else L.retry>=A.maxRetry||x>=400&&x<499?(K.logger.error(x+" while loading "+v.url),this.callbacks.onError({code:x,text:S.statusText},v,S)):(K.logger.warn(x+" while loading "+v.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,A.maxRetryDelay),L.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),A.timeout)},I.loadtimeout=function(){K.logger.warn("timeout while loading "+this.context.url);var v=this.callbacks;v&&(this.abortInternal(),v.onTimeout(this.stats,this.context,this.loader))},I.loadprogress=function(v){var S=this.stats;S.loaded=v.loaded,v.lengthComputable&&(S.total=v.total)},I.getCacheAge=function(){var v=null;if(this.loader&&M.test(this.loader.getAllResponseHeaders())){var S=this.loader.getResponseHeader("age");v=S?parseFloat(S):null}return v},_}();G.default=U}}).default})},yslc:function(we,xe){we.exports="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0NwMuBc6yVPBULERhAxt7sax+hgDUjHgXuiG7LngMUuqCpkdxkBLMOBa6AW60TCTlS3RMFYnY0BKBpwLnUa9NZl3B/LLtqQkgtmSNwOOhX7whXjU1NKz5e4DdcubH4ZOJgw0Fbrl7c9fg5B7ZYKRwWAMOLgio89+CwTTGTeMATkxYDui63OyQPglcgLIsDAGKAPXhF6YfQvM3HeBENKZdQ1jQGoGLEIvmJ0EvnZ/c79ES2owzB5jwBkDHGhIZ/2R7QC5g9HEGJArAxzyde8D5Gm5AmS4GAO2c3TGB2OgFTLALR1KA6e5SByvUpEp7s+6tELwrMnKYcCl0DmYVOCyzOM3L2dCV44mZInUhdBrVFCPMmdt3MCmLrLsemWBcih0DlfVBMNNWVu2WdlgI7qydCE7tE2FzpVpVOqhdZkbaJSKhsSELruuVxYgG6FzOK+Bekjd+I16exaY0JWlC9mhbRA6h5PBCBpUM369w1jdTOiy63plAaoX+rEQNTewetzmEmfomdCVpQvZoeWWDi3UctrBlePXnHHpTZcdcgZIUQxErnk43vjI2ovuQP8faDGikjbF4FsAAAAASUVORK5CYII="},zEei:function(we,xe,z){we.exports={flex_box_center:"flex_box_center___3trsE",flex_space_between:"flex_space_between___vYNfG",flex_box_vertical_center:"flex_box_vertical_center___267W4",flex_box_center_end:"flex_box_center_end___35F4i",flex_box_column:"flex_box_column___1cLWS",bg:"bg___13rUr",flexRow:"flexRow___geim6",flexJustifyCenter:"flexJustifyCenter___2SLQ2",flexAlignEnd:"flexAlignEnd___2-3OH",flexAlignCenter:"flexAlignCenter___2PK_9",flexColumn:"flexColumn___pc_D1",formWrap:"formWrap___3ozw6",titleWrap:"titleWrap___3JSLu",fieldWrap:"fieldWrap___1M8-z",mdWrap:"mdWrap___3iPl2",backgroundFa:"backgroundFa___2Wd1f",button:"button___3ie7q",icons:"icons___-WSHu",addButton:"addButton___1qx7n",navBar:"navBar___xDlWA",actived:"actived___dZNDy",deleteButton:"deleteButton___3Ethm"}}}]);
|