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
902 KiB
133 lines
902 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[243,7,9,13],{"+NIl":function(Be,Ie,G){(function($){$(G("VrN/"))})(function($){"use strict";$.defineMode("stex",function(K,O){"use strict";function B(w,A){w.cmdState.push(A)}function C(w){return w.cmdState.length>0?w.cmdState[w.cmdState.length-1]:null}function L(w){var A=w.cmdState.pop();A&&A.closeBracket()}function U(w){for(var A=w.cmdState,g=A.length-1;g>=0;g--){var u=A[g];if(u.name=="DEFAULT")continue;return u}return{styleIdentifier:function(){return null}}}function _(w,A,g){return function(){this.name=w,this.bracketNo=0,this.style=A,this.styles=g,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 M(w,A){w.f=A}function b(w,A){var g;if(w.match(/^\\[a-zA-Z@]+/)){var u=w.current().slice(1);return g=I.hasOwnProperty(u)?I[u]:I.DEFAULT,g=new g,B(A,g),M(A,R),g.style}if(w.match(/^\\[$&%#{}_]/))return"tag";if(w.match(/^\\[,;!\/\\]/))return"tag";if(w.match("\\["))return M(A,function(l,s){return E(l,s,"\\]")}),"keyword";if(w.match("\\("))return M(A,function(l,s){return E(l,s,"\\)")}),"keyword";if(w.match("$$"))return M(A,function(l,s){return E(l,s,"$$")}),"keyword";if(w.match("$"))return M(A,function(l,s){return E(l,s,"$")}),"keyword";var a=w.next();if(a=="%")return w.skipToEnd(),"comment";if(a=="}"||a=="]"){if(g=C(A),g)g.closeBracket(a),M(A,R);else return"error";return"bracket"}else return a=="{"||a=="["?(g=I.DEFAULT,g=new g,B(A,g),"bracket"):/\d/.test(a)?(w.eatWhile(/[\w.%]/),"atom"):(w.eatWhile(/[\w\-_]/),g=U(A),g.name=="begin"&&(g.argument=w.current()),g.styleIdentifier())}function E(w,A,g){if(w.eatSpace())return null;if(g&&w.match(g))return M(A,b),"keyword";if(w.match(/^\\[a-zA-Z@]+/))return"tag";if(w.match(/^[a-zA-Z]+/))return"variable-2";if(w.match(/^\\[$&%#{}_]/))return"tag";if(w.match(/^\\[,;!\/]/))return"tag";if(w.match(/^[\^_&]/))return"tag";if(w.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(w.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var u=w.next();return u=="{"||u=="}"||u=="["||u=="]"||u=="("||u==")"?"bracket":u=="%"?(w.skipToEnd(),"comment"):"error"}function R(w,A){var g=w.peek(),u;return g=="{"||g=="["?(u=C(A),u.openBracket(g),w.eat(g),M(A,b),"bracket"):/[ \t\r]/.test(g)?(w.eat(g),null):(M(A,b),L(A),b(w,A))}return{startState:function(){var w=O.inMathMode?function(A,g){return E(A,g)}:b;return{cmdState:[],f:w}},copyState:function(w){return{cmdState:w.cmdState.slice(),f:w.f}},token:function(w,A){return A.f(w,A)},blankLine:function(w){w.f=b,w.cmdState.length=0},lineComment:"%"}}),$.defineMIME("text/x-stex","stex"),$.defineMIME("text/x-latex","stex")})},"/GNS":function(Be,Ie,G){Be.exports=G.p+"static/search1.c4136dd4.png"},"19Vz":function(Be,Ie,G){(function($){$(G("VrN/"))})(function($){$.defineOption("placeholder","",function(_,I,M){var b=M&&M!=$.Init;if(I&&!b)_.on("blur",C),_.on("change",L),_.on("swapDoc",L),$.on(_.getInputField(),"compositionupdate",_.state.placeholderCompose=function(){B(_)}),L(_);else if(!I&&b){_.off("blur",C),_.off("change",L),_.off("swapDoc",L),$.off(_.getInputField(),"compositionupdate",_.state.placeholderCompose),K(_);var E=_.getWrapperElement();E.className=E.className.replace(" CodeMirror-empty","")}I&&!_.hasFocus()&&C(_)});function K(_){_.state.placeholder&&(_.state.placeholder.parentNode.removeChild(_.state.placeholder),_.state.placeholder=null)}function O(_){K(_);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 M=_.getOption("placeholder");typeof M=="string"&&(M=document.createTextNode(M)),I.appendChild(M),_.display.lineSpace.insertBefore(I,_.display.lineSpace.firstChild)}function B(_){setTimeout(function(){var I=!1,M=_.getInputField();M.nodeName=="TEXTAREA"?I=!M.value:_.lineCount()==1&&(I=!/[^\u200b]/.test(M.querySelector(".CodeMirror-line").textContent)),I?O(_):K(_)},20)}function C(_){U(_)&&O(_)}function L(_){var I=_.getWrapperElement(),M=U(_);I.className=I.className.replace(" CodeMirror-empty","")+(M?" CodeMirror-empty":""),M?O(_):K(_)}function U(_){return _.lineCount()===1&&_.getLine(0)===""}})},"1eCo":function(Be,Ie,G){(function($){$(G("VrN/"))})(function($){"use strict";var K={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},O={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};$.defineMode("xml",function(B,C){var L=B.indentUnit,U={},_=C.htmlMode?K:O;for(var I in _)U[I]=_[I];for(var I in C)U[I]=C[I];var M,b;function E(o,x){function y(F){return x.tokenize=F,F(o,x)}var S=o.next();if(S=="<")return o.eat("!")?o.eat("[")?o.match("CDATA[")?y(A("atom","]]>")):null:o.match("--")?y(A("comment","-->")):o.match("DOCTYPE",!0,!0)?(o.eatWhile(/[\w\._\-]/),y(g(1))):null:o.eat("?")?(o.eatWhile(/[\w\._\-]/),x.tokenize=A("meta","?>"),"meta"):(M=o.eat("/")?"closeTag":"openTag",x.tokenize=R,"tag bracket");if(S=="&"){var P;return o.eat("#")?o.eat("x")?P=o.eatWhile(/[a-fA-F\d]/)&&o.eat(";"):P=o.eatWhile(/[\d]/)&&o.eat(";"):P=o.eatWhile(/[\w\.\-:]/)&&o.eat(";"),P?"atom":"error"}else return o.eatWhile(/[^&<]/),null}E.isInText=!0;function R(o,x){var y=o.next();if(y==">"||y=="/"&&o.eat(">"))return x.tokenize=E,M=y==">"?"endTag":"selfcloseTag","tag bracket";if(y=="=")return M="equals",null;if(y=="<"){x.tokenize=E,x.state=s,x.tagName=x.tagStart=null;var S=x.tokenize(o,x);return S?S+" tag error":"tag error"}else return/[\'\"]/.test(y)?(x.tokenize=w(y),x.stringStartCol=o.column(),x.tokenize(o,x)):(o.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function w(o){var x=function(y,S){for(;!y.eol();)if(y.next()==o){S.tokenize=R;break}return"string"};return x.isInAttribute=!0,x}function A(o,x){return function(y,S){for(;!y.eol();){if(y.match(x)){S.tokenize=E;break}y.next()}return o}}function g(o){return function(x,y){for(var S;(S=x.next())!=null;){if(S=="<")return y.tokenize=g(o+1),y.tokenize(x,y);if(S==">")if(o==1){y.tokenize=E;break}else return y.tokenize=g(o-1),y.tokenize(x,y)}return"meta"}}function u(o,x,y){this.prev=o.context,this.tagName=x,this.indent=o.indented,this.startOfLine=y,(U.doNotIndent.hasOwnProperty(x)||o.context&&o.context.noIndent)&&(this.noIndent=!0)}function a(o){o.context&&(o.context=o.context.prev)}function l(o,x){for(var y;;){if(!o.context)return;if(y=o.context.tagName,!U.contextGrabbers.hasOwnProperty(y)||!U.contextGrabbers[y].hasOwnProperty(x))return;a(o)}}function s(o,x,y){return o=="openTag"?(y.tagStart=x.column(),p):o=="closeTag"?d:s}function p(o,x,y){return o=="word"?(y.tagName=x.current(),b="tag",v):U.allowMissingTagName&&o=="endTag"?(b="tag bracket",v(o,x,y)):(b="error",p)}function d(o,x,y){if(o=="word"){var S=x.current();return y.context&&y.context.tagName!=S&&U.implicitlyClosed.hasOwnProperty(y.context.tagName)&&a(y),y.context&&y.context.tagName==S||U.matchClosing===!1?(b="tag",h):(b="tag error",D)}else return U.allowMissingTagName&&o=="endTag"?(b="tag bracket",h(o,x,y)):(b="error",D)}function h(o,x,y){return o!="endTag"?(b="error",h):(a(y),s)}function D(o,x,y){return b="error",h(o,x,y)}function v(o,x,y){if(o=="word")return b="attribute",f;if(o=="endTag"||o=="selfcloseTag"){var S=y.tagName,P=y.tagStart;return y.tagName=y.tagStart=null,o=="selfcloseTag"||U.autoSelfClosers.hasOwnProperty(S)?l(y,S):(l(y,S),y.context=new u(y,S,P==y.indented)),s}return b="error",v}function f(o,x,y){return o=="equals"?m:(U.allowMissing||(b="error"),v(o,x,y))}function m(o,x,y){return o=="string"?c:o=="word"&&U.allowUnquoted?(b="string",v):(b="error",v(o,x,y))}function c(o,x,y){return o=="string"?c:v(o,x,y)}return{startState:function(o){var x={tokenize:E,state:s,indented:o||0,tagName:null,tagStart:null,context:null};return o!=null&&(x.baseIndent=o),x},token:function(o,x){if(!x.tagName&&o.sol()&&(x.indented=o.indentation()),o.eatSpace())return null;M=null;var y=x.tokenize(o,x);return(y||M)&&y!="comment"&&(b=null,x.state=x.state(M||y,o,x),b&&(y=b=="error"?y+" error":b)),y},indent:function(o,x,y){var S=o.context;if(o.tokenize.isInAttribute)return o.tagStart==o.indented?o.stringStartCol+1:o.indented+L;if(S&&S.noIndent)return $.Pass;if(o.tokenize!=R&&o.tokenize!=E)return y?y.match(/^(\s*)/)[0].length:0;if(o.tagName)return U.multilineTagIndentPastTag!==!1?o.tagStart+o.tagName.length+2:o.tagStart+L*(U.multilineTagIndentFactor||1);if(U.alignCDATA&&/<!\[CDATA\[/.test(x))return 0;var P=x&&/^<(\/)?([\w_:\.-]*)/.exec(x);if(P&&P[1])for(;S;)if(S.tagName==P[2]){S=S.prev;break}else if(U.implicitlyClosed.hasOwnProperty(S.tagName))S=S.prev;else break;else if(P)for(;S;){var F=U.contextGrabbers[S.tagName];if(F&&F.hasOwnProperty(P[2]))S=S.prev;else break}for(;S&&S.prev&&!S.startOfLine;)S=S.prev;return S?S.indent+L:o.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:U.htmlMode?"html":"xml",helperType:U.htmlMode?"html":"xml",skipAttribute:function(o){o.state==m&&(o.state=v)},xmlCurrentTag:function(o){return o.tagName?{name:o.tagName,close:o.type=="closeTag"}:null},xmlCurrentContext:function(o){for(var x=[],y=o.context;y;y=y.prev)y.tagName&&x.push(y.tagName);return x.reverse()}}}),$.defineMIME("text/xml","xml"),$.defineMIME("application/xml","xml"),$.mimeModes.hasOwnProperty("text/html")||$.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"4qgm":function(Be,Ie){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB8imq/lvAWWHdWpOGySIqYEwvKk1mtsmtl5/M72WNk4Wf6dj8jIAqce1qGJEparsgSHQVoIar3M3GRadWnDp+rb5eyJi0RaykgCy47q9DS1srDUvLRzme+YFXhg5CY2YD4uf/RdVrROkffCGgk13vQTOrzdZZUKi8SmOCy1pMLUYfCDkfD7T+Cvl1PTckKNereENM1L6rFmaAc/PzRD3L6E9jlUabN+Swj2tfFB6o8Q7h0e/GQMPDcy9djBS7DjPJzthOJ+0lSPvzguyxonyz96E9mjwIpGHeGZ+lFYiEXMpP+ozQhcPgZmj7z95MUE1H8Ef7gIhnCszyXOPWqa5lWUDVcvsu3Mk5KrXsodEhUtOtNT6qwYj0allj2dXAIzvx+5CtvOwT9vQpEFVtTVMzuK8QJT1yY55HssbZ0sLd3N3LF+k47pZ70YcZS5WNj5UAsr0PS74cG+C/DLNrjpp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ur169dLWKVqYb7/IpVSjHB9IctSShzQWq9JQySMeyG/MI1ewhxYnqeYq2itnePYGPMmgO6iyAP4v5gTwBzl9Cta68RdnDHmWQAtz3WyOjRTTodZYSsRvZoRbLvWemeU7vDw8P2e532eETtSjZmf931/d31HtkguHdIWUw3oWmttm60NDQ1dVS6XZat6V8EOTMplitwpNJ5K7ALwQg5Da7XWszbnxphRAE/lwIxSnQnd5mMVGYWsZ///MvMK3/ePiFVjjFyADLSBvCyo0vuzj1VCo3J5kflgi5lPE9EKIprHzFIqtKO1PtiqWzLGyIb6oRyW5ZynBOCOHBhRqmNa61nHnhedjQZBcDsRycS7pg0E8kD+LZse3/d/agS5/I7XG0JpI4B9ebqsQN1NWuuWly2X7xVTvfestXfXarWDRHRTgT2aCMXMv3metzJp/5F4SymWhoaG5pfLZVlpL9k1a7VaVRs2bEi89HZyIOwu2b1tukQX3TL3OHGYsjw1GBwc7Oro6Kg7UthTA7mhn5yc3NfX1ycPQ5xbmhGYBSqPPYhINkMPAJDHHrJ4pWlTAOShx1FmvnSPPVoxbHxu43neAmauP7eRf2nTz2yI6FStViv0uc1/ndZCH8rgOooAAAAASUVORK5CYII="},"7Cbv":function(Be,Ie,G){"use strict";var $=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),K=new Uint8Array(16);function O(){if(!$)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $(K)}var B=/^(?:[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 C(R){return typeof R=="string"&&B.test(R)}for(var L=C,U=[],_=0;_<256;++_)U.push((_+256).toString(16).substr(1));function I(R){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,A=(U[R[w+0]]+U[R[w+1]]+U[R[w+2]]+U[R[w+3]]+"-"+U[R[w+4]]+U[R[w+5]]+"-"+U[R[w+6]]+U[R[w+7]]+"-"+U[R[w+8]]+U[R[w+9]]+"-"+U[R[w+10]]+U[R[w+11]]+U[R[w+12]]+U[R[w+13]]+U[R[w+14]]+U[R[w+15]]).toLowerCase();if(!L(A))throw TypeError("Stringified UUID is invalid");return A}var M=I;function b(R,w,A){R=R||{};var g=R.random||(R.rng||O)();if(g[6]=g[6]&15|64,g[8]=g[8]&63|128,w){A=A||0;for(var u=0;u<16;++u)w[A+u]=g[u];return w}return M(g)}var E=Ie.a=b},"7ZXX":function(Be,Ie,G){Be.exports=G.p+"static/err.6e7c5817.png"},"7ahc":function(Be,Ie,G){"use strict";G.d(Ie,"a",function(){return p});var $=G("k1fw"),K=G("0Owb"),O=G("+L6B"),B=G("2/Rp"),C=G("y8nQ"),L=G("Vl3Y"),U=G("tJVT"),_=G("OaEy"),I=G("2fM7"),M=G("cDcd"),b=G.n(M),E=G("VrN/"),R=G.n(E),w=G("p77/"),A=G.n(w),g=G("c5Ni"),u=G.n(g),a=I.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},s={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"]};Ie.b=function(d){var h=d.callback,D=d.onCancel,v=Object(M.useState)("python"),f=Object(U.a)(v,2),m=f[0],c=f[1];function o(y){c(s[y][1])}function x(y){h(y)}return b.a.createElement(L.a,Object(K.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:x}),b.a.createElement(L.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},b.a.createElement(I.a,{onChange:o},Object.keys(s).map(function(y){return b.a.createElement(a,{key:y,value:y},s[y][0])}))),b.a.createElement(L.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},b.a.createElement(p,{mode:m})),b.a.createElement("div",{className:"flex-container flex-end"},b.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),b.a.createElement(B.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function p(d){var h=d.value,D=d.onChange,v=d.mode,f=d.options,m=f===void 0?{}:f,c=Object(M.useRef)(),o=Object(M.useState)(),x=Object(U.a)(o,2),y=x[0],S=x[1];return Object(M.useEffect)(function(){if(y){function P(F){var H=F.getValue();D&&D(H)}return y.on("change",P),function(){y.off("change",P)}}},[y,D]),Object(M.useEffect)(function(){y&&y.setOption("mode",v)},[y,v]),Object(M.useEffect)(function(){y&&((h!==y.getValue()||h==="")&&setTimeout(function(){y.setValue(h||" ")},300))},[y,h]),Object(M.useEffect)(function(){if(c.current&&!y){var P=R.a.fromTextArea(c.current,Object($.a)({mode:v,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},m));S(P)}},[c.current,y]),b.a.createElement("div",{className:"my-codemirror-container"},b.a.createElement("textarea",{ref:c}))}},"7ixt":function(Be,Ie,G){"use strict";G.d(Ie,"a",function(){return O});var $={adjustX:1,adjustY:1},K=[0,0],O={left:{points:["cr","cl"],overflow:$,offset:[-4,0],targetOffset:K},right:{points:["cl","cr"],overflow:$,offset:[4,0],targetOffset:K},top:{points:["bc","tc"],overflow:$,offset:[0,-4],targetOffset:K},bottom:{points:["tc","bc"],overflow:$,offset:[0,4],targetOffset:K},topLeft:{points:["bl","tl"],overflow:$,offset:[0,-4],targetOffset:K},leftTop:{points:["tr","tl"],overflow:$,offset:[-4,0],targetOffset:K},topRight:{points:["br","tr"],overflow:$,offset:[0,-4],targetOffset:K},rightTop:{points:["tl","tr"],overflow:$,offset:[4,0],targetOffset:K},bottomRight:{points:["tr","br"],overflow:$,offset:[0,4],targetOffset:K},rightBottom:{points:["bl","br"],overflow:$,offset:[4,0],targetOffset:K},bottomLeft:{points:["tl","bl"],overflow:$,offset:[0,4],targetOffset:K},leftBottom:{points:["br","bl"],overflow:$,offset:[-4,0],targetOffset:K}},B=O},"7qnI":function(Be,Ie,G){"use strict";var $=G("5Dmo"),K=G("3S7+"),O=G("fWQN"),B=G("mtLc"),C=G("yKVA"),L=G("879j"),U=G("5NDa"),_=G("5rEg"),I=G("cDcd"),M=G.n(I),b=G("O2Wb"),E=G.n(b),R=_.a.TextArea,w=function(A){Object(C.a)(u,A);var g=Object(L.a)(u);function u(){return Object(O.a)(this,u),g.apply(this,arguments)}return Object(B.a)(u,[{key:"render",value:function(){var l=this,s=this.props,p=s.index,d=s.onAnswerChange,h=s.addChildAnswer,D=s.exerciseIsPublish,v=s.answers,f=s.activeOptionErrorIndex,m=s.flex,c=m===void 0?"0 0 1000px":m;return M.a.createElement("div",{className:E.a.flex},M.a.createElement("div",{className:"".concat(E.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",p+1,"):"),M.a.createElement("div",{className:"".concat(E.a.flex," ").concat(E.a.flex1),style:{flexDirection:"column"}},v.map(function(o,x){var y="".concat(p,"-").concat(x);return M.a.createElement("div",{className:"".concat(E.a.flex," ").concat(E.a.flex1),key:x},M.a.createElement("div",{className:E.a.flex1,style:{flex:c}},M.a.createElement("div",null,M.a.createElement(R,{className:y===f?E.a.error:"",spellCheck:!1,rows:4,value:o||"",defaultValue:"\u8BF7\u8F93\u5165\u53C2\u8003\u7B54\u6848".concat(x==0?"":"(\u53EF\u9009)"),onChange:function(P){return d(p,x,P.target.value)},style:{minHeight:95}}))),!D&&M.a.createElement(M.a.Fragment,null,x!=0&&M.a.createElement(K.a,{title:"\u5220\u9664"},M.a.createElement("i",{className:"".concat(E.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return l.props.deleteChildAnswer(p,x)},style:{float:"right"}})),x===0&&M.a.createElement(K.a,{title:"\u5220\u9664"},M.a.createElement("i",{className:"".concat(E.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return l.props.deleteChildAnswermain(p,x)},style:{float:"right"}})),M.a.createElement(K.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},M.a.createElement("i",{className:"".concat(E.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return h(p)},style:{float:"right",visibility:x==v.length-1?"":"hidden"}}))))})))}}]),u}(I.Component);Ie.a=w},"7v3h":function(Be,Ie,G){Be.exports=G.p+"static/empty2.dd73f390.png"},"8/bI":function(Be,Ie,G){Be.exports=G.p+"static/empty.8918e228.png"},"8EBN":function(Be,Ie,G){(function($){$(G("VrN/"))})(function($){"use strict";$.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 K=0;K<$.modeInfo.length;K++){var O=$.modeInfo[K];O.mimes&&(O.mime=O.mimes[0])}$.findModeByMIME=function(B){B=B.toLowerCase();for(var C=0;C<$.modeInfo.length;C++){var L=$.modeInfo[C];if(L.mime==B)return L;if(L.mimes){for(var U=0;U<L.mimes.length;U++)if(L.mimes[U]==B)return L}}if(/\+xml$/.test(B))return $.findModeByMIME("application/xml");if(/\+json$/.test(B))return $.findModeByMIME("application/json")},$.findModeByExtension=function(B){B=B.toLowerCase();for(var C=0;C<$.modeInfo.length;C++){var L=$.modeInfo[C];if(L.ext){for(var U=0;U<L.ext.length;U++)if(L.ext[U]==B)return L}}},$.findModeByFileName=function(B){for(var C=0;C<$.modeInfo.length;C++){var L=$.modeInfo[C];if(L.file&&L.file.test(B))return L}var U=B.lastIndexOf("."),_=U>-1&&B.substring(U+1,B.length);if(_)return $.findModeByExtension(_)},$.findModeByName=function(B){B=B.toLowerCase();for(var C=0;C<$.modeInfo.length;C++){var L=$.modeInfo[C];if(L.name.toLowerCase()==B)return L;if(L.alias){for(var U=0;U<L.alias.length;U++)if(L.alias[U].toLowerCase()==B)return L}}}})},"8hTe":function(Be,Ie,G){Be.exports={button:"button___1wy9m"}},"9Bee":function(Be,Ie,G){"use strict";var $=G("DYRE"),K=G("zeV3"),O=G("+L6B"),B=G("2/Rp"),C=G("k1fw"),L=G("tJVT"),U=G("cDcd"),_=G.n(U),I=G("vg9a"),M=G("DlQD"),b=G.n(M),E=G("rUJ1");function R(De,Ce){var we=De.match(/^(\s+)(?:```)/);if(we===null)return Ce;var fe=we[1];return Ce.split(`
|
|
`).map(function(he){var _e=he.match(/^\s+/);if(_e===null)return he;var at=Object(L.a)(_e,1),et=at[0];return et.length>=fe.length?he.slice(fe.length):he}).join(`
|
|
`)}var w=[],A=["<ul>"],g=new b.a.Renderer,u=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function a(){w.length=0,A=["<ul>"]}var l={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function s(De,Ce,we,fe){if(Ce>=De.length||De[Ce].level<=we)return Ce;var he=De[Ce];fe.push("<li><a href='#"+he.anchor+"'>"+he.text+"</a>"),Ce++;var _e=[];return Ce=s(De,Ce,he.level,_e),_e.length>0&&(fe.push("<ul>"),_e.forEach(function(at){fe.push(at)}),fe.push("</ul>")),fe.push("</li>"),Ce=s(De,Ce,we,fe),Ce}function p(){return s(w,0,0,A),A.push("</ul>"),A.join("")}var d={heading:function(Ce){var we=u.exec(Ce);if(we)return{type:"heading",raw:we[0],depth:we[1].length,text:we[2]}},fences:function(Ce){var we=this.rules.block.fences.exec(Ce);if(we){var fe=we[0],he=R(fe,we[3]||""),_e=we[2]?we[2].trim():we[2];if(["latex","katex","math"].indexOf(_e)>=0){var at=v(),et=he;he=at,f[at]={type:"block",expression:et}}return{type:"code",raw:fe,lang:_e,text:he}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,D=0,v=function(){return"__special_katext_id_".concat(D++,"__")},f={};function m(){return f}function c(){D=0,f={}}function o(De){return De=De.replace(h,function(Ce,we){var fe=v();return f[fe]={type:"inline",expression:we},fe}),De}var x=g.listitem;g.listitem=function(De){return x(o(De))};var y=g.paragraph;g.paragraph=function(De){return y(o(De))};var S=g.tablecell;g.tablecell=function(De,Ce){return S(o(De),Ce)},g.code=function(De,Ce,we){var fe=(Ce||"").match(/\S*/)[0];return fe?["latex","katex","math"].indexOf(fe)>=0?"<p class='editormd-tex'>".concat(De,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(Ce,'">').concat(we?De:Object(E.escape)(De,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(we?De:Object(E.escape)(De,!0))+"</code></pre>"},g.heading=function(De,Ce,we){var fe=this.options.headerPrefix+we.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return w.push({anchor:fe,level:Ce,text:De}),"<h"+Ce+' id="'+fe+'">'+De+"</h"+Ce+">"},b.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),b.a.use({tokenizer:d,renderer:g});var P=b.a,F=G("SJMd"),H=G("ulZh"),Y=G.n(H),j=G("m3rI"),N=G("Oy/b"),Z=G("p5ED"),ne=G("8hTe"),pe=G.n(ne),xe=/<pre[^>]*>/g;function je(De){var Ce=document.createElement("div");return Ce.innerHTML=De,Ce.childNodes.length===0?"":Ce.childNodes[0].nodeValue}var Le=Ie.a=function(De){var Ce=De.value,we=Ce===void 0?"":Ce,fe=De.edit,he=fe===void 0?!1:fe,_e=De.className,at=De.showTextOnly,et=De.showLines,it=De.replaces,gt=De.zoomImg,He=De.hasMask,Ne=De.style,Ze=Ne===void 0?{}:Ne,ut=De.stylesPrev,dt=ut===void 0?{}:ut,ze=String(we),Ge=Object(U.useRef)(),yt=Object(U.useRef)(),vt=Object(U.useState)(""),mt=Object(L.a)(vt,2),qe=mt[0],lt=mt[1],st=Object(U.useState)("office"),Fe=Object(L.a)(st,2),Me=Fe[0],ot=Fe[1],Ke=Object(U.useMemo)(function(){try{var de=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,J=/\"\/api\/attachments\/|\"\/attachments\/download\//g,q=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ze=ze.replace(de,"("+j.a.API_SERVER+"/api/attachments/").replace(J,'"'+j.a.API_SERVER+"/api/attachments/").replace(q,'"'+j.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(Re){}var te=P(ze),ie=m();if(ze.match(/\[TOC\]/)&&(te=te.replace("<p>[TOC]</p>",p()),a()),te=te.replace(/(__special_katext_id_\d+__)/g,function(Re,Pe){var tt=ie[Pe],Et=tt.type,bt=tt.expression;return Object(N.renderToString)(je(bt)||"",{displayMode:Et==="block",throwOnError:!1,output:"html"})}),te=te.replace(/▁/g,"\u2581\u2581\u2581"),c(),at){var me=document.createElement("div");return me.innerHTML=te,me.innerText}return setTimeout(function(){return ve()},500),te},[ze]),Oe=Object(U.useRef)();l.WebkitLineClamp=et,et&&(Ze=Object(C.a)(Object(C.a)({},Ze),l));function We(de){var J=de.target;if(J.tagName.toUpperCase()==="IMG"){if(gt){var q=J.getAttribute("src");lt(q),ot("image")}}else if(J.tagName.toUpperCase()==="A"){var te=J.getAttribute("href");if(te.indexOf("office")>-1)de.preventDefault(),lt(te),ot("office");else if(te.indexOf("application/pdf")>-1)de.preventDefault(),lt(te),ot("pdf");else if(te.indexOf("text/html")>-1)de.preventDefault(),lt(te),ot("html");else if(te.startsWith("#")){de.preventDefault();var ie=document.getElementById(te.replace("#",""));ie&&ie.scrollIntoView(!0)}}}var ve=function(){var J,q=(J=Oe.current)===null||J===void 0?void 0:J.querySelectorAll("video");q==null||q.forEach(function(te){if(te.oncontextmenu=function(){return!1},te.src.indexOf(".m3u8")>-1&&!te.canPlayType("application/vnd.apple.mpegurl")){if(Y.a.isSupported()){var ie=new Y.a;ie.loadSource(te.src),ie.attachMedia(te)}}})};Object(U.useEffect)(function(){if(Oe.current&&Ke&&(Ke.match(xe)&&window.PR.prettyPrint()),Oe.current)return Oe.current.addEventListener("click",We),function(){Oe.current.removeEventListener("click",We),c(),a()}},[Ke,Oe.current,We]);var le=function(J){if(!he)return;J.target.nodeName==="IMG"?(Ge.current.style.display="flex",Ge.current.style.width=J.target.clientWidth+"px",Ge.current.style.height=J.target.clientHeight+"px",Ge.current.style.top=J.target.offsetTop+"px",Ge.current.style.left=J.target.offsetLeft+"px",yt.current.src=J.target.getAttribute("src")):Ge.current.style.display="none"};return _.a.createElement("div",{style:{position:"relative"}},_.a.createElement("div",{ref:Oe,style:Object(C.a)({},Ze),className:"".concat(_e||""," markdown-body ").concat(pe.a.mdBody),onMouseOver:le,dangerouslySetInnerHTML:{__html:Ke}}),_.a.createElement("div",{ref:Ge,className:pe.a.button},_.a.createElement(K.a,null,_.a.createElement(B.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),_.a.createElement(B.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),_.a.createElement("img",{ref:yt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),_.a.createElement(Z.a,{close:!0,data:qe,type:qe!=null&&qe.length?Me:"",style:Object(C.a)({},dt),onClose:function(){return lt("")}}))}},"9VGf":function(Be,Ie,G){"use strict";G.d(Ie,"a",function(){return O});var $=G("cDcd"),K=G.n($);function O(B,C){var L=Object($.useRef)();Object($.useEffect)(function(){L.current=B}),Object($.useEffect)(function(){function U(){L.current()}if(C!==null){var _=setInterval(U,C);return function(){return clearInterval(_)}}},[C])}},"9ZNV":function(Be,Ie,G){"use strict";G.d(Ie,"a",function(){return M});var $=G("0Owb"),K=G("+L6B"),O=G("2/Rp"),B=G("cDcd"),C=G.n(B),L=G("UUDw"),U=G.n(L),_=G("TSYQ"),I=G.n(_),M=function(E){var R=E.cancelText,w=R===void 0?"\u53D6\u6D88":R,A=E.okText,g=A===void 0?"\u786E\u5B9A":A,u=E.loading,a=u===void 0?!1:u,l=E.hasOkBtn,s=l===void 0?!0:l,p=E.okButtonProps,d=p===void 0?{}:p,h=E.onCancel,D=h===void 0?function(){}:h,v=E.onOk,f=v===void 0?function(){}:v,m=E.className,c=m===void 0?"":m;return C.a.createElement("div",{className:I()(U.a.buttonFixed,c)},C.a.createElement("div",{className:U.a.buttonWrap},C.a.createElement(O.a,{size:"large",className:"".concat(U.a.button," mr20"),onClick:D},w),s&&C.a.createElement(O.a,Object($.a)({size:"large",type:"primary",className:"".concat(U.a.button," mr20"),loading:a,onClick:f},d),g)))}},"A/g1":function(Be,Ie){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMj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HCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},Bd2K:function(Be,Ie,G){(function($){$(G("VrN/"),G("osHv"))})(function($){$.defineOption("autoCloseTags",!1,function(I,M,b){if(b!=$.Init&&b&&I.removeKeyMap("autoCloseTags"),!M)return;var E={name:"autoCloseTags"};(typeof M!="object"||M.whenClosing!==!1)&&(E["'/'"]=function(R){return L(R)}),(typeof M!="object"||M.whenOpening!==!1)&&(E["'>'"]=function(R){return B(R)}),I.addKeyMap(E)});var K=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],O=["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 B(I){if(I.getOption("disableInput"))return $.Pass;for(var M=I.listSelections(),b=[],E=I.getOption("autoCloseTags"),R=0;R<M.length;R++){if(!M[R].empty())return $.Pass;var w=M[R].head,A=I.getTokenAt(w),g=$.innerMode(I.getMode(),A.state),u=g.state,a=g.mode.xmlCurrentTag&&g.mode.xmlCurrentTag(u),l=a&&a.name;if(!l)return $.Pass;var s=g.mode.configuration=="html",p=typeof E=="object"&&E.dontCloseTags||s&&K,d=typeof E=="object"&&E.indentTags||s&&O;A.end>w.ch&&(l=l.slice(0,l.length-A.end+w.ch));var h=l.toLowerCase();if(!l||A.type=="string"&&(A.end!=w.ch||!/[\"\']/.test(A.string.charAt(A.string.length-1))||A.string.length==1)||A.type=="tag"&&a.close||A.string.indexOf("/")==w.ch-A.start-1||p&&U(p,h)>-1||_(I,g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(u)||[],l,w,!0))return $.Pass;var D=typeof E=="object"&&E.emptyTags;if(D&&U(D,l)>-1){b[R]={text:"/>",newPos:$.Pos(w.line,w.ch+2)};continue}var v=d&&U(d,h)>-1;b[R]={indent:v,text:">"+(v?`
|
|
|
|
`:"")+"</"+l+">",newPos:v?$.Pos(w.line+1,0):$.Pos(w.line,w.ch+1)}}for(var f=typeof E=="object"&&E.dontIndentOnAutoClose,R=M.length-1;R>=0;R--){var m=b[R];I.replaceRange(m.text,M[R].head,M[R].anchor,"+insert");var c=I.listSelections().slice(0);c[R]={head:m.newPos,anchor:m.newPos},I.setSelections(c),!f&&m.indent&&(I.indentLine(m.newPos.line,null,!0),I.indentLine(m.newPos.line+1,null,!0))}}function C(I,M){for(var b=I.listSelections(),E=[],R=M?"/":"</",w=I.getOption("autoCloseTags"),A=typeof w=="object"&&w.dontIndentOnSlash,g=0;g<b.length;g++){if(!b[g].empty())return $.Pass;var u=b[g].head,a=I.getTokenAt(u),l=$.innerMode(I.getMode(),a.state),s=l.state;if(M&&(a.type=="string"||a.string.charAt(0)!="<"||a.start!=u.ch-1))return $.Pass;var p,d=l.mode.name!="xml"&&I.getMode().name=="htmlmixed";if(d&&l.mode.name=="javascript")p=R+"script";else if(d&&l.mode.name=="css")p=R+"style";else{var h=l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(s);if(!h||h.length&&_(I,h,h[h.length-1],u))return $.Pass;p=R+h[h.length-1]}I.getLine(u.line).charAt(a.end)!=">"&&(p+=">"),E[g]=p}if(I.replaceSelections(E),b=I.listSelections(),!A)for(var g=0;g<b.length;g++)(g==b.length-1||b[g].head.line<b[g+1].head.line)&&I.indentLine(b[g].head.line)}function L(I){return I.getOption("disableInput")?$.Pass:C(I,!0)}$.commands.closeTag=function(I){return C(I)};function U(I,M){if(I.indexOf)return I.indexOf(M);for(var b=0,E=I.length;b<E;++b)if(I[b]==M)return b;return-1}function _(I,M,b,E,R){if(!$.scanForClosingTag)return!1;var w=Math.min(I.lastLine()+1,E.line+500),A=$.scanForClosingTag(I,E,null,w);if(!A||A.tag!=b)return!1;for(var g=R?1:0,u=M.length-1;u>=0&&M[u]==b;u--)++g;E=A.to;for(var u=1;u<g;u++){var a=$.scanForClosingTag(I,E,null,w);if(!a||a.tag!=b)return!1;E=a.to}return!0}})},BjJ7:function(Be,Ie,G){"use strict";G.d(Ie,"d",function(){return K}),G.d(Ie,"c",function(){return O}),G.d(Ie,"e",function(){return B}),G.d(Ie,"b",function(){return C}),G.d(Ie,"a",function(){return U});var $=G("m3rI");function K(_){var I=!0;if(_.length>0){for(var M=0;M<_.length;M++)if(_[M].compile_success==0||!_[M].compile_success){I=!1;break}}else I=!1;return I}function O(_){for(var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",M=[],b=0;b<_.length;b++){var E=_[b],R=I?"".concat(I,"/").concat(E.name):"".concat(E.name);M.push({title:E.name,isLeaf:!(E.type==="tree"),key:R})}return M}function B(_,I,M){for(var b=0;b<_.length;b++){var E=_[b];if(E.key===I){E.children=M;break}E.children&&B(E.children,I,M)}return _}function C(_,I,M){var b;return function(){var E=this,R=arguments,w=function(){b=null,M||_.apply(E,R)},A=M&&!b;clearTimeout(b),b=setTimeout(w,I),A&&_.apply(E,R)}}var L=!0,U=$.a.API_SERVER},"C+DQ":function(Be,Ie,G){},DlQD:function(Be,Ie,G){(function($,K){Be.exports=K()})(this,function(){"use strict";function $(ve,le){for(var de=0;de<le.length;de++){var J=le[de];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(ve,J.key,J)}}function K(ve,le,de){return le&&$(ve.prototype,le),de&&$(ve,de),ve}function O(ve,le){if(!ve)return;if(typeof ve=="string")return B(ve,le);var de=Object.prototype.toString.call(ve).slice(8,-1);if(de==="Object"&&ve.constructor&&(de=ve.constructor.name),de==="Map"||de==="Set")return Array.from(ve);if(de==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(de))return B(ve,le)}function B(ve,le){(le==null||le>ve.length)&&(le=ve.length);for(var de=0,J=new Array(le);de<le;de++)J[de]=ve[de];return J}function C(ve,le){var de;if(typeof Symbol=="undefined"||ve[Symbol.iterator]==null){if(Array.isArray(ve)||(de=O(ve))||le&&ve&&typeof ve.length=="number"){de&&(ve=de);var J=0;return function(){return J>=ve.length?{done:!0}:{done:!1,value:ve[J++]}}}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 de=ve[Symbol.iterator](),de.next.bind(de)}function L(ve,le){return le={exports:{}},ve(le,le.exports),le.exports}var U=L(function(ve){function le(){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 de(J){ve.exports.defaults=J}ve.exports={defaults:le(),getDefaults:le,changeDefaults:de}}),_=U.defaults,I=U.getDefaults,M=U.changeDefaults,b=/[&<>"']/,E=/[&<>"']/g,R=/[<>"']|&(?!#?\w+;)/,w=/[<>"']|&(?!#?\w+;)/g,A={"&":"&","<":"<",">":">",'"':""","'":"'"},g=function(le){return A[le]};function u(ve,le){if(le){if(b.test(ve))return ve.replace(E,g)}else if(R.test(ve))return ve.replace(w,g);return ve}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(ve){return ve.replace(a,function(le,de){return de=de.toLowerCase(),de==="colon"?":":de.charAt(0)==="#"?de.charAt(1)==="x"?String.fromCharCode(parseInt(de.substring(2),16)):String.fromCharCode(+de.substring(1)):""})}var s=/(^|[^\[])\^/g;function p(ve,le){ve=ve.source||ve,le=le||"";var de={replace:function(q,te){return te=te.source||te,te=te.replace(s,"$1"),ve=ve.replace(q,te),de},getRegex:function(){return new RegExp(ve,le)}};return de}var d=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(ve,le,de){if(ve){var J;try{J=decodeURIComponent(l(de)).replace(d,"").toLowerCase()}catch(q){return null}if(J.indexOf("javascript:")===0||J.indexOf("vbscript:")===0||J.indexOf("data:")===0)return null}le&&!h.test(de)&&(de=o(le,de));try{de=encodeURI(de).replace(/%25/g,"%")}catch(q){return null}return de}var v={},f=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,c=/^([^:]+:\/*[^/]*)[\s\S]*$/;function o(ve,le){v[" "+ve]||(f.test(ve)?v[" "+ve]=ve+"/":v[" "+ve]=P(ve,"/",!0)),ve=v[" "+ve];var de=ve.indexOf(":")===-1;return le.substring(0,2)==="//"?de?le:ve.replace(m,"$1")+le:le.charAt(0)==="/"?de?le:ve.replace(c,"$1")+le:ve+le}var x={exec:function(){}};function y(ve){for(var le=1,de,J;le<arguments.length;le++){de=arguments[le];for(J in de)Object.prototype.hasOwnProperty.call(de,J)&&(ve[J]=de[J])}return ve}function S(ve,le){var de=ve.replace(/\|/g,function(te,ie,me){for(var Re=!1,Pe=ie;--Pe>=0&&me[Pe]==="\\";)Re=!Re;return Re?"|":" |"}),J=de.split(/ \|/),q=0;if(J.length>le)J.splice(le);else for(;J.length<le;)J.push("");for(;q<J.length;q++)J[q]=J[q].trim().replace(/\\\|/g,"|");return J}function P(ve,le,de){var J=ve.length;if(J===0)return"";for(var q=0;q<J;){var te=ve.charAt(J-q-1);if(te===le&&!de)q++;else if(te!==le&&de)q++;else break}return ve.substr(0,J-q)}function F(ve,le){if(ve.indexOf(le[1])===-1)return-1;for(var de=ve.length,J=0,q=0;q<de;q++)if(ve[q]==="\\")q++;else if(ve[q]===le[0])J++;else if(ve[q]===le[1]&&(J--,J<0))return q;return-1}function H(ve){ve&&ve.sanitize&&!ve.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 Y={escape:u,unescape:l,edit:p,cleanUrl:D,resolveUrl:o,noopTest:x,merge:y,splitCells:S,rtrim:P,findClosingBracket:F,checkSanitizeDeprecation:H},j=U.defaults,N=Y.rtrim,Z=Y.splitCells,ne=Y.escape,pe=Y.findClosingBracket;function xe(ve,le,de){var J=le.href,q=le.title?ne(le.title):null,te=ve[1].replace(/\\([\[\]])/g,"$1");return ve[0].charAt(0)!=="!"?{type:"link",raw:de,href:J,title:q,text:te}:{type:"image",raw:de,href:J,title:q,text:ne(te)}}function je(ve,le){var de=ve.match(/^(\s+)(?:```)/);if(de===null)return le;var J=de[1];return le.split(`
|
|
`).map(function(q){var te=q.match(/^\s+/);if(te===null)return q;var ie=te[0];return ie.length>=J.length?q.slice(J.length):q}).join(`
|
|
`)}var Le=function(){function ve(de){this.options=de||j}var le=ve.prototype;return le.space=function(J){var q=this.rules.block.newline.exec(J);if(q)return q[0].length>1?{type:"space",raw:q[0]}:{raw:`
|
|
`}},le.code=function(J,q){var te=this.rules.block.code.exec(J);if(te){var ie=q[q.length-1];if(ie&&ie.type==="paragraph")return{raw:te[0],text:te[0].trimRight()};var me=te[0].replace(/^ {4}/gm,"");return{type:"code",raw:te[0],codeBlockStyle:"indented",text:this.options.pedantic?me:N(me,`
|
|
`)}}},le.fences=function(J){var q=this.rules.block.fences.exec(J);if(q){var te=q[0],ie=je(te,q[3]||"");return{type:"code",raw:te,lang:q[2]?q[2].trim():q[2],text:ie}}},le.heading=function(J){var q=this.rules.block.heading.exec(J);if(q)return{type:"heading",raw:q[0],depth:q[1].length,text:q[2]}},le.nptable=function(J){var q=this.rules.block.nptable.exec(J);if(q){var te={type:"table",header:Z(q[1].replace(/^ *| *\| *$/g,"")),align:q[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:q[3]?q[3].replace(/\n$/,"").split(`
|
|
`):[],raw:q[0]};if(te.header.length===te.align.length){var ie=te.align.length,me;for(me=0;me<ie;me++)/^ *-+: *$/.test(te.align[me])?te.align[me]="right":/^ *:-+: *$/.test(te.align[me])?te.align[me]="center":/^ *:-+ *$/.test(te.align[me])?te.align[me]="left":te.align[me]=null;for(ie=te.cells.length,me=0;me<ie;me++)te.cells[me]=Z(te.cells[me],te.header.length);return te}}},le.hr=function(J){var q=this.rules.block.hr.exec(J);if(q)return{type:"hr",raw:q[0]}},le.blockquote=function(J){var q=this.rules.block.blockquote.exec(J);if(q){var te=q[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:q[0],text:te}}},le.list=function(J){var q=this.rules.block.list.exec(J);if(q){for(var te=q[0],ie=q[2],me=ie.length>1,Re=ie[ie.length-1]===")",Pe={type:"list",raw:te,ordered:me,start:me?+ie.slice(0,-1):"",loose:!1,items:[]},tt=q[0].match(this.rules.block.item),Et=!1,bt,Ht,St,rt,Ft,Ot,Wt,Zt=tt.length,pt=0;pt<Zt;pt++)bt=tt[pt],te=bt,Ht=bt.length,bt=bt.replace(/^ *([*+-]|\d+[.)]) */,""),~bt.indexOf(`
|
|
`)&&(Ht-=bt.length,bt=this.options.pedantic?bt.replace(/^ {1,4}/gm,""):bt.replace(new RegExp("^ {1,"+Ht+"}","gm"),"")),pt!==Zt-1&&(St=this.rules.block.bullet.exec(tt[pt+1])[0],(me?St.length===1||!Re&&St[St.length-1]===")":St.length>1||this.options.smartLists&&St!==ie)&&(rt=tt.slice(pt+1).join(`
|
|
`),Pe.raw=Pe.raw.substring(0,Pe.raw.length-rt.length),pt=Zt-1)),Ft=Et||/\n\n(?!\s*$)/.test(bt),pt!==Zt-1&&(Et=bt.charAt(bt.length-1)===`
|
|
`,Ft||(Ft=Et)),Ft&&(Pe.loose=!0),Ot=/^\[[ xX]\] /.test(bt),Wt=void 0,Ot&&(Wt=bt[1]!==" ",bt=bt.replace(/^\[[ xX]\] +/,"")),Pe.items.push({type:"list_item",raw:te,task:Ot,checked:Wt,loose:Ft,text:bt});return Pe}},le.html=function(J){var q=this.rules.block.html.exec(J);if(q)return{type:this.options.sanitize?"paragraph":"html",raw:q[0],pre:!this.options.sanitizer&&(q[1]==="pre"||q[1]==="script"||q[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(q[0]):ne(q[0]):q[0]}},le.def=function(J){var q=this.rules.block.def.exec(J);if(q){q[3]&&(q[3]=q[3].substring(1,q[3].length-1));var te=q[1].toLowerCase().replace(/\s+/g," ");return{tag:te,raw:q[0],href:q[2],title:q[3]}}},le.table=function(J){var q=this.rules.block.table.exec(J);if(q){var te={type:"table",header:Z(q[1].replace(/^ *| *\| *$/g,"")),align:q[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:q[3]?q[3].replace(/\n$/,"").split(`
|
|
`):[]};if(te.header.length===te.align.length){te.raw=q[0];var ie=te.align.length,me;for(me=0;me<ie;me++)/^ *-+: *$/.test(te.align[me])?te.align[me]="right":/^ *:-+: *$/.test(te.align[me])?te.align[me]="center":/^ *:-+ *$/.test(te.align[me])?te.align[me]="left":te.align[me]=null;for(ie=te.cells.length,me=0;me<ie;me++)te.cells[me]=Z(te.cells[me].replace(/^ *\| *| *\| *$/g,""),te.header.length);return te}}},le.lheading=function(J){var q=this.rules.block.lheading.exec(J);if(q)return{type:"heading",raw:q[0],depth:q[2].charAt(0)==="="?1:2,text:q[1]}},le.paragraph=function(J){var q=this.rules.block.paragraph.exec(J);if(q)return{type:"paragraph",raw:q[0],text:q[1].charAt(q[1].length-1)===`
|
|
`?q[1].slice(0,-1):q[1]}},le.text=function(J,q){var te=this.rules.block.text.exec(J);if(te){var ie=q[q.length-1];return ie&&ie.type==="text"?{raw:te[0],text:te[0]}:{type:"text",raw:te[0],text:te[0]}}},le.escape=function(J){var q=this.rules.inline.escape.exec(J);if(q)return{type:"escape",raw:q[0],text:ne(q[1])}},le.tag=function(J,q,te){var ie=this.rules.inline.tag.exec(J);if(ie)return!q&&/^<a /i.test(ie[0])?q=!0:q&&/^<\/a>/i.test(ie[0])&&(q=!1),!te&&/^<(pre|code|kbd|script)(\s|>)/i.test(ie[0])?te=!0:te&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ie[0])&&(te=!1),{type:this.options.sanitize?"text":"html",raw:ie[0],inLink:q,inRawBlock:te,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ie[0]):ne(ie[0]):ie[0]}},le.link=function(J){var q=this.rules.inline.link.exec(J);if(q){var te=pe(q[2],"()");if(te>-1){var ie=q[0].indexOf("!")===0?5:4,me=ie+q[1].length+te;q[2]=q[2].substring(0,te),q[0]=q[0].substring(0,me).trim(),q[3]=""}var Re=q[2],Pe="";if(this.options.pedantic){var tt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Re);tt?(Re=tt[1],Pe=tt[3]):Pe=""}else Pe=q[3]?q[3].slice(1,-1):"";Re=Re.trim().replace(/^<([\s\S]*)>$/,"$1");var Et=xe(q,{href:Re&&Re.replace(this.rules.inline._escapes,"$1"),title:Pe&&Pe.replace(this.rules.inline._escapes,"$1")},q[0]);return Et}},le.reflink=function(J,q){var te;if((te=this.rules.inline.reflink.exec(J))||(te=this.rules.inline.nolink.exec(J))){var ie=(te[2]||te[1]).replace(/\s+/g," ");if(ie=q[ie.toLowerCase()],!ie||!ie.href){var me=te[0].charAt(0);return{type:"text",raw:me,text:me}}var Re=xe(te,ie,te[0]);return Re}},le.strong=function(J,q,te){te===void 0&&(te="");var ie=this.rules.inline.strong.start.exec(J);if(ie&&(!ie[1]||ie[1]&&(te===""||this.rules.inline.punctuation.exec(te)))){q=q.slice(-1*J.length);var me=ie[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;me.lastIndex=0;for(var Re;(ie=me.exec(q))!=null;)if(Re=this.rules.inline.strong.middle.exec(q.slice(0,ie.index+3)),Re)return{type:"strong",raw:J.slice(0,Re[0].length),text:J.slice(2,Re[0].length-2)}}},le.em=function(J,q,te){te===void 0&&(te="");var ie=this.rules.inline.em.start.exec(J);if(ie&&(!ie[1]||ie[1]&&(te===""||this.rules.inline.punctuation.exec(te)))){q=q.slice(-1*J.length);var me=ie[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;me.lastIndex=0;for(var Re;(ie=me.exec(q))!=null;)if(Re=this.rules.inline.em.middle.exec(q.slice(0,ie.index+2)),Re)return{type:"em",raw:J.slice(0,Re[0].length),text:J.slice(1,Re[0].length-1)}}},le.codespan=function(J){var q=this.rules.inline.code.exec(J);if(q){var te=q[2].replace(/\n/g," "),ie=/[^ ]/.test(te),me=te.startsWith(" ")&&te.endsWith(" ");return ie&&me&&(te=te.substring(1,te.length-1)),te=ne(te,!0),{type:"codespan",raw:q[0],text:te}}},le.br=function(J){var q=this.rules.inline.br.exec(J);if(q)return{type:"br",raw:q[0]}},le.del=function(J){var q=this.rules.inline.del.exec(J);if(q)return{type:"del",raw:q[0],text:q[1]}},le.autolink=function(J,q){var te=this.rules.inline.autolink.exec(J);if(te){var ie,me;return te[2]==="@"?(ie=ne(this.options.mangle?q(te[1]):te[1]),me="mailto:"+ie):(ie=ne(te[1]),me=ie),{type:"link",raw:te[0],text:ie,href:me,tokens:[{type:"text",raw:ie,text:ie}]}}},le.url=function(J,q){var te;if(te=this.rules.inline.url.exec(J)){var ie,me;if(te[2]==="@")ie=ne(this.options.mangle?q(te[0]):te[0]),me="mailto:"+ie;else{var Re;do Re=te[0],te[0]=this.rules.inline._backpedal.exec(te[0])[0];while(Re!==te[0]);ie=ne(te[0]),te[1]==="www."?me="http://"+ie:me=ie}return{type:"link",raw:te[0],text:ie,href:me,tokens:[{type:"text",raw:ie,text:ie}]}}},le.inlineText=function(J,q,te){var ie=this.rules.inline.text.exec(J);if(ie){var me;return q?me=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ie[0]):ne(ie[0]):ie[0]:me=ne(this.options.smartypants?te(ie[0]):ie[0]),{type:"text",raw:ie[0],text:me}}},ve}(),De=Y.noopTest,Ce=Y.edit,we=Y.merge,fe={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:De,table:De,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};fe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,fe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,fe.def=Ce(fe.def).replace("label",fe._label).replace("title",fe._title).getRegex(),fe.bullet=/(?:[*+-]|\d{1,9}[.)])/,fe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,fe.item=Ce(fe.item,"gm").replace(/bull/g,fe.bullet).getRegex(),fe.list=Ce(fe.list).replace(/bull/g,fe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+fe.def.source+")").getRegex(),fe._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",fe._comment=/<!--(?!-?>)[\s\S]*?-->/,fe.html=Ce(fe.html,"i").replace("comment",fe._comment).replace("tag",fe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fe.paragraph=Ce(fe._paragraph).replace("hr",fe.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",fe._tag).getRegex(),fe.blockquote=Ce(fe.blockquote).replace("paragraph",fe.paragraph).getRegex(),fe.normal=we({},fe),fe.gfm=we({},fe.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*|$)"}),fe.gfm.nptable=Ce(fe.gfm.nptable).replace("hr",fe.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",fe._tag).getRegex(),fe.gfm.table=Ce(fe.gfm.table).replace("hr",fe.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",fe._tag).getRegex(),fe.pedantic=we({},fe.normal,{html:Ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fe._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:De,paragraph:Ce(fe.normal._paragraph).replace("hr",fe.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",fe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var he={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:De,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:De,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};he._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",he.punctuation=Ce(he.punctuation).replace(/punctuation/g,he._punctuation).getRegex(),he._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",he._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",he.em.start=Ce(he.em.start).replace(/punctuation/g,he._punctuation).getRegex(),he.em.middle=Ce(he.em.middle).replace(/punctuation/g,he._punctuation).replace(/overlapSkip/g,he._overlapSkip).getRegex(),he.em.endAst=Ce(he.em.endAst,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.em.endUnd=Ce(he.em.endUnd,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.strong.start=Ce(he.strong.start).replace(/punctuation/g,he._punctuation).getRegex(),he.strong.middle=Ce(he.strong.middle).replace(/punctuation/g,he._punctuation).replace(/blockSkip/g,he._blockSkip).getRegex(),he.strong.endAst=Ce(he.strong.endAst,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.strong.endUnd=Ce(he.strong.endUnd,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.blockSkip=Ce(he._blockSkip,"g").getRegex(),he.overlapSkip=Ce(he._overlapSkip,"g").getRegex(),he._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,he._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,he._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])?)+(?![-_])/,he.autolink=Ce(he.autolink).replace("scheme",he._scheme).replace("email",he._email).getRegex(),he._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,he.tag=Ce(he.tag).replace("comment",fe._comment).replace("attribute",he._attribute).getRegex(),he._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,he._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,he._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,he.link=Ce(he.link).replace("label",he._label).replace("href",he._href).replace("title",he._title).getRegex(),he.reflink=Ce(he.reflink).replace("label",he._label).getRegex(),he.reflinkSearch=Ce(he.reflinkSearch,"g").replace("reflink",he.reflink).replace("nolink",he.nolink).getRegex(),he.normal=we({},he),he.pedantic=we({},he.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:Ce(/^!?\[(label)\]\((.*?)\)/).replace("label",he._label).getRegex(),reflink:Ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",he._label).getRegex()}),he.gfm=we({},he.normal,{escape:Ce(he.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),he.gfm.url=Ce(he.gfm.url,"i").replace("email",he.gfm._extended_email).getRegex(),he.breaks=we({},he.gfm,{br:Ce(he.br).replace("{2,}","*").getRegex(),text:Ce(he.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var _e={block:fe,inline:he},at=U.defaults,et=_e.block,it=_e.inline;function gt(ve){return ve.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 He(ve){var le="",de,J,q=ve.length;for(de=0;de<q;de++)J=ve.charCodeAt(de),Math.random()>.5&&(J="x"+J.toString(16)),le+="&#"+J+";";return le}var Ne=function(){function ve(de){this.tokens=[],this.tokens.links=Object.create(null),this.options=de||at,this.options.tokenizer=this.options.tokenizer||new Le,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var J={block:et.normal,inline:it.normal};this.options.pedantic?(J.block=et.pedantic,J.inline=it.pedantic):this.options.gfm&&(J.block=et.gfm,this.options.breaks?J.inline=it.breaks:J.inline=it.gfm),this.tokenizer.rules=J}ve.lex=function(J,q){var te=new ve(q);return te.lex(J)};var le=ve.prototype;return le.lex=function(J){return J=J.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(J,this.tokens,!0),this.inline(this.tokens),this.tokens},le.blockTokens=function(J,q,te){q===void 0&&(q=[]),te===void 0&&(te=!0),J=J.replace(/^ +$/gm,"");for(var ie,me,Re,Pe;J;){if(ie=this.tokenizer.space(J)){J=J.substring(ie.raw.length),ie.type&&q.push(ie);continue}if(ie=this.tokenizer.code(J,q)){J=J.substring(ie.raw.length),ie.type?q.push(ie):(Pe=q[q.length-1],Pe.raw+=`
|
|
`+ie.raw,Pe.text+=`
|
|
`+ie.text);continue}if(ie=this.tokenizer.fences(J)){J=J.substring(ie.raw.length),q.push(ie);continue}if(ie=this.tokenizer.heading(J)){J=J.substring(ie.raw.length),q.push(ie);continue}if(ie=this.tokenizer.nptable(J)){J=J.substring(ie.raw.length),q.push(ie);continue}if(ie=this.tokenizer.hr(J)){J=J.substring(ie.raw.length),q.push(ie);continue}if(ie=this.tokenizer.blockquote(J)){J=J.substring(ie.raw.length),ie.tokens=this.blockTokens(ie.text,[],te),q.push(ie);continue}if(ie=this.tokenizer.list(J)){for(J=J.substring(ie.raw.length),Re=ie.items.length,me=0;me<Re;me++)ie.items[me].tokens=this.blockTokens(ie.items[me].text,[],!1);q.push(ie);continue}if(ie=this.tokenizer.html(J)){J=J.substring(ie.raw.length),q.push(ie);continue}if(te&&(ie=this.tokenizer.def(J))){J=J.substring(ie.raw.length),this.tokens.links[ie.tag]||(this.tokens.links[ie.tag]={href:ie.href,title:ie.title});continue}if(ie=this.tokenizer.table(J)){J=J.substring(ie.raw.length),q.push(ie);continue}if(ie=this.tokenizer.lheading(J)){J=J.substring(ie.raw.length),q.push(ie);continue}if(te&&(ie=this.tokenizer.paragraph(J))){J=J.substring(ie.raw.length),q.push(ie);continue}if(ie=this.tokenizer.text(J,q)){J=J.substring(ie.raw.length),ie.type?q.push(ie):(Pe=q[q.length-1],Pe.raw+=`
|
|
`+ie.raw,Pe.text+=`
|
|
`+ie.text);continue}if(J){var tt="Infinite loop on byte: "+J.charCodeAt(0);if(this.options.silent){console.error(tt);break}else throw new Error(tt)}}return q},le.inline=function(J){var q,te,ie,me,Re,Pe,tt=J.length;for(q=0;q<tt;q++){Pe=J[q];switch(Pe.type){case"paragraph":case"text":case"heading":{Pe.tokens=[],this.inlineTokens(Pe.text,Pe.tokens);break}case"table":{for(Pe.tokens={header:[],cells:[]},me=Pe.header.length,te=0;te<me;te++)Pe.tokens.header[te]=[],this.inlineTokens(Pe.header[te],Pe.tokens.header[te]);for(me=Pe.cells.length,te=0;te<me;te++)for(Re=Pe.cells[te],Pe.tokens.cells[te]=[],ie=0;ie<Re.length;ie++)Pe.tokens.cells[te][ie]=[],this.inlineTokens(Re[ie],Pe.tokens.cells[te][ie]);break}case"blockquote":{this.inline(Pe.tokens);break}case"list":{for(me=Pe.items.length,te=0;te<me;te++)this.inline(Pe.items[te].tokens);break}}}return J},le.inlineTokens=function(J,q,te,ie,me){q===void 0&&(q=[]),te===void 0&&(te=!1),ie===void 0&&(ie=!1),me===void 0&&(me="");var Re,Pe=J,tt;if(this.tokens.links){var Et=Object.keys(this.tokens.links);if(Et.length>0)for(;(tt=this.tokenizer.rules.inline.reflinkSearch.exec(Pe))!=null;)Et.includes(tt[0].slice(tt[0].lastIndexOf("[")+1,-1))&&(Pe=Pe.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(tt=this.tokenizer.rules.inline.blockSkip.exec(Pe))!=null;)Pe=Pe.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;J;){if(Re=this.tokenizer.escape(J)){J=J.substring(Re.raw.length),q.push(Re);continue}if(Re=this.tokenizer.tag(J,te,ie)){J=J.substring(Re.raw.length),te=Re.inLink,ie=Re.inRawBlock,q.push(Re);continue}if(Re=this.tokenizer.link(J)){J=J.substring(Re.raw.length),Re.type==="link"&&(Re.tokens=this.inlineTokens(Re.text,[],!0,ie)),q.push(Re);continue}if(Re=this.tokenizer.reflink(J,this.tokens.links)){J=J.substring(Re.raw.length),Re.type==="link"&&(Re.tokens=this.inlineTokens(Re.text,[],!0,ie)),q.push(Re);continue}if(Re=this.tokenizer.strong(J,Pe,me)){J=J.substring(Re.raw.length),Re.tokens=this.inlineTokens(Re.text,[],te,ie),q.push(Re);continue}if(Re=this.tokenizer.em(J,Pe,me)){J=J.substring(Re.raw.length),Re.tokens=this.inlineTokens(Re.text,[],te,ie),q.push(Re);continue}if(Re=this.tokenizer.codespan(J)){J=J.substring(Re.raw.length),q.push(Re);continue}if(Re=this.tokenizer.br(J)){J=J.substring(Re.raw.length),q.push(Re);continue}if(Re=this.tokenizer.del(J)){J=J.substring(Re.raw.length),Re.tokens=this.inlineTokens(Re.text,[],te,ie),q.push(Re);continue}if(Re=this.tokenizer.autolink(J,He)){J=J.substring(Re.raw.length),q.push(Re);continue}if(!te&&(Re=this.tokenizer.url(J,He))){J=J.substring(Re.raw.length),q.push(Re);continue}if(Re=this.tokenizer.inlineText(J,ie,gt)){J=J.substring(Re.raw.length),me=Re.raw.slice(-1),q.push(Re);continue}if(J){var bt="Infinite loop on byte: "+J.charCodeAt(0);if(this.options.silent){console.error(bt);break}else throw new Error(bt)}}return q},K(ve,null,[{key:"rules",get:function(){return{block:et,inline:it}}}]),ve}(),Ze=U.defaults,ut=Y.cleanUrl,dt=Y.escape,ze=function(){function ve(de){this.options=de||Ze}var le=ve.prototype;return le.code=function(J,q,te){var ie=(q||"").match(/\S*/)[0];if(this.options.highlight){var me=this.options.highlight(J,ie);me!=null&&me!==J&&(te=!0,J=me)}return ie?'<pre><code class="'+this.options.langPrefix+dt(ie,!0)+'">'+(te?J:dt(J,!0))+`</code></pre>
|
|
`:"<pre><code>"+(te?J:dt(J,!0))+`</code></pre>
|
|
`},le.blockquote=function(J){return`<blockquote>
|
|
`+J+`</blockquote>
|
|
`},le.html=function(J){return J},le.heading=function(J,q,te,ie){return this.options.headerIds?"<h"+q+' id="'+this.options.headerPrefix+ie.slug(te)+'">'+J+"</h"+q+`>
|
|
`:"<h"+q+">"+J+"</h"+q+`>
|
|
`},le.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},le.list=function(J,q,te){var ie=q?"ol":"ul",me=q&&te!==1?' start="'+te+'"':"";return"<"+ie+me+`>
|
|
`+J+"</"+ie+`>
|
|
`},le.listitem=function(J){return"<li>"+J+`</li>
|
|
`},le.checkbox=function(J){return"<input "+(J?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},le.paragraph=function(J){return"<p>"+J+`</p>
|
|
`},le.table=function(J,q){return q&&(q="<tbody>"+q+"</tbody>"),`<table>
|
|
<thead>
|
|
`+J+`</thead>
|
|
`+q+`</table>
|
|
`},le.tablerow=function(J){return`<tr>
|
|
`+J+`</tr>
|
|
`},le.tablecell=function(J,q){var te=q.header?"th":"td",ie=q.align?"<"+te+' align="'+q.align+'">':"<"+te+">";return ie+J+"</"+te+`>
|
|
`},le.strong=function(J){return"<strong>"+J+"</strong>"},le.em=function(J){return"<em>"+J+"</em>"},le.codespan=function(J){return"<code>"+J+"</code>"},le.br=function(){return this.options.xhtml?"<br/>":"<br>"},le.del=function(J){return"<del>"+J+"</del>"},le.link=function(J,q,te){if(J=ut(this.options.sanitize,this.options.baseUrl,J),J===null)return te;var ie='<a href="'+dt(J)+'"';return q&&(ie+=' title="'+q+'"'),ie+=">"+te+"</a>",ie},le.image=function(J,q,te){if(J=ut(this.options.sanitize,this.options.baseUrl,J),J===null)return te;var ie='<img src="'+J+'" alt="'+te+'"';return q&&(ie+=' title="'+q+'"'),ie+=this.options.xhtml?"/>":">",ie},le.text=function(J){return J},ve}(),Ge=function(){function ve(){}var le=ve.prototype;return le.strong=function(J){return J},le.em=function(J){return J},le.codespan=function(J){return J},le.del=function(J){return J},le.html=function(J){return J},le.text=function(J){return J},le.link=function(J,q,te){return""+te},le.image=function(J,q,te){return""+te},le.br=function(){return""},ve}(),yt=function(){function ve(){this.seen={}}var le=ve.prototype;return le.slug=function(J){var q=J.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(q)){var te=q;do this.seen[te]++,q=te+"-"+this.seen[te];while(this.seen.hasOwnProperty(q))}return this.seen[q]=0,q},ve}(),vt=U.defaults,mt=Y.unescape,qe=function(){function ve(de){this.options=de||vt,this.options.renderer=this.options.renderer||new ze,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ge,this.slugger=new yt}ve.parse=function(J,q){var te=new ve(q);return te.parse(J)};var le=ve.prototype;return le.parse=function(J,q){q===void 0&&(q=!0);var te="",ie,me,Re,Pe,tt,Et,bt,Ht,St,rt,Ft,Ot,Wt,Zt,pt,mn,Kt,Dt,en=J.length;for(ie=0;ie<en;ie++){rt=J[ie];switch(rt.type){case"space":continue;case"hr":{te+=this.renderer.hr();continue}case"heading":{te+=this.renderer.heading(this.parseInline(rt.tokens),rt.depth,mt(this.parseInline(rt.tokens,this.textRenderer)),this.slugger);continue}case"code":{te+=this.renderer.code(rt.text,rt.lang,rt.escaped);continue}case"table":{for(Ht="",bt="",Pe=rt.header.length,me=0;me<Pe;me++)bt+=this.renderer.tablecell(this.parseInline(rt.tokens.header[me]),{header:!0,align:rt.align[me]});for(Ht+=this.renderer.tablerow(bt),St="",Pe=rt.cells.length,me=0;me<Pe;me++){for(Et=rt.tokens.cells[me],bt="",tt=Et.length,Re=0;Re<tt;Re++)bt+=this.renderer.tablecell(this.parseInline(Et[Re]),{header:!1,align:rt.align[Re]});St+=this.renderer.tablerow(bt)}te+=this.renderer.table(Ht,St);continue}case"blockquote":{St=this.parse(rt.tokens),te+=this.renderer.blockquote(St);continue}case"list":{for(Ft=rt.ordered,Ot=rt.start,Wt=rt.loose,Pe=rt.items.length,St="",me=0;me<Pe;me++)pt=rt.items[me],mn=pt.checked,Kt=pt.task,Zt="",pt.task&&(Dt=this.renderer.checkbox(mn),Wt?pt.tokens.length>0&&pt.tokens[0].type==="text"?(pt.tokens[0].text=Dt+" "+pt.tokens[0].text,pt.tokens[0].tokens&&pt.tokens[0].tokens.length>0&&pt.tokens[0].tokens[0].type==="text"&&(pt.tokens[0].tokens[0].text=Dt+" "+pt.tokens[0].tokens[0].text)):pt.tokens.unshift({type:"text",text:Dt}):Zt+=Dt),Zt+=this.parse(pt.tokens,Wt),St+=this.renderer.listitem(Zt,Kt,mn);te+=this.renderer.list(St,Ft,Ot);continue}case"html":{te+=this.renderer.html(rt.text);continue}case"paragraph":{te+=this.renderer.paragraph(this.parseInline(rt.tokens));continue}case"text":{for(St=rt.tokens?this.parseInline(rt.tokens):rt.text;ie+1<en&&J[ie+1].type==="text";)rt=J[++ie],St+=`
|
|
`+(rt.tokens?this.parseInline(rt.tokens):rt.text);te+=q?this.renderer.paragraph(St):St;continue}default:{var Je='Token with "'+rt.type+'" type was not found.';if(this.options.silent){console.error(Je);return}else throw new Error(Je)}}}return te},le.parseInline=function(J,q){q=q||this.renderer;var te="",ie,me,Re=J.length;for(ie=0;ie<Re;ie++){me=J[ie];switch(me.type){case"escape":{te+=q.text(me.text);break}case"html":{te+=q.html(me.text);break}case"link":{te+=q.link(me.href,me.title,this.parseInline(me.tokens,q));break}case"image":{te+=q.image(me.href,me.title,me.text);break}case"strong":{te+=q.strong(this.parseInline(me.tokens,q));break}case"em":{te+=q.em(this.parseInline(me.tokens,q));break}case"codespan":{te+=q.codespan(me.text);break}case"br":{te+=q.br();break}case"del":{te+=q.del(this.parseInline(me.tokens,q));break}case"text":{te+=q.text(me.text);break}default:{var Pe='Token with "'+me.type+'" type was not found.';if(this.options.silent){console.error(Pe);return}else throw new Error(Pe)}}}return te},ve}(),lt=Y.merge,st=Y.checkSanitizeDeprecation,Fe=Y.escape,Me=U.getDefaults,ot=U.changeDefaults,Ke=U.defaults;function Oe(ve,le,de){if(typeof ve=="undefined"||ve===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ve!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ve)+", string expected");if(typeof le=="function"&&(de=le,le=null),le=lt({},Oe.defaults,le||{}),st(le),de){var J=le.highlight,q;try{q=Ne.lex(ve,le)}catch(Re){return de(Re)}var te=function(Pe){var tt;if(!Pe)try{tt=qe.parse(q,le)}catch(Et){Pe=Et}return le.highlight=J,Pe?de(Pe):de(null,tt)};if(!J||J.length<3)return te();if(delete le.highlight,!q.length)return te();var ie=0;Oe.walkTokens(q,function(Re){Re.type==="code"&&(ie++,setTimeout(function(){J(Re.text,Re.lang,function(Pe,tt){if(Pe)return te(Pe);tt!=null&&tt!==Re.text&&(Re.text=tt,Re.escaped=!0),ie--,ie===0&&te()})},0))}),ie===0&&te();return}try{var me=Ne.lex(ve,le);return le.walkTokens&&Oe.walkTokens(me,le.walkTokens),qe.parse(me,le)}catch(Re){if(Re.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,le.silent)return"<p>An error occurred:</p><pre>"+Fe(Re.message+"",!0)+"</pre>";throw Re}}Oe.options=Oe.setOptions=function(ve){return lt(Oe.defaults,ve),ot(Oe.defaults),Oe},Oe.getDefaults=Me,Oe.defaults=Ke,Oe.use=function(ve){var le=lt({},ve);if(ve.renderer&&function(){var J=Oe.defaults.renderer||new ze,q=function(me){var Re=J[me];J[me]=function(){for(var Pe=arguments.length,tt=new Array(Pe),Et=0;Et<Pe;Et++)tt[Et]=arguments[Et];var bt=ve.renderer[me].apply(J,tt);return bt===!1&&(bt=Re.apply(J,tt)),bt}};for(var te in ve.renderer)q(te);le.renderer=J}(),ve.tokenizer&&function(){var J=Oe.defaults.tokenizer||new Le,q=function(me){var Re=J[me];J[me]=function(){for(var Pe=arguments.length,tt=new Array(Pe),Et=0;Et<Pe;Et++)tt[Et]=arguments[Et];var bt=ve.tokenizer[me].apply(J,tt);return bt===!1&&(bt=Re.apply(J,tt)),bt}};for(var te in ve.tokenizer)q(te);le.tokenizer=J}(),ve.walkTokens){var de=Oe.defaults.walkTokens;le.walkTokens=function(J){ve.walkTokens(J),de&&de(J)}}Oe.setOptions(le)},Oe.walkTokens=function(ve,le){for(var de=C(ve),J;!(J=de()).done;){var q=J.value;le(q);switch(q.type){case"table":{for(var te=C(q.tokens.header),ie;!(ie=te()).done;){var me=ie.value;Oe.walkTokens(me,le)}for(var Re=C(q.tokens.cells),Pe;!(Pe=Re()).done;)for(var tt=Pe.value,Et=C(tt),bt;!(bt=Et()).done;){var Ht=bt.value;Oe.walkTokens(Ht,le)}break}case"list":{Oe.walkTokens(q.items,le);break}default:q.tokens&&Oe.walkTokens(q.tokens,le)}}},Oe.Parser=qe,Oe.parser=qe.parse,Oe.Renderer=ze,Oe.TextRenderer=Ge,Oe.Lexer=Ne,Oe.lexer=Ne.lex,Oe.Tokenizer=Le,Oe.Slugger=yt,Oe.parse=Oe;var We=Oe;return We})},E7E6:function(Be,Ie){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADUCAYAAADZTGx+AAAgAElEQVR4Xu2dC3BU13nHv7MrIQkQQoCEtAIEAmxig4GACxhogpM6NY7jOKZO4nimwcFot23SNNNO02napJN0JjN9TNMm5eG3x4+YSeI3ftUGjCDGQMBgG4wxb+0u4mEeQhJI2tP539WR7i77uPfuvXfvar8zs7Mr7bnn8Z3vt9/5zlMQB5aAQQmsW7fO397eHujp6Rkfi8XGExFeDX2vABHVSSlrhBDDiKhdSnlOCBGWUu4mol1lZWWv3nfffccNZueJaMITpeBCeEICjz/++LCOjo5GIpogpWwUQjT2vU/A/wCClNJvtbBCCCml3CaEeGzChAmPLF269LLVtNx6jgFxS9IeyOehhx6q7OnpmSilnEhE2gsA4L0PhjHZillRUUHl5WUUf6+giopyKi+Pv8rKyrSX3++nnp4e7XXpUgedP3+ezp37lE6ebKPe3l4tCyF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rK1trY2WiBlz1rMQQVIqtpeuHBidEcHzZIy/iLSXtfyWrGsupEQIb7WiT4iot1CxF9Dh9LuESPGnTGXUmHFHvSApGoOzLm0tbU19vb2TpVSThGCphLJKVLSVCFoYrHCAwikpCNC0MdE4qCU9LEQ4qDf7/+4trb2aN/cRGFpeI6lLUpAMslMSulva2ub2NPT0+TzyUAsJup9PgpIKQNSinohtM/1RFRo5/1cFkJEpKSwEDIihAjHYhT2+WQkFhPhkpKSQ7W1tUdwsnmOOjWoHmdALDbn+fPnR3V2dgKW0ULEqmIxUSWlHCmErJJSVAlBVVIS3kcS4X9ULoQolVKWZnpHcaSU3UKI7szv1EUkzuNSKSEI7+eFkOelFOeFEOd8Pnz24fOZioqKcFVV1VmLVS3qx/4fQLyzKIIkCJoAAAAASUVORK5CYII="},ELLl:function(Be,Ie,G){(function($){$(G("VrN/"))})(function($){var K={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},O=$.Pos;$.defineOption("autoCloseBrackets",!1,function(A,g,u){u&&u!=$.Init&&(A.removeKeyMap(C),A.state.closeBrackets=null),g&&(L(B(g,"pairs")),A.state.closeBrackets=g,A.addKeyMap(C))});function B(A,g){return g=="pairs"&&typeof A=="string"?A:typeof A=="object"&&A[g]!=null?A[g]:K[g]}var C={Backspace:I,Enter:M};function L(A){for(var g=0;g<A.length;g++){var u=A.charAt(g),a="'"+u+"'";C[a]||(C[a]=U(u))}}L(K.pairs+"`");function U(A){return function(g){return E(g,A)}}function _(A){var g=A.state.closeBrackets;if(!g||g.override)return g;var u=A.getModeAt(A.getCursor());return u.closeBrackets||g}function I(A){var g=_(A);if(!g||A.getOption("disableInput"))return $.Pass;for(var u=B(g,"pairs"),a=A.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return $.Pass;var s=R(A,a[l].head);if(!s||u.indexOf(s)%2!=0)return $.Pass}for(var l=a.length-1;l>=0;l--){var p=a[l].head;A.replaceRange("",O(p.line,p.ch-1),O(p.line,p.ch+1),"+delete")}}function M(A){var g=_(A),u=g&&B(g,"explode");if(!u||A.getOption("disableInput"))return $.Pass;for(var a=A.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return $.Pass;var s=R(A,a[l].head);if(!s||u.indexOf(s)%2!=0)return $.Pass}A.operation(function(){var p=A.lineSeparator()||`
|
|
`;A.replaceSelection(p+p,null),A.execCommand("goCharLeft"),a=A.listSelections();for(var d=0;d<a.length;d++){var h=a[d].head.line;A.indentLine(h,null,!0),A.indentLine(h+1,null,!0)}})}function b(A){var g=$.cmpPos(A.anchor,A.head)>0;return{anchor:new O(A.anchor.line,A.anchor.ch+(g?-1:1)),head:new O(A.head.line,A.head.ch+(g?1:-1))}}function E(A,g){var u=_(A);if(!u||A.getOption("disableInput"))return $.Pass;var a=B(u,"pairs"),l=a.indexOf(g);if(l==-1)return $.Pass;for(var s=B(u,"closeBefore"),p=B(u,"triples"),d=a.charAt(l+1)==g,h=A.listSelections(),D=l%2==0,v,f=0;f<h.length;f++){var m=h[f],c=m.head,o,x=A.getRange(c,O(c.line,c.ch+1));if(D&&!m.empty())o="surround";else if((d||!D)&&x==g)d&&w(A,c)?o="both":p.indexOf(g)>=0&&A.getRange(c,O(c.line,c.ch+3))==g+g+g?o="skipThree":o="skip";else if(d&&c.ch>1&&p.indexOf(g)>=0&&A.getRange(O(c.line,c.ch-2),c)==g+g){if(c.ch>2&&/\bstring/.test(A.getTokenTypeAt(O(c.line,c.ch-2))))return $.Pass;o="addFour"}else if(d){var y=c.ch==0?" ":A.getRange(O(c.line,c.ch-1),c);if(!$.isWordChar(x)&&y!=g&&!$.isWordChar(y))o="both";else return $.Pass}else if(D&&(x.length===0||/\s/.test(x)||s.indexOf(x)>-1))o="both";else return $.Pass;if(!v)v=o;else if(v!=o)return $.Pass}var S=l%2?a.charAt(l-1):g,P=l%2?g:a.charAt(l+1);A.operation(function(){if(v=="skip")A.execCommand("goCharRight");else if(v=="skipThree")for(var F=0;F<3;F++)A.execCommand("goCharRight");else if(v=="surround"){for(var H=A.getSelections(),F=0;F<H.length;F++)H[F]=S+H[F]+P;A.replaceSelections(H,"around"),H=A.listSelections().slice();for(var F=0;F<H.length;F++)H[F]=b(H[F]);A.setSelections(H)}else v=="both"?(A.replaceSelection(S+P,null),A.triggerElectric(S+P),A.execCommand("goCharLeft")):v=="addFour"&&(A.replaceSelection(S+S+S+S,"before"),A.execCommand("goCharRight"))})}function R(A,g){var u=A.getRange(O(g.line,g.ch-1),O(g.line,g.ch+1));return u.length==2?u:null}function w(A,g){var u=A.getTokenAt(O(g.line,g.ch+1));return/\bstring/.test(u.type)&&u.start==g.ch&&(g.ch==0||!/\bstring/.test(A.getTokenTypeAt(g)))}})},F8wB:function(Be,Ie,G){Be.exports={loading:"loading___1SIOG"}},FOrL:function(Be,Ie,G){Be.exports=G.p+"static/nodata.a6b3f948.png"},FPkq:function(Be,Ie,G){Be.exports=G.p+"static/qrCode.dd0fe9b2.png"},GABl:function(Be,Ie){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1Rn//e7dzYuioNRsHlSqRiUB2eUx0hbaKAHEAMWxiQ6PTUAUGCuIQNVOZ0xnrHUE5GHHIqOwCag8BlQiQnnUokgt5AEIK5GnBpIFXwjkAdl7vs7dkJCETXLvEj3/5d7v9/u+337nfN8554bowBHo16+3YRh3K7IPBHcRSIDI9QJ0AWkA8h0E3xM8DWAvde5x6Pqe+D17jnVUGLxWogqPp78SGSeC3wP4ZUR8pJ+Ct50O7e344uKjEXFcBkUkSERY6e43RkE9JcCgawngaiw3O6A/l7CvaHckvLYFhTKi5B8C3B2JQ6sYEhvpcMxKKioqs4ox7SwLkvT0mFNnz82HqKkCaHacRGxL1gDybHJp6WKSYoXHkqBytzuF4FoR6WOFtKNtCP4b0c7s5N27v22Pu11B5e7+6ZTgBgE6t0f2Y74n8IUjOuo+1+7dx9vy06agcrf7fgjXARLzYwZrnZsB6Bzev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KoZ8FkmWGoMjjwGy6MaYTsv82a9eaOuHue2DJ6KP3P/KxQYbOThkB8R6g2/i8xwcsbfyjsJQX2x50XhNWboigGcBrKam7RKRMqce+vodYwiSIOihREYAPN5wJJGDGdkQsdc6Gpxp/AtTt/2t4c9mghIKJvcU1O0VQVQk084yhjgHxKac9i45I+VZsTj3/SGI/MIyvjF6VqBrbAoTC6vDCjIfulZM/KMo9YptchsAEk8HvPkvhdbVwYznIJJnA97EVBvLXlvfblZ0whG58nPWCvCHyJy0gyKPde7WOdVcP3JkWHfUqkOAxNn2Rcxn2vbZLXFhr15vW/nEdeeNcyUArr5ctO25OUAjH6z0+tZfzs4qRFJZiU1IHTySvPoDQKt3yeb1cFDJNhHcdI0amhQk7gh4fen1YoYPhgQ/ss/NzxHtHGj2nHDYNi/Hk9/MTQka2CoiN9t3fNVkUDr0/hU5b5SK5Gnw7yyCiMcWL+GH5sxkz80nWsO1e9uftHJysqHqtoigpy3nLYxJLgt4fY+EsnMg41FAltriIzciyjm2tcy0WuXCOUnKf/xGg1VvishwW0Fc8XIhNoYpJ7J9gfpLRByGyM8tc5FzkTromXBrxlJRaM2ReW0sSi0QQTfLwZiG1P582rv876Hs+DNehpKZFvEnoWE2U7dbbrrtTrmWjhPfeqybEby0ECLjrARF8ETML9DzxD2+WikbdifqDHND2vb/PpDm5/oXcV3XRey+tsaKH1tTLhyh661H0xCsmyaQCW1dg1HTHwpMWLbmcpneBJH7Wg+QVdCwFKI/z7R/fWdHyDULaiCIL5jdScM3Y6X+m04/aXIPQGJnwJs/OCTm8yEjYSDMLSurQPkI5CrcoK2ja0vobBTpsD3l2nKU/mGe43DFiV5Ksb8SNUCj9lrlhOUl5r8JwG9evjMBhDmdjkJYBp2luLPHHrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},Gytx:function(Be,Ie){Be.exports=function($,K,O,B){var C=O?O.call(B,$,K):void 0;if(C!==void 0)return!!C;if($===K)return!0;if(typeof $!="object"||!$||typeof K!="object"||!K)return!1;var L=Object.keys($),U=Object.keys(K);if(L.length!==U.length)return!1;for(var _=Object.prototype.hasOwnProperty.bind(K),I=0;I<L.length;I++){var M=L[I];if(!_(M))return!1;var b=$[M],E=K[M];if(C=O?O.call(B,b,E,M):void 0,C===!1||C===void 0&&b!==E)return!1}return!0}},HmJG:function(Be,Ie,G){},HpTS:function(Be,Ie,G){Be.exports=G.p+"static/small_program.f74069ec.png"},I8Z2:function(Be,Ie,G){"use strict";G.d(Ie,"a",function(){return B}),G.d(Ie,"b",function(){return R}),G.d(Ie,"c",function(){return A});var $=G("cDcd"),K=function(){var g=function(u,a){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,s){l.__proto__=s}||function(l,s){for(var p in s)s.hasOwnProperty(p)&&(l[p]=s[p])},g(u,a)};return function(u,a){g(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),O=$.createContext(null),B=function(g){K(u,g);function u(){return g!==null&&g.apply(this,arguments)||this}return u.prototype.render=function(){return $.createElement(O.Provider,{value:this.props.store},this.props.children)},u}($.Component),C=G("Gytx"),L=G.n(C),U=G("2mql"),_=G.n(U),I=function(){var g=function(u,a){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,s){l.__proto__=s}||function(l,s){for(var p in s)s.hasOwnProperty(p)&&(l[p]=s[p])},g(u,a)};return function(u,a){g(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),M=function(){return M=Object.assign||function(g){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(g[s]=u[s])}return g},M.apply(this,arguments)};function b(g){return g.displayName||g.name||"Component"}var E=function(){return{}};function R(g,u){u===void 0&&(u={});var a=!!g,l=g||E;return function(p){var d=function(D){I(v,D);function v(f,m){var c=D.call(this,f,m)||this;return c.unsubscribe=null,c.handleChange=function(){if(!c.unsubscribe)return;var o=l(c.store.getState(),c.props);c.setState({subscribed:o})},c.store=c.context,c.state={subscribed:l(c.store.getState(),f),store:c.store,props:f},c}return v.getDerivedStateFromProps=function(f,m){return g&&g.length===2&&f!==m.props?{subscribed:l(m.store.getState(),f),props:f}:{props:f}},v.prototype.componentDidMount=function(){this.trySubscribe()},v.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},v.prototype.shouldComponentUpdate=function(f,m){return!L()(this.props,f)||!L()(this.state.subscribed,m.subscribed)},v.prototype.trySubscribe=function(){a&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},v.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},v.prototype.render=function(){var f=M(M(M({},this.props),this.state.subscribed),{store:this.store});return $.createElement(p,M({},f,{ref:this.props.miniStoreForwardedRef}))},v.displayName="Connect("+b(p)+")",v.contextType=O,v}($.Component);if(u.forwardRef){var h=$.forwardRef(function(D,v){return $.createElement(d,M({},D,{miniStoreForwardedRef:v}))});return _()(h,p)}return _()(d,p)}}var w=function(){return w=Object.assign||function(g){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(g[s]=u[s])}return g},w.apply(this,arguments)};function A(g){var u=g,a=[];function l(d){u=w(w({},u),d);for(var h=0;h<a.length;h++)a[h]()}function s(){return u}function p(d){return a.push(d),function(){var D=a.indexOf(d);a.splice(D,1)}}return{setState:l,getState:s,subscribe:p}}},JWDV:function(Be,Ie,G){Be.exports=G.p+"static/charpter-white.5fa14f93.svg"},JeFH:function(Be,Ie){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qg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d0aAfzL/cNSYZcT0LvEYnuqyvnIrIChHo/dbZYjDbPxslSFLAfGUEIIcZ3gppTpvd6zLqweOVZuI0TUVDRgSOzjVy5yWFKSmTNn6vv2LxlMx7jdEMtiZcbR6h/kdmh7nkIlctlUCiLnQNL7Xs7W5g6mrq+sTExNDg6gM9eE5xFEM4HhLL4pJKYdwvg5msCsgg4AwFceueyptKZ/XNO3pkIdqkPaXVdAGjfwkt1FTzeXveCAN7QYNp/gMDEzxYFhaLAaneaH8xTY5hrvasu1/5ebmzuvcuXOTn8KRUpLZ5sQpWVD+EgvfAKEcBWQ1mjUK554XYFvnw7YEhAhCSr6pYULTv2R6aklBAwC5Y3uJief2VyqtEoHGG5rT/4nVVN+EPaCsBB0pkT0gyyyDpq+HEB8DWNTSa/PNbbgt/yal5NkxyzI90VRVdI3+HSFpmyuk0MeTeGXnkspgrE/0aGgfyxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h:function(Be,Ie,G){Be.exports=G.p+"static/qrcode.2267e4d5.png"},LdHM:function(Be,Ie,G){"use strict";G.d(Ie,"b",function(){return s}),G.d(Ie,"a",function(){return d});var $=G("1OyB"),K=G("vuIU"),O=G("Ji7U"),B=G("LK+K"),C=G("cDcd"),L=G("rePB"),U=G("Ff2n"),_=G("ODXe"),I=G("4IlW"),M=G("bX4T"),b=G("YrtM"),E=G("TSYQ"),R=G.n(E),w=G("+nKL"),A=G("8OUc"),g=function(Z,ne){var pe=Z.prefixCls,xe=Z.id,je=Z.flattenOptions,Le=Z.childrenAsData,De=Z.values,Ce=Z.searchValue,we=Z.multiple,fe=Z.defaultActiveFirstOption,he=Z.height,_e=Z.itemHeight,at=Z.notFoundContent,et=Z.open,it=Z.menuItemSelectedIcon,gt=Z.virtual,He=Z.onSelect,Ne=Z.onToggleOpen,Ze=Z.onActiveValue,ut=Z.onScroll,dt=Z.onMouseEnter,ze="".concat(pe,"-item"),Ge=Object(b.a)(function(){return je},[et,je],function(We,ve){return ve[0]&&We[1]!==ve[1]}),yt=C.useRef(null),vt=function(ve){ve.preventDefault()},mt=function(ve){yt.current&&yt.current.scrollTo({index:ve})},qe=function(ve){for(var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,de=Ge.length,J=0;J<de;J+=1){var q=(ve+J*le+de)%de,te=Ge[q],ie=te.group,me=te.data;if(!ie&&!me.disabled)return q}return-1},lt=C.useState(function(){return qe(0)}),st=Object(_.a)(lt,2),Fe=st[0],Me=st[1],ot=function(ve){Me(ve);var le=Ge[ve];if(!le){Ze(null,-1);return}Ze(le.data.value,ve)};C.useEffect(function(){ot(fe!==!1?qe(0):-1)},[Ge.length,Ce]),C.useEffect(function(){var We=setTimeout(function(){if(!we&&et&&De.size===1){var ve=Array.from(De)[0],le=Ge.findIndex(function(de){var J=de.data;return J.value===ve});ot(le),mt(le)}});return function(){return clearTimeout(We)}},[et]);var Ke=function(ve){ve!==void 0&&He(ve,{selected:!De.has(ve)}),we||Ne(!1)};if(C.useImperativeHandle(ne,function(){return{onKeyDown:function(ve){var le=ve.which;switch(le){case I.a.UP:case I.a.DOWN:{var de=0;if(le===I.a.UP?de=-1:le===I.a.DOWN&&(de=1),de!==0){var J=qe(Fe+de,de);mt(J),ot(J)}break}case I.a.ENTER:{var q=Ge[Fe];q&&!q.data.disabled?Ke(q.data.value):Ke(void 0),et&&ve.preventDefault();break}case I.a.ESC:Ne(!1)}},onKeyUp:function(){},scrollTo:function(ve){mt(ve)}}}),Ge.length===0)return C.createElement("div",{role:"listbox",id:"".concat(xe,"_list"),className:"".concat(ze,"-empty"),onMouseDown:vt},at);function Oe(We){var ve=Ge[We];if(!ve)return null;var le=ve.data||{},de=le.value,J=le.label,q=le.children,te=Object(M.a)(le,!0),ie=Le?q:J;return ve?C.createElement("div",Object.assign({"aria-label":typeof ie=="string"?ie:null},te,{key:We,role:"option",id:"".concat(xe,"_list_").concat(We),"aria-selected":De.has(de)}),de):null}return C.createElement(C.Fragment,null,C.createElement("div",{role:"listbox",id:"".concat(xe,"_list"),style:{height:0,width:0,overflow:"hidden"}},Oe(Fe-1),Oe(Fe),Oe(Fe+1)),C.createElement(w.a,{itemKey:"key",ref:yt,data:Ge,height:he,itemHeight:_e,fullHeight:!1,onMouseDown:vt,onScroll:ut,virtual:gt,onMouseEnter:dt},function(We,ve){var le,de=We.group,J=We.groupOption,q=We.data,te=q.label,ie=q.key;if(de)return C.createElement("div",{className:R()(ze,"".concat(ze,"-group"))},te!==void 0?te:ie);var me=q.disabled,Re=q.value,Pe=q.title,tt=q.children,Et=q.style,bt=q.className,Ht=Object(U.a)(q,["disabled","value","title","children","style","className"]),St=De.has(Re),rt="".concat(ze,"-option"),Ft=R()(ze,rt,bt,(le={},Object(L.a)(le,"".concat(rt,"-grouped"),J),Object(L.a)(le,"".concat(rt,"-active"),Fe===ve&&!me),Object(L.a)(le,"".concat(rt,"-disabled"),me),Object(L.a)(le,"".concat(rt,"-selected"),St),le)),Ot=Le?tt:te,Wt=!it||typeof it=="function"||St;return C.createElement("div",Object.assign({},Ht,{"aria-selected":St,className:Ft,title:Pe,onMouseMove:function(){if(Fe===ve||me)return;ot(ve)},onClick:function(){me||Ke(Re)},style:Et}),C.createElement("div",{className:"".concat(rt,"-content")},Ot||Re),C.isValidElement(it)||St,Wt&&C.createElement(A.a,{className:"".concat(ze,"-option-state"),customizeIcon:it,customizeIconProps:{isSelected:St}},St?"\u2713":null))}))},u=C.forwardRef(g);u.displayName="OptionList";var a=u,l=function(){return null};l.isSelectOption=!0;var s=l,p=function(){return null};p.isSelectOptGroup=!0;var d=p,h=G("VTBJ"),D=G("Zm9Q");function v(N){var Z=N.key,ne=N.props,pe=ne.children,xe=ne.value,je=Object(U.a)(ne,["children","value"]);return Object(h.a)({key:Z,value:xe!==void 0?xe:Z,children:pe},je)}function f(N){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(D.a)(N).map(function(ne,pe){if(!C.isValidElement(ne)||!ne.type)return null;var xe=ne.type.isSelectOptGroup,je=ne.key,Le=ne.props,De=Le.children,Ce=Object(U.a)(Le,["children"]);return Z||!xe?v(ne):Object(h.a)(Object(h.a)({key:"__RC_SELECT_GRP__".concat(je===null?pe:je,"__"),label:je},Ce),{},{options:f(De)})}).filter(function(ne){return ne})}var m=G("2Qr1"),c=G("qNPg"),o=G("U8pU"),x=G("Kwbf"),y=G("WKfj");function S(N){var Z=N.mode,ne=N.options,pe=N.children,xe=N.backfill,je=N.allowClear,Le=N.placeholder,De=N.getInputElement,Ce=N.showSearch,we=N.onSearch,fe=N.defaultOpen,he=N.autoFocus,_e=N.labelInValue,at=N.value,et=N.inputValue,it=N.optionLabelProp,gt=Z==="multiple"||Z==="tags",He=Ce!==void 0?Ce:gt||Z==="combobox",Ne=ne||f(pe);if(Object(x.a)(Z!=="tags"||Ne.every(function(ze){return!ze.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Z==="tags"||Z==="combobox"){var Ze=Ne.some(function(ze){return ze.options?ze.options.some(function(Ge){return typeof("value"in Ge?Ge.value:Ge.key)=="number"}):typeof("value"in ze?ze.value:ze.key)=="number"});Object(x.a)(!Ze,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(x.a)(Z!=="combobox"||!it,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(x.a)(Z==="combobox"||!xe,"`backfill` only works with `combobox` mode."),Object(x.a)(Z==="combobox"||!De,"`getInputElement` only work with `combobox` mode."),Object(x.b)(Z!=="combobox"||!De||!je||!Le,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),we&&!He&&Z!=="combobox"&&Z!=="tags"&&Object(x.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(x.b)(!fe||he,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),at!=null){var ut=Object(y.d)(at);Object(x.a)(!_e||ut.every(function(ze){return Object(o.a)(ze)==="object"&&("key"in ze||"value"in ze)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(x.a)(!gt||Array.isArray(at),"`value` should be array when `mode` is `multiple` or `tags`")}if(pe){var dt=null;Object(D.a)(pe).some(function(ze){if(!C.isValidElement(ze)||!ze.type)return!1;var Ge=ze.type;if(Ge.isSelectOption)return!1;if(Ge.isSelectOptGroup){var yt=Object(D.a)(ze.props.children).every(function(vt){return!C.isValidElement(vt)||!ze.type||vt.type.isSelectOption?!0:(dt=vt.type,!1)});return!yt}return dt=Ge,!0}),dt&&Object(x.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(dt.displayName||dt.name||dt,"`.")),Object(x.a)(et===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var P=S,F=Object(c.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:f,flattenOptions:m.d,getLabeledValue:m.e,filterOptions:m.b,isValueDisabled:m.g,findValueOption:m.c,warningProps:P,fillOptionsWithMissingValue:m.a}),H=function(N){Object(O.a)(ne,N);var Z=Object(B.a)(ne);function ne(){var pe;return Object($.a)(this,ne),pe=Z.apply(this,arguments),pe.selectRef=C.createRef(),pe.focus=function(){pe.selectRef.current.focus()},pe.blur=function(){pe.selectRef.current.blur()},pe}return Object(K.a)(ne,[{key:"render",value:function(){return C.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),ne}(C.Component);H.Option=s,H.OptGroup=d;var Y=H,j=Ie.c=Y},M8RZ:function(Be,Ie,G){"use strict";G.d(Ie,"a",function(){return I});var $=G("fWQN"),K=G("mtLc"),O=G("yKVA"),B=G("879j"),C=G("cDcd"),L=G.n(C),U=G("faye"),_=G.n(U),I=function(M){Object(O.a)(E,M);var b=Object(B.a)(E);function E(R){var w;Object($.a)(this,E),w=b.call(this,R);var A=window.document;return w.node=A.createElement("div"),A.body.appendChild(w.node),w}return Object(K.a)(E,[{key:"render",value:function(){var w=this.props.children;return Object(U.createPortal)(w,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),E}(L.a.Component)},Nmxd:function(Be,Ie){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAF4ElEQVRoQ91aW2wUVRj+/rPbSivURIgKjZcHjUYTgZ0lthgv3V0LSqB9IAQeNNEIaKKwZbcFnuQJoZ1piyYawJjIiwZDwiVBaHd28QItaWeLD4KJPgimiA+YCAZj6Z7fzPZiu7e57WriJE0f5v++//tm/j3nn3MOoQyXcmJ/LdfeCBOjEUA9EdUzUA9g0ST9VQJGmXkU5n/CAN2q043Vm295TU9uCRS9MwCiFWBqAmD++R1yjQNIgTgF5tNGuCPtEJ8Nd2xgWarzPil9UbBsA1G1m6R5GOYxkOgRItM71NRxzQmnIwMBvStKoCiAB50kcRB7mcG96XB7r12MLQNPJXrvzdD4QQZW2yX2EkfACR/7N56PRH+14rE0sDSpLRaM4wA/YEVW3vt0RRLWjIRi35biLWkgmOhaz0SflleYMzZi3jAcaf+sGKqoAUVX3wbwnrN0FYveYoTj7xdiL2ggqKsvMnCyYnJcEBPw0nA4/kUuNM9AINX9MMnMIEDzXeSpIISvs/A1pJu2/TgzSZ4BRVf7ALxQQSVeqPuNcLy5qIHJcb7HS4ZKYxncNnOemH4DyqmehaiW58D8UKVFeOIn+gljYrmxsu2XWa2Eomt7AN7uidwd+CKBPy8EZdA7hSlprxGO7Zg2EPxSW8q35WDZehv7Ri4KEuuGQtu+y4UoSe0DML9ZkIp5jKpEw/BzsZFsCSkpNQYJ1X7eskQWF6+rbwD4sGQWgbjRFNcmDCS0o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8YgwJJbSuBK7zRTb3pUGwfCGznTdk3MMm2tG/vIvL7tpJE1G3vlCeMMcYCvTye2TfSvP2qHeFTMY4NTI9Sek8AJFewlCGi7IEPc/JycmWYOUVCJMHitNmYOQF7NjAzmTK8v5Z/N4/biEYI1BN46riNeeTGvEazx21Ao5DmcRs5QHfV6UbQ+3GbvwHH7EQQahyMxwAAAABJRU5ErkJggg=="},O2Wb:function(Be,Ie,G){Be.exports={flex:"flex___2gmSR",flex1:"flex1___3Tu1g",color666:"color666___2uyGL",error:"error___yJ86W",deleteIcon:"deleteIcon___1D2tg",addIcon:"addIcon___2VIYB"}},OLES:function(Be,Ie,G){"use strict";var $=G("U8pU"),K=G("VTBJ"),O=G("Ff2n"),B=G("cDcd"),C=G("uciX"),L=G("7ixt"),U=function(R){var w=R.overlay,A=R.prefixCls,g=R.id,u=R.overlayInnerStyle;return B.createElement("div",{className:"".concat(A,"-inner"),id:g,role:"tooltip",style:u},typeof w=="function"?w():w)},_=U,I=function(R,w){var A=R.overlayClassName,g=R.trigger,u=g===void 0?["hover"]:g,a=R.mouseEnterDelay,l=a===void 0?0:a,s=R.mouseLeaveDelay,p=s===void 0?.1:s,d=R.overlayStyle,h=R.prefixCls,D=h===void 0?"rc-tooltip":h,v=R.children,f=R.onVisibleChange,m=R.afterVisibleChange,c=R.transitionName,o=R.animation,x=R.placement,y=x===void 0?"right":x,S=R.align,P=S===void 0?{}:S,F=R.destroyTooltipOnHide,H=F===void 0?!1:F,Y=R.defaultVisible,j=R.getTooltipContainer,N=R.overlayInnerStyle,Z=Object(O.a)(R,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),ne=Object(B.useRef)(null);Object(B.useImperativeHandle)(w,function(){return ne.current});var pe=Object(K.a)({},Z);"visible"in R&&(pe.popupVisible=R.visible);var xe=function(){var we=R.arrowContent,fe=we===void 0?null:we,he=R.overlay,_e=R.id;return[B.createElement("div",{className:"".concat(D,"-arrow"),key:"arrow"},fe),B.createElement(_,{key:"content",prefixCls:D,id:_e,overlay:he,overlayInnerStyle:N})]},je=!1,Le=!1;if(typeof H=="boolean")je=H;else if(H&&Object($.a)(H)==="object"){var De=H.keepParent;je=De===!0,Le=De===!1}return B.createElement(C.a,Object.assign({popupClassName:A,prefixCls:D,popup:xe,action:u,builtinPlacements:L.a,popupPlacement:y,ref:ne,popupAlign:P,getPopupContainer:j,onPopupVisibleChange:f,afterPopupVisibleChange:m,popupTransitionName:c,popupAnimation:o,defaultPopupVisible:Y,destroyPopupOnHide:je,autoDestroy:Le,mouseLeaveDelay:p,popupStyle:d,mouseEnterDelay:l},pe),v)},M=Object(B.forwardRef)(I),b=Ie.a=M},Ohmc:function(Be,Ie,G){Be.exports=G.p+"static/certificate.fc32dc1b.jpg"},Ot1p:function(Be,Ie,G){"use strict";var $=G("2qtc"),K=G("kLXV"),O=G("rAM+"),B=G("miYZ"),C=G("tsqr"),L=G("9og8"),U=G("tJVT"),_=G("jrin"),I=G("WmNS"),M=G.n(I),b=G("cDcd"),E=G.n(b),R=G("VrN/"),w=G.n(R),A=G("bdgK"),g=G("p77/"),u=G("Bd2K"),a=G("ELLl"),l=G("19Vz"),s=G("lZu9"),p=G("+NIl"),d=G("kSUc"),h=G("9Bee"),D=function(me){var Re=me.value,Pe=Re===void 0?"":Re,tt=me.className,Et=me.showTextOnly,bt=me.showLines,Ht=me.style,St=Ht===void 0?{}:Ht,rt=Object(b.useMemo)(function(){return""},[Pe]);return E.a.createElement(E.a.Fragment,null,E.a.createElement("div",{dangerouslySetInnerHTML:{__html:rt}}))},v=G("0Owb"),f=G("dejd"),m=G("C+DQ"),c=G("1vsH"),o=G("m3rI"),x=[{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 y(me){var Re=me.onActionCallback,Pe=me.title,tt=me.icon,Et=me.actionName,bt=me.className,Ht=bt===void 0?"":bt,St=me.children;function rt(){Re(Et)}return E.a.createElement("a",{title:Pe,className:Ht,onClick:rt},E.a.createElement("i",{className:"md-iconfont ".concat(tt)}),St)}var S=function(me){var Re=me.watch,Pe=me.showNullButton,tt=me.onActionCallback,Et=me.fullScreen,bt=me.insertTemp,Ht=me.hidetoolBar,St=me.uuid,rt=me.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(c.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(c.G)("_educoder_session"),"&key=").concat(St,"&api=").concat(encodeURIComponent(o.a.PROXY_SERVER)));var Ft=[].concat(x,[{title:"".concat(Re?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Re?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return E.a.createElement("ul",{className:"markdown-toolbar-container"},!Ht&&Ft.map(function(Ot,Wt){return E.a.createElement("li",{key:Wt},Ot.actionName?E.a.createElement(y,Object(v.a)({},Ot,{onActionCallback:tt})):E.a.createElement("span",{className:"v-line"}))}),Pe?E.a.createElement("li",null,E.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:tt},E.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,bt&&E.a.createElement("li",null,E.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(bt),onActionCallback:tt},E.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),E.a.createElement("li",{className:"btn-full-screen"},E.a.createElement(y,{icon:"".concat(Et?"icon-shrink":"icon-enlarge"),title:Et?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:tt})))},P=G("M8RZ"),F=G("+L6B"),H=G("2/Rp"),Y=G("y8nQ"),j=G("Vl3Y"),N=G("5NDa"),Z=G("5rEg"),ne={labelCol:{span:4},wrapperCol:{span:20}},pe=function(me){var Re=me.callback,Pe=me.onCancel;function tt(Et){Re(Et)}return E.a.createElement(j.a,Object(v.a)({},ne,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:tt}),E.a.createElement(j.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},E.a.createElement(Z.a,null)),E.a.createElement(j.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},E.a.createElement(Z.a,null)),E.a.createElement("div",{className:"flex-container flex-end"},E.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.a.createElement(H.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))},xe=G("7ahc"),je=G("HmJG"),Le=G("BjJ7"),De=j.a.useForm,Ce={width:280,marginRight:10},we={labelCol:{span:5},wrapperCol:{span:19}},fe=function(me){var Re=me.callback,Pe=me.onCancel,tt=De(),Et=Object(U.a)(tt,1),bt=Et[0];function Ht(Ft){Re(Ft)}function St(Ft,Ot){if(Ft.status===-1){C.b.error(Ft.message);return}bt.setFieldsValue({src:"/api/attachments/".concat(Ft.id),type:Ot.type})}function rt(Ft){var Ot=Ft.target.files[0];_e(Ot,St)}return E.a.createElement(j.a,Object(v.a)({form:bt},we,{className:"upload-image-panel",onFinish:Ht}),E.a.createElement(j.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},E.a.createElement("div",{className:"flex-container"},E.a.createElement(j.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},E.a.createElement(Z.a,{style:Ce})),E.a.createElement(he,{onFileChange:rt}))),E.a.createElement(j.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},E.a.createElement(Z.a,{style:{width:264}})),E.a.createElement(j.a.Item,{style:{textAlign:"right"}},E.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.a.createElement(H.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))};function he(me){var Re=me.onFileChange;return E.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",E.a.createElement("input",{type:"file",onChange:Re}))}function _e(me,Re){if(!me)throw new String("\u6CA1\u6709\u6587\u4EF6");var Pe=new FormData;Pe.append("editormd-image-file",me),Pe.append("file_param_name","editormd-image-file"),Pe.append("byxhr","true");var tt=new window.XMLHttpRequest;tt.withCredentials=!0,tt.addEventListener("load",function(Et){Re(JSON.parse(Et.target.responseText),me)},!1),tt.addEventListener("error",function(Et){console.error(Et)},!1),tt.open("POST","".concat(Le.a,"/api/attachments.json")),tt.send(Pe)}var at=G("giR+"),et=G("fyUT"),it=G("7Kak"),gt=G("9yH6"),He=gt.a.Group,Ne={margin:"0 8px"},Ze=function(me){var Re=me.callback,Pe=me.onCancel;function tt(Et){Re(Et)}return E.a.createElement(j.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:tt},E.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},E.a.createElement("span",{style:Ne},"\u5355\u5143\u683C\u6570\uFF1A"),E.a.createElement("span",{style:Ne},"\u884C\u6570"),E.a.createElement(j.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},E.a.createElement(et.a,null)),E.a.createElement("span",{style:Ne},"\u5217\u6570"),E.a.createElement(j.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},E.a.createElement(et.a,null))),E.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},E.a.createElement("span",{style:Ne},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),E.a.createElement(j.a.Item,{name:"align"},E.a.createElement(He,null,E.a.createElement(gt.a,{value:"default"},E.a.createElement("i",{className:"fa fa-align-justify"})),E.a.createElement(gt.a,{value:"left"},E.a.createElement("i",{className:"fa fa-align-left"})),E.a.createElement(gt.a,{value:"center"},E.a.createElement("i",{className:"fa fa-align-center"})),E.a.createElement(gt.a,{value:"right"},E.a.createElement("i",{className:"fa fa-align-right"}))))),E.a.createElement("div",{className:"flex-container flex-end"},E.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.a.createElement(H.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))},ut=G("ErOA"),dt=G("7Cbv"),ze="link",Ge="upload-image",yt="code-block",vt="add-table",mt="------------",qe={default:mt,left:":".concat(mt),center:":".concat(mt,":"),right:"".concat(mt,":")},lt=G("9VGf"),st,Fe;function Me(){}var ot=0,Ke=1e4,Oe="\u2581",We=`
|
|
**\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 ve(me){return/^\d+$/.test(me)?"".concat(me,"px"):me}var le=navigator.platform.toUpperCase().indexOf("MAC")>=0,de=le?"Cmd":"Ctrl",J=["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"],q=(st={},Object(_.a)(st,de+"-B","bold"),Object(_.a)(st,de+"-I","italic"),st),te=(Fe={},Object(_.a)(Fe,ze,"\u6DFB\u52A0\u94FE\u63A5"),Object(_.a)(Fe,yt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(_.a)(Fe,Ge,"\u6DFB\u52A0\u6587\u4EF6"),Object(_.a)(Fe,vt,"\u6DFB\u52A0\u8868\u683C"),Fe),ie=Ie.a=function(me){var Re=me.defaultValue,Pe=Re===void 0?"":Re,tt=me.onChange,Et=me.width,bt=Et===void 0?"100%":Et,Ht=me.height,St=Ht===void 0?400:Ht,rt=me.miniToolbar,Ft=rt===void 0?!1:rt,Ot=me.isFocus,Wt=Ot===void 0?!1:Ot,Zt=me.watch,pt=me.insertTemp,mn=me.mode,Kt=mn===void 0?"markdown":mn,Dt=me.id,en=Dt===void 0?"markdown-editor-id":Dt,Je=me.showResizeBar,Un=Je===void 0?!1:Je,Tn=me.noStorage,Mn=Tn===void 0?!1:Tn,fr=me.showNullButton,Ln=fr===void 0?!1:fr,Tt=me.hidetoolBar,jr=Tt===void 0?!1:Tt,ti=me.fullScreen,Yn=ti===void 0?!1:ti,on=me.onBlur,Dr=me.onCMBeforeChange,Nr=me.onFullScreen,Yr=me.className,Qe=Yr===void 0?"":Yr,Lt=me.disablePaste,Wr=Lt===void 0?!1:Lt,ni=me.placeholder,fi=ni===void 0?"":ni,Kr=me.values,hi=Kr===void 0?"":Kr,Ut=Object(b.useState)(null),Ki=Object(U.a)(Ut,2),$e=Ki[0],hr=Ki[1],mr=Object(b.useState)(Pe),Di=Object(U.a)(mr,2),ri=Di[0],Or=Di[1],mi=Object(b.useState)(Zt),Oi=Object(U.a)(mi,2),br=Oi[0],Ri=Oi[1],Mi=Object(b.useState)(Yn),pi=Object(U.a)(Mi,2),Rr=pi[0],Li=pi[1],ra=Object(b.useState)(""),vn=Object(U.a)(ra,2),Rt=vn[0],Bt=vn[1],tn=Object(b.useState)(0),pn=Object(U.a)(tn,2),Qt=pn[0],Jr=pn[1],ir=Object(b.useState)(St),Hi=Object(U.a)(ir,2),ia=Hi[0],Hr=Hi[1],pr=Object(b.useState)(!1),ar=Object(U.a)(pr,2),gi=ar[0],ii=ar[1],vi=Object(b.useRef)(Object(dt.a)()),Ii=Object(b.useRef)(!1),Zr=Object(b.useRef)(),qr=Object(b.useRef)(),$r=Object(b.useRef)(),ai=Object(b.useRef)(),Pi=Object(b.useRef)(),ga=function(){var wt=Object(L.a)(M.a.mark(function jt(){var Mt,qt;return M.a.wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:return xn.next=2,Object(ut.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:vi.current}});case 2:qt=xn.sent,qt!=null&&(Mt=qt.attachments)!==null&&Mt!==void 0&&Mt.length&&(console.log("cm:",$e,qr),qt.attachments.map(function(un){un.content_type.indexOf("image")>-1?$e.replaceSelection(".concat(un.content_type,")")):un.content_type.indexOf("video")>-1?$e.replaceSelection('<video width="100%" controls src="'.concat(o.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):un.content_type.indexOf("pdf")>-1?$e.replaceSelection('<a href="'.concat(o.a.API_SERVER,"/api/attachments/").concat(un.id,"?type=").concat(un.content_type,'&disposition=inline" target="_blank">').concat(un.name,"</a>")):$e.replaceSelection("[".concat(un.name,"](").concat(o.a.API_SERVER,"/api/attachments/").concat(un.id,"?type=").concat(un.content_type,")"))}));case 4:case"end":return xn.stop()}},jt)}));return function(){return wt.apply(this,arguments)}}();Object(b.useEffect)(function(){Or(hi),$e==null||$e.setValue(hi)},[hi]),Object(b.useEffect)(function(){Nr==null||Nr(Rr)},[Rr]),Object(b.useEffect)(function(){if(qr.current){var wt=w.a.fromTextArea(qr.current,{mode:Kt,lineNumbers:!Ft,lineWrapping:!0,value:Pe,autoCloseTags:!0,autoCloseBrackets:!0});Wt&&wt.focus();function jt(Mt,qt){if(Wr){qt.preventDefault();return}var fn=qt.clipboardData;if(fn){var xn=fn.types.toString(),un=fn.items;if(xn==="Files"||fn.types.indexOf("Files")>-1){if(qt.preventDefault(),Kt=="stex")return;try{var Kn,xr=un[1];((Kn=un[0])===null||Kn===void 0?void 0:Kn.kind)==="file"&&(xr=un[0]);var nn=xr.getAsFile(),oi=nn.name.split(".").pop();_e(nn,function(yn){if(yn.id){var ur,or,Br;(nn==null||((ur=nn.type)===null||ur===void 0)?void 0:ur.indexOf("image"))>-1?wt.replaceSelection(".concat(yn.content_type,")")):(nn==null||((or=nn.type)===null||or===void 0)?void 0:or.indexOf("video"))>-1?wt.replaceSelection('<video width="100%" controls src="'.concat(o.a.API_SERVER,"/api/attachments/").concat(yn.id,'"></video>')):(nn==null||((Br=nn.type)===null||Br===void 0)?void 0:Br.indexOf("pdf"))>-1?wt.replaceSelection('<a href="'.concat(o.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(nn.type,'&disposition=inline" target="_blank">').concat(nn.name,"</a>")):J.includes(oi)?wt.replaceSelection('<a href="'.concat(o.a.API_SERVER,"/api/attachments/").concat(yn.id,'?type=office&disposition=inline" target="_blank">').concat(nn.name,"</a>")):wt.replaceSelection("[".concat(nn.name,"](").concat(o.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(yn.content_type,")"))}else(yn==null?void 0:yn.status)===401&&(document.location.href="/user/login")})}catch(yn){C.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return wt.on("paste",jt),wt.on("dragleave",function(Mt,qt){$r.current.classList.remove("mouse-hover-md")}),wt.on("dragover",function(Mt,qt){$r.current.classList.add("mouse-hover-md")}),wt.on("drop",function(Mt,qt){$r.current.classList.add("mouse-hover-md");var fn;if(fn=qt.dataTransfer.files,fn.length>0){qt.preventDefault(),qt.stopPropagation();for(var xn=function(xr){var nn=fn[xr],oi=nn.name.split(".").pop();_e(nn,function(yn){if(yn.id){var ur,or,Br;(nn==null||((ur=nn.type)===null||ur===void 0)?void 0:ur.indexOf("image"))>-1?wt.replaceSelection(".concat(yn.content_type,")")):(nn==null||((or=nn.type)===null||or===void 0)?void 0:or.indexOf("video"))>-1?wt.replaceSelection('<video width="100%" controls src="'.concat(o.a.API_SERVER,"/api/attachments/").concat(yn.id,'"></video>')):(nn==null||((Br=nn.type)===null||Br===void 0)?void 0:Br.indexOf("pdf"))>-1?wt.replaceSelection('<a href="'.concat(o.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(nn.type,'&disposition=inline" target="_blank">').concat(nn.name,"</a>")):J.includes(oi)?wt.replaceSelection('<a href="'.concat(o.a.API_SERVER,"/api/attachments/").concat(yn.id,'?type=office&disposition=inline" target="_blank">').concat(nn.name,"</a>")):wt.replaceSelection("[".concat(nn.name,"](").concat(o.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(yn.content_type,")"))}else(yn==null?void 0:yn.status)===401&&(document.location.href="/user/login")})},un=0;un<fn.length;un++)xn(un)}}),hr(wt),function(){wt.off("paste",jt)}}},[]);var Er=Object(b.useCallback)(function(){if($r.current)try{}catch(wt){console.log(wt,"---- to set md editor body height")}},[ia,$r,Rr]);Object(b.useEffect)(function(){function wt(){var Mt=new A.default(function(qt){var fn=Object(O.a)(qt),xn;try{for(fn.s();!(xn=fn.n()).done;){var un=xn.value;(un.target.offsetHeight>0||un.target.offsetWidth>0)&&(Er(),$e.setSize("100%","100%"),$e.refresh())}}catch(Kn){fn.e(Kn)}finally{fn.f()}});return Mt.observe(qr.current.parentElement),Mt}if($e){var jt=wt();return function(){jt.unobserve(qr.current.parentElement)}}},[$e,Er]),Object(b.useEffect)(function(){if($e){for(var wt=[],jt=function(){var un=qt[Mt];fn=Object(U.a)(un,2);var Kn=fn[0],xr=fn[1],nn=Object(_.a)({},Kn,function(){va(xr)});wt.push(nn),$e.addKeyMap(nn)},Mt=0,qt=Object.entries(q);Mt<qt.length;Mt++){var fn;jt()}return Zr.current=setInterval(function(){Ii.current&&ga()},4e3),function(){clearInterval(Zr.current);var xn=Object(O.a)(wt),un;try{for(xn.s();!(un=xn.n()).done;){var Kn=un.value;$e.removeKeyMap(Kn)}}catch(xr){xn.e(xr)}finally{xn.f()}}}},[$e]),Object(b.useEffect)(function(){Yn!==Rr&&Li(Yn)},[Yn]),Object(lt.a)(function(){if(!Mn&&Qt>0){var wt=new Date().getTime(),jt=window.sessionStorage.getItem(en);wt>=Qt+Ke&&(!jt||jt!==ri)&&(window.sessionStorage.setItem(en,ri),ii(!0))}},Ke),Object(b.useEffect)(function(){Ri(Zt)},[$e,Zt]),Object(b.useEffect)(function(){$e&&(Wt&&$e.focus())},[$e,Wt]),Object(b.useEffect)(function(){if(br&&$e){var wt=$e.getScrollerElement();function jt(Mt){var qt=Mt.target;if(Pi.current){var fn=qt.scrollTop/qt.scrollHeight;Pi.current.scrollTop=Pi.current.scrollHeight*fn}}return wt.addEventListener("scroll",jt),function(){wt.removeEventListener("scroll",jt)}}},[$e,br]),Object(b.useEffect)(function(){if($e&&Dr){function wt(jt,Mt){Dr(jt,Mt)}return $e.on("beforeChange",wt),function(){$e.off("beforeChange",wt)}}},[$e,Dr]),Object(b.useEffect)(function(){if($e&&on){function wt(){on($e.getValue())}return $e.on("blur",wt),function(){$e.off("blur",wt)}}},[$e,on]),Object(b.useEffect)(function(){if($e){function wt(jt){var Mt=jt.getValue();Or(Mt),Jr(new Date().getTime()),jt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),tt&&tt(Mt)}return $e.on("change",wt),function(){$e.off("change",wt)}}},[$e,tt]),Object(b.useEffect)(function(){$e&&(Pe==null?($e.setValue(""),Or("")):Pe!==$e.getValue()&&($e.setValue(Pe),Or(Pe),$e.setCursor($e.lineCount(),0)))},[$e,Pe]);var va=Object(b.useCallback)(function(wt){var jt=$e.getCursor(),Mt=$e.getSelection(),qt=Mt.split(`
|
|
`);switch(wt){case"bold":return $e.replaceSelection("**"+Mt+"**"),Mt===""&&$e.setCursor(jt.line,jt.ch+2),$e.focus();case"italic":return $e.replaceSelection("*"+Mt+"*"),Mt===""&&$e.setCursor(jt.line,jt.ch+1),$e.focus();case"code":return $e.replaceSelection("`"+Mt+"`"),Mt===""&&$e.setCursor(jt.line,jt.ch+1),$e.focus();case"inline-latex":return $e.replaceSelection("`$$"+Mt+"$$`"),Mt===""&&$e.setCursor(jt.line,jt.ch+3),$e.focus();case"latex":return $e.replaceSelection("```latex\n"+Mt+"\n```"),$e.setCursor(jt.line+1,Mt.length+1),$e.focus();case"line-break":return $e.replaceSelection(`<br/>
|
|
`),$e.focus();case"list-ul":return Mt===""?$e.replaceSelection("- "+Mt):$e.replaceSelection(qt.map(function(fn){return fn===""?"":"- ".concat(fn)}).join(`
|
|
`)),$e.focus();case"list-ol":return Mt===""?$e.replaceSelection("1. "+Mt):$e.replaceSelection(qt.map(function(fn,xn){return fn===""?"":"".concat(xn+1,". ").concat(fn)}).join(`
|
|
`)),$e.focus();case"add-null-ch":return Mt===""&&$e.setCursor(jt.line,jt.ch+1),$e.replaceSelection(Oe),$e.focus();case"inster-template-1":return Mt===""&&$e.setCursor(jt.line,jt.ch),$e.replaceSelection(We),$e.focus();case"eraser":return $e.setValue(""),$e.focus();case"trigger-watch":return Ri(!br),$e.focus();case"trigger-full-screen":return Li(!Rr),$e.focus();case ze:Bt(ze);return;case yt:Bt(yt);return;case Ge:Bt(Ge);return;case vt:Bt(vt);return;default:throw new Error}},[$e,br,Rr]),Gi=Object(b.useCallback)(function(wt){Bt("");switch(Rt){case ze:var jt=wt.title,Mt=wt.link;return $e.replaceSelection("[".concat(jt,"](").concat(Mt,")")),$e.focus();case yt:var qt=wt.language,fn=wt.content;return $e.replaceSelection(["```"+qt,fn,"```"].join(`
|
|
`)),$e.focus();case Ge:var xn=wt.src,un=wt.alt;return un?$e.replaceSelection(".concat(xn,' "').concat(un,'" )')):$e.replaceSelection("")),$e.focus();case vt:for(var Kn=wt.row,xr=wt.col,nn=wt.align,oi=`
|
|
`,yn=0;yn<Kn;yn++){for(var ur=[],or=[],Br=0;Br<xr;Br++)yn===1&&or.push(qe[nn]),ur.push(" ");yn===1&&(oi+="| ".concat(or.join(" | "),` |
|
|
`)),oi+="| ".concat(ur.join(xr===1?"":" | "),` |
|
|
`)}return $e.replaceSelection(oi+`
|
|
`),$e.focus();default:throw new Error}},[$e,Rt]),yi=Object(b.useMemo)(function(){switch(Rt){case ze:return E.a.createElement(pe,{callback:Gi,onCancel:Mr});case yt:return E.a.createElement(xe.b,{callback:Gi,onCancel:Mr});case Ge:return E.a.createElement(fe,{callback:Gi,onCancel:Mr});case vt:return E.a.createElement(Ze,{callback:Gi,onCancel:Mr});default:return null}},[Rt]);function Mr(){Bt("")}Object(b.useEffect)(function(){if(ai.current){var wt=ai.current,jt=!1,Mt=0;function qt(un){jt=!0,Mt=un.pageY}function fn(){jt=!1}function xn(un){if(jt){var Kn=un.pageY-Mt;Kn<0&&(Kn=0),Kn>300&&(Kn=300);var xr=St+Kn+"px";Hr(xr)}}return wt.addEventListener("mousedown",qt),document.addEventListener("mousemove",xn),document.addEventListener("mouseup",fn),function(){wt.removeEventListener("mousedown",qt),document.removeEventListener("mousemove",xn),document.removeEventListener("mouseup",fn)}}},[$e,ai]),Object(b.useEffect)(function(){Hr(St)},[St]);var Lr=ve(bt),aa=ve(ia),Ur={width:Lr,height:aa},oa=Object(b.useMemo)(function(){if(Qt){var wt=new Date(Qt),jt=wt.getHours(),Mt=wt.getMinutes(),qt=wt.getSeconds();return jt=jt<10?"0"+jt:jt,Mt=Mt<10?"0"+Mt:Mt,qt=qt<10?"0"+qt:qt,"".concat(jt,":").concat(Mt,":").concat(qt)}return 0},[Qt]);function sa(){window.sessionStorage.removeItem(en),ii(!1),Jr(0)}function ki(){ii(!1),Jr(0),$e.setValue(window.sessionStorage.getItem(en))}function Ba(wt,jt){var Mt=$e.getValue();Mt=Mt.replace(wt,jt),Or(Mt),$e==null||$e.setValue(Mt)}return E.a.createElement(b.Fragment,null,E.a.createElement("div",{className:"markdown-editor-wrapper",ref:$r},E.a.createElement("div",{className:"markdown-editor-container ".concat(Qe," ").concat(br?"on-preview":""," ").concat(Ft?"mini":""," ").concat(Rr?"full-screen":""),style:Ur},E.a.createElement(S,{insertTemp:pt,watch:br,fullScreen:Rr,showNullButton:Ln,onActionCallback:va,hidetoolBar:jr,uuid:vi.current,setOpenPhones:function(){Ii.current=!0}}),E.a.createElement("div",{className:"markdown-editor-body"},E.a.createElement("div",{className:"codemirror-container"},E.a.createElement("textarea",{ref:qr,placeholder:fi})),br?E.a.createElement("div",{ref:Pi,className:"preview-container"},Kt==="stex"&&E.a.createElement(D,{value:ri}),Kt!=="stex"&&E.a.createElement(h.a,{edit:!0,value:ri,replaces:Ba})):null))),Un?E.a.createElement("a",{ref:ai,className:"editor-resize"}):null,E.a.createElement(P.a,null,te[Rt]?E.a.createElement(K.a,{centered:!0,title:te[Rt],visible:!0,onCancel:Mr,footer:null,className:"markdown-popup-form"},yi):null))}},RMFE:function(Be,Ie){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0D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1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},SJMd:function(Be,Ie){/**
|
|
* @license
|
|
* Copyright (C) 2006 Google Inc.
|
|
*
|
|
* Licensed under the Apache 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 G,$,K,O=!1,B,C;window.PR_SHOULD_USE_CONTINUATION=!0;var L,U;(function(){var _=window,I=["break,continue,do,else,for,if,return,while"],M=[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"],b=[M,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],E=[b,"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"],R=[b,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],w=[b,"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",g=[b,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],u="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",a=[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"],s=[I,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],p=[E,w,R,g,u,a,l,s],d=/^(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",D="kwd",v="com",f="typ",m="lit",c="pun",o="pln",x="tag",y="dec",S="src",P="atn",F="atv",H="nocode",Y="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function j(He){for(var Ne=0,Ze=!1,ut=!1,dt=0,ze=He.length;dt<ze;++dt){var Ge=He[dt];if(Ge.ignoreCase)ut=!0;else if(/[a-z]/i.test(Ge.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ze=!0,ut=!1;break}}var yt={b:8,t:9,n:10,v:11,f:12,r:13};function vt(Fe){var Me=Fe.charCodeAt(0);if(Me!==92)return Me;var ot=Fe.charAt(1);return Me=yt[ot],Me||("0"<=ot&&ot<="7"?parseInt(Fe.substring(1),8):ot==="u"||ot==="x"?parseInt(Fe.substring(2),16):Fe.charCodeAt(1))}function mt(Fe){if(Fe<32)return(Fe<16?"\\x0":"\\x")+Fe.toString(16);var Me=String.fromCharCode(Fe);return Me==="\\"||Me==="-"||Me==="]"||Me==="^"?"\\"+Me:Me}function qe(Fe){var Me=Fe.substring(1,Fe.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")),ot=[],Ke=Me[0]==="^",Oe=["["];Ke&&Oe.push("^");for(var We=Ke?1:0,ve=Me.length;We<ve;++We){var le=Me[We];if(/\\[bdsw]/i.test(le))Oe.push(le);else{var de=vt(le),J;We+2<ve&&Me[We+1]==="-"?(J=vt(Me[We+2]),We+=2):J=de,ot.push([de,J]),J<65||de>122||(J<65||de>90||ot.push([Math.max(65,de)|32,Math.min(J,90)|32]),J<97||de>122||ot.push([Math.max(97,de)&~32,Math.min(J,122)&~32]))}}ot.sort(function(me,Re){return me[0]-Re[0]||Re[1]-me[1]});for(var q=[],te=[],We=0;We<ot.length;++We){var ie=ot[We];ie[0]<=te[1]+1?te[1]=Math.max(te[1],ie[1]):q.push(te=ie)}for(var We=0;We<q.length;++We){var ie=q[We];Oe.push(mt(ie[0])),ie[1]>ie[0]&&(ie[1]+1>ie[0]&&Oe.push("-"),Oe.push(mt(ie[1])))}return Oe.push("]"),Oe.join("")}function lt(Fe){for(var Me=Fe.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")),ot=Me.length,Ke=[],Oe=0,We=0;Oe<ot;++Oe){var ve=Me[Oe];if(ve==="(")++We;else if(ve.charAt(0)==="\\"){var le=+ve.substring(1);le&&(le<=We?Ke[le]=-1:Me[Oe]=mt(le))}}for(var Oe=1;Oe<Ke.length;++Oe)Ke[Oe]===-1&&(Ke[Oe]=++Ne);for(var Oe=0,We=0;Oe<ot;++Oe){var ve=Me[Oe];if(ve==="(")++We,Ke[We]||(Me[Oe]="(?:");else if(ve.charAt(0)==="\\"){var le=+ve.substring(1);le&&le<=We&&(Me[Oe]="\\"+Ke[le])}}for(var Oe=0;Oe<ot;++Oe)Me[Oe]==="^"&&Me[Oe+1]!=="^"&&(Me[Oe]="");if(Fe.ignoreCase&&Ze)for(var Oe=0;Oe<ot;++Oe){var ve=Me[Oe],de=ve.charAt(0);ve.length>=2&&de==="["?Me[Oe]=qe(ve):de!=="\\"&&(Me[Oe]=ve.replace(/[a-zA-Z]/g,function(te){var ie=te.charCodeAt(0);return"["+String.fromCharCode(ie&~32,ie|32)+"]"}))}return Me.join("")}for(var st=[],dt=0,ze=He.length;dt<ze;++dt){var Ge=He[dt];if(Ge.global||Ge.multiline)throw new Error(""+Ge);st.push("(?:"+lt(Ge)+")")}return new RegExp(st.join("|"),ut?"gi":"g")}function N(He,Ne){var Ze=/(?:^|\s)nocode(?:\s|$)/,ut=[],dt=0,ze=[],Ge=0;function yt(vt){var mt=vt.nodeType;if(mt==1){if(Ze.test(vt.className))return;for(var qe=vt.firstChild;qe;qe=qe.nextSibling)yt(qe);var lt=vt.nodeName.toLowerCase();(lt==="br"||lt==="li")&&(ut[Ge]=`
|
|
`,ze[Ge<<1]=dt++,ze[Ge++<<1|1]=vt)}else if(mt==3||mt==4){var st=vt.nodeValue;st.length&&(Ne?st=st.replace(/\r\n?/g,`
|
|
`):st=st.replace(/[ \t\r\n]+/g," "),ut[Ge]=st,ze[Ge<<1]=dt,dt+=st.length,ze[Ge++<<1|1]=vt)}}return yt(He),{sourceCode:ut.join("").replace(/\n$/,""),spans:ze}}function Z(He,Ne,Ze,ut,dt){if(!Ze)return;var ze={sourceNode:He,pre:1,langExtension:null,numberLines:null,sourceCode:Ze,spans:null,basePos:Ne,decorations:null};ut(ze),dt.push.apply(dt,ze.decorations)}var ne=/\S/;function pe(He){for(var Ne=void 0,Ze=He.firstChild;Ze;Ze=Ze.nextSibling){var ut=Ze.nodeType;Ne=ut===1?Ne?He:Ze:ut===3&&ne.test(Ze.nodeValue)?He:Ne}return Ne===He?void 0:Ne}function xe(He,Ne){var Ze={},ut;(function(){for(var Ge=He.concat(Ne),yt=[],vt={},mt=0,qe=Ge.length;mt<qe;++mt){var lt=Ge[mt],st=lt[3];if(st)for(var Fe=st.length;--Fe>=0;)Ze[st.charAt(Fe)]=lt;var Me=lt[1],ot=""+Me;vt.hasOwnProperty(ot)||(yt.push(Me),vt[ot]=null)}yt.push(/[\0-\uffff]/),ut=j(yt)})();var dt=Ne.length,ze=function(Ge){for(var yt=Ge.sourceCode,vt=Ge.basePos,mt=Ge.sourceNode,qe=[vt,o],lt=0,st=yt.match(ut)||[],Fe={},Me=0,ot=st.length;Me<ot;++Me){var Ke=st[Me],Oe=Fe[Ke],We=void 0,ve;if(typeof Oe=="string")ve=!1;else{var le=Ze[Ke.charAt(0)];if(le)We=Ke.match(le[1]),Oe=le[0];else{for(var de=0;de<dt;++de)if(le=Ne[de],We=Ke.match(le[1]),We){Oe=le[0];break}We||(Oe=o)}ve=Oe.length>=5&&Oe.substring(0,5)==="lang-",ve&&!(We&&typeof We[1]=="string")&&(ve=!1,Oe=S),ve||(Fe[Ke]=Oe)}var J=lt;if(lt+=Ke.length,!ve)qe.push(vt+J,Oe);else{var q=We[1],te=Ke.indexOf(q),ie=te+q.length;We[2]&&(ie=Ke.length-We[2].length,te=ie-q.length);var me=Oe.substring(5);Z(mt,vt+J,Ke.substring(0,te),ze,qe),Z(mt,vt+J+te,q,he(me,q),qe),Z(mt,vt+J+ie,Ke.substring(ie),ze,qe)}}Ge.decorations=qe};return ze}function je(He){var Ne=[],Ze=[];He.tripleQuotedStrings?Ne.push([h,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):He.multiLineStrings?Ne.push([h,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ne.push([h,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),He.verbatimStrings&&Ze.push([h,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ut=He.hashComments;ut&&(He.cStyleComments?(ut>1?Ne.push([v,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ne.push([v,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ze.push([h,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ne.push([v,/^#[^\r\n]*/,null,"#"])),He.cStyleComments&&(Ze.push([v,/^\/\/[^\r\n]*/,null]),Ze.push([v,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var dt=He.regexLiterals;if(dt){var ze=dt>1?"":`
|
|
\r`,Ge=ze?".":"[\\S\\s]",yt="/(?=[^/*"+ze+"])(?:[^/\\x5B\\x5C"+ze+"]|\\x5C"+Ge+"|\\x5B(?:[^\\x5C\\x5D"+ze+"]|\\x5C"+Ge+")*(?:\\x5D|$))+/";Ze.push(["lang-regex",RegExp("^"+Y+"("+yt+")")])}var vt=He.types;vt&&Ze.push([f,vt]);var mt=(""+He.keywords).replace(/^ | $/g,"");mt.length&&Ze.push([D,new RegExp("^(?:"+mt.replace(/[\s,]+/g,"|")+")\\b"),null]),Ne.push([o,/^\s+/,null,` \r
|
|
\xA0`]);var qe="^.[^\\s\\w.$@'\"`/\\\\]*";return He.regexLiterals&&(qe+="(?!s*/)"),Ze.push([m,/^@[a-z_$][a-z_$@0-9]*/i,null],[f,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[o,/^[a-z_$][a-z_$@0-9]*/i,null],[m,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[o,/^\\[\s\S]?/,null],[c,new RegExp(qe),null]),xe(Ne,Ze)}var Le=je({keywords:p,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function De(He,Ne,Ze){for(var ut=/(?:^|\s)nocode(?:\s|$)/,dt=/\r\n?|\n/,ze=He.ownerDocument,Ge=ze.createElement("li");He.firstChild;)Ge.appendChild(He.firstChild);var yt=[Ge];function vt(Me){var ot=Me.nodeType;if(ot==1&&!ut.test(Me.className))if(Me.nodeName==="br")mt(Me),Me.parentNode&&Me.parentNode.removeChild(Me);else for(var Ke=Me.firstChild;Ke;Ke=Ke.nextSibling)vt(Ke);else if((ot==3||ot==4)&&Ze){var Oe=Me.nodeValue,We=Oe.match(dt);if(We){var ve=Oe.substring(0,We.index);Me.nodeValue=ve;var le=Oe.substring(We.index+We[0].length);if(le){var de=Me.parentNode;de.insertBefore(ze.createTextNode(le),Me.nextSibling)}mt(Me),ve||Me.parentNode.removeChild(Me)}}}function mt(Me){for(;!Me.nextSibling;)if(Me=Me.parentNode,!Me)return;function ot(We,ve){var le=ve?We.cloneNode(!1):We,de=We.parentNode;if(de){var J=ot(de,1),q=We.nextSibling;J.appendChild(le);for(var te=q;te;te=q)q=te.nextSibling,J.appendChild(te)}return le}for(var Ke=ot(Me.nextSibling,0),Oe;(Oe=Ke.parentNode)&&Oe.nodeType===1;)Ke=Oe;yt.push(Ke)}for(var qe=0;qe<yt.length;++qe)vt(yt[qe]);Ne===(Ne|0)&&yt[0].setAttribute("value",Ne);var lt=ze.createElement("ol");lt.className="linenums";for(var st=Math.max(0,Ne-1|0)||0,qe=0,Fe=yt.length;qe<Fe;++qe)Ge=yt[qe],Ge.className="L"+(qe+st)%10,Ge.firstChild||Ge.appendChild(ze.createTextNode("\xA0")),lt.appendChild(Ge);He.appendChild(lt)}function Ce(He){var Ne=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ne=Ne&&+Ne[1]<=8;var Ze=/\n/g,ut=He.sourceCode,dt=ut.length,ze=0,Ge=He.spans,yt=Ge.length,vt=0,mt=He.decorations,qe=mt.length,lt=0;mt[qe]=dt;var st,Fe;for(Fe=st=0;Fe<qe;)mt[Fe]!==mt[Fe+2]?(mt[st++]=mt[Fe++],mt[st++]=mt[Fe++]):Fe+=2;for(qe=st,Fe=st=0;Fe<qe;){for(var Me=mt[Fe],ot=mt[Fe+1],Ke=Fe+2;Ke+2<=qe&&mt[Ke+1]===ot;)Ke+=2;mt[st++]=Me,mt[st++]=ot,Fe=Ke}qe=mt.length=st;var Oe=He.sourceNode,We="";Oe&&(We=Oe.style.display,Oe.style.display="none");try{for(var ve=null;vt<yt;){var le=Ge[vt],de=Ge[vt+2]||dt,J=mt[lt+2]||dt,Ke=Math.min(de,J),q=Ge[vt+1],te;if(q.nodeType!==1&&(te=ut.substring(ze,Ke))){Ne&&(te=te.replace(Ze,"\r")),q.nodeValue=te;var ie=q.ownerDocument,me=ie.createElement("span");me.className=mt[lt+1];var Re=q.parentNode;Re.replaceChild(me,q),me.appendChild(q),ze<de&&(Ge[vt+1]=q=ie.createTextNode(ut.substring(Ke,de)),Re.insertBefore(q,me.nextSibling))}ze=Ke,ze>=de&&(vt+=2),ze>=J&&(lt+=2)}}finally{Oe&&(Oe.style.display=We)}}var we={};function fe(He,Ne){for(var Ze=Ne.length;--Ze>=0;){var ut=Ne[Ze];we.hasOwnProperty(ut)?_.console&&console.warn("cannot override language handler %s",ut):we[ut]=He}}function he(He,Ne){return He&&we.hasOwnProperty(He)||(He=/^\s*</.test(Ne)?"default-markup":"default-code"),we[He]}fe(Le,["default-code"]),fe(xe([],[[o,/^[^<?]+/],[y,/^<!\w[^>]*(?:>|$)/],[v,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[c,/^(?:<[%?]|[%?]>)/],["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"]),fe(xe([[o,/^[\s]+/,null,` \r
|
|
`],[F,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[x,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[c,/^[=<>\/]+/],["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"]),fe(xe([],[[F,/^[\s\S]+/]]),["uq.val"]),fe(je({keywords:E,hashComments:!0,cStyleComments:!0,types:d}),["c","cc","cpp","cxx","cyc","m"]),fe(je({keywords:"null,true,false"}),["json"]),fe(je({keywords:w,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:d}),["cs"]),fe(je({keywords:R,cStyleComments:!0}),["java"]),fe(je({keywords:s,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),fe(je({keywords:a,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),fe(je({keywords:u,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),fe(je({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),fe(je({keywords:g,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),fe(je({keywords:A,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),fe(xe([],[[h,/^[\s\S]+/]]),["regex"]);function _e(He){var Ne=He.langExtension;try{var Ze=N(He.sourceNode,He.pre),ut=Ze.sourceCode;He.sourceCode=ut,He.spans=Ze.spans,He.basePos=0,he(Ne,ut)(He),Ce(He)}catch(dt){_.console&&console.log(dt&&dt.stack||dt)}}function at(He,Ne,Ze){var ut=Ze||!1,dt=Ne||null,ze=document.createElement("div");ze.innerHTML="<pre>"+He+"</pre>",ze=ze.firstChild,ut&&De(ze,ut,!0);var Ge={langExtension:dt,numberLines:ut,sourceNode:ze,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return _e(Ge),ze.innerHTML}function et(He,Ne){var Ze=Ne||document.body,ut=Ze.ownerDocument||document;function dt(le){return Ze.getElementsByTagName(le)}for(var ze=[dt("pre"),dt("code"),dt("xmp")],Ge=[],yt=0;yt<ze.length;++yt)for(var vt=0,mt=ze[yt].length;vt<mt;++vt)Ge.push(ze[yt][vt]);ze=null;var qe=Date;qe.now||(qe={now:function(){return+new Date}});var lt=0,st=/\blang(?:uage)?-([\w.]+)(?!\S)/,Fe=/\bprettyprint\b/,Me=/\bprettyprinted\b/,ot=/pre|xmp/i,Ke=/^code$/i,Oe=/^(?:pre|code|xmp)$/i,We={};function ve(){for(var le=_.PR_SHOULD_USE_CONTINUATION?qe.now()+250:Infinity;lt<Ge.length&&qe.now()<le;lt++){for(var de=Ge[lt],J=We,q=de;q=q.previousSibling;){var te=q.nodeType,ie=(te===7||te===8)&&q.nodeValue;if(ie?!/^\??prettify\b/.test(ie):te!==3||/\S/.test(q.nodeValue))break;if(ie){J={},ie.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Zt,pt,mn){J[pt]=mn});break}}var me=de.className;if((J!==We||Fe.test(me))&&!Me.test(me)){for(var Re=!1,Pe=de.parentNode;Pe;Pe=Pe.parentNode){var tt=Pe.tagName;if(Oe.test(tt)&&Pe.className&&Fe.test(Pe.className)){Re=!0;break}}if(!Re){de.className+=" prettyprinted";var Et=J.lang;if(!Et){Et=me.match(st);var bt;!Et&&(bt=pe(de))&&Ke.test(bt.tagName)&&(Et=bt.className.match(st)),Et&&(Et=Et[1])}var Ht;if(ot.test(de.tagName))Ht=1;else{var St=de.currentStyle,rt=ut.defaultView,Ft=St?St.whiteSpace:rt&&rt.getComputedStyle?rt.getComputedStyle(de,null).getPropertyValue("white-space"):0;Ht=Ft&&Ft.substring(0,3)==="pre"}var Ot=J.linenums;(Ot=Ot==="true"||+Ot)||(Ot=me.match(/\blinenums\b(?::(\d+))?/),Ot=Ot?Ot[1]&&Ot[1].length?+Ot[1]:!0:!1),Ot&&De(de,Ot,Ht);var Wt={langExtension:Et,sourceNode:de,numberLines:Ot,pre:Ht,sourceCode:null,basePos:null,spans:null,decorations:null};_e(Wt)}}}lt<Ge.length?_.setTimeout(ve,250):typeof He=="function"&&He()}ve()}var it=_.PR={createSimpleLexer:xe,registerLangHandler:fe,sourceDecorator:je,PR_ATTRIB_NAME:P,PR_ATTRIB_VALUE:F,PR_COMMENT:v,PR_DECLARATION:y,PR_KEYWORD:D,PR_LITERAL:m,PR_NOCODE:H,PR_PLAIN:o,PR_PUNCTUATION:c,PR_SOURCE:S,PR_STRING:h,PR_TAG:x,PR_TYPE:f,prettyPrintOne:O?_.prettyPrintOne=at:L=at,prettyPrint:U=O?_.prettyPrint=et:U=et},gt=_.define;typeof gt=="function"&>.amd&>("google-code-prettify",[],function(){return it})})()},SMhR:function(Be,Ie){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcYAAAHGCAYAAADuYispAAAAAklEQVR4AewaftIAABHTSURBVO3BQY4cy5IEQdNA3//KNo2/8NU8XzCQyCpSReivSJKk/zmRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7yMiB/s7a5AWTTNhsgN9pmA2TTNp8MyI22uQHkv7TNDSCbttkAudE2bwJyo22eBGTTNhsgf7O2ecuJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpPGTD9c2nwzIk9pmA2TTNjeAPAnIpm1uANm0zQbIDSBPAXIDyKZtPhmQG22zAfLN2uaTAflUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGT74ckCe1zZOAbNpm0zYbIDfaZgPkRts8qW1utM0GyKZtntI2GyBPArJpmw2QTds8CcimbW4A+WRAntQ23+pEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0viJXtU2T2qbDZA3Adm0zZOAbNpm0zYbIJu2+VZtswGyaZsbbbMBsmmbDZBN29xoG32mE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJ3oVkCe1zZPaZgNk0zYbIJu2eRKQJ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jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4/8ATrCgy9kbxW8AAAAASUVORK5CYII="},TGq3:function(Be,Ie,G){Be.exports=G.p+"static/lockclose.365036e8.svg"},UUDw:function(Be,Ie,G){Be.exports={buttonFixed:"buttonFixed___2zLVJ",button:"button___-JgFH",buttonWrap:"buttonWrap___aZhhk"}},UeE2:function(Be,Ie,G){"use strict";G.r(Ie);var $=G("5NDa"),K=G("5rEg"),O=G("7Kak"),B=G("9yH6"),C=G("2qtc"),L=G("kLXV"),U=G("+L6B"),_=G("2/Rp"),I=G("miYZ"),M=G("tsqr"),b=G("9og8"),E=G("k1fw"),R=G("y8nQ"),w=G("Vl3Y"),A=G("tJVT"),g=G("PpiC"),u=G("Znn+"),a=G("ZTPi"),l=G("WmNS"),s=G.n(l),p=G("cDcd"),d=G.n(p),h=G("9kvl"),D=G("Ot1p"),v=G("9Bee"),f=G("HBuW"),m=G("14J3"),c=G("BMrR"),o=G("jCWc"),x=G("kPKH"),y=G("OaEy"),S=G("2fM7"),P=G("1vsH"),F=G("uIXO"),H=G.n(F),Y=G("5Dmo"),j=G("3S7+"),N=G("oBTY"),Z=G("WXWZ"),ne=G.n(Z),pe=["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"],xe=function(lt,st){var Fe=lt.editData,Me=Object(p.useState)(["","","",""]),ot=Object(A.a)(Me,2),Ke=ot[0],Oe=ot[1],We=Object(p.useState)(),ve=Object(A.a)(We,2),le=ve[0],de=ve[1],J=Object(p.useState)([]),q=Object(A.a)(J,2),te=q[0],ie=q[1],me=Object(p.useState)(""),Re=Object(A.a)(me,2),Pe=Re[0],tt=Re[1];Object(p.useEffect)(function(){var St,rt;if(!Fe)return;tt(Fe==null?void 0:Fe.subject),Oe(Fe==null||((St=Fe.choose_contents)===null||St===void 0)?void 0:St.map(function(Ot){return Ot.option_name}));var Ft=[];Fe==null||((rt=Fe.choose_contents)===null||rt===void 0)||rt.map(function(Ot,Wt){Ot.right_key&&Ft.push(Wt)}),ie(Ft)},[Fe]),Object(p.useImperativeHandle)(st,function(){return{onSave:bt,Clear:Ht}});var Et=function(){for(var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ft=Object(N.a)(rt),Ot=Ft.sort(),Wt=0;Wt<Ot.length-1;Wt++)if(Ot[Wt]==Ot[Wt+1])return!0;return!1},bt=function(){if(!Pe)return M.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;var rt=Ke.findIndex(function(Ot){return!Ot});if(rt>-1)return M.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(pe[rt]," \u9009\u9879\u7684\u5185\u5BB9")),!1;if(console.log(Ke,"questionChoiceList"),Et(Ke))return M.b.info("\u9009\u9879\u5DF2\u91CD\u590D"),!1;if(!te.length)return M.b.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;var Ft=Ke.map(function(Ot,Wt){return{choice_text:Ot,is_answer:te.includes(Wt)?1:0}});return{name:Pe,choices:Ft}},Ht=function(){Oe(["","","",""]),tt(""),ie([])};return d.a.createElement("section",{className:ne.a.wrap},d.a.createElement("p",{className:ne.a.titleWrap},d.a.createElement("span",{className:ne.a.required},"*"),d.a.createElement("span",{className:ne.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(D.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Pe,onChange:function(rt){return tt(rt)}}),d.a.createElement("p",{className:ne.a.titleWrap},d.a.createElement("span",{className:ne.a.required},"*"),d.a.createElement("span",{className:ne.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:ne.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Ke.map(function(St,rt){return d.a.createElement("div",{className:ne.a.choiceWrap,key:rt},d.a.createElement(j.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},d.a.createElement("div",{className:"".concat(ne.a.answer," ").concat(te.includes(rt)?ne.a.activeAnswer:""),onClick:function(){te.includes(rt)?ie(te.filter(function(Ot){return Ot!==rt})):ie([].concat(Object(N.a)(te),[rt]))}},pe[rt])),d.a.createElement("div",{className:ne.a.editorWrap},le===rt?d.a.createElement(D.a,{id:"single-question-option-".concat(rt),watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:St,onChange:function(Ot){Ke[rt]=Ot,Oe(Ke)}}):d.a.createElement("div",{className:ne.a.htmlWrap,onClick:function(){return de(rt)}},d.a.createElement(v.a,{value:St}))),rt>1&&d.a.createElement(j.a,{title:"\u5220\u9664"},d.a.createElement("i",{className:"".concat(ne.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return Oe(Ke.filter(function(Ot,Wt){return Wt!==rt}))}})),rt<7&&rt===Ke.length-1&&d.a.createElement(j.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},d.a.createElement("i",{className:"".concat(ne.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return Oe([].concat(Object(N.a)(Ke),[""]))}})))}),d.a.createElement("div",{className:"mt10 mb10"},d.a.createElement("span",{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")))},je=Object(p.forwardRef)(xe),Le=G("sRBo"),De=G("kaz8"),Ce=G("kqOp"),we=G("7qnI"),fe=function(lt,st){var Fe=lt.editData,Me=Object(p.useState)(""),ot=Object(A.a)(Me,2),Ke=ot[0],Oe=ot[1],We=Object(p.useState)([]),ve=Object(A.a)(We,2),le=ve[0],de=ve[1],J=Object(p.useState)(""),q=Object(A.a)(J,2),te=q[0],ie=q[1],me=Object(p.useState)(),Re=Object(A.a)(me,2),Pe=Re[0],tt=Re[1],Et=Object(p.useState)(!1),bt=Object(A.a)(Et,2),Ht=bt[0],St=bt[1];Object(p.useEffect)(function(){if(!Fe)return;Oe(Fe==null?void 0:Fe.subject),tt(Fe==null?void 0:Fe.is_ordered),St(!0)},[Fe]),Object(p.useEffect)(function(){var Kt;if(!Ht)return;var Dt=Fe==null||((Kt=Fe.standard_answers)===null||Kt===void 0)?void 0:Kt.map(function(en){return en.text});de(Dt),St(!1)},[Ht]),Object(p.useImperativeHandle)(st,function(){return{onSave:rt,Clear:Ft}}),console.log(le,"answerList");var rt=function(){var Dt=[],en=!1;return le.forEach(function(Je,Un){Dt.push({position:Un+1,answer_text:[]}),Je.forEach(function(Tn,Mn){Dt[Un].answer_text.push(Tn),(!Tn||!Object(P.fb)(Tn,1e4))&&(ie("".concat(Un,"-").concat(Mn)),M.b.info(Tn?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),en=!0)})}),en?!1:(Dt==null?void 0:Dt.length)>20?(M.b.warn("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:Ke,standard_answers:Dt,is_ordered:Pe}},Ft=function(){Oe(""),de([]),tt(!1)},Ot=function(Dt,en,Je){var Un=le.slice();if(en&&Un.splice(Dt,en),Je)for(var Tn=0;Tn<Je;Tn++)Un.splice(Dt+Tn,0,[""]);de(Un)},Wt=function(Dt,en,Je){ie("");var Un=le.slice();Un[Dt][en]=Je,de(Un)},Zt=function(Dt){var en=le.slice();en[Dt]=[].concat(Object(N.a)(en[Dt]),[""]),de(en)},pt=function(Dt,en){var Je=le.slice();if(!Je[Dt][en]){Je[Dt]=Je[Dt].filter(function(Un,Tn){return Tn!==en}),de(Je);return}L.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:ne.a.modal,onOk:function(){Je[Dt]=Je[Dt].filter(function(Tn,Mn){return Mn!==en}),de(Je)}})},mn=function(Dt){L.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:ne.a.modal,onOk:function(){var Je=le.slice();Je=le.filter(function(Un,Tn){return Dt!==Tn}),de(Je)}})};return d.a.createElement("section",{className:ne.a.wrap},d.a.createElement("p",{className:ne.a.titleWrap},d.a.createElement("span",{className:ne.a.required},"*"),d.a.createElement("span",{className:ne.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement("div",null,d.a.createElement(Ce.a,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:Ke,onChange:function(Dt){return Oe(Dt)},showNullButton:!0,onPlaceholderChange:Ot})),d.a.createElement("div",{className:"mt20"},le.map(function(Kt,Dt){return d.a.createElement(we.a,{key:Dt,answers:Kt,index:Dt,is_md:!0,activeOptionErrorIndex:te,onAnswerChange:Wt,addChildAnswer:Zt,deleteChildAnswer:pt,deleteChildAnswermain:mn})})),d.a.createElement("div",{className:"mt10 mb5"},le.length>1&&d.a.createElement("span",null,d.a.createElement(De.a,{checked:Pe,onChange:function(Dt){return tt(Dt.target.checked)},className:ne.a.color333},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),d.a.createElement("span",{className:"".concat(ne.a.color999," font12")},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))))},he=Object(p.forwardRef)(fe),_e=["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"],at=function(lt,st){var Fe=lt.editData,Me=Object(p.useState)(),ot=Object(A.a)(Me,2),Ke=ot[0],Oe=ot[1],We=Object(p.useState)(""),ve=Object(A.a)(We,2),le=ve[0],de=ve[1];Object(p.useEffect)(function(){if(!Fe)return;de(Fe==null?void 0:Fe.subject),Oe((Fe==null?void 0:Fe.standard_answer)==="\u6B63\u786E"?"0":"1")},[Fe]),Object(p.useImperativeHandle)(st,function(){return{onSave:J,Clear:q}});var J=function(){if(!le)return M.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(!Ke)return M.b.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u5224\u65AD\u9898\u7684\u6B63\u786E\u9009\u9879"),!1;var ie=[{choice_text:"\u6B63\u786E",is_answer:Ke==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Ke==="1"?1:0}];return{name:le,choices:ie}},q=function(){de(""),Oe("")};return d.a.createElement("section",{className:ne.a.wrap},d.a.createElement("p",{className:ne.a.titleWrap},d.a.createElement("span",{className:ne.a.required},"*"),d.a.createElement("span",{className:ne.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(D.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:le,onChange:function(ie){return de(ie)}}),d.a.createElement("p",{className:ne.a.titleWrap},d.a.createElement("span",{className:ne.a.required},"*"),d.a.createElement("span",{className:ne.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:ne.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),d.a.createElement(B.a.Group,{className:"mb10",buttonStyle:"solid",value:Ke,onChange:function(ie){return Oe(ie.target.value)}},d.a.createElement(B.a.Button,{value:"0",className:"".concat(ne.a.radio," mr40")},"\u6B63\u786E"),d.a.createElement(B.a.Button,{value:"1",className:ne.a.radio},"\u9519\u8BEF")))},et=Object(p.forwardRef)(at),it=function(lt){var st=lt.visible,Fe=st===void 0?!1:st,Me=lt.is_published,ot=lt.match,Ke=lt.editData,Oe=lt.onOk,We=lt.onCancel,ve=Object(p.useState)([10,20]),le=Object(A.a)(ve,2),de=le[0],J=le[1],q=w.a.useForm(),te=Object(A.a)(q,1),ie=te[0],me=Object(p.useState)({}),Re=Object(A.a)(me,2),Pe=Re[0],tt=Re[1],Et=Object(p.useRef)();Object(p.useEffect)(function(){return document.getElementById("modal-level-question").style.transform="none",function(){document.getElementById("modal-level-question").style.transform="translateX(0)"}},[]),Object(p.useEffect)(function(){Fe&&Ke&&(ie.setFieldsValue(Object(E.a)({},Ke)),J(bt[Ke.difficult]))},[Fe]);var bt={1:[10,20],2:[30,40,50,60],3:[70,80,90,100]},Ht=function(Zt,pt){tt(Object(E.a)({},pt)),"difficult"in Zt&&rt(Zt.difficult)},St=function(){var Wt=Object(b.a)(s.a.mark(function Zt(){var pt,mn,Kt,Dt,en,Je,Un;return s.a.wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:return Mn.next=2,Et.current.onSave();case 2:if(pt=Mn.sent,pt){Mn.next=5;break}return Mn.abrupt("return",!1);case 5:if(!(Fe===1)){Mn.next=11;break}return mn="",Kt={cnt:pt==null?void 0:pt.choices.map(function(fr){return fr.choice_text})},Dt={answer:pt==null?void 0:pt.choices.map(function(fr){return fr.is_answer})},Dt==null||Dt.answer.map(function(fr,Ln){fr&&(mn+=P.o[Ln])}),Mn.abrupt("return",{challenge_choose:{subject:pt.name,answer:Pe.task_pass,standard_answer:mn,score:Pe.score,difficult:Pe.difficult},question:Kt,choice:Dt});case 11:if(!(Fe===2)){Mn.next=13;break}return Mn.abrupt("return",{challenge_choose:{subject:pt.name,answer:Pe.task_pass,score:Pe.score,difficult:Pe.difficult},blank_answers:pt==null?void 0:pt.standard_answers,is_ordered:pt==null?void 0:pt.is_ordered});case 13:if(!(Fe===3)){Mn.next=16;break}return Un=pt!=null&&(en=pt.choices)!==null&&en!==void 0&&(Je=en[0])!==null&&Je!==void 0&&Je.is_answer?"true":"false",Mn.abrupt("return",{challenge_choose:{subject:pt.name,answer:Pe.task_pass,standard_answer:Un,score:Pe.score,difficult:Pe.difficult}});case 16:case"end":return Mn.stop()}},Zt)}));return function(){return Wt.apply(this,arguments)}}(),rt=function(Zt){var pt=bt[Zt],mn=pt==null?void 0:pt[0];J(pt),ie.setFieldsValue({score:mn}),tt(Object(E.a)(Object(E.a)({},ie.getFieldsValue()),{score:mn}))},Ft=function(){var Wt=Object(b.a)(s.a.mark(function Zt(pt){var mn,Kt,Dt;return s.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Je.next=2,St();case 2:if(mn=Je.sent,mn){Je.next=5;break}return Je.abrupt("return");case 5:if(!Ke){Je.next=25;break}return Je.t0=f.Nb,Je.t1=E.a,Je.t2=E.a,Je.t3=E.a,Je.t4={},Je.next=13,mn;case 13:return Je.t5=Je.sent,Je.t6=(0,Je.t3)(Je.t4,Je.t5),Je.t7=ot.params,Je.t8=(0,Je.t2)(Je.t6,Je.t7),Je.t9={},Je.t10={questionId:Ke.choose_id,type:Fe},Je.t11=(0,Je.t1)(Je.t8,Je.t9,Je.t10),Je.next=22,(0,Je.t0)(Je.t11);case 22:return Kt=Je.sent,Kt.challenge_choose_id&&(M.b.success("\u64CD\u4F5C\u6210\u529F"),Oe()),Je.abrupt("return");case 25:return Je.t12=f.c,Je.t13=E.a,Je.t14=E.a,Je.t15=E.a,Je.t16={},Je.next=32,mn;case 32:return Je.t17=Je.sent,Je.t18=(0,Je.t15)(Je.t16,Je.t17),Je.t19=ot.params,Je.t20=(0,Je.t14)(Je.t18,Je.t19),Je.t21={},Je.t22={type:Fe},Je.t23=(0,Je.t13)(Je.t20,Je.t21,Je.t22),Je.next=41,(0,Je.t12)(Je.t23);case 41:Dt=Je.sent,Dt.challenge_choose_id&&(M.b.success("\u64CD\u4F5C\u6210\u529F"),Oe());case 43:case"end":return Je.stop()}},Zt)}));return function(pt){return Wt.apply(this,arguments)}}(),Ot=function(){var Wt=Object(b.a)(s.a.mark(function Zt(){var pt;return s.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:return Kt.next=2,Et.current.onSave();case 2:if(pt=Kt.sent,pt){Kt.next=5;break}return Kt.abrupt("return",!1);case 5:ie.submit();case 6:case"end":return Kt.stop()}},Zt)}));return function(){return Wt.apply(this,arguments)}}();return d.a.createElement("div",{className:H.a.modal},d.a.createElement("div",{className:H.a.main},d.a.createElement("div",{className:H.a.title},d.a.createElement("span",{className:H.a.name},Ke?"\u7F16\u8F91\u9898\u76EE":"\u6DFB\u52A0\u9898\u76EE"),d.a.createElement("span",{className:H.a.edit,onClick:We}," ",d.a.createElement("i",{className:"iconfont icon-guanbi1"})," ")),d.a.createElement("div",{className:H.a.body,id:"question-scroll"},d.a.createElement(w.a,{form:ie,className:H.a.form,scrollToFirstError:!0,layout:"vertical",onValuesChange:Ht,onFinish:Ft,initialValues:{difficult:1,score:10}},Fe===1&&d.a.createElement(je,{ref:Et,editData:Ke}),Fe===2&&d.a.createElement(he,{ref:Et,editData:Ke}),Fe===3&&d.a.createElement(et,{ref:Et,editData:Ke}),d.a.createElement(w.a.Item,{name:"task_pass",label:"\u53C2\u8003\u7B54\u6848:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u53C2\u8003\u7B54\u6848"},{max:35e3,message:"\u53C2\u8003\u7B54\u6848\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},d.a.createElement(D.a,{className:"mt5",watch:!0,defaultValue:(Ke==null?void 0:Ke.answer)||""})),d.a.createElement(w.a.Item,{name:"difficult",label:"\u96BE\u5EA6\u7CFB\u6570:",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6\u7CFB\u6570"}]},d.a.createElement(B.a.Group,{disabled:Me},d.a.createElement(B.a,{value:1},"\u7B80\u5355"),d.a.createElement(B.a,{style:{marginLeft:80},value:2},"\u4E2D\u7B49"),d.a.createElement(B.a,{style:{marginLeft:80},className:"ml80",value:3},"\u56F0\u96BE"))),d.a.createElement(c.a,{className:"customAddItemSelect"},d.a.createElement(x.a,null,d.a.createElement(w.a.Item,{name:"score",label:"\u5956\u52B1\u91D1\u5E01:",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5956\u52B1\u7ECF\u9A8C\u503C"}]},d.a.createElement(S.a,{size:"large",disabled:Me},de.map(function(Wt){return d.a.createElement(S.a.Option,{key:Wt,value:Wt},Wt)})))),d.a.createElement(x.a,{style:{paddingTop:18}},d.a.createElement("div",{className:"font12 c-light-black ml10 mt20"},"\u5B66\u5458\u6B63\u786E\u7B54\u9898\u65F6\u83B7\u5F97\u91D1\u5E01\uFF0C\u5E76\u4E14\u83B7\u5F97\u7B49\u91CF\u7684\u7ECF\u9A8C\u503C\u3002\u5982\uFF1A+100\u91D1\u5E01\u3001+100\u7ECF\u9A8C\u503C\u3002"))))),d.a.createElement("div",{className:H.a.btns},d.a.createElement(_.a,{size:"large",style:{marginRight:20},onClick:We},"\u53D6\u6D88"),d.a.createElement(_.a,{size:"large",type:"primary",onClick:Ot},"\u4FDD\u5B58"))))},gt=it,He=G("mepR"),Ne=G.n(He),Ze=G("9ZNV"),ut=G("nuEh"),dt=G("UqFu"),ze=G("lzim"),Ge=G("xKgJ"),yt=a.a.TabPane,vt=function(lt){var st,Fe,Me=lt.shixunsDetail,ot=lt.practiceSetting,Ke=lt.dispatch,Oe=lt.match,We=lt.location,ve=Object(g.a)(lt,["shixunsDetail","practiceSetting","dispatch","match","location"]),le=w.a.useForm(),de=Object(A.a)(le,1),J=de[0],q=Object(p.useState)({}),te=Object(A.a)(q,2),ie=te[0],me=te[1],Re=Object(p.useState)([]),Pe=Object(A.a)(Re,2),tt=Pe[0],Et=Pe[1],bt=Object(p.useState)(!0),Ht=Object(A.a)(bt,2),St=Ht[0],rt=Ht[1],Ft=Object(p.useState)(!0),Ot=Object(A.a)(Ft,2),Wt=Ot[0],Zt=Ot[1],pt=Object(p.useState)(!1),mn=Object(A.a)(pt,2),Kt=mn[0],Dt=mn[1],en=Object(p.useState)(null),Je=Object(A.a)(en,2),Un=Je[0],Tn=Je[1],Mn=Object(p.useState)(null),fr=Object(A.a)(Mn,2),Ln=fr[0],Tt=fr[1],jr=Object(p.useState)("1"),ti=Object(A.a)(jr,2),Yn=ti[0],on=ti[1],Dr=Object(p.useState)(1),Nr=Object(A.a)(Dr,2),Yr=Nr[0],Qe=Nr[1],Lt=Object(p.useRef)({subject:"",task_pass:""}),Wr=Object(p.useRef)(null),ni=ot.is_published,fi=ot.id,Kr=Me.challengesEdit,hi=["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"];Object(p.useEffect)(function(){var vn;return We!=null&&(vn=We.query)!==null&&vn!==void 0&&vn.tab&&on(We.query.tab),$e(),hr(),function(){clearTimeout(Wr.current)}},[We.pathname]);var Ut=function(){clearTimeout(Wr.current),Wr.current=setTimeout(function(){var Rt=J.getFieldsValue(),Bt=Rt.subject,tn=Rt.task_pass;Lt.current.subject!==""&&(Bt!==Lt.current.subject||tn!==Lt.current.task_pass?Ke({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!0}}):Ke({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}}))},500)},Ki=function(Rt,Bt){me(Object(E.a)({},Bt)),Ut()},$e=function(){var vn=Object(b.a)(s.a.mark(function Rt(){var Bt;return s.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return Zt(!0),pn.next=3,Ke({type:"shixunsDetail/getChallengesEdit",payload:Object(E.a)({},Oe.params)});case 3:Bt=pn.sent,Tt(Object(E.a)({},Bt)),Lt.current={subject:Bt.subject,task_pass:Object(dt.a)(Bt.task_pass),unity_3d_routes:Bt.unity_3d_routes},me(Object(E.a)({},Lt.current)),J.setFieldsValue(Object(E.a)({},Bt)),Zt(!1);case 9:case"end":return pn.stop()}},Rt)}));return function(){return vn.apply(this,arguments)}}(),hr=function(){var vn=Object(b.a)(s.a.mark(function Rt(){var Bt;return s.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return rt(!0),pn.next=3,Object(f.bb)(Object(E.a)({},Oe.params));case 3:Bt=pn.sent,Et(Bt.data),rt(!1);case 6:case"end":return pn.stop()}},Rt)}));return function(){return vn.apply(this,arguments)}}(),mr=function(){var vn=Object(b.a)(s.a.mark(function Rt(Bt){var tn,pn,Qt;return s.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return tn=!(!Bt.unity_3d_routes||Bt.unity_3d_routes==""),pn=Object(E.a)(Object(E.a)(Object(E.a)({},Bt),Oe.params),{},{unity_3d_routes:tn?Bt.unity_3d_routes:null,unity_3d:tn}),ir.next=4,Object(f.Mb)(pn);case 4:Qt=ir.sent,Qt.status===0&&(M.b.success(Qt.message),Ke({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}}),Ke({type:"practiceSetting/setUpdateIndex"}),on("2"),Mi());case 6:case"end":return ir.stop()}},Rt)}));return function(Bt){return vn.apply(this,arguments)}}(),Di=function(){return Yn==="1"?null:d.a.createElement("div",{className:"mb10"},d.a.createElement(_.a,{onClick:function(){return Dt(1)},type:"primary",ghost:!0},"\u6DFB\u52A0\u9009\u62E9\u9898"),d.a.createElement(_.a,{onClick:function(){return Dt(2)},type:"primary",className:"ml20 mr20",ghost:!0},"\u6DFB\u52A0\u586B\u7A7A\u9898"),d.a.createElement(_.a,{onClick:function(){return Dt(3)},type:"primary",ghost:!0},"\u6DFB\u52A0\u5224\u65AD\u9898"))},ri=function(Rt){var Bt,tn=function(){on(Rt),Mi(),Ke({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};ot!=null&&(Bt=ot.sideBar)!==null&&Bt!==void 0&&Bt.confirmLeave?L.a.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:function(){tn()}}):tn()},Or=function(Rt){var Bt=function(){var tn=Object(b.a)(s.a.mark(function pn(){var Qt;return s.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return ir.next=2,Object(f.w)(Object(E.a)(Object(E.a)({},Oe.params),{},{questionId:Rt}));case 2:Qt=ir.sent,Qt.challenge_id&&(hr(),M.b.success("\u5220\u9664\u6210\u529F"));case 4:case"end":return ir.stop()}},pn)}));return function(){return tn.apply(this,arguments)}}();L.a.confirm({title:"\u63D0\u793A",content:"\u662F\u5426\u5220\u9664\u9898\u76EE!",centered:!0,onOk:Bt})},mi=function(){var vn=Object(b.a)(s.a.mark(function Rt(Bt){var tn;return s.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return Qt.next=2,Object(f.Ib)(Object(E.a)(Object(E.a)({},Oe.params),{},{questionId:Bt}));case 2:tn=Qt.sent,tn.status===0&&hr();case 4:case"end":return Qt.stop()}},Rt)}));return function(Bt){return vn.apply(this,arguments)}}(),Oi=function(){var vn=Object(b.a)(s.a.mark(function Rt(Bt){var tn;return s.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return Qt.next=2,Object(f.C)(Object(E.a)(Object(E.a)({},Oe.params),{},{questionId:Bt}));case 2:tn=Qt.sent,tn.status===0&&hr();case 4:case"end":return Qt.stop()}},Rt)}));return function(Bt){return vn.apply(this,arguments)}}(),br=function(){var vn=Object(b.a)(s.a.mark(function Rt(Bt){var tn;return s.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return Qt.next=2,Object(f.Q)(Object(E.a)(Object(E.a)({},Oe.params),{},{questionId:Bt}));case 2:tn=Qt.sent,Tn(Object(E.a)(Object(E.a)({},tn),{},{choose_id:Bt})),Dt((tn==null?void 0:tn.question_name)==="\u5355\u9009\u9898/\u591A\u9009\u9898"?1:(tn==null?void 0:tn.question_name)==="\u586B\u7A7A\u9898"?2:3);case 5:case"end":return Qt.stop()}},Rt)}));return function(Bt){return vn.apply(this,arguments)}}(),Ri=function(){pi()},Mi=function(){Qe(Yr+1),$e()},pi=function(){var Rt,Bt=function(){h.d.push("/shixuns/".concat(fi,"/challenges")),Ke({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};ot!=null&&(Rt=ot.sideBar)!==null&&Rt!==void 0&&Rt.confirmLeave?L.a.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:function(){Bt()}}):Bt()},Rr=function(){return tt.map(function(Rt,Bt){var tn=Rt.challenge_choose_id,pn=Rt.subject,Qt=Rt.choose_contents,Jr=Rt.standard_answer,ir=Rt.answer,Hi=Rt.score,ia=Rt.category,Hr=Rt.question_name,pr=Rt.standard_answers;return d.a.createElement("div",{key:tn,className:Ne.a.list},d.a.createElement("div",{className:Ne.a.top},d.a.createElement("div",{className:Ne.a.left},d.a.createElement("div",{className:Ne.a.title},d.a.createElement("div",{className:Ne.a.fs},Bt+1,". "),d.a.createElement(v.a,{value:pn})),Hr==="\u5355\u9009\u9898/\u591A\u9009\u9898"&&(Qt==null?void 0:Qt.map(function(ar,gi){return d.a.createElement("ul",{key:gi,className:ar.right_key?Ne.a.qsActive:Ne.a.qs},d.a.createElement("li",null,hi[ar.position]),d.a.createElement("li",null,d.a.createElement(v.a,{value:ar.option_name})))})),Hr==="\u5224\u65AD\u9898"&&d.a.createElement(B.a.Group,{className:"mb10",buttonStyle:"solid",value:Jr},d.a.createElement(B.a,{value:"\u6B63\u786E",className:"".concat(Ne.a.radio," mr40")},"\u6B63\u786E"),d.a.createElement(B.a,{value:"\u9519\u8BEF",className:Ne.a.radio},"\u9519\u8BEF"))),d.a.createElement("div",{className:Ne.a.right},d.a.createElement("i",{onClick:function(){return br(tn)},className:"iconfont icon-xiaoxiugai"}),d.a.createElement("i",{onClick:function(){return Or(tn)},className:"iconfont icon-shanchu23"}),Bt!==tt.length-1&&d.a.createElement("i",{onClick:function(){return Oi(tn)},className:"iconfont icon-xiayi2"}),Bt!==0&&d.a.createElement("i",{onClick:function(){return mi(tn)},className:"iconfont icon-shangyi2"}))),d.a.createElement("div",{className:Ne.a.bt},"\u9898\u578B\uFF1A",Hr,"\xA0\xA0\xA0\xA0\u5956\u52B1\u91D1\u5E01\uFF1A",Hi),d.a.createElement("div",{className:Ne.a.answer},Hr==="\u586B\u7A7A\u9898"?pr==null?void 0:pr.map(function(ar,gi){var ii;return d.a.createElement("p",{key:gi},"\u586B\u7A7A",gi+1,"\uFF1A",ar==null||((ii=ar.text)===null||ii===void 0)?void 0:ii.join("\u3001"))}):d.a.createElement("p",null,"\u6807\u51C6\u7B54\u6848\uFF1A",Jr),d.a.createElement("p",null,d.a.createElement("div",{className:Ne.a.fs},"\u53C2\u8003\u7B54\u6848\uFF1A"),d.a.createElement(v.a,{value:ir}))))})},Li=function(){Dt(!1),Tn(null),hr()},ra=function(){Dt(!1),Tn(null)};return d.a.createElement("section",{className:Ne.a.bg,style:{marginBottom:Yn==="1"?67:0}},d.a.createElement(a.a,{activeKey:Yn,onChange:ri,tabBarExtraContent:Di()},d.a.createElement(yt,{tab:"\u672C\u5173\u4EFB\u52A1",key:"1"},d.a.createElement(w.a,{key:Yr,form:J,scrollToFirstError:!0,className:Ne.a.formWrap,layout:"vertical",onValuesChange:Ki,onFinish:mr},d.a.createElement("div",{className:Ne.a.fieldWrap},d.a.createElement(w.a.Item,{initialValue:"",name:"subject",label:"\u4EFB\u52A1\u540D\u79F0:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},d.a.createElement(K.a,{bordered:!1,maxLength:60,suffix:"".concat(((st=ie.subject)===null||st===void 0?void 0:st.length)||0,"/60"),placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),d.a.createElement("div",{className:Ne.a.mdWrap},d.a.createElement(w.a.Item,{name:"task_pass",label:"\u4EFB\u52A1\u8981\u6C42:",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"}]},d.a.createElement(D.a,{key:Oe.params.challengesId||"3",watch:!0,defaultValue:Kr.task_pass}))),d.a.createElement(w.a.Item,{noStyle:!0},d.a.createElement(Ze.a,{okButtonProps:{htmlType:"submit"},className:"customFixedButton",onCancel:Ri})),Object(Ge.o)()&&d.a.createElement("div",{className:Ne.a.fieldWrap},d.a.createElement(w.a.Item,{initialValue:"",name:"unity_3d_routes",label:"\u5D4C\u5165\u7B2C\u4E09\u65B9\u5E73\u53F0:"},d.a.createElement(K.a,{bordered:!1,maxLength:60,suffix:"".concat(((Fe=ie.unity_3d_routes)===null||Fe===void 0?void 0:Fe.length)||0,"/60"),placeholder:"\u8BF7\u8F93\u5165\u7B2C\u4E09\u65B9\u5E73\u53F0\u5730\u5740"}))))),d.a.createElement(yt,{tab:"\u9898\u76EE",key:"2"},!!tt.length&&Rr(),!tt.length&&d.a.createElement("div",{className:Ne.a.empty},d.a.createElement("img",{src:ze.k,width:"258"}),d.a.createElement("span",{className:"c-grey-c"},"\u8BF7\u70B9\u51FB\u53F3\u4E0A\u89D2\u6DFB\u52A0\u9898\u76EE\u6309\u94AE\u8FDB\u884C\u9898\u76EE\u7684\u521B\u5EFA! ")))),!!Kt&&d.a.createElement(gt,{is_published:ni,visible:Kt,onCancel:ra,onOk:Li,match:Oe,editData:Un}),d.a.createElement(ut.a,{loading:Wt}))},mt=Ie.default=Object(h.a)(function(qe){var lt=qe.shixunsDetail,st=qe.newCourse,Fe=qe.globalSetting,Me=qe.practiceSetting;return{shixunsDetail:lt,newCourse:st,globalSetting:Fe,practiceSetting:Me}})(vt)},UqFu:function(Be,Ie,G){"use strict";G.d(Ie,"a",function(){return $});var $=function(O){var B=document.createElement("textarea");return B.value=O,B.value}},"VrN/":function(Be,Ie,G){(function($,K){Be.exports=K()})(this,function(){"use strict";var $=navigator.userAgent,K=navigator.platform,O=/gecko\/\d/i.test($),B=/MSIE \d/.test($),C=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec($),L=/Edge\/(\d+)/.exec($),U=B||C||L,_=U&&(B?document.documentMode||6:+(L||C)[1]),I=!L&&/WebKit\//.test($),M=I&&/Qt\/\d+\.\d+/.test($),b=!L&&/Chrome\//.test($),E=/Opera\//.test($),R=/Apple Computer/.test(navigator.vendor),w=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test($),A=/PhantomJS/.test($),g=!L&&/AppleWebKit/.test($)&&/Mobile\/\w+/.test($),u=/Android/.test($),a=g||u||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test($),l=g||/Mac/.test(K),s=/\bCrOS\b/.test($),p=/win/i.test(K),d=E&&$.match(/Version\/(\d*\.\d*)/);d&&(d=Number(d[1])),d&&d>=15&&(E=!1,I=!0);var h=l&&(M||E&&(d==null||d<12.11)),D=O||U&&_>=9;function v(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var f=function(e,t){var r=e.className,n=v(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function m(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function c(e,t){return m(e).appendChild(t)}function o(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var T=0;T<t.length;++T)i.appendChild(t[T]);return i}function x(e,t,r,n){var i=o(e,t,r,n);return i.setAttribute("role","presentation"),i}var y;document.createRange?y=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:y=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function S(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 P(){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 F(e,t){var r=e.className;v(t).test(r)||(e.className+=(r?" ":"")+t)}function H(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!v(r[n]).test(t)&&(t+=" "+r[n]);return t}var Y=function(e){e.select()};g?Y=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:U&&(Y=function(e){try{e.select()}catch(t){}});function j(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function N(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function Z(e,t,r,n,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var T=n||0,k=i||0;;){var W=e.indexOf(" ",T);if(W<0||W>=t)return k+(t-T);k+=W-T,k+=r-k%r,T=W+1}}var ne=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};ne.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ne.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function pe(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var xe=50,je={toString:function(){return"CodeMirror.Pass"}},Le={scroll:!1},De={origin:"*mouse"},Ce={origin:"+move"};function we(e,t,r){for(var n=0,i=0;;){var T=e.indexOf(" ",n);T==-1&&(T=e.length);var k=T-n;if(T==e.length||i+k>=t)return n+Math.min(k,t-i);if(i+=T-n,i+=r-i%r,n=T+1,i>=t)return n}}var fe=[""];function he(e){for(;fe.length<=e;)fe.push(_e(fe)+" ");return fe[e]}function _e(e){return e[e.length-1]}function at(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function et(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function it(){}function gt(e,t){var r;return Object.create?r=Object.create(e):(it.prototype=e,r=new it),t&&N(t,r),r}var He=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ne(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||He.test(e))}function Ze(e,t){return t?t.source.indexOf("\\w")>-1&&Ne(e)?!0:t.test(e):Ne(e)}function ut(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var dt=/[\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 ze(e){return e.charCodeAt(0)>=768&&dt.test(e)}function Ge(e,t,r){for(;(r<0?t>0:t<e.length)&&ze(e.charAt(t));)t+=r;return t}function yt(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,T=n<0?Math.ceil(i):Math.floor(i);if(T==t)return e(T)?t:r;e(T)?r=T:t=T+n}}function vt(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,T=0;T<e.length;++T){var k=e[T];(k.from<r&&k.to>t||t==r&&k.to==t)&&(n(Math.max(k.from,t),Math.min(k.to,r),k.level==1?"rtl":"ltr",T),i=!0)}i||n(t,r,"ltr")}var mt=null;function qe(e,t,r){var n;mt=null;for(var i=0;i<e.length;++i){var T=e[i];if(T.from<t&&T.to>t)return i;T.to==t&&(T.from!=T.to&&r=="before"?n=i:mt=i),T.from==t&&(T.from!=T.to&&r!="before"?n=i:mt=i)}return n!=null?n:mt}var lt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(Q){return Q<=247?e.charAt(Q):1424<=Q&&Q<=1524?"R":1536<=Q&&Q<=1785?t.charAt(Q-1536):1774<=Q&&Q<=2220?"r":8192<=Q&&Q<=8203?"w":Q==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,T=/[LRr]/,k=/[Lb1n]/,W=/[1n]/;function z(Q,oe,ce){this.level=Q,this.from=oe,this.to=ce}return function(Q,oe){var ce=oe=="ltr"?"L":"R";if(Q.length==0||oe=="ltr"&&!n.test(Q))return!1;for(var Se=Q.length,Ae=[],Ue=0;Ue<Se;++Ue)Ae.push(r(Q.charCodeAt(Ue)));for(var Ve=0,nt=ce;Ve<Se;++Ve){var ft=Ae[Ve];ft=="m"?Ae[Ve]=nt:nt=ft}for(var xt=0,ht=ce;xt<Se;++xt){var At=Ae[xt];At=="1"&&ht=="r"?Ae[xt]="n":T.test(At)&&(ht=At,At=="r"&&(Ae[xt]="R"))}for(var Nt=1,Pt=Ae[0];Nt<Se-1;++Nt){var $t=Ae[Nt];$t=="+"&&Pt=="1"&&Ae[Nt+1]=="1"?Ae[Nt]="1":$t==","&&Pt==Ae[Nt+1]&&(Pt=="1"||Pt=="n")&&(Ae[Nt]=Pt),Pt=$t}for(var Pn=0;Pn<Se;++Pn){var sr=Ae[Pn];if(sr==",")Ae[Pn]="N";else if(sr=="%"){var Wn=void 0;for(Wn=Pn+1;Wn<Se&&Ae[Wn]=="%";++Wn);for(var Fr=Pn&&Ae[Pn-1]=="!"||Wn<Se&&Ae[Wn]=="1"?"1":"N",Pr=Pn;Pr<Wn;++Pr)Ae[Pr]=Fr;Pn=Wn-1}}for(var Jn=0,kr=ce;Jn<Se;++Jn){var cr=Ae[Jn];kr=="L"&&cr=="1"?Ae[Jn]="L":T.test(cr)&&(kr=cr)}for(var rr=0;rr<Se;++rr)if(i.test(Ae[rr])){var Zn=void 0;for(Zn=rr+1;Zn<Se&&i.test(Ae[Zn]);++Zn);for(var zn=(rr?Ae[rr-1]:ce)=="L",_r=(Zn<Se?Ae[Zn]:ce)=="L",Na=zn==_r?zn?"L":"R":ce,na=rr;na<Zn;++na)Ae[na]=Na;rr=Zn-1}for(var yr=[],wi,lr=0;lr<Se;)if(k.test(Ae[lr])){var ms=lr;for(++lr;lr<Se&&k.test(Ae[lr]);++lr);yr.push(new z(0,ms,lr))}else{var Wi=lr,ma=yr.length,pa=oe=="rtl"?1:0;for(++lr;lr<Se&&Ae[lr]!="L";++lr);for(var wr=Wi;wr<lr;)if(W.test(Ae[wr])){Wi<wr&&(yr.splice(ma,0,new z(1,Wi,wr)),ma+=pa);var Ua=wr;for(++wr;wr<lr&&W.test(Ae[wr]);++wr);yr.splice(ma,0,new z(2,Ua,wr)),ma+=pa,Wi=wr}else++wr;Wi<lr&&yr.splice(ma,0,new z(1,Wi,lr))}return oe=="ltr"&&(yr[0].level==1&&(wi=Q.match(/^\s+/))&&(yr[0].from=wi[0].length,yr.unshift(new z(0,0,wi[0].length))),_e(yr).level==1&&(wi=Q.match(/\s+$/))&&(_e(yr).to-=wi[0].length,yr.push(new z(0,Se-wi[0].length,Se)))),oe=="rtl"?yr.reverse():yr}}();function st(e,t){var r=e.order;return r==null&&(r=e.order=lt(e.text,t)),r}var Fe=[],Me=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Fe).concat(r)}};function ot(e,t){return e._handlers&&e._handlers[t]||Fe}function Ke(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var T=pe(i,r);T>-1&&(n[t]=i.slice(0,T).concat(i.slice(T+1)))}}}function Oe(e,t){var r=ot(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function We(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Oe(e,r||t.type,e,t),te(t)||t.codemirrorIgnore}function ve(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)pe(r,t[n])==-1&&r.push(t[n])}function le(e,t){return ot(e,t).length>0}function de(e){e.prototype.on=function(t,r){Me(this,t,r)},e.prototype.off=function(t,r){Ke(this,t,r)}}function J(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function q(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function te(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ie(e){J(e),q(e)}function me(e){return e.target||e.srcElement}function Re(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 Pe=function(){if(U&&_<9)return!1;var e=o("div");return"draggable"in e||"dragDrop"in e}(),tt;function Et(e){if(tt==null){var t=o("span","\u200B");c(e,o("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(tt=t.offsetWidth<=1&&t.offsetHeight>2&&!(U&&_<8))}var r=tt?o("span","\u200B"):o("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var bt;function Ht(e){if(bt!=null)return bt;var t=c(e,document.createTextNode("A\u062EA")),r=y(t,0,1).getBoundingClientRect(),n=y(t,1,2).getBoundingClientRect();return m(e),!r||r.left==r.right?!1:bt=n.right-r.right<3}var St=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
|
|
`,t);i==-1&&(i=e.length);var T=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),k=T.indexOf("\r");k!=-1?(r.push(T.slice(0,k)),t+=k+1):(r.push(T),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},rt=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(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ft=function(){var e=o("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ot=null;function Wt(e){if(Ot!=null)return Ot;var t=c(e,o("span","x")),r=t.getBoundingClientRect(),n=y(t,0,1).getBoundingClientRect();return Ot=Math.abs(r.left-n.left)>1}var Zt={},pt={};function mn(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Zt[e]=t}function Kt(e,t){pt[e]=t}function Dt(e){if(typeof e=="string"&&pt.hasOwnProperty(e))e=pt[e];else if(e&&typeof e.name=="string"&&pt.hasOwnProperty(e.name)){var t=pt[e.name];typeof t=="string"&&(t={name:t}),e=gt(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Dt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Dt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function en(e,t){t=Dt(t);var r=Zt[t.name];if(!r)return en(e,"text/plain");var n=r(e,t);if(Je.hasOwnProperty(t.name)){var i=Je[t.name];for(var T in i){if(!i.hasOwnProperty(T))continue;n.hasOwnProperty(T)&&(n["_"+T]=n[T]),n[T]=i[T]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var k in t.modeProps)n[k]=t.modeProps[k];return n}var Je={};function Un(e,t){var r=Je.hasOwnProperty(e)?Je[e]:Je[e]={};N(t,r)}function Tn(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Mn(e,t){for(var r;e.innerMode&&!(r=e.innerMode(t),!r||r.mode==e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function fr(e,t,r){return e.startState?e.startState(t,r):!0}var Ln=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Ln.prototype.eol=function(){return this.pos>=this.string.length},Ln.prototype.sol=function(){return this.pos==this.lineStart},Ln.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ln.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ln.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},Ln.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ln.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ln.prototype.skipToEnd=function(){this.pos=this.string.length},Ln.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ln.prototype.backUp=function(e){this.pos-=e},Ln.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Z(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Z(this.string,this.lineStart,this.tabSize):0)},Ln.prototype.indentation=function(){return Z(this.string,null,this.tabSize)-(this.lineStart?Z(this.string,this.lineStart,this.tabSize):0)},Ln.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(k){return r?k.toLowerCase():k},i=this.string.substr(this.pos,e.length);if(n(i)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var T=this.string.slice(this.pos).match(e);return T&&T.index>0?null:(T&&t!==!1&&(this.pos+=T[0].length),T)}},Ln.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ln.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ln.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ln.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Tt(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 r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],T=i.chunkSize();if(t<T){r=i;break}t-=T}return r.lines[t]}function jr(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(T){var k=T.text;i==r.line&&(k=k.slice(0,r.ch)),i==t.line&&(k=k.slice(t.ch)),n.push(k),++i}),n}function ti(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function Yn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function on(e){if(e.parent==null)return null;for(var t=e.parent,r=pe(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;!(n.children[i]==t);++i)r+=n.children[i].chunkSize();return r+t.first}function Dr(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],T=i.height;if(t<T){e=i;continue e}t-=T,r+=i.chunkSize()}return r}while(!e.lines);for(var k=0;k<e.lines.length;++k){var W=e.lines[k],z=W.height;if(t<z)break;t-=z}return r+k}function Nr(e,t){return t>=e.first&&t<e.first+e.size}function Yr(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Qe(e,t,r){if(r===void 0&&(r=null),!(this instanceof Qe))return new Qe(e,t,r);this.line=e,this.ch=t,this.sticky=r}function Lt(e,t){return e.line-t.line||e.ch-t.ch}function Wr(e,t){return e.sticky==t.sticky&&Lt(e,t)==0}function ni(e){return Qe(e.line,e.ch)}function fi(e,t){return Lt(e,t)<0?t:e}function Kr(e,t){return Lt(e,t)<0?e:t}function hi(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ut(e,t){if(t.line<e.first)return Qe(e.first,0);var r=e.first+e.size-1;return t.line>r?Qe(r,Tt(e,r).text.length):Ki(t,Tt(e,t.line).text.length)}function Ki(e,t){var r=e.ch;return r==null||r>t?Qe(e.line,t):r<0?Qe(e.line,0):e}function $e(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Ut(e,t[n]);return r}var hr=function(e,t){this.state=e,this.lookAhead=t},mr=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};mr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},mr.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}},mr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mr.fromSaved=function(e,t,r){return t instanceof hr?new mr(e,Tn(e.mode,t.state),r,t.lookAhead):new mr(e,Tn(e.mode,t),r)},mr.prototype.save=function(e){var t=e!==!1?Tn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new hr(t,this.maxLookAhead):t};function Di(e,t,r,n){var i=[e.state.modeGen],T={};Rr(e,t.text,e.doc.mode,r,function(Q,oe){return i.push(Q,oe)},T,n);for(var k=r.state,W=function(Q){r.baseTokens=i;var oe=e.state.overlays[Q],ce=1,Se=0;r.state=!0,Rr(e,t.text,oe.mode,r,function(Ae,Ue){for(var Ve=ce;Se<Ae;){var nt=i[ce];nt>Ae&&i.splice(ce,1,Ae,i[ce+1],nt),ce+=2,Se=Math.min(Ae,nt)}if(!Ue)return;if(oe.opaque)i.splice(Ve,ce-Ve,Ae,"overlay "+Ue),ce=Ve+2;else for(;Ve<ce;Ve+=2){var ft=i[Ve+1];i[Ve+1]=(ft?ft+" ":"")+"overlay "+Ue}},T),r.state=k,r.baseTokens=null,r.baseTokenPos=1},z=0;z<e.state.overlays.length;++z)W(z);return{styles:i,classes:T.bgClass||T.textClass?T:null}}function ri(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Or(e,on(t)),i=t.text.length>e.options.maxHighlightLength&&Tn(e.doc.mode,n.state),T=Di(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=T.styles,T.classes?t.styleClasses=T.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Or(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new mr(n,!0,t);var T=Li(e,t,r),k=T>n.first&&Tt(n,T-1).stateAfter,W=k?mr.fromSaved(n,k,T):new mr(n,fr(n.mode),T);return n.iter(T,t,function(z){mi(e,z.text,W);var Q=W.line;z.stateAfter=Q==t-1||Q%5==0||Q>=i.viewFrom&&Q<i.viewTo?W.save():null,W.nextLine()}),r&&(n.modeFrontier=W.line),W}function mi(e,t,r,n){var i=e.doc.mode,T=new Ln(t,e.options.tabSize,r);for(T.start=T.pos=n||0,t==""&&Oi(i,r.state);!T.eol();)br(i,T,r.state),T.start=T.pos}function Oi(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=Mn(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function br(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Mn(e,r).mode);var T=e.token(t,r);if(t.pos>t.start)return T}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ri=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Mi(e,t,r,n){var i=e.doc,T=i.mode,k;t=Ut(i,t);var W=Tt(i,t.line),z=Or(e,t.line,r),Q=new Ln(W.text,e.options.tabSize,z),oe;for(n&&(oe=[]);(n||Q.pos<t.ch)&&!Q.eol();)Q.start=Q.pos,k=br(T,Q,z.state),n&&oe.push(new Ri(Q,k,Tn(i.mode,z.state)));return n?oe:new Ri(Q,k,z.state)}function pi(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Rr(e,t,r,n,i,T,k){var W=r.flattenSpans;W==null&&(W=e.options.flattenSpans);var z=0,Q=null,oe=new Ln(t,e.options.tabSize,n),ce,Se=e.options.addModeClass&&[null];for(t==""&&pi(Oi(r,n.state),T);!oe.eol();){if(oe.pos>e.options.maxHighlightLength?(W=!1,k&&mi(e,t,n,oe.pos),oe.pos=t.length,ce=null):ce=pi(br(r,oe,n.state,Se),T),Se){var Ae=Se[0].name;Ae&&(ce="m-"+(ce?Ae+" "+ce:Ae))}if(!W||Q!=ce){for(;z<oe.start;)z=Math.min(oe.start,z+5e3),i(z,Q);Q=ce}oe.start=oe.pos}for(;z<oe.pos;){var Ue=Math.min(oe.pos,z+5e3);i(Ue,Q),z=Ue}}function Li(e,t,r){for(var n,i,T=e.doc,k=r?-1:t-(e.doc.mode.innerMode?1e3:100),W=t;W>k;--W){if(W<=T.first)return T.first;var z=Tt(T,W-1),Q=z.stateAfter;if(Q&&(!r||W+(Q instanceof hr?Q.lookAhead:0)<=T.modeFrontier))return W;var oe=Z(z.text,null,e.options.tabSize);(i==null||n>oe)&&(i=W-1,n=oe)}return i}function ra(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,n=t-1;n>r;n--){var i=Tt(e,n).stateAfter;if(i&&(!(i instanceof hr)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var vn=!1,Rt=!1;function Bt(){vn=!0}function tn(){Rt=!0}function pn(e,t,r){this.marker=e,this.from=t,this.to=r}function Qt(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Jr(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function ir(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Hi(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var T=e[i],k=T.marker,W=T.from==null||(k.inclusiveLeft?T.from<=t:T.from<t);if(W||T.from==t&&k.type=="bookmark"&&(!r||!T.marker.insertLeft)){var z=T.to==null||(k.inclusiveRight?T.to>=t:T.to>t);(n||(n=[])).push(new pn(k,T.from,z?null:T.to))}}return n}function ia(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var T=e[i],k=T.marker,W=T.to==null||(k.inclusiveRight?T.to>=t:T.to>t);if(W||T.from==t&&k.type=="bookmark"&&(!r||T.marker.insertLeft)){var z=T.from==null||(k.inclusiveLeft?T.from<=t:T.from<t);(n||(n=[])).push(new pn(k,z?null:T.from-t,T.to==null?null:T.to-t))}}return n}function Hr(e,t){if(t.full)return null;var r=Nr(e,t.from.line)&&Tt(e,t.from.line).markedSpans,n=Nr(e,t.to.line)&&Tt(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,T=t.to.ch,k=Lt(t.from,t.to)==0,W=Hi(r,i,k),z=ia(n,T,k),Q=t.text.length==1,oe=_e(t.text).length+(Q?i:0);if(W)for(var ce=0;ce<W.length;++ce){var Se=W[ce];if(Se.to==null){var Ae=Qt(z,Se.marker);Ae?Q&&(Se.to=Ae.to==null?null:Ae.to+oe):Se.to=i}}if(z)for(var Ue=0;Ue<z.length;++Ue){var Ve=z[Ue];if(Ve.to!=null&&(Ve.to+=oe),Ve.from==null){var nt=Qt(W,Ve.marker);nt||(Ve.from=oe,Q&&(W||(W=[])).push(Ve))}else Ve.from+=oe,Q&&(W||(W=[])).push(Ve)}W&&(W=pr(W)),z&&z!=W&&(z=pr(z));var ft=[W];if(!Q){var xt=t.text.length-2,ht;if(xt>0&&W)for(var At=0;At<W.length;++At)W[At].to==null&&(ht||(ht=[])).push(new pn(W[At].marker,null,null));for(var Nt=0;Nt<xt;++Nt)ft.push(ht);ft.push(z)}return ft}function pr(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function ar(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(Ae){if(Ae.markedSpans)for(var Ue=0;Ue<Ae.markedSpans.length;++Ue){var Ve=Ae.markedSpans[Ue].marker;Ve.readOnly&&(!n||pe(n,Ve)==-1)&&(n||(n=[])).push(Ve)}}),!n)return null;for(var i=[{from:t,to:r}],T=0;T<n.length;++T)for(var k=n[T],W=k.find(0),z=0;z<i.length;++z){var Q=i[z];if(Lt(Q.to,W.from)<0||Lt(Q.from,W.to)>0)continue;var oe=[z,1],ce=Lt(Q.from,W.from),Se=Lt(Q.to,W.to);(ce<0||!k.inclusiveLeft&&!ce)&&oe.push({from:Q.from,to:W.from}),(Se>0||!k.inclusiveRight&&!Se)&&oe.push({from:W.to,to:Q.to}),i.splice.apply(i,oe),z+=oe.length-3}return i}function gi(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function ii(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function vi(e){return e.inclusiveLeft?-1:0}function Ii(e){return e.inclusiveRight?1:0}function Zr(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),T=Lt(n.from,i.from)||vi(e)-vi(t);if(T)return-T;var k=Lt(n.to,i.to)||Ii(e)-Ii(t);return k||t.id-e.id}function qr(e,t){var r=Rt&&e.markedSpans,n;if(r)for(var i=void 0,T=0;T<r.length;++T)i=r[T],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||Zr(n,i.marker)<0)&&(n=i.marker);return n}function $r(e){return qr(e,!0)}function ai(e){return qr(e,!1)}function Pi(e,t){var r=Rt&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var T=r[i];T.marker.collapsed&&(T.from==null||T.from<t)&&(T.to==null||T.to>t)&&(!n||Zr(n,T.marker)<0)&&(n=T.marker)}return n}function ga(e,t,r,n,i){var T=Tt(e,t),k=Rt&&T.markedSpans;if(k)for(var W=0;W<k.length;++W){var z=k[W];if(!z.marker.collapsed)continue;var Q=z.marker.find(0),oe=Lt(Q.from,r)||vi(z.marker)-vi(i),ce=Lt(Q.to,n)||Ii(z.marker)-Ii(i);if(oe>=0&&ce<=0||oe<=0&&ce>=0)continue;if(oe<=0&&(z.marker.inclusiveRight&&i.inclusiveLeft?Lt(Q.to,r)>=0:Lt(Q.to,r)>0)||oe>=0&&(z.marker.inclusiveRight&&i.inclusiveLeft?Lt(Q.from,n)<=0:Lt(Q.from,n)<0))return!0}}function Er(e){for(var t;t=$r(e);)e=t.find(-1,!0).line;return e}function va(e){for(var t;t=ai(e);)e=t.find(1,!0).line;return e}function Gi(e){for(var t,r;t=ai(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function yi(e,t){var r=Tt(e,t),n=Er(r);return r==n?t:on(n)}function Mr(e,t){if(t>e.lastLine())return t;var r=Tt(e,t),n;if(!Lr(e,r))return t;for(;n=ai(r);)r=n.find(1,!0).line;return on(r)+1}function Lr(e,t){var r=Rt&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i){if(n=r[i],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&aa(e,t,n))return!0}}function aa(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return aa(e,n.line,Qt(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,T=0;T<t.markedSpans.length;++T)if(i=t.markedSpans[T],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&aa(e,t,i))return!0}function Ur(e){e=Er(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var T=r.parent;T;r=T,T=r.parent)for(var k=0;k<T.children.length;++k){var W=T.children[k];if(W==r)break;t+=W.height}return t}function oa(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=$r(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=ai(n);){var T=r.find(0,!0);t-=n.text.length-T.from.ch,n=T.to.line,t+=n.text.length-T.to.ch}return t}function sa(e){var t=e.display,r=e.doc;t.maxLine=Tt(r,r.first),t.maxLineLength=oa(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=oa(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var ki=function(e,t,r){this.text=e,ii(this,t),this.height=r?r(this):1};ki.prototype.lineNo=function(){return on(this)},de(ki);function Ba(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),gi(e),ii(e,r);var i=n?n(e):1;i!=e.height&&Yn(e,i)}function wt(e){e.parent=null,gi(e)}var jt={},Mt={};function qt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Mt:jt;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function fn(e,t){var r=x("span",null,null,I?"padding-right: .1px":null),n={pre:x("pre",[r],"CodeMirror-line"),content:r,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 T=i?t.rest[i-1]:t.line,k=void 0;n.pos=0,n.addToken=un,Ht(e.display.measure)&&(k=st(T,e.doc.direction))&&(n.addToken=xr(n.addToken,k)),n.map=[];var W=t!=e.display.externalMeasured&&on(T);oi(T,n,ri(e,T,W)),T.styleClasses&&(T.styleClasses.bgClass&&(n.bgClass=H(T.styleClasses.bgClass,n.bgClass||"")),T.styleClasses.textClass&&(n.textClass=H(T.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Et(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(I){var z=n.content.lastChild;(/\bcm-tab\b/.test(z.className)||z.querySelector&&z.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Oe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=H(n.pre.className,n.textClass||"")),n}function xn(e){var t=o("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function un(e,t,r,n,i,T,k){if(!t)return;var W=e.splitSpaces?Kn(t,e.trailingSpace):t,z=e.cm.state.specialChars,Q=!1,oe;if(!z.test(t))e.col+=t.length,oe=document.createTextNode(W),e.map.push(e.pos,e.pos+t.length,oe),U&&_<9&&(Q=!0),e.pos+=t.length;else{oe=document.createDocumentFragment();for(var ce=0;;){z.lastIndex=ce;var Se=z.exec(t),Ae=Se?Se.index-ce:t.length-ce;if(Ae){var Ue=document.createTextNode(W.slice(ce,ce+Ae));U&&_<9?oe.appendChild(o("span",[Ue])):oe.appendChild(Ue),e.map.push(e.pos,e.pos+Ae,Ue),e.col+=Ae,e.pos+=Ae}if(!Se)break;ce+=Ae+1;var Ve=void 0;if(Se[0]==" "){var nt=e.cm.options.tabSize,ft=nt-e.col%nt;Ve=oe.appendChild(o("span",he(ft),"cm-tab")),Ve.setAttribute("role","presentation"),Ve.setAttribute("cm-text"," "),e.col+=ft}else Se[0]=="\r"||Se[0]==`
|
|
`?(Ve=oe.appendChild(o("span",Se[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ve.setAttribute("cm-text",Se[0]),e.col+=1):(Ve=e.cm.options.specialCharPlaceholder(Se[0]),Ve.setAttribute("cm-text",Se[0]),U&&_<9?oe.appendChild(o("span",[Ve])):oe.appendChild(Ve),e.col+=1);e.map.push(e.pos,e.pos+1,Ve),e.pos++}}if(e.trailingSpace=W.charCodeAt(t.length-1)==32,r||n||i||Q||T||k){var xt=r||"";n&&(xt+=n),i&&(xt+=i);var ht=o("span",[oe],xt,T);if(k)for(var At in k)k.hasOwnProperty(At)&&At!="style"&&At!="class"&&ht.setAttribute(At,k[At]);return e.content.appendChild(ht)}e.content.appendChild(oe)}function Kn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var T=e.charAt(i);T==" "&&r&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(T="\xA0"),n+=T,r=T==" "}return n}function xr(e,t){return function(r,n,i,T,k,W,z){i=i?i+" cm-force-border":"cm-force-border";for(var Q=r.pos,oe=Q+n.length;;){for(var ce=void 0,Se=0;Se<t.length&&!(ce=t[Se],ce.to>Q&&ce.from<=Q);Se++);if(ce.to>=oe)return e(r,n,i,T,k,W,z);e(r,n.slice(0,ce.to-Q),i,T,null,W,z),T=null,n=n.slice(ce.to-Q),Q=ce.to}}}function nn(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function oi(e,t,r){var n=e.markedSpans,i=e.text,T=0;if(!n){for(var k=1;k<r.length;k+=2)t.addToken(t,i.slice(T,T=r[k]),qt(r[k+1],t.cm.options));return}for(var W=i.length,z=0,Q=1,oe="",ce,Se,Ae=0,Ue,Ve,nt,ft,xt;;){if(Ae==z){Ue=Ve=nt=Se="",xt=null,ft=null,Ae=Infinity;for(var ht=[],At=void 0,Nt=0;Nt<n.length;++Nt){var Pt=n[Nt],$t=Pt.marker;if($t.type=="bookmark"&&Pt.from==z&&$t.widgetNode)ht.push($t);else if(Pt.from<=z&&(Pt.to==null||Pt.to>z||$t.collapsed&&Pt.to==z&&Pt.from==z)){if(Pt.to!=null&&Pt.to!=z&&Ae>Pt.to&&(Ae=Pt.to,Ve=""),$t.className&&(Ue+=" "+$t.className),$t.css&&(Se=(Se?Se+";":"")+$t.css),$t.startStyle&&Pt.from==z&&(nt+=" "+$t.startStyle),$t.endStyle&&Pt.to==Ae&&(At||(At=[])).push($t.endStyle,Pt.to),$t.title&&((xt||(xt={})).title=$t.title),$t.attributes)for(var Pn in $t.attributes)(xt||(xt={}))[Pn]=$t.attributes[Pn];$t.collapsed&&(!ft||Zr(ft.marker,$t)<0)&&(ft=Pt)}else Pt.from>z&&Ae>Pt.from&&(Ae=Pt.from)}if(At)for(var sr=0;sr<At.length;sr+=2)At[sr+1]==Ae&&(Ve+=" "+At[sr]);if(!ft||ft.from==z)for(var Wn=0;Wn<ht.length;++Wn)nn(t,0,ht[Wn]);if(ft&&(ft.from||0)==z){if(nn(t,(ft.to==null?W+1:ft.to)-z,ft.marker,ft.from==null),ft.to==null)return;ft.to==z&&(ft=!1)}}if(z>=W)break;for(var Fr=Math.min(W,Ae);;){if(oe){var Pr=z+oe.length;if(!ft){var Jn=Pr>Fr?oe.slice(0,Fr-z):oe;t.addToken(t,Jn,ce?ce+Ue:Ue,nt,z+Jn.length==Ae?Ve:"",Se,xt)}if(Pr>=Fr){oe=oe.slice(Fr-z),z=Fr;break}z=Pr,nt=""}oe=i.slice(T,T=r[Q++]),ce=qt(r[Q++],t.cm.options)}}}function yn(e,t,r){this.line=t,this.rest=Gi(t),this.size=this.rest?on(_e(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Lr(e,t)}function ur(e,t,r){for(var n=[],i,T=t;T<r;T=i){var k=new yn(e.doc,Tt(e.doc,T),T);i=T+k.size,n.push(k)}return n}var or=null;function Br(e){or?or.ops.push(e):e.ownsGroup=or={ops:[e],delayedCallbacks:[]}}function Fa(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Ho(e,t){var r=e.ownsGroup;if(!r)return;try{Fa(r)}finally{or=null,t(r)}}var zi=null;function Hn(e,t){var r=ot(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),i;or?i=or.delayedCallbacks:zi?i=zi:(i=zi=[],setTimeout(go,0));for(var T=function(W){i.push(function(){return r[W].apply(null,n)})},k=0;k<r.length;++k)T(k)}function go(){var e=zi;zi=null;for(var t=0;t<e.length;++t)e[t]()}function vo(e,t,r,n){for(var i=0;i<t.changes.length;i++){var T=t.changes[i];T=="text"?yo(e,t):T=="gutter"?Ka(e,t,r,n):T=="class"?Wa(e,t):T=="widget"&&zo(e,t,n)}t.changes=null}function la(e){return e.node==e.text&&(e.node=o("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 Go(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=la(t);t.background=n.insertBefore(o("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function ja(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):fn(e,t)}function yo(e,t){var r=t.text.className,n=ja(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Wa(e,t)):r&&(t.text.className=r)}function Wa(e,t){Go(e,t),t.line.wrapClass?la(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Ka(e,t,r,n){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=la(t);t.gutterBackground=o("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var T=t.line.gutterMarkers;if(e.options.lineNumbers||T){var k=la(t),W=t.gutter=o("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(W),k.insertBefore(W,t.text),t.line.gutterClass&&(W.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!T||!T["CodeMirror-linenumbers"])&&(t.lineNumber=W.appendChild(o("div",Yr(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),T)for(var z=0;z<e.display.gutterSpecs.length;++z){var Q=e.display.gutterSpecs[z].className,oe=T.hasOwnProperty(Q)&&T[Q];oe&&W.appendChild(o("div",[oe],"CodeMirror-gutter-elt","left: "+n.gutterLeft[Q]+"px; width: "+n.gutterWidth[Q]+"px"))}}}function zo(e,t,r){t.alignable&&(t.alignable=null);for(var n=v("CodeMirror-linewidget"),i=t.node.firstChild,T=void 0;i;i=T)T=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Ha(e,t,r)}function bo(e,t,r,n){var i=ja(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Wa(e,t),Ka(e,t,r,n),Ha(e,t,n),t.node}function Ha(e,t,r){if(Eo(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Eo(e,t.rest[n],t,r,!1)}function Eo(e,t,r,n,i){if(!t.widgets)return;for(var T=la(r),k=0,W=t.widgets;k<W.length;++k){var z=W[k],Q=o("div",[z.node],"CodeMirror-linewidget"+(z.className?" "+z.className:""));z.handleMouseEvents||Q.setAttribute("cm-ignore-events","true"),Vo(z,Q,r,n),e.display.input.setUneditable(Q),i&&z.above?T.insertBefore(Q,r.gutter||r.text):T.appendChild(Q),Hn(z,"redraw")}}function Vo(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Vi(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!S(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),c(t.display.measure,o("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function si(e,t){for(var r=me(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function Ga(e){return e.lineSpace.offsetTop}function re(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ge(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=c(e.measure,o("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function be(e){return xe-e.display.nativeBarWidth}function ae(e){return e.display.scroller.clientWidth-be(e)-e.display.barWidth}function V(e){return e.display.scroller.clientHeight-be(e)-e.display.barHeight}function ee(e,t,r){var n=e.options.lineWrapping,i=n&&ae(e);if(!t.measure.heights||n&&t.measure.width!=i){var T=t.measure.heights=[];if(n){t.measure.width=i;for(var k=t.text.firstChild.getClientRects(),W=0;W<k.length-1;W++){var z=k[W],Q=k[W+1];Math.abs(z.bottom-Q.bottom)>2&&T.push((z.bottom+Q.top)/2-r.top)}}T.push(r.bottom-r.top)}}function X(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(on(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function se(e,t){t=Er(t);var r=on(t),n=e.display.externalMeasured=new yn(e.doc,t,r);n.lineN=r;var i=n.built=fn(e,n);return n.text=i.pre,c(e.display.lineMeasure,i.pre),n}function ue(e,t,r,n){return Te(e,ye(e,t),r,n)}function Ee(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[In(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function ye(e,t){var r=on(t),n=Ee(e,r);n&&!n.text?n=null:n&&n.changes&&(vo(e,n,r,Bn(e)),e.curOp.forceUpdate=!0),n||(n=se(e,t));var i=X(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Te(e,t,r,n,i){t.before&&(r=-1);var T=r+(n||""),k;return t.cache.hasOwnProperty(T)?k=t.cache[T]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(ee(e,t.view,t.rect),t.hasHeights=!0),k=ct(e,t,r,n),k.bogus||(t.cache[T]=k)),{left:k.left,right:k.right,top:i?k.rtop:k.top,bottom:i?k.rbottom:k.bottom}}var ke={left:0,right:0,top:0,bottom:0};function Ye(e,t,r){for(var n,i,T,k,W,z,Q=0;Q<e.length;Q+=3)if(W=e[Q],z=e[Q+1],t<W?(i=0,T=1,k="left"):t<z?(i=t-W,T=i+1):(Q==e.length-3||t==z&&e[Q+3]>t)&&(T=z-W,i=T-1,t>=z&&(k="right")),i!=null){if(n=e[Q+2],W==z&&r==(n.insertLeft?"left":"right")&&(k=r),r=="left"&&i==0)for(;Q&&e[Q-2]==e[Q-3]&&e[Q-1].insertLeft;)n=e[(Q-=3)+2],k="left";if(r=="right"&&i==z-W)for(;Q<e.length-3&&e[Q+3]==e[Q+4]&&!e[Q+5].insertLeft;)n=e[(Q+=3)+2],k="right";break}return{node:n,start:i,end:T,collapse:k,coverStart:W,coverEnd:z}}function Xe(e,t){var r=ke;if(t=="left")for(var n=0;n<e.length&&!((r=e[n]).left!=r.right);n++);else for(var i=e.length-1;i>=0&&!((r=e[i]).left!=r.right);i--);return r}function ct(e,t,r,n){var i=Ye(t.map,r,n),T=i.node,k=i.start,W=i.end,z=i.collapse,Q;if(T.nodeType==3){for(var oe=0;oe<4;oe++){for(;k&&ze(t.line.text.charAt(i.coverStart+k));)--k;for(;i.coverStart+W<i.coverEnd&&ze(t.line.text.charAt(i.coverStart+W));)++W;if(U&&_<9&&k==0&&W==i.coverEnd-i.coverStart?Q=T.parentNode.getBoundingClientRect():Q=Xe(y(T,k,W).getClientRects(),n),Q.left||Q.right||k==0)break;W=k,k=k-1,z="right"}U&&_<11&&(Q=_t(e.display.measure,Q))}else{k>0&&(z=n="right");var ce;e.options.lineWrapping&&(ce=T.getClientRects()).length>1?Q=ce[n=="right"?ce.length-1:0]:Q=T.getBoundingClientRect()}if(U&&_<9&&!k&&(!Q||!Q.left&&!Q.right)){var Se=T.parentNode.getClientRects()[0];Se?Q={left:Se.left,right:Se.left+qn(e.display),top:Se.top,bottom:Se.bottom}:Q=ke}for(var Ae=Q.top-t.rect.top,Ue=Q.bottom-t.rect.top,Ve=(Ae+Ue)/2,nt=t.view.measure.heights,ft=0;ft<nt.length-1&&!(Ve<nt[ft]);ft++);var xt=ft?nt[ft-1]:0,ht=nt[ft],At={left:(z=="right"?Q.right:Q.left)-t.rect.left,right:(z=="left"?Q.left:Q.right)-t.rect.left,top:xt,bottom:ht};return!Q.left&&!Q.right&&(At.bogus=!0),e.options.singleCursorHeightPerLine||(At.rtop=Ae,At.rbottom=Ue),At}function _t(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Wt(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Yt(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 Gt(e){e.display.externalMeasure=null,m(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Yt(e.display.view[t])}function zt(e){Gt(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Jt(){return b&&u?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Xt(){return b&&u?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Vt(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Vi(e.widgets[r]));return t}function dn(e,t,r,n,i){if(!i){var T=Vt(t);r.top+=T,r.bottom+=T}if(n=="line")return r;n||(n="local");var k=Ur(t);if(n=="local"?k+=Ga(e.display):k-=e.display.viewOffset,n=="page"||n=="window"){var W=e.display.lineSpace.getBoundingClientRect();k+=W.top+(n=="window"?0:Xt());var z=W.left+(n=="window"?0:Jt());r.left+=z,r.right+=z}return r.top+=k,r.bottom+=k,r}function rn(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=Jt(),i-=Xt();else if(r=="local"||!r){var T=e.display.sizer.getBoundingClientRect();n+=T.left,i+=T.top}var k=e.display.lineSpace.getBoundingClientRect();return{left:n-k.left,top:i-k.top}}function kn(e,t,r,n,i){return n||(n=Tt(e.doc,t.line)),dn(e,n,ue(e,n,t.ch,i),r)}function an(e,t,r,n,i,T){n=n||Tt(e.doc,t.line),i||(i=ye(e,n));function k(Ue,Ve){var nt=Te(e,i,Ue,Ve?"right":"left",T);return Ve?nt.left=nt.right:nt.right=nt.left,dn(e,n,nt,r)}var W=st(n,e.doc.direction),z=t.ch,Q=t.sticky;if(z>=n.text.length?(z=n.text.length,Q="before"):z<=0&&(z=0,Q="after"),!W)return k(Q=="before"?z-1:z,Q=="before");function oe(Ue,Ve,nt){var ft=W[Ve],xt=ft.level==1;return k(nt?Ue-1:Ue,xt!=nt)}var ce=qe(W,z,Q),Se=mt,Ae=oe(z,ce,Q=="before");return Se!=null&&(Ae.other=oe(z,Se,Q!="before")),Ae}function kt(e,t){var r=0;t=Ut(e.doc,t),e.options.lineWrapping||(r=qn(e.display)*t.ch);var n=Tt(e.doc,t.line),i=Ur(n)+Ga(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function It(e,t,r,n,i){var T=Qe(e,t,r);return T.xRel=i,n&&(T.outside=n),T}function sn(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return It(n.first,0,null,-1,-1);var i=Dr(n,r),T=n.first+n.size-1;if(i>T)return It(n.first+n.size-1,Tt(n,T).text.length,null,1,1);t<0&&(t=0);for(var k=Tt(n,i);;){var W=_n(e,k,i,t,r),z=Pi(k,W.ch+(W.xRel>0||W.outside>0?1:0));if(!z)return W;var Q=z.find(1);if(Q.line==i)return Q;k=Tt(n,i=Q.line)}}function cn(e,t,r,n){n-=Vt(t);var i=t.text.length,T=yt(function(k){return Te(e,r,k-1).bottom<=n},i,0);return i=yt(function(k){return Te(e,r,k).top>n},T,i),{begin:T,end:i}}function Ct(e,t,r,n){r||(r=ye(e,t));var i=dn(e,t,Te(e,r,n),"line").top;return cn(e,t,r,i)}function hn(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function _n(e,t,r,n,i){i-=Ur(t);var T=ye(e,t),k=Vt(t),W=0,z=t.text.length,Q=!0,oe=st(t,e.doc.direction);if(oe){var ce=(e.options.lineWrapping?wn:gn)(e,t,r,T,oe,n,i);Q=ce.level!=1,W=Q?ce.from:ce.to-1,z=Q?ce.to:ce.from-1}var Se=null,Ae=null,Ue=yt(function(Nt){var Pt=Te(e,T,Nt);return Pt.top+=k,Pt.bottom+=k,hn(Pt,n,i,!1)?(Pt.top<=i&&Pt.left<=n&&(Se=Nt,Ae=Pt),!0):!1},W,z),Ve,nt,ft=!1;if(Ae){var xt=n-Ae.left<Ae.right-n,ht=xt==Q;Ue=Se+(ht?0:1),nt=ht?"after":"before",Ve=xt?Ae.left:Ae.right}else{!Q&&(Ue==z||Ue==W)&&Ue++,nt=Ue==0?"after":Ue==t.text.length?"before":Te(e,T,Ue-(Q?1:0)).bottom+k<=i==Q?"after":"before";var At=an(e,Qe(r,Ue,nt),"line",t,T);Ve=At.left,ft=i<At.top?-1:i>=At.bottom?1:0}return Ue=Ge(t.text,Ue,1),It(r,Ue,nt,ft,n-Ve)}function gn(e,t,r,n,i,T,k){var W=yt(function(ce){var Se=i[ce],Ae=Se.level!=1;return hn(an(e,Qe(r,Ae?Se.to:Se.from,Ae?"before":"after"),"line",t,n),T,k,!0)},0,i.length-1),z=i[W];if(W>0){var Q=z.level!=1,oe=an(e,Qe(r,Q?z.from:z.to,Q?"after":"before"),"line",t,n);hn(oe,T,k,!0)&&oe.top>k&&(z=i[W-1])}return z}function wn(e,t,r,n,i,T,k){var W=cn(e,t,n,k),z=W.begin,Q=W.end;/\s/.test(t.text.charAt(Q-1))&&Q--;for(var oe=null,ce=null,Se=0;Se<i.length;Se++){var Ae=i[Se];if(Ae.from>=Q||Ae.to<=z)continue;var Ue=Ae.level!=1,Ve=Te(e,n,Ue?Math.min(Q,Ae.to)-1:Math.max(z,Ae.from)).right,nt=Ve<T?T-Ve+1e9:Ve-T;(!oe||ce>nt)&&(oe=Ae,ce=nt)}return oe||(oe=i[i.length-1]),oe.from<z&&(oe={from:z,to:oe.to,level:oe.level}),oe.to>Q&&(oe={from:oe.from,to:Q,level:oe.level}),oe}var Sn;function Gn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Sn==null){Sn=o("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Sn.appendChild(document.createTextNode("x")),Sn.appendChild(o("br"));Sn.appendChild(document.createTextNode("x"))}c(e.measure,Sn);var r=Sn.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),m(e.measure),r||1}function qn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=o("span","xxxxxxxxxx"),r=o("pre",[t],"CodeMirror-line-like");c(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Bn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,T=t.gutters.firstChild,k=0;T;T=T.nextSibling,++k){var W=e.display.gutterSpecs[k].className;r[W]=T.offsetLeft+T.clientLeft+i,n[W]=T.clientWidth}return{fixedPos:gr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function gr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Gr(e){var t=Gn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/qn(e.display)-3);return function(i){if(Lr(e.doc,i))return 0;var T=0;if(i.widgets)for(var k=0;k<i.widgets.length;k++)i.widgets[k].height&&(T+=i.widgets[k].height);return r?T+(Math.ceil(i.text.length/n)||1)*t:T+t}}function Ar(e){var t=e.doc,r=Gr(e);t.iter(function(n){var i=r(n);i!=n.height&&Yn(n,i)})}function $n(e,t,r,n){var i=e.display;if(!r&&me(t).getAttribute("cm-not-content")=="true")return null;var T,k,W=i.lineSpace.getBoundingClientRect();try{T=t.clientX-W.left,k=t.clientY-W.top}catch(ce){return null}var z=sn(e,T,k),Q;if(n&&z.xRel>0&&(Q=Tt(e.doc,z.line).text).length==z.ch){var oe=Z(Q,Q.length,e.options.tabSize)-Q.length;z=Qe(z.line,Math.max(0,Math.round((T-ge(e.display).left)/qn(e.display))-oe))}return z}function In(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function Dn(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Rt&&yi(e.doc,t)<i.viewTo&&Nn(e);else if(r<=i.viewFrom)Rt&&Mr(e.doc,r+n)>i.viewFrom?Nn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Nn(e);else if(t<=i.viewFrom){var T=zr(e,r,r+n,1);T?(i.view=i.view.slice(T.index),i.viewFrom=T.lineN,i.viewTo+=n):Nn(e)}else if(r>=i.viewTo){var k=zr(e,t,t,-1);k?(i.view=i.view.slice(0,k.index),i.viewTo=k.lineN):Nn(e)}else{var W=zr(e,t,t,-1),z=zr(e,r,r+n,1);W&&z?(i.view=i.view.slice(0,W.index).concat(ur(e,W.lineN,z.lineN)).concat(i.view.slice(z.index)),i.viewTo+=n):Nn(e)}var Q=i.externalMeasured;Q&&(r<Q.lineN?Q.lineN+=n:t<Q.lineN+Q.size&&(i.externalMeasured=null))}function Fn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var T=n.view[In(e,t)];if(T.node==null)return;var k=T.changes||(T.changes=[]);pe(k,r)==-1&&k.push(r)}function Nn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function zr(e,t,r,n){var i=In(e,t),T,k=e.display.view;if(!Rt||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var W=e.display.viewFrom,z=0;z<i;z++)W+=k[z].size;if(W!=t){if(n>0){if(i==k.length-1)return null;T=W+k[i].size-t,i++}else T=W-t;t+=T,r+=T}for(;yi(e.doc,r)!=r;){if(i==(n<0?0:k.length-1))return null;r+=n*k[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function bi(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=ur(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ur(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(In(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(ur(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,In(e,r)))),n.viewTo=r}function Ei(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function Cn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function ei(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),T=n.selection=document.createDocumentFragment(),k=0;k<r.sel.ranges.length;k++){if(!t&&k==r.sel.primIndex)continue;var W=r.sel.ranges[k];if(W.from().line>=e.display.viewTo||W.to().line<e.display.viewFrom)continue;var z=W.empty();(z||e.options.showCursorWhenSelecting)&&xi(e,W.head,i),z||An(e,W,T)}return n}function xi(e,t,r){var n=an(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(o("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var T=r.appendChild(o("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));T.style.display="",T.style.left=n.other.left+"px",T.style.top=n.other.top+"px",T.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Rn(e,t){return e.top-t.top||e.left-t.left}function An(e,t,r){var n=e.display,i=e.doc,T=document.createDocumentFragment(),k=ge(e.display),W=k.left,z=Math.max(n.sizerWidth,ae(e)-n.sizer.offsetLeft)-k.right,Q=i.direction=="ltr";function oe(ht,At,Nt,Pt){At<0&&(At=0),At=Math.round(At),Pt=Math.round(Pt),T.appendChild(o("div",null,"CodeMirror-selected","position: absolute; left: "+ht+`px;
|
|
top: `+At+"px; width: "+(Nt==null?z-ht:Nt)+`px;
|
|
height: `+(Pt-At)+"px"))}function ce(ht,At,Nt){var Pt=Tt(i,ht),$t=Pt.text.length,Pn,sr;function Wn(Jn,kr){return kn(e,Qe(ht,Jn),"div",Pt,kr)}function Fr(Jn,kr,cr){var rr=Ct(e,Pt,null,Jn),Zn=kr=="ltr"==(cr=="after")?"left":"right",zn=cr=="after"?rr.begin:rr.end-(/\s/.test(Pt.text.charAt(rr.end-1))?2:1);return Wn(zn,Zn)[Zn]}var Pr=st(Pt,i.direction);return vt(Pr,At||0,Nt==null?$t:Nt,function(Jn,kr,cr,rr){var Zn=cr=="ltr",zn=Wn(Jn,Zn?"left":"right"),_r=Wn(kr-1,Zn?"right":"left"),Na=At==null&&Jn==0,na=Nt==null&&kr==$t,yr=rr==0,wi=!Pr||rr==Pr.length-1;if(_r.top-zn.top<=3){var lr=(Q?Na:na)&&yr,ms=(Q?na:Na)&&wi,Wi=lr?W:(Zn?zn:_r).left,ma=ms?z:(Zn?_r:zn).right;oe(Wi,zn.top,ma-Wi,zn.bottom)}else{var pa,wr,Ua,ps;Zn?(pa=Q&&Na&&yr?W:zn.left,wr=Q?z:Fr(Jn,cr,"before"),Ua=Q?W:Fr(kr,cr,"after"),ps=Q&&na&&wi?z:_r.right):(pa=Q?Fr(Jn,cr,"before"):W,wr=!Q&&Na&&yr?z:zn.right,Ua=!Q&&na&&wi?W:_r.left,ps=Q?Fr(kr,cr,"after"):z),oe(pa,zn.top,wr-pa,zn.bottom),zn.bottom<_r.top&&oe(W,zn.bottom,null,_r.top),oe(Ua,_r.top,ps-Ua,_r.bottom)}(!Pn||Rn(zn,Pn)<0)&&(Pn=zn),Rn(_r,Pn)<0&&(Pn=_r),(!sr||Rn(zn,sr)<0)&&(sr=zn),Rn(_r,sr)<0&&(sr=_r)}),{start:Pn,end:sr}}var Se=t.from(),Ae=t.to();if(Se.line==Ae.line)ce(Se.line,Se.ch,Ae.ch);else{var Ue=Tt(i,Se.line),Ve=Tt(i,Ae.line),nt=Er(Ue)==Er(Ve),ft=ce(Se.line,Se.ch,nt?Ue.text.length+1:null).end,xt=ce(Ae.line,nt?0:null,Ae.ch).start;nt&&(ft.top<xt.top-2?(oe(ft.right,ft.top,null,ft.bottom),oe(W,xt.top,xt.left,xt.bottom)):oe(ft.right,ft.top,xt.left-ft.right,ft.bottom)),ft.bottom<xt.top&&oe(W,ft.bottom,null,xt.top)}r.appendChild(T)}function er(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Qi(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function xo(e){e.state.focused||(e.display.input.focus(),Ai(e))}function za(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Qi(e))},100)}function Ai(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Oe(e,"focus",e,t),e.state.focused=!0,F(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()),er(e)}function Qi(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Oe(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 ya(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],T=e.options.lineWrapping,k=void 0,W=0;if(i.hidden)continue;if(U&&_<8){var z=i.node.offsetTop+i.node.offsetHeight;k=z-r,r=z}else{var Q=i.node.getBoundingClientRect();k=Q.bottom-Q.top,!T&&i.text.firstChild&&(W=i.text.firstChild.getBoundingClientRect().right-Q.left-1)}var oe=i.line.height-k;if((oe>.005||oe<-.005)&&(Yn(i.line,k),Va(i.line),i.rest))for(var ce=0;ce<i.rest.length;ce++)Va(i.rest[ce]);if(W>e.display.sizerWidth){var Se=Math.ceil(W/qn(e.display));Se>e.display.maxLineLength&&(e.display.maxLineLength=Se,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function Va(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function ba(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Ga(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,T=Dr(t,n),k=Dr(t,i);if(r&&r.ensure){var W=r.ensure.from.line,z=r.ensure.to.line;W<T?(T=W,k=Dr(t,Ur(Tt(t,W))+e.wrapper.clientHeight)):Math.min(z,t.lastLine())>=k&&(T=Dr(t,Ur(Tt(t,z))-e.wrapper.clientHeight),k=z)}return{from:T,to:Math.max(k,T+1)}}function Qo(e,t){if(We(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!A){var T=o("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-r.viewOffset-Ga(e.display))+`px;
|
|
height: `+(t.bottom-t.top+be(e)+r.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(T),T.scrollIntoView(i),e.display.lineSpace.removeChild(T)}}function Xo(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?Qe(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Qe(t.line,t.ch+1,"before"):t);for(var T=0;T<5;T++){var k=!1,W=an(e,t),z=!r||r==t?W:an(e,r);i={left:Math.min(W.left,z.left),top:Math.min(W.top,z.top)-n,right:Math.max(W.left,z.left),bottom:Math.max(W.bottom,z.bottom)+n};var Q=Qa(e,i),oe=e.doc.scrollTop,ce=e.doc.scrollLeft;if(Q.scrollTop!=null&&(Ji(e,Q.scrollTop),Math.abs(e.doc.scrollTop-oe)>1&&(k=!0)),Q.scrollLeft!=null&&(Vr(e,Q.scrollLeft),Math.abs(e.doc.scrollLeft-ce)>1&&(k=!0)),!k)break}return i}function Ao(e,t){var r=Qa(e,t);r.scrollTop!=null&&Ji(e,r.scrollTop),r.scrollLeft!=null&&Vr(e,r.scrollLeft)}function Qa(e,t){var r=e.display,n=Gn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,T=V(e),k={};t.bottom-t.top>T&&(t.bottom=t.top+T);var W=e.doc.height+re(r),z=t.top<n,Q=t.bottom>W-n;if(t.top<i)k.scrollTop=z?0:t.top;else if(t.bottom>i+T){var oe=Math.min(t.top,(Q?W:t.bottom)-T);oe!=i&&(k.scrollTop=oe)}var ce=e.options.fixedGutter?0:r.gutters.offsetWidth,Se=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-ce,Ae=ae(e)-r.gutters.offsetWidth,Ue=t.right-t.left>Ae;return Ue&&(t.right=t.left+Ae),t.left<10?k.scrollLeft=0:t.left<Se?k.scrollLeft=Math.max(0,t.left+ce-(Ue?0:10)):t.right>Ae+Se-3&&(k.scrollLeft=t.right+(Ue?0:10)-Ae),k}function Xa(e,t){if(t==null)return;Ea(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Xi(e){Ea(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Yi(e,t,r){(t!=null||r!=null)&&Ea(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Yo(e,t){Ea(e),e.curOp.scrollToPos=t}function Ea(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=kt(e,t.from),n=kt(e,t.to);ua(e,r,n,t.margin)}}function ua(e,t,r,n){var i=Qa(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Yi(e,i.scrollLeft,i.scrollTop)}function Ji(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;O||fa(e,{top:t}),Zi(e,t,!0),O&&fa(e),ca(e,100)}function Zi(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Vr(e,t,r,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,ln(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function _i(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+re(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?r:0,docHeight:n,scrollHeight:n+be(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Ti=function(e,t,r){this.cm=r;var n=this.vert=o("div",[o("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=o("div",[o("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),Me(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Me(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,U&&_<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ti.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var T=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+T)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Ti.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ti.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ti.prototype.zeroWidthHack=function(){var e=l&&!w?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ne,this.disableVert=new ne},Ti.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),T=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);T!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Ti.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var da=function(){};da.prototype.update=function(){return{bottom:0,right:0}},da.prototype.setScrollLeft=function(){},da.prototype.setScrollTop=function(){},da.prototype.clear=function(){};function Ni(e,t){t||(t=_i(e));var r=e.display.barWidth,n=e.display.barHeight;xa(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&ya(e),xa(e,_i(e)),r=e.display.barWidth,n=e.display.barHeight}function xa(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var Ya={native:Ti,null:da};function Aa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&f(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ya[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Me(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?Vr(e,t):Ji(e,t)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Ja=0;function Si(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:++Ja},Br(e.curOp)}function Ui(e){var t=e.curOp;t&&Ho(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;To(r)})}function To(e){for(var t=e.ops,r=0;r<t.length;r++)Jo(t[r]);for(var n=0;n<t.length;n++)Zo(t[n]);for(var i=0;i<t.length;i++)qo(t[i]);for(var T=0;T<t.length;T++)Za(t[T]);for(var k=0;k<t.length;k++)$o(t[k])}function Jo(e){var t=e.cm,r=t.display;So(t),e.updateMaxLine&&sa(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Qr(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Zo(e){e.updatedDisplay=e.mustUpdate&&Bi(e.cm,e.update)}function qo(e){var t=e.cm,r=t.display;e.updatedDisplay&&ya(t),e.barMeasure=_i(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ue(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+be(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-ae(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Za(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Vr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==P();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ni(t,e.barMeasure),e.updatedDisplay&&En(t,e.barMeasure),e.selectionChanged&&er(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&xo(e.cm)}function $o(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&Ta(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&Zi(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Vr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Xo(t,Ut(n,e.scrollToPos.from),Ut(n,e.scrollToPos.to),e.scrollToPos.margin);Qo(t,i)}var T=e.maybeHiddenMarkers,k=e.maybeUnhiddenMarkers;if(T)for(var W=0;W<T.length;++W)T[W].lines.length||Oe(T[W],"hide");if(k)for(var z=0;z<k.length;++z)k[z].lines.length&&Oe(k[z],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Oe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Tr(e,t){if(e.curOp)return t();Si(e);try{return t()}finally{Ui(e)}}function Vn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Si(e);try{return t.apply(e,arguments)}finally{Ui(e)}}}function dr(e){return function(){if(this.curOp)return e.apply(this,arguments);Si(this);try{return e.apply(this,arguments)}finally{Ui(this)}}}function Qn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Si(t);try{return e.apply(this,arguments)}finally{Ui(t)}}}function ca(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,j(es,e))}function es(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=Or(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(T){if(n.line>=e.display.viewFrom){var k=T.styles,W=T.text.length>e.options.maxHighlightLength?Tn(t.mode,n.state):null,z=Di(e,T,n,!0);W&&(n.state=W),T.styles=z.styles;var Q=T.styleClasses,oe=z.classes;oe?T.styleClasses=oe:Q&&(T.styleClasses=null);for(var ce=!k||k.length!=T.styles.length||Q!=oe&&(!Q||!oe||Q.bgClass!=oe.bgClass||Q.textClass!=oe.textClass),Se=0;!ce&&Se<k.length;++Se)ce=k[Se]!=T.styles[Se];ce&&i.push(n.line),T.stateAfter=n.save(),n.nextLine()}else T.text.length<=e.options.maxHighlightLength&&mi(e,T.text,n),T.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ca(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Tr(e,function(){for(var T=0;T<i.length;T++)Fn(e,i[T],"text")})}var Qr=function(e,t,r){var n=e.display;this.viewport=t,this.visible=ba(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=ae(e),this.force=r,this.dims=Bn(e),this.events=[]};Qr.prototype.signal=function(e,t){le(e,t)&&this.events.push(arguments)},Qr.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Oe.apply(null,this.events[e])};function So(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=be(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=be(e)+"px",t.scrollbarsClipped=!0)}function Co(e){if(e.hasFocus())return null;var t=P();if(!t||!S(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&S(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function wo(e){if(!e||!e.activeElt||e.activeElt==P())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&S(document.body,e.anchorNode)&&S(document.body,e.focusNode)){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Bi(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Nn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&Ei(e)==0)return!1;tr(e)&&(Nn(e),t.dims=Bn(e));var i=n.first+n.size,T=Math.max(t.visible.from-e.options.viewportMargin,n.first),k=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<T&&T-r.viewFrom<20&&(T=Math.max(n.first,r.viewFrom)),r.viewTo>k&&r.viewTo-k<20&&(k=Math.min(i,r.viewTo)),Rt&&(T=yi(e.doc,T),k=Mr(e.doc,k));var W=T!=r.viewFrom||k!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;bi(e,T,k),r.viewOffset=Ur(Tt(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var z=Ei(e);if(!W&&z==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var Q=Co(e);return z>4&&(r.lineDiv.style.display="none"),Do(e,r.updateLineNumbers,t.dims),z>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,wo(Q),m(r.cursorDiv),m(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,W&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ca(e,400)),r.updateLineNumbers=null,!0}function Ta(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==ae(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+re(e.display)-V(e),r.top)}),t.visible=ba(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=ba(e.display,e.doc,r));if(!Bi(e,t))break;ya(e);var i=_i(e);Cn(e),Ni(e,i),En(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 fa(e,t){var r=new Qr(e,t);if(Bi(e,r)){ya(e),Ta(e,r);var n=_i(e);Cn(e),Ni(e,n),En(e,n),r.finish()}}function Do(e,t,r){var n=e.display,i=e.options.lineNumbers,T=n.lineDiv,k=T.firstChild;function W(Ue){var Ve=Ue.nextSibling;return I&&l&&e.display.currentWheelTarget==Ue?Ue.style.display="none":Ue.parentNode.removeChild(Ue),Ve}for(var z=n.view,Q=n.viewFrom,oe=0;oe<z.length;oe++){var ce=z[oe];if(!ce.hidden)if(!ce.node||ce.node.parentNode!=T){var Se=bo(e,ce,Q,r);T.insertBefore(Se,k)}else{for(;k!=ce.node;)k=W(k);var Ae=i&&t!=null&&t<=Q&&ce.lineNumber;ce.changes&&(pe(ce.changes,"gutter")>-1&&(Ae=!1),vo(e,ce,Q,r)),Ae&&(m(ce.lineNumber),ce.lineNumber.appendChild(document.createTextNode(Yr(e.options,Q)))),k=ce.node.nextSibling}Q+=ce.size}for(;k;)k=W(k)}function Sa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function En(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+be(e)+"px"}function ln(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=gr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,T=n+"px",k=0;k<r.length;k++)if(!r[k].hidden){e.options.fixedGutter&&(r[k].gutter&&(r[k].gutter.style.left=T),r[k].gutterBackground&&(r[k].gutterBackground.style.left=T));var W=r[k].alignable;if(W)for(var z=0;z<W.length;z++)W[z].style.left=T}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}function tr(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Yr(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(o("div",[o("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),T=i.firstChild.offsetWidth,k=i.offsetWidth-T;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(T,n.lineGutter.offsetWidth-k)+1,n.lineNumWidth=n.lineNumInnerWidth+k,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Sa(e.display),!0}return!1}function Sr(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var T=e[i],k=null;if(typeof T!="string"&&(k=T.style,T=T.className),T=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:T,style:k})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function qi(e){var t=e.gutters,r=e.gutterSpecs;m(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],T=i.className,k=i.style,W=t.appendChild(o("div",null,"CodeMirror-gutter "+T));k&&(W.style.cssText=k),T=="CodeMirror-linenumbers"&&(e.lineGutter=W,W.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Sa(e)}function li(e){qi(e.display),Dn(e),ln(e)}function ha(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=o("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=o("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=x("div",null,"CodeMirror-code"),i.selectionDiv=o("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=o("div",null,"CodeMirror-cursors"),i.measure=o("div",null,"CodeMirror-measure"),i.lineMeasure=o("div",null,"CodeMirror-measure"),i.lineSpace=x("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var T=x("div",[i.lineSpace],"CodeMirror-lines");i.mover=o("div",[T],null,"position: relative"),i.sizer=o("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=o("div",null,null,"position: absolute; height: "+xe+"px; width: 1px;"),i.gutters=o("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=o("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=o("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),U&&_<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!I&&!(O&&a)&&(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=Sr(n.gutters,n.lineNumbers),qi(i),r.init(i)}var Ci=0,nr=null;U?nr=-.53:O?nr=15:b?nr=-.7:R&&(nr=-1/3);function Ca(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function qa(e){var t=Ca(e);return t.x*=nr,t.y*=nr,t}function $a(e,t){var r=Ca(t),n=r.x,i=r.y,T=e.display,k=T.scroller,W=k.scrollWidth>k.clientWidth,z=k.scrollHeight>k.clientHeight;if(!(n&&W||i&&z))return;if(i&&l&&I){e:for(var Q=t.target,oe=T.view;Q!=k;Q=Q.parentNode)for(var ce=0;ce<oe.length;ce++)if(oe[ce].node==Q){e.display.currentWheelTarget=Q;break e}}if(n&&!O&&!E&&nr!=null){i&&z&&Ji(e,Math.max(0,k.scrollTop+i*nr)),Vr(e,Math.max(0,k.scrollLeft+n*nr)),(!i||i&&z)&&J(t),T.wheelStartX=null;return}if(i&&nr!=null){var Se=i*nr,Ae=e.doc.scrollTop,Ue=Ae+T.wrapper.clientHeight;Se<0?Ae=Math.max(0,Ae+Se-50):Ue=Math.min(e.doc.height,Ue+Se+50),fa(e,{top:Ae,bottom:Ue})}Ci<20&&(T.wheelStartX==null?(T.wheelStartX=k.scrollLeft,T.wheelStartY=k.scrollTop,T.wheelDX=n,T.wheelDY=i,setTimeout(function(){if(T.wheelStartX==null)return;var Ve=k.scrollLeft-T.wheelStartX,nt=k.scrollTop-T.wheelStartY,ft=nt&&T.wheelDY&&nt/T.wheelDY||Ve&&T.wheelDX&&Ve/T.wheelDX;if(T.wheelStartX=T.wheelStartY=null,!ft)return;nr=(nr*Ci+ft)/(Ci+1),++Ci},200)):(T.wheelDX+=n,T.wheelDY+=i))}var Cr=function(e,t){this.ranges=e,this.primIndex=t};Cr.prototype.primary=function(){return this.ranges[this.primIndex]},Cr.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 r=this.ranges[t],n=e.ranges[t];if(!Wr(r.anchor,n.anchor)||!Wr(r.head,n.head))return!1}return!0},Cr.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new bn(ni(this.ranges[t].anchor),ni(this.ranges[t].head));return new Cr(e,this.primIndex)},Cr.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Cr.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(Lt(t,n.from())>=0&&Lt(e,n.to())<=0)return r}return-1};var bn=function(e,t){this.anchor=e,this.head=t};bn.prototype.from=function(){return Kr(this.anchor,this.head)},bn.prototype.to=function(){return fi(this.anchor,this.head)},bn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Xr(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(Se,Ae){return Lt(Se.from(),Ae.from())}),r=pe(t,i);for(var T=1;T<t.length;T++){var k=t[T],W=t[T-1],z=Lt(W.to(),k.from());if(n&&!k.empty()?z>0:z>=0){var Q=Kr(W.from(),k.from()),oe=fi(W.to(),k.to()),ce=W.empty()?k.from()==k.head:W.from()==W.head;T<=r&&--r,t.splice(--T,2,new bn(ce?oe:Q,ce?Q:oe))}}return new Cr(t,r)}function ui(e,t){return new Cr([new bn(e,t||e)],0)}function di(e){return e.text?Qe(e.from.line+e.text.length-1,_e(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function eo(e,t){if(Lt(e,t.from)<0)return e;if(Lt(e,t.to)<=0)return di(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=di(t).ch-t.to.ch),Qe(r,n)}function wa(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new bn(eo(i.anchor,t),eo(i.head,t)))}return Xr(e.cm,r,e.sel.primIndex)}function Oo(e,t,r){return e.line==t.line?Qe(r.line,e.ch-t.ch+r.ch):Qe(r.line+(e.line-t.line),e.ch)}function Ro(e,t,r){for(var n=[],i=Qe(e.first,0),T=i,k=0;k<t.length;k++){var W=t[k],z=Oo(W.from,i,T),Q=Oo(di(W),i,T);if(i=W.to,T=Q,r=="around"){var oe=e.sel.ranges[k],ce=Lt(oe.head,oe.anchor)<0;n[k]=new bn(ce?Q:z,ce?z:Q)}else n[k]=new bn(z,z)}return new Cr(n,e.sel.primIndex)}function Fi(e){e.doc.mode=en(e.options,e.doc.modeOption),to(e)}function to(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,ca(e,100),e.state.modeGen++,e.curOp&&Dn(e)}function gs(e,t){return t.from.ch==0&&t.to.ch==0&&_e(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,t,r,n){function i(xt){return r?r[xt]:null}function T(xt,ht,At){Ba(xt,ht,At,n),Hn(xt,"change",xt,t)}function k(xt,ht){for(var At=[],Nt=xt;Nt<ht;++Nt)At.push(new ki(Q[Nt],i(Nt),n));return At}var W=t.from,z=t.to,Q=t.text,oe=Tt(e,W.line),ce=Tt(e,z.line),Se=_e(Q),Ae=i(Q.length-1),Ue=z.line-W.line;if(t.full)e.insert(0,k(0,Q.length)),e.remove(Q.length,e.size-Q.length);else if(gs(e,t)){var Ve=k(0,Q.length-1);T(ce,ce.text,Ae),Ue&&e.remove(W.line,Ue),Ve.length&&e.insert(W.line,Ve)}else if(oe==ce)if(Q.length==1)T(oe,oe.text.slice(0,W.ch)+Se+oe.text.slice(z.ch),Ae);else{var nt=k(1,Q.length-1);nt.push(new ki(Se+oe.text.slice(z.ch),Ae,n)),T(oe,oe.text.slice(0,W.ch)+Q[0],i(0)),e.insert(W.line+1,nt)}else if(Q.length==1)T(oe,oe.text.slice(0,W.ch)+Q[0]+ce.text.slice(z.ch),i(0)),e.remove(W.line+1,Ue);else{T(oe,oe.text.slice(0,W.ch)+Q[0],i(0)),T(ce,Se+ce.text.slice(z.ch),Ae);var ft=k(1,Q.length-1);Ue>1&&e.remove(W.line+1,Ue-1),e.insert(W.line+1,ft)}Hn(e,"change",e,t)}function $i(e,t,r){function n(i,T,k){if(i.linked)for(var W=0;W<i.linked.length;++W){var z=i.linked[W];if(z.doc==T)continue;var Q=k&&z.sharedHist;if(r&&!Q)continue;t(z.doc,Q),n(z.doc,i,Q)}}n(e,null,!0)}function vs(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Ar(e),Fi(e),ys(e),e.options.lineWrapping||sa(e),e.options.mode=t.modeOption,Dn(e)}function ys(e){(e.doc.direction=="rtl"?F:f)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){Tr(e,function(){ys(e),Dn(e)})}function Mo(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 ns(e,t){var r={from:ni(t.from),to:di(t),text:jr(e,t.from,t.to)};return xs(e,r,t.from.line,t.to.line+1),$i(e,function(n){return xs(n,r,t.from.line,t.to.line+1)},!0),r}function bs(e){for(;e.length;){var t=_e(e);if(t.ranges)e.pop();else break}}function ml(e,t){if(t)return bs(e.done),_e(e.done);if(e.done.length&&!_e(e.done).ranges)return _e(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),_e(e.done)}function Es(e,t,r,n){var i=e.history;i.undone.length=0;var T=+new Date,k,W;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>T-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(k=ml(i,i.lastOp==n)))W=_e(k.changes),Lt(t.from,t.to)==0&&Lt(t.from,W.to)==0?W.to=di(t):k.changes.push(ns(e,t));else{var z=_e(i.done);for((!z||!z.ranges)&&Lo(e.sel,i.done),k={changes:[ns(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(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=T,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,W||Oe(e,"historyAdded")}function pl(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,n){var i=e.history,T=n&&n.origin;r==i.lastSelOp||T&&i.lastSelOrigin==T&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==T||pl(e,T,_e(i.done),t))?i.done[i.done.length-1]=t:Lo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=T,i.lastSelOp=r,n&&n.clearRedo!==!1&&bs(i.undone)}function Lo(e,t){var r=_e(t);r&&r.ranges&&r.equals(e)||t.push(e)}function xs(e,t,r,n){var i=t["spans_"+e.id],T=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(k){k.markedSpans&&((i||(i=t["spans_"+e.id]={}))[T]=k.markedSpans),++T})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function yl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(vl(r[i]));return n}function As(e,t){var r=yl(e,t),n=Hr(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var T=r[i],k=n[i];if(T&&k){e:for(var W=0;W<k.length;++W){for(var z=k[W],Q=0;Q<T.length;++Q)if(T[Q].marker==z.marker)continue e;T.push(z)}}else k&&(r[i]=k)}return r}function Da(e,t,r){for(var n=[],i=0;i<e.length;++i){var T=e[i];if(T.ranges){n.push(r?Cr.prototype.deepCopy.call(T):T);continue}var k=T.changes,W=[];n.push({changes:W});for(var z=0;z<k.length;++z){var Q=k[z],oe=void 0;if(W.push({from:Q.from,to:Q.to,text:Q.text}),t)for(var ce in Q)(oe=ce.match(/^spans_(\d+)$/))&&(pe(t,Number(oe[1]))>-1&&(_e(W)[ce]=Q[ce],delete Q[ce]))}}return n}function rs(e,t,r,n){if(n){var i=e.anchor;if(r){var T=Lt(t,i)<0;T!=Lt(r,i)<0?(i=t,t=r):T!=Lt(t,r)<0&&(t=r)}return new bn(i,t)}else return new bn(r||t,t)}function Io(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),vr(e,new Cr([rs(e.sel.primary(),t,r,i)],0),n)}function Ts(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),T=0;T<e.sel.ranges.length;T++)n[T]=rs(e.sel.ranges[T],t[T],null,i);var k=Xr(e.cm,n,e.sel.primIndex);vr(e,k,r)}function is(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,vr(e,Xr(e.cm,i,e.sel.primIndex),n)}function Ss(e,t,r,n){vr(e,ui(t,r),n)}function bl(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var T=0;T<i.length;T++)this.ranges[T]=new bn(Ut(e,i[T].anchor),Ut(e,i[T].head))},origin:r&&r.origin};return Oe(e,"beforeSelectionChange",e,n),e.cm&&Oe(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Xr(e.cm,n.ranges,n.ranges.length-1):t}function Cs(e,t,r){var n=e.history.done,i=_e(n);i&&i.ranges?(n[n.length-1]=t,Po(e,t,r)):vr(e,t,r)}function vr(e,t,r){Po(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Po(e,t,r){(le(e,"beforeSelectionChange")||e.cm&&le(e.cm,"beforeSelectionChange"))&&(t=bl(e,t,r));var n=r&&r.bias||(Lt(t.primary().head,e.sel.primary().head)<0?-1:1);ws(e,Os(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Xi(e.cm)}function ws(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ve(e.cm)),Hn(e,"cursorActivity",e)}function Ds(e){ws(e,Os(e,e.sel,null,!1))}function Os(e,t,r,n){for(var i,T=0;T<t.ranges.length;T++){var k=t.ranges[T],W=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[T],z=ko(e,k.anchor,W&&W.anchor,r,n),Q=ko(e,k.head,W&&W.head,r,n);(i||z!=k.anchor||Q!=k.head)&&(i||(i=t.ranges.slice(0,T)),i[T]=new bn(z,Q))}return i?Xr(e.cm,i,t.primIndex):t}function Oa(e,t,r,n,i){var T=Tt(e,t.line);if(T.markedSpans)for(var k=0;k<T.markedSpans.length;++k){var W=T.markedSpans[k],z=W.marker,Q="selectLeft"in z?!z.selectLeft:z.inclusiveLeft,oe="selectRight"in z?!z.selectRight:z.inclusiveRight;if((W.from==null||(Q?W.from<=t.ch:W.from<t.ch))&&(W.to==null||(oe?W.to>=t.ch:W.to>t.ch))){if(i&&(Oe(z,"beforeCursorEnter"),z.explicitlyCleared))if(T.markedSpans){--k;continue}else break;if(!z.atomic)continue;if(r){var ce=z.find(n<0?1:-1),Se=void 0;if((n<0?oe:Q)&&(ce=Rs(e,ce,-n,ce&&ce.line==t.line?T:null)),ce&&ce.line==t.line&&(Se=Lt(ce,r))&&(n<0?Se<0:Se>0))return Oa(e,ce,t,n,i)}var Ae=z.find(n<0?-1:1);return(n<0?Q:oe)&&(Ae=Rs(e,Ae,n,Ae.line==t.line?T:null)),Ae?Oa(e,Ae,t,n,i):null}}return t}function ko(e,t,r,n,i){var T=n||1,k=Oa(e,t,r,T,i)||!i&&Oa(e,t,r,T,!0)||Oa(e,t,r,-T,i)||!i&&Oa(e,t,r,-T,!0);return k||(e.cantEdit=!0,Qe(e.first,0))}function Rs(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?Ut(e,Qe(t.line-1)):null:r>0&&t.ch==(n||Tt(e,t.line)).text.length?t.line<e.first+e.size-1?Qe(t.line+1,0):null:new Qe(t.line,t.ch+r)}function Ms(e){e.setSelection(Qe(e.firstLine(),0),Qe(e.lastLine()),Le)}function Ls(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,T,k,W){i&&(n.from=Ut(e,i)),T&&(n.to=Ut(e,T)),k&&(n.text=k),W!==void 0&&(n.origin=W)}),Oe(e,"beforeChange",e,n),e.cm&&Oe(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Ra(e,t,r){if(e.cm){if(!e.cm.curOp)return Vn(e.cm,Ra)(e,t,r);if(e.cm.state.suppressEdits)return}if((le(e,"beforeChange")||e.cm&&le(e.cm,"beforeChange"))&&(t=Ls(e,t,!0),!t))return;var n=vn&&!r&&ar(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Is(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Is(e,t)}function Is(e,t){if(t.text.length==1&&t.text[0]==""&&Lt(t.from,t.to)==0)return;var r=wa(e,t);Es(e,t,r,e.cm?e.cm.curOp.id:NaN),no(e,t,r,Hr(e,t));var n=[];$i(e,function(i,T){!T&&pe(n,i.history)==-1&&(Ns(i.history,t),n.push(i.history)),no(i,t,null,Hr(i,t))})}function _o(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var i=e.history,T,k=e.sel,W=t=="undo"?i.done:i.undone,z=t=="undo"?i.undone:i.done,Q=0;Q<W.length&&!(T=W[Q],r?T.ranges&&!T.equals(e.sel):!T.ranges);Q++);if(Q==W.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(T=W.pop(),T.ranges){if(Lo(T,z),r&&!T.equals(e.sel)){vr(e,T,{clearRedo:!1});return}k=T}else if(n){W.push(T);return}else break;var oe=[];Lo(k,z),z.push({changes:oe,generation:i.generation}),i.generation=T.generation||++i.maxGeneration;for(var ce=le(e,"beforeChange")||e.cm&&le(e.cm,"beforeChange"),Se=function(Ve){var nt=T.changes[Ve];if(nt.origin=t,ce&&!Ls(e,nt,!1))return W.length=0,{};oe.push(ns(e,nt));var ft=Ve?wa(e,nt):_e(W);no(e,nt,ft,As(e,nt)),!Ve&&e.cm&&e.cm.scrollIntoView({from:nt.from,to:di(nt)});var xt=[];$i(e,function(ht,At){!At&&pe(xt,ht.history)==-1&&(Ns(ht.history,nt),xt.push(ht.history)),no(ht,nt,null,As(ht,nt))})},Ae=T.changes.length-1;Ae>=0;--Ae){var Ue=Se(Ae);if(Ue)return Ue.v}}function Ps(e,t){if(t==0)return;if(e.first+=t,e.sel=new Cr(at(e.sel.ranges,function(i){return new bn(Qe(i.anchor.line+t,i.anchor.ch),Qe(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){Dn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Fn(e.cm,n,"gutter")}}function no(e,t,r,n){if(e.cm&&!e.cm.curOp)return Vn(e.cm,no)(e,t,r,n);if(t.to.line<e.first){Ps(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);Ps(e,i),t={from:Qe(e.first,0),to:Qe(t.to.line+i,t.to.ch),text:[_e(t.text)],origin:t.origin}}var T=e.lastLine();t.to.line>T&&(t={from:t.from,to:Qe(T,Tt(e,T).text.length),text:[t.text[0]],origin:t.origin}),t.removed=jr(e,t.from,t.to),r||(r=wa(e,t)),e.cm?El(e.cm,t,n):ts(e,t,n),Po(e,r,Le),e.cantEdit&&ko(e,Qe(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,r){var n=e.doc,i=e.display,T=t.from,k=t.to,W=!1,z=T.line;e.options.lineWrapping||(z=on(Er(Tt(n,T.line))),n.iter(z,k.line+1,function(Ae){if(Ae==i.maxLine)return W=!0,!0})),n.sel.contains(t.from,t.to)>-1&&ve(e),ts(n,t,r,Gr(e)),e.options.lineWrapping||(n.iter(z,T.line+t.text.length,function(Ae){var Ue=oa(Ae);Ue>i.maxLineLength&&(i.maxLine=Ae,i.maxLineLength=Ue,i.maxLineChanged=!0,W=!1)}),W&&(e.curOp.updateMaxLine=!0)),ra(n,T.line),ca(e,400);var Q=t.text.length-(k.line-T.line)-1;t.full?Dn(e):T.line==k.line&&t.text.length==1&&!gs(e.doc,t)?Fn(e,T.line,"text"):Dn(e,T.line,k.line+1,Q);var oe=le(e,"changes"),ce=le(e,"change");if(ce||oe){var Se={from:T,to:k,text:t.text,removed:t.removed,origin:t.origin};ce&&Hn(e,"change",e,Se),oe&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Se)}e.display.selForContextMenu=null}function Ma(e,t,r,n,i){var T;n||(n=r),Lt(n,r)<0&&(T=[n,r],r=T[0],n=T[1]),typeof t=="string"&&(t=e.splitLines(t)),Ra(e,{from:r,to:n,text:t,origin:i})}function ks(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function _s(e,t,r,n){for(var i=0;i<e.length;++i){var T=e[i],k=!0;if(T.ranges){T.copied||(T=e[i]=T.deepCopy(),T.copied=!0);for(var W=0;W<T.ranges.length;W++)ks(T.ranges[W].anchor,t,r,n),ks(T.ranges[W].head,t,r,n);continue}for(var z=0;z<T.changes.length;++z){var Q=T.changes[z];if(r<Q.from.line)Q.from=Qe(Q.from.line+n,Q.from.ch),Q.to=Qe(Q.to.line+n,Q.to.ch);else if(t<=Q.to.line){k=!1;break}}k||(e.splice(0,i+1),i=0)}}function Ns(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;_s(e.done,r,n,i),_s(e.undone,r,n,i)}function ro(e,t,r,n){var i=t,T=t;return typeof t=="number"?T=Tt(e,hi(e,t)):i=on(t),i==null?null:(n(T,i)&&e.cm&&Fn(e.cm,i,r),T)}function io(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}io.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,wt(i),Hn(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function ao(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}ao.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var T=Math.min(t,i-e),k=n.height;if(n.removeInner(e,T),this.height-=k-n.height,i==T&&(this.children.splice(r--,1),n.parent=null),(t-=T)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof io))){var W=[];this.collapse(W),this.children=[new io(W)],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,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],T=i.chunkSize();if(e<=T){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var k=i.lines.length%25+25,W=k;W<i.lines.length;){var z=new io(i.lines.slice(W,W+=25));i.height-=z.height,this.children.splice(++n,0,z),z.parent=this}i.lines=i.lines.slice(0,k),this.maybeSpill()}break}e-=T}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new ao(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=pe(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new ao(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],T=i.chunkSize();if(e<T){var k=Math.min(t,T-e);if(i.iterN(e,k,r))return!0;if((t-=k)==0)break;e=0}else e-=T}}};var oo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};oo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=on(r);if(n==null||!t)return;for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var T=Vi(this);Yn(r,Math.max(0,r.height-T)),e&&(Tr(e,function(){Us(e,r,-T),Fn(e,n,"widget")}),Hn(e,"lineWidgetCleared",e,this,n))},oo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Vi(this)-t;if(!i)return;Lr(this.doc,n)||Yn(n,n.height+i),r&&Tr(r,function(){r.curOp.forceUpdate=!0,Us(r,n,i),Hn(r,"lineWidgetChanged",r,e,on(n))})},de(oo);function Us(e,t,r){Ur(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Xa(e,r)}function xl(e,t,r,n){var i=new oo(e,r,n),T=e.cm;return T&&i.noHScroll&&(T.display.alignWidgets=!0),ro(e,t,"widget",function(k){var W=k.widgets||(k.widgets=[]);if(i.insertAt==null?W.push(i):W.splice(Math.min(W.length-1,Math.max(0,i.insertAt)),0,i),i.line=k,T&&!Lr(e,k)){var z=Ur(k)<e.scrollTop;Yn(k,k.height+Vi(i)),z&&Xa(T,i.height),T.curOp.forceUpdate=!0}return!0}),T&&Hn(T,"lineWidgetAdded",T,i,typeof t=="number"?t:on(t)),i}var Bs=0,ea=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Bs};ea.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Si(e),le(this,"clear")){var r=this.find();r&&Hn(this,"clear",r.from,r.to)}for(var n=null,i=null,T=0;T<this.lines.length;++T){var k=this.lines[T],W=Qt(k.markedSpans,this);e&&!this.collapsed?Fn(e,on(k),"text"):e&&(W.to!=null&&(i=on(k)),W.from!=null&&(n=on(k))),k.markedSpans=Jr(k.markedSpans,W),W.from==null&&this.collapsed&&!Lr(this.doc,k)&&e&&Yn(k,Gn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var z=0;z<this.lines.length;++z){var Q=Er(this.lines[z]),oe=oa(Q);oe>e.display.maxLineLength&&(e.display.maxLine=Q,e.display.maxLineLength=oe,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Dn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ds(e.doc)),e&&Hn(e,"markerCleared",e,this,n,i),t&&Ui(e),this.parent&&this.parent.clear()},ea.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var T=this.lines[i],k=Qt(T.markedSpans,this);if(k.from!=null&&(r=Qe(t?T:on(T),k.from),e==-1))return r;if(k.to!=null&&(n=Qe(t?T:on(T),k.to),e==1))return n}return r&&{from:r,to:n}},ea.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;Tr(n,function(){var i=t.line,T=on(t.line),k=Ee(n,T);if(k&&(Yt(k),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Lr(r.doc,i)&&r.height!=null){var W=r.height;r.height=null;var z=Vi(r)-W;z&&Yn(i,i.height+z)}Hn(n,"markerChanged",n,e)})},ea.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||pe(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ea.prototype.detachLine=function(e){if(this.lines.splice(pe(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},de(ea);function La(e,t,r,n,i){if(n&&n.shared)return Al(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Vn(e.cm,La)(e,t,r,n,i);var T=new ea(e,i),k=Lt(t,r);if(n&&N(n,T,!1),k>0||k==0&&T.clearWhenEmpty!==!1)return T;if(T.replacedWith&&(T.collapsed=!0,T.widgetNode=x("span",[T.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||T.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(T.widgetNode.insertLeft=!0)),T.collapsed){if(ga(e,t.line,t,r,T)||t.line!=r.line&&ga(e,r.line,t,r,T))throw new Error("Inserting collapsed marker partially overlapping an existing one");tn()}T.addToHistory&&Es(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var W=t.line,z=e.cm,Q;if(e.iter(W,r.line+1,function(ce){z&&T.collapsed&&!z.options.lineWrapping&&Er(ce)==z.display.maxLine&&(Q=!0),T.collapsed&&W!=t.line&&Yn(ce,0),ir(ce,new pn(T,W==t.line?t.ch:null,W==r.line?r.ch:null)),++W}),T.collapsed&&e.iter(t.line,r.line+1,function(ce){Lr(e,ce)&&Yn(ce,0)}),T.clearOnEnter&&Me(T,"beforeCursorEnter",function(){return T.clear()}),T.readOnly&&(Bt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),T.collapsed&&(T.id=++Bs,T.atomic=!0),z){if(Q&&(z.curOp.updateMaxLine=!0),T.collapsed)Dn(z,t.line,r.line+1);else if(T.className||T.startStyle||T.endStyle||T.css||T.attributes||T.title)for(var oe=t.line;oe<=r.line;oe++)Fn(z,oe,"text");T.atomic&&Ds(z.doc),Hn(z,"markerAdded",z,T)}return T}var so=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};so.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Hn(this,"clear")},so.prototype.find=function(e,t){return this.primary.find(e,t)},de(so);function Al(e,t,r,n,i){n=N(n),n.shared=!1;var T=[La(e,t,r,n,i)],k=T[0],W=n.widgetNode;return $i(e,function(z){W&&(n.widgetNode=W.cloneNode(!0)),T.push(La(z,Ut(z,t),Ut(z,r),n,i));for(var Q=0;Q<z.linked.length;++Q)if(z.linked[Q].isParent)return;k=_e(T)}),new so(T,k)}function Fs(e){return e.findMarks(Qe(e.first,0),e.clipPos(Qe(e.lastLine())),function(t){return t.parent})}function Tl(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),T=e.clipPos(i.from),k=e.clipPos(i.to);if(Lt(T,k)){var W=La(e,T,k,n.primary,n.primary.type);n.markers.push(W),W.parent=n}}}function Sl(e){for(var t=function(n){var i=e[n],T=[i.primary.doc];$i(i.primary.doc,function(z){return T.push(z)});for(var k=0;k<i.markers.length;k++){var W=i.markers[k];pe(T,W.doc)==-1&&(W.parent=null,i.markers.splice(k--,1))}},r=0;r<e.length;r++)t(r)}var Cl=0,Ir=function(e,t,r,n,i){if(!(this instanceof Ir))return new Ir(e,t,r,n,i);r==null&&(r=0),ao.call(this,[new io([new ki("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var T=Qe(r,0);this.sel=ui(T),this.history=new Mo(null),this.id=++Cl,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:T,to:T,text:e}),vr(this,ui(T),Le)};Ir.prototype=gt(ao.prototype,{constructor:Ir,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ti(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Qn(function(e){var t=Qe(this.first,0),r=this.first+this.size-1;Ra(this,{from:t,to:Qe(r,Tt(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Yi(this.cm,0,0),vr(this,ui(t),Le)}),replaceRange:function(e,t,r,n){t=Ut(this,t),r=r?Ut(this,r):t,Ma(this,e,t,r,n)},getRange:function(e,t,r){var n=jr(this,Ut(this,e),Ut(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Nr(this,e))return Tt(this,e)},getLineNumber:function(e){return on(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Tt(this,e)),Er(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ut(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Qn(function(e,t,r){Ss(this,Ut(this,typeof e=="number"?Qe(e,t||0):e),null,r)}),setSelection:Qn(function(e,t,r){Ss(this,Ut(this,e),Ut(this,t||e),r)}),extendSelection:Qn(function(e,t,r){Io(this,Ut(this,e),t&&Ut(this,t),r)}),extendSelections:Qn(function(e,t){Ts(this,$e(this,e),t)}),extendSelectionsBy:Qn(function(e,t){var r=at(this.sel.ranges,e);Ts(this,$e(this,r),t)}),setSelections:Qn(function(e,t,r){if(!e.length)return;for(var n=[],i=0;i<e.length;i++)n[i]=new bn(Ut(this,e[i].anchor),Ut(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),vr(this,Xr(this.cm,n,t),r)}),addSelection:Qn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new bn(Ut(this,e),Ut(this,t||e))),vr(this,Xr(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=jr(this,t[n].from(),t[n].to());r=r?r.concat(i):i}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=jr(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Qn(function(e,t,r){for(var n=[],i=this.sel,T=0;T<i.ranges.length;T++){var k=i.ranges[T];n[T]={from:k.from(),to:k.to(),text:this.splitLines(e[T]),origin:r}}for(var W=t&&t!="end"&&Ro(this,n,t),z=n.length-1;z>=0;z--)Ra(this,n[z]);W?Cs(this,W):this.cm&&Xi(this.cm)}),undo:Qn(function(){_o(this,"undo")}),redo:Qn(function(){_o(this,"redo")}),undoSelection:Qn(function(){_o(this,"undo",!0)}),redoSelection:Qn(function(){_o(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Mo(this.history.maxGeneration),$i(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:Da(this.history.done),undone:Da(this.history.undone)}},setHistory:function(e){var t=this.history=new Mo(this.history.maxGeneration);t.done=Da(e.done.slice(0),null,!0),t.undone=Da(e.undone.slice(0),null,!0)},setGutterMarker:Qn(function(e,t,r){return ro(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&ut(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Qn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&ro(t,r,"gutter",function(){return r.gutterMarkers[e]=null,ut(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Nr(this,e))return null;if(t=e,e=Tt(this,e),!e)return null}else if(t=on(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:Qn(function(e,t,r){return ro(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(v(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Qn(function(e,t,r){return ro(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",T=n[i];if(T)if(r==null)n[i]=null;else{var k=T.match(v(r));if(!k)return!1;var W=k.index+k[0].length;n[i]=T.slice(0,k.index)+(!k.index||W==T.length?"":" ")+T.slice(W)||null}else return!1;return!0})}),addLineWidget:Qn(function(e,t,r){return xl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return La(this,Ut(this,e),Ut(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Ut(this,e),La(this,e,e,r,"bookmark")},findMarksAt:function(e){e=Ut(this,e);var t=[],r=Tt(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(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,r){e=Ut(this,e),t=Ut(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(T){var k=T.markedSpans;if(k)for(var W=0;W<k.length;W++){var z=k[W];!(z.to!=null&&i==e.line&&e.ch>=z.to||z.from==null&&i!=e.line||z.from!=null&&i==t.line&&z.from>=t.ch)&&(!r||r(z.marker))&&n.push(z.marker.parent||z.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var T=i.text.length+n;if(T>e)return t=e,!0;e-=T,++r}),Ut(this,Qe(r,t))},indexFromPos:function(e){e=Ut(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new Ir(ti(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,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new Ir(ti(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(n,Fs(this)),n},unlinkDoc:function(e){if(e instanceof jn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Sl(Fs(this));break}if(e.history==this.history){var n=[e.id];$i(e,function(i){return n.push(i.id)},!0),e.history=new Mo(null),e.history.done=Da(this.history.done,n),e.history.undone=Da(this.history.undone,n)}},iterLinkedDocs:function(e){$i(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):St(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Qn(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)})}),Ir.prototype.eachLine=Ir.prototype.iter;var js=0;function wl(e){var t=this;if(Ws(t),We(t,e)||si(t.display,e))return;J(e),U&&(js=+new Date);var r=$n(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,T=Array(i),k=0,W=function(){++k==i&&Vn(t,function(){r=Ut(t.doc,r);var Ae={from:r,to:r,text:t.doc.splitLines(T.filter(function(Ue){return Ue!=null}).join(t.doc.lineSeparator())),origin:"paste"};Ra(t.doc,Ae),Cs(t.doc,ui(Ut(t.doc,r),Ut(t.doc,di(Ae))))})()},z=function(Ae,Ue){if(t.options.allowDropFileTypes&&pe(t.options.allowDropFileTypes,Ae.type)==-1){W();return}var Ve=new FileReader;Ve.onerror=function(){return W()},Ve.onload=function(){var nt=Ve.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(nt)){W();return}T[Ue]=nt,W()},Ve.readAsText(Ae)},Q=0;Q<n.length;Q++)z(n[Q],Q);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var oe=e.dataTransfer.getData("Text");if(oe){var ce;if(t.state.draggingText&&!t.state.draggingText.copy&&(ce=t.listSelections()),Po(t.doc,ui(r,r)),ce)for(var Se=0;Se<ce.length;++Se)Ma(t.doc,"",ce[Se].anchor,ce[Se].head,"drag");t.replaceSelection(oe,"around","paste"),t.display.input.focus()}}catch(Ae){}}}function Dl(e,t){if(U&&(!e.state.draggingText||+new Date-js<100)){ie(t);return}if(We(e,t)||si(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!R){var r=o("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",E&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),E&&r.parentNode.removeChild(r)}}function Ol(e,t){var r=$n(e,t);if(!r)return;var n=document.createDocumentFragment();xi(e,r,n),e.display.dragCursor||(e.display.dragCursor=o("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),c(e.display.dragCursor,n)}function Ws(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ks(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var T=0;T<r.length;T++)e(r[T])})}var Hs=!1;function Rl(){if(Hs)return;Ml(),Hs=!0}function Ml(){var e;Me(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ks(Ll)},100))}),Me(window,"blur",function(){return Ks(Qi)})}function Ll(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var ta={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"},lo=0;lo<10;lo++)ta[lo+48]=ta[lo+96]=String(lo);for(var No=65;No<=90;No++)ta[No]=String.fromCharCode(No);for(var uo=1;uo<=12;uo++)ta[uo+111]=ta[uo+63235]="F"+uo;var ji={};ji.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"},ji.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"},ji.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"},ji.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"]},ji.default=l?ji.macDefault:ji.pcDefault;function Il(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,T,k=0;k<t.length-1;k++){var W=t[k];if(/^(cmd|meta|m)$/i.test(W))T=!0;else if(/^a(lt)?$/i.test(W))r=!0;else if(/^(c|ctrl|control)$/i.test(W))n=!0;else if(/^s(hift)?$/i.test(W))i=!0;else throw new Error("Unrecognized modifier name: "+W)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),T&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Pl(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=at(r.split(" "),Il),T=0;T<i.length;T++){var k=void 0,W=void 0;T==i.length-1?(W=i.join(" "),k=n):(W=i.slice(0,T+1).join(" "),k="...");var z=t[W];if(!z)t[W]=k;else if(z!=k)throw new Error("Inconsistent bindings for "+W)}delete e[r]}for(var Q in t)e[Q]=t[Q];return e}function Ia(e,t,r,n){t=Uo(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&r(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ia(e,t.fallthrough,r,n);for(var T=0;T<t.fallthrough.length;T++){var k=Ia(e,t.fallthrough[T],r,n);if(k)return k}}}function Gs(e){var t=typeof e=="string"?e:ta[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function zs(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(h?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(h?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Vs(e,t){if(E&&e.keyCode==34&&e.char)return!1;var r=ta[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),zs(r,e,t))}function Uo(e){return typeof e=="string"?ji[e]:e}function Pa(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var T=t(r[i]);n.length&&Lt(T.from,_e(n).to)<=0;){var k=n.pop();if(Lt(k.from,T.from)<0){T.from=k.from;break}}n.push(T)}Tr(e,function(){for(var W=n.length-1;W>=0;W--)Ma(e.doc,"",n[W].from,n[W].to,"+delete");Xi(e)})}function as(e,t,r){var n=Ge(e.text,t+r,r);return n<0||n>e.text.length?null:n}function os(e,t,r){var n=as(e,t.ch,r);return n==null?null:new Qe(t.line,n,r<0?"after":"before")}function ss(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var T=st(r,t.doc.direction);if(T){var k=i<0?_e(T):T[0],W=i<0==(k.level==1),z=W?"after":"before",Q;if(k.level>0||t.doc.direction=="rtl"){var oe=ye(t,r);Q=i<0?r.text.length-1:0;var ce=Te(t,oe,Q).top;Q=yt(function(Se){return Te(t,oe,Se).top==ce},i<0==(k.level==1)?k.from:k.to-1,Q),z=="before"&&(Q=as(r,Q,1))}else Q=i<0?k.to:k.from;return new Qe(n,Q,z)}}return new Qe(n,i<0?r.text.length:0,i<0?"before":"after")}function kl(e,t,r,n){var i=st(t,e.doc.direction);if(!i)return os(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var T=qe(i,r.ch,r.sticky),k=i[T];if(e.doc.direction=="ltr"&&k.level%2==0&&(n>0?k.to>r.ch:k.from<r.ch))return os(t,r,n);var W=function(ft,xt){return as(t,ft instanceof Qe?ft.ch:ft,xt)},z,Q=function(ft){return e.options.lineWrapping?(z=z||ye(e,t),Ct(e,t,z,ft)):{begin:0,end:t.text.length}},oe=Q(r.sticky=="before"?W(r,-1):r.ch);if(e.doc.direction=="rtl"||k.level==1){var ce=k.level==1==n<0,Se=W(r,ce?1:-1);if(Se!=null&&(ce?Se<=k.to&&Se<=oe.end:Se>=k.from&&Se>=oe.begin)){var Ae=ce?"before":"after";return new Qe(r.line,Se,Ae)}}var Ue=function(ft,xt,ht){for(var At=function(Pn,sr){return sr?new Qe(r.line,W(Pn,1),"before"):new Qe(r.line,Pn,"after")};ft>=0&&ft<i.length;ft+=xt){var Nt=i[ft],Pt=xt>0==(Nt.level!=1),$t=Pt?ht.begin:W(ht.end,-1);if(Nt.from<=$t&&$t<Nt.to)return At($t,Pt);if($t=Pt?Nt.from:W(Nt.to,-1),ht.begin<=$t&&$t<ht.end)return At($t,Pt)}},Ve=Ue(T+n,n,oe);if(Ve)return Ve;var nt=n>0?oe.end:W(oe.begin,-1);return nt!=null&&!(n>0&&nt==t.text.length)&&(Ve=Ue(n>0?0:i.length-1,n,Q(nt)),Ve)?Ve:null}var co={selectAll:Ms,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Le)},killLine:function(e){return Pa(e,function(t){if(t.empty()){var r=Tt(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Qe(t.head.line+1,0)}:{from:t.head,to:Qe(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Pa(e,function(t){return{from:Qe(t.from().line,0),to:Ut(e.doc,Qe(t.to().line+1,0))}})},delLineLeft:function(e){return Pa(e,function(t){return{from:Qe(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Pa(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Pa(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},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(Qe(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Qe(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Qs(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Xs(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 r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Ce)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Ce)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Xs(e,t.head):n},Ce)},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=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var T=r[i].from(),k=Z(e.getLine(T.line),T.ch,n);t.push(he(n-k%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Tr(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var i=t[n].head,T=Tt(e.doc,i.line).text;if(T){if(i.ch==T.length&&(i=new Qe(i.line,i.ch-1)),i.ch>0)i=new Qe(i.line,i.ch+1),e.replaceRange(T.charAt(i.ch-1)+T.charAt(i.ch-2),Qe(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var k=Tt(e.doc,i.line-1).text;k&&(i=new Qe(i.line,1),e.replaceRange(T.charAt(0)+e.doc.lineSeparator()+k.charAt(k.length-1),Qe(i.line-1,k.length-1),i,"+transpose"))}}r.push(new bn(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return Tr(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Xi(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Qs(e,t){var r=Tt(e.doc,t),n=Er(r);return n!=r&&(t=on(n)),ss(!0,e,n,t,1)}function _l(e,t){var r=Tt(e.doc,t),n=va(r);return n!=r&&(t=on(n)),ss(!0,e,r,t,-1)}function Xs(e,t){var r=Qs(e,t.line),n=Tt(e.doc,r.line),i=st(n,e.doc.direction);if(!i||i[0].level==0){var T=Math.max(r.ch,n.text.search(/\S/)),k=t.line==r.line&&t.ch<=T&&t.ch;return Qe(r.line,k?0:T,r.sticky)}return r}function Bo(e,t,r){if(typeof t=="string"&&(t=co[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=je}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function Nl(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ia(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Ia(t,e.options.extraKeys,r,e)||Ia(t,e.options.keyMap,r,e)}var Ul=new ne;function fo(e,t,r,n){var i=e.state.keySeq;if(i){if(Gs(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())}),Ys(e,i+" "+t,r,n))return!0}return Ys(e,t,r,n)}function Ys(e,t,r,n){var i=Nl(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&Hn(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(J(r),er(e)),!!i}function Js(e,t){var r=Vs(t,!0);return r?t.shiftKey&&!e.state.keySeq?fo(e,"Shift-"+r,t,function(n){return Bo(e,n,!0)})||fo(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Bo(e,n)}):fo(e,r,t,function(n){return Bo(e,n)}):!1}function Bl(e,t,r){return fo(e,"'"+r+"'",t,function(n){return Bo(e,n,!0)})}var ls=null;function Zs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=P(),We(t,e))return;U&&_<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=Js(t,e);E&&(ls=n?r:null,!n&&r==88&&!Ft&&(l?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),O&&!l&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;F(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(f(t,"CodeMirror-crosshair"),Ke(document,"keyup",r),Ke(document,"mouseover",r))}Me(document,"keyup",r),Me(document,"mouseover",r)}function qs(e){e.keyCode==16&&(this.doc.sel.shift=!1),We(this,e)}function $s(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(si(t.display,e)||We(t,e)||e.ctrlKey&&!e.altKey||l&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(E&&r==ls){ls=null,J(e);return}if(E&&(!e.which||e.which<10)&&Js(t,e))return;var i=String.fromCharCode(n==null?r:n);if(i=="\b")return;if(Bl(t,e,i))return;t.display.input.onKeyPress(e)}var jl=400,us=function(e,t,r){this.time=e,this.pos=t,this.button=r};us.prototype.compare=function(e,t,r){return this.time+jl>e&&Lt(t,this.pos)==0&&r==this.button};var ho,mo;function Wl(e,t){var r=+new Date;return mo&&mo.compare(r,e,t)?(ho=mo=null,"triple"):ho&&ho.compare(r,e,t)?(mo=new us(r,e,t),ho=null,"double"):(ho=new us(r,e,t),mo=null,"single")}function el(e){var t=this,r=t.display;if(We(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,si(r,e)){I||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(ds(t,e))return;var n=$n(t,e),i=Re(e),T=n?Wl(n,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),n&&Kl(t,i,n,T,e))return;i==1?n?Gl(t,n,T,e):me(e)==r.scroller&&J(e):i==2?(n&&Io(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(D?t.display.input.onContextMenu(e):za(t))}function Kl(e,t,r,n,i){var T="Click";return n=="double"?T="Double"+T:n=="triple"&&(T="Triple"+T),T=(t==1?"Left":t==2?"Middle":"Right")+T,fo(e,zs(T,i),i,function(k){if(typeof k=="string"&&(k=co[k]),!k)return!1;var W=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),W=k(e,r)!=je}finally{e.state.suppressEdits=!1}return W})}function Hl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var T=s?r.shiftKey&&r.metaKey:r.altKey;i.unit=T?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=l?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(l?r.altKey:r.ctrlKey)),i}function Gl(e,t,r,n){U?setTimeout(j(xo,e),0):e.curOp.focus=P();var i=Hl(e,r,n),T=e.doc.sel,k;e.options.dragDrop&&Pe&&!e.isReadOnly()&&r=="single"&&(k=T.contains(t))>-1&&(Lt((k=T.ranges[k]).from(),t)<0||t.xRel>0)&&(Lt(k.to(),t)>0||t.xRel<0)?zl(e,n,t,i):Vl(e,n,t,i)}function zl(e,t,r,n){var i=e.display,T=!1,k=Vn(e,function(Q){I&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ke(i.wrapper.ownerDocument,"mouseup",k),Ke(i.wrapper.ownerDocument,"mousemove",W),Ke(i.scroller,"dragstart",z),Ke(i.scroller,"drop",k),T||(J(Q),n.addNew||Io(e.doc,r,null,null,n.extend),I&&!R||U&&_==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),W=function(Q){T=T||Math.abs(t.clientX-Q.clientX)+Math.abs(t.clientY-Q.clientY)>=10},z=function(){return T=!0};I&&(i.scroller.draggable=!0),e.state.draggingText=k,k.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),Me(i.wrapper.ownerDocument,"mouseup",k),Me(i.wrapper.ownerDocument,"mousemove",W),Me(i.scroller,"dragstart",z),Me(i.scroller,"drop",k),za(e),setTimeout(function(){return i.input.focus()},20)}function tl(e,t,r){if(r=="char")return new bn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new bn(Qe(t.line,0),Ut(e.doc,Qe(t.line+1,0)));var n=r(e,t);return new bn(n.from,n.to)}function Vl(e,t,r,n){var i=e.display,T=e.doc;J(t);var k,W,z=T.sel,Q=z.ranges;if(n.addNew&&!n.extend?(W=T.sel.contains(r),W>-1?k=Q[W]:k=new bn(r,r)):(k=T.sel.primary(),W=T.sel.primIndex),n.unit=="rectangle")n.addNew||(k=new bn(r,r)),r=$n(e,t,!0,!0),W=-1;else{var oe=tl(e,r,n.unit);n.extend?k=rs(k,oe.anchor,oe.head,n.extend):k=oe}n.addNew?W==-1?(W=Q.length,vr(T,Xr(e,Q.concat([k]),W),{scroll:!1,origin:"*mouse"})):Q.length>1&&Q[W].empty()&&n.unit=="char"&&!n.extend?(vr(T,Xr(e,Q.slice(0,W).concat(Q.slice(W+1)),0),{scroll:!1,origin:"*mouse"}),z=T.sel):is(T,W,k,De):(W=0,vr(T,new Cr([k],0),De),z=T.sel);var ce=r;function Se(ht){if(Lt(ce,ht)==0)return;if(ce=ht,n.unit=="rectangle"){for(var At=[],Nt=e.options.tabSize,Pt=Z(Tt(T,r.line).text,r.ch,Nt),$t=Z(Tt(T,ht.line).text,ht.ch,Nt),Pn=Math.min(Pt,$t),sr=Math.max(Pt,$t),Wn=Math.min(r.line,ht.line),Fr=Math.min(e.lastLine(),Math.max(r.line,ht.line));Wn<=Fr;Wn++){var Pr=Tt(T,Wn).text,Jn=we(Pr,Pn,Nt);Pn==sr?At.push(new bn(Qe(Wn,Jn),Qe(Wn,Jn))):Pr.length>Jn&&At.push(new bn(Qe(Wn,Jn),Qe(Wn,we(Pr,sr,Nt))))}At.length||At.push(new bn(r,r)),vr(T,Xr(e,z.ranges.slice(0,W).concat(At),W),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ht)}else{var kr=k,cr=tl(e,ht,n.unit),rr=kr.anchor,Zn;Lt(cr.anchor,rr)>0?(Zn=cr.head,rr=Kr(kr.from(),cr.anchor)):(Zn=cr.anchor,rr=fi(kr.to(),cr.head));var zn=z.ranges.slice(0);zn[W]=Ql(e,new bn(Ut(T,rr),Zn)),vr(T,Xr(e,zn,W),De)}}var Ae=i.wrapper.getBoundingClientRect(),Ue=0;function Ve(ht){var At=++Ue,Nt=$n(e,ht,!0,n.unit=="rectangle");if(!Nt)return;if(Lt(Nt,ce)!=0){e.curOp.focus=P(),Se(Nt);var Pt=ba(i,T);(Nt.line>=Pt.to||Nt.line<Pt.from)&&setTimeout(Vn(e,function(){Ue==At&&Ve(ht)}),150)}else{var $t=ht.clientY<Ae.top?-20:ht.clientY>Ae.bottom?20:0;$t&&setTimeout(Vn(e,function(){if(Ue!=At)return;i.scroller.scrollTop+=$t,Ve(ht)}),50)}}function nt(ht){e.state.selectingText=!1,Ue=Infinity,ht&&(J(ht),i.input.focus()),Ke(i.wrapper.ownerDocument,"mousemove",ft),Ke(i.wrapper.ownerDocument,"mouseup",xt),T.history.lastSelOrigin=null}var ft=Vn(e,function(ht){ht.buttons===0||!Re(ht)?nt(ht):Ve(ht)}),xt=Vn(e,nt);e.state.selectingText=xt,Me(i.wrapper.ownerDocument,"mousemove",ft),Me(i.wrapper.ownerDocument,"mouseup",xt)}function Ql(e,t){var r=t.anchor,n=t.head,i=Tt(e.doc,r.line);if(Lt(r,n)==0&&r.sticky==n.sticky)return t;var T=st(i);if(!T)return t;var k=qe(T,r.ch,r.sticky),W=T[k];if(W.from!=r.ch&&W.to!=r.ch)return t;var z=k+(W.from==r.ch==(W.level!=1)?0:1);if(z==0||z==T.length)return t;var Q;if(n.line!=r.line)Q=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var oe=qe(T,n.ch,n.sticky),ce=oe-k||(n.ch-r.ch)*(W.level==1?-1:1);oe==z-1||oe==z?Q=ce<0:Q=ce>0}var Se=T[z+(Q?-1:0)],Ae=Q==(Se.level==1),Ue=Ae?Se.from:Se.to,Ve=Ae?"after":"before";return r.ch==Ue&&r.sticky==Ve?t:new bn(new Qe(r.line,Ue,Ve),n)}function nl(e,t,r,n){var i,T;if(t.touches)i=t.touches[0].clientX,T=t.touches[0].clientY;else try{i=t.clientX,T=t.clientY}catch(Se){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&J(t);var k=e.display,W=k.lineDiv.getBoundingClientRect();if(T>W.bottom||!le(e,r))return te(t);T-=W.top-k.viewOffset;for(var z=0;z<e.display.gutterSpecs.length;++z){var Q=k.gutters.childNodes[z];if(Q&&Q.getBoundingClientRect().right>=i){var oe=Dr(e.doc,T),ce=e.display.gutterSpecs[z];return Oe(e,r,e,oe,ce.className,t),te(t)}}}function ds(e,t){return nl(e,t,"gutterClick",!0)}function rl(e,t){if(si(e.display,t)||Xl(e,t))return;if(We(e,t,"contextmenu"))return;D||e.display.input.onContextMenu(t)}function Xl(e,t){return le(e,"gutterContextMenu")?nl(e,t,"gutterContextMenu",!1):!1}function il(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zt(e)}var ka={toString:function(){return"CodeMirror.Init"}},al={},Fo={};function Yl(e){var t=e.optionHandlers;function r(n,i,T,k){e.defaults[n]=i,T&&(t[n]=k?function(W,z,Q){Q!=ka&&T(W,z,Q)}:T)}e.defineOption=r,e.Init=ka,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,Fi(n)},!0),r("indentUnit",2,Fi,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){to(n),zt(n),Dn(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!i)return;var T=[],k=n.doc.first;n.doc.iter(function(z){for(var Q=0;;){var oe=z.text.indexOf(i,Q);if(oe==-1)break;Q=oe+i.length,T.push(Qe(k,oe))}k++});for(var W=T.length-1;W>=0;W--)Ma(n.doc,i,T[W],Qe(T[W].line,T[W].ch+i.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,T){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),T!=ka&&n.refresh()}),r("specialCharPlaceholder",xn,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",a?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,i){return n.getInputField().spellcheck=i},!0),r("autocorrect",!1,function(n,i){return n.getInputField().autocorrect=i},!0),r("autocapitalize",!1,function(n,i){return n.getInputField().autocapitalize=i},!0),r("rtlMoveVisually",!p),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){il(n),li(n)},!0),r("keyMap","default",function(n,i,T){var k=Uo(i),W=T!=ka&&Uo(T);W&&W.detach&&W.detach(n,k),k.attach&&k.attach(n,W||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Zl,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=Sr(i,n.options.lineNumbers),li(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?gr(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Ni(n)},!0),r("scrollbarStyle","native",function(n){Aa(n),Ni(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=Sr(n.options.gutters,i),li(n)},!0),r("firstLineNumber",1,li,!0),r("lineNumberFormatter",function(n){return n},li,!0),r("showCursorWhenSelecting",!1,Cn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Qi(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Cn,!0),r("singleCursorHeightPerLine",!0,Cn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,to,!0),r("addModeClass",!1,to,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,to,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Jl(e,t,r){var n=r&&r!=ka;if(!t!=!n){var i=e.display.dragFunctions,T=t?Me:Ke;T(e.display.scroller,"dragstart",i.start),T(e.display.scroller,"dragenter",i.enter),T(e.display.scroller,"dragover",i.over),T(e.display.scroller,"dragleave",i.leave),T(e.display.scroller,"drop",i.drop)}}function Zl(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(f(e.display.wrapper,"CodeMirror-wrap"),sa(e)),Ar(e),Dn(e),zt(e),setTimeout(function(){return Ni(e)},100)}function jn(e,t){var r=this;if(!(this instanceof jn))return new jn(e,t);this.options=t=t?N(t):{},N(al,t,!1);var n=t.value;typeof n=="string"?n=new Ir(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new jn.inputStyles[t.inputStyle](this),T=this.display=new ha(e,n,i,t);T.wrapper.CodeMirror=this,il(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Aa(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 ne,keySeq:null,specialChars:null},t.autofocus&&!a&&T.input.focus(),U&&_<11&&setTimeout(function(){return r.display.input.reset(!0)},20),ql(this),Rl(),Si(this),this.curOp.forceUpdate=!0,vs(this,n),t.autofocus&&!a||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Ai(r)},20):Qi(this);for(var k in Fo)Fo.hasOwnProperty(k)&&Fo[k](this,t[k],ka);tr(this),t.finishInit&&t.finishInit(this);for(var W=0;W<cs.length;++W)cs[W](this);Ui(this),I&&t.lineWrapping&&getComputedStyle(T.lineDiv).textRendering=="optimizelegibility"&&(T.lineDiv.style.textRendering="auto")}jn.defaults=al,jn.optionHandlers=Fo;function ql(e){var t=e.display;Me(t.scroller,"mousedown",Vn(e,el)),U&&_<11?Me(t.scroller,"dblclick",Vn(e,function(z){if(We(e,z))return;var Q=$n(e,z);if(!Q||ds(e,z)||si(e.display,z))return;J(z);var oe=e.findWordAt(Q);Io(e.doc,oe.anchor,oe.head)})):Me(t.scroller,"dblclick",function(z){return We(e,z)||J(z)}),Me(t.scroller,"contextmenu",function(z){return rl(e,z)}),Me(t.input.getField(),"contextmenu",function(z){t.scroller.contains(z.target)||rl(e,z)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function T(z){if(z.touches.length!=1)return!1;var Q=z.touches[0];return Q.radiusX<=1&&Q.radiusY<=1}function k(z,Q){if(Q.left==null)return!0;var oe=Q.left-z.left,ce=Q.top-z.top;return oe*oe+ce*ce>20*20}Me(t.scroller,"touchstart",function(z){if(!We(e,z)&&!T(z)&&!ds(e,z)){t.input.ensurePolled(),clearTimeout(r);var Q=+new Date;t.activeTouch={start:Q,moved:!1,prev:Q-n.end<=300?n:null},z.touches.length==1&&(t.activeTouch.left=z.touches[0].pageX,t.activeTouch.top=z.touches[0].pageY)}}),Me(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Me(t.scroller,"touchend",function(z){var Q=t.activeTouch;if(Q&&!si(t,z)&&Q.left!=null&&!Q.moved&&new Date-Q.start<300){var oe=e.coordsChar(t.activeTouch,"page"),ce;!Q.prev||k(Q,Q.prev)?ce=new bn(oe,oe):!Q.prev.prev||k(Q,Q.prev.prev)?ce=e.findWordAt(oe):ce=new bn(Qe(oe.line,0),Ut(e.doc,Qe(oe.line+1,0))),e.setSelection(ce.anchor,ce.head),e.focus(),J(z)}i()}),Me(t.scroller,"touchcancel",i),Me(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Ji(e,t.scroller.scrollTop),Vr(e,t.scroller.scrollLeft,!0),Oe(e,"scroll",e))}),Me(t.scroller,"mousewheel",function(z){return $a(e,z)}),Me(t.scroller,"DOMMouseScroll",function(z){return $a(e,z)}),Me(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(z){We(e,z)||ie(z)},over:function(z){We(e,z)||(Ol(e,z),ie(z))},start:function(z){return Dl(e,z)},drop:Vn(e,wl),leave:function(z){We(e,z)||Ws(e)}};var W=t.input.getField();Me(W,"keyup",function(z){return qs.call(e,z)}),Me(W,"keydown",Vn(e,Zs)),Me(W,"keypress",Vn(e,$s)),Me(W,"focus",function(z){return Ai(e,z)}),Me(W,"blur",function(z){return Qi(e,z)})}var cs=[];jn.defineInitHook=function(e){return cs.push(e)};function po(e,t,r,n){var i=e.doc,T;r==null&&(r="add"),r=="smart"&&(i.mode.indent?T=Or(e,t).state:r="prev");var k=e.options.tabSize,W=Tt(i,t),z=Z(W.text,null,k);W.stateAfter&&(W.stateAfter=null);var Q=W.text.match(/^\s*/)[0],oe;if(!n&&!/\S/.test(W.text))oe=0,r="not";else if(r=="smart"&&(oe=i.mode.indent(T,W.text.slice(Q.length),W.text),oe==je||oe>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?oe=Z(Tt(i,t-1).text,null,k):oe=0:r=="add"?oe=z+e.options.indentUnit:r=="subtract"?oe=z-e.options.indentUnit:typeof r=="number"&&(oe=z+r),oe=Math.max(0,oe);var ce="",Se=0;if(e.options.indentWithTabs)for(var Ae=Math.floor(oe/k);Ae;--Ae)Se+=k,ce+=" ";if(Se<oe&&(ce+=he(oe-Se)),ce!=Q)return Ma(i,ce,Qe(t,0),Qe(t,Q.length),"+input"),W.stateAfter=null,!0;for(var Ue=0;Ue<i.sel.ranges.length;Ue++){var Ve=i.sel.ranges[Ue];if(Ve.head.line==t&&Ve.head.ch<Q.length){var nt=Qe(t,Q.length);is(i,Ue,new bn(nt,nt));break}}}var ci=null;function jo(e){ci=e}function fs(e,t,r,n,i){var T=e.doc;e.display.shift=!1,n||(n=T.sel);var k=+new Date-200,W=i=="paste"||e.state.pasteIncoming>k,z=St(t),Q=null;if(W&&n.ranges.length>1)if(ci&&ci.text.join(`
|
|
`)==t){if(n.ranges.length%ci.text.length==0){Q=[];for(var oe=0;oe<ci.text.length;oe++)Q.push(T.splitLines(ci.text[oe]))}}else z.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(Q=at(z,function(ft){return[ft]}));for(var ce=e.curOp.updateInput,Se=n.ranges.length-1;Se>=0;Se--){var Ae=n.ranges[Se],Ue=Ae.from(),Ve=Ae.to();Ae.empty()&&(r&&r>0?Ue=Qe(Ue.line,Ue.ch-r):e.state.overwrite&&!W?Ve=Qe(Ve.line,Math.min(Tt(T,Ve.line).text.length,Ve.ch+_e(z).length)):W&&ci&&ci.lineWise&&ci.text.join(`
|
|
`)==z.join(`
|
|
`)&&(Ue=Ve=Qe(Ue.line,0)));var nt={from:Ue,to:Ve,text:Q?Q[Se%Q.length]:z,origin:i||(W?"paste":e.state.cutIncoming>k?"cut":"+input")};Ra(e.doc,nt),Hn(e,"inputRead",e,nt)}t&&!W&&sl(e,t),Xi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=ce),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ol(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Tr(t,function(){return fs(t,r,0,null,"paste")}),!0}function sl(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)continue;var T=e.getModeAt(i.head),k=!1;if(T.electricChars){for(var W=0;W<T.electricChars.length;W++)if(t.indexOf(T.electricChars.charAt(W))>-1){k=po(e,i.head.line,"smart");break}}else T.electricInput&&(T.electricInput.test(Tt(e.doc,i.head.line).text.slice(0,i.head.ch))&&(k=po(e,i.head.line,"smart")));k&&Hn(e,"electricInput",e,i.head.line)}}function ll(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,T={anchor:Qe(i,0),head:Qe(i+1,0)};r.push(T),t.push(e.getRange(T.anchor,T.head))}return{text:t,ranges:r}}function ul(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function dl(){var e=o("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=o("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return I?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),ul(e),t}function $l(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var T=this.options,k=T[n];if(T[n]==i&&n!="mode")return;T[n]=i,t.hasOwnProperty(n)&&Vn(this,t[n])(this,i,k),Oe(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,i){this.state.keyMaps[i?"push":"unshift"](Uo(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,T=0;T<i.length;++T)if(i[T]==n||i[T].name==n)return i.splice(T,1),!0},addOverlay:dr(function(n,i){var T=n.token?n:e.getMode(this.options,n);if(T.startState)throw new Error("Overlays may not be stateful.");et(this.state.overlays,{mode:T,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(k){return k.priority}),this.state.modeGen++,Dn(this)}),removeOverlay:dr(function(n){for(var i=this.state.overlays,T=0;T<i.length;++T){var k=i[T].modeSpec;if(k==n||typeof n=="string"&&k.name==n){i.splice(T,1),this.state.modeGen++,Dn(this);return}}}),indentLine:dr(function(n,i,T){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Nr(this.doc,n)&&po(this,n,i,T)}),indentSelection:dr(function(n){for(var i=this.doc.sel.ranges,T=-1,k=0;k<i.length;k++){var W=i[k];if(W.empty())W.head.line>T&&(po(this,W.head.line,n,!0),T=W.head.line,k==this.doc.sel.primIndex&&Xi(this));else{var z=W.from(),Q=W.to(),oe=Math.max(T,z.line);T=Math.min(this.lastLine(),Q.line-(Q.ch?0:1))+1;for(var ce=oe;ce<T;++ce)po(this,ce,n);var Se=this.doc.sel.ranges;z.ch==0&&i.length==Se.length&&Se[k].from().ch>0&&is(this.doc,k,new bn(z,Se[k].to()),Le)}}}),getTokenAt:function(n,i){return Mi(this,n,i)},getLineTokens:function(n,i){return Mi(this,Qe(n),i,!0)},getTokenTypeAt:function(n){n=Ut(this.doc,n);var i=ri(this,Tt(this.doc,n.line)),T=0,k=(i.length-1)/2,W=n.ch,z;if(W==0)z=i[2];else for(;;){var Q=T+k>>1;if((Q?i[Q*2-1]:0)>=W)k=Q;else if(i[Q*2+1]<W)T=Q+1;else{z=i[Q*2+2];break}}var oe=z?z.indexOf("overlay "):-1;return oe<0?z:oe==0?null:z.slice(0,oe-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var T=[];if(!r.hasOwnProperty(i))return T;var k=r[i],W=this.getModeAt(n);if(typeof W[i]=="string")k[W[i]]&&T.push(k[W[i]]);else if(W[i])for(var z=0;z<W[i].length;z++){var Q=k[W[i][z]];Q&&T.push(Q)}else W.helperType&&k[W.helperType]?T.push(k[W.helperType]):k[W.name]&&T.push(k[W.name]);for(var oe=0;oe<k._global.length;oe++){var ce=k._global[oe];ce.pred(W,this)&&pe(T,ce.val)==-1&&T.push(ce.val)}return T},getStateAfter:function(n,i){var T=this.doc;return n=hi(T,n==null?T.first+T.size-1:n),Or(this,n+1,i).state},cursorCoords:function(n,i){var T,k=this.doc.sel.primary();return n==null?T=k.head:typeof n=="object"?T=Ut(this.doc,n):T=n?k.from():k.to(),an(this,T,i||"page")},charCoords:function(n,i){return kn(this,Ut(this.doc,n),i||"page")},coordsChar:function(n,i){return n=rn(this,n,i||"page"),sn(this,n.left,n.top)},lineAtHeight:function(n,i){return n=rn(this,{top:n,left:0},i||"page").top,Dr(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,T){var k=!1,W;if(typeof n=="number"){var z=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>z&&(n=z,k=!0),W=Tt(this.doc,n)}else W=n;return dn(this,W,{top:0,left:0},i||"page",T||k).top+(k?this.doc.height-Ur(W):0)},defaultTextHeight:function(){return Gn(this.display)},defaultCharWidth:function(){return qn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,T,k,W){var z=this.display;n=an(this,Ut(this.doc,n));var Q=n.bottom,oe=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),z.sizer.appendChild(i),k=="over")Q=n.top;else if(k=="above"||k=="near"){var ce=Math.max(z.wrapper.clientHeight,this.doc.height),Se=Math.max(z.sizer.clientWidth,z.lineSpace.clientWidth);(k=="above"||n.bottom+i.offsetHeight>ce)&&n.top>i.offsetHeight?Q=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=ce&&(Q=n.bottom),oe+i.offsetWidth>Se&&(oe=Se-i.offsetWidth)}i.style.top=Q+"px",i.style.left=i.style.right="",W=="right"?(oe=z.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(W=="left"?oe=0:W=="middle"&&(oe=(z.sizer.clientWidth-i.offsetWidth)/2),i.style.left=oe+"px"),T&&Ao(this,{left:oe,top:Q,right:oe+i.offsetWidth,bottom:Q+i.offsetHeight})},triggerOnKeyDown:dr(Zs),triggerOnKeyPress:dr($s),triggerOnKeyUp:qs,triggerOnMouseDown:dr(el),execCommand:function(n){if(co.hasOwnProperty(n))return co[n].call(null,this)},triggerElectric:dr(function(n){sl(this,n)}),findPosH:function(n,i,T,k){var W=1;i<0&&(W=-1,i=-i);for(var z=Ut(this.doc,n),Q=0;Q<i&&!(z=hs(this.doc,z,W,T,k),z.hitSide);++Q);return z},moveH:dr(function(n,i){var T=this;this.extendSelectionsBy(function(k){return T.display.shift||T.doc.extend||k.empty()?hs(T.doc,k.head,n,i,T.options.rtlMoveVisually):n<0?k.from():k.to()},Ce)}),deleteH:dr(function(n,i){var T=this.doc.sel,k=this.doc;T.somethingSelected()?k.replaceSelection("",null,"+delete"):Pa(this,function(W){var z=hs(k,W.head,n,i,!1);return n<0?{from:z,to:W.head}:{from:W.head,to:z}})}),findPosV:function(n,i,T,k){var W=1,z=k;i<0&&(W=-1,i=-i);for(var Q=Ut(this.doc,n),oe=0;oe<i;++oe){var ce=an(this,Q,"div");if(z==null?z=ce.left:ce.left=z,Q=cl(this,ce,W,T),Q.hitSide)break}return Q},moveV:dr(function(n,i){var T=this,k=this.doc,W=[],z=!this.display.shift&&!k.extend&&k.sel.somethingSelected();if(k.extendSelectionsBy(function(oe){if(z)return n<0?oe.from():oe.to();var ce=an(T,oe.head,"div");oe.goalColumn!=null&&(ce.left=oe.goalColumn),W.push(ce.left);var Se=cl(T,ce,n,i);return i=="page"&&oe==k.sel.primary()&&Xa(T,kn(T,Se,"div").top-ce.top),Se},Ce),W.length)for(var Q=0;Q<k.sel.ranges.length;Q++)k.sel.ranges[Q].goalColumn=W[Q]}),findWordAt:function(n){var i=this.doc,T=Tt(i,n.line).text,k=n.ch,W=n.ch;if(T){var z=this.getHelper(n,"wordChars");(n.sticky=="before"||W==T.length)&&k?--k:++W;for(var Q=T.charAt(k),oe=Ze(Q,z)?function(ce){return Ze(ce,z)}:/\s/.test(Q)?function(ce){return/\s/.test(ce)}:function(ce){return!/\s/.test(ce)&&!Ze(ce)};k>0&&oe(T.charAt(k-1));)--k;for(;W<T.length&&oe(T.charAt(W));)++W}return new bn(Qe(n.line,k),Qe(n.line,W))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?F(this.display.cursorDiv,"CodeMirror-overwrite"):f(this.display.cursorDiv,"CodeMirror-overwrite"),Oe(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==P()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:dr(function(n,i){Yi(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-be(this)-this.display.barHeight,width:n.scrollWidth-be(this)-this.display.barWidth,clientHeight:V(this),clientWidth:ae(this)}},scrollIntoView:dr(function(n,i){n==null?(n={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof n=="number"?n={from:Qe(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?Yo(this,n):ua(this,n.from,n.to,n.margin)}),setSize:dr(function(n,i){var T=this,k=function(z){return typeof z=="number"||/^\d+$/.test(String(z))?z+"px":z};n!=null&&(this.display.wrapper.style.width=k(n)),i!=null&&(this.display.wrapper.style.height=k(i)),this.options.lineWrapping&&Gt(this);var W=this.display.viewFrom;this.doc.iter(W,this.display.viewTo,function(z){if(z.widgets){for(var Q=0;Q<z.widgets.length;Q++)if(z.widgets[Q].noHScroll){Fn(T,W,"widget");break}}++W}),this.curOp.forceUpdate=!0,Oe(this,"refresh",this)}),operation:function(n){return Tr(this,n)},startOperation:function(){return Si(this)},endOperation:function(){return Ui(this)},refresh:dr(function(){var n=this.display.cachedTextHeight;Dn(this),this.curOp.forceUpdate=!0,zt(this),Yi(this,this.doc.scrollLeft,this.doc.scrollTop),Sa(this.display),(n==null||Math.abs(n-Gn(this.display))>.5||this.options.lineWrapping)&&Ar(this),Oe(this,"refresh",this)}),swapDoc:dr(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,n),zt(this),this.display.input.reset(),Yi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Hn(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:n},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}},de(e),e.registerHelper=function(n,i,T){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=T},e.registerGlobalHelper=function(n,i,T,k){e.registerHelper(n,i,k),r[n]._global.push({pred:T,val:k})}}function hs(e,t,r,n,i){var T=t,k=r,W=Tt(e,t.line),z=i&&e.direction=="rtl"?-r:r;function Q(){var xt=t.line+z;return xt<e.first||xt>=e.first+e.size?!1:(t=new Qe(xt,t.ch,t.sticky),W=Tt(e,xt))}function oe(xt){var ht;if(n=="codepoint"){var At=W.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(At)?ht=null:ht=new Qe(t.line,Math.max(0,Math.min(W.text.length,t.ch+r*(At>=55296&&At<56320?2:1))),-r)}else i?ht=kl(e.cm,W,t,r):ht=os(W,t,r);if(ht==null)if(!xt&&Q())t=ss(i,e.cm,W,t.line,z);else return!1;else t=ht;return!0}if(n=="char"||n=="codepoint")oe();else if(n=="column")oe(!0);else if(n=="word"||n=="group")for(var ce=null,Se=n=="group",Ae=e.cm&&e.cm.getHelper(t,"wordChars"),Ue=!0;!(r<0&&!oe(!Ue));Ue=!1){var Ve=W.text.charAt(t.ch)||`
|
|
`,nt=Ze(Ve,Ae)?"w":Se&&Ve==`
|
|
`?"n":!Se||/\s/.test(Ve)?null:"p";if(Se&&!Ue&&!nt&&(nt="s"),ce&&ce!=nt){r<0&&(r=1,oe(),t.sticky="after");break}if(nt&&(ce=nt),r>0&&!oe(!Ue))break}var ft=ko(e,t,T,k,!0);return Wr(T,ft)&&(ft.hitSide=!0),ft}function cl(e,t,r,n){var i=e.doc,T=t.left,k;if(n=="page"){var W=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),z=Math.max(W-.5*Gn(e.display),3);k=(r>0?t.bottom:t.top)+r*z}else n=="line"&&(k=r>0?t.bottom+3:t.top-3);for(var Q;!(Q=sn(e,T,k),!Q.outside);){if(r<0?k<=0:k>=i.height){Q.hitSide=!0;break}k+=r*5}return Q}var On=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ne,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};On.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;ul(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function T(W){for(var z=W.target;z;z=z.parentNode){if(z==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(z.className))break}return!1}Me(i,"paste",function(W){if(!T(W)||We(n,W)||ol(W,n))return;_<=11&&setTimeout(Vn(n,function(){return t.updateFromDOM()}),20)}),Me(i,"compositionstart",function(W){t.composing={data:W.data,done:!1}}),Me(i,"compositionupdate",function(W){t.composing||(t.composing={data:W.data,done:!1})}),Me(i,"compositionend",function(W){t.composing&&(W.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Me(i,"touchstart",function(){return r.forceCompositionEnd()}),Me(i,"input",function(){t.composing||t.readFromDOMSoon()});function k(W){if(!T(W)||We(n,W))return;if(n.somethingSelected())jo({lineWise:!1,text:n.getSelections()}),W.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var z=ll(n);jo({lineWise:!0,text:z.text}),W.type=="cut"&&n.operation(function(){n.setSelections(z.ranges,0,Le),n.replaceSelection("",null,"cut")})}else return;if(W.clipboardData){W.clipboardData.clearData();var Q=ci.text.join(`
|
|
`);if(W.clipboardData.setData("Text",Q),W.clipboardData.getData("Text")==Q){W.preventDefault();return}}var oe=dl(),ce=oe.firstChild;n.display.lineSpace.insertBefore(oe,n.display.lineSpace.firstChild),ce.value=ci.text.join(`
|
|
`);var Se=document.activeElement;Y(ce),setTimeout(function(){n.display.lineSpace.removeChild(oe),Se.focus(),Se==i&&r.showPrimarySelection()},50)}Me(i,"copy",k),Me(i,"cut",k)},On.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},On.prototype.prepareSelection=function(){var e=ei(this.cm,!1);return e.focus=document.activeElement==this.div,e},On.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},On.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},On.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var T=Wo(t,e.anchorNode,e.anchorOffset),k=Wo(t,e.focusNode,e.focusOffset);if(T&&!T.bad&&k&&!k.bad&&Lt(Kr(T,k),n)==0&&Lt(fi(T,k),i)==0)return;var W=t.display.view,z=n.line>=t.display.viewFrom&&fl(t,n)||{node:W[0].measure.map[2],offset:0},Q=i.line<t.display.viewTo&&fl(t,i);if(!Q){var oe=W[W.length-1].measure,ce=oe.maps?oe.maps[oe.maps.length-1]:oe.map;Q={node:ce[ce.length-1],offset:ce[ce.length-2]-ce[ce.length-3]}}if(!z||!Q){e.removeAllRanges();return}var Se=e.rangeCount&&e.getRangeAt(0),Ae;try{Ae=y(z.node,z.offset,Q.offset,Q.node)}catch(Ue){}Ae&&(!O&&t.state.focused?(e.collapse(z.node,z.offset),Ae.collapsed||(e.removeAllRanges(),e.addRange(Ae))):(e.removeAllRanges(),e.addRange(Ae)),Se&&e.anchorNode==null?e.addRange(Se):O&&this.startGracePeriod()),this.rememberSelection()},On.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)},On.prototype.showMultipleSelections=function(e){c(this.cm.display.cursorDiv,e.cursors),c(this.cm.display.selectionDiv,e.selection)},On.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},On.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return S(this.div,t)},On.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},On.prototype.blur=function(){this.div.blur()},On.prototype.getField=function(){return this.div},On.prototype.supportsTouch=function(){return!0},On.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Tr(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)},On.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},On.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(u&&b&&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 r=Wo(t,e.anchorNode,e.anchorOffset),n=Wo(t,e.focusNode,e.focusOffset);r&&n&&Tr(t,function(){vr(t.doc,ui(r,n),Le),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},On.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=Qe(n.line-1,Tt(e.doc,n.line-1).length)),i.ch==Tt(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Qe(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var T,k,W;n.line==t.viewFrom||(T=In(e,n.line))==0?(k=on(t.view[0].line),W=t.view[0].node):(k=on(t.view[T].line),W=t.view[T-1].node.nextSibling);var z=In(e,i.line),Q,oe;if(z==t.view.length-1?(Q=t.viewTo-1,oe=t.lineDiv.lastChild):(Q=on(t.view[z+1].line)-1,oe=t.view[z+1].node.previousSibling),!W)return!1;for(var ce=e.doc.splitLines(tu(e,W,oe,k,Q)),Se=jr(e.doc,Qe(k,0),Qe(Q,Tt(e.doc,Q).text.length));ce.length>1&&Se.length>1;)if(_e(ce)==_e(Se))ce.pop(),Se.pop(),Q--;else if(ce[0]==Se[0])ce.shift(),Se.shift(),k++;else break;for(var Ae=0,Ue=0,Ve=ce[0],nt=Se[0],ft=Math.min(Ve.length,nt.length);Ae<ft&&Ve.charCodeAt(Ae)==nt.charCodeAt(Ae);)++Ae;for(var xt=_e(ce),ht=_e(Se),At=Math.min(xt.length-(ce.length==1?Ae:0),ht.length-(Se.length==1?Ae:0));Ue<At&&xt.charCodeAt(xt.length-Ue-1)==ht.charCodeAt(ht.length-Ue-1);)++Ue;if(ce.length==1&&Se.length==1&&k==n.line)for(;Ae&&Ae>n.ch&&xt.charCodeAt(xt.length-Ue-1)==ht.charCodeAt(ht.length-Ue-1);)Ae--,Ue++;ce[ce.length-1]=xt.slice(0,xt.length-Ue).replace(/^\u200b+/,""),ce[0]=ce[0].slice(Ae).replace(/\u200b+$/,"");var Nt=Qe(k,Ae),Pt=Qe(Q,Se.length?_e(Se).length-Ue:0);if(ce.length>1||ce[0]||Lt(Nt,Pt))return Ma(e.doc,ce,Nt,Pt,"+input"),!0},On.prototype.ensurePolled=function(){this.forceCompositionEnd()},On.prototype.reset=function(){this.forceCompositionEnd()},On.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},On.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)},On.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Tr(this.cm,function(){return Dn(e.cm)})},On.prototype.setUneditable=function(e){e.contentEditable="false"},On.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Vn(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},On.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},On.prototype.onContextMenu=function(){},On.prototype.resetPosition=function(){},On.prototype.needsContentAttribute=!0;function fl(e,t){var r=Ee(e,t.line);if(!r||r.hidden)return null;var n=Tt(e.doc,t.line),i=X(r,n,t.line),T=st(n,e.doc.direction),k="left";if(T){var W=qe(T,t.ch);k=W%2?"right":"left"}var z=Ye(i.map,t.ch,k);return z.offset=z.collapse=="right"?z.end:z.start,z}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function _a(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,i){var T="",k=!1,W=e.doc.lineSeparator(),z=!1;function Q(Ae){return function(Ue){return Ue.id==Ae}}function oe(){k&&(T+=W,z&&(T+=W),k=z=!1)}function ce(Ae){Ae&&(oe(),T+=Ae)}function Se(Ae){if(Ae.nodeType==1){var Ue=Ae.getAttribute("cm-text");if(Ue){ce(Ue);return}var Ve=Ae.getAttribute("cm-marker"),nt;if(Ve){var ft=e.findMarks(Qe(n,0),Qe(i+1,0),Q(+Ve));ft.length&&(nt=ft[0].find(0))&&ce(jr(e.doc,nt.from,nt.to).join(W));return}if(Ae.getAttribute("contenteditable")=="false")return;var xt=/^(pre|div|p|li|table|br)$/i.test(Ae.nodeName);if(!/^br$/i.test(Ae.nodeName)&&Ae.textContent.length==0)return;xt&&oe();for(var ht=0;ht<Ae.childNodes.length;ht++)Se(Ae.childNodes[ht]);/^(pre|p)$/i.test(Ae.nodeName)&&(z=!0),xt&&(k=!0)}else Ae.nodeType==3&&ce(Ae.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Se(t),t==r);)t=t.nextSibling,z=!1;return T}function Wo(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return _a(e.clipPos(Qe(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var T=e.display.view[i];if(T.node==n)return nu(T,t,r)}}function nu(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!S(n,t))return _a(Qe(on(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var T=e.rest?_e(e.rest):e.line;return _a(Qe(on(T),T.text.length),i)}var k=t.nodeType==3?t:null,W=t;for(!k&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(k=t.firstChild,r&&(r=k.nodeValue.length));W.parentNode!=n;)W=W.parentNode;var z=e.measure,Q=z.maps;function oe(nt,ft,xt){for(var ht=-1;ht<(Q?Q.length:0);ht++)for(var At=ht<0?z.map:Q[ht],Nt=0;Nt<At.length;Nt+=3){var Pt=At[Nt+2];if(Pt==nt||Pt==ft){var $t=on(ht<0?e.line:e.rest[ht]),Pn=At[Nt]+xt;return(xt<0||Pt!=nt)&&(Pn=At[Nt+(xt?1:0)]),Qe($t,Pn)}}}var ce=oe(k,W,r);if(ce)return _a(ce,i);for(var Se=W.nextSibling,Ae=k?k.nodeValue.length-r:0;Se;Se=Se.nextSibling){if(ce=oe(Se,Se.firstChild,0),ce)return _a(Qe(ce.line,ce.ch-Ae),i);Ae+=Se.textContent.length}for(var Ue=W.previousSibling,Ve=r;Ue;Ue=Ue.previousSibling){if(ce=oe(Ue,Ue.firstChild,-1),ce)return _a(Qe(ce.line,ce.ch+Ve),i);Ve+=Ue.textContent.length}}var Xn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ne,this.hasSelection=!1,this.composing=null};Xn.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),Me(i,"input",function(){U&&_>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),Me(i,"paste",function(k){if(We(n,k)||ol(k,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function T(k){if(We(n,k))return;if(n.somethingSelected())jo({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var W=ll(n);jo({lineWise:!0,text:W.text}),k.type=="cut"?n.setSelections(W.ranges,null,Le):(r.prevInput="",i.value=W.text.join(`
|
|
`),Y(i))}else return;k.type=="cut"&&(n.state.cutIncoming=+new Date)}Me(i,"cut",T),Me(i,"copy",T),Me(e.scroller,"paste",function(k){if(si(e,k)||We(n,k))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var W=new Event("paste");W.clipboardData=k.clipboardData,i.dispatchEvent(W)}),Me(e.lineSpace,"selectstart",function(k){si(e,k)||J(k)}),Me(i,"compositionstart",function(){var k=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:k,range:n.markText(k,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Me(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Xn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Xn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Xn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=ei(e);if(e.options.moveInputWithCursor){var i=an(e,r.sel.primary().head,"div"),T=t.wrapper.getBoundingClientRect(),k=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+k.top-T.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+k.left-T.left))}return n},Xn.prototype.showSelection=function(e){var t=this.cm,r=t.display;c(r.cursorDiv,e.cursors),c(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Xn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&Y(this.textarea),U&&_>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",U&&_>=9&&(this.hasSelection=null))},Xn.prototype.getField=function(){return this.textarea},Xn.prototype.supportsTouch=function(){return!1},Xn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!a||P()!=this.textarea))try{this.textarea.focus()}catch(e){}},Xn.prototype.blur=function(){this.textarea.blur()},Xn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xn.prototype.receivedFocus=function(){this.slowPoll()},Xn.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()})},Xn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},Xn.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||rt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!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 T=i.charCodeAt(0);if(T==8203&&!n&&(n="\u200B"),T==8666)return this.reset(),this.cm.execCommand("undo")}for(var k=0,W=Math.min(n.length,i.length);k<W&&n.charCodeAt(k)==i.charCodeAt(k);)++k;return Tr(t,function(){fs(t,i.slice(k),n.length-k,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
|
`)>-1?r.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},Xn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xn.prototype.onKeyPress=function(){U&&_>=9&&(this.hasSelection=null),this.fastPoll()},Xn.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var T=$n(r,e),k=n.scroller.scrollTop;if(!T||E)return;var W=r.options.resetSelectionOnContextMenu;W&&r.doc.sel.contains(T)==-1&&Vn(r,vr)(r.doc,ui(T),Le);var z=i.style.cssText,Q=t.wrapper.style.cssText,oe=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-oe.top-5)+"px; left: "+(e.clientX-oe.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 ce;I&&(ce=window.scrollY),n.input.focus(),I&&window.scrollTo(null,ce),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=Ae,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function Se(){if(i.selectionStart!=null){var Ve=r.somethingSelected(),nt="\u200B"+(Ve?i.value:"");i.value="\u21DA",i.value=nt,t.prevInput=Ve?"":"\u200B",i.selectionStart=1,i.selectionEnd=nt.length,n.selForContextMenu=r.doc.sel}}function Ae(){if(t.contextMenuPending!=Ae)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=Q,i.style.cssText=z,U&&_<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=k),i.selectionStart!=null){(!U||U&&_<9)&&Se();var Ve=0,nt=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Vn(r,Ms)(r):Ve++<10?n.detectingSelectAll=setTimeout(nt,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(nt,200)}}if(U&&_>=9&&Se(),D){ie(e);var Ue=function(){Ke(window,"mouseup",Ue),setTimeout(Ae,20)};Me(window,"mouseup",Ue)}else setTimeout(Ae,50)},Xn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Xn.prototype.setUneditable=function(){},Xn.prototype.needsContentAttribute=!1;function ru(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 r=P();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=W.getValue()}var i;if(e.form&&(Me(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var T=e.form;i=T.submit;try{var k=T.submit=function(){n(),T.submit=i,T.submit(),T.submit=k}}catch(z){}}t.finishInit=function(z){z.save=n,z.getTextArea=function(){return e},z.toTextArea=function(){z.toTextArea=isNaN,n(),e.parentNode.removeChild(z.getWrapperElement()),e.style.display="",e.form&&(Ke(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var W=jn(function(z){return e.parentNode.insertBefore(z,e.nextSibling)},t);return W}function iu(e){e.off=Ke,e.on=Me,e.wheelEventPixels=qa,e.Doc=Ir,e.splitLines=St,e.countColumn=Z,e.findColumn=we,e.isWordChar=Ne,e.Pass=je,e.signal=Oe,e.Line=ki,e.changeEnd=di,e.scrollbarModel=Ya,e.Pos=Qe,e.cmpPos=Lt,e.modes=Zt,e.mimeModes=pt,e.resolveMode=Dt,e.getMode=en,e.modeExtensions=Je,e.extendMode=Un,e.copyState=Tn,e.startState=fr,e.innerMode=Mn,e.commands=co,e.keyMap=ji,e.keyName=Vs,e.isModifierKey=Gs,e.lookupKey=Ia,e.normalizeKeyMap=Pl,e.StringStream=Ln,e.SharedTextMarker=so,e.TextMarker=ea,e.LineWidget=oo,e.e_preventDefault=J,e.e_stopPropagation=q,e.e_stop=ie,e.addClass=F,e.contains=S,e.rmClass=f,e.keyNames=ta}Yl(jn),$l(jn);var au="iter insert remove copy getEditor constructor".split(" ");for(var Ko in Ir.prototype)Ir.prototype.hasOwnProperty(Ko)&&pe(au,Ko)<0&&(jn.prototype[Ko]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ir.prototype[Ko]));return de(Ir),jn.inputStyles={textarea:Xn,contenteditable:On},jn.defineMode=function(e){!jn.defaults.mode&&e!="null"&&(jn.defaults.mode=e),mn.apply(this,arguments)},jn.defineMIME=Kt,jn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),jn.defineMIME("text/plain","null"),jn.defineExtension=function(e,t){jn.prototype[e]=t},jn.defineDocExtension=function(e,t){Ir.prototype[e]=t},jn.fromTextArea=ru,iu(jn),jn.version="5.58.2",jn})},W6BS:function(Be,Ie){Be.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+FoWC7Yl11curQpFVCoyJQsvDThP6crNdVld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JMnRZgRZkJOR5FMKvWBz/QyN2gqqsEjTBE1q7iU5znZsfN83i2+32zSbTXq9HisrK6yurtJoNH4ympf49rYAvhzL1b5JSZqmZqGTyZT+4Jj+cd+4+mg4Yh7F5Kk0xqK4Jb7rVP87w1KGpU6nR6vVNMAEkPzrdDqGxX/McVsAb/dBsh0mKWgxnzMajxgOhhwf9+n3j5nNZ7RbbbrdrgElYE5Aua57u4962etfNYAvx7YISJIkxrXFxdvtlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},WXWZ:function(Be,Ie,G){Be.exports={wrap:"wrap___2531V",modal:"modal___2xp2g",titleWrap:"titleWrap___2wAWv",required:"required___1bxIH",title:"title___1z-An",colorGray:"colorGray___2WTHC",choiceWrap:"choiceWrap___138fi",answer:"answer___3tvn_",activeAnswer:"activeAnswer___2tZlb",deleteIcon:"deleteIcon___3kRsA",addIcon:"addIcon___fCAgt",editorWrap:"editorWrap___2bMGJ",htmlWrap:"htmlWrap___172le",radio:"radio___3dYD3",color333:"color333___kjbnX",color999:"color999___23KyG",fold:"fold___mk6fa",head:"head___2zxz9"}},Xsq0:function(Be,Ie,G){Be.exports=G.p+"static/mainbanner.0a951716.jpg"},Y1PL:function(Be,Ie,G){"use strict";G.r(Ie),G.d(Ie,"ResizableTextArea",function(){return pe});var $=G("wx14"),K=G("1OyB"),O=G("vuIU"),B=G("Ji7U"),C=G("LK+K"),L=G("cDcd"),U=G("VTBJ"),_=G("rePB"),I=G("Zm9Q"),M=G("Kwbf"),b=G("c+Xe"),E=G("m+aA"),R=G("bdgK"),w=new Map;function A(Le){Le.forEach(function(De){var Ce,we=De.target;(Ce=w.get(we))===null||Ce===void 0||Ce.forEach(function(fe){return fe(we)})})}var g=new R.default(A),u=null,a=null;function l(Le,De){w.has(Le)||(w.set(Le,new Set),g.observe(Le)),w.get(Le).add(De)}function s(Le,De){w.has(Le)&&(w.get(Le).delete(De),w.get(Le).size||(g.unobserve(Le),w.delete(Le)))}var p=function(Le){Object(B.a)(Ce,Le);var De=Object(C.a)(Ce);function Ce(){return Object(K.a)(this,Ce),De.apply(this,arguments)}return Object(O.a)(Ce,[{key:"render",value:function(){return this.props.children}}]),Ce}(L.Component),d=L.createContext(null);function h(Le){var De=Le.children,Ce=Le.onBatchResize,we=L.useRef(0),fe=L.useRef([]),he=L.useContext(d),_e=L.useCallback(function(at,et,it){we.current+=1;var gt=we.current;fe.current.push({size:at,element:et,data:it}),Promise.resolve().then(function(){gt===we.current&&(Ce==null||Ce(fe.current),fe.current=[])}),he==null||he(at,et,it)},[Ce,he]);return L.createElement(d.Provider,{value:_e},De)}function D(Le){var De=Le.children,Ce=Le.disabled,we=L.useRef(null),fe=L.useRef(null),he=L.useContext(d),_e=L.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),at=L.isValidElement(De)&&Object(b.c)(De),et=at?De.ref:null,it=L.useMemo(function(){return Object(b.a)(et,we)},[et,we]),gt=L.useRef(Le);gt.current=Le;var He=L.useCallback(function(Ne){var Ze=gt.current,ut=Ze.onResize,dt=Ze.data,ze=Ne.getBoundingClientRect(),Ge=ze.width,yt=ze.height,vt=Ne.offsetWidth,mt=Ne.offsetHeight,qe=Math.floor(Ge),lt=Math.floor(yt);if(_e.current.width!==qe||_e.current.height!==lt||_e.current.offsetWidth!==vt||_e.current.offsetHeight!==mt){var st={width:qe,height:lt,offsetWidth:vt,offsetHeight:mt};_e.current=st;var Fe=vt===Math.round(Ge)?Ge:vt,Me=mt===Math.round(yt)?yt:mt,ot=Object(U.a)(Object(U.a)({},st),{},{offsetWidth:Fe,offsetHeight:Me});he==null||he(ot,Ne,dt),ut&&Promise.resolve().then(function(){ut(ot,Ne)})}},[]);return L.useEffect(function(){var Ne=Object(E.a)(we.current)||Object(E.a)(fe.current);return Ne&&!Ce&&l(Ne,He),function(){return s(Ne,He)}},[we.current,Ce]),L.createElement(p,{ref:fe},at?L.cloneElement(De,{ref:it}):De)}var v="rc-observer-key";function f(Le){var De=Le.children,Ce=Object(I.a)(De);return Ce.map(function(we,fe){var he=(we==null?void 0:we.key)||"".concat(v,"-").concat(fe);return L.createElement(D,Object($.a)({},Le,{key:he}),we)})}f.Collection=h;var m=f,c=G("bT9E"),o=G("TSYQ"),x=G.n(o),y=`
|
|
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
|
|
`,S=["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"],P={},F;function H(Le){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce=Le.getAttribute("id")||Le.getAttribute("data-reactid")||Le.getAttribute("name");if(De&&P[Ce])return P[Ce];var we=window.getComputedStyle(Le),fe=we.getPropertyValue("box-sizing")||we.getPropertyValue("-moz-box-sizing")||we.getPropertyValue("-webkit-box-sizing"),he=parseFloat(we.getPropertyValue("padding-bottom"))+parseFloat(we.getPropertyValue("padding-top")),_e=parseFloat(we.getPropertyValue("border-bottom-width"))+parseFloat(we.getPropertyValue("border-top-width")),at=S.map(function(it){return"".concat(it,":").concat(we.getPropertyValue(it))}).join(";"),et={sizingStyle:at,paddingSize:he,borderSize:_e,boxSizing:fe};return De&&Ce&&(P[Ce]=et),et}function Y(Le){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,we=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),document.body.appendChild(F)),Le.getAttribute("wrap")?F.setAttribute("wrap",Le.getAttribute("wrap")):F.removeAttribute("wrap");var fe=H(Le,De),he=fe.paddingSize,_e=fe.borderSize,at=fe.boxSizing,et=fe.sizingStyle;F.setAttribute("style","".concat(et,";").concat(y)),F.value=Le.value||Le.placeholder||"";var it=Number.MIN_SAFE_INTEGER,gt=Number.MAX_SAFE_INTEGER,He=F.scrollHeight,Ne;if(at==="border-box"?He+=_e:at==="content-box"&&(He-=he),Ce!==null||we!==null){F.value=" ";var Ze=F.scrollHeight-he;Ce!==null&&(it=Ze*Ce,at==="border-box"&&(it=it+he+_e),He=Math.max(it,He)),we!==null&&(gt=Ze*we,at==="border-box"&&(gt=gt+he+_e),Ne=He>gt?"":"hidden",He=Math.min(gt,He))}return{height:He,minHeight:it,maxHeight:gt,overflowY:Ne,resize:"none"}}var j=G("Gytx"),N=G.n(j),Z;(function(Le){Le[Le.NONE=0]="NONE",Le[Le.RESIZING=1]="RESIZING",Le[Le.RESIZED=2]="RESIZED"})(Z||(Z={}));var ne=function(Le){Object(B.a)(Ce,Le);var De=Object(C.a)(Ce);function Ce(we){var fe;return Object(K.a)(this,Ce),fe=De.call(this,we),fe.nextFrameActionId=void 0,fe.resizeFrameId=void 0,fe.textArea=void 0,fe.saveTextArea=function(he){fe.textArea=he},fe.handleResize=function(he){var _e=fe.state.resizeStatus,at=fe.props,et=at.autoSize,it=at.onResize;if(_e!==Z.NONE)return;typeof it=="function"&&it(he),et&&fe.resizeOnNextFrame()},fe.resizeOnNextFrame=function(){cancelAnimationFrame(fe.nextFrameActionId),fe.nextFrameActionId=requestAnimationFrame(fe.resizeTextarea)},fe.resizeTextarea=function(){var he=fe.props.autoSize;if(!he||!fe.textArea)return;var _e=he.minRows,at=he.maxRows,et=Y(fe.textArea,!1,_e,at);fe.setState({textareaStyles:et,resizeStatus:Z.RESIZING},function(){cancelAnimationFrame(fe.resizeFrameId),fe.resizeFrameId=requestAnimationFrame(function(){fe.setState({resizeStatus:Z.RESIZED},function(){fe.resizeFrameId=requestAnimationFrame(function(){fe.setState({resizeStatus:Z.NONE}),fe.fixFirefoxAutoScroll()})})})})},fe.renderTextArea=function(){var he=fe.props,_e=he.prefixCls,at=_e===void 0?"rc-textarea":_e,et=he.autoSize,it=he.onResize,gt=he.className,He=he.disabled,Ne=fe.state,Ze=Ne.textareaStyles,ut=Ne.resizeStatus,dt=Object(c.a)(fe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ze=x()(at,gt,Object(_.a)({},"".concat(at,"-disabled"),He));"value"in dt&&(dt.value=dt.value||"");var Ge=Object(U.a)(Object(U.a)(Object(U.a)({},fe.props.style),Ze),ut===Z.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return L.createElement(m,{onResize:fe.handleResize,disabled:!(et||it)},L.createElement("textarea",Object($.a)({},dt,{className:ze,style:Ge,ref:fe.saveTextArea})))},fe.state={textareaStyles:{},resizeStatus:Z.NONE},fe}return Object(O.a)(Ce,[{key:"componentDidUpdate",value:function(fe){(fe.value!==this.props.value||!N()(fe.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 fe=this.textArea.selectionStart,he=this.textArea.selectionEnd;this.textArea.setSelectionRange(fe,he)}}catch(_e){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ce}(L.Component),pe=ne,xe=function(Le){Object(B.a)(Ce,Le);var De=Object(C.a)(Ce);function Ce(we){var fe;Object(K.a)(this,Ce),fe=De.call(this,we),fe.resizableTextArea=void 0,fe.focus=function(){fe.resizableTextArea.textArea.focus()},fe.saveTextArea=function(_e){fe.resizableTextArea=_e},fe.handleChange=function(_e){var at=fe.props.onChange;fe.setValue(_e.target.value,function(){fe.resizableTextArea.resizeTextarea()}),at&&at(_e)},fe.handleKeyDown=function(_e){var at=fe.props,et=at.onPressEnter,it=at.onKeyDown;_e.keyCode===13&&et&&et(_e),it&&it(_e)};var he=typeof we.value=="undefined"||we.value===null?we.defaultValue:we.value;return fe.state={value:he},fe}return Object(O.a)(Ce,[{key:"setValue",value:function(fe,he){"value"in this.props||this.setState({value:fe},he)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return L.createElement(pe,Object($.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(fe){return"value"in fe?{value:fe.value}:null}}]),Ce}(L.Component),je=Ie.default=xe},ZpRC:function(Be,Ie,G){"use strict";function $(b){return typeof b=="object"&&b!=null&&b.nodeType===1}function K(b,E){return(!E||b!=="hidden")&&b!=="visible"&&b!=="clip"}function O(b,E){if(b.clientHeight<b.scrollHeight||b.clientWidth<b.scrollWidth){var R=getComputedStyle(b,null);return K(R.overflowY,E)||K(R.overflowX,E)||function(w){var A=function(g){if(!g.ownerDocument||!g.ownerDocument.defaultView)return null;try{return g.ownerDocument.defaultView.frameElement}catch(u){return null}}(w);return!!A&&(A.clientHeight<w.scrollHeight||A.clientWidth<w.scrollWidth)}(b)}return!1}function B(b,E,R,w,A,g,u,a){return g<b&&u>E||g>b&&u<E?0:g<=b&&a<=R||u>=E&&a>=R?g-b-w:u>E&&a<R||g<b&&a>R?u-E+A:0}var C=function(b,E){var R=window,w=E.scrollMode,A=E.block,g=E.inline,u=E.boundary,a=E.skipOverflowHiddenElements,l=typeof u=="function"?u:function(Ze){return Ze!==u};if(!$(b))throw new TypeError("Invalid target");for(var s=document.scrollingElement||document.documentElement,p=[],d=b;$(d)&&l(d);){if((d=d.parentElement)===s){p.push(d);break}d!=null&&d===document.body&&O(d)&&!O(document.documentElement)||d!=null&&O(d,a)&&p.push(d)}for(var h=R.visualViewport?R.visualViewport.width:innerWidth,D=R.visualViewport?R.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,f=window.scrollY||pageYOffset,m=b.getBoundingClientRect(),c=m.height,o=m.width,x=m.top,y=m.right,S=m.bottom,P=m.left,F=A==="start"||A==="nearest"?x:A==="end"?S:x+c/2,H=g==="center"?P+o/2:g==="end"?y:P,Y=[],j=0;j<p.length;j++){var N=p[j],Z=N.getBoundingClientRect(),ne=Z.height,pe=Z.width,xe=Z.top,je=Z.right,Le=Z.bottom,De=Z.left;if(w==="if-needed"&&x>=0&&P>=0&&S<=D&&y<=h&&x>=xe&&S<=Le&&P>=De&&y<=je)return Y;var Ce=getComputedStyle(N),we=parseInt(Ce.borderLeftWidth,10),fe=parseInt(Ce.borderTopWidth,10),he=parseInt(Ce.borderRightWidth,10),_e=parseInt(Ce.borderBottomWidth,10),at=0,et=0,it="offsetWidth"in N?N.offsetWidth-N.clientWidth-we-he:0,gt="offsetHeight"in N?N.offsetHeight-N.clientHeight-fe-_e:0;if(s===N)at=A==="start"?F:A==="end"?F-D:A==="nearest"?B(f,f+D,D,fe,_e,f+F,f+F+c,c):F-D/2,et=g==="start"?H:g==="center"?H-h/2:g==="end"?H-h:B(v,v+h,h,we,he,v+H,v+H+o,o),at=Math.max(0,at+f),et=Math.max(0,et+v);else{at=A==="start"?F-xe-fe:A==="end"?F-Le+_e+gt:A==="nearest"?B(xe,Le,ne,fe,_e+gt,F,F+c,c):F-(xe+ne/2)+gt/2,et=g==="start"?H-De-we:g==="center"?H-(De+pe/2)+it/2:g==="end"?H-je+he+it:B(De,je,pe,we,he+it,H,H+o,o);var He=N.scrollLeft,Ne=N.scrollTop;F+=Ne-(at=Math.max(0,Math.min(Ne+at,N.scrollHeight-ne+gt))),H+=He-(et=Math.max(0,Math.min(He+et,N.scrollWidth-pe+it)))}Y.push({el:N,top:at,left:et})}return Y};function L(b){return b===Object(b)&&Object.keys(b).length!==0}function U(b,E){E===void 0&&(E="auto");var R="scrollBehavior"in document.body.style;b.forEach(function(w){var A=w.el,g=w.top,u=w.left;A.scroll&&R?A.scroll({top:g,left:u,behavior:E}):(A.scrollTop=g,A.scrollLeft=u)})}function _(b){return b===!1?{block:"end",inline:"nearest"}:L(b)?b:{block:"start",inline:"nearest"}}function I(b,E){var R=!b.ownerDocument.documentElement.contains(b);if(L(E)&&typeof E.behavior=="function")return E.behavior(R?[]:C(b,E));if(R)return;var w=_(E);return U(C(b,w),w.behavior)}var M=Ie.a=I},bT9E:function(Be,Ie,G){"use strict";G.d(Ie,"a",function(){return K});var $=G("VTBJ");function K(O,B){var C=Object($.a)({},O);return Array.isArray(B)&&B.forEach(function(L){delete C[L]}),C}},c5Ni:function(Be,Ie,G){},cRFk:function(Be,Ie,G){Be.exports=G.p+"static/RepositoryNoneData.828085a8.png"},csWT:function(Be,Ie,G){Be.exports=G.p+"static/choose.4ad1045f.svg"},dejd:function(Be,Ie,G){},djh8:function(Be,Ie,G){Be.exports=G.p+"static/qrCode.42927872.png"},dmUQ:function(Be,Ie,G){"use strict";var $=G("Ff2n"),K=G("rePB"),O=G("1OyB"),B=G("vuIU"),C=G("Ji7U"),L=G("md7G"),U=G("foSv"),_=G("cDcd"),I=G.n(_),M=G("TSYQ"),b=G.n(M),E=G("4IlW");function R(c,o){var x=Object.keys(c);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(c);o&&(y=y.filter(function(S){return Object.getOwnPropertyDescriptor(c,S).enumerable})),x.push.apply(x,y)}return x}function w(c){for(var o=1;o<arguments.length;o++){var x=arguments[o]!=null?arguments[o]:{};o%2?R(Object(x),!0).forEach(function(y){Object(K.a)(c,y,x[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(x)):R(Object(x)).forEach(function(y){Object.defineProperty(c,y,Object.getOwnPropertyDescriptor(x,y))})}return c}function A(c){var o=g();return function(){var y=Object(U.a)(c),S;if(o){var P=Object(U.a)(this).constructor;S=Reflect.construct(y,arguments,P)}else S=y.apply(this,arguments);return Object(L.a)(this,S)}}function g(){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(c){return!1}}function u(){}function a(c){c.preventDefault()}var l=function(o){return o.replace(/[^\w.-]+/g,"")},s=200,p=600,d=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,h=function(o){return o!=null},D=function(o,x){return x===o||typeof x=="number"&&typeof o=="number"&&isNaN(x)&&isNaN(o)},v=function(c){Object(C.a)(x,c);var o=A(x);function x(y){var S;Object(O.a)(this,x),S=o.call(this,y),S.onKeyDown=function(H){var Y=S.props,j=Y.onKeyDown,N=Y.onPressEnter;if(H.keyCode===E.a.UP){var Z=S.getRatio(H);S.up(H,Z,null),S.stop()}else if(H.keyCode===E.a.DOWN){var ne=S.getRatio(H);S.down(H,ne,null),S.stop()}else H.keyCode===E.a.ENTER&&N&&N(H);if(S.recordCursorPosition(),S.lastKeyCode=H.keyCode,j){for(var pe=arguments.length,xe=new Array(pe>1?pe-1:0),je=1;je<pe;je++)xe[je-1]=arguments[je];j.apply(void 0,[H].concat(xe))}},S.onKeyUp=function(H){var Y=S.props.onKeyUp;if(S.stop(),S.recordCursorPosition(),Y){for(var j=arguments.length,N=new Array(j>1?j-1:0),Z=1;Z<j;Z++)N[Z-1]=arguments[Z];Y.apply(void 0,[H].concat(N))}},S.onChange=function(H){var Y=S.props.onChange;S.state.focused&&(S.inputting=!0),S.rawInput=S.props.parser(S.getValueFromEvent(H)),S.setState({inputValue:S.rawInput}),Y(S.toNumber(S.rawInput))},S.onMouseUp=function(){var H=S.props.onMouseUp;S.recordCursorPosition(),H&&H.apply(void 0,arguments)},S.onFocus=function(){var H;S.setState({focused:!0}),(H=S.props).onFocus.apply(H,arguments)},S.onBlur=function(){var H=S.props.onBlur;S.inputting=!1,S.setState({focused:!1});var Y=S.getCurrentValidValue(S.state.inputValue),j=S.setValue(Y,u);if(H){var N=S.input.value,Z=S.getInputDisplayValue({focus:!1,value:j});S.input.value=Z&&Number(Z),H.apply(void 0,arguments),S.input.value=N}},S.getRatio=function(H){var Y=1;return H.metaKey||H.ctrlKey?Y=.1:H.shiftKey&&(Y=10),Y},S.getFullNum=function(H){return isNaN(H)?H:/e/i.test(String(H))?Number(H).toFixed(18).replace(/\.?0+$/,""):H},S.getPrecision=function(H){if(h(S.props.precision))return S.props.precision;var Y=String(H);if(Y.indexOf("e-")>=0)return parseInt(Y.slice(Y.indexOf("e-")+2),10);var j=0;return Y.indexOf(".")>=0&&(j=Y.length-Y.indexOf(".")-1),j},S.getInputDisplayValue=function(H){var Y=H||S.state,j=Y.focused,N=Y.inputValue,Z=Y.value,ne;j?ne=N:ne=S.toPrecisionAsStep(Z),ne==null&&(ne="");var pe=S.formatWrapper(ne);return h(S.props.decimalSeparator)&&(pe=pe.toString().replace(".",S.props.decimalSeparator)),pe},S.recordCursorPosition=function(){try{S.cursorStart=S.input.selectionStart,S.cursorEnd=S.input.selectionEnd,S.currentValue=S.input.value,S.cursorBefore=S.input.value.substring(0,S.cursorStart),S.cursorAfter=S.input.value.substring(S.cursorEnd)}catch(H){}},S.restoreByAfter=function(H){if(H===void 0)return!1;var Y=S.input.value,j=Y.lastIndexOf(H);if(j===-1)return!1;var N=S.cursorBefore.length;return S.lastKeyCode===E.a.DELETE&&S.cursorBefore.charAt(N-1)===H[0]?(S.fixCaret(N,N),!0):j+H.length===Y.length?(S.fixCaret(j,j),!0):!1},S.partRestoreByAfter=function(H){return H===void 0?!1:Array.prototype.some.call(H,function(Y,j){var N=H.substring(j);return S.restoreByAfter(N)})},S.isNotCompleteNumber=function(H){return isNaN(H)||H===""||H===null||H&&H.toString().indexOf(".")===H.toString().length-1},S.stop=function(){S.autoStepTimer&&clearTimeout(S.autoStepTimer)},S.down=function(H,Y,j){S.pressingUpOrDown=!0,S.step("down",H,Y,j)},S.up=function(H,Y,j){S.pressingUpOrDown=!0,S.step("up",H,Y,j)},S.saveInput=function(H){S.input=H};var P=y.value;P===void 0&&(P=y.defaultValue),S.state={focused:y.autoFocus};var F=S.getValidValue(S.toNumber(P));return S.state=w(w({},S.state),{},{inputValue:S.toPrecisionAsStep(F),value:F}),S}return Object(B.a)(x,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(S){var P=this.props,F=P.value,H=P.onChange,Y=P.max,j=P.min,N=this.state.focused;if(S){if(!D(S.value,F)||!D(S.max,Y)||!D(S.min,j)){var Z=N?F:this.getValidValue(F),ne;this.pressingUpOrDown?ne=Z:this.inputting?ne=this.rawInput:ne=this.toPrecisionAsStep(Z),this.setState({value:Z,inputValue:ne})}var pe="value"in this.props?F:this.state.value;"max"in this.props&&S.max!==Y&&typeof pe=="number"&&pe>Y&&H&&H(Y),"min"in this.props&&S.min!==j&&typeof pe=="number"&&pe<j&&H&&H(j)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var xe=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===E.a.BACKSPACE?xe=this.cursorStart-1:this.lastKeyCode===E.a.DELETE&&(xe=this.cursorStart):xe=this.input.value.length,this.fixCaret(xe,xe)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case E.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case E.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(je){}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(S){var P=S;return P===""?P="":this.isNotCompleteNumber(parseFloat(P))?P=this.state.value:P=this.getValidValue(P),this.toNumber(P)}},{key:"getValueFromEvent",value:function(S){var P=S.target.value.trim().replace(/。/g,".");return h(this.props.decimalSeparator)&&(P=P.replace(this.props.decimalSeparator,".")),P}},{key:"getValidValue",value:function(S){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,H=parseFloat(S);return isNaN(H)?S:(H<P&&(H=P),H>F&&(H=F),H)}},{key:"setValue",value:function(S,P){var F=this.props.precision,H=this.isNotCompleteNumber(parseFloat(S))?null:parseFloat(S),Y=this.state.value,j=Y===void 0?null:Y,N=this.state.inputValue,Z=N===void 0?null:N,ne=typeof H=="number"?H.toFixed(F):"".concat(H),pe=H!==j||ne!=="".concat(Z);return"value"in this.props?(Z=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:Z},P)):this.setState({value:H,inputValue:this.toPrecisionAsStep(S)},P),pe&&this.props.onChange(H),H}},{key:"getMaxPrecision",value:function(S){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.props,H=F.precision,Y=F.step;if(h(H))return H;var j=this.getPrecision(P),N=this.getPrecision(Y),Z=this.getPrecision(S);return S?Math.max(Z,j+N):j+N}},{key:"getPrecisionFactor",value:function(S){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.getMaxPrecision(S,P);return Math.pow(10,F)}},{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(S){return this.props.formatter?this.props.formatter(S):S}},{key:"toPrecisionAsStep",value:function(S){if(this.isNotCompleteNumber(S)||S==="")return S;var P=Math.abs(this.getMaxPrecision(S));return isNaN(P)?S.toString():Number(S).toFixed(P)}},{key:"toNumber",value:function(S){var P=this.props.precision,F=this.state.focused,H=S&&S.length>16&&F;return this.isNotCompleteNumber(S)||H?S:h(P)?Math.round(S*Math.pow(10,P))/Math.pow(10,P):Number(S)}},{key:"upStep",value:function(S,P){var F=this.props.step,H=this.getPrecisionFactor(S,P),Y=Math.abs(this.getMaxPrecision(S,P)),j=((H*S+H*F*P)/H).toFixed(Y);return this.toNumber(j)}},{key:"downStep",value:function(S,P){var F=this.props.step,H=this.getPrecisionFactor(S,P),Y=Math.abs(this.getMaxPrecision(S,P)),j=((H*S-H*F*P)/H).toFixed(Y);return this.toNumber(j)}},{key:"step",value:function(S,P){var F=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Y=arguments.length>3?arguments[3]:void 0;this.stop(),P&&(P.persist(),P.preventDefault());var j=this.props;if(j.disabled)return;var N=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(N))return;var Z=this["".concat(S,"Step")](N,H),ne=Z>j.max||Z<j.min;if(Z>j.max?Z=j.max:Z<j.min&&(Z=j.min),this.setValue(Z,null),this.setState({focused:!0},function(){F.pressingUpOrDown=!1}),ne)return;this.autoStepTimer=setTimeout(function(){F[S](P,H,!0)},Y?s:p)}},{key:"fixCaret",value:function(S,P){if(S===void 0||P===void 0||!this.input||!this.input.value)return;try{var F=this.input.selectionStart,H=this.input.selectionEnd;(S!==F||P!==H)&&this.input.setSelectionRange(S,P)}catch(Y){}}},{key:"render",value:function(){var S,P=this.props,F=P.prefixCls,H=P.disabled,Y=P.readOnly,j=P.useTouch,N=P.autoComplete,Z=P.upHandler,ne=P.downHandler,pe=P.className,xe=P.max,je=P.min,Le=P.style,De=P.title,Ce=P.onMouseEnter,we=P.onMouseLeave,fe=P.onMouseOver,he=P.onMouseOut,_e=P.required,at=P.onClick,et=P.tabIndex,it=P.type,gt=P.placeholder,He=P.id,Ne=P.inputMode,Ze=P.pattern,ut=P.step,dt=P.maxLength,ze=P.autoFocus,Ge=P.name,yt=P.onPaste,vt=P.onInput,mt=Object($.a)(P,["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"]),qe=this.state,lt=qe.value,st=qe.focused,Fe=b()(F,(S={},Object(K.a)(S,pe,!!pe),Object(K.a)(S,"".concat(F,"-disabled"),H),Object(K.a)(S,"".concat(F,"-focused"),st),S)),Me={};Object.keys(mt).forEach(function(ie){(ie.substr(0,5)==="data-"||ie.substr(0,5)==="aria-"||ie==="role")&&(Me[ie]=mt[ie])});var ot=!Y&&!H,Ke=this.getInputDisplayValue(null),Oe=(lt||lt===0)&&(isNaN(lt)||Number(lt)>=xe),We=(lt||lt===0)&&(isNaN(lt)||Number(lt)<=je),ve=Oe||H||Y,le=We||H||Y,de=b()("".concat(F,"-handler"),"".concat(F,"-handler-up"),Object(K.a)({},"".concat(F,"-handler-up-disabled"),ve)),J=b()("".concat(F,"-handler"),"".concat(F,"-handler-down"),Object(K.a)({},"".concat(F,"-handler-down-disabled"),le)),q=j?{onTouchStart:ve?u:this.up,onTouchEnd:this.stop}:{onMouseDown:ve?u:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},te=j?{onTouchStart:le?u:this.down,onTouchEnd:this.stop}:{onMouseDown:le?u:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return I.a.createElement("div",{className:Fe,style:Le,title:De,onMouseEnter:Ce,onMouseLeave:we,onMouseOver:fe,onMouseOut:he,onFocus:function(){return null},onBlur:function(){return null}},I.a.createElement("div",{className:"".concat(F,"-handler-wrap")},I.a.createElement("span",Object.assign({unselectable:"on"},q,{role:"button","aria-label":"Increase Value","aria-disabled":ve,className:de}),Z||I.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-up-inner"),onClick:a})),I.a.createElement("span",Object.assign({unselectable:"on"},te,{role:"button","aria-label":"Decrease Value","aria-disabled":le,className:J}),ne||I.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-down-inner"),onClick:a}))),I.a.createElement("div",{className:"".concat(F,"-input-wrap")},I.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":je,"aria-valuemax":xe,"aria-valuenow":lt,required:_e,type:it,placeholder:gt,onPaste:yt,onClick:at,onMouseUp:this.onMouseUp,className:"".concat(F,"-input"),tabIndex:et,autoComplete:N,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:ot?this.onKeyDown:u,onKeyUp:ot?this.onKeyUp:u,autoFocus:ze,maxLength:dt,readOnly:Y,disabled:H,max:xe,min:je,step:ut,name:Ge,title:De,id:He,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Ke),pattern:Ze,inputMode:Ne,onInput:vt},Me))))}}]),x}(I.a.Component);v.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:d,min:-d,step:1,style:{},onChange:u,onKeyDown:u,onPressEnter:u,onFocus:u,onBlur:u,parser:l,required:!1,autoComplete:"off"};var f=v,m=Ie.a=f},ji0R:function(Be,Ie,G){Be.exports=G.p+"static/douyu.3e6df9ee.jpg"},k3GJ:function(Be,Ie,G){"use strict";G.d(Ie,"a",function(){return bo});var $=G("rePB"),K=G("ODXe"),O=G("Ff2n"),B=G("VTBJ"),C=G("cDcd"),L=G("TSYQ"),U=G.n(L),_=G("Zm9Q"),I=G("6cGi"),M=G("KQm4"),b=G("xEkU"),E=G.n(b),R=G("t23M");function w(re){var ge=Object(C.useRef)(),be=Object(C.useRef)(!1);function ae(){for(var V=arguments.length,ee=new Array(V),X=0;X<V;X++)ee[X]=arguments[X];be.current||(E.a.cancel(ge.current),ge.current=E()(function(){re.apply(void 0,ee)}))}return Object(C.useEffect)(function(){return function(){be.current=!0,E.a.cancel(ge.current)}},[]),ae}function A(re){var ge=Object(C.useRef)([]),be=Object(C.useState)({}),ae=Object(K.a)(be,2),V=ae[1],ee=Object(C.useRef)(typeof re=="function"?re():re),X=w(function(){var ue=ee.current;ge.current.forEach(function(Ee){ue=Ee(ue)}),ge.current=[],ee.current=ue,V({})});function se(ue){ge.current.push(ue),X()}return[ee.current,se]}var g=G("4IlW");function u(re,ge){var be,ae=re.prefixCls,V=re.id,ee=re.active,X=re.rtl,se=re.tab,ue=se.key,Ee=se.tab,ye=se.disabled,Te=se.closeIcon,ke=re.tabBarGutter,Ye=re.tabPosition,Xe=re.closable,ct=re.renderWrapper,_t=re.removeAriaLabel,Yt=re.editable,Gt=re.onClick,zt=re.onRemove,Jt=re.onFocus,Xt="".concat(ae,"-tab");C.useEffect(function(){return zt},[]);var Vt={};Ye==="top"||Ye==="bottom"?Vt[X?"marginLeft":"marginRight"]=ke:Vt.marginBottom=ke;var dn=Yt&&Xe!==!1&&!ye;function rn(kt){if(ye)return;Gt(kt)}function kn(kt){kt.preventDefault(),kt.stopPropagation(),Yt.onEdit("remove",{key:ue,event:kt})}var an=C.createElement("div",{key:ue,ref:ge,className:U()(Xt,(be={},Object($.a)(be,"".concat(Xt,"-with-remove"),dn),Object($.a)(be,"".concat(Xt,"-active"),ee),Object($.a)(be,"".concat(Xt,"-disabled"),ye),be)),style:Vt,onClick:rn},C.createElement("div",{role:"tab","aria-selected":ee,id:V&&"".concat(V,"-tab-").concat(ue),className:"".concat(Xt,"-btn"),"aria-controls":V&&"".concat(V,"-panel-").concat(ue),"aria-disabled":ye,tabIndex:ye?null:0,onClick:function(It){It.stopPropagation(),rn(It)},onKeyDown:function(It){[g.a.SPACE,g.a.ENTER].includes(It.which)&&(It.preventDefault(),rn(It))},onFocus:Jt},Ee),dn&&C.createElement("button",{type:"button","aria-label":_t||"remove",tabIndex:0,className:"".concat(Xt,"-remove"),onClick:function(It){It.stopPropagation(),kn(It)}},Te||Yt.removeIcon||"\xD7"));return ct&&(an=ct(an)),an}var a=C.forwardRef(u),l={width:0,height:0,left:0,top:0};function s(re,ge,be){return Object(C.useMemo)(function(){for(var ae,V=new Map,ee=ge.get((ae=re[0])===null||ae===void 0?void 0:ae.key)||l,X=ee.left+ee.width,se=0;se<re.length;se+=1){var ue=re[se].key,Ee=ge.get(ue);if(!Ee){var ye;Ee=ge.get((ye=re[se-1])===null||ye===void 0?void 0:ye.key)||l}var Te=V.get(ue)||Object(B.a)({},Ee);Te.right=X-Te.left-Te.width,V.set(ue,Te)}return V},[re.map(function(ae){return ae.key}).join("_"),ge,be])}var p={width:0,height:0,left:0,top:0,right:0};function d(re,ge,be,ae,V){var ee=V.tabs,X=V.tabPosition,se=V.rtl,ue,Ee,ye;["top","bottom"].includes(X)?(ue="width",Ee=se?"right":"left",ye=Math.abs(ge.left)):(ue="height",Ee="top",ye=-ge.top);var Te=ge[ue],ke=be[ue],Ye=ae[ue],Xe=Te;return ke+Ye>Te&&(Xe=Te-Ye),Object(C.useMemo)(function(){if(!ee.length)return[0,0];for(var ct=ee.length,_t=ct,Yt=0;Yt<ct;Yt+=1){var Gt=re.get(ee[Yt].key)||p;if(Gt[Ee]+Gt[ue]>ye+Xe){_t=Yt-1;break}}for(var zt=0,Jt=ct-1;Jt>=0;Jt-=1){var Xt=re.get(ee[Jt].key)||p;if(Xt[Ee]<ye){zt=Jt+1;break}}return[zt,_t]},[re,ye,Xe,X,ee.map(function(ct){return ct.key}).join("_"),se])}var h=G("wx14"),D=G("1OyB"),v=G("vuIU"),f=G("JX7q"),m=G("Ji7U"),c=G("LK+K"),o=G("I8Z2"),x=G("bT9E"),y=G("2GS6"),S=G("Gytx"),P=G.n(S),F=G("U8pU"),H=/iPhone/i,Y=/iPod/i,j=/iPad/i,N=/\bAndroid(?:.+)Mobile\b/i,Z=/Android/i,ne=/\bAndroid(?:.+)SD4930UR\b/i,pe=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,xe=/Windows Phone/i,je=/\bWindows(?:.+)ARM\b/i,Le=/BlackBerry/i,De=/BB10/i,Ce=/Opera Mini/i,we=/\b(CriOS|Chrome)(?:.+)Mobile/i,fe=/Mobile(?:.+)Firefox\b/i;function he(re,ge){return re.test(ge)}function _e(re){var ge=re||(typeof navigator!="undefined"?navigator.userAgent:""),be=(ge||"").split("[FBAN");if(typeof be[1]!="undefined"){var ae=be,V=Object(K.a)(ae,1);ge=V[0]}if(be=ge.split("Twitter"),typeof be[1]!="undefined"){var ee=be,X=Object(K.a)(ee,1);ge=X[0]}var se={apple:{phone:he(H,ge)&&!he(xe,ge),ipod:he(Y,ge),tablet:!he(H,ge)&&he(j,ge)&&!he(xe,ge),device:(he(H,ge)||he(Y,ge)||he(j,ge))&&!he(xe,ge)},amazon:{phone:he(ne,ge),tablet:!he(ne,ge)&&he(pe,ge),device:he(ne,ge)||he(pe,ge)},android:{phone:!he(xe,ge)&&he(ne,ge)||!he(xe,ge)&&he(N,ge),tablet:!he(xe,ge)&&!he(ne,ge)&&!he(N,ge)&&(he(pe,ge)||he(Z,ge)),device:!he(xe,ge)&&(he(ne,ge)||he(pe,ge)||he(N,ge)||he(Z,ge))||he(/\bokhttp\b/i,ge)},windows:{phone:he(xe,ge),tablet:he(je,ge),device:he(xe,ge)||he(je,ge)},other:{blackberry:he(Le,ge),blackberry10:he(De,ge),opera:he(Ce,ge),firefox:he(fe,ge),chrome:he(we,ge),device:he(Le,ge)||he(De,ge)||he(Ce,ge)||he(fe,ge)||he(we,ge)},any:null,phone:null,tablet:null};return se.any=se.apple.device||se.android.device||se.windows.device||se.other.device,se.phone=se.apple.phone||se.android.phone||se.windows.phone,se.tablet=se.apple.tablet||se.android.tablet||se.windows.tablet,se}var at=Object(B.a)(Object(B.a)({},_e()),{},{isMobile:_e}),et=at;function it(){}function gt(re,ge,be){var ae=ge||"";return re.key||"".concat(ae,"item_").concat(be)}function He(re){return"".concat(re,"-menu-")}function Ne(re,ge){var be=-1;C.Children.forEach(re,function(ae){be+=1,ae&&ae.type&&ae.type.isMenuItemGroup?C.Children.forEach(ae.props.children,function(V){be+=1,ge(V,be)}):ge(ae,be)})}function Ze(re,ge,be){if(!re||be.find)return;C.Children.forEach(re,function(ae){if(ae){var V=ae.type;if(!V||!(V.isSubMenu||V.isMenuItem||V.isMenuItemGroup))return;ge.indexOf(ae.key)!==-1?be.find=!0:ae.props.children&&Ze(ae.props.children,ge,be)}})}var ut=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],dt=function(ge){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=ge&&typeof ge.getBoundingClientRect=="function"&&ge.getBoundingClientRect().width;if(ae){if(be){var V=getComputedStyle(ge),ee=V.marginLeft,X=V.marginRight;ae+=+ee.replace("px","")+ +X.replace("px","")}ae=+ae.toFixed(6)}return ae||0},ze=function(ge,be,ae){ge&&Object(F.a)(ge.style)==="object"&&(ge.style[be]=ae)},Ge=function(){return et.any},yt=G("bdgK"),vt=G("faye"),mt=G.n(vt),qe=G("wgJM"),lt=G("l4aY"),st=G("m+aA"),Fe=G("c+Xe"),Me=G("zT1h"),ot=G("QC+M");function Ke(re,ge,be){return be?re[0]===ge[0]:re[0]===ge[0]&&re[1]===ge[1]}function Oe(re,ge,be){var ae=re[ge]||{};return Object(B.a)(Object(B.a)({},ae),be)}function We(re,ge,be,ae){for(var V=be.points,ee=Object.keys(re),X=0;X<ee.length;X+=1){var se=ee[X];if(Ke(re[se].points,V,ae))return"".concat(ge,"-placement-").concat(se)}return""}var ve=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var re=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(re)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(re==null?void 0:re.substr(0,4)))},le=G("MNnm");function de(re,ge){var be={};return be[re.toLowerCase()]=ge.toLowerCase(),be["Webkit".concat(re)]="webkit".concat(ge),be["Moz".concat(re)]="moz".concat(ge),be["ms".concat(re)]="MS".concat(ge),be["O".concat(re)]="o".concat(ge.toLowerCase()),be}function J(re,ge){var be={animationend:de("Animation","AnimationEnd"),transitionend:de("Transition","TransitionEnd")};return re&&("AnimationEvent"in ge||delete be.animationend.animation,"TransitionEvent"in ge||delete be.transitionend.transition),be}var q=J(Object(le.a)(),typeof window!="undefined"?window:{}),te={};if(Object(le.a)()){var ie=document.createElement("div");te=ie.style}var me={};function Re(re){if(me[re])return me[re];var ge=q[re];if(ge)for(var be=Object.keys(ge),ae=be.length,V=0;V<ae;V+=1){var ee=be[V];if(Object.prototype.hasOwnProperty.call(ge,ee)&&ee in te)return me[re]=ge[ee],me[re]}return""}var Pe=Re("animationend"),tt=Re("transitionend"),Et=!!(Pe&&tt),bt=Pe||"animationend",Ht=tt||"transitionend";function St(re,ge){if(!re)return null;if(Object(F.a)(re)==="object"){var be=ge.replace(/-\w/g,function(ae){return ae[1].toUpperCase()});return re[be]}return"".concat(re,"-").concat(ge)}var rt="none",Ft="appear",Ot="enter",Wt="leave",Zt="none",pt="prepare",mn="start",Kt="active",Dt="end";function en(re){var ge=Object(C.useRef)(!1),be=Object(C.useState)(re),ae=Object(K.a)(be,2),V=ae[0],ee=ae[1];function X(se){ge.current||ee(se)}return Object(C.useEffect)(function(){return function(){ge.current=!0}},[]),[V,X]}var Je=Object(le.a)()?C.useLayoutEffect:C.useEffect,Un=Je,Tn=function(){var re=C.useRef(null);function ge(){qe.a.cancel(re.current)}function be(ae){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;ge();var ee=Object(qe.a)(function(){V<=1?ae({isCanceled:function(){return ee!==re.current}}):be(ae,V-1)});re.current=ee}return C.useEffect(function(){return function(){ge()}},[]),[be,ge]},Mn=[pt,mn,Kt,Dt],fr=!1,Ln=!0;function Tt(re){return re===Kt||re===Dt}var jr=function(re,ge){var be=C.useState(Zt),ae=Object(K.a)(be,2),V=ae[0],ee=ae[1],X=Tn(),se=Object(K.a)(X,2),ue=se[0],Ee=se[1];function ye(){ee(pt)}return Un(function(){if(V!==Zt&&V!==Dt){var Te=Mn.indexOf(V),ke=Mn[Te+1],Ye=ge(V);Ye===fr?ee(ke):ue(function(Xe){function ct(){if(Xe.isCanceled())return;ee(ke)}Ye===!0?ct():Promise.resolve(Ye).then(ct)})}},[re,V]),C.useEffect(function(){return function(){Ee()}},[]),[ye,V]},ti=function(re){var ge=Object(C.useRef)(),be=Object(C.useRef)(re);be.current=re;var ae=C.useCallback(function(X){be.current(X)},[]);function V(X){X&&(X.removeEventListener(Ht,ae),X.removeEventListener(bt,ae))}function ee(X){ge.current&&ge.current!==X&&V(ge.current),X&&X!==ge.current&&(X.addEventListener(Ht,ae),X.addEventListener(bt,ae),ge.current=X)}return C.useEffect(function(){return function(){V(ge.current)}},[]),[ee,V]};function Yn(re,ge,be,ae){var V=ae.motionEnter,ee=V===void 0?!0:V,X=ae.motionAppear,se=X===void 0?!0:X,ue=ae.motionLeave,Ee=ue===void 0?!0:ue,ye=ae.motionDeadline,Te=ae.motionLeaveImmediately,ke=ae.onAppearPrepare,Ye=ae.onEnterPrepare,Xe=ae.onLeavePrepare,ct=ae.onAppearStart,_t=ae.onEnterStart,Yt=ae.onLeaveStart,Gt=ae.onAppearActive,zt=ae.onEnterActive,Jt=ae.onLeaveActive,Xt=ae.onAppearEnd,Vt=ae.onEnterEnd,dn=ae.onLeaveEnd,rn=ae.onVisibleChanged,kn=en(),an=Object(K.a)(kn,2),kt=an[0],It=an[1],sn=en(rt),cn=Object(K.a)(sn,2),Ct=cn[0],hn=cn[1],_n=en(null),gn=Object(K.a)(_n,2),wn=gn[0],Sn=gn[1],Gn=Object(C.useRef)(!1),qn=Object(C.useRef)(null),Bn=Object(C.useRef)(!1),gr=Object(C.useRef)(null);function Gr(){var Rn=be();return Rn||gr.current}var Ar=Object(C.useRef)(!1);function $n(Rn){var An=Gr();if(Rn&&!Rn.deadline&&Rn.target!==An)return;var er;Ct===Ft&&Ar.current?er=Xt==null?void 0:Xt(An,Rn):Ct===Ot&&Ar.current?er=Vt==null?void 0:Vt(An,Rn):Ct===Wt&&Ar.current&&(er=dn==null?void 0:dn(An,Rn)),er!==!1&&!Bn.current&&(hn(rt),Sn(null))}var In=ti($n),Dn=Object(K.a)(In,1),Fn=Dn[0],Nn=C.useMemo(function(){var Rn,An,er;switch(Ct){case"appear":return Rn={},Object($.a)(Rn,pt,ke),Object($.a)(Rn,mn,ct),Object($.a)(Rn,Kt,Gt),Rn;case"enter":return An={},Object($.a)(An,pt,Ye),Object($.a)(An,mn,_t),Object($.a)(An,Kt,zt),An;case"leave":return er={},Object($.a)(er,pt,Xe),Object($.a)(er,mn,Yt),Object($.a)(er,Kt,Jt),er;default:return{}}},[Ct]),zr=jr(Ct,function(Rn){if(Rn===pt){var An=Nn[pt];return An?An(Gr()):fr}if(Cn in Nn){var er;Sn(((er=Nn[Cn])===null||er===void 0?void 0:er.call(Nn,Gr(),null))||null)}return Cn===Kt&&(Fn(Gr()),ye>0&&(clearTimeout(qn.current),qn.current=setTimeout(function(){$n({deadline:!0})},ye))),Ln}),bi=Object(K.a)(zr,2),Ei=bi[0],Cn=bi[1],ei=Tt(Cn);Ar.current=ei,Un(function(){It(ge);var Rn=Gn.current;if(Gn.current=!0,!re)return;var An;!Rn&&ge&&se&&(An=Ft),Rn&&ge&&ee&&(An=Ot),(Rn&&!ge&&Ee||!Rn&&Te&&!ge&&Ee)&&(An=Wt),An&&(hn(An),Ei())},[ge]),Object(C.useEffect)(function(){(Ct===Ft&&!se||Ct===Ot&&!ee||Ct===Wt&&!Ee)&&hn(rt)},[se,ee,Ee]),Object(C.useEffect)(function(){return function(){clearTimeout(qn.current),Bn.current=!0}},[]),Object(C.useEffect)(function(){kt!==void 0&&Ct===rt&&(rn==null||rn(kt))},[kt,Ct]);var xi=wn;return Nn[pt]&&Cn===mn&&(xi=Object(B.a)({transition:"none"},xi)),[Ct,Cn,xi,kt!=null?kt:ge]}var on=function(re){Object(m.a)(be,re);var ge=Object(c.a)(be);function be(){return Object(D.a)(this,be),ge.apply(this,arguments)}return Object(v.a)(be,[{key:"render",value:function(){return this.props.children}}]),be}(C.Component),Dr=on;function Nr(re){var ge=re;Object(F.a)(re)==="object"&&(ge=re.transitionSupport);function be(V){return!!(V.motionName&&ge)}var ae=C.forwardRef(function(V,ee){var X=V.visible,se=X===void 0?!0:X,ue=V.removeOnLeave,Ee=ue===void 0?!0:ue,ye=V.forceRender,Te=V.children,ke=V.motionName,Ye=V.leavedClassName,Xe=V.eventProps,ct=be(V),_t=Object(C.useRef)(),Yt=Object(C.useRef)();function Gt(){try{return Object(st.a)(_t.current||Yt.current)}catch(hn){return null}}var zt=Yn(ct,se,Gt,V),Jt=Object(K.a)(zt,4),Xt=Jt[0],Vt=Jt[1],dn=Jt[2],rn=Jt[3],kn=C.useRef(rn);rn&&(kn.current=!0);var an=Object(C.useRef)(ee);an.current=ee;var kt=C.useCallback(function(hn){_t.current=hn,Object(Fe.b)(an.current,hn)},[]),It,sn=Object(B.a)(Object(B.a)({},Xe),{},{visible:se});if(!Te)It=null;else if(Xt===rt||!be(V))rn?It=Te(Object(B.a)({},sn),kt):!Ee&&kn.current?It=Te(Object(B.a)(Object(B.a)({},sn),{},{className:Ye}),kt):ye?It=Te(Object(B.a)(Object(B.a)({},sn),{},{style:{display:"none"}}),kt):It=null;else{var cn,Ct;Vt===pt?Ct="prepare":Tt(Vt)?Ct="active":Vt===mn&&(Ct="start"),It=Te(Object(B.a)(Object(B.a)({},sn),{},{className:U()(St(ke,Xt),(cn={},Object($.a)(cn,St(ke,"".concat(Xt,"-").concat(Ct)),Ct),Object($.a)(cn,ke,typeof ke=="string"),cn)),style:dn}),kt)}return C.createElement(Dr,{ref:Yt},It)});return ae.displayName="CSSMotion",ae}var Yr=Nr(Et),Qe="add",Lt="keep",Wr="remove",ni="removed";function fi(re){var ge;return re&&Object(F.a)(re)==="object"&&"key"in re?ge=re:ge={key:re},Object(B.a)(Object(B.a)({},ge),{},{key:String(ge.key)})}function Kr(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return re.map(fi)}function hi(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],be=[],ae=0,V=ge.length,ee=Kr(re),X=Kr(ge);ee.forEach(function(Ee){for(var ye=!1,Te=ae;Te<V;Te+=1){var ke=X[Te];if(ke.key===Ee.key){ae<Te&&(be=be.concat(X.slice(ae,Te).map(function(Ye){return Object(B.a)(Object(B.a)({},Ye),{},{status:Qe})})),ae=Te),be.push(Object(B.a)(Object(B.a)({},ke),{},{status:Lt})),ae+=1,ye=!0;break}}ye||be.push(Object(B.a)(Object(B.a)({},Ee),{},{status:Wr}))}),ae<V&&(be=be.concat(X.slice(ae).map(function(Ee){return Object(B.a)(Object(B.a)({},Ee),{},{status:Qe})})));var se={};be.forEach(function(Ee){var ye=Ee.key;se[ye]=(se[ye]||0)+1});var ue=Object.keys(se).filter(function(Ee){return se[Ee]>1});return ue.forEach(function(Ee){be=be.filter(function(ye){var Te=ye.key,ke=ye.status;return Te!==Ee||ke!==Wr}),be.forEach(function(ye){ye.key===Ee&&(ye.status=Lt)})}),be}var Ut=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Ki(re){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yr,be=function(ae){Object(m.a)(ee,ae);var V=Object(c.a)(ee);function ee(){var X;return Object(D.a)(this,ee),X=V.apply(this,arguments),X.state={keyEntities:[]},X.removeKey=function(se){X.setState(function(ue){var Ee=ue.keyEntities;return{keyEntities:Ee.map(function(ye){return ye.key!==se?ye:Object(B.a)(Object(B.a)({},ye),{},{status:ni})})}})},X}return Object(v.a)(ee,[{key:"render",value:function(){var se=this,ue=this.state.keyEntities,Ee=this.props,ye=Ee.component,Te=Ee.children,ke=Ee.onVisibleChanged,Ye=Object(O.a)(Ee,["component","children","onVisibleChanged"]),Xe=ye||C.Fragment,ct={};return Ut.forEach(function(_t){ct[_t]=Ye[_t],delete Ye[_t]}),delete Ye.keys,C.createElement(Xe,Ye,ue.map(function(_t){var Yt=_t.status,Gt=Object(O.a)(_t,["status"]),zt=Yt===Qe||Yt===Lt;return C.createElement(ge,Object(h.a)({},ct,{key:Gt.key,visible:zt,eventProps:Gt,onVisibleChanged:function(Xt){ke==null||ke(Xt,{key:Gt.key}),Xt||se.removeKey(Gt.key)}}),Te)}))}}],[{key:"getDerivedStateFromProps",value:function(se,ue){var Ee=se.keys,ye=ue.keyEntities,Te=Kr(Ee),ke=hi(ye,Te);return{keyEntities:ke.filter(function(Ye){var Xe=ye.find(function(ct){var _t=ct.key;return Ye.key===_t});return!(Xe&&Xe.status===ni&&Ye.status===Wr)})}}}]),ee}(C.Component);return be.defaultProps={component:"div"},be}var $e=Ki(Et),hr=Yr;function mr(re){var ge=re.prefixCls,be=re.motion,ae=re.animation,V=re.transitionName;return be||(ae?{motionName:"".concat(ge,"-").concat(ae)}:V?{motionName:V}:null)}function Di(re){var ge=re.prefixCls,be=re.visible,ae=re.zIndex,V=re.mask,ee=re.maskMotion,X=re.maskAnimation,se=re.maskTransitionName;if(!V)return null;var ue={};return(ee||se||X)&&(ue=Object(B.a)({motionAppear:!0},mr({motion:ee,prefixCls:ge,transitionName:se,animation:X}))),C.createElement(hr,Object(h.a)({},ue,{visible:be,removeOnLeave:!0}),function(Ee){var ye=Ee.className;return C.createElement("div",{style:{zIndex:ae},className:U()("".concat(ge,"-mask"),ye)})})}var ri=G("9mu1"),Or=G("o0o1"),mi=G.n(Or),Oi=G("HaE+"),br=["measure","align",null,"motion"],Ri=function(re,ge){var be=Object(C.useState)(null),ae=Object(K.a)(be,2),V=ae[0],ee=ae[1],X=Object(C.useRef)(),se=Object(C.useRef)(!1);function ue(Te){se.current||ee(Te)}function Ee(){qe.a.cancel(X.current)}function ye(Te){Ee(),X.current=Object(qe.a)(function(){ue(function(ke){switch(V){case"align":return"motion";case"motion":return"stable";default:}return ke}),Te==null||Te()})}return Object(C.useEffect)(function(){ue("measure")},[re]),Object(C.useEffect)(function(){switch(V){case"measure":ge();break;default:}V&&(X.current=Object(qe.a)(Object(Oi.a)(mi.a.mark(function Te(){var ke,Ye;return mi.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:ke=br.indexOf(V),Ye=br[ke+1],Ye&&ke!==-1&&ue(Ye);case 3:case"end":return ct.stop()}},Te)}))))},[V]),Object(C.useEffect)(function(){return function(){se.current=!0,Ee()}},[]),[V,ye]},Mi=function(re){var ge=C.useState({width:0,height:0}),be=Object(K.a)(ge,2),ae=be[0],V=be[1];function ee(se){V({width:se.offsetWidth,height:se.offsetHeight})}var X=C.useMemo(function(){var se={};if(re){var ue=ae.width,Ee=ae.height;re.indexOf("height")!==-1&&Ee?se.height=Ee:re.indexOf("minHeight")!==-1&&Ee&&(se.minHeight=Ee),re.indexOf("width")!==-1&&ue?se.width=ue:re.indexOf("minWidth")!==-1&&ue&&(se.minWidth=ue)}return se},[re,ae]);return[X,ee]},pi=C.forwardRef(function(re,ge){var be=re.visible,ae=re.prefixCls,V=re.className,ee=re.style,X=re.children,se=re.zIndex,ue=re.stretch,Ee=re.destroyPopupOnHide,ye=re.forceRender,Te=re.align,ke=re.point,Ye=re.getRootDomNode,Xe=re.getClassNameFromAlign,ct=re.onAlign,_t=re.onMouseEnter,Yt=re.onMouseLeave,Gt=re.onMouseDown,zt=re.onTouchStart,Jt=Object(C.useRef)(),Xt=Object(C.useRef)(),Vt=Object(C.useState)(),dn=Object(K.a)(Vt,2),rn=dn[0],kn=dn[1],an=Mi(ue),kt=Object(K.a)(an,2),It=kt[0],sn=kt[1];function cn(){ue&&sn(Ye())}var Ct=Ri(be,cn),hn=Object(K.a)(Ct,2),_n=hn[0],gn=hn[1],wn=Object(C.useRef)();function Sn(){return ke||Ye}function Gn(){var In;(In=Jt.current)===null||In===void 0||In.forceAlign()}function qn(In,Dn){var Fn=Xe(Dn);rn!==Fn&&kn(Fn),_n==="align"&&(rn!==Fn?Promise.resolve().then(function(){Gn()}):gn(function(){var Nn;(Nn=wn.current)===null||Nn===void 0||Nn.call(wn)}),ct==null||ct(In,Dn))}var Bn=Object(B.a)({},mr(re));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(In){var Dn=Bn[In];Bn[In]=function(Fn,Nn){return gn(),Dn==null?void 0:Dn(Fn,Nn)}});function gr(){return new Promise(function(In){wn.current=In})}C.useEffect(function(){!Bn.motionName&&_n==="motion"&&gn()},[Bn.motionName,_n]),C.useImperativeHandle(ge,function(){return{forceAlign:Gn,getElement:function(){return Xt.current}}});var Gr=Object(B.a)(Object(B.a)({},It),{},{zIndex:se,opacity:_n==="motion"||_n==="stable"||!be?void 0:0,pointerEvents:_n==="stable"?void 0:"none"},ee),Ar=!0;(Te==null?void 0:Te.points)&&(_n==="align"||_n==="stable")&&(Ar=!1);var $n=X;return C.Children.count(X)>1&&($n=C.createElement("div",{className:"".concat(ae,"-content")},X)),C.createElement(hr,Object(h.a)({visible:be,ref:Xt,leavedClassName:"".concat(ae,"-hidden")},Bn,{onAppearPrepare:gr,onEnterPrepare:gr,removeOnLeave:Ee,forceRender:ye}),function(In,Dn){var Fn=In.className,Nn=In.style,zr=U()(ae,V,rn,Fn);return C.createElement(ri.a,{target:Sn(),key:"popup",ref:Jt,monitorWindowResize:!0,disabled:Ar,align:Te,onAlign:qn},C.createElement("div",{ref:Dn,className:zr,onMouseEnter:_t,onMouseLeave:Yt,onMouseDownCapture:Gt,onTouchStartCapture:zt,style:Object(B.a)(Object(B.a)({},Nn),Gr)},$n))})});pi.displayName="PopupInner";var Rr=pi,Li=C.forwardRef(function(re,ge){var be=re.prefixCls,ae=re.visible,V=re.zIndex,ee=re.children,X=re.mobile;X=X===void 0?{}:X;var se=X.popupClassName,ue=X.popupStyle,Ee=X.popupMotion,ye=Ee===void 0?{}:Ee,Te=X.popupRender,ke=C.useRef();C.useImperativeHandle(ge,function(){return{forceAlign:function(){},getElement:function(){return ke.current}}});var Ye=Object(B.a)({zIndex:V},ue),Xe=ee;return C.Children.count(ee)>1&&(Xe=C.createElement("div",{className:"".concat(be,"-content")},ee)),Te&&(Xe=Te(Xe)),C.createElement(hr,Object(h.a)({visible:ae,ref:ke,removeOnLeave:!0},ye),function(ct,_t){var Yt=ct.className,Gt=ct.style,zt=U()(be,se,Yt);return C.createElement("div",{ref:_t,className:zt,style:Object(B.a)(Object(B.a)({},Gt),Ye)},Xe)})});Li.displayName="MobilePopupInner";var ra=Li,vn=["visible","mobile"],Rt=C.forwardRef(function(re,ge){var be=re.visible,ae=re.mobile,V=Object(O.a)(re,vn),ee=Object(C.useState)(be),X=Object(K.a)(ee,2),se=X[0],ue=X[1],Ee=Object(C.useState)(!1),ye=Object(K.a)(Ee,2),Te=ye[0],ke=ye[1],Ye=Object(B.a)(Object(B.a)({},V),{},{visible:se});Object(C.useEffect)(function(){ue(be),be&&ae&&ke(ve())},[be,ae]);var Xe=Te?C.createElement(ra,Object(h.a)({},Ye,{mobile:ae,ref:ge})):C.createElement(Rr,Object(h.a)({},Ye,{ref:ge}));return C.createElement("div",null,C.createElement(Di,Ye),Xe)});Rt.displayName="Popup";var Bt=Rt,tn=C.createContext(null),pn=tn;function Qt(){}function Jr(){return""}function ir(re){return re?re.ownerDocument:window.document}var Hi=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function ia(re){var ge=function(be){Object(m.a)(V,be);var ae=Object(c.a)(V);function V(ee){var X;Object(D.a)(this,V),X=ae.call(this,ee),X.popupRef=C.createRef(),X.triggerRef=C.createRef(),X.attachId=void 0,X.clickOutsideHandler=void 0,X.touchOutsideHandler=void 0,X.contextMenuOutsideHandler1=void 0,X.contextMenuOutsideHandler2=void 0,X.mouseDownTimeout=void 0,X.focusTime=void 0,X.preClickTime=void 0,X.preTouchTime=void 0,X.delayTimer=void 0,X.hasPopupMouseDown=void 0,X.onMouseEnter=function(ue){var Ee=X.props.mouseEnterDelay;X.fireEvents("onMouseEnter",ue),X.delaySetPopupVisible(!0,Ee,Ee?null:ue)},X.onMouseMove=function(ue){X.fireEvents("onMouseMove",ue),X.setPoint(ue)},X.onMouseLeave=function(ue){X.fireEvents("onMouseLeave",ue),X.delaySetPopupVisible(!1,X.props.mouseLeaveDelay)},X.onPopupMouseEnter=function(){X.clearDelayTimer()},X.onPopupMouseLeave=function(ue){var Ee;if(ue.relatedTarget&&!ue.relatedTarget.setTimeout&&Object(lt.a)((Ee=X.popupRef.current)===null||Ee===void 0?void 0:Ee.getElement(),ue.relatedTarget))return;X.delaySetPopupVisible(!1,X.props.mouseLeaveDelay)},X.onFocus=function(ue){X.fireEvents("onFocus",ue),X.clearDelayTimer(),X.isFocusToShow()&&(X.focusTime=Date.now(),X.delaySetPopupVisible(!0,X.props.focusDelay))},X.onMouseDown=function(ue){X.fireEvents("onMouseDown",ue),X.preClickTime=Date.now()},X.onTouchStart=function(ue){X.fireEvents("onTouchStart",ue),X.preTouchTime=Date.now()},X.onBlur=function(ue){X.fireEvents("onBlur",ue),X.clearDelayTimer(),X.isBlurToHide()&&X.delaySetPopupVisible(!1,X.props.blurDelay)},X.onContextMenu=function(ue){ue.preventDefault(),X.fireEvents("onContextMenu",ue),X.setPopupVisible(!0,ue)},X.onContextMenuClose=function(){X.isContextMenuToShow()&&X.close()},X.onClick=function(ue){if(X.fireEvents("onClick",ue),X.focusTime){var Ee;if(X.preClickTime&&X.preTouchTime?Ee=Math.min(X.preClickTime,X.preTouchTime):X.preClickTime?Ee=X.preClickTime:X.preTouchTime&&(Ee=X.preTouchTime),Math.abs(Ee-X.focusTime)<20)return;X.focusTime=0}X.preClickTime=0,X.preTouchTime=0,X.isClickToShow()&&(X.isClickToHide()||X.isBlurToHide())&&ue&&ue.preventDefault&&ue.preventDefault();var ye=!X.state.popupVisible;(X.isClickToHide()&&!ye||ye&&X.isClickToShow())&&X.setPopupVisible(!X.state.popupVisible,ue)},X.onPopupMouseDown=function(){if(X.hasPopupMouseDown=!0,clearTimeout(X.mouseDownTimeout),X.mouseDownTimeout=window.setTimeout(function(){X.hasPopupMouseDown=!1},0),X.context){var ue;(ue=X.context).onPopupMouseDown.apply(ue,arguments)}},X.onDocumentClick=function(ue){if(X.props.mask&&!X.props.maskClosable)return;var Ee=ue.target,ye=X.getRootDomNode(),Te=X.getPopupDomNode();(!Object(lt.a)(ye,Ee)||X.isContextMenuOnly())&&!Object(lt.a)(Te,Ee)&&!X.hasPopupMouseDown&&X.close()},X.getRootDomNode=function(){var ue=X.props.getTriggerDOMNode;if(ue)return ue(X.triggerRef.current);try{var Ee=Object(st.a)(X.triggerRef.current);if(Ee)return Ee}catch(ye){}return mt.a.findDOMNode(Object(f.a)(X))},X.getPopupClassNameFromAlign=function(ue){var Ee=[],ye=X.props,Te=ye.popupPlacement,ke=ye.builtinPlacements,Ye=ye.prefixCls,Xe=ye.alignPoint,ct=ye.getPopupClassNameFromAlign;return Te&&ke&&Ee.push(We(ke,Ye,ue,Xe)),ct&&Ee.push(ct(ue)),Ee.join(" ")},X.getComponent=function(){var ue=X.props,Ee=ue.prefixCls,ye=ue.destroyPopupOnHide,Te=ue.popupClassName,ke=ue.onPopupAlign,Ye=ue.popupMotion,Xe=ue.popupAnimation,ct=ue.popupTransitionName,_t=ue.popupStyle,Yt=ue.mask,Gt=ue.maskAnimation,zt=ue.maskTransitionName,Jt=ue.maskMotion,Xt=ue.zIndex,Vt=ue.popup,dn=ue.stretch,rn=ue.alignPoint,kn=ue.mobile,an=ue.forceRender,kt=X.state,It=kt.popupVisible,sn=kt.point,cn=X.getPopupAlign(),Ct={};return X.isMouseEnterToShow()&&(Ct.onMouseEnter=X.onPopupMouseEnter),X.isMouseLeaveToHide()&&(Ct.onMouseLeave=X.onPopupMouseLeave),Ct.onMouseDown=X.onPopupMouseDown,Ct.onTouchStart=X.onPopupMouseDown,C.createElement(Bt,Object(h.a)({prefixCls:Ee,destroyPopupOnHide:ye,visible:It,point:rn&&sn,className:Te,align:cn,onAlign:ke,animation:Xe,getClassNameFromAlign:X.getPopupClassNameFromAlign},Ct,{stretch:dn,getRootDomNode:X.getRootDomNode,style:_t,mask:Yt,zIndex:Xt,transitionName:ct,maskAnimation:Gt,maskTransitionName:zt,maskMotion:Jt,ref:X.popupRef,motion:Ye,mobile:kn,forceRender:an}),typeof Vt=="function"?Vt():Vt)},X.attachParent=function(ue){qe.a.cancel(X.attachId);var Ee=X.props,ye=Ee.getPopupContainer,Te=Ee.getDocument,ke=X.getRootDomNode(),Ye;ye?(ke||ye.length===0)&&(Ye=ye(ke)):Ye=Te(X.getRootDomNode()).body,Ye?Ye.appendChild(ue):X.attachId=Object(qe.a)(function(){X.attachParent(ue)})},X.getContainer=function(){var ue=X.props.getDocument,Ee=ue(X.getRootDomNode()).createElement("div");return Ee.style.position="absolute",Ee.style.top="0",Ee.style.left="0",Ee.style.width="100%",X.attachParent(Ee),Ee},X.setPoint=function(ue){var Ee=X.props.alignPoint;if(!Ee||!ue)return;X.setState({point:{pageX:ue.pageX,pageY:ue.pageY}})},X.handlePortalUpdate=function(){X.state.prevPopupVisible!==X.state.popupVisible&&X.props.afterPopupVisibleChange(X.state.popupVisible)},X.triggerContextValue={onPopupMouseDown:X.onPopupMouseDown};var se;return"popupVisible"in ee?se=!!ee.popupVisible:se=!!ee.defaultPopupVisible,X.state={prevPopupVisible:se,popupVisible:se},Hi.forEach(function(ue){X["fire".concat(ue)]=function(Ee){X.fireEvents(ue,Ee)}}),X}return Object(v.a)(V,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var X=this.props,se=this.state;if(se.popupVisible){var ue;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(ue=X.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Me.a)(ue,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(ue=ue||X.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Me.a)(ue,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(ue=ue||X.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Me.a)(ue,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Me.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),qe.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var X;return((X=this.popupRef.current)===null||X===void 0?void 0:X.getElement())||null}},{key:"getPopupAlign",value:function(){var X=this.props,se=X.popupPlacement,ue=X.popupAlign,Ee=X.builtinPlacements;return se&&Ee?Oe(Ee,se,ue):ue}},{key:"setPopupVisible",value:function(X,se){var ue=this.props.alignPoint,Ee=this.state.popupVisible;this.clearDelayTimer(),Ee!==X&&("popupVisible"in this.props||this.setState({popupVisible:X,prevPopupVisible:Ee}),this.props.onPopupVisibleChange(X)),ue&&se&&X&&this.setPoint(se)}},{key:"delaySetPopupVisible",value:function(X,se,ue){var Ee=this,ye=se*1e3;if(this.clearDelayTimer(),ye){var Te=ue?{pageX:ue.pageX,pageY:ue.pageY}:null;this.delayTimer=window.setTimeout(function(){Ee.setPopupVisible(X,Te),Ee.clearDelayTimer()},ye)}else this.setPopupVisible(X,ue)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(X){var se=this.props.children.props,ue=this.props;return se[X]&&ue[X]?this["fire".concat(X)]:se[X]||ue[X]}},{key:"isClickToShow",value:function(){var X=this.props,se=X.action,ue=X.showAction;return se.indexOf("click")!==-1||ue.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var X=this.props.action;return X==="contextMenu"||X.length===1&&X[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var X=this.props,se=X.action,ue=X.showAction;return se.indexOf("contextMenu")!==-1||ue.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var X=this.props,se=X.action,ue=X.hideAction;return se.indexOf("click")!==-1||ue.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var X=this.props,se=X.action,ue=X.showAction;return se.indexOf("hover")!==-1||ue.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var X=this.props,se=X.action,ue=X.hideAction;return se.indexOf("hover")!==-1||ue.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var X=this.props,se=X.action,ue=X.showAction;return se.indexOf("focus")!==-1||ue.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var X=this.props,se=X.action,ue=X.hideAction;return se.indexOf("focus")!==-1||ue.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var X;(X=this.popupRef.current)===null||X===void 0||X.forceAlign()}}},{key:"fireEvents",value:function(X,se){var ue=this.props.children.props[X];ue&&ue(se);var Ee=this.props[X];Ee&&Ee(se)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var X=this.state.popupVisible,se=this.props,ue=se.children,Ee=se.forceRender,ye=se.alignPoint,Te=se.className,ke=se.autoDestroy,Ye=C.Children.only(ue),Xe={key:"trigger"};this.isContextMenuToShow()?Xe.onContextMenu=this.onContextMenu:Xe.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Xe.onClick=this.onClick,Xe.onMouseDown=this.onMouseDown,Xe.onTouchStart=this.onTouchStart):(Xe.onClick=this.createTwoChains("onClick"),Xe.onMouseDown=this.createTwoChains("onMouseDown"),Xe.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Xe.onMouseEnter=this.onMouseEnter,ye&&(Xe.onMouseMove=this.onMouseMove)):Xe.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Xe.onMouseLeave=this.onMouseLeave:Xe.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Xe.onFocus=this.onFocus,Xe.onBlur=this.onBlur):(Xe.onFocus=this.createTwoChains("onFocus"),Xe.onBlur=this.createTwoChains("onBlur"));var ct=U()(Ye&&Ye.props&&Ye.props.className,Te);ct&&(Xe.className=ct);var _t=Object(B.a)({},Xe);Object(Fe.c)(Ye)&&(_t.ref=Object(Fe.a)(this.triggerRef,Ye.ref));var Yt=C.cloneElement(Ye,_t),Gt;return(X||this.popupRef.current||Ee)&&(Gt=C.createElement(re,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!X&&ke&&(Gt=null),C.createElement(pn.Provider,{value:this.triggerContextValue},Yt,Gt)}}],[{key:"getDerivedStateFromProps",value:function(X,se){var ue=X.popupVisible,Ee={};return ue!==void 0&&se.popupVisible!==ue&&(Ee.popupVisible=ue,Ee.prevPopupVisible=se.popupVisible),Ee}}]),V}(C.Component);return ge.contextType=pn,ge.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Jr,getDocument:ir,onPopupVisibleChange:Qt,afterPopupVisibleChange:Qt,onPopupAlign:Qt,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},ge}var Hr=ia(ot.a),pr={adjustX:1,adjustY:1},ar={topLeft:{points:["bl","tl"],overflow:pr,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pr,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:pr,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:pr,offset:[4,0]}},gi={topLeft:{points:["bl","tl"],overflow:pr,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pr,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:pr,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:pr,offset:[4,0]}},ii=ar,vi=0,Ii={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Zr=function(ge,be,ae){var V=He(be),ee=ge.getState();ge.setState({defaultActiveFirst:Object(B.a)(Object(B.a)({},ee.defaultActiveFirst),{},Object($.a)({},V,ae))})},qr=function(re){Object(m.a)(be,re);var ge=Object(c.a)(be);function be(ae){var V;Object(D.a)(this,be),V=ge.call(this,ae),V.onDestroy=function(ye){V.props.onDestroy(ye)},V.onKeyDown=function(ye){var Te=ye.keyCode,ke=V.menuInstance,Ye=V.props.store,Xe=V.getVisible();if(Te===g.a.ENTER)return V.onTitleClick(ye),Zr(Ye,V.props.eventKey,!0),!0;if(Te===g.a.RIGHT)return Xe?ke.onKeyDown(ye):(V.triggerOpenChange(!0),Zr(Ye,V.props.eventKey,!0)),!0;if(Te===g.a.LEFT){var ct;if(Xe)ct=ke.onKeyDown(ye);else return;return ct||(V.triggerOpenChange(!1),ct=!0),ct}return Xe&&(Te===g.a.UP||Te===g.a.DOWN)?ke.onKeyDown(ye):void 0},V.onOpenChange=function(ye){V.props.onOpenChange(ye)},V.onPopupVisibleChange=function(ye){V.triggerOpenChange(ye,ye?"mouseenter":"mouseleave")},V.onMouseEnter=function(ye){var Te=V.props,ke=Te.eventKey,Ye=Te.onMouseEnter,Xe=Te.store;Zr(Xe,V.props.eventKey,!1),Ye({key:ke,domEvent:ye})},V.onMouseLeave=function(ye){var Te=V.props,ke=Te.parentMenu,Ye=Te.eventKey,Xe=Te.onMouseLeave;ke.subMenuInstance=Object(f.a)(V),Xe({key:Ye,domEvent:ye})},V.onTitleMouseEnter=function(ye){var Te=V.props,ke=Te.eventKey,Ye=Te.onItemHover,Xe=Te.onTitleMouseEnter;Ye({key:ke,hover:!0}),Xe({key:ke,domEvent:ye})},V.onTitleMouseLeave=function(ye){var Te=V.props,ke=Te.parentMenu,Ye=Te.eventKey,Xe=Te.onItemHover,ct=Te.onTitleMouseLeave;ke.subMenuInstance=Object(f.a)(V),Xe({key:Ye,hover:!1}),ct({key:Ye,domEvent:ye})},V.onTitleClick=function(ye){var Te=Object(f.a)(V),ke=Te.props;if(ke.onTitleClick({key:ke.eventKey,domEvent:ye}),ke.triggerSubMenuAction==="hover")return;V.triggerOpenChange(!V.getVisible(),"click"),Zr(ke.store,V.props.eventKey,!1)},V.onSubMenuClick=function(ye){typeof V.props.onClick=="function"&&V.props.onClick(V.addKeyPath(ye))},V.onSelect=function(ye){V.props.onSelect(ye)},V.onDeselect=function(ye){V.props.onDeselect(ye)},V.getPrefixCls=function(){return"".concat(V.props.rootPrefixCls,"-submenu")},V.getActiveClassName=function(){return"".concat(V.getPrefixCls(),"-active")},V.getDisabledClassName=function(){return"".concat(V.getPrefixCls(),"-disabled")},V.getSelectedClassName=function(){return"".concat(V.getPrefixCls(),"-selected")},V.getOpenClassName=function(){return"".concat(V.props.rootPrefixCls,"-submenu-open")},V.getVisible=function(){return V.state.isOpen},V.getMode=function(){return V.state.mode},V.saveMenuInstance=function(ye){V.menuInstance=ye},V.addKeyPath=function(ye){return Object(B.a)(Object(B.a)({},ye),{},{keyPath:(ye.keyPath||[]).concat(V.props.eventKey)})},V.triggerOpenChange=function(ye,Te){var ke=V.props.eventKey,Ye=function(){V.onOpenChange({key:ke,item:Object(f.a)(V),trigger:Te,open:ye})};Te==="mouseenter"?V.mouseenterTimeout=setTimeout(function(){Ye()},0):Ye()},V.isChildrenSelected=function(){var ye={find:!1};return Ze(V.props.children,V.props.selectedKeys,ye),ye.find},V.isInlineMode=function(){return V.getMode()==="inline"},V.adjustWidth=function(){if(!V.subMenuTitle||!V.menuInstance)return;var ye=vt.findDOMNode(V.menuInstance);if(ye.offsetWidth>=V.subMenuTitle.offsetWidth)return;ye.style.minWidth="".concat(V.subMenuTitle.offsetWidth,"px")},V.saveSubMenuTitle=function(ye){V.subMenuTitle=ye},V.getBaseProps=function(){var ye=Object(f.a)(V),Te=ye.props,ke=V.getMode();return{mode:ke==="horizontal"?"vertical":ke,visible:V.getVisible(),level:Te.level+1,inlineIndent:Te.inlineIndent,focusable:!1,onClick:V.onSubMenuClick,onSelect:V.onSelect,onDeselect:V.onDeselect,onDestroy:V.onDestroy,selectedKeys:Te.selectedKeys,eventKey:"".concat(Te.eventKey,"-menu-"),openKeys:Te.openKeys,motion:Te.motion,onOpenChange:V.onOpenChange,subMenuOpenDelay:Te.subMenuOpenDelay,parentMenu:Object(f.a)(V),subMenuCloseDelay:Te.subMenuCloseDelay,forceSubMenuRender:Te.forceSubMenuRender,triggerSubMenuAction:Te.triggerSubMenuAction,builtinPlacements:Te.builtinPlacements,defaultActiveFirst:Te.store.getState().defaultActiveFirst[He(Te.eventKey)],multiple:Te.multiple,prefixCls:Te.rootPrefixCls,id:V.internalMenuId,manualRef:V.saveMenuInstance,itemIcon:Te.itemIcon,expandIcon:Te.expandIcon,direction:Te.direction}},V.getMotion=function(ye,Te){var ke=Object(f.a)(V),Ye=ke.haveRendered,Xe=V.props,ct=Xe.motion,_t=Xe.rootPrefixCls,Yt=Object(B.a)(Object(B.a)({},ct),{},{leavedClassName:"".concat(_t,"-hidden"),removeOnLeave:!1,motionAppear:Ye||!Te||ye!=="inline"});return Yt};var ee=ae.store,X=ae.eventKey,se=ee.getState(),ue=se.defaultActiveFirst;V.isRootMenu=!1;var Ee=!1;return ue&&(Ee=ue[X]),Zr(ee,X,Ee),V.state={mode:ae.mode,isOpen:ae.isOpen},V}return Object(v.a)(be,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var V=this,ee=this.props,X=ee.mode,se=ee.parentMenu,ue=ee.manualRef,Ee=ee.isOpen,ye=function(){V.setState({mode:X,isOpen:Ee})},Te=Ee!==this.state.isOpen,ke=X!==this.state.mode;if((ke||Te)&&(qe.a.cancel(this.updateStateRaf),ke?this.updateStateRaf=Object(qe.a)(ye):ye()),ue&&ue(this),X!=="horizontal"||!(se==null?void 0:se.isRootMenu)||!Ee)return;this.minWidthTimeout=setTimeout(function(){return V.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var V=this.props,ee=V.onDestroy,X=V.eventKey;ee&&ee(X),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),qe.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(V,ee){var X=this.getBaseProps();return C.createElement(sa,Object(h.a)({},X,{id:this.internalMenuId,className:V,style:ee}),this.props.children)}},{key:"renderChildren",value:function(){var V=this,ee=this.getBaseProps(),X=ee.mode,se=ee.visible,ue=ee.forceSubMenuRender,Ee=ee.direction,ye=this.getMotion(X,se);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||se||ue,!this.haveOpened)return C.createElement("div",null);var Te=U()("".concat(ee.prefixCls,"-sub"),Object($.a)({},"".concat(ee.prefixCls,"-rtl"),Ee==="rtl"));return this.isInlineMode()?C.createElement(hr,Object(h.a)({visible:ee.visible,forceRender:ue},ye),function(ke){var Ye=ke.className,Xe=ke.style,ct=U()(Te,Ye);return V.renderPopupMenu(ct,Xe)}):this.renderPopupMenu(Te)}},{key:"render",value:function(){var V,ee,X,se=Object(B.a)({},this.props),ue=this.getVisible(),Ee=this.getPrefixCls(),ye=this.isInlineMode(),Te=this.getMode(),ke=U()(Ee,"".concat(Ee,"-").concat(Te),(V={},Object($.a)(V,se.className,!!se.className),Object($.a)(V,this.getOpenClassName(),ue),Object($.a)(V,this.getActiveClassName(),se.active||ue&&!ye),Object($.a)(V,this.getDisabledClassName(),se.disabled),Object($.a)(V,this.getSelectedClassName(),this.isChildrenSelected()),V));this.internalMenuId||(se.eventKey?this.internalMenuId="".concat(se.eventKey,"$Menu"):(vi+=1,this.internalMenuId="$__$".concat(vi,"$Menu")));var Ye={},Xe={},ct={};se.disabled||(Ye={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Xe={onClick:this.onTitleClick},ct={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var _t={},Yt=se.direction,Gt=Yt==="rtl";ye&&(Gt?_t.paddingRight=se.inlineIndent*se.level:_t.paddingLeft=se.inlineIndent*se.level);var zt={};this.getVisible()&&(zt={"aria-owns":this.internalMenuId});var Jt=null;Te!=="horizontal"&&(Jt=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Jt=C.createElement(this.props.expandIcon,Object(B.a)({},this.props))));var Xt=C.createElement("div",Object(h.a)({ref:this.saveSubMenuTitle,style:_t,className:"".concat(Ee,"-title"),role:"button"},ct,Xe,{"aria-expanded":ue},zt,{"aria-haspopup":"true",title:typeof se.title=="string"?se.title:void 0}),se.title,Jt||C.createElement("i",{className:"".concat(Ee,"-arrow")})),Vt=this.renderChildren(),dn=((ee=se.parentMenu)===null||ee===void 0?void 0:ee.isRootMenu)?se.parentMenu.props.getPopupContainer:function(Sn){return Sn.parentNode},rn=Ii[Te],kn=se.popupOffset?{offset:se.popupOffset}:{},an=U()((X={},Object($.a)(X,se.popupClassName,se.popupClassName&&!ye),Object($.a)(X,"".concat(Ee,"-rtl"),Gt),X)),kt=se.disabled,It=se.triggerSubMenuAction,sn=se.subMenuOpenDelay,cn=se.forceSubMenuRender,Ct=se.subMenuCloseDelay,hn=se.builtinPlacements;ut.forEach(function(Sn){return delete se[Sn]}),delete se.onClick;var _n=Gt?Object(B.a)(Object(B.a)({},gi),hn):Object(B.a)(Object(B.a)({},ar),hn);delete se.direction;var gn=this.getBaseProps(),wn=ye?null:this.getMotion(gn.mode,gn.visible);return C.createElement("li",Object(h.a)({},se,Ye,{className:ke,role:"menuitem"}),C.createElement(Hr,{prefixCls:Ee,popupClassName:U()("".concat(Ee,"-popup"),an),getPopupContainer:dn,builtinPlacements:_n,popupPlacement:rn,popupVisible:ye?!1:ue,popupAlign:kn,popup:ye?null:Vt,action:kt||ye?[]:[It],mouseEnterDelay:sn,mouseLeaveDelay:Ct,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:cn,popupMotion:wn},Xt),ye?Vt:null)}}]),be}(C.Component);qr.defaultProps={onMouseEnter:it,onMouseLeave:it,onTitleMouseEnter:it,onTitleMouseLeave:it,onTitleClick:it,manualRef:it,mode:"vertical",title:""};var $r=Object(o.b)(function(re,ge){var be=re.openKeys,ae=re.activeKey,V=re.selectedKeys,ee=ge.eventKey,X=ge.subMenuKey;return{isOpen:be.indexOf(ee)>-1,active:ae[X]===ee,selectedKeys:V}})(qr);$r.isSubMenu=!0;var ai=$r,Pi="menuitem-overflowed",ga=.5,Er=function(re){Object(m.a)(be,re);var ge=Object(c.a)(be);function be(){var ae;return Object(D.a)(this,be),ae=ge.apply(this,arguments),ae.resizeObserver=null,ae.mutationObserver=null,ae.originalTotalWidth=0,ae.overflowedItems=[],ae.menuItemSizes=[],ae.cancelFrameId=null,ae.state={lastVisibleIndex:void 0},ae.childRef=C.createRef(),ae.getMenuItemNodes=function(){var V=ae.props.prefixCls,ee=ae.childRef.current;return ee?[].slice.call(ee.children).filter(function(X){return X.className.split(" ").indexOf("".concat(V,"-overflowed-submenu"))<0}):[]},ae.getOverflowedSubMenuItem=function(V,ee,X){var se=ae.props,ue=se.overflowedIndicator,Ee=se.level,ye=se.mode,Te=se.prefixCls,ke=se.theme;if(Ee!==1||ye!=="horizontal")return null;var Ye=ae.props.children[0],Xe=Ye.props,ct=Xe.children,_t=Xe.title,Yt=Xe.style,Gt=Object(O.a)(Xe,["children","title","style"]),zt=Object(B.a)({},Yt),Jt="".concat(V,"-overflowed-indicator"),Xt="".concat(V,"-overflowed-indicator");ee.length===0&&X!==!0?zt=Object(B.a)(Object(B.a)({},zt),{},{display:"none"}):X&&(zt=Object(B.a)(Object(B.a)({},zt),{},{visibility:"hidden",position:"absolute"}),Jt="".concat(Jt,"-placeholder"),Xt="".concat(Xt,"-placeholder"));var Vt=ke?"".concat(Te,"-").concat(ke):"",dn={};return ut.forEach(function(rn){Gt[rn]!==void 0&&(dn[rn]=Gt[rn])}),C.createElement(ai,Object(h.a)({title:ue,className:"".concat(Te,"-overflowed-submenu"),popupClassName:Vt},dn,{key:Jt,eventKey:Xt,disabled:!1,style:zt}),ee)},ae.setChildrenWidthAndResize=function(){if(ae.props.mode!=="horizontal")return;var V=ae.childRef.current;if(!V)return;var ee=V.children;if(!ee||ee.length===0)return;var X=V.children[ee.length-1];ze(X,"display","inline-block");var se=ae.getMenuItemNodes(),ue=se.filter(function(Ee){return Ee.className.split(" ").indexOf(Pi)>=0});ue.forEach(function(Ee){ze(Ee,"display","inline-block")}),ae.menuItemSizes=se.map(function(Ee){return dt(Ee,!0)}),ue.forEach(function(Ee){ze(Ee,"display","none")}),ae.overflowedIndicatorWidth=dt(V.children[V.children.length-1],!0),ae.originalTotalWidth=ae.menuItemSizes.reduce(function(Ee,ye){return Ee+ye},0),ae.handleResize(),ze(X,"display","none")},ae.handleResize=function(){if(ae.props.mode!=="horizontal")return;var V=ae.childRef.current;if(!V)return;var ee=dt(V);ae.overflowedItems=[];var X=0,se;ae.originalTotalWidth>ee+ga&&(se=-1,ae.menuItemSizes.forEach(function(ue){X+=ue,X+ae.overflowedIndicatorWidth<=ee&&(se+=1)})),ae.setState({lastVisibleIndex:se})},ae}return Object(v.a)(be,[{key:"componentDidMount",value:function(){var V=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var ee=this.childRef.current;if(!ee)return;this.resizeObserver=new yt.default(function(X){X.forEach(function(){var se=V.cancelFrameId;cancelAnimationFrame(se),V.cancelFrameId=requestAnimationFrame(V.setChildrenWidthAndResize)})}),[].slice.call(ee.children).concat(ee).forEach(function(X){V.resizeObserver.observe(X)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){V.resizeObserver.disconnect(),[].slice.call(ee.children).concat(ee).forEach(function(X){V.resizeObserver.observe(X)}),V.setChildrenWidthAndResize()}),this.mutationObserver.observe(ee,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(V){var ee=this,X=this.state.lastVisibleIndex;return(V||[]).reduce(function(se,ue,Ee){var ye=ue;if(ee.props.mode==="horizontal"){var Te=ee.getOverflowedSubMenuItem(ue.props.eventKey,[]);X!==void 0&&ee.props.className.indexOf("".concat(ee.props.prefixCls,"-root"))!==-1&&(Ee>X&&(ye=C.cloneElement(ue,{style:{display:"none"},eventKey:"".concat(ue.props.eventKey,"-hidden"),className:"".concat(Pi)})),Ee===X+1&&(ee.overflowedItems=V.slice(X+1).map(function(Ye){return C.cloneElement(Ye,{key:Ye.props.eventKey,mode:"vertical-left"})}),Te=ee.getOverflowedSubMenuItem(ue.props.eventKey,ee.overflowedItems)));var ke=[].concat(Object(M.a)(se),[Te,ye]);return Ee===V.length-1&&ke.push(ee.getOverflowedSubMenuItem(ue.props.eventKey,[],!0)),ke}return[].concat(Object(M.a)(se),[ye])},[])}},{key:"render",value:function(){var V=this.props,ee=V.visible,X=V.prefixCls,se=V.overflowedIndicator,ue=V.mode,Ee=V.level,ye=V.tag,Te=V.children,ke=V.theme,Ye=Object(O.a)(V,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Xe=ye;return C.createElement(Xe,Object(h.a)({ref:this.childRef},Ye),this.renderChildren(Te))}}]),be}(C.Component);Er.defaultProps={tag:"div",className:""};var va=Er;function Gi(re){return re.length?re.every(function(ge){return!!ge.props.disabled}):!0}function yi(re,ge,be){var ae=re.getState();re.setState({activeKey:Object(B.a)(Object(B.a)({},ae.activeKey),{},Object($.a)({},ge,be))})}function Mr(re){return re.eventKey||"0-menu-"}function Lr(re,ge){var be=ge,ae=re.children,V=re.eventKey;if(be){var ee;if(Ne(ae,function(X,se){X&&X.props&&!X.props.disabled&&be===gt(X,V,se)&&(ee=!0)}),ee)return be}return be=null,re.defaultActiveFirst&&Ne(ae,function(X,se){!be&&X&&!X.props.disabled&&(be=gt(X,V,se))}),be}function aa(re){if(!re)return;var ge=this.instanceArray.indexOf(re);ge!==-1?this.instanceArray[ge]=re:this.instanceArray.push(re)}var Ur=function(re){Object(m.a)(be,re);var ge=Object(c.a)(be);function be(ae){var V;return Object(D.a)(this,be),V=ge.call(this,ae),V.onKeyDown=function(ee,X){var se=ee.keyCode,ue;if(V.getFlatInstanceArray().forEach(function(ye){ye&&ye.props.active&&ye.onKeyDown&&(ue=ye.onKeyDown(ee))}),ue)return 1;var Ee=null;return(se===g.a.UP||se===g.a.DOWN)&&(Ee=V.step(se===g.a.UP?-1:1)),Ee?(ee.preventDefault(),yi(V.props.store,Mr(V.props),Ee.props.eventKey),typeof X=="function"&&X(Ee),1):void 0},V.onItemHover=function(ee){var X=ee.key,se=ee.hover;yi(V.props.store,Mr(V.props),se?X:null)},V.onDeselect=function(ee){V.props.onDeselect(ee)},V.onSelect=function(ee){V.props.onSelect(ee)},V.onClick=function(ee){V.props.onClick(ee)},V.onOpenChange=function(ee){V.props.onOpenChange(ee)},V.onDestroy=function(ee){V.props.onDestroy(ee)},V.getFlatInstanceArray=function(){return V.instanceArray},V.step=function(ee){var X=V.getFlatInstanceArray(),se=V.props.store.getState().activeKey[Mr(V.props)],ue=X.length;if(!ue)return null;ee<0&&(X=X.concat().reverse());var Ee=-1;if(X.every(function(Ye,Xe){return Ye&&Ye.props.eventKey===se?(Ee=Xe,!1):!0}),!V.props.defaultActiveFirst&&Ee!==-1&&Gi(X.slice(Ee,ue-1)))return;var ye=(Ee+1)%ue,Te=ye;do{var ke=X[Te];if(!ke||ke.props.disabled)Te=(Te+1)%ue;else return ke}while(Te!==ye);return null},V.renderCommonMenuItem=function(ee,X,se){var ue=V.props.store.getState(),Ee=Object(f.a)(V),ye=Ee.props,Te=gt(ee,ye.eventKey,X),ke=ee.props;if(!ke||typeof ee.type=="string")return ee;var Ye=Te===ue.activeKey,Xe=Object(B.a)(Object(B.a)({mode:ke.mode||ye.mode,level:ye.level,inlineIndent:ye.inlineIndent,renderMenuItem:V.renderMenuItem,rootPrefixCls:ye.prefixCls,index:X,parentMenu:ye.parentMenu,manualRef:ke.disabled?void 0:Object(y.a)(ee.ref,aa.bind(Object(f.a)(V))),eventKey:Te,active:!ke.disabled&&Ye,multiple:ye.multiple,onClick:function(_t){(ke.onClick||it)(_t),V.onClick(_t)},onItemHover:V.onItemHover,motion:ye.motion,subMenuOpenDelay:ye.subMenuOpenDelay,subMenuCloseDelay:ye.subMenuCloseDelay,forceSubMenuRender:ye.forceSubMenuRender,onOpenChange:V.onOpenChange,onDeselect:V.onDeselect,onSelect:V.onSelect,builtinPlacements:ye.builtinPlacements,itemIcon:ke.itemIcon||V.props.itemIcon,expandIcon:ke.expandIcon||V.props.expandIcon},se),{},{direction:ye.direction});return(ye.mode==="inline"||Ge())&&(Xe.triggerSubMenuAction="click"),C.cloneElement(ee,Object(B.a)(Object(B.a)({},Xe),{},{key:Te||X}))},V.renderMenuItem=function(ee,X,se){if(!ee)return null;var ue=V.props.store.getState(),Ee={openKeys:ue.openKeys,selectedKeys:ue.selectedKeys,triggerSubMenuAction:V.props.triggerSubMenuAction,subMenuKey:se};return V.renderCommonMenuItem(ee,X,Ee)},ae.store.setState({activeKey:Object(B.a)(Object(B.a)({},ae.store.getState().activeKey),{},Object($.a)({},ae.eventKey,Lr(ae,ae.activeKey)))}),V.instanceArray=[],V}return Object(v.a)(be,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(V){return this.props.visible||V.visible||this.props.className!==V.className||!P()(this.props.style,V.style)}},{key:"componentDidUpdate",value:function(V){var ee=this.props,X="activeKey"in ee?ee.activeKey:ee.store.getState().activeKey[Mr(ee)],se=Lr(ee,X);if(se!==X)yi(ee.store,Mr(ee),se);else if("activeKey"in V){var ue=Lr(V,V.activeKey);se!==ue&&yi(ee.store,Mr(ee),se)}}},{key:"render",value:function(){var V=this,ee=Object(h.a)({},this.props);this.instanceArray=[];var X=U()(ee.prefixCls,ee.className,"".concat(ee.prefixCls,"-").concat(ee.mode)),se={className:X,role:ee.role||"menu"};ee.id&&(se.id=ee.id),ee.focusable&&(se.tabIndex=0,se.onKeyDown=this.onKeyDown);var ue=ee.prefixCls,Ee=ee.eventKey,ye=ee.visible,Te=ee.level,ke=ee.mode,Ye=ee.overflowedIndicator,Xe=ee.theme;return ut.forEach(function(ct){return delete ee[ct]}),delete ee.onClick,C.createElement(va,Object(h.a)({},ee,{prefixCls:ue,mode:ke,tag:"ul",level:Te,theme:Xe,visible:ye,overflowedIndicator:Ye},se),Object(_.a)(ee.children).map(function(ct,_t){return V.renderMenuItem(ct,_t,Ee||"0-menu-")}))}}]),be}(C.Component);Ur.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:it};var oa=Object(o.b)()(Ur),sa=oa,ki=G("Kwbf");function Ba(re,ge,be){var ae=re.prefixCls,V=re.motion,ee=re.defaultMotions,X=ee===void 0?{}:ee,se=re.openAnimation,ue=re.openTransitionName,Ee=ge.switchingModeFromInline;if(V)return V;if(Object(F.a)(se)==="object"&&se)Object(ki.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof se=="string")return{motionName:"".concat(ae,"-open-").concat(se)};if(ue)return{motionName:ue};var ye=X[be];return ye||(Ee?null:X.other)}var wt=function(re){Object(m.a)(be,re);var ge=Object(c.a)(be);function be(ae){var V;Object(D.a)(this,be),V=ge.call(this,ae),V.onSelect=function(se){var ue=Object(f.a)(V),Ee=ue.props;if(Ee.selectable){var ye=V.store.getState(),Te=ye.selectedKeys,ke=se.key;Ee.multiple?Te=Te.concat([ke]):Te=[ke],"selectedKeys"in Ee||V.store.setState({selectedKeys:Te}),Ee.onSelect(Object(B.a)(Object(B.a)({},se),{},{selectedKeys:Te}))}},V.onClick=function(se){var ue=V.getRealMenuMode(),Ee=Object(f.a)(V),ye=Ee.store,Te=Ee.props.onOpenChange;ue!=="inline"&&!("openKeys"in V.props)&&(ye.setState({openKeys:[]}),Te([])),V.props.onClick(se)},V.onKeyDown=function(se,ue){V.innerMenu.getWrappedInstance().onKeyDown(se,ue)},V.onOpenChange=function(se){var ue=Object(f.a)(V),Ee=ue.props,ye=V.store.getState().openKeys.concat(),Te=!1,ke=function(Xe){var ct=!1;if(Xe.open)ct=ye.indexOf(Xe.key)===-1,ct&&ye.push(Xe.key);else{var _t=ye.indexOf(Xe.key);ct=_t!==-1,ct&&ye.splice(_t,1)}Te=Te||ct};Array.isArray(se)?se.forEach(ke):ke(se),Te&&("openKeys"in V.props||V.store.setState({openKeys:ye}),Ee.onOpenChange(ye))},V.onDeselect=function(se){var ue=Object(f.a)(V),Ee=ue.props;if(Ee.selectable){var ye=V.store.getState().selectedKeys.concat(),Te=se.key,ke=ye.indexOf(Te);ke!==-1&&ye.splice(ke,1),"selectedKeys"in Ee||V.store.setState({selectedKeys:ye}),Ee.onDeselect(Object(B.a)(Object(B.a)({},se),{},{selectedKeys:ye}))}},V.onMouseEnter=function(se){V.restoreModeVerticalFromInline();var ue=V.props.onMouseEnter;ue&&ue(se)},V.onTransitionEnd=function(se){var ue=se.propertyName==="width"&&se.target===se.currentTarget,Ee=se.target.className,ye=Object.prototype.toString.call(Ee)==="[object SVGAnimatedString]"?Ee.animVal:Ee,Te=se.propertyName==="font-size"&&ye.indexOf("anticon")>=0;(ue||Te)&&V.restoreModeVerticalFromInline()},V.setInnerMenu=function(se){V.innerMenu=se},V.isRootMenu=!0;var ee=ae.defaultSelectedKeys,X=ae.defaultOpenKeys;return"selectedKeys"in ae&&(ee=ae.selectedKeys||[]),"openKeys"in ae&&(X=ae.openKeys||[]),V.store=Object(o.c)({selectedKeys:ee,openKeys:X,activeKey:{"0-menu-":Lr(ae,ae.activeKey)}}),V.state={switchingModeFromInline:!1,prevProps:ae,inlineOpenKeys:[],store:V.store},V}return Object(v.a)(be,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(V){var ee=this.props,X=ee.siderCollapsed,se=ee.inlineCollapsed,ue=ee.onOpenChange;(!V.inlineCollapsed&&se||!V.siderCollapsed&&X)&&ue([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var V=this.props.collapsedWidth,ee=this.store,X=this.prevOpenKeys,se=this.getInlineCollapsed()&&(V===0||V==="0"||V==="0px");se?(this.prevOpenKeys=ee.getState().openKeys.concat(),this.store.setState({openKeys:[]})):X&&(this.store.setState({openKeys:X}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var V=this.props.mode,ee=this.state.switchingModeFromInline,X=this.getInlineCollapsed();return ee&&X?"inline":X?"vertical":V}},{key:"getInlineCollapsed",value:function(){var V=this.props,ee=V.inlineCollapsed,X=V.siderCollapsed;return X!==void 0?X:ee}},{key:"restoreModeVerticalFromInline",value:function(){var V=this.state.switchingModeFromInline;V&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var V=Object(B.a)({},Object(x.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),ee=this.getRealMenuMode();return V.className+=" ".concat(V.prefixCls,"-root"),V.direction==="rtl"&&(V.className+=" ".concat(V.prefixCls,"-rtl")),V=Object(B.a)(Object(B.a)({},V),{},{mode:ee,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ba(this.props,this.state,ee)}),delete V.openAnimation,delete V.openTransitionName,C.createElement(o.a,{store:this.store},C.createElement(sa,Object(h.a)({},V,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(V,ee){var X=ee.prevProps,se=ee.store,ue=se.getState(),Ee={},ye={prevProps:V};return X.mode==="inline"&&V.mode!=="inline"&&(ye.switchingModeFromInline=!0),"openKeys"in V?Ee.openKeys=V.openKeys||[]:((V.inlineCollapsed&&!X.inlineCollapsed||V.siderCollapsed&&!X.siderCollapsed)&&(ye.switchingModeFromInline=!0,ye.inlineOpenKeys=ue.openKeys,Ee.openKeys=[]),(!V.inlineCollapsed&&X.inlineCollapsed||!V.siderCollapsed&&X.siderCollapsed)&&(Ee.openKeys=ee.inlineOpenKeys,ye.inlineOpenKeys=[])),Object.keys(Ee).length&&se.setState(Ee),ye}}]),be}(C.Component);wt.defaultProps={selectable:!0,onClick:it,onSelect:it,onOpenChange:it,onDeselect:it,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:C.createElement("span",null,"\xB7\xB7\xB7")};var jt=wt,Mt=function(re){Object(m.a)(be,re);var ge=Object(c.a)(be);function be(){var ae;return Object(D.a)(this,be),ae=ge.apply(this,arguments),ae.onKeyDown=function(V){var ee=V.keyCode;return ee===g.a.ENTER?(ae.onClick(V),!0):void 0},ae.onMouseLeave=function(V){var ee=ae.props,X=ee.eventKey,se=ee.onItemHover,ue=ee.onMouseLeave;se({key:X,hover:!1}),ue({key:X,domEvent:V})},ae.onMouseEnter=function(V){var ee=ae.props,X=ee.eventKey,se=ee.onItemHover,ue=ee.onMouseEnter;se({key:X,hover:!0}),ue({key:X,domEvent:V})},ae.onClick=function(V){var ee=ae.props,X=ee.eventKey,se=ee.multiple,ue=ee.onClick,Ee=ee.onSelect,ye=ee.onDeselect,Te=ee.isSelected,ke={key:X,keyPath:[X],item:Object(f.a)(ae),domEvent:V};ue(ke),se?Te?ye(ke):Ee(ke):Te||Ee(ke)},ae.saveNode=function(V){ae.node=V},ae}return Object(v.a)(be,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var V=this.props;V.onDestroy&&V.onDestroy(V.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var V,ee=Object(B.a)({},this.props),X=U()(this.getPrefixCls(),ee.className,(V={},Object($.a)(V,this.getActiveClassName(),!ee.disabled&&ee.active),Object($.a)(V,this.getSelectedClassName(),ee.isSelected),Object($.a)(V,this.getDisabledClassName(),ee.disabled),V)),se=Object(B.a)(Object(B.a)({},ee.attribute),{},{title:typeof ee.title=="string"?ee.title:void 0,className:X,role:ee.role||"menuitem","aria-disabled":ee.disabled});ee.role==="option"?se=Object(B.a)(Object(B.a)({},se),{},{role:"option","aria-selected":ee.isSelected}):(ee.role===null||ee.role==="none")&&(se.role="none");var ue={onClick:ee.disabled?null:this.onClick,onMouseLeave:ee.disabled?null:this.onMouseLeave,onMouseEnter:ee.disabled?null:this.onMouseEnter},Ee=Object(B.a)({},ee.style);ee.mode==="inline"&&(ee.direction==="rtl"?Ee.paddingRight=ee.inlineIndent*ee.level:Ee.paddingLeft=ee.inlineIndent*ee.level),ut.forEach(function(Te){return delete ee[Te]}),delete ee.direction;var ye=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(ye=C.createElement(this.props.itemIcon,this.props)),C.createElement("li",Object(h.a)({},Object(x.a)(ee,["onClick","onMouseEnter","onMouseLeave","onSelect"]),se,ue,{style:Ee,ref:this.saveNode}),ee.children,ye)}}]),be}(C.Component);Mt.isMenuItem=!0,Mt.defaultProps={onSelect:it,onMouseEnter:it,onMouseLeave:it,manualRef:it};var qt=Object(o.b)(function(re,ge){var be=re.activeKey,ae=re.selectedKeys,V=ge.eventKey,ee=ge.subMenuKey;return{active:be[ee]===V,isSelected:Array.isArray(ae)?ae.indexOf(V)!==-1:ae===V}})(Mt),fn=qt,xn=function(re){Object(m.a)(be,re);var ge=Object(c.a)(be);function be(){var ae;return Object(D.a)(this,be),ae=ge.apply(this,arguments),ae.renderInnerMenuItem=function(V){var ee=ae.props,X=ee.renderMenuItem,se=ee.index;return X(V,se,ae.props.subMenuKey)},ae}return Object(v.a)(be,[{key:"render",value:function(){var V=Object(h.a)({},this.props),ee=V.className,X=ee===void 0?"":ee,se=V.rootPrefixCls,ue="".concat(se,"-item-group-title"),Ee="".concat(se,"-item-group-list"),ye=V.title,Te=V.children;return ut.forEach(function(ke){return delete V[ke]}),delete V.direction,C.createElement("li",Object(h.a)({},V,{onClick:function(Ye){return Ye.stopPropagation()},className:"".concat(X," ").concat(se,"-item-group")}),C.createElement("div",{className:ue,title:typeof ye=="string"?ye:void 0},ye),C.createElement("ul",{className:Ee},C.Children.map(Te,this.renderInnerMenuItem)))}}]),be}(C.Component);xn.isMenuItemGroup=!0,xn.defaultProps={disabled:!0};var un=xn,Kn=function(ge){var be=ge.className,ae=ge.rootPrefixCls,V=ge.style;return C.createElement("li",{className:"".concat(be," ").concat(ae,"-item-divider"),style:V})};Kn.defaultProps={disabled:!0,className:"",style:{}};var xr=Kn,nn=jt,oi=G("eDIo");function yn(re,ge){var be=re.prefixCls,ae=re.editable,V=re.locale,ee=re.style;return!ae||ae.showAdd===!1?null:C.createElement("button",{ref:ge,type:"button",className:"".concat(be,"-nav-add"),style:ee,"aria-label":(V==null?void 0:V.addAriaLabel)||"Add tab",onClick:function(se){ae.onEdit("add",{event:se})}},ae.addIcon||"+")}var ur=C.forwardRef(yn);function or(re,ge){var be=re.prefixCls,ae=re.id,V=re.tabs,ee=re.locale,X=re.mobile,se=re.moreIcon,ue=se===void 0?"More":se,Ee=re.moreTransitionName,ye=re.style,Te=re.className,ke=re.editable,Ye=re.tabBarGutter,Xe=re.rtl,ct=re.onTabClick,_t=Object(C.useState)(!1),Yt=Object(K.a)(_t,2),Gt=Yt[0],zt=Yt[1],Jt=Object(C.useState)(null),Xt=Object(K.a)(Jt,2),Vt=Xt[0],dn=Xt[1],rn="".concat(ae,"-more-popup"),kn="".concat(be,"-dropdown"),an=Vt!==null?"".concat(rn,"-").concat(Vt):null,kt=ee==null?void 0:ee.dropdownAriaLabel,It=C.createElement(nn,{onClick:function(wn){var Sn=wn.key,Gn=wn.domEvent;ct(Sn,Gn),zt(!1)},id:rn,tabIndex:-1,role:"listbox","aria-activedescendant":an,selectedKeys:[Vt],"aria-label":kt!==void 0?kt:"expanded dropdown"},V.map(function(gn){return C.createElement(fn,{key:gn.key,id:"".concat(rn,"-").concat(gn.key),role:"option","aria-controls":ae&&"".concat(ae,"-panel-").concat(gn.key),disabled:gn.disabled},gn.tab)}));function sn(gn){for(var wn=V.filter(function(gr){return!gr.disabled}),Sn=wn.findIndex(function(gr){return gr.key===Vt})||0,Gn=wn.length,qn=0;qn<Gn;qn+=1){Sn=(Sn+gn+Gn)%Gn;var Bn=wn[Sn];if(!Bn.disabled){dn(Bn.key);return}}}function cn(gn){var wn=gn.which;if(!Gt){[g.a.DOWN,g.a.SPACE,g.a.ENTER].includes(wn)&&(zt(!0),gn.preventDefault());return}switch(wn){case g.a.UP:sn(-1),gn.preventDefault();break;case g.a.DOWN:sn(1),gn.preventDefault();break;case g.a.ESC:zt(!1);break;case g.a.SPACE:case g.a.ENTER:Vt!==null&&ct(Vt,gn);break}}Object(C.useEffect)(function(){var gn=document.getElementById(an);gn&&gn.scrollIntoView&&gn.scrollIntoView(!1)},[Vt]),Object(C.useEffect)(function(){Gt||dn(null)},[Gt]);var Ct=Object($.a)({},Xe?"marginLeft":"marginRight",Ye);V.length||(Ct.visibility="hidden",Ct.order=1);var hn=U()(Object($.a)({},"".concat(kn,"-rtl"),Xe)),_n=X?null:C.createElement(oi.a,{prefixCls:kn,overlay:It,trigger:["hover"],visible:Gt,transitionName:Ee,onVisibleChange:zt,overlayClassName:hn,mouseEnterDelay:.1,mouseLeaveDelay:.1},C.createElement("button",{type:"button",className:"".concat(be,"-nav-more"),style:Ct,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":rn,id:"".concat(ae,"-more"),"aria-expanded":Gt,onKeyDown:cn},ue));return C.createElement("div",{className:U()("".concat(be,"-nav-operations"),Te),style:ye,ref:ge},_n,C.createElement(ur,{prefixCls:be,locale:ee,editable:ke}))}var Br=C.forwardRef(or),Fa=Object(C.createContext)(null),Ho=.1,zi=.01,Hn=20,go=Math.pow(.995,Hn);function vo(){var re=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(re)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(re.substr(0,4)))}function la(re,ge){var be=Object(C.useState)(),ae=Object(K.a)(be,2),V=ae[0],ee=ae[1],X=Object(C.useState)(0),se=Object(K.a)(X,2),ue=se[0],Ee=se[1],ye=Object(C.useState)(0),Te=Object(K.a)(ye,2),ke=Te[0],Ye=Te[1],Xe=Object(C.useState)(),ct=Object(K.a)(Xe,2),_t=ct[0],Yt=ct[1],Gt=Object(C.useRef)();function zt(kt){var It=kt.touches[0],sn=It.screenX,cn=It.screenY;ee({x:sn,y:cn}),window.clearInterval(Gt.current)}function Jt(kt){if(!V)return;kt.preventDefault();var It=kt.touches[0],sn=It.screenX,cn=It.screenY;ee({x:sn,y:cn});var Ct=sn-V.x,hn=cn-V.y;ge(Ct,hn);var _n=Date.now();Ee(_n),Ye(_n-ue),Yt({x:Ct,y:hn})}function Xt(){if(!V)return;if(ee(null),Yt(null),_t){var kt=_t.x/ke,It=_t.y/ke,sn=Math.abs(kt),cn=Math.abs(It);if(Math.max(sn,cn)<Ho)return;var Ct=kt,hn=It;Gt.current=window.setInterval(function(){if(Math.abs(Ct)<zi&&Math.abs(hn)<zi){window.clearInterval(Gt.current);return}Ct*=go,hn*=go,ge(Ct*Hn,hn*Hn)},Hn)}}var Vt=Object(C.useRef)(0),dn=Object(C.useRef)(!1),rn=Object(C.useRef)();function kn(kt){var It=kt.deltaX,sn=kt.deltaY,cn=0,Ct=Math.abs(It),hn=Math.abs(sn);Ct===hn?cn=rn.current==="x"?It:sn:Ct>hn?(cn=It,rn.current="x"):(cn=sn,rn.current="y");var _n=Date.now();_n-Vt.current>100&&(dn.current=!1),(ge(-cn,-cn)||dn.current)&&(kt.preventDefault(),dn.current=!0),Vt.current=_n}var an=Object(C.useRef)(null);an.current={onTouchStart:zt,onTouchMove:Jt,onTouchEnd:Xt,onWheel:kn},C.useEffect(function(){function kt(Ct){an.current.onTouchStart(Ct)}function It(Ct){an.current.onTouchMove(Ct)}function sn(Ct){an.current.onTouchEnd(Ct)}function cn(Ct){an.current.onWheel(Ct)}return document.addEventListener("touchmove",It,{passive:!1}),document.addEventListener("touchend",sn,{passive:!1}),re.current.addEventListener("touchstart",kt,{passive:!1}),re.current.addEventListener("wheel",cn),function(){document.removeEventListener("touchmove",It),document.removeEventListener("touchend",sn)}},[])}function Go(){var re=Object(C.useRef)(new Map);function ge(ae){return re.current.has(ae)||re.current.set(ae,C.createRef()),re.current.get(ae)}function be(ae){re.current.delete(ae)}return[ge,be]}function ja(re,ge){var be=C.useRef(re),ae=C.useState({}),V=Object(K.a)(ae,2),ee=V[1];function X(se){var ue=typeof se=="function"?se(be.current):se;ue!==be.current&&ge(ue,be.current),be.current=ue,ee({})}return[be.current,X]}var yo=function(ge){var be=ge.position,ae=ge.prefixCls,V=ge.extra;if(!V)return null;var ee,X=V;return be==="right"&&(ee=X.right||!X.left&&X||null),be==="left"&&(ee=X.left||null),ee?C.createElement("div",{className:"".concat(ae,"-extra-content")},ee):null};function Wa(re,ge){var be,ae=C.useContext(Fa),V=ae.prefixCls,ee=ae.tabs,X=re.className,se=re.style,ue=re.id,Ee=re.animated,ye=re.activeKey,Te=re.rtl,ke=re.extra,Ye=re.editable,Xe=re.locale,ct=re.tabPosition,_t=re.tabBarGutter,Yt=re.children,Gt=re.onTabClick,zt=re.onTabScroll,Jt=Object(C.useRef)(),Xt=Object(C.useRef)(),Vt=Object(C.useRef)(),dn=Object(C.useRef)(),rn=Go(),kn=Object(K.a)(rn,2),an=kn[0],kt=kn[1],It=ct==="top"||ct==="bottom",sn=ja(0,function(En,ln){It&&zt&&zt({direction:En>ln?"left":"right"})}),cn=Object(K.a)(sn,2),Ct=cn[0],hn=cn[1],_n=ja(0,function(En,ln){!It&&zt&&zt({direction:En>ln?"top":"bottom"})}),gn=Object(K.a)(_n,2),wn=gn[0],Sn=gn[1],Gn=Object(C.useState)(0),qn=Object(K.a)(Gn,2),Bn=qn[0],gr=qn[1],Gr=Object(C.useState)(0),Ar=Object(K.a)(Gr,2),$n=Ar[0],In=Ar[1],Dn=Object(C.useState)(0),Fn=Object(K.a)(Dn,2),Nn=Fn[0],zr=Fn[1],bi=Object(C.useState)(0),Ei=Object(K.a)(bi,2),Cn=Ei[0],ei=Ei[1],xi=Object(C.useState)(null),Rn=Object(K.a)(xi,2),An=Rn[0],er=Rn[1],xo=Object(C.useState)(null),za=Object(K.a)(xo,2),Ai=za[0],Qi=za[1],ya=Object(C.useState)(0),Va=Object(K.a)(ya,2),ba=Va[0],Qo=Va[1],Xo=Object(C.useState)(0),Ao=Object(K.a)(Xo,2),Qa=Ao[0],Xa=Ao[1],Xi=A(new Map),Yi=Object(K.a)(Xi,2),Yo=Yi[0],Ea=Yi[1],ua=s(ee,Yo,Bn),Ji="".concat(V,"-nav-operations-hidden"),Zi=0,Vr=0;It?Te?(Zi=0,Vr=Math.max(0,Bn-An)):(Zi=Math.min(0,An-Bn),Vr=0):(Zi=Math.min(0,Ai-$n),Vr=0);function _i(En){return En<Zi?[Zi,!1]:En>Vr?[Vr,!1]:[En,!0]}var Ti=Object(C.useRef)(),da=Object(C.useState)(),Ni=Object(K.a)(da,2),xa=Ni[0],Ya=Ni[1];function Aa(){Ya(Date.now())}function Ja(){window.clearTimeout(Ti.current)}la(Jt,function(En,ln){var tr=!1;function Sr(qi,li){qi(function(ha){var Ci=_i(ha+li),nr=Object(K.a)(Ci,2),Ca=nr[0],qa=nr[1];return tr=qa,Ca})}if(It){if(An>=Bn)return tr;Sr(hn,En)}else{if(Ai>=$n)return tr;Sr(Sn,ln)}return Ja(),Aa(),tr}),Object(C.useEffect)(function(){return Ja(),xa&&(Ti.current=window.setTimeout(function(){Ya(0)},100)),Ja},[xa]);function Si(){var En=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ye,ln=ua.get(En);if(!ln)return;if(It){var tr=Ct;Te?ln.right<Ct?tr=ln.right:ln.right+ln.width>Ct+An&&(tr=ln.right+ln.width-An):ln.left<-Ct?tr=-ln.left:ln.left+ln.width>-Ct+An&&(tr=-(ln.left+ln.width-An)),Sn(0),hn(_i(tr)[0])}else{var Sr=wn;ln.top<-wn?Sr=-ln.top:ln.top+ln.height>-wn+Ai&&(Sr=-(ln.top+ln.height-Ai)),hn(0),Sn(_i(Sr)[0])}}var Ui=d(ua,{width:An,height:Ai,left:Ct,top:wn},{width:Nn,height:Cn},{width:ba,height:Qa},Object(B.a)(Object(B.a)({},re),{},{tabs:ee})),To=Object(K.a)(Ui,2),Jo=To[0],Zo=To[1],qo=ee.map(function(En){var ln=En.key;return C.createElement(a,{id:ue,prefixCls:V,key:ln,rtl:Te,tab:En,closable:En.closable,editable:Ye,active:ln===ye,tabPosition:ct,tabBarGutter:_t,renderWrapper:Yt,removeAriaLabel:Xe==null?void 0:Xe.removeAriaLabel,ref:an(ln),onClick:function(Sr){Gt(ln,Sr)},onRemove:function(){kt(ln)},onFocus:function(){Si(ln),Aa(),Te||(Jt.current.scrollLeft=0),Jt.current.scrollTop=0}})}),Za=w(function(){var En,ln,tr,Sr,qi,li,ha,Ci,nr,Ca=((En=Jt.current)===null||En===void 0?void 0:En.offsetWidth)||0,qa=((ln=Jt.current)===null||ln===void 0?void 0:ln.offsetHeight)||0,$a=((tr=dn.current)===null||tr===void 0?void 0:tr.offsetWidth)||0,Cr=((Sr=dn.current)===null||Sr===void 0?void 0:Sr.offsetHeight)||0,bn=((qi=Vt.current)===null||qi===void 0?void 0:qi.offsetWidth)||0,Xr=((li=Vt.current)===null||li===void 0?void 0:li.offsetHeight)||0;er(Ca),Qi(qa),Qo($a),Xa(Cr);var ui=(((ha=Xt.current)===null||ha===void 0?void 0:ha.offsetWidth)||0)-$a,di=(((Ci=Xt.current)===null||Ci===void 0?void 0:Ci.offsetHeight)||0)-Cr;gr(ui),In(di);var eo=(nr=Vt.current)===null||nr===void 0?void 0:nr.className.includes(Ji);zr(ui-(eo?0:bn)),ei(di-(eo?0:Xr)),Ea(function(){var wa=new Map;return ee.forEach(function(Oo){var Ro=Oo.key,Fi=an(Ro).current;Fi&&wa.set(Ro,{width:Fi.offsetWidth,height:Fi.offsetHeight,left:Fi.offsetLeft,top:Fi.offsetTop})}),wa})}),$o=ee.slice(0,Jo),Tr=ee.slice(Zo+1),Vn=[].concat(Object(M.a)($o),Object(M.a)(Tr)),dr=Object(C.useState)(),Qn=Object(K.a)(dr,2),ca=Qn[0],es=Qn[1],Qr=ua.get(ye),So=Object(C.useRef)();function Co(){E.a.cancel(So.current)}Object(C.useEffect)(function(){var En={};return Qr&&(It?(Te?En.right=Qr.right:En.left=Qr.left,En.width=Qr.width):(En.top=Qr.top,En.height=Qr.height)),Co(),So.current=E()(function(){es(En)}),Co},[Qr,It,Te]),Object(C.useEffect)(function(){Si()},[ye,Qr,ua,It]),Object(C.useEffect)(function(){Za()},[Te,_t,ye,ee.map(function(En){return En.key}).join("_")]);var wo=!!Vn.length,Bi="".concat(V,"-nav-wrap"),Ta,fa,Do,Sa;return It?Te?(fa=Ct>0,Ta=Ct+An<Bn):(Ta=Ct<0,fa=-Ct+An<Bn):(Do=wn<0,Sa=-wn+Ai<$n),C.createElement("div",{ref:ge,role:"tablist",className:U()("".concat(V,"-nav"),X),style:se,onKeyDown:function(){Aa()}},C.createElement(yo,{position:"left",extra:ke,prefixCls:V}),C.createElement(R.a,{onResize:Za},C.createElement("div",{className:U()(Bi,(be={},Object($.a)(be,"".concat(Bi,"-ping-left"),Ta),Object($.a)(be,"".concat(Bi,"-ping-right"),fa),Object($.a)(be,"".concat(Bi,"-ping-top"),Do),Object($.a)(be,"".concat(Bi,"-ping-bottom"),Sa),be)),ref:Jt},C.createElement(R.a,{onResize:Za},C.createElement("div",{ref:Xt,className:"".concat(V,"-nav-list"),style:{transform:"translate(".concat(Ct,"px, ").concat(wn,"px)"),transition:xa?"none":void 0}},qo,C.createElement(ur,{ref:dn,prefixCls:V,locale:Xe,editable:Ye,style:{visibility:wo?"hidden":null}}),C.createElement("div",{className:U()("".concat(V,"-ink-bar"),Object($.a)({},"".concat(V,"-ink-bar-animated"),Ee.inkBar)),style:ca}))))),C.createElement(Br,Object.assign({},re,{ref:Vt,prefixCls:V,tabs:Vn,className:!wo&&Ji})),C.createElement(yo,{position:"right",extra:ke,prefixCls:V}))}var Ka=C.forwardRef(Wa);function zo(re){var ge=re.id,be=re.activeKey,ae=re.animated,V=re.tabPosition,ee=re.rtl,X=re.destroyInactiveTabPane,se=C.useContext(Fa),ue=se.prefixCls,Ee=se.tabs,ye=ae.tabPane,Te=Ee.findIndex(function(ke){return ke.key===be});return C.createElement("div",{className:U()("".concat(ue,"-content-holder"))},C.createElement("div",{className:U()("".concat(ue,"-content"),"".concat(ue,"-content-").concat(V),Object($.a)({},"".concat(ue,"-content-animated"),ye)),style:Te&&ye?Object($.a)({},ee?"marginRight":"marginLeft","-".concat(Te,"00%")):null},Ee.map(function(ke){return C.cloneElement(ke.node,{key:ke.key,prefixCls:ue,tabKey:ke.key,id:ge,animated:ye,active:ke.key===be,destroyInactiveTabPane:X})})))}function bo(re){var ge=re.prefixCls,be=re.forceRender,ae=re.className,V=re.style,ee=re.id,X=re.active,se=re.animated,ue=re.destroyInactiveTabPane,Ee=re.tabKey,ye=re.children,Te=C.useState(be),ke=Object(K.a)(Te,2),Ye=ke[0],Xe=ke[1];C.useEffect(function(){X?Xe(!0):ue&&Xe(!1)},[X,ue]);var ct={};return X||(se?(ct.visibility="hidden",ct.height=0,ct.overflowY="hidden"):ct.display="none"),C.createElement("div",{id:ee&&"".concat(ee,"-panel-").concat(Ee),role:"tabpanel",tabIndex:X?0:-1,"aria-labelledby":ee&&"".concat(ee,"-tab-").concat(Ee),"aria-hidden":!X,style:Object(B.a)(Object(B.a)({},ct),V),className:U()("".concat(ge,"-tabpane"),X&&"".concat(ge,"-tabpane-active"),ae)},(X||Ye||be)&&ye)}var Ha=0;function Eo(re){return Object(_.a)(re).map(function(ge){if(C.isValidElement(ge)){var be=ge.key!==void 0?String(ge.key):void 0;return Object(B.a)(Object(B.a)({key:be},ge.props),{},{node:ge})}return null}).filter(function(ge){return ge})}function Vo(re,ge){var be,ae=re.id,V=re.prefixCls,ee=V===void 0?"rc-tabs":V,X=re.className,se=re.children,ue=re.direction,Ee=re.activeKey,ye=re.defaultActiveKey,Te=re.editable,ke=re.animated,Ye=re.tabPosition,Xe=Ye===void 0?"top":Ye,ct=re.tabBarGutter,_t=re.tabBarStyle,Yt=re.tabBarExtraContent,Gt=re.locale,zt=re.moreIcon,Jt=re.moreTransitionName,Xt=re.destroyInactiveTabPane,Vt=re.renderTabBar,dn=re.onChange,rn=re.onTabClick,kn=re.onTabScroll,an=Object(O.a)(re,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),kt=Eo(se),It=ue==="rtl",sn;ke===!1?sn={inkBar:!1,tabPane:!1}:sn=Object(B.a)({inkBar:!0,tabPane:!1},ke!==!0?ke:null);var cn=Object(C.useState)(!1),Ct=Object(K.a)(cn,2),hn=Ct[0],_n=Ct[1];Object(C.useEffect)(function(){_n(vo())},[]);var gn=Object(I.a)(function(){var Cn;return(Cn=kt[0])===null||Cn===void 0?void 0:Cn.key},{value:Ee,defaultValue:ye}),wn=Object(K.a)(gn,2),Sn=wn[0],Gn=wn[1],qn=Object(C.useState)(function(){return kt.findIndex(function(Cn){return Cn.key===Sn})}),Bn=Object(K.a)(qn,2),gr=Bn[0],Gr=Bn[1];Object(C.useEffect)(function(){var Cn=kt.findIndex(function(xi){return xi.key===Sn});if(Cn===-1){var ei;Cn=Math.max(0,Math.min(gr,kt.length-1)),Gn((ei=kt[Cn])===null||ei===void 0?void 0:ei.key)}Gr(Cn)},[kt.map(function(Cn){return Cn.key}).join("_"),Sn,gr]);var Ar=Object(I.a)(null,{value:ae}),$n=Object(K.a)(Ar,2),In=$n[0],Dn=$n[1],Fn=Xe;hn&&!["left","right"].includes(Xe)&&(Fn="top"),Object(C.useEffect)(function(){ae||(Dn("rc-tabs-".concat(Ha)),Ha+=1)},[]);function Nn(Cn,ei){rn==null||rn(Cn,ei),Gn(Cn),dn==null||dn(Cn)}var zr={id:In,activeKey:Sn,animated:sn,tabPosition:Fn,rtl:It,mobile:hn},bi,Ei=Object(B.a)(Object(B.a)({},zr),{},{editable:Te,locale:Gt,moreIcon:zt,moreTransitionName:Jt,tabBarGutter:ct,onTabClick:Nn,onTabScroll:kn,extra:Yt,style:_t,panes:se});return Vt?bi=Vt(Ei,Ka):bi=C.createElement(Ka,Object.assign({},Ei)),C.createElement(Fa.Provider,{value:{tabs:kt,prefixCls:ee}},C.createElement("div",Object.assign({ref:ge,id:ae,className:U()(ee,"".concat(ee,"-").concat(Fn),(be={},Object($.a)(be,"".concat(ee,"-mobile"),hn),Object($.a)(be,"".concat(ee,"-editable"),Te),Object($.a)(be,"".concat(ee,"-rtl"),It),be),X)},an),bi,C.createElement(zo,Object.assign({destroyInactiveTabPane:Xt},zr,{animated:sn}))))}var Vi=C.forwardRef(Vo);Vi.TabPane=bo;var si=Vi,Ga=Ie.b=si},kPWJ:function(Be,Ie,G){Be.exports=G.p+"static/question.cb52bef9.gif"},kPY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4MvbOwJfIdIcSUX+8Ic1yg6yT6Eb7Q1Wc4BORRk+RQZQ2DD3n8Y+Lwn4edT/cEcOd0xL6nmyn5knWghPzuL7JQQJMC0umjzafUbaG5J0XigjFSfeHuHYZXSJIH0Iz+VJtczBL6H58pLZAhTaVqKCmnYfoSWc4l6Tko/nscg8clvMtQPyOFUn/oRVCauJZcs+jeHJFLHOX1wFTW9MkEnyg0kP2EpitJ4+YVU/S8v1xqrW4H9MAAAAABJRU5ErkJggg=="},kSUc:function(Be,Ie,G){},kqOp:function(Be,Ie,G){"use strict";G.d(Ie,"a",function(){return M});var $=G("0Owb"),K=G("fWQN"),O=G("mtLc"),B=G("yKVA"),C=G("879j"),L=G("cDcd"),U=G.n(L),_=G("Ot1p"),I="\u2581",M=function(b){Object(B.a)(R,b);var E=Object(C.a)(R);function R(){var w;Object(K.a)(this,R);for(var A=arguments.length,g=new Array(A),u=0;u<A;u++)g[u]=arguments[u];return w=E.call.apply(E,[this].concat(g)),w.getChCountBeforeCursor=function(a,l){for(var s=l.line,p=0,d=0;d<s;d++)p+=a.getLine(d).split(I).length-1;var h=a.getLine(s).substring(0,l.ch);return p+=h.split(I).length-1,p},w.onCMBeforeChange=function(a,l){var s=a.getRange(l.from,l.to),p=0;if(l.text.forEach(function(v){p+=v.split(I).length-1}),s&&s.indexOf(I)!=-1){var d=s.split(I).length-1,h=w.getChCountBeforeCursor(a,l.from);console.log("\u5220\u9664".concat(d,"\u4E2A\uFF0C \u4E4B\u524D\u6709").concat(h,"\u4E2A\uFF0C\u65B0\u589E").concat(p,"\u4E2A")),w.props.deleteEmptyDisabled?l.cancel():w.props.onPlaceholderChange&&w.props.onPlaceholderChange(h,d,p)}else if(p){var D=w.getChCountBeforeCursor(a,l.from);console.log("\u65B0\u589E".concat(p,"\u4E2A\uFF0C\u4E4B\u524D\u6709").concat(D,"\u4E2A")),w.props.onPlaceholderChange&&w.props.onPlaceholderChange(D,0,p)}},w}return Object(O.a)(R,[{key:"render",value:function(){return U.a.createElement(_.a,Object($.a)({},this.props,{onCMBeforeChange:this.onCMBeforeChange}))}}]),R}(L.Component)},l2Kq:function(Be,Ie,G){Be.exports=G.p+"static/match_ad.24dc22fd.jpg"},lZu9:function(Be,Ie,G){(function($){$(G("VrN/"),G("1eCo"),G("8EBN"))})(function($){"use strict";$.defineMode("markdown",function(K,O){var B=$.getMode(K,"text/html"),C=B.name=="null";function L(j){if($.findModeByName){var N=$.findModeByName(j);N&&(j=N.mime||N.mimes[0])}var Z=$.getMode(K,j);return Z.name=="null"?null:Z}O.highlightFormatting===void 0&&(O.highlightFormatting=!1),O.maxBlockquoteDepth===void 0&&(O.maxBlockquoteDepth=0),O.taskLists===void 0&&(O.taskLists=!1),O.strikethrough===void 0&&(O.strikethrough=!1),O.emoji===void 0&&(O.emoji=!1),O.fencedCodeBlockHighlighting===void 0&&(O.fencedCodeBlockHighlighting=!0),O.fencedCodeBlockDefaultMode===void 0&&(O.fencedCodeBlockDefaultMode="text/plain"),O.xml===void 0&&(O.xml=!0),O.tokenTypeOverrides===void 0&&(O.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(_)&&O.tokenTypeOverrides[_]&&(U[_]=O.tokenTypeOverrides[_]);var I=/^([*\-_])(?:\s*\1){2,}\s*$/,M=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,b=/^\[(x| )\](?=\s)/i,E=O.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,R=/^ {0,3}(?:\={1,}|-{2,})\s*$/,w=/^[^#!\[\]*_\\<>` "'(~:]+/,A=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,g=/^\s*\[[^\]]+?\]:.*$/,u=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,a=" ";function l(j,N,Z){return N.f=N.inline=Z,Z(j,N)}function s(j,N,Z){return N.f=N.block=Z,Z(j,N)}function p(j){return!j||!/\S/.test(j.string)}function d(j){if(j.linkTitle=!1,j.linkHref=!1,j.linkText=!1,j.em=!1,j.strong=!1,j.strikethrough=!1,j.quote=0,j.indentedCode=!1,j.f==D){var N=C;if(!N){var Z=$.innerMode(B,j.htmlState);N=Z.mode.name=="xml"&&Z.state.tagStart===null&&!Z.state.context&&Z.state.tokenize.isInText}N&&(j.f=c,j.block=h,j.htmlState=null)}return j.trailingSpace=0,j.trailingSpaceNewLine=!1,j.prevLine=j.thisLine,j.thisLine={stream:null},null}function h(j,N){var Z=j.column()===N.indentation,ne=p(N.prevLine.stream),pe=N.indentedCode,xe=N.prevLine.hr,je=N.list!==!1,Le=(N.listStack[N.listStack.length-1]||0)+3;N.indentedCode=!1;var De=N.indentation;if(N.indentationDiff===null&&(N.indentationDiff=N.indentation,je)){for(N.list=null;De<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=De-N.listStack[N.listStack.length-1])}var Ce=!ne&&!xe&&!N.prevLine.header&&(!je||!pe)&&!N.prevLine.fencedCodeEnd,we=(N.list===!1||xe||ne)&&N.indentation<=Le&&j.match(I),fe=null;if(N.indentationDiff>=4&&(pe||N.prevLine.fencedCodeEnd||N.prevLine.header||ne))return j.skipToEnd(),N.indentedCode=!0,U.code;if(j.eatSpace())return null;if(Z&&N.indentation<=Le&&(fe=j.match(E))&&fe[1].length<=6)return N.quote=0,N.header=fe[1].length,N.thisLine.header=!0,O.highlightFormatting&&(N.formatting="header"),N.f=N.inline,f(N);if(N.indentation<=Le&&j.eat(">"))return N.quote=Z?1:N.quote+1,O.highlightFormatting&&(N.formatting="quote"),j.eatSpace(),f(N);if(!we&&!N.setext&&Z&&N.indentation<=Le&&(fe=j.match(M))){var he=fe[1]?"ol":"ul";return N.indentation=De+j.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,O.taskLists&&j.match(b,!1)&&(N.taskList=!0),N.f=N.inline,O.highlightFormatting&&(N.formatting=["list","list-"+he]),f(N)}else{if(Z&&N.indentation<=Le&&(fe=j.match(A,!0)))return N.quote=0,N.fencedEndRE=new RegExp(fe[1]+"+ *$"),N.localMode=O.fencedCodeBlockHighlighting&&L(fe[2]||O.fencedCodeBlockDefaultMode),N.localMode&&(N.localState=$.startState(N.localMode)),N.f=N.block=v,O.highlightFormatting&&(N.formatting="code-block"),N.code=-1,f(N);if(N.setext||(!Ce||!je)&&!N.quote&&N.list===!1&&!N.code&&!we&&!g.test(j.string)&&(fe=j.lookAhead(1))&&(fe=fe.match(R)))return N.setext?(N.header=N.setext,N.setext=0,j.skipToEnd(),O.highlightFormatting&&(N.formatting="header")):(N.header=fe[0].charAt(0)=="="?1:2,N.setext=N.header),N.thisLine.header=!0,N.f=N.inline,f(N);if(we)return j.skipToEnd(),N.hr=!0,N.thisLine.hr=!0,U.hr;if(j.peek()==="[")return l(j,N,P)}return l(j,N,N.inline)}function D(j,N){var Z=B.token(j,N.htmlState);if(!C){var ne=$.innerMode(B,N.htmlState);(ne.mode.name=="xml"&&ne.state.tagStart===null&&!ne.state.context&&ne.state.tokenize.isInText||N.md_inside&&j.current().indexOf(">")>-1)&&(N.f=c,N.block=h,N.htmlState=null)}return Z}function v(j,N){var Z=N.listStack[N.listStack.length-1]||0,ne=N.indentation<Z,pe=Z+3;if(N.fencedEndRE&&N.indentation<=pe&&(ne||j.match(N.fencedEndRE))){O.highlightFormatting&&(N.formatting="code-block");var xe;return ne||(xe=f(N)),N.localMode=N.localState=null,N.block=h,N.f=c,N.fencedEndRE=null,N.code=0,N.thisLine.fencedCodeEnd=!0,ne?s(j,N,N.block):xe}else return N.localMode?N.localMode.token(j,N.localState):(j.skipToEnd(),U.code)}function f(j){var N=[];if(j.formatting){N.push(U.formatting),typeof j.formatting=="string"&&(j.formatting=[j.formatting]);for(var Z=0;Z<j.formatting.length;Z++)N.push(U.formatting+"-"+j.formatting[Z]),j.formatting[Z]==="header"&&N.push(U.formatting+"-"+j.formatting[Z]+"-"+j.header),j.formatting[Z]==="quote"&&(!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=j.quote?N.push(U.formatting+"-"+j.formatting[Z]+"-"+j.quote):N.push("error"))}if(j.taskOpen)return N.push("meta"),N.length?N.join(" "):null;if(j.taskClosed)return N.push("property"),N.length?N.join(" "):null;if(j.linkHref?N.push(U.linkHref,"url"):(j.strong&&N.push(U.strong),j.em&&N.push(U.em),j.strikethrough&&N.push(U.strikethrough),j.emoji&&N.push(U.emoji),j.linkText&&N.push(U.linkText),j.code&&N.push(U.code),j.image&&N.push(U.image),j.imageAltText&&N.push(U.imageAltText,"link"),j.imageMarker&&N.push(U.imageMarker)),j.header&&N.push(U.header,U.header+"-"+j.header),j.quote&&(N.push(U.quote),!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=j.quote?N.push(U.quote+"-"+j.quote):N.push(U.quote+"-"+O.maxBlockquoteDepth)),j.list!==!1){var ne=(j.listStack.length-1)%3;ne?ne===1?N.push(U.list2):N.push(U.list3):N.push(U.list1)}return j.trailingSpaceNewLine?N.push("trailing-space-new-line"):j.trailingSpace&&N.push("trailing-space-"+(j.trailingSpace%2?"a":"b")),N.length?N.join(" "):null}function m(j,N){return j.match(w,!0)?f(N):void 0}function c(j,N){var Z=N.text(j,N);if(typeof Z!="undefined")return Z;if(N.list)return N.list=null,f(N);if(N.taskList){var ne=j.match(b,!0)[1]===" ";return ne?N.taskOpen=!0:N.taskClosed=!0,O.highlightFormatting&&(N.formatting="task"),N.taskList=!1,f(N)}if(N.taskOpen=!1,N.taskClosed=!1,N.header&&j.match(/^#+$/,!0))return O.highlightFormatting&&(N.formatting="header"),f(N);var pe=j.next();if(N.linkTitle){N.linkTitle=!1;var xe=pe;pe==="("&&(xe=")"),xe=(xe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var je="^\\s*(?:[^"+xe+"\\\\]+|\\\\\\\\|\\\\.)"+xe;if(j.match(new RegExp(je),!0))return U.linkHref}if(pe==="`"){var Le=N.formatting;O.highlightFormatting&&(N.formatting="code"),j.eatWhile("`");var De=j.current().length;if(N.code==0&&(!N.quote||De==1))return N.code=De,f(N);if(De==N.code){var Ce=f(N);return N.code=0,Ce}else return N.formatting=Le,f(N)}else if(N.code)return f(N);if(pe==="\\"&&(j.next(),O.highlightFormatting)){var we=f(N),fe=U.formatting+"-escape";return we?we+" "+fe:fe}if(pe==="!"&&j.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return N.imageMarker=!0,N.image=!0,O.highlightFormatting&&(N.formatting="image"),f(N);if(pe==="["&&N.imageMarker&&j.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return N.imageMarker=!1,N.imageAltText=!0,O.highlightFormatting&&(N.formatting="image"),f(N);if(pe==="]"&&N.imageAltText){O.highlightFormatting&&(N.formatting="image");var we=f(N);return N.imageAltText=!1,N.image=!1,N.inline=N.f=x,we}if(pe==="["&&!N.image)return N.linkText&&j.match(/^.*?\]/)||(N.linkText=!0,O.highlightFormatting&&(N.formatting="link")),f(N);if(pe==="]"&&N.linkText){O.highlightFormatting&&(N.formatting="link");var we=f(N);return N.linkText=!1,N.inline=N.f=j.match(/\(.*?\)| ?\[.*?\]/,!1)?x:c,we}if(pe==="<"&&j.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){N.f=N.inline=o,O.highlightFormatting&&(N.formatting="link");var we=f(N);return we?we+=" ":we="",we+U.linkInline}if(pe==="<"&&j.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){N.f=N.inline=o,O.highlightFormatting&&(N.formatting="link");var we=f(N);return we?we+=" ":we="",we+U.linkEmail}if(O.xml&&pe==="<"&&j.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var he=j.string.indexOf(">",j.pos);if(he!=-1){var _e=j.string.substring(j.start,he);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(_e)&&(N.md_inside=!0)}return j.backUp(1),N.htmlState=$.startState(B),s(j,N,D)}if(O.xml&&pe==="<"&&j.match(/^\/\w*?>/))return N.md_inside=!1,"tag";if(pe==="*"||pe==="_"){for(var at=1,et=j.pos==1?" ":j.string.charAt(j.pos-2);at<3&&j.eat(pe);)at++;var it=j.peek()||" ",gt=!/\s/.test(it)&&(!u.test(it)||/\s/.test(et)||u.test(et)),He=!/\s/.test(et)&&(!u.test(et)||/\s/.test(it)||u.test(it)),Ne=null,Ze=null;if(at%2&&(!N.em&>&&(pe==="*"||!He||u.test(et))?Ne=!0:N.em==pe&&He&&(pe==="*"||!gt||u.test(it))&&(Ne=!1)),at>1&&(!N.strong&>&&(pe==="*"||!He||u.test(et))?Ze=!0:N.strong==pe&&He&&(pe==="*"||!gt||u.test(it))&&(Ze=!1)),Ze!=null||Ne!=null){O.highlightFormatting&&(N.formatting=Ne==null?"strong":Ze==null?"em":"strong em"),Ne===!0&&(N.em=pe),Ze===!0&&(N.strong=pe);var Ce=f(N);return Ne===!1&&(N.em=!1),Ze===!1&&(N.strong=!1),Ce}}else if(pe===" "&&(j.eat("*")||j.eat("_"))){if(j.peek()===" ")return f(N);j.backUp(1)}if(O.strikethrough){if(pe==="~"&&j.eatWhile(pe)){if(N.strikethrough){O.highlightFormatting&&(N.formatting="strikethrough");var Ce=f(N);return N.strikethrough=!1,Ce}else if(j.match(/^[^\s]/,!1))return N.strikethrough=!0,O.highlightFormatting&&(N.formatting="strikethrough"),f(N)}else if(pe===" "&&j.match(/^~~/,!0)){if(j.peek()===" ")return f(N);j.backUp(2)}}if(O.emoji&&pe===":"&&j.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){N.emoji=!0,O.highlightFormatting&&(N.formatting="emoji");var ut=f(N);return N.emoji=!1,ut}return pe===" "&&(j.match(/^ +$/,!1)?N.trailingSpace++:N.trailingSpace&&(N.trailingSpaceNewLine=!0)),f(N)}function o(j,N){var Z=j.next();if(Z===">"){N.f=N.inline=c,O.highlightFormatting&&(N.formatting="link");var ne=f(N);return ne?ne+=" ":ne="",ne+U.linkInline}return j.match(/^[^>]+/,!0),U.linkInline}function x(j,N){if(j.eatSpace())return null;var Z=j.next();return Z==="("||Z==="["?(N.f=N.inline=S(Z==="("?")":"]"),O.highlightFormatting&&(N.formatting="link-string"),N.linkHref=!0,f(N)):"error"}var y={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function S(j){return function(N,Z){var ne=N.next();if(ne===j){Z.f=Z.inline=c,O.highlightFormatting&&(Z.formatting="link-string");var pe=f(Z);return Z.linkHref=!1,pe}return N.match(y[j]),Z.linkHref=!0,f(Z)}}function P(j,N){return j.match(/^([^\]\\]|\\.)*\]:/,!1)?(N.f=F,j.next(),O.highlightFormatting&&(N.formatting="link"),N.linkText=!0,f(N)):l(j,N,c)}function F(j,N){if(j.match(/^\]:/,!0)){N.f=N.inline=H,O.highlightFormatting&&(N.formatting="link");var Z=f(N);return N.linkText=!1,Z}return j.match(/^([^\]\\]|\\.)+/,!0),U.linkText}function H(j,N){return j.eatSpace()?null:(j.match(/^[^\s]+/,!0),j.peek()===void 0?N.linkTitle=!0:j.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),N.f=N.inline=c,U.linkHref+" url")}var Y={startState:function(){return{f:h,prevLine:{stream:null},thisLine:{stream:null},block:h,htmlState:null,indentation:0,inline:c,text:m,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(j){return{f:j.f,prevLine:j.prevLine,thisLine:j.thisLine,block:j.block,htmlState:j.htmlState&&$.copyState(B,j.htmlState),indentation:j.indentation,localMode:j.localMode,localState:j.localMode?$.copyState(j.localMode,j.localState):null,inline:j.inline,text:j.text,formatting:!1,linkText:j.linkText,linkTitle:j.linkTitle,linkHref:j.linkHref,code:j.code,em:j.em,strong:j.strong,strikethrough:j.strikethrough,emoji:j.emoji,header:j.header,setext:j.setext,hr:j.hr,taskList:j.taskList,list:j.list,listStack:j.listStack.slice(0),quote:j.quote,indentedCode:j.indentedCode,trailingSpace:j.trailingSpace,trailingSpaceNewLine:j.trailingSpaceNewLine,md_inside:j.md_inside,fencedEndRE:j.fencedEndRE}},token:function(j,N){if(N.formatting=!1,j!=N.thisLine.stream){if(N.header=0,N.hr=!1,j.match(/^\s*$/,!0))return d(N),null;if(N.prevLine=N.thisLine,N.thisLine={stream:j},N.taskList=!1,N.trailingSpace=0,N.trailingSpaceNewLine=!1,!N.localState&&(N.f=N.block,N.f!=D)){var Z=j.match(/^\s*/,!0)[0].replace(/\t/g,a).length;if(N.indentation=Z,N.indentationDiff=null,Z>0)return null}}return N.f(j,N)},innerMode:function(j){return j.block==D?{state:j.htmlState,mode:B}:j.localState?{state:j.localState,mode:j.localMode}:{state:j,mode:Y}},indent:function(j,N,Z){return j.block==D&&B.indent?B.indent(j.htmlState,N,Z):j.localState&&j.localMode.indent?j.localMode.indent(j.localState,N,Z):$.Pass},blankLine:d,getType:f,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Y},"xml"),$.defineMIME("text/markdown","markdown"),$.defineMIME("text/x-markdown","markdown")})},lzim:function(Be,Ie,G){"use strict";var $=G("E7E6"),K=G.n($);G.d(Ie,"z",function(){return K.a});var O=G("/GNS"),B=G.n(O);G.d(Ie,"y",function(){return B.a});var C=G("FOrL"),L=G.n(C);G.d(Ie,"s",function(){return L.a});var U=G("HpTS"),_=G.n(U);G.d(Ie,"A",function(){return _.a});var I=G("tWlo"),M=G.n(I);G.d(Ie,"b",function(){return M.a});var b=G("7ZXX"),E=G.n(b);G.d(Ie,"m",function(){return E.a});var R=G("GABl"),w=G.n(R);G.d(Ie,"f",function(){return w.a});var A=G("onxn"),g=G.n(A);G.d(Ie,"o",function(){return g.a});var u=G("nKGa"),a=G.n(u);G.d(Ie,"n",function(){return a.a});var l=G("4qgm"),s=G.n(l);G.d(Ie,"C",function(){return s.a});var p=G("JeFH"),d=G.n(p);G.d(Ie,"c",function(){return d.a});var h=G("ji0R"),D=G.n(h);G.d(Ie,"j",function(){return D.a});var v=G("W6BS"),f=G.n(v);G.d(Ie,"D",function(){return f.a});var m=G("kPYp"),c=G.n(m);G.d(Ie,"E",function(){return c.a});var o=G("nukY"),x=G.n(o),y=G("4u4S"),S=G.n(y),P=G("yslc"),F=G.n(P),H=G("l2Kq"),Y=G.n(H);G.d(Ie,"r",function(){return Y.a});var j=G("RMFE"),N=G.n(j);G.d(Ie,"p",function(){return N.a});var Z=G("TGq3"),ne=G.n(Z),pe=G("SMhR"),xe=G.n(pe);G.d(Ie,"B",function(){return xe.a});var je=G("8/bI"),Le=G.n(je);G.d(Ie,"k",function(){return Le.a});var De=G("JWDV"),Ce=G.n(De),we=G("Xsq0"),fe=G.n(we);G.d(Ie,"q",function(){return fe.a});var he=G("Ohmc"),_e=G.n(he);G.d(Ie,"d",function(){return _e.a});var at=G("csWT"),et=G.n(at);G.d(Ie,"e",function(){return et.a});var it=G("7v3h"),gt=G.n(it);G.d(Ie,"l",function(){return gt.a});var He=G("cRFk"),Ne=G.n(He);G.d(Ie,"x",function(){return Ne.a});var Ze=G("kPWJ"),ut=G.n(Ze);G.d(Ie,"w",function(){return ut.a});var dt=G("qgvg"),ze=G.n(dt);G.d(Ie,"t",function(){return ze.a});var Ge=G("FPkq"),yt=G.n(Ge);G.d(Ie,"v",function(){return yt.a});var vt=G("A/g1"),mt=G.n(vt);G.d(Ie,"g",function(){return mt.a});var qe=G("Nmxd"),lt=G.n(qe);G.d(Ie,"h",function(){return lt.a});var st=G("5D2P"),Fe=G.n(st);G.d(Ie,"i",function(){return Fe.a});var Me=G("djh8"),ot=G.n(Me);G.d(Ie,"u",function(){return ot.a});var Ke=G("Jq4h"),Oe=G.n(Ke);G.d(Ie,"a",function(){return Oe.a})},mepR:function(Be,Ie,G){Be.exports={flex_box_center:"flex_box_center___3PiSf",flex_space_between:"flex_space_between___3wd5O",flex_box_vertical_center:"flex_box_vertical_center___3qKIW",flex_box_center_end:"flex_box_center_end___2PBRG",flex_box_column:"flex_box_column___39GGe",bg:"bg___3lEyf",formWrap:"formWrap___1e8Z1",empty:"empty___2jgvs",list:"list___3m2Ed",fs:"fs___2PURZ",top:"top___2EfKX",left:"left___3Bk5W",title:"title___1hcE1",qs:"qs___KHjhf",qsActive:"qsActive___2FXkO",right:"right___2XWtX",bt:"bt___2mIBt",answer:"answer___1TBgK",addBtn:"addBtn___NMPyJ"}},nKGa:function(Be,Ie,G){Be.exports=G.p+"static/export_exercise-template.f7655c19.png"},nuEh:function(Be,Ie,G){"use strict";var $=G("T2oS"),K=G("W9HT"),O=G("cDcd"),B=G.n(O),C=G("F8wB"),L=G.n(C),U=function(I){var M=I.loading;return M?B.a.createElement("div",{className:L.a.loading},B.a.createElement(K.a,null)):B.a.createElement(B.a.Fragment,null)};Ie.a=U},nukY:function(Be,Ie){Be.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+mJpInYKHNDY20p49e2hoaIguX75MIyMjrrRatWoVLVu2jJ48eUJnzpxxVcZPpunTp9POnTvNot3d3TQ8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c3PvrCeMIJZTLt5zBb1i59tUxuvDeRm+14RscbD1IB9Uo6ZnHRfp2XsX4489Ujy8eT08YTAjSg6Plf333p9HDLpzPlpnEvg4kYH83TrZrxcugy7IkU4SnrdszlW6AS5iOzndzu2FAbexmKY2RCgDR5zVsfrFm2YSrc92cqveNe2xMF9pk4HZvFMmQwflxrqMZFXKub49R1+ZtOne5hJaZpwoAG1GpXjhf/YXuxTK37pyLFPZSGErM7JleYCPVGRN7kreaXsp45OnY7aAwN3xvQcH1b1y65VabMwzMU5zQ79bMKmLHLm2GCEXC0jUkVRSLUF6hdW62c8n7WyzXHfsianBVAg16rqGCOerYt+E4tuOIbviR3suK+cBp1Zdpp0GRVRfZl4/XHD7AzTpnYSFWB0vHlzS2TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},osHv:function(Be,Ie,G){(function($){$(G("VrN/"))})(function($){"use strict";var K=$.Pos;function O(u,a){return u.line-a.line||u.ch-a.ch}var B="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",C=B+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",L=new RegExp("<(/?)(["+B+"]["+C+"]*)","g");function U(u,a,l,s){this.line=a,this.ch=l,this.cm=u,this.text=u.getLine(a),this.min=s?Math.max(s.from,u.firstLine()):u.firstLine(),this.max=s?Math.min(s.to-1,u.lastLine()):u.lastLine()}function _(u,a){var l=u.cm.getTokenTypeAt(K(u.line,a));return l&&/\btag\b/.test(l)}function I(u){return u.line>=u.max?void 0:(u.ch=0,u.text=u.cm.getLine(++u.line),!0)}function M(u){return u.line<=u.min?void 0:(u.text=u.cm.getLine(--u.line),u.ch=u.text.length,!0)}function b(u){for(;;){var a=u.text.indexOf(">",u.ch);if(a==-1){if(I(u))continue;return}if(!_(u,a+1)){u.ch=a+1;continue}var l=u.text.lastIndexOf("/",a),s=l>-1&&!/\S/.test(u.text.slice(l+1,a));return u.ch=a+1,s?"selfClose":"regular"}}function E(u){for(;;){var a=u.ch?u.text.lastIndexOf("<",u.ch-1):-1;if(a==-1){if(M(u))continue;return}if(!_(u,a+1)){u.ch=a;continue}L.lastIndex=a,u.ch=a;var l=L.exec(u.text);if(l&&l.index==a)return l}}function R(u){for(;;){L.lastIndex=u.ch;var a=L.exec(u.text);if(!a){if(I(u))continue;return}if(!_(u,a.index+1)){u.ch=a.index+1;continue}return u.ch=a.index+a[0].length,a}}function w(u){for(;;){var a=u.ch?u.text.lastIndexOf(">",u.ch-1):-1;if(a==-1){if(M(u))continue;return}if(!_(u,a+1)){u.ch=a;continue}var l=u.text.lastIndexOf("/",a),s=l>-1&&!/\S/.test(u.text.slice(l+1,a));return u.ch=a+1,s?"selfClose":"regular"}}function A(u,a){for(var l=[];;){var s=R(u),p,d=u.line,h=u.ch-(s?s[0].length:0);if(!s||!(p=b(u)))return;if(p=="selfClose")continue;if(s[1]){for(var D=l.length-1;D>=0;--D)if(l[D]==s[2]){l.length=D;break}if(D<0&&(!a||a==s[2]))return{tag:s[2],from:K(d,h),to:K(u.line,u.ch)}}else l.push(s[2])}}function g(u,a){for(var l=[];;){var s=w(u);if(!s)return;if(s=="selfClose"){E(u);continue}var p=u.line,d=u.ch,h=E(u);if(!h)return;if(h[1])l.push(h[2]);else{for(var D=l.length-1;D>=0;--D)if(l[D]==h[2]){l.length=D;break}if(D<0&&(!a||a==h[2]))return{tag:h[2],from:K(u.line,u.ch),to:K(p,d)}}}}$.registerHelper("fold","xml",function(u,a){for(var l=new U(u,a.line,0);;){var s=R(l);if(!s||l.line!=a.line)return;var p=b(l);if(!p)return;if(!s[1]&&p!="selfClose"){var d=K(l.line,l.ch),h=A(l,s[2]);return h&&O(h.from,d)>0?{from:d,to:h.from}:null}}}),$.findMatchingTag=function(u,a,l){var s=new U(u,a.line,a.ch,l);if(s.text.indexOf(">")==-1&&s.text.indexOf("<")==-1)return;var p=b(s),d=p&&K(s.line,s.ch),h=p&&E(s);if(!p||!h||O(s,a)>0)return;var D={from:K(s.line,s.ch),to:d,tag:h[2]};return p=="selfClose"?{open:D,close:null,at:"open"}:h[1]?{open:g(s,h[2]),close:D,at:"close"}:(s=new U(u,d.line,d.ch,l),{open:D,close:A(s,h[2]),at:"open"})},$.findEnclosingTag=function(u,a,l,s){for(var p=new U(u,a.line,a.ch,l);;){var d=g(p,s);if(!d)break;var h=new U(u,a.line,a.ch,l),D=A(h,d.tag);if(D)return{open:d,close:D}}},$.scanForClosingTag=function(u,a,l,s){var p=new U(u,a.line,a.ch,s?{from:0,to:s}:null);return A(p,l)}})},"p77/":function(Be,Ie,G){},qgvg:function(Be,Ie){Be.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0i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Xk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},rUJ1:function(Be,Ie){const G=/[&<>"']/,$=/[&<>"']/g,K=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,B={"&":"&","<":"<",">":">",'"':""","'":"'"},C=v=>B[v];function L(v,f){if(f){if(G.test(v))return v.replace($,C)}else if(K.test(v))return v.replace(O,C);return v}const U=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function _(v){return v.replace(U,(f,m)=>(m=m.toLowerCase(),m==="colon"?":":m.charAt(0)==="#"?m.charAt(1)==="x"?String.fromCharCode(parseInt(m.substring(2),16)):String.fromCharCode(+m.substring(1)):""))}const I=/(^|[^\[])\^/g;function M(v,f){v=v.source||v,f=f||"";const m={replace:(c,o)=>(o=o.source||o,o=o.replace(I,"$1"),v=v.replace(c,o),m),getRegex:()=>new RegExp(v,f)};return m}const b=/[^\w:]/g,E=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(v,f,m){if(v){let c;try{c=decodeURIComponent(_(m)).replace(b,"").toLowerCase()}catch(o){return null}if(c.indexOf("javascript:")===0||c.indexOf("vbscript:")===0||c.indexOf("data:")===0)return null}f&&!E.test(m)&&(m=a(f,m));try{m=encodeURI(m).replace(/%25/g,"%")}catch(c){return null}return m}const w={},A=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,u=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(v,f){w[" "+v]||(A.test(v)?w[" "+v]=v+"/":w[" "+v]=d(v,"/",!0)),v=w[" "+v];const m=v.indexOf(":")===-1;return f.substring(0,2)==="//"?m?f:v.replace(g,"$1")+f:f.charAt(0)==="/"?m?f:v.replace(u,"$1")+f:v+f}const l={exec:function(){}};function s(v){let f=1,m,c;for(;f<arguments.length;f++){m=arguments[f];for(c in m)Object.prototype.hasOwnProperty.call(m,c)&&(v[c]=m[c])}return v}function p(v,f){const m=v.replace(/\|/g,(x,y,S)=>{let P=!1,F=y;for(;--F>=0&&S[F]==="\\";)P=!P;return P?"|":" |"}),c=m.split(/ \|/);let o=0;if(c.length>f)c.splice(f);else for(;c.length<f;)c.push("");for(;o<c.length;o++)c[o]=c[o].trim().replace(/\\\|/g,"|");return c}function d(v,f,m){const c=v.length;if(c===0)return"";let o=0;for(;o<c;){const x=v.charAt(c-o-1);if(x===f&&!m)o++;else if(x!==f&&m)o++;else break}return v.substr(0,c-o)}function h(v,f){if(v.indexOf(f[1])===-1)return-1;const m=v.length;let c=0,o=0;for(;o<m;o++)if(v[o]==="\\")o++;else if(v[o]===f[0])c++;else if(v[o]===f[1]&&(c--,c<0))return o;return-1}function D(v){v&&v.sanitize&&!v.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")}Be.exports={escape:L,unescape:_,edit:M,cleanUrl:R,resolveUrl:a,noopTest:l,merge:s,splitCells:p,rtrim:d,findClosingBracket:h,checkSanitizeDeprecation:D}},t23M:function(Be,Ie,G){"use strict";var $=G("VTBJ"),K=G("1OyB"),O=G("vuIU"),B=G("Ji7U"),C=G("LK+K"),L=G("cDcd"),U=G.n(L),_=G("m+aA"),I=G("Zm9Q"),M=G("Kwbf"),b=G("c+Xe"),E=G("bdgK"),R="rc-observer-key",w=function(A){Object(B.a)(u,A);var g=Object(C.a)(u);function u(){var a;return Object(K.a)(this,u),a=g.apply(this,arguments),a.resizeObserver=null,a.childNode=null,a.currentElement=null,a.state={width:0,height:0,offsetHeight:0,offsetWidth:0},a.onResize=function(l){var s=a.props.onResize,p=l[0].target,d=p.getBoundingClientRect(),h=d.width,D=d.height,v=p.offsetWidth,f=p.offsetHeight,m=Math.floor(h),c=Math.floor(D);if(a.state.width!==m||a.state.height!==c||a.state.offsetWidth!==v||a.state.offsetHeight!==f){var o={width:m,height:c,offsetWidth:v,offsetHeight:f};a.setState(o),s&&Promise.resolve().then(function(){s(Object($.a)(Object($.a)({},o),{},{offsetWidth:v,offsetHeight:f}))})}},a.setChildNode=function(l){a.childNode=l},a}return Object(O.a)(u,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var l=this.props.disabled;if(l){this.destroyObserver();return}var s=Object(_.a)(this.childNode||this),p=s!==this.currentElement;p&&(this.destroyObserver(),this.currentElement=s),!this.resizeObserver&&s&&(this.resizeObserver=new E.default(this.onResize),this.resizeObserver.observe(s))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var l=this.props.children,s=Object(I.a)(l);if(s.length>1)Object(M.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(s.length===0)return Object(M.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var p=s[0];if(L.isValidElement(p)&&Object(b.c)(p)){var d=p.ref;s[0]=L.cloneElement(p,{ref:Object(b.a)(d,this.setChildNode)})}return s.length===1?s[0]:s.map(function(h,D){return!L.isValidElement(h)||"key"in h&&h.key!==null?h:L.cloneElement(h,{key:"".concat(R,"-").concat(D)})})}}]),u}(L.Component);w.displayName="ResizeObserver",Ie.a=w},tWlo:function(Be,Ie){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKF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kwbe6MQpN6hfFRUVWa+Qb+7je23ideLAtPdGZ/cUZpw1iTsTFtFLJcBwEc2RIryHqELvW2q/qQPT4JA4AmupL5aP/Saza8A0eDU2Jvr0DrWaNkEe3L32kULmhXV+cHHR8cOvV5tcDd9f8qvm9ouAW2Zm5yhpm5uwWi9HRoRXq1UqC9zt08cDe391VUiJPyaPo+F1zddaZy80XFyLRv52v2ViPrehiJSvz6Z7rthQpZI+t6E+K91yuj+3UXnkL+7PbYxCFdiIKfgYdTcohHZ23QTnEntd8Y8AAwCTubpzlq2wWAAAAABJRU5ErkJggg=="},uIXO:function(Be,Ie,G){Be.exports={flex_box_center:"flex_box_center___1HoSW",flex_space_between:"flex_space_between___1NTlm",flex_box_vertical_center:"flex_box_vertical_center___1RREG",flex_box_center_end:"flex_box_center_end___-OJaq",flex_box_column:"flex_box_column___11ry4",modal:"modal___32KcS",main:"main___3HP_p",title:"title___1Kjif",name:"name___3ysu_",body:"body___33mTT",form:"form___2fckF",btns:"btns___3SmLH"}},ulZh:function(Be,Ie,G){typeof window!="undefined"&&function(K,O){Be.exports=O()}(this,function(){return function($){var K={};function O(B){if(K[B])return K[B].exports;var C=K[B]={i:B,l:!1,exports:{}};return $[B].call(C.exports,C,C.exports,O),C.l=!0,C.exports}return O.m=$,O.c=K,O.d=function(B,C,L){O.o(B,C)||Object.defineProperty(B,C,{enumerable:!0,get:L})},O.r=function(B){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(B,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(B,"__esModule",{value:!0})},O.t=function(B,C){if(C&1&&(B=O(B)),C&8)return B;if(C&4&&typeof B=="object"&&B&&B.__esModule)return B;var L=Object.create(null);if(O.r(L),Object.defineProperty(L,"default",{enumerable:!0,value:B}),C&2&&typeof B!="string")for(var U in B)O.d(L,U,function(_){return B[_]}.bind(null,U));return L},O.n=function(B){var C=B&&B.__esModule?function(){return B.default}:function(){return B};return O.d(C,"a",C),C},O.o=function(B,C){return Object.prototype.hasOwnProperty.call(B,C)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function($,K,O){"use strict";var B=Object.prototype.hasOwnProperty,C="~";function L(){}Object.create&&(L.prototype=Object.create(null),new L().__proto__||(C=!1));function U(b,E,R){this.fn=b,this.context=E,this.once=R||!1}function _(b,E,R,w,A){if(typeof R!="function")throw new TypeError("The listener must be a function");var g=new U(R,w||b,A),u=C?C+E:E;return b._events[u]?b._events[u].fn?b._events[u]=[b._events[u],g]:b._events[u].push(g):(b._events[u]=g,b._eventsCount++),b}function I(b,E){--b._eventsCount===0?b._events=new L:delete b._events[E]}function M(){this._events=new L,this._eventsCount=0}M.prototype.eventNames=function(){var E=[],R,w;if(this._eventsCount===0)return E;for(w in R=this._events)B.call(R,w)&&E.push(C?w.slice(1):w);return Object.getOwnPropertySymbols?E.concat(Object.getOwnPropertySymbols(R)):E},M.prototype.listeners=function(E){var R=C?C+E:E,w=this._events[R];if(!w)return[];if(w.fn)return[w.fn];for(var A=0,g=w.length,u=new Array(g);A<g;A++)u[A]=w[A].fn;return u},M.prototype.listenerCount=function(E){var R=C?C+E:E,w=this._events[R];return w?w.fn?1:w.length:0},M.prototype.emit=function(E,R,w,A,g,u){var a=C?C+E:E;if(!this._events[a])return!1;var l=this._events[a],s=arguments.length,p,d;if(l.fn){l.once&&this.removeListener(E,l.fn,void 0,!0);switch(s){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,R),!0;case 3:return l.fn.call(l.context,R,w),!0;case 4:return l.fn.call(l.context,R,w,A),!0;case 5:return l.fn.call(l.context,R,w,A,g),!0;case 6:return l.fn.call(l.context,R,w,A,g,u),!0}for(d=1,p=new Array(s-1);d<s;d++)p[d-1]=arguments[d];l.fn.apply(l.context,p)}else{var h=l.length,D;for(d=0;d<h;d++){l[d].once&&this.removeListener(E,l[d].fn,void 0,!0);switch(s){case 1:l[d].fn.call(l[d].context);break;case 2:l[d].fn.call(l[d].context,R);break;case 3:l[d].fn.call(l[d].context,R,w);break;case 4:l[d].fn.call(l[d].context,R,w,A);break;default:if(!p)for(D=1,p=new Array(s-1);D<s;D++)p[D-1]=arguments[D];l[d].fn.apply(l[d].context,p)}}}return!0},M.prototype.on=function(E,R,w){return _(this,E,R,w,!1)},M.prototype.once=function(E,R,w){return _(this,E,R,w,!0)},M.prototype.removeListener=function(E,R,w,A){var g=C?C+E:E;if(!this._events[g])return this;if(!R)return I(this,g),this;var u=this._events[g];if(u.fn)u.fn===R&&(!A||u.once)&&(!w||u.context===w)&&I(this,g);else{for(var a=0,l=[],s=u.length;a<s;a++)(u[a].fn!==R||A&&!u[a].once||w&&u[a].context!==w)&&l.push(u[a]);l.length?this._events[g]=l.length===1?l[0]:l:I(this,g)}return this},M.prototype.removeAllListeners=function(E){var R;return E?(R=C?C+E:E,this._events[R]&&I(this,R)):(this._events=new L,this._eventsCount=0),this},M.prototype.off=M.prototype.removeListener,M.prototype.addListener=M.prototype.on,M.prefixed=C,M.EventEmitter=M,$.exports=M},"./node_modules/url-toolkit/src/url-toolkit.js":function($,K,O){(function(B){var C=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,L=/^([^\/?#]*)([^]*)$/,U=/(?:\/|^)\.(?=\/)/g,_=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,I={buildAbsoluteURL:function(M,b,E){if(E=E||{},M=M.trim(),b=b.trim(),!b){if(!E.alwaysNormalize)return M;var R=I.parseURL(M);if(!R)throw new Error("Error trying to parse base URL.");return R.path=I.normalizePath(R.path),I.buildURLFromParts(R)}var w=I.parseURL(b);if(!w)throw new Error("Error trying to parse relative URL.");if(w.scheme)return E.alwaysNormalize?(w.path=I.normalizePath(w.path),I.buildURLFromParts(w)):b;var A=I.parseURL(M);if(!A)throw new Error("Error trying to parse base URL.");if(!A.netLoc&&A.path&&A.path[0]!=="/"){var g=L.exec(A.path);A.netLoc=g[1],A.path=g[2]}A.netLoc&&!A.path&&(A.path="/");var u={scheme:A.scheme,netLoc:w.netLoc,path:null,params:w.params,query:w.query,fragment:w.fragment};if(!w.netLoc&&(u.netLoc=A.netLoc,w.path[0]!=="/"))if(!w.path)u.path=A.path,w.params||(u.params=A.params,w.query||(u.query=A.query));else{var a=A.path,l=a.substring(0,a.lastIndexOf("/")+1)+w.path;u.path=I.normalizePath(l)}return u.path===null&&(u.path=E.alwaysNormalize?I.normalizePath(w.path):w.path),I.buildURLFromParts(u)},parseURL:function(M){var b=C.exec(M);return b?{scheme:b[1]||"",netLoc:b[2]||"",path:b[3]||"",params:b[4]||"",query:b[5]||"",fragment:b[6]||""}:null},normalizePath:function(M){for(M=M.split("").reverse().join("").replace(U,"");M.length!==(M=M.replace(_,"")).length;);return M.split("").reverse().join("")},buildURLFromParts:function(M){return M.scheme+M.netLoc+M.path+M.params+M.query+M.fragment}};$.exports=I})(this)},"./node_modules/webworkify-webpack/index.js":function($,K,O){function B(E){var R={};function w(g){if(R[g])return R[g].exports;var u=R[g]={i:g,l:!1,exports:{}};return E[g].call(u.exports,u,u.exports,w),u.l=!0,u.exports}w.m=E,w.c=R,w.i=function(g){return g},w.d=function(g,u,a){w.o(g,u)||Object.defineProperty(g,u,{configurable:!1,enumerable:!0,get:a})},w.r=function(g){Object.defineProperty(g,"__esModule",{value:!0})},w.n=function(g){var u=g&&g.__esModule?function(){return g.default}:function(){return g};return w.d(u,"a",u),u},w.o=function(g,u){return Object.prototype.hasOwnProperty.call(g,u)},w.p="/",w.oe=function(g){throw console.error(g),g};var A=w(w.s=ENTRY_MODULE);return A.default||A}var C="[\\.|\\-|\\+|\\w|/|@]+",L="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+C+").*?\\)";function U(E){return(E+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function _(E){return!isNaN(1*E)}function I(E,R,w){var A={};A[w]=[];var g=R.toString(),u=g.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!u)return A;for(var a=u[1],l=new RegExp("(\\\\n|\\W)"+U(a)+L,"g"),s;s=l.exec(g);){if(s[3]==="dll-reference")continue;A[w].push(s[3])}for(l=new RegExp("\\("+U(a)+'\\("(dll-reference\\s('+C+'))"\\)\\)'+L,"g");s=l.exec(g);)E[s[2]]||(A[w].push(s[1]),E[s[2]]=O(s[1]).m),A[s[2]]=A[s[2]]||[],A[s[2]].push(s[4]);for(var p=Object.keys(A),d=0;d<p.length;d++)for(var h=0;h<A[p[d]].length;h++)_(A[p[d]][h])&&(A[p[d]][h]=1*A[p[d]][h]);return A}function M(E){var R=Object.keys(E);return R.reduce(function(w,A){return w||E[A].length>0},!1)}function b(E,R){for(var w={main:[R]},A={main:[]},g={main:{}};M(w);)for(var u=Object.keys(w),a=0;a<u.length;a++){var l=u[a],s=w[l],p=s.pop();if(g[l]=g[l]||{},g[l][p]||!E[l][p])continue;g[l][p]=!0,A[l]=A[l]||[],A[l].push(p);for(var d=I(E,E[l][p],l),h=Object.keys(d),D=0;D<h.length;D++)w[h[D]]=w[h[D]]||[],w[h[D]]=w[h[D]].concat(d[h[D]])}return A}$.exports=function(E,R){R=R||{};var w={main:O.m},A=R.all?{main:Object.keys(w.main)}:b(w,E),g="";Object.keys(A).filter(function(p){return p!=="main"}).forEach(function(p){for(var d=0;A[p][d];)d++;A[p].push(d),w[p][d]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",g=g+"var "+p+" = ("+B.toString().replace("ENTRY_MODULE",JSON.stringify(d))+")({"+A[p].map(function(h){return""+JSON.stringify(h)+": "+w[p][h].toString()}).join(",")+`});
|
|
`}),g=g+"new (("+B.toString().replace("ENTRY_MODULE",JSON.stringify(E))+")({"+A.main.map(function(p){return""+JSON.stringify(p)+": "+w.main[p].toString()}).join(",")+"}))(self);";var u=new window.Blob([g],{type:"text/javascript"});if(R.bare)return u;var a=window.URL||window.webkitURL||window.mozURL||window.msURL,l=a.createObjectURL(u),s=new window.Worker(l);return s.objectURL=l,s}},"./src/config.ts":function($,K,O){"use strict";O.r(K),O.d(K,"hlsDefaultConfig",function(){return D}),O.d(K,"mergeConfig",function(){return f}),O.d(K,"enableStreamingMode",function(){return m});var B=O("./src/controller/abr-controller.ts"),C=O("./src/controller/audio-stream-controller.ts"),L=O("./src/controller/audio-track-controller.ts"),U=O("./src/controller/subtitle-stream-controller.ts"),_=O("./src/controller/subtitle-track-controller.ts"),I=O("./src/controller/buffer-controller.ts"),M=O("./src/controller/timeline-controller.ts"),b=O("./src/controller/cap-level-controller.ts"),E=O("./src/controller/fps-controller.ts"),R=O("./src/controller/eme-controller.ts"),w=O("./src/controller/cmcd-controller.ts"),A=O("./src/utils/xhr-loader.ts"),g=O("./src/utils/fetch-loader.ts"),u=O("./src/utils/cues.ts"),a=O("./src/utils/mediakeys-helper.ts"),l=O("./src/utils/logger.ts");function s(){return s=Object.assign||function(c){for(var o=1;o<arguments.length;o++){var x=arguments[o];for(var y in x)Object.prototype.hasOwnProperty.call(x,y)&&(c[y]=x[y])}return c},s.apply(this,arguments)}function p(c,o){var x=Object.keys(c);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(c);o&&(y=y.filter(function(S){return Object.getOwnPropertyDescriptor(c,S).enumerable})),x.push.apply(x,y)}return x}function d(c){for(var o=1;o<arguments.length;o++){var x=arguments[o]!=null?arguments[o]:{};o%2?p(Object(x),!0).forEach(function(y){h(c,y,x[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(x)):p(Object(x)).forEach(function(y){Object.defineProperty(c,y,Object.getOwnPropertyDescriptor(x,y))})}return c}function h(c,o,x){return o in c?Object.defineProperty(c,o,{value:x,enumerable:!0,configurable:!0,writable:!0}):c[o]=x,c}var D=d(d({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:B.default,bufferController:I.default,capLevelController:b.default,fpsController:E.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:a.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},v()),{},{subtitleStreamController:U.SubtitleStreamController,subtitleTrackController:_.default,timelineController:M.TimelineController,audioStreamController:C.default,audioTrackController:L.default,emeController:R.default,cmcdController:w.default});function v(){return{cueHandler:u.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(c,o){if((o.liveSyncDurationCount||o.liveMaxLatencyDurationCount)&&(o.liveSyncDuration||o.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(o.liveMaxLatencyDurationCount!==void 0&&(o.liveSyncDurationCount===void 0||o.liveMaxLatencyDurationCount<=o.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(o.liveMaxLatencyDuration!==void 0&&(o.liveSyncDuration===void 0||o.liveMaxLatencyDuration<=o.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return s({},c,o)}function m(c){var o=c.loader;if(o!==g.default&&o!==A.default)l.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),c.progressive=!1;else{var x=Object(g.fetchSupported)();x&&(c.loader=g.default,c.progressive=!0,c.enableSoftwareAES=!0,l.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/polyfills/number.ts"),C=O("./src/utils/ewma-bandwidth-estimator.ts"),L=O("./src/events.ts"),U=O("./src/utils/buffer-helper.ts"),_=O("./src/errors.ts"),I=O("./src/types/loader.ts"),M=O("./src/utils/logger.ts");function b(w,A){for(var g=0;g<A.length;g++){var u=A[g];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(w,u.key,u)}}function E(w,A,g){return A&&b(w.prototype,A),g&&b(w,g),w}var R=function(){function w(g){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=g;var u=g.config;this.bwEstimator=new C.default(u.abrEwmaSlowVoD,u.abrEwmaFastVoD,u.abrEwmaDefaultEstimate),this.registerListeners()}var A=w.prototype;return A.registerListeners=function(){var u=this.hls;u.on(L.Events.FRAG_LOADING,this.onFragLoading,this),u.on(L.Events.FRAG_LOADED,this.onFragLoaded,this),u.on(L.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(L.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.on(L.Events.ERROR,this.onError,this)},A.unregisterListeners=function(){var u=this.hls;u.off(L.Events.FRAG_LOADING,this.onFragLoading,this),u.off(L.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(L.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(L.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.off(L.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(u,a){var l=a.frag;if(l.type===I.PlaylistLevelType.MAIN&&!this.timer){var s;this.fragCurrent=l,this.partCurrent=(s=a.part)!=null?s:null,this.timer=self.setInterval(this.onCheck,100)}},A.onLevelLoaded=function(u,a){var l=this.hls.config;a.details.live?this.bwEstimator.update(l.abrEwmaSlowLive,l.abrEwmaFastLive):this.bwEstimator.update(l.abrEwmaSlowVoD,l.abrEwmaFastVoD)},A._abandonRulesCheck=function(){var u=this.fragCurrent,a=this.partCurrent,l=this.hls,s=l.autoLevelEnabled,p=l.config,d=l.media;if(!u||!d)return;var h=a?a.stats:u.stats,D=a?a.duration:u.duration;if(h.aborted){M.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!s||d.paused||!d.playbackRate||!d.readyState)return;var v=performance.now()-h.loading.start,f=Math.abs(d.playbackRate);if(v<=500*D/f)return;var m=l.levels,c=l.minAutoLevel,o=m[u.level],x=h.total||Math.max(h.loaded,Math.round(D*o.maxBitrate/8)),y=Math.max(1,h.bwEstimate?h.bwEstimate/8:h.loaded*1e3/v),S=(x-h.loaded)/y,P=d.currentTime,F=(U.BufferHelper.bufferInfo(d,P,p.maxBufferHole).end-P)/f;if(F>=2*D/f||S<=F)return;var H=Number.POSITIVE_INFINITY,Y;for(Y=u.level-1;Y>c;Y--){var j=m[Y].maxBitrate;if(H=D*j/(8*.8*y),H<F)break}if(H>=S)return;var N=this.bwEstimator.getEstimate();M.logger.warn("Fragment "+u.sn+(a?" part "+a.index:"")+" of level "+u.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+Y+`
|
|
Current BW estimate: `+(Object(B.isFiniteNumber)(N)?(N/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+S.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+H.toFixed(3)+` s
|
|
Time to underbuffer: `+F.toFixed(3)+" s"),l.nextLoadLevel=Y,this.bwEstimator.sample(v,h.loaded),this.clearTimer(),u.loader&&(this.fragCurrent=this.partCurrent=null,u.loader.abort()),l.trigger(L.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:u,part:a,stats:h})},A.onFragLoaded=function(u,a){var l=a.frag,s=a.part;if(l.type===I.PlaylistLevelType.MAIN&&Object(B.isFiniteNumber)(l.sn)){var p=s?s.stats:l.stats,d=s?s.duration:l.duration;if(this.clearTimer(),this.lastLoadedFragLevel=l.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var h=this.hls.levels[l.level],D=(h.loaded?h.loaded.bytes:0)+p.loaded,v=(h.loaded?h.loaded.duration:0)+d;h.loaded={bytes:D,duration:v},h.realBitrate=Math.round(8*D/v)}if(l.bitrateTest){var f={stats:p,frag:l,part:s,id:l.type};this.onFragBuffered(L.Events.FRAG_BUFFERED,f),l.bitrateTest=!1}}},A.onFragBuffered=function(u,a){var l=a.frag,s=a.part,p=s?s.stats:l.stats;if(p.aborted)return;if(l.type!==I.PlaylistLevelType.MAIN||l.sn==="initSegment")return;var d=p.parsing.end-p.loading.start;this.bwEstimator.sample(d,p.loaded),p.bwEstimate=this.bwEstimator.getEstimate(),l.bitrateTest?this.bitrateTestDelay=d/1e3:this.bitrateTestDelay=0},A.onError=function(u,a){switch(a.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 u=this.fragCurrent,a=this.partCurrent,l=this.hls,s=l.maxAutoLevel,p=l.config,d=l.minAutoLevel,h=l.media,D=a?a.duration:u?u.duration:0,v=h?h.currentTime:0,f=h&&h.playbackRate!==0?Math.abs(h.playbackRate):1,m=this.bwEstimator?this.bwEstimator.getEstimate():p.abrEwmaDefaultEstimate,c=(U.BufferHelper.bufferInfo(h,v,p.maxBufferHole).end-v)/f,o=this.findBestLevel(m,d,s,c,p.abrBandWidthFactor,p.abrBandWidthUpFactor);if(o>=0)return o;M.logger.trace((c?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var x=D?Math.min(D,p.maxStarvationDelay):p.maxStarvationDelay,y=p.abrBandWidthFactor,S=p.abrBandWidthUpFactor;if(!c){var P=this.bitrateTestDelay;if(P){var F=D?Math.min(D,p.maxLoadingDelay):p.maxLoadingDelay;x=F-P,M.logger.trace("bitrate test took "+Math.round(1e3*P)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*x)+" ms"),y=S=1}}return o=this.findBestLevel(m,d,s,c+x,y,S),Math.max(o,0)},A.findBestLevel=function(u,a,l,s,p,d){for(var h,D=this.fragCurrent,v=this.partCurrent,f=this.lastLoadedFragLevel,m=this.hls.levels,c=m[f],o=!!(c!=null&&(h=c.details)!==null&&h!==void 0&&h.live),x=c==null?void 0:c.codecSet,y=v?v.duration:D?D.duration:0,S=l;S>=a;S--){var P=m[S];if(!P||x&&P.codecSet!==x)continue;var F=P.details,H=(v?F==null?void 0:F.partTarget:F==null?void 0:F.averagetargetduration)||y,Y=void 0;S<=f?Y=p*u:Y=d*u;var j=m[S].maxBitrate,N=j*H/Y;if(M.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+S+"/"+Math.round(Y)+"/"+j+"/"+H+"/"+s+"/"+N),Y>j&&(!N||o&&!this.bitrateTestDelay||N<s))return S}return-1},E(w,[{key:"nextAutoLevel",get:function(){var u=this._nextAutoLevel,a=this.bwEstimator;if(u!==-1&&(!a||!a.canEstimate()))return u;var l=this.getNextABRAutoLevel();return u!==-1&&(l=Math.min(u,l)),l},set:function(u){this._nextAutoLevel=u}}]),w}();K.default=R},"./src/controller/audio-stream-controller.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/polyfills/number.ts"),C=O("./src/controller/base-stream-controller.ts"),L=O("./src/events.ts"),U=O("./src/utils/buffer-helper.ts"),_=O("./src/controller/fragment-tracker.ts"),I=O("./src/types/level.ts"),M=O("./src/types/loader.ts"),b=O("./src/loader/fragment.ts"),E=O("./src/demux/chunk-cache.ts"),R=O("./src/demux/transmuxer-interface.ts"),w=O("./src/types/transmuxer.ts"),A=O("./src/controller/fragment-finders.ts"),g=O("./src/utils/discontinuities.ts"),u=O("./src/errors.ts"),a=O("./src/utils/logger.ts");function l(){return l=Object.assign||function(D){for(var v=1;v<arguments.length;v++){var f=arguments[v];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(D[m]=f[m])}return D},l.apply(this,arguments)}function s(D,v){D.prototype=Object.create(v.prototype),D.prototype.constructor=D,p(D,v)}function p(D,v){return p=Object.setPrototypeOf||function(m,c){return m.__proto__=c,m},p(D,v)}var d=100,h=function(D){s(v,D);function v(m,c){var o;return o=D.call(this,m,c,"[audio-stream-controller]")||this,o.videoBuffer=null,o.videoTrackCC=-1,o.waitingVideoCC=-1,o.audioSwitch=!1,o.trackId=-1,o.waitingData=null,o.mainDetails=null,o.bufferFlushed=!1,o._registerListeners(),o}var f=v.prototype;return f.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},f._registerListeners=function(){var c=this.hls;c.on(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(L.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.on(L.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),c.on(L.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),c.on(L.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),c.on(L.Events.ERROR,this.onError,this),c.on(L.Events.BUFFER_RESET,this.onBufferReset,this),c.on(L.Events.BUFFER_CREATED,this.onBufferCreated,this),c.on(L.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),c.on(L.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),c.on(L.Events.FRAG_BUFFERED,this.onFragBuffered,this)},f._unregisterListeners=function(){var c=this.hls;c.off(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(L.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.off(L.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),c.off(L.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),c.off(L.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),c.off(L.Events.ERROR,this.onError,this),c.off(L.Events.BUFFER_RESET,this.onBufferReset,this),c.off(L.Events.BUFFER_CREATED,this.onBufferCreated,this),c.off(L.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),c.off(L.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),c.off(L.Events.FRAG_BUFFERED,this.onFragBuffered,this)},f.onInitPtsFound=function(c,o){var x=o.frag,y=o.id,S=o.initPTS;if(y==="main"){var P=x.cc;this.initPTS[x.cc]=S,this.log("InitPTS for cc: "+P+" found from main: "+S),this.videoTrackCC=P,this.state===C.State.WAITING_INIT_PTS&&this.tick()}},f.startLoad=function(c){if(!this.levels){this.startPosition=c,this.state=C.State.STOPPED;return}var o=this.lastCurrentTime;this.stopLoad(),this.setInterval(d),this.fragLoadError=0,o>0&&c===-1?(this.log("Override startPosition with lastCurrentTime @"+o.toFixed(3)),this.state=C.State.IDLE):(this.loadedmetadata=!1,this.state=C.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=c,this.tick()},f.doTick=function(){switch(this.state){case C.State.IDLE:this.doTickIdle();break;case C.State.WAITING_TRACK:{var c,o=this.levels,x=this.trackId,y=o==null||((c=o[x])===null||c===void 0)?void 0:c.details;if(y){if(this.waitForCdnTuneIn(y))break;this.state=C.State.WAITING_INIT_PTS}break}case C.State.FRAG_LOADING_WAITING_RETRY:{var S,P=performance.now(),F=this.retryDate;(!F||P>=F||(S=this.media)!==null&&S!==void 0&&S.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=C.State.IDLE);break}case C.State.WAITING_INIT_PTS:{var H=this.waitingData;if(H){var Y=H.frag,j=H.part,N=H.cache,Z=H.complete;if(this.initPTS[Y.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=C.State.FRAG_LOADING;var ne=N.flush(),pe={frag:Y,part:j,payload:ne,networkDetails:null};this._handleFragmentLoadProgress(pe),Z&&D.prototype._handleFragmentLoadComplete.call(this,pe)}else if(this.videoTrackCC!==this.waitingVideoCC)a.logger.log("Waiting fragment cc ("+Y.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var xe=this.getLoadPosition(),je=U.BufferHelper.bufferInfo(this.mediaBuffer,xe,this.config.maxBufferHole),Le=Object(A.fragmentWithinToleranceTest)(je.end,this.config.maxFragLookUpTolerance,Y);Le<0&&(a.logger.log("Waiting fragment cc ("+Y.cc+") @ "+Y.start+" cancelled because another fragment at "+je.end+" is needed"),this.clearWaitingFragment())}}else this.state=C.State.IDLE}}this.onTickEnd()},f.clearWaitingFragment=function(){var c=this.waitingData;c&&(this.fragmentTracker.removeFragment(c.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=C.State.IDLE)},f.onTickEnd=function(){var c=this.media;if(!c||!c.readyState)return;var o=this.mediaBuffer?this.mediaBuffer:c,x=o.buffered;!this.loadedmetadata&&x.length&&(this.loadedmetadata=!0),this.lastCurrentTime=c.currentTime},f.doTickIdle=function(){var c,o,x=this.hls,y=this.levels,S=this.media,P=this.trackId,F=x.config;if(!y||!y[P])return;if(!S&&(this.startFragRequested||!F.startFragPrefetch))return;var H=y[P],Y=H.details;if(!Y||Y.live&&this.levelLastLoaded!==P||this.waitForCdnTuneIn(Y)){this.state=C.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,b.ElementaryStreamTypes.AUDIO,M.PlaylistLevelType.AUDIO));var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,M.PlaylistLevelType.AUDIO);if(j===null)return;var N=j.len,Z=this.getMaxBufferLength(),ne=this.audioSwitch;if(N>=Z&&!ne)return;if(!ne&&this._streamEnded(j,Y)){x.trigger(L.Events.BUFFER_EOS,{type:"audio"}),this.state=C.State.ENDED;return}var pe=Y.fragments,xe=pe[0].start,je=j.end;if(ne){var Le=this.getLoadPosition();je=Le,Y.PTSKnown&&Le<xe&&((j.end>xe||j.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),S.currentTime=xe+.05))}var De=this.getNextFragment(je,Y);if(!De){this.bufferFlushed=!0;return}((c=De.decryptdata)===null||c===void 0?void 0:c.keyFormat)==="identity"&&!((o=De.decryptdata)!==null&&o!==void 0&&o.key)?this.loadKey(De,Y):this.loadFragment(De,Y,je)},f.getMaxBufferLength=function(){var c=D.prototype.getMaxBufferLength.call(this),o=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,M.PlaylistLevelType.MAIN);return o===null?c:Math.max(c,o.len)},f.onMediaDetaching=function(){this.videoBuffer=null,D.prototype.onMediaDetaching.call(this)},f.onAudioTracksUpdated=function(c,o){var x=o.audioTracks;this.resetTransmuxer(),this.levels=x.map(function(y){return new I.Level(y)})},f.onAudioTrackSwitching=function(c,o){var x=!!o.url;this.trackId=o.id;var y=this.fragCurrent;y!=null&&y.loader&&y.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),x?this.setInterval(d):this.resetTransmuxer(),x?(this.audioSwitch=!0,this.state=C.State.IDLE):this.state=C.State.STOPPED,this.tick()},f.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},f.onLevelLoaded=function(c,o){this.mainDetails=o.details},f.onAudioTrackLoaded=function(c,o){var x,y=this.levels,S=o.details,P=o.id;if(!y){this.warn("Audio tracks were reset while loading level "+P);return}this.log("Track "+P+" loaded ["+S.startSN+","+S.endSN+"],duration:"+S.totalduration);var F=y[P],H=0;if(S.live||(x=F.details)!==null&&x!==void 0&&x.live){var Y=this.mainDetails;if(S.fragments[0]||(S.deltaUpdateFailed=!0),S.deltaUpdateFailed||!Y)return;!F.details&&S.hasProgramDateTime&&Y.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(S,Y),H=S.fragments[0].start):H=this.alignPlaylists(S,F.details)}F.details=S,this.levelLastLoaded=P,!this.startFragRequested&&(this.mainDetails||!S.live)&&this.setStartPosition(F.details,H),this.state===C.State.WAITING_TRACK&&!this.waitForCdnTuneIn(S)&&(this.state=C.State.IDLE),this.tick()},f._handleFragmentLoadProgress=function(c){var o,x=c.frag,y=c.part,S=c.payload,P=this.config,F=this.trackId,H=this.levels;if(!H){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+x.sn+" of level "+x.level+" will not be buffered");return}var Y=H[F];console.assert(Y,"Audio track is defined on fragment load progress");var j=Y.details;console.assert(j,"Audio track details are defined on fragment load progress");var N=P.defaultAudioCodec||Y.audioCodec||"mp4a.40.2",Z=this.transmuxer;Z||(Z=this.transmuxer=new R.default(this.hls,M.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ne=this.initPTS[x.cc],pe=(o=x.initSegment)===null||o===void 0?void 0:o.data;if(ne!==void 0){var xe=!1,je=y?y.index:-1,Le=je!==-1,De=new w.ChunkMetadata(x.level,x.sn,x.stats.chunkCount,S.byteLength,je,Le);Z.push(S,pe,N,"",x,y,j.totalduration,xe,De,ne)}else{a.logger.log("Unknown video PTS for cc "+x.cc+", waiting for video PTS before demuxing audio frag "+x.sn+" of ["+j.startSN+" ,"+j.endSN+"],track "+F);var Ce=this.waitingData=this.waitingData||{frag:x,part:y,cache:new E.default,complete:!1},we=Ce.cache;we.push(new Uint8Array(S)),this.waitingVideoCC=this.videoTrackCC,this.state=C.State.WAITING_INIT_PTS}},f._handleFragmentLoadComplete=function(c){if(this.waitingData){this.waitingData.complete=!0;return}D.prototype._handleFragmentLoadComplete.call(this,c)},f.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},f.onBufferCreated=function(c,o){var x=o.tracks.audio;x&&(this.mediaBuffer=x.buffer),o.tracks.video&&(this.videoBuffer=o.tracks.video.buffer)},f.onFragBuffered=function(c,o){var x=o.frag,y=o.part;if(x.type!==M.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(x)){this.warn("Fragment "+x.sn+(y?" p: "+y.index:"")+" of level "+x.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}x.sn!=="initSegment"&&(this.fragPrevious=x,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(L.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(x,y)},f.onError=function(c,o){switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(M.PlaylistLevelType.AUDIO,o);break;case u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==C.State.ERROR&&this.state!==C.State.STOPPED&&(this.state=o.fatal?C.State.ERROR:C.State.IDLE,this.warn(o.details+" while loading frag, switching to "+this.state+" state"));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="audio"&&(this.state===C.State.PARSING||this.state===C.State.PARSED)){var x=!0,y=this.getFwdBufferInfo(this.mediaBuffer,M.PlaylistLevelType.AUDIO);y&&y.len>.5&&(x=!this.reduceMaxBufferLength(y.len)),x&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},f.onBufferFlushed=function(c,o){var x=o.type;x===b.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},f._handleTransmuxComplete=function(c){var o,x="audio",y=this.hls,S=c.remuxResult,P=c.chunkMeta,F=this.getCurrentContext(P);if(!F){this.warn("The loading context changed while buffering fragment "+P.sn+" of level "+P.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(P.level);return}var H=F.frag,Y=F.part,j=S.audio,N=S.text,Z=S.id3,ne=S.initSegment;if(this.fragContextChanged(H))return;if(this.state=C.State.PARSING,this.audioSwitch&&j&&this.completeAudioSwitch(),ne!=null&&ne.tracks&&(this._bufferInitSegment(ne.tracks,H,P),y.trigger(L.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:x,tracks:ne.tracks})),j){var pe=j.startPTS,xe=j.endPTS,je=j.startDTS,Le=j.endDTS;Y&&(Y.elementaryStreams[b.ElementaryStreamTypes.AUDIO]={startPTS:pe,endPTS:xe,startDTS:je,endDTS:Le}),H.setElementaryStreamInfo(b.ElementaryStreamTypes.AUDIO,pe,xe,je,Le),this.bufferFragmentData(j,H,Y,P)}if(Z!=null&&(o=Z.samples)!==null&&o!==void 0&&o.length){var De=l({frag:H,id:x},Z);y.trigger(L.Events.FRAG_PARSING_METADATA,De)}if(N){var Ce=l({frag:H,id:x},N);y.trigger(L.Events.FRAG_PARSING_USERDATA,Ce)}},f._bufferInitSegment=function(c,o,x){if(this.state!==C.State.PARSING)return;c.video&&delete c.video;var y=c.audio;if(!y)return;y.levelCodec=y.codec,y.id="audio",this.log("Init audio buffer, container:"+y.container+", codecs[parsed]=["+y.codec+"]"),this.hls.trigger(L.Events.BUFFER_CODECS,c);var S=y.initSegment;if(S!=null&&S.byteLength){var P={type:"audio",frag:o,part:null,chunkMeta:x,parent:o.type,data:S};this.hls.trigger(L.Events.BUFFER_APPENDING,P)}this.tick()},f.loadFragment=function(c,o,x){var y=this.fragmentTracker.getState(c);this.fragCurrent=c,(this.audioSwitch||y===_.FragmentState.NOT_LOADED||y===_.FragmentState.PARTIAL)&&(c.sn==="initSegment"?this._loadInitSegment(c):o.live&&!Object(B.isFiniteNumber)(this.initPTS[c.cc])?(this.log("Waiting for video PTS in continuity counter "+c.cc+" of live stream before loading audio fragment "+c.sn+" of level "+this.trackId),this.state=C.State.WAITING_INIT_PTS):(this.startFragRequested=!0,D.prototype.loadFragment.call(this,c,o,x)))},f.completeAudioSwitch=function(){var c=this.hls,o=this.media,x=this.trackId;o&&(this.log("Switching audio track : flushing all audio"),D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,c.trigger(L.Events.AUDIO_TRACK_SWITCHED,{id:x})},v}(C.default);K.default=h},"./src/controller/audio-track-controller.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/events.ts"),C=O("./src/errors.ts"),L=O("./src/controller/base-playlist-controller.ts"),U=O("./src/types/loader.ts");function _(R,w){for(var A=0;A<w.length;A++){var g=w[A];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(R,g.key,g)}}function I(R,w,A){return w&&_(R.prototype,w),A&&_(R,A),R}function M(R,w){R.prototype=Object.create(w.prototype),R.prototype.constructor=R,b(R,w)}function b(R,w){return b=Object.setPrototypeOf||function(g,u){return g.__proto__=u,g},b(R,w)}var E=function(R){M(w,R);function w(g){var u;return u=R.call(this,g,"[audio-track-controller]")||this,u.tracks=[],u.groupId=null,u.tracksInGroup=[],u.trackId=-1,u.trackName="",u.selectDefaultTrack=!0,u.registerListeners(),u}var A=w.prototype;return A.registerListeners=function(){var u=this.hls;u.on(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(B.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(B.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(B.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.on(B.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.on(B.Events.ERROR,this.onError,this)},A.unregisterListeners=function(){var u=this.hls;u.off(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(B.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(B.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(B.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.off(B.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.off(B.Events.ERROR,this.onError,this)},A.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,R.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(u,a){this.tracks=a.audioTracks||[]},A.onAudioTrackLoaded=function(u,a){var l=a.id,s=a.details,p=this.tracksInGroup[l];if(!p){this.warn("Invalid audio track id "+l);return}var d=p.details;p.details=a.details,this.log("audioTrack "+l+" loaded ["+s.startSN+"-"+s.endSN+"]"),l===this.trackId&&(this.retryCount=0,this.playlistLoaded(l,a,d))},A.onLevelLoading=function(u,a){this.switchLevel(a.level)},A.onLevelSwitching=function(u,a){this.switchLevel(a.level)},A.switchLevel=function(u){var a=this.hls.levels[u];if(!(a!=null&&a.audioGroupIds))return;var l=a.audioGroupIds[a.urlId];if(this.groupId!==l){this.groupId=l;var s=this.tracks.filter(function(d){return!l||d.groupId===l});this.selectDefaultTrack&&!s.some(function(d){return d.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=s;var p={audioTracks:s};this.log("Updating audio tracks, "+s.length+' track(s) found in "'+l+'" group-id'),this.hls.trigger(B.Events.AUDIO_TRACKS_UPDATED,p),this.selectInitialTrack()}},A.onError=function(u,a){if(R.prototype.onError.call(this,u,a),a.fatal||!a.context)return;a.context.type===U.PlaylistContextType.AUDIO_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},A.setAudioTrack=function(u){var a=this.tracksInGroup;if(u<0||u>=a.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var l=a[this.trackId];this.log("Now switching to audio-track index "+u);var s=a[u],p=s.id,d=s.groupId,h=d===void 0?"":d,D=s.name,v=s.type,f=s.url;if(this.trackId=u,this.trackName=D,this.selectDefaultTrack=!1,this.hls.trigger(B.Events.AUDIO_TRACK_SWITCHING,{id:p,groupId:h,name:D,type:v,url:f}),s.details&&!s.details.live)return;var m=this.switchParams(s.url,l==null?void 0:l.details);this.loadPlaylist(m)},A.selectInitialTrack=function(){var u=this.tracksInGroup;console.assert(u.length,"Initial audio track should be selected when tracks are known");var a=this.trackName,l=this.findTrackId(a)||this.findTrackId();l!==-1?this.setAudioTrack(l):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(B.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},A.findTrackId=function(u){for(var a=this.tracksInGroup,l=0;l<a.length;l++){var s=a[l];if((!this.selectDefaultTrack||s.default)&&(!u||u===s.name))return s.id}return-1},A.loadPlaylist=function(u){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var l=a.id,s=a.groupId,p=a.url;if(u)try{p=u.addDirectives(p)}catch(d){this.warn("Could not construct new URL with HLS Delivery Directives: "+d)}this.log("loading audio-track playlist for id: "+l),this.clearTimer(),this.hls.trigger(B.Events.AUDIO_TRACK_LOADING,{url:p,id:l,groupId:s,deliveryDirectives:u||null})}},I(w,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(u){this.selectDefaultTrack=!1,this.setAudioTrack(u)}}]),w}(L.default);K.default=E},"./src/controller/base-playlist-controller.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return I});var B=O("./src/polyfills/number.ts"),C=O("./src/types/level.ts"),L=O("./src/controller/level-helper.ts"),U=O("./src/utils/logger.ts"),_=O("./src/errors.ts"),I=function(){function M(E,R){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,R+":"),this.warn=U.logger.warn.bind(U.logger,R+":"),this.hls=E}var b=M.prototype;return b.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},b.onError=function(R,w){w.fatal&&w.type===_.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},b.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},b.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},b.stopLoad=function(){this.canLoad=!1,this.clearTimer()},b.switchParams=function(R,w){var A=w==null?void 0:w.renditionReports;if(A)for(var g=0;g<A.length;g++){var u=A[g],a=""+u.URI;if(a===R.substr(-a.length)){var l=parseInt(u["LAST-MSN"]),s=parseInt(u["LAST-PART"]);if(w&&this.hls.config.lowLatencyMode){var p=Math.min(w.age-w.partTarget,w.targetduration);s!==void 0&&p>w.partTarget&&(s+=1)}if(Object(B.isFiniteNumber)(l))return new C.HlsUrlParameters(l,Object(B.isFiniteNumber)(s)?s:void 0,C.HlsSkip.No)}}},b.loadPlaylist=function(R){},b.shouldLoadTrack=function(R){return this.canLoad&&R&&!!R.url&&(!R.details||R.details.live)},b.playlistLoaded=function(R,w,A){var g=this,u=w.details,a=w.stats,l=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(u.advancedDateTime=Date.now()-l,u.live||A!=null&&A.live){if(u.reloaded(A),A&&this.log("live playlist "+R+" "+(u.advanced?"REFRESHED "+u.lastPartSn+"-"+u.lastPartIndex:"MISSED")),A&&u.fragments.length>0&&Object(L.mergeDetails)(A,u),!this.canLoad||!u.live)return;var s,p=void 0,d=void 0;if(u.canBlockReload&&u.endSN&&u.advanced){var h=this.hls.config.lowLatencyMode,D=u.lastPartSn,v=u.endSN,f=u.lastPartIndex,m=f!==-1,c=D===v,o=h?0:f;m?(p=c?v+1:D,d=c?o:f+1):p=v+1;var x=u.age,y=x+u.ageHeader,S=Math.min(y-u.partTarget,u.targetduration*1.5);if(S>0){if(A&&S>A.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+A.tuneInGoal+" to: "+S+" with playlist age: "+u.age),S=0;else{var P=Math.floor(S/u.targetduration);if(p+=P,d!==void 0){var F=Math.round(S%u.targetduration/u.partTarget);d+=F}this.log("CDN Tune-in age: "+u.ageHeader+"s last advanced "+x.toFixed(2)+"s goal: "+S+" skip sn "+P+" to part "+d)}u.tuneInGoal=S}if(s=this.getDeliveryDirectives(u,w.deliveryDirectives,p,d),h||!c){this.loadPlaylist(s);return}}else s=this.getDeliveryDirectives(u,w.deliveryDirectives,p,d);var H=Object(L.computeReloadInterval)(u,a);p!==void 0&&u.canBlockReload&&(H-=u.partTarget||1),this.log("reload live playlist "+R+" in "+Math.round(H)+" ms"),this.timer=self.setTimeout(function(){return g.loadPlaylist(s)},H)}else this.clearTimer()},b.getDeliveryDirectives=function(R,w,A,g){var u=Object(C.getSkipValue)(R,A);return w!=null&&w.skip&&R.deltaUpdateFailed&&(A=w.msn,g=w.part,u=C.HlsSkip.No),new C.HlsUrlParameters(A,g,u)},b.retryLoadingOrFail=function(R){var w=this,A=this.hls.config,g=this.retryCount<A.levelLoadingMaxRetry;if(g){var u;if(this.retryCount++,R.details.indexOf("LoadTimeOut")>-1&&(u=R.context)!==null&&u!==void 0&&u.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+R.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*A.levelLoadingRetryDelay,A.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return w.loadPlaylist()},a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+R.details+'"')}}else this.warn('cannot recover from error "'+R.details+'"'),this.clearTimer(),R.fatal=!0;return g},M}()},"./src/controller/base-stream-controller.ts":function($,K,O){"use strict";O.r(K),O.d(K,"State",function(){return v}),O.d(K,"default",function(){return f});var B=O("./src/polyfills/number.ts"),C=O("./src/task-loop.ts"),L=O("./src/controller/fragment-tracker.ts"),U=O("./src/utils/buffer-helper.ts"),_=O("./src/utils/logger.ts"),I=O("./src/events.ts"),M=O("./src/errors.ts"),b=O("./src/types/transmuxer.ts"),E=O("./src/utils/mp4-tools.ts"),R=O("./src/utils/discontinuities.ts"),w=O("./src/controller/fragment-finders.ts"),A=O("./src/controller/level-helper.ts"),g=O("./src/loader/fragment-loader.ts"),u=O("./src/crypt/decrypter.ts"),a=O("./src/utils/time-ranges.ts"),l=O("./src/types/loader.ts");function s(m,c){for(var o=0;o<c.length;o++){var x=c[o];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}function p(m,c,o){return c&&s(m.prototype,c),o&&s(m,o),m}function d(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function h(m,c){m.prototype=Object.create(c.prototype),m.prototype.constructor=m,D(m,c)}function D(m,c){return D=Object.setPrototypeOf||function(x,y){return x.__proto__=y,x},D(m,c)}var v={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(m){h(c,m);function c(x,y,S){var P;return P=m.call(this)||this,P.hls=void 0,P.fragPrevious=null,P.fragCurrent=null,P.fragmentTracker=void 0,P.transmuxer=null,P._state=v.STOPPED,P.media=void 0,P.mediaBuffer=void 0,P.config=void 0,P.bitrateTest=!1,P.lastCurrentTime=0,P.nextLoadPosition=0,P.startPosition=0,P.loadedmetadata=!1,P.fragLoadError=0,P.retryDate=0,P.levels=null,P.fragmentLoader=void 0,P.levelLastLoaded=null,P.startFragRequested=!1,P.decrypter=void 0,P.initPTS=[],P.onvseeking=null,P.onvended=null,P.logPrefix="",P.log=void 0,P.warn=void 0,P.logPrefix=S,P.log=_.logger.log.bind(_.logger,S+":"),P.warn=_.logger.warn.bind(_.logger,S+":"),P.hls=x,P.fragmentLoader=new g.default(x.config),P.fragmentTracker=y,P.config=x.config,P.decrypter=new u.default(x,x.config),x.on(I.Events.KEY_LOADED,P.onKeyLoaded,d(P)),P}var o=c.prototype;return o.doTick=function(){this.onTickEnd()},o.onTickEnd=function(){},o.startLoad=function(y){},o.stopLoad=function(){this.fragmentLoader.abort();var y=this.fragCurrent;y&&this.fragmentTracker.removeFragment(y),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=v.STOPPED},o._streamEnded=function(y,S){var P=this.fragCurrent,F=this.fragmentTracker;if(!S.live&&P&&P.sn===S.endSN&&!y.nextStart){var H=F.getState(P);return H===L.FragmentState.PARTIAL||H===L.FragmentState.OK}return!1},o.onMediaAttached=function(y,S){var P=this.media=this.mediaBuffer=S.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),P.addEventListener("seeking",this.onvseeking),P.addEventListener("ended",this.onvended);var F=this.config;this.levels&&F.autoStartLoad&&this.state===v.STOPPED&&this.startLoad(F.startPosition)},o.onMediaDetaching=function(){var y=this.media;y!=null&&y.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),y&&(y.removeEventListener("seeking",this.onvseeking),y.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},o.onMediaSeeking=function(){var y=this.config,S=this.fragCurrent,P=this.media,F=this.mediaBuffer,H=this.state,Y=P?P.currentTime:0,j=U.BufferHelper.bufferInfo(F||P,Y,y.maxBufferHole);if(this.log("media seeking to "+(Object(B.isFiniteNumber)(Y)?Y.toFixed(3):Y)+", state: "+H),H===v.ENDED)this.resetLoadingState();else if(S&&!j.len){var N=y.maxFragLookUpTolerance,Z=S.start-N,ne=S.start+S.duration+N,pe=Y>ne;(Y<Z||pe)&&(pe&&S.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),S.loader.abort()),this.resetLoadingState())}P&&(this.lastCurrentTime=Y),!this.loadedmetadata&&!j.len&&(this.nextLoadPosition=this.startPosition=Y),this.tickImmediate()},o.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},o.onKeyLoaded=function(y,S){if(this.state!==v.KEY_LOADING||S.frag!==this.fragCurrent||!this.levels)return;this.state=v.IDLE;var P=this.levels[S.frag.level].details;P&&this.loadFragment(S.frag,P,S.frag.start)},o.onHandlerDestroying=function(){this.stopLoad(),m.prototype.onHandlerDestroying.call(this)},o.onHandlerDestroyed=function(){this.state=v.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,m.prototype.onHandlerDestroyed.call(this)},o.loadKey=function(y,S){this.log("Loading key for "+y.sn+" of ["+S.startSN+"-"+S.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+y.level),this.state=v.KEY_LOADING,this.fragCurrent=y,this.hls.trigger(I.Events.KEY_LOADING,{frag:y})},o.loadFragment=function(y,S,P){this._loadFragForPlayback(y,S,P)},o._loadFragForPlayback=function(y,S,P){var F=this,H=function(j){if(F.fragContextChanged(y)){F.warn("Fragment "+y.sn+(j.part?" p: "+j.part.index:"")+" of level "+y.level+" was dropped during download."),F.fragmentTracker.removeFragment(y);return}y.stats.chunkCount++,F._handleFragmentLoadProgress(j)};this._doFragLoad(y,S,P,H).then(function(Y){if(!Y)return;F.fragLoadError=0;var j=F.state;if(F.fragContextChanged(y)){(j===v.FRAG_LOADING||j===v.BACKTRACKING||!F.fragCurrent&&j===v.PARSING)&&(F.fragmentTracker.removeFragment(y),F.state=v.IDLE);return}if("payload"in Y&&(F.log("Loaded fragment "+y.sn+" of level "+y.level),F.hls.trigger(I.Events.FRAG_LOADED,Y),F.state===v.BACKTRACKING)){F.fragmentTracker.backtrack(y,Y),F.resetFragmentLoading(y);return}F._handleFragmentLoadComplete(Y)}).catch(function(Y){F.warn(Y),F.resetFragmentLoading(y)})},o.flushMainBuffer=function(y,S,P){if(P===void 0&&(P=null),!(y-S))return;var F={startOffset:y,endOffset:S,type:P};this.fragLoadError=0,this.hls.trigger(I.Events.BUFFER_FLUSHING,F)},o._loadInitSegment=function(y){var S=this;this._doFragLoad(y).then(function(P){if(!P||S.fragContextChanged(y)||!S.levels)throw new Error("init load aborted");return P}).then(function(P){var F=S.hls,H=P.payload,Y=y.decryptdata;if(H&&H.byteLength>0&&Y&&Y.key&&Y.iv&&Y.method==="AES-128"){var j=self.performance.now();return S.decrypter.webCryptoDecrypt(new Uint8Array(H),Y.key.buffer,Y.iv.buffer).then(function(N){var Z=self.performance.now();return F.trigger(I.Events.FRAG_DECRYPTED,{frag:y,payload:N,stats:{tstart:j,tdecrypt:Z}}),P.payload=N,P})}return P}).then(function(P){var F=S.fragCurrent,H=S.hls,Y=S.levels;if(!Y)throw new Error("init load aborted, missing levels");var j=Y[y.level].details;console.assert(j,"Level details are defined when init segment is loaded");var N=y.stats;S.state=v.IDLE,S.fragLoadError=0,y.data=new Uint8Array(P.payload),N.parsing.start=N.buffering.start=self.performance.now(),N.parsing.end=N.buffering.end=self.performance.now(),P.frag===F&&H.trigger(I.Events.FRAG_BUFFERED,{stats:N,frag:F,part:null,id:y.type}),S.tick()}).catch(function(P){S.warn(P),S.resetFragmentLoading(y)})},o.fragContextChanged=function(y){var S=this.fragCurrent;return!y||!S||y.level!==S.level||y.sn!==S.sn||y.urlId!==S.urlId},o.fragBufferedComplete=function(y,S){var P=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+y.type+" sn: "+y.sn+(S?" part: "+S.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+y.level+" "+a.default.toString(U.BufferHelper.getBuffered(P))),this.state=v.IDLE,this.tick()},o._handleFragmentLoadComplete=function(y){var S=this.transmuxer;if(!S)return;var P=y.frag,F=y.part,H=y.partsLoaded,Y=!H||H.length===0||H.some(function(N){return!N}),j=new b.ChunkMetadata(P.level,P.sn,P.stats.chunkCount+1,0,F?F.index:-1,!Y);S.flush(j)},o._handleFragmentLoadProgress=function(y){},o._doFragLoad=function(y,S,P,F){var H=this;if(P===void 0&&(P=null),!this.levels)throw new Error("frag load aborted, missing levels");if(P=Math.max(y.start,P||0),this.config.lowLatencyMode&&S){var Y=S.partList;if(Y&&F){P>y.end&&S.fragmentHint&&(y=S.fragmentHint);var j=this.getNextPart(Y,y,P);if(j>-1){var N=Y[j];return this.log("Loading part sn: "+y.sn+" p: "+N.index+" cc: "+y.cc+" of playlist ["+S.startSN+"-"+S.endSN+"] parts [0-"+j+"-"+(Y.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+y.level+", target: "+parseFloat(P.toFixed(3))),this.nextLoadPosition=N.start+N.duration,this.state=v.FRAG_LOADING,this.hls.trigger(I.Events.FRAG_LOADING,{frag:y,part:Y[j],targetBufferTime:P}),this.doFragPartsLoad(y,Y,j,F).catch(function(Z){return H.handleFragLoadError(Z)})}else if(!y.url||this.loadedEndOfParts(Y,P))return Promise.resolve(null)}}return this.log("Loading fragment "+y.sn+" cc: "+y.cc+" "+(S?"of ["+S.startSN+"-"+S.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+y.level+", target: "+parseFloat(P.toFixed(3))),Object(B.isFiniteNumber)(y.sn)&&!this.bitrateTest&&(this.nextLoadPosition=y.start+y.duration),this.state=v.FRAG_LOADING,this.hls.trigger(I.Events.FRAG_LOADING,{frag:y,targetBufferTime:P}),this.fragmentLoader.load(y,F).catch(function(Z){return H.handleFragLoadError(Z)})},o.doFragPartsLoad=function(y,S,P,F){var H=this;return new Promise(function(Y,j){var N=[],Z=function ne(pe){var xe=S[pe];H.fragmentLoader.loadPart(y,xe,F).then(function(je){N[xe.index]=je;var Le=je.part;H.hls.trigger(I.Events.FRAG_LOADED,je);var De=S[pe+1];if(De&&De.fragment===y)ne(pe+1);else return Y({frag:y,part:Le,partsLoaded:N})}).catch(j)};Z(P)})},o.handleFragLoadError=function(y){var S=y.data;return S&&S.details===M.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(S.frag,S.part):this.hls.trigger(I.Events.ERROR,S),null},o._handleTransmuxerFlush=function(y){var S=this.getCurrentContext(y);if(!S||this.state!==v.PARSING){this.fragCurrent||(this.state=v.IDLE);return}var P=S.frag,F=S.part,H=S.level,Y=self.performance.now();P.stats.parsing.end=Y,F&&(F.stats.parsing.end=Y),this.updateLevelTiming(P,F,H,y.partial)},o.getCurrentContext=function(y){var S=this.levels,P=y.level,F=y.sn,H=y.part;if(!S||!S[P])return this.warn("Levels object was unset while buffering fragment "+F+" of level "+P+". The current chunk will not be buffered."),null;var Y=S[P],j=H>-1?Object(A.getPartWith)(Y,F,H):null,N=j?j.fragment:Object(A.getFragmentWithSN)(Y,F,this.fragCurrent);return N?{frag:N,part:j,level:Y}:null},o.bufferFragmentData=function(y,S,P,F){if(!y||this.state!==v.PARSING)return;var H=y.data1,Y=y.data2,j=H;if(H&&Y&&(j=Object(E.appendUint8Array)(H,Y)),!j||!j.length)return;var N={type:y.type,frag:S,part:P,chunkMeta:F,parent:S.type,data:j};this.hls.trigger(I.Events.BUFFER_APPENDING,N),y.dropped&&y.independent&&!P&&this.flushBufferGap(S)},o.flushBufferGap=function(y){var S=this.media;if(!S)return;if(!U.BufferHelper.isBuffered(S,S.currentTime)){this.flushMainBuffer(0,y.start);return}var P=S.currentTime,F=U.BufferHelper.bufferInfo(S,P,0),H=y.duration,Y=Math.min(this.config.maxFragLookUpTolerance*2,H*.25),j=Math.max(Math.min(y.start-Y,F.end-Y),P+Y);y.start-j>Y&&this.flushMainBuffer(j,y.start)},o.getFwdBufferInfo=function(y,S){var P=this.config,F=this.getLoadPosition();if(!Object(B.isFiniteNumber)(F))return null;var H=U.BufferHelper.bufferInfo(y,F,P.maxBufferHole);if(H.len===0&&H.nextStart!==void 0){var Y=this.fragmentTracker.getBufferedFrag(F,S);if(Y&&H.nextStart<Y.end)return U.BufferHelper.bufferInfo(y,F,Math.max(H.nextStart,P.maxBufferHole))}return H},o.getMaxBufferLength=function(y){var S=this.config,P;return y?P=Math.max(8*S.maxBufferSize/y,S.maxBufferLength):P=S.maxBufferLength,Math.min(P,S.maxMaxBufferLength)},o.reduceMaxBufferLength=function(y){var S=this.config,P=y||S.maxBufferLength;return S.maxMaxBufferLength>=P?(S.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+S.maxMaxBufferLength+"s"),!0):!1},o.getNextFragment=function(y,S){var P,F,H=S.fragments,Y=H.length;if(!Y)return null;var j=this.config,N=H[0].start,Z;if(S.live){var ne=j.initialLiveManifestSize;if(Y<ne)return this.warn("Not enough fragments to start playback (have: "+Y+", need: "+ne+")"),null;!S.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(Z=this.getInitialLiveFragment(S,H),this.startPosition=Z?this.hls.liveSyncPosition||Z.start:y)}else y<=N&&(Z=H[0]);if(!Z){var pe=j.lowLatencyMode?S.partEnd:S.fragmentEnd;Z=this.getFragmentAtPosition(y,pe,S)}return(P=Z)!==null&&P!==void 0&&P.initSegment&&!((F=Z)!==null&&F!==void 0&&F.initSegment.data)&&!this.bitrateTest&&(Z=Z.initSegment),Z},o.getNextPart=function(y,S,P){for(var F=-1,H=!1,Y=!0,j=0,N=y.length;j<N;j++){var Z=y[j];if(Y=Y&&!Z.independent,F>-1&&P<Z.start)break;var ne=Z.loaded;!ne&&(H||Z.independent||Y)&&Z.fragment===S&&(F=j),H=ne}return F},o.loadedEndOfParts=function(y,S){var P=y[y.length-1];return P&&S>P.start&&P.loaded},o.getInitialLiveFragment=function(y,S){var P=this.fragPrevious,F=null;if(P){if(y.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+P.programDateTime),F=Object(w.findFragmentByPDT)(S,P.endProgramDateTime,this.config.maxFragLookUpTolerance)),!F){var H=P.sn+1;if(H>=y.startSN&&H<=y.endSN){var Y=S[H-y.startSN];P.cc===Y.cc&&(F=Y,this.log("Live playlist, switching playlist, load frag with next SN: "+F.sn))}F||(F=Object(w.findFragWithCC)(S,P.cc),F&&this.log("Live playlist, switching playlist, load frag with same CC: "+F.sn))}}else{var j=this.hls.liveSyncPosition;j!==null&&(F=this.getFragmentAtPosition(j,this.bitrateTest?y.fragmentEnd:y.edge,y))}return F},o.getFragmentAtPosition=function(y,S,P){var F=this.config,H=this.fragPrevious,Y=P.fragments,j=P.endSN,N=P.fragmentHint,Z=F.maxFragLookUpTolerance,ne=!!(F.lowLatencyMode&&P.partList&&N);ne&&N&&!this.bitrateTest&&(Y=Y.concat(N),j=N.sn);var pe;if(y<S){var xe=y>S-Z?0:Z;pe=Object(w.findFragmentByPTS)(H,Y,y,xe)}else pe=Y[Y.length-1];if(pe){var je=pe.sn-P.startSN,Le=H&&pe.level===H.level,De=Y[je+1],Ce=this.fragmentTracker.getState(pe);if(Ce===L.FragmentState.BACKTRACKED){pe=null;for(var we=je;Y[we]&&this.fragmentTracker.getState(Y[we])===L.FragmentState.BACKTRACKED;)H?pe=Y[we--]:pe=Y[--we];pe||(pe=De)}else H&&pe.sn===H.sn&&!ne&&(Le&&(pe.sn<j&&this.fragmentTracker.getState(De)!==L.FragmentState.OK?(this.log("SN "+pe.sn+" just loaded, load next one: "+De.sn),pe=De):pe=null))}return pe},o.synchronizeToLiveEdge=function(y){var S=this.config,P=this.media;if(!P)return;var F=this.hls.liveSyncPosition,H=P.currentTime,Y=y.fragments[0].start,j=y.edge,N=H>=Y-S.maxFragLookUpTolerance&&H<=j;if(F!==null&&P.duration>F&&(H<F||!N)){var Z=S.liveMaxLatencyDuration!==void 0?S.liveMaxLatencyDuration:S.liveMaxLatencyDurationCount*y.targetduration;(!N&&P.readyState<4||H<j-Z)&&(this.loadedmetadata||(this.nextLoadPosition=F),P.readyState&&(this.warn("Playback: "+H.toFixed(3)+" is located too far from the end of live sliding playlist: "+j+", reset currentTime to : "+F.toFixed(3)),P.currentTime=F))}},o.alignPlaylists=function(y,S){var P=this.levels,F=this.levelLastLoaded,H=this.fragPrevious,Y=F!==null?P[F]:null,j=y.fragments.length;if(!j)return this.warn("No fragments in live playlist"),0;var N=y.fragments[0].start,Z=!S,ne=y.alignedSliding&&Object(B.isFiniteNumber)(N);if(Z||!ne&&!N){Object(R.alignStream)(H,Y,y);var pe=y.fragments[0].start;return this.log("Live playlist sliding: "+pe.toFixed(2)+" start-sn: "+(S?S.startSN:"na")+"->"+y.startSN+" prev-sn: "+(H?H.sn:"na")+" fragments: "+j),pe}return N},o.waitForCdnTuneIn=function(y){var S=3;return y.live&&y.canBlockReload&&y.tuneInGoal>Math.max(y.partHoldBack,y.partTarget*S)},o.setStartPosition=function(y,S){var P=this.startPosition;if(P<S&&(P=-1),P===-1||this.lastCurrentTime===-1){var F=y.startTimeOffset;Object(B.isFiniteNumber)(F)?(P=S+F,F<0&&(P+=y.totalduration),P=Math.min(Math.max(S,P),S+y.totalduration),this.log("Start time offset "+F+" found in playlist, adjust startPosition to "+P),this.startPosition=P):y.live?P=this.hls.liveSyncPosition||S:this.startPosition=P=0,this.lastCurrentTime=P}this.nextLoadPosition=P},o.getLoadPosition=function(){var y=this.media,S=0;return this.loadedmetadata&&y?S=y.currentTime:this.nextLoadPosition&&(S=this.nextLoadPosition),S},o.handleFragLoadAborted=function(y,S){this.transmuxer&&y.sn!=="initSegment"&&y.stats.aborted&&(this.warn("Fragment "+y.sn+(S?" part"+S.index:"")+" of level "+y.level+" was aborted"),this.resetFragmentLoading(y))},o.resetFragmentLoading=function(y){(!this.fragCurrent||!this.fragContextChanged(y))&&(this.state=v.IDLE)},o.onFragmentOrKeyLoadError=function(y,S){if(S.fatal)return;var P=S.frag;if(!P||P.type!==y)return;var F=this.fragCurrent;console.assert(F&&P.sn===F.sn&&P.level===F.level&&P.urlId===F.urlId,"Frag load error must match current frag to retry");var H=this.config;if(this.fragLoadError+1<=H.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(P.level))return;var Y=Math.min(Math.pow(2,this.fragLoadError)*H.fragLoadingRetryDelay,H.fragLoadingMaxRetryTimeout);this.warn("Fragment "+P.sn+" of "+y+" "+P.level+" failed to load, retrying in "+Y+"ms"),this.retryDate=self.performance.now()+Y,this.fragLoadError++,this.state=v.FRAG_LOADING_WAITING_RETRY}else S.levelRetry?(y===l.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=v.IDLE):(_.logger.error(S.details+" reaches max retry, redispatch as fatal ..."),S.fatal=!0,this.hls.stopLoad(),this.state=v.ERROR)},o.afterBufferFlushed=function(y,S,P){if(!y)return;var F=U.BufferHelper.getBuffered(y);this.fragmentTracker.detectEvictedFragments(S,F,P),this.state===v.ENDED&&this.resetLoadingState()},o.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=v.IDLE},o.resetLiveStartWhenNotLoaded=function(y){if(!this.loadedmetadata){this.startFragRequested=!1;var S=this.levels?this.levels[y].details:null;if(S!=null&&S.live)return this.startPosition=-1,this.setStartPosition(S,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},o.updateLevelTiming=function(y,S,P,F){var H=this,Y=P.details;console.assert(!!Y,"level.details must be defined");var j=Object.keys(y.elementaryStreams).reduce(function(N,Z){var ne=y.elementaryStreams[Z];if(ne){var pe=ne.endPTS-ne.startPTS;if(pe<=0)return H.warn("Could not parse fragment "+y.sn+" "+Z+" duration reliably ("+pe+") resetting transmuxer to fallback to playlist timing"),H.resetTransmuxer(),N||!1;var xe=F?0:Object(A.updateFragPTSDTS)(Y,y,ne.startPTS,ne.endPTS,ne.startDTS,ne.endDTS);return H.hls.trigger(I.Events.LEVEL_PTS_UPDATED,{details:Y,level:P,drift:xe,type:Z,frag:y,start:ne.startPTS,end:ne.endPTS}),!0}return N},!1);j?(this.state=v.PARSED,this.hls.trigger(I.Events.FRAG_PARSED,{frag:y,part:S})):this.resetLoadingState()},o.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},p(c,[{key:"state",get:function(){return this._state},set:function(y){var S=this._state;S!==y&&(this._state=y,this.log(S+"->"+y))}}]),c}(C.default)},"./src/controller/buffer-controller.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return w});var B=O("./src/polyfills/number.ts"),C=O("./src/events.ts"),L=O("./src/utils/logger.ts"),U=O("./src/errors.ts"),_=O("./src/utils/buffer-helper.ts"),I=O("./src/utils/mediasource-helper.ts"),M=O("./src/loader/fragment.ts"),b=O("./src/controller/buffer-operation-queue.ts"),E=Object(I.getMediaSource)(),R=/([ha]vc.)(?:\.[^.,]+)+/,w=function(){function A(u){var a=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=a.hls,s=a.media,p=a.mediaSource;L.logger.log("[buffer-controller]: Media source opened"),s&&(a.updateMediaElementDuration(),l.trigger(C.Events.MEDIA_ATTACHED,{media:s})),p&&p.removeEventListener("sourceopen",a._onMediaSourceOpen),a.checkPendingTracks()},this._onMediaSourceClose=function(){L.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){L.logger.log("[buffer-controller]: Media source ended")},this.hls=u,this._initSourceBuffer(),this.registerListeners()}var g=A.prototype;return g.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},g.destroy=function(){this.unregisterListeners(),this.details=null},g.registerListeners=function(){var a=this.hls;a.on(C.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(C.Events.BUFFER_RESET,this.onBufferReset,this),a.on(C.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(C.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(C.Events.BUFFER_EOS,this.onBufferEos,this),a.on(C.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(C.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(C.Events.FRAG_PARSED,this.onFragParsed,this),a.on(C.Events.FRAG_CHANGED,this.onFragChanged,this)},g.unregisterListeners=function(){var a=this.hls;a.off(C.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(C.Events.BUFFER_RESET,this.onBufferReset,this),a.off(C.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(C.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(C.Events.BUFFER_EOS,this.onBufferEos,this),a.off(C.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(C.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(C.Events.FRAG_PARSED,this.onFragParsed,this),a.off(C.Events.FRAG_CHANGED,this.onFragChanged,this)},g._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new b.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},g.onManifestParsed=function(a,l){var s=2;(l.audio&&!l.video||!l.altAudio)&&(s=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=s,this.details=null,L.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},g.onMediaAttaching=function(a,l){var s=this.media=l.media;if(s&&E){var p=this.mediaSource=new E;p.addEventListener("sourceopen",this._onMediaSourceOpen),p.addEventListener("sourceended",this._onMediaSourceEnded),p.addEventListener("sourceclose",this._onMediaSourceClose),s.src=self.URL.createObjectURL(p),this._objectUrl=s.src}},g.onMediaDetaching=function(){var a=this.media,l=this.mediaSource,s=this._objectUrl;if(l){if(L.logger.log("[buffer-controller]: media source detaching"),l.readyState==="open")try{l.endOfStream()}catch(p){L.logger.warn("[buffer-controller]: onMediaDetaching: "+p.message+" while calling endOfStream")}this.onBufferReset(),l.removeEventListener("sourceopen",this._onMediaSourceOpen),l.removeEventListener("sourceended",this._onMediaSourceEnded),l.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(s&&self.URL.revokeObjectURL(s),a.src===s?(a.removeAttribute("src"),a.load()):L.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(C.Events.MEDIA_DETACHED,void 0)},g.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(l){var s=a.sourceBuffer[l];try{s&&(a.removeBufferListeners(l),a.mediaSource&&a.mediaSource.removeSourceBuffer(s),a.sourceBuffer[l]=void 0)}catch(p){L.logger.warn("[buffer-controller]: Failed to reset the "+l+" buffer",p)}}),this._initSourceBuffer()},g.onBufferCodecs=function(a,l){var s=this,p=this.getSourceBufferTypes().length;if(Object.keys(l).forEach(function(d){if(p){var h=s.tracks[d];if(h&&typeof h.buffer.changeType=="function"){var D=l[d],v=D.codec,f=D.levelCodec,m=D.container,c=(h.levelCodec||h.codec).replace(R,"$1"),o=(f||v).replace(R,"$1");if(c!==o){var x=m+";codecs="+(f||v);s.appendChangeType(d,x)}}}else s.pendingTracks[d]=l[d]}),p)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},g.appendChangeType=function(a,l){var s=this,p=this.operationQueue,d={execute:function(){var D=s.sourceBuffer[a];D&&(L.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+l),D.changeType(l)),p.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(D){L.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",D)}};p.append(d,a)},g.onBufferAppending=function(a,l){var s=this,p=this.hls,d=this.operationQueue,h=this.tracks,D=l.data,v=l.type,f=l.frag,m=l.part,c=l.chunkMeta,o=c.buffering[v],x=self.performance.now();o.start=x;var y=f.stats.buffering,S=m?m.stats.buffering:null;y.start===0&&(y.start=x),S&&S.start===0&&(S.start=x);var P=h.audio,F=v==="audio"&&c.id===1&&(P==null?void 0:P.container)==="audio/mpeg",H={execute:function(){if(o.executeStart=self.performance.now(),F){var j=s.sourceBuffer[v];if(j){var N=f.start-j.timestampOffset;Math.abs(N)>=.1&&(L.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+f.start+" (delta: "+N+") sn: "+f.sn+")"),j.timestampOffset=f.start)}}s.appendExecutor(D,v)},onStart:function(){},onComplete:function(){var j=self.performance.now();o.executeEnd=o.end=j,y.first===0&&(y.first=j),S&&S.first===0&&(S.first=j);var N=s.sourceBuffer,Z={};for(var ne in N)Z[ne]=_.BufferHelper.getBuffered(N[ne]);s.appendError=0,s.hls.trigger(C.Events.BUFFER_APPENDED,{type:v,frag:f,part:m,chunkMeta:c,parent:f.type,timeRanges:Z})},onError:function(j){L.logger.error("[buffer-controller]: Error encountered while trying to append to the "+v+" SourceBuffer",j);var N={type:U.ErrorTypes.MEDIA_ERROR,parent:f.type,details:U.ErrorDetails.BUFFER_APPEND_ERROR,err:j,fatal:!1};j.code===DOMException.QUOTA_EXCEEDED_ERR?N.details=U.ErrorDetails.BUFFER_FULL_ERROR:(s.appendError++,N.details=U.ErrorDetails.BUFFER_APPEND_ERROR,s.appendError>p.config.appendErrorMaxRetry&&(L.logger.error("[buffer-controller]: Failed "+p.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),N.fatal=!0)),p.trigger(C.Events.ERROR,N)}};d.append(H,v)},g.onBufferFlushing=function(a,l){var s=this,p=this.operationQueue,d=function(D){return{execute:s.removeExecutor.bind(s,D,l.startOffset,l.endOffset),onStart:function(){},onComplete:function(){s.hls.trigger(C.Events.BUFFER_FLUSHED,{type:D})},onError:function(f){L.logger.warn("[buffer-controller]: Failed to remove from "+D+" SourceBuffer",f)}}};l.type?p.append(d(l.type),l.type):this.getSourceBufferTypes().forEach(function(h){p.append(d(h),h)})},g.onFragParsed=function(a,l){var s=this,p=l.frag,d=l.part,h=[],D=d?d.elementaryStreams:p.elementaryStreams;D[M.ElementaryStreamTypes.AUDIOVIDEO]?h.push("audiovideo"):(D[M.ElementaryStreamTypes.AUDIO]&&h.push("audio"),D[M.ElementaryStreamTypes.VIDEO]&&h.push("video"));var v=function(){var m=self.performance.now();p.stats.buffering.end=m,d&&(d.stats.buffering.end=m);var c=d?d.stats:p.stats;s.hls.trigger(C.Events.FRAG_BUFFERED,{frag:p,part:d,stats:c,id:p.type})};h.length===0&&L.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+p.type+" level: "+p.level+" sn: "+p.sn),this.blockBuffers(v,h)},g.onFragChanged=function(a,l){this.flushBackBuffer()},g.onBufferEos=function(a,l){var s=this,p=this.getSourceBufferTypes().reduce(function(d,h){var D=s.sourceBuffer[h];return(!l.type||l.type===h)&&(D&&!D.ended&&(D.ended=!0,L.logger.log("[buffer-controller]: "+h+" sourceBuffer now EOS"))),d&&!!(!D||D.ended)},!0);p&&this.blockBuffers(function(){var d=s.mediaSource;if(!d||d.readyState!=="open")return;d.endOfStream()})},g.onLevelUpdated=function(a,l){var s=l.details;if(!s.fragments.length)return;this.details=s,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},g.flushBackBuffer=function(){var a=this.hls,l=this.details,s=this.media,p=this.sourceBuffer;if(!s||l===null)return;var d=this.getSourceBufferTypes();if(!d.length)return;var h=l.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!Object(B.isFiniteNumber)(h)||h<0)return;var D=s.currentTime,v=l.levelTargetDuration,f=Math.max(h,v),m=Math.floor(D/v)*v-f;d.forEach(function(c){var o=p[c];if(o){var x=_.BufferHelper.getBuffered(o);x.length>0&&m>x.start(0)&&(a.trigger(C.Events.BACK_BUFFER_REACHED,{bufferEnd:m}),l.live&&a.trigger(C.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:m}),a.trigger(C.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:m,type:c}))}})},g.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var a=this.details,l=this.hls,s=this.media,p=this.mediaSource,d=a.fragments[0].start+a.totalduration,h=s.duration,D=Object(B.isFiniteNumber)(p.duration)?p.duration:0;a.live&&l.config.liveDurationInfinity?(L.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),p.duration=Infinity,this.updateSeekableRange(a)):(d>D&&d>h||!Object(B.isFiniteNumber)(h))&&(L.logger.log("[buffer-controller]: Updating Media Source duration to "+d.toFixed(3)),p.duration=d)},g.updateSeekableRange=function(a){var l=this.mediaSource,s=a.fragments,p=s.length;if(p&&a.live&&l!==null&&l!==void 0&&l.setLiveSeekableRange){var d=Math.max(0,s[0].start),h=Math.max(d,d+a.totalduration);l.setLiveSeekableRange(d,h)}},g.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,l=this.operationQueue,s=this.pendingTracks,p=Object.keys(s).length;if(p&&!a||p===2){this.createSourceBuffers(s),this.pendingTracks={};var d=this.getSourceBufferTypes();if(d.length===0){this.hls.trigger(C.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}d.forEach(function(h){l.executeNext(h)})}},g.createSourceBuffers=function(a){var l=this.sourceBuffer,s=this.mediaSource;if(!s)throw Error("createSourceBuffers called when mediaSource was null");var p=0;for(var d in a)if(!l[d]){var h=a[d];if(!h)throw Error("source buffer exists for track "+d+", however track does not");var D=h.levelCodec||h.codec,v=h.container+";codecs="+D;L.logger.log("[buffer-controller]: creating sourceBuffer("+v+")");try{var f=l[d]=s.addSourceBuffer(v),m=d;this.addBufferListener(m,"updatestart",this._onSBUpdateStart),this.addBufferListener(m,"updateend",this._onSBUpdateEnd),this.addBufferListener(m,"error",this._onSBUpdateError),this.tracks[d]={buffer:f,codec:D,container:h.container,levelCodec:h.levelCodec,id:h.id},p++}catch(c){L.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+c.message),this.hls.trigger(C.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:c,mimeType:v})}}p&&this.hls.trigger(C.Events.BUFFER_CREATED,{tracks:this.tracks})},g._onSBUpdateStart=function(a){var l=this.operationQueue,s=l.current(a);s.onStart()},g._onSBUpdateEnd=function(a){var l=this.operationQueue,s=l.current(a);s.onComplete(),l.shiftAndExecuteNext(a)},g._onSBUpdateError=function(a,l){L.logger.error("[buffer-controller]: "+a+" SourceBuffer error",l),this.hls.trigger(C.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var s=this.operationQueue.current(a);s&&s.onError(l)},g.removeExecutor=function(a,l,s){var p=this.media,d=this.mediaSource,h=this.operationQueue,D=this.sourceBuffer,v=D[a];if(!p||!d||!v){L.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),h.shiftAndExecuteNext(a);return}var f=Object(B.isFiniteNumber)(p.duration)?p.duration:Infinity,m=Object(B.isFiniteNumber)(d.duration)?d.duration:Infinity,c=Math.max(0,l),o=Math.min(s,f,m);o>c?(L.logger.log("[buffer-controller]: Removing ["+c+","+o+"] from the "+a+" SourceBuffer"),console.assert(!v.updating,a+" sourceBuffer must not be updating"),v.remove(c,o)):h.shiftAndExecuteNext(a)},g.appendExecutor=function(a,l){var s=this.operationQueue,p=this.sourceBuffer,d=p[l];if(!d){L.logger.warn("[buffer-controller]: Attempting to append to the "+l+" SourceBuffer, but it does not exist"),s.shiftAndExecuteNext(l);return}d.ended=!1,console.assert(!d.updating,l+" sourceBuffer must not be updating"),d.appendBuffer(a)},g.blockBuffers=function(a,l){var s=this;if(l===void 0&&(l=this.getSourceBufferTypes()),!l.length){L.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(a);return}var p=this.operationQueue,d=l.map(function(h){return p.appendBlocker(h)});Promise.all(d).then(function(){a(),l.forEach(function(h){var D=s.sourceBuffer[h];(!D||!D.updating)&&p.shiftAndExecuteNext(h)})})},g.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},g.addBufferListener=function(a,l,s){var p=this.sourceBuffer[a];if(!p)return;var d=s.bind(this,a);this.listeners[a].push({event:l,listener:d}),p.addEventListener(l,d)},g.removeBufferListeners=function(a){var l=this.sourceBuffer[a];if(!l)return;this.listeners[a].forEach(function(s){l.removeEventListener(s.event,s.listener)})},A}()},"./src/controller/buffer-operation-queue.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return C});var B=O("./src/utils/logger.ts"),C=function(){function L(_){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=_}var U=L.prototype;return U.append=function(I,M){var b=this.queues[M];b.push(I),b.length===1&&this.buffers[M]&&this.executeNext(M)},U.insertAbort=function(I,M){var b=this.queues[M];b.unshift(I),this.executeNext(M)},U.appendBlocker=function(I){var M,b=new Promise(function(R){M=R}),E={execute:M,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(E,I),b},U.executeNext=function(I){var M=this.buffers,b=this.queues,E=M[I],R=b[I];if(R.length){var w=R[0];try{w.execute()}catch(A){B.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),w.onError(A),(!E||!E.updating)&&(R.shift(),this.executeNext(I))}}},U.shiftAndExecuteNext=function(I){this.queues[I].shift(),this.executeNext(I)},U.current=function(I){return this.queues[I][0]},L}()},"./src/controller/cap-level-controller.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/events.ts");function C(_,I){for(var M=0;M<I.length;M++){var b=I[M];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(_,b.key,b)}}function L(_,I,M){return I&&C(_.prototype,I),M&&C(_,M),_}var U=function(){function _(M){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=M,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(b){this.streamController=b},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 b=this.hls;b.on(B.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),b.on(B.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),b.on(B.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.on(B.Events.BUFFER_CODECS,this.onBufferCodecs,this),b.on(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},I.unregisterListener=function(){var b=this.hls;b.off(B.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),b.off(B.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),b.off(B.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.off(B.Events.BUFFER_CODECS,this.onBufferCodecs,this),b.off(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},I.onFpsDropLevelCapping=function(b,E){_.isLevelAllowed(E.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(E.droppedLevel)},I.onMediaAttaching=function(b,E){this.media=E.media instanceof HTMLVideoElement?E.media:null},I.onManifestParsed=function(b,E){var R=this.hls;this.restrictedLevels=[],this.firstLevel=E.firstLevel,R.config.capLevelToPlayerSize&&E.video&&this.startCapping()},I.onBufferCodecs=function(b,E){var R=this.hls;R.config.capLevelToPlayerSize&&E.video&&this.startCapping()},I.onMediaDetaching=function(){this.stopCapping()},I.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var b=this.hls.levels;if(b.length){var E=this.hls;E.autoLevelCapping=this.getMaxLevel(b.length-1),E.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=E.autoLevelCapping}}},I.getMaxLevel=function(b){var E=this,R=this.hls.levels;if(!R.length)return-1;var w=R.filter(function(A,g){return _.isLevelAllowed(g,E.restrictedLevels)&&g<=b});return this.clientRect=null,_.getMaxLevelByMediaSize(w,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 b=this.media,E={width:0,height:0};if(b){var R=b.getBoundingClientRect();E.width=R.width,E.height=R.height,!E.width&&!E.height&&(E.width=R.right-R.left||b.width||0,E.height=R.bottom-R.top||b.height||0)}return this.clientRect=E,E},_.isLevelAllowed=function(b,E){return E===void 0&&(E=[]),E.indexOf(b)===-1},_.getMaxLevelByMediaSize=function(b,E,R){if(!b||!b.length)return-1;for(var w=function(l,s){return s?l.width!==s.width||l.height!==s.height:!0},A=b.length-1,g=0;g<b.length;g+=1){var u=b[g];if((u.width>=E||u.height>=R)&&w(u,b[g+1])){A=g;break}}return A},L(_,[{key:"mediaWidth",get:function(){return this.getDimensions().width*_.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*_.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var b=1;try{b=self.devicePixelRatio}catch(E){}return b}}]),_}();K.default=U},"./src/controller/cmcd-controller.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return w});var B=O("./src/events.ts"),C=O("./src/types/cmcd.ts"),L=O("./src/utils/buffer-helper.ts"),U=O("./src/utils/logger.ts");function _(A,g){for(var u=0;u<g.length;u++){var a=g[u];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(A,a.key,a)}}function I(A,g,u){return g&&_(A.prototype,g),u&&_(A,u),A}function M(A,g){var u=typeof Symbol!="undefined"&&A[Symbol.iterator]||A["@@iterator"];if(u)return(u=u.call(A)).next.bind(u);if(Array.isArray(A)||(u=b(A))||g&&A&&typeof A.length=="number"){u&&(A=u);var a=0;return function(){return a>=A.length?{done:!0}:{done:!1,value:A[a++]}}}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 b(A,g){if(!A)return;if(typeof A=="string")return E(A,g);var u=Object.prototype.toString.call(A).slice(8,-1);if(u==="Object"&&A.constructor&&(u=A.constructor.name),u==="Map"||u==="Set")return Array.from(A);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return E(A,g)}function E(A,g){(g==null||g>A.length)&&(g=A.length);for(var u=0,a=new Array(g);u<g;u++)a[u]=A[u];return a}function R(){return R=Object.assign||function(A){for(var g=1;g<arguments.length;g++){var u=arguments[g];for(var a in u)Object.prototype.hasOwnProperty.call(u,a)&&(A[a]=u[a])}return A},R.apply(this,arguments)}var w=function(){function A(u){var a=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(){a.initialized&&(a.starved=!0),a.buffering=!0},this.onPlaying=function(){a.initialized||(a.initialized=!0),a.buffering=!1},this.applyPlaylistData=function(p){try{a.apply(p,{ot:C.CMCDObjectType.MANIFEST,su:!a.initialized})}catch(d){U.logger.warn("Could not generate manifest CMCD data.",d)}},this.applyFragmentData=function(p){try{var d=p.frag,h=a.hls.levels[d.level],D=a.getObjectType(d),v={d:d.duration*1e3,ot:D};(D===C.CMCDObjectType.VIDEO||D===C.CMCDObjectType.AUDIO||D==C.CMCDObjectType.MUXED)&&(v.br=h.bitrate/1e3,v.tb=a.getTopBandwidth(D),v.bl=a.getBufferLength(D)),a.apply(p,v)}catch(f){U.logger.warn("Could not generate segment CMCD data.",f)}},this.hls=u;var l=this.config=u.config,s=l.cmcd;s!=null&&(l.pLoader=this.createPlaylistLoader(),l.fLoader=this.createFragmentLoader(),this.sid=s.sessionId||A.uuid(),this.cid=s.contentId,this.useHeaders=s.useHeaders===!0,this.registerListeners())}var g=A.prototype;return g.registerListeners=function(){var a=this.hls;a.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(B.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.on(B.Events.BUFFER_CREATED,this.onBufferCreated,this)},g.unregisterListeners=function(){var a=this.hls;a.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(B.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.off(B.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},g.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},g.onMediaAttached=function(a,l){this.media=l.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},g.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},g.onBufferCreated=function(a,l){var s,p;this.audioBuffer=(s=l.tracks.audio)===null||s===void 0?void 0:s.buffer,this.videoBuffer=(p=l.tracks.video)===null||p===void 0?void 0:p.buffer},g.createData=function(){var a;return{v:C.CMCDVersion,sf:C.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(a=this.media)===null||a===void 0?void 0:a.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},g.apply=function(a,l){l===void 0&&(l={}),R(l,this.createData());var s=l.ot===C.CMCDObjectType.INIT||l.ot===C.CMCDObjectType.VIDEO||l.ot===C.CMCDObjectType.MUXED;if(this.starved&&s&&(l.bs=!0,l.su=!0,this.starved=!1),l.su==null&&(l.su=this.buffering),this.useHeaders){var p=A.toHeaders(l);if(!Object.keys(p).length)return;a.headers||(a.headers={}),R(a.headers,p)}else{var d=A.toQuery(l);if(!d)return;a.url=A.appendQueryToUri(a.url,d)}},g.getObjectType=function(a){var l=a.type;return l==="subtitle"?C.CMCDObjectType.TIMED_TEXT:a.sn==="initSegment"?C.CMCDObjectType.INIT:l==="audio"?C.CMCDObjectType.AUDIO:l==="main"?this.hls.audioTracks.length?C.CMCDObjectType.VIDEO:C.CMCDObjectType.MUXED:void 0},g.getTopBandwidth=function(a){for(var l=0,s=a===C.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,p=M(s),d;!(d=p()).done;){var h=d.value;h.bitrate>l&&(l=h.bitrate)}return l>0?l:NaN},g.getBufferLength=function(a){var l=this.hls.media,s=a===C.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!s||!l)return NaN;var p=L.BufferHelper.bufferInfo(s,l.currentTime,this.config.maxBufferHole);return p.len*1e3},g.createPlaylistLoader=function(){var a=this.config.pLoader,l=this.applyPlaylistData,s=a||this.config.loader;return function(){function p(h){this.loader=void 0,this.loader=new s(h)}var d=p.prototype;return d.destroy=function(){this.loader.destroy()},d.abort=function(){this.loader.abort()},d.load=function(D,v,f){l(D),this.loader.load(D,v,f)},I(p,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),p}()},g.createFragmentLoader=function(){var a=this.config.fLoader,l=this.applyFragmentData,s=a||this.config.loader;return function(){function p(h){this.loader=void 0,this.loader=new s(h)}var d=p.prototype;return d.destroy=function(){this.loader.destroy()},d.abort=function(){this.loader.abort()},d.load=function(D,v,f){l(D),this.loader.load(D,v,f)},I(p,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),p}()},A.uuid=function(){var a=URL.createObjectURL(new Blob),l=a.toString();return URL.revokeObjectURL(a),l.substr(l.lastIndexOf("/")+1)},A.serialize=function(a){for(var l=[],s=function(F){return!Number.isNaN(F)&&F!=null&&F!==""&&F!==!1},p=function(F){return Math.round(F)},d=function(F){return p(F/100)*100},h=function(F){return encodeURIComponent(F)},D={br:p,d:p,bl:d,dl:d,mtp:d,nor:h,rtp:d,tb:p},v=Object.keys(a||{}).sort(),f=M(v),m;!(m=f()).done;){var c=m.value,o=a[c];if(!s(o))continue;if(c==="v"&&o===1)continue;if(c=="pr"&&o===1)continue;var x=D[c];x&&(o=x(o));var y=typeof o,S=void 0;c==="ot"||c==="sf"||c==="st"?S=c+"="+o:y==="boolean"?S=c:y==="number"?S=c+"="+o:S=c+"="+JSON.stringify(o),l.push(S)}return l.join(",")},A.toHeaders=function(a){for(var l=Object.keys(a),s={},p=["Object","Request","Session","Status"],d=[{},{},{},{}],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},D=0,v=l;D<v.length;D++){var f=v[D],m=h[f]!=null?h[f]:1;d[m][f]=a[f]}for(var c=0;c<d.length;c++){var o=A.serialize(d[c]);o&&(s["CMCD-"+p[c]]=o)}return s},A.toQuery=function(a){return"CMCD="+encodeURIComponent(A.serialize(a))},A.appendQueryToUri=function(a,l){if(!l)return a;var s=a.includes("?")?"&":"?";return""+a+s+l},A}()},"./src/controller/eme-controller.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/events.ts"),C=O("./src/errors.ts"),L=O("./src/utils/logger.ts"),U=O("./src/utils/mediakeys-helper.ts");function _(w,A){for(var g=0;g<A.length;g++){var u=A[g];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(w,u.key,u)}}function I(w,A,g){return A&&_(w.prototype,A),g&&_(w,g),w}var M=3,b=function(A,g,u){var a={audioCapabilities:[],videoCapabilities:[]};return A.forEach(function(l){a.audioCapabilities.push({contentType:'audio/mp4; codecs="'+l+'"',robustness:u.audioRobustness||""})}),g.forEach(function(l){a.videoCapabilities.push({contentType:'video/mp4; codecs="'+l+'"',robustness:u.videoRobustness||""})}),[a]},E=function(A,g,u,a){switch(A){case U.KeySystems.WIDEVINE:return b(g,u,a);default:throw new Error("Unknown key-system: "+A)}},R=function(){function w(g){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=g,this._config=g.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=w.prototype;return A.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},A._registerListeners=function(){this.hls.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(B.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(B.Events.MANIFEST_PARSED,this.onManifestParsed,this)},A._unregisterListeners=function(){this.hls.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(B.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(B.Events.MANIFEST_PARSED,this.onManifestParsed,this)},A.getLicenseServerUrl=function(u){switch(u){case U.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+u+'"')},A._attemptKeySystemAccess=function(u,a,l){var s=this,p=E(u,a,l,this._drmSystemOptions);L.logger.log("Requesting encrypted media key-system access");var d=this.requestMediaKeySystemAccess(u,p);this.mediaKeysPromise=d.then(function(h){return s._onMediaKeySystemAccessObtained(u,h)}),d.catch(function(h){L.logger.error('Failed to obtain key-system "'+u+'" access:',h)})},A._onMediaKeySystemAccessObtained=function(u,a){var l=this;L.logger.log('Access for key-system "'+u+'" obtained');var s={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:a,mediaKeySystemDomain:u};this._mediaKeysList.push(s);var p=Promise.resolve().then(function(){return a.createMediaKeys()}).then(function(d){return s.mediaKeys=d,L.logger.log('Media-keys created for key-system "'+u+'"'),l._onMediaKeysCreated(),d});return p.catch(function(d){L.logger.error("Failed to create media-keys:",d)}),p},A._onMediaKeysCreated=function(){var u=this;this._mediaKeysList.forEach(function(a){a.mediaKeysSession||(a.mediaKeysSession=a.mediaKeys.createSession(),u._onNewMediaKeySession(a.mediaKeysSession))})},A._onNewMediaKeySession=function(u){var a=this;L.logger.log("New key-system session "+u.sessionId),u.addEventListener("message",function(l){a._onKeySessionMessage(u,l.message)},!1)},A._onKeySessionMessage=function(u,a){L.logger.log("Got EME message event, creating license request"),this._requestLicense(a,function(l){L.logger.log("Received license data (length: "+(l&&l.byteLength)+"), updating key-session"),u.update(l)})},A.onMediaEncrypted=function(u){var a=this;if(L.logger.log('Media is encrypted using "'+u.initDataType+'" init data type'),!this.mediaKeysPromise){L.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(B.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var l=function(p){if(!a._media)return;a._attemptSetMediaKeys(p),a._generateRequestWithPreferredKeySession(u.initDataType,u.initData)};this.mediaKeysPromise.then(l).catch(l)},A._attemptSetMediaKeys=function(u){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var a=this._mediaKeysList[0];if(!a||!a.mediaKeys){L.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(B.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}L.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(a.mediaKeys),this._hasSetMediaKeys=!0}},A._generateRequestWithPreferredKeySession=function(u,a){var l=this,s=this._mediaKeysList[0];if(!s){L.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(B.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(s.mediaKeysSessionInitialized){L.logger.warn("Key-Session already initialized but requested again");return}var p=s.mediaKeysSession;if(!p){L.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(B.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!a){L.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(B.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}L.logger.log('Generating key-session request for "'+u+'" init data type'),s.mediaKeysSessionInitialized=!0,p.generateRequest(u,a).then(function(){L.logger.debug("Key-session generation succeeded")}).catch(function(d){L.logger.error("Error generating key-session request:",d),l.hls.trigger(B.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},A._createLicenseXhr=function(u,a,l){var s=new XMLHttpRequest;s.responseType="arraybuffer",s.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,s,u,a,l);var p=this._licenseXhrSetup;if(p)try{p.call(this.hls,s,u),p=void 0}catch(d){L.logger.error(d)}try{s.readyState||s.open("POST",u,!0),p&&p.call(this.hls,s,u)}catch(d){throw new Error("issue setting up KeySystem license XHR "+d)}return s},A._onLicenseRequestReadyStageChange=function(u,a,l,s){switch(u.readyState){case 4:if(u.status===200){this._requestLicenseFailureCount=0,L.logger.log("License request succeeded");var p=u.response,d=this._licenseResponseCallback;if(d)try{p=d.call(this.hls,u,a)}catch(D){L.logger.error(D)}s(p)}else{if(L.logger.error("License Request XHR failed ("+a+"). Status: "+u.status+" ("+u.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>M){this.hls.trigger(B.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var h=M-this._requestLicenseFailureCount+1;L.logger.warn("Retrying license request, "+h+" attempts left"),this._requestLicense(l,s)}break}},A._generateLicenseRequestChallenge=function(u,a){switch(u.mediaKeySystemDomain){case U.KeySystems.WIDEVINE:return a}throw new Error("unsupported key-system: "+u.mediaKeySystemDomain)},A._requestLicense=function(u,a){L.logger.log("Requesting content license for key-system");var l=this._mediaKeysList[0];if(!l){L.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(B.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var s=this.getLicenseServerUrl(l.mediaKeySystemDomain),p=this._createLicenseXhr(s,u,a);L.logger.log("Sending license request to URL: "+s);var d=this._generateLicenseRequestChallenge(l,u);p.send(d)}catch(h){L.logger.error("Failure requesting DRM license: "+h),this.hls.trigger(B.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},A.onMediaAttached=function(u,a){if(!this._emeEnabled)return;var l=a.media;this._media=l,l.addEventListener("encrypted",this._onMediaEncrypted)},A.onMediaDetached=function(){var u=this._media,a=this._mediaKeysList;if(!u)return;u.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(a.map(function(l){if(l.mediaKeysSession)return l.mediaKeysSession.close().catch(function(){})})).then(function(){return u.setMediaKeys(null)}).catch(function(){})},A.onManifestParsed=function(u,a){if(!this._emeEnabled)return;var l=a.levels.map(function(p){return p.audioCodec}).filter(function(p){return!!p}),s=a.levels.map(function(p){return p.videoCodec}).filter(function(p){return!!p});this._attemptKeySystemAccess(U.KeySystems.WIDEVINE,l,s)},I(w,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),w}();K.default=R},"./src/controller/fps-controller.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/events.ts"),C=O("./src/utils/logger.ts"),L=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(M){this.streamController=M},_.registerListeners=function(){this.hls.on(B.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},_.unregisterListeners=function(){this.hls.off(B.Events.MEDIA_ATTACHING,this.onMediaAttaching)},_.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},_.onMediaAttaching=function(M,b){var E=this.hls.config;if(E.capLevelOnFPSDrop){var R=b.media instanceof self.HTMLVideoElement?b.media:null;this.media=R,R&&typeof R.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),E.fpsDroppedMonitoringPeriod)}},_.checkFPS=function(M,b,E){var R=performance.now();if(b){if(this.lastTime){var w=R-this.lastTime,A=E-this.lastDroppedFrames,g=b-this.lastDecodedFrames,u=1e3*A/w,a=this.hls;if(a.trigger(B.Events.FPS_DROP,{currentDropped:A,currentDecoded:g,totalDroppedFrames:E}),u>0&&A>a.config.fpsDroppedMonitoringThreshold*g){var l=a.currentLevel;C.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(a.autoLevelCapping===-1||a.autoLevelCapping>=l)&&(l=l-1,a.trigger(B.Events.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:a.currentLevel}),a.autoLevelCapping=l,this.streamController.nextLevelSwitch())}}this.lastTime=R,this.lastDroppedFrames=E,this.lastDecodedFrames=b}},_.checkFPSInterval=function(){var M=this.media;if(M)if(this.isVideoPlaybackQualityAvailable){var b=M.getVideoPlaybackQuality();this.checkFPS(M,b.totalVideoFrames,b.droppedVideoFrames)}else this.checkFPS(M,M.webkitDecodedFrameCount,M.webkitDroppedFrameCount)},U}();K.default=L},"./src/controller/fragment-finders.ts":function($,K,O){"use strict";O.r(K),O.d(K,"findFragmentByPDT",function(){return L}),O.d(K,"findFragmentByPTS",function(){return U}),O.d(K,"fragmentWithinToleranceTest",function(){return _}),O.d(K,"pdtWithinToleranceTest",function(){return I}),O.d(K,"findFragWithCC",function(){return M});var B=O("./src/polyfills/number.ts"),C=O("./src/utils/binary-search.ts");function L(b,E,R){if(E===null||!Array.isArray(b)||!b.length||!Object(B.isFiniteNumber)(E))return null;var w=b[0].programDateTime;if(E<(w||0))return null;var A=b[b.length-1].endProgramDateTime;if(E>=(A||0))return null;R=R||0;for(var g=0;g<b.length;++g){var u=b[g];if(I(E,R,u))return u}return null}function U(b,E,R,w){R===void 0&&(R=0),w===void 0&&(w=0);var A=null;if(b?A=E[b.sn-E[0].sn+1]||null:R===0&&E[0].start===0&&(A=E[0]),A&&_(R,w,A)===0)return A;var g=C.default.search(E,_.bind(null,R,w));return g||A}function _(b,E,R){b===void 0&&(b=0),E===void 0&&(E=0);var w=Math.min(E,R.duration+(R.deltaPTS?R.deltaPTS:0));return R.start+R.duration-w<=b?1:R.start-w>b&&R.start?-1:0}function I(b,E,R){var w=Math.min(E,R.duration+(R.deltaPTS?R.deltaPTS:0))*1e3,A=R.endProgramDateTime||0;return A-w>b}function M(b,E){return C.default.search(b,function(R){return R.cc<E?1:R.cc>E?-1:0})}},"./src/controller/fragment-tracker.ts":function($,K,O){"use strict";O.r(K),O.d(K,"FragmentState",function(){return L}),O.d(K,"FragmentTracker",function(){return U});var B=O("./src/events.ts"),C=O("./src/types/loader.ts"),L;(function(M){M.NOT_LOADED="NOT_LOADED",M.BACKTRACKED="BACKTRACKED",M.APPENDING="APPENDING",M.PARTIAL="PARTIAL",M.OK="OK"})(L||(L={}));var U=function(){function M(E){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=E,this._registerListeners()}var b=M.prototype;return b._registerListeners=function(){var R=this.hls;R.on(B.Events.BUFFER_APPENDED,this.onBufferAppended,this),R.on(B.Events.FRAG_BUFFERED,this.onFragBuffered,this),R.on(B.Events.FRAG_LOADED,this.onFragLoaded,this)},b._unregisterListeners=function(){var R=this.hls;R.off(B.Events.BUFFER_APPENDED,this.onBufferAppended,this),R.off(B.Events.FRAG_BUFFERED,this.onFragBuffered,this),R.off(B.Events.FRAG_LOADED,this.onFragLoaded,this)},b.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},b.getAppendedFrag=function(R,w){if(w===C.PlaylistLevelType.MAIN){var A=this.activeFragment,g=this.activeParts;if(!A)return null;if(g)for(var u=g.length;u--;){var a=g[u],l=a?a.end:A.appendedPTS;if(a.start<=R&&l!==void 0&&R<=l)return u>9&&(this.activeParts=g.slice(u-9)),a}else if(A.start<=R&&A.appendedPTS!==void 0&&R<=A.appendedPTS)return A}return this.getBufferedFrag(R,w)},b.getBufferedFrag=function(R,w){for(var A=this.fragments,g=Object.keys(A),u=g.length;u--;){var a=A[g[u]];if((a==null?void 0:a.body.type)===w&&a.buffered){var l=a.body;if(l.start<=R&&R<=l.end)return l}}return null},b.detectEvictedFragments=function(R,w,A){var g=this;Object.keys(this.fragments).forEach(function(u){var a=g.fragments[u];if(!a)return;if(!a.buffered){a.body.type===A&&g.removeFragment(a.body);return}var l=a.range[R];if(!l)return;l.time.some(function(s){var p=!g.isTimeBuffered(s.startPTS,s.endPTS,w);return p&&g.removeFragment(a.body),p})})},b.detectPartialFragments=function(R){var w=this,A=this.timeRanges,g=R.frag,u=R.part;if(!A||g.sn==="initSegment")return;var a=I(g),l=this.fragments[a];if(!l)return;Object.keys(A).forEach(function(s){var p=g.elementaryStreams[s];if(!p)return;var d=A[s],h=u!==null||p.partial===!0;l.range[s]=w.getBufferedTimes(g,u,h,d)}),l.backtrack=l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body)},b.fragBuffered=function(R){var w=I(R),A=this.fragments[w];A&&(A.backtrack=A.loaded=null,A.buffered=!0)},b.getBufferedTimes=function(R,w,A,g){for(var u={time:[],partial:A},a=w?w.start:R.start,l=w?w.end:R.end,s=R.minEndPTS||l,p=R.maxStartPTS||a,d=0;d<g.length;d++){var h=g.start(d)-this.bufferPadding,D=g.end(d)+this.bufferPadding;if(p>=h&&s<=D){u.time.push({startPTS:Math.max(a,g.start(d)),endPTS:Math.min(l,g.end(d))});break}else if(a<D&&l>h)u.partial=!0,u.time.push({startPTS:Math.max(a,g.start(d)),endPTS:Math.min(l,g.end(d))});else if(l<=h)break}return u},b.getPartialFragment=function(R){var w=null,A,g,u,a=0,l=this.bufferPadding,s=this.fragments;return Object.keys(s).forEach(function(p){var d=s[p];if(!d)return;_(d)&&(g=d.body.start-l,u=d.body.end+l,R>=g&&R<=u&&(A=Math.min(R-g,u-R),a<=A&&(w=d.body,a=A)))}),w},b.getState=function(R){var w=I(R),A=this.fragments[w];return A?A.buffered?_(A)?L.PARTIAL:L.OK:A.backtrack?L.BACKTRACKED:L.APPENDING:L.NOT_LOADED},b.backtrack=function(R,w){var A=I(R),g=this.fragments[A];if(!g||g.backtrack)return null;var u=g.backtrack=w||g.loaded;return g.loaded=null,u},b.getBacktrackData=function(R){var w=I(R),A=this.fragments[w];if(A){var g,u=A.backtrack;if(u!=null&&(g=u.payload)!==null&&g!==void 0&&g.byteLength)return u;this.removeFragment(R)}return null},b.isTimeBuffered=function(R,w,A){for(var g,u,a=0;a<A.length;a++){if(g=A.start(a)-this.bufferPadding,u=A.end(a)+this.bufferPadding,R>=g&&w<=u)return!0;if(w<=g)return!1}return!1},b.onFragLoaded=function(R,w){var A=w.frag,g=w.part;if(A.sn==="initSegment"||A.bitrateTest||g)return;var u=I(A);this.fragments[u]={body:A,loaded:w,backtrack:null,buffered:!1,range:Object.create(null)}},b.onBufferAppended=function(R,w){var A=this,g=w.frag,u=w.part,a=w.timeRanges;if(g.type===C.PlaylistLevelType.MAIN)if(this.activeFragment=g,u){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(u)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(s){var p=a[s];if(A.detectEvictedFragments(s,p),!u)for(var d=0;d<p.length;d++)g.appendedPTS=Math.max(p.end(d),g.appendedPTS||0)})},b.onFragBuffered=function(R,w){this.detectPartialFragments(w)},b.hasFragment=function(R){var w=I(R);return!!this.fragments[w]},b.removeFragmentsInRange=function(R,w,A){var g=this;Object.keys(this.fragments).forEach(function(u){var a=g.fragments[u];if(!a)return;if(a.buffered){var l=a.body;l.type===A&&l.start<w&&l.end>R&&g.removeFragment(l)}})},b.removeFragment=function(R){var w=I(R);R.stats.loaded=0,R.clearElementaryStreamInfo(),delete this.fragments[w]},b.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},M}();function _(M){var b,E;return M.buffered&&(((b=M.range.video)===null||b===void 0?void 0:b.partial)||((E=M.range.audio)===null||E===void 0?void 0:E.partial))}function I(M){return M.type+"_"+M.level+"_"+M.urlId+"_"+M.sn}},"./src/controller/gap-controller.ts":function($,K,O){"use strict";O.r(K),O.d(K,"STALL_MINIMUM_DURATION_MS",function(){return _}),O.d(K,"MAX_START_GAP_JUMP",function(){return I}),O.d(K,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return M}),O.d(K,"SKIP_BUFFER_RANGE_START",function(){return b}),O.d(K,"default",function(){return E});var B=O("./src/utils/buffer-helper.ts"),C=O("./src/errors.ts"),L=O("./src/events.ts"),U=O("./src/utils/logger.ts"),_=250,I=2,M=.1,b=.05,E=function(){function R(A,g,u,a){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=g,this.fragmentTracker=u,this.hls=a}var w=R.prototype;return w.destroy=function(){this.hls=this.fragmentTracker=this.media=null},w.poll=function(g){var u=this.config,a=this.media,l=this.stalled,s=a.currentTime,p=a.seeking,d=this.seeking&&!p,h=!this.seeking&&p;if(this.seeking=p,s!==g){if(this.moved=!0,l!==null){if(this.stallReported){var D=self.performance.now()-l;U.logger.warn("playback not stuck anymore @"+s+", after "+Math.round(D)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((h||d)&&(this.stalled=null),a.paused||a.ended||a.playbackRate===0||!B.BufferHelper.getBuffered(a).length)return;var v=B.BufferHelper.bufferInfo(a,s,0),f=v.len>0,m=v.nextStart||0;if(!f&&!m)return;if(p){var c=v.len>I,o=!m||m-s>I&&!this.fragmentTracker.getPartialFragment(s);if(c||o)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var x,y=Math.max(m,v.start||0)-s,S=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,P=S==null||((x=S.details)===null||x===void 0)?void 0:x.live,F=P?S.details.targetduration*2:I;if(y>0&&y<=F){this._trySkipBufferHole(null);return}}var H=self.performance.now();if(l===null){this.stalled=H;return}var Y=H-l;!p&&Y>=_&&this._reportStall(v.len);var j=B.BufferHelper.bufferInfo(a,s,u.maxBufferHole);this._tryFixBufferStall(j,Y)},w._tryFixBufferStall=function(g,u){var a=this.config,l=this.fragmentTracker,s=this.media,p=s.currentTime,d=l.getPartialFragment(p);if(d){var h=this._trySkipBufferHole(d);if(h)return}g.len>a.maxBufferHole&&u>a.highBufferWatchdogPeriod*1e3&&(U.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},w._reportStall=function(g){var u=this.hls,a=this.media,l=this.stallReported;l||(this.stallReported=!0,U.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer (buffer="+g+")"),u.trigger(L.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:g}))},w._trySkipBufferHole=function(g){for(var u=this.config,a=this.hls,l=this.media,s=l.currentTime,p=0,d=B.BufferHelper.getBuffered(l),h=0;h<d.length;h++){var D=d.start(h);if(s+u.maxBufferHole>=p&&s<D){var v=Math.max(D+b,l.currentTime+M);return U.logger.warn("skipping hole, adjusting currentTime from "+s+" to "+v),this.moved=!0,this.stalled=null,l.currentTime=v,g&&a.trigger(L.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+s+" to "+v,frag:g}),v}p=d.end(h)}return 0},w._tryNudgeBuffer=function(){var g=this.config,u=this.hls,a=this.media,l=a.currentTime,s=(this.nudgeRetry||0)+1;if(this.nudgeRetry=s,s<g.nudgeMaxRetry){var p=l+s*g.nudgeOffset;U.logger.warn("Nudging 'currentTime' from "+l+" to "+p),a.currentTime=p,u.trigger(L.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else U.logger.error("Playhead still not moving while enough data buffered @"+l+" after "+g.nudgeMaxRetry+" nudges"),u.trigger(L.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},R}()},"./src/controller/id3-track-controller.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/events.ts"),C=O("./src/utils/texttrack-utils.ts"),L=O("./src/demux/id3.ts"),U=.25,_=function(){function I(b){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=b,this._registerListeners()}var M=I.prototype;return M.destroy=function(){this._unregisterListeners()},M._registerListeners=function(){var E=this.hls;E.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(B.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),E.on(B.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},M._unregisterListeners=function(){var E=this.hls;E.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(B.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),E.off(B.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},M.onMediaAttached=function(E,R){this.media=R.media},M.onMediaDetaching=function(){if(!this.id3Track)return;Object(C.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},M.getID3Track=function(E){if(!this.media)return;for(var R=0;R<E.length;R++){var w=E[R];if(w.kind==="metadata"&&w.label==="id3")return Object(C.sendAddTrackEvent)(w,this.media),w}return this.media.addTextTrack("metadata","id3")},M.onFragParsingMetadata=function(E,R){if(!this.media)return;var w=R.frag,A=R.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var g=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,u=0;u<A.length;u++){var a=L.getID3Frames(A[u].data);if(a){var l=A[u].pts,s=u<A.length-1?A[u+1].pts:w.end,p=s-l;p<=0&&(s=l+U);for(var d=0;d<a.length;d++){var h=a[d];if(!L.isTimeStampFrame(h)){var D=new g(l,s,"");D.value=h,this.id3Track.addCue(D)}}}}},M.onBufferFlushing=function(E,R){var w=R.startOffset,A=R.endOffset,g=R.type;if(!g||g==="audio"){var u=this.id3Track;u&&Object(C.removeCuesInRange)(u,w,A)}},I}();K.default=_},"./src/controller/latency-controller.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return I});var B=O("./src/errors.ts"),C=O("./src/events.ts"),L=O("./src/utils/logger.ts");function U(M,b){for(var E=0;E<b.length;E++){var R=b[E];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(M,R.key,R)}}function _(M,b,E){return b&&U(M.prototype,b),E&&U(M,E),M}var I=function(){function M(E){var R=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 R.timeupdate()},this.hls=E,this.config=E.config,this.registerListeners()}var b=M.prototype;return b.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},b.registerListeners=function(){this.hls.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(C.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(C.Events.ERROR,this.onError,this)},b.unregisterListeners=function(){this.hls.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(C.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(C.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(C.Events.ERROR,this.onError)},b.onMediaAttached=function(R,w){this.media=w.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},b.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},b.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},b.onLevelUpdated=function(R,w){var A=w.details;this.levelDetails=A,A.advanced&&this.timeupdate(),!A.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},b.onError=function(R,w){if(w.details!==B.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,L.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},b.timeupdate=function(){var R=this.media,w=this.levelDetails;if(!R||!w)return;this.currentTime=R.currentTime;var A=this.computeLatency();if(A===null)return;this._latency=A;var g=this.config,u=g.lowLatencyMode,a=g.maxLiveSyncPlaybackRate;if(!u||a===1)return;var l=this.targetLatency;if(l===null)return;var s=A-l,p=Math.min(this.maxLatency,l+w.targetduration),d=s<p;if(w.live&&d&&s>.05&&this.forwardBufferLength>1){var h=Math.min(2,Math.max(1,a)),D=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;R.playbackRate=Math.min(h,Math.max(1,D))}else R.playbackRate!==1&&R.playbackRate!==0&&(R.playbackRate=1)},b.estimateLiveEdge=function(){var R=this.levelDetails;return R===null?null:R.edge+R.age},b.computeLatency=function(){var R=this.estimateLiveEdge();return R===null?null:R-this.currentTime},_(M,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var R=this.config,w=this.levelDetails;return R.liveMaxLatencyDuration!==void 0?R.liveMaxLatencyDuration:w?R.liveMaxLatencyDurationCount*w.targetduration:0}},{key:"targetLatency",get:function(){var R=this.levelDetails;if(R===null)return null;var w=R.holdBack,A=R.partHoldBack,g=R.targetduration,u=this.config,a=u.liveSyncDuration,l=u.liveSyncDurationCount,s=u.lowLatencyMode,p=this.hls.userConfig,d=s&&A||w;(p.liveSyncDuration||p.liveSyncDurationCount||d===0)&&(d=a!==void 0?a:l*g);var h=g,D=1;return d+Math.min(this.stallCount*D,h)}},{key:"liveSyncPosition",get:function(){var R=this.estimateLiveEdge(),w=this.targetLatency,A=this.levelDetails;if(R===null||w===null||A===null)return null;var g=A.edge,u=R-w-this.edgeStalled,a=g-A.totalduration,l=g-(this.config.lowLatencyMode&&A.partTarget||A.targetduration);return Math.min(Math.max(a,u),l)}},{key:"drift",get:function(){var R=this.levelDetails;return R===null?1:R.drift}},{key:"edgeStalled",get:function(){var R=this.levelDetails;if(R===null)return 0;var w=(this.config.lowLatencyMode&&R.partTarget||R.targetduration)*3;return Math.max(R.age-w,0)}},{key:"forwardBufferLength",get:function(){var R=this.media,w=this.levelDetails;if(!R||!w)return 0;var A=R.buffered.length;return A?R.buffered.end(A-1):w.edge-this.currentTime}}]),M}()},"./src/controller/level-controller.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return u});var B=O("./src/types/level.ts"),C=O("./src/events.ts"),L=O("./src/errors.ts"),U=O("./src/utils/codecs.ts"),_=O("./src/controller/level-helper.ts"),I=O("./src/controller/base-playlist-controller.ts"),M=O("./src/types/loader.ts");function b(){return b=Object.assign||function(a){for(var l=1;l<arguments.length;l++){var s=arguments[l];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(a[p]=s[p])}return a},b.apply(this,arguments)}function E(a,l){for(var s=0;s<l.length;s++){var p=l[s];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}function R(a,l,s){return l&&E(a.prototype,l),s&&E(a,s),a}function w(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,A(a,l)}function A(a,l){return A=Object.setPrototypeOf||function(p,d){return p.__proto__=d,p},A(a,l)}var g=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),u=function(a){w(l,a);function l(p){var d;return d=a.call(this,p,"[level-controller]")||this,d._levels=[],d._firstLevel=-1,d._startLevel=void 0,d.currentLevelIndex=-1,d.manualLevelIndex=-1,d.onParsedComplete=void 0,d._registerListeners(),d}var s=l.prototype;return s._registerListeners=function(){var d=this.hls;d.on(C.Events.MANIFEST_LOADED,this.onManifestLoaded,this),d.on(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),d.on(C.Events.FRAG_LOADED,this.onFragLoaded,this),d.on(C.Events.ERROR,this.onError,this)},s._unregisterListeners=function(){var d=this.hls;d.off(C.Events.MANIFEST_LOADED,this.onManifestLoaded,this),d.off(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),d.off(C.Events.FRAG_LOADED,this.onFragLoaded,this),d.off(C.Events.ERROR,this.onError,this)},s.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,a.prototype.destroy.call(this)},s.startLoad=function(){var d=this._levels;d.forEach(function(h){h.loadError=0}),a.prototype.startLoad.call(this)},s.onManifestLoaded=function(d,h){var D=[],v=[],f=[],m,c={},o,x=!1,y=!1,S=!1;if(h.levels.forEach(function(Y){var j=Y.attrs;x=x||!!(Y.width&&Y.height),y=y||!!Y.videoCodec,S=S||!!Y.audioCodec,g&&Y.audioCodec&&Y.audioCodec.indexOf("mp4a.40.34")!==-1&&(Y.audioCodec=void 0);var N=Y.bitrate+"-"+Y.attrs.RESOLUTION+"-"+Y.attrs.CODECS;o=c[N],o?o.url.push(Y.url):(o=new B.Level(Y),c[N]=o,D.push(o)),j&&(j.AUDIO&&Object(_.addGroupId)(o,"audio",j.AUDIO),j.SUBTITLES&&Object(_.addGroupId)(o,"text",j.SUBTITLES))}),(x||y)&&S&&(D=D.filter(function(Y){var j=Y.videoCodec,N=Y.width,Z=Y.height;return!!j||!!(N&&Z)})),D=D.filter(function(Y){var j=Y.audioCodec,N=Y.videoCodec;return(!j||Object(U.isCodecSupportedInMp4)(j,"audio"))&&(!N||Object(U.isCodecSupportedInMp4)(N,"video"))}),h.audioTracks&&(v=h.audioTracks.filter(function(Y){return!Y.audioCodec||Object(U.isCodecSupportedInMp4)(Y.audioCodec,"audio")}),Object(_.assignTrackIdsByGroup)(v)),h.subtitles&&(f=h.subtitles,Object(_.assignTrackIdsByGroup)(f)),D.length>0){m=D[0].bitrate,D.sort(function(Y,j){return Y.bitrate-j.bitrate}),this._levels=D;for(var P=0;P<D.length;P++)if(D[P].bitrate===m){this._firstLevel=P,this.log("manifest loaded, "+D.length+" level(s) found, first bitrate: "+m);break}var F=S&&!y,H={levels:D,audioTracks:v,subtitleTracks:f,firstLevel:this._firstLevel,stats:h.stats,audio:S,video:y,altAudio:!F&&v.some(function(Y){return!!Y.url})};this.hls.trigger(C.Events.MANIFEST_PARSED,H),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(C.Events.ERROR,{type:L.ErrorTypes.MEDIA_ERROR,details:L.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:h.url,reason:"no level with compatible codecs found in manifest"})},s.onError=function(d,h){if(a.prototype.onError.call(this,d,h),h.fatal)return;var D=h.context,v=this._levels[this.currentLevelIndex];if(D&&(D.type===M.PlaylistContextType.AUDIO_TRACK&&v.audioGroupIds&&D.groupId===v.audioGroupIds[v.urlId]||D.type===M.PlaylistContextType.SUBTITLE_TRACK&&v.textGroupIds&&D.groupId===v.textGroupIds[v.urlId])){this.redundantFailover(this.currentLevelIndex);return}var f=!1,m=!0,c;switch(h.details){case L.ErrorDetails.FRAG_LOAD_ERROR:case L.ErrorDetails.FRAG_LOAD_TIMEOUT:case L.ErrorDetails.KEY_LOAD_ERROR:case L.ErrorDetails.KEY_LOAD_TIMEOUT:if(h.frag){var o=this._levels[h.frag.level];o?(o.fragmentError++,o.fragmentError>this.hls.config.fragLoadingMaxRetry&&(c=h.frag.level)):c=h.frag.level}break;case L.ErrorDetails.LEVEL_LOAD_ERROR:case L.ErrorDetails.LEVEL_LOAD_TIMEOUT:D&&(D.deliveryDirectives&&(m=!1),c=D.level),f=!0;break;case L.ErrorDetails.REMUX_ALLOC_ERROR:c=h.level,f=!0;break}c!==void 0&&this.recoverLevel(h,c,f,m)},s.recoverLevel=function(d,h,D,v){var f=d.details,m=this._levels[h];if(m.loadError++,D){var c=this.retryLoadingOrFail(d);if(c)d.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(v){var o=m.url.length;if(o>1&&m.loadError<o)d.levelRetry=!0,this.redundantFailover(h);else if(this.manualLevelIndex===-1){var x=h===0?this._levels.length-1:h-1;this.currentLevelIndex!==x&&this._levels[x].loadError===0&&(this.warn(f+": switch to "+x),d.levelRetry=!0,this.hls.nextAutoLevel=x)}}},s.redundantFailover=function(d){var h=this._levels[d],D=h.url.length;if(D>1){var v=(h.urlId+1)%D;this.warn("Switching to redundant URL-id "+v),this._levels.forEach(function(f){f.urlId=v}),this.level=d}},s.onFragLoaded=function(d,h){var D=h.frag;if(D!==void 0&&D.type===M.PlaylistLevelType.MAIN){var v=this._levels[D.level];v!==void 0&&(v.fragmentError=0,v.loadError=0)}},s.onLevelLoaded=function(d,h){var D,v=h.level,f=h.details,m=this._levels[v];if(!m){var c;this.warn("Invalid level index "+v),(c=h.deliveryDirectives)!==null&&c!==void 0&&c.skip&&(f.deltaUpdateFailed=!0);return}v===this.currentLevelIndex?(m.fragmentError===0&&(m.loadError=0,this.retryCount=0),this.playlistLoaded(v,h,m.details)):(D=h.deliveryDirectives)!==null&&D!==void 0&&D.skip&&(f.deltaUpdateFailed=!0)},s.onAudioTrackSwitched=function(d,h){var D=this.hls.levels[this.currentLevelIndex];if(!D)return;if(D.audioGroupIds){for(var v=-1,f=this.hls.audioTracks[h.id].groupId,m=0;m<D.audioGroupIds.length;m++)if(D.audioGroupIds[m]===f){v=m;break}v!==D.urlId&&(D.urlId=v,this.startLoad())}},s.loadPlaylist=function(d){var h=this.currentLevelIndex,D=this._levels[h];if(this.canLoad&&D&&D.url.length>0){var v=D.urlId,f=D.url[v];if(d)try{f=d.addDirectives(f)}catch(m){this.warn("Could not construct new URL with HLS Delivery Directives: "+m)}this.log("Attempt loading level index "+h+(d?" at sn "+d.msn+" part "+d.part:"")+" with URL-id "+v+" "+f),this.clearTimer(),this.hls.trigger(C.Events.LEVEL_LOADING,{url:f,level:h,id:v,deliveryDirectives:d||null})}},s.removeLevel=function(d,h){var D=function(m,c){return c!==h},v=this._levels.filter(function(f,m){return m!==d?!0:f.url.length>1&&h!==void 0?(f.url=f.url.filter(D),f.audioGroupIds&&(f.audioGroupIds=f.audioGroupIds.filter(D)),f.textGroupIds&&(f.textGroupIds=f.textGroupIds.filter(D)),f.urlId=0,!0):!1}).map(function(f,m){var c=f.details;return c!=null&&c.fragments&&c.fragments.forEach(function(o){o.level=m}),f});this._levels=v,this.hls.trigger(C.Events.LEVELS_UPDATED,{levels:v})},R(l,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(d){var h,D=this._levels;if(D.length===0)return;if(this.currentLevelIndex===d&&(h=D[d])!==null&&h!==void 0&&h.details)return;if(d<0||d>=D.length){var v=d<0;if(this.hls.trigger(C.Events.ERROR,{type:L.ErrorTypes.OTHER_ERROR,details:L.ErrorDetails.LEVEL_SWITCH_ERROR,level:d,fatal:v,reason:"invalid level idx"}),v)return;d=Math.min(d,D.length-1)}this.clearTimer();var f=this.currentLevelIndex,m=D[f],c=D[d];this.log("switching to level "+d+" from "+f),this.currentLevelIndex=d;var o=b({},c,{level:d,maxBitrate:c.maxBitrate,uri:c.uri,urlId:c.urlId});delete o._urlId,this.hls.trigger(C.Events.LEVEL_SWITCHING,o);var x=c.details;if(!x||x.live){var y=this.switchParams(c.uri,m==null?void 0:m.details);this.loadPlaylist(y)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(d){this.manualLevelIndex=d,this._startLevel===void 0&&(this._startLevel=d),d!==-1&&(this.level=d)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(d){this._firstLevel=d}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var d=this.hls.config.startLevel;return d!==void 0?d:this._firstLevel}else return this._startLevel},set:function(d){this._startLevel=d}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(d){this.level=d,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=d)}}]),l}(I.default)},"./src/controller/level-helper.ts":function($,K,O){"use strict";O.r(K),O.d(K,"addGroupId",function(){return L}),O.d(K,"assignTrackIdsByGroup",function(){return U}),O.d(K,"updatePTS",function(){return _}),O.d(K,"updateFragPTSDTS",function(){return M}),O.d(K,"mergeDetails",function(){return b}),O.d(K,"mapPartIntersection",function(){return E}),O.d(K,"mapFragmentIntersection",function(){return R}),O.d(K,"adjustSliding",function(){return w}),O.d(K,"addSliding",function(){return A}),O.d(K,"computeReloadInterval",function(){return g}),O.d(K,"getFragmentWithSN",function(){return u}),O.d(K,"getPartWith",function(){return a});var B=O("./src/polyfills/number.ts"),C=O("./src/utils/logger.ts");function L(l,s,p){switch(s){case"audio":l.audioGroupIds||(l.audioGroupIds=[]),l.audioGroupIds.push(p);break;case"text":l.textGroupIds||(l.textGroupIds=[]),l.textGroupIds.push(p);break}}function U(l){var s={};l.forEach(function(p){var d=p.groupId||"";p.id=s[d]=s[d]||0,s[d]++})}function _(l,s,p){var d=l[s],h=l[p];I(d,h)}function I(l,s){var p=s.startPTS;if(Object(B.isFiniteNumber)(p)){var d=0,h;s.sn>l.sn?(d=p-l.start,h=l):(d=l.start-p,h=s),h.duration!==d&&(h.duration=d)}else if(s.sn>l.sn){var D=l.cc===s.cc;D&&l.minEndPTS?s.start=l.start+(l.minEndPTS-l.start):s.start=l.start+l.duration}else s.start=Math.max(l.start-s.duration,0)}function M(l,s,p,d,h,D){var v=d-p;v<=0&&(C.logger.warn("Fragment should have a positive duration",s),d=p+s.duration,D=h+s.duration);var f=p,m=d,c=s.startPTS,o=s.endPTS;if(Object(B.isFiniteNumber)(c)){var x=Math.abs(c-p);Object(B.isFiniteNumber)(s.deltaPTS)?s.deltaPTS=Math.max(x,s.deltaPTS):s.deltaPTS=x,f=Math.max(p,c),p=Math.min(p,c),h=Math.min(h,s.startDTS),m=Math.min(d,o),d=Math.max(d,o),D=Math.max(D,s.endDTS)}s.duration=d-p;var y=p-s.start;s.appendedPTS=d,s.start=s.startPTS=p,s.maxStartPTS=f,s.startDTS=h,s.endPTS=d,s.minEndPTS=m,s.endDTS=D;var S=s.sn;if(!l||S<l.startSN||S>l.endSN)return 0;var P,F=S-l.startSN,H=l.fragments;for(H[F]=s,P=F;P>0;P--)I(H[P],H[P-1]);for(P=F;P<H.length-1;P++)I(H[P],H[P+1]);return l.fragmentHint&&I(H[H.length-1],l.fragmentHint),l.PTSKnown=l.alignedSliding=!0,y}function b(l,s){for(var p=null,d=l.fragments,h=d.length-1;h>=0;h--){var D=d[h].initSegment;if(D){p=D;break}}l.fragmentHint&&delete l.fragmentHint.endPTS;var v=0,f;if(R(l,s,function(P,F){P.relurl&&(v=P.cc-F.cc),Object(B.isFiniteNumber)(P.startPTS)&&Object(B.isFiniteNumber)(P.endPTS)&&(F.start=F.startPTS=P.startPTS,F.startDTS=P.startDTS,F.appendedPTS=P.appendedPTS,F.maxStartPTS=P.maxStartPTS,F.endPTS=P.endPTS,F.endDTS=P.endDTS,F.minEndPTS=P.minEndPTS,F.duration=P.endPTS-P.startPTS,F.duration&&(f=F),s.PTSKnown=s.alignedSliding=!0),F.elementaryStreams=P.elementaryStreams,F.loader=P.loader,F.stats=P.stats,F.urlId=P.urlId,P.initSegment&&(F.initSegment=P.initSegment,p=P.initSegment)}),p){var m=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments;m.forEach(function(P){var F;(!P.initSegment||P.initSegment.relurl===((F=p)===null||F===void 0?void 0:F.relurl))&&(P.initSegment=p)})}if(s.skippedSegments&&(s.deltaUpdateFailed=s.fragments.some(function(P){return!P}),s.deltaUpdateFailed)){C.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var c=s.skippedSegments;c--;)s.fragments.shift();s.startSN=s.fragments[0].sn,s.startCC=s.fragments[0].cc}var o=s.fragments;if(v){C.logger.warn("discontinuity sliding from playlist, take drift into account");for(var x=0;x<o.length;x++)o[x].cc+=v}s.skippedSegments&&(s.startCC=s.fragments[0].cc),E(l.partList,s.partList,function(P,F){F.elementaryStreams=P.elementaryStreams,F.stats=P.stats}),f?M(s,f,f.startPTS,f.endPTS,f.startDTS,f.endDTS):w(l,s),o.length&&(s.totalduration=s.edge-o[0].start),s.driftStartTime=l.driftStartTime,s.driftStart=l.driftStart;var y=s.advancedDateTime;if(s.advanced&&y){var S=s.edge;s.driftStart||(s.driftStartTime=y,s.driftStart=S),s.driftEndTime=y,s.driftEnd=S}else s.driftEndTime=l.driftEndTime,s.driftEnd=l.driftEnd,s.advancedDateTime=l.advancedDateTime}function E(l,s,p){if(l&&s)for(var d=0,h=0,D=l.length;h<=D;h++){var v=l[h],f=s[h+d];v&&f&&v.index===f.index&&v.fragment.sn===f.fragment.sn?p(v,f):d--}}function R(l,s,p){for(var d=s.skippedSegments,h=Math.max(l.startSN,s.startSN)-s.startSN,D=(l.fragmentHint?1:0)+(d?s.endSN:Math.min(l.endSN,s.endSN))-s.startSN,v=s.startSN-l.startSN,f=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,m=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,c=h;c<=D;c++){var o=m[v+c],x=f[c];d&&!x&&c<d&&(x=s.fragments[c]=o),o&&x&&p(o,x)}}function w(l,s){var p=s.startSN+s.skippedSegments-l.startSN,d=l.fragments;if(p<0||p>=d.length)return;A(s,d[p].start)}function A(l,s){if(s){for(var p=l.fragments,d=l.skippedSegments;d<p.length;d++)p[d].start+=s;l.fragmentHint&&(l.fragmentHint.start+=s)}}function g(l,s){var p=1e3*l.levelTargetDuration,d=p/2,h=l.age,D=h>0&&h<p*3,v=s.loading.end-s.loading.start,f,m=l.availabilityDelay;if(l.updated===!1)if(D){var c=333*l.misses;f=Math.max(Math.min(d,v*2),c),l.availabilityDelay=(l.availabilityDelay||0)+f}else f=d;else D?(m=Math.min(m||p/2,h),l.availabilityDelay=m,f=m+p-h):f=p-v;return Math.round(f)}function u(l,s,p){if(!l||!l.details)return null;var d=l.details,h=d.fragments[s-d.startSN];return h||(h=d.fragmentHint,h&&h.sn===s?h:s<d.startSN&&p&&p.sn===s?p:null)}function a(l,s,p){if(!l||!l.details)return null;var d=l.details.partList;if(d)for(var h=d.length;h--;){var D=d[h];if(D.index===p&&D.fragment.sn===s)return D}return null}},"./src/controller/stream-controller.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return d});var B=O("./src/polyfills/number.ts"),C=O("./src/controller/base-stream-controller.ts"),L=O("./src/is-supported.ts"),U=O("./src/events.ts"),_=O("./src/utils/buffer-helper.ts"),I=O("./src/controller/fragment-tracker.ts"),M=O("./src/types/loader.ts"),b=O("./src/loader/fragment.ts"),E=O("./src/demux/transmuxer-interface.ts"),R=O("./src/types/transmuxer.ts"),w=O("./src/controller/gap-controller.ts"),A=O("./src/errors.ts"),g=O("./src/utils/logger.ts");function u(h,D){for(var v=0;v<D.length;v++){var f=D[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(h,f.key,f)}}function a(h,D,v){return D&&u(h.prototype,D),v&&u(h,v),h}function l(h,D){h.prototype=Object.create(D.prototype),h.prototype.constructor=h,s(h,D)}function s(h,D){return s=Object.setPrototypeOf||function(f,m){return f.__proto__=m,f},s(h,D)}var p=100,d=function(h){l(D,h);function D(f,m){var c;return c=h.call(this,f,m,"[stream-controller]")||this,c.audioCodecSwap=!1,c.gapController=null,c.level=-1,c._forceStartLoad=!1,c.altAudio=!1,c.audioOnly=!1,c.fragPlaying=null,c.onvplaying=null,c.onvseeked=null,c.fragLastKbps=0,c.stalled=!1,c.couldBacktrack=!1,c.audioCodecSwitch=!1,c.videoBuffer=null,c._registerListeners(),c}var v=D.prototype;return v._registerListeners=function(){var m=this.hls;m.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.on(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),m.on(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),m.on(U.Events.LEVEL_LOADING,this.onLevelLoading,this),m.on(U.Events.LEVEL_LOADED,this.onLevelLoaded,this),m.on(U.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),m.on(U.Events.ERROR,this.onError,this),m.on(U.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),m.on(U.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),m.on(U.Events.BUFFER_CREATED,this.onBufferCreated,this),m.on(U.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),m.on(U.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),m.on(U.Events.FRAG_BUFFERED,this.onFragBuffered,this)},v._unregisterListeners=function(){var m=this.hls;m.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.off(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),m.off(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),m.off(U.Events.LEVEL_LOADED,this.onLevelLoaded,this),m.off(U.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),m.off(U.Events.ERROR,this.onError,this),m.off(U.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),m.off(U.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),m.off(U.Events.BUFFER_CREATED,this.onBufferCreated,this),m.off(U.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),m.off(U.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),m.off(U.Events.FRAG_BUFFERED,this.onFragBuffered,this)},v.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},v.startLoad=function(m){if(this.levels){var c=this.lastCurrentTime,o=this.hls;if(this.stopLoad(),this.setInterval(p),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var x=o.startLevel;x===-1&&(o.config.testBandwidth?(x=0,this.bitrateTest=!0):x=o.nextAutoLevel),this.level=o.nextLoadLevel=x,this.loadedmetadata=!1}c>0&&m===-1&&(this.log("Override startPosition with lastCurrentTime @"+c.toFixed(3)),m=c),this.state=C.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=m,this.tick()}else this._forceStartLoad=!0,this.state=C.State.STOPPED},v.stopLoad=function(){this._forceStartLoad=!1,h.prototype.stopLoad.call(this)},v.doTick=function(){switch(this.state){case C.State.IDLE:this.doTickIdle();break;case C.State.WAITING_LEVEL:{var m,c=this.levels,o=this.level,x=c==null||((m=c[o])===null||m===void 0)?void 0:m.details;if(x&&(!x.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(x))break;this.state=C.State.IDLE;break}break}case C.State.FRAG_LOADING_WAITING_RETRY:{var y,S=self.performance.now(),P=this.retryDate;(!P||S>=P||(y=this.media)!==null&&y!==void 0&&y.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=C.State.IDLE)}break;default:break}this.onTickEnd()},v.onTickEnd=function(){h.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},v.doTickIdle=function(){var m,c,o=this.hls,x=this.levelLastLoaded,y=this.levels,S=this.media,P=o.config,F=o.nextLoadLevel;if(x===null||!S&&(this.startFragRequested||!P.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!y||!y[F])return;var H=y[F];this.level=o.nextLoadLevel=F;var Y=H.details;if(!Y||this.state===C.State.WAITING_LEVEL||Y.live&&this.levelLastLoaded!==F){this.state=C.State.WAITING_LEVEL;return}var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:S,M.PlaylistLevelType.MAIN);if(j===null)return;var N=j.len,Z=this.getMaxBufferLength(H.maxBitrate);if(N>=Z)return;if(this._streamEnded(j,Y)){var ne={};this.altAudio&&(ne.type="video"),this.hls.trigger(U.Events.BUFFER_EOS,ne),this.state=C.State.ENDED;return}var pe=j.end,xe=this.getNextFragment(pe,Y);if(this.couldBacktrack&&!this.fragPrevious&&xe&&xe.sn!=="initSegment"){var je=xe.sn-Y.startSN;je>1&&(xe=Y.fragments[je-1],this.fragmentTracker.removeFragment(xe))}if(xe&&this.fragmentTracker.getState(xe)===I.FragmentState.OK&&this.nextLoadPosition>pe){var Le=this.audioOnly&&!this.altAudio?b.ElementaryStreamTypes.AUDIO:b.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(S,Le,M.PlaylistLevelType.MAIN),xe=this.getNextFragment(this.nextLoadPosition,Y)}if(!xe)return;xe.initSegment&&!xe.initSegment.data&&!this.bitrateTest&&(xe=xe.initSegment),((m=xe.decryptdata)===null||m===void 0?void 0:m.keyFormat)==="identity"&&!((c=xe.decryptdata)!==null&&c!==void 0&&c.key)?this.loadKey(xe,Y):this.loadFragment(xe,Y,pe)},v.loadFragment=function(m,c,o){var x,y=this.fragmentTracker.getState(m);if(this.fragCurrent=m,y===I.FragmentState.BACKTRACKED){var S=this.fragmentTracker.getBacktrackData(m);if(S){this._handleFragmentLoadProgress(S),this._handleFragmentLoadComplete(S);return}else y=I.FragmentState.NOT_LOADED}y===I.FragmentState.NOT_LOADED||y===I.FragmentState.PARTIAL?m.sn==="initSegment"?this._loadInitSegment(m):this.bitrateTest?(m.bitrateTest=!0,this.log("Fragment "+m.sn+" of level "+m.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(m)):(this.startFragRequested=!0,h.prototype.loadFragment.call(this,m,c,o)):y===I.FragmentState.APPENDING?this.reduceMaxBufferLength(m.duration)&&this.fragmentTracker.removeFragment(m):((x=this.media)===null||x===void 0?void 0:x.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},v.getAppendedFrag=function(m){var c=this.fragmentTracker.getAppendedFrag(m,M.PlaylistLevelType.MAIN);return c&&"fragment"in c?c.fragment:c},v.getBufferedFrag=function(m){return this.fragmentTracker.getBufferedFrag(m,M.PlaylistLevelType.MAIN)},v.followingBufferedFrag=function(m){return m?this.getBufferedFrag(m.end+.5):null},v.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},v.nextLevelSwitch=function(){var m=this.levels,c=this.media;if(c!=null&&c.readyState){var o,x=this.getAppendedFrag(c.currentTime);if(x&&x.start>1&&this.flushMainBuffer(0,x.start-1),!c.paused&&m){var y=this.hls.nextLoadLevel,S=m[y],P=this.fragLastKbps;P&&this.fragCurrent?o=this.fragCurrent.duration*S.maxBitrate/(1e3*P)+1:o=0}else o=0;var F=this.getBufferedFrag(c.currentTime+o);if(F){var H=this.followingBufferedFrag(F);if(H){this.abortCurrentFrag();var Y=H.maxStartPTS?H.maxStartPTS:H.start,j=H.duration,N=Math.max(F.end,Y+Math.min(Math.max(j-this.config.maxFragLookUpTolerance,j*.5),j*.75));this.flushMainBuffer(N,Number.POSITIVE_INFINITY)}}}},v.abortCurrentFrag=function(){var m=this.fragCurrent;this.fragCurrent=null,m!=null&&m.loader&&m.loader.abort(),this.state===C.State.KEY_LOADING&&(this.state=C.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},v.flushMainBuffer=function(m,c){h.prototype.flushMainBuffer.call(this,m,c,this.altAudio?"video":null)},v.onMediaAttached=function(m,c){h.prototype.onMediaAttached.call(this,m,c);var o=c.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),o.addEventListener("playing",this.onvplaying),o.addEventListener("seeked",this.onvseeked),this.gapController=new w.default(this.config,o,this.fragmentTracker,this.hls)},v.onMediaDetaching=function(){var m=this.media;m&&(m.removeEventListener("playing",this.onvplaying),m.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)},v.onMediaPlaying=function(){this.tick()},v.onMediaSeeked=function(){var m=this.media,c=m?m.currentTime:null;Object(B.isFiniteNumber)(c)&&this.log("Media seeked to "+c.toFixed(3)),this.tick()},v.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},v.onManifestParsed=function(m,c){var o=!1,x=!1,y;c.levels.forEach(function(S){y=S.audioCodec,y&&(y.indexOf("mp4a.40.2")!==-1&&(o=!0),y.indexOf("mp4a.40.5")!==-1&&(x=!0))}),this.audioCodecSwitch=o&&x&&!Object(L.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=c.levels,this.startFragRequested=!1},v.onLevelLoading=function(m,c){var o=this.levels;if(!o||this.state!==C.State.IDLE)return;var x=o[c.level];(!x.details||x.details.live&&this.levelLastLoaded!==c.level||this.waitForCdnTuneIn(x.details))&&(this.state=C.State.WAITING_LEVEL)},v.onLevelLoaded=function(m,c){var o,x=this.levels,y=c.level,S=c.details,P=S.totalduration;if(!x){this.warn("Levels were reset while loading level "+y);return}this.log("Level "+y+" loaded ["+S.startSN+","+S.endSN+"], cc ["+S.startCC+", "+S.endCC+"] duration:"+P);var F=this.fragCurrent;F&&(this.state===C.State.FRAG_LOADING||this.state===C.State.FRAG_LOADING_WAITING_RETRY)&&(F.level!==c.level&&F.loader&&(this.state=C.State.IDLE,F.loader.abort()));var H=x[y],Y=0;if(S.live||(o=H.details)!==null&&o!==void 0&&o.live){if(S.fragments[0]||(S.deltaUpdateFailed=!0),S.deltaUpdateFailed)return;Y=this.alignPlaylists(S,H.details)}if(H.details=S,this.levelLastLoaded=y,this.hls.trigger(U.Events.LEVEL_UPDATED,{details:S,level:y}),this.state===C.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(S))return;this.state=C.State.IDLE}this.startFragRequested?S.live&&this.synchronizeToLiveEdge(S):this.setStartPosition(S,Y),this.tick()},v._handleFragmentLoadProgress=function(m){var c,o=m.frag,x=m.part,y=m.payload,S=this.levels;if(!S){this.warn("Levels were reset while fragment load was in progress. Fragment "+o.sn+" of level "+o.level+" will not be buffered");return}var P=S[o.level],F=P.details;if(!F){this.warn("Dropping fragment "+o.sn+" of level "+o.level+" after level details were reset");return}var H=P.videoCodec,Y=F.PTSKnown||!F.live,j=(c=o.initSegment)===null||c===void 0?void 0:c.data,N=this._getAudioCodec(P),Z=this.transmuxer=this.transmuxer||new E.default(this.hls,M.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ne=x?x.index:-1,pe=ne!==-1,xe=new R.ChunkMetadata(o.level,o.sn,o.stats.chunkCount,y.byteLength,ne,pe),je=this.initPTS[o.cc];Z.push(y,j,N,H,o,x,F.totalduration,Y,xe,je)},v.onAudioTrackSwitching=function(m,c){var o=this.altAudio,x=!!c.url,y=c.id;if(!x){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var S=this.fragCurrent;S!=null&&S.loader&&(this.log("Switching to main audio track, cancel main fragment load"),S.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var P=this.hls;o&&P.trigger(U.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),P.trigger(U.Events.AUDIO_TRACK_SWITCHED,{id:y})}},v.onAudioTrackSwitched=function(m,c){var o=c.id,x=!!this.hls.audioTracks[o].url;if(x){var y=this.videoBuffer;y&&this.mediaBuffer!==y&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=y)}this.altAudio=x,this.tick()},v.onBufferCreated=function(m,c){var o=c.tracks,x,y,S=!1;for(var P in o){var F=o[P];if(F.id==="main"){if(y=P,x=F,P==="video"){var H=o[P];H&&(this.videoBuffer=H.buffer)}}else S=!0}S&&x?(this.log("Alternate track found, use "+y+".buffered to schedule main fragment loading"),this.mediaBuffer=x.buffer):this.mediaBuffer=this.media},v.onFragBuffered=function(m,c){var o=c.frag,x=c.part;if(o&&o.type!==M.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(o)){this.warn("Fragment "+o.sn+(x?" p: "+x.index:"")+" of level "+o.level+" finished buffering, but was aborted. state: "+this.state),this.state===C.State.PARSED&&(this.state=C.State.IDLE);return}var y=x?x.stats:o.stats;this.fragLastKbps=Math.round(8*y.total/(y.buffering.end-y.loading.first)),o.sn!=="initSegment"&&(this.fragPrevious=o),this.fragBufferedComplete(o,x)},v.onError=function(m,c){switch(c.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(M.PlaylistLevelType.MAIN,c);break;case A.ErrorDetails.LEVEL_LOAD_ERROR:case A.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==C.State.ERROR&&(c.fatal?(this.warn(""+c.details),this.state=C.State.ERROR):!c.levelRetry&&this.state===C.State.WAITING_LEVEL&&(this.state=C.State.IDLE));break;case A.ErrorDetails.BUFFER_FULL_ERROR:if(c.parent==="main"&&(this.state===C.State.PARSING||this.state===C.State.PARSED)){var o=!0,x=this.getFwdBufferInfo(this.media,M.PlaylistLevelType.MAIN);x&&x.len>.5&&(o=!this.reduceMaxBufferLength(x.len)),o&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},v.checkBuffer=function(){var m=this.media,c=this.gapController;if(!m||!c||!m.readyState)return;var o=_.BufferHelper.getBuffered(m);!this.loadedmetadata&&o.length?(this.loadedmetadata=!0,this.seekToStartPos()):c.poll(this.lastCurrentTime),this.lastCurrentTime=m.currentTime},v.onFragLoadEmergencyAborted=function(){this.state=C.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},v.onBufferFlushed=function(m,c){var o=c.type;if(o!==b.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var x=(o===b.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(x,o,M.PlaylistLevelType.MAIN)}},v.onLevelsUpdated=function(m,c){this.levels=c.levels},v.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},v.seekToStartPos=function(){var m=this.media,c=m.currentTime,o=this.startPosition;if(o>=0&&c<o){if(m.seeking){g.logger.log("could not seek to "+o+", already seeking at "+c);return}var x=_.BufferHelper.getBuffered(m),y=x.length?x.start(0):0,S=y-o;S>0&&(S<this.config.maxBufferHole||S<this.config.maxFragLookUpTolerance)&&(g.logger.log("adjusting start position by "+S+" to match buffer start"),o+=S,this.startPosition=o),this.log("seek to target start position "+o+" from current time "+c),m.currentTime=o}},v._getAudioCodec=function(m){var c=this.config.defaultAudioCodec||m.audioCodec;return this.audioCodecSwap&&c&&(this.log("Swapping audio codec"),c.indexOf("mp4a.40.5")!==-1?c="mp4a.40.2":c="mp4a.40.5"),c},v._loadBitrateTestFrag=function(m){var c=this;this._doFragLoad(m).then(function(o){var x=c.hls;if(!o||x.nextLoadLevel||c.fragContextChanged(m))return;c.fragLoadError=0,c.state=C.State.IDLE,c.startFragRequested=!1,c.bitrateTest=!1;var y=m.stats;y.parsing.start=y.parsing.end=y.buffering.start=y.buffering.end=self.performance.now(),x.trigger(U.Events.FRAG_LOADED,o)})},v._handleTransmuxComplete=function(m){var c,o="main",x=this.hls,y=m.remuxResult,S=m.chunkMeta,P=this.getCurrentContext(S);if(!P){this.warn("The loading context changed while buffering fragment "+S.sn+" of level "+S.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(S.level);return}var F=P.frag,H=P.part,Y=P.level,j=y.video,N=y.text,Z=y.id3,ne=y.initSegment,pe=this.altAudio?void 0:y.audio;if(this.fragContextChanged(F))return;if(this.state=C.State.PARSING,ne){ne.tracks&&(this._bufferInitSegment(Y,ne.tracks,F,S),x.trigger(U.Events.FRAG_PARSING_INIT_SEGMENT,{frag:F,id:o,tracks:ne.tracks}));var xe=ne.initPTS,je=ne.timescale;Object(B.isFiniteNumber)(xe)&&(this.initPTS[F.cc]=xe,x.trigger(U.Events.INIT_PTS_FOUND,{frag:F,id:o,initPTS:xe,timescale:je}))}if(j&&y.independent!==!1){if(Y.details){var Le=j.startPTS,De=j.endPTS,Ce=j.startDTS,we=j.endDTS;if(H)H.elementaryStreams[j.type]={startPTS:Le,endPTS:De,startDTS:Ce,endDTS:we};else if(j.firstKeyFrame&&j.independent&&(this.couldBacktrack=!0),j.dropped&&j.independent){var fe=this.getLoadPosition()+this.config.maxBufferHole;if(fe<Le){this.backtrack(F);return}F.setElementaryStreamInfo(j.type,F.start,De,F.start,we,!0)}F.setElementaryStreamInfo(j.type,Le,De,Ce,we),this.bufferFragmentData(j,F,H,S)}}else if(y.independent===!1){this.backtrack(F);return}if(pe){var he=pe.startPTS,_e=pe.endPTS,at=pe.startDTS,et=pe.endDTS;H&&(H.elementaryStreams[b.ElementaryStreamTypes.AUDIO]={startPTS:he,endPTS:_e,startDTS:at,endDTS:et}),F.setElementaryStreamInfo(b.ElementaryStreamTypes.AUDIO,he,_e,at,et),this.bufferFragmentData(pe,F,H,S)}if(Z!=null&&(c=Z.samples)!==null&&c!==void 0&&c.length){var it={frag:F,id:o,samples:Z.samples};x.trigger(U.Events.FRAG_PARSING_METADATA,it)}if(N){var gt={frag:F,id:o,samples:N.samples};x.trigger(U.Events.FRAG_PARSING_USERDATA,gt)}},v._bufferInitSegment=function(m,c,o,x){var y=this;if(this.state!==C.State.PARSING)return;this.audioOnly=!!c.audio&&!c.video,this.altAudio&&!this.audioOnly&&delete c.audio;var S=c.audio,P=c.video,F=c.audiovideo;if(S){var H=m.audioCodec,Y=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(H&&(H.indexOf("mp4a.40.5")!==-1?H="mp4a.40.2":H="mp4a.40.5"),S.metadata.channelCount!==1&&Y.indexOf("firefox")===-1&&(H="mp4a.40.5")),Y.indexOf("android")!==-1&&S.container!=="audio/mpeg"&&(H="mp4a.40.2",this.log("Android: force audio codec to "+H)),m.audioCodec&&m.audioCodec!==H&&this.log('Swapping manifest audio codec "'+m.audioCodec+'" for "'+H+'"'),S.levelCodec=H,S.id="main",this.log("Init audio buffer, container:"+S.container+", codecs[selected/level/parsed]=["+(H||"")+"/"+(m.audioCodec||"")+"/"+S.codec+"]")}P&&(P.levelCodec=m.videoCodec,P.id="main",this.log("Init video buffer, container:"+P.container+", codecs[level/parsed]=["+(m.videoCodec||"")+"/"+P.codec+"]")),F&&this.log("Init audiovideo buffer, container:"+F.container+", codecs[level/parsed]=["+(m.attrs.CODECS||"")+"/"+F.codec+"]"),this.hls.trigger(U.Events.BUFFER_CODECS,c),Object.keys(c).forEach(function(j){var N=c[j],Z=N.initSegment;Z!=null&&Z.byteLength&&y.hls.trigger(U.Events.BUFFER_APPENDING,{type:j,data:Z,frag:o,part:null,chunkMeta:x,parent:o.type})}),this.tick()},v.backtrack=function(m){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(m);var c=this.fragmentTracker.backtrack(m);this.fragPrevious=null,this.nextLoadPosition=m.start,c?this.resetFragmentLoading(m):this.state=C.State.BACKTRACKING},v.checkFragmentChanged=function(){var m=this.media,c=null;if(m&&m.readyState>1&&m.seeking===!1){var o=m.currentTime;if(_.BufferHelper.isBuffered(m,o)?c=this.getAppendedFrag(o):_.BufferHelper.isBuffered(m,o+.1)&&(c=this.getAppendedFrag(o+.1)),c){var x=this.fragPlaying,y=c.level;(!x||c.sn!==x.sn||x.level!==y||c.urlId!==x.urlId)&&(this.hls.trigger(U.Events.FRAG_CHANGED,{frag:c}),(!x||x.level!==y)&&this.hls.trigger(U.Events.LEVEL_SWITCHED,{level:y}),this.fragPlaying=c)}}},a(D,[{key:"nextLevel",get:function(){var m=this.nextBufferedFrag;return m?m.level:-1}},{key:"currentLevel",get:function(){var m=this.media;if(m){var c=this.getAppendedFrag(m.currentTime);if(c)return c.level}return-1}},{key:"nextBufferedFrag",get:function(){var m=this.media;if(m){var c=this.getAppendedFrag(m.currentTime);return this.followingBufferedFrag(c)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),D}(C.default)},"./src/controller/subtitle-stream-controller.ts":function($,K,O){"use strict";O.r(K),O.d(K,"SubtitleStreamController",function(){return l});var B=O("./src/events.ts"),C=O("./src/utils/logger.ts"),L=O("./src/utils/buffer-helper.ts"),U=O("./src/controller/fragment-finders.ts"),_=O("./src/utils/discontinuities.ts"),I=O("./src/controller/level-helper.ts"),M=O("./src/controller/fragment-tracker.ts"),b=O("./src/controller/base-stream-controller.ts"),E=O("./src/types/loader.ts"),R=O("./src/types/level.ts");function w(s,p){for(var d=0;d<p.length;d++){var h=p[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(s,h.key,h)}}function A(s,p,d){return p&&w(s.prototype,p),d&&w(s,d),s}function g(s,p){s.prototype=Object.create(p.prototype),s.prototype.constructor=s,u(s,p)}function u(s,p){return u=Object.setPrototypeOf||function(h,D){return h.__proto__=D,h},u(s,p)}var a=500,l=function(s){g(p,s);function p(h,D){var v;return v=s.call(this,h,D,"[subtitle-stream-controller]")||this,v.levels=[],v.currentTrackId=-1,v.tracksBuffered=[],v.mainDetails=null,v._registerListeners(),v}var d=p.prototype;return d.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},d._registerListeners=function(){var D=this.hls;D.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),D.on(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),D.on(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),D.on(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.on(B.Events.ERROR,this.onError,this),D.on(B.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),D.on(B.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),D.on(B.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),D.on(B.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),D.on(B.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},d._unregisterListeners=function(){var D=this.hls;D.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),D.off(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),D.off(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),D.off(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.off(B.Events.ERROR,this.onError,this),D.off(B.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),D.off(B.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),D.off(B.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),D.off(B.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),D.off(B.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},d.startLoad=function(){this.stopLoad(),this.state=b.State.IDLE,this.setInterval(a),this.tick()},d.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},d.onLevelLoaded=function(D,v){this.mainDetails=v.details},d.onSubtitleFragProcessed=function(D,v){var f=v.frag,m=v.success;if(this.fragPrevious=f,this.state=b.State.IDLE,!m)return;var c=this.tracksBuffered[this.currentTrackId];if(!c)return;for(var o,x=f.start,y=0;y<c.length;y++)if(x>=c[y].start&&x<=c[y].end){o=c[y];break}var S=f.start+f.duration;o?o.end=S:(o={start:x,end:S},c.push(o)),this.fragmentTracker.fragBuffered(f)},d.onBufferFlushing=function(D,v){var f=v.startOffset,m=v.endOffset;if(f===0&&m!==Number.POSITIVE_INFINITY){var c=this.currentTrackId,o=this.levels;if(!o.length||!o[c]||!o[c].details)return;var x=o[c].details,y=x.targetduration,S=m-y;if(S<=0)return;v.endOffsetSubtitles=Math.max(0,S),this.tracksBuffered.forEach(function(P){for(var F=0;F<P.length;){if(P[F].end<=S){P.shift();continue}else if(P[F].start<S)P[F].start=S;else break;F++}}),this.fragmentTracker.removeFragmentsInRange(f,S,E.PlaylistLevelType.SUBTITLE)}},d.onError=function(D,v){var f,m=v.frag;if(!m||m.type!==E.PlaylistLevelType.SUBTITLE)return;(f=this.fragCurrent)!==null&&f!==void 0&&f.loader&&this.fragCurrent.loader.abort(),this.state=b.State.IDLE},d.onSubtitleTracksUpdated=function(D,v){var f=this,m=v.subtitleTracks;this.tracksBuffered=[],this.levels=m.map(function(c){return new R.Level(c)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(c){f.tracksBuffered[c.id]=[]}),this.mediaBuffer=null},d.onSubtitleTrackSwitch=function(D,v){if(this.currentTrackId=v.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(a)},d.onSubtitleTrackLoaded=function(D,v){var f,m=v.details,c=v.id,o=this.currentTrackId,x=this.levels;if(!x.length)return;var y=x[o];if(c>=x.length||c!==o||!y)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,m.live||(f=y.details)!==null&&f!==void 0&&f.live){var S=this.mainDetails;if(m.deltaUpdateFailed||!S)return;var P=S.fragments[0];if(!y.details)m.hasProgramDateTime&&S.hasProgramDateTime?Object(_.alignMediaPlaylistByPDT)(m,S):P&&Object(I.addSliding)(m,P.start);else{var F=this.alignPlaylists(m,y.details);F===0&&P&&Object(I.addSliding)(m,P.start)}}if(y.details=m,this.levelLastLoaded=c,this.tick(),m.live&&!this.fragCurrent&&this.media&&this.state===b.State.IDLE){var H=Object(U.findFragmentByPTS)(null,m.fragments,this.media.currentTime,0);H||(this.warn("Subtitle playlist not aligned with playback"),y.details=void 0)}},d._handleFragmentLoadComplete=function(D){var v=D.frag,f=D.payload,m=v.decryptdata,c=this.hls;if(this.fragContextChanged(v))return;if(f&&f.byteLength>0&&m&&m.key&&m.iv&&m.method==="AES-128"){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(f),m.key.buffer,m.iv.buffer).then(function(x){var y=performance.now();c.trigger(B.Events.FRAG_DECRYPTED,{frag:v,payload:x,stats:{tstart:o,tdecrypt:y}})})}},d.doTick=function(){if(!this.media){this.state=b.State.IDLE;return}if(this.state===b.State.IDLE){var D,v=this.currentTrackId,f=this.levels;if(!f.length||!f[v]||!f[v].details)return;var m=f[v].details,c=m.targetduration,o=this.config,x=this.media,y=L.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,x.currentTime-c,o.maxBufferHole),S=y.end,P=y.len,F=this.getMaxBufferLength()+c;if(P>F)return;console.assert(m,"Subtitle track details are defined on idle subtitle stream controller tick");var H=m.fragments,Y=H.length,j=m.edge,N,Z=this.fragPrevious;if(S<j){var ne=o.maxFragLookUpTolerance;Z&&m.hasProgramDateTime&&(N=Object(U.findFragmentByPDT)(H,Z.endProgramDateTime,ne)),N||(N=Object(U.findFragmentByPTS)(Z,H,S,ne),!N&&Z&&Z.start<H[0].start&&(N=H[0]))}else N=H[Y-1];(D=N)!==null&&D!==void 0&&D.encrypted?(C.logger.log("Loading key for "+N.sn),this.state=b.State.KEY_LOADING,this.hls.trigger(B.Events.KEY_LOADING,{frag:N})):N&&this.fragmentTracker.getState(N)===M.FragmentState.NOT_LOADED&&this.loadFragment(N,m,S)}},d.loadFragment=function(D,v,f){this.fragCurrent=D,s.prototype.loadFragment.call(this,D,v,f)},A(p,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),p}(b.default)},"./src/controller/subtitle-track-controller.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/events.ts"),C=O("./src/utils/texttrack-utils.ts"),L=O("./src/controller/base-playlist-controller.ts"),U=O("./src/types/loader.ts");function _(w,A){for(var g=0;g<A.length;g++){var u=A[g];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(w,u.key,u)}}function I(w,A,g){return A&&_(w.prototype,A),g&&_(w,g),w}function M(w,A){w.prototype=Object.create(A.prototype),w.prototype.constructor=w,b(w,A)}function b(w,A){return b=Object.setPrototypeOf||function(u,a){return u.__proto__=a,u},b(w,A)}var E=function(w){M(A,w);function A(u){var a;return a=w.call(this,u,"[subtitle-track-controller]")||this,a.media=null,a.tracks=[],a.groupId=null,a.tracksInGroup=[],a.trackId=-1,a.selectDefaultTrack=!0,a.queuedDefaultTrack=-1,a.trackChangeListener=function(){return a.onTextTracksChanged()},a.asyncPollTrackChange=function(){return a.pollTrackChange(0)},a.useTextTrackPolling=!1,a.subtitlePollingInterval=-1,a.subtitleDisplay=!0,a.registerListeners(),a}var g=A.prototype;return g.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,w.prototype.destroy.call(this)},g.registerListeners=function(){var a=this.hls;a.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(B.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(B.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(B.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.on(B.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.on(B.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){var a=this.hls;a.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(B.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(B.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(B.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.off(B.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.off(B.Events.ERROR,this.onError,this)},g.onMediaAttached=function(a,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)},g.pollTrackChange=function(a){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,a)},g.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 a=R(this.media.textTracks);a.forEach(function(l){Object(C.clearCurrentCues)(l)}),this.subtitleTrack=-1,this.media=null},g.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},g.onManifestParsed=function(a,l){this.tracks=l.subtitleTracks},g.onSubtitleTrackLoaded=function(a,l){var s=l.id,p=l.details,d=this.trackId,h=this.tracksInGroup[d];if(!h){this.warn("Invalid subtitle track id "+s);return}var D=h.details;h.details=l.details,this.log("subtitle track "+s+" loaded ["+p.startSN+"-"+p.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,l,D))},g.onLevelLoading=function(a,l){this.switchLevel(l.level)},g.onLevelSwitching=function(a,l){this.switchLevel(l.level)},g.switchLevel=function(a){var l=this.hls.levels[a];if(!(l!=null&&l.textGroupIds))return;var s=l.textGroupIds[l.urlId];if(this.groupId!==s){var p=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,d=this.tracks.filter(function(v){return!s||v.groupId===s});this.tracksInGroup=d;var h=this.findTrackId(p==null?void 0:p.name)||this.findTrackId();this.groupId=s;var D={subtitleTracks:d};this.log("Updating subtitle tracks, "+d.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(B.Events.SUBTITLE_TRACKS_UPDATED,D),h!==-1&&this.setSubtitleTrack(h,p)}},g.findTrackId=function(a){for(var l=this.tracksInGroup,s=0;s<l.length;s++){var p=l[s];if((!this.selectDefaultTrack||p.default)&&(!a||a===p.name))return p.id}return-1},g.onError=function(a,l){if(w.prototype.onError.call(this,a,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)},g.loadPlaylist=function(a){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var s=l.id,p=l.groupId,d=l.url;if(a)try{d=a.addDirectives(d)}catch(h){this.warn("Could not construct new URL with HLS Delivery Directives: "+h)}this.log("Loading subtitle playlist for id "+s),this.hls.trigger(B.Events.SUBTITLE_TRACK_LOADING,{url:d,id:s,groupId:p,deliveryDirectives:a||null})}},g.toggleTrackModes=function(a){var l=this,s=this.media,p=this.subtitleDisplay,d=this.trackId;if(!s)return;var h=R(s.textTracks),D=h.filter(function(m){return m.groupId===l.groupId});if(a===-1)[].slice.call(h).forEach(function(m){m.mode="disabled"});else{var v=D[d];v&&(v.mode="disabled")}var f=D[a];f&&(f.mode=p?"showing":"hidden")},g.setSubtitleTrack=function(a,l){var s,p=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=a;return}if(this.trackId!==a&&this.toggleTrackModes(a),this.trackId===a&&(a===-1||(s=p[a])!==null&&s!==void 0&&s.details)||a<-1||a>=p.length)return;this.clearTimer();var d=p[a];if(this.log("Switching to subtitle track "+a),this.trackId=a,d){var h=d.id,D=d.groupId,v=D===void 0?"":D,f=d.name,m=d.type,c=d.url;this.hls.trigger(B.Events.SUBTITLE_TRACK_SWITCH,{id:h,groupId:v,name:f,type:m,url:c});var o=this.switchParams(d.url,l==null?void 0:l.details);this.loadPlaylist(o)}else this.hls.trigger(B.Events.SUBTITLE_TRACK_SWITCH,{id:a})},g.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var a=-1,l=R(this.media.textTracks),s=0;s<l.length;s++)if(l[s].mode==="hidden")a=s;else if(l[s].mode==="showing"){a=s;break}this.subtitleTrack!==a&&(this.subtitleTrack=a)},I(A,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(a){this.selectDefaultTrack=!1;var l=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(a,l)}}]),A}(L.default);function R(w){for(var A=[],g=0;g<w.length;g++){var u=w[g];u.kind==="subtitles"&&u.label&&A.push(w[g])}return A}K.default=E},"./src/controller/timeline-controller.ts":function($,K,O){"use strict";O.r(K),O.d(K,"TimelineController",function(){return R});var B=O("./src/polyfills/number.ts"),C=O("./src/events.ts"),L=O("./src/utils/cea-608-parser.ts"),U=O("./src/utils/output-filter.ts"),_=O("./src/utils/webvtt-parser.ts"),I=O("./src/utils/texttrack-utils.ts"),M=O("./src/utils/imsc1-ttml-parser.ts"),b=O("./src/types/loader.ts"),E=O("./src/utils/logger.ts"),R=function(){function u(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=g(),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 s=new U.default(this,"textTrack1"),p=new U.default(this,"textTrack2"),d=new U.default(this,"textTrack3"),h=new U.default(this,"textTrack4");this.cea608Parser1=new L.default(1,s,p),this.cea608Parser2=new L.default(3,d,h)}l.on(C.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(C.Events.MANIFEST_LOADED,this.onManifestLoaded,this),l.on(C.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.on(C.Events.FRAG_LOADING,this.onFragLoading,this),l.on(C.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(C.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.on(C.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),l.on(C.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(C.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.on(C.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var a=u.prototype;return a.destroy=function(){var s=this.hls;s.off(C.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(C.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.off(C.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.off(C.Events.FRAG_LOADING,this.onFragLoading,this),s.off(C.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(C.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.off(C.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.off(C.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.off(C.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.off(C.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},a.addCues=function(s,p,d,h,D){for(var v=!1,f=D.length;f--;){var m=D[f],c=A(m[0],m[1],p,d);if(c>=0&&(m[0]=Math.min(m[0],p),m[1]=Math.max(m[1],d),v=!0,c/(d-p)>.5))return}if(v||D.push([p,d]),this.config.renderTextTracksNatively){var o=this.captionsTracks[s];this.Cues.newCue(o,p,d,h)}else{var x=this.Cues.newCue(null,p,d,h);this.hls.trigger(C.Events.CUES_PARSED,{type:"captions",cues:x,track:s})}},a.onInitPtsFound=function(s,p){var d=this,h=p.frag,D=p.id,v=p.initPTS,f=p.timescale,m=this.unparsedVttFrags;D==="main"&&(this.initPTS[h.cc]=v,this.timescale[h.cc]=f),m.length&&(this.unparsedVttFrags=[],m.forEach(function(c){d.onFragLoaded(C.Events.FRAG_LOADED,c)}))},a.getExistingTrack=function(s){var p=this.media;if(p)for(var d=0;d<p.textTracks.length;d++){var h=p.textTracks[d];if(h[s])return h}return null},a.createCaptionsTrack=function(s){this.config.renderTextTracksNatively?this.createNativeTrack(s):this.createNonNativeTrack(s)},a.createNativeTrack=function(s){if(this.captionsTracks[s])return;var p=this.captionsProperties,d=this.captionsTracks,h=this.media,D=p[s],v=D.label,f=D.languageCode,m=this.getExistingTrack(s);if(m)d[s]=m,Object(I.clearCurrentCues)(d[s]),Object(I.sendAddTrackEvent)(d[s],h);else{var c=this.createTextTrack("captions",v,f);c&&(c[s]=!0,d[s]=c)}},a.createNonNativeTrack=function(s){if(this.nonNativeCaptionsTracks[s])return;var p=this.captionsProperties[s];if(!p)return;var d=p.label,h={_id:s,label:d,kind:"captions",default:p.media?!!p.media.default:!1,closedCaptions:p.media};this.nonNativeCaptionsTracks[s]=h,this.hls.trigger(C.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[h]})},a.createTextTrack=function(s,p,d){var h=this.media;return h?h.addTextTrack(s,p,d):void 0},a.onMediaAttaching=function(s,p){this.media=p.media,this._cleanTracks()},a.onMediaDetaching=function(){var s=this.captionsTracks;Object.keys(s).forEach(function(p){Object(I.clearCurrentCues)(s[p]),delete s[p]}),this.nonNativeCaptionsTracks={}},a.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=g(),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())},a._cleanTracks=function(){var s=this.media;if(!s)return;var p=s.textTracks;if(p)for(var d=0;d<p.length;d++)Object(I.clearCurrentCues)(p[d])},a.onSubtitleTracksUpdated=function(s,p){var d=this;this.textTracks=[];var h=p.subtitleTracks||[],D=h.some(function(c){return c.textCodec===M.IMSC1_CODEC});if(this.config.enableWebVTT||D&&this.config.enableIMSC1){var v=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(c,o){var x;if(o<f.length){for(var y=null,S=0;S<f.length;S++)if(w(f[S],c)){y=f[S];break}y&&(x=y)}x?Object(I.clearCurrentCues)(x):(x=d.createTextTrack("subtitles",c.name,c.lang),x&&(x.mode="disabled")),x&&(x.groupId=c.groupId,d.textTracks.push(x))})}else if(!v&&this.tracks&&this.tracks.length){var m=this.tracks.map(function(c){return{label:c.name,kind:c.type.toLowerCase(),default:c.default,subtitleTrack:c}});this.hls.trigger(C.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:m})}}},a.onManifestLoaded=function(s,p){var d=this;this.config.enableCEA708Captions&&p.captions&&p.captions.forEach(function(h){var D=/(?:CC|SERVICE)([1-4])/.exec(h.instreamId);if(!D)return;var v="textTrack"+D[1],f=d.captionsProperties[v];if(!f)return;f.label=h.name,h.lang&&(f.languageCode=h.lang),f.media=h})},a.onFragLoading=function(s,p){var d=this.cea608Parser1,h=this.cea608Parser2,D=this.lastSn,v=this.lastPartIndex;if(!this.enabled||!(d&&h))return;if(p.frag.type===b.PlaylistLevelType.MAIN){var f,m,c=p.frag.sn,o=(f=p==null||((m=p.part)===null||m===void 0)?void 0:m.index)!=null?f:-1;c===D+1||c===D&&o===v+1||(d.reset(),h.reset()),this.lastSn=c,this.lastPartIndex=o}},a.onFragLoaded=function(s,p){var d=p.frag,h=p.payload,D=this.initPTS,v=this.unparsedVttFrags;if(d.type===b.PlaylistLevelType.SUBTITLE)if(h.byteLength){if(!Object(B.isFiniteNumber)(D[d.cc])){v.push(p),D.length&&this.hls.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d,error:new Error("Missing initial subtitle PTS")});return}var f=d.decryptdata;if(f==null||f.key==null||f.method!=="AES-128"){var m=this.tracks[d.level],c=this.vttCCs;c[d.cc]||(c[d.cc]={start:d.start,prevCC:this.prevCC,new:!0},this.prevCC=d.cc),m&&m.textCodec===M.IMSC1_CODEC?this._parseIMSC1(d,h):this._parseVTTs(d,h,c)}}else this.hls.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d,error:new Error("Empty subtitle payload")})},a._parseIMSC1=function(s,p){var d=this,h=this.hls;Object(M.parseIMSC1)(p,this.initPTS[s.cc],this.timescale[s.cc],function(D){d._appendCues(D,s.level),h.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})},function(D){E.logger.log("Failed to parse IMSC1: "+D),h.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:D})})},a._parseVTTs=function(s,p,d){var h=this,D=this.hls;Object(_.parseWebVTT)(p,this.initPTS[s.cc],this.timescale[s.cc],d,s.cc,s.start,function(v){h._appendCues(v,s.level),D.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})},function(v){h._fallbackToIMSC1(s,p),E.logger.log("Failed to parse VTT cue: "+v),D.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:v})})},a._fallbackToIMSC1=function(s,p){var d=this,h=this.tracks[s.level];h.textCodec||Object(M.parseIMSC1)(p,this.initPTS[s.cc],this.timescale[s.cc],function(){h.textCodec=M.IMSC1_CODEC,d._parseIMSC1(s,p)},function(){h.textCodec="wvtt"})},a._appendCues=function(s,p){var d=this.hls;if(this.config.renderTextTracksNatively){var h=this.textTracks[p];if(h.mode==="disabled")return;s.forEach(function(f){return Object(I.addCueToTrack)(h,f)})}else{var D=this.tracks[p],v=D.default?"default":"subtitles"+p;d.trigger(C.Events.CUES_PARSED,{type:"subtitles",cues:s,track:v})}},a.onFragDecrypted=function(s,p){var d=p.frag;if(d.type===b.PlaylistLevelType.SUBTITLE){if(!Object(B.isFiniteNumber)(this.initPTS[d.cc])){this.unparsedVttFrags.push(p);return}this.onFragLoaded(C.Events.FRAG_LOADED,p)}},a.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},a.onFragParsingUserdata=function(s,p){var d=this.cea608Parser1,h=this.cea608Parser2;if(!this.enabled||!(d&&h))return;for(var D=0;D<p.samples.length;D++){var v=p.samples[D].bytes;if(v){var f=this.extractCea608Data(v);d.addData(p.samples[D].pts,f[0]),h.addData(p.samples[D].pts,f[1])}}},a.onBufferFlushing=function(s,p){var d=p.startOffset,h=p.endOffset,D=p.endOffsetSubtitles,v=p.type,f=this.media;if(!f||f.currentTime<h)return;if(!v||v==="video"){var m=this.captionsTracks;Object.keys(m).forEach(function(o){return Object(I.removeCuesInRange)(m[o],d,h)})}if(this.config.renderTextTracksNatively&&(d===0&&D!==void 0)){var c=this.textTracks;Object.keys(c).forEach(function(o){return Object(I.removeCuesInRange)(c[o],d,D)})}},a.extractCea608Data=function(s){for(var p=s[0]&31,d=2,h=[[],[]],D=0;D<p;D++){var v=s[d++],f=127&s[d++],m=127&s[d++],c=(4&v)!==0,o=3&v;if(f===0&&m===0)continue;c&&((o===0||o===1)&&(h[o].push(f),h[o].push(m)))}return h},u}();function w(u,a){return u&&u.label===a.name&&!(u.textTrack1||u.textTrack2)}function A(u,a,l,s){return Math.min(a,s)-Math.max(u,l)}function g(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return B});var B=function(){function C(U,_){this.subtle=void 0,this.aesIV=void 0,this.subtle=U,this.aesIV=_}var L=C.prototype;return L.decrypt=function(_,I){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},I,_)},C}()},"./src/crypt/aes-decryptor.ts":function($,K,O){"use strict";O.r(K),O.d(K,"removePadding",function(){return C}),O.d(K,"default",function(){return L});var B=O("./src/utils/typed-array.ts");function C(U){var _=U.byteLength,I=_&&new DataView(U.buffer).getUint8(_-1);return I?Object(B.sliceUint8)(U,0,_-I):U}var L=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(M){for(var b=new DataView(M),E=new Uint32Array(4),R=0;R<4;R++)E[R]=b.getUint32(R*4);return E},_.initTable=function(){var M=this.sBox,b=this.invSBox,E=this.subMix,R=E[0],w=E[1],A=E[2],g=E[3],u=this.invSubMix,a=u[0],l=u[1],s=u[2],p=u[3],d=new Uint32Array(256),h=0,D=0,v=0;for(v=0;v<256;v++)v<128?d[v]=v<<1:d[v]=v<<1^283;for(v=0;v<256;v++){var f=D^D<<1^D<<2^D<<3^D<<4;f=f>>>8^f&255^99,M[h]=f,b[f]=h;var m=d[h],c=d[m],o=d[c],x=d[f]*257^f*16843008;R[h]=x<<24|x>>>8,w[h]=x<<16|x>>>16,A[h]=x<<8|x>>>24,g[h]=x,x=o*16843009^c*65537^m*257^h*16843008,a[f]=x<<24|x>>>8,l[f]=x<<16|x>>>16,s[f]=x<<8|x>>>24,p[f]=x,h?(h=m^d[d[d[o^m]]],D^=d[d[D]]):h=D=1}},_.expandKey=function(M){for(var b=this.uint8ArrayToUint32Array_(M),E=!0,R=0;R<b.length&&E;)E=b[R]===this.key[R],R++;if(E)return;this.key=b;var w=this.keySize=b.length;if(w!==4&&w!==6&&w!==8)throw new Error("Invalid aes key size="+w);var A=this.ksRows=(w+6+1)*4,g,u,a=this.keySchedule=new Uint32Array(A),l=this.invKeySchedule=new Uint32Array(A),s=this.sBox,p=this.rcon,d=this.invSubMix,h=d[0],D=d[1],v=d[2],f=d[3],m,c;for(g=0;g<A;g++){if(g<w){m=a[g]=b[g];continue}c=m,g%w===0?(c=c<<8|c>>>24,c=s[c>>>24]<<24|s[c>>>16&255]<<16|s[c>>>8&255]<<8|s[c&255],c^=p[g/w|0]<<24):w>6&&g%w===4&&(c=s[c>>>24]<<24|s[c>>>16&255]<<16|s[c>>>8&255]<<8|s[c&255]),a[g]=m=(a[g-w]^c)>>>0}for(u=0;u<A;u++)g=A-u,u&3?c=a[g]:c=a[g-4],u<4||g<=4?l[u]=c:l[u]=h[s[c>>>24]]^D[s[c>>>16&255]]^v[s[c>>>8&255]]^f[s[c&255]],l[u]=l[u]>>>0},_.networkToHostOrderSwap=function(M){return M<<24|(M&65280)<<8|(M&16711680)>>8|M>>>24},_.decrypt=function(M,b,E){for(var R=this.keySize+6,w=this.invKeySchedule,A=this.invSBox,g=this.invSubMix,u=g[0],a=g[1],l=g[2],s=g[3],p=this.uint8ArrayToUint32Array_(E),d=p[0],h=p[1],D=p[2],v=p[3],f=new Int32Array(M),m=new Int32Array(f.length),c,o,x,y,S,P,F,H,Y,j,N,Z,ne,pe,xe=this.networkToHostOrderSwap;b<f.length;){for(Y=xe(f[b]),j=xe(f[b+1]),N=xe(f[b+2]),Z=xe(f[b+3]),S=Y^w[0],P=Z^w[1],F=N^w[2],H=j^w[3],ne=4,pe=1;pe<R;pe++)c=u[S>>>24]^a[P>>16&255]^l[F>>8&255]^s[H&255]^w[ne],o=u[P>>>24]^a[F>>16&255]^l[H>>8&255]^s[S&255]^w[ne+1],x=u[F>>>24]^a[H>>16&255]^l[S>>8&255]^s[P&255]^w[ne+2],y=u[H>>>24]^a[S>>16&255]^l[P>>8&255]^s[F&255]^w[ne+3],S=c,P=o,F=x,H=y,ne=ne+4;c=A[S>>>24]<<24^A[P>>16&255]<<16^A[F>>8&255]<<8^A[H&255]^w[ne],o=A[P>>>24]<<24^A[F>>16&255]<<16^A[H>>8&255]<<8^A[S&255]^w[ne+1],x=A[F>>>24]<<24^A[H>>16&255]<<16^A[S>>8&255]<<8^A[P&255]^w[ne+2],y=A[H>>>24]<<24^A[S>>16&255]<<16^A[P>>8&255]<<8^A[F&255]^w[ne+3],m[b]=xe(c^d),m[b+1]=xe(y^h),m[b+2]=xe(x^D),m[b+3]=xe(o^v),d=Y,h=j,D=N,v=Z,b=b+4}return m.buffer},U}()},"./src/crypt/decrypter.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return b});var B=O("./src/crypt/aes-crypto.ts"),C=O("./src/crypt/fast-aes-key.ts"),L=O("./src/crypt/aes-decryptor.ts"),U=O("./src/utils/logger.ts"),_=O("./src/utils/mp4-tools.ts"),I=O("./src/utils/typed-array.ts"),M=16,b=function(){function E(w,A,g){var u=g===void 0?{}:g,a=u.removePKCS7Padding,l=a===void 0?!0:a;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=w,this.config=A,this.removePKCS7Padding=l,l)try{var s=self.crypto;s&&(this.subtle=s.subtle||s.webkitSubtle)}catch(p){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var R=E.prototype;return R.destroy=function(){this.observer=null},R.isSync=function(){return this.config.enableSoftwareAES},R.flush=function(){var A=this.currentResult;if(!A){this.reset();return}var g=new Uint8Array(A);return this.reset(),this.removePKCS7Padding?Object(L.removePadding)(g):g},R.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},R.decrypt=function(A,g,u,a){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(A),g,u);var l=this.flush();l&&a(l.buffer)}else this.webCryptoDecrypt(new Uint8Array(A),g,u).then(a)},R.softwareDecrypt=function(A,g,u){var a=this.currentIV,l=this.currentResult,s=this.remainderData;this.logOnce("JS AES decrypt"),s&&(A=Object(_.appendUint8Array)(s,A),this.remainderData=null);var p=this.getValidChunk(A);if(!p.length)return null;a&&(u=a);var d=this.softwareDecrypter;d||(d=this.softwareDecrypter=new L.default),d.expandKey(g);var h=l;return this.currentResult=d.decrypt(p.buffer,0,u),this.currentIV=Object(I.sliceUint8)(p,-16).buffer,h||null},R.webCryptoDecrypt=function(A,g,u){var a=this,l=this.subtle;return(this.key!==g||!this.fastAesKey)&&(this.key=g,this.fastAesKey=new C.default(l,g)),this.fastAesKey.expandKey().then(function(s){if(!l)return Promise.reject(new Error("web crypto not initialized"));var p=new B.default(l,u);return p.decrypt(A.buffer,s)}).catch(function(s){return a.onWebCryptoError(s,A,g,u)})},R.onWebCryptoError=function(A,g,u,a){return U.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",A),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(g,u,a)},R.getValidChunk=function(A){var g=A,u=A.length-A.length%M;return u!==A.length&&(g=Object(I.sliceUint8)(A,0,u),this.remainderData=Object(I.sliceUint8)(A,u)),g},R.logOnce=function(A){if(!this.logEnabled)return;U.logger.log("[decrypter.ts]: "+A),this.logEnabled=!1},E}()},"./src/crypt/fast-aes-key.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return B});var B=function(){function C(U,_){this.subtle=void 0,this.key=void 0,this.subtle=U,this.key=_}var L=C.prototype;return L.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},C}()},"./src/demux/aacdemuxer.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/demux/base-audio-demuxer.ts"),C=O("./src/demux/adts.ts"),L=O("./src/utils/logger.ts"),U=O("./src/demux/id3.ts");function _(b,E){b.prototype=Object.create(E.prototype),b.prototype.constructor=b,I(b,E)}function I(b,E){return I=Object.setPrototypeOf||function(w,A){return w.__proto__=A,w},I(b,E)}var M=function(b){_(E,b);function E(w,A){var g;return g=b.call(this)||this,g.observer=void 0,g.config=void 0,g.observer=w,g.config=A,g}var R=E.prototype;return R.resetInitSegment=function(A,g,u){b.prototype.resetInitSegment.call(this,A,g,u),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:A,duration:u,inputTimeScale:9e4,dropped:0}},E.probe=function(A){if(!A)return!1;for(var g=U.getID3Data(A,0)||[],u=g.length,a=A.length;u<a;u++)if(C.probe(A,u))return L.logger.log("ADTS sync word found !"),!0;return!1},R.canParse=function(A,g){return C.canParse(A,g)},R.appendFrame=function(A,g,u){C.initTrackConfig(A,this.observer,g,u,A.manifestCodec);var a=C.appendFrame(A,g,u,this.initPTS,this.frameIndex);if(a&&a.missing===0)return a},E}(B.default);M.minProbeByteLength=9,K.default=M},"./src/demux/adts.ts":function($,K,O){"use strict";O.r(K),O.d(K,"getAudioConfig",function(){return U}),O.d(K,"isHeaderPattern",function(){return _}),O.d(K,"getHeaderLength",function(){return I}),O.d(K,"getFullFrameLength",function(){return M}),O.d(K,"canGetFrameLength",function(){return b}),O.d(K,"isHeader",function(){return E}),O.d(K,"canParse",function(){return R}),O.d(K,"probe",function(){return w}),O.d(K,"initTrackConfig",function(){return A}),O.d(K,"getFrameDuration",function(){return g}),O.d(K,"parseFrameHeader",function(){return u}),O.d(K,"appendFrame",function(){return a});var B=O("./src/utils/logger.ts"),C=O("./src/errors.ts"),L=O("./src/events.ts");function U(l,s,p,d){var h,D,v,f,m=navigator.userAgent.toLowerCase(),c=d,o=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];h=((s[p+2]&192)>>>6)+1;var x=(s[p+2]&60)>>>2;if(x>o.length-1){l.trigger(L.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+x});return}return v=(s[p+2]&1)<<2,v|=(s[p+3]&192)>>>6,B.logger.log("manifest codec:"+d+", ADTS type:"+h+", samplingIndex:"+x),/firefox/i.test(m)?x>=6?(h=5,f=new Array(4),D=x-3):(h=2,f=new Array(2),D=x):m.indexOf("android")!==-1?(h=2,f=new Array(2),D=x):(h=5,f=new Array(4),d&&(d.indexOf("mp4a.40.29")!==-1||d.indexOf("mp4a.40.5")!==-1)||!d&&x>=6?D=x-3:((d&&d.indexOf("mp4a.40.2")!==-1&&(x>=6&&v===1||/vivaldi/i.test(m))||!d&&v===1)&&(h=2,f=new Array(2)),D=x)),f[0]=h<<3,f[0]|=(x&14)>>1,f[1]|=(x&1)<<7,f[1]|=v<<3,h===5&&(f[1]|=(D&14)>>1,f[2]=(D&1)<<7,f[2]|=2<<2,f[3]=0),{config:f,samplerate:o[x],channelCount:v,codec:"mp4a.40."+h,manifestCodec:c}}function _(l,s){return l[s]===255&&(l[s+1]&246)===240}function I(l,s){return l[s+1]&1?7:9}function M(l,s){return(l[s+3]&3)<<11|l[s+4]<<3|(l[s+5]&224)>>>5}function b(l,s){return s+5<l.length}function E(l,s){return s+1<l.length&&_(l,s)}function R(l,s){return b(l,s)&&_(l,s)&&M(l,s)<=l.length-s}function w(l,s){if(E(l,s)){var p=I(l,s);if(s+p>=l.length)return!1;var d=M(l,s);if(d<=p)return!1;var h=s+d;return h===l.length||E(l,h)}return!1}function A(l,s,p,d,h){if(!l.samplerate){var D=U(s,p,d,h);if(!D)return;l.config=D.config,l.samplerate=D.samplerate,l.channelCount=D.channelCount,l.codec=D.codec,l.manifestCodec=D.manifestCodec,B.logger.log("parsed codec:"+l.codec+", rate:"+D.samplerate+", channels:"+D.channelCount)}}function g(l){return 1024*9e4/l}function u(l,s,p,d,h){var D=I(l,s),v=M(l,s);if(v-=D,v>0){var f=p+d*h;return{headerLength:D,frameLength:v,stamp:f}}}function a(l,s,p,d,h){var D=g(l.samplerate),v=u(s,p,d,h,D);if(v){var f=v.frameLength,m=v.headerLength,c=v.stamp,o=m+f,x=Math.max(0,p+o-s.length),y;x?(y=new Uint8Array(o-m),y.set(s.subarray(p+m,s.length),0)):y=s.subarray(p+m,p+o);var S={unit:y,pts:c};return x||l.samples.push(S),{sample:S,length:o,missing:x}}}},"./src/demux/base-audio-demuxer.ts":function($,K,O){"use strict";O.r(K),O.d(K,"initPTSFn",function(){return M});var B=O("./src/polyfills/number.ts"),C=O("./src/demux/id3.ts"),L=O("./src/demux/dummy-demuxed-track.ts"),U=O("./src/utils/mp4-tools.ts"),_=O("./src/utils/typed-array.ts"),I=function(){function b(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var E=b.prototype;return E.resetInitSegment=function(w,A,g){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},E.resetTimeStamp=function(){},E.resetContiguity=function(){},E.canParse=function(w,A){return!1},E.appendFrame=function(w,A,g){},E.demux=function(w,A){this.cachedData&&(w=Object(U.appendUint8Array)(this.cachedData,w),this.cachedData=null);var g=C.getID3Data(w,0),u=g?g.length:0,a,l,s=this._audioTrack,p=this._id3Track,d=g?C.getTimeStamp(g):void 0,h=w.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=M(d,A)),g&&g.length>0&&p.samples.push({pts:this.initPTS,dts:this.initPTS,data:g}),l=this.initPTS;u<h;){if(this.canParse(w,u)){var D=this.appendFrame(s,w,u);D?(this.frameIndex++,l=D.sample.pts,u+=D.length,a=u):u=h}else C.canParse(w,u)?(g=C.getID3Data(w,u),p.samples.push({pts:l,dts:l,data:g}),u+=g.length,a=u):u++;if(u===h&&a!==h){var v=Object(_.sliceUint8)(w,a);this.cachedData?this.cachedData=Object(U.appendUint8Array)(this.cachedData,v):this.cachedData=v}}return{audioTrack:s,avcTrack:Object(L.dummyTrack)(),id3Track:p,textTrack:Object(L.dummyTrack)()}},E.demuxSampleAes=function(w,A,g){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},E.flush=function(w){var A=this.cachedData;return A&&(this.cachedData=null,this.demux(A,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(L.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(L.dummyTrack)()}},E.destroy=function(){},b}(),M=function(E,R){return Object(B.isFiniteNumber)(E)?E*90:R*9e4};K.default=I},"./src/demux/chunk-cache.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return B});var B=function(){function L(){this.chunks=[],this.dataLength=0}var U=L.prototype;return U.push=function(I){this.chunks.push(I),this.dataLength+=I.length},U.flush=function(){var I=this.chunks,M=this.dataLength,b;if(I.length)I.length===1?b=I[0]:b=C(I,M);else return new Uint8Array(0);return this.reset(),b},U.reset=function(){this.chunks.length=0,this.dataLength=0},L}();function C(L,U){for(var _=new Uint8Array(U),I=0,M=0;M<L.length;M++){var b=L[M];_.set(b,I),I+=b.length}return _}},"./src/demux/dummy-demuxed-track.ts":function($,K,O){"use strict";O.r(K),O.d(K,"dummyTrack",function(){return B});function B(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/utils/logger.ts"),C=function(){function L(_){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=L.prototype;return U.loadWord=function(){var I=this.data,M=this.bytesAvailable,b=I.byteLength-M,E=new Uint8Array(4),R=Math.min(4,M);if(R===0)throw new Error("no bytes available");E.set(I.subarray(b,b+R)),this.word=new DataView(E.buffer).getUint32(0),this.bitsAvailable=R*8,this.bytesAvailable-=R},U.skipBits=function(I){var M;this.bitsAvailable>I?(this.word<<=I,this.bitsAvailable-=I):(I-=this.bitsAvailable,M=I>>3,I-=M>>3,this.bytesAvailable-=M,this.loadWord(),this.word<<=I,this.bitsAvailable-=I)},U.readBits=function(I){var M=Math.min(this.bitsAvailable,I),b=this.word>>>32-M;return I>32&&B.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=M,this.bitsAvailable>0?this.word<<=M:this.bytesAvailable>0&&this.loadWord(),M=I-M,M>0&&this.bitsAvailable?b<<M|this.readBits(M):b},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 M=8,b=8,E,R=0;R<I;R++)b!==0&&(E=this.readEG(),b=(M+E+256)%256),M=b===0?M:b},U.readSPS=function(){var I=0,M=0,b=0,E=0,R,w,A,g=this.readUByte.bind(this),u=this.readBits.bind(this),a=this.readUEG.bind(this),l=this.readBoolean.bind(this),s=this.skipBits.bind(this),p=this.skipEG.bind(this),d=this.skipUEG.bind(this),h=this.skipScalingList.bind(this);g();var D=g();if(u(5),s(3),g(),d(),D===100||D===110||D===122||D===244||D===44||D===83||D===86||D===118||D===128){var v=a();if(v===3&&s(1),d(),d(),s(1),l())for(w=v!==3?8:12,A=0;A<w;A++)l()&&(A<6?h(16):h(64))}d();var f=a();if(f===0)a();else if(f===1)for(s(1),p(),p(),R=a(),A=0;A<R;A++)p();d(),s(1);var m=a(),c=a(),o=u(1);o===0&&s(1),s(1),l()&&(I=a(),M=a(),b=a(),E=a());var x=[1,1];if(l()&&l()){var y=g();switch(y){case 1:x=[1,1];break;case 2:x=[12,11];break;case 3:x=[10,11];break;case 4:x=[16,11];break;case 5:x=[40,33];break;case 6:x=[24,11];break;case 7:x=[20,11];break;case 8:x=[32,11];break;case 9:x=[80,33];break;case 10:x=[18,11];break;case 11:x=[15,11];break;case 12:x=[64,33];break;case 13:x=[160,99];break;case 14:x=[4,3];break;case 15:x=[3,2];break;case 16:x=[2,1];break;case 255:{x=[g()<<8|g(),g()<<8|g()];break}}}return{width:Math.ceil((m+1)*16-I*2-M*2),height:(2-o)*(c+1)*16-(o?2:4)*(b+E),pixelRatio:x}},U.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},L}();K.default=C},"./src/demux/id3.ts":function($,K,O){"use strict";O.r(K),O.d(K,"isHeader",function(){return B}),O.d(K,"isFooter",function(){return C}),O.d(K,"getID3Data",function(){return L}),O.d(K,"canParse",function(){return _}),O.d(K,"getTimeStamp",function(){return I}),O.d(K,"isTimeStampFrame",function(){return M}),O.d(K,"getID3Frames",function(){return E}),O.d(K,"decodeFrame",function(){return R}),O.d(K,"utf8ArrayToStr",function(){return a}),O.d(K,"testables",function(){return l});var B=function(h,D){return D+10<=h.length&&(h[D]===73&&h[D+1]===68&&h[D+2]===51&&(h[D+3]<255&&h[D+4]<255&&(h[D+6]<128&&h[D+7]<128&&h[D+8]<128&&h[D+9]<128)))},C=function(h,D){return D+10<=h.length&&(h[D]===51&&h[D+1]===68&&h[D+2]===73&&(h[D+3]<255&&h[D+4]<255&&(h[D+6]<128&&h[D+7]<128&&h[D+8]<128&&h[D+9]<128)))},L=function(h,D){for(var v=D,f=0;B(h,D);){f+=10;var m=U(h,D+6);f+=m,C(h,D+10)&&(f+=10),D+=f}return f>0?h.subarray(v,v+f):void 0},U=function(h,D){var v=0;return v=(h[D]&127)<<21,v|=(h[D+1]&127)<<14,v|=(h[D+2]&127)<<7,v|=h[D+3]&127,v},_=function(h,D){return B(h,D)&&U(h,D+6)+10<=h.length-D},I=function(h){for(var D=E(h),v=0;v<D.length;v++){var f=D[v];if(M(f))return u(f)}return},M=function(h){return h&&h.key==="PRIV"&&h.info==="com.apple.streaming.transportStreamTimestamp"},b=function(h){var D=String.fromCharCode(h[0],h[1],h[2],h[3]),v=U(h,4),f=10;return{type:D,size:v,data:h.subarray(f,f+v)}},E=function(h){for(var D=0,v=[];B(h,D);){var f=U(h,D+6);D+=10;for(var m=D+f;D+8<m;){var c=b(h.subarray(D)),o=R(c);o&&v.push(o),D+=c.size+10}C(h,D)&&(D+=10)}return v},R=function(h){return h.type==="PRIV"?w(h):h.type[0]==="W"?g(h):A(h)},w=function(h){if(h.size<2)return;var D=a(h.data,!0),v=new Uint8Array(h.data.subarray(D.length+1));return{key:h.type,info:D,data:v.buffer}},A=function(h){if(h.size<2)return;if(h.type==="TXXX"){var D=1,v=a(h.data.subarray(D),!0);D+=v.length+1;var f=a(h.data.subarray(D));return{key:h.type,info:v,data:f}}var m=a(h.data.subarray(1));return{key:h.type,data:m}},g=function(h){if(h.type==="WXXX"){if(h.size<2)return;var D=1,v=a(h.data.subarray(D),!0);D+=v.length+1;var f=a(h.data.subarray(D));return{key:h.type,info:v,data:f}}var m=a(h.data);return{key:h.type,data:m}},u=function(h){if(h.data.byteLength===8){var D=new Uint8Array(h.data),v=D[3]&1,f=(D[4]<<23)+(D[5]<<15)+(D[6]<<7)+D[7];return f/=45,v&&(f+=4772185884e-2),Math.round(f)}return},a=function(h,D){D===void 0&&(D=!1);var v=p();if(v){var f=v.decode(h);if(D){var m=f.indexOf("\0");return m!==-1?f.substring(0,m):f}return f.replace(/\0/g,"")}for(var c=h.length,o,x,y,S="",P=0;P<c;){if(o=h[P++],o===0&&D)return S;if(o===0||o===3)continue;switch(o>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:S+=String.fromCharCode(o);break;case 12:case 13:x=h[P++],S+=String.fromCharCode((o&31)<<6|x&63);break;case 14:x=h[P++],y=h[P++],S+=String.fromCharCode((o&15)<<12|(x&63)<<6|(y&63)<<0);break;default:}}return S},l={decodeTextFrame:A},s;function p(){return!s&&typeof self.TextDecoder!="undefined"&&(s=new self.TextDecoder("utf-8")),s}},"./src/demux/mp3demuxer.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/demux/base-audio-demuxer.ts"),C=O("./src/demux/id3.ts"),L=O("./src/utils/logger.ts"),U=O("./src/demux/mpegaudio.ts");function _(b,E){b.prototype=Object.create(E.prototype),b.prototype.constructor=b,I(b,E)}function I(b,E){return I=Object.setPrototypeOf||function(w,A){return w.__proto__=A,w},I(b,E)}var M=function(b){_(E,b);function E(){return b.apply(this,arguments)||this}var R=E.prototype;return R.resetInitSegment=function(A,g,u){b.prototype.resetInitSegment.call(this,A,g,u),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:A,duration:u,inputTimeScale:9e4,dropped:0}},E.probe=function(A){if(!A)return!1;for(var g=C.getID3Data(A,0)||[],u=g.length,a=A.length;u<a;u++)if(U.probe(A,u))return L.logger.log("MPEG Audio sync word found !"),!0;return!1},R.canParse=function(A,g){return U.canParse(A,g)},R.appendFrame=function(A,g,u){return this.initPTS===null?void 0:U.appendFrame(A,g,u,this.initPTS,this.frameIndex)},E}(B.default);M.minProbeByteLength=4,K.default=M},"./src/demux/mp4demuxer.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/utils/mp4-tools.ts"),C=O("./src/demux/dummy-demuxed-track.ts"),L=function(){function U(I,M){this.remainderData=null,this.config=void 0,this.config=M}var _=U.prototype;return _.resetTimeStamp=function(){},_.resetInitSegment=function(){},_.resetContiguity=function(){},U.probe=function(M){return Object(B.findBox)({data:M,start:0,end:Math.min(M.length,16384)},["moof"]).length>0},_.demux=function(M){var b=M,E=Object(C.dummyTrack)();if(this.config.progressive){this.remainderData&&(b=Object(B.appendUint8Array)(this.remainderData,M));var R=Object(B.segmentValidRange)(b);this.remainderData=R.remainder,E.samples=R.valid||new Uint8Array}else E.samples=b;return{audioTrack:Object(C.dummyTrack)(),avcTrack:E,id3Track:Object(C.dummyTrack)(),textTrack:Object(C.dummyTrack)()}},_.flush=function(){var M=Object(C.dummyTrack)();return M.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(C.dummyTrack)(),avcTrack:M,id3Track:Object(C.dummyTrack)(),textTrack:Object(C.dummyTrack)()}},_.demuxSampleAes=function(M,b,E){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},_.destroy=function(){},U}();L.minProbeByteLength=1024,K.default=L},"./src/demux/mpegaudio.ts":function($,K,O){"use strict";O.r(K),O.d(K,"appendFrame",function(){return I}),O.d(K,"parseHeader",function(){return M}),O.d(K,"isHeaderPattern",function(){return b}),O.d(K,"isHeader",function(){return E}),O.d(K,"canParse",function(){return R}),O.d(K,"probe",function(){return w});var B=null,C=[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],L=[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,g,u,a,l){if(u+24>g.length)return;var s=M(g,u);if(s&&u+s.frameLength<=g.length){var p=s.samplesPerFrame*9e4/s.sampleRate,d=a+l*p,h={unit:g.subarray(u,u+s.frameLength),pts:d,dts:d};return A.config=[],A.channelCount=s.channelCount,A.samplerate=s.sampleRate,A.samples.push(h),{sample:h,length:s.frameLength,missing:0}}}function M(A,g){var u=A[g+1]>>3&3,a=A[g+1]>>1&3,l=A[g+2]>>4&15,s=A[g+2]>>2&3;if(u!==1&&l!==0&&l!==15&&s!==3){var p=A[g+2]>>1&1,d=A[g+3]>>6,h=u===3?3-a:a===3?3:4,D=C[h*14+l-1]*1e3,v=u===3?0:u===2?1:2,f=L[v*3+s],m=d===3?1:2,c=U[u][a],o=_[a],x=c*8*o,y=Math.floor(c*D/f+p)*o;if(B===null){var S=navigator.userAgent||"",P=S.match(/Chrome\/(\d+)/i);B=P?parseInt(P[1]):0}var F=!!B&&B<=87;return F&&a===2&&D>=224e3&&d===0&&(A[g+3]=A[g+3]|128),{sampleRate:f,channelCount:m,frameLength:y,samplesPerFrame:x}}}function b(A,g){return A[g]===255&&(A[g+1]&224)===224&&(A[g+1]&6)!==0}function E(A,g){return g+1<A.length&&b(A,g)}function R(A,g){var u=4;return b(A,g)&&u<=A.length-g}function w(A,g){if(g+1<A.length&&b(A,g)){var u=4,a=M(A,g),l=u;a!=null&&a.frameLength&&(l=a.frameLength);var s=g+l;return s===A.length||E(A,s)}return!1}},"./src/demux/sample-aes.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/crypt/decrypter.ts"),C=O("./src/demux/tsdemuxer.ts"),L=function(){function U(I,M,b){this.keyData=void 0,this.decrypter=void 0,this.keyData=b,this.decrypter=new B.default(I,M,{removePKCS7Padding:!1})}var _=U.prototype;return _.decryptBuffer=function(M,b){this.decrypter.decrypt(M,this.keyData.key.buffer,this.keyData.iv.buffer,b)},_.decryptAacSample=function(M,b,E,R){var w=M[b].unit,A=w.subarray(16,w.length-w.length%16),g=A.buffer.slice(A.byteOffset,A.byteOffset+A.length),u=this;this.decryptBuffer(g,function(a){var l=new Uint8Array(a);w.set(l,16),R||u.decryptAacSamples(M,b+1,E)})},_.decryptAacSamples=function(M,b,E){for(;;b++){if(b>=M.length){E();return}if(M[b].unit.length<32)continue;var R=this.decrypter.isSync();if(this.decryptAacSample(M,b,E,R),!R)return}},_.getAvcEncryptedData=function(M){for(var b=Math.floor((M.length-48)/160)*16+16,E=new Int8Array(b),R=0,w=32;w<=M.length-16;w+=160,R+=16)E.set(M.subarray(w,w+16),R);return E},_.getAvcDecryptedUnit=function(M,b){for(var E=new Uint8Array(b),R=0,w=32;w<=M.length-16;w+=160,R+=16)M.set(E.subarray(R,R+16),w);return M},_.decryptAvcSample=function(M,b,E,R,w,A){var g=Object(C.discardEPB)(w.data),u=this.getAvcEncryptedData(g),a=this;this.decryptBuffer(u.buffer,function(l){w.data=a.getAvcDecryptedUnit(g,l),A||a.decryptAvcSamples(M,b,E+1,R)})},_.decryptAvcSamples=function(M,b,E,R){if(M instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;b++,E=0){if(b>=M.length){R();return}for(var w=M[b].units;!(E>=w.length);E++){var A=w[E];if(A.data.length<=48||A.type!==1&&A.type!==5)continue;var g=this.decrypter.isSync();if(this.decryptAvcSample(M,b,E,R,A,g),!g)return}}},U}();K.default=L},"./src/demux/transmuxer-interface.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return w});var B=O("./node_modules/webworkify-webpack/index.js"),C=O.n(B),L=O("./src/events.ts"),U=O("./src/demux/transmuxer.ts"),_=O("./src/utils/logger.ts"),I=O("./src/errors.ts"),M=O("./src/utils/mediasource-helper.ts"),b=O("./node_modules/eventemitter3/index.js"),E=O.n(b),R=Object(M.getMediaSource)()||{isTypeSupported:function(){return!1}},w=function(){function A(u,a,l,s){var p=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=u,this.id=a,this.onTransmuxComplete=l,this.onFlush=s;var d=u.config,h=function(c,o){o=o||{},o.frag=p.frag,o.id=p.id,u.trigger(c,o)};this.observer=new b.EventEmitter,this.observer.on(L.Events.FRAG_DECRYPTED,h),this.observer.on(L.Events.ERROR,h);var D={mp4:R.isTypeSupported("video/mp4"),mpeg:R.isTypeSupported("audio/mpeg"),mp3:R.isTypeSupported('audio/mp4; codecs="mp3"')},v=navigator.vendor;if(d.enableWorker&&typeof Worker!="undefined"){_.logger.log("demuxing in webworker");var f;try{f=this.worker=B("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),f.addEventListener("message",this.onwmsg),f.onerror=function(m){u.trigger(L.Events.ERROR,{type:I.ErrorTypes.OTHER_ERROR,details:I.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(m.message+" ("+m.filename+":"+m.lineno+")")})},f.postMessage({cmd:"init",typeSupported:D,vendor:v,id:a,config:JSON.stringify(d)})}catch(m){_.logger.warn("Error in worker:",m),_.logger.error("Error while initializing DemuxerWorker, fallback to inline"),f&&self.URL.revokeObjectURL(f.objectURL),this.transmuxer=new U.default(this.observer,D,d,v,a),this.worker=null}}else this.transmuxer=new U.default(this.observer,D,d,v,a)}var g=A.prototype;return g.destroy=function(){var a=this.worker;if(a)a.removeEventListener("message",this.onwmsg),a.terminate(),this.worker=null;else{var l=this.transmuxer;l&&(l.destroy(),this.transmuxer=null)}var s=this.observer;s&&s.removeAllListeners(),this.observer=null},g.push=function(a,l,s,p,d,h,D,v,f,m){var c=this;f.transmuxing.start=self.performance.now();var o=this.transmuxer,x=this.worker,y=h?h.start:d.start,S=d.decryptdata,P=this.frag,F=!(P&&d.cc===P.cc),H=!(P&&f.level===P.level),Y=P?f.sn-P.sn:-1,j=this.part?f.part-this.part.index:1,N=!H&&(Y===1||Y===0&&j===1),Z=self.performance.now();(H||Y||d.stats.parsing.start===0)&&(d.stats.parsing.start=Z),h&&(j||!N)&&(h.stats.parsing.start=Z);var ne=new U.TransmuxState(F,N,v,H,y);if(!N||F){_.logger.log("[transmuxer-interface, "+d.type+"]: Starting new transmux session for sn: "+f.sn+" p: "+f.part+" level: "+f.level+" id: "+f.id+`
|
|
discontinuity: `+F+`
|
|
trackSwitch: `+H+`
|
|
contiguous: `+N+`
|
|
accurateTimeOffset: `+v+`
|
|
timeOffset: `+y);var pe=new U.TransmuxConfig(s,p,l,D,m);this.configureTransmuxer(pe)}if(this.frag=d,this.part=h,x)x.postMessage({cmd:"demux",data:a,decryptdata:S,chunkMeta:f,state:ne},a instanceof ArrayBuffer?[a]:[]);else if(o){var xe=o.push(a,S,f,ne);Object(U.isPromise)(xe)?xe.then(function(je){c.handleTransmuxComplete(je)}):this.handleTransmuxComplete(xe)}},g.flush=function(a){var l=this;a.transmuxing.start=self.performance.now();var s=this.transmuxer,p=this.worker;if(p)p.postMessage({cmd:"flush",chunkMeta:a});else if(s){var d=s.flush(a);Object(U.isPromise)(d)?d.then(function(h){l.handleFlushResult(h,a)}):this.handleFlushResult(d,a)}},g.handleFlushResult=function(a,l){var s=this;a.forEach(function(p){s.handleTransmuxComplete(p)}),this.onFlush(l)},g.onWorkerMessage=function(a){var l=a.data,s=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,s.trigger(l.event,l.data);break}}},g.configureTransmuxer=function(a){var l=this.worker,s=this.transmuxer;l?l.postMessage({cmd:"configure",config:a}):s&&s.configure(a)},g.handleTransmuxComplete=function(a){a.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(a)},A}()},"./src/demux/transmuxer-worker.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return I});var B=O("./src/demux/transmuxer.ts"),C=O("./src/events.ts"),L=O("./src/utils/logger.ts"),U=O("./node_modules/eventemitter3/index.js"),_=O.n(U);function I(w){var A=new U.EventEmitter,g=function(a,l){w.postMessage({event:a,data:l})};A.on(C.Events.FRAG_DECRYPTED,g),A.on(C.Events.ERROR,g),w.addEventListener("message",function(u){var a=u.data;switch(a.cmd){case"init":{var l=JSON.parse(a.config);w.transmuxer=new B.default(A,a.typeSupported,l,a.vendor,a.id),Object(L.enableLogs)(l.debug),g("init",null);break}case"configure":{w.transmuxer.configure(a.config);break}case"demux":{var s=w.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(B.isPromise)(s)?s.then(function(h){M(w,h)}):M(w,s);break}case"flush":{var p=a.chunkMeta,d=w.transmuxer.flush(p);Object(B.isPromise)(d)?d.then(function(h){E(w,h,p)}):E(w,d,p);break}default:break}})}function M(w,A){if(R(A.remuxResult))return;var g=[],u=A.remuxResult,a=u.audio,l=u.video;a&&b(g,a),l&&b(g,l),w.postMessage({event:"transmuxComplete",data:A},g)}function b(w,A){A.data1&&w.push(A.data1.buffer),A.data2&&w.push(A.data2.buffer)}function E(w,A,g){A.forEach(function(u){M(w,u)}),w.postMessage({event:"flush",data:g})}function R(w){return!w.audio&&!w.video&&!w.text&&!w.id3&&!w.initSegment}},"./src/demux/transmuxer.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return l}),O.d(K,"isPromise",function(){return d}),O.d(K,"TransmuxConfig",function(){return h}),O.d(K,"TransmuxState",function(){return D});var B=O("./src/events.ts"),C=O("./src/errors.ts"),L=O("./src/crypt/decrypter.ts"),U=O("./src/demux/aacdemuxer.ts"),_=O("./src/demux/mp4demuxer.ts"),I=O("./src/demux/tsdemuxer.ts"),M=O("./src/demux/mp3demuxer.ts"),b=O("./src/remux/mp4-remuxer.ts"),E=O("./src/remux/passthrough-remuxer.ts"),R=O("./src/demux/chunk-cache.ts"),w=O("./src/utils/mp4-tools.ts"),A=O("./src/utils/logger.ts"),g;try{g=self.performance.now.bind(self.performance)}catch(v){A.logger.debug("Unable to use Performance API on this environment"),g=self.Date.now}var u=[{demux:I.default,remux:b.default},{demux:_.default,remux:E.default},{demux:U.default,remux:b.default},{demux:M.default,remux:b.default}],a=1024;u.forEach(function(v){var f=v.demux;a=Math.max(a,f.minProbeByteLength)});var l=function(){function v(m,c,o,x,y){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 R.default,this.observer=m,this.typeSupported=c,this.config=o,this.vendor=x,this.id=y}var f=v.prototype;return f.configure=function(c){this.transmuxConfig=c,this.decrypter&&this.decrypter.reset()},f.push=function(c,o,x,y){var S=this,P=x.transmuxing;P.executeStart=g();var F=new Uint8Array(c),H=this.cache,Y=this.config,j=this.currentTransmuxState,N=this.transmuxConfig;y&&(this.currentTransmuxState=y);var Z=s(F,o);if(Z&&Z.method==="AES-128"){var ne=this.getDecrypter();if(Y.enableSoftwareAES){var pe=ne.softwareDecrypt(F,Z.key.buffer,Z.iv.buffer);if(!pe)return P.executeEnd=g(),p(x);F=new Uint8Array(pe)}else return this.decryptionPromise=ne.webCryptoDecrypt(F,Z.key.buffer,Z.iv.buffer).then(function(Ne){var Ze=S.push(Ne,null,x);return S.decryptionPromise=null,Ze}),this.decryptionPromise}var xe=y||j,je=xe.contiguous,Le=xe.discontinuity,De=xe.trackSwitch,Ce=xe.accurateTimeOffset,we=xe.timeOffset,fe=N.audioCodec,he=N.videoCodec,_e=N.defaultInitPts,at=N.duration,et=N.initSegmentData;if((Le||De)&&this.resetInitSegment(et,fe,he,at),Le&&this.resetInitialTimestamp(_e),je||this.resetContiguity(),this.needsProbing(F,Le,De)){if(H.dataLength){var it=H.flush();F=Object(w.appendUint8Array)(it,F)}this.configureTransmuxer(F,N)}var gt=this.transmux(F,Z,we,Ce,x),He=this.currentTransmuxState;return He.contiguous=!0,He.discontinuity=!1,He.trackSwitch=!1,P.executeEnd=g(),gt},f.flush=function(c){var o=this,x=c.transmuxing;x.executeStart=g();var y=this.decrypter,S=this.cache,P=this.currentTransmuxState,F=this.decryptionPromise;if(F)return F.then(function(){return o.flush(c)});var H=[],Y=P.timeOffset;if(y){var j=y.flush();j&&H.push(this.push(j,null,c))}var N=S.dataLength;S.reset();var Z=this.demuxer,ne=this.remuxer;if(!Z||!ne)return N>=a&&this.observer.emit(B.Events.ERROR,B.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),x.executeEnd=g(),[p(c)];var pe=Z.flush(Y);return d(pe)?pe.then(function(xe){return o.flushRemux(H,xe,c),H}):(this.flushRemux(H,pe,c),H)},f.flushRemux=function(c,o,x){var y=o.audioTrack,S=o.avcTrack,P=o.id3Track,F=o.textTrack,H=this.currentTransmuxState,Y=H.accurateTimeOffset,j=H.timeOffset;A.logger.log("[transmuxer.ts]: Flushed fragment "+x.sn+(x.part>-1?" p: "+x.part:"")+" of level "+x.level);var N=this.remuxer.remux(y,S,P,F,j,Y,!0,this.id);c.push({remuxResult:N,chunkMeta:x}),x.transmuxing.executeEnd=g()},f.resetInitialTimestamp=function(c){var o=this.demuxer,x=this.remuxer;if(!o||!x)return;o.resetTimeStamp(c),x.resetTimeStamp(c)},f.resetContiguity=function(){var c=this.demuxer,o=this.remuxer;if(!c||!o)return;c.resetContiguity(),o.resetNextTimestamp()},f.resetInitSegment=function(c,o,x,y){var S=this.demuxer,P=this.remuxer;if(!S||!P)return;S.resetInitSegment(o,x,y),P.resetInitSegment(c,o,x)},f.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},f.transmux=function(c,o,x,y,S){var P;return o&&o.method==="SAMPLE-AES"?P=this.transmuxSampleAes(c,o,x,y,S):P=this.transmuxUnencrypted(c,x,y,S),P},f.transmuxUnencrypted=function(c,o,x,y){var S=this.demuxer.demux(c,o,!1,!this.config.progressive),P=S.audioTrack,F=S.avcTrack,H=S.id3Track,Y=S.textTrack,j=this.remuxer.remux(P,F,H,Y,o,x,!1,this.id);return{remuxResult:j,chunkMeta:y}},f.transmuxSampleAes=function(c,o,x,y,S){var P=this;return this.demuxer.demuxSampleAes(c,o,x).then(function(F){var H=P.remuxer.remux(F.audioTrack,F.avcTrack,F.id3Track,F.textTrack,x,y,!1,P.id);return{remuxResult:H,chunkMeta:S}})},f.configureTransmuxer=function(c,o){for(var x=this.config,y=this.observer,S=this.typeSupported,P=this.vendor,F=o.audioCodec,H=o.defaultInitPts,Y=o.duration,j=o.initSegmentData,N=o.videoCodec,Z,ne=0,pe=u.length;ne<pe;ne++)if(u[ne].demux.probe(c)){Z=u[ne];break}Z||(A.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),Z={demux:_.default,remux:E.default});var xe=this.demuxer,je=this.remuxer,Le=Z.remux,De=Z.demux;(!je||!(je instanceof Le))&&(this.remuxer=new Le(y,x,S,P)),(!xe||!(xe instanceof De))&&(this.demuxer=new De(y,x,S),this.probe=De.probe),this.resetInitSegment(j,F,N,Y),this.resetInitialTimestamp(H)},f.needsProbing=function(c,o,x){return!this.demuxer||!this.remuxer||o||x},f.getDecrypter=function(){var c=this.decrypter;return c||(c=this.decrypter=new L.default(this.observer,this.config)),c},v}();function s(v,f){var m=null;return v.byteLength>0&&f!=null&&f.key!=null&&f.iv!==null&&f.method!=null&&(m=f),m}var p=function(f){return{remuxResult:{},chunkMeta:f}};function d(v){return"then"in v&&v.then instanceof Function}var h=function(f,m,c,o,x){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=m,this.initSegmentData=c,this.duration=o,this.defaultInitPts=x},D=function(f,m,c,o,x){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=m,this.accurateTimeOffset=c,this.trackSwitch=o,this.timeOffset=x}},"./src/demux/tsdemuxer.ts":function($,K,O){"use strict";O.r(K),O.d(K,"discardEPB",function(){return p});var B=O("./src/demux/adts.ts"),C=O("./src/demux/mpegaudio.ts"),L=O("./src/demux/exp-golomb.ts"),U=O("./src/demux/id3.ts"),_=O("./src/demux/sample-aes.ts"),I=O("./src/events.ts"),M=O("./src/utils/mp4-tools.ts"),b=O("./src/utils/logger.ts"),E=O("./src/errors.ts"),R={video:1,audio:2,id3:3,text:4},w=function(){function d(D,v,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=D,this.config=v,this.typeSupported=f}d.probe=function(v){var f=d.syncOffset(v);return f<0?!1:(f&&b.logger.warn("MPEG2-TS detected but first sync word found @ offset "+f+", junk ahead ?"),!0)},d.syncOffset=function(v){for(var f=Math.min(1e3,v.length-3*188),m=0;m<f;){if(v[m]===71&&v[m+188]===71&&v[m+2*188]===71)return m;m++}return-1},d.createTrack=function(v,f){return{container:v==="video"||v==="audio"?"video/mp2t":void 0,type:v,id:R[v],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:v==="audio"?f:void 0}};var h=d.prototype;return h.resetInitSegment=function(v,f,m){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=d.createTrack("video",m),this._audioTrack=d.createTrack("audio",m),this._id3Track=d.createTrack("id3",m),this._txtTrack=d.createTrack("text",m),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=v,this.videoCodec=f,this._duration=m},h.resetTimeStamp=function(){},h.resetContiguity=function(){var v=this._audioTrack,f=this._avcTrack,m=this._id3Track;v&&(v.pesData=null),f&&(f.pesData=null),m&&(m.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},h.demux=function(v,f,m,c){m===void 0&&(m=!1),c===void 0&&(c=!1),m||(this.sampleAes=null);var o,x=this._avcTrack,y=this._audioTrack,S=this._id3Track,P=x.pid,F=x.pesData,H=y.pid,Y=S.pid,j=y.pesData,N=S.pesData,Z=!1,ne=this.pmtParsed,pe=this._pmtId,xe=v.length;if(this.remainderData&&(v=Object(M.appendUint8Array)(this.remainderData,v),xe=v.length,this.remainderData=null),xe<188&&!c)return this.remainderData=v,{audioTrack:y,avcTrack:x,id3Track:S,textTrack:this._txtTrack};var je=Math.max(0,d.syncOffset(v));xe-=(xe+je)%188,xe<v.byteLength&&!c&&(this.remainderData=new Uint8Array(v.buffer,xe,v.buffer.byteLength-xe));for(var Le=je;Le<xe;Le+=188)if(v[Le]===71){var De=!!(v[Le+1]&64),Ce=((v[Le+1]&31)<<8)+v[Le+2],we=(v[Le+3]&48)>>4,fe=void 0;if(we>1){if(fe=Le+5+v[Le+4],fe===Le+188)continue}else fe=Le+4;switch(Ce){case P:De&&(F&&(o=a(F))&&this.parseAVCPES(o,!1),F={data:[],size:0}),F&&(F.data.push(v.subarray(fe,Le+188)),F.size+=Le+188-fe);break;case H:De&&(j&&(o=a(j))&&(y.isAAC?this.parseAACPES(o):this.parseMPEGPES(o)),j={data:[],size:0}),j&&(j.data.push(v.subarray(fe,Le+188)),j.size+=Le+188-fe);break;case Y:De&&(N&&(o=a(N))&&this.parseID3PES(o),N={data:[],size:0}),N&&(N.data.push(v.subarray(fe,Le+188)),N.size+=Le+188-fe);break;case 0:De&&(fe+=v[fe]+1),pe=this._pmtId=g(v,fe);break;case pe:{De&&(fe+=v[fe]+1);var he=u(v,fe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,m);P=he.avc,P>0&&(x.pid=P),H=he.audio,H>0&&(y.pid=H,y.isAAC=he.isAAC),Y=he.id3,Y>0&&(S.pid=Y),Z&&!ne&&(b.logger.log("reparse from beginning"),Z=!1,Le=je-188),ne=this.pmtParsed=!0;break}case 17:case 8191:break;default:Z=!0;break}}else this.observer.emit(I.Events.ERROR,I.Events.ERROR,{type:E.ErrorTypes.MEDIA_ERROR,details:E.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});x.pesData=F,y.pesData=j,S.pesData=N;var _e={audioTrack:y,avcTrack:x,id3Track:S,textTrack:this._txtTrack};return c&&this.extractRemainingSamples(_e),_e},h.flush=function(){var v=this.remainderData;this.remainderData=null;var f;return v?f=this.demux(v,-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(v){var f=v.audioTrack,m=v.avcTrack,c=v.id3Track,o=m.pesData,x=f.pesData,y=c.pesData,S;o&&(S=a(o))?(this.parseAVCPES(S,!0),m.pesData=null):m.pesData=o,x&&(S=a(x))?(f.isAAC?this.parseAACPES(S):this.parseMPEGPES(S),f.pesData=null):(x!=null&&x.size&&b.logger.log("last AAC PES packet truncated,might overlap between fragments"),f.pesData=x),y&&(S=a(y))?(this.parseID3PES(S),c.pesData=null):c.pesData=y},h.demuxSampleAes=function(v,f,m){var c=this.demux(v,m,!0,!this.config.progressive),o=this.sampleAes=new _.default(this.observer,this.config,f);return this.decrypt(c,o)},h.decrypt=function(v,f){return new Promise(function(m){var c=v.audioTrack,o=v.avcTrack;c.samples&&c.isAAC?f.decryptAacSamples(c.samples,0,function(){o.samples?f.decryptAvcSamples(o.samples,0,0,function(){m(v)}):m(v)}):o.samples&&f.decryptAvcSamples(o.samples,0,0,function(){m(v)})})},h.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},h.parseAVCPES=function(v,f){var m=this,c=this._avcTrack,o=this.parseAVCNALu(v.data),x=!1,y=this.avcSample,S,P=!1;v.data=null,y&&o.length&&!c.audFound&&(l(y,c),y=this.avcSample=A(!1,v.pts,v.dts,"")),o.forEach(function(F){switch(F.type){case 1:{S=!0,y||(y=m.avcSample=A(!0,v.pts,v.dts,"")),x&&(y.debug+="NDR "),y.frame=!0;var H=F.data;if(P&&H.length>4){var Y=new L.default(H).readSliceType();(Y===2||Y===4||Y===7||Y===9)&&(y.key=!0)}break}case 5:S=!0,y||(y=m.avcSample=A(!0,v.pts,v.dts,"")),x&&(y.debug+="IDR "),y.key=!0,y.frame=!0;break;case 6:{S=!0,x&&y&&(y.debug+="SEI ");var j=new L.default(p(F.data));j.readUByte();for(var N=0,Z=0,ne=!1,pe=0;!ne&&j.bytesAvailable>1;){N=0;do pe=j.readUByte(),N+=pe;while(pe===255);Z=0;do pe=j.readUByte(),Z+=pe;while(pe===255);if(N===4&&j.bytesAvailable!==0){ne=!0;var xe=j.readUByte();if(xe===181){var je=j.readUShort();if(je===49){var Le=j.readUInt();if(Le===1195456820){var De=j.readUByte();if(De===3){for(var Ce=j.readUByte(),we=j.readUByte(),fe=31&Ce,he=[Ce,we],_e=0;_e<fe;_e++)he.push(j.readUByte()),he.push(j.readUByte()),he.push(j.readUByte());s(m._txtTrack.samples,{type:3,pts:v.pts,bytes:he})}}}}}else if(N===5&&j.bytesAvailable!==0){if(ne=!0,Z>16){for(var at=[],et=0;et<16;et++)at.push(j.readUByte().toString(16)),(et===3||et===5||et===7||et===9)&&at.push("-");for(var it=Z-16,gt=new Uint8Array(it),He=0;He<it;He++)gt[He]=j.readUByte();s(m._txtTrack.samples,{pts:v.pts,payloadType:N,uuid:at.join(""),userData:Object(U.utf8ArrayToStr)(gt),userDataBytes:gt})}}else if(Z<j.bytesAvailable)for(var Ne=0;Ne<Z;Ne++)j.readUByte()}break}case 7:if(S=!0,P=!0,x&&y&&(y.debug+="SPS "),!c.sps){var Ze=new L.default(F.data),ut=Ze.readSPS();c.width=ut.width,c.height=ut.height,c.pixelRatio=ut.pixelRatio,c.sps=[F.data],c.duration=m._duration;for(var dt=F.data.subarray(1,4),ze="avc1.",Ge=0;Ge<3;Ge++){var yt=dt[Ge].toString(16);yt.length<2&&(yt="0"+yt),ze+=yt}c.codec=ze}break;case 8:S=!0,x&&y&&(y.debug+="PPS "),c.pps||(c.pps=[F.data]);break;case 9:S=!1,c.audFound=!0,y&&l(y,c),y=m.avcSample=A(!1,v.pts,v.dts,x?"AUD ":"");break;case 12:S=!1;break;default:S=!1,y&&(y.debug+="unknown NAL "+F.type+" ");break}if(y&&S){var vt=y.units;vt.push(F)}}),f&&y&&(l(y,c),this.avcSample=null)},h.getLastNalUnit=function(){var v,f=this.avcSample,m;if(!f||f.units.length===0){var c=this._avcTrack.samples;f=c[c.length-1]}if((v=f)!==null&&v!==void 0&&v.units){var o=f.units;m=o[o.length-1]}return m},h.parseAVCNALu=function(v){var f=v.byteLength,m=this._avcTrack,c=m.naluState||0,o=c,x=[],y=0,S,P,F,H=-1,Y=0;for(c===-1&&(H=0,Y=v[0]&31,c=0,y=1);y<f;){if(S=v[y++],!c){c=S?0:1;continue}if(c===1){c=S?0:2;continue}if(!S)c=3;else if(S===1){if(H>=0){var j={data:v.subarray(H,y-c-1),type:Y};x.push(j)}else{var N=this.getLastNalUnit();if(N&&(o&&y<=4-o&&(N.state&&(N.data=N.data.subarray(0,N.data.byteLength-o))),P=y-c-1,P>0)){var Z=new Uint8Array(N.data.byteLength+P);Z.set(N.data,0),Z.set(v.subarray(0,P),N.data.byteLength),N.data=Z,N.state=0}}y<f?(F=v[y]&31,H=y,Y=F,c=0):c=-1}else c=0}if(H>=0&&c>=0){var ne={data:v.subarray(H,f),type:Y,state:c};x.push(ne)}if(x.length===0){var pe=this.getLastNalUnit();if(pe){var xe=new Uint8Array(pe.data.byteLength+v.byteLength);xe.set(pe.data,0),xe.set(v,pe.data.byteLength),pe.data=xe}}return m.naluState=c,x},h.parseAACPES=function(v){var f=0,m=this._audioTrack,c=this.aacOverFlow,o=v.data;if(c){this.aacOverFlow=null;var x=c.sample.unit.byteLength,y=Math.min(c.missing,x),S=x-y;c.sample.unit.set(o.subarray(0,y),S),m.samples.push(c.sample),f=c.missing}var P,F;for(P=f,F=o.length;P<F-1&&!B.isHeader(o,P);P++);if(P!==f){var H,Y;if(P<F-1?(H="AAC PES did not start with ADTS header,offset:"+P,Y=!1):(H="no ADTS header found in AAC PES",Y=!0),b.logger.warn("parsing error:"+H),this.observer.emit(I.Events.ERROR,I.Events.ERROR,{type:E.ErrorTypes.MEDIA_ERROR,details:E.ErrorDetails.FRAG_PARSING_ERROR,fatal:Y,reason:H}),Y)return}B.initTrackConfig(m,this.observer,o,P,this.audioCodec);var j;if(v.pts!==void 0)j=v.pts;else if(c){var N=B.getFrameDuration(m.samplerate);j=c.sample.pts+N}else{b.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var Z=0;P<F;)if(B.isHeader(o,P)){if(P+5<F){var ne=B.appendFrame(m,o,P,j,Z);if(ne)if(ne.missing)this.aacOverFlow=ne;else{P+=ne.length,Z++;continue}}break}else P++},h.parseMPEGPES=function(v){var f=v.data,m=f.length,c=0,o=0,x=v.pts;if(x===void 0){b.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;o<m;)if(C.isHeader(f,o)){var y=C.appendFrame(this._audioTrack,f,o,x,c);if(y)o+=y.length,c++;else break}else o++},h.parseID3PES=function(v){if(v.pts===void 0){b.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(v)},d}();w.minProbeByteLength=188;function A(d,h,D,v){return{key:d,frame:!1,pts:h,dts:D,units:[],debug:v,length:0}}function g(d,h){return(d[h+10]&31)<<8|d[h+11]}function u(d,h,D,v){var f={audio:-1,avc:-1,id3:-1,isAAC:!0},m=(d[h+1]&15)<<8|d[h+2],c=h+3+m-4,o=(d[h+10]&15)<<8|d[h+11];for(h+=12+o;h<c;){var x=(d[h+1]&31)<<8|d[h+2];switch(d[h]){case 207:if(!v){b.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:f.audio===-1&&(f.audio=x);break;case 21:f.id3===-1&&(f.id3=x);break;case 219:if(!v){b.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:f.avc===-1&&(f.avc=x);break;case 3:case 4:D?f.audio===-1&&(f.audio=x,f.isAAC=!1):b.logger.log("MPEG audio found, not supported in this browser");break;case 36:b.logger.warn("Unsupported HEVC stream type found");break;default:break}h+=((d[h+3]&15)<<8|d[h+4])+5}return f}function a(d){var h=0,D,v,f,m,c,o=d.data;if(!d||d.size===0)return null;for(;o[0].length<19&&o.length>1;){var x=new Uint8Array(o[0].length+o[1].length);x.set(o[0]),x.set(o[1],o[0].length),o[0]=x,o.splice(1,1)}D=o[0];var y=(D[0]<<16)+(D[1]<<8)+D[2];if(y===1){if(v=(D[4]<<8)+D[5],v&&v>d.size-6)return null;var S=D[7];S&192&&(m=(D[9]&14)*536870912+(D[10]&255)*4194304+(D[11]&254)*16384+(D[12]&255)*128+(D[13]&254)/2,S&64?(c=(D[14]&14)*536870912+(D[15]&255)*4194304+(D[16]&254)*16384+(D[17]&255)*128+(D[18]&254)/2,m-c>60*9e4&&(b.logger.warn(Math.round((m-c)/9e4)+"s delta between PTS and DTS, align them"),m=c)):c=m),f=D[8];var P=f+9;if(d.size<=P)return null;d.size-=P;for(var F=new Uint8Array(d.size),H=0,Y=o.length;H<Y;H++){D=o[H];var j=D.byteLength;if(P)if(P>j){P-=j;continue}else D=D.subarray(P),j-=P,P=0;F.set(D,h),h+=j}return v&&(v-=f+3),{data:F,pts:m,dts:c,len:v}}return null}function l(d,h){if(d.units.length&&d.frame){if(d.pts===void 0){var D=h.samples,v=D.length;if(v){var f=D[v-1];d.pts=f.pts,d.dts=f.dts}else{h.dropped++;return}}h.samples.push(d)}d.debug.length&&b.logger.log(d.pts+"/"+d.dts+":"+d.debug)}function s(d,h){var D=d.length;if(D>0){if(h.pts>=d[D-1].pts)d.push(h);else for(var v=D-1;v>=0;v--)if(h.pts<d[v].pts){d.splice(v,0,h);break}}else d.push(h)}function p(d){for(var h=d.byteLength,D=[],v=1;v<h-2;)d[v]===0&&d[v+1]===0&&d[v+2]===3?(D.push(v+2),v+=2):v++;if(D.length===0)return d;var f=h-D.length,m=new Uint8Array(f),c=0;for(v=0;v<f;c++,v++)c===D[0]&&(c++,D.shift()),m[v]=d[c];return m}K.default=w},"./src/errors.ts":function($,K,O){"use strict";O.r(K),O.d(K,"ErrorTypes",function(){return B}),O.d(K,"ErrorDetails",function(){return C});var B;(function(L){L.NETWORK_ERROR="networkError",L.MEDIA_ERROR="mediaError",L.KEY_SYSTEM_ERROR="keySystemError",L.MUX_ERROR="muxError",L.OTHER_ERROR="otherError"})(B||(B={}));var C;(function(L){L.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",L.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",L.KEY_SYSTEM_NO_SESSION="keySystemNoSession",L.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",L.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",L.MANIFEST_LOAD_ERROR="manifestLoadError",L.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",L.MANIFEST_PARSING_ERROR="manifestParsingError",L.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",L.LEVEL_EMPTY_ERROR="levelEmptyError",L.LEVEL_LOAD_ERROR="levelLoadError",L.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",L.LEVEL_SWITCH_ERROR="levelSwitchError",L.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",L.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",L.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",L.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",L.FRAG_LOAD_ERROR="fragLoadError",L.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",L.FRAG_DECRYPT_ERROR="fragDecryptError",L.FRAG_PARSING_ERROR="fragParsingError",L.REMUX_ALLOC_ERROR="remuxAllocError",L.KEY_LOAD_ERROR="keyLoadError",L.KEY_LOAD_TIMEOUT="keyLoadTimeOut",L.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",L.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",L.BUFFER_APPEND_ERROR="bufferAppendError",L.BUFFER_APPENDING_ERROR="bufferAppendingError",L.BUFFER_STALLED_ERROR="bufferStalledError",L.BUFFER_FULL_ERROR="bufferFullError",L.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",L.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",L.INTERNAL_EXCEPTION="internalException",L.INTERNAL_ABORTED="aborted",L.UNKNOWN="unknown"})(C||(C={}))},"./src/events.ts":function($,K,O){"use strict";O.r(K),O.d(K,"Events",function(){return B});var B;(function(C){C.MEDIA_ATTACHING="hlsMediaAttaching",C.MEDIA_ATTACHED="hlsMediaAttached",C.MEDIA_DETACHING="hlsMediaDetaching",C.MEDIA_DETACHED="hlsMediaDetached",C.BUFFER_RESET="hlsBufferReset",C.BUFFER_CODECS="hlsBufferCodecs",C.BUFFER_CREATED="hlsBufferCreated",C.BUFFER_APPENDING="hlsBufferAppending",C.BUFFER_APPENDED="hlsBufferAppended",C.BUFFER_EOS="hlsBufferEos",C.BUFFER_FLUSHING="hlsBufferFlushing",C.BUFFER_FLUSHED="hlsBufferFlushed",C.MANIFEST_LOADING="hlsManifestLoading",C.MANIFEST_LOADED="hlsManifestLoaded",C.MANIFEST_PARSED="hlsManifestParsed",C.LEVEL_SWITCHING="hlsLevelSwitching",C.LEVEL_SWITCHED="hlsLevelSwitched",C.LEVEL_LOADING="hlsLevelLoading",C.LEVEL_LOADED="hlsLevelLoaded",C.LEVEL_UPDATED="hlsLevelUpdated",C.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",C.LEVELS_UPDATED="hlsLevelsUpdated",C.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",C.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",C.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",C.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",C.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",C.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",C.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",C.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",C.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",C.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",C.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",C.CUES_PARSED="hlsCuesParsed",C.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",C.INIT_PTS_FOUND="hlsInitPtsFound",C.FRAG_LOADING="hlsFragLoading",C.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",C.FRAG_LOADED="hlsFragLoaded",C.FRAG_DECRYPTED="hlsFragDecrypted",C.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",C.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",C.FRAG_PARSING_METADATA="hlsFragParsingMetadata",C.FRAG_PARSED="hlsFragParsed",C.FRAG_BUFFERED="hlsFragBuffered",C.FRAG_CHANGED="hlsFragChanged",C.FPS_DROP="hlsFpsDrop",C.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",C.ERROR="hlsError",C.DESTROYING="hlsDestroying",C.KEY_LOADING="hlsKeyLoading",C.KEY_LOADED="hlsKeyLoaded",C.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",C.BACK_BUFFER_REACHED="hlsBackBufferReached"})(B||(B={}))},"./src/hls.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return d});var B=O("./node_modules/url-toolkit/src/url-toolkit.js"),C=O.n(B),L=O("./src/loader/playlist-loader.ts"),U=O("./src/loader/key-loader.ts"),_=O("./src/controller/id3-track-controller.ts"),I=O("./src/controller/latency-controller.ts"),M=O("./src/controller/level-controller.ts"),b=O("./src/controller/fragment-tracker.ts"),E=O("./src/controller/stream-controller.ts"),R=O("./src/is-supported.ts"),w=O("./src/utils/logger.ts"),A=O("./src/config.ts"),g=O("./node_modules/eventemitter3/index.js"),u=O.n(g),a=O("./src/events.ts"),l=O("./src/errors.ts");function s(h,D){for(var v=0;v<D.length;v++){var f=D[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(h,f.key,f)}}function p(h,D,v){return D&&s(h.prototype,D),v&&s(h,v),h}var d=function(){h.isSupported=function(){return Object(R.isSupported)()};function h(v){v===void 0&&(v={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new g.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,v);this.userConfig=v,Object(w.enableLogs)(f.debug),this._autoLevelCapping=-1,f.progressive&&Object(A.enableStreamingMode)(f);var m=f.abrController,c=f.bufferController,o=f.capLevelController,x=f.fpsController,y=this.abrController=new m(this),S=this.bufferController=new c(this),P=this.capLevelController=new o(this),F=new x(this),H=new L.default(this),Y=new U.default(this),j=new _.default(this),N=this.levelController=new M.default(this),Z=new b.FragmentTracker(this),ne=this.streamController=new E.default(this,Z);P.setStreamController(ne),F.setStreamController(ne);var pe=[N,ne];this.networkControllers=pe;var xe=[H,Y,y,S,P,F,j,Z];this.audioTrackController=this.createController(f.audioTrackController,null,pe),this.createController(f.audioStreamController,Z,pe),this.subtitleTrackController=this.createController(f.subtitleTrackController,null,pe),this.createController(f.subtitleStreamController,Z,pe),this.createController(f.timelineController,null,xe),this.emeController=this.createController(f.emeController,null,xe),this.cmcdController=this.createController(f.cmcdController,null,xe),this.latencyController=this.createController(I.default,null,xe),this.coreComponents=xe}var D=h.prototype;return D.createController=function(f,m,c){if(f){var o=m?new f(this,m):new f(this);return c&&c.push(o),o}return null},D.on=function(f,m,c){c===void 0&&(c=this),this._emitter.on(f,m,c)},D.once=function(f,m,c){c===void 0&&(c=this),this._emitter.once(f,m,c)},D.removeAllListeners=function(f){this._emitter.removeAllListeners(f)},D.off=function(f,m,c,o){c===void 0&&(c=this),this._emitter.off(f,m,c,o)},D.listeners=function(f){return this._emitter.listeners(f)},D.emit=function(f,m,c){return this._emitter.emit(f,m,c)},D.trigger=function(f,m){if(this.config.debug)return this.emit(f,f,m);try{return this.emit(f,f,m)}catch(c){w.logger.error("An internal error happened while handling event "+f+'. Error message: "'+c.message+'". Here is a stacktrace:',c),this.trigger(a.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:f,error:c})}return!1},D.listenerCount=function(f){return this._emitter.listenerCount(f)},D.destroy=function(){w.logger.log("destroy"),this.trigger(a.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},D.attachMedia=function(f){w.logger.log("attachMedia"),this._media=f,this.trigger(a.Events.MEDIA_ATTACHING,{media:f})},D.detachMedia=function(){w.logger.log("detachMedia"),this.trigger(a.Events.MEDIA_DETACHING,void 0),this._media=null},D.loadSource=function(f){this.stopLoad();var m=this.media,c=this.url,o=this.url=B.buildAbsoluteURL(self.location.href,f,{alwaysNormalize:!0});w.logger.log("loadSource:"+o),m&&c&&c!==o&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(m)),this.trigger(a.Events.MANIFEST_LOADING,{url:f})},D.startLoad=function(f){f===void 0&&(f=-1),w.logger.log("startLoad("+f+")"),this.networkControllers.forEach(function(m){m.startLoad(f)})},D.stopLoad=function(){w.logger.log("stopLoad"),this.networkControllers.forEach(function(f){f.stopLoad()})},D.swapAudioCodec=function(){w.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},D.recoverMediaError=function(){w.logger.log("recoverMediaError");var f=this._media;this.detachMedia(),f&&this.attachMedia(f)},D.removeLevel=function(f,m){m===void 0&&(m=0),this.levelController.removeLevel(f,m)},p(h,[{key:"levels",get:function(){var f=this.levelController.levels;return f||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(f){w.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){w.logger.log("set nextLevel:"+f),this.levelController.manualLevel=f,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(f){w.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){w.logger.log("set firstLevel:"+f),this.levelController.firstLevel=f}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(f){w.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 m=!!f;m!==this.config.capLevelToPlayerSize&&(m?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=m)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(f){this._autoLevelCapping!==f&&(w.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,m=this.config.minAutoBitrate;if(!f)return 0;for(var c=f.length,o=0;o<c;o++)if(f[o].maxBitrate>m)return o;return 0}},{key:"maxAutoLevel",get:function(){var f=this.levels,m=this.autoLevelCapping,c;return m===-1&&f&&f.length?c=f.length-1:c=m,c}},{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 m=this.audioTrackController;m&&(m.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 m=this.subtitleTrackController;m&&(m.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 m=this.subtitleTrackController;m&&(m.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 a.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}();d.defaultConfig=void 0},"./src/is-supported.ts":function($,K,O){"use strict";O.r(K),O.d(K,"isSupported",function(){return L}),O.d(K,"changeTypeSupported",function(){return U});var B=O("./src/utils/mediasource-helper.ts");function C(){return self.SourceBuffer||self.WebKitSourceBuffer}function L(){var _=Object(B.getMediaSource)();if(!_)return!1;var I=C(),M=_&&typeof _.isTypeSupported=="function"&&_.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),b=!I||I.prototype&&typeof I.prototype.appendBuffer=="function"&&typeof I.prototype.remove=="function";return!!M&&!!b}function U(){var _,I=C();return typeof(I==null||((_=I.prototype)===null||_===void 0)?void 0:_.changeType)=="function"}},"./src/loader/fragment-loader.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return w}),O.d(K,"LoadError",function(){return g});var B=O("./src/polyfills/number.ts"),C=O("./src/errors.ts");function L(u,a){u.prototype=Object.create(a.prototype),u.prototype.constructor=u,b(u,a)}function U(u){var a=typeof Map=="function"?new Map:void 0;return U=function(s){if(s===null||!M(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a!="undefined"){if(a.has(s))return a.get(s);a.set(s,p)}function p(){return _(s,arguments,E(this).constructor)}return p.prototype=Object.create(s.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),b(p,s)},U(u)}function _(u,a,l){return I()?_=Reflect.construct:_=function(p,d,h){var D=[null];D.push.apply(D,d);var v=Function.bind.apply(p,D),f=new v;return h&&b(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(u){return!1}}function M(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function b(u,a){return b=Object.setPrototypeOf||function(s,p){return s.__proto__=p,s},b(u,a)}function E(u){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},E(u)}var R=Math.pow(2,17),w=function(){function u(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var a=u.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(s,p){var d=this,h=s.url;if(!h)return Promise.reject(new g({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,networkDetails:null},"Fragment does not have a "+(h?"part list":"url")));this.abort();var D=this.config,v=D.fLoader,f=D.loader;return new Promise(function(m,c){d.loader&&d.loader.destroy();var o=d.loader=s.loader=v?new v(D):new f(D),x=A(s),y={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:R};s.stats=o.stats,o.load(x,y,{onSuccess:function(P,F,H,Y){d.resetLoader(s,o),m({frag:s,part:null,payload:P.data,networkDetails:Y})},onError:function(P,F,H){d.resetLoader(s,o),c(new g({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,response:P,networkDetails:H}))},onAbort:function(P,F,H){d.resetLoader(s,o),c(new g({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,networkDetails:H}))},onTimeout:function(P,F,H){d.resetLoader(s,o),c(new g({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,networkDetails:H}))},onProgress:function(P,F,H,Y){p&&p({frag:s,part:null,payload:H,networkDetails:Y})}})})},a.loadPart=function(s,p,d){var h=this;this.abort();var D=this.config,v=D.fLoader,f=D.loader;return new Promise(function(m,c){h.loader&&h.loader.destroy();var o=h.loader=s.loader=v?new v(D):new f(D),x=A(s,p),y={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:R};p.stats=o.stats,o.load(x,y,{onSuccess:function(P,F,H,Y){h.resetLoader(s,o),h.updateStatsFromPart(s,p);var j={frag:s,part:p,payload:P.data,networkDetails:Y};d(j),m(j)},onError:function(P,F,H){h.resetLoader(s,o),c(new g({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,part:p,response:P,networkDetails:H}))},onAbort:function(P,F,H){s.stats.aborted=p.stats.aborted,h.resetLoader(s,o),c(new g({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,part:p,networkDetails:H}))},onTimeout:function(P,F,H){h.resetLoader(s,o),c(new g({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,part:p,networkDetails:H}))}})})},a.updateStatsFromPart=function(s,p){var d=s.stats,h=p.stats,D=h.total;if(d.loaded+=h.loaded,D){var v=Math.round(s.duration/p.duration),f=Math.min(Math.round(d.loaded/D),v),m=v-f,c=m*Math.round(d.loaded/f);d.total=d.loaded+c}else d.total=Math.max(d.loaded,d.total);var o=d.loading,x=h.loading;o.start?o.first+=x.first-x.start:(o.start=x.start,o.first=x.first),o.end=x.end},a.resetLoader=function(s,p){s.loader=null,this.loader===p&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),p.destroy()},u}();function A(u,a){a===void 0&&(a=null);var l=a||u,s={frag:u,part:a,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},p=l.byteRangeStartOffset,d=l.byteRangeEndOffset;return Object(B.isFiniteNumber)(p)&&Object(B.isFiniteNumber)(d)&&(s.rangeStart=p,s.rangeEnd=d),s}var g=function(u){L(a,u);function a(l){for(var s,p=arguments.length,d=new Array(p>1?p-1:0),h=1;h<p;h++)d[h-1]=arguments[h];return s=u.call.apply(u,[this].concat(d))||this,s.data=void 0,s.data=l,s}return a}(U(Error))},"./src/loader/fragment.ts":function($,K,O){"use strict";O.r(K),O.d(K,"ElementaryStreamTypes",function(){return w}),O.d(K,"BaseSegment",function(){return A}),O.d(K,"Fragment",function(){return g}),O.d(K,"Part",function(){return u});var B=O("./src/polyfills/number.ts"),C=O("./node_modules/url-toolkit/src/url-toolkit.js"),L=O.n(C),U=O("./src/utils/logger.ts"),_=O("./src/loader/level-key.ts"),I=O("./src/loader/load-stats.ts");function M(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,b(a,l)}function b(a,l){return b=Object.setPrototypeOf||function(p,d){return p.__proto__=d,p},b(a,l)}function E(a,l){for(var s=0;s<l.length;s++){var p=l[s];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}function R(a,l,s){return l&&E(a.prototype,l),s&&E(a,s),a}var w;(function(a){a.AUDIO="audio",a.VIDEO="video",a.AUDIOVIDEO="audiovideo"})(w||(w={}));var A=function(){function a(s){var p;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(p={},p[w.AUDIO]=null,p[w.VIDEO]=null,p[w.AUDIOVIDEO]=null,p),this.baseurl=s}var l=a.prototype;return l.setByteRange=function(p,d){var h=p.split("@",2),D=[];h.length===1?D[0]=d?d.byteRangeEndOffset:0:D[0]=parseInt(h[1]),D[1]=parseInt(h[0])+D[0],this._byteRange=D},R(a,[{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(C.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(p){this._url=p}}]),a}(),g=function(a){M(l,a);function l(p,d){var h;return h=a.call(this,d)||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=p,h}var s=l.prototype;return s.createInitializationVector=function(d){for(var h=new Uint8Array(16),D=12;D<16;D++)h[D]=d>>8*(15-D)&255;return h},s.setDecryptDataFromLevelKey=function(d,h){var D=d;return(d==null?void 0:d.method)==="AES-128"&&d.uri&&!d.iv&&(D=_.LevelKey.fromURI(d.uri),D.method=d.method,D.iv=this.createInitializationVector(h),D.keyFormat="identity"),D},s.setElementaryStreamInfo=function(d,h,D,v,f,m){m===void 0&&(m=!1);var c=this.elementaryStreams,o=c[d];if(!o){c[d]={startPTS:h,endPTS:D,startDTS:v,endDTS:f,partial:m};return}o.startPTS=Math.min(o.startPTS,h),o.endPTS=Math.max(o.endPTS,D),o.startDTS=Math.min(o.startDTS,v),o.endDTS=Math.max(o.endDTS,f)},s.clearElementaryStreamInfo=function(){var d=this.elementaryStreams;d[w.AUDIO]=null,d[w.VIDEO]=null,d[w.AUDIOVIDEO]=null},R(l,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var d=this.sn;typeof d!="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'),d=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,d)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(B.isFiniteNumber)(this.programDateTime))return null;var d=Object(B.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+d*1e3}},{key:"encrypted",get:function(){var d;return!!((d=this.decryptdata)!==null&&d!==void 0&&d.keyFormat&&this.decryptdata.uri)}}]),l}(A),u=function(a){M(l,a);function l(s,p,d,h,D){var v;v=a.call(this,d)||this,v.fragOffset=0,v.duration=0,v.gap=!1,v.independent=!1,v.relurl=void 0,v.fragment=void 0,v.index=void 0,v.stats=new I.LoadStats,v.duration=s.decimalFloatingPoint("DURATION"),v.gap=s.bool("GAP"),v.independent=s.bool("INDEPENDENT"),v.relurl=s.enumeratedString("URI"),v.fragment=p,v.index=h;var f=s.enumeratedString("BYTERANGE");return f&&v.setByteRange(f,D),D&&(v.fragOffset=D.fragOffset+D.duration),v}return R(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 p=this.elementaryStreams;return!!(p.audio||p.video||p.audiovideo)}}]),l}(A)},"./src/loader/key-loader.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return U});var B=O("./src/events.ts"),C=O("./src/errors.ts"),L=O("./src/utils/logger.ts"),U=function(){function _(M){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=M,this._registerListeners()}var I=_.prototype;return I._registerListeners=function(){this.hls.on(B.Events.KEY_LOADING,this.onKeyLoading,this)},I._unregisterListeners=function(){this.hls.off(B.Events.KEY_LOADING,this.onKeyLoading)},I.destroy=function(){this._unregisterListeners();for(var b in this.loaders){var E=this.loaders[b];E&&E.destroy()}this.loaders={}},I.onKeyLoading=function(b,E){var R=E.frag,w=R.type,A=this.loaders[w];if(!R.decryptdata){L.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var g=R.decryptdata.uri;if(g!==this.decrypturl||this.decryptkey===null){var u=this.hls.config;if(A&&(L.logger.warn("abort previous key loader for type:"+w),A.abort()),!g){L.logger.warn("key uri is falsy");return}var a=u.loader,l=R.loader=this.loaders[w]=new a(u);this.decrypturl=g,this.decryptkey=null;var s={url:g,frag:R,responseType:"arraybuffer"},p={timeout:u.fragLoadingTimeOut,maxRetry:0,retryDelay:u.fragLoadingRetryDelay,maxRetryDelay:u.fragLoadingMaxRetryTimeout,highWaterMark:0},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(s,p,d)}else this.decryptkey&&(R.decryptdata.key=this.decryptkey,this.hls.trigger(B.Events.KEY_LOADED,{frag:R}))},I.loadsuccess=function(b,E,R){var w=R.frag;if(!w.decryptdata){L.logger.error("after key load, decryptdata unset");return}this.decryptkey=w.decryptdata.key=new Uint8Array(b.data),w.loader=null,delete this.loaders[w.type],this.hls.trigger(B.Events.KEY_LOADED,{frag:w})},I.loaderror=function(b,E){var R=E.frag,w=R.loader;w&&w.abort(),delete this.loaders[R.type],this.hls.trigger(B.Events.ERROR,{type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:R,response:b})},I.loadtimeout=function(b,E){var R=E.frag,w=R.loader;w&&w.abort(),delete this.loaders[R.type],this.hls.trigger(B.Events.ERROR,{type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:R})},_}()},"./src/loader/level-details.ts":function($,K,O){"use strict";O.r(K),O.d(K,"LevelDetails",function(){return _});var B=O("./src/polyfills/number.ts");function C(I,M){for(var b=0;b<M.length;b++){var E=M[b];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(I,E.key,E)}}function L(I,M,b){return M&&C(I.prototype,M),b&&C(I,b),I}var U=10,_=function(){function I(b){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=b}var M=I.prototype;return M.reloaded=function(E){if(!E){this.advanced=!0,this.updated=!0;return}var R=this.lastPartSn-E.lastPartSn,w=this.lastPartIndex-E.lastPartIndex;this.updated=this.endSN!==E.endSN||!!w||!!R,this.advanced=this.endSN>E.endSN||R>0||R===0&&w>0,this.updated||this.advanced?this.misses=Math.floor(E.misses*.6):this.misses=E.misses+1,this.availabilityDelay=E.availabilityDelay},L(I,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(B.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||U}},{key:"drift",get:function(){var E=this.driftEndTime-this.driftStartTime;if(E>0){var R=this.driftEnd-this.driftStart;return R*1e3/E}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var E;return(E=this.partList)!==null&&E!==void 0&&E.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var E;return(E=this.fragments)!==null&&E!==void 0&&E.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 E;return(E=this.partList)!==null&&E!==void 0&&E.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var E;return(E=this.partList)!==null&&E!==void 0&&E.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),I}()},"./src/loader/level-key.ts":function($,K,O){"use strict";O.r(K),O.d(K,"LevelKey",function(){return _});var B=O("./node_modules/url-toolkit/src/url-toolkit.js"),C=O.n(B);function L(I,M){for(var b=0;b<M.length;b++){var E=M[b];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(I,E.key,E)}}function U(I,M,b){return M&&L(I.prototype,M),b&&L(I,b),I}var _=function(){I.fromURL=function(b,E){return new I(b,E)},I.fromURI=function(b){return new I(b)};function I(M,b){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,b?this._uri=Object(B.buildAbsoluteURL)(M,b,{alwaysNormalize:!0}):this._uri=M}return U(I,[{key:"uri",get:function(){return this._uri}}]),I}()},"./src/loader/load-stats.ts":function($,K,O){"use strict";O.r(K),O.d(K,"LoadStats",function(){return B});var B=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($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return l});var B=O("./src/polyfills/number.ts"),C=O("./node_modules/url-toolkit/src/url-toolkit.js"),L=O.n(C),U=O("./src/loader/fragment.ts"),_=O("./src/loader/level-details.ts"),I=O("./src/loader/level-key.ts"),M=O("./src/utils/attr-list.ts"),b=O("./src/utils/logger.ts"),E=O("./src/utils/codecs.ts"),R=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,w=/#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"),g=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("|")),u=/\.(mp4|m4s|m4v|m4a)$/i;function a(D){var v,f;return u.test((v=(f=C.parseURL(D))===null||f===void 0?void 0:f.path)!=null?v:"")}var l=function(){function D(){}return D.findGroup=function(f,m){for(var c=0;c<f.length;c++){var o=f[c];if(o.id===m)return o}},D.convertAVC1ToAVCOTI=function(f){var m=f.split(".");if(m.length>2){var c=m.shift()+".";return c+=parseInt(m.shift()).toString(16),c+=("000"+parseInt(m.shift()).toString(16)).substr(-4),c}return f},D.resolve=function(f,m){return C.buildAbsoluteURL(m,f,{alwaysNormalize:!0})},D.parseMasterPlaylist=function(f,m){var c=[],o={},x=!1;R.lastIndex=0;for(var y;(y=R.exec(f))!=null;)if(y[1]){var S=new M.AttrList(y[1]),P={attrs:S,bitrate:S.decimalInteger("AVERAGE-BANDWIDTH")||S.decimalInteger("BANDWIDTH"),name:S.NAME,url:D.resolve(y[2],m)},F=S.decimalResolution("RESOLUTION");F&&(P.width=F.width,P.height=F.height),s((S.CODECS||"").split(/[ ,]+/).filter(function(Y){return Y}),P),P.videoCodec&&P.videoCodec.indexOf("avc1")!==-1&&(P.videoCodec=D.convertAVC1ToAVCOTI(P.videoCodec)),c.push(P)}else if(y[3]){var H=new M.AttrList(y[3]);H["DATA-ID"]&&(x=!0,o[H["DATA-ID"]]=H)}return{levels:c,sessionData:x?o:null}},D.parseMasterPlaylistMedia=function(f,m,c,o){o===void 0&&(o=[]);var x,y=[],S=0;for(w.lastIndex=0;(x=w.exec(f))!==null;){var P=new M.AttrList(x[1]);if(P.TYPE===c){var F={attrs:P,bitrate:0,id:S++,groupId:P["GROUP-ID"],instreamId:P["INSTREAM-ID"],name:P.NAME||P.LANGUAGE||"",type:c,default:P.bool("DEFAULT"),autoselect:P.bool("AUTOSELECT"),forced:P.bool("FORCED"),lang:P.LANGUAGE,url:P.URI?D.resolve(P.URI,m):""};if(o.length){var H=D.findGroup(o,F.groupId)||o[0];p(F,H,"audioCodec"),p(F,H,"textCodec")}y.push(F)}}return y},D.parseLevelPlaylist=function(f,m,c,o,x){var y=new _.LevelDetails(m),S=y.fragments,P=null,F=0,H=0,Y=0,j=0,N=null,Z=new U.Fragment(o,m),ne,pe,xe,je=-1,Le=!1;for(A.lastIndex=0,y.m3u8=f;(ne=A.exec(f))!==null;){Le&&(Le=!1,Z=new U.Fragment(o,m),Z.start=Y,Z.sn=F,Z.cc=j,Z.level=c,P&&(Z.initSegment=P,Z.rawProgramDateTime=P.rawProgramDateTime));var De=ne[1];if(De){Z.duration=parseFloat(De);var Ce=(" "+ne[2]).slice(1);Z.title=Ce||null,Z.tagList.push(Ce?["INF",De,Ce]:["INF",De])}else if(ne[3])Object(B.isFiniteNumber)(Z.duration)&&(Z.start=Y,xe&&(Z.levelkey=xe),Z.sn=F,Z.level=c,Z.cc=j,Z.urlId=x,S.push(Z),Z.relurl=(" "+ne[3]).slice(1),h(Z,N),N=Z,Y+=Z.duration,F++,H=0,Le=!0);else if(ne[4]){var we=(" "+ne[4]).slice(1);N?Z.setByteRange(we,N):Z.setByteRange(we)}else if(ne[5])Z.rawProgramDateTime=(" "+ne[5]).slice(1),Z.tagList.push(["PROGRAM-DATE-TIME",Z.rawProgramDateTime]),je===-1&&(je=S.length);else{if(ne=ne[0].match(g),!ne){b.logger.warn("No matches on slow regex match for level playlist!");continue}for(pe=1;pe<ne.length&&!(typeof ne[pe]!="undefined");pe++);var fe=(" "+ne[pe]).slice(1),he=(" "+ne[pe+1]).slice(1),_e=ne[pe+2]?(" "+ne[pe+2]).slice(1):"";switch(fe){case"PLAYLIST-TYPE":y.type=he.toUpperCase();break;case"MEDIA-SEQUENCE":F=y.startSN=parseInt(he);break;case"SKIP":{var at=new M.AttrList(he),et=at.decimalInteger("SKIPPED-SEGMENTS");if(Object(B.isFiniteNumber)(et)){y.skippedSegments=et;for(var it=et;it--;)S.unshift(null);F+=et}var gt=at.enumeratedString("RECENTLY-REMOVED-DATERANGES");gt&&(y.recentlyRemovedDateranges=gt.split(" "));break}case"TARGETDURATION":y.targetduration=parseFloat(he);break;case"VERSION":y.version=parseInt(he);break;case"EXTM3U":break;case"ENDLIST":y.live=!1;break;case"#":(he||_e)&&Z.tagList.push(_e?[he,_e]:[he]);break;case"DIS":j++;case"GAP":Z.tagList.push([fe]);break;case"BITRATE":Z.tagList.push([fe,he]);break;case"DISCONTINUITY-SEQ":j=parseInt(he);break;case"KEY":{var He,Ne=new M.AttrList(he),Ze=Ne.enumeratedString("METHOD"),ut=Ne.URI,dt=Ne.hexadecimalInteger("IV"),ze=Ne.enumeratedString("KEYFORMATVERSIONS"),Ge=Ne.enumeratedString("KEYID"),yt=(He=Ne.enumeratedString("KEYFORMAT"))!=null?He:"identity",vt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(vt.indexOf(yt)>-1){b.logger.warn("Keyformat "+yt+" is not supported from the manifest");continue}else if(yt!=="identity")continue;Ze&&(xe=I.LevelKey.fromURL(m,ut),ut&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ze)>=0&&(xe.method=Ze,xe.keyFormat=yt,Ge&&(xe.keyID=Ge),ze&&(xe.keyFormatVersions=ze),xe.iv=dt));break}case"START":{var mt=new M.AttrList(he),qe=mt.decimalFloatingPoint("TIME-OFFSET");Object(B.isFiniteNumber)(qe)&&(y.startTimeOffset=qe);break}case"MAP":{var lt=new M.AttrList(he);Z.relurl=lt.URI,lt.BYTERANGE&&Z.setByteRange(lt.BYTERANGE),Z.level=c,Z.sn="initSegment",xe&&(Z.levelkey=xe),Z.initSegment=null,P=Z,Le=!0;break}case"SERVER-CONTROL":{var st=new M.AttrList(he);y.canBlockReload=st.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=st.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&st.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=st.optionalFloat("PART-HOLD-BACK",0),y.holdBack=st.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Fe=new M.AttrList(he);y.partTarget=Fe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Me=y.partList;Me||(Me=y.partList=[]);var ot=H>0?Me[Me.length-1]:void 0,Ke=H++,Oe=new U.Part(new M.AttrList(he),Z,m,Ke,ot);Me.push(Oe),Z.duration+=Oe.duration;break}case"PRELOAD-HINT":{var We=new M.AttrList(he);y.preloadHint=We;break}case"RENDITION-REPORT":{var ve=new M.AttrList(he);y.renditionReports=y.renditionReports||[],y.renditionReports.push(ve);break}default:b.logger.warn("line parsed but not handled: "+ne);break}}}N&&!N.relurl?(S.pop(),Y-=N.duration,y.partList&&(y.fragmentHint=N)):y.partList&&(h(Z,N),Z.cc=j,y.fragmentHint=Z);var le=S.length,de=S[0],J=S[le-1];if(Y+=y.skippedSegments*y.targetduration,Y>0&&le&&J){y.averagetargetduration=Y/le;var q=J.sn;y.endSN=q!=="initSegment"?q:0,de&&(y.startCC=de.cc,de.initSegment||y.fragments.every(function(te){return te.relurl&&a(te.relurl)})&&(b.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),Z=new U.Fragment(o,m),Z.relurl=J.relurl,Z.level=c,Z.sn="initSegment",de.initSegment=Z,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(Y+=y.fragmentHint.duration),y.totalduration=Y,y.endCC=j,je>0&&d(S,je),y},D}();function s(D,v){["video","audio","text"].forEach(function(f){var m=D.filter(function(o){return Object(E.isCodecType)(o,f)});if(m.length){var c=m.filter(function(o){return o.lastIndexOf("avc1",0)===0||o.lastIndexOf("mp4a",0)===0});v[f+"Codec"]=c.length>0?c[0]:m[0],D=D.filter(function(o){return m.indexOf(o)===-1})}}),v.unknownCodecs=D}function p(D,v,f){var m=v[f];m&&(D[f]=m)}function d(D,v){for(var f=D[v],m=v;m--;){var c=D[m];if(!c)return;c.programDateTime=f.programDateTime-c.duration*1e3,f=c}}function h(D,v){D.rawProgramDateTime?D.programDateTime=Date.parse(D.rawProgramDateTime):v!=null&&v.programDateTime&&(D.programDateTime=v.endProgramDateTime),Object(B.isFiniteNumber)(D.programDateTime)||(D.programDateTime=null,D.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/polyfills/number.ts"),C=O("./src/events.ts"),L=O("./src/errors.ts"),U=O("./src/utils/logger.ts"),_=O("./src/utils/mp4-tools.ts"),I=O("./src/loader/m3u8-parser.ts"),M=O("./src/types/loader.ts"),b=O("./src/utils/attr-list.ts");function E(A){var g=A.type;switch(g){case M.PlaylistContextType.AUDIO_TRACK:return M.PlaylistLevelType.AUDIO;case M.PlaylistContextType.SUBTITLE_TRACK:return M.PlaylistLevelType.SUBTITLE;default:return M.PlaylistLevelType.MAIN}}function R(A,g){var u=A.url;return(u===void 0||u.indexOf("data:")===0)&&(u=g.url),u}var w=function(){function A(u){this.hls=void 0,this.loaders=Object.create(null),this.hls=u,this.registerListeners()}var g=A.prototype;return g.registerListeners=function(){var a=this.hls;a.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(C.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(C.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(C.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},g.unregisterListeners=function(){var a=this.hls;a.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(C.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(C.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(C.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},g.createInternalLoader=function(a){var l=this.hls.config,s=l.pLoader,p=l.loader,d=s||p,h=new d(l);return a.loader=h,this.loaders[a.type]=h,h},g.getInternalLoader=function(a){return this.loaders[a.type]},g.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},g.destroyInternalLoaders=function(){for(var a in this.loaders){var l=this.loaders[a];l&&l.destroy(),this.resetInternalLoader(a)}},g.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},g.onManifestLoading=function(a,l){var s=l.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:M.PlaylistContextType.MANIFEST,url:s,deliveryDirectives:null})},g.onLevelLoading=function(a,l){var s=l.id,p=l.level,d=l.url,h=l.deliveryDirectives;this.load({id:s,groupId:null,level:p,responseType:"text",type:M.PlaylistContextType.LEVEL,url:d,deliveryDirectives:h})},g.onAudioTrackLoading=function(a,l){var s=l.id,p=l.groupId,d=l.url,h=l.deliveryDirectives;this.load({id:s,groupId:p,level:null,responseType:"text",type:M.PlaylistContextType.AUDIO_TRACK,url:d,deliveryDirectives:h})},g.onSubtitleTrackLoading=function(a,l){var s=l.id,p=l.groupId,d=l.url,h=l.deliveryDirectives;this.load({id:s,groupId:p,level:null,responseType:"text",type:M.PlaylistContextType.SUBTITLE_TRACK,url:d,deliveryDirectives:h})},g.load=function(a){var l,s=this.hls.config,p=this.getInternalLoader(a);if(p){var d=p.context;if(d&&d.url===a.url){U.logger.trace("[playlist-loader]: playlist request ongoing");return}U.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),p.abort()}var h,D,v,f;switch(a.type){case M.PlaylistContextType.MANIFEST:h=s.manifestLoadingMaxRetry,D=s.manifestLoadingTimeOut,v=s.manifestLoadingRetryDelay,f=s.manifestLoadingMaxRetryTimeout;break;case M.PlaylistContextType.LEVEL:case M.PlaylistContextType.AUDIO_TRACK:case M.PlaylistContextType.SUBTITLE_TRACK:h=0,D=s.levelLoadingTimeOut;break;default:h=s.levelLoadingMaxRetry,D=s.levelLoadingTimeOut,v=s.levelLoadingRetryDelay,f=s.levelLoadingMaxRetryTimeout;break}if(p=this.createInternalLoader(a),(l=a.deliveryDirectives)!==null&&l!==void 0&&l.part){var m;if(a.type===M.PlaylistContextType.LEVEL&&a.level!==null?m=this.hls.levels[a.level].details:a.type===M.PlaylistContextType.AUDIO_TRACK&&a.id!==null?m=this.hls.audioTracks[a.id].details:a.type===M.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(m=this.hls.subtitleTracks[a.id].details),m){var c=m.partTarget,o=m.targetduration;c&&o&&(D=Math.min(Math.max(c*3,o*.8)*1e3,D))}}var x={timeout:D,maxRetry:h,retryDelay:v,maxRetryDelay:f,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};p.load(a,x,y)},g.loadsuccess=function(a,l,s,p){if(p===void 0&&(p=null),s.isSidxRequest){this.handleSidxRequest(a,s),this.handlePlaylistLoaded(a,l,s,p);return}this.resetInternalLoader(s.type);var d=a.data;if(d.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,s,"no EXTM3U delimiter",p);return}l.parsing.start=performance.now(),d.indexOf("#EXTINF:")>0||d.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,l,s,p):this.handleMasterPlaylist(a,l,s,p)},g.loaderror=function(a,l,s){s===void 0&&(s=null),this.handleNetworkError(l,s,!1,a)},g.loadtimeout=function(a,l,s){s===void 0&&(s=null),this.handleNetworkError(l,s,!0)},g.handleMasterPlaylist=function(a,l,s,p){var d=this.hls,h=a.data,D=R(a,s),v=I.default.parseMasterPlaylist(h,D),f=v.levels,m=v.sessionData;if(!f.length){this.handleManifestParsingError(a,s,"no level found in manifest",p);return}var c=f.map(function(F){return{id:F.attrs.AUDIO,audioCodec:F.audioCodec}}),o=f.map(function(F){return{id:F.attrs.SUBTITLES,textCodec:F.textCodec}}),x=I.default.parseMasterPlaylistMedia(h,D,"AUDIO",c),y=I.default.parseMasterPlaylistMedia(h,D,"SUBTITLES",o),S=I.default.parseMasterPlaylistMedia(h,D,"CLOSED-CAPTIONS");if(x.length){var P=x.some(function(F){return!F.url});!P&&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"),x.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new b.AttrList({}),bitrate:0,url:""}))}d.trigger(C.Events.MANIFEST_LOADED,{levels:f,audioTracks:x,subtitles:y,captions:S,url:D,stats:l,networkDetails:p,sessionData:m})},g.handleTrackOrLevelPlaylist=function(a,l,s,p){var d=this.hls,h=s.id,D=s.level,v=s.type,f=R(a,s),m=Object(B.isFiniteNumber)(h)?h:0,c=Object(B.isFiniteNumber)(D)?D:m,o=E(s),x=I.default.parseLevelPlaylist(a.data,f,c,o,m);if(!x.fragments.length){d.trigger(C.Events.ERROR,{type:L.ErrorTypes.NETWORK_ERROR,details:L.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:f,reason:"no fragments found in level",level:typeof s.level=="number"?s.level:void 0});return}if(v===M.PlaylistContextType.MANIFEST){var y={attrs:new b.AttrList({}),bitrate:0,details:x,name:"",url:f};d.trigger(C.Events.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:f,stats:l,networkDetails:p,sessionData:null})}if(l.parsing.end=performance.now(),x.needSidxRanges){var S,P=(S=x.fragments[0].initSegment)===null||S===void 0?void 0:S.url;this.load({url:P,isSidxRequest:!0,type:v,level:D,levelDetails:x,id:h,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}s.levelDetails=x,this.handlePlaylistLoaded(a,l,s,p)},g.handleSidxRequest=function(a,l){var s=Object(_.parseSegmentIndex)(new Uint8Array(a.data));if(!s)return;var p=s.references,d=l.levelDetails;p.forEach(function(h,D){var v=h.info,f=d.fragments[D];f.byteRange.length===0&&f.setByteRange(String(1+v.end-v.start)+"@"+String(v.start)),f.initSegment&&f.initSegment.setByteRange(String(s.moovEndOffset)+"@0")})},g.handleManifestParsingError=function(a,l,s,p){this.hls.trigger(C.Events.ERROR,{type:L.ErrorTypes.NETWORK_ERROR,details:L.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:l.type===M.PlaylistContextType.MANIFEST,url:a.url,reason:s,response:a,context:l,networkDetails:p})},g.handleNetworkError=function(a,l,s,p){s===void 0&&(s=!1),U.logger.warn("[playlist-loader]: A network "+(s?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var d=L.ErrorDetails.UNKNOWN,h=!1,D=this.getInternalLoader(a);switch(a.type){case M.PlaylistContextType.MANIFEST:d=s?L.ErrorDetails.MANIFEST_LOAD_TIMEOUT:L.ErrorDetails.MANIFEST_LOAD_ERROR,h=!0;break;case M.PlaylistContextType.LEVEL:d=s?L.ErrorDetails.LEVEL_LOAD_TIMEOUT:L.ErrorDetails.LEVEL_LOAD_ERROR,h=!1;break;case M.PlaylistContextType.AUDIO_TRACK:d=s?L.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:L.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,h=!1;break;case M.PlaylistContextType.SUBTITLE_TRACK:d=s?L.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:L.ErrorDetails.SUBTITLE_LOAD_ERROR,h=!1;break}D&&this.resetInternalLoader(a.type);var v={type:L.ErrorTypes.NETWORK_ERROR,details:d,fatal:h,url:a.url,loader:D,context:a,networkDetails:l};p&&(v.response=p),this.hls.trigger(C.Events.ERROR,v)},g.handlePlaylistLoaded=function(a,l,s,p){var d=s.type,h=s.level,D=s.id,v=s.groupId,f=s.loader,m=s.levelDetails,c=s.deliveryDirectives;if(!(m!=null&&m.targetduration)){this.handleManifestParsingError(a,s,"invalid target duration",p);return}if(!f)return;m.live&&(f.getCacheAge&&(m.ageHeader=f.getCacheAge()||0),(!f.getCacheAge||isNaN(m.ageHeader))&&(m.ageHeader=0));switch(d){case M.PlaylistContextType.MANIFEST:case M.PlaylistContextType.LEVEL:this.hls.trigger(C.Events.LEVEL_LOADED,{details:m,level:h||0,id:D||0,stats:l,networkDetails:p,deliveryDirectives:c});break;case M.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(C.Events.AUDIO_TRACK_LOADED,{details:m,id:D||0,groupId:v||"",stats:l,networkDetails:p,deliveryDirectives:c});break;case M.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(C.Events.SUBTITLE_TRACK_LOADED,{details:m,id:D||0,groupId:v||"",stats:l,networkDetails:p,deliveryDirectives:c});break}},A}();K.default=w},"./src/polyfills/number.ts":function($,K,O){"use strict";O.r(K),O.d(K,"isFiniteNumber",function(){return B}),O.d(K,"MAX_SAFE_INTEGER",function(){return C});var B=Number.isFinite||function(L){return typeof L=="number"&&isFinite(L)},C=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function($,K,O){"use strict";O.r(K);var B=function(){function C(){}return C.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},C}();K.default=B},"./src/remux/mp4-generator.ts":function($,K,O){"use strict";O.r(K);var B=Math.pow(2,32)-1,C=function(){function L(){}return L.init=function(){L.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 L.types)L.types.hasOwnProperty(_)&&(L.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]),M=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]);L.HDLR_TYPES={video:I,audio:M};var b=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),E=new Uint8Array([0,0,0,0,0,0,0,0]);L.STTS=L.STSC=L.STCO=E,L.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),L.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),L.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),L.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var R=new Uint8Array([105,115,111,109]),w=new Uint8Array([97,118,99,49]),A=new Uint8Array([0,0,0,1]);L.FTYP=L.box(L.types.ftyp,R,A,R,w),L.DINF=L.box(L.types.dinf,L.box(L.types.dref,b))},L.box=function(_){for(var I=8,M=arguments.length,b=new Array(M>1?M-1:0),E=1;E<M;E++)b[E-1]=arguments[E];for(var R=b.length,w=R;R--;)I+=b[R].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),R=0,I=8;R<w;R++)A.set(b[R],I),I+=b[R].byteLength;return A},L.hdlr=function(_){return L.box(L.types.hdlr,L.HDLR_TYPES[_])},L.mdat=function(_){return L.box(L.types.mdat,_)},L.mdhd=function(_,I){I*=_;var M=Math.floor(I/(B+1)),b=Math.floor(I%(B+1));return L.box(L.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,M>>24,M>>16&255,M>>8&255,M&255,b>>24,b>>16&255,b>>8&255,b&255,85,196,0,0]))},L.mdia=function(_){return L.box(L.types.mdia,L.mdhd(_.timescale,_.duration),L.hdlr(_.type),L.minf(_))},L.mfhd=function(_){return L.box(L.types.mfhd,new Uint8Array([0,0,0,0,_>>24,_>>16&255,_>>8&255,_&255]))},L.minf=function(_){return _.type==="audio"?L.box(L.types.minf,L.box(L.types.smhd,L.SMHD),L.DINF,L.stbl(_)):L.box(L.types.minf,L.box(L.types.vmhd,L.VMHD),L.DINF,L.stbl(_))},L.moof=function(_,I,M){return L.box(L.types.moof,L.mfhd(_),L.traf(M,I))},L.moov=function(_){for(var I=_.length,M=[];I--;)M[I]=L.trak(_[I]);return L.box.apply(null,[L.types.moov,L.mvhd(_[0].timescale,_[0].duration)].concat(M).concat(L.mvex(_)))},L.mvex=function(_){for(var I=_.length,M=[];I--;)M[I]=L.trex(_[I]);return L.box.apply(null,[L.types.mvex].concat(M))},L.mvhd=function(_,I){I*=_;var M=Math.floor(I/(B+1)),b=Math.floor(I%(B+1)),E=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,M>>24,M>>16&255,M>>8&255,M&255,b>>24,b>>16&255,b>>8&255,b&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 L.box(L.types.mvhd,E)},L.sdtp=function(_){var I=_.samples||[],M=new Uint8Array(4+I.length),b,E;for(b=0;b<I.length;b++)E=I[b].flags,M[b+4]=E.dependsOn<<4|E.isDependedOn<<2|E.hasRedundancy;return L.box(L.types.sdtp,M)},L.stbl=function(_){return L.box(L.types.stbl,L.stsd(_),L.box(L.types.stts,L.STTS),L.box(L.types.stsc,L.STSC),L.box(L.types.stsz,L.STSZ),L.box(L.types.stco,L.STCO))},L.avc1=function(_){var I=[],M=[],b,E,R;for(b=0;b<_.sps.length;b++)E=_.sps[b],R=E.byteLength,I.push(R>>>8&255),I.push(R&255),I=I.concat(Array.prototype.slice.call(E));for(b=0;b<_.pps.length;b++)E=_.pps[b],R=E.byteLength,M.push(R>>>8&255),M.push(R&255),M=M.concat(Array.prototype.slice.call(E));var w=L.box(L.types.avcC,new Uint8Array([1,I[3],I[4],I[5],252|3,224|_.sps.length].concat(I).concat([_.pps.length]).concat(M))),A=_.width,g=_.height,u=_.pixelRatio[0],a=_.pixelRatio[1];return L.box(L.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,g>>8&255,g&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]),w,L.box(L.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),L.box(L.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,u&255,a>>24,a>>16&255,a>>8&255,a&255])))},L.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]))},L.mp4a=function(_){var I=_.samplerate;return L.box(L.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]),L.box(L.types.esds,L.esds(_)))},L.mp3=function(_){var I=_.samplerate;return L.box(L.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]))},L.stsd=function(_){return _.type==="audio"?!_.isAAC&&_.codec==="mp3"?L.box(L.types.stsd,L.STSD,L.mp3(_)):L.box(L.types.stsd,L.STSD,L.mp4a(_)):L.box(L.types.stsd,L.STSD,L.avc1(_))},L.tkhd=function(_){var I=_.id,M=_.duration*_.timescale,b=_.width,E=_.height,R=Math.floor(M/(B+1)),w=Math.floor(M%(B+1));return L.box(L.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,R>>24,R>>16&255,R>>8&255,R&255,w>>24,w>>16&255,w>>8&255,w&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,b>>8&255,b&255,0,0,E>>8&255,E&255,0,0]))},L.traf=function(_,I){var M=L.sdtp(_),b=_.id,E=Math.floor(I/(B+1)),R=Math.floor(I%(B+1));return L.box(L.types.traf,L.box(L.types.tfhd,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255])),L.box(L.types.tfdt,new Uint8Array([1,0,0,0,E>>24,E>>16&255,E>>8&255,E&255,R>>24,R>>16&255,R>>8&255,R&255])),L.trun(_,M.length+16+20+8+16+8+8),M)},L.trak=function(_){return _.duration=_.duration||4294967295,L.box(L.types.trak,L.tkhd(_),L.mdia(_))},L.trex=function(_){var I=_.id;return L.box(L.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]))},L.trun=function(_,I){var M=_.samples||[],b=M.length,E=12+16*b,R=new Uint8Array(E),w,A,g,u,a,l;for(I+=8+E,R.set([0,0,15,1,b>>>24&255,b>>>16&255,b>>>8&255,b&255,I>>>24&255,I>>>16&255,I>>>8&255,I&255],0),w=0;w<b;w++)A=M[w],g=A.duration,u=A.size,a=A.flags,l=A.cts,R.set([g>>>24&255,g>>>16&255,g>>>8&255,g&255,u>>>24&255,u>>>16&255,u>>>8&255,u&255,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,a.degradPrio&240<<8,a.degradPrio&15,l>>>24&255,l>>>16&255,l>>>8&255,l&255],12+16*w);return L.box(L.types.trun,R)},L.initSegment=function(_){L.types||L.init();var I=L.moov(_),M=new Uint8Array(L.FTYP.byteLength+I.byteLength);return M.set(L.FTYP),M.set(I,L.FTYP.byteLength),M},L}();C.types=void 0,C.HDLR_TYPES=void 0,C.STTS=void 0,C.STSC=void 0,C.STCO=void 0,C.STSZ=void 0,C.VMHD=void 0,C.SMHD=void 0,C.STSD=void 0,C.FTYP=void 0,C.DINF=void 0,K.default=C},"./src/remux/mp4-remuxer.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return l}),O.d(K,"normalizePts",function(){return s});var B=O("./src/polyfills/number.ts"),C=O("./src/remux/aac-helper.ts"),L=O("./src/remux/mp4-generator.ts"),U=O("./src/events.ts"),_=O("./src/errors.ts"),I=O("./src/utils/logger.ts"),M=O("./src/types/loader.ts"),b=O("./src/utils/timescale-conversion.ts");function E(){return E=Object.assign||function(D){for(var v=1;v<arguments.length;v++){var f=arguments[v];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(D[m]=f[m])}return D},E.apply(this,arguments)}var R=10*1e3,w=1024,A=1152,g=null,u=null,a=!1,l=function(){function D(f,m,c,o){if(o===void 0&&(o=""),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=m,this.typeSupported=c,this.ISGenerated=!1,g===null){var x=navigator.userAgent||"",y=x.match(/Chrome\/(\d+)/i);g=y?parseInt(y[1]):0}if(u===null){var S=navigator.userAgent.match(/Safari\/(\d+)/i);u=S?parseInt(S[1]):0}a=!!g&&g<75||!!u&&u<600}var v=D.prototype;return v.destroy=function(){},v.resetTimeStamp=function(m){I.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=m},v.resetNextTimestamp=function(){I.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},v.resetInitSegment=function(){I.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},v.getVideoStartPts=function(m){var c=!1,o=m.reduce(function(x,y){var S=y.pts-x;return S<-4294967296?(c=!0,s(x,y.pts)):S>0?x:y.pts},m[0].pts);return c&&I.logger.debug("PTS rollover detected"),o},v.remux=function(m,c,o,x,y,S,P,F){var H,Y,j,N,Z,ne,pe=y,xe=y,je=m.pid>-1,Le=c.pid>-1,De=c.samples.length,Ce=m.samples.length>0,we=De>1,fe=(!je||Ce)&&(!Le||we)||this.ISGenerated||P;if(fe){this.ISGenerated||(j=this.generateIS(m,c,y));var he=this.isVideoContiguous,_e=-1;if(we&&(_e=p(c.samples),!he&&this.config.forceKeyFrameOnDiscontinuity))if(ne=!0,_e>0){I.logger.warn("[mp4-remuxer]: Dropped "+_e+" out of "+De+" video samples due to a missing keyframe");var at=this.getVideoStartPts(c.samples);c.samples=c.samples.slice(_e),c.dropped+=_e,xe+=(c.samples[0].pts-at)/(c.timescale||9e4)}else _e===-1&&(I.logger.warn("[mp4-remuxer]: No keyframe found out of "+De+" video samples"),ne=!1);if(this.ISGenerated){if(Ce&&we){var et=this.getVideoStartPts(c.samples),it=s(m.samples[0].pts,et)-et,gt=it/c.inputTimeScale;pe+=Math.max(0,gt),xe+=Math.max(0,-gt)}if(Ce){if(m.samplerate||(I.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),j=this.generateIS(m,c,y)),Y=this.remuxAudio(m,pe,this.isAudioContiguous,S,Le||we||F===M.PlaylistLevelType.AUDIO?xe:void 0),we){var He=Y?Y.endPTS-Y.startPTS:0;c.inputTimeScale||(I.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),j=this.generateIS(m,c,y)),H=this.remuxVideo(c,xe,he,He)}}else we&&(H=this.remuxVideo(c,xe,he,0));H&&(H.firstKeyFrame=_e,H.independent=_e!==-1)}}return this.ISGenerated&&(o.samples.length&&(Z=this.remuxID3(o,y)),x.samples.length&&(N=this.remuxText(x,y))),{audio:Y,video:H,initSegment:j,independent:ne,text:N,id3:Z}},v.generateIS=function(m,c,o){var x=m.samples,y=c.samples,S=this.typeSupported,P={},F=!Object(B.isFiniteNumber)(this._initPTS),H="audio/mp4",Y,j,N;if(F&&(Y=j=Infinity),m.config&&x.length&&(m.timescale=m.samplerate,m.isAAC||(S.mpeg?(H="audio/mpeg",m.codec=""):S.mp3&&(m.codec="mp3")),P.audio={id:"audio",container:H,codec:m.codec,initSegment:!m.isAAC&&S.mpeg?new Uint8Array(0):L.default.initSegment([m]),metadata:{channelCount:m.channelCount}},F&&(N=m.inputTimeScale,Y=j=x[0].pts-Math.round(N*o))),c.sps&&c.pps&&y.length&&(c.timescale=c.inputTimeScale,P.video={id:"main",container:"video/mp4",codec:c.codec,initSegment:L.default.initSegment([c]),metadata:{width:c.width,height:c.height}},F)){N=c.inputTimeScale;var Z=this.getVideoStartPts(y),ne=Math.round(N*o);j=Math.min(j,s(y[0].dts,Z)-ne),Y=Math.min(Y,Z-ne)}if(Object.keys(P).length)return this.ISGenerated=!0,F&&(this._initPTS=Y,this._initDTS=j),{tracks:P,initPTS:Y,timescale:N}},v.remuxVideo=function(m,c,o,x){var y=m.inputTimeScale,S=m.samples,P=[],F=S.length,H=this._initPTS,Y=this.nextAvcDts,j=8,N,Z,ne,pe=Number.POSITIVE_INFINITY,xe=Number.NEGATIVE_INFINITY,je=0,Le=!1;if(!o||Y===null){var De=c*y,Ce=S[0].pts-s(S[0].dts,S[0].pts);Y=De-Ce}for(var we=0;we<F;we++){var fe=S[we];if(fe.pts=s(fe.pts-H,Y),fe.dts=s(fe.dts-H,Y),fe.dts>fe.pts){var he=9e4*.2;je=Math.max(Math.min(je,fe.pts-fe.dts),-1*he)}fe.dts<S[we>0?we-1:we].dts&&(Le=!0)}Le&&S.sort(function(Ht,St){var rt=Ht.dts-St.dts,Ft=Ht.pts-St.pts;return rt||Ft}),Z=S[0].dts,ne=S[S.length-1].dts;var _e=Math.round((ne-Z)/(F-1));if(je<0){if(je<_e*-2){I.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(b.toMsFromMpegTsClock)(-_e,!0)+" ms");for(var at=je,et=0;et<F;et++)S[et].dts=at=Math.max(at,S[et].pts-_e),S[et].pts=Math.max(at,S[et].pts)}else{I.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(b.toMsFromMpegTsClock)(je,!0)+" ms to overcome this issue");for(var it=0;it<F;it++)S[it].dts=S[it].dts+je}Z=S[0].dts}if(o){var gt=Z-Y,He=gt>_e,Ne=gt<-1;if(He||Ne){He?I.logger.warn("AVC: "+Object(b.toMsFromMpegTsClock)(gt,!0)+" ms ("+gt+"dts) hole between fragments detected, filling it"):I.logger.warn("AVC: "+Object(b.toMsFromMpegTsClock)(-gt,!0)+" ms ("+gt+"dts) overlapping between fragments detected"),Z=Y;var Ze=S[0].pts-gt;S[0].dts=Z,S[0].pts=Ze,I.logger.log("Video: First PTS/DTS adjusted: "+Object(b.toMsFromMpegTsClock)(Ze,!0)+"/"+Object(b.toMsFromMpegTsClock)(Z,!0)+", delta: "+Object(b.toMsFromMpegTsClock)(gt,!0)+" ms")}}a&&(Z=Math.max(0,Z));for(var ut=0,dt=0,ze=0;ze<F;ze++){for(var Ge=S[ze],yt=Ge.units,vt=yt.length,mt=0,qe=0;qe<vt;qe++)mt+=yt[qe].data.length;dt+=mt,ut+=vt,Ge.length=mt,Ge.dts=Math.max(Ge.dts,Z),Ge.pts=Math.max(Ge.pts,Ge.dts,0),pe=Math.min(Ge.pts,pe),xe=Math.max(Ge.pts,xe)}ne=S[F-1].dts;var lt=dt+4*ut+8,st;try{st=new Uint8Array(lt)}catch(Ht){this.observer.emit(U.Events.ERROR,U.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:lt,reason:"fail allocating video mdat "+lt});return}var Fe=new DataView(st.buffer);Fe.setUint32(0,lt),st.set(L.default.types.mdat,4);for(var Me=0;Me<F;Me++){for(var ot=S[Me],Ke=ot.units,Oe=0,We=0,ve=Ke.length;We<ve;We++){var le=Ke[We],de=le.data,J=le.data.byteLength;Fe.setUint32(j,J),j+=4,st.set(de,j),j+=J,Oe+=4+J}if(Me<F-1)N=S[Me+1].dts-ot.dts;else{var q=this.config,te=ot.dts-S[Me>0?Me-1:Me].dts;if(q.stretchShortVideoTrack&&this.nextAudioPts!==null){var ie=Math.floor(q.maxBufferHole*y),me=(x?pe+x*y:this.nextAudioPts)-ot.pts;me>ie?(N=me-te,N<0&&(N=te),I.logger.log("[mp4-remuxer]: It is approximately "+me/90+" ms to the next segment; using duration "+N/90+" ms for the last video frame.")):N=te}else N=te}var Re=Math.round(ot.pts-ot.dts);P.push(new d(ot.key,N,Oe,Re))}if(P.length&&g&&g<70){var Pe=P[0].flags;Pe.dependsOn=2,Pe.isNonSync=0}console.assert(N!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=Y=ne+N,this.isVideoContiguous=!0;var tt=L.default.moof(m.sequenceNumber++,Z,E({},m,{samples:P})),Et="video",bt={data1:tt,data2:st,startPTS:pe/y,endPTS:(xe+N)/y,startDTS:Z/y,endDTS:Y/y,type:Et,hasAudio:!1,hasVideo:!0,nb:P.length,dropped:m.dropped};return m.samples=[],m.dropped=0,console.assert(st.length,"MDAT length must not be zero"),bt},v.remuxAudio=function(m,c,o,x,y){var S=m.inputTimeScale,P=m.samplerate?m.samplerate:S,F=S/P,H=m.isAAC?w:A,Y=H*F,j=this._initPTS,N=!m.isAAC&&this.typeSupported.mpeg,Z=[],ne=m.samples,pe=N?0:8,xe=this.nextAudioPts||-1,je=c*S;if(this.isAudioContiguous=o=o||ne.length&&xe>0&&(x&&Math.abs(je-xe)<9e3||Math.abs(s(ne[0].pts-j,je)-xe)<20*Y),ne.forEach(function(de){de.pts=s(de.pts-j,je)}),!o||xe<0){if(ne=ne.filter(function(de){return de.pts>=0}),!ne.length)return;y===0?xe=0:x?xe=Math.max(0,je):xe=ne[0].pts}if(m.isAAC)for(var Le=y!==void 0,De=this.config.maxAudioFramesDrift,Ce=0,we=xe;Ce<ne.length;Ce++){var fe=ne[Ce],he=fe.pts,_e=he-we,at=Math.abs(1e3*_e/S);if(_e<=-De*Y&&Le)Ce===0&&(I.logger.warn("Audio frame @ "+(he/S).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*_e/S)+" ms."),this.nextAudioPts=xe=we=he);else if(_e>=De*Y&&at<R&&Le){var et=Math.round(_e/Y);we=he-et*Y,we<0&&(et--,we+=Y),Ce===0&&(this.nextAudioPts=xe=we),I.logger.warn("[mp4-remuxer]: Injecting "+et+" audio frame @ "+(we/S).toFixed(3)+"s due to "+Math.round(1e3*_e/S)+" ms gap.");for(var it=0;it<et;it++){var gt=Math.max(we,0),He=C.default.getSilentFrame(m.manifestCodec||m.codec,m.channelCount);He||(I.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),He=fe.unit.subarray()),ne.splice(Ce,0,{unit:He,pts:gt}),we+=Y,Ce++}}fe.pts=we,we+=Y}for(var Ne=null,Ze=null,ut,dt=0,ze=ne.length;ze--;)dt+=ne[ze].unit.byteLength;for(var Ge=0,yt=ne.length;Ge<yt;Ge++){var vt=ne[Ge],mt=vt.unit,qe=vt.pts;if(Ze!==null){var lt=Z[Ge-1];lt.duration=Math.round((qe-Ze)/F)}else if(o&&m.isAAC&&(qe=xe),Ne=qe,dt>0){dt+=pe;try{ut=new Uint8Array(dt)}catch(de){this.observer.emit(U.Events.ERROR,U.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:dt,reason:"fail allocating audio mdat "+dt});return}if(!N){var st=new DataView(ut.buffer);st.setUint32(0,dt),ut.set(L.default.types.mdat,4)}}else return;ut.set(mt,pe);var Fe=mt.byteLength;pe+=Fe,Z.push(new d(!0,H,Fe,0)),Ze=qe}var Me=Z.length;if(!Me)return;var ot=Z[Z.length-1];this.nextAudioPts=xe=Ze+F*ot.duration;var Ke=N?new Uint8Array(0):L.default.moof(m.sequenceNumber++,Ne/F,E({},m,{samples:Z}));m.samples=[];var Oe=Ne/S,We=xe/S,ve="audio",le={data1:Ke,data2:ut,startPTS:Oe,endPTS:We,startDTS:Oe,endDTS:We,type:ve,hasAudio:!0,hasVideo:!1,nb:Me};return this.isAudioContiguous=!0,console.assert(ut.length,"MDAT length must not be zero"),le},v.remuxEmptyAudio=function(m,c,o,x){var y=m.inputTimeScale,S=m.samplerate?m.samplerate:y,P=y/S,F=this.nextAudioPts,H=(F!==null?F:x.startDTS*y)+this._initDTS,Y=x.endDTS*y+this._initDTS,j=P*w,N=Math.ceil((Y-H)/j),Z=C.default.getSilentFrame(m.manifestCodec||m.codec,m.channelCount);if(I.logger.warn("[mp4-remuxer]: remux empty Audio"),!Z){I.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ne=[],pe=0;pe<N;pe++){var xe=H+pe*j;ne.push({unit:Z,pts:xe,dts:xe})}return m.samples=ne,this.remuxAudio(m,c,o,!1)},v.remuxID3=function(m,c){var o=m.samples.length;if(!o)return;for(var x=m.inputTimeScale,y=this._initPTS,S=this._initDTS,P=0;P<o;P++){var F=m.samples[P];F.pts=s(F.pts-y,c*x)/x,F.dts=s(F.dts-S,c*x)/x}var H=m.samples;return m.samples=[],{samples:H}},v.remuxText=function(m,c){var o=m.samples.length;if(!o)return;for(var x=m.inputTimeScale,y=this._initPTS,S=0;S<o;S++){var P=m.samples[S];P.pts=s(P.pts-y,c*x)/x}m.samples.sort(function(H,Y){return H.pts-Y.pts});var F=m.samples;return m.samples=[],{samples:F}},D}();function s(D,v){var f;if(v===null)return D;for(v<D?f=-8589934592:f=8589934592;Math.abs(D-v)>4294967296;)D+=f;return D}function p(D){for(var v=0;v<D.length;v++)if(D[v].key)return v;return-1}var d=function(v,f,m,c){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=f,this.size=m,this.cts=c,this.flags=new h(v)},h=function(v){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=v?2:1,this.isNonSync=v?0:1}},"./src/remux/passthrough-remuxer.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/polyfills/number.ts"),C=O("./src/utils/mp4-tools.ts"),L=O("./src/loader/fragment.ts"),U=O("./src/utils/logger.ts"),_=function(){function b(){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 E=b.prototype;return E.destroy=function(){},E.resetTimeStamp=function(w){this.initPTS=w,this.lastEndDTS=null},E.resetNextTimestamp=function(){this.lastEndDTS=null},E.resetInitSegment=function(w,A,g){this.audioCodec=A,this.videoCodec=g,this.generateInitSegment(w),this.emitInitSegment=!0},E.generateInitSegment=function(w){var A=this.audioCodec,g=this.videoCodec;if(!w||!w.byteLength){this.initTracks=void 0,this.initData=void 0;return}var u=this.initData=Object(C.parseInitSegment)(w);A||(A=M(u.audio,L.ElementaryStreamTypes.AUDIO)),g||(g=M(u.video,L.ElementaryStreamTypes.VIDEO));var a={};u.audio&&u.video?a.audiovideo={container:"video/mp4",codec:A+","+g,initSegment:w,id:"main"}:u.audio?a.audio={container:"audio/mp4",codec:A,initSegment:w,id:"audio"}:u.video?a.video={container:"video/mp4",codec:g,initSegment:w,id:"main"}:U.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},E.remux=function(w,A,g,u,a){var l=this.initPTS,s=this.lastEndDTS,p={audio:void 0,video:void 0,text:u,id3:g,initSegment:void 0};Object(B.isFiniteNumber)(s)||(s=this.lastEndDTS=a||0);var d=A.samples;if(!d||!d.length)return p;var h={initPTS:void 0,timescale:1},D=this.initData;if((!D||!D.length)&&(this.generateInitSegment(d),D=this.initData),!D||!D.length)return U.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),p;this.emitInitSegment&&(h.tracks=this.initTracks,this.emitInitSegment=!1),Object(B.isFiniteNumber)(l)||(this.initPTS=h.initPTS=l=I(D,d,s));var v=Object(C.getDuration)(d,D),f=s,m=v+f;Object(C.offsetStartDTS)(D,d,l),v>0?this.lastEndDTS=m:(U.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var c=!!D.audio,o=!!D.video,x="";c&&(x+="audio"),o&&(x+="video");var y={data1:d,startPTS:f,startDTS:f,endPTS:m,endDTS:m,type:x,hasAudio:c,hasVideo:o,nb:1,dropped:0};return p.audio=y.type==="audio"?y:void 0,p.video=y.type!=="audio"?y:void 0,p.text=u,p.id3=g,p.initSegment=h,p},b}(),I=function(E,R,w){return Object(C.getStartDTS)(E,R)-w};function M(b,E){var R=b==null?void 0:b.codec;return R&&R.length>4?R:R==="hvc1"?"hvc1.1.c.L120.90":R==="av01"?"av01.0.04M.08":R==="avc1"||E===L.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}K.default=_},"./src/task-loop.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return B});var B=function(){function C(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var L=C.prototype;return L.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},L.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},L.onHandlerDestroyed=function(){},L.hasInterval=function(){return!!this._tickInterval},L.hasNextTick=function(){return!!this._tickTimer},L.setInterval=function(_){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,_),!0)},L.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},L.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},L.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},L.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},L.doTick=function(){},C}()},"./src/types/cmcd.ts":function($,K,O){"use strict";O.r(K),O.d(K,"CMCDVersion",function(){return B}),O.d(K,"CMCDObjectType",function(){return C}),O.d(K,"CMCDStreamingFormat",function(){return L}),O.d(K,"CMCDStreamType",function(){return U});var B=1,C;(function(_){_.MANIFEST="m",_.AUDIO="a",_.VIDEO="v",_.MUXED="av",_.INIT="i",_.CAPTION="c",_.TIMED_TEXT="tt",_.KEY="k",_.OTHER="o"})(C||(C={}));var L;(function(_){_.DASH="d",_.HLS="h",_.SMOOTH="s",_.OTHER="o"})(L||(L={}));var U;(function(_){_.VOD="v",_.LIVE="l"})(U||(U={}))},"./src/types/level.ts":function($,K,O){"use strict";O.r(K),O.d(K,"HlsSkip",function(){return L}),O.d(K,"getSkipValue",function(){return U}),O.d(K,"HlsUrlParameters",function(){return _}),O.d(K,"Level",function(){return I});function B(M,b){for(var E=0;E<b.length;E++){var R=b[E];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(M,R.key,R)}}function C(M,b,E){return b&&B(M.prototype,b),E&&B(M,E),M}var L;(function(M){M.No="",M.Yes="YES",M.v2="v2"})(L||(L={}));function U(M,b){var E=M.canSkipUntil,R=M.canSkipDateRanges,w=M.endSN,A=b!==void 0?b-w:0;return E&&A<E?R?L.v2:L.Yes:L.No}var _=function(){function M(E,R,w){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=E,this.part=R,this.skip=w}var b=M.prototype;return b.addDirectives=function(R){var w=new self.URL(R);return this.msn!==void 0&&w.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&w.searchParams.set("_HLS_part",this.part.toString()),this.skip&&w.searchParams.set("_HLS_skip",this.skip),w.toString()},M}(),I=function(){function M(b){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=[b.url],this.attrs=b.attrs,this.bitrate=b.bitrate,b.details&&(this.details=b.details),this.id=b.id||0,this.name=b.name,this.width=b.width||0,this.height=b.height||0,this.audioCodec=b.audioCodec,this.videoCodec=b.videoCodec,this.unknownCodecs=b.unknownCodecs,this.codecSet=[b.videoCodec,b.audioCodec].filter(function(E){return E}).join(",").replace(/\.[^.,]+/g,"")}return C(M,[{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(E){var R=E%this.url.length;this._urlId!==R&&(this.details=void 0,this._urlId=R)}}]),M}()},"./src/types/loader.ts":function($,K,O){"use strict";O.r(K),O.d(K,"PlaylistContextType",function(){return B}),O.d(K,"PlaylistLevelType",function(){return C});var B;(function(L){L.MANIFEST="manifest",L.LEVEL="level",L.AUDIO_TRACK="audioTrack",L.SUBTITLE_TRACK="subtitleTrack"})(B||(B={}));var C;(function(L){L.MAIN="main",L.AUDIO="audio",L.SUBTITLE="subtitle"})(C||(C={}))},"./src/types/transmuxer.ts":function($,K,O){"use strict";O.r(K),O.d(K,"ChunkMetadata",function(){return B});var B=function(U,_,I,M,b,E){M===void 0&&(M=0),b===void 0&&(b=-1),E===void 0&&(E=!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=C(),this.buffering={audio:C(),video:C(),audiovideo:C()},this.level=U,this.sn=_,this.id=I,this.size=M,this.part=b,this.partial=E};function C(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function($,K,O){"use strict";O.r(K),O.d(K,"AttrList",function(){return L});var B=/^(\d+)x(\d+)$/,C=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,L=function(){function U(I){typeof I=="string"&&(I=U.parseAttrList(I));for(var M in I)I.hasOwnProperty(M)&&(this[M]=I[M])}var _=U.prototype;return _.decimalInteger=function(M){var b=parseInt(this[M],10);return b>Number.MAX_SAFE_INTEGER?Infinity:b},_.hexadecimalInteger=function(M){if(this[M]){var b=(this[M]||"0x").slice(2);b=(b.length&1?"0":"")+b;for(var E=new Uint8Array(b.length/2),R=0;R<b.length/2;R++)E[R]=parseInt(b.slice(R*2,R*2+2),16);return E}else return null},_.hexadecimalIntegerAsNumber=function(M){var b=parseInt(this[M],16);return b>Number.MAX_SAFE_INTEGER?Infinity:b},_.decimalFloatingPoint=function(M){return parseFloat(this[M])},_.optionalFloat=function(M,b){var E=this[M];return E?parseFloat(E):b},_.enumeratedString=function(M){return this[M]},_.bool=function(M){return this[M]==="YES"},_.decimalResolution=function(M){var b=B.exec(this[M]);return b===null?void 0:{width:parseInt(b[1],10),height:parseInt(b[2],10)}},U.parseAttrList=function(M){var b,E={},R='"';for(C.lastIndex=0;(b=C.exec(M))!==null;){var w=b[2];w.indexOf(R)===0&&w.lastIndexOf(R)===w.length-1&&(w=w.slice(1,-1)),E[b[1]]=w}return E},U}()},"./src/utils/binary-search.ts":function($,K,O){"use strict";O.r(K);var B={search:function(L,U){for(var _=0,I=L.length-1,M=null,b=null;_<=I;){M=(_+I)/2|0,b=L[M];var E=U(b);if(E>0)_=M+1;else if(E<0)I=M-1;else return b}return null}};K.default=B},"./src/utils/buffer-helper.ts":function($,K,O){"use strict";O.r(K),O.d(K,"BufferHelper",function(){return L});var B=O("./src/utils/logger.ts"),C={length:0,start:function(){return 0},end:function(){return 0}},L=function(){function U(){}return U.isBuffered=function(I,M){try{if(I){for(var b=U.getBuffered(I),E=0;E<b.length;E++)if(M>=b.start(E)&&M<=b.end(E))return!0}}catch(R){}return!1},U.bufferInfo=function(I,M,b){try{if(I){var E=U.getBuffered(I),R=[],w;for(w=0;w<E.length;w++)R.push({start:E.start(w),end:E.end(w)});return this.bufferedInfo(R,M,b)}}catch(A){}return{len:0,start:M,end:M,nextStart:void 0}},U.bufferedInfo=function(I,M,b){M=Math.max(0,M),I.sort(function(h,D){var v=h.start-D.start;return v||D.end-h.end});var E=[];if(b)for(var R=0;R<I.length;R++){var w=E.length;if(w){var A=E[w-1].end;I[R].start-A<b?I[R].end>A&&(E[w-1].end=I[R].end):E.push(I[R])}else E.push(I[R])}else E=I;for(var g=0,u,a=M,l=M,s=0;s<E.length;s++){var p=E[s].start,d=E[s].end;if(M+b>=p&&M<d)a=p,l=d,g=l-M;else if(M+b<p){u=p;break}}return{len:g,start:a||0,end:l||0,nextStart:u}},U.getBuffered=function(I){try{return I.buffered}catch(M){return B.logger.log("failed to get media.buffered",M),C}},U}()},"./src/utils/cea-608-parser.ts":function($,K,O){"use strict";O.r(K),O.d(K,"Row",function(){return l}),O.d(K,"CaptionScreen",function(){return s});var B=O("./src/utils/logger.ts"),C={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},L=function(m){var c=m;return C.hasOwnProperty(m)&&(c=C[m]),String.fromCharCode(c)},U=15,_=100,I={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},M={17:2,18:4,21:6,22:8,23:10,19:13,20:15},b={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},E={25:2,26:4,29:6,30:8,31:10,27:13,28:15},R=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],w;(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"})(w||(w={}));var A=function(){function f(){this.time=null,this.verboseLevel=w.ERROR}var m=f.prototype;return m.log=function(o,x){this.verboseLevel>=o&&B.logger.log(this.time+" ["+o+"] "+x)},f}(),g=function(m){for(var c=[],o=0;o<m.length;o++)c.push(m[o].toString(16));return c},u=function(){function f(c,o,x,y,S){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=c||"white",this.underline=o||!1,this.italics=x||!1,this.background=y||"black",this.flash=S||!1}var m=f.prototype;return m.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},m.setStyles=function(o){for(var x=["foreground","underline","italics","background","flash"],y=0;y<x.length;y++){var S=x[y];o.hasOwnProperty(S)&&(this[S]=o[S])}},m.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},m.equals=function(o){return this.foreground===o.foreground&&this.underline===o.underline&&this.italics===o.italics&&this.background===o.background&&this.flash===o.flash},m.copy=function(o){this.foreground=o.foreground,this.underline=o.underline,this.italics=o.italics,this.background=o.background,this.flash=o.flash},m.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},f}(),a=function(){function f(c,o,x,y,S,P){this.uchar=void 0,this.penState=void 0,this.uchar=c||" ",this.penState=new u(o,x,y,S,P)}var m=f.prototype;return m.reset=function(){this.uchar=" ",this.penState.reset()},m.setChar=function(o,x){this.uchar=o,this.penState.copy(x)},m.setPenState=function(o){this.penState.copy(o)},m.equals=function(o){return this.uchar===o.uchar&&this.penState.equals(o.penState)},m.copy=function(o){this.uchar=o.uchar,this.penState.copy(o.penState)},m.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},f}(),l=function(){function f(c){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var o=0;o<_;o++)this.chars.push(new a);this.logger=c,this.pos=0,this.currPenState=new u}var m=f.prototype;return m.equals=function(o){for(var x=!0,y=0;y<_;y++)if(!this.chars[y].equals(o.chars[y])){x=!1;break}return x},m.copy=function(o){for(var x=0;x<_;x++)this.chars[x].copy(o.chars[x])},m.isEmpty=function(){for(var o=!0,x=0;x<_;x++)if(!this.chars[x].isEmpty()){o=!1;break}return o},m.setCursor=function(o){this.pos!==o&&(this.pos=o),this.pos<0?(this.logger.log(w.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>_&&(this.logger.log(w.DEBUG,"Too large cursor position "+this.pos),this.pos=_)},m.moveCursor=function(o){var x=this.pos+o;if(o>1)for(var y=this.pos+1;y<x+1;y++)this.chars[y].setPenState(this.currPenState);this.setCursor(x)},m.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},m.insertChar=function(o){o>=144&&this.backSpace();var x=L(o);if(this.pos>=_){this.logger.log(w.ERROR,"Cannot insert "+o.toString(16)+" ("+x+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(x,this.currPenState),this.moveCursor(1)},m.clearFromPos=function(o){var x;for(x=o;x<_;x++)this.chars[x].reset()},m.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},m.clearToEndOfRow=function(){this.clearFromPos(this.pos)},m.getTextString=function(){for(var o=[],x=!0,y=0;y<_;y++){var S=this.chars[y].uchar;S!==" "&&(x=!1),o.push(S)}return x?"":o.join("")},m.setPenStyles=function(o){this.currPenState.setStyles(o);var x=this.chars[this.pos];x.setPenState(this.currPenState)},f}(),s=function(){function f(c){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var o=0;o<U;o++)this.rows.push(new l(c));this.logger=c,this.currRow=U-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var m=f.prototype;return m.reset=function(){for(var o=0;o<U;o++)this.rows[o].clear();this.currRow=U-1},m.equals=function(o){for(var x=!0,y=0;y<U;y++)if(!this.rows[y].equals(o.rows[y])){x=!1;break}return x},m.copy=function(o){for(var x=0;x<U;x++)this.rows[x].copy(o.rows[x])},m.isEmpty=function(){for(var o=!0,x=0;x<U;x++)if(!this.rows[x].isEmpty()){o=!1;break}return o},m.backSpace=function(){var o=this.rows[this.currRow];o.backSpace()},m.clearToEndOfRow=function(){var o=this.rows[this.currRow];o.clearToEndOfRow()},m.insertChar=function(o){var x=this.rows[this.currRow];x.insertChar(o)},m.setPen=function(o){var x=this.rows[this.currRow];x.setPenStyles(o)},m.moveCursor=function(o){var x=this.rows[this.currRow];x.moveCursor(o)},m.setCursor=function(o){this.logger.log(w.INFO,"setCursor: "+o);var x=this.rows[this.currRow];x.setCursor(o)},m.setPAC=function(o){this.logger.log(w.INFO,"pacData = "+JSON.stringify(o));var x=o.row-1;if(this.nrRollUpRows&&x<this.nrRollUpRows-1&&(x=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==x){for(var y=0;y<U;y++)this.rows[y].clear();var S=this.currRow+1-this.nrRollUpRows,P=this.lastOutputScreen;if(P){var F=P.rows[S].cueStartTime,H=this.logger.time;if(F&&H!==null&&F<H)for(var Y=0;Y<this.nrRollUpRows;Y++)this.rows[x-this.nrRollUpRows+Y+1].copy(P.rows[S+Y])}}this.currRow=x;var j=this.rows[this.currRow];if(o.indent!==null){var N=o.indent,Z=Math.max(N-1,0);j.setCursor(o.indent),o.color=j.chars[Z].penState.foreground}var ne={foreground:o.color,underline:o.underline,italics:o.italics,background:"black",flash:!1};this.setPen(ne)},m.setBkgData=function(o){this.logger.log(w.INFO,"bkgData = "+JSON.stringify(o)),this.backSpace(),this.setPen(o),this.insertChar(32)},m.setRollUpRows=function(o){this.nrRollUpRows=o},m.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(w.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(w.TEXT,this.getDisplayText());var o=this.currRow+1-this.nrRollUpRows,x=this.rows.splice(o,1)[0];x.clear(),this.rows.splice(this.currRow,0,x),this.logger.log(w.INFO,"Rolling up")},m.getDisplayText=function(o){o=o||!1;for(var x=[],y="",S=-1,P=0;P<U;P++){var F=this.rows[P].getTextString();F&&(S=P+1,o?x.push("Row "+S+": '"+F+"'"):x.push(F.trim()))}return x.length>0&&(o?y="["+x.join(" | ")+"]":y=x.join(`
|
|
`)),y},m.getTextAndFormat=function(){return this.rows},f}(),p=function(){function f(c,o,x){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=c,this.outputFilter=o,this.mode=null,this.verbose=0,this.displayedMemory=new s(x),this.nonDisplayedMemory=new s(x),this.lastOutputScreen=new s(x),this.currRollUpRow=this.displayedMemory.rows[U-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=x}var m=f.prototype;return m.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},m.getHandler=function(){return this.outputFilter},m.setHandler=function(o){this.outputFilter=o},m.setPAC=function(o){this.writeScreen.setPAC(o)},m.setBkgData=function(o){this.writeScreen.setBkgData(o)},m.setMode=function(o){if(o===this.mode)return;this.mode=o,this.logger.log(w.INFO,"MODE="+o),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=o},m.insertChars=function(o){for(var x=0;x<o.length;x++)this.writeScreen.insertChar(o[x]);var y=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(w.INFO,y+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(w.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},m.ccRCL=function(){this.logger.log(w.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},m.ccBS=function(){if(this.logger.log(w.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},m.ccAOF=function(){},m.ccAON=function(){},m.ccDER=function(){this.logger.log(w.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},m.ccRU=function(o){this.logger.log(w.INFO,"RU("+o+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(o)},m.ccFON=function(){this.logger.log(w.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},m.ccRDC=function(){this.logger.log(w.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},m.ccTR=function(){this.logger.log(w.INFO,"TR"),this.setMode("MODE_TEXT")},m.ccRTD=function(){this.logger.log(w.INFO,"RTD"),this.setMode("MODE_TEXT")},m.ccEDM=function(){this.logger.log(w.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},m.ccCR=function(){this.logger.log(w.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},m.ccENM=function(){this.logger.log(w.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},m.ccEOC=function(){if(this.logger.log(w.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var o=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=o,this.writeScreen=this.nonDisplayedMemory,this.logger.log(w.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},m.ccTO=function(o){this.logger.log(w.INFO,"TO("+o+") - Tab Offset"),this.writeScreen.moveCursor(o)},m.ccMIDROW=function(o){var x={flash:!1};if(x.underline=o%2===1,x.italics=o>=46,x.italics)x.foreground="white";else{var y=Math.floor(o/2)-16,S=["white","green","blue","cyan","red","yellow","magenta"];x.foreground=S[y]}this.logger.log(w.INFO,"MIDROW: "+JSON.stringify(x)),this.writeScreen.setPen(x)},m.outputDataUpdate=function(o){o===void 0&&(o=!1);var x=this.logger.time;if(x===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=x:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,x,this.lastOutputScreen),o&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:x),this.lastOutputScreen.copy(this.displayedMemory))},m.cueSplitAtTime=function(o){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,o,this.displayedMemory),this.cueStartTime=o))},f}(),d=function(){function f(c,o,x){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var y=new A;this.channels=[null,new p(c,o,y),new p(c+1,x,y)],this.cmdHistory=v(),this.logger=y}var m=f.prototype;return m.getHandler=function(o){return this.channels[o].getHandler()},m.setHandler=function(o,x){this.channels[o].setHandler(x)},m.addData=function(o,x){var y,S,P,F=!1;this.logger.time=o;for(var H=0;H<x.length;H+=2){if(S=x[H]&127,P=x[H+1]&127,S===0&&P===0)continue;if(this.logger.log(w.DATA,"["+g([x[H],x[H+1]])+"] -> ("+g([S,P])+")"),y=this.parseCmd(S,P),y||(y=this.parseMidrow(S,P)),y||(y=this.parsePAC(S,P)),y||(y=this.parseBackgroundAttributes(S,P)),!y&&(F=this.parseChars(S,P),F)){var Y=this.currentChannel;if(Y&&Y>0){var j=this.channels[Y];j.insertChars(F)}else this.logger.log(w.WARNING,"No channel found yet. TEXT-MODE?")}!y&&!F&&this.logger.log(w.WARNING,"Couldn't parse cleaned data "+g([S,P])+" orig: "+g([x[H],x[H+1]]))}},m.parseCmd=function(o,x){var y=this.cmdHistory,S=(o===20||o===28||o===21||o===29)&&x>=32&&x<=47,P=(o===23||o===31)&&x>=33&&x<=35;if(!(S||P))return!1;if(D(o,x,y))return h(null,null,y),this.logger.log(w.DEBUG,"Repeated command ("+g([o,x])+") is dropped"),!0;var F=o===20||o===21||o===23?1:2,H=this.channels[F];return o===20||o===21||o===28||o===29?x===32?H.ccRCL():x===33?H.ccBS():x===34?H.ccAOF():x===35?H.ccAON():x===36?H.ccDER():x===37?H.ccRU(2):x===38?H.ccRU(3):x===39?H.ccRU(4):x===40?H.ccFON():x===41?H.ccRDC():x===42?H.ccTR():x===43?H.ccRTD():x===44?H.ccEDM():x===45?H.ccCR():x===46?H.ccENM():x===47&&H.ccEOC():H.ccTO(x-32),h(o,x,y),this.currentChannel=F,!0},m.parseMidrow=function(o,x){var y=0;if((o===17||o===25)&&x>=32&&x<=47){if(o===17?y=1:y=2,y!==this.currentChannel)return this.logger.log(w.ERROR,"Mismatch channel in midrow parsing"),!1;var S=this.channels[y];return S?(S.ccMIDROW(x),this.logger.log(w.DEBUG,"MIDROW ("+g([o,x])+")"),!0):!1}return!1},m.parsePAC=function(o,x){var y,S=this.cmdHistory,P=(o>=17&&o<=23||o>=25&&o<=31)&&x>=64&&x<=127,F=(o===16||o===24)&&x>=64&&x<=95;if(!(P||F))return!1;if(D(o,x,S))return h(null,null,S),!0;var H=o<=23?1:2;x>=64&&x<=95?y=H===1?I[o]:b[o]:y=H===1?M[o]:E[o];var Y=this.channels[H];return Y?(Y.setPAC(this.interpretPAC(y,x)),h(o,x,S),this.currentChannel=H,!0):!1},m.interpretPAC=function(o,x){var y,S={color:null,italics:!1,indent:null,underline:!1,row:o};return x>95?y=x-96:y=x-64,S.underline=(y&1)===1,y<=13?S.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(y/2)]:y<=15?(S.italics=!0,S.color="white"):S.indent=Math.floor((y-16)/2)*4,S},m.parseChars=function(o,x){var y,S=null,P=null;if(o>=25?(y=2,P=o-8):(y=1,P=o),P>=17&&P<=19){var F;P===17?F=x+80:P===18?F=x+112:F=x+144,this.logger.log(w.INFO,"Special char '"+L(F)+"' in channel "+y),S=[F]}else o>=32&&o<=127&&(S=x===0?[o]:[o,x]);if(S){var H=g(S);this.logger.log(w.DEBUG,"Char codes = "+H.join(",")),h(o,x,this.cmdHistory)}return S},m.parseBackgroundAttributes=function(o,x){var y=(o===16||o===24)&&x>=32&&x<=47,S=(o===23||o===31)&&x>=45&&x<=47;if(!(y||S))return!1;var P,F={};o===16||o===24?(P=Math.floor((x-32)/2),F.background=R[P],x%2===1&&(F.background=F.background+"_semi")):x===45?F.background="transparent":(F.foreground="black",x===47&&(F.underline=!0));var H=o<=23?1:2,Y=this.channels[H];return Y.setBkgData(F),h(o,x,this.cmdHistory),!0},m.reset=function(){for(var o=0;o<Object.keys(this.channels).length;o++){var x=this.channels[o];x&&x.reset()}this.cmdHistory=v()},m.cueSplitAtTime=function(o){for(var x=0;x<this.channels.length;x++){var y=this.channels[x];y&&y.cueSplitAtTime(o)}},f}();function h(f,m,c){c.a=f,c.b=m}function D(f,m,c){return c.a===f&&c.b===m}function v(){return{a:null,b:null}}K.default=d},"./src/utils/codecs.ts":function($,K,O){"use strict";O.r(K),O.d(K,"isCodecType",function(){return C}),O.d(K,"isCodecSupportedInMp4",function(){return L});var B={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 C(U,_){var I=B[_];return!!I&&I[U.slice(0,4)]===!0}function L(U,_){return MediaSource.isTypeSupported((_||"video")+'/mp4;codecs="'+U+'"')}},"./src/utils/cues.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/utils/vttparser.ts"),C=O("./src/utils/webvtt-parser.ts"),L=O("./src/utils/texttrack-utils.ts"),U=/\s/,_={newCue:function(M,b,E,R){for(var w=[],A,g,u,a,l,s=self.VTTCue||self.TextTrackCue,p=0;p<R.rows.length;p++)if(A=R.rows[p],u=!0,a=0,l="",!A.isEmpty()){for(var d=0;d<A.chars.length;d++)U.test(A.chars[d].uchar)&&u?a++:(l+=A.chars[d].uchar,u=!1);A.cueStartTime=b,b===E&&(E+=1e-4),a>=16?a--:a++;var h=Object(B.fixLineBreaks)(l.trim()),D=Object(C.generateCueId)(b,E,h);(!M||!M.cues||!M.cues.getCueById(D))&&(g=new s(b,E,h),g.id=D,g.line=p+1,g.align="left",g.position=10+Math.min(80,Math.floor(a*8/32)*10),w.push(g))}return M&&w.length&&(w.sort(function(v,f){return v.line==="auto"||f.line==="auto"?0:v.line>8&&f.line>8?f.line-v.line:v.line-f.line}),w.forEach(function(v){return Object(L.addCueToTrack)(M,v)})),w}};K.default=_},"./src/utils/discontinuities.ts":function($,K,O){"use strict";O.r(K),O.d(K,"findFirstFragWithCC",function(){return U}),O.d(K,"shouldAlignOnDiscontinuities",function(){return _}),O.d(K,"findDiscontinuousReferenceFrag",function(){return I}),O.d(K,"adjustSlidingStart",function(){return b}),O.d(K,"alignStream",function(){return E}),O.d(K,"alignPDT",function(){return w}),O.d(K,"alignFragmentByPDTDelta",function(){return A}),O.d(K,"alignMediaPlaylistByPDT",function(){return g});var B=O("./src/polyfills/number.ts"),C=O("./src/utils/logger.ts"),L=O("./src/controller/level-helper.ts");function U(u,a){for(var l=null,s=0,p=u.length;s<p;s++){var d=u[s];if(d&&d.cc===a){l=d;break}}return l}function _(u,a,l){return!!(a.details&&(l.endCC>l.startCC||u&&u.cc<l.startCC))}function I(u,a){var l=u.fragments,s=a.fragments;if(!s.length||!l.length){C.logger.log("No fragments to align");return}var p=U(l,s[0].cc);if(!p||p&&!p.startPTS){C.logger.log("No frag in previous level to align on");return}return p}function M(u,a){if(u){var l=u.start+a;u.start=u.startPTS=l,u.endPTS=l+u.duration}}function b(u,a){for(var l=a.fragments,s=0,p=l.length;s<p;s++)M(l[s],u);a.fragmentHint&&M(a.fragmentHint,u),a.alignedSliding=!0}function E(u,a,l){if(!a)return;R(u,l,a),!l.alignedSliding&&a.details&&w(l,a.details),!l.alignedSliding&&a.details&&!l.skippedSegments&&Object(L.adjustSliding)(a.details,l)}function R(u,a,l){if(_(u,l,a)){var s=I(l.details,a);s&&Object(B.isFiniteNumber)(s.start)&&(C.logger.log("Adjusting PTS using last level due to CC increase within current level "+a.url),b(s.start,a))}}function w(u,a){if(!a.fragments.length||!u.hasProgramDateTime||!a.hasProgramDateTime)return;var l=a.fragments[0].programDateTime,s=u.fragments[0].programDateTime,p=(s-l)/1e3+a.fragments[0].start;p&&Object(B.isFiniteNumber)(p)&&(C.logger.log("Adjusting PTS using programDateTime delta "+(s-l)+"ms, sliding:"+p.toFixed(3)+" "+u.url+" "),b(p,u))}function A(u,a){var l=u.programDateTime;if(!l)return;var s=(l-a)/1e3;u.start=u.startPTS=s,u.endPTS=s+u.duration}function g(u,a){if(!a.fragments.length||!u.hasProgramDateTime||!a.hasProgramDateTime)return;var l=a.fragments[0].programDateTime,s=a.fragments[0].start,p=l-s*1e3;u.fragments.forEach(function(d){A(d,p)}),u.fragmentHint&&A(u.fragmentHint,p),u.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/utils/ewma.ts"),C=function(){function L(_,I,M){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=M,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new B.default(_),this.fast_=new B.default(I)}var U=L.prototype;return U.update=function(I,M){var b=this.slow_,E=this.fast_;this.slow_.halfLife!==I&&(this.slow_=new B.default(I,b.getEstimate(),b.getTotalWeight())),this.fast_.halfLife!==M&&(this.fast_=new B.default(M,E.getEstimate(),E.getTotalWeight()))},U.sample=function(I,M){I=Math.max(I,this.minDelayMs_);var b=8*M,E=I/1e3,R=b/E;this.fast_.sample(E,R),this.slow_.sample(E,R)},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(){},L}();K.default=C},"./src/utils/ewma.ts":function($,K,O){"use strict";O.r(K);var B=function(){function C(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 L=C.prototype;return L.sample=function(_,I){var M=Math.pow(this.alpha_,_);this.estimate_=I*(1-M)+M*this.estimate_,this.totalWeight_+=_},L.getTotalWeight=function(){return this.totalWeight_},L.getEstimate=function(){if(this.alpha_){var _=1-Math.pow(this.alpha_,this.totalWeight_);if(_)return this.estimate_/_}return this.estimate_},C}();K.default=B},"./src/utils/fetch-loader.ts":function($,K,O){"use strict";O.r(K),O.d(K,"fetchSupported",function(){return A});var B=O("./src/polyfills/number.ts"),C=O("./src/loader/load-stats.ts"),L=O("./src/demux/chunk-cache.ts");function U(s,p){s.prototype=Object.create(p.prototype),s.prototype.constructor=s,E(s,p)}function _(s){var p=typeof Map=="function"?new Map:void 0;return _=function(h){if(h===null||!b(h))return h;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(typeof p!="undefined"){if(p.has(h))return p.get(h);p.set(h,D)}function D(){return I(h,arguments,R(this).constructor)}return D.prototype=Object.create(h.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),E(D,h)},_(s)}function I(s,p,d){return M()?I=Reflect.construct:I=function(D,v,f){var m=[null];m.push.apply(m,v);var c=Function.bind.apply(D,m),o=new c;return f&&E(o,f.prototype),o},I.apply(null,arguments)}function M(){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(s){return!1}}function b(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function E(s,p){return E=Object.setPrototypeOf||function(h,D){return h.__proto__=D,h},E(s,p)}function R(s){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)},R(s)}function w(){return w=Object.assign||function(s){for(var p=1;p<arguments.length;p++){var d=arguments[p];for(var h in d)Object.prototype.hasOwnProperty.call(d,h)&&(s[h]=d[h])}return s},w.apply(this,arguments)}function A(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(s){}return!1}var g=function(){function s(d){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=d.fetchSetup||a,this.controller=new self.AbortController,this.stats=new C.LoadStats}var p=s.prototype;return p.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},p.abortInternal=function(){var h=this.response;(!h||!h.ok)&&(this.stats.aborted=!0,this.controller.abort())},p.abort=function(){var h;this.abortInternal(),(h=this.callbacks)!==null&&h!==void 0&&h.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},p.load=function(h,D,v){var f=this,m=this.stats;if(m.loading.start)throw new Error("Loader can only be used once.");m.loading.start=self.performance.now();var c=u(h,this.controller.signal),o=v.onProgress,x=h.responseType==="arraybuffer",y=x?"byteLength":"length";this.context=h,this.config=D,this.callbacks=v,this.request=this.fetchSetup(h,c),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){f.abortInternal(),v.onTimeout(m,h,f.response)},D.timeout),self.fetch(this.request).then(function(S){if(f.response=f.loader=S,!S.ok){var P=S.status,F=S.statusText;throw new l(F||"fetch, bad network response",P,S)}return m.loading.first=Math.max(self.performance.now(),m.loading.start),m.total=parseInt(S.headers.get("Content-Length")||"0"),o&&Object(B.isFiniteNumber)(D.highWaterMark)?f.loadProgressively(S,m,h,D.highWaterMark,o):x?S.arrayBuffer():S.text()}).then(function(S){var P=f.response;self.clearTimeout(f.requestTimeout),m.loading.end=Math.max(self.performance.now(),m.loading.first),m.loaded=m.total=S[y];var F={url:P.url,data:S};o&&!Object(B.isFiniteNumber)(D.highWaterMark)&&o(m,h,S,P),v.onSuccess(F,m,h,P)}).catch(function(S){if(self.clearTimeout(f.requestTimeout),m.aborted)return;var P=S.code||0;v.onError({code:P,text:S.message},h,S.details)})},p.getCacheAge=function(){var h=null;if(this.response){var D=this.response.headers.get("age");h=D?parseFloat(D):null}return h},p.loadProgressively=function(h,D,v,f,m){f===void 0&&(f=0);var c=new L.default,o=h.body.getReader(),x=function y(){return o.read().then(function(S){if(S.done)return c.dataLength&&m(D,v,c.flush(),h),Promise.resolve(new ArrayBuffer(0));var P=S.value,F=P.length;return D.loaded+=F,F<f||c.dataLength?(c.push(P),c.dataLength>=f&&m(D,v,c.flush(),h)):m(D,v,P,h),y()}).catch(function(){return Promise.reject()})};return x()},s}();function u(s,p){var d={method:"GET",mode:"cors",credentials:"same-origin",signal:p,headers:new self.Headers(w({},s.headers))};return s.rangeEnd&&d.headers.set("Range","bytes="+s.rangeStart+"-"+String(s.rangeEnd-1)),d}function a(s,p){return new self.Request(s.url,p)}var l=function(s){U(p,s);function p(d,h,D){var v;return v=s.call(this,d)||this,v.code=void 0,v.details=void 0,v.code=h,v.details=D,v}return p}(_(Error));K.default=g},"./src/utils/imsc1-ttml-parser.ts":function($,K,O){"use strict";O.r(K),O.d(K,"IMSC1_CODEC",function(){return b}),O.d(K,"parseIMSC1",function(){return A});var B=O("./src/utils/mp4-tools.ts"),C=O("./src/utils/vttparser.ts"),L=O("./src/utils/vttcue.ts"),U=O("./src/demux/id3.ts"),_=O("./src/utils/timescale-conversion.ts"),I=O("./src/utils/webvtt-parser.ts");function M(){return M=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var c=arguments[m];for(var o in c)Object.prototype.hasOwnProperty.call(c,o)&&(f[o]=c[o])}return f},M.apply(this,arguments)}var b="stpp.ttml.im1t",E=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,R=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,w={left:"start",center:"center",right:"end",start:"start",end:"end"};function A(f,m,c,o,x){var y=Object(B.findBox)(new Uint8Array(f),["mdat"]);if(y.length===0){x(new Error("Could not parse IMSC1 mdat"));return}var S=y[0],P=Object(U.utf8ArrayToStr)(new Uint8Array(f,S.start,S.end-S.start)),F=Object(_.toTimescaleFromScale)(m,1,c);try{o(g(P,F))}catch(H){x(H)}}function g(f,m){var c=new DOMParser,o=c.parseFromString(f,"text/xml"),x=o.getElementsByTagName("tt")[0];if(!x)throw new Error("Invalid ttml");var y={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},S=Object.keys(y).reduce(function(j,N){return j[N]=x.getAttribute("ttp:"+N)||y[N],j},{}),P=x.getAttribute("xml:space")!=="preserve",F=a(u(x,"styling","style")),H=a(u(x,"layout","region")),Y=u(x,"body","[begin]");return[].map.call(Y,function(j){var N=l(j,P);if(!N||!j.hasAttribute("begin"))return null;var Z=h(j.getAttribute("begin"),S),ne=h(j.getAttribute("dur"),S),pe=h(j.getAttribute("end"),S);if(Z===null)throw d(j);if(pe===null){if(ne===null)throw d(j);pe=Z+ne}var xe=new L.default(Z-m,pe-m,N);xe.id=Object(I.generateCueId)(xe.startTime,xe.endTime,xe.text);var je=H[j.getAttribute("region")],Le=F[j.getAttribute("style")];xe.position=10,xe.size=80;var De=s(je,Le),Ce=De.textAlign;if(Ce){var we=w[Ce];we&&(xe.lineAlign=we),xe.align=Ce}return M(xe,De),xe}).filter(function(j){return j!==null})}function u(f,m,c){var o=f.getElementsByTagName(m)[0];return o?[].slice.call(o.querySelectorAll(c)):[]}function a(f){return f.reduce(function(m,c){var o=c.getAttribute("xml:id");return o&&(m[o]=c),m},{})}function l(f,m){return[].slice.call(f.childNodes).reduce(function(c,o,x){var y;return o.nodeName==="br"&&x?c+`
|
|
`:(y=o.childNodes)!==null&&y!==void 0&&y.length?l(o,m):m?c+o.textContent.trim().replace(/\s+/g," "):c+o.textContent},"")}function s(f,m){var c="http://www.w3.org/ns/ttml#styling",o=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return o.reduce(function(x,y){var S=p(m,c,y)||p(f,c,y);return S&&(x[y]=S),x},{})}function p(f,m,c){return f.hasAttributeNS(m,c)?f.getAttributeNS(m,c):null}function d(f){return new Error("Could not parse ttml timestamp "+f)}function h(f,m){if(!f)return null;var c=Object(C.parseTimeStamp)(f);return c===null&&(E.test(f)?c=D(f,m):R.test(f)&&(c=v(f,m))),c}function D(f,m){var c=E.exec(f),o=(c[4]|0)+(c[5]|0)/m.subFrameRate;return(c[1]|0)*3600+(c[2]|0)*60+(c[3]|0)+o/m.frameRate}function v(f,m){var c=R.exec(f),o=Number(c[1]),x=c[2];switch(x){case"h":return o*3600;case"m":return o*60;case"ms":return o*1e3;case"f":return o/m.frameRate;case"t":return o/m.tickRate}return o}},"./src/utils/logger.ts":function($,K,O){"use strict";O.r(K),O.d(K,"enableLogs",function(){return I}),O.d(K,"logger",function(){return M});var B=function(){},C={trace:B,debug:B,log:B,warn:B,info:B,error:B},L=C;function U(b){var E=self.console[b];return E?E.bind(self.console,"["+b+"] >"):B}function _(b){for(var E=arguments.length,R=new Array(E>1?E-1:0),w=1;w<E;w++)R[w-1]=arguments[w];R.forEach(function(A){L[A]=b[A]?b[A].bind(b):U(A)})}function I(b){if(self.console&&b===!0||typeof b=="object"){_(b,"debug","log","info","warn","error");try{L.log()}catch(E){L=C}}else L=C}var M=L},"./src/utils/mediakeys-helper.ts":function($,K,O){"use strict";O.r(K),O.d(K,"KeySystems",function(){return B}),O.d(K,"requestMediaKeySystemAccess",function(){return C});var B;(function(L){L.WIDEVINE="com.widevine.alpha",L.PLAYREADY="com.microsoft.playready"})(B||(B={}));var C=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function($,K,O){"use strict";O.r(K),O.d(K,"getMediaSource",function(){return B});function B(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function($,K,O){"use strict";O.r(K),O.d(K,"bin2str",function(){return _}),O.d(K,"readUint16",function(){return I}),O.d(K,"readUint32",function(){return M}),O.d(K,"writeUint32",function(){return b}),O.d(K,"findBox",function(){return E}),O.d(K,"parseSegmentIndex",function(){return R}),O.d(K,"parseInitSegment",function(){return w}),O.d(K,"getStartDTS",function(){return A}),O.d(K,"getDuration",function(){return g}),O.d(K,"computeRawDurationFromSamples",function(){return u}),O.d(K,"offsetStartDTS",function(){return a}),O.d(K,"segmentValidRange",function(){return l}),O.d(K,"appendUint8Array",function(){return s});var B=O("./src/utils/typed-array.ts"),C=O("./src/loader/fragment.ts"),L=Math.pow(2,32)-1,U=[].push;function _(p){return String.fromCharCode.apply(null,p)}function I(p,d){"data"in p&&(d+=p.start,p=p.data);var h=p[d]<<8|p[d+1];return h<0?65536+h:h}function M(p,d){"data"in p&&(d+=p.start,p=p.data);var h=p[d]<<24|p[d+1]<<16|p[d+2]<<8|p[d+3];return h<0?4294967296+h:h}function b(p,d,h){"data"in p&&(d+=p.start,p=p.data),p[d]=h>>24,p[d+1]=h>>16&255,p[d+2]=h>>8&255,p[d+3]=h&255}function E(p,d){var h=[];if(!d.length)return h;var D,v,f;"data"in p?(D=p.data,v=p.start,f=p.end):(D=p,v=0,f=D.byteLength);for(var m=v;m<f;){var c=M(D,m),o=_(D.subarray(m+4,m+8)),x=c>1?m+c:f;if(o===d[0])if(d.length===1)h.push({data:D,start:m+8,end:x});else{var y=E({data:D,start:m+8,end:x},d.slice(1));y.length&&U.apply(h,y)}m=x}return h}function R(p){var d=E(p,["moov"]),h=d[0],D=h?h.end:null,v=E(p,["sidx"]);if(!v||!v[0])return null;var f=[],m=v[0],c=m.data[0],o=c===0?8:16,x=M(m,o);o+=4;var y=0,S=0;c===0?o+=8:o+=16,o+=2;var P=m.end+S,F=I(m,o);o+=2;for(var H=0;H<F;H++){var Y=o,j=M(m,Y);Y+=4;var N=j&2147483647,Z=(j&2147483648)>>>31;if(Z===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ne=M(m,Y);Y+=4,f.push({referenceSize:N,subsegmentDuration:ne,info:{duration:ne/x,start:P,end:P+N-1}}),P+=N,Y+=4,o=Y}return{earliestPresentationTime:y,timescale:x,version:c,referencesCount:F,references:f,moovEndOffset:D}}function w(p){for(var d=[],h=E(p,["moov","trak"]),D=0;D<h.length;D++){var v=h[D],f=E(v,["tkhd"])[0];if(f){var m=f.data[f.start],c=m===0?12:20,o=M(f,c),x=E(v,["mdia","mdhd"])[0];if(x){m=x.data[x.start],c=m===0?12:20;var y=M(x,c),S=E(v,["mdia","hdlr"])[0];if(S){var P=_(S.data.subarray(S.start+8,S.start+12)),F={soun:C.ElementaryStreamTypes.AUDIO,vide:C.ElementaryStreamTypes.VIDEO}[P];if(F){var H=E(v,["mdia","minf","stbl","stsd"])[0],Y=void 0;H&&(Y=_(H.data.subarray(H.start+12,H.start+16))),d[o]={timescale:y,type:F},d[F]={timescale:y,id:o,codec:Y}}}}}}var j=E(p,["moov","mvex","trex"]);return j.forEach(function(N){var Z=M(N,4),ne=d[Z];ne&&(ne.default={duration:M(N,12),flags:M(N,20)})}),d}function A(p,d){return E(d,["moof","traf"]).reduce(function(h,D){var v=E(D,["tfdt"])[0],f=v.data[v.start],m=E(D,["tfhd"]).reduce(function(c,o){var x=M(o,4),y=p[x];if(y){var S=M(v,4);f===1&&(S*=Math.pow(2,32),S+=M(v,8));var P=y.timescale||9e4,F=S/P;if(isFinite(F)&&(c===null||F<c))return F}return c},null);return m!==null&&isFinite(m)&&(h===null||m<h)?m:h},null)||0}function g(p,d){for(var h=0,D=0,v=0,f=E(p,["moof","traf"]),m=0;m<f.length;m++){var c=f[m],o=E(c,["tfhd"])[0],x=M(o,4),y=d[x];if(!y)continue;var S=y.default,P=M(o,0)|(S==null?void 0:S.flags),F=S==null?void 0:S.duration;P&8&&(P&2?F=M(o,12):F=M(o,8));for(var H=y.timescale||9e4,Y=E(c,["trun"]),j=0;j<Y.length;j++){if(F){var N=M(Y[j],4);h=F*N}else h=u(Y[j]);y.type===C.ElementaryStreamTypes.VIDEO?D+=h/H:y.type===C.ElementaryStreamTypes.AUDIO&&(v+=h/H)}}if(D===0&&v===0){var Z=R(p);if(Z!=null&&Z.references)return Z.references.reduce(function(ne,pe){return ne+pe.info.duration||0},0)}return D||v}function u(p){var d=M(p,0),h=8;d&1&&(h+=4),d&4&&(h+=4);for(var D=0,v=M(p,4),f=0;f<v;f++){if(d&256){var m=M(p,h);D+=m,h+=4}d&512&&(h+=4),d&1024&&(h+=4),d&2048&&(h+=4)}return D}function a(p,d,h){E(d,["moof","traf"]).forEach(function(D){E(D,["tfhd"]).forEach(function(v){var f=M(v,4),m=p[f];if(!m)return;var c=m.timescale||9e4;E(D,["tfdt"]).forEach(function(o){var x=o.data[o.start],y=M(o,4);if(x===0)b(o,4,y-h*c);else{y*=Math.pow(2,32),y+=M(o,8),y-=h*c,y=Math.max(y,0);var S=Math.floor(y/(L+1)),P=Math.floor(y%(L+1));b(o,4,S),b(o,8,P)}})})})}function l(p){var d={valid:null,remainder:null},h=E(p,["moof"]);if(h){if(h.length<2)return d.remainder=p,d}else return d;var D=h[h.length-1];return d.valid=Object(B.sliceUint8)(p,0,D.start-8),d.remainder=Object(B.sliceUint8)(p,D.start-8),d}function s(p,d){var h=new Uint8Array(p.length+d.length);return h.set(p),h.set(d,p.length),h}},"./src/utils/output-filter.ts":function($,K,O){"use strict";O.r(K),O.d(K,"default",function(){return B});var B=function(){function C(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 L=C.prototype;return L.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},L.newCue=function(_,I,M){(this.startTime===null||this.startTime>_)&&(this.startTime=_),this.endTime=I,this.screen=M,this.timelineController.createCaptionsTrack(this.trackName)},L.reset=function(){this.cueRanges=[]},C}()},"./src/utils/texttrack-utils.ts":function($,K,O){"use strict";O.r(K),O.d(K,"sendAddTrackEvent",function(){return C}),O.d(K,"addCueToTrack",function(){return L}),O.d(K,"clearCurrentCues",function(){return U}),O.d(K,"removeCuesInRange",function(){return _}),O.d(K,"getCuesInRange",function(){return M});var B=O("./src/utils/logger.ts");function C(b,E){var R;try{R=new Event("addtrack")}catch(w){R=document.createEvent("Event"),R.initEvent("addtrack",!1,!1)}R.track=b,E.dispatchEvent(R)}function L(b,E){var R=b.mode;if(R==="disabled"&&(b.mode="hidden"),b.cues&&!b.cues.getCueById(E.id))try{if(b.addCue(E),!b.cues.getCueById(E.id))throw new Error("addCue is failed for: "+E)}catch(A){B.logger.debug("[texttrack-utils]: "+A);var w=new self.TextTrackCue(E.startTime,E.endTime,E.text);w.id=E.id,b.addCue(w)}R==="disabled"&&(b.mode=R)}function U(b){var E=b.mode;if(E==="disabled"&&(b.mode="hidden"),b.cues)for(var R=b.cues.length;R--;)b.removeCue(b.cues[R]);E==="disabled"&&(b.mode=E)}function _(b,E,R){var w=b.mode;if(w==="disabled"&&(b.mode="hidden"),b.cues&&b.cues.length>0)for(var A=M(b.cues,E,R),g=0;g<A.length;g++)b.removeCue(A[g]);w==="disabled"&&(b.mode=w)}function I(b,E){if(E<b[0].startTime)return 0;var R=b.length-1;if(E>b[R].endTime)return-1;for(var w=0,A=R;w<=A;){var g=Math.floor((A+w)/2);if(E<b[g].startTime)A=g-1;else if(E>b[g].startTime&&w<R)w=g+1;else return g}return b[w].startTime-E<E-b[A].startTime?w:A}function M(b,E,R){var w=[],A=I(b,E);if(A>-1)for(var g=A,u=b.length;g<u;g++){var a=b[g];if(a.startTime>=E&&a.endTime<=R)w.push(a);else if(a.startTime>R)return w}return w}},"./src/utils/time-ranges.ts":function($,K,O){"use strict";O.r(K);var B={toString:function(L){for(var U="",_=L.length,I=0;I<_;I++)U+="["+L.start(I).toFixed(3)+","+L.end(I).toFixed(3)+"]";return U}};K.default=B},"./src/utils/timescale-conversion.ts":function($,K,O){"use strict";O.r(K),O.d(K,"toTimescaleFromBase",function(){return C}),O.d(K,"toTimescaleFromScale",function(){return L}),O.d(K,"toMsFromMpegTsClock",function(){return U}),O.d(K,"toMpegTsClockFromTimescale",function(){return _});var B=9e4;function C(I,M,b,E){b===void 0&&(b=1),E===void 0&&(E=!1);var R=I*M*b;return E?Math.round(R):R}function L(I,M,b,E){return b===void 0&&(b=1),E===void 0&&(E=!1),C(I,M,1/b,E)}function U(I,M){return M===void 0&&(M=!1),C(I,1e3,1/B,M)}function _(I,M){return M===void 0&&(M=1),C(I,B,1/M)}},"./src/utils/typed-array.ts":function($,K,O){"use strict";O.r(K),O.d(K,"sliceUint8",function(){return B});function B(C,L,U){return Uint8Array.prototype.slice?C.slice(L,U):new Uint8Array(Array.prototype.slice.call(C,L,U))}},"./src/utils/vttcue.ts":function($,K,O){"use strict";O.r(K),K.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var B=["","lr","rl"],C=["start","middle","end","left","right"];function L(b,E){if(typeof E!="string")return!1;if(!Array.isArray(b))return!1;var R=E.toLowerCase();return~b.indexOf(R)?R:!1}function U(b){return L(B,b)}function _(b){return L(C,b)}function I(b){for(var E=arguments.length,R=new Array(E>1?E-1:0),w=1;w<E;w++)R[w-1]=arguments[w];for(var A=1;A<arguments.length;A++){var g=arguments[A];for(var u in g)b[u]=g[u]}return b}function M(b,E,R){var w=this,A={enumerable:!0};w.hasBeenReset=!1;var g="",u=!1,a=b,l=E,s=R,p=null,d="",h=!0,D="auto",v="start",f=50,m="middle",c=50,o="middle";Object.defineProperty(w,"id",I({},A,{get:function(){return g},set:function(y){g=""+y}})),Object.defineProperty(w,"pauseOnExit",I({},A,{get:function(){return u},set:function(y){u=!!y}})),Object.defineProperty(w,"startTime",I({},A,{get:function(){return a},set:function(y){if(typeof y!="number")throw new TypeError("Start time must be set to a number.");a=y,this.hasBeenReset=!0}})),Object.defineProperty(w,"endTime",I({},A,{get:function(){return l},set:function(y){if(typeof y!="number")throw new TypeError("End time must be set to a number.");l=y,this.hasBeenReset=!0}})),Object.defineProperty(w,"text",I({},A,{get:function(){return s},set:function(y){s=""+y,this.hasBeenReset=!0}})),Object.defineProperty(w,"region",I({},A,{get:function(){return p},set:function(y){p=y,this.hasBeenReset=!0}})),Object.defineProperty(w,"vertical",I({},A,{get:function(){return d},set:function(y){var S=U(y);if(S===!1)throw new SyntaxError("An invalid or illegal string was specified.");d=S,this.hasBeenReset=!0}})),Object.defineProperty(w,"snapToLines",I({},A,{get:function(){return h},set:function(y){h=!!y,this.hasBeenReset=!0}})),Object.defineProperty(w,"line",I({},A,{get:function(){return D},set:function(y){if(typeof y!="number"&&y!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");D=y,this.hasBeenReset=!0}})),Object.defineProperty(w,"lineAlign",I({},A,{get:function(){return v},set:function(y){var S=_(y);if(!S)throw new SyntaxError("An invalid or illegal string was specified.");v=S,this.hasBeenReset=!0}})),Object.defineProperty(w,"position",I({},A,{get:function(){return f},set:function(y){if(y<0||y>100)throw new Error("Position must be between 0 and 100.");f=y,this.hasBeenReset=!0}})),Object.defineProperty(w,"positionAlign",I({},A,{get:function(){return m},set:function(y){var S=_(y);if(!S)throw new SyntaxError("An invalid or illegal string was specified.");m=S,this.hasBeenReset=!0}})),Object.defineProperty(w,"size",I({},A,{get:function(){return c},set:function(y){if(y<0||y>100)throw new Error("Size must be between 0 and 100.");c=y,this.hasBeenReset=!0}})),Object.defineProperty(w,"align",I({},A,{get:function(){return o},set:function(y){var S=_(y);if(!S)throw new SyntaxError("An invalid or illegal string was specified.");o=S,this.hasBeenReset=!0}})),w.displayState=void 0}return M.prototype.getCueAsHTML=function(){var b=self.WebVTT;return b.convertCueToDOMTree(self,this.text)},M}()},"./src/utils/vttparser.ts":function($,K,O){"use strict";O.r(K),O.d(K,"parseTimeStamp",function(){return L}),O.d(K,"fixLineBreaks",function(){return E}),O.d(K,"VTTParser",function(){return R});var B=O("./src/utils/vttcue.ts"),C=function(){function w(){}var A=w.prototype;return A.decode=function(u,a){if(!u)return"";if(typeof u!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(u))},w}();function L(w){function A(u,a,l,s){return(u|0)*3600+(a|0)*60+(l|0)+parseFloat(s||0)}var g=w.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return g?parseFloat(g[2])>59?A(g[2],g[3],0,g[4]):A(g[1],g[2],g[3],g[4]):null}var U=function(){function w(){this.values=Object.create(null)}var A=w.prototype;return A.set=function(u,a){!this.get(u)&&a!==""&&(this.values[u]=a)},A.get=function(u,a,l){return l?this.has(u)?this.values[u]:a[l]:this.has(u)?this.values[u]:a},A.has=function(u){return u in this.values},A.alt=function(u,a,l){for(var s=0;s<l.length;++s)if(a===l[s]){this.set(u,a);break}},A.integer=function(u,a){/^-?\d+$/.test(a)&&this.set(u,parseInt(a,10))},A.percent=function(u,a){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(a)){var l=parseFloat(a);if(l>=0&&l<=100)return this.set(u,l),!0}return!1},w}();function _(w,A,g,u){var a=u?w.split(u):[w];for(var l in a){if(typeof a[l]!="string")continue;var s=a[l].split(g);if(s.length!==2)continue;var p=s[0],d=s[1];A(p,d)}}var I=new B.default(0,0,""),M=I.align==="middle"?"middle":"center";function b(w,A,g){var u=w;function a(){var p=L(w);if(p===null)throw new Error("Malformed timestamp: "+u);return w=w.replace(/^[^\sa-zA-Z-]+/,""),p}function l(p,d){var h=new U;_(p,function(f,m){var c;switch(f){case"region":for(var o=g.length-1;o>=0;o--)if(g[o].id===m){h.set(f,g[o].region);break}break;case"vertical":h.alt(f,m,["rl","lr"]);break;case"line":c=m.split(","),h.integer(f,c[0]),h.percent(f,c[0])&&h.set("snapToLines",!1),h.alt(f,c[0],["auto"]),c.length===2&&h.alt("lineAlign",c[1],["start",M,"end"]);break;case"position":c=m.split(","),h.percent(f,c[0]),c.length===2&&h.alt("positionAlign",c[1],["start",M,"end","line-left","line-right","auto"]);break;case"size":h.percent(f,m);break;case"align":h.alt(f,m,["start",M,"end","left","right"]);break}},/:/,/\s/),d.region=h.get("region",null),d.vertical=h.get("vertical","");var D=h.get("line","auto");D==="auto"&&I.line===-1&&(D=-1),d.line=D,d.lineAlign=h.get("lineAlign","start"),d.snapToLines=h.get("snapToLines",!0),d.size=h.get("size",100),d.align=h.get("align",M);var v=h.get("position","auto");v==="auto"&&I.position===50&&(v=d.align==="start"||d.align==="left"?0:d.align==="end"||d.align==="right"?100:50),d.position=v}function s(){w=w.replace(/^\s+/,"")}if(s(),A.startTime=a(),s(),w.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+u);w=w.substr(3),s(),A.endTime=a(),s(),l(w,A)}function E(w){return w.replace(/<br(?: \/)?>/gi,`
|
|
`)}var R=function(){function w(){this.state="INITIAL",this.buffer="",this.decoder=new C,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var A=w.prototype;return A.parse=function(u){var a=this;u&&(a.buffer+=a.decoder.decode(u,{stream:!0}));function l(){var v=a.buffer,f=0;for(v=E(v);f<v.length&&v[f]!=="\r"&&v[f]!==`
|
|
`;)++f;var m=v.substr(0,f);return v[f]==="\r"&&++f,v[f]===`
|
|
`&&++f,a.buffer=v.substr(f),m}function s(v){_(v,function(f,m){},/:/)}try{var p="";if(a.state==="INITIAL"){if(!/\r\n|\n/.test(a.buffer))return this;p=l();var d=p.match(/^()?WEBVTT([ \t].*)?$/);if(!d||!d[0])throw new Error("Malformed WebVTT signature.");a.state="HEADER"}for(var h=!1;a.buffer;){if(!/\r\n|\n/.test(a.buffer))return this;h?h=!1:p=l();switch(a.state){case"HEADER":/:/.test(p)?s(p):p||(a.state="ID");continue;case"NOTE":p||(a.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(p)){a.state="NOTE";break}if(!p)continue;if(a.cue=new B.default(0,0,""),a.state="CUE",p.indexOf("-->")===-1){a.cue.id=p;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{b(p,a.cue,a.regionList)}catch(v){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var D=p.indexOf("-->")!==-1;if(!p||D&&(h=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=`
|
|
`),a.cue.text+=p}continue;case"BADCUE":p||(a.state="ID")}}}catch(v){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},A.flush=function(){var u=this;try{if((u.cue||u.state==="HEADER")&&(u.buffer+=`
|
|
|
|
`,u.parse()),u.state==="INITIAL"||u.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(a){u.onparsingerror&&u.onparsingerror(a)}return u.onflush&&u.onflush(),this},w}()},"./src/utils/webvtt-parser.ts":function($,K,O){"use strict";O.r(K),O.d(K,"generateCueId",function(){return R}),O.d(K,"parseWebVTT",function(){return A});var B=O("./src/polyfills/number.ts"),C=O("./src/utils/vttparser.ts"),L=O("./src/demux/id3.ts"),U=O("./src/utils/timescale-conversion.ts"),_=O("./src/remux/mp4-remuxer.ts"),I=/\r\n|\n\r|\n|\r/g,M=function(u,a,l){return l===void 0&&(l=0),u.substr(l,a.length)===a},b=function(u){var a=parseInt(u.substr(-3)),l=parseInt(u.substr(-6,2)),s=parseInt(u.substr(-9,2)),p=u.length>9?parseInt(u.substr(0,u.indexOf(":"))):0;if(!Object(B.isFiniteNumber)(a)||!Object(B.isFiniteNumber)(l)||!Object(B.isFiniteNumber)(s)||!Object(B.isFiniteNumber)(p))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+u);return a+=1e3*l,a+=60*1e3*s,a+=60*60*1e3*p,a},E=function(u){for(var a=5381,l=u.length;l;)a=a*33^u.charCodeAt(--l);return(a>>>0).toString()};function R(g,u,a){return E(g.toString())+E(u.toString())+E(a)}var w=function(u,a,l){var s=u[a],p=u[s.prevCC];if(!p||!p.new&&s.new){u.ccOffset=u.presentationOffset=s.start,s.new=!1;return}for(;(d=p)!==null&&d!==void 0&&d.new;){var d;u.ccOffset+=s.start-p.start,s.new=!1,s=p,p=u[s.prevCC]}u.presentationOffset=l};function A(g,u,a,l,s,p,d,h){var D=new C.VTTParser,v=Object(L.utf8ArrayToStr)(new Uint8Array(g)).trim().replace(I,`
|
|
`).split(`
|
|
`),f=[],m=Object(U.toMpegTsClockFromTimescale)(u,a),c="00:00.000",o=0,x=0,y,S=!0,P=!1;D.oncue=function(F){var H=l[s],Y=l.ccOffset,j=(o-m)/9e4;if(H!=null&&H.new&&(x!==void 0?Y=l.ccOffset=H.start:w(l,s,j)),j&&(Y=j-l.presentationOffset),P){var N=F.endTime-F.startTime,Z=Object(_.normalizePts)((F.startTime+Y-x)*9e4,p*9e4)/9e4;F.startTime=Z,F.endTime=Z+N}var ne=F.text.trim();F.text=decodeURIComponent(encodeURIComponent(ne)),F.id||(F.id=R(F.startTime,F.endTime,ne)),F.endTime>0&&f.push(F)},D.onparsingerror=function(F){y=F},D.onflush=function(){if(y){h(y);return}d(f)},v.forEach(function(F){if(S)if(M(F,"X-TIMESTAMP-MAP=")){S=!1,P=!0,F.substr(16).split(",").forEach(function(H){M(H,"LOCAL:")?c=H.substr(6):M(H,"MPEGTS:")&&(o=parseInt(H.substr(7)))});try{x=b(c)/1e3}catch(H){P=!1,y=H}return}else F===""&&(S=!1);D.parse(F+`
|
|
`)}),D.flush()}},"./src/utils/xhr-loader.ts":function($,K,O){"use strict";O.r(K);var B=O("./src/utils/logger.ts"),C=O("./src/loader/load-stats.ts"),L=/^age:\s*[\d.]+\s*$/m,U=function(){function _(M){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=M?M.xhrSetup:null,this.stats=new C.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 b=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),b&&(b.onreadystatechange=null,b.onprogress=null,b.readyState!==4&&(this.stats.aborted=!0,b.abort()))},I.abort=function(){var b;this.abortInternal(),(b=this.callbacks)!==null&&b!==void 0&&b.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},I.load=function(b,E,R){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=b,this.config=E,this.callbacks=R,this.retryDelay=E.retryDelay,this.loadInternal()},I.loadInternal=function(){var b=this.config,E=this.context;if(!b)return;var R=this.loader=new self.XMLHttpRequest,w=this.stats;w.loading.first=0,w.loaded=0;var A=this.xhrSetup;try{if(A)try{A(R,E.url)}catch(a){R.open("GET",E.url,!0),A(R,E.url)}R.readyState||R.open("GET",E.url,!0);var g=this.context.headers;if(g)for(var u in g)R.setRequestHeader(u,g[u])}catch(a){this.callbacks.onError({code:R.status,text:a.message},E,R);return}E.rangeEnd&&R.setRequestHeader("Range","bytes="+E.rangeStart+"-"+(E.rangeEnd-1)),R.onreadystatechange=this.readystatechange.bind(this),R.onprogress=this.loadprogress.bind(this),R.responseType=E.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),b.timeout),R.send()},I.readystatechange=function(){var b=this.context,E=this.loader,R=this.stats;if(!b||!E)return;var w=E.readyState,A=this.config;if(R.aborted)return;if(w>=2)if(self.clearTimeout(this.requestTimeout),R.loading.first===0&&(R.loading.first=Math.max(self.performance.now(),R.loading.start)),w===4){E.onreadystatechange=null,E.onprogress=null;var g=E.status;if(g>=200&&g<300){R.loading.end=Math.max(self.performance.now(),R.loading.first);var u,a;if(b.responseType==="arraybuffer"?(u=E.response,a=u.byteLength):(u=E.responseText,a=u.length),R.loaded=R.total=a,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(R,b,u,E),!this.callbacks)return;var s={url:E.responseURL,data:u};this.callbacks.onSuccess(s,R,b,E)}else R.retry>=A.maxRetry||g>=400&&g<499?(B.logger.error(g+" while loading "+b.url),this.callbacks.onError({code:g,text:E.statusText},b,E)):(B.logger.warn(g+" while loading "+b.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),R.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),A.timeout)},I.loadtimeout=function(){B.logger.warn("timeout while loading "+this.context.url);var b=this.callbacks;b&&(this.abortInternal(),b.onTimeout(this.stats,this.context,this.loader))},I.loadprogress=function(b){var E=this.stats;E.loaded=b.loaded,b.lengthComputable&&(E.total=b.total)},I.getCacheAge=function(){var b=null;if(this.loader&&L.test(this.loader.getAllResponseHeaders())){var E=this.loader.getResponseHeader("age");b=E?parseFloat(E):null}return b},_}();K.default=U}}).default})},yslc:function(Be,Ie){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAOHklEQVR4Xu1dCXQURRr+emZyTO6D3BCEgKCInCKeK3IoiyIqlxLyQBRBV8DNhCCrS3Z9Cq66KOoi68ECKocCcutTLhUERM1MEpBLEuQmQMKEnDNd+6onEzKTuXqmJ5l0V/EeL+mp+qu+r77UVP1V9TcHffZbIJgOlhgDMmaAA8lTwVDxJQh5UMY4GTSFM8AJ+PW6cIDsBEEfhfPB4MuUAYvQaTowOwV1NXtB0E6mWBksBTNwTeiUBENud/CmHwBEKZgTBl2GDNgKnQIsyBkCM9kEEI0M8TJICmWgqdCFkT17MngsUignDLYMGXAsdAo0XzcPILkyxMwgKZAB50InhIMhZxUIGalAXhhkmTHgXOgU6PG8UFwxbgdBf5nhZnAUxoBroVMyjryQgMraPSDoqDBuGFwZMeBe6MLi9IWuIHW7QUisjLAzKApiwDOhC25H3T3g8TUICVYQPwyqTBjwXOgUsD4nC4RfIhPsDIaCGBAndEHsujwQMkdBHDGo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