|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[214,3,5,7,8,19],{"++UQ":function(Ye,We,z){},"+NIl":function(Ye,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";ae.defineMode("stex",function(ee,B){"use strict";function O(o,i){o.cmdState.push(i)}function D(o){return o.cmdState.length>0?o.cmdState[o.cmdState.length-1]:null}function S(o){var i=o.cmdState.pop();i&&i.closeBracket()}function A(o){for(var i=o.cmdState,l=i.length-1;l>=0;l--){var a=i[l];if(a.name=="DEFAULT")continue;return a}return{styleIdentifier:function(){return null}}}function C(o,i,l){return function(){this.name=o,this.bracketNo=0,this.style=i,this.styles=l,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var h={};h.importmodule=C("importmodule","tag",["string","builtin"]),h.documentclass=C("documentclass","tag",["","atom"]),h.usepackage=C("usepackage","tag",["atom"]),h.begin=C("begin","tag",["atom"]),h.end=C("end","tag",["atom"]),h.label=C("label","tag",["atom"]),h.ref=C("ref","tag",["atom"]),h.eqref=C("eqref","tag",["atom"]),h.cite=C("cite","tag",["atom"]),h.bibitem=C("bibitem","tag",["atom"]),h.Bibitem=C("Bibitem","tag",["atom"]),h.RBibitem=C("RBibitem","tag",["atom"]),h.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function p(o,i){o.f=i}function c(o,i){var l;if(o.match(/^\\[a-zA-Z@]+/)){var a=o.current().slice(1);return l=h.hasOwnProperty(a)?h[a]:h.DEFAULT,l=new l,O(i,l),p(i,n),l.style}if(o.match(/^\\[$&%#{}_]/))return"tag";if(o.match(/^\\[,;!\/\\]/))return"tag";if(o.match("\\["))return p(i,function(t,d){return s(t,d,"\\]")}),"keyword";if(o.match("\\("))return p(i,function(t,d){return s(t,d,"\\)")}),"keyword";if(o.match("$$"))return p(i,function(t,d){return s(t,d,"$$")}),"keyword";if(o.match("$"))return p(i,function(t,d){return s(t,d,"$")}),"keyword";var r=o.next();if(r=="%")return o.skipToEnd(),"comment";if(r=="}"||r=="]"){if(l=D(i),l)l.closeBracket(r),p(i,n);else return"error";return"bracket"}else return r=="{"||r=="["?(l=h.DEFAULT,l=new l,O(i,l),"bracket"):/\d/.test(r)?(o.eatWhile(/[\w.%]/),"atom"):(o.eatWhile(/[\w\-_]/),l=A(i),l.name=="begin"&&(l.argument=o.current()),l.styleIdentifier())}function s(o,i,l){if(o.eatSpace())return null;if(l&&o.match(l))return p(i,c),"keyword";if(o.match(/^\\[a-zA-Z@]+/))return"tag";if(o.match(/^[a-zA-Z]+/))return"variable-2";if(o.match(/^\\[$&%#{}_]/))return"tag";if(o.match(/^\\[,;!\/]/))return"tag";if(o.match(/^[\^_&]/))return"tag";if(o.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(o.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var a=o.next();return a=="{"||a=="}"||a=="["||a=="]"||a=="("||a==")"?"bracket":a=="%"?(o.skipToEnd(),"comment"):"error"}function n(o,i){var l=o.peek(),a;return l=="{"||l=="["?(a=D(i),a.openBracket(l),o.eat(l),p(i,c),"bracket"):/[ \t\r]/.test(l)?(o.eat(l),null):(p(i,c),S(i),c(o,i))}return{startState:function(){var o=B.inMathMode?function(i,l){return s(i,l)}:c;return{cmdState:[],f:o}},copyState:function(o){return{cmdState:o.cmdState.slice(),f:o.f}},token:function(o,i){return i.f(o,i)},blankLine:function(o){o.f=c,o.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},"+QRC":function(Ye,We,z){"use strict";var ae=z("E9nw"),ee={"text/plain":"Text","text/html":"Url",default:"Text"},B="Copy to clipboard: #{key}, Enter";function O(S){var A=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return S.replace(/#{\s*key\s*}/g,A)}function D(S,A){var C,h,p,c,s,n,o=!1;A||(A={}),C=A.debug||!1;try{p=ae(),c=document.createRange(),s=document.getSelection(),n=document.createElement("span"),n.textContent=S,n.style.all="unset",n.style.position="fixed",n.style.top=0,n.style.clip="rect(0, 0, 0, 0)",n.style.whiteSpace="pre",n.style.webkitUserSelect="text",n.style.MozUserSelect="text",n.style.msUserSelect="text",n.style.userSelect="text",n.addEventListener("copy",function(l){if(l.stopPropagation(),A.format)if(l.preventDefault(),typeof l.clipboardData=="undefined"){C&&console.warn("unable to use e.clipboardData"),C&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=ee[A.format]||ee.default;window.clipboardData.setData(a,S)}else l.clipboardData.clearData(),l.clipboardData.setData(A.format,S);A.onCopy&&(l.preventDefault(),A.onCopy(l.clipboardData))}),document.body.appendChild(n),c.selectNodeContents(n),s.addRange(c);var i=document.execCommand("copy");if(!i)throw new Error("copy command was unsuccessful");o=!0}catch(l){C&&console.error("unable to copy using execCommand: ",l),C&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(A.format||"text",S),A.onCopy&&A.onCopy(window.clipboardData),o=!0}catch(a){C&&console.error("unable to copy using clipboardData: ",a),C&&console.error("falling back to prompt"),h=O("message"in A?A.message:B),window.prompt(h,S)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(c):s.removeAllRanges()),n&&document.body.removeChild(n),p()}return o}Ye.exports=D},"+aKw":function(Ye,We,z){"use strict";var ae=z("tJVT"),ee=z("cDcd"),B=z.n(ee),O=function(A){return String(A).length===1?"0".concat(A):A},D=function(A){var C=A.className,h=C===void 0?"":C,p=A.onChange,c=A.defaultValue,s=c===void 0?0:c,n=Object(ee.useState)(s),o=Object(ae.a)(n,2),i=o[0],l=o[1];Object(ee.useEffect)(function(){var d=setTimeout(function(){l(i+1e3)},1e3);return p(i+1e3),function(){clearInterval(d)}},[i]);var a=parseInt(i/(60*6e4))||"00",r=parseInt(i%(60*6e4)/6e4)||"00",t=parseInt(i%6e4/1e3)||"00";return B.a.createElement("div",{className:h},O(a),":",O(r),":",O(t))};We.a=D},"+ua5":function(Ye,We,z){},"07cG":function(Ye,We,z){Ye.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0r65":function(Ye,We){var z=arguments[3],ae=arguments[4],ee=arguments[5],B=JSON.stringify;Ye.exports=function(O,D){for(var S,A=Object.keys(ee),C=0,h=A.length;C<h;C++){var p=A[C],c=ee[p].exports;if(c===O||c&&c.default===O){S=p;break}}if(!S){S=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var s={},C=0,h=A.length;C<h;C++){var p=A[C];s[p]=p}ae[S]=["function(require,module,exports){"+O+"(self); }",s]}var n=Math.floor(Math.pow(16,8)*Math.random()).toString(16),o={};o[S]=S,ae[n]=["function(require,module,exports){var f = require("+B(S)+");(f.default ? f.default : f)(self);}",o];var i={};l(n);function l(y){i[y]=!0;for(var b in ae[y][1]){var g=ae[y][1][b];i[g]||l(g)}}var a="("+z+")({"+Object.keys(i).map(function(y){return B(y)+":["+ae[y][0]+","+B(ae[y][1])+"]"}).join(",")+"},{},["+B(n)+"])",r=window.URL||window.webkitURL||window.mozURL||window.msURL,t=new Blob([a],{type:"text/javascript"});if(D&&D.bare)return t;var d=r.createObjectURL(t),v=new Worker(d);return v.objectURL=d,v}},"19Vz":function(Ye,We,z){(function(ae){ae(z("VrN/"))})(function(ae){ae.defineOption("placeholder","",function(C,h,p){var c=p&&p!=ae.Init;if(h&&!c)C.on("blur",D),C.on("change",S),C.on("swapDoc",S),ae.on(C.getInputField(),"compositionupdate",C.state.placeholderCompose=function(){O(C)}),S(C);else if(!h&&c){C.off("blur",D),C.off("change",S),C.off("swapDoc",S),ae.off(C.getInputField(),"compositionupdate",C.state.placeholderCompose),ee(C);var s=C.getWrapperElement();s.className=s.className.replace(" CodeMirror-empty","")}h&&!C.hasFocus()&&D(C)});function ee(C){C.state.placeholder&&(C.state.placeholder.parentNode.removeChild(C.state.placeholder),C.state.placeholder=null)}function B(C){ee(C);var h=C.state.placeholder=document.createElement("pre");h.style.cssText="height: 0; overflow: visible",h.style.direction=C.getOption("direction"),h.className="CodeMirror-placeholder CodeMirror-line-like";var p=C.getOption("placeholder");typeof p=="string"&&(p=document.createTextNode(p)),h.appendChild(p),C.display.lineSpace.insertBefore(h,C.display.lineSpace.firstChild)}function O(C){setTimeout(function(){var h=!1,p=C.getInputField();p.nodeName=="TEXTAREA"?h=!p.value:C.lineCount()==1&&(h=!/[^\u200b]/.test(p.querySelector(".CodeMirror-line").textContent)),h?B(C):ee(C)},20)}function D(C){A(C)&&B(C)}function S(C){var h=C.getWrapperElement(),p=A(C);h.className=h.className.replace(" CodeMirror-empty","")+(p?" CodeMirror-empty":""),p?B(C):ee(C)}function A(C){return C.lineCount()===1&&C.getLine(0)===""}})},"1FX+":function(Ye,We,z){Ye.exports={flex_box_center:"flex_box_center___t3HuD",flex_space_between:"flex_space_between___3eY6W",flex_box_vertical_center:"flex_box_vertical_center___SMD2f",flex_box_center_end:"flex_box_center_end___1qy96",flex_box_column:"flex_box_column___1iEso",wrap:"wrap___3Vyua",head:"head___HUi2n",sort:"sort___1UPxB",btn:"btn___2b6SJ",listWarp:"listWarp___1pNnP",pagination:"pagination___3I0F3",fixedRight:"fixedRight___527Xj","oj-width-input":"oj-width-input___QQMFK"}},"1eCo":function(Ye,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";var ee={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},B={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ae.defineMode("xml",function(O,D){var S=O.indentUnit,A={},C=D.htmlMode?ee:B;for(var h in C)A[h]=C[h];for(var h in D)A[h]=D[h];var p,c;function s(E,w){function T(j){return w.tokenize=j,j(E,w)}var R=E.next();if(R=="<")return E.eat("!")?E.eat("[")?E.match("CDATA[")?T(i("atom","]]>")):null:E.match("--")?T(i("comment","-->")):E.match("DOCTYPE",!0,!0)?(E.eatWhile(/[\w\._\-]/),T(l(1))):null:E.eat("?")?(E.eatWhile(/[\w\._\-]/),w.tokenize=i("meta","?>"),"meta"):(p=E.eat("/")?"closeTag":"openTag",w.tokenize=n,"tag bracket");if(R=="&"){var N;return E.eat("#")?E.eat("x")?N=E.eatWhile(/[a-fA-F\d]/)&&E.eat(";"):N=E.eatWhile(/[\d]/)&&E.eat(";"):N=E.eatWhile(/[\w\.\-:]/)&&E.eat(";"),N?"atom":"error"}else return E.eatWhile(/[^&<]/),null}s.isInText=!0;function n(E,w){var T=E.next();if(T==">"||T=="/"&&E.eat(">"))return w.tokenize=s,p=T==">"?"endTag":"selfcloseTag","tag bracket";if(T=="=")return p="equals",null;if(T=="<"){w.tokenize=s,w.state=d,w.tagName=w.tagStart=null;var R=w.tokenize(E,w);return R?R+" tag error":"tag error"}else return/[\'\"]/.test(T)?(w.tokenize=o(T),w.stringStartCol=E.column(),w.tokenize(E,w)):(E.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function o(E){var w=function(T,R){for(;!T.eol();)if(T.next()==E){R.tokenize=n;break}return"string"};return w.isInAttribute=!0,w}function i(E,w){return function(T,R){for(;!T.eol();){if(T.match(w)){R.tokenize=s;break}T.next()}return E}}function l(E){return function(w,T){for(var R;(R=w.next())!=null;){if(R=="<")return T.tokenize=l(E+1),T.tokenize(w,T);if(R==">")if(E==1){T.tokenize=s;break}else return T.tokenize=l(E-1),T.tokenize(w,T)}return"meta"}}function a(E,w,T){this.prev=E.context,this.tagName=w,this.indent=E.indented,this.startOfLine=T,(A.doNotIndent.hasOwnProperty(w)||E.context&&E.context.noIndent)&&(this.noIndent=!0)}function r(E){E.context&&(E.context=E.context.prev)}function t(E,w){for(var T;;){if(!E.context)return;if(T=E.context.tagName,!A.contextGrabbers.hasOwnProperty(T)||!A.contextGrabbers[T].hasOwnProperty(w))return;r(E)}}function d(E,w,T){return E=="openTag"?(T.tagStart=w.column(),v):E=="closeTag"?y:d}function v(E,w,T){return E=="word"?(T.tagName=w.current(),c="tag",m):A.allowMissingTagName&&E=="endTag"?(c="tag bracket",m(E,w,T)):(c="error",v)}function y(E,w,T){if(E=="word"){var R=w.current();return T.context&&T.context.tagName!=R&&A.implicitlyClosed.hasOwnProperty(T.context.tagName)&&r(T),T.context&&T.context.tagName==R||A.matchClosing===!1?(c="tag",b):(c="tag error",g)}else return A.allowMissingTagName&&E=="endTag"?(c="tag bracket",b(E,w,T)):(c="error",g)}function b(E,w,T){return E!="endTag"?(c="error",b):(r(T),d)}function g(E,w,T){return c="error",b(E,w,T)}function m(E,w,T){if(E=="word")return c="attribute",_;if(E=="endTag"||E=="selfcloseTag"){var R=T.tagName,N=T.tagStart;return T.tagName=T.tagStart=null,E=="selfcloseTag"||A.autoSelfClosers.hasOwnProperty(R)?t(T,R):(t(T,R),T.context=new a(T,R,N==T.indented)),d}return c="error",m}function _(E,w,T){return E=="equals"?x:(A.allowMissing||(c="error"),m(E,w,T))}function x(E,w,T){return E=="string"?f:E=="word"&&A.allowUnquoted?(c="string",m):(c="error",m(E,w,T))}function f(E,w,T){return E=="string"?f:m(E,w,T)}return{startState:function(E){var w={tokenize:s,state:d,indented:E||0,tagName:null,tagStart:null,context:null};return E!=null&&(w.baseIndent=E),w},token:function(E,w){if(!w.tagName&&E.sol()&&(w.indented=E.indentation()),E.eatSpace())return null;p=null;var T=w.tokenize(E,w);return(T||p)&&T!="comment"&&(c=null,w.state=w.state(p||T,E,w),c&&(T=c=="error"?T+" error":c)),T},indent:function(E,w,T){var R=E.context;if(E.tokenize.isInAttribute)return E.tagStart==E.indented?E.stringStartCol+1:E.indented+S;if(R&&R.noIndent)return ae.Pass;if(E.tokenize!=n&&E.tokenize!=s)return T?T.match(/^(\s*)/)[0].length:0;if(E.tagName)return A.multilineTagIndentPastTag!==!1?E.tagStart+E.tagName.length+2:E.tagStart+S*(A.multilineTagIndentFactor||1);if(A.alignCDATA&&/<!\[CDATA\[/.test(w))return 0;var N=w&&/^<(\/)?([\w_:\.-]*)/.exec(w);if(N&&N[1])for(;R;)if(R.tagName==N[2]){R=R.prev;break}else if(A.implicitlyClosed.hasOwnProperty(R.tagName))R=R.prev;else break;else if(N)for(;R;){var j=A.contextGrabbers[R.tagName];if(j&&j.hasOwnProperty(N[2]))R=R.prev;else break}for(;R&&R.prev&&!R.startOfLine;)R=R.prev;return R?R.indent+S:E.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:A.htmlMode?"html":"xml",helperType:A.htmlMode?"html":"xml",skipAttribute:function(E){E.state==x&&(E.state=m)},xmlCurrentTag:function(E){return E.tagName?{name:E.tagName,close:E.type=="closeTag"}:null},xmlCurrentContext:function(E){for(var w=[],T=E.context;T;T=T.prev)T.tagName&&w.push(T.tagName);return w.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(Ye,We,z){"use strict";z.d(We,"d",function(){return q}),z.d(We,"b",function(){return Be}),z.d(We,"c",function(){return dt}),z.d(We,"a",function(){return It});var ae=z("VTBJ"),ee=z("1OyB"),B=z("vuIU"),O=z("JX7q"),D=z("Ji7U"),S=z("LK+K"),A=z("cDcd"),C=z("I8Z2"),h=z("BGR+"),p=z("wx14"),c=z("rePB"),s=z("4IlW"),n=z("2GS6"),o=z("Gytx"),i=z.n(o),l=z("TSYQ"),a=z.n(l),r=z("U8pU"),t=z("ODXe"),d=/iPhone/i,v=/iPod/i,y=/iPad/i,b=/\bAndroid(?:.+)Mobile\b/i,g=/Android/i,m=/\bAndroid(?:.+)SD4930UR\b/i,_=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,x=/Windows Phone/i,f=/\bWindows(?:.+)ARM\b/i,E=/BlackBerry/i,w=/BB10/i,T=/Opera Mini/i,R=/\b(CriOS|Chrome)(?:.+)Mobile/i,N=/Mobile(?:.+)Firefox\b/i;function j(Ct,st){return Ct.test(st)}function W(Ct){var st=Ct||(typeof navigator!="undefined"?navigator.userAgent:""),ut=st.split("[FBAN");if(typeof ut[1]!="undefined"){var $e=ut,xe=Object(t.a)($e,1);st=xe[0]}if(ut=st.split("Twitter"),typeof ut[1]!="undefined"){var Fe=ut,ct=Object(t.a)(Fe,1);st=ct[0]}var tt={apple:{phone:j(d,st)&&!j(x,st),ipod:j(v,st),tablet:!j(d,st)&&j(y,st)&&!j(x,st),device:(j(d,st)||j(v,st)||j(y,st))&&!j(x,st)},amazon:{phone:j(m,st),tablet:!j(m,st)&&j(_,st),device:j(m,st)||j(_,st)},android:{phone:!j(x,st)&&j(m,st)||!j(x,st)&&j(b,st),tablet:!j(x,st)&&!j(m,st)&&!j(b,st)&&(j(_,st)||j(g,st)),device:!j(x,st)&&(j(m,st)||j(_,st)||j(b,st)||j(g,st))||j(/\bokhttp\b/i,st)},windows:{phone:j(x,st),tablet:j(f,st),device:j(x,st)||j(f,st)},other:{blackberry:j(E,st),blackberry10:j(w,st),opera:j(T,st),firefox:j(N,st),chrome:j(R,st),device:j(E,st)||j(w,st)||j(T,st)||j(N,st)||j(R,st)},any:null,phone:null,tablet:null};return tt.any=tt.apple.device||tt.android.device||tt.windows.device||tt.other.device,tt.phone=tt.apple.phone||tt.android.phone||tt.windows.phone,tt.tablet=tt.apple.tablet||tt.android.tablet||tt.windows.tablet,tt}var J=Object(ae.a)(Object(ae.a)({},W()),{},{isMobile:W}),F=J;function k(){}function K(Ct,st,ut){var $e=st||"";return Ct.key||"".concat($e,"item_").concat(ut)}function Y(Ct){return"".concat(Ct,"-menu-")}function H(Ct,st){var ut=-1;A.Children.forEach(Ct,function($e){ut+=1,$e&&$e.type&&$e.type.isMenuItemGroup?A.Children.forEach($e.props.children,function(xe){ut+=1,st(xe,ut)}):st($e,ut)})}function Q(Ct,st,ut){if(!Ct||ut.find)return;A.Children.forEach(Ct,function($e){if($e){var xe=$e.type;if(!xe||!(xe.isSubMenu||xe.isMenuItem||xe.isMenuItemGroup))return;st.indexOf($e.key)!==-1?ut.find=!0:$e.props.children&&Q($e.props.children,st,ut)}})}var re=["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"],oe=function(st){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$e=st&&typeof st.getBoundingClientRect=="function"&&st.getBoundingClientRect().width;if($e){if(ut){var xe=getComputedStyle(st),Fe=xe.marginLeft,ct=xe.marginRight;$e+=+Fe.replace("px","")+ +ct.replace("px","")}$e=+$e.toFixed(6)}return $e||0},me=function(st,ut,$e){st&&Object(r.a)(st.style)==="object"&&(st.style[ut]=$e)},he=function(){return F.any},Ee=z("KQm4"),de=z("Ff2n"),be=z("faye"),Ue=z("bdgK"),Re=z("uciX"),De=z("8XRh"),je={adjustX:1,adjustY:1},ve={topLeft:{points:["bl","tl"],overflow:je,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:je,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:je,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:je,offset:[4,0]}},ce={topLeft:{points:["bl","tl"],overflow:je,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:je,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:je,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:je,offset:[4,0]}},ke=ve,Ne=0,Je={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},te=function(st,ut,$e){var xe=Y(ut),Fe=st.getState();st.setState({defaultActiveFirst:Object(ae.a)(Object(ae.a)({},Fe.defaultActiveFirst),{},Object(c.a)({},xe,$e))})},P=function(Ct){Object(D.a)(ut,Ct);var st=Object(S.a)(ut);function ut($e){var xe;Object(ee.a)(this,ut),xe=st.call(this,$e),xe.onDestroy=function(Qe){xe.props.onDestroy(Qe)},xe.onKeyDown=function(Qe){var lt=Qe.keyCode,xt=xe.menuInstance,Pt=xe.props,zt=Pt.isOpen,Se=Pt.store;if(lt===s.a.ENTER)return xe.onTitleClick(Qe),te(Se,xe.props.eventKey,!0),!0;if(lt===s.a.RIGHT)return zt?xt.onKeyDown(Qe):(xe.triggerOpenChange(!0),te(Se,xe.props.eventKey,!0)),!0;if(lt===s.a.LEFT){var fe;if(zt)fe=xt.onKeyDown(Qe);else return;return fe||(xe.triggerOpenChange(!1),fe=!0),fe}return zt&&(lt===s.a.UP||lt===s.a.DOWN)?xt.onKeyDown(Qe):void 0},xe.onOpenChange=function(Qe){xe.props.onOpenChange(Qe)},xe.onPopupVisibleChange=function(Qe){xe.triggerOpenChange(Qe,Qe?"mouseenter":"mouseleave")},xe.onMouseEnter=function(Qe){var lt=xe.props,xt=lt.eventKey,Pt=lt.onMouseEnter,zt=lt.store;te(zt,xe.props.eventKey,!1),Pt({key:xt,domEvent:Qe})},xe.onMouseLeave=function(Qe){var lt=xe.props,xt=lt.parentMenu,Pt=lt.eventKey,zt=lt.onMouseLeave;xt.subMenuInstance=Object(O.a)(xe),zt({key:Pt,domEvent:Qe})},xe.onTitleMouseEnter=function(Qe){var lt=xe.props,xt=lt.eventKey,Pt=lt.onItemHover,zt=lt.onTitleMouseEnter;Pt({key:xt,hover:!0}),zt({key:xt,domEvent:Qe})},xe.onTitleMouseLeave=function(Qe){var lt=xe.props,xt=lt.parentMenu,Pt=lt.eventKey,zt=lt.onItemHover,Se=lt.onTitleMouseLeave;xt.subMenuInstance=Object(O.a)(xe),zt({key:Pt,hover:!1}),Se({key:Pt,domEvent:Qe})},xe.onTitleClick=function(Qe){var lt=Object(O.a)(xe),xt=lt.props;if(xt.onTitleClick({key:xt.eventKey,domEvent:Qe}),xt.triggerSubMenuAction==="hover")return;xe.triggerOpenChange(!xt.isOpen,"click"),te(xt.store,xe.props.eventKey,!1)},xe.onSubMenuClick=function(Qe){typeof xe.props.onClick=="function"&&xe.props.onClick(xe.addKeyPath(Qe))},xe.onSelect=function(Qe){xe.props.onSelect(Qe)},xe.onDeselect=function(Qe){xe.props.onDeselect(Qe)},xe.getPrefixCls=function(){return"".concat(xe.props.rootPrefixCls,"-submenu")},xe.getActiveClassName=function(){return"".concat(xe.getPrefixCls(),"-active")},xe.getDisabledClassName=function(){return"".concat(xe.getPrefixCls(),"-disabled")},xe.getSelectedClassName=function(){return"".concat(xe.getPrefixCls(),"-selected")},xe.getOpenClassName=function(){return"".concat(xe.props.rootPrefixCls,"-submenu-open")},xe.saveMenuInstance=function(Qe){xe.menuInstance=Qe},xe.addKeyPath=function(Qe){return Object(ae.a)(Object(ae.a)({},Qe),{},{keyPath:(Qe.keyPath||[]).concat(xe.props.eventKey)})},xe.triggerOpenChange=function(Qe,lt){var xt=xe.props.eventKey,Pt=function(){xe.onOpenChange({key:xt,item:Object(O.a)(xe),trigger:lt,open:Qe})};lt==="mouseenter"?xe.mouseenterTimeout=setTimeout(function(){Pt()},0):Pt()},xe.isChildrenSelected=function(){var Qe={find:!1};return Q(xe.props.children,xe.props.selectedKeys,Qe),Qe.find},xe.isOpen=function(){return xe.props.openKeys.indexOf(xe.props.eventKey)!==-1},xe.adjustWidth=function(){if(!xe.subMenuTitle||!xe.menuInstance)return;var Qe=be.findDOMNode(xe.menuInstance);if(Qe.offsetWidth>=xe.subMenuTitle.offsetWidth)return;Qe.style.minWidth="".concat(xe.subMenuTitle.offsetWidth,"px")},xe.saveSubMenuTitle=function(Qe){xe.subMenuTitle=Qe},xe.getBaseProps=function(){var Qe=Object(O.a)(xe),lt=Qe.props;return{mode:lt.mode==="horizontal"?"vertical":lt.mode,visible:xe.props.isOpen,level:lt.level+1,inlineIndent:lt.inlineIndent,focusable:!1,onClick:xe.onSubMenuClick,onSelect:xe.onSelect,onDeselect:xe.onDeselect,onDestroy:xe.onDestroy,selectedKeys:lt.selectedKeys,eventKey:"".concat(lt.eventKey,"-menu-"),openKeys:lt.openKeys,motion:lt.motion,onOpenChange:xe.onOpenChange,subMenuOpenDelay:lt.subMenuOpenDelay,parentMenu:Object(O.a)(xe),subMenuCloseDelay:lt.subMenuCloseDelay,forceSubMenuRender:lt.forceSubMenuRender,triggerSubMenuAction:lt.triggerSubMenuAction,builtinPlacements:lt.builtinPlacements,defaultActiveFirst:lt.store.getState().defaultActiveFirst[Y(lt.eventKey)],multiple:lt.multiple,prefixCls:lt.rootPrefixCls,id:xe.internalMenuId,manualRef:xe.saveMenuInstance,itemIcon:lt.itemIcon,expandIcon:lt.expandIcon,direction:lt.direction}},xe.getMotion=function(Qe,lt){var xt=Object(O.a)(xe),Pt=xt.haveRendered,zt=xe.props,Se=zt.motion,fe=zt.rootPrefixCls,G=Object(ae.a)(Object(ae.a)({},Se),{},{leavedClassName:"".concat(fe,"-hidden"),removeOnLeave:!1,motionAppear:Pt||!lt||Qe!=="inline"});return G};var Fe=$e.store,ct=$e.eventKey,tt=Fe.getState(),wt=tt.defaultActiveFirst;xe.isRootMenu=!1;var St=!1;return wt&&(St=wt[ct]),te(Fe,ct,St),xe}return Object(B.a)(ut,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var xe=this,Fe=this.props,ct=Fe.mode,tt=Fe.parentMenu,wt=Fe.manualRef;if(wt&&wt(this),ct!=="horizontal"||!tt.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return xe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var xe=this.props,Fe=xe.onDestroy,ct=xe.eventKey;Fe&&Fe(ct),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(xe){var Fe=this,ct=this.getBaseProps(),tt=this.getMotion(ct.mode,ct.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ct.visible||ct.forceSubMenuRender,!this.haveOpened)return A.createElement("div",null);var wt=ct.direction;return A.createElement(De.default,Object.assign({visible:ct.visible},tt),function(St){var Qe=St.className,lt=St.style,xt=a()("".concat(ct.prefixCls,"-sub"),Qe,Object(c.a)({},"".concat(ct.prefixCls,"-rtl"),wt==="rtl"));return A.createElement(Pe,Object.assign({},ct,{id:Fe.internalMenuId,className:xt,style:lt}),xe)})}},{key:"render",value:function(){var xe,Fe=Object(ae.a)({},this.props),ct=Fe.isOpen,tt=this.getPrefixCls(),wt=Fe.mode==="inline",St=a()(tt,"".concat(tt,"-").concat(Fe.mode),(xe={},Object(c.a)(xe,Fe.className,!!Fe.className),Object(c.a)(xe,this.getOpenClassName(),ct),Object(c.a)(xe,this.getActiveClassName(),Fe.active||ct&&!wt),Object(c.a)(xe,this.getDisabledClassName(),Fe.disabled),Object(c.a)(xe,this.getSelectedClassName(),this.isChildrenSelected()),xe));this.internalMenuId||(Fe.eventKey?this.internalMenuId="".concat(Fe.eventKey,"$Menu"):(Ne+=1,this.internalMenuId="$__$".concat(Ne,"$Menu")));var Qe={},lt={},xt={};Fe.disabled||(Qe={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},lt={onClick:this.onTitleClick},xt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Pt={},zt=Fe.direction;wt&&(zt==="rtl"?Pt.paddingRight=Fe.inlineIndent*Fe.level:Pt.paddingLeft=Fe.inlineIndent*Fe.level);var Se={};this.props.isOpen&&(Se={"aria-owns":this.internalMenuId});var fe=null;Fe.mode!=="horizontal"&&(fe=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(fe=A.createElement(this.props.expandIcon,Object(ae.a)({},this.props))));var G=A.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Pt,className:"".concat(tt,"-title"),role:"button"},xt,lt,{"aria-expanded":ct},Se,{"aria-haspopup":"true",title:typeof Fe.title=="string"?Fe.title:void 0}),Fe.title,fe||A.createElement("i",{className:"".concat(tt,"-arrow")})),Z=this.renderChildren(Fe.children),ne=Fe.parentMenu.isRootMenu?Fe.parentMenu.props.getPopupContainer:function(nn){return nn.parentNode},se=Je[Fe.mode],Te=Fe.popupOffset?{offset:Fe.popupOffset}:{},Ge=Fe.mode==="inline"?"":Fe.popupClassName;Ge+=zt==="rtl"?" ".concat(tt,"-rtl"):"";var Ze=Fe.disabled,bt=Fe.triggerSubMenuAction,At=Fe.subMenuOpenDelay,it=Fe.forceSubMenuRender,Tt=Fe.subMenuCloseDelay,Qt=Fe.builtinPlacements;re.forEach(function(nn){return delete Fe[nn]}),delete Fe.onClick;var yt=zt==="rtl"?Object.assign({},ce,Qt):Object.assign({},ve,Qt);return delete Fe.direction,A.createElement("li",Object.assign({},Fe,Qe,{className:St,role:"menuitem"}),wt&&G,wt&&Z,!wt&&A.createElement(Re.a,{prefixCls:tt,popupClassName:a()("".concat(tt,"-popup"),Ge),getPopupContainer:ne,builtinPlacements:yt,popupPlacement:se,popupVisible:ct,popupAlign:Te,popup:Z,action:Ze?[]:[bt],mouseEnterDelay:At,mouseLeaveDelay:Tt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:it},G))}}]),ut}(A.Component);P.defaultProps={onMouseEnter:k,onMouseLeave:k,onTitleMouseEnter:k,onTitleMouseLeave:k,onTitleClick:k,manualRef:k,mode:"vertical",title:""};var U=Object(C.b)(function(Ct,st){var ut=Ct.openKeys,$e=Ct.activeKey,xe=Ct.selectedKeys,Fe=st.eventKey,ct=st.subMenuKey;return{isOpen:ut.indexOf(Fe)>-1,active:$e[ct]===Fe,selectedKeys:xe}})(P);U.isSubMenu=!0;var q=U,X="menuitem-overflowed",$=.5,ge=function(Ct){Object(D.a)(ut,Ct);var st=Object(S.a)(ut);function ut(){var $e;return Object(ee.a)(this,ut),$e=st.apply(this,arguments),$e.resizeObserver=null,$e.mutationObserver=null,$e.originalTotalWidth=0,$e.overflowedItems=[],$e.menuItemSizes=[],$e.cancelFrameId=null,$e.state={lastVisibleIndex:void 0},$e.getMenuItemNodes=function(){var xe=$e.props.prefixCls,Fe=be.findDOMNode(Object(O.a)($e));return Fe?[].slice.call(Fe.children).filter(function(ct){return ct.className.split(" ").indexOf("".concat(xe,"-overflowed-submenu"))<0}):[]},$e.getOverflowedSubMenuItem=function(xe,Fe,ct){var tt=$e.props,wt=tt.overflowedIndicator,St=tt.level,Qe=tt.mode,lt=tt.prefixCls,xt=tt.theme;if(St!==1||Qe!=="horizontal")return null;var Pt=$e.props.children[0],zt=Pt.props,Se=zt.children,fe=zt.title,G=zt.style,Z=Object(de.a)(zt,["children","title","style"]),ne=Object(ae.a)({},G),se="".concat(xe,"-overflowed-indicator"),Te="".concat(xe,"-overflowed-indicator");Fe.length===0&&ct!==!0?ne=Object(ae.a)(Object(ae.a)({},ne),{},{display:"none"}):ct&&(ne=Object(ae.a)(Object(ae.a)({},ne),{},{visibility:"hidden",position:"absolute"}),se="".concat(se,"-placeholder"),Te="".concat(Te,"-placeholder"));var Ge=xt?"".concat(lt,"-").concat(xt):"",Ze={};return re.forEach(function(bt){Z[bt]!==void 0&&(Ze[bt]=Z[bt])}),A.createElement(q,Object.assign({title:wt,className:"".concat(lt,"-overflowed-submenu"),popupClassName:Ge},Ze,{key:se,eventKey:Te,disabled:!1,style:ne}),Fe)},$e.setChildrenWidthAndResize=function(){if($e.props.mode!=="horizontal")return;var xe=be.findDOMNode(Object(O.a)($e));if(!xe)return;var Fe=xe.children;if(!Fe||Fe.length===0)return;var ct=xe.children[Fe.length-1];me(ct,"display","inline-block");var tt=$e.getMenuItemNodes(),wt=tt.filter(function(St){return St.className.split(" ").indexOf(X)>=0});wt.forEach(function(St){me(St,"display","inline-block")}),$e.menuItemSizes=tt.map(function(St){return oe(St,!0)}),wt.forEach(function(St){me(St,"display","none")}),$e.overflowedIndicatorWidth=oe(xe.children[xe.children.length-1],!0),$e.originalTotalWidth=$e.menuItemSizes.reduce(function(St,Qe){return St+Qe},0),$e.handleResize(),me(ct,"display","none")},$e.handleResize=function(){if($e.props.mode!=="horizontal")return;var xe=be.findDOMNode(Object(O.a)($e));if(!xe)return;var Fe=oe(xe);$e.overflowedItems=[];var ct=0,tt;$e.originalTotalWidth>Fe+$&&(tt=-1,$e.menuItemSizes.forEach(function(wt){ct+=wt,ct+$e.overflowedIndicatorWidth<=Fe&&(tt+=1)})),$e.setState({lastVisibleIndex:tt})},$e}return Object(B.a)(ut,[{key:"componentDidMount",value:function(){var xe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Fe=be.findDOMNode(this);if(!Fe)return;this.resizeObserver=new Ue.default(function(ct){ct.forEach(function(){var tt=xe.cancelFrameId;cancelAnimationFrame(tt),xe.cancelFrameId=requestAnimationFrame(xe.setChildrenWidthAndResize)})}),[].slice.call(Fe.children).concat(Fe).forEach(function(ct){xe.resizeObserver.observe(ct)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){xe.resizeObserver.disconnect(),[].slice.call(Fe.children).concat(Fe).forEach(function(ct){xe.resizeObserver.observe(ct)}),xe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Fe,{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(xe){var Fe=this,ct=this.state.lastVisibleIndex;return(xe||[]).reduce(function(tt,wt,St){var Qe=wt;if(Fe.props.mode==="horizontal"){var lt=Fe.getOverflowedSubMenuItem(wt.props.eventKey,[]);ct!==void 0&&Fe.props.className.indexOf("".concat(Fe.props.prefixCls,"-root"))!==-1&&(St>ct&&(Qe=A.cloneElement(wt,{style:{display:"none"},eventKey:"".concat(wt.props.eventKey,"-hidden"),className:"".concat(X)})),St===ct+1&&(Fe.overflowedItems=xe.slice(ct+1).map(function(Pt){return A.cloneElement(Pt,{key:Pt.props.eventKey,mode:"vertical-left"})}),lt=Fe.getOverflowedSubMenuItem(wt.props.eventKey,Fe.overflowedItems)));var xt=[].concat(Object(Ee.a)(tt),[lt,Qe]);return St===xe.length-1&&xt.push(Fe.getOverflowedSubMenuItem(wt.props.eventKey,[],!0)),xt}return[].concat(Object(Ee.a)(tt),[Qe])},[])}},{key:"render",value:function(){var xe=this.props,Fe=xe.visible,ct=xe.prefixCls,tt=xe.overflowedIndicator,wt=xe.mode,St=xe.level,Qe=xe.tag,lt=xe.children,xt=xe.theme,Pt=Object(de.a)(xe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),zt=Qe;return A.createElement(zt,Object.assign({},Pt),this.renderChildren(lt))}}]),ut}(A.Component);ge.defaultProps={tag:"div",className:""};var Ae=ge;function at(Ct){return Ct.length?Ct.every(function(st){return!!st.props.disabled}):!0}function Le(Ct,st,ut){var $e=Ct.getState();Ct.setState({activeKey:Object(ae.a)(Object(ae.a)({},$e.activeKey),{},Object(c.a)({},st,ut))})}function Me(Ct){return Ct.eventKey||"0-menu-"}function Xe(Ct,st){var ut=st,$e=Ct.children,xe=Ct.eventKey;if(ut){var Fe;if(H($e,function(ct,tt){ct&&ct.props&&!ct.props.disabled&&ut===K(ct,xe,tt)&&(Fe=!0)}),Fe)return ut}return ut=null,Ct.defaultActiveFirst&&H($e,function(ct,tt){!ut&&ct&&!ct.props.disabled&&(ut=K(ct,xe,tt))}),ut}function et(Ct){if(Ct){var st=this.instanceArray.indexOf(Ct);st!==-1?this.instanceArray[st]=Ct:this.instanceArray.push(Ct)}}var ze=function(Ct){Object(D.a)(ut,Ct);var st=Object(S.a)(ut);function ut($e){var xe;return Object(ee.a)(this,ut),xe=st.call(this,$e),xe.onKeyDown=function(Fe,ct){var tt=Fe.keyCode,wt;if(xe.getFlatInstanceArray().forEach(function(Qe){Qe&&Qe.props.active&&Qe.onKeyDown&&(wt=Qe.onKeyDown(Fe))}),wt)return 1;var St=null;return(tt===s.a.UP||tt===s.a.DOWN)&&(St=xe.step(tt===s.a.UP?-1:1)),St?(Fe.preventDefault(),Le(xe.props.store,Me(xe.props),St.props.eventKey),typeof ct=="function"&&ct(St),1):void 0},xe.onItemHover=function(Fe){var ct=Fe.key,tt=Fe.hover;Le(xe.props.store,Me(xe.props),tt?ct:null)},xe.onDeselect=function(Fe){xe.props.onDeselect(Fe)},xe.onSelect=function(Fe){xe.props.onSelect(Fe)},xe.onClick=function(Fe){xe.props.onClick(Fe)},xe.onOpenChange=function(Fe){xe.props.onOpenChange(Fe)},xe.onDestroy=function(Fe){xe.props.onDestroy(Fe)},xe.getFlatInstanceArray=function(){return xe.instanceArray},xe.step=function(Fe){var ct=xe.getFlatInstanceArray(),tt=xe.props.store.getState().activeKey[Me(xe.props)],wt=ct.length;if(!wt)return null;Fe<0&&(ct=ct.concat().reverse());var St=-1;if(ct.every(function(Pt,zt){return Pt&&Pt.props.eventKey===tt?(St=zt,!1):!0}),!xe.props.defaultActiveFirst&&St!==-1&&at(ct.slice(St,wt-1)))return;var Qe=(St+1)%wt,lt=Qe;do{var xt=ct[lt];if(!xt||xt.props.disabled)lt=(lt+1)%wt;else return xt}while(lt!==Qe);return null},xe.renderCommonMenuItem=function(Fe,ct,tt){var wt=xe.props.store.getState(),St=Object(O.a)(xe),Qe=St.props,lt=K(Fe,Qe.eventKey,ct),xt=Fe.props;if(!xt||typeof Fe.type=="string")return Fe;var Pt=lt===wt.activeKey,zt=Object(ae.a)(Object(ae.a)({mode:xt.mode||Qe.mode,level:Qe.level,inlineIndent:Qe.inlineIndent,renderMenuItem:xe.renderMenuItem,rootPrefixCls:Qe.prefixCls,index:ct,parentMenu:Qe.parentMenu,manualRef:xt.disabled?void 0:Object(n.a)(Fe.ref,et.bind(Object(O.a)(xe))),eventKey:lt,active:!xt.disabled&&Pt,multiple:Qe.multiple,onClick:function(fe){(xt.onClick||k)(fe),xe.onClick(fe)},onItemHover:xe.onItemHover,motion:Qe.motion,subMenuOpenDelay:Qe.subMenuOpenDelay,subMenuCloseDelay:Qe.subMenuCloseDelay,forceSubMenuRender:Qe.forceSubMenuRender,onOpenChange:xe.onOpenChange,onDeselect:xe.onDeselect,onSelect:xe.onSelect,builtinPlacements:Qe.builtinPlacements,itemIcon:xt.itemIcon||xe.props.itemIcon,expandIcon:xt.expandIcon||xe.props.expandIcon},tt),{},{direction:Qe.direction});return(Qe.mode==="inline"||he())&&(zt.triggerSubMenuAction="click"),A.cloneElement(Fe,zt)},xe.renderMenuItem=function(Fe,ct,tt){if(!Fe)return null;var wt=xe.props.store.getState(),St={openKeys:wt.openKeys,selectedKeys:wt.selectedKeys,triggerSubMenuAction:xe.props.triggerSubMenuAction,subMenuKey:tt};return xe.renderCommonMenuItem(Fe,ct,St)},$e.store.setState({activeKey:Object(ae.a)(Object(ae.a)({},$e.store.getState().activeKey),{},Object(c.a)({},$e.eventKey,Xe($e,$e.activeKey)))}),xe.instanceArray=[],xe}return Object(B.a)(ut,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(xe){return this.props.visible||xe.visible||this.props.className!==xe.className||!i()(this.props.style,xe.style)}},{key:"componentDidUpdate",value:function(xe){var Fe=this.props,ct="activeKey"in Fe?Fe.activeKey:Fe.store.getState().activeKey[Me(Fe)],tt=Xe(Fe,ct);if(tt!==ct)Le(Fe.store,Me(Fe),tt);else if("activeKey"in xe){var wt=Xe(xe,xe.activeKey);tt!==wt&&Le(Fe.store,Me(Fe),tt)}}},{key:"render",value:function(){var xe=this,Fe=Object(p.a)({},this.props);this.instanceArray=[];var ct=a()(Fe.prefixCls,Fe.className,"".concat(Fe.prefixCls,"-").concat(Fe.mode)),tt={className:ct,role:Fe.role||"menu"};Fe.id&&(tt.id=Fe.id),Fe.focusable&&(tt.tabIndex=0,tt.onKeyDown=this.onKeyDown);var wt=Fe.prefixCls,St=Fe.eventKey,Qe=Fe.visible,lt=Fe.level,xt=Fe.mode,Pt=Fe.overflowedIndicator,zt=Fe.theme;return re.forEach(function(Se){return delete Fe[Se]}),delete Fe.onClick,A.createElement(Ae,Object.assign({},Fe,{prefixCls:wt,mode:xt,tag:"ul",level:lt,theme:zt,visible:Qe,overflowedIndicator:Pt},tt),A.Children.map(Fe.children,function(Se,fe){return xe.renderMenuItem(Se,fe,St||"0-menu-")}))}}]),ut}(A.Component);ze.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:k};var Ke=Object(C.b)()(ze),Pe=Ke,Ie=z("Kwbf");function Ce(Ct,st,ut){var $e=Ct.prefixCls,xe=Ct.motion,Fe=Ct.defaultMotions,ct=Fe===void 0?{}:Fe,tt=Ct.openAnimation,wt=Ct.openTransitionName,St=st.switchingModeFromInline;if(xe)return xe;if(Object(r.a)(tt)==="object"&&tt)Object(Ie.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof tt=="string")return{motionName:"".concat($e,"-open-").concat(tt)};if(wt)return{motionName:wt};var Qe=ct[ut];return Qe||(St?null:ct.other)}var pe=function(Ct){Object(D.a)(ut,Ct);var st=Object(S.a)(ut);function ut($e){var xe;Object(ee.a)(this,ut),xe=st.call(this,$e),xe.inlineOpenKeys=[],xe.onSelect=function(tt){var wt=Object(O.a)(xe),St=wt.props;if(St.selectable){var Qe=xe.store.getState(),lt=Qe.selectedKeys,xt=tt.key;St.multiple?lt=lt.concat([xt]):lt=[xt],"selectedKeys"in St||xe.store.setState({selectedKeys:lt}),St.onSelect(Object(ae.a)(Object(ae.a)({},tt),{},{selectedKeys:lt}))}},xe.onClick=function(tt){var wt=xe.getRealMenuMode(),St=Object(O.a)(xe),Qe=St.store,lt=St.props.onOpenChange;wt!=="inline"&&!("openKeys"in xe.props)&&(Qe.setState({openKeys:[]}),lt([])),xe.props.onClick(tt)},xe.onKeyDown=function(tt,wt){xe.innerMenu.getWrappedInstance().onKeyDown(tt,wt)},xe.onOpenChange=function(tt){var wt=Object(O.a)(xe),St=wt.props,Qe=xe.store.getState().openKeys.concat(),lt=!1,xt=function(zt){var Se=!1;if(zt.open)Se=Qe.indexOf(zt.key)===-1,Se&&Qe.push(zt.key);else{var fe=Qe.indexOf(zt.key);Se=fe!==-1,Se&&Qe.splice(fe,1)}lt=lt||Se};Array.isArray(tt)?tt.forEach(xt):xt(tt),lt&&("openKeys"in xe.props||xe.store.setState({openKeys:Qe}),St.onOpenChange(Qe))},xe.onDeselect=function(tt){var wt=Object(O.a)(xe),St=wt.props;if(St.selectable){var Qe=xe.store.getState().selectedKeys.concat(),lt=tt.key,xt=Qe.indexOf(lt);xt!==-1&&Qe.splice(xt,1),"selectedKeys"in St||xe.store.setState({selectedKeys:Qe}),St.onDeselect(Object(ae.a)(Object(ae.a)({},tt),{},{selectedKeys:Qe}))}},xe.onMouseEnter=function(tt){xe.restoreModeVerticalFromInline();var wt=xe.props.onMouseEnter;wt&&wt(tt)},xe.onTransitionEnd=function(tt){var wt=tt.propertyName==="width"&&tt.target===tt.currentTarget,St=tt.target.className,Qe=Object.prototype.toString.call(St)==="[object SVGAnimatedString]"?St.animVal:St,lt=tt.propertyName==="font-size"&&Qe.indexOf("anticon")>=0;(wt||lt)&&xe.restoreModeVerticalFromInline()},xe.setInnerMenu=function(tt){xe.innerMenu=tt},xe.isRootMenu=!0;var Fe=$e.defaultSelectedKeys,ct=$e.defaultOpenKeys;return"selectedKeys"in $e&&(Fe=$e.selectedKeys||[]),"openKeys"in $e&&(ct=$e.openKeys||[]),xe.store=Object(C.c)({selectedKeys:Fe,openKeys:ct,activeKey:{"0-menu-":Xe($e,$e.activeKey)}}),xe.state={switchingModeFromInline:!1},xe}return Object(B.a)(ut,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(xe){this.updateOpentKeysWhenSwitchMode(xe),this.updateMiniStore();var Fe=this.props,ct=Fe.siderCollapsed,tt=Fe.inlineCollapsed,wt=Fe.onOpenChange;(!xe.inlineCollapsed&&tt||!xe.siderCollapsed&&ct)&&wt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(xe){var Fe=this.props,ct=this.store,tt=this.inlineOpenKeys,wt=ct.getState(),St={};xe.mode==="inline"&&Fe.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Fe||((Fe.inlineCollapsed&&!xe.inlineCollapsed||Fe.siderCollapsed&&!xe.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=wt.openKeys.concat(),St.openKeys=[]),(!Fe.inlineCollapsed&&xe.inlineCollapsed||!Fe.siderCollapsed&&xe.siderCollapsed)&&(St.openKeys=tt,this.inlineOpenKeys=[])),Object.keys(St).length&&ct.setState(St)}},{key:"updateMenuDisplay",value:function(){var xe=this.props.collapsedWidth,Fe=this.store,ct=this.prevOpenKeys,tt=this.getInlineCollapsed()&&(xe===0||xe==="0"||xe==="0px");tt?(this.prevOpenKeys=Fe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ct&&(this.store.setState({openKeys:ct}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var xe=this.props.mode,Fe=this.state.switchingModeFromInline,ct=this.getInlineCollapsed();return Fe&&ct?"inline":ct?"vertical":xe}},{key:"getInlineCollapsed",value:function(){var xe=this.props,Fe=xe.inlineCollapsed,ct=xe.siderCollapsed;return ct!==void 0?ct:Fe}},{key:"restoreModeVerticalFromInline",value:function(){var xe=this.state.switchingModeFromInline;xe&&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 xe=Object(ae.a)({},Object(h.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Fe=this.getRealMenuMode();return xe.className+=" ".concat(xe.prefixCls,"-root"),xe.direction==="rtl"&&(xe.className+=" ".concat(xe.prefixCls,"-rtl")),xe=Object(ae.a)(Object(ae.a)({},xe),{},{mode:Fe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ce(this.props,this.state,Fe)}),delete xe.openAnimation,delete xe.openTransitionName,A.createElement(C.a,{store:this.store},A.createElement(Pe,Object.assign({},xe,{ref:this.setInnerMenu}),this.props.children))}}]),ut}(A.Component);pe.defaultProps={selectable:!0,onClick:k,onSelect:k,onOpenChange:k,onDeselect:k,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:A.createElement("span",null,"\xB7\xB7\xB7")};var _e=pe,Oe=function(Ct){Object(D.a)(ut,Ct);var st=Object(S.a)(ut);function ut(){var $e;return Object(ee.a)(this,ut),$e=st.apply(this,arguments),$e.onKeyDown=function(xe){var Fe=xe.keyCode;return Fe===s.a.ENTER?($e.onClick(xe),!0):void 0},$e.onMouseLeave=function(xe){var Fe=$e.props,ct=Fe.eventKey,tt=Fe.onItemHover,wt=Fe.onMouseLeave;tt({key:ct,hover:!1}),wt({key:ct,domEvent:xe})},$e.onMouseEnter=function(xe){var Fe=$e.props,ct=Fe.eventKey,tt=Fe.onItemHover,wt=Fe.onMouseEnter;tt({key:ct,hover:!0}),wt({key:ct,domEvent:xe})},$e.onClick=function(xe){var Fe=$e.props,ct=Fe.eventKey,tt=Fe.multiple,wt=Fe.onClick,St=Fe.onSelect,Qe=Fe.onDeselect,lt=Fe.isSelected,xt={key:ct,keyPath:[ct],item:Object(O.a)($e),domEvent:xe};wt(xt),tt?lt?Qe(xt):St(xt):lt||St(xt)},$e.saveNode=function(xe){$e.node=xe},$e}return Object(B.a)(ut,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var xe=this.props;xe.onDestroy&&xe.onDestroy(xe.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 xe,Fe=Object(ae.a)({},this.props),ct=a()(this.getPrefixCls(),Fe.className,(xe={},Object(c.a)(xe,this.getActiveClassName(),!Fe.disabled&&Fe.active),Object(c.a)(xe,this.getSelectedClassName(),Fe.isSelected),Object(c.a)(xe,this.getDisabledClassName(),Fe.disabled),xe)),tt=Object(ae.a)(Object(ae.a)({},Fe.attribute),{},{title:typeof Fe.title=="string"?Fe.title:void 0,className:ct,role:Fe.role||"menuitem","aria-disabled":Fe.disabled});Fe.role==="option"?tt=Object(ae.a)(Object(ae.a)({},tt),{},{role:"option","aria-selected":Fe.isSelected}):(Fe.role===null||Fe.role==="none")&&(tt.role="none");var wt={onClick:Fe.disabled?null:this.onClick,onMouseLeave:Fe.disabled?null:this.onMouseLeave,onMouseEnter:Fe.disabled?null:this.onMouseEnter},St=Object(ae.a)({},Fe.style);Fe.mode==="inline"&&(Fe.direction==="rtl"?St.paddingRight=Fe.inlineIndent*Fe.level:St.paddingLeft=Fe.inlineIndent*Fe.level),re.forEach(function(lt){return delete Fe[lt]}),delete Fe.direction;var Qe=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Qe=A.createElement(this.props.itemIcon,this.props)),A.createElement("li",Object.assign({},Object(h.default)(Fe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),tt,wt,{style:St,ref:this.saveNode}),Fe.children,Qe)}}]),ut}(A.Component);Oe.isMenuItem=!0,Oe.defaultProps={onSelect:k,onMouseEnter:k,onMouseLeave:k,manualRef:k};var we=Object(C.b)(function(Ct,st){var ut=Ct.activeKey,$e=Ct.selectedKeys,xe=st.eventKey,Fe=st.subMenuKey;return{active:ut[Fe]===xe,isSelected:$e.indexOf(xe)!==-1}})(Oe),Be=we,qe=function(Ct){Object(D.a)(ut,Ct);var st=Object(S.a)(ut);function ut(){var $e;return Object(ee.a)(this,ut),$e=st.apply(this,arguments),$e.renderInnerMenuItem=function(xe){var Fe=$e.props,ct=Fe.renderMenuItem,tt=Fe.index;return ct(xe,tt,$e.props.subMenuKey)},$e}return Object(B.a)(ut,[{key:"render",value:function(){var xe=Object(p.a)({},this.props),Fe=xe.className,ct=Fe===void 0?"":Fe,tt=xe.rootPrefixCls,wt="".concat(tt,"-item-group-title"),St="".concat(tt,"-item-group-list"),Qe=xe.title,lt=xe.children;return re.forEach(function(xt){return delete xe[xt]}),delete xe.onClick,delete xe.direction,A.createElement("li",Object.assign({},xe,{className:"".concat(ct," ").concat(tt,"-item-group")}),A.createElement("div",{className:wt,title:typeof Qe=="string"?Qe:void 0},Qe),A.createElement("ul",{className:St},A.Children.map(lt,this.renderInnerMenuItem)))}}]),ut}(A.Component);qe.isMenuItemGroup=!0,qe.defaultProps={disabled:!0};var dt=qe,Et=function(st){var ut=st.className,$e=st.rootPrefixCls,xe=st.style;return A.createElement("li",{className:"".concat(ut," ").concat($e,"-item-divider"),style:xe})};Et.defaultProps={disabled:!0,className:"",style:{}};var It=Et,Rt=We.e=_e},"3tLw":function(Ye,We,z){Ye.exports=z.p+"static/a.39070d50.svg"},"4xil":function(Ye,We,z){Ye.exports={watermark:"watermark___2DVjg",videovideo:"videovideo___3jScv",animate__loop:"animate__loop___36IZ1",upDown:"upDown___3FGkz",container:"container___GV_Ds","video-container":"video-container___35tqx","video-controls":"video-controls___u99fM",hide:"hide___2GDit","video-progress":"video-progress___2LKQJ",seek:"seek___3b-US","seek-tooltip":"seek-tooltip___bZ9sZ","bottom-controls":"bottom-controls___74sQw","left-controls":"left-controls___2kBb3","right-controls":"right-controls___3oxDi","volume-controls":"volume-controls___QLaWH","fullscreen-button":"fullscreen-button___2nHzc","fullscreen-button1":"fullscreen-button1___1murk","pip-button":"pip-button___18qQG","playback-animation":"playback-animation___gCL6X",volume:"volume___10eUe",hidden:"hidden___2JBJW"}},"55Ip":function(Ye,We,z){"use strict";z.d(We,"a",function(){return t});var ae=z("Ty5D"),ee=z("dI71"),B=z("cDcd"),O=z.n(B),D=z("YS25"),S=z("17x9"),A=z.n(S),C=z("wx14"),h=z("zLVn"),p=z("9R94"),c=function(x){Object(ee.a)(f,x);function f(){for(var w,T=arguments.length,R=new Array(T),N=0;N<T;N++)R[N]=arguments[N];return w=x.call.apply(x,[this].concat(R))||this,w.history=Object(D.a)(w.props),w}var E=f.prototype;return E.render=function(){return O.a.createElement(ae.c,{history:this.history,children:this.props.children})},f}(O.a.Component),s=function(x){Object(ee.a)(f,x);function f(){for(var w,T=arguments.length,R=new Array(T),N=0;N<T;N++)R[N]=arguments[N];return w=x.call.apply(x,[this].concat(R))||this,w.history=Object(D.b)(w.props),w}var E=f.prototype;return E.render=function(){return O.a.createElement(ae.c,{history:this.history,children:this.props.children})},f}(O.a.Component),n=function(f,E){return typeof f=="function"?f(E):f},o=function(f,E){return typeof f=="string"?Object(D.c)(f,null,null,E):f},i=function(f){return f},l=O.a.forwardRef;typeof l=="undefined"&&(l=i);function a(x){return!!(x.metaKey||x.altKey||x.ctrlKey||x.shiftKey)}var r=l(function(x,f){var E=x.innerRef,w=x.navigate,T=x.onClick,R=Object(h.a)(x,["innerRef","navigate","onClick"]),N=R.target,j=Object(C.a)({},R,{onClick:function(J){try{T&&T(J)}catch(F){throw J.preventDefault(),F}!J.defaultPrevented&&J.button===0&&(!N||N==="_self")&&!a(J)&&(J.preventDefault(),w())}});return i!==l?j.ref=f||E:j.ref=E,O.a.createElement("a",j)}),t=l(function(x,f){var E=x.component,w=E===void 0?r:E,T=x.replace,R=x.to,N=x.innerRef,j=Object(h.a)(x,["component","replace","to","innerRef"]);return O.a.createElement(ae.e.Consumer,null,function(W){W||Object(p.a)(!1);var J=W.history,F=o(n(R,W.location),W.location),k=F?J.createHref(F):"",K=Object(C.a)({},j,{href:k,navigate:function(){var H=n(R,W.location),Q=T?J.replace:J.push;Q(H)}});return i!==l?K.ref=f||N:K.innerRef=N,O.a.createElement(w,K)})});if(!1)var d,v;var y=function(f){return f},b=O.a.forwardRef;typeof b=="undefined"&&(b=y);function g(){for(var x=arguments.length,f=new Array(x),E=0;E<x;E++)f[E]=arguments[E];return f.filter(function(w){return w}).join(" ")}var m=b(function(x,f){var E=x["aria-current"],w=E===void 0?"page":E,T=x.activeClassName,R=T===void 0?"active":T,N=x.activeStyle,j=x.className,W=x.exact,J=x.isActive,F=x.location,k=x.sensitive,K=x.strict,Y=x.style,H=x.to,Q=x.innerRef,re=Object(h.a)(x,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return O.a.createElement(ae.e.Consumer,null,function(oe){oe||Object(p.a)(!1);var me=F||oe.location,he=o(n(H,me),me),Ee=he.pathname,de=Ee&&Ee.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),be=de?Object(ae.f)(me.pathname,{path:de,exact:W,sensitive:k,strict:K}):null,Ue=!!(J?J(be,me):be),Re=Ue?g(j,R):j,De=Ue?Object(C.a)({},Y,{},N):Y,je=Object(C.a)({"aria-current":Ue&&w||null,className:Re,style:De,to:he},re);return y!==b?je.ref=f||Q:je.innerRef=Q,O.a.createElement(t,je)})});if(!1)var _},"5VLF":function(Ye,We,z){"use strict";var ae,ee;function B(O,D,S){var A=function(C,h){return O.js_beautify(C,h)};return A.js=O.js_beautify,A.css=D.css_beautify,A.html=S.html_beautify,A.js_beautify=O.js_beautify,A.css_beautify=D.css_beautify,A.html_beautify=S.html_beautify,A}!(ae=[z("6UM0"),z("TXwP"),z("psGv")],ee=function(O,D,S){return B(O,D,S)}.apply(We,ae),ee!==void 0&&(Ye.exports=ee))},"5nXd":function(Ye,We,z){var ae=z("MFOe"),ee=ae.slice,B=ae.pluck,O=ae.each,D=ae.bind,S=ae.create,A=ae.isList,C=ae.isFunction,h=ae.isObject;Ye.exports={createStore:s};var p={version:"2.0.12",enabled:!1,get:function(n,o){var i=this.storage.read(this._namespacePrefix+n);return this._deserialize(i,o)},set:function(n,o){return o===void 0?this.remove(n):(this.storage.write(this._namespacePrefix+n,this._serialize(o)),o)},remove:function(n){this.storage.remove(this._namespacePrefix+n)},each:function(n){var o=this;this.storage.each(function(i,l){n.call(o,o._deserialize(i),(l||"").replace(o._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(n){return this._namespacePrefix=="__storejs_"+n+"_"},createStore:function(){return s.apply(this,arguments)},addPlugin:function(n){this._addPlugin(n)},namespace:function(n){return s(this.storage,this.plugins,n)}};function c(){var n=typeof console=="undefined"?null:console;if(!n)return;var o=n.warn?n.warn:n.log;o.apply(n,arguments)}function s(n,o,i){i||(i=""),n&&!A(n)&&(n=[n]),o&&!A(o)&&(o=[o]);var l=i?"__storejs_"+i+"_":"",a=i?new RegExp("^"+l):null,r=/^[a-zA-Z0-9_\-]*$/;if(!r.test(i))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var t={_namespacePrefix:l,_namespaceRegexp:a,_testStorage:function(v){try{var y="__storejs__test__";v.write(y,y);var b=v.read(y)===y;return v.remove(y),b}catch(g){return!1}},_assignPluginFnProp:function(v,y){var b=this[y];this[y]=function(){var m=ee(arguments,0),_=this;function x(){return b?(O(arguments,function(E,w){m[w]=E}),b.apply(_,m)):void 0}var f=[x].concat(m);return v.apply(_,f)}},_serialize:function(v){return JSON.stringify(v)},_deserialize:function(v,y){if(!v)return y;var b="";try{b=JSON.parse(v)}catch(g){b=v}return b!==void 0?b:y},_addStorage:function(v){if(this.enabled)return;this._testStorage(v)&&(this.storage=v,this.enabled=!0)},_addPlugin:function(v){var y=this;if(A(v)){O(v,function(m){y._addPlugin(m)});return}var b=B(this.plugins,function(m){return v===m});if(b)return;if(this.plugins.push(v),!C(v))throw new Error("Plugins must be function values that return objects");var g=v.call(this);if(!h(g))throw new Error("Plugins must return an object of function properties");O(g,function(m,_){if(!C(m))throw new Error("Bad plugin property: "+_+" from plugin "+v.name+". Plugins should only return functions.");y._assignPluginFnProp(m,_)})},addStorage:function(v){c("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(v)}},d=S(t,p,{plugins:[]});return d.raw={},O(d,function(v,y){C(v)&&(d.raw[y]=D(d,v))}),O(n,function(v){d._addStorage(v)}),O(o,function(v){d._addPlugin(v)}),d}},"6+eU":function(Ye,We,z){"use strict";z.d(We,"a",function(){return b});var ae=z("wx14"),ee=z("rePB"),B=z("VTBJ"),O=z("1OyB"),D=z("vuIU"),S=z("Ji7U"),A=z("LK+K"),C=z("cDcd"),h=z.n(C),p=z("TSYQ"),c=z.n(p),s=function(m){var _,x="".concat(m.rootPrefixCls,"-item"),f=c()(x,"".concat(x,"-").concat(m.page),(_={},Object(ee.a)(_,"".concat(x,"-active"),m.active),Object(ee.a)(_,m.className,!!m.className),Object(ee.a)(_,"".concat(x,"-disabled"),!m.page),_)),E=function(){m.onClick(m.page)},w=function(R){m.onKeyPress(R,m.onClick,m.page)};return h.a.createElement("li",{title:m.showTitle?m.page:null,className:f,onClick:E,onKeyPress:w,tabIndex:"0"},m.itemRender(m.page,"page",h.a.createElement("a",{rel:"nofollow"},m.page)))},n=s,o={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},i=function(g){Object(S.a)(_,g);var m=Object(A.a)(_);function _(){var x;Object(O.a)(this,_);for(var f=arguments.length,E=new Array(f),w=0;w<f;w++)E[w]=arguments[w];return x=m.call.apply(m,[this].concat(E)),x.state={goInputText:""},x.buildOptionText=function(T){return"".concat(T," ").concat(x.props.locale.items_per_page)},x.changeSize=function(T){x.props.changeSize(Number(T))},x.handleChange=function(T){x.setState({goInputText:T.target.value})},x.handleBlur=function(T){var R=x.props,N=R.goButton,j=R.quickGo,W=R.rootPrefixCls,J=x.state.goInputText;if(N||J==="")return;if(T.relatedTarget&&(T.relatedTarget.className.indexOf("".concat(W,"-prev"))>=0||T.relatedTarget.className.indexOf("".concat(W,"-next"))>=0))return;x.setState({goInputText:""}),j(x.getValidValue())},x.go=function(T){var R=x.state.goInputText;if(R==="")return;(T.keyCode===o.ENTER||T.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(D.a)(_,[{key:"getValidValue",value:function(){var f=this.state,E=f.goInputText,w=f.current;return!E||isNaN(E)?w:Number(E)}},{key:"getPageSizeOptions",value:function(){var f=this.props,E=f.pageSize,w=f.pageSizeOptions;return w.some(function(T){return T.toString()===E.toString()})?w:w.concat([E.toString()]).sort(function(T,R){var N=isNaN(Number(T))?0:Number(T),j=isNaN(Number(R))?0:Number(R);return N-j})}},{key:"render",value:function(){var f=this,E=this.props,w=E.pageSize,T=E.locale,R=E.rootPrefixCls,N=E.changeSize,j=E.quickGo,W=E.goButton,J=E.selectComponentClass,F=E.buildOptionText,k=E.selectPrefixCls,K=E.disabled,Y=this.state.goInputText,H="".concat(R,"-options"),Q=J,re=null,oe=null,me=null;if(!N&&!j)return null;var he=this.getPageSizeOptions();if(N&&Q){var Ee=he.map(function(de,be){return h.a.createElement(Q.Option,{key:be,value:de.toString()},(F||f.buildOptionText)(de))});re=h.a.createElement(Q,{disabled:K,prefixCls:k,showSearch:!1,className:"".concat(H,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(w||he[0]).toString(),onChange:this.changeSize,getPopupContainer:function(be){return be.parentNode}},Ee)}return j&&(W&&(me=typeof W=="boolean"?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:K,className:"".concat(H,"-quick-jumper-button")},T.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},W)),oe=h.a.createElement("div",{className:"".concat(H,"-quick-jumper")},T.jump_to,h.a.createElement("input",{disabled:K,type:"text",value:Y,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),T.page,me)),h.a.createElement("li",{className:"".concat(H)},re,oe)}}]),_}(h.a.Component);i.defaultProps={pageSizeOptions:["10","20","50","100"]};var l=i,a=z("N2Kk");function r(){}function t(g){return typeof g=="number"&&isFinite(g)&&Math.floor(g)===g}function d(g,m,_){return _}function v(g,m,_){var x=typeof g=="undefined"?m.pageSize:g;return Math.floor((_.total-1)/x)+1}var y=function(g){Object(S.a)(_,g);var m=Object(A.a)(_);function _(x){var f;Object(O.a)(this,_),f=m.call(this,x),f.getJumpPrevPage=function(){return Math.max(1,f.state.current-(f.props.showLessItems?3:5))},f.getJumpNextPage=function(){return Math.min(v(void 0,f.state,f.props),f.state.current+(f.props.showLessItems?3:5))},f.getItemIcon=function(N,j){var W=f.props.prefixCls,J=N||h.a.createElement("button",{type:"button","aria-label":j,className:"".concat(W,"-item-link")});return typeof N=="function"&&(J=h.a.createElement(N,Object(B.a)({},f.props))),J},f.savePaginationNode=function(N){f.paginationNode=N},f.isValid=function(N){return t(N)&&N!==f.state.current},f.shouldDisplayQuickJumper=function(){var N=f.props,j=N.showQuickJumper,W=N.pageSize,J=N.total;return J<=W?!1:j},f.handleKeyDown=function(N){(N.keyCode===o.ARROW_UP||N.keyCode===o.ARROW_DOWN)&&N.preventDefault()},f.handleKeyUp=function(N){var j=f.getValidValue(N),W=f.state.currentInputValue;j!==W&&f.setState({currentInputValue:j}),N.keyCode===o.ENTER?f.handleChange(j):N.keyCode===o.ARROW_UP?f.handleChange(j-1):N.keyCode===o.ARROW_DOWN&&f.handleChange(j+1)},f.changePageSize=function(N){var j=f.state.current,W=v(N,f.state,f.props);j=j>W?W:j,W===0&&(j=f.state.current),typeof N=="number"&&("pageSize"in f.props||f.setState({pageSize:N}),"current"in f.props||f.setState({current:j,currentInputValue:j})),f.props.onShowSizeChange(j,N),"onChange"in f.props&&f.props.onChange&&f.props.onChange(j,N)},f.handleChange=function(N){var j=f.props.disabled,W=N;if(f.isValid(W)&&!j){var J=v(void 0,f.state,f.props);W>J?W=J:W<1&&(W=1),"current"in f.props||f.setState({current:W,currentInputValue:W});var F=f.state.pageSize;return f.props.onChange(W,F),W}return f.state.current},f.prev=function(){f.hasPrev()&&f.handleChange(f.state.current-1)},f.next=function(){f.hasNext()&&f.handleChange(f.state.current+1)},f.jumpPrev=function(){f.handleChange(f.getJumpPrevPage())},f.jumpNext=function(){f.handleChange(f.getJumpNextPage())},f.hasPrev=function(){return f.state.current>1},f.hasNext=function(){return f.state.current<v(void 0,f.state,f.props)},f.runIfEnter=function(N,j){if(N.key==="Enter"||N.charCode===13){for(var W=arguments.length,J=new Array(W>2?W-2:0),F=2;F<W;F++)J[F-2]=arguments[F];j.apply(void 0,J)}},f.runIfEnterPrev=function(N){f.runIfEnter(N,f.prev)},f.runIfEnterNext=function(N){f.runIfEnter(N,f.next)},f.runIfEnterJumpPrev=function(N){f.runIfEnter(N,f.jumpPrev)},f.runIfEnterJumpNext=function(N){f.runIfEnter(N,f.jumpNext)},f.handleGoTO=function(N){(N.keyCode===o.ENTER||N.type==="click")&&f.handleChange(f.state.currentInputValue)};var E=x.onChange!==r,w="current"in x;w&&!E&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var T=x.defaultCurrent;"current"in x&&(T=x.current);var R=x.defaultPageSize;return"pageSize"in x&&(R=x.pageSize),T=Math.min(T,v(R,void 0,x)),f.state={current:T,currentInputValue:T,pageSize:R},f}return Object(D.a)(_,[{key:"componentDidUpdate",value:function(f,E){var w=this.props.prefixCls;if(E.current!==this.state.current&&this.paginationNode){var T=this.paginationNode.querySelector(".".concat(w,"-item-").concat(E.current));T&&document.activeElement===T&&T.blur()}}},{key:"getValidValue",value:function(f){var E=f.target.value,w=v(void 0,this.state,this.props),T=this.state.currentInputValue,R;return E===""?R=E:isNaN(Number(E))?R=T:E>=w?R=w:R=Number(E),R}},{key:"getShowSizeChanger",value:function(){var f=this.props,E=f.showSizeChanger,w=f.total,T=f.totalBoundaryShowSizeChanger;return typeof E!="undefined"?E:w>T}},{key:"renderPrev",value:function(f){var E=this.props,w=E.prevIcon,T=E.itemRender,R=T(f,"prev",this.getItemIcon(w,"prev page")),N=!this.hasPrev();return Object(C.isValidElement)(R)?Object(C.cloneElement)(R,{disabled:N}):R}},{key:"renderNext",value:function(f){var E=this.props,w=E.nextIcon,T=E.itemRender,R=T(f,"next",this.getItemIcon(w,"next page")),N=!this.hasNext();return Object(C.isValidElement)(R)?Object(C.cloneElement)(R,{disabled:N}):R}},{key:"render",value:function(){var f=this,E=this.props,w=E.prefixCls,T=E.className,R=E.style,N=E.disabled,j=E.hideOnSinglePage,W=E.total,J=E.locale,F=E.showQuickJumper,k=E.showLessItems,K=E.showTitle,Y=E.showTotal,H=E.simple,Q=E.itemRender,re=E.showPrevNextJumpers,oe=E.jumpPrevIcon,me=E.jumpNextIcon,he=E.selectComponentClass,Ee=E.selectPrefixCls,de=E.pageSizeOptions,be=this.state,Ue=be.current,Re=be.pageSize,De=be.currentInputValue;if(j===!0&&W<=Re)return null;var je=v(void 0,this.state,this.props),ve=[],ce=null,ke=null,Ne=null,Je=null,te=null,P=F&&F.goButton,U=k?1:2,q=Ue-1>0?Ue-1:0,X=Ue+1<je?Ue+1:je,$=Object.keys(this.props).reduce(function(pe,_e){return(_e.substr(0,5)==="data-"||_e.substr(0,5)==="aria-"||_e==="role")&&(pe[_e]=f.props[_e]),pe},{});if(H)return P&&(typeof P=="boolean"?te=h.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},J.jump_to_confirm):te=h.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},P),te=h.a.createElement("li",{title:K?"".concat(J.jump_to).concat(Ue,"/").concat(je):null,className:"".concat(w,"-simple-pager")},te)),h.a.createElement("ul",Object(ae.a)({className:c()(w,"".concat(w,"-simple"),Object(ee.a)({},"".concat(w,"-disabled"),N),T),style:R,ref:this.savePaginationNode},$),h.a.createElement("li",{title:K?J.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:c()("".concat(w,"-prev"),Object(ee.a)({},"".concat(w,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(q)),h.a.createElement("li",{title:K?"".concat(Ue,"/").concat(je):null,className:"".concat(w,"-simple-pager")},h.a.createElement("input",{type:"text",value:De,disabled:N,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),h.a.createElement("span",{className:"".concat(w,"-slash")},"/"),je),h.a.createElement("li",{title:K?J.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:c()("".concat(w,"-next"),Object(ee.a)({},"".concat(w,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(X)),te);if(je<=3+U*2){var ge={locale:J,rootPrefixCls:w,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:K,itemRender:Q};je||ve.push(h.a.createElement(n,Object(ae.a)({},ge,{key:"noPager",page:je,className:"".concat(w,"-disabled")})));for(var Ae=1;Ae<=je;Ae+=1){var at=Ue===Ae;ve.push(h.a.createElement(n,Object(ae.a)({},ge,{key:Ae,page:Ae,active:at})))}}else{var Le=k?J.prev_3:J.prev_5,Me=k?J.next_3:J.next_5;re&&(ce=h.a.createElement("li",{title:K?Le:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:c()("".concat(w,"-jump-prev"),Object(ee.a)({},"".concat(w,"-jump-prev-custom-icon"),!!oe))},Q(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(oe,"prev page"))),ke=h.a.createElement("li",{title:K?Me:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:c()("".concat(w,"-jump-next"),Object(ee.a)({},"".concat(w,"-jump-next-custom-icon"),!!me))},Q(this.getJumpNextPage(),"jump-next",this.getItemIcon(me,"next page")))),Je=h.a.createElement(n,{locale:J,last:!0,rootPrefixCls:w,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:je,page:je,active:!1,showTitle:K,itemRender:Q}),Ne=h.a.createElement(n,{locale:J,rootPrefixCls:w,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:K,itemRender:Q});var Xe=Math.max(1,Ue-U),et=Math.min(Ue+U,je);Ue-1<=U&&(et=1+U*2),je-Ue<=U&&(Xe=je-U*2);for(var ze=Xe;ze<=et;ze+=1){var Ke=Ue===ze;ve.push(h.a.createElement(n,{locale:J,rootPrefixCls:w,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ze,page:ze,active:Ke,showTitle:K,itemRender:Q}))}Ue-1>=U*2&&Ue!==1+2&&(ve[0]=Object(C.cloneElement)(ve[0],{className:"".concat(w,"-item-after-jump-prev")}),ve.unshift(ce)),je-Ue>=U*2&&Ue!==je-2&&(ve[ve.length-1]=Object(C.cloneElement)(ve[ve.length-1],{className:"".concat(w,"-item-before-jump-next")}),ve.push(ke)),Xe!==1&&ve.unshift(Ne),et!==je&&ve.push(Je)}var Pe=null;Y&&(Pe=h.a.createElement("li",{className:"".concat(w,"-total-text")},Y(W,[W===0?0:(Ue-1)*Re+1,Ue*Re>W?W:Ue*Re])));var Ie=!this.hasPrev()||!je,Ce=!this.hasNext()||!je;return h.a.createElement("ul",Object(ae.a)({className:c()(w,T,Object(ee.a)({},"".concat(w,"-disabled"),N)),style:R,unselectable:"unselectable",ref:this.savePaginationNode},$),Pe,h.a.createElement("li",{title:K?J.prev_page:null,onClick:this.prev,tabIndex:Ie?null:0,onKeyPress:this.runIfEnterPrev,className:c()("".concat(w,"-prev"),Object(ee.a)({},"".concat(w,"-disabled"),Ie)),"aria-disabled":Ie},this.renderPrev(q)),ve,h.a.createElement("li",{title:K?J.next_page:null,onClick:this.next,tabIndex:Ce?null:0,onKeyPress:this.runIfEnterNext,className:c()("".concat(w,"-next"),Object(ee.a)({},"".concat(w,"-disabled"),Ce)),"aria-disabled":Ce},this.renderNext(X)),h.a.createElement(l,{disabled:N,locale:J,rootPrefixCls:w,selectComponentClass:he,selectPrefixCls:Ee,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ue,pageSize:Re,pageSizeOptions:de,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:P}))}}],[{key:"getDerivedStateFromProps",value:function(f,E){var w={};if("current"in f&&(w.current=f.current,f.current!==E.current&&(w.currentInputValue=w.current)),"pageSize"in f&&f.pageSize!==E.pageSize){var T=E.current,R=v(f.pageSize,E,f);T=T>R?R:T,"current"in f||(w.current=T,w.currentInputValue=T),w.pageSize=f.pageSize}return w}}]),_}(h.a.Component);y.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:r,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:r,locale:a.a,style:{},itemRender:d,totalBoundaryShowSizeChanger:50};var b=y},"6RRn":function(Ye,We,z){"use strict";var ae=z("wCXF"),ee=z("n6Qo");z.d(We,"b",function(){return ee.a});var B=z("IBYe"),O=z("6eGT"),D=z("hW8S");z.d(We,"a",function(){return D.a}),We.c=ae.b},"6UM0":function(Ye,We,z){var ae,ee;(function(){var B;(function(){"use strict";var D=[function(h,p,c){var s=c(1).Beautifier,n=c(5).Options;function o(i,l){var a=new s(i,l);return a.beautify()}h.exports=o,h.exports.defaultOptions=function(){return new n}},function(h,p,c){var s=c(2).Output,n=c(3).Token,o=c(4),i=c(5).Options,l=c(7).Tokenizer,a=c(7).line_starters,r=c(7).positionable_operators,t=c(7).TOKEN;function d(k,K){return K.indexOf(k)!==-1}function v(k){return k.replace(/^\s+/g,"")}function y(k){for(var K={},Y=0;Y<k.length;Y++)K[k[Y].replace(/-/g,"_")]=k[Y];return K}function b(k,K){return k&&k.type===t.RESERVED&&k.text===K}function g(k,K){return k&&k.type===t.RESERVED&&d(k.text,K)}var m=["case","return","do","if","throw","else","await","break","continue","async"],_=["before-newline","after-newline","preserve-newline"],x=y(_),f=[x.before_newline,x.preserve_newline],E={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function w(k,K){if(K.multiline_frame||K.mode===E.ForInitializer||K.mode===E.Conditional)return;k.remove_indent(K.start_line_index)}function T(k){k=k.replace(o.allLineBreaks,`
|
|
|
`);for(var K=[],Y=k.indexOf(`
|
|
|
`);Y!==-1;)K.push(k.substring(0,Y)),k=k.substring(Y+1),Y=k.indexOf(`
|
|
|
`);return k.length&&K.push(k),K}function R(k){return k===E.ArrayLiteral}function N(k){return d(k,[E.Expression,E.ForInitializer,E.Conditional])}function j(k,K){for(var Y=0;Y<k.length;Y++){var H=k[Y].trim();if(H.charAt(0)!==K)return!1}return!0}function W(k,K){for(var Y=0,H=k.length,Q;Y<H;Y++)if(Q=k[Y],Q&&Q.indexOf(K)!==0)return!1;return!0}function J(k,K){K=K||{},this._source_text=k||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new i(K)}J.prototype.create_flags=function(k,K){var Y=0;k&&(Y=k.indentation_level,!this._output.just_added_newline()&&k.line_indent_level>Y&&(Y=k.line_indent_level));var H={mode:K,parent:k,last_token:k?k.last_token:new n(t.START_BLOCK,""),last_word:k?k.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:Y,alignment:0,line_indent_level:k?k.line_indent_level:Y,start_line_index:this._output.get_line_number(),ternary_depth:0};return H},J.prototype._reset=function(k){var K=k.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new s(this._options,K),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(E.BlockStatement);var Y=new l(k,this._options);return this._tokens=Y.tokenize(),k},J.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k,K=this._reset(this._source_text),Y=this._options.eol;this._options.eol==="auto"&&(Y=`
|
|
|
`,K&&o.lineBreak.test(K||"")&&(Y=K.match(o.lineBreak)[0]));for(var H=this._tokens.next();H;)this.handle_token(H),this._last_last_text=this._flags.last_token.text,this._flags.last_token=H,H=this._tokens.next();return k=this._output.get_code(Y),k},J.prototype.handle_token=function(k,K){k.type===t.START_EXPR?this.handle_start_expr(k):k.type===t.END_EXPR?this.handle_end_expr(k):k.type===t.START_BLOCK?this.handle_start_block(k):k.type===t.END_BLOCK?this.handle_end_block(k):k.type===t.WORD?this.handle_word(k):k.type===t.RESERVED?this.handle_word(k):k.type===t.SEMICOLON?this.handle_semicolon(k):k.type===t.STRING?this.handle_string(k):k.type===t.EQUALS?this.handle_equals(k):k.type===t.OPERATOR?this.handle_operator(k):k.type===t.COMMA?this.handle_comma(k):k.type===t.BLOCK_COMMENT?this.handle_block_comment(k,K):k.type===t.COMMENT?this.handle_comment(k,K):k.type===t.DOT?this.handle_dot(k):k.type===t.EOF?this.handle_eof(k):k.type===t.UNKNOWN?this.handle_unknown(k,K):this.handle_unknown(k,K)},J.prototype.handle_whitespace_and_comments=function(k,K){var Y=k.newlines,H=this._options.keep_array_indentation&&R(this._flags.mode);if(k.comments_before)for(var Q=k.comments_before.next();Q;)this.handle_whitespace_and_comments(Q,K),this.handle_token(Q,K),Q=k.comments_before.next();if(H)for(var re=0;re<Y;re+=1)this.print_newline(re>0,K);else if(this._options.max_preserve_newlines&&Y>this._options.max_preserve_newlines&&(Y=this._options.max_preserve_newlines),this._options.preserve_newlines&&Y>1){this.print_newline(!1,K);for(var oe=1;oe<Y;oe+=1)this.print_newline(!0,K)}};var F=["async","break","continue","return","throw","yield"];J.prototype.allow_wrap_or_preserved_newline=function(k,K){if(K=K===void 0?!1:K,this._output.just_added_newline())return;var Y=this._options.preserve_newlines&&k.newlines||K,H=d(this._flags.last_token.text,r)||d(k.text,r);if(H){var Q=d(this._flags.last_token.text,r)&&d(this._options.operator_position,f)||d(k.text,r);Y=Y&&Q}if(Y)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(g(this._flags.last_token,F))return;this._output.set_wrap_point()}},J.prototype.print_newline=function(k,K){if(!K&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==t.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var Y=this._tokens.peek();this._flags.mode===E.Statement&&!(this._flags.if_block&&b(Y,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(k)&&(this._flags.multiline_frame=!0)},J.prototype.print_token_line_indentation=function(k){this._output.just_added_newline()&&(this._options.keep_array_indentation&&k.newlines&&(k.text==="["||R(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(k.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},J.prototype.print_token=function(k){if(this._output.raw){this._output.add_raw_token(k);return}if(this._options.comma_first&&k.previous&&k.previous.type===t.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var K=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(K),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(k),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(k),this._output.non_breaking_space=!0,this._output.add_token(k.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},J.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},J.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},J.prototype.set_mode=function(k){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,k),this._flags=this.create_flags(this._previous_flags,k),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},J.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===E.Statement&&w(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},J.prototype.start_of_object_property=function(){return this._flags.parent.mode===E.ObjectLiteral&&this._flags.mode===E.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||g(this._flags.last_token,["get","set"]))},J.prototype.start_of_statement=function(k){var K=!1;return K=K||g(this._flags.last_token,["var","let","const"])&&k.type===t.WORD,K=K||b(this._flags.last_token,"do"),K=K||!(this._flags.parent.mode===E.ObjectLiteral&&this._flags.mode===E.Statement)&&g(this._flags.last_token,F)&&!k.newlines,K=K||b(this._flags.last_token,"else")&&!(b(k,"if")&&!k.comments_before),K=K||this._flags.last_token.type===t.END_EXPR&&(this._previous_flags.mode===E.ForInitializer||this._previous_flags.mode===E.Conditional),K=K||this._flags.last_token.type===t.WORD&&this._flags.mode===E.BlockStatement&&!this._flags.in_case&&!(k.text==="--"||k.text==="++")&&this._last_last_text!=="function"&&k.type!==t.WORD&&k.type!==t.RESERVED,K=K||this._flags.mode===E.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||g(this._flags.last_token,["get","set"])),K?(this.set_mode(E.Statement),this.indent(),this.handle_whitespace_and_comments(k,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k,g(k,["do","for","if","while"])),!0):!1},J.prototype.handle_start_expr=function(k){this.start_of_statement(k)||this.handle_whitespace_and_comments(k);var K=E.Expression;if(k.text==="["){if(this._flags.last_token.type===t.WORD||this._flags.last_token.text===")"){g(this._flags.last_token,a)&&(this._output.space_before_token=!0),this.print_token(k),this.set_mode(K),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}K=E.ArrayLiteral,R(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),d(this._flags.last_token.type,[t.START_EXPR,t.END_EXPR,t.WORD,t.OPERATOR,t.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===t.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,K=E.ForInitializer):d(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,K=E.Conditional):d(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&k.whitespace_before===""?this._output.space_before_token=!1:(d(this._flags.last_token.text,a)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===t.EQUALS||this._flags.last_token.type===t.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k);else if(this._flags.last_token.type===t.WORD){this._output.space_before_token=!1;var Y=this._tokens.peek(-3);if(this._options.space_after_named_function&&Y){var H=this._tokens.peek(-4);g(Y,["async","function"])||Y.text==="*"&&g(H,["async","function"])?this._output.space_before_token=!0:this._flags.mode===E.ObjectLiteral?(Y.text==="{"||Y.text===","||Y.text==="*"&&(H.text==="{"||H.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(k);(this._flags.last_token.type===t.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(d(this._last_last_text,["function","yield"])||this._flags.mode===E.ObjectLiteral&&d(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===t.START_BLOCK?this.print_newline():(this._flags.last_token.type===t.END_EXPR||this._flags.last_token.type===t.START_EXPR||this._flags.last_token.type===t.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===t.COMMA)&&this.allow_wrap_or_preserved_newline(k,k.newlines),this.print_token(k),this.set_mode(K),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},J.prototype.handle_end_expr=function(k){for(;this._flags.mode===E.Statement;)this.restore_mode();this.handle_whitespace_and_comments(k),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(k,k.text==="]"&&R(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===t.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(k),this.restore_mode(),w(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===E.Conditional&&(this._previous_flags.mode=E.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},J.prototype.handle_start_block=function(k){this.handle_whitespace_and_comments(k);var K=this._tokens.peek(),Y=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===t.END_EXPR?(this.set_mode(E.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(E.BlockStatement):Y&&(d(Y.text,[":",","])&&d(K.type,[t.STRING,t.WORD,t.RESERVED])||d(K.text,["get","set","..."])&&d(Y.type,[t.WORD,t.RESERVED]))?d(this._last_last_text,["class","interface"])&&!d(Y.text,[":",","])?this.set_mode(E.BlockStatement):this.set_mode(E.ObjectLiteral):this._flags.last_token.type===t.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(E.BlockStatement):d(this._flags.last_token.type,[t.EQUALS,t.START_EXPR,t.COMMA,t.OPERATOR])||g(this._flags.last_token,["return","throw","import","default"])?this.set_mode(E.ObjectLiteral):this.set_mode(E.BlockStatement),this._flags.last_token&&(g(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var H=!K.comments_before&&K.text==="}",Q=H&&this._flags.last_word==="function"&&this._flags.last_token.type===t.END_EXPR;if(this._options.brace_preserve_inline){var re=0,oe=null;this._flags.inline_frame=!0;do if(re+=1,oe=this._tokens.peek(re-1),oe.newlines){this._flags.inline_frame=!1;break}while(oe.type!==t.EOF&&!(oe.type===t.END_BLOCK&&oe.opened===k))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&k.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==t.OPERATOR&&(Q||this._flags.last_token.type===t.EQUALS||g(this._flags.last_token,m)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(R(this._previous_flags.mode)&&(this._flags.last_token.type===t.START_EXPR||this._flags.last_token.type===t.COMMA)&&((this._flags.last_token.type===t.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===t.COMMA||this._flags.last_token.type===t.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(k),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==t.OPERATOR&&this._flags.last_token.type!==t.START_EXPR&&(this._flags.last_token.type===t.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(k),this.indent(),!H&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},J.prototype.handle_end_block=function(k){for(this.handle_whitespace_and_comments(k);this._flags.mode===E.Statement;)this.restore_mode();var K=this._flags.last_token.type===t.START_BLOCK;this._flags.inline_frame&&!K?this._output.space_before_token=!0:this._options.brace_style==="expand"?K||this.print_newline():K||(R(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(k)},J.prototype.handle_word=function(k){if(k.type===t.RESERVED){if(d(k.text,["set","get"])&&this._flags.mode!==E.ObjectLiteral)k.type=t.WORD;else if(k.text==="import"&&d(this._tokens.peek().text,["(","."]))k.type=t.WORD;else if(d(k.text,["as","from"])&&!this._flags.import_block)k.type=t.WORD;else if(this._flags.mode===E.ObjectLiteral){var K=this._tokens.peek();K.text===":"&&(k.type=t.WORD)}}if(this.start_of_statement(k)?g(this._flags.last_token,["var","let","const"])&&k.type===t.WORD&&(this._flags.declaration_statement=!0):k.newlines&&!N(this._flags.mode)&&(this._flags.last_token.type!==t.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==t.EQUALS&&(this._options.preserve_newlines||!g(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(k),this.print_newline()):this.handle_whitespace_and_comments(k),this._flags.do_block&&!this._flags.do_while)if(b(k,"while")){this._output.space_before_token=!0,this.print_token(k),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&b(k,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===E.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&g(k,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(k),this._flags.in_case=!0;return}if((this._flags.last_token.type===t.COMMA||this._flags.last_token.type===t.START_EXPR||this._flags.last_token.type===t.EQUALS||this._flags.last_token.type===t.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k)),b(k,"function")){(d(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(d(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===t.OPERATOR))&&(!this._output.just_added_blankline()&&!k.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===t.RESERVED||this._flags.last_token.type===t.WORD?g(this._flags.last_token,["get","set","new","export"])||g(this._flags.last_token,F)?this._output.space_before_token=!0:b(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===t.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(N(this._flags.mode)||R(this._flags.mode))||this.print_newline(),this.print_token(k),this._flags.last_word=k.text;return}var Y="NONE";if(this._flags.last_token.type===t.END_BLOCK?this._previous_flags.inline_frame?Y="SPACE":g(k,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&k.newlines?Y="NEWLINE":(Y="SPACE",this._output.space_before_token=!0):Y="NEWLINE":this._flags.last_token.type===t.SEMICOLON&&this._flags.mode===E.BlockStatement?Y="NEWLINE":this._flags.last_token.type===t.SEMICOLON&&N(this._flags.mode)?Y="SPACE":this._flags.last_token.type===t.STRING?Y="NEWLINE":this._flags.last_token.type===t.RESERVED||this._flags.last_token.type===t.WORD||this._flags.last_token.text==="*"&&(d(this._last_last_text,["function","yield"])||this._flags.mode===E.ObjectLiteral&&d(this._last_last_text,["{",","]))?Y="SPACE":this._flags.last_token.type===t.START_BLOCK?this._flags.inline_frame?Y="SPACE":Y="NEWLINE":this._flags.last_token.type===t.END_EXPR&&(this._output.space_before_token=!0,Y="NEWLINE"),g(k,a)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Y="SPACE":Y="NEWLINE"),g(k,["else","catch","finally"]))if((!(this._flags.last_token.type===t.END_BLOCK&&this._previous_flags.mode===E.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&k.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var H=this._output.current_line;H.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Y==="NEWLINE"?g(this._flags.last_token,m)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&g(k,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==t.END_EXPR?(this._flags.last_token.type!==t.START_EXPR||!g(k,["var","let","const"]))&&this._flags.last_token.text!==":"&&(b(k,"if")&&b(k.previous,"else")?this._output.space_before_token=!0:this.print_newline()):g(k,a)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&R(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Y==="SPACE"&&(this._output.space_before_token=!0);k.previous&&(k.previous.type===t.WORD||k.previous.type===t.RESERVED)&&(this._output.space_before_token=!0),this.print_token(k),this._flags.last_word=k.text,k.type===t.RESERVED&&(k.text==="do"?this._flags.do_block=!0:k.text==="if"?this._flags.if_block=!0:k.text==="import"?this._flags.import_block=!0:this._flags.import_block&&b(k,"from")&&(this._flags.import_block=!1))},J.prototype.handle_semicolon=function(k){this.start_of_statement(k)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(k);for(var K=this._tokens.peek();this._flags.mode===E.Statement&&!(this._flags.if_block&&b(K,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(k)},J.prototype.handle_string=function(k){k.text.startsWith("`")&&k.newlines===0&&k.whitespace_before===""&&(k.previous.text===")"||this._flags.last_token.type===t.WORD)||(this.start_of_statement(k)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(k),this._flags.last_token.type===t.RESERVED||this._flags.last_token.type===t.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===t.COMMA||this._flags.last_token.type===t.START_EXPR||this._flags.last_token.type===t.EQUALS||this._flags.last_token.type===t.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k):k.text.startsWith("`")&&this._flags.last_token.type===t.END_EXPR&&(k.previous.text==="]"||k.previous.text===")")&&k.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(k)},J.prototype.handle_equals=function(k){this.start_of_statement(k)||this.handle_whitespace_and_comments(k),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(k),this._output.space_before_token=!0},J.prototype.handle_comma=function(k){this.handle_whitespace_and_comments(k,!0),this.print_token(k),this._output.space_before_token=!0,this._flags.declaration_statement?(N(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(k)):this._flags.mode===E.ObjectLiteral||this._flags.mode===E.Statement&&this._flags.parent.mode===E.ObjectLiteral?(this._flags.mode===E.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(k)},J.prototype.handle_operator=function(k){var K=k.text==="*"&&(g(this._flags.last_token,["function","yield"])||d(this._flags.last_token.type,[t.START_BLOCK,t.COMMA,t.END_BLOCK,t.SEMICOLON])),Y=d(k.text,["-","+"])&&(d(this._flags.last_token.type,[t.START_BLOCK,t.START_EXPR,t.EQUALS,t.OPERATOR])||d(this._flags.last_token.text,a)||this._flags.last_token.text===",");if(!this.start_of_statement(k)){var H=!K;this.handle_whitespace_and_comments(k,H)}if(k.text==="*"&&this._flags.last_token.type===t.DOT){this.print_token(k);return}if(k.text==="::"){this.print_token(k);return}if(this._flags.last_token.type===t.OPERATOR&&d(this._options.operator_position,f)&&this.allow_wrap_or_preserved_newline(k),k.text===":"&&this._flags.in_case){this.print_token(k),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==t.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var Q=!0,re=!0,oe=!1;if(k.text===":"?this._flags.ternary_depth===0?Q=!1:(this._flags.ternary_depth-=1,oe=!0):k.text==="?"&&(this._flags.ternary_depth+=1),!Y&&!K&&this._options.preserve_newlines&&d(k.text,r)){var me=k.text===":",he=me&&oe,Ee=me&&!oe;switch(this._options.operator_position){case x.before_newline:this._output.space_before_token=!Ee,this.print_token(k),(!me||he)&&this.allow_wrap_or_preserved_newline(k),this._output.space_before_token=!0;return;case x.after_newline:this._output.space_before_token=!0,!me||he?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(k):this._output.space_before_token=!1,this.print_token(k),this._output.space_before_token=!0;return;case x.preserve_newline:Ee||this.allow_wrap_or_preserved_newline(k),Q=!(this._output.just_added_newline()||Ee),this._output.space_before_token=Q,this.print_token(k),this._output.space_before_token=!0;return}}if(K){this.allow_wrap_or_preserved_newline(k),Q=!1;var de=this._tokens.peek();re=de&&d(de.type,[t.WORD,t.RESERVED])}else if(k.text==="...")this.allow_wrap_or_preserved_newline(k),Q=this._flags.last_token.type===t.START_BLOCK,re=!1;else if(d(k.text,["--","++","!","~"])||Y){if((this._flags.last_token.type===t.COMMA||this._flags.last_token.type===t.START_EXPR)&&this.allow_wrap_or_preserved_newline(k),Q=!1,re=!1,k.newlines&&(k.text==="--"||k.text==="++"||k.text==="~")){var be=g(this._flags.last_token,m)&&k.newlines;be&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(be,!0)}this._flags.last_token.text===";"&&N(this._flags.mode)&&(Q=!0),this._flags.last_token.type===t.RESERVED?Q=!0:this._flags.last_token.type===t.END_EXPR?Q=!(this._flags.last_token.text==="]"&&(k.text==="--"||k.text==="++")):this._flags.last_token.type===t.OPERATOR&&(Q=d(k.text,["--","-","++","+"])&&d(this._flags.last_token.text,["--","-","++","+"]),d(k.text,["+","-"])&&d(this._flags.last_token.text,["--","++"])&&(re=!0)),(this._flags.mode===E.BlockStatement&&!this._flags.inline_frame||this._flags.mode===E.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Q,this.print_token(k),this._output.space_before_token=re},J.prototype.handle_block_comment=function(k,K){if(this._output.raw){this._output.add_raw_token(k),k.directives&&k.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(k.directives){this.print_newline(!1,K),this.print_token(k),k.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!o.newline.test(k.text)&&!k.newlines){this._output.space_before_token=!0,this.print_token(k),this._output.space_before_token=!0;return}else this.print_block_commment(k,K)},J.prototype.print_block_commment=function(k,K){var Y=T(k.text),H,Q=!1,re=!1,oe=k.whitespace_before,me=oe.length;if(this.print_newline(!1,K),this.print_token_line_indentation(k),this._output.add_token(Y[0]),this.print_newline(!1,K),Y.length>1){for(Y=Y.slice(1),Q=j(Y,"*"),re=W(Y,oe),Q&&(this._flags.alignment=1),H=0;H<Y.length;H++)Q?(this.print_token_line_indentation(k),this._output.add_token(v(Y[H]))):re&&Y[H]?(this.print_token_line_indentation(k),this._output.add_token(Y[H].substring(me))):(this._output.current_line.set_indent(-1),this._output.add_token(Y[H])),this.print_newline(!1,K);this._flags.alignment=0}},J.prototype.handle_comment=function(k,K){k.newlines?this.print_newline(!1,K):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(k),this.print_newline(!1,K)},J.prototype.handle_dot=function(k){this.start_of_statement(k)||this.handle_whitespace_and_comments(k,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),g(this._flags.last_token,m)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(k,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(k)},J.prototype.handle_unknown=function(k,K){this.print_token(k),k.text[k.text.length-1]===`
|
|
|
`&&this.print_newline(!1,K)},J.prototype.handle_eof=function(k){for(;this._flags.mode===E.Statement;)this.restore_mode();this.handle_whitespace_and_comments(k)},h.exports.Beautifier=J},function(h){function p(n){this.__parent=n,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}p.prototype.clone_empty=function(){var n=new p(this.__parent);return n.set_indent(this.__indent_count,this.__alignment_count),n},p.prototype.item=function(n){return n<0?this.__items[this.__items.length+n]:this.__items[n]},p.prototype.has_match=function(n){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(n))return!0;return!1},p.prototype.set_indent=function(n,o){this.is_empty()&&(this.__indent_count=n||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},p.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},p.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},p.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var n=this.__parent.current_line;return n.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),n.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),n.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,n.__items[0]===" "&&(n.__items.splice(0,1),n.__character_count-=1),!0}return!1},p.prototype.is_empty=function(){return this.__items.length===0},p.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},p.prototype.push=function(n){this.__items.push(n);var o=n.lastIndexOf(`
|
|
|
`);o!==-1?this.__character_count=n.length-o:this.__character_count+=n.length},p.prototype.pop=function(){var n=null;return this.is_empty()||(n=this.__items.pop(),this.__character_count-=n.length),n},p.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},p.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},p.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},p.prototype.toString=function(){var n="";return this.is_empty()?this.__parent.indent_empty_lines&&(n=this.__parent.get_indent_string(this.__indent_count)):(n=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),n+=this.__items.join("")),n};function c(n,o){this.__cache=[""],this.__indent_size=n.indent_size,this.__indent_string=n.indent_char,n.indent_with_tabs||(this.__indent_string=new Array(n.indent_size+1).join(n.indent_char)),o=o||"",n.indent_level>0&&(o=new Array(n.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}c.prototype.get_indent_size=function(n,o){var i=this.__base_string_length;return o=o||0,n<0&&(i=0),i+=n*this.__indent_size,i+=o,i},c.prototype.get_indent_string=function(n,o){var i=this.__base_string;return o=o||0,n<0&&(n=0,i=""),o+=n*this.__indent_size,this.__ensure_cache(o),i+=this.__cache[o],i},c.prototype.__ensure_cache=function(n){for(;n>=this.__cache.length;)this.__add_column()},c.prototype.__add_column=function(){var n=this.__cache.length,o=0,i="";this.__indent_size&&n>=this.__indent_size&&(o=Math.floor(n/this.__indent_size),n-=o*this.__indent_size,i=new Array(o+1).join(this.__indent_string)),n&&(i+=new Array(n+1).join(" ")),this.__cache.push(i)};function s(n,o){this.__indent_cache=new c(n,o),this.raw=!1,this._end_with_newline=n.end_with_newline,this.indent_size=n.indent_size,this.wrap_line_length=n.wrap_line_length,this.indent_empty_lines=n.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new p(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(n,o){return this.__indent_cache.get_indent_string(n,o)},s.prototype.get_indent_size=function(n,o){return this.__indent_cache.get_indent_size(n,o)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(n){return this.is_empty()||!n&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(n){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===`
|
|
|
`&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(`
|
|
|
`);return n!==`
|
|
|
`&&(i=i.replace(/[\n]/g,n)),i},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(n,o){return n=n||0,o=o||0,this.next_line.set_indent(n,o),this.__lines.length>1?(this.current_line.set_indent(n,o),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(n){for(var o=0;o<n.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(n.whitespace_before),this.current_line.push(n.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(n){this.__add_space_before_token(),this.current_line.push(n),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},s.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},s.prototype.remove_indent=function(n){for(var o=this.__lines.length;n<o;)this.__lines[n]._remove_indent(),n++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(n){for(n=n===void 0?!1:n,this.current_line.trim();n&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(n,o){for(var i=this.__lines.length-2;i>=0;){var l=this.__lines[i];if(l.is_empty())break;if(l.item(0).indexOf(n)!==0&&l.item(-1)!==o){this.__lines.splice(i+1,0,new p(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},h.exports.Output=s},function(h){function p(c,s,n,o){this.type=c,this.text=s,this.comments_before=null,this.newlines=n||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}h.exports.Token=p},function(h,p){var c="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",s="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",n="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",o="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",i="(?:\\\\u[0-9a-fA-F]{4}|["+c+n+"])",l="(?:\\\\u[0-9a-fA-F]{4}|["+s+n+o+"])*";p.identifier=new RegExp(i+l,"g"),p.identifierStart=new RegExp(i),p.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+s+n+o+"])+");var a=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;p.newline=/[\n\r\u2028\u2029]/,p.lineBreak=new RegExp(`\r
|
|
|
|`+p.newline.source),p.allLineBreaks=new RegExp(p.lineBreak.source,"g")},function(h,p,c){var s=c(6).Options,n=["before-newline","after-newline","preserve-newline"];function o(i){s.call(this,i,"js");var l=this.raw_options.brace_style||null;l==="expand-strict"?this.raw_options.brace_style="expand":l==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var a=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var r=0;r<a.length;r++)a[r]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=a[r];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",n),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}o.prototype=new s,h.exports.Options=o},function(h){function p(n,o){this.raw_options=c(n,o),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}p.prototype._get_array=function(n,o){var i=this.raw_options[n],l=o||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(l=i.concat()):typeof i=="string"&&(l=i.split(/[^a-zA-Z0-9_\/\-]+/)),l},p.prototype._get_boolean=function(n,o){var i=this.raw_options[n],l=i===void 0?!!o:!!i;return l},p.prototype._get_characters=function(n,o){var i=this.raw_options[n],l=o||"";return typeof i=="string"&&(l=i.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),l},p.prototype._get_number=function(n,o){var i=this.raw_options[n];o=parseInt(o,10),isNaN(o)&&(o=0);var l=parseInt(i,10);return isNaN(l)&&(l=o),l},p.prototype._get_selection=function(n,o,i){var l=this._get_selection_list(n,o,i);if(l.length!==1)throw new Error("Invalid Option Value: The option '"+n+`' can only be one of the following values:
|
|
|
`+o+`
|
|
|
You passed in: '`+this.raw_options[n]+"'");return l[0]},p.prototype._get_selection_list=function(n,o,i){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[o[0]],!this._is_valid_selection(i,o))throw new Error("Invalid Default Value!");var l=this._get_array(n,i);if(!this._is_valid_selection(l,o))throw new Error("Invalid Option Value: The option '"+n+`' can contain only the following values:
|
|
|
`+o+`
|
|
|
You passed in: '`+this.raw_options[n]+"'");return l},p.prototype._is_valid_selection=function(n,o){return n.length&&o.length&&!n.some(function(i){return o.indexOf(i)===-1})};function c(n,o){var i={};n=s(n);var l;for(l in n)l!==o&&(i[l]=n[l]);if(o&&n[o])for(l in n[o])i[l]=n[o][l];return i}function s(n){var o={},i;for(i in n){var l=i.replace(/-/g,"_");o[l]=n[i]}return o}h.exports.Options=p,h.exports.normalizeOpts=s,h.exports.mergeOpts=c},function(h,p,c){var s=c(8).InputScanner,n=c(9).Tokenizer,o=c(9).TOKEN,i=c(13).Directives,l=c(4),a=c(12).Pattern,r=c(14).TemplatablePattern;function t(j,W){return W.indexOf(j)!==-1}var d={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},v=new i(/\/\*/,/\*\//),y=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,b=/[0-9]/,g=/[^\d\.]/,m=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),_=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";_=_.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),_="\\?\\.(?!\\d) "+_,_=_.replace(/ /g,"|");var x=new RegExp(_),f="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),E=f.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),w=new RegExp("^(?:"+E.join("|")+")$"),T,R=function(j,W){n.call(this,j,W),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var J=new a(this._input),F=new r(this._input).read_options(this._options);this.__patterns={template:F,identifier:F.starting_with(l.identifier).matching(l.identifierMatch),number:J.matching(y),punct:J.matching(x),comment:J.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:J.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:J.matching(/<!--/),html_comment_end:J.matching(/-->/),include:J.starting_with(/#include/).until_after(l.lineBreak),shebang:J.starting_with(/#!/).until_after(l.lineBreak),xml:J.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:F.until(/['\\\n\r\u2028\u2029]/),double_quote:F.until(/["\\\n\r\u2028\u2029]/),template_text:F.until(/[`\\$]/),template_expression:F.until(/[`}\\]/)}};R.prototype=new n,R.prototype._is_comment=function(j){return j.type===d.COMMENT||j.type===d.BLOCK_COMMENT||j.type===d.UNKNOWN},R.prototype._is_opening=function(j){return j.type===d.START_BLOCK||j.type===d.START_EXPR},R.prototype._is_closing=function(j,W){return(j.type===d.END_BLOCK||j.type===d.END_EXPR)&&W&&(j.text==="]"&&W.text==="["||j.text===")"&&W.text==="("||j.text==="}"&&W.text==="{")},R.prototype._reset=function(){T=!1},R.prototype._get_next_token=function(j,W){var J=null;this._readWhitespace();var F=this._input.peek();return F===null?this._create_token(d.EOF,""):(J=J||this._read_non_javascript(F),J=J||this._read_string(F),J=J||this._read_word(j),J=J||this._read_singles(F),J=J||this._read_comment(F),J=J||this._read_regexp(F,j),J=J||this._read_xml(F,j),J=J||this._read_punctuation(),J=J||this._create_token(d.UNKNOWN,this._input.next()),J)},R.prototype._read_word=function(j){var W;if(W=this.__patterns.identifier.read(),W!=="")return W=W.replace(l.allLineBreaks,`
|
|
|
`),!(j.type===d.DOT||j.type===d.RESERVED&&(j.text==="set"||j.text==="get"))&&w.test(W)?(W==="in"||W==="of")&&(j.type===d.WORD||j.type===d.STRING)?this._create_token(d.OPERATOR,W):this._create_token(d.RESERVED,W):this._create_token(d.WORD,W);if(W=this.__patterns.number.read(),W!=="")return this._create_token(d.WORD,W)},R.prototype._read_singles=function(j){var W=null;return j==="("||j==="["?W=this._create_token(d.START_EXPR,j):j===")"||j==="]"?W=this._create_token(d.END_EXPR,j):j==="{"?W=this._create_token(d.START_BLOCK,j):j==="}"?W=this._create_token(d.END_BLOCK,j):j===";"?W=this._create_token(d.SEMICOLON,j):j==="."&&g.test(this._input.peek(1))?W=this._create_token(d.DOT,j):j===","&&(W=this._create_token(d.COMMA,j)),W&&this._input.next(),W},R.prototype._read_punctuation=function(){var j=this.__patterns.punct.read();if(j!=="")return j==="="?this._create_token(d.EQUALS,j):j==="?."?this._create_token(d.DOT,j):this._create_token(d.OPERATOR,j)},R.prototype._read_non_javascript=function(j){var W="";if(j==="#"){if(this._is_first_token()&&(W=this.__patterns.shebang.read(),W))return this._create_token(d.UNKNOWN,W.trim()+`
|
|
|
`);if(W=this.__patterns.include.read(),W)return this._create_token(d.UNKNOWN,W.trim()+`
|
|
|
`);j=this._input.next();var J="#";if(this._input.hasNext()&&this._input.testChar(b)){do j=this._input.next(),J+=j;while(this._input.hasNext()&&j!=="#"&&j!=="=");return j==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(J+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(J+="{}",this._input.next(),this._input.next())),this._create_token(d.WORD,J)}this._input.back()}else if(j==="<"&&this._is_first_token()){if(W=this.__patterns.html_comment_start.read(),W){for(;this._input.hasNext()&&!this._input.testChar(l.newline);)W+=this._input.next();return T=!0,this._create_token(d.COMMENT,W)}}else if(T&&j==="-"&&(W=this.__patterns.html_comment_end.read(),W))return T=!1,this._create_token(d.COMMENT,W);return null},R.prototype._read_comment=function(j){var W=null;if(j==="/"){var J="";if(this._input.peek(1)==="*"){J=this.__patterns.block_comment.read();var F=v.get_directives(J);F&&F.ignore==="start"&&(J+=v.readIgnored(this._input)),J=J.replace(l.allLineBreaks,`
|
|
|
`),W=this._create_token(d.BLOCK_COMMENT,J),W.directives=F}else this._input.peek(1)==="/"&&(J=this.__patterns.comment.read(),W=this._create_token(d.COMMENT,J))}return W},R.prototype._read_string=function(j){if(j==="`"||j==="'"||j==='"'){var W=this._input.next();return this.has_char_escapes=!1,j==="`"?W+=this._read_string_recursive("`",!0,"${"):W+=this._read_string_recursive(j),this.has_char_escapes&&this._options.unescape_strings&&(W=N(W)),this._input.peek()===j&&(W+=this._input.next()),W=W.replace(l.allLineBreaks,`
|
|
|
`),this._create_token(d.STRING,W)}return null},R.prototype._allow_regexp_or_xml=function(j){return j.type===d.RESERVED&&t(j.text,["return","case","throw","else","do","typeof","yield"])||j.type===d.END_EXPR&&j.text===")"&&j.opened.previous.type===d.RESERVED&&t(j.opened.previous.text,["if","while","for"])||t(j.type,[d.COMMENT,d.START_EXPR,d.START_BLOCK,d.START,d.END_BLOCK,d.OPERATOR,d.EQUALS,d.EOF,d.SEMICOLON,d.COMMA])},R.prototype._read_regexp=function(j,W){if(j==="/"&&this._allow_regexp_or_xml(W)){for(var J=this._input.next(),F=!1,k=!1;this._input.hasNext()&&(F||k||this._input.peek()!==j)&&!this._input.testChar(l.newline);)J+=this._input.peek(),F?F=!1:(F=this._input.peek()==="\\",this._input.peek()==="["?k=!0:this._input.peek()==="]"&&(k=!1)),this._input.next();return this._input.peek()===j&&(J+=this._input.next(),J+=this._input.read(l.identifier)),this._create_token(d.STRING,J)}return null},R.prototype._read_xml=function(j,W){if(this._options.e4x&&j==="<"&&this._allow_regexp_or_xml(W)){var J="",F=this.__patterns.xml.read_match();if(F){for(var k=F[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),K=k.indexOf("{")===0,Y=0;F;){var H=!!F[1],Q=F[2],re=!!F[F.length-1]||Q.slice(0,8)==="![CDATA[";if(!re&&(Q===k||K&&Q.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(H?--Y:++Y),J+=F[0],Y<=0)break;F=this.__patterns.xml.read_match()}return F||(J+=this._input.match(/[\s\S]*/g)[0]),J=J.replace(l.allLineBreaks,`
|
|
|
`),this._create_token(d.STRING,J)}}return null};function N(j){for(var W="",J=0,F=new s(j),k=null;F.hasNext();)if(k=F.match(/([\s]|[^\\]|\\\\)+/g),k&&(W+=k[0]),F.peek()==="\\"){if(F.next(),F.peek()==="x")k=F.match(/x([0-9A-Fa-f]{2})/g);else if(F.peek()==="u")k=F.match(/u([0-9A-Fa-f]{4})/g);else{W+="\\",F.hasNext()&&(W+=F.next());continue}if(!k)return j;if(J=parseInt(k[1],16),J>126&&J<=255&&k[0].indexOf("x")===0)return j;if(J>=0&&J<32){W+="\\"+k[0];continue}else J===34||J===39||J===92?W+="\\"+String.fromCharCode(J):W+=String.fromCharCode(J)}return W}R.prototype._read_string_recursive=function(j,W,J){var F,k;j==="'"?k=this.__patterns.single_quote:j==='"'?k=this.__patterns.double_quote:j==="`"?k=this.__patterns.template_text:j==="}"&&(k=this.__patterns.template_expression);for(var K=k.read(),Y="";this._input.hasNext();){if(Y=this._input.next(),Y===j||!W&&l.newline.test(Y)){this._input.back();break}else Y==="\\"&&this._input.hasNext()?(F=this._input.peek(),F==="x"||F==="u"?this.has_char_escapes=!0:F==="\r"&&this._input.peek(1)===`
|
|
|
`&&this._input.next(),Y+=this._input.next()):J&&(J==="${"&&Y==="$"&&this._input.peek()==="{"&&(Y+=this._input.next()),J===Y&&(j==="`"?Y+=this._read_string_recursive("}",W,"`"):Y+=this._read_string_recursive("`",W,"${"),this._input.hasNext()&&(Y+=this._input.next())));Y+=k.read(),K+=Y}return K},h.exports.Tokenizer=R,h.exports.TOKEN=d,h.exports.positionable_operators=m.slice(),h.exports.line_starters=f.slice()},function(h){var p=RegExp.prototype.hasOwnProperty("sticky");function c(s){this.__input=s||"",this.__input_length=this.__input.length,this.__position=0}c.prototype.restart=function(){this.__position=0},c.prototype.back=function(){this.__position>0&&(this.__position-=1)},c.prototype.hasNext=function(){return this.__position<this.__input_length},c.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__input.charAt(this.__position),this.__position+=1),s},c.prototype.peek=function(s){var n=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(n=this.__input.charAt(s)),n},c.prototype.__match=function(s,n){s.lastIndex=n;var o=s.exec(this.__input);return o&&!(p&&s.sticky)&&(o.index!==n&&(o=null)),o},c.prototype.test=function(s,n){return n=n||0,n+=this.__position,n>=0&&n<this.__input_length?!!this.__match(s,n):!1},c.prototype.testChar=function(s,n){var o=this.peek(n);return s.lastIndex=0,o!==null&&s.test(o)},c.prototype.match=function(s){var n=this.__match(s,this.__position);return n?this.__position+=n[0].length:n=null,n},c.prototype.read=function(s,n,o){var i="",l;return s&&(l=this.match(s),l&&(i+=l[0])),n&&(l||!s)&&(i+=this.readUntil(n,o)),i},c.prototype.readUntil=function(s,n){var o="",i=this.__position;s.lastIndex=this.__position;var l=s.exec(this.__input);return l?(i=l.index,n&&(i+=l[0].length)):i=this.__input_length,o=this.__input.substring(this.__position,i),this.__position=i,o},c.prototype.readUntilAfter=function(s){return this.readUntil(s,!0)},c.prototype.get_regexp=function(s,n){var o=null,i="g";return n&&p&&(i="y"),typeof s=="string"&&s!==""?o=new RegExp(s,i):s&&(o=new RegExp(s.source,i)),o},c.prototype.get_literal_regexp=function(s){return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},c.prototype.peekUntilAfter=function(s){var n=this.__position,o=this.readUntilAfter(s);return this.__position=n,o},c.prototype.lookBack=function(s){var n=this.__position-1;return n>=s.length&&this.__input.substring(n-s.length,n).toLowerCase()===s},h.exports.InputScanner=c},function(h,p,c){var s=c(8).InputScanner,n=c(3).Token,o=c(10).TokenStream,i=c(11).WhitespacePattern,l={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},a=function(r,t){this._input=new s(r),this._options=t||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};a.prototype.tokenize=function(){this._input.restart(),this.__tokens=new o,this._reset();for(var r,t=new n(l.START,""),d=null,v=[],y=new o;t.type!==l.EOF;){for(r=this._get_next_token(t,d);this._is_comment(r);)y.add(r),r=this._get_next_token(t,d);y.isEmpty()||(r.comments_before=y,y=new o),r.parent=d,this._is_opening(r)?(v.push(d),d=r):d&&this._is_closing(r,d)&&(r.opened=d,d.closed=r,d=v.pop(),r.parent=d),r.previous=t,t.next=r,this.__tokens.add(r),t=r}return this.__tokens},a.prototype._is_first_token=function(){return this.__tokens.isEmpty()},a.prototype._reset=function(){},a.prototype._get_next_token=function(r,t){this._readWhitespace();var d=this._input.read(/.+/g);return d?this._create_token(l.RAW,d):this._create_token(l.EOF,"")},a.prototype._is_comment=function(r){return!1},a.prototype._is_opening=function(r){return!1},a.prototype._is_closing=function(r,t){return!1},a.prototype._create_token=function(r,t){var d=new n(r,t,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return d},a.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},h.exports.Tokenizer=a,h.exports.TOKEN=l},function(h){function p(c){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=c}p.prototype.restart=function(){this.__position=0},p.prototype.isEmpty=function(){return this.__tokens_length===0},p.prototype.hasNext=function(){return this.__position<this.__tokens_length},p.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__tokens[this.__position],this.__position+=1),c},p.prototype.peek=function(c){var s=null;return c=c||0,c+=this.__position,c>=0&&c<this.__tokens_length&&(s=this.__tokens[c]),s},p.prototype.add=function(c){this.__parent_token&&(c.parent=this.__parent_token),this.__tokens.push(c),this.__tokens_length+=1},h.exports.TokenStream=p},function(h,p,c){var s=c(12).Pattern;function n(o,i){s.call(this,o,i),i?this._line_regexp=this._input.get_regexp(i._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}n.prototype=new s,n.prototype.__set_whitespace_patterns=function(o,i){o+="\\t ",i+="\\n\\r",this._match_pattern=this._input.get_regexp("["+o+i+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+i+"]")},n.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var o=this._input.read(this._match_pattern);if(o===" ")this.whitespace_before_token=" ";else if(o){var i=this.__split(this._newline_regexp,o);this.newline_count=i.length-1,this.whitespace_before_token=i[this.newline_count]}return o},n.prototype.matching=function(o,i){var l=this._create();return l.__set_whitespace_patterns(o,i),l._update(),l},n.prototype._create=function(){return new n(this._input,this)},n.prototype.__split=function(o,i){o.lastIndex=0;for(var l=0,a=[],r=o.exec(i);r;)a.push(i.substring(l,r.index)),l=r.index+r[0].length,r=o.exec(i);return l<i.length?a.push(i.substring(l,i.length)):a.push(""),a},h.exports.WhitespacePattern=n},function(h){function p(c,s){this._input=c,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,s&&(this._starting_pattern=this._input.get_regexp(s._starting_pattern,!0),this._match_pattern=this._input.get_regexp(s._match_pattern,!0),this._until_pattern=this._input.get_regexp(s._until_pattern),this._until_after=s._until_after)}p.prototype.read=function(){var c=this._input.read(this._starting_pattern);return(!this._starting_pattern||c)&&(c+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),c},p.prototype.read_match=function(){return this._input.match(this._match_pattern)},p.prototype.until_after=function(c){var s=this._create();return s._until_after=!0,s._until_pattern=this._input.get_regexp(c),s._update(),s},p.prototype.until=function(c){var s=this._create();return s._until_after=!1,s._until_pattern=this._input.get_regexp(c),s._update(),s},p.prototype.starting_with=function(c){var s=this._create();return s._starting_pattern=this._input.get_regexp(c,!0),s._update(),s},p.prototype.matching=function(c){var s=this._create();return s._match_pattern=this._input.get_regexp(c,!0),s._update(),s},p.prototype._create=function(){return new p(this._input,this)},p.prototype._update=function(){},h.exports.Pattern=p},function(h){function p(c,s){c=typeof c=="string"?c:c.source,s=typeof s=="string"?s:s.source,this.__directives_block_pattern=new RegExp(c+/ beautify( \w+[:]\w+)+ /.source+s,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(c+/\sbeautify\signore:end\s/.source+s,"g")}p.prototype.get_directives=function(c){if(!c.match(this.__directives_block_pattern))return null;var s={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(c);n;)s[n[1]]=n[2],n=this.__directive_pattern.exec(c);return s},p.prototype.readIgnored=function(c){return c.readUntilAfter(this.__directives_end_ignore_pattern)},h.exports.Directives=p},function(h,p,c){var s=c(12).Pattern,n={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function o(i,l){s.call(this,i,l),this.__template_pattern=null,this._disabled=Object.assign({},n),this._excluded=Object.assign({},n),l&&(this.__template_pattern=this._input.get_regexp(l.__template_pattern),this._excluded=Object.assign(this._excluded,l._excluded),this._disabled=Object.assign(this._disabled,l._disabled));var a=new s(i);this.__patterns={handlebars_comment:a.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:a.starting_with(/{{{/).until_after(/}}}/),handlebars:a.starting_with(/{{/).until_after(/}}/),php:a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:a.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:a.starting_with(/{%/).until_after(/%}/),django_value:a.starting_with(/{{/).until_after(/}}/),django_comment:a.starting_with(/{#/).until_after(/#}/),smarty:a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:a.starting_with(/{\*/).until_after(/\*}/),smarty_literal:a.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new s,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(i){var l=this._create();return l._disabled[i]=!0,l._update(),l},o.prototype.read_options=function(i){var l=this._create();for(var a in n)l._disabled[a]=i.templating.indexOf(a)===-1;return l._update(),l},o.prototype.exclude=function(i){var l=this._create();return l._excluded[i]=!0,l._update(),l},o.prototype.read=function(){var i="";this._match_pattern?i=this._input.read(this._starting_pattern):i=this._input.read(this._starting_pattern,this.__template_pattern);for(var l=this._read_template();l;)this._match_pattern?l+=this._input.read(this._match_pattern):l+=this._input.readUntil(this.__template_pattern),i+=l,l=this._read_template();return this._until_after&&(i+=this._input.readUntilAfter(this._until_pattern)),i},o.prototype.__set_templated_pattern=function(){var i=[];this._disabled.php||i.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||i.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||i.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(i.push(this.__patterns.django._starting_pattern.source),i.push(this.__patterns.django_value._starting_pattern.source),i.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||i.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&i.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+i.join("|")+")")},o.prototype._read_template=function(){var i="",l=this._input.peek();if(l==="<"){var a=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&a==="?"&&(i=i||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&a==="%"&&(i=i||this.__patterns.erb.read())}else l==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(i=i||this.__patterns.handlebars_comment.read(),i=i||this.__patterns.handlebars_unescaped.read(),i=i||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(i=i||this.__patterns.django_value.read()),this._excluded.django||(i=i||this.__patterns.django_comment.read(),i=i||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(i=i||this.__patterns.smarty_comment.read(),i=i||this.__patterns.smarty_literal.read(),i=i||this.__patterns.smarty.read()));return i},h.exports.TemplatablePattern=o}],S={};function A(h){var p=S[h];if(p!==void 0)return p.exports;var c=S[h]={exports:{}};return D[h](c,c.exports,A),c.exports}var C=A(0);B=C})();var O=B;!(ae=[],ee=function(){return{js_beautify:O}}.apply(We,ae),ee!==void 0&&(Ye.exports=ee))})()},"6eGT":function(Ye,We,z){"use strict";function ae(ee){return null}We.a=ae},"7+5b":function(Ye,We,z){Ye.exports=z.p+"static/v.e7f297d6.svg"},"7Cbv":function(Ye,We,z){"use strict";var ae=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),ee=new Uint8Array(16);function B(){if(!ae)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ae(ee)}var O=/^(?:[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 D(n){return typeof n=="string"&&O.test(n)}for(var S=D,A=[],C=0;C<256;++C)A.push((C+256).toString(16).substr(1));function h(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=(A[n[o+0]]+A[n[o+1]]+A[n[o+2]]+A[n[o+3]]+"-"+A[n[o+4]]+A[n[o+5]]+"-"+A[n[o+6]]+A[n[o+7]]+"-"+A[n[o+8]]+A[n[o+9]]+"-"+A[n[o+10]]+A[n[o+11]]+A[n[o+12]]+A[n[o+13]]+A[n[o+14]]+A[n[o+15]]).toLowerCase();if(!S(i))throw TypeError("Stringified UUID is invalid");return i}var p=h;function c(n,o,i){n=n||{};var l=n.random||(n.rng||B)();if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,o){i=i||0;for(var a=0;a<16;++a)o[i+a]=l[a];return o}return p(l)}var s=We.a=c},"7ahc":function(Ye,We,z){"use strict";z.d(We,"a",function(){return v});var ae=z("k1fw"),ee=z("0Owb"),B=z("+L6B"),O=z("2/Rp"),D=z("y8nQ"),S=z("Vl3Y"),A=z("tJVT"),C=z("OaEy"),h=z("2fM7"),p=z("cDcd"),c=z.n(p),s=z("VrN/"),n=z.n(s),o=z("p77/"),i=z.n(o),l=z("c5Ni"),a=z.n(l),r=h.a.Option,t={labelCol:{span:4},wrapperCol:{span:20}},d={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"]};We.b=function(y){var b=y.callback,g=y.onCancel,m=Object(p.useState)("python"),_=Object(A.a)(m,2),x=_[0],f=_[1];function E(T){f(d[T][1])}function w(T){b(T)}return c.a.createElement(S.a,Object(ee.a)({},t,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:w}),c.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},c.a.createElement(h.a,{onChange:E},Object.keys(d).map(function(T){return c.a.createElement(r,{key:T,value:T},d[T][0])}))),c.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},c.a.createElement(v,{mode:x})),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:g},"\u53D6\u6D88")))};function v(y){var b=y.value,g=y.onChange,m=y.mode,_=y.options,x=_===void 0?{}:_,f=Object(p.useRef)(),E=Object(p.useState)(),w=Object(A.a)(E,2),T=w[0],R=w[1];return Object(p.useEffect)(function(){if(T){function N(j){var W=j.getValue();g&&g(W)}return T.on("change",N),function(){T.off("change",N)}}},[T,g]),Object(p.useEffect)(function(){T&&T.setOption("mode",m)},[T,m]),Object(p.useEffect)(function(){T&&((b!==T.getValue()||b==="")&&setTimeout(function(){T.setValue(b||" ")},300))},[T,b]),Object(p.useEffect)(function(){if(f.current&&!T){var N=n.a.fromTextArea(f.current,Object(ae.a)({mode:m,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));R(N)}},[f.current,T]),c.a.createElement("div",{className:"my-codemirror-container"},c.a.createElement("textarea",{ref:f}))}},"7ixt":function(Ye,We,z){"use strict";z.d(We,"a",function(){return B});var ae={adjustX:1,adjustY:1},ee=[0,0],B={left:{points:["cr","cl"],overflow:ae,offset:[-4,0],targetOffset:ee},right:{points:["cl","cr"],overflow:ae,offset:[4,0],targetOffset:ee},top:{points:["bc","tc"],overflow:ae,offset:[0,-4],targetOffset:ee},bottom:{points:["tc","bc"],overflow:ae,offset:[0,4],targetOffset:ee},topLeft:{points:["bl","tl"],overflow:ae,offset:[0,-4],targetOffset:ee},leftTop:{points:["tr","tl"],overflow:ae,offset:[-4,0],targetOffset:ee},topRight:{points:["br","tr"],overflow:ae,offset:[0,-4],targetOffset:ee},rightTop:{points:["tl","tr"],overflow:ae,offset:[4,0],targetOffset:ee},bottomRight:{points:["tr","br"],overflow:ae,offset:[0,4],targetOffset:ee},rightBottom:{points:["bl","br"],overflow:ae,offset:[4,0],targetOffset:ee},bottomLeft:{points:["tl","bl"],overflow:ae,offset:[0,4],targetOffset:ee},leftBottom:{points:["br","bl"],overflow:ae,offset:[-4,0],targetOffset:ee}},O=B},"7qur":function(Ye,We,z){"use strict";z.d(We,"m",function(){return ee}),z.d(We,"s",function(){return B}),z.d(We,"h",function(){return O}),z.d(We,"o",function(){return D}),z.d(We,"n",function(){return S}),z.d(We,"l",function(){return A}),z.d(We,"b",function(){return C}),z.d(We,"q",function(){return h}),z.d(We,"t",function(){return p}),z.d(We,"v",function(){return c}),z.d(We,"w",function(){return s}),z.d(We,"u",function(){return n}),z.d(We,"p",function(){return o}),z.d(We,"f",function(){return i}),z.d(We,"a",function(){return l}),z.d(We,"j",function(){return a}),z.d(We,"k",function(){return r}),z.d(We,"d",function(){return t}),z.d(We,"g",function(){return d}),z.d(We,"c",function(){return v}),z.d(We,"e",function(){return y}),z.d(We,"i",function(){return b}),z.d(We,"r",function(){return g});var ae=z("ErOA");function ee(m){return Object(ae.c)("mypractices/".concat(m,".json"),{hidePopLogin:!0})}function B(m,_){return Object(ae.f)("mypractices/".concat(m,"/code_submit.json"),_)}function O(m,_){return Object(ae.c)("mypractices/".concat(m,"/code_debug.json"),_)}function D(m,_){return Object(ae.c)("mypractices/".concat(m,"/submit_records.json"),_)}function S(m){return Object(ae.c)("mypractices/record_detail.json",{id:m})}function A(m,_){return Object(ae.c)("mypractices/".concat(m,"/result.json"),{mode:_})}function C(m,_){return Object(ae.f)("mypractices/".concat(m,"/add_notes.json"),_)}function h(m,_){return Object(ae.f)("mypractices/".concat(m,"/restore_initial_code.json"),_)}function p(m,_){return Object(ae.f)("mypractices/".concat(m,"/sync_code.json"),_)}function c(m,_){return Object(ae.f)("mypractices/".concat(m,"/update_code.json"),_)}function s(m){return Object(ae.f)("mypractices/".concat(m,"/initial_codes.json"))}function n(m,_){return Object(ae.f)("discusses/".concat(m,"/plus.json"),_)}function o(m){return Object(ae.c)("practices/practices_list.json",m)}function i(m,_){return Object(ae.c)("practices/".concat(m,"/question_solution_articles"),_)}function l(m,_){return Object(ae.f)("practices/".concat(m,"/question_solution_articles"),_)}function a(m,_){return Object(ae.g)("practices/".concat(m,"/question_solution_articles/").concat(_==null?void 0:_.active),_)}function r(m,_){return Object(ae.c)("practices/".concat(m,"/question_solution_articles/").concat(_==null?void 0:_.active,"/edit"),_)}function t(m,_){return Object(ae.c)("practices/".concat(m,"/question_solution_articles/").concat(_==null?void 0:_.active),_)}function d(m,_){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(_==null?void 0:_.active,"/set_authority_or_excellent"),_)}function v(m,_){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(_==null?void 0:_.active,"/praise_or_treads"),_)}function y(m,_){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(_==null?void 0:_.active,"/hide"))}function b(m,_){return Object(ae.b)("practices/".concat(m,"/question_solution_articles/").concat(_==null?void 0:_.active),_)}function g(m,_){return Object(ae.f)("mypractices/".concat(m,"/update_practice_time_sum"),_)}},"815F":function(Ye,We,z){"use strict";z.d(We,"e",function(){return A}),z.d(We,"c",function(){return h}),z.d(We,"d",function(){return p}),z.d(We,"a",function(){return s}),z.d(We,"f",function(){return n}),z.d(We,"b",function(){return o});var ae=z("KQm4"),ee=z("VTBJ"),B=z("Ff2n"),O=z("Zm9Q"),D=z("Kwbf"),S=z("OZM5");function A(i,l){return i!=null?i:l}function C(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=new Map;function a(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(r||[]).forEach(function(d){var v=d.key,y=d.children;Object(D.a)(v!=null,"Tree node must have a certain key: [".concat(t).concat(v,"]"));var b=String(v);Object(D.a)(!l.has(b)||v===null||v===void 0,"Same 'key' exist in the Tree: ".concat(b)),l.set(b,!0),a(y,"".concat(t).concat(b," > "))})}a(i)}function h(i){function l(a){var r=Object(O.a)(a);return r.map(function(t){if(!Object(S.i)(t))return Object(D.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var d=t.key,v=t.props,y=v.children,b=Object(B.a)(v,["children"]),g=Object(ee.a)({key:d},b),m=l(y);return m.length&&(g.children=m),g}).filter(function(t){return t})}return l(i)}function p(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=new Set(l===!0?[]:l),r=[];function t(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return d.map(function(y,b){var g=Object(S.h)(v?v.pos:"0",b),m=A(y.key,g),_=Object(ee.a)(Object(ee.a)({},y),{},{parent:v,pos:g,children:null,data:y,isStart:[].concat(Object(ae.a)(v?v.isStart:[]),[b===0]),isEnd:[].concat(Object(ae.a)(v?v.isEnd:[]),[b===d.length-1])});return r.push(_),l===!0||a.has(m)?_.children=t(y.children||[],_):_.children=[],_})}return t(i),r}function c(i,l,a){var r;a?typeof a=="string"?r=function(v){return v[a]}:typeof a=="function"&&(r=function(v){return a(v)}):r=function(v,y){return A(v.key,y)};function t(d,v,y){var b=d?d.children:i,g=d?Object(S.h)(y.pos,v):"0";if(d){var m=r(d,g),_={node:d,index:v,pos:g,key:m,parentPos:y.node?y.pos:null,level:y.level+1};l(_)}b&&b.forEach(function(x,f){t(x,f,{node:d,pos:g,level:y?y.level+1:-1})})}t(null)}function s(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=l.initWrapper,r=l.processEntity,t=l.onProcessFinished,d=arguments.length>2?arguments[2]:void 0,v={},y={},b={posEntities:v,keyEntities:y};return a&&(b=a(b)||b),c(i,function(g){var m=g.node,_=g.index,x=g.pos,f=g.key,E=g.parentPos,w=g.level,T={node:m,index:_,key:f,pos:x,level:w},R=A(f,x);v[x]=T,y[R]=T,T.parent=v[E],T.parent&&(T.parent.children=T.parent.children||[],T.parent.children.push(T)),r&&r(T,b)},d),t&&t(b),b}function n(i,l){var a=l.expandedKeys,r=l.selectedKeys,t=l.loadedKeys,d=l.loadingKeys,v=l.checkedKeys,y=l.halfCheckedKeys,b=l.dragOverNodeKey,g=l.dropPosition,m=l.keyEntities,_=m[i],x={eventKey:i,expanded:a.indexOf(i)!==-1,selected:r.indexOf(i)!==-1,loaded:t.indexOf(i)!==-1,loading:d.indexOf(i)!==-1,checked:v.indexOf(i)!==-1,halfChecked:y.indexOf(i)!==-1,pos:String(_?_.pos:""),dragOver:b===i&&g===0,dragOverGapTop:b===i&&g===-1,dragOverGapBottom:b===i&&g===1};return x}function o(i){var l=i.data,a=i.expanded,r=i.selected,t=i.checked,d=i.loaded,v=i.loading,y=i.halfChecked,b=i.dragOver,g=i.dragOverGapTop,m=i.dragOverGapBottom,_=i.pos,x=i.active,f=Object(ee.a)(Object(ee.a)({},l),{},{expanded:a,selected:r,checked:t,loaded:d,loading:v,halfChecked:y,dragOver:b,dragOverGapTop:g,dragOverGapBottom:m,pos:_,active:x});return"props"in f||Object.defineProperty(f,"props",{get:function(){return Object(D.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),f}},"8EBN":function(Ye,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";ae.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 ee=0;ee<ae.modeInfo.length;ee++){var B=ae.modeInfo[ee];B.mimes&&(B.mime=B.mimes[0])}ae.findModeByMIME=function(O){O=O.toLowerCase();for(var D=0;D<ae.modeInfo.length;D++){var S=ae.modeInfo[D];if(S.mime==O)return S;if(S.mimes){for(var A=0;A<S.mimes.length;A++)if(S.mimes[A]==O)return S}}if(/\+xml$/.test(O))return ae.findModeByMIME("application/xml");if(/\+json$/.test(O))return ae.findModeByMIME("application/json")},ae.findModeByExtension=function(O){O=O.toLowerCase();for(var D=0;D<ae.modeInfo.length;D++){var S=ae.modeInfo[D];if(S.ext){for(var A=0;A<S.ext.length;A++)if(S.ext[A]==O)return S}}},ae.findModeByFileName=function(O){for(var D=0;D<ae.modeInfo.length;D++){var S=ae.modeInfo[D];if(S.file&&S.file.test(O))return S}var A=O.lastIndexOf("."),C=A>-1&&O.substring(A+1,O.length);if(C)return ae.findModeByExtension(C)},ae.findModeByName=function(O){O=O.toLowerCase();for(var D=0;D<ae.modeInfo.length;D++){var S=ae.modeInfo[D];if(S.name.toLowerCase()==O)return S;if(S.alias){for(var A=0;A<S.alias.length;A++)if(S.alias[A].toLowerCase()==O)return S}}}})},"8hTe":function(Ye,We,z){Ye.exports={button:"button___1wy9m"}},"9Bee":function(Ye,We,z){"use strict";var ae=z("DYRE"),ee=z("zeV3"),B=z("+L6B"),O=z("2/Rp"),D=z("k1fw"),S=z("tJVT"),A=z("cDcd"),C=z.n(A),h=z("vg9a"),p=z("DlQD"),c=z.n(p),s=z("rUJ1");function n(me,he){var Ee=me.match(/^(\s+)(?:```)/);if(Ee===null)return he;var de=Ee[1];return he.split(`
|
|
|
`).map(function(be){var Ue=be.match(/^\s+/);if(Ue===null)return be;var Re=Object(S.a)(Ue,1),De=Re[0];return De.length>=de.length?be.slice(de.length):be}).join(`
|
|
|
`)}var o=[],i=["<ul>"],l=new c.a.Renderer,a=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function r(){o.length=0,i=["<ul>"]}var t={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function d(me,he,Ee,de){if(he>=me.length||me[he].level<=Ee)return he;var be=me[he];de.push("<li><a href='#"+be.anchor+"'>"+be.text+"</a>"),he++;var Ue=[];return he=d(me,he,be.level,Ue),Ue.length>0&&(de.push("<ul>"),Ue.forEach(function(Re){de.push(Re)}),de.push("</ul>")),de.push("</li>"),he=d(me,he,Ee,de),he}function v(){return d(o,0,0,i),i.push("</ul>"),i.join("")}var y={heading:function(he){var Ee=a.exec(he);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:Ee[2]}},fences:function(he){var Ee=this.rules.block.fences.exec(he);if(Ee){var de=Ee[0],be=n(de,Ee[3]||""),Ue=Ee[2]?Ee[2].trim():Ee[2];if(["latex","katex","math"].indexOf(Ue)>=0){var Re=m(),De=be;be=Re,_[Re]={type:"block",expression:De}}return{type:"code",raw:de,lang:Ue,text:be}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,g=0,m=function(){return"__special_katext_id_".concat(g++,"__")},_={};function x(){return _}function f(){g=0,_={}}function E(me){return me=me.replace(b,function(he,Ee){var de=m();return _[de]={type:"inline",expression:Ee},de}),me}var w=l.listitem;l.listitem=function(me){return w(E(me))};var T=l.paragraph;l.paragraph=function(me){return T(E(me))};var R=l.tablecell;l.tablecell=function(me,he){return R(E(me),he)},l.code=function(me,he,Ee){var de=(he||"").match(/\S*/)[0];return de?["latex","katex","math"].indexOf(de)>=0?"<p class='editormd-tex'>".concat(me,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(he,'">').concat(Ee?me:Object(s.escape)(me,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(Ee?me:Object(s.escape)(me,!0))+"</code></pre>"},l.heading=function(me,he,Ee){var de=this.options.headerPrefix+Ee.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:de,level:he,text:me}),"<h"+he+' id="'+de+'">'+me+"</h"+he+">"},c.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),c.a.use({tokenizer:y,renderer:l});var N=c.a,j=z("SJMd"),W=z("ulZh"),J=z.n(W),F=z("m3rI"),k=z("Oy/b"),K=z("p5ED"),Y=z("8hTe"),H=z.n(Y),Q=/<pre[^>]*>/g;function re(me){var he=document.createElement("div");return he.innerHTML=me,he.childNodes.length===0?"":he.childNodes[0].nodeValue}var oe=We.a=function(me){var he=me.value,Ee=he===void 0?"":he,de=me.edit,be=de===void 0?!1:de,Ue=me.className,Re=me.showTextOnly,De=me.showLines,je=me.replaces,ve=me.zoomImg,ce=me.hasMask,ke=me.style,Ne=ke===void 0?{}:ke,Je=me.stylesPrev,te=Je===void 0?{}:Je,P=String(Ee),U=Object(A.useRef)(),q=Object(A.useRef)(),X=Object(A.useState)(""),$=Object(S.a)(X,2),ge=$[0],Ae=$[1],at=Object(A.useState)("office"),Le=Object(S.a)(at,2),Me=Le[0],Xe=Le[1],et=Object(A.useMemo)(function(){try{var Ce=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,pe=/\"\/api\/attachments\/|\"\/attachments\/download\//g,_e=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;P=P.replace(Ce,"("+F.a.API_SERVER+"/api/attachments/").replace(pe,'"'+F.a.API_SERVER+"/api/attachments/").replace(_e,'"'+F.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
|
`)}catch(qe){}var Oe=N(P),we=x();if(P.match(/\[TOC\]/)&&(Oe=Oe.replace("<p>[TOC]</p>",v()),r()),Oe=Oe.replace(/(__special_katext_id_\d+__)/g,function(qe,dt){var Et=we[dt],It=Et.type,Rt=Et.expression;return Object(k.renderToString)(re(Rt)||"",{displayMode:It==="block",throwOnError:!1,output:"html"})}),Oe=Oe.replace(/▁/g,"\u2581\u2581\u2581"),f(),Re){var Be=document.createElement("div");return Be.innerHTML=Oe,Be.innerText}return setTimeout(function(){return Pe()},500),Oe},[P]),ze=Object(A.useRef)();t.WebkitLineClamp=De,De&&(Ne=Object(D.a)(Object(D.a)({},Ne),t));function Ke(Ce){var pe=Ce.target;if(pe.tagName.toUpperCase()==="IMG"){if(ve){var _e=pe.getAttribute("src");Ae(_e),Xe("image")}}else if(pe.tagName.toUpperCase()==="A"){var Oe=pe.getAttribute("href");if(Oe.indexOf("office")>-1)Ce.preventDefault(),Ae(Oe),Xe("office");else if(Oe.indexOf("application/pdf")>-1)Ce.preventDefault(),Ae(Oe),Xe("pdf");else if(Oe.indexOf("text/html")>-1)Ce.preventDefault(),Ae(Oe),Xe("html");else if(Oe.startsWith("#")){Ce.preventDefault();var we=document.getElementById(Oe.replace("#",""));we&&we.scrollIntoView(!0)}}}var Pe=function(){var pe,_e=(pe=ze.current)===null||pe===void 0?void 0:pe.querySelectorAll("video");_e==null||_e.forEach(function(Oe){if(Oe.oncontextmenu=function(){return!1},Oe.src.indexOf(".m3u8")>-1&&!Oe.canPlayType("application/vnd.apple.mpegurl")){if(J.a.isSupported()){var we=new J.a;we.loadSource(Oe.src),we.attachMedia(Oe)}}})};Object(A.useEffect)(function(){if(ze.current&&et&&(et.match(Q)&&window.PR.prettyPrint()),ze.current)return ze.current.addEventListener("click",Ke),function(){ze.current.removeEventListener("click",Ke),f(),r()}},[et,ze.current,Ke]);var Ie=function(pe){if(!be)return;pe.target.nodeName==="IMG"?(U.current.style.display="flex",U.current.style.width=pe.target.clientWidth+"px",U.current.style.height=pe.target.clientHeight+"px",U.current.style.top=pe.target.offsetTop+"px",U.current.style.left=pe.target.offsetLeft+"px",q.current.src=pe.target.getAttribute("src")):U.current.style.display="none"};return C.a.createElement("div",{style:{position:"relative"}},C.a.createElement("div",{ref:ze,style:Object(D.a)({},Ne),className:"".concat(Ue||""," markdown-body ").concat(H.a.mdBody),onMouseOver:Ie,dangerouslySetInnerHTML:{__html:et}}),C.a.createElement("div",{ref:U,className:H.a.button},C.a.createElement(ee.a,null,C.a.createElement(O.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),C.a.createElement(O.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),C.a.createElement("img",{ref:q,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),C.a.createElement(K.a,{close:!0,data:ge,type:ge!=null&&ge.length?Me:"",style:Object(D.a)({},te),onClose:function(){return Ae("")}}))}},"9VGf":function(Ye,We,z){"use strict";z.d(We,"a",function(){return B});var ae=z("cDcd"),ee=z.n(ae);function B(O,D){var S=Object(ae.useRef)();Object(ae.useEffect)(function(){S.current=O}),Object(ae.useEffect)(function(){function A(){S.current()}if(D!==null){var C=setInterval(A,D);return function(){return clearInterval(C)}}},[D])}},AMnG:function(Ye,We,z){"use strict";var ae=z("miYZ"),ee=z("tsqr"),B=z("tJVT"),O=z("cDcd"),D=z.n(O),S=z("nWbc"),A=z.n(S),C=z("Ot1p");We.a=function(h){var p=h.id,c=h.activeDiscussIndex,s=h.onReplyDiscuss,n=Object(O.useState)(""),o=Object(B.a)(n,2),i=o[0],l=o[1];function a(t){l(t)}function r(){if(!i){ee.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}s(p,i),l("")}return D.a.createElement("div",{key:p,className:"discuss-item-editor",style:{display:c===p?"block":"none",width:"100%"}},D.a.createElement(C.a,{miniToolbar:!0,startInit:c===p,defaultValue:i,id:p,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:a}),D.a.createElement("a",{onClick:r,className:"btn-send"},"\u53D1\u9001"))}},Aky1:function(Ye,We,z){"use strict";z.d(We,"a",function(){return h});var ae=z("ErOA"),ee=z("ppsT"),B=z.n(ee),O="",D,S="";function A(p){C(p)}function C(p){D=new B.a.Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:1829848226361863,enableUploadProgress:!1,addFileSuccess:function(s){console.log("addFileSuccess: "+s.file.name),p.addFileSuccess&&p.addFileSuccess(s),D.startUpload()},onUploadstarted:function(s){var n=s.file.name;if(s.videoId){var l="/api/users/".concat(O,"/video_auths.json");Object(ae.a)(l,{method:"put",body:{video_id:s.videoId,title:n,file_name:n,virtual_classroom_id:S}}).then(function(a){if(a.status==-1){p.onUploadError&&p.onUploadError(s);return}var r=a.data,t=r.UploadAuth,d=r.UploadAddress,v=r.VideoId;D.setUploadAuthAndAddress(s,t,d)}).catch(function(a){D.deleteFile(D._curIndex),D.nextUpload(),console.log(a)})}else{var o="/api/users/".concat(O,"/video_auths.json"),i="";Object(ae.a)(o,{method:"Post",body:{title:i+n,file_name:i+n,virtual_classroom_id:S}}).then(function(a){if(a){var r=a.data,t=r.UploadAuth,d=r.UploadAddress,v=r.VideoId;D.setUploadAuthAndAddress(s,t,d,v)}}).catch(function(a){D.deleteFile(D._curIndex),D.nextUpload(),console.log(a)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(s){p.onUploadSucceed&&p.onUploadSucceed(s),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(s,n,o){p.onUploadFailed&&p.onUploadFailed(s),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(s,n,o){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(s,n,o){p.onUploadProgress&&p.onUploadProgress(s,n,o);var i=Math.ceil(o*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(s){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var n="/api/users/".concat(O,"/video_auths.json");Object(ae.a)(n,{method:"put",body:{video_id:s.videoId}}).then(function(o){var i=o.data,l=i.UploadAuth;D.resumeUploadWithAuth(l)}).catch(function(o){console.log(o)})},onUploadEnd:function(s){p.onUploadEnd&&p.onUploadEnd(s),console.log("onUploadEnd: uploaded all the files")}}),p.gotUploader&&p.gotUploader(D)}function h(p,c,s){p&&(O=p),c&&(S=c),A(s)}},BU3w:function(Ye,We,z){"use strict";z.d(We,"a",function(){return S});var ae=z("MNnm"),ee="rc-util-key";function B(A){if(A.attachTo)return A.attachTo;var C=document.querySelector("head");return C||document.body}function O(A){var C,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ae.a)())return null;var p=document.createElement("style");if((C=h.csp)===null||C===void 0?void 0:C.nonce){var c;p.nonce=(c=h.csp)===null||c===void 0?void 0:c.nonce}p.innerHTML=A;var s=B(h),n=s.firstChild;return h.prepend&&s.prepend?s.prepend(p):h.prepend&&n?s.insertBefore(p,n):s.appendChild(p),p}var D=new Map;function S(A,C){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=B(h);if(!D.has(p)){var c=O("",h),s=c.parentNode;D.set(p,s),s.removeChild(c)}var n=Array.from(D.get(p).children).find(function(r){return r.tagName==="STYLE"&&r[ee]===C});if(n){var o,i;if(((o=h.csp)===null||o===void 0?void 0:o.nonce)&&n.nonce!==((i=h.csp)===null||i===void 0?void 0:i.nonce)){var l;n.nonce=(l=h.csp)===null||l===void 0?void 0:l.nonce}return n.innerHTML!==A&&(n.innerHTML=A),n}var a=O(A,h);return a[ee]=C,a}},Bd2K:function(Ye,We,z){(function(ae){ae(z("VrN/"),z("osHv"))})(function(ae){ae.defineOption("autoCloseTags",!1,function(h,p,c){if(c!=ae.Init&&c&&h.removeKeyMap("autoCloseTags"),!p)return;var s={name:"autoCloseTags"};(typeof p!="object"||p.whenClosing!==!1)&&(s["'/'"]=function(n){return S(n)}),(typeof p!="object"||p.whenOpening!==!1)&&(s["'>'"]=function(n){return O(n)}),h.addKeyMap(s)});var ee=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],B=["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 O(h){if(h.getOption("disableInput"))return ae.Pass;for(var p=h.listSelections(),c=[],s=h.getOption("autoCloseTags"),n=0;n<p.length;n++){if(!p[n].empty())return ae.Pass;var o=p[n].head,i=h.getTokenAt(o),l=ae.innerMode(h.getMode(),i.state),a=l.state,r=l.mode.xmlCurrentTag&&l.mode.xmlCurrentTag(a),t=r&&r.name;if(!t)return ae.Pass;var d=l.mode.configuration=="html",v=typeof s=="object"&&s.dontCloseTags||d&&ee,y=typeof s=="object"&&s.indentTags||d&&B;i.end>o.ch&&(t=t.slice(0,t.length-i.end+o.ch));var b=t.toLowerCase();if(!t||i.type=="string"&&(i.end!=o.ch||!/[\"\']/.test(i.string.charAt(i.string.length-1))||i.string.length==1)||i.type=="tag"&&r.close||i.string.indexOf("/")==o.ch-i.start-1||v&&A(v,b)>-1||C(h,l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(a)||[],t,o,!0))return ae.Pass;var g=typeof s=="object"&&s.emptyTags;if(g&&A(g,t)>-1){c[n]={text:"/>",newPos:ae.Pos(o.line,o.ch+2)};continue}var m=y&&A(y,b)>-1;c[n]={indent:m,text:">"+(m?`
|
|
|
|
|
|
`:"")+"</"+t+">",newPos:m?ae.Pos(o.line+1,0):ae.Pos(o.line,o.ch+1)}}for(var _=typeof s=="object"&&s.dontIndentOnAutoClose,n=p.length-1;n>=0;n--){var x=c[n];h.replaceRange(x.text,p[n].head,p[n].anchor,"+insert");var f=h.listSelections().slice(0);f[n]={head:x.newPos,anchor:x.newPos},h.setSelections(f),!_&&x.indent&&(h.indentLine(x.newPos.line,null,!0),h.indentLine(x.newPos.line+1,null,!0))}}function D(h,p){for(var c=h.listSelections(),s=[],n=p?"/":"</",o=h.getOption("autoCloseTags"),i=typeof o=="object"&&o.dontIndentOnSlash,l=0;l<c.length;l++){if(!c[l].empty())return ae.Pass;var a=c[l].head,r=h.getTokenAt(a),t=ae.innerMode(h.getMode(),r.state),d=t.state;if(p&&(r.type=="string"||r.string.charAt(0)!="<"||r.start!=a.ch-1))return ae.Pass;var v,y=t.mode.name!="xml"&&h.getMode().name=="htmlmixed";if(y&&t.mode.name=="javascript")v=n+"script";else if(y&&t.mode.name=="css")v=n+"style";else{var b=t.mode.xmlCurrentContext&&t.mode.xmlCurrentContext(d);if(!b||b.length&&C(h,b,b[b.length-1],a))return ae.Pass;v=n+b[b.length-1]}h.getLine(a.line).charAt(r.end)!=">"&&(v+=">"),s[l]=v}if(h.replaceSelections(s),c=h.listSelections(),!i)for(var l=0;l<c.length;l++)(l==c.length-1||c[l].head.line<c[l+1].head.line)&&h.indentLine(c[l].head.line)}function S(h){return h.getOption("disableInput")?ae.Pass:D(h,!0)}ae.commands.closeTag=function(h){return D(h)};function A(h,p){if(h.indexOf)return h.indexOf(p);for(var c=0,s=h.length;c<s;++c)if(h[c]==p)return c;return-1}function C(h,p,c,s,n){if(!ae.scanForClosingTag)return!1;var o=Math.min(h.lastLine()+1,s.line+500),i=ae.scanForClosingTag(h,s,null,o);if(!i||i.tag!=c)return!1;for(var l=n?1:0,a=p.length-1;a>=0&&p[a]==c;a--)++l;s=i.to;for(var a=1;a<l;a++){var r=ae.scanForClosingTag(h,s,null,o);if(!r||r.tag!=c)return!1;s=r.to}return!0}})},BdwD:function(Ye,We,z){"use strict";var ae=z("+L6B"),ee=z("2/Rp"),B=z("0Owb"),O=z("k1fw"),D=z("cDcd"),S=z.n(D),A=z("FOrL"),C=z.n(A),h=function(c){var s=c.buttonProps,n=s===void 0?{}:s,o=c.styles,i=o===void 0?{}:o,l=c.customText,a=c.ButtonText,r=c.ButtonClick,t=c.Buttonclass,d=c.ButtonTwo;return S.a.createElement("section",{className:"tc animated fadeIn",style:Object(O.a)(Object(O.a)({},{color:"#999",margin:"200px auto"}),i)},S.a.createElement("img",{src:C.a}),S.a.createElement("p",{className:"mt20 font14"},l||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),a&&S.a.createElement(ee.a,Object(B.a)({className:t,onClick:r},n),a),d&&d)};We.a=h},BjJ7:function(Ye,We,z){"use strict";z.d(We,"d",function(){return ee}),z.d(We,"c",function(){return B}),z.d(We,"e",function(){return O}),z.d(We,"b",function(){return D}),z.d(We,"a",function(){return A});var ae=z("m3rI");function ee(C){var h=!0;if(C.length>0){for(var p=0;p<C.length;p++)if(C[p].compile_success==0||!C[p].compile_success){h=!1;break}}else h=!1;return h}function B(C){for(var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",p=[],c=0;c<C.length;c++){var s=C[c],n=h?"".concat(h,"/").concat(s.name):"".concat(s.name);p.push({title:s.name,isLeaf:!(s.type==="tree"),key:n})}return p}function O(C,h,p){for(var c=0;c<C.length;c++){var s=C[c];if(s.key===h){s.children=p;break}s.children&&O(s.children,h,p)}return C}function D(C,h,p){var c;return function(){var s=this,n=arguments,o=function(){c=null,p||C.apply(s,n)},i=p&&!c;clearTimeout(c),c=setTimeout(o,h),i&&C.apply(s,n)}}var S=!0,A=ae.a.API_SERVER},"C+DQ":function(Ye,We,z){},CNDd:function(Ye,We,z){Ye.exports=z.p+"static/c1.7850f139.svg"},CaVn:function(Ye,We,z){Ye.exports={flex_box_center:"flex_box_center___2wZ0h",flex_space_between:"flex_space_between___3MVWH",flex_box_vertical_center:"flex_box_vertical_center___O0jNB",flex_box_center_end:"flex_box_center_end___2q4xj",flex_box_column:"flex_box_column___13R-8",listDetails:"listDetails___3lMam",head:"head___2jzWe",name:"name___3xIfG",title:"title___3-ce8",a:"a___1ZME1",b:"b___oiiqU",tag:"tag___32Ulf",btn:"btn___lJ5fA",scroll:"scroll___anvih",video:"video___1gujl",html:"html___z0BU7",g:"g___3sfQf",btns:"btns___OWbut"}},CrYA:function(Ye,We,z){var ae=z("MFOe"),ee=ae.Global;Ye.exports={name:"sessionStorage",read:O,write:D,each:S,remove:A,clearAll:C};function B(){return ee.sessionStorage}function O(h){return B().getItem(h)}function D(h,p){return B().setItem(h,p)}function S(h){for(var p=B().length-1;p>=0;p--){var c=B().key(p);h(O(c),c)}}function A(h){return B().removeItem(h)}function C(){return B().clear()}},DlQD:function(Ye,We,z){(function(ae,ee){Ye.exports=ee()})(this,function(){"use strict";function ae(Pe,Ie){for(var Ce=0;Ce<Ie.length;Ce++){var pe=Ie[Ce];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(Pe,pe.key,pe)}}function ee(Pe,Ie,Ce){return Ie&&ae(Pe.prototype,Ie),Ce&&ae(Pe,Ce),Pe}function B(Pe,Ie){if(!Pe)return;if(typeof Pe=="string")return O(Pe,Ie);var Ce=Object.prototype.toString.call(Pe).slice(8,-1);if(Ce==="Object"&&Pe.constructor&&(Ce=Pe.constructor.name),Ce==="Map"||Ce==="Set")return Array.from(Pe);if(Ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ce))return O(Pe,Ie)}function O(Pe,Ie){(Ie==null||Ie>Pe.length)&&(Ie=Pe.length);for(var Ce=0,pe=new Array(Ie);Ce<Ie;Ce++)pe[Ce]=Pe[Ce];return pe}function D(Pe,Ie){var Ce;if(typeof Symbol=="undefined"||Pe[Symbol.iterator]==null){if(Array.isArray(Pe)||(Ce=B(Pe))||Ie&&Pe&&typeof Pe.length=="number"){Ce&&(Pe=Ce);var pe=0;return function(){return pe>=Pe.length?{done:!0}:{done:!1,value:Pe[pe++]}}}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 Ce=Pe[Symbol.iterator](),Ce.next.bind(Ce)}function S(Pe,Ie){return Ie={exports:{}},Pe(Ie,Ie.exports),Ie.exports}var A=S(function(Pe){function Ie(){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 Ce(pe){Pe.exports.defaults=pe}Pe.exports={defaults:Ie(),getDefaults:Ie,changeDefaults:Ce}}),C=A.defaults,h=A.getDefaults,p=A.changeDefaults,c=/[&<>"']/,s=/[&<>"']/g,n=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},l=function(Ie){return i[Ie]};function a(Pe,Ie){if(Ie){if(c.test(Pe))return Pe.replace(s,l)}else if(n.test(Pe))return Pe.replace(o,l);return Pe}var r=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function t(Pe){return Pe.replace(r,function(Ie,Ce){return Ce=Ce.toLowerCase(),Ce==="colon"?":":Ce.charAt(0)==="#"?Ce.charAt(1)==="x"?String.fromCharCode(parseInt(Ce.substring(2),16)):String.fromCharCode(+Ce.substring(1)):""})}var d=/(^|[^\[])\^/g;function v(Pe,Ie){Pe=Pe.source||Pe,Ie=Ie||"";var Ce={replace:function(_e,Oe){return Oe=Oe.source||Oe,Oe=Oe.replace(d,"$1"),Pe=Pe.replace(_e,Oe),Ce},getRegex:function(){return new RegExp(Pe,Ie)}};return Ce}var y=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(Pe,Ie,Ce){if(Pe){var pe;try{pe=decodeURIComponent(t(Ce)).replace(y,"").toLowerCase()}catch(_e){return null}if(pe.indexOf("javascript:")===0||pe.indexOf("vbscript:")===0||pe.indexOf("data:")===0)return null}Ie&&!b.test(Ce)&&(Ce=E(Ie,Ce));try{Ce=encodeURI(Ce).replace(/%25/g,"%")}catch(_e){return null}return Ce}var m={},_=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,f=/^([^:]+:\/*[^/]*)[\s\S]*$/;function E(Pe,Ie){m[" "+Pe]||(_.test(Pe)?m[" "+Pe]=Pe+"/":m[" "+Pe]=N(Pe,"/",!0)),Pe=m[" "+Pe];var Ce=Pe.indexOf(":")===-1;return Ie.substring(0,2)==="//"?Ce?Ie:Pe.replace(x,"$1")+Ie:Ie.charAt(0)==="/"?Ce?Ie:Pe.replace(f,"$1")+Ie:Pe+Ie}var w={exec:function(){}};function T(Pe){for(var Ie=1,Ce,pe;Ie<arguments.length;Ie++){Ce=arguments[Ie];for(pe in Ce)Object.prototype.hasOwnProperty.call(Ce,pe)&&(Pe[pe]=Ce[pe])}return Pe}function R(Pe,Ie){var Ce=Pe.replace(/\|/g,function(Oe,we,Be){for(var qe=!1,dt=we;--dt>=0&&Be[dt]==="\\";)qe=!qe;return qe?"|":" |"}),pe=Ce.split(/ \|/),_e=0;if(pe.length>Ie)pe.splice(Ie);else for(;pe.length<Ie;)pe.push("");for(;_e<pe.length;_e++)pe[_e]=pe[_e].trim().replace(/\\\|/g,"|");return pe}function N(Pe,Ie,Ce){var pe=Pe.length;if(pe===0)return"";for(var _e=0;_e<pe;){var Oe=Pe.charAt(pe-_e-1);if(Oe===Ie&&!Ce)_e++;else if(Oe!==Ie&&Ce)_e++;else break}return Pe.substr(0,pe-_e)}function j(Pe,Ie){if(Pe.indexOf(Ie[1])===-1)return-1;for(var Ce=Pe.length,pe=0,_e=0;_e<Ce;_e++)if(Pe[_e]==="\\")_e++;else if(Pe[_e]===Ie[0])pe++;else if(Pe[_e]===Ie[1]&&(pe--,pe<0))return _e;return-1}function W(Pe){Pe&&Pe.sanitize&&!Pe.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 J={escape:a,unescape:t,edit:v,cleanUrl:g,resolveUrl:E,noopTest:w,merge:T,splitCells:R,rtrim:N,findClosingBracket:j,checkSanitizeDeprecation:W},F=A.defaults,k=J.rtrim,K=J.splitCells,Y=J.escape,H=J.findClosingBracket;function Q(Pe,Ie,Ce){var pe=Ie.href,_e=Ie.title?Y(Ie.title):null,Oe=Pe[1].replace(/\\([\[\]])/g,"$1");return Pe[0].charAt(0)!=="!"?{type:"link",raw:Ce,href:pe,title:_e,text:Oe}:{type:"image",raw:Ce,href:pe,title:_e,text:Y(Oe)}}function re(Pe,Ie){var Ce=Pe.match(/^(\s+)(?:```)/);if(Ce===null)return Ie;var pe=Ce[1];return Ie.split(`
|
|
|
`).map(function(_e){var Oe=_e.match(/^\s+/);if(Oe===null)return _e;var we=Oe[0];return we.length>=pe.length?_e.slice(pe.length):_e}).join(`
|
|
|
`)}var oe=function(){function Pe(Ce){this.options=Ce||F}var Ie=Pe.prototype;return Ie.space=function(pe){var _e=this.rules.block.newline.exec(pe);if(_e)return _e[0].length>1?{type:"space",raw:_e[0]}:{raw:`
|
|
|
`}},Ie.code=function(pe,_e){var Oe=this.rules.block.code.exec(pe);if(Oe){var we=_e[_e.length-1];if(we&&we.type==="paragraph")return{raw:Oe[0],text:Oe[0].trimRight()};var Be=Oe[0].replace(/^ {4}/gm,"");return{type:"code",raw:Oe[0],codeBlockStyle:"indented",text:this.options.pedantic?Be:k(Be,`
|
|
|
`)}}},Ie.fences=function(pe){var _e=this.rules.block.fences.exec(pe);if(_e){var Oe=_e[0],we=re(Oe,_e[3]||"");return{type:"code",raw:Oe,lang:_e[2]?_e[2].trim():_e[2],text:we}}},Ie.heading=function(pe){var _e=this.rules.block.heading.exec(pe);if(_e)return{type:"heading",raw:_e[0],depth:_e[1].length,text:_e[2]}},Ie.nptable=function(pe){var _e=this.rules.block.nptable.exec(pe);if(_e){var Oe={type:"table",header:K(_e[1].replace(/^ *| *\| *$/g,"")),align:_e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:_e[3]?_e[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:_e[0]};if(Oe.header.length===Oe.align.length){var we=Oe.align.length,Be;for(Be=0;Be<we;Be++)/^ *-+: *$/.test(Oe.align[Be])?Oe.align[Be]="right":/^ *:-+: *$/.test(Oe.align[Be])?Oe.align[Be]="center":/^ *:-+ *$/.test(Oe.align[Be])?Oe.align[Be]="left":Oe.align[Be]=null;for(we=Oe.cells.length,Be=0;Be<we;Be++)Oe.cells[Be]=K(Oe.cells[Be],Oe.header.length);return Oe}}},Ie.hr=function(pe){var _e=this.rules.block.hr.exec(pe);if(_e)return{type:"hr",raw:_e[0]}},Ie.blockquote=function(pe){var _e=this.rules.block.blockquote.exec(pe);if(_e){var Oe=_e[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:_e[0],text:Oe}}},Ie.list=function(pe){var _e=this.rules.block.list.exec(pe);if(_e){for(var Oe=_e[0],we=_e[2],Be=we.length>1,qe=we[we.length-1]===")",dt={type:"list",raw:Oe,ordered:Be,start:Be?+we.slice(0,-1):"",loose:!1,items:[]},Et=_e[0].match(this.rules.block.item),It=!1,Rt,Ct,st,ut,$e,xe,Fe,ct=Et.length,tt=0;tt<ct;tt++)Rt=Et[tt],Oe=Rt,Ct=Rt.length,Rt=Rt.replace(/^ *([*+-]|\d+[.)]) */,""),~Rt.indexOf(`
|
|
|
`)&&(Ct-=Rt.length,Rt=this.options.pedantic?Rt.replace(/^ {1,4}/gm,""):Rt.replace(new RegExp("^ {1,"+Ct+"}","gm"),"")),tt!==ct-1&&(st=this.rules.block.bullet.exec(Et[tt+1])[0],(Be?st.length===1||!qe&&st[st.length-1]===")":st.length>1||this.options.smartLists&&st!==we)&&(ut=Et.slice(tt+1).join(`
|
|
|
`),dt.raw=dt.raw.substring(0,dt.raw.length-ut.length),tt=ct-1)),$e=It||/\n\n(?!\s*$)/.test(Rt),tt!==ct-1&&(It=Rt.charAt(Rt.length-1)===`
|
|
|
`,$e||($e=It)),$e&&(dt.loose=!0),xe=/^\[[ xX]\] /.test(Rt),Fe=void 0,xe&&(Fe=Rt[1]!==" ",Rt=Rt.replace(/^\[[ xX]\] +/,"")),dt.items.push({type:"list_item",raw:Oe,task:xe,checked:Fe,loose:$e,text:Rt});return dt}},Ie.html=function(pe){var _e=this.rules.block.html.exec(pe);if(_e)return{type:this.options.sanitize?"paragraph":"html",raw:_e[0],pre:!this.options.sanitizer&&(_e[1]==="pre"||_e[1]==="script"||_e[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(_e[0]):Y(_e[0]):_e[0]}},Ie.def=function(pe){var _e=this.rules.block.def.exec(pe);if(_e){_e[3]&&(_e[3]=_e[3].substring(1,_e[3].length-1));var Oe=_e[1].toLowerCase().replace(/\s+/g," ");return{tag:Oe,raw:_e[0],href:_e[2],title:_e[3]}}},Ie.table=function(pe){var _e=this.rules.block.table.exec(pe);if(_e){var Oe={type:"table",header:K(_e[1].replace(/^ *| *\| *$/g,"")),align:_e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:_e[3]?_e[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(Oe.header.length===Oe.align.length){Oe.raw=_e[0];var we=Oe.align.length,Be;for(Be=0;Be<we;Be++)/^ *-+: *$/.test(Oe.align[Be])?Oe.align[Be]="right":/^ *:-+: *$/.test(Oe.align[Be])?Oe.align[Be]="center":/^ *:-+ *$/.test(Oe.align[Be])?Oe.align[Be]="left":Oe.align[Be]=null;for(we=Oe.cells.length,Be=0;Be<we;Be++)Oe.cells[Be]=K(Oe.cells[Be].replace(/^ *\| *| *\| *$/g,""),Oe.header.length);return Oe}}},Ie.lheading=function(pe){var _e=this.rules.block.lheading.exec(pe);if(_e)return{type:"heading",raw:_e[0],depth:_e[2].charAt(0)==="="?1:2,text:_e[1]}},Ie.paragraph=function(pe){var _e=this.rules.block.paragraph.exec(pe);if(_e)return{type:"paragraph",raw:_e[0],text:_e[1].charAt(_e[1].length-1)===`
|
|
|
`?_e[1].slice(0,-1):_e[1]}},Ie.text=function(pe,_e){var Oe=this.rules.block.text.exec(pe);if(Oe){var we=_e[_e.length-1];return we&&we.type==="text"?{raw:Oe[0],text:Oe[0]}:{type:"text",raw:Oe[0],text:Oe[0]}}},Ie.escape=function(pe){var _e=this.rules.inline.escape.exec(pe);if(_e)return{type:"escape",raw:_e[0],text:Y(_e[1])}},Ie.tag=function(pe,_e,Oe){var we=this.rules.inline.tag.exec(pe);if(we)return!_e&&/^<a /i.test(we[0])?_e=!0:_e&&/^<\/a>/i.test(we[0])&&(_e=!1),!Oe&&/^<(pre|code|kbd|script)(\s|>)/i.test(we[0])?Oe=!0:Oe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(we[0])&&(Oe=!1),{type:this.options.sanitize?"text":"html",raw:we[0],inLink:_e,inRawBlock:Oe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):Y(we[0]):we[0]}},Ie.link=function(pe){var _e=this.rules.inline.link.exec(pe);if(_e){var Oe=H(_e[2],"()");if(Oe>-1){var we=_e[0].indexOf("!")===0?5:4,Be=we+_e[1].length+Oe;_e[2]=_e[2].substring(0,Oe),_e[0]=_e[0].substring(0,Be).trim(),_e[3]=""}var qe=_e[2],dt="";if(this.options.pedantic){var Et=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(qe);Et?(qe=Et[1],dt=Et[3]):dt=""}else dt=_e[3]?_e[3].slice(1,-1):"";qe=qe.trim().replace(/^<([\s\S]*)>$/,"$1");var It=Q(_e,{href:qe&&qe.replace(this.rules.inline._escapes,"$1"),title:dt&&dt.replace(this.rules.inline._escapes,"$1")},_e[0]);return It}},Ie.reflink=function(pe,_e){var Oe;if((Oe=this.rules.inline.reflink.exec(pe))||(Oe=this.rules.inline.nolink.exec(pe))){var we=(Oe[2]||Oe[1]).replace(/\s+/g," ");if(we=_e[we.toLowerCase()],!we||!we.href){var Be=Oe[0].charAt(0);return{type:"text",raw:Be,text:Be}}var qe=Q(Oe,we,Oe[0]);return qe}},Ie.strong=function(pe,_e,Oe){Oe===void 0&&(Oe="");var we=this.rules.inline.strong.start.exec(pe);if(we&&(!we[1]||we[1]&&(Oe===""||this.rules.inline.punctuation.exec(Oe)))){_e=_e.slice(-1*pe.length);var Be=we[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Be.lastIndex=0;for(var qe;(we=Be.exec(_e))!=null;)if(qe=this.rules.inline.strong.middle.exec(_e.slice(0,we.index+3)),qe)return{type:"strong",raw:pe.slice(0,qe[0].length),text:pe.slice(2,qe[0].length-2)}}},Ie.em=function(pe,_e,Oe){Oe===void 0&&(Oe="");var we=this.rules.inline.em.start.exec(pe);if(we&&(!we[1]||we[1]&&(Oe===""||this.rules.inline.punctuation.exec(Oe)))){_e=_e.slice(-1*pe.length);var Be=we[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Be.lastIndex=0;for(var qe;(we=Be.exec(_e))!=null;)if(qe=this.rules.inline.em.middle.exec(_e.slice(0,we.index+2)),qe)return{type:"em",raw:pe.slice(0,qe[0].length),text:pe.slice(1,qe[0].length-1)}}},Ie.codespan=function(pe){var _e=this.rules.inline.code.exec(pe);if(_e){var Oe=_e[2].replace(/\n/g," "),we=/[^ ]/.test(Oe),Be=Oe.startsWith(" ")&&Oe.endsWith(" ");return we&&Be&&(Oe=Oe.substring(1,Oe.length-1)),Oe=Y(Oe,!0),{type:"codespan",raw:_e[0],text:Oe}}},Ie.br=function(pe){var _e=this.rules.inline.br.exec(pe);if(_e)return{type:"br",raw:_e[0]}},Ie.del=function(pe){var _e=this.rules.inline.del.exec(pe);if(_e)return{type:"del",raw:_e[0],text:_e[1]}},Ie.autolink=function(pe,_e){var Oe=this.rules.inline.autolink.exec(pe);if(Oe){var we,Be;return Oe[2]==="@"?(we=Y(this.options.mangle?_e(Oe[1]):Oe[1]),Be="mailto:"+we):(we=Y(Oe[1]),Be=we),{type:"link",raw:Oe[0],text:we,href:Be,tokens:[{type:"text",raw:we,text:we}]}}},Ie.url=function(pe,_e){var Oe;if(Oe=this.rules.inline.url.exec(pe)){var we,Be;if(Oe[2]==="@")we=Y(this.options.mangle?_e(Oe[0]):Oe[0]),Be="mailto:"+we;else{var qe;do qe=Oe[0],Oe[0]=this.rules.inline._backpedal.exec(Oe[0])[0];while(qe!==Oe[0]);we=Y(Oe[0]),Oe[1]==="www."?Be="http://"+we:Be=we}return{type:"link",raw:Oe[0],text:we,href:Be,tokens:[{type:"text",raw:we,text:we}]}}},Ie.inlineText=function(pe,_e,Oe){var we=this.rules.inline.text.exec(pe);if(we){var Be;return _e?Be=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):Y(we[0]):we[0]:Be=Y(this.options.smartypants?Oe(we[0]):we[0]),{type:"text",raw:we[0],text:Be}}},Pe}(),me=J.noopTest,he=J.edit,Ee=J.merge,de={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:me,table:me,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};de._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,de._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,de.def=he(de.def).replace("label",de._label).replace("title",de._title).getRegex(),de.bullet=/(?:[*+-]|\d{1,9}[.)])/,de.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,de.item=he(de.item,"gm").replace(/bull/g,de.bullet).getRegex(),de.list=he(de.list).replace(/bull/g,de.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+de.def.source+")").getRegex(),de._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",de._comment=/<!--(?!-?>)[\s\S]*?-->/,de.html=he(de.html,"i").replace("comment",de._comment).replace("tag",de._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de.paragraph=he(de._paragraph).replace("hr",de.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",de._tag).getRegex(),de.blockquote=he(de.blockquote).replace("paragraph",de.paragraph).getRegex(),de.normal=Ee({},de),de.gfm=Ee({},de.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*|$)"}),de.gfm.nptable=he(de.gfm.nptable).replace("hr",de.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",de._tag).getRegex(),de.gfm.table=he(de.gfm.table).replace("hr",de.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",de._tag).getRegex(),de.pedantic=Ee({},de.normal,{html:he(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",de._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:me,paragraph:he(de.normal._paragraph).replace("hr",de.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",de.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var be={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:me,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:me,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};be._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",be.punctuation=he(be.punctuation).replace(/punctuation/g,be._punctuation).getRegex(),be._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",be._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",be.em.start=he(be.em.start).replace(/punctuation/g,be._punctuation).getRegex(),be.em.middle=he(be.em.middle).replace(/punctuation/g,be._punctuation).replace(/overlapSkip/g,be._overlapSkip).getRegex(),be.em.endAst=he(be.em.endAst,"g").replace(/punctuation/g,be._punctuation).getRegex(),be.em.endUnd=he(be.em.endUnd,"g").replace(/punctuation/g,be._punctuation).getRegex(),be.strong.start=he(be.strong.start).replace(/punctuation/g,be._punctuation).getRegex(),be.strong.middle=he(be.strong.middle).replace(/punctuation/g,be._punctuation).replace(/blockSkip/g,be._blockSkip).getRegex(),be.strong.endAst=he(be.strong.endAst,"g").replace(/punctuation/g,be._punctuation).getRegex(),be.strong.endUnd=he(be.strong.endUnd,"g").replace(/punctuation/g,be._punctuation).getRegex(),be.blockSkip=he(be._blockSkip,"g").getRegex(),be.overlapSkip=he(be._overlapSkip,"g").getRegex(),be._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,be._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,be._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])?)+(?![-_])/,be.autolink=he(be.autolink).replace("scheme",be._scheme).replace("email",be._email).getRegex(),be._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,be.tag=he(be.tag).replace("comment",de._comment).replace("attribute",be._attribute).getRegex(),be._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,be._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,be._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,be.link=he(be.link).replace("label",be._label).replace("href",be._href).replace("title",be._title).getRegex(),be.reflink=he(be.reflink).replace("label",be._label).getRegex(),be.reflinkSearch=he(be.reflinkSearch,"g").replace("reflink",be.reflink).replace("nolink",be.nolink).getRegex(),be.normal=Ee({},be),be.pedantic=Ee({},be.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:he(/^!?\[(label)\]\((.*?)\)/).replace("label",be._label).getRegex(),reflink:he(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",be._label).getRegex()}),be.gfm=Ee({},be.normal,{escape:he(be.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),be.gfm.url=he(be.gfm.url,"i").replace("email",be.gfm._extended_email).getRegex(),be.breaks=Ee({},be.gfm,{br:he(be.br).replace("{2,}","*").getRegex(),text:he(be.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Ue={block:de,inline:be},Re=A.defaults,De=Ue.block,je=Ue.inline;function ve(Pe){return Pe.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 ce(Pe){var Ie="",Ce,pe,_e=Pe.length;for(Ce=0;Ce<_e;Ce++)pe=Pe.charCodeAt(Ce),Math.random()>.5&&(pe="x"+pe.toString(16)),Ie+="&#"+pe+";";return Ie}var ke=function(){function Pe(Ce){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ce||Re,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var pe={block:De.normal,inline:je.normal};this.options.pedantic?(pe.block=De.pedantic,pe.inline=je.pedantic):this.options.gfm&&(pe.block=De.gfm,this.options.breaks?pe.inline=je.breaks:pe.inline=je.gfm),this.tokenizer.rules=pe}Pe.lex=function(pe,_e){var Oe=new Pe(_e);return Oe.lex(pe)};var Ie=Pe.prototype;return Ie.lex=function(pe){return pe=pe.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(pe,this.tokens,!0),this.inline(this.tokens),this.tokens},Ie.blockTokens=function(pe,_e,Oe){_e===void 0&&(_e=[]),Oe===void 0&&(Oe=!0),pe=pe.replace(/^ +$/gm,"");for(var we,Be,qe,dt;pe;){if(we=this.tokenizer.space(pe)){pe=pe.substring(we.raw.length),we.type&&_e.push(we);continue}if(we=this.tokenizer.code(pe,_e)){pe=pe.substring(we.raw.length),we.type?_e.push(we):(dt=_e[_e.length-1],dt.raw+=`
|
|
|
`+we.raw,dt.text+=`
|
|
|
`+we.text);continue}if(we=this.tokenizer.fences(pe)){pe=pe.substring(we.raw.length),_e.push(we);continue}if(we=this.tokenizer.heading(pe)){pe=pe.substring(we.raw.length),_e.push(we);continue}if(we=this.tokenizer.nptable(pe)){pe=pe.substring(we.raw.length),_e.push(we);continue}if(we=this.tokenizer.hr(pe)){pe=pe.substring(we.raw.length),_e.push(we);continue}if(we=this.tokenizer.blockquote(pe)){pe=pe.substring(we.raw.length),we.tokens=this.blockTokens(we.text,[],Oe),_e.push(we);continue}if(we=this.tokenizer.list(pe)){for(pe=pe.substring(we.raw.length),qe=we.items.length,Be=0;Be<qe;Be++)we.items[Be].tokens=this.blockTokens(we.items[Be].text,[],!1);_e.push(we);continue}if(we=this.tokenizer.html(pe)){pe=pe.substring(we.raw.length),_e.push(we);continue}if(Oe&&(we=this.tokenizer.def(pe))){pe=pe.substring(we.raw.length),this.tokens.links[we.tag]||(this.tokens.links[we.tag]={href:we.href,title:we.title});continue}if(we=this.tokenizer.table(pe)){pe=pe.substring(we.raw.length),_e.push(we);continue}if(we=this.tokenizer.lheading(pe)){pe=pe.substring(we.raw.length),_e.push(we);continue}if(Oe&&(we=this.tokenizer.paragraph(pe))){pe=pe.substring(we.raw.length),_e.push(we);continue}if(we=this.tokenizer.text(pe,_e)){pe=pe.substring(we.raw.length),we.type?_e.push(we):(dt=_e[_e.length-1],dt.raw+=`
|
|
|
`+we.raw,dt.text+=`
|
|
|
`+we.text);continue}if(pe){var Et="Infinite loop on byte: "+pe.charCodeAt(0);if(this.options.silent){console.error(Et);break}else throw new Error(Et)}}return _e},Ie.inline=function(pe){var _e,Oe,we,Be,qe,dt,Et=pe.length;for(_e=0;_e<Et;_e++){dt=pe[_e];switch(dt.type){case"paragraph":case"text":case"heading":{dt.tokens=[],this.inlineTokens(dt.text,dt.tokens);break}case"table":{for(dt.tokens={header:[],cells:[]},Be=dt.header.length,Oe=0;Oe<Be;Oe++)dt.tokens.header[Oe]=[],this.inlineTokens(dt.header[Oe],dt.tokens.header[Oe]);for(Be=dt.cells.length,Oe=0;Oe<Be;Oe++)for(qe=dt.cells[Oe],dt.tokens.cells[Oe]=[],we=0;we<qe.length;we++)dt.tokens.cells[Oe][we]=[],this.inlineTokens(qe[we],dt.tokens.cells[Oe][we]);break}case"blockquote":{this.inline(dt.tokens);break}case"list":{for(Be=dt.items.length,Oe=0;Oe<Be;Oe++)this.inline(dt.items[Oe].tokens);break}}}return pe},Ie.inlineTokens=function(pe,_e,Oe,we,Be){_e===void 0&&(_e=[]),Oe===void 0&&(Oe=!1),we===void 0&&(we=!1),Be===void 0&&(Be="");var qe,dt=pe,Et;if(this.tokens.links){var It=Object.keys(this.tokens.links);if(It.length>0)for(;(Et=this.tokenizer.rules.inline.reflinkSearch.exec(dt))!=null;)It.includes(Et[0].slice(Et[0].lastIndexOf("[")+1,-1))&&(dt=dt.slice(0,Et.index)+"["+"a".repeat(Et[0].length-2)+"]"+dt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Et=this.tokenizer.rules.inline.blockSkip.exec(dt))!=null;)dt=dt.slice(0,Et.index)+"["+"a".repeat(Et[0].length-2)+"]"+dt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;pe;){if(qe=this.tokenizer.escape(pe)){pe=pe.substring(qe.raw.length),_e.push(qe);continue}if(qe=this.tokenizer.tag(pe,Oe,we)){pe=pe.substring(qe.raw.length),Oe=qe.inLink,we=qe.inRawBlock,_e.push(qe);continue}if(qe=this.tokenizer.link(pe)){pe=pe.substring(qe.raw.length),qe.type==="link"&&(qe.tokens=this.inlineTokens(qe.text,[],!0,we)),_e.push(qe);continue}if(qe=this.tokenizer.reflink(pe,this.tokens.links)){pe=pe.substring(qe.raw.length),qe.type==="link"&&(qe.tokens=this.inlineTokens(qe.text,[],!0,we)),_e.push(qe);continue}if(qe=this.tokenizer.strong(pe,dt,Be)){pe=pe.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],Oe,we),_e.push(qe);continue}if(qe=this.tokenizer.em(pe,dt,Be)){pe=pe.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],Oe,we),_e.push(qe);continue}if(qe=this.tokenizer.codespan(pe)){pe=pe.substring(qe.raw.length),_e.push(qe);continue}if(qe=this.tokenizer.br(pe)){pe=pe.substring(qe.raw.length),_e.push(qe);continue}if(qe=this.tokenizer.del(pe)){pe=pe.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],Oe,we),_e.push(qe);continue}if(qe=this.tokenizer.autolink(pe,ce)){pe=pe.substring(qe.raw.length),_e.push(qe);continue}if(!Oe&&(qe=this.tokenizer.url(pe,ce))){pe=pe.substring(qe.raw.length),_e.push(qe);continue}if(qe=this.tokenizer.inlineText(pe,we,ve)){pe=pe.substring(qe.raw.length),Be=qe.raw.slice(-1),_e.push(qe);continue}if(pe){var Rt="Infinite loop on byte: "+pe.charCodeAt(0);if(this.options.silent){console.error(Rt);break}else throw new Error(Rt)}}return _e},ee(Pe,null,[{key:"rules",get:function(){return{block:De,inline:je}}}]),Pe}(),Ne=A.defaults,Je=J.cleanUrl,te=J.escape,P=function(){function Pe(Ce){this.options=Ce||Ne}var Ie=Pe.prototype;return Ie.code=function(pe,_e,Oe){var we=(_e||"").match(/\S*/)[0];if(this.options.highlight){var Be=this.options.highlight(pe,we);Be!=null&&Be!==pe&&(Oe=!0,pe=Be)}return we?'<pre><code class="'+this.options.langPrefix+te(we,!0)+'">'+(Oe?pe:te(pe,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(Oe?pe:te(pe,!0))+`</code></pre>
|
|
|
`},Ie.blockquote=function(pe){return`<blockquote>
|
|
|
`+pe+`</blockquote>
|
|
|
`},Ie.html=function(pe){return pe},Ie.heading=function(pe,_e,Oe,we){return this.options.headerIds?"<h"+_e+' id="'+this.options.headerPrefix+we.slug(Oe)+'">'+pe+"</h"+_e+`>
|
|
|
`:"<h"+_e+">"+pe+"</h"+_e+`>
|
|
|
`},Ie.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Ie.list=function(pe,_e,Oe){var we=_e?"ol":"ul",Be=_e&&Oe!==1?' start="'+Oe+'"':"";return"<"+we+Be+`>
|
|
|
`+pe+"</"+we+`>
|
|
|
`},Ie.listitem=function(pe){return"<li>"+pe+`</li>
|
|
|
`},Ie.checkbox=function(pe){return"<input "+(pe?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ie.paragraph=function(pe){return"<p>"+pe+`</p>
|
|
|
`},Ie.table=function(pe,_e){return _e&&(_e="<tbody>"+_e+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+pe+`</thead>
|
|
|
`+_e+`</table>
|
|
|
`},Ie.tablerow=function(pe){return`<tr>
|
|
|
`+pe+`</tr>
|
|
|
`},Ie.tablecell=function(pe,_e){var Oe=_e.header?"th":"td",we=_e.align?"<"+Oe+' align="'+_e.align+'">':"<"+Oe+">";return we+pe+"</"+Oe+`>
|
|
|
`},Ie.strong=function(pe){return"<strong>"+pe+"</strong>"},Ie.em=function(pe){return"<em>"+pe+"</em>"},Ie.codespan=function(pe){return"<code>"+pe+"</code>"},Ie.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ie.del=function(pe){return"<del>"+pe+"</del>"},Ie.link=function(pe,_e,Oe){if(pe=Je(this.options.sanitize,this.options.baseUrl,pe),pe===null)return Oe;var we='<a href="'+te(pe)+'"';return _e&&(we+=' title="'+_e+'"'),we+=">"+Oe+"</a>",we},Ie.image=function(pe,_e,Oe){if(pe=Je(this.options.sanitize,this.options.baseUrl,pe),pe===null)return Oe;var we='<img src="'+pe+'" alt="'+Oe+'"';return _e&&(we+=' title="'+_e+'"'),we+=this.options.xhtml?"/>":">",we},Ie.text=function(pe){return pe},Pe}(),U=function(){function Pe(){}var Ie=Pe.prototype;return Ie.strong=function(pe){return pe},Ie.em=function(pe){return pe},Ie.codespan=function(pe){return pe},Ie.del=function(pe){return pe},Ie.html=function(pe){return pe},Ie.text=function(pe){return pe},Ie.link=function(pe,_e,Oe){return""+Oe},Ie.image=function(pe,_e,Oe){return""+Oe},Ie.br=function(){return""},Pe}(),q=function(){function Pe(){this.seen={}}var Ie=Pe.prototype;return Ie.slug=function(pe){var _e=pe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(_e)){var Oe=_e;do this.seen[Oe]++,_e=Oe+"-"+this.seen[Oe];while(this.seen.hasOwnProperty(_e))}return this.seen[_e]=0,_e},Pe}(),X=A.defaults,$=J.unescape,ge=function(){function Pe(Ce){this.options=Ce||X,this.options.renderer=this.options.renderer||new P,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new U,this.slugger=new q}Pe.parse=function(pe,_e){var Oe=new Pe(_e);return Oe.parse(pe)};var Ie=Pe.prototype;return Ie.parse=function(pe,_e){_e===void 0&&(_e=!0);var Oe="",we,Be,qe,dt,Et,It,Rt,Ct,st,ut,$e,xe,Fe,ct,tt,wt,St,Qe,lt=pe.length;for(we=0;we<lt;we++){ut=pe[we];switch(ut.type){case"space":continue;case"hr":{Oe+=this.renderer.hr();continue}case"heading":{Oe+=this.renderer.heading(this.parseInline(ut.tokens),ut.depth,$(this.parseInline(ut.tokens,this.textRenderer)),this.slugger);continue}case"code":{Oe+=this.renderer.code(ut.text,ut.lang,ut.escaped);continue}case"table":{for(Ct="",Rt="",dt=ut.header.length,Be=0;Be<dt;Be++)Rt+=this.renderer.tablecell(this.parseInline(ut.tokens.header[Be]),{header:!0,align:ut.align[Be]});for(Ct+=this.renderer.tablerow(Rt),st="",dt=ut.cells.length,Be=0;Be<dt;Be++){for(It=ut.tokens.cells[Be],Rt="",Et=It.length,qe=0;qe<Et;qe++)Rt+=this.renderer.tablecell(this.parseInline(It[qe]),{header:!1,align:ut.align[qe]});st+=this.renderer.tablerow(Rt)}Oe+=this.renderer.table(Ct,st);continue}case"blockquote":{st=this.parse(ut.tokens),Oe+=this.renderer.blockquote(st);continue}case"list":{for($e=ut.ordered,xe=ut.start,Fe=ut.loose,dt=ut.items.length,st="",Be=0;Be<dt;Be++)tt=ut.items[Be],wt=tt.checked,St=tt.task,ct="",tt.task&&(Qe=this.renderer.checkbox(wt),Fe?tt.tokens.length>0&&tt.tokens[0].type==="text"?(tt.tokens[0].text=Qe+" "+tt.tokens[0].text,tt.tokens[0].tokens&&tt.tokens[0].tokens.length>0&&tt.tokens[0].tokens[0].type==="text"&&(tt.tokens[0].tokens[0].text=Qe+" "+tt.tokens[0].tokens[0].text)):tt.tokens.unshift({type:"text",text:Qe}):ct+=Qe),ct+=this.parse(tt.tokens,Fe),st+=this.renderer.listitem(ct,St,wt);Oe+=this.renderer.list(st,$e,xe);continue}case"html":{Oe+=this.renderer.html(ut.text);continue}case"paragraph":{Oe+=this.renderer.paragraph(this.parseInline(ut.tokens));continue}case"text":{for(st=ut.tokens?this.parseInline(ut.tokens):ut.text;we+1<lt&&pe[we+1].type==="text";)ut=pe[++we],st+=`
|
|
|
`+(ut.tokens?this.parseInline(ut.tokens):ut.text);Oe+=_e?this.renderer.paragraph(st):st;continue}default:{var xt='Token with "'+ut.type+'" type was not found.';if(this.options.silent){console.error(xt);return}else throw new Error(xt)}}}return Oe},Ie.parseInline=function(pe,_e){_e=_e||this.renderer;var Oe="",we,Be,qe=pe.length;for(we=0;we<qe;we++){Be=pe[we];switch(Be.type){case"escape":{Oe+=_e.text(Be.text);break}case"html":{Oe+=_e.html(Be.text);break}case"link":{Oe+=_e.link(Be.href,Be.title,this.parseInline(Be.tokens,_e));break}case"image":{Oe+=_e.image(Be.href,Be.title,Be.text);break}case"strong":{Oe+=_e.strong(this.parseInline(Be.tokens,_e));break}case"em":{Oe+=_e.em(this.parseInline(Be.tokens,_e));break}case"codespan":{Oe+=_e.codespan(Be.text);break}case"br":{Oe+=_e.br();break}case"del":{Oe+=_e.del(this.parseInline(Be.tokens,_e));break}case"text":{Oe+=_e.text(Be.text);break}default:{var dt='Token with "'+Be.type+'" type was not found.';if(this.options.silent){console.error(dt);return}else throw new Error(dt)}}}return Oe},Pe}(),Ae=J.merge,at=J.checkSanitizeDeprecation,Le=J.escape,Me=A.getDefaults,Xe=A.changeDefaults,et=A.defaults;function ze(Pe,Ie,Ce){if(typeof Pe=="undefined"||Pe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Pe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Pe)+", string expected");if(typeof Ie=="function"&&(Ce=Ie,Ie=null),Ie=Ae({},ze.defaults,Ie||{}),at(Ie),Ce){var pe=Ie.highlight,_e;try{_e=ke.lex(Pe,Ie)}catch(qe){return Ce(qe)}var Oe=function(dt){var Et;if(!dt)try{Et=ge.parse(_e,Ie)}catch(It){dt=It}return Ie.highlight=pe,dt?Ce(dt):Ce(null,Et)};if(!pe||pe.length<3)return Oe();if(delete Ie.highlight,!_e.length)return Oe();var we=0;ze.walkTokens(_e,function(qe){qe.type==="code"&&(we++,setTimeout(function(){pe(qe.text,qe.lang,function(dt,Et){if(dt)return Oe(dt);Et!=null&&Et!==qe.text&&(qe.text=Et,qe.escaped=!0),we--,we===0&&Oe()})},0))}),we===0&&Oe();return}try{var Be=ke.lex(Pe,Ie);return Ie.walkTokens&&ze.walkTokens(Be,Ie.walkTokens),ge.parse(Be,Ie)}catch(qe){if(qe.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Ie.silent)return"<p>An error occurred:</p><pre>"+Le(qe.message+"",!0)+"</pre>";throw qe}}ze.options=ze.setOptions=function(Pe){return Ae(ze.defaults,Pe),Xe(ze.defaults),ze},ze.getDefaults=Me,ze.defaults=et,ze.use=function(Pe){var Ie=Ae({},Pe);if(Pe.renderer&&function(){var pe=ze.defaults.renderer||new P,_e=function(Be){var qe=pe[Be];pe[Be]=function(){for(var dt=arguments.length,Et=new Array(dt),It=0;It<dt;It++)Et[It]=arguments[It];var Rt=Pe.renderer[Be].apply(pe,Et);return Rt===!1&&(Rt=qe.apply(pe,Et)),Rt}};for(var Oe in Pe.renderer)_e(Oe);Ie.renderer=pe}(),Pe.tokenizer&&function(){var pe=ze.defaults.tokenizer||new oe,_e=function(Be){var qe=pe[Be];pe[Be]=function(){for(var dt=arguments.length,Et=new Array(dt),It=0;It<dt;It++)Et[It]=arguments[It];var Rt=Pe.tokenizer[Be].apply(pe,Et);return Rt===!1&&(Rt=qe.apply(pe,Et)),Rt}};for(var Oe in Pe.tokenizer)_e(Oe);Ie.tokenizer=pe}(),Pe.walkTokens){var Ce=ze.defaults.walkTokens;Ie.walkTokens=function(pe){Pe.walkTokens(pe),Ce&&Ce(pe)}}ze.setOptions(Ie)},ze.walkTokens=function(Pe,Ie){for(var Ce=D(Pe),pe;!(pe=Ce()).done;){var _e=pe.value;Ie(_e);switch(_e.type){case"table":{for(var Oe=D(_e.tokens.header),we;!(we=Oe()).done;){var Be=we.value;ze.walkTokens(Be,Ie)}for(var qe=D(_e.tokens.cells),dt;!(dt=qe()).done;)for(var Et=dt.value,It=D(Et),Rt;!(Rt=It()).done;){var Ct=Rt.value;ze.walkTokens(Ct,Ie)}break}case"list":{ze.walkTokens(_e.items,Ie);break}default:_e.tokens&&ze.walkTokens(_e.tokens,Ie)}}},ze.Parser=ge,ze.parser=ge.parse,ze.Renderer=P,ze.TextRenderer=U,ze.Lexer=ke,ze.lexer=ke.lex,ze.Tokenizer=oe,ze.Slugger=q,ze.parse=ze;var Ke=ze;return Ke})},"DlR+":function(Ye,We,z){var ae=z("MFOe"),ee=ae.Global,B=ae.trim;Ye.exports={name:"cookieStorage",read:D,write:A,each:S,remove:C,clearAll:h};var O=ee.document;function D(c){if(!c||!p(c))return null;var s="(?:^|.*;\\s*)"+escape(c).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(O.cookie.replace(new RegExp(s),"$1"))}function S(c){for(var s=O.cookie.split(/; ?/g),n=s.length-1;n>=0;n--){if(!B(s[n]))continue;var o=s[n].split("="),i=unescape(o[0]),l=unescape(o[1]);c(l,i)}}function A(c,s){if(!c)return;O.cookie=escape(c)+"="+escape(s)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function C(c){if(!c||!p(c))return;O.cookie=escape(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function h(){S(function(c,s){C(s)})}function p(c){return new RegExp("(?:^|;\\s*)"+escape(c).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(O.cookie)}},E2g8:function(Ye,We,z){(function(ae,ee){/*!
|
|
|
* @overview es6-promise - a tiny implementation of Promises/A+.
|
|
|
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
|
|
* @license Licensed under MIT license
|
|
|
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
|
|
* @version v4.2.8+1e68dce6
|
|
|
*/(function(B,O){Ye.exports=O()})(this,function(){"use strict";function B(P){var U=typeof P;return P!==null&&(U==="object"||U==="function")}function O(P){return typeof P=="function"}var D=void 0;Array.isArray?D=Array.isArray:D=function(P){return Object.prototype.toString.call(P)==="[object Array]"};var S=D,A=0,C=void 0,h=void 0,p=function(U,q){b[A]=U,b[A+1]=q,A+=2,A===2&&(h?h(g):_())};function c(P){h=P}function s(P){p=P}var n=typeof window!="undefined"?window:void 0,o=n||{},i=o.MutationObserver||o.WebKitMutationObserver,l=typeof self=="undefined"&&typeof ae!="undefined"&&{}.toString.call(ae)==="[object process]",a=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function r(){return function(){return ae.nextTick(g)}}function t(){return typeof C!="undefined"?function(){C(g)}:y()}function d(){var P=0,U=new i(g),q=document.createTextNode("");return U.observe(q,{characterData:!0}),function(){q.data=P=++P%2}}function v(){var P=new MessageChannel;return P.port1.onmessage=g,function(){return P.port2.postMessage(0)}}function y(){var P=setTimeout;return function(){return P(g,1)}}var b=new Array(1e3);function g(){for(var P=0;P<A;P+=2){var U=b[P],q=b[P+1];U(q),b[P]=void 0,b[P+1]=void 0}A=0}function m(){try{var P=Function("return this")().require("vertx");return C=P.runOnLoop||P.runOnContext,t()}catch(U){return y()}}var _=void 0;l?_=r():i?_=d():a?_=v():n===void 0&&!0?_=m():_=y();function x(P,U){var q=this,X=new this.constructor(w);X[E]===void 0&&Ue(X);var $=q._state;if($){var ge=arguments[$-1];p(function(){return he($,X,ge,q._result)})}else oe(q,X,P,U);return X}function f(P){var U=this;if(P&&typeof P=="object"&&P.constructor===U)return P;var q=new U(w);return Y(q,P),q}var E=Math.random().toString(36).substring(2);function w(){}var T=void 0,R=1,N=2;function j(){return new TypeError("You cannot resolve a promise with itself")}function W(){return new TypeError("A promises callback cannot return that same promise.")}function J(P,U,q,X){try{P.call(U,q,X)}catch($){return $}}function F(P,U,q){p(function(X){var $=!1,ge=J(q,U,function(Ae){if($)return;$=!0,U!==Ae?Y(X,Ae):Q(X,Ae)},function(Ae){if($)return;$=!0,re(X,Ae)},"Settle: "+(X._label||" unknown promise"));!$&&ge&&($=!0,re(X,ge))},P)}function k(P,U){U._state===R?Q(P,U._result):U._state===N?re(P,U._result):oe(U,void 0,function(q){return Y(P,q)},function(q){return re(P,q)})}function K(P,U,q){U.constructor===P.constructor&&q===x&&U.constructor.resolve===f?k(P,U):q===void 0?Q(P,U):O(q)?F(P,U,q):Q(P,U)}function Y(P,U){if(P===U)re(P,j());else if(B(U)){var q=void 0;try{q=U.then}catch(X){re(P,X);return}K(P,U,q)}else Q(P,U)}function H(P){P._onerror&&P._onerror(P._result),me(P)}function Q(P,U){if(P._state!==T)return;P._result=U,P._state=R,P._subscribers.length!==0&&p(me,P)}function re(P,U){if(P._state!==T)return;P._state=N,P._result=U,p(H,P)}function oe(P,U,q,X){var $=P._subscribers,ge=$.length;P._onerror=null,$[ge]=U,$[ge+R]=q,$[ge+N]=X,ge===0&&P._state&&p(me,P)}function me(P){var U=P._subscribers,q=P._state;if(U.length===0)return;for(var X=void 0,$=void 0,ge=P._result,Ae=0;Ae<U.length;Ae+=3)X=U[Ae],$=U[Ae+q],X?he(q,X,$,ge):$(ge);P._subscribers.length=0}function he(P,U,q,X){var $=O(q),ge=void 0,Ae=void 0,at=!0;if($){try{ge=q(X)}catch(Le){at=!1,Ae=Le}if(U===ge){re(U,W());return}}else ge=X;U._state!==T||($&&at?Y(U,ge):at===!1?re(U,Ae):P===R?Q(U,ge):P===N&&re(U,ge))}function Ee(P,U){try{U(function(X){Y(P,X)},function(X){re(P,X)})}catch(q){re(P,q)}}var de=0;function be(){return de++}function Ue(P){P[E]=de++,P._state=void 0,P._result=void 0,P._subscribers=[]}function Re(){return new Error("Array Methods must be provided an Array")}var De=function(){function P(U,q){this._instanceConstructor=U,this.promise=new U(w),this.promise[E]||Ue(this.promise),S(q)?(this.length=q.length,this._remaining=q.length,this._result=new Array(this.length),this.length===0?Q(this.promise,this._result):(this.length=this.length||0,this._enumerate(q),this._remaining===0&&Q(this.promise,this._result))):re(this.promise,Re())}return P.prototype._enumerate=function(q){for(var X=0;this._state===T&&X<q.length;X++)this._eachEntry(q[X],X)},P.prototype._eachEntry=function(q,X){var $=this._instanceConstructor,ge=$.resolve;if(ge===f){var Ae=void 0,at=void 0,Le=!1;try{Ae=q.then}catch(Xe){Le=!0,at=Xe}if(Ae===x&&q._state!==T)this._settledAt(q._state,X,q._result);else if(typeof Ae!="function")this._remaining--,this._result[X]=q;else if($===Je){var Me=new $(w);Le?re(Me,at):K(Me,q,Ae),this._willSettleAt(Me,X)}else this._willSettleAt(new $(function(Xe){return Xe(q)}),X)}else this._willSettleAt(ge(q),X)},P.prototype._settledAt=function(q,X,$){var ge=this.promise;ge._state===T&&(this._remaining--,q===N?re(ge,$):this._result[X]=$),this._remaining===0&&Q(ge,this._result)},P.prototype._willSettleAt=function(q,X){var $=this;oe(q,void 0,function(ge){return $._settledAt(R,X,ge)},function(ge){return $._settledAt(N,X,ge)})},P}();function je(P){return new De(this,P).promise}function ve(P){var U=this;return S(P)?new U(function(q,X){for(var $=P.length,ge=0;ge<$;ge++)U.resolve(P[ge]).then(q,X)}):new U(function(q,X){return X(new TypeError("You must pass an array to race."))})}function ce(P){var U=this,q=new U(w);return re(q,P),q}function ke(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Ne(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Je=function(){function P(U){this[E]=be(),this._result=this._state=void 0,this._subscribers=[],w!==U&&(typeof U!="function"&&ke(),this instanceof P?Ee(this,U):Ne())}return P.prototype.catch=function(q){return this.then(null,q)},P.prototype.finally=function(q){var X=this,$=X.constructor;return O(q)?X.then(function(ge){return $.resolve(q()).then(function(){return ge})},function(ge){return $.resolve(q()).then(function(){throw ge})}):X.then(q,q)},P}();Je.prototype.then=x,Je.all=je,Je.race=ve,Je.resolve=f,Je.reject=ce,Je._setScheduler=c,Je._setAsap=s,Je._asap=p;function te(){var P=void 0;if(typeof ee!="undefined")P=ee;else if(typeof self!="undefined")P=self;else try{P=Function("return this")()}catch(X){throw new Error("polyfill failed because global object is unavailable in this environment")}var U=P.Promise;if(U){var q=null;try{q=Object.prototype.toString.call(U.resolve())}catch(X){}if(q==="[object Promise]"&&!U.cast)return}P.Promise=Je}return Je.polyfill=te,Je.Promise=Je,Je})}).call(this,z("Q2Ig"),z("IyRk"))},E9nw:function(Ye,We){Ye.exports=function(){var z=document.getSelection();if(!z.rangeCount)return function(){};for(var ae=document.activeElement,ee=[],B=0;B<z.rangeCount;B++)ee.push(z.getRangeAt(B));switch(ae.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":ae.blur();break;default:ae=null;break}return z.removeAllRanges(),function(){z.type==="Caret"&&z.removeAllRanges(),z.rangeCount||ee.forEach(function(O){z.addRange(O)}),ae&&ae.focus()}}},EHPI:function(Ye,We,z){"use strict";var ae=z("bbsP"),ee=z("/wGt"),B=z("tJVT"),O=z("k1fw"),D=z("cDcd"),S=z.n(D),A=z("ZW9T"),C=z("ZD9Y"),h=z("M8RZ"),p=z("bCnd"),c=z("fcyK"),s=z.n(c),n={theme:Object(p.a)("cmCodeMode","vs-dark"),fontSize:Object(p.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(p.a)("cmTabToSpace",!0)},o;(function(a){a[a.set_font_size=0]="set_font_size",a[a.set_theme=1]="set_theme",a[a.on_tab_to_space=2]="on_tab_to_space",a[a.set_show_editor_setting=3]="set_show_editor_setting"})(o||(o={}));function i(a,r){switch(r.type){case o.set_show_editor_setting:return Object(O.a)(Object(O.a)({},a),{},{showEditorSetting:r.payload});case o.set_theme:return Object(O.a)(Object(O.a)({},a),{},{theme:r.payload});case o.set_font_size:return Object(O.a)(Object(O.a)({},a),{},{fontSize:r.payload});case o.on_tab_to_space:return Object(O.a)(Object(O.a)({},a),{},{tabToSpace:r.payload});default:throw new Error}}We.a=function(a){var r=a.isLoading,t=a.value,d=a.onChange,v=a.language,y=a.ActionBarRender,b=y===void 0?function(J){return S.a.createElement(l,{onShowCodeSetting:J})}:y,g=Object(D.useReducer)(i,n),m=Object(B.a)(g,2),_=m[0],x=m[1],f=_.theme,E=_.fontSize,w=_.showEditorSetting,T=_.tabToSpace,R={onFontSizeChange:function(F){x({type:o.set_font_size,payload:F}),Object(p.b)("cmFontSize",F)},tabToSpace:T,cmFontSize:E,className:"oj",cmCodeMode:f,onTabToSpace:function(F){x({type:o.on_tab_to_space,payload:F}),Object(p.b)("cmTabToSpace",F)},onCodeModeChange:function(F){x({type:o.set_theme,payload:F}),Object(p.b)("cmCodeMode",F)}};function N(){x({type:o.set_show_editor_setting,payload:!1})}function j(){x({type:o.set_show_editor_setting,payload:!0})}var W={value:t,language:v,onChange:d,theme:f,height:"calc(100% - 56px)",options:{fontSize:E,insertSpaces:T}};return S.a.createElement(D.Fragment,null,S.a.createElement("div",{className:"code-panel-container"},b(j),!r&&S.a.createElement(A.b,W)),S.a.createElement(h.a,null,S.a.createElement(ee.a,{className:"oj",title:null,placement:"right",closable:!1,visible:w,onClose:N},S.a.createElement(C.a,R))))};function l(a){var r=a.onShowCodeSetting;return S.a.createElement("div",{className:"action-bar"},S.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),S.a.createElement("a",{onClick:r},S.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(Ye,We,z){(function(ae){ae(z("VrN/"))})(function(ae){var ee={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},B=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(i,l,a){a&&a!=ae.Init&&(i.removeKeyMap(D),i.state.closeBrackets=null),l&&(S(O(l,"pairs")),i.state.closeBrackets=l,i.addKeyMap(D))});function O(i,l){return l=="pairs"&&typeof i=="string"?i:typeof i=="object"&&i[l]!=null?i[l]:ee[l]}var D={Backspace:h,Enter:p};function S(i){for(var l=0;l<i.length;l++){var a=i.charAt(l),r="'"+a+"'";D[r]||(D[r]=A(a))}}S(ee.pairs+"`");function A(i){return function(l){return s(l,i)}}function C(i){var l=i.state.closeBrackets;if(!l||l.override)return l;var a=i.getModeAt(i.getCursor());return a.closeBrackets||l}function h(i){var l=C(i);if(!l||i.getOption("disableInput"))return ae.Pass;for(var a=O(l,"pairs"),r=i.listSelections(),t=0;t<r.length;t++){if(!r[t].empty())return ae.Pass;var d=n(i,r[t].head);if(!d||a.indexOf(d)%2!=0)return ae.Pass}for(var t=r.length-1;t>=0;t--){var v=r[t].head;i.replaceRange("",B(v.line,v.ch-1),B(v.line,v.ch+1),"+delete")}}function p(i){var l=C(i),a=l&&O(l,"explode");if(!a||i.getOption("disableInput"))return ae.Pass;for(var r=i.listSelections(),t=0;t<r.length;t++){if(!r[t].empty())return ae.Pass;var d=n(i,r[t].head);if(!d||a.indexOf(d)%2!=0)return ae.Pass}i.operation(function(){var v=i.lineSeparator()||`
|
|
|
`;i.replaceSelection(v+v,null),i.execCommand("goCharLeft"),r=i.listSelections();for(var y=0;y<r.length;y++){var b=r[y].head.line;i.indentLine(b,null,!0),i.indentLine(b+1,null,!0)}})}function c(i){var l=ae.cmpPos(i.anchor,i.head)>0;return{anchor:new B(i.anchor.line,i.anchor.ch+(l?-1:1)),head:new B(i.head.line,i.head.ch+(l?1:-1))}}function s(i,l){var a=C(i);if(!a||i.getOption("disableInput"))return ae.Pass;var r=O(a,"pairs"),t=r.indexOf(l);if(t==-1)return ae.Pass;for(var d=O(a,"closeBefore"),v=O(a,"triples"),y=r.charAt(t+1)==l,b=i.listSelections(),g=t%2==0,m,_=0;_<b.length;_++){var x=b[_],f=x.head,E,w=i.getRange(f,B(f.line,f.ch+1));if(g&&!x.empty())E="surround";else if((y||!g)&&w==l)y&&o(i,f)?E="both":v.indexOf(l)>=0&&i.getRange(f,B(f.line,f.ch+3))==l+l+l?E="skipThree":E="skip";else if(y&&f.ch>1&&v.indexOf(l)>=0&&i.getRange(B(f.line,f.ch-2),f)==l+l){if(f.ch>2&&/\bstring/.test(i.getTokenTypeAt(B(f.line,f.ch-2))))return ae.Pass;E="addFour"}else if(y){var T=f.ch==0?" ":i.getRange(B(f.line,f.ch-1),f);if(!ae.isWordChar(w)&&T!=l&&!ae.isWordChar(T))E="both";else return ae.Pass}else if(g&&(w.length===0||/\s/.test(w)||d.indexOf(w)>-1))E="both";else return ae.Pass;if(!m)m=E;else if(m!=E)return ae.Pass}var R=t%2?r.charAt(t-1):l,N=t%2?l:r.charAt(t+1);i.operation(function(){if(m=="skip")i.execCommand("goCharRight");else if(m=="skipThree")for(var j=0;j<3;j++)i.execCommand("goCharRight");else if(m=="surround"){for(var W=i.getSelections(),j=0;j<W.length;j++)W[j]=R+W[j]+N;i.replaceSelections(W,"around"),W=i.listSelections().slice();for(var j=0;j<W.length;j++)W[j]=c(W[j]);i.setSelections(W)}else m=="both"?(i.replaceSelection(R+N,null),i.triggerElectric(R+N),i.execCommand("goCharLeft")):m=="addFour"&&(i.replaceSelection(R+R+R+R,"before"),i.execCommand("goCharRight"))})}function n(i,l){var a=i.getRange(B(l.line,l.ch-1),B(l.line,l.ch+1));return a.length==2?a:null}function o(i,l){var a=i.getTokenAt(B(l.line,l.ch+1));return/\bstring/.test(a.type)&&a.start==l.ch&&(l.ch==0||!/\bstring/.test(i.getTokenTypeAt(l)))}})},FOrL:function(Ye,We,z){Ye.exports=z.p+"static/nodata.a6b3f948.png"},GUcZ:function(Ye,We,z){"use strict";var ae=z("fWQN"),ee=z("mtLc"),B=function(){function Se(){Object(ae.a)(this,Se)}return Object(ee.a)(Se,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(G,Z){return G.__proto__=Z,G},Object.assign=Object.assign||function(G){if(G==null)throw new TypeError("Cannot convert undefined or null to object");for(var Z=Object(G),ne=1;ne<arguments.length;ne++){var se=arguments[ne];if(se!=null)for(var Te in se)se.hasOwnProperty(Te)&&(Z[Te]=se[Te])}return Z},typeof self.Promise!="function"&&z("E2g8").polyfill()}}]),Se}();B.install();var O=B,D=z("+qE3"),S=z.n(D),A=function(){function Se(){Object(ae.a)(this,Se)}return Object(ee.a)(Se,null,[{key:"e",value:function(G,Z){(!G||Se.FORCE_GLOBAL_TAG)&&(G=Se.GLOBAL_TAG);var ne="[".concat(G,"] > ").concat(Z);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","error",ne),!Se.ENABLE_ERROR)return;console.error?console.error(ne):console.warn?console.warn(ne):console.log(ne)}},{key:"i",value:function(G,Z){(!G||Se.FORCE_GLOBAL_TAG)&&(G=Se.GLOBAL_TAG);var ne="[".concat(G,"] > ").concat(Z);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","info",ne),!Se.ENABLE_INFO)return;console.info?console.info(ne):console.log(ne)}},{key:"w",value:function(G,Z){(!G||Se.FORCE_GLOBAL_TAG)&&(G=Se.GLOBAL_TAG);var ne="[".concat(G,"] > ").concat(Z);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","warn",ne),!Se.ENABLE_WARN)return;console.warn?console.warn(ne):console.log(ne)}},{key:"d",value:function(G,Z){(!G||Se.FORCE_GLOBAL_TAG)&&(G=Se.GLOBAL_TAG);var ne="[".concat(G,"] > ").concat(Z);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","debug",ne),!Se.ENABLE_DEBUG)return;console.debug?console.debug(ne):console.log(ne)}},{key:"v",value:function(G,Z){(!G||Se.FORCE_GLOBAL_TAG)&&(G=Se.GLOBAL_TAG);var ne="[".concat(G,"] > ").concat(Z);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","verbose",ne),!Se.ENABLE_VERBOSE)return;console.log(ne)}}]),Se}();A.GLOBAL_TAG="flv.js",A.FORCE_GLOBAL_TAG=!1,A.ENABLE_ERROR=!0,A.ENABLE_INFO=!0,A.ENABLE_WARN=!0,A.ENABLE_DEBUG=!0,A.ENABLE_VERBOSE=!0,A.ENABLE_CALLBACK=!1,A.emitter=new S.a;var C=A,h=function(){function Se(){Object(ae.a)(this,Se),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return Object(ee.a)(Se,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(G){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=G,this._totalBytes+=G):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=G,this._totalBytes+=G):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=G,this._totalBytes+=G,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var G=(this._now()-this._lastCheckpoint)/1e3;return G==0&&(G=1),this._intervalBytes/G/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var G=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/G/1024}}]),Se}(),p=h,c=z("yKVA"),s=z("879j"),n=function(){function Se(fe){Object(ae.a)(this,Se),this._message=fe}return Object(ee.a)(Se,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),Se}(),o=function(Se){Object(c.a)(G,Se);var fe=Object(s.a)(G);function G(Z){return Object(ae.a)(this,G),fe.call(this,Z)}return Object(ee.a)(G,[{key:"name",get:function(){return"IllegalStateException"}}]),G}(n),i=function(Se){Object(c.a)(G,Se);var fe=Object(s.a)(G);function G(Z){return Object(ae.a)(this,G),fe.call(this,Z)}return Object(ee.a)(G,[{key:"name",get:function(){return"InvalidArgumentException"}}]),G}(n),l=function(Se){Object(c.a)(G,Se);var fe=Object(s.a)(G);function G(Z){return Object(ae.a)(this,G),fe.call(this,Z)}return Object(ee.a)(G,[{key:"name",get:function(){return"NotImplementedException"}}]),G}(n),a={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},r={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},t=function(){function Se(fe){Object(ae.a)(this,Se),this._type=fe||"undefined",this._status=a.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(ee.a)(Se,[{key:"destroy",value:function(){this._status=a.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===a.kConnecting||this._status===a.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(G){this._onContentLengthKnown=G}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(G){this._onURLRedirect=G}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(G){this._onDataArrival=G}},{key:"onError",get:function(){return this._onError},set:function(G){this._onError=G}},{key:"onComplete",get:function(){return this._onComplete},set:function(G){this._onComplete=G}},{key:"open",value:function(G,Z){throw new l("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new l("Unimplemented abstract function!")}}]),Se}(),d=z("oZsa");function v(Se,fe){for(;!Object.prototype.hasOwnProperty.call(Se,fe)&&!(Se=Object(d.a)(Se),Se===null););return Se}function y(Se,fe,G){return typeof Reflect!="undefined"&&Reflect.get?y=Reflect.get:y=function(ne,se,Te){var Ge=v(ne,se);if(!Ge)return;var Ze=Object.getOwnPropertyDescriptor(Ge,se);return Ze.get?Ze.get.call(Te):Ze.value},y(Se,fe,G||Se)}var b={};function g(){var Se=self.navigator.userAgent.toLowerCase(),fe=/(edge)\/([\w.]+)/.exec(Se)||/(opr)[\/]([\w.]+)/.exec(Se)||/(chrome)[ \/]([\w.]+)/.exec(Se)||/(iemobile)[\/]([\w.]+)/.exec(Se)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Se)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Se)||/(webkit)[ \/]([\w.]+)/.exec(Se)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Se)||/(msie) ([\w.]+)/.exec(Se)||Se.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Se)||Se.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Se)||[],G=/(ipad)/.exec(Se)||/(ipod)/.exec(Se)||/(windows phone)/.exec(Se)||/(iphone)/.exec(Se)||/(kindle)/.exec(Se)||/(android)/.exec(Se)||/(windows)/.exec(Se)||/(mac)/.exec(Se)||/(linux)/.exec(Se)||/(cros)/.exec(Se)||[],Z={browser:fe[5]||fe[3]||fe[1]||"",version:fe[2]||fe[4]||"0",majorVersion:fe[4]||fe[2]||"0",platform:G[0]||""},ne={};if(Z.browser){ne[Z.browser]=!0;var se=Z.majorVersion.split(".");ne.version={major:parseInt(Z.majorVersion,10),string:Z.version},se.length>1&&(ne.version.minor=parseInt(se[1],10)),se.length>2&&(ne.version.build=parseInt(se[2],10))}if(Z.platform&&(ne[Z.platform]=!0),(ne.chrome||ne.opr||ne.safari)&&(ne.webkit=!0),ne.rv||ne.iemobile){ne.rv&&delete ne.rv;var Te="msie";Z.browser=Te,ne[Te]=!0}if(ne.edge){delete ne.edge;var Ge="msedge";Z.browser=Ge,ne[Ge]=!0}if(ne.opr){var Ze="opera";Z.browser=Ze,ne[Ze]=!0}if(ne.safari&&ne.android){var bt="android";Z.browser=bt,ne[bt]=!0}ne.name=Z.browser,ne.platform=Z.platform;for(var At in b)b.hasOwnProperty(At)&&delete b[At];Object.assign(b,ne)}g();var m=b,_=function(Se){Object(c.a)(G,Se);var fe=Object(s.a)(G);function G(Z,ne){var se;return Object(ae.a)(this,G),se=fe.call(this,"fetch-stream-loader"),se.TAG="FetchStreamLoader",se._seekHandler=Z,se._config=ne,se._needStash=!0,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object(ee.a)(G,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),y(Object(d.a)(G.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){var Te=this;this._dataSource=ne,this._range=se;var Ge=ne.url;this._config.reuseRedirectedURL&&ne.redirectedURL!=null&&(Ge=ne.redirectedURL);var Ze=this._seekHandler.getConfig(Ge,se),bt=new self.Headers;if(typeof Ze.headers=="object"){var At=Ze.headers;for(var it in At)At.hasOwnProperty(it)&&bt.append(it,At[it])}var Tt={method:"GET",headers:bt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var Qt in this._config.headers)bt.append(Qt,this._config.headers[Qt]);ne.cors===!1&&(Tt.mode="same-origin"),ne.withCredentials&&(Tt.credentials="include"),ne.referrerPolicy&&(Tt.referrerPolicy=ne.referrerPolicy),this._status=a.kConnecting,self.fetch(Ze.url,Tt).then(function(yt){if(Te._requestAbort){Te._requestAbort=!1,Te._status=a.kIdle;return}if(yt.ok&&yt.status>=200&&yt.status<=299){if(yt.url!==Ze.url&&Te._onURLRedirect){var nn=Te._seekHandler.removeURLParameters(yt.url);Te._onURLRedirect(nn)}var Jt=yt.headers.get("Content-Length");return Jt!=null&&(Te._contentLength=parseInt(Jt),Te._contentLength!==0&&(Te._onContentLengthKnown&&Te._onContentLengthKnown(Te._contentLength))),Te._pump.call(Te,yt.body.getReader())}else if(Te._status=a.kError,Te._onError)Te._onError(r.HTTP_STATUS_CODE_INVALID,{code:yt.status,msg:yt.statusText});else throw new n("FetchStreamLoader: Http code invalid, "+yt.status+" "+yt.statusText)}).catch(function(yt){if(Te._status=a.kError,Te._onError)Te._onError(r.EXCEPTION,{code:-1,msg:yt.message});else throw yt})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(ne){var se=this;return ne.read().then(function(Te){if(Te.done)if(se._contentLength!==null&&se._receivedLength<se._contentLength){se._status=a.kError;var Ge=r.EARLY_EOF,Ze={code:-1,msg:"Fetch stream meet Early-EOF"};if(se._onError)se._onError(Ge,Ze);else throw new n(Ze.msg)}else se._status=a.kComplete,se._onComplete&&se._onComplete(se._range.from,se._range.from+se._receivedLength-1);else{if(se._requestAbort===!0)return se._requestAbort=!1,se._status=a.kComplete,ne.cancel();se._status=a.kBuffering;var bt=Te.value.buffer,At=se._range.from+se._receivedLength;se._receivedLength+=bt.byteLength,se._onDataArrival&&se._onDataArrival(bt,At,se._receivedLength),se._pump(ne)}}).catch(function(Te){if(Te.code===11&&m.msedge)return;se._status=a.kError;var Ge=0,Ze=null;if((Te.code===19||Te.message==="network error")&&(se._contentLength===null||se._contentLength!==null&&se._receivedLength<se._contentLength)?(Ge=r.EARLY_EOF,Ze={code:Te.code,msg:"Fetch stream meet Early-EOF"}):(Ge=r.EXCEPTION,Ze={code:Te.code,msg:Te.message}),se._onError)se._onError(Ge,Ze);else throw new n(Ze.msg)})}}],[{key:"isSupported",value:function(){try{var ne=m.msedge&&m.version.minor>=15048,se=m.msedge?ne:!0;return self.fetch&&self.ReadableStream&&se}catch(Te){return!1}}}]),G}(t),x=_,f=function(Se){Object(c.a)(G,Se);var fe=Object(s.a)(G);function G(Z,ne){var se;return Object(ae.a)(this,G),se=fe.call(this,"xhr-moz-chunked-loader"),se.TAG="MozChunkedLoader",se._seekHandler=Z,se._config=ne,se._needStash=!0,se._xhr=null,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object(ee.a)(G,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),y(Object(d.a)(G.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){this._dataSource=ne,this._range=se;var Te=ne.url;this._config.reuseRedirectedURL&&ne.redirectedURL!=null&&(Te=ne.redirectedURL);var Ge=this._seekHandler.getConfig(Te,se);this._requestURL=Ge.url;var Ze=this._xhr=new XMLHttpRequest;if(Ze.open("GET",Ge.url,!0),Ze.responseType="moz-chunked-arraybuffer",Ze.onreadystatechange=this._onReadyStateChange.bind(this),Ze.onprogress=this._onProgress.bind(this),Ze.onloadend=this._onLoadEnd.bind(this),Ze.onerror=this._onXhrError.bind(this),ne.withCredentials&&(Ze.withCredentials=!0),typeof Ge.headers=="object"){var bt=Ge.headers;for(var At in bt)bt.hasOwnProperty(At)&&Ze.setRequestHeader(At,bt[At])}if(typeof this._config.headers=="object"){var it=this._config.headers;for(var Tt in it)it.hasOwnProperty(Tt)&&Ze.setRequestHeader(Tt,it[Tt])}this._status=a.kConnecting,Ze.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=a.kComplete}},{key:"_onReadyStateChange",value:function(ne){var se=ne.target;if(se.readyState===2){if(se.responseURL!=null&&se.responseURL!==this._requestURL&&this._onURLRedirect){var Te=this._seekHandler.removeURLParameters(se.responseURL);this._onURLRedirect(Te)}if(se.status!==0&&(se.status<200||se.status>299))if(this._status=a.kError,this._onError)this._onError(r.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new n("MozChunkedLoader: Http code invalid, "+se.status+" "+se.statusText);else this._status=a.kBuffering}}},{key:"_onProgress",value:function(ne){if(this._status===a.kError)return;this._contentLength===null&&(ne.total!==null&&ne.total!==0&&(this._contentLength=ne.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var se=ne.target.response,Te=this._range.from+this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,Te,this._receivedLength)}},{key:"_onLoadEnd",value:function(ne){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===a.kError)return;this._status=a.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}},{key:"_onXhrError",value:function(ne){this._status=a.kError;var se=0,Te=null;if(this._contentLength&&ne.loaded<this._contentLength?(se=r.EARLY_EOF,Te={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(se=r.EXCEPTION,Te={code:-1,msg:ne.constructor.name+" "+ne.type}),this._onError)this._onError(se,Te);else throw new n(Te.msg)}}],[{key:"isSupported",value:function(){try{var ne=new XMLHttpRequest;return ne.open("GET","https://example.com",!0),ne.responseType="moz-chunked-arraybuffer",ne.responseType==="moz-chunked-arraybuffer"}catch(se){return C.w("MozChunkedLoader",se.message),!1}}}]),G}(t),E=f,w=function(Se){Object(c.a)(G,Se);var fe=Object(s.a)(G);function G(Z,ne){var se;return Object(ae.a)(this,G),se=fe.call(this,"xhr-msstream-loader"),se.TAG="MSStreamLoader",se._seekHandler=Z,se._config=ne,se._needStash=!0,se._xhr=null,se._reader=null,se._totalRange=null,se._currentRange=null,se._currentRequestURL=null,se._currentRedirectedURL=null,se._contentLength=null,se._receivedLength=0,se._bufferLimit=16*1024*1024,se._lastTimeBufferSize=0,se._isReconnecting=!1,se}return Object(ee.a)(G,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),y(Object(d.a)(G.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){this._internalOpen(ne,se,!1)}},{key:"_internalOpen",value:function(ne,se,Te){this._dataSource=ne,Te?this._currentRange=se:this._totalRange=se;var Ge=ne.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Ge=this._currentRedirectedURL:ne.redirectedURL!=null&&(Ge=ne.redirectedURL));var Ze=this._seekHandler.getConfig(Ge,se);this._currentRequestURL=Ze.url;var bt=this._reader=new self.MSStreamReader;bt.onprogress=this._msrOnProgress.bind(this),bt.onload=this._msrOnLoad.bind(this),bt.onerror=this._msrOnError.bind(this);var At=this._xhr=new XMLHttpRequest;if(At.open("GET",Ze.url,!0),At.responseType="ms-stream",At.onreadystatechange=this._xhrOnReadyStateChange.bind(this),At.onerror=this._xhrOnError.bind(this),ne.withCredentials&&(At.withCredentials=!0),typeof Ze.headers=="object"){var it=Ze.headers;for(var Tt in it)it.hasOwnProperty(Tt)&&At.setRequestHeader(Tt,it[Tt])}if(typeof this._config.headers=="object"){var Qt=this._config.headers;for(var yt in Qt)Qt.hasOwnProperty(yt)&&At.setRequestHeader(yt,Qt[yt])}this._isReconnecting?this._isReconnecting=!1:this._status=a.kConnecting,At.send()}},{key:"abort",value:function(){this._internalAbort(),this._status=a.kComplete}},{key:"_internalAbort",value:function(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}},{key:"_xhrOnReadyStateChange",value:function(ne){var se=ne.target;if(se.readyState===2)if(se.status>=200&&se.status<=299){if(this._status=a.kBuffering,se.responseURL!=null){var Te=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&Te!==this._currentRedirectedURL&&(this._currentRedirectedURL=Te,this._onURLRedirect&&this._onURLRedirect(Te))}var Ge=se.getResponseHeader("Content-Length");if(Ge!=null&&this._contentLength==null){var Ze=parseInt(Ge);Ze>0&&(this._contentLength=Ze,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=a.kError,this._onError)this._onError(r.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new n("MSStreamLoader: Http code invalid, "+se.status+" "+se.statusText);else if(se.readyState===3&&(se.status>=200&&se.status<=299)){this._status=a.kBuffering;var bt=se.response;this._reader.readAsArrayBuffer(bt)}}},{key:"_xhrOnError",value:function(ne){this._status=a.kError;var se=r.EXCEPTION,Te={code:-1,msg:ne.constructor.name+" "+ne.type};if(this._onError)this._onError(se,Te);else throw new n(Te.msg)}},{key:"_msrOnProgress",value:function(ne){var se=ne.target,Te=se.result;if(Te==null){this._doReconnectIfNeeded();return}var Ge=Te.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=Te.byteLength;var Ze=this._totalRange.from+this._receivedLength;this._receivedLength+=Ge.byteLength,this._onDataArrival&&this._onDataArrival(Ge,Ze,this._receivedLength),Te.byteLength>=this._bufferLimit&&(C.v(this.TAG,"MSStream buffer exceeded max size near ".concat(Ze+Ge.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var ne={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,ne,!0)}}},{key:"_msrOnLoad",value:function(ne){this._status=a.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}},{key:"_msrOnError",value:function(ne){this._status=a.kError;var se=0,Te=null;if(this._contentLength&&this._receivedLength<this._contentLength?(se=r.EARLY_EOF,Te={code:-1,msg:"MSStream meet Early-Eof"}):(se=r.EARLY_EOF,Te={code:-1,msg:ne.constructor.name+" "+ne.type}),this._onError)this._onError(se,Te);else throw new n(Te.msg)}}],[{key:"isSupported",value:function(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;var ne=new XMLHttpRequest;return ne.open("GET","https://example.com",!0),ne.responseType="ms-stream",ne.responseType==="ms-stream"}catch(se){return C.w("MSStreamLoader",se.message),!1}}}]),G}(t),T=w,R=function(Se){Object(c.a)(G,Se);var fe=Object(s.a)(G);function G(Z,ne){var se;return Object(ae.a)(this,G),se=fe.call(this,"xhr-range-loader"),se.TAG="RangeLoader",se._seekHandler=Z,se._config=ne,se._needStash=!1,se._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],se._currentChunkSizeKB=384,se._currentSpeedNormalized=0,se._zeroSpeedChunkCount=0,se._xhr=null,se._speedSampler=new p,se._requestAbort=!1,se._waitForTotalLength=!1,se._totalLengthReceived=!1,se._currentRequestURL=null,se._currentRedirectedURL=null,se._currentRequestRange=null,se._totalLength=null,se._contentLength=null,se._receivedLength=0,se._lastTimeLoaded=0,se}return Object(ee.a)(G,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),y(Object(d.a)(G.prototype),"destroy",this).call(this)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}},{key:"open",value:function(ne,se){this._dataSource=ne,this._range=se,this._status=a.kConnecting;var Te=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(Te=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!Te?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}},{key:"_openSubRange",value:function(){var ne=this._currentChunkSizeKB*1024,se=this._range.from+this._receivedLength,Te=se+ne;this._contentLength!=null&&(Te-this._range.from>=this._contentLength&&(Te=this._range.from+this._contentLength-1)),this._currentRequestRange={from:se,to:Te},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(ne,se){this._lastTimeLoaded=0;var Te=ne.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Te=this._currentRedirectedURL:ne.redirectedURL!=null&&(Te=ne.redirectedURL));var Ge=this._seekHandler.getConfig(Te,se);this._currentRequestURL=Ge.url;var Ze=this._xhr=new XMLHttpRequest;if(Ze.open("GET",Ge.url,!0),Ze.responseType="arraybuffer",Ze.onreadystatechange=this._onReadyStateChange.bind(this),Ze.onprogress=this._onProgress.bind(this),Ze.onload=this._onLoad.bind(this),Ze.onerror=this._onXhrError.bind(this),ne.withCredentials&&(Ze.withCredentials=!0),typeof Ge.headers=="object"){var bt=Ge.headers;for(var At in bt)bt.hasOwnProperty(At)&&Ze.setRequestHeader(At,bt[At])}if(typeof this._config.headers=="object"){var it=this._config.headers;for(var Tt in it)it.hasOwnProperty(Tt)&&Ze.setRequestHeader(Tt,it[Tt])}Ze.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=a.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(ne){var se=ne.target;if(se.readyState===2){if(se.responseURL!=null){var Te=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&Te!==this._currentRedirectedURL&&(this._currentRedirectedURL=Te,this._onURLRedirect&&this._onURLRedirect(Te))}if(se.status>=200&&se.status<=299){if(this._waitForTotalLength)return;this._status=a.kBuffering}else if(this._status=a.kError,this._onError)this._onError(r.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new n("RangeLoader: Http code invalid, "+se.status+" "+se.statusText)}}},{key:"_onProgress",value:function(ne){if(this._status===a.kError)return;if(this._contentLength===null){var se=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,se=!0;var Te=ne.total;this._internalAbort(),Te!=null&Te!==0&&(this._totalLength=Te)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,se){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var Ge=ne.loaded-this._lastTimeLoaded;this._lastTimeLoaded=ne.loaded,this._speedSampler.addBytes(Ge)}},{key:"_normalizeSpeed",value:function(ne){var se=this._chunkSizeKBList,Te=se.length-1,Ge=0,Ze=0,bt=Te;if(ne<se[0])return se[0];for(;Ze<=bt;){if(Ge=Ze+Math.floor((bt-Ze)/2),Ge===Te||ne>=se[Ge]&&ne<se[Ge+1])return se[Ge];se[Ge]<ne?Ze=Ge+1:bt=Ge-1}}},{key:"_onLoad",value:function(ne){if(this._status===a.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;var se=this._speedSampler.lastSecondKBps;if(se===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(se=this._speedSampler.currentKBps)),se!==0){var Te=this._normalizeSpeed(se);this._currentSpeedNormalized!==Te&&(this._currentSpeedNormalized=Te,this._currentChunkSizeKB=Te)}var Ge=ne.target.response,Ze=this._range.from+this._receivedLength;this._receivedLength+=Ge.byteLength;var bt=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():bt=!0,this._onDataArrival&&this._onDataArrival(Ge,Ze,this._receivedLength),bt&&(this._status=a.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},{key:"_onXhrError",value:function(ne){this._status=a.kError;var se=0,Te=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(se=r.EARLY_EOF,Te={code:-1,msg:"RangeLoader meet Early-Eof"}):(se=r.EXCEPTION,Te={code:-1,msg:ne.constructor.name+" "+ne.type}),this._onError)this._onError(se,Te);else throw new n(Te.msg)}}],[{key:"isSupported",value:function(){try{var ne=new XMLHttpRequest;return ne.open("GET","https://example.com",!0),ne.responseType="arraybuffer",ne.responseType==="arraybuffer"}catch(se){return C.w("RangeLoader",se.message),!1}}}]),G}(t),N=R,j=function(Se){Object(c.a)(G,Se);var fe=Object(s.a)(G);function G(){var Z;return Object(ae.a)(this,G),Z=fe.call(this,"websocket-loader"),Z.TAG="WebSocketLoader",Z._needStash=!0,Z._ws=null,Z._requestAbort=!1,Z._receivedLength=0,Z}return Object(ee.a)(G,[{key:"destroy",value:function(){this._ws&&this.abort(),y(Object(d.a)(G.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne){try{var se=this._ws=new self.WebSocket(ne.url);se.binaryType="arraybuffer",se.onopen=this._onWebSocketOpen.bind(this),se.onclose=this._onWebSocketClose.bind(this),se.onmessage=this._onWebSocketMessage.bind(this),se.onerror=this._onWebSocketError.bind(this),this._status=a.kConnecting}catch(Ge){this._status=a.kError;var Te={code:Ge.code,msg:Ge.message};if(this._onError)this._onError(r.EXCEPTION,Te);else throw new n(Te.msg)}}},{key:"abort",value:function(){var ne=this._ws;ne&&(ne.readyState===0||ne.readyState===1)&&(this._requestAbort=!0,ne.close()),this._ws=null,this._status=a.kComplete}},{key:"_onWebSocketOpen",value:function(ne){this._status=a.kBuffering}},{key:"_onWebSocketClose",value:function(ne){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=a.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}},{key:"_onWebSocketMessage",value:function(ne){var se=this;if(ne.data instanceof ArrayBuffer)this._dispatchArrayBuffer(ne.data);else if(ne.data instanceof Blob){var Te=new FileReader;Te.onload=function(){se._dispatchArrayBuffer(Te.result)},Te.readAsArrayBuffer(ne.data)}else{this._status=a.kError;var Ge={code:-1,msg:"Unsupported WebSocket message type: "+ne.data.constructor.name};if(this._onError)this._onError(r.EXCEPTION,Ge);else throw new n(Ge.msg)}}},{key:"_dispatchArrayBuffer",value:function(ne){var se=ne,Te=this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,Te,this._receivedLength)}},{key:"_onWebSocketError",value:function(ne){this._status=a.kError;var se={code:ne.code,msg:ne.message};if(this._onError)this._onError(r.EXCEPTION,se);else throw new n(se.msg)}}],[{key:"isSupported",value:function(){try{return typeof self.WebSocket!="undefined"}catch(ne){return!1}}}]),G}(t),W=j,J=function(){function Se(fe){Object(ae.a)(this,Se),this._zeroStart=fe||!1}return Object(ee.a)(Se,[{key:"getConfig",value:function(G,Z){var ne={};if(Z.from!==0||Z.to!==-1){var se;Z.to!==-1?se="bytes=".concat(Z.from.toString(),"-").concat(Z.to.toString()):se="bytes=".concat(Z.from.toString(),"-"),ne.Range=se}else this._zeroStart&&(ne.Range="bytes=0-");return{url:G,headers:ne}}},{key:"removeURLParameters",value:function(G){return G}}]),Se}(),F=J,k=function(){function Se(fe,G){Object(ae.a)(this,Se),this._startName=fe,this._endName=G}return Object(ee.a)(Se,[{key:"getConfig",value:function(G,Z){var ne=G;if(Z.from!==0||Z.to!==-1){var se=!0;ne.indexOf("?")===-1&&(ne+="?",se=!1),se&&(ne+="&"),ne+="".concat(this._startName,"=").concat(Z.from.toString()),Z.to!==-1&&(ne+="&".concat(this._endName,"=").concat(Z.to.toString()))}return{url:ne,headers:{}}}},{key:"removeURLParameters",value:function(G){var Z=G.split("?")[0],ne=void 0,se=G.indexOf("?");se!==-1&&(ne=G.substring(se+1));var Te="";if(ne!=null&&ne.length>0)for(var Ge=ne.split("&"),Ze=0;Ze<Ge.length;Ze++){var bt=Ge[Ze].split("="),At=Ze>0;bt[0]!==this._startName&&bt[0]!==this._endName&&(At&&(Te+="&"),Te+=Ge[Ze])}return Te.length===0?Z:Z+"?"+Te}}]),Se}(),K=k,Y=function(){function Se(fe,G,Z){Object(ae.a)(this,Se),this.TAG="IOController",this._config=G,this._extraData=Z,this._stashInitialSize=1024*384,G.stashInitialSize!=null&&G.stashInitialSize>0&&(this._stashInitialSize=G.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,G.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=fe,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(fe.url),this._refTotalLength=fe.filesize?fe.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new p,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Object(ee.a)(Se,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(G){this._extraData=G}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(G){this._onDataArrival=G}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(G){this._onSeeked=G}},{key:"onError",get:function(){return this._onError},set:function(G){this._onError=G}},{key:"onComplete",get:function(){return this._onComplete},set:function(G){this._onComplete=G}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(G){this._onRedirect=G}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(G){this._onRecoveredEarlyEof=G}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===N?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var G=this._config;if(G.seekType==="range")this._seekHandler=new F(this._config.rangeLoadZeroStart);else if(G.seekType==="param"){var Z=G.seekParamStart||"bstart",ne=G.seekParamEnd||"bend";this._seekHandler=new K(Z,ne)}else if(G.seekType==="custom"){if(typeof G.customSeekHandler!="function")throw new i("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new G.customSeekHandler}else throw new i("Invalid seekType in config: ".concat(G.seekType))}},{key:"_selectLoader",value:function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=W;else if(x.isSupported())this._loaderClass=x;else if(E.isSupported())this._loaderClass=E;else if(N.isSupported())this._loaderClass=N;else throw new n("Your browser doesn't support xhr with arraybuffer responseType!")}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(G){this._currentRange={from:0,to:-1},G&&(this._currentRange.from=G),this._speedSampler.reset(),G||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var G=this._resumeFrom;this._resumeFrom=0,this._internalSeek(G,!0)}}},{key:"seek",value:function(G){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(G,!0)}},{key:"_internalSeek",value:function(G,Z){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(Z),this._loader.destroy(),this._loader=null;var ne={from:G,to:-1};this._currentRange={from:ne.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,ne),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(G){if(!G||typeof G!="string"||G.length===0)throw new i("Url must be a non-empty string!");this._dataSource.url=G}},{key:"_expandBuffer",value:function(G){for(var Z=this._stashSize;Z+1024*1024*1<G;)Z*=2;if(Z+=1024*1024*1,Z===this._bufferSize)return;var ne=new ArrayBuffer(Z);if(this._stashUsed>0){var se=new Uint8Array(this._stashBuffer,0,this._stashUsed),Te=new Uint8Array(ne,0,Z);Te.set(se,0)}this._stashBuffer=ne,this._bufferSize=Z}},{key:"_normalizeSpeed",value:function(G){var Z=this._speedNormalizeList,ne=Z.length-1,se=0,Te=0,Ge=ne;if(G<Z[0])return Z[0];for(;Te<=Ge;){if(se=Te+Math.floor((Ge-Te)/2),se===ne||G>=Z[se]&&G<Z[se+1])return Z[se];Z[se]<G?Te=se+1:Ge=se-1}}},{key:"_adjustStashSize",value:function(G){var Z=0;this._config.isLive||G<512?Z=G:G>=512&&G<=1024?Z=Math.floor(G*1.5):Z=G*2,Z>8192&&(Z=8192);var ne=Z*1024+1024*1024*1;this._bufferSize<ne&&this._expandBuffer(ne),this._stashSize=Z*1024}},{key:"_dispatchChunks",value:function(G,Z){return this._currentRange.to=Z+G.byteLength-1,this._onDataArrival(G,Z)}},{key:"_onURLRedirect",value:function(G){this._redirectedURL=G,this._onRedirect&&this._onRedirect(G)}},{key:"_onContentLengthKnown",value:function(G){G&&this._fullRequestFlag&&(this._totalLength=G,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(G,Z,ne){if(!this._onDataArrival)throw new o("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(G.byteLength);var se=this._speedSampler.lastSecondKBps;if(se!==0){var Te=this._normalizeSpeed(se);this._speedNormalized!==Te&&(this._speedNormalized=Te,this._adjustStashSize(Te))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=Z),this._stashUsed+G.byteLength<=this._stashSize){var Qt=new Uint8Array(this._stashBuffer,0,this._stashSize);Qt.set(new Uint8Array(G),this._stashUsed),this._stashUsed+=G.byteLength}else{var yt=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var nn=this._stashBuffer.slice(0,this._stashUsed),Jt=this._dispatchChunks(nn,this._stashByteStart);if(Jt<nn.byteLength){if(Jt>0){var Nt=new Uint8Array(nn,Jt);yt.set(Nt,0),this._stashUsed=Nt.byteLength,this._stashByteStart+=Jt}}else this._stashUsed=0,this._stashByteStart+=Jt;this._stashUsed+G.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+G.byteLength),yt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),yt.set(new Uint8Array(G),this._stashUsed),this._stashUsed+=G.byteLength}else{var vt=this._dispatchChunks(G,Z);if(vt<G.byteLength){var Tn=G.byteLength-vt;Tn>this._bufferSize&&(this._expandBuffer(Tn),yt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),yt.set(new Uint8Array(G,vt),0),this._stashUsed+=Tn,this._stashByteStart=Z+vt}}}else if(this._stashUsed===0){var Ge=this._dispatchChunks(G,Z);if(Ge<G.byteLength){var Ze=G.byteLength-Ge;Ze>this._bufferSize&&this._expandBuffer(Ze);var bt=new Uint8Array(this._stashBuffer,0,this._bufferSize);bt.set(new Uint8Array(G,Ge),0),this._stashUsed+=Ze,this._stashByteStart=Z+Ge}}else{this._stashUsed+G.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+G.byteLength);var At=new Uint8Array(this._stashBuffer,0,this._bufferSize);At.set(new Uint8Array(G),this._stashUsed),this._stashUsed+=G.byteLength;var it=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(it<this._stashUsed&&it>0){var Tt=new Uint8Array(this._stashBuffer,it);At.set(Tt,0)}this._stashUsed-=it,this._stashByteStart+=it}}},{key:"_flushStashBuffer",value:function(G){if(this._stashUsed>0){var Z=this._stashBuffer.slice(0,this._stashUsed),ne=this._dispatchChunks(Z,this._stashByteStart),se=Z.byteLength-ne;if(ne<Z.byteLength)if(G)C.w(this.TAG,"".concat(se," bytes unconsumed data remain when flush buffer, dropped"));else{if(ne>0){var Te=new Uint8Array(this._stashBuffer,0,this._bufferSize),Ge=new Uint8Array(Z,ne);Te.set(Ge,0),this._stashUsed=Ge.byteLength,this._stashByteStart+=ne}return 0}return this._stashUsed=0,this._stashByteStart=0,se}return 0}},{key:"_onLoaderComplete",value:function(G,Z){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(G,Z){C.e(this.TAG,"Loader error, code = ".concat(Z.code,", msg = ").concat(Z.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,G=r.UNRECOVERABLE_EARLY_EOF);switch(G){case r.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var ne=this._currentRange.to+1;ne<this._totalLength&&(C.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(ne,!1));return}G=r.UNRECOVERABLE_EARLY_EOF;break}case r.UNRECOVERABLE_EARLY_EOF:case r.CONNECTING_TIMEOUT:case r.HTTP_STATUS_CODE_INVALID:case r.EXCEPTION:break}if(this._onError)this._onError(G,Z);else throw new n("IOException: "+Z.msg)}}]),Se}(),H=Y,Q={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function re(){return Object.assign({},Q)}var oe=function(){function Se(){Object(ae.a)(this,Se)}return Object(ee.a)(Se,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var G=new H({},re()),Z=G.loaderType;return G.destroy(),Z=="fetch-stream-loader"||Z=="xhr-moz-chunked-loader"}},{key:"getNetworkLoaderTypeName",value:function(){var G=new H({},re()),Z=G.loaderType;return G.destroy(),Z}},{key:"supportNativeMediaPlayback",value:function(G){Se.videoElement==null&&(Se.videoElement=window.document.createElement("video"));var Z=Se.videoElement.canPlayType(G);return Z==="probably"||Z=="maybe"}},{key:"getFeatureList",value:function(){var G={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return G.mseFlvPlayback=Se.supportMSEH264Playback(),G.networkStreamIO=Se.supportNetworkStreamIO(),G.networkLoaderName=Se.getNetworkLoaderTypeName(),G.mseLiveFlvPlayback=G.mseFlvPlayback&&G.networkStreamIO,G.nativeMP4H264Playback=Se.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),G.nativeWebmVP8Playback=Se.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),G.nativeWebmVP9Playback=Se.supportNativeMediaPlayback('video/webm; codecs="vp9"'),G}}]),Se}(),me=oe,he={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"},Ee=he,de=function(){function Se(){Object(ae.a)(this,Se)}return Object(ee.a)(Se,null,[{key:"forceGlobalTag",get:function(){return C.FORCE_GLOBAL_TAG},set:function(G){C.FORCE_GLOBAL_TAG=G,Se._notifyChange()}},{key:"globalTag",get:function(){return C.GLOBAL_TAG},set:function(G){C.GLOBAL_TAG=G,Se._notifyChange()}},{key:"enableAll",get:function(){return C.ENABLE_VERBOSE&&C.ENABLE_DEBUG&&C.ENABLE_INFO&&C.ENABLE_WARN&&C.ENABLE_ERROR},set:function(G){C.ENABLE_VERBOSE=G,C.ENABLE_DEBUG=G,C.ENABLE_INFO=G,C.ENABLE_WARN=G,C.ENABLE_ERROR=G,Se._notifyChange()}},{key:"enableDebug",get:function(){return C.ENABLE_DEBUG},set:function(G){C.ENABLE_DEBUG=G,Se._notifyChange()}},{key:"enableVerbose",get:function(){return C.ENABLE_VERBOSE},set:function(G){C.ENABLE_VERBOSE=G,Se._notifyChange()}},{key:"enableInfo",get:function(){return C.ENABLE_INFO},set:function(G){C.ENABLE_INFO=G,Se._notifyChange()}},{key:"enableWarn",get:function(){return C.ENABLE_WARN},set:function(G){C.ENABLE_WARN=G,Se._notifyChange()}},{key:"enableError",get:function(){return C.ENABLE_ERROR},set:function(G){C.ENABLE_ERROR=G,Se._notifyChange()}},{key:"getConfig",value:function(){return{globalTag:C.GLOBAL_TAG,forceGlobalTag:C.FORCE_GLOBAL_TAG,enableVerbose:C.ENABLE_VERBOSE,enableDebug:C.ENABLE_DEBUG,enableInfo:C.ENABLE_INFO,enableWarn:C.ENABLE_WARN,enableError:C.ENABLE_ERROR,enableCallback:C.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(G){C.GLOBAL_TAG=G.globalTag,C.FORCE_GLOBAL_TAG=G.forceGlobalTag,C.ENABLE_VERBOSE=G.enableVerbose,C.ENABLE_DEBUG=G.enableDebug,C.ENABLE_INFO=G.enableInfo,C.ENABLE_WARN=G.enableWarn,C.ENABLE_ERROR=G.enableError,C.ENABLE_CALLBACK=G.enableCallback}},{key:"_notifyChange",value:function(){var G=Se.emitter;if(G.listenerCount("change")>0){var Z=Se.getConfig();G.emit("change",Z)}}},{key:"registerListener",value:function(G){Se.emitter.addListener("change",G)}},{key:"removeListener",value:function(G){Se.emitter.removeListener("change",G)}},{key:"addLogListener",value:function(G){C.emitter.addListener("log",G),C.emitter.listenerCount("log")>0&&(C.ENABLE_CALLBACK=!0,Se._notifyChange())}},{key:"removeLogListener",value:function(G){C.emitter.removeListener("log",G),C.emitter.listenerCount("log")===0&&(C.ENABLE_CALLBACK=!1,Se._notifyChange())}}]),Se}();de.emitter=new S.a;var be=de,Ue=function(){function Se(){Object(ae.a)(this,Se),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return Object(ee.a)(Se,[{key:"isComplete",value:function(){var G=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,Z=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&G&&Z}},{key:"isSeekable",value:function(){return this.hasKeyframesIndex===!0}},{key:"getNearestKeyframe",value:function(G){if(this.keyframesIndex==null)return null;var Z=this.keyframesIndex,ne=this._search(Z.times,G);return{index:ne,milliseconds:Z.times[ne],fileposition:Z.filepositions[ne]}}},{key:"_search",value:function(G,Z){var ne=0,se=G.length-1,Te=0,Ge=0,Ze=se;for(Z<G[0]&&(ne=0,Ge=Ze+1);Ge<=Ze;)if(Te=Ge+Math.floor((Ze-Ge)/2),Te===se||Z>=G[Te]&&Z<G[Te+1]){ne=Te;break}else G[Te]<Z?Ge=Te+1:Ze=Te-1;return ne}}]),Se}(),Re=Ue;function De(Se,fe,G){var Z=Se;if(fe+G<Z.length){for(;G--;)if((Z[++fe]&192)!==128)return!1;return!0}else return!1}function je(Se){for(var fe=[],G=Se,Z=0,ne=Se.length;Z<ne;){if(G[Z]<128){fe.push(String.fromCharCode(G[Z])),++Z;continue}else if(!(G[Z]<192)){if(G[Z]<224){if(De(G,Z,1)){var se=(G[Z]&31)<<6|G[Z+1]&63;if(se>=128){fe.push(String.fromCharCode(se&65535)),Z+=2;continue}}}else if(G[Z]<240){if(De(G,Z,2)){var Te=(G[Z]&15)<<12|(G[Z+1]&63)<<6|G[Z+2]&63;if(Te>=2048&&(Te&63488)!==55296){fe.push(String.fromCharCode(Te&65535)),Z+=3;continue}}}else if(G[Z]<248&&De(G,Z,3)){var Ge=(G[Z]&7)<<18|(G[Z+1]&63)<<12|(G[Z+2]&63)<<6|G[Z+3]&63;if(Ge>65536&&Ge<1114112){Ge-=65536,fe.push(String.fromCharCode(Ge>>>10|55296)),fe.push(String.fromCharCode(Ge&1023|56320)),Z+=4;continue}}}fe.push(String.fromCharCode(65533)),++Z}return fe.join("")}var ve=je,ce=function(){var Se=new ArrayBuffer(2);return new DataView(Se).setInt16(0,256,!0),new Int16Array(Se)[0]===256}(),ke=function(){function Se(){Object(ae.a)(this,Se)}return Object(ee.a)(Se,null,[{key:"parseScriptData",value:function(G,Z,ne){var se={};try{var Te=Se.parseValue(G,Z,ne),Ge=Se.parseValue(G,Z+Te.size,ne-Te.size);se[Te.data]=Ge.data}catch(Ze){C.e("AMF",Ze.toString())}return se}},{key:"parseObject",value:function(G,Z,ne){if(ne<3)throw new o("Data not enough when parse ScriptDataObject");var se=Se.parseString(G,Z,ne),Te=Se.parseValue(G,Z+se.size,ne-se.size),Ge=Te.objectEnd;return{data:{name:se.data,value:Te.data},size:se.size+Te.size,objectEnd:Ge}}},{key:"parseVariable",value:function(G,Z,ne){return Se.parseObject(G,Z,ne)}},{key:"parseString",value:function(G,Z,ne){if(ne<2)throw new o("Data not enough when parse String");var se=new DataView(G,Z,ne),Te=se.getUint16(0,!ce),Ge;return Te>0?Ge=ve(new Uint8Array(G,Z+2,Te)):Ge="",{data:Ge,size:2+Te}}},{key:"parseLongString",value:function(G,Z,ne){if(ne<4)throw new o("Data not enough when parse LongString");var se=new DataView(G,Z,ne),Te=se.getUint32(0,!ce),Ge;return Te>0?Ge=ve(new Uint8Array(G,Z+4,Te)):Ge="",{data:Ge,size:4+Te}}},{key:"parseDate",value:function(G,Z,ne){if(ne<10)throw new o("Data size invalid when parse Date");var se=new DataView(G,Z,ne),Te=se.getFloat64(0,!ce),Ge=se.getInt16(8,!ce);return Te+=Ge*60*1e3,{data:new Date(Te),size:8+2}}},{key:"parseValue",value:function(G,Z,ne){if(ne<1)throw new o("Data not enough when parse Value");var se=new DataView(G,Z,ne),Te=1,Ge=se.getUint8(0),Ze,bt=!1;try{switch(Ge){case 0:Ze=se.getFloat64(1,!ce),Te+=8;break;case 1:{var At=se.getUint8(1);Ze=!!At,Te+=1;break}case 2:{var it=Se.parseString(G,Z+1,ne-1);Ze=it.data,Te+=it.size;break}case 3:{Ze={};var Tt=0;for((se.getUint32(ne-4,!ce)&16777215)===9&&(Tt=3);Te<ne-4;){var Qt=Se.parseObject(G,Z+Te,ne-Te-Tt);if(Qt.objectEnd)break;Ze[Qt.data.name]=Qt.data.value,Te+=Qt.size}if(Te<=ne-3){var yt=se.getUint32(Te-1,!ce)&16777215;yt===9&&(Te+=3)}break}case 8:{Ze={},Te+=4;var nn=0;for((se.getUint32(ne-4,!ce)&16777215)===9&&(nn=3);Te<ne-8;){var Jt=Se.parseVariable(G,Z+Te,ne-Te-nn);if(Jt.objectEnd)break;Ze[Jt.data.name]=Jt.data.value,Te+=Jt.size}if(Te<=ne-3){var Nt=se.getUint32(Te-1,!ce)&16777215;Nt===9&&(Te+=3)}break}case 9:Ze=void 0,Te=1,bt=!0;break;case 10:{Ze=[];var vt=se.getUint32(1,!ce);Te+=4;for(var Tn=0;Tn<vt;Tn++){var mt=Se.parseValue(G,Z+Te,ne-Te);Ze.push(mt.data),Te+=mt.size}break}case 11:{var ln=Se.parseDate(G,Z+1,ne-1);Ze=ln.data,Te+=ln.size;break}case 12:{var fn=Se.parseString(G,Z+1,ne-1);Ze=fn.data,Te+=fn.size;break}default:Te=ne,C.w("AMF","Unsupported AMF value type "+Ge)}}catch(Zn){C.e("AMF",Zn.toString())}return{data:Ze,size:Te,objectEnd:bt}}}]),Se}(),Ne=ke,Je=function(){function Se(fe){Object(ae.a)(this,Se),this.TAG="ExpGolomb",this._buffer=fe,this._buffer_index=0,this._total_bytes=fe.byteLength,this._total_bits=fe.byteLength*8,this._current_word=0,this._current_word_bits_left=0}return Object(ee.a)(Se,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var G=this._total_bytes-this._buffer_index;if(G<=0)throw new o("ExpGolomb: _fillCurrentWord() but no bytes available");var Z=Math.min(4,G),ne=new Uint8Array(4);ne.set(this._buffer.subarray(this._buffer_index,this._buffer_index+Z)),this._current_word=new DataView(ne.buffer).getUint32(0,!1),this._buffer_index+=Z,this._current_word_bits_left=Z*8}},{key:"readBits",value:function(G){if(G>32)throw new i("ExpGolomb: readBits() bits exceeded max 32bits!");if(G<=this._current_word_bits_left){var Z=this._current_word>>>32-G;return this._current_word<<=G,this._current_word_bits_left-=G,Z}var ne=this._current_word_bits_left?this._current_word:0;ne=ne>>>32-this._current_word_bits_left;var se=G-this._current_word_bits_left;this._fillCurrentWord();var Te=Math.min(se,this._current_word_bits_left),Ge=this._current_word>>>32-Te;return this._current_word<<=Te,this._current_word_bits_left-=Te,ne=ne<<Te|Ge,ne}},{key:"readBool",value:function(){return this.readBits(1)===1}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var G;for(G=0;G<this._current_word_bits_left;G++)if((this._current_word&2147483648>>>G)!==0)return this._current_word<<=G,this._current_word_bits_left-=G,G;return this._fillCurrentWord(),G+this._skipLeadingZero()}},{key:"readUEG",value:function(){var G=this._skipLeadingZero();return this.readBits(G+1)-1}},{key:"readSEG",value:function(){var G=this.readUEG();return G&1?G+1>>>1:-1*(G>>>1)}}]),Se}(),te=Je,P=function(){function Se(){Object(ae.a)(this,Se)}return Object(ee.a)(Se,null,[{key:"_ebsp2rbsp",value:function(G){for(var Z=G,ne=Z.byteLength,se=new Uint8Array(ne),Te=0,Ge=0;Ge<ne;Ge++){if(Ge>=2&&(Z[Ge]===3&&Z[Ge-1]===0&&Z[Ge-2]===0))continue;se[Te]=Z[Ge],Te++}return new Uint8Array(se.buffer,0,Te)}},{key:"parseSPS",value:function(G){var Z=Se._ebsp2rbsp(G),ne=new te(Z);ne.readByte();var se=ne.readByte();ne.readByte();var Te=ne.readByte();ne.readUEG();var Ge=Se.getProfileString(se),Ze=Se.getLevelString(Te),bt=1,At=420,it=[0,420,422,444],Tt=8;if((se===100||se===110||se===122||se===244||se===44||se===83||se===86||se===118||se===128||se===138||se===144)&&(bt=ne.readUEG(),bt===3&&ne.readBits(1),bt<=3&&(At=it[bt]),Tt=ne.readUEG()+8,ne.readUEG(),ne.readBits(1),ne.readBool()))for(var Qt=bt!==3?8:12,yt=0;yt<Qt;yt++)ne.readBool()&&(yt<6?Se._skipScalingList(ne,16):Se._skipScalingList(ne,64));ne.readUEG();var nn=ne.readUEG();if(nn===0)ne.readUEG();else if(nn===1){ne.readBits(1),ne.readSEG(),ne.readSEG();for(var Jt=ne.readUEG(),Nt=0;Nt<Jt;Nt++)ne.readSEG()}var vt=ne.readUEG();ne.readBits(1);var Tn=ne.readUEG(),mt=ne.readUEG(),ln=ne.readBits(1);ln===0&&ne.readBits(1),ne.readBits(1);var fn=0,Zn=0,rr=0,xn=0,Er=ne.readBool();Er&&(fn=ne.readUEG(),Zn=ne.readUEG(),rr=ne.readUEG(),xn=ne.readUEG());var Or=1,un=1,Pn=0,Nr=!0,Xr=0,xr=0,ur=ne.readBool();if(ur){if(ne.readBool()){var vr=ne.readByte(),vi=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],pr=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];vr>0&&vr<16?(Or=vi[vr-1],un=pr[vr-1]):vr===255&&(Or=ne.readByte()<<8|ne.readByte(),un=ne.readByte()<<8|ne.readByte())}if(ne.readBool()&&ne.readBool(),ne.readBool()&&(ne.readBits(4),ne.readBool()&&ne.readBits(24)),ne.readBool()&&(ne.readUEG(),ne.readUEG()),ne.readBool()){var _r=ne.readBits(32),Cr=ne.readBits(32);Nr=ne.readBool(),Xr=Cr,xr=_r*2,Pn=Xr/xr}}var Hr=1;(Or!==1||un!==1)&&(Hr=Or/un);var Tr=0,ui=0;if(bt===0)Tr=1,ui=2-ln;else{var Dr=bt===3?1:2,_i=bt===1?2:1;Tr=Dr,ui=_i*(2-ln)}var ci=(Tn+1)*16,ni=(2-ln)*((mt+1)*16);ci-=(fn+Zn)*Tr,ni-=(rr+xn)*ui;var Ii=Math.ceil(ci*Hr);return ne.destroy(),ne=null,{profile_string:Ge,level_string:Ze,bit_depth:Tt,ref_frames:vt,chroma_format:At,chroma_format_string:Se.getChromaFormatString(At),frame_rate:{fixed:Nr,fps:Pn,fps_den:xr,fps_num:Xr},sar_ratio:{width:Or,height:un},codec_size:{width:ci,height:ni},present_size:{width:Ii,height:ni}}}},{key:"_skipScalingList",value:function(G,Z){for(var ne=8,se=8,Te=0,Ge=0;Ge<Z;Ge++)se!==0&&(Te=G.readSEG(),se=(ne+Te+256)%256),ne=se===0?ne:se}},{key:"getProfileString",value:function(G){switch(G){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(G){return(G/10).toFixed(1)}},{key:"getChromaFormatString",value:function(G){switch(G){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),Se}(),U=P,q={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"},X=q;function $(Se){return Se>>>8&255|(Se&255)<<8}function ge(Se){return(Se&4278190080)>>>24|(Se&16711680)>>>8|(Se&65280)<<8|(Se&255)<<24}function Ae(Se,fe){return Se[fe]<<24|Se[fe+1]<<16|Se[fe+2]<<8|Se[fe+3]}var at=function(){function Se(fe,G){Object(ae.a)(this,Se),this.TAG="FLVDemuxer",this._config=G,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=fe.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=fe.hasAudioTrack,this._hasVideo=fe.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Re,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var Z=new ArrayBuffer(2);return new DataView(Z).setInt16(0,256,!0),new Int16Array(Z)[0]===256}()}return Object(ee.a)(Se,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(G){return G.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(G){this._onTrackMetadata=G}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(G){this._onMediaInfo=G}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(G){this._onMetaDataArrived=G}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(G){this._onScriptDataArrived=G}},{key:"onError",get:function(){return this._onError},set:function(G){this._onError=G}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(G){this._onDataAvailable=G}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(G){this._timestampBase=G}},{key:"overridedDuration",get:function(){return this._duration},set:function(G){this._durationOverrided=!0,this._duration=G,this._mediaInfo.duration=G}},{key:"overridedHasAudio",set:function(G){this._hasAudioFlagOverrided=!0,this._hasAudio=G,this._mediaInfo.hasAudio=G}},{key:"overridedHasVideo",set:function(G){this._hasVideoFlagOverrided=!0,this._hasVideo=G,this._mediaInfo.hasVideo=G}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new Re}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}},{key:"parseChunks",value:function(G,Z){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new o("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var ne=0,se=this._littleEndian;if(Z===0)if(G.byteLength>13){var Te=Se.probe(G);ne=Te.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,Z+ne!==this._dataOffset&&C.w(this.TAG,"First time parsing but chunk byteStart invalid!");var Ge=new DataView(G,ne),Ze=Ge.getUint32(0,!se);Ze!==0&&C.w(this.TAG,"PrevTagSize0 !== 0 !!!"),ne+=4}for(;ne<G.byteLength;){this._dispatch=!0;var bt=new DataView(G,ne);if(ne+11+4>G.byteLength)break;var At=bt.getUint8(0),it=bt.getUint32(0,!se)&16777215;if(ne+11+it+4>G.byteLength)break;if(At!==8&&At!==9&&At!==18){C.w(this.TAG,"Unsupported tag type ".concat(At,", skipped")),ne+=11+it+4;continue}var Tt=bt.getUint8(4),Qt=bt.getUint8(5),yt=bt.getUint8(6),nn=bt.getUint8(7),Jt=yt|Qt<<8|Tt<<16|nn<<24,Nt=bt.getUint32(7,!se)&16777215;Nt!==0&&C.w(this.TAG,"Meet tag which has StreamID != 0!");var vt=ne+11;switch(At){case 8:this._parseAudioData(G,vt,it,Jt);break;case 9:this._parseVideoData(G,vt,it,Jt,Z+ne);break;case 18:this._parseScriptData(G,vt,it);break}var Tn=bt.getUint32(11+it,!se);Tn!==11+it&&C.w(this.TAG,"Invalid PrevTagSize ".concat(Tn)),ne+=11+it+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),ne}},{key:"_parseScriptData",value:function(G,Z,ne){var se=Ne.parseScriptData(G,Z,ne);if(se.hasOwnProperty("onMetaData")){if(se.onMetaData==null||typeof se.onMetaData!="object"){C.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&C.w(this.TAG,"Found another onMetaData tag!"),this._metadata=se;var Te=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},Te)),typeof Te.hasAudio=="boolean"&&(this._hasAudioFlagOverrided===!1&&(this._hasAudio=Te.hasAudio,this._mediaInfo.hasAudio=this._hasAudio)),typeof Te.hasVideo=="boolean"&&(this._hasVideoFlagOverrided===!1&&(this._hasVideo=Te.hasVideo,this._mediaInfo.hasVideo=this._hasVideo)),typeof Te.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=Te.audiodatarate),typeof Te.videodatarate=="number"&&(this._mediaInfo.videoDataRate=Te.videodatarate),typeof Te.width=="number"&&(this._mediaInfo.width=Te.width),typeof Te.height=="number"&&(this._mediaInfo.height=Te.height),typeof Te.duration=="number"){if(!this._durationOverrided){var Ge=Math.floor(Te.duration*this._timescale);this._duration=Ge,this._mediaInfo.duration=Ge}}else this._mediaInfo.duration=0;if(typeof Te.framerate=="number"){var Ze=Math.floor(Te.framerate*1e3);if(Ze>0){var bt=Ze/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=bt,this._referenceFrameRate.fps_num=Ze,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=bt}}if(typeof Te.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var At=Te.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(At),Te.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=Te,C.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(se).length>0&&(this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},se)))}},{key:"_parseKeyframesIndex",value:function(G){for(var Z=[],ne=[],se=1;se<G.times.length;se++){var Te=this._timestampBase+Math.floor(G.times[se]*1e3);Z.push(Te),ne.push(G.filepositions[se])}return{times:Z,filepositions:ne}}},{key:"_parseAudioData",value:function(G,Z,ne,se){if(ne<=1){C.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;var Te=this._littleEndian,Ge=new DataView(G,Z,ne),Ze=Ge.getUint8(0),bt=Ze>>>4;if(bt!==2&&bt!==10){this._onError(X.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+bt);return}var At=0,it=(Ze&12)>>>2;if(it>=0&&it<=4)At=this._flvSoundRateTable[it];else{this._onError(X.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+it);return}var Tt=(Ze&2)>>>1,Qt=Ze&1,yt=this._audioMetadata,nn=this._audioTrack;if(yt||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),yt=this._audioMetadata={},yt.type="audio",yt.id=nn.id,yt.timescale=this._timescale,yt.duration=this._duration,yt.audioSampleRate=At,yt.channelCount=Qt===0?1:2),bt===10){var Jt=this._parseAACAudioData(G,Z+1,ne-1);if(Jt==null)return;if(Jt.packetType===0){yt.config&&C.w(this.TAG,"Found another AudioSpecificConfig!");var Nt=Jt.data;yt.audioSampleRate=Nt.samplingRate,yt.channelCount=Nt.channelCount,yt.codec=Nt.codec,yt.originalCodec=Nt.originalCodec,yt.config=Nt.config,yt.refSampleDuration=1024/yt.audioSampleRate*yt.timescale,C.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",yt);var vt=this._mediaInfo;vt.audioCodec=yt.originalCodec,vt.audioSampleRate=yt.audioSampleRate,vt.audioChannelCount=yt.channelCount,vt.hasVideo?vt.videoCodec!=null&&(vt.mimeType='video/x-flv; codecs="'+vt.videoCodec+","+vt.audioCodec+'"'):vt.mimeType='video/x-flv; codecs="'+vt.audioCodec+'"',vt.isComplete()&&this._onMediaInfo(vt)}else if(Jt.packetType===1){var Tn=this._timestampBase+se,mt={unit:Jt.data,length:Jt.data.byteLength,dts:Tn,pts:Tn};nn.samples.push(mt),nn.length+=Jt.data.length}else C.e(this.TAG,"Flv: Unsupported AAC data type ".concat(Jt.packetType))}else if(bt===2){if(!yt.codec){var ln=this._parseMP3AudioData(G,Z+1,ne-1,!0);if(ln==null)return;yt.audioSampleRate=ln.samplingRate,yt.channelCount=ln.channelCount,yt.codec=ln.codec,yt.originalCodec=ln.originalCodec,yt.refSampleDuration=1152/yt.audioSampleRate*yt.timescale,C.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",yt);var fn=this._mediaInfo;fn.audioCodec=yt.codec,fn.audioSampleRate=yt.audioSampleRate,fn.audioChannelCount=yt.channelCount,fn.audioDataRate=ln.bitRate,fn.hasVideo?fn.videoCodec!=null&&(fn.mimeType='video/x-flv; codecs="'+fn.videoCodec+","+fn.audioCodec+'"'):fn.mimeType='video/x-flv; codecs="'+fn.audioCodec+'"',fn.isComplete()&&this._onMediaInfo(fn)}var Zn=this._parseMP3AudioData(G,Z+1,ne-1,!1);if(Zn==null)return;var rr=this._timestampBase+se,xn={unit:Zn,length:Zn.byteLength,dts:rr,pts:rr};nn.samples.push(xn),nn.length+=Zn.length}}},{key:"_parseAACAudioData",value:function(G,Z,ne){if(ne<=1){C.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var se={},Te=new Uint8Array(G,Z,ne);return se.packetType=Te[0],Te[0]===0?se.data=this._parseAACAudioSpecificConfig(G,Z+1,ne-1):se.data=Te.subarray(1),se}},{key:"_parseAACAudioSpecificConfig",value:function(G,Z,ne){var se=new Uint8Array(G,Z,ne),Te=null,Ge=0,Ze=0,bt=null,At=0,it=null;if(Ge=Ze=se[0]>>>3,At=(se[0]&7)<<1|se[1]>>>7,At<0||At>=this._mpegSamplingRates.length){this._onError(X.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var Tt=this._mpegSamplingRates[At],Qt=(se[1]&120)>>>3;if(Qt<0||Qt>=8){this._onError(X.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Ge===5&&(it=(se[1]&7)<<1|se[2]>>>7,bt=(se[2]&124)>>>2);var yt=self.navigator.userAgent.toLowerCase();return yt.indexOf("firefox")!==-1?At>=6?(Ge=5,Te=new Array(4),it=At-3):(Ge=2,Te=new Array(2),it=At):yt.indexOf("android")!==-1?(Ge=2,Te=new Array(2),it=At):(Ge=5,it=At,Te=new Array(4),At>=6?it=At-3:Qt===1&&(Ge=2,Te=new Array(2),it=At)),Te[0]=Ge<<3,Te[0]|=(At&15)>>>1,Te[1]=(At&15)<<7,Te[1]|=(Qt&15)<<3,Ge===5&&(Te[1]|=(it&15)>>>1,Te[2]=(it&1)<<7,Te[2]|=2<<2,Te[3]=0),{config:Te,samplingRate:Tt,channelCount:Qt,codec:"mp4a.40."+Ge,originalCodec:"mp4a.40."+Ze}}},{key:"_parseMP3AudioData",value:function(G,Z,ne,se){if(ne<4){C.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var Te=this._littleEndian,Ge=new Uint8Array(G,Z,ne),Ze=null;if(se){if(Ge[0]!==255)return;var bt=Ge[1]>>>3&3,At=(Ge[1]&6)>>1,it=(Ge[2]&240)>>>4,Tt=(Ge[2]&12)>>>2,Qt=Ge[3]>>>6&3,yt=Qt!==3?2:1,nn=0,Jt=0,Nt=34,vt="mp3";switch(bt){case 0:nn=this._mpegAudioV25SampleRateTable[Tt];break;case 2:nn=this._mpegAudioV20SampleRateTable[Tt];break;case 3:nn=this._mpegAudioV10SampleRateTable[Tt];break}switch(At){case 1:Nt=34,it<this._mpegAudioL3BitRateTable.length&&(Jt=this._mpegAudioL3BitRateTable[it]);break;case 2:Nt=33,it<this._mpegAudioL2BitRateTable.length&&(Jt=this._mpegAudioL2BitRateTable[it]);break;case 3:Nt=32,it<this._mpegAudioL1BitRateTable.length&&(Jt=this._mpegAudioL1BitRateTable[it]);break}Ze={bitRate:Jt,samplingRate:nn,channelCount:yt,codec:vt,originalCodec:vt}}else Ze=Ge;return Ze}},{key:"_parseVideoData",value:function(G,Z,ne,se,Te){if(ne<=1){C.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;var Ge=new Uint8Array(G,Z,ne)[0],Ze=(Ge&240)>>>4,bt=Ge&15;if(bt!==7){this._onError(X.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(bt));return}this._parseAVCVideoPacket(G,Z+1,ne-1,se,Te,Ze)}},{key:"_parseAVCVideoPacket",value:function(G,Z,ne,se,Te,Ge){if(ne<4){C.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var Ze=this._littleEndian,bt=new DataView(G,Z,ne),At=bt.getUint8(0),it=bt.getUint32(0,!Ze)&16777215,Tt=it<<8>>8;if(At===0)this._parseAVCDecoderConfigurationRecord(G,Z+4,ne-4);else if(At===1)this._parseAVCVideoData(G,Z+4,ne-4,se,Te,Ge,Tt);else if(!(At===2)){this._onError(X.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(At));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(G,Z,ne){if(ne<7){C.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var se=this._videoMetadata,Te=this._videoTrack,Ge=this._littleEndian,Ze=new DataView(G,Z,ne);se?typeof se.avcc!="undefined"&&C.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),se=this._videoMetadata={},se.type="video",se.id=Te.id,se.timescale=this._timescale,se.duration=this._duration);var bt=Ze.getUint8(0),At=Ze.getUint8(1),it=Ze.getUint8(2),Tt=Ze.getUint8(3);if(bt!==1||At===0){this._onError(X.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Ze.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(X.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));return}var Qt=Ze.getUint8(5)&31;if(Qt===0){this._onError(X.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Qt>1&&C.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(Qt));for(var yt=6,nn=0;nn<Qt;nn++){var Jt=Ze.getUint16(yt,!Ge);if(yt+=2,Jt===0)continue;var Nt=new Uint8Array(G,Z+yt,Jt);yt+=Jt;var vt=U.parseSPS(Nt);if(nn!==0)continue;se.codecWidth=vt.codec_size.width,se.codecHeight=vt.codec_size.height,se.presentWidth=vt.present_size.width,se.presentHeight=vt.present_size.height,se.profile=vt.profile_string,se.level=vt.level_string,se.bitDepth=vt.bit_depth,se.chromaFormat=vt.chroma_format,se.sarRatio=vt.sar_ratio,se.frameRate=vt.frame_rate,(vt.frame_rate.fixed===!1||vt.frame_rate.fps_num===0||vt.frame_rate.fps_den===0)&&(se.frameRate=this._referenceFrameRate);var Tn=se.frameRate.fps_den,mt=se.frameRate.fps_num;se.refSampleDuration=se.timescale*(Tn/mt);for(var ln=Nt.subarray(1,4),fn="avc1.",Zn=0;Zn<3;Zn++){var rr=ln[Zn].toString(16);rr.length<2&&(rr="0"+rr),fn+=rr}se.codec=fn;var xn=this._mediaInfo;xn.width=se.codecWidth,xn.height=se.codecHeight,xn.fps=se.frameRate.fps,xn.profile=se.profile,xn.level=se.level,xn.refFrames=vt.ref_frames,xn.chromaFormat=vt.chroma_format_string,xn.sarNum=se.sarRatio.width,xn.sarDen=se.sarRatio.height,xn.videoCodec=fn,xn.hasAudio?xn.audioCodec!=null&&(xn.mimeType='video/x-flv; codecs="'+xn.videoCodec+","+xn.audioCodec+'"'):xn.mimeType='video/x-flv; codecs="'+xn.videoCodec+'"',xn.isComplete()&&this._onMediaInfo(xn)}var Er=Ze.getUint8(yt);if(Er===0){this._onError(X.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else Er>1&&C.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(Er));yt++;for(var Or=0;Or<Er;Or++){var un=Ze.getUint16(yt,!Ge);if(yt+=2,un===0)continue;yt+=un}se.avcc=new Uint8Array(ne),se.avcc.set(new Uint8Array(G,Z,ne),0),C.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",se)}},{key:"_parseAVCVideoData",value:function(G,Z,ne,se,Te,Ge,Ze){for(var bt=this._littleEndian,At=new DataView(G,Z,ne),it=[],Tt=0,Qt=0,yt=this._naluLengthSize,nn=this._timestampBase+se,Jt=Ge===1;Qt<ne;){if(Qt+4>=ne){C.w(this.TAG,"Malformed Nalu near timestamp ".concat(nn,", offset = ").concat(Qt,", dataSize = ").concat(ne));break}var Nt=At.getUint32(Qt,!bt);if(yt===3&&(Nt>>>=8),Nt>ne-yt){C.w(this.TAG,"Malformed Nalus near timestamp ".concat(nn,", NaluSize > DataSize!"));return}var vt=At.getUint8(Qt+yt)&31;vt===5&&(Jt=!0);var Tn=new Uint8Array(G,Z+Qt,yt+Nt),mt={type:vt,data:Tn};it.push(mt),Tt+=Tn.byteLength,Qt+=yt+Nt}if(it.length){var ln=this._videoTrack,fn={units:it,length:Tt,isKeyframe:Jt,dts:nn,cts:Ze,pts:nn+Ze};Jt&&(fn.fileposition=Te),ln.samples.push(fn),ln.length+=Tt}}}],[{key:"probe",value:function(G){var Z=new Uint8Array(G),ne={match:!1};if(Z[0]!==70||Z[1]!==76||Z[2]!==86||Z[3]!==1)return ne;var se=(Z[4]&4)>>>2!==0,Te=(Z[4]&1)!==0,Ge=Ae(Z,5);return Ge<9?ne:{match:!0,consumed:Ge,dataOffset:Ge,hasAudioTrack:se,hasVideoTrack:Te}}}]),Se}(),Le=at,Me=function(){function Se(){Object(ae.a)(this,Se)}return Object(ee.a)(Se,null,[{key:"init",value:function(){Se.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var G in Se.types)Se.types.hasOwnProperty(G)&&(Se.types[G]=[G.charCodeAt(0),G.charCodeAt(1),G.charCodeAt(2),G.charCodeAt(3)]);var Z=Se.constants={};Z.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),Z.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),Z.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),Z.STSC=Z.STCO=Z.STTS,Z.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Z.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Z.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Z.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Z.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Z.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(G){for(var Z=8,ne=null,se=Array.prototype.slice.call(arguments,1),Te=se.length,Ge=0;Ge<Te;Ge++)Z+=se[Ge].byteLength;ne=new Uint8Array(Z),ne[0]=Z>>>24&255,ne[1]=Z>>>16&255,ne[2]=Z>>>8&255,ne[3]=Z&255,ne.set(G,4);for(var Ze=8,bt=0;bt<Te;bt++)ne.set(se[bt],Ze),Ze+=se[bt].byteLength;return ne}},{key:"generateInitSegment",value:function(G){var Z=Se.box(Se.types.ftyp,Se.constants.FTYP),ne=Se.moov(G),se=new Uint8Array(Z.byteLength+ne.byteLength);return se.set(Z,0),se.set(ne,Z.byteLength),se}},{key:"moov",value:function(G){var Z=Se.mvhd(G.timescale,G.duration),ne=Se.trak(G),se=Se.mvex(G);return Se.box(Se.types.moov,Z,ne,se)}},{key:"mvhd",value:function(G,Z){return Se.box(Se.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,G>>>24&255,G>>>16&255,G>>>8&255,G&255,Z>>>24&255,Z>>>16&255,Z>>>8&255,Z&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]))}},{key:"trak",value:function(G){return Se.box(Se.types.trak,Se.tkhd(G),Se.mdia(G))}},{key:"tkhd",value:function(G){var Z=G.id,ne=G.duration,se=G.presentWidth,Te=G.presentHeight;return Se.box(Se.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,Z>>>24&255,Z>>>16&255,Z>>>8&255,Z&255,0,0,0,0,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&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,se>>>8&255,se&255,0,0,Te>>>8&255,Te&255,0,0]))}},{key:"mdia",value:function(G){return Se.box(Se.types.mdia,Se.mdhd(G),Se.hdlr(G),Se.minf(G))}},{key:"mdhd",value:function(G){var Z=G.timescale,ne=G.duration;return Se.box(Se.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Z>>>24&255,Z>>>16&255,Z>>>8&255,Z&255,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&255,85,196,0,0]))}},{key:"hdlr",value:function(G){var Z=null;return G.type==="audio"?Z=Se.constants.HDLR_AUDIO:Z=Se.constants.HDLR_VIDEO,Se.box(Se.types.hdlr,Z)}},{key:"minf",value:function(G){var Z=null;return G.type==="audio"?Z=Se.box(Se.types.smhd,Se.constants.SMHD):Z=Se.box(Se.types.vmhd,Se.constants.VMHD),Se.box(Se.types.minf,Z,Se.dinf(),Se.stbl(G))}},{key:"dinf",value:function(){var G=Se.box(Se.types.dinf,Se.box(Se.types.dref,Se.constants.DREF));return G}},{key:"stbl",value:function(G){var Z=Se.box(Se.types.stbl,Se.stsd(G),Se.box(Se.types.stts,Se.constants.STTS),Se.box(Se.types.stsc,Se.constants.STSC),Se.box(Se.types.stsz,Se.constants.STSZ),Se.box(Se.types.stco,Se.constants.STCO));return Z}},{key:"stsd",value:function(G){return G.type==="audio"?G.codec==="mp3"?Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.mp3(G)):Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.mp4a(G)):Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.avc1(G))}},{key:"mp3",value:function(G){var Z=G.channelCount,ne=G.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Z,0,16,0,0,0,0,ne>>>8&255,ne&255,0,0]);return Se.box(Se.types[".mp3"],se)}},{key:"mp4a",value:function(G){var Z=G.channelCount,ne=G.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Z,0,16,0,0,0,0,ne>>>8&255,ne&255,0,0]);return Se.box(Se.types.mp4a,se,Se.esds(G))}},{key:"esds",value:function(G){var Z=G.config||[],ne=Z.length,se=new Uint8Array([0,0,0,0,3,23+ne,0,1,0,4,15+ne,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([ne]).concat(Z).concat([6,1,2]));return Se.box(Se.types.esds,se)}},{key:"avc1",value:function(G){var Z=G.avcc,ne=G.codecWidth,se=G.codecHeight,Te=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,ne>>>8&255,ne&255,se>>>8&255,se&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Se.box(Se.types.avc1,Te,Se.box(Se.types.avcC,Z))}},{key:"mvex",value:function(G){return Se.box(Se.types.mvex,Se.trex(G))}},{key:"trex",value:function(G){var Z=G.id,ne=new Uint8Array([0,0,0,0,Z>>>24&255,Z>>>16&255,Z>>>8&255,Z&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Se.box(Se.types.trex,ne)}},{key:"moof",value:function(G,Z){return Se.box(Se.types.moof,Se.mfhd(G.sequenceNumber),Se.traf(G,Z))}},{key:"mfhd",value:function(G){var Z=new Uint8Array([0,0,0,0,G>>>24&255,G>>>16&255,G>>>8&255,G&255]);return Se.box(Se.types.mfhd,Z)}},{key:"traf",value:function(G,Z){var ne=G.id,se=Se.box(Se.types.tfhd,new Uint8Array([0,0,0,0,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&255])),Te=Se.box(Se.types.tfdt,new Uint8Array([0,0,0,0,Z>>>24&255,Z>>>16&255,Z>>>8&255,Z&255])),Ge=Se.sdtp(G),Ze=Se.trun(G,Ge.byteLength+16+16+8+16+8+8);return Se.box(Se.types.traf,se,Te,Ze,Ge)}},{key:"sdtp",value:function(G){for(var Z=G.samples||[],ne=Z.length,se=new Uint8Array(4+ne),Te=0;Te<ne;Te++){var Ge=Z[Te].flags;se[Te+4]=Ge.isLeading<<6|Ge.dependsOn<<4|Ge.isDependedOn<<2|Ge.hasRedundancy}return Se.box(Se.types.sdtp,se)}},{key:"trun",value:function(G,Z){var ne=G.samples||[],se=ne.length,Te=12+16*se,Ge=new Uint8Array(Te);Z+=8+Te,Ge.set([0,0,15,1,se>>>24&255,se>>>16&255,se>>>8&255,se&255,Z>>>24&255,Z>>>16&255,Z>>>8&255,Z&255],0);for(var Ze=0;Ze<se;Ze++){var bt=ne[Ze].duration,At=ne[Ze].size,it=ne[Ze].flags,Tt=ne[Ze].cts;Ge.set([bt>>>24&255,bt>>>16&255,bt>>>8&255,bt&255,At>>>24&255,At>>>16&255,At>>>8&255,At&255,it.isLeading<<2|it.dependsOn,it.isDependedOn<<6|it.hasRedundancy<<4|it.isNonSync,0,0,Tt>>>24&255,Tt>>>16&255,Tt>>>8&255,Tt&255],12+16*Ze)}return Se.box(Se.types.trun,Ge)}},{key:"mdat",value:function(G){return Se.box(Se.types.mdat,G)}}]),Se}();Me.init();var Xe=Me,et=function(){function Se(){Object(ae.a)(this,Se)}return Object(ee.a)(Se,null,[{key:"getSilentFrame",value:function(G,Z){if(G==="mp4a.40.2"){if(Z===1)return new Uint8Array([0,200,0,128,35,128]);if(Z===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(Z===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(Z===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(Z===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(Z===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])}else{if(Z===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(Z===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(Z===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])}return null}}]),Se}(),ze=et,Ke=function Se(fe,G,Z,ne,se){Object(ae.a)(this,Se),this.dts=fe,this.pts=G,this.duration=Z,this.originalDts=ne,this.isSyncPoint=se,this.fileposition=null},Pe=function(){function Se(){Object(ae.a)(this,Se),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return Object(ee.a)(Se,[{key:"appendSyncPoint",value:function(G){G.isSyncPoint=!0,this.syncPoints.push(G)}}]),Se}(),Ie=function(){function Se(){Object(ae.a)(this,Se),this._list=[]}return Object(ee.a)(Se,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(G){var Z=this._list;if(G.length===0)return;Z.length>0&&G[0].originalDts<Z[Z.length-1].originalDts&&this.clear(),Array.prototype.push.apply(Z,G)}},{key:"getLastSyncPointBeforeDts",value:function(G){if(this._list.length==0)return null;var Z=this._list,ne=0,se=Z.length-1,Te=0,Ge=0,Ze=se;for(G<Z[0].dts&&(ne=0,Ge=Ze+1);Ge<=Ze;)if(Te=Ge+Math.floor((Ze-Ge)/2),Te===se||G>=Z[Te].dts&&G<Z[Te+1].dts){ne=Te;break}else Z[Te].dts<G?Ge=Te+1:Ze=Te-1;return this._list[ne]}}]),Se}(),Ce=function(){function Se(fe){Object(ae.a)(this,Se),this._type=fe,this._list=[],this._lastAppendLocation=-1}return Object(ee.a)(Se,[{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}},{key:"isEmpty",value:function(){return this._list.length===0}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(G){var Z=this._list;if(Z.length===0)return-2;var ne=Z.length-1,se=0,Te=0,Ge=ne,Ze=0;if(G<Z[0].originalBeginDts)return Ze=-1,Ze;for(;Te<=Ge;)if(se=Te+Math.floor((Ge-Te)/2),se===ne||G>Z[se].lastSample.originalDts&&G<Z[se+1].originalBeginDts){Ze=se;break}else Z[se].originalBeginDts<G?Te=se+1:Ge=se-1;return Ze}},{key:"_searchNearestSegmentAfter",value:function(G){return this._searchNearestSegmentBefore(G)+1}},{key:"append",value:function(G){var Z=this._list,ne=G,se=this._lastAppendLocation,Te=0;se!==-1&&se<Z.length&&ne.originalBeginDts>=Z[se].lastSample.originalDts&&(se===Z.length-1||se<Z.length-1&&ne.originalBeginDts<Z[se+1].originalBeginDts)?Te=se+1:Z.length>0&&(Te=this._searchNearestSegmentBefore(ne.originalBeginDts)+1),this._lastAppendLocation=Te,this._list.splice(Te,0,ne)}},{key:"getLastSegmentBefore",value:function(G){var Z=this._searchNearestSegmentBefore(G);return Z>=0?this._list[Z]:null}},{key:"getLastSampleBefore",value:function(G){var Z=this.getLastSegmentBefore(G);return Z!=null?Z.lastSample:null}},{key:"getLastSyncPointBefore",value:function(G){for(var Z=this._searchNearestSegmentBefore(G),ne=this._list[Z].syncPoints;ne.length===0&&Z>0;)Z--,ne=this._list[Z].syncPoints;return ne.length>0?ne[ne.length-1]:null}}]),Se}(),pe=function(){function Se(fe){Object(ae.a)(this,Se),this.TAG="MP4Remuxer",this._config=fe,this._isLive=fe.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=Infinity,this._videoDtsBase=Infinity,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Ce("audio"),this._videoSegmentInfoList=new Ce("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(m.chrome&&(m.version.major<50||m.version.major===50&&m.version.build<2661)),this._fillSilentAfterSeek=m.msedge||m.msie,this._mp3UseMpegAudio=!m.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(ee.a)(Se,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(G){return G.onDataAvailable=this.remux.bind(this),G.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(G){this._onInitSegment=G}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(G){this._onMediaSegment=G}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(G){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(G,Z){if(!this._onMediaSegment)throw new o("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(G,Z),this._remuxVideo(Z),this._remuxAudio(G)}},{key:"_onTrackMetadataReceived",value:function(G,Z){var ne=null,se="mp4",Te=Z.codec;if(G==="audio")this._audioMeta=Z,Z.codec==="mp3"&&this._mp3UseMpegAudio?(se="mpeg",Te="",ne=new Uint8Array):ne=Xe.generateInitSegment(Z);else if(G==="video")this._videoMeta=Z,ne=Xe.generateInitSegment(Z);else return;if(!this._onInitSegment)throw new o("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(G,{type:G,data:ne.buffer,codec:Te,container:"".concat(G,"/").concat(se),mediaDuration:Z.duration})}},{key:"_calculateDtsBase",value:function(G,Z){if(this._dtsBaseInited)return;G.samples&&G.samples.length&&(this._audioDtsBase=G.samples[0].dts),Z.samples&&Z.samples.length&&(this._videoDtsBase=Z.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0}},{key:"flushStashedSamples",value:function(){var G=this._videoStashedLastSample,Z=this._audioStashedLastSample,ne={type:"video",id:1,sequenceNumber:0,samples:[],length:0};G!=null&&(ne.samples.push(G),ne.length=G.length);var se={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};Z!=null&&(se.samples.push(Z),se.length=Z.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(ne,!0),this._remuxAudio(se,!0)}},{key:"_remuxAudio",value:function(G,Z){if(this._audioMeta==null)return;var ne=G,se=ne.samples,Te=void 0,Ge=-1,Ze=-1,bt=-1,At=this._audioMeta.refSampleDuration,it=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Tt=this._dtsBaseInited&&this._audioNextDts===void 0,Qt=!1;if(!se||se.length===0)return;if(se.length===1&&!Z)return;var yt=0,nn=null,Jt=0;it?(yt=0,Jt=ne.length):(yt=8,Jt=8+ne.length);var Nt=null;if(se.length>1&&(Nt=se.pop(),Jt-=Nt.length),this._audioStashedLastSample!=null){var vt=this._audioStashedLastSample;this._audioStashedLastSample=null,se.unshift(vt),Jt+=vt.length}Nt!=null&&(this._audioStashedLastSample=Nt);var Tn=se[0].dts-this._dtsBase;if(this._audioNextDts)Te=Tn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Te=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(Qt=!0));else{var mt=this._audioSegmentInfoList.getLastSampleBefore(Tn);if(mt!=null){var ln=Tn-(mt.originalDts+mt.duration);ln<=3&&(ln=0);var fn=mt.dts+mt.duration+ln;Te=Tn-fn}else Te=0}if(Qt){var Zn=Tn-Te,rr=this._videoSegmentInfoList.getLastSegmentBefore(Tn);if(rr!=null&&rr.beginDts<Zn){var xn=ze.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(xn){var Er=rr.beginDts,Or=Zn-rr.beginDts;C.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(Er,", duration: ").concat(Or)),se.unshift({unit:xn,dts:Er,pts:Er}),Jt+=xn.byteLength}}else Qt=!1}for(var un=[],Pn=0;Pn<se.length;Pn++){var Nr=se[Pn],Xr=Nr.unit,xr=Nr.dts-this._dtsBase,ur=xr-Te;Ge===-1&&(Ge=ur);var vr=0;if(Pn!==se.length-1){var vi=se[Pn+1].dts-this._dtsBase-Te;vr=vi-ur}else if(Nt!=null){var pr=Nt.dts-this._dtsBase-Te;vr=pr-ur}else un.length>=1?vr=un[un.length-1].duration:vr=Math.floor(At);var _r=!1,Cr=null;if(vr>At*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!m.safari){_r=!0;var Hr=Math.abs(vr-At),Tr=Math.ceil(Hr/At),ui=ur+At;C.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
`+"dts: ".concat(ur+vr," ms, expected: ").concat(ur+Math.round(At)," ms, ")+"delta: ".concat(Math.round(Hr)," ms, generate: ").concat(Tr," frames"));var Dr=ze.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Dr==null&&(C.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),Dr=Xr),Cr=[];for(var _i=0;_i<Tr;_i++){var ci=Math.round(ui);if(Cr.length>0){var ni=Cr[Cr.length-1];ni.duration=ci-ni.dts}var Ii={dts:ci,pts:ci,cts:0,unit:Dr,size:Dr.byteLength,duration:0,originalDts:xr,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Cr.push(Ii),Jt+=Ii.size,ui+=At}var Ni=Cr[Cr.length-1];Ni.duration=ur+vr-Ni.dts,vr=Math.round(At)}un.push({dts:ur,pts:ur,cts:0,unit:Nr.unit,size:Nr.unit.byteLength,duration:vr,originalDts:xr,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),_r&&un.push.apply(un,Cr)}it?nn=new Uint8Array(Jt):(nn=new Uint8Array(Jt),nn[0]=Jt>>>24&255,nn[1]=Jt>>>16&255,nn[2]=Jt>>>8&255,nn[3]=Jt&255,nn.set(Xe.types.mdat,4));for(var Ui=0;Ui<un.length;Ui++){var di=un[Ui].unit;nn.set(di,yt),yt+=di.byteLength}var mr=un[un.length-1];Ze=mr.dts+mr.duration,this._audioNextDts=Ze;var dr=new Pe;dr.beginDts=Ge,dr.endDts=Ze,dr.beginPts=Ge,dr.endPts=Ze,dr.originalBeginDts=un[0].originalDts,dr.originalEndDts=mr.originalDts+mr.duration,dr.firstSample=new Ke(un[0].dts,un[0].pts,un[0].duration,un[0].originalDts,!1),dr.lastSample=new Ke(mr.dts,mr.pts,mr.duration,mr.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(dr),ne.samples=un,ne.sequenceNumber++;var qr=null;it?qr=new Uint8Array:qr=Xe.moof(ne,Ge),ne.samples=[],ne.length=0;var ri={type:"audio",data:this._mergeBoxes(qr,nn).buffer,sampleCount:un.length,info:dr};it&&Tt&&(ri.timestampOffset=Ge),this._onMediaSegment("audio",ri)}},{key:"_remuxVideo",value:function(G,Z){if(this._videoMeta==null)return;var ne=G,se=ne.samples,Te=void 0,Ge=-1,Ze=-1,bt=-1,At=-1;if(!se||se.length===0)return;if(se.length===1&&!Z)return;var it=8,Tt=null,Qt=8+G.length,yt=null;if(se.length>1&&(yt=se.pop(),Qt-=yt.length),this._videoStashedLastSample!=null){var nn=this._videoStashedLastSample;this._videoStashedLastSample=null,se.unshift(nn),Qt+=nn.length}yt!=null&&(this._videoStashedLastSample=yt);var Jt=se[0].dts-this._dtsBase;if(this._videoNextDts)Te=Jt-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Te=0;else{var Nt=this._videoSegmentInfoList.getLastSampleBefore(Jt);if(Nt!=null){var vt=Jt-(Nt.originalDts+Nt.duration);vt<=3&&(vt=0);var Tn=Nt.dts+Nt.duration+vt;Te=Jt-Tn}else Te=0}for(var mt=new Pe,ln=[],fn=0;fn<se.length;fn++){var Zn=se[fn],rr=Zn.dts-this._dtsBase,xn=Zn.isKeyframe,Er=rr-Te,Or=Zn.cts,un=Er+Or;Ge===-1&&(Ge=Er,bt=un);var Pn=0;if(fn!==se.length-1){var Nr=se[fn+1].dts-this._dtsBase-Te;Pn=Nr-Er}else if(yt!=null){var Xr=yt.dts-this._dtsBase-Te;Pn=Xr-Er}else ln.length>=1?Pn=ln[ln.length-1].duration:Pn=Math.floor(this._videoMeta.refSampleDuration);if(xn){var xr=new Ke(Er,un,Pn,Zn.dts,!0);xr.fileposition=Zn.fileposition,mt.appendSyncPoint(xr)}ln.push({dts:Er,pts:un,cts:Or,units:Zn.units,size:Zn.length,isKeyframe:xn,duration:Pn,originalDts:rr,flags:{isLeading:0,dependsOn:xn?2:1,isDependedOn:xn?1:0,hasRedundancy:0,isNonSync:xn?0:1}})}Tt=new Uint8Array(Qt),Tt[0]=Qt>>>24&255,Tt[1]=Qt>>>16&255,Tt[2]=Qt>>>8&255,Tt[3]=Qt&255,Tt.set(Xe.types.mdat,4);for(var ur=0;ur<ln.length;ur++)for(var vr=ln[ur].units;vr.length;){var vi=vr.shift(),pr=vi.data;Tt.set(pr,it),it+=pr.byteLength}var _r=ln[ln.length-1];if(Ze=_r.dts+_r.duration,At=_r.pts+_r.duration,this._videoNextDts=Ze,mt.beginDts=Ge,mt.endDts=Ze,mt.beginPts=bt,mt.endPts=At,mt.originalBeginDts=ln[0].originalDts,mt.originalEndDts=_r.originalDts+_r.duration,mt.firstSample=new Ke(ln[0].dts,ln[0].pts,ln[0].duration,ln[0].originalDts,ln[0].isKeyframe),mt.lastSample=new Ke(_r.dts,_r.pts,_r.duration,_r.originalDts,_r.isKeyframe),this._isLive||this._videoSegmentInfoList.append(mt),ne.samples=ln,ne.sequenceNumber++,this._forceFirstIDR){var Cr=ln[0].flags;Cr.dependsOn=2,Cr.isNonSync=0}var Hr=Xe.moof(ne,Ge);ne.samples=[],ne.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Hr,Tt).buffer,sampleCount:ln.length,info:mt})}},{key:"_mergeBoxes",value:function(G,Z){var ne=new Uint8Array(G.byteLength+Z.byteLength);return ne.set(G,0),ne.set(Z,G.byteLength),ne}}]),Se}(),_e=pe,Oe={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"},we=Oe,Be=function(){function Se(fe,G){Object(ae.a)(this,Se),this.TAG="TransmuxingController",this._emitter=new S.a,this._config=G,fe.segments||(fe.segments=[{duration:fe.duration,filesize:fe.filesize,url:fe.url}]),typeof fe.cors!="boolean"&&(fe.cors=!0),typeof fe.withCredentials!="boolean"&&(fe.withCredentials=!1),this._mediaDataSource=fe,this._currentSegmentIndex=0;var Z=0;this._mediaDataSource.segments.forEach(function(ne){ne.timestampBase=Z,Z+=ne.duration,ne.cors=fe.cors,ne.withCredentials=fe.withCredentials,G.referrerPolicy&&(ne.referrerPolicy=G.referrerPolicy)}),!isNaN(Z)&&this._mediaDataSource.duration!==Z&&(this._mediaDataSource.duration=Z),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return Object(ee.a)(Se,[{key:"destroy",value:function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(G,Z){this._emitter.addListener(G,Z)}},{key:"off",value:function(G,Z){this._emitter.removeListener(G,Z)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(G,Z){this._currentSegmentIndex=G;var ne=this._mediaDataSource.segments[G],se=this._ioctl=new H(ne,this._config,G);se.onError=this._onIOException.bind(this),se.onSeeked=this._onIOSeeked.bind(this),se.onComplete=this._onIOComplete.bind(this),se.onRedirect=this._onIORedirect.bind(this),se.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),Z?this._demuxer.bindDataSource(this._ioctl):se.onDataArrival=this._onInitChunkArrival.bind(this),se.open(Z)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(G){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;var Z=this._searchSegmentIndexContains(G);if(Z===this._currentSegmentIndex){var ne=this._mediaInfo.segments[Z];if(ne==null)this._pendingSeekTime=G;else{var se=ne.getNearestKeyframe(G);this._remuxer.seek(se.milliseconds),this._ioctl.seek(se.fileposition),this._pendingResolveSeekPoint=se.milliseconds}}else{var Te=this._mediaInfo.segments[Z];if(Te==null)this._pendingSeekTime=G,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(Z);else{var Ge=Te.getNearestKeyframe(G);this._internalAbort(),this._remuxer.seek(G),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[Z].timestampBase,this._loadSegment(Z,Ge.fileposition),this._pendingResolveSeekPoint=Ge.milliseconds,this._reportSegmentMediaInfo(Z)}}this._enableStatisticsReporter()}},{key:"_searchSegmentIndexContains",value:function(G){for(var Z=this._mediaDataSource.segments,ne=Z.length-1,se=0;se<Z.length;se++)if(G<Z[se].timestampBase){ne=se-1;break}return ne}},{key:"_onInitChunkArrival",value:function(G,Z){var ne=this,se=null,Te=0;if(Z>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,Te=this._demuxer.parseChunks(G,Z);else if((se=Le.probe(G)).match){this._demuxer=new Le(se,this._config),this._remuxer||(this._remuxer=new _e(this._config));var Ge=this._mediaDataSource;Ge.duration!=null&&!isNaN(Ge.duration)&&(this._demuxer.overridedDuration=Ge.duration),typeof Ge.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Ge.hasAudio),typeof Ge.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Ge.hasVideo),this._demuxer.timestampBase=Ge.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),Te=this._demuxer.parseChunks(G,Z)}else se=null,C.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){ne._internalAbort()}),this._emitter.emit(we.DEMUX_ERROR,X.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),Te=0;return Te}},{key:"_onMediaInfo",value:function(G){var Z=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},G),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Re.prototype));var ne=Object.assign({},G);Object.setPrototypeOf(ne,Re.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=ne,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var se=Z._pendingSeekTime;Z._pendingSeekTime=null,Z.seek(se)})}},{key:"_onMetaDataArrived",value:function(G){this._emitter.emit(we.METADATA_ARRIVED,G)}},{key:"_onScriptDataArrived",value:function(G){this._emitter.emit(we.SCRIPTDATA_ARRIVED,G)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(G){var Z=G,ne=Z+1;ne<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(ne)):(this._remuxer.flushStashedSamples(),this._emitter.emit(we.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(G){var Z=this._ioctl.extraData;this._mediaDataSource.segments[Z].redirectedURL=G}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(we.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(G,Z){C.e(this.TAG,"IOException: type = ".concat(G,", code = ").concat(Z.code,", msg = ").concat(Z.msg)),this._emitter.emit(we.IO_ERROR,G,Z),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(G,Z){C.e(this.TAG,"DemuxException: type = ".concat(G,", info = ").concat(Z)),this._emitter.emit(we.DEMUX_ERROR,G,Z)}},{key:"_onRemuxerInitSegmentArrival",value:function(G,Z){this._emitter.emit(we.INIT_SEGMENT,G,Z)}},{key:"_onRemuxerMediaSegmentArrival",value:function(G,Z){if(this._pendingSeekTime!=null)return;if(this._emitter.emit(we.MEDIA_SEGMENT,G,Z),this._pendingResolveSeekPoint!=null&&G==="video"){var ne=Z.info.syncPoints,se=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,m.safari&&ne.length>0&&ne[0].originalDts===se&&(se=ne[0].pts),this._emitter.emit(we.RECOMMEND_SEEKPOINT,se)}}},{key:"_enableStatisticsReporter",value:function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(G){var Z=this._mediaInfo.segments[G],ne=Object.assign({},Z);ne.duration=this._mediaInfo.duration,ne.segmentCount=this._mediaInfo.segmentCount,delete ne.segments,delete ne.keyframesIndex,this._emitter.emit(we.MEDIA_INFO,ne)}},{key:"_reportStatisticsInfo",value:function(){var G={};G.url=this._ioctl.currentURL,G.hasRedirect=this._ioctl.hasRedirect,G.hasRedirect&&(G.redirectedURL=this._ioctl.currentRedirectedURL),G.speed=this._ioctl.currentSpeed,G.loaderType=this._ioctl.loaderType,G.currentSegmentIndex=this._currentSegmentIndex,G.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(we.STATISTICS_INFO,G)}}]),Se}(),qe=Be,dt=function(fe){var G="TransmuxingWorker",Z=null,ne=Jt.bind(this);O.install(),fe.addEventListener("message",function(Nt){switch(Nt.data.cmd){case"init":Z=new qe(Nt.data.param[0],Nt.data.param[1]),Z.on(we.IO_ERROR,Qt.bind(this)),Z.on(we.DEMUX_ERROR,yt.bind(this)),Z.on(we.INIT_SEGMENT,se.bind(this)),Z.on(we.MEDIA_SEGMENT,Te.bind(this)),Z.on(we.LOADING_COMPLETE,Ge.bind(this)),Z.on(we.RECOVERED_EARLY_EOF,Ze.bind(this)),Z.on(we.MEDIA_INFO,bt.bind(this)),Z.on(we.METADATA_ARRIVED,At.bind(this)),Z.on(we.SCRIPTDATA_ARRIVED,it.bind(this)),Z.on(we.STATISTICS_INFO,Tt.bind(this)),Z.on(we.RECOMMEND_SEEKPOINT,nn.bind(this));break;case"destroy":Z&&(Z.destroy(),Z=null),fe.postMessage({msg:"destroyed"});break;case"start":Z.start();break;case"stop":Z.stop();break;case"seek":Z.seek(Nt.data.param);break;case"pause":Z.pause();break;case"resume":Z.resume();break;case"logging_config":{var vt=Nt.data.param;be.applyConfig(vt),vt.enableCallback===!0?be.addLogListener(ne):be.removeLogListener(ne);break}}});function se(Nt,vt){var Tn={msg:we.INIT_SEGMENT,data:{type:Nt,data:vt}};fe.postMessage(Tn,[vt.data])}function Te(Nt,vt){var Tn={msg:we.MEDIA_SEGMENT,data:{type:Nt,data:vt}};fe.postMessage(Tn,[vt.data])}function Ge(){var Nt={msg:we.LOADING_COMPLETE};fe.postMessage(Nt)}function Ze(){var Nt={msg:we.RECOVERED_EARLY_EOF};fe.postMessage(Nt)}function bt(Nt){var vt={msg:we.MEDIA_INFO,data:Nt};fe.postMessage(vt)}function At(Nt){var vt={msg:we.METADATA_ARRIVED,data:Nt};fe.postMessage(vt)}function it(Nt){var vt={msg:we.SCRIPTDATA_ARRIVED,data:Nt};fe.postMessage(vt)}function Tt(Nt){var vt={msg:we.STATISTICS_INFO,data:Nt};fe.postMessage(vt)}function Qt(Nt,vt){fe.postMessage({msg:we.IO_ERROR,data:{type:Nt,info:vt}})}function yt(Nt,vt){fe.postMessage({msg:we.DEMUX_ERROR,data:{type:Nt,info:vt}})}function nn(Nt){fe.postMessage({msg:we.RECOMMEND_SEEKPOINT,data:Nt})}function Jt(Nt,vt){fe.postMessage({msg:"logcat_callback",data:{type:Nt,logcat:vt}})}},Et=dt,It=function(){function Se(fe,G){if(Object(ae.a)(this,Se),this.TAG="Transmuxer",this._emitter=new S.a,G.enableWorker&&typeof Worker!="undefined")try{var Z=z("0r65");this._worker=Z(Et),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[fe,G]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},be.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:be.getConfig()})}catch(se){C.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new qe(fe,G)}else this._controller=new qe(fe,G);if(this._controller){var ne=this._controller;ne.on(we.IO_ERROR,this._onIOError.bind(this)),ne.on(we.DEMUX_ERROR,this._onDemuxError.bind(this)),ne.on(we.INIT_SEGMENT,this._onInitSegment.bind(this)),ne.on(we.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),ne.on(we.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),ne.on(we.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),ne.on(we.MEDIA_INFO,this._onMediaInfo.bind(this)),ne.on(we.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),ne.on(we.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),ne.on(we.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),ne.on(we.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(ee.a)(Se,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),be.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(G,Z){this._emitter.addListener(G,Z)}},{key:"off",value:function(G,Z){this._emitter.removeListener(G,Z)}},{key:"hasWorker",value:function(){return this._worker!=null}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(G){this._worker?this._worker.postMessage({cmd:"seek",param:G}):this._controller.seek(G)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(G,Z){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(we.INIT_SEGMENT,G,Z)})}},{key:"_onMediaSegment",value:function(G,Z){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(we.MEDIA_SEGMENT,G,Z)})}},{key:"_onLoadingComplete",value:function(){var G=this;Promise.resolve().then(function(){G._emitter.emit(we.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var G=this;Promise.resolve().then(function(){G._emitter.emit(we.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(G){var Z=this;Promise.resolve().then(function(){Z._emitter.emit(we.MEDIA_INFO,G)})}},{key:"_onMetaDataArrived",value:function(G){var Z=this;Promise.resolve().then(function(){Z._emitter.emit(we.METADATA_ARRIVED,G)})}},{key:"_onScriptDataArrived",value:function(G){var Z=this;Promise.resolve().then(function(){Z._emitter.emit(we.SCRIPTDATA_ARRIVED,G)})}},{key:"_onStatisticsInfo",value:function(G){var Z=this;Promise.resolve().then(function(){Z._emitter.emit(we.STATISTICS_INFO,G)})}},{key:"_onIOError",value:function(G,Z){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(we.IO_ERROR,G,Z)})}},{key:"_onDemuxError",value:function(G,Z){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(we.DEMUX_ERROR,G,Z)})}},{key:"_onRecommendSeekpoint",value:function(G){var Z=this;Promise.resolve().then(function(){Z._emitter.emit(we.RECOMMEND_SEEKPOINT,G)})}},{key:"_onLoggingConfigChanged",value:function(G){this._worker&&this._worker.postMessage({cmd:"logging_config",param:G})}},{key:"_onWorkerMessage",value:function(G){var Z=G.data,ne=Z.data;if(Z.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(Z.msg){case we.INIT_SEGMENT:case we.MEDIA_SEGMENT:this._emitter.emit(Z.msg,ne.type,ne.data);break;case we.LOADING_COMPLETE:case we.RECOVERED_EARLY_EOF:this._emitter.emit(Z.msg);break;case we.MEDIA_INFO:Object.setPrototypeOf(ne,Re.prototype),this._emitter.emit(Z.msg,ne);break;case we.METADATA_ARRIVED:case we.SCRIPTDATA_ARRIVED:case we.STATISTICS_INFO:this._emitter.emit(Z.msg,ne);break;case we.IO_ERROR:case we.DEMUX_ERROR:this._emitter.emit(Z.msg,ne.type,ne.info);break;case we.RECOMMEND_SEEKPOINT:this._emitter.emit(Z.msg,ne);break;case"logcat_callback":C.emitter.emit("log",ne.type,ne.logcat);break;default:break}}}]),Se}(),Rt=It,Ct={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},st=Ct,ut=function(){function Se(fe){Object(ae.a)(this,Se),this.TAG="MSEController",this._config=fe,this._emitter=new S.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Ie}return Object(ee.a)(Se,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(G,Z){this._emitter.addListener(G,Z)}},{key:"off",value:function(G,Z){this._emitter.removeListener(G,Z)}},{key:"attachMediaElement",value:function(G){if(this._mediaSource)throw new o("MediaSource has been attached to an HTMLMediaElement!");var Z=this._mediaSource=new window.MediaSource;Z.addEventListener("sourceopen",this.e.onSourceOpen),Z.addEventListener("sourceended",this.e.onSourceEnded),Z.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=G,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),G.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var G=this._mediaSource;for(var Z in this._sourceBuffers){var ne=this._pendingSegments[Z];ne.splice(0,ne.length),this._pendingSegments[Z]=null,this._pendingRemoveRanges[Z]=null,this._lastInitSegments[Z]=null;var se=this._sourceBuffers[Z];if(se){if(G.readyState!=="closed"){try{G.removeSourceBuffer(se)}catch(Te){C.e(this.TAG,Te.message)}se.removeEventListener("error",this.e.onSourceBufferError),se.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[Z]=null,this._sourceBuffers[Z]=null}}if(G.readyState==="open")try{G.endOfStream()}catch(Te){C.e(this.TAG,Te.message)}G.removeEventListener("sourceopen",this.e.onSourceOpen),G.removeEventListener("sourceended",this.e.onSourceEnded),G.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(G,Z){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(G),this._pendingSegments[G.type].push(G);return}var ne=G,se="".concat(ne.container);ne.codec&&ne.codec.length>0&&(se+=";codecs=".concat(ne.codec));var Te=!1;if(C.v(this.TAG,"Received Initialization Segment, mimeType: "+se),this._lastInitSegments[ne.type]=ne,se!==this._mimeTypes[ne.type]){if(this._mimeTypes[ne.type])C.v(this.TAG,"Notice: ".concat(ne.type," mimeType changed, origin: ").concat(this._mimeTypes[ne.type],", target: ").concat(se));else{Te=!0;try{var Ge=this._sourceBuffers[ne.type]=this._mediaSource.addSourceBuffer(se);Ge.addEventListener("error",this.e.onSourceBufferError),Ge.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Ze){C.e(this.TAG,Ze.message),this._emitter.emit(st.ERROR,{code:Ze.code,msg:Ze.message});return}}this._mimeTypes[ne.type]=se}Z||this._pendingSegments[ne.type].push(ne),Te||this._sourceBuffers[ne.type]&&!this._sourceBuffers[ne.type].updating&&this._doAppendSegments(),m.safari&&ne.container==="audio/mpeg"&&ne.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=ne.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(G){var Z=G;this._pendingSegments[Z.type].push(Z),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var ne=this._sourceBuffers[Z.type];ne&&!ne.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(G){for(var Z in this._sourceBuffers){if(!this._sourceBuffers[Z])continue;var ne=this._sourceBuffers[Z];if(this._mediaSource.readyState==="open")try{ne.abort()}catch(At){C.e(this.TAG,At.message)}this._idrList.clear();var se=this._pendingSegments[Z];if(se.splice(0,se.length),this._mediaSource.readyState==="closed")continue;for(var Te=0;Te<ne.buffered.length;Te++){var Ge=ne.buffered.start(Te),Ze=ne.buffered.end(Te);this._pendingRemoveRanges[Z].push({start:Ge,end:Ze})}if(ne.updating||this._doRemoveRanges(),m.safari){var bt=this._lastInitSegments[Z];bt&&(this._pendingSegments[Z].push(bt),ne.updating||this._doAppendSegments())}}}},{key:"endOfStream",value:function(){var G=this._mediaSource,Z=this._sourceBuffers;if(!G||G.readyState!=="open"){G&&G.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}Z.video&&Z.video.updating||Z.audio&&Z.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,G.endOfStream())}},{key:"getNearestKeyframe",value:function(G){return this._idrList.getLastSyncPointBeforeDts(G)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var G=this._mediaElement.currentTime;for(var Z in this._sourceBuffers){var ne=this._sourceBuffers[Z];if(ne){var se=ne.buffered;if(se.length>=1&&G-se.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var G=this._mediaElement.currentTime;for(var Z in this._sourceBuffers){var ne=this._sourceBuffers[Z];if(ne){for(var se=ne.buffered,Te=!1,Ge=0;Ge<se.length;Ge++){var Ze=se.start(Ge),bt=se.end(Ge);if(Ze<=G&&G<bt+3){if(G-Ze>=this._config.autoCleanupMaxBackwardDuration){Te=!0;var At=G-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[Z].push({start:Ze,end:At})}}else bt<G&&(Te=!0,this._pendingRemoveRanges[Z].push({start:Ze,end:bt}))}Te&&!ne.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var G=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open")return;if(G.video&&G.video.updating||G.audio&&G.audio.updating)return;var Z=this._mediaSource.duration,ne=this._pendingMediaDuration;ne>0&&(isNaN(Z)||ne>Z)&&(C.v(this.TAG,"Update MediaSource duration from ".concat(Z," to ").concat(ne)),this._mediaSource.duration=ne),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},{key:"_doRemoveRanges",value:function(){for(var G in this._pendingRemoveRanges){if(!this._sourceBuffers[G]||this._sourceBuffers[G].updating)continue;for(var Z=this._sourceBuffers[G],ne=this._pendingRemoveRanges[G];ne.length&&!Z.updating;){var se=ne.shift();Z.remove(se.start,se.end)}}}},{key:"_doAppendSegments",value:function(){var G=this._pendingSegments;for(var Z in G){if(!this._sourceBuffers[Z]||this._sourceBuffers[Z].updating)continue;if(G[Z].length>0){var ne=G[Z].shift();if(ne.timestampOffset){var se=this._sourceBuffers[Z].timestampOffset,Te=ne.timestampOffset/1e3,Ge=Math.abs(se-Te);Ge>.1&&(C.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(se," to ").concat(Te)),this._sourceBuffers[Z].timestampOffset=Te),delete ne.timestampOffset}if(!ne.data||ne.data.byteLength===0)continue;try{this._sourceBuffers[Z].appendBuffer(ne.data),this._isBufferFull=!1,Z==="video"&&ne.hasOwnProperty("info")&&this._idrList.appendArray(ne.info.syncPoints)}catch(Ze){this._pendingSegments[Z].unshift(ne),Ze.code===22?(this._isBufferFull||this._emitter.emit(st.BUFFER_FULL),this._isBufferFull=!0):(C.e(this.TAG,Ze.message),this._emitter.emit(st.ERROR,{code:Ze.code,msg:Ze.message}))}}}}},{key:"_onSourceOpen",value:function(){if(C.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var G=this._pendingSourceBufferInit;G.length;){var Z=G.shift();this.appendInitSegment(Z,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(st.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){C.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){C.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var G=this._pendingSegments;return G.video.length>0||G.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var G=this._pendingRemoveRanges;return G.video.length>0||G.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(st.UPDATE_END)}},{key:"_onSourceBufferError",value:function(G){C.e(this.TAG,"SourceBuffer Error: ".concat(G))}}]),Se}(),$e=ut,xe={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Fe={NETWORK_EXCEPTION:r.EXCEPTION,NETWORK_STATUS_CODE_INVALID:r.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:r.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:r.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:X.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:X.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:X.CODEC_UNSUPPORTED},ct=function(){function Se(fe,G){if(Object(ae.a)(this,Se),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new S.a,this._config=re(),typeof G=="object"&&Object.assign(this._config,G),fe.type.toLowerCase()!=="flv")throw new i("FlvPlayer requires an flv MediaDataSource input!");fe.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=fe,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var Z=m.chrome&&(m.version.major<50||m.version.major===50&&m.version.build<2661);this._alwaysSeekKeyframe=!!(Z||m.msedge||m.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(ee.a)(Se,[{key:"destroy",value:function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(G,Z){var ne=this;G===Ee.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){ne._emitter.emit(Ee.MEDIA_INFO,ne.mediaInfo)}):G===Ee.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){ne._emitter.emit(Ee.STATISTICS_INFO,ne.statisticsInfo)})),this._emitter.addListener(G,Z)}},{key:"off",value:function(G,Z){this._emitter.removeListener(G,Z)}},{key:"attachMediaElement",value:function(G){var Z=this;if(this._mediaElement=G,G.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),G.addEventListener("seeking",this.e.onvSeeking),G.addEventListener("canplay",this.e.onvCanPlay),G.addEventListener("stalled",this.e.onvStalled),G.addEventListener("progress",this.e.onvProgress),this._msectl=new $e(this._config),this._msectl.on(st.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(st.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(st.SOURCE_OPEN,function(){Z._mseSourceOpened=!0,Z._hasPendingLoad&&(Z._hasPendingLoad=!1,Z.load())}),this._msectl.on(st.ERROR,function(ne){Z._emitter.emit(Ee.ERROR,xe.MEDIA_ERROR,Fe.MEDIA_MSE_ERROR,ne)}),this._msectl.attachMediaElement(G),this._pendingSeekTime!=null)try{G.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(ne){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var G=this;if(!this._mediaElement)throw new o("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new o("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Rt(this._mediaDataSource,this._config),this._transmuxer.on(we.INIT_SEGMENT,function(Z,ne){G._msectl.appendInitSegment(ne)}),this._transmuxer.on(we.MEDIA_SEGMENT,function(Z,ne){if(G._msectl.appendMediaSegment(ne),G._config.lazyLoad&&!G._config.isLive){var se=G._mediaElement.currentTime;ne.info.endDts>=(se+G._config.lazyLoadMaxDuration)*1e3&&(G._progressChecker==null&&(C.v(G.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),G._suspendTransmuxer()))}}),this._transmuxer.on(we.LOADING_COMPLETE,function(){G._msectl.endOfStream(),G._emitter.emit(Ee.LOADING_COMPLETE)}),this._transmuxer.on(we.RECOVERED_EARLY_EOF,function(){G._emitter.emit(Ee.RECOVERED_EARLY_EOF)}),this._transmuxer.on(we.IO_ERROR,function(Z,ne){G._emitter.emit(Ee.ERROR,xe.NETWORK_ERROR,Z,ne)}),this._transmuxer.on(we.DEMUX_ERROR,function(Z,ne){G._emitter.emit(Ee.ERROR,xe.MEDIA_ERROR,Z,{code:-1,msg:ne})}),this._transmuxer.on(we.MEDIA_INFO,function(Z){G._mediaInfo=Z,G._emitter.emit(Ee.MEDIA_INFO,Object.assign({},Z))}),this._transmuxer.on(we.METADATA_ARRIVED,function(Z){G._emitter.emit(Ee.METADATA_ARRIVED,Z)}),this._transmuxer.on(we.SCRIPTDATA_ARRIVED,function(Z){G._emitter.emit(Ee.SCRIPTDATA_ARRIVED,Z)}),this._transmuxer.on(we.STATISTICS_INFO,function(Z){G._statisticsInfo=G._fillStatisticsInfo(Z),G._emitter.emit(Ee.STATISTICS_INFO,Object.assign({},G._statisticsInfo))}),this._transmuxer.on(we.RECOMMEND_SEEKPOINT,function(Z){G._mediaElement&&!G._config.accurateSeek&&(G._requestSetTime=!0,G._mediaElement.currentTime=Z/1e3)}),this._transmuxer.open()}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(G){this._mediaElement.volume=G}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(G){this._mediaElement.muted=G}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(G){this._mediaElement?this._internalSeek(G):this._pendingSeekTime=G}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(G){if(G.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return G;var Z=!0,ne=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var Te=this._mediaElement.getVideoPlaybackQuality();ne=Te.totalVideoFrames,se=Te.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ne=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):Z=!1;return Z&&(G.decodedFrames=ne,G.droppedFrames=se),G}},{key:"_onmseUpdateEnd",value:function(){if(!this._config.lazyLoad||this._config.isLive)return;for(var G=this._mediaElement.buffered,Z=this._mediaElement.currentTime,ne=0,se=0,Te=0;Te<G.length;Te++){var Ge=G.start(Te),Ze=G.end(Te);if(Ge<=Z&&Z<Ze){ne=Ge,se=Ze;break}}se>=Z+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(C.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},{key:"_onmseBufferFull",value:function(){C.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var G=this._mediaElement.currentTime,Z=this._mediaElement.buffered,ne=!1,se=0;se<Z.length;se++){var Te=Z.start(se),Ge=Z.end(se);if(G>=Te&&G<Ge){G>=Ge-this._config.lazyLoadRecoverDuration&&(ne=!0);break}}ne&&(window.clearInterval(this._progressChecker),this._progressChecker=null,ne&&(C.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(G){for(var Z=this._mediaElement.buffered,ne=0;ne<Z.length;ne++){var se=Z.start(ne),Te=Z.end(ne);if(G>=se&&G<Te)return!0}return!1}},{key:"_internalSeek",value:function(G){var Z=this._isTimepointBuffered(G),ne=!1,se=0;if(G<1&&this._mediaElement.buffered.length>0){var Te=this._mediaElement.buffered.start(0);(Te<1&&G<Te||m.safari)&&(ne=!0,se=m.safari?.1:Te)}if(ne)this._requestSetTime=!0,this._mediaElement.currentTime=se;else if(Z){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=G;else{var Ge=this._msectl.getNearestKeyframe(Math.floor(G*1e3));this._requestSetTime=!0,Ge!=null?this._mediaElement.currentTime=Ge.dts/1e3:this._mediaElement.currentTime=G}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(G),this._transmuxer.seek(Math.floor(G*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=G)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var G=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(G)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(G),this._transmuxer.seek(Math.floor(G*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=G))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(G){var Z=this._mediaElement;if(G||!this._receivedCanPlay||Z.readyState<2){var ne=Z.buffered;ne.length>0&&Z.currentTime<ne.start(0)&&(C.w(this.TAG,"Playback seems stuck at ".concat(Z.currentTime,", seek to ").concat(ne.start(0))),this._requestSetTime=!0,this._mediaElement.currentTime=ne.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(G){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(G){var Z=this._mediaElement.currentTime,ne=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(Z<1&&ne.length>0){var se=ne.start(0);if(se<1&&Z<se||m.safari){this._requestSetTime=!0,this._mediaElement.currentTime=m.safari?.1:se;return}}if(this._isTimepointBuffered(Z)){if(this._alwaysSeekKeyframe){var Te=this._msectl.getNearestKeyframe(Math.floor(Z*1e3));Te!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=Te.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:Z,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_onvCanPlay",value:function(G){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(G){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(G){this._checkAndResumeStuckPlayback()}}]),Se}(),tt=ct,wt=function(){function Se(fe,G){if(Object(ae.a)(this,Se),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new S.a,this._config=re(),typeof G=="object"&&Object.assign(this._config,G),fe.type.toLowerCase()==="flv")throw new i("NativePlayer does't support flv MediaDataSource input!");if(fe.hasOwnProperty("segments"))throw new i("NativePlayer(".concat(fe.type,") doesn't support multipart playback!"));this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=fe,this._mediaElement=null}return Object(ee.a)(Se,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(G,Z){var ne=this;G===Ee.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){ne._emitter.emit(Ee.MEDIA_INFO,ne.mediaInfo)}):G===Ee.STATISTICS_INFO&&(this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){ne._emitter.emit(Ee.STATISTICS_INFO,ne.statisticsInfo)})),this._emitter.addListener(G,Z)}},{key:"off",value:function(G,Z){this._emitter.removeListener(G,Z)}},{key:"attachMediaElement",value:function(G){if(this._mediaElement=G,G.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{G.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Z){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new o("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(G){this._mediaElement.volume=G}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(G){this._mediaElement.muted=G}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(G){this._mediaElement?this._mediaElement.currentTime=G:this._pendingSeekTime=G}},{key:"mediaInfo",get:function(){var G=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",Z={mimeType:G+this._mediaDataSource.type};return this._mediaElement&&(Z.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(Z.width=this._mediaElement.videoWidth,Z.height=this._mediaElement.videoHeight)),Z}},{key:"statisticsInfo",get:function(){var G={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return G;var Z=!0,ne=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var Te=this._mediaElement.getVideoPlaybackQuality();ne=Te.totalVideoFrames,se=Te.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ne=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):Z=!1;return Z&&(G.decodedFrames=ne,G.droppedFrames=se),G}},{key:"_onvLoadedMetadata",value:function(G){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Ee.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(Ee.STATISTICS_INFO,this.statisticsInfo)}}]),Se}(),St=wt;O.install();function Qe(Se,fe){var G=Se;if(G==null||typeof G!="object")throw new i("MediaDataSource must be an javascript object!");if(!G.hasOwnProperty("type"))throw new i("MediaDataSource must has type field to indicate video file type!");switch(G.type){case"flv":return new tt(G,fe);default:return new St(G,fe)}}function lt(){return me.supportMSEH264Playback()}function xt(){return me.getFeatureList()}var Pt={};Pt.createPlayer=Qe,Pt.isSupported=lt,Pt.getFeatureList=xt,Pt.BaseLoader=t,Pt.LoaderStatus=a,Pt.LoaderErrors=r,Pt.Events=Ee,Pt.ErrorTypes=xe,Pt.ErrorDetails=Fe,Pt.FlvPlayer=tt,Pt.NativePlayer=St,Pt.LoggingControl=be,Object.defineProperty(Pt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var zt=We.a=Pt},GgEA:function(Ye,We,z){},Gytx:function(Ye,We){Ye.exports=function(ae,ee,B,O){var D=B?B.call(O,ae,ee):void 0;if(D!==void 0)return!!D;if(ae===ee)return!0;if(typeof ae!="object"||!ae||typeof ee!="object"||!ee)return!1;var S=Object.keys(ae),A=Object.keys(ee);if(S.length!==A.length)return!1;for(var C=Object.prototype.hasOwnProperty.bind(ee),h=0;h<S.length;h++){var p=S[h];if(!C(p))return!1;var c=ae[p],s=ee[p];if(D=B?B.call(O,c,s,p):void 0,D===!1||D===void 0&&c!==s)return!1}return!0}},HmJG:function(Ye,We,z){},Hw79:function(Ye,We,z){Ye.exports={pagination:"pagination___2VQzP",info:"info___1saw2"}},I8Z2:function(Ye,We,z){"use strict";z.d(We,"a",function(){return O}),z.d(We,"b",function(){return n}),z.d(We,"c",function(){return i});var ae=z("cDcd"),ee=function(){var l=function(a,r){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,d){t.__proto__=d}||function(t,d){for(var v in d)d.hasOwnProperty(v)&&(t[v]=d[v])},l(a,r)};return function(a,r){l(a,r);function t(){this.constructor=a}a.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}(),B=ae.createContext(null),O=function(l){ee(a,l);function a(){return l!==null&&l.apply(this,arguments)||this}return a.prototype.render=function(){return ae.createElement(B.Provider,{value:this.props.store},this.props.children)},a}(ae.Component),D=z("Gytx"),S=z.n(D),A=z("2mql"),C=z.n(A),h=function(){var l=function(a,r){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,d){t.__proto__=d}||function(t,d){for(var v in d)d.hasOwnProperty(v)&&(t[v]=d[v])},l(a,r)};return function(a,r){l(a,r);function t(){this.constructor=a}a.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}(),p=function(){return p=Object.assign||function(l){for(var a,r=1,t=arguments.length;r<t;r++){a=arguments[r];for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(l[d]=a[d])}return l},p.apply(this,arguments)};function c(l){return l.displayName||l.name||"Component"}var s=function(){return{}};function n(l,a){a===void 0&&(a={});var r=!!l,t=l||s;return function(v){var y=function(g){h(m,g);function m(_,x){var f=g.call(this,_,x)||this;return f.unsubscribe=null,f.handleChange=function(){if(!f.unsubscribe)return;var E=t(f.store.getState(),f.props);f.setState({subscribed:E})},f.store=f.context,f.state={subscribed:t(f.store.getState(),_),store:f.store,props:_},f}return m.getDerivedStateFromProps=function(_,x){return l&&l.length===2&&_!==x.props?{subscribed:t(x.store.getState(),_),props:_}:{props:_}},m.prototype.componentDidMount=function(){this.trySubscribe()},m.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},m.prototype.shouldComponentUpdate=function(_,x){return!S()(this.props,_)||!S()(this.state.subscribed,x.subscribed)},m.prototype.trySubscribe=function(){r&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},m.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},m.prototype.render=function(){var _=p(p(p({},this.props),this.state.subscribed),{store:this.store});return ae.createElement(v,p({},_,{ref:this.props.miniStoreForwardedRef}))},m.displayName="Connect("+c(v)+")",m.contextType=B,m}(ae.Component);if(a.forwardRef){var b=ae.forwardRef(function(g,m){return ae.createElement(y,p({},g,{miniStoreForwardedRef:m}))});return C()(b,v)}return C()(y,v)}}var o=function(){return o=Object.assign||function(l){for(var a,r=1,t=arguments.length;r<t;r++){a=arguments[r];for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(l[d]=a[d])}return l},o.apply(this,arguments)};function i(l){var a=l,r=[];function t(y){a=o(o({},a),y);for(var b=0;b<r.length;b++)r[b]()}function d(){return a}function v(y){return r.push(y),function(){var g=r.indexOf(y);r.splice(g,1)}}return{setState:t,getState:d,subscribe:v}}},IBYe:function(Ye,We,z){"use strict";function ae(ee){return null}We.a=ae},IxHN:function(Ye,We,z){"use strict";var ae=z("cDcd"),ee=z.n(ae),B=z("07cG"),O=z.n(B);We.a=function(D){var S=D.message,A=D.className,C=D.children,h=D.style,p=h===void 0?{}:h;return ee.a.createElement("div",{className:"".concat(O.a.idsRingWrapper," ").concat(A)},ee.a.createElement("div",{className:O.a.ldsRing},ee.a.createElement("div",null),ee.a.createElement("div",null),ee.a.createElement("div",null),ee.a.createElement("div",null)),S?ee.a.createElement("p",{style:p},S):null,C)}},J66h:function(Ye,We,z){(function(ae){var ee,B;(function(O,D){Ye.exports=D(O)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ae!="undefined"?ae:this,function(O){"use strict";O=O||{};var D=O.Base64,S="2.6.4",A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C=function(R){for(var N={},j=0,W=R.length;j<W;j++)N[R.charAt(j)]=j;return N}(A),h=String.fromCharCode,p=function(R){if(R.length<2){var N=R.charCodeAt(0);return N<128?R:N<2048?h(192|N>>>6)+h(128|N&63):h(224|N>>>12&15)+h(128|N>>>6&63)+h(128|N&63)}else{var N=65536+(R.charCodeAt(0)-55296)*1024+(R.charCodeAt(1)-56320);return h(240|N>>>18&7)+h(128|N>>>12&63)+h(128|N>>>6&63)+h(128|N&63)}},c=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(R){return R.replace(c,p)},n=function(R){var N=[0,2,1][R.length%3],j=R.charCodeAt(0)<<16|(R.length>1?R.charCodeAt(1):0)<<8|(R.length>2?R.charCodeAt(2):0),W=[A.charAt(j>>>18),A.charAt(j>>>12&63),N>=2?"=":A.charAt(j>>>6&63),N>=1?"=":A.charAt(j&63)];return W.join("")},o=O.btoa&&typeof O.btoa=="function"?function(R){return O.btoa(R)}:function(R){if(R.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return R.replace(/[\s\S]{1,3}/g,n)},i=function(R){return o(s(String(R)))},l=function(R){return R.replace(/[+\/]/g,function(N){return N=="+"?"-":"_"}).replace(/=/g,"")},a=function(R,N){return N?l(i(R)):i(R)},r=function(R){return a(R,!0)},t;O.Uint8Array&&(t=function(R,N){for(var j="",W=0,J=R.length;W<J;W+=3){var F=R[W],k=R[W+1],K=R[W+2],Y=F<<16|k<<8|K;j+=A.charAt(Y>>>18)+A.charAt(Y>>>12&63)+(typeof k!="undefined"?A.charAt(Y>>>6&63):"=")+(typeof K!="undefined"?A.charAt(Y&63):"=")}return N?l(j):j});var d=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,v=function(R){switch(R.length){case 4:var N=(7&R.charCodeAt(0))<<18|(63&R.charCodeAt(1))<<12|(63&R.charCodeAt(2))<<6|63&R.charCodeAt(3),j=N-65536;return h((j>>>10)+55296)+h((j&1023)+56320);case 3:return h((15&R.charCodeAt(0))<<12|(63&R.charCodeAt(1))<<6|63&R.charCodeAt(2));default:return h((31&R.charCodeAt(0))<<6|63&R.charCodeAt(1))}},y=function(R){return R.replace(d,v)},b=function(R){var N=R.length,j=N%4,W=(N>0?C[R.charAt(0)]<<18:0)|(N>1?C[R.charAt(1)]<<12:0)|(N>2?C[R.charAt(2)]<<6:0)|(N>3?C[R.charAt(3)]:0),J=[h(W>>>16),h(W>>>8&255),h(W&255)];return J.length-=[0,0,2,1][j],J.join("")},g=O.atob&&typeof O.atob=="function"?function(R){return O.atob(R)}:function(R){return R.replace(/\S{1,4}/g,b)},m=function(R){return g(String(R).replace(/[^A-Za-z0-9\+\/]/g,""))},_=function(R){return y(g(R))},x=function(R){return String(R).replace(/[-_]/g,function(N){return N=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},f=function(R){return _(x(R))},E;O.Uint8Array&&(E=function(R){return Uint8Array.from(m(x(R)),function(N){return N.charCodeAt(0)})});var w=function(){var R=O.Base64;return O.Base64=D,R};if(O.Base64={VERSION:S,atob:m,btoa:o,fromBase64:f,toBase64:a,utob:s,encode:a,encodeURI:r,btou:y,decode:f,noConflict:w,fromUint8Array:t,toUint8Array:E},typeof Object.defineProperty=="function"){var T=function(R){return{value:R,enumerable:!1,writable:!0,configurable:!0}};O.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",T(function(){return f(this)})),Object.defineProperty(String.prototype,"toBase64",T(function(R){return a(this,R)})),Object.defineProperty(String.prototype,"toBase64URI",T(function(){return a(this,!0)}))}}return O.Meteor&&(Base64=O.Base64),Ye.exports?Ye.exports.Base64=O.Base64:!(ee=[],B=function(){return O.Base64}.apply(We,ee),B!==void 0&&(Ye.exports=B)),{Base64:O.Base64}})}).call(this,z("IyRk"))},JOrW:function(Ye,We,z){Ye.exports=z.p+"static/gf.09d89ab3.svg"},LdHM:function(Ye,We,z){"use strict";z.d(We,"b",function(){return d}),z.d(We,"a",function(){return y});var ae=z("1OyB"),ee=z("vuIU"),B=z("Ji7U"),O=z("LK+K"),D=z("cDcd"),S=z("rePB"),A=z("Ff2n"),C=z("ODXe"),h=z("4IlW"),p=z("bX4T"),c=z("YrtM"),s=z("TSYQ"),n=z.n(s),o=z("+nKL"),i=z("8OUc"),l=function(K,Y){var H=K.prefixCls,Q=K.id,re=K.flattenOptions,oe=K.childrenAsData,me=K.values,he=K.searchValue,Ee=K.multiple,de=K.defaultActiveFirstOption,be=K.height,Ue=K.itemHeight,Re=K.notFoundContent,De=K.open,je=K.menuItemSelectedIcon,ve=K.virtual,ce=K.onSelect,ke=K.onToggleOpen,Ne=K.onActiveValue,Je=K.onScroll,te=K.onMouseEnter,P="".concat(H,"-item"),U=Object(c.a)(function(){return re},[De,re],function(Ke,Pe){return Pe[0]&&Ke[1]!==Pe[1]}),q=D.useRef(null),X=function(Pe){Pe.preventDefault()},$=function(Pe){q.current&&q.current.scrollTo({index:Pe})},ge=function(Pe){for(var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ce=U.length,pe=0;pe<Ce;pe+=1){var _e=(Pe+pe*Ie+Ce)%Ce,Oe=U[_e],we=Oe.group,Be=Oe.data;if(!we&&!Be.disabled)return _e}return-1},Ae=D.useState(function(){return ge(0)}),at=Object(C.a)(Ae,2),Le=at[0],Me=at[1],Xe=function(Pe){Me(Pe);var Ie=U[Pe];if(!Ie){Ne(null,-1);return}Ne(Ie.data.value,Pe)};D.useEffect(function(){Xe(de!==!1?ge(0):-1)},[U.length,he]),D.useEffect(function(){var Ke=setTimeout(function(){if(!Ee&&De&&me.size===1){var Pe=Array.from(me)[0],Ie=U.findIndex(function(Ce){var pe=Ce.data;return pe.value===Pe});Xe(Ie),$(Ie)}});return function(){return clearTimeout(Ke)}},[De]);var et=function(Pe){Pe!==void 0&&ce(Pe,{selected:!me.has(Pe)}),Ee||ke(!1)};if(D.useImperativeHandle(Y,function(){return{onKeyDown:function(Pe){var Ie=Pe.which;switch(Ie){case h.a.UP:case h.a.DOWN:{var Ce=0;if(Ie===h.a.UP?Ce=-1:Ie===h.a.DOWN&&(Ce=1),Ce!==0){var pe=ge(Le+Ce,Ce);$(pe),Xe(pe)}break}case h.a.ENTER:{var _e=U[Le];_e&&!_e.data.disabled?et(_e.data.value):et(void 0),De&&Pe.preventDefault();break}case h.a.ESC:ke(!1)}},onKeyUp:function(){},scrollTo:function(Pe){$(Pe)}}}),U.length===0)return D.createElement("div",{role:"listbox",id:"".concat(Q,"_list"),className:"".concat(P,"-empty"),onMouseDown:X},Re);function ze(Ke){var Pe=U[Ke];if(!Pe)return null;var Ie=Pe.data||{},Ce=Ie.value,pe=Ie.label,_e=Ie.children,Oe=Object(p.a)(Ie,!0),we=oe?_e:pe;return Pe?D.createElement("div",Object.assign({"aria-label":typeof we=="string"?we:null},Oe,{key:Ke,role:"option",id:"".concat(Q,"_list_").concat(Ke),"aria-selected":me.has(Ce)}),Ce):null}return D.createElement(D.Fragment,null,D.createElement("div",{role:"listbox",id:"".concat(Q,"_list"),style:{height:0,width:0,overflow:"hidden"}},ze(Le-1),ze(Le),ze(Le+1)),D.createElement(o.a,{itemKey:"key",ref:q,data:U,height:be,itemHeight:Ue,fullHeight:!1,onMouseDown:X,onScroll:Je,virtual:ve,onMouseEnter:te},function(Ke,Pe){var Ie,Ce=Ke.group,pe=Ke.groupOption,_e=Ke.data,Oe=_e.label,we=_e.key;if(Ce)return D.createElement("div",{className:n()(P,"".concat(P,"-group"))},Oe!==void 0?Oe:we);var Be=_e.disabled,qe=_e.value,dt=_e.title,Et=_e.children,It=_e.style,Rt=_e.className,Ct=Object(A.a)(_e,["disabled","value","title","children","style","className"]),st=me.has(qe),ut="".concat(P,"-option"),$e=n()(P,ut,Rt,(Ie={},Object(S.a)(Ie,"".concat(ut,"-grouped"),pe),Object(S.a)(Ie,"".concat(ut,"-active"),Le===Pe&&!Be),Object(S.a)(Ie,"".concat(ut,"-disabled"),Be),Object(S.a)(Ie,"".concat(ut,"-selected"),st),Ie)),xe=oe?Et:Oe,Fe=!je||typeof je=="function"||st;return D.createElement("div",Object.assign({},Ct,{"aria-selected":st,className:$e,title:dt,onMouseMove:function(){if(Le===Pe||Be)return;Xe(Pe)},onClick:function(){Be||et(qe)},style:It}),D.createElement("div",{className:"".concat(ut,"-content")},xe||qe),D.isValidElement(je)||st,Fe&&D.createElement(i.a,{className:"".concat(P,"-option-state"),customizeIcon:je,customizeIconProps:{isSelected:st}},st?"\u2713":null))}))},a=D.forwardRef(l);a.displayName="OptionList";var r=a,t=function(){return null};t.isSelectOption=!0;var d=t,v=function(){return null};v.isSelectOptGroup=!0;var y=v,b=z("VTBJ"),g=z("Zm9Q");function m(k){var K=k.key,Y=k.props,H=Y.children,Q=Y.value,re=Object(A.a)(Y,["children","value"]);return Object(b.a)({key:K,value:Q!==void 0?Q:K,children:H},re)}function _(k){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(g.a)(k).map(function(Y,H){if(!D.isValidElement(Y)||!Y.type)return null;var Q=Y.type.isSelectOptGroup,re=Y.key,oe=Y.props,me=oe.children,he=Object(A.a)(oe,["children"]);return K||!Q?m(Y):Object(b.a)(Object(b.a)({key:"__RC_SELECT_GRP__".concat(re===null?H:re,"__"),label:re},he),{},{options:_(me)})}).filter(function(Y){return Y})}var x=z("2Qr1"),f=z("qNPg"),E=z("U8pU"),w=z("Kwbf"),T=z("WKfj");function R(k){var K=k.mode,Y=k.options,H=k.children,Q=k.backfill,re=k.allowClear,oe=k.placeholder,me=k.getInputElement,he=k.showSearch,Ee=k.onSearch,de=k.defaultOpen,be=k.autoFocus,Ue=k.labelInValue,Re=k.value,De=k.inputValue,je=k.optionLabelProp,ve=K==="multiple"||K==="tags",ce=he!==void 0?he:ve||K==="combobox",ke=Y||_(H);if(Object(w.a)(K!=="tags"||ke.every(function(P){return!P.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),K==="tags"||K==="combobox"){var Ne=ke.some(function(P){return P.options?P.options.some(function(U){return typeof("value"in U?U.value:U.key)=="number"}):typeof("value"in P?P.value:P.key)=="number"});Object(w.a)(!Ne,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(w.a)(K!=="combobox"||!je,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(w.a)(K==="combobox"||!Q,"`backfill` only works with `combobox` mode."),Object(w.a)(K==="combobox"||!me,"`getInputElement` only work with `combobox` mode."),Object(w.b)(K!=="combobox"||!me||!re||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ee&&!ce&&K!=="combobox"&&K!=="tags"&&Object(w.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(w.b)(!de||be,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Re!=null){var Je=Object(T.d)(Re);Object(w.a)(!Ue||Je.every(function(P){return Object(E.a)(P)==="object"&&("key"in P||"value"in P)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(w.a)(!ve||Array.isArray(Re),"`value` should be array when `mode` is `multiple` or `tags`")}if(H){var te=null;Object(g.a)(H).some(function(P){if(!D.isValidElement(P)||!P.type)return!1;var U=P.type;if(U.isSelectOption)return!1;if(U.isSelectOptGroup){var q=Object(g.a)(P.props.children).every(function(X){return!D.isValidElement(X)||!P.type||X.type.isSelectOption?!0:(te=X.type,!1)});return!q}return te=U,!0}),te&&Object(w.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(te.displayName||te.name||te,"`.")),Object(w.a)(De===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var N=R,j=Object(f.a)({prefixCls:"rc-select",components:{optionList:r},convertChildrenToData:_,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:N,fillOptionsWithMissingValue:x.a}),W=function(k){Object(B.a)(Y,k);var K=Object(O.a)(Y);function Y(){var H;return Object(ae.a)(this,Y),H=K.apply(this,arguments),H.selectRef=D.createRef(),H.focus=function(){H.selectRef.current.focus()},H.blur=function(){H.selectRef.current.blur()},H}return Object(ee.a)(Y,[{key:"render",value:function(){return D.createElement(j,Object.assign({ref:this.selectRef},this.props))}}]),Y}(D.Component);W.Option=d,W.OptGroup=y;var J=W,F=We.c=J},M8RZ:function(Ye,We,z){"use strict";z.d(We,"a",function(){return h});var ae=z("fWQN"),ee=z("mtLc"),B=z("yKVA"),O=z("879j"),D=z("cDcd"),S=z.n(D),A=z("faye"),C=z.n(A),h=function(p){Object(B.a)(s,p);var c=Object(O.a)(s);function s(n){var o;Object(ae.a)(this,s),o=c.call(this,n);var i=window.document;return o.node=i.createElement("div"),i.body.appendChild(o.node),o}return Object(ee.a)(s,[{key:"render",value:function(){var o=this.props.children;return Object(A.createPortal)(o,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),s}(S.a.Component)},MFOe:function(Ye,We,z){(function(ae){var ee=S(),B=A(),O=C(),D=typeof window!="undefined"?window:ae;Ye.exports={assign:ee,create:B,trim:O,bind:h,slice:p,each:c,map:s,pluck:n,isList:o,isFunction:i,isObject:l,Global:D};function S(){return Object.assign?Object.assign:function(r,t,d,v){for(var y=1;y<arguments.length;y++)c(Object(arguments[y]),function(b,g){r[g]=b});return r}}function A(){if(Object.create)return function(t,d,v,y){var b=p(arguments,1);return ee.apply(this,[Object.create(t)].concat(b))};{function a(){}return function(t,d,v,y){var b=p(arguments,1);return a.prototype=t,ee.apply(this,[new a].concat(b))}}}function C(){return String.prototype.trim?function(r){return String.prototype.trim.call(r)}:function(r){return r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function h(a,r){return function(){return r.apply(a,Array.prototype.slice.call(arguments,0))}}function p(a,r){return Array.prototype.slice.call(a,r||0)}function c(a,r){n(a,function(t,d){return r(t,d),!1})}function s(a,r){var t=o(a)?[]:{};return n(a,function(d,v){return t[v]=r(d,v),!1}),t}function n(a,r){if(o(a)){for(var t=0;t<a.length;t++)if(r(a[t],t))return a[t]}else for(var d in a)if(a.hasOwnProperty(d)&&r(a[d],d))return a[d]}function o(a){return a!=null&&typeof a!="function"&&typeof a.length=="number"}function i(a){return a&&{}.toString.call(a)==="[object Function]"}function l(a){return a&&{}.toString.call(a)==="[object Object]"}}).call(this,z("IyRk"))},MVJL:function(Ye,We,z){Ye.exports={flex_box_center:"flex_box_center___2gBaY",flex_space_between:"flex_space_between___2uD--",flex_box_vertical_center:"flex_box_vertical_center___3Bq-4",flex_box_center_end:"flex_box_center_end___2MOXm",flex_box_column:"flex_box_column___1Sq4x",discussItem:"discussItem___Mk503",wrap:"wrap___VPGVq",list:"list___2zNHf",btns:"btns___1hoB3",secondLevelDiscuss:"secondLevelDiscuss___9Ixoa",line:"line___20Ukm",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___3ZS-s"}},NvD2:function(Ye,We,z){"use strict";z.d(We,"a",function(){return S});var ae=z("Kwbf");function ee(A,C){var h=new Set;return A.forEach(function(p){C.has(p)||h.add(p)}),h}function B(A){var C=A||{},h=C.disabled,p=C.disableCheckbox,c=C.checkable;return!!(h||p)||c===!1}function O(A,C,h,p){for(var c=new Set(A),s=new Set,n=0;n<=h;n+=1){var o=C.get(n)||new Set;o.forEach(function(r){var t=r.key,d=r.node,v=r.children,y=v===void 0?[]:v;c.has(t)&&!p(d)&&y.filter(function(b){return!p(b.node)}).forEach(function(b){c.add(b.key)})})}for(var i=new Set,l=h;l>=0;l-=1){var a=C.get(l)||new Set;a.forEach(function(r){var t=r.parent,d=r.node;if(p(d)||!r.parent||i.has(r.parent.key))return;if(p(r.parent.node)){i.add(t.key);return}var v=!0,y=!1;(t.children||[]).filter(function(b){return!p(b.node)}).forEach(function(b){var g=b.key,m=c.has(g);v&&!m&&(v=!1),!y&&(m||s.has(g))&&(y=!0)}),v&&c.add(t.key),y&&s.add(t.key),i.add(t.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(ee(s,c))}}function D(A,C,h,p,c){for(var s=new Set(A),n=new Set(C),o=0;o<=p;o+=1){var i=h.get(o)||new Set;i.forEach(function(t){var d=t.key,v=t.node,y=t.children,b=y===void 0?[]:y;!s.has(d)&&!n.has(d)&&!c(v)&&b.filter(function(g){return!c(g.node)}).forEach(function(g){s.delete(g.key)})})}n=new Set;for(var l=new Set,a=p;a>=0;a-=1){var r=h.get(a)||new Set;r.forEach(function(t){var d=t.parent,v=t.node;if(c(v)||!t.parent||l.has(t.parent.key))return;if(c(t.parent.node)){l.add(d.key);return}var y=!0,b=!1;(d.children||[]).filter(function(g){return!c(g.node)}).forEach(function(g){var m=g.key,_=s.has(m);y&&!_&&(y=!1),!b&&(_||n.has(m))&&(b=!0)}),y||s.delete(d.key),b&&n.add(d.key),l.add(d.key)})}return{checkedKeys:Array.from(s),halfCheckedKeys:Array.from(ee(n,s))}}function S(A,C,h,p){var c=[],s;p?s=p:s=B;var n=new Set(A.filter(function(a){var r=!!h[a];return r||c.push(a),r})),o=new Map,i=0;Object.keys(h).forEach(function(a){var r=h[a],t=r.level,d=o.get(t);d||(d=new Set,o.set(t,d)),d.add(r),i=Math.max(i,t)}),Object(ae.a)(!c.length,"Tree missing follow keys: ".concat(c.slice(0,100).map(function(a){return"'".concat(a,"'")}).join(", ")));var l;return C===!0?l=O(n,o,i,s):l=D(n,C.halfCheckedKeys,o,i,s),l}},OLES:function(Ye,We,z){"use strict";var ae=z("U8pU"),ee=z("VTBJ"),B=z("Ff2n"),O=z("cDcd"),D=z("uciX"),S=z("7ixt"),A=function(n){var o=n.overlay,i=n.prefixCls,l=n.id,a=n.overlayInnerStyle;return O.createElement("div",{className:"".concat(i,"-inner"),id:l,role:"tooltip",style:a},typeof o=="function"?o():o)},C=A,h=function(n,o){var i=n.overlayClassName,l=n.trigger,a=l===void 0?["hover"]:l,r=n.mouseEnterDelay,t=r===void 0?0:r,d=n.mouseLeaveDelay,v=d===void 0?.1:d,y=n.overlayStyle,b=n.prefixCls,g=b===void 0?"rc-tooltip":b,m=n.children,_=n.onVisibleChange,x=n.afterVisibleChange,f=n.transitionName,E=n.animation,w=n.placement,T=w===void 0?"right":w,R=n.align,N=R===void 0?{}:R,j=n.destroyTooltipOnHide,W=j===void 0?!1:j,J=n.defaultVisible,F=n.getTooltipContainer,k=n.overlayInnerStyle,K=Object(B.a)(n,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Y=Object(O.useRef)(null);Object(O.useImperativeHandle)(o,function(){return Y.current});var H=Object(ee.a)({},K);"visible"in n&&(H.popupVisible=n.visible);var Q=function(){var Ee=n.arrowContent,de=Ee===void 0?null:Ee,be=n.overlay,Ue=n.id;return[O.createElement("div",{className:"".concat(g,"-arrow"),key:"arrow"},de),O.createElement(C,{key:"content",prefixCls:g,id:Ue,overlay:be,overlayInnerStyle:k})]},re=!1,oe=!1;if(typeof W=="boolean")re=W;else if(W&&Object(ae.a)(W)==="object"){var me=W.keepParent;re=me===!0,oe=me===!1}return O.createElement(D.a,Object.assign({popupClassName:i,prefixCls:g,popup:Q,action:a,builtinPlacements:S.a,popupPlacement:T,ref:Y,popupAlign:N,getPopupContainer:F,onPopupVisibleChange:_,afterPopupVisibleChange:x,popupTransitionName:f,popupAnimation:E,defaultPopupVisible:J,destroyPopupOnHide:re,autoDestroy:oe,mouseLeaveDelay:v,popupStyle:y,mouseEnterDelay:t},H),m)},p=Object(O.forwardRef)(h),c=We.a=p},OZM5:function(Ye,We,z){"use strict";z.d(We,"b",function(){return p}),z.d(We,"a",function(){return c}),z.d(We,"k",function(){return s}),z.d(We,"h",function(){return n}),z.d(We,"i",function(){return o}),z.d(We,"g",function(){return i}),z.d(We,"c",function(){return l}),z.d(We,"d",function(){return a}),z.d(We,"j",function(){return d}),z.d(We,"e",function(){return v}),z.d(We,"f",function(){return y});var ae=z("KQm4"),ee=z("U8pU"),B=z("Ff2n"),O=z("cDcd"),D=z.n(O),S=z("Kwbf"),A=z("WaYH"),C=.25,h=2;function p(b,g){var m=b.slice(),_=m.indexOf(g);return _>=0&&m.splice(_,1),m}function c(b,g){var m=b.slice();return m.indexOf(g)===-1&&m.push(g),m}function s(b){return b.split("-")}function n(b,g){return"".concat(b,"-").concat(g)}function o(b){return b&&b.type&&b.type.isTreeNode}function i(b,g){var m=[b],_=g[b];function x(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];f.forEach(function(E){var w=E.key,T=E.children;m.push(w),x(T)})}return x(_.children),m}function l(b,g){var m=b.clientY,_=g.selectHandle.getBoundingClientRect(),x=_.top,f=_.bottom,E=_.height,w=Math.max(E*C,h);return m<=x+w?-1:m>=f-w?1:0}function a(b,g){if(!b)return;var m=g.multiple;return m?b.slice():b.length?[b[0]]:b}var r=function(g){return g};function t(b,g){if(!b)return[];var m=g||{},_=m.processProps,x=_===void 0?r:_,f=Array.isArray(b)?b:[b];return f.map(function(E){var w=E.children,T=Object(B.a)(E,["children"]),R=t(w,g);return D.a.createElement(A.a,Object.assign({},x(T)),R)})}function d(b){if(!b)return null;var g;if(Array.isArray(b))g={checkedKeys:b,halfCheckedKeys:void 0};else if(Object(ee.a)(b)==="object")g={checkedKeys:b.checked||void 0,halfCheckedKeys:b.halfChecked||void 0};else return Object(S.a)(!1,"`checkedKeys` is not an array or an object"),null;return g}function v(b,g){var m=new Set;function _(x){if(m.has(x))return;var f=g[x];if(!f)return;m.add(x);var E=f.parent,w=f.node;if(w.disabled)return;E&&_(E.key)}return(b||[]).forEach(function(x){_(x)}),Object(ae.a)(m)}function y(b){var g={};return Object.keys(b).forEach(function(m){(m.startsWith("data-")||m.startsWith("aria-"))&&(g[m]=b[m])}),g}},"OkW/":function(Ye,We,z){},Ot1p:function(Ye,We,z){"use strict";var ae=z("2qtc"),ee=z("kLXV"),B=z("rAM+"),O=z("miYZ"),D=z("tsqr"),S=z("9og8"),A=z("tJVT"),C=z("jrin"),h=z("WmNS"),p=z.n(h),c=z("cDcd"),s=z.n(c),n=z("VrN/"),o=z.n(n),i=z("bdgK"),l=z("p77/"),a=z("Bd2K"),r=z("ELLl"),t=z("19Vz"),d=z("lZu9"),v=z("+NIl"),y=z("kSUc"),b=z("9Bee"),g=function(Be){var qe=Be.value,dt=qe===void 0?"":qe,Et=Be.className,It=Be.showTextOnly,Rt=Be.showLines,Ct=Be.style,st=Ct===void 0?{}:Ct,ut=Object(c.useMemo)(function(){return""},[dt]);return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{dangerouslySetInnerHTML:{__html:ut}}))},m=z("0Owb"),_=z("dejd"),x=z("C+DQ"),f=z("1vsH"),E=z("m3rI"),w=[{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 T(Be){var qe=Be.onActionCallback,dt=Be.title,Et=Be.icon,It=Be.actionName,Rt=Be.className,Ct=Rt===void 0?"":Rt,st=Be.children;function ut(){qe(It)}return s.a.createElement("a",{title:dt,className:Ct,onClick:ut},s.a.createElement("i",{className:"md-iconfont ".concat(Et)}),st)}var R=function(Be){var qe=Be.watch,dt=Be.showNullButton,Et=Be.onActionCallback,It=Be.fullScreen,Rt=Be.insertTemp,Ct=Be.hidetoolBar,st=Be.uuid,ut=Be.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(f.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(f.G)("_educoder_session"),"&key=").concat(st,"&api=").concat(encodeURIComponent(E.a.PROXY_SERVER)));var $e=[].concat(w,[{title:"".concat(qe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(qe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return s.a.createElement("ul",{className:"markdown-toolbar-container"},!Ct&&$e.map(function(xe,Fe){return s.a.createElement("li",{key:Fe},xe.actionName?s.a.createElement(T,Object(m.a)({},xe,{onActionCallback:Et})):s.a.createElement("span",{className:"v-line"}))}),dt?s.a.createElement("li",null,s.a.createElement(T,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Et},s.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Rt&&s.a.createElement("li",null,s.a.createElement(T,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Rt),onActionCallback:Et},s.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),s.a.createElement("li",{className:"btn-full-screen"},s.a.createElement(T,{icon:"".concat(It?"icon-shrink":"icon-enlarge"),title:It?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Et})))},N=z("M8RZ"),j=z("+L6B"),W=z("2/Rp"),J=z("y8nQ"),F=z("Vl3Y"),k=z("5NDa"),K=z("5rEg"),Y={labelCol:{span:4},wrapperCol:{span:20}},H=function(Be){var qe=Be.callback,dt=Be.onCancel;function Et(It){qe(It)}return s.a.createElement(F.a,Object(m.a)({},Y,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Et}),s.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},s.a.createElement(K.a,null)),s.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},s.a.createElement(K.a,null)),s.a.createElement("div",{className:"flex-container flex-end"},s.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),s.a.createElement(W.a,{type:"ghost",onClick:dt},"\u53D6\u6D88")))},Q=z("7ahc"),re=z("HmJG"),oe=z("BjJ7"),me=F.a.useForm,he={width:280,marginRight:10},Ee={labelCol:{span:5},wrapperCol:{span:19}},de=function(Be){var qe=Be.callback,dt=Be.onCancel,Et=me(),It=Object(A.a)(Et,1),Rt=It[0];function Ct($e){qe($e)}function st($e,xe){if($e.status===-1){D.b.error($e.message);return}Rt.setFieldsValue({src:"/api/attachments/".concat($e.id),type:xe.type})}function ut($e){var xe=$e.target.files[0];Ue(xe,st)}return s.a.createElement(F.a,Object(m.a)({form:Rt},Ee,{className:"upload-image-panel",onFinish:Ct}),s.a.createElement(F.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},s.a.createElement("div",{className:"flex-container"},s.a.createElement(F.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},s.a.createElement(K.a,{style:he})),s.a.createElement(be,{onFileChange:ut}))),s.a.createElement(F.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},s.a.createElement(K.a,{style:{width:264}})),s.a.createElement(F.a.Item,{style:{textAlign:"right"}},s.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),s.a.createElement(W.a,{type:"ghost",onClick:dt},"\u53D6\u6D88")))};function be(Be){var qe=Be.onFileChange;return s.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",s.a.createElement("input",{type:"file",onChange:qe}))}function Ue(Be,qe){if(!Be)throw new String("\u6CA1\u6709\u6587\u4EF6");var dt=new FormData;dt.append("editormd-image-file",Be),dt.append("file_param_name","editormd-image-file"),dt.append("byxhr","true");var Et=new window.XMLHttpRequest;Et.withCredentials=!0,Et.addEventListener("load",function(It){qe(JSON.parse(It.target.responseText),Be)},!1),Et.addEventListener("error",function(It){console.error(It)},!1),Et.open("POST","".concat(oe.a,"/api/attachments.json")),Et.send(dt)}var Re=z("giR+"),De=z("fyUT"),je=z("7Kak"),ve=z("9yH6"),ce=ve.a.Group,ke={margin:"0 8px"},Ne=function(Be){var qe=Be.callback,dt=Be.onCancel;function Et(It){qe(It)}return s.a.createElement(F.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Et},s.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},s.a.createElement("span",{style:ke},"\u5355\u5143\u683C\u6570\uFF1A"),s.a.createElement("span",{style:ke},"\u884C\u6570"),s.a.createElement(F.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},s.a.createElement(De.a,null)),s.a.createElement("span",{style:ke},"\u5217\u6570"),s.a.createElement(F.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},s.a.createElement(De.a,null))),s.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},s.a.createElement("span",{style:ke},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),s.a.createElement(F.a.Item,{name:"align"},s.a.createElement(ce,null,s.a.createElement(ve.a,{value:"default"},s.a.createElement("i",{className:"fa fa-align-justify"})),s.a.createElement(ve.a,{value:"left"},s.a.createElement("i",{className:"fa fa-align-left"})),s.a.createElement(ve.a,{value:"center"},s.a.createElement("i",{className:"fa fa-align-center"})),s.a.createElement(ve.a,{value:"right"},s.a.createElement("i",{className:"fa fa-align-right"}))))),s.a.createElement("div",{className:"flex-container flex-end"},s.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),s.a.createElement(W.a,{type:"ghost",onClick:dt},"\u53D6\u6D88")))},Je=z("ErOA"),te=z("7Cbv"),P="link",U="upload-image",q="code-block",X="add-table",$="------------",ge={default:$,left:":".concat($),center:":".concat($,":"),right:"".concat($,":")},Ae=z("9VGf"),at,Le;function Me(){}var Xe=0,et=1e4,ze="\u2581",Ke=`
|
|
|
**\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 Pe(Be){return/^\d+$/.test(Be)?"".concat(Be,"px"):Be}var Ie=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ce=Ie?"Cmd":"Ctrl",pe=["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"],_e=(at={},Object(C.a)(at,Ce+"-B","bold"),Object(C.a)(at,Ce+"-I","italic"),at),Oe=(Le={},Object(C.a)(Le,P,"\u6DFB\u52A0\u94FE\u63A5"),Object(C.a)(Le,q,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(C.a)(Le,U,"\u6DFB\u52A0\u6587\u4EF6"),Object(C.a)(Le,X,"\u6DFB\u52A0\u8868\u683C"),Le),we=We.a=function(Be){var qe=Be.defaultValue,dt=qe===void 0?"":qe,Et=Be.onChange,It=Be.width,Rt=It===void 0?"100%":It,Ct=Be.height,st=Ct===void 0?400:Ct,ut=Be.miniToolbar,$e=ut===void 0?!1:ut,xe=Be.isFocus,Fe=xe===void 0?!1:xe,ct=Be.watch,tt=Be.insertTemp,wt=Be.mode,St=wt===void 0?"markdown":wt,Qe=Be.id,lt=Qe===void 0?"markdown-editor-id":Qe,xt=Be.showResizeBar,Pt=xt===void 0?!1:xt,zt=Be.noStorage,Se=zt===void 0?!1:zt,fe=Be.showNullButton,G=fe===void 0?!1:fe,Z=Be.hidetoolBar,ne=Z===void 0?!1:Z,se=Be.fullScreen,Te=se===void 0?!1:se,Ge=Be.onBlur,Ze=Be.onCMBeforeChange,bt=Be.onFullScreen,At=Be.className,it=At===void 0?"":At,Tt=Be.disablePaste,Qt=Tt===void 0?!1:Tt,yt=Be.placeholder,nn=yt===void 0?"":yt,Jt=Be.values,Nt=Jt===void 0?"":Jt,vt=Object(c.useState)(null),Tn=Object(A.a)(vt,2),mt=Tn[0],ln=Tn[1],fn=Object(c.useState)(dt),Zn=Object(A.a)(fn,2),rr=Zn[0],xn=Zn[1],Er=Object(c.useState)(ct),Or=Object(A.a)(Er,2),un=Or[0],Pn=Or[1],Nr=Object(c.useState)(Te),Xr=Object(A.a)(Nr,2),xr=Xr[0],ur=Xr[1],vr=Object(c.useState)(""),vi=Object(A.a)(vr,2),pr=vi[0],_r=vi[1],Cr=Object(c.useState)(0),Hr=Object(A.a)(Cr,2),Tr=Hr[0],ui=Hr[1],Dr=Object(c.useState)(st),_i=Object(A.a)(Dr,2),ci=_i[0],ni=_i[1],Ii=Object(c.useState)(!1),Ni=Object(A.a)(Ii,2),Ui=Ni[0],di=Ni[1],mr=Object(c.useRef)(Object(te.a)()),dr=Object(c.useRef)(!1),qr=Object(c.useRef)(),ri=Object(c.useRef)(),fi=Object(c.useRef)(),ii=Object(c.useRef)(),Xi=Object(c.useRef)(),na=function(){var tn=Object(S.a)(p.a.mark(function _n(){var an,Ln;return p.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:return or.next=2,Object(Je.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:mr.current}});case 2:Ln=or.sent,Ln!=null&&(an=Ln.attachments)!==null&&an!==void 0&&an.length&&(console.log("cm:",mt,ri),Ln.attachments.map(function(Xt){Xt.content_type.indexOf("image")>-1?mt.replaceSelection(".concat(Xt.content_type,")")):Xt.content_type.indexOf("video")>-1?mt.replaceSelection('<video width="100%" controls src="'.concat(E.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Xt.content_type.indexOf("pdf")>-1?mt.replaceSelection('<a href="'.concat(E.a.API_SERVER,"/api/attachments/").concat(Xt.id,"?type=").concat(Xt.content_type,'&disposition=inline" target="_blank">').concat(Xt.name,"</a>")):mt.replaceSelection("[".concat(Xt.name,"](").concat(E.a.API_SERVER,"/api/attachments/").concat(Xt.id,"?type=").concat(Xt.content_type,")"))}));case 4:case"end":return or.stop()}},_n)}));return function(){return tn.apply(this,arguments)}}();Object(c.useEffect)(function(){xn(Nt),mt==null||mt.setValue(Nt)},[Nt]),Object(c.useEffect)(function(){bt==null||bt(xr)},[xr]),Object(c.useEffect)(function(){if(ri.current){var tn=o.a.fromTextArea(ri.current,{mode:St,lineNumbers:!$e,lineWrapping:!0,value:dt,autoCloseTags:!0,autoCloseBrackets:!0});Fe&&tn.focus();function _n(an,Ln){if(Qt){Ln.preventDefault();return}var Xn=Ln.clipboardData;if(Xn){var or=Xn.types.toString(),Xt=Xn.items;if(or==="Files"||Xn.types.indexOf("Files")>-1){if(Ln.preventDefault(),St=="stex")return;try{var yr,Kr=Xt[1];((yr=Xt[0])===null||yr===void 0?void 0:yr.kind)==="file"&&(Kr=Xt[0]);var Mn=Kr.getAsFile(),Ci=Mn.name.split(".").pop();Ue(Mn,function(nr){if(nr.id){var Ur,rt,pt;(Mn==null||((Ur=Mn.type)===null||Ur===void 0)?void 0:Ur.indexOf("image"))>-1?tn.replaceSelection(".concat(nr.content_type,")")):(Mn==null||((rt=Mn.type)===null||rt===void 0)?void 0:rt.indexOf("video"))>-1?tn.replaceSelection('<video width="100%" controls src="'.concat(E.a.API_SERVER,"/api/attachments/").concat(nr.id,'"></video>')):(Mn==null||((pt=Mn.type)===null||pt===void 0)?void 0:pt.indexOf("pdf"))>-1?tn.replaceSelection('<a href="'.concat(E.a.API_SERVER,"/api/attachments/").concat(nr.id,"?type=").concat(Mn.type,'&disposition=inline" target="_blank">').concat(Mn.name,"</a>")):pe.includes(Ci)?tn.replaceSelection('<a href="'.concat(E.a.API_SERVER,"/api/attachments/").concat(nr.id,'?type=office&disposition=inline" target="_blank">').concat(Mn.name,"</a>")):tn.replaceSelection("[".concat(Mn.name,"](").concat(E.a.API_SERVER,"/api/attachments/").concat(nr.id,"?type=").concat(nr.content_type,")"))}else(nr==null?void 0:nr.status)===401&&(document.location.href="/user/login")})}catch(nr){D.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return tn.on("paste",_n),tn.on("dragleave",function(an,Ln){fi.current.classList.remove("mouse-hover-md")}),tn.on("dragover",function(an,Ln){fi.current.classList.add("mouse-hover-md")}),tn.on("drop",function(an,Ln){fi.current.classList.add("mouse-hover-md");var Xn;if(Xn=Ln.dataTransfer.files,Xn.length>0){Ln.preventDefault(),Ln.stopPropagation();for(var or=function(Kr){var Mn=Xn[Kr],Ci=Mn.name.split(".").pop();Ue(Mn,function(nr){if(nr.id){var Ur,rt,pt;(Mn==null||((Ur=Mn.type)===null||Ur===void 0)?void 0:Ur.indexOf("image"))>-1?tn.replaceSelection(".concat(nr.content_type,")")):(Mn==null||((rt=Mn.type)===null||rt===void 0)?void 0:rt.indexOf("video"))>-1?tn.replaceSelection('<video width="100%" controls src="'.concat(E.a.API_SERVER,"/api/attachments/").concat(nr.id,'"></video>')):(Mn==null||((pt=Mn.type)===null||pt===void 0)?void 0:pt.indexOf("pdf"))>-1?tn.replaceSelection('<a href="'.concat(E.a.API_SERVER,"/api/attachments/").concat(nr.id,"?type=").concat(Mn.type,'&disposition=inline" target="_blank">').concat(Mn.name,"</a>")):pe.includes(Ci)?tn.replaceSelection('<a href="'.concat(E.a.API_SERVER,"/api/attachments/").concat(nr.id,'?type=office&disposition=inline" target="_blank">').concat(Mn.name,"</a>")):tn.replaceSelection("[".concat(Mn.name,"](").concat(E.a.API_SERVER,"/api/attachments/").concat(nr.id,"?type=").concat(nr.content_type,")"))}else(nr==null?void 0:nr.status)===401&&(document.location.href="/user/login")})},Xt=0;Xt<Xn.length;Xt++)or(Xt)}}),ln(tn),function(){tn.off("paste",_n)}}},[]);var ai=Object(c.useCallback)(function(){if(fi.current)try{}catch(tn){console.log(tn,"---- to set md editor body height")}},[ci,fi,xr]);Object(c.useEffect)(function(){function tn(){var an=new i.default(function(Ln){var Xn=Object(B.a)(Ln),or;try{for(Xn.s();!(or=Xn.n()).done;){var Xt=or.value;(Xt.target.offsetHeight>0||Xt.target.offsetWidth>0)&&(ai(),mt.setSize("100%","100%"),mt.refresh())}}catch(yr){Xn.e(yr)}finally{Xn.f()}});return an.observe(ri.current.parentElement),an}if(mt){var _n=tn();return function(){_n.unobserve(ri.current.parentElement)}}},[mt,ai]),Object(c.useEffect)(function(){if(mt){for(var tn=[],_n=function(){var Xt=Ln[an];Xn=Object(A.a)(Xt,2);var yr=Xn[0],Kr=Xn[1],Mn=Object(C.a)({},yr,function(){Yi(Kr)});tn.push(Mn),mt.addKeyMap(Mn)},an=0,Ln=Object.entries(_e);an<Ln.length;an++){var Xn;_n()}return qr.current=setInterval(function(){dr.current&&na()},4e3),function(){clearInterval(qr.current);var or=Object(B.a)(tn),Xt;try{for(or.s();!(Xt=or.n()).done;){var yr=Xt.value;mt.removeKeyMap(yr)}}catch(Kr){or.e(Kr)}finally{or.f()}}}},[mt]),Object(c.useEffect)(function(){Te!==xr&&ur(Te)},[Te]),Object(Ae.a)(function(){if(!Se&&Tr>0){var tn=new Date().getTime(),_n=window.sessionStorage.getItem(lt);tn>=Tr+et&&(!_n||_n!==rr)&&(window.sessionStorage.setItem(lt,rr),di(!0))}},et),Object(c.useEffect)(function(){Pn(ct)},[mt,ct]),Object(c.useEffect)(function(){mt&&(Fe&&mt.focus())},[mt,Fe]),Object(c.useEffect)(function(){if(un&&mt){var tn=mt.getScrollerElement();function _n(an){var Ln=an.target;if(Xi.current){var Xn=Ln.scrollTop/Ln.scrollHeight;Xi.current.scrollTop=Xi.current.scrollHeight*Xn}}return tn.addEventListener("scroll",_n),function(){tn.removeEventListener("scroll",_n)}}},[mt,un]),Object(c.useEffect)(function(){if(mt&&Ze){function tn(_n,an){Ze(_n,an)}return mt.on("beforeChange",tn),function(){mt.off("beforeChange",tn)}}},[mt,Ze]),Object(c.useEffect)(function(){if(mt&&Ge){function tn(){Ge(mt.getValue())}return mt.on("blur",tn),function(){mt.off("blur",tn)}}},[mt,Ge]),Object(c.useEffect)(function(){if(mt){function tn(_n){var an=_n.getValue();xn(an),ui(new Date().getTime()),_n.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Et&&Et(an)}return mt.on("change",tn),function(){mt.off("change",tn)}}},[mt,Et]),Object(c.useEffect)(function(){mt&&(dt==null?(mt.setValue(""),xn("")):dt!==mt.getValue()&&(mt.setValue(dt),xn(dt),mt.setCursor(mt.lineCount(),0)))},[mt,dt]);var Yi=Object(c.useCallback)(function(tn){var _n=mt.getCursor(),an=mt.getSelection(),Ln=an.split(`
|
|
|
`);switch(tn){case"bold":return mt.replaceSelection("**"+an+"**"),an===""&&mt.setCursor(_n.line,_n.ch+2),mt.focus();case"italic":return mt.replaceSelection("*"+an+"*"),an===""&&mt.setCursor(_n.line,_n.ch+1),mt.focus();case"code":return mt.replaceSelection("`"+an+"`"),an===""&&mt.setCursor(_n.line,_n.ch+1),mt.focus();case"inline-latex":return mt.replaceSelection("`$$"+an+"$$`"),an===""&&mt.setCursor(_n.line,_n.ch+3),mt.focus();case"latex":return mt.replaceSelection("```latex\n"+an+"\n```"),mt.setCursor(_n.line+1,an.length+1),mt.focus();case"line-break":return mt.replaceSelection(`<br/>
|
|
|
`),mt.focus();case"list-ul":return an===""?mt.replaceSelection("- "+an):mt.replaceSelection(Ln.map(function(Xn){return Xn===""?"":"- ".concat(Xn)}).join(`
|
|
|
`)),mt.focus();case"list-ol":return an===""?mt.replaceSelection("1. "+an):mt.replaceSelection(Ln.map(function(Xn,or){return Xn===""?"":"".concat(or+1,". ").concat(Xn)}).join(`
|
|
|
`)),mt.focus();case"add-null-ch":return an===""&&mt.setCursor(_n.line,_n.ch+1),mt.replaceSelection(ze),mt.focus();case"inster-template-1":return an===""&&mt.setCursor(_n.line,_n.ch),mt.replaceSelection(Ke),mt.focus();case"eraser":return mt.setValue(""),mt.focus();case"trigger-watch":return Pn(!un),mt.focus();case"trigger-full-screen":return ur(!xr),mt.focus();case P:_r(P);return;case q:_r(q);return;case U:_r(U);return;case X:_r(X);return;default:throw new Error}},[mt,un,xr]),Zr=Object(c.useCallback)(function(tn){_r("");switch(pr){case P:var _n=tn.title,an=tn.link;return mt.replaceSelection("[".concat(_n,"](").concat(an,")")),mt.focus();case q:var Ln=tn.language,Xn=tn.content;return mt.replaceSelection(["```"+Ln,Xn,"```"].join(`
|
|
|
`)),mt.focus();case U:var or=tn.src,Xt=tn.alt;return Xt?mt.replaceSelection(".concat(or,' "').concat(Xt,'" )')):mt.replaceSelection("")),mt.focus();case X:for(var yr=tn.row,Kr=tn.col,Mn=tn.align,Ci=`
|
|
|
`,nr=0;nr<yr;nr++){for(var Ur=[],rt=[],pt=0;pt<Kr;pt++)nr===1&&rt.push(ge[Mn]),Ur.push(" ");nr===1&&(Ci+="| ".concat(rt.join(" | "),` |
|
|
|
`)),Ci+="| ".concat(Ur.join(Kr===1?"":" | "),` |
|
|
|
`)}return mt.replaceSelection(Ci+`
|
|
|
`),mt.focus();default:throw new Error}},[mt,pr]),Wi=Object(c.useMemo)(function(){switch(pr){case P:return s.a.createElement(H,{callback:Zr,onCancel:Di});case q:return s.a.createElement(Q.b,{callback:Zr,onCancel:Di});case U:return s.a.createElement(de,{callback:Zr,onCancel:Di});case X:return s.a.createElement(Ne,{callback:Zr,onCancel:Di});default:return null}},[pr]);function Di(){_r("")}Object(c.useEffect)(function(){if(ii.current){var tn=ii.current,_n=!1,an=0;function Ln(Xt){_n=!0,an=Xt.pageY}function Xn(){_n=!1}function or(Xt){if(_n){var yr=Xt.pageY-an;yr<0&&(yr=0),yr>300&&(yr=300);var Kr=st+yr+"px";ni(Kr)}}return tn.addEventListener("mousedown",Ln),document.addEventListener("mousemove",or),document.addEventListener("mouseup",Xn),function(){tn.removeEventListener("mousedown",Ln),document.removeEventListener("mousemove",or),document.removeEventListener("mouseup",Xn)}}},[mt,ii]),Object(c.useEffect)(function(){ni(st)},[st]);var Oi=Pe(Rt),$i=Pe(ci),yi={width:Oi,height:$i},Ji=Object(c.useMemo)(function(){if(Tr){var tn=new Date(Tr),_n=tn.getHours(),an=tn.getMinutes(),Ln=tn.getSeconds();return _n=_n<10?"0"+_n:_n,an=an<10?"0"+an:an,Ln=Ln<10?"0"+Ln:Ln,"".concat(_n,":").concat(an,":").concat(Ln)}return 0},[Tr]);function Qi(){window.sessionStorage.removeItem(lt),di(!1),ui(0)}function hi(){di(!1),ui(0),mt.setValue(window.sessionStorage.getItem(lt))}function Zi(tn,_n){var an=mt.getValue();an=an.replace(tn,_n),xn(an),mt==null||mt.setValue(an)}return s.a.createElement(c.Fragment,null,s.a.createElement("div",{className:"markdown-editor-wrapper",ref:fi},s.a.createElement("div",{className:"markdown-editor-container ".concat(it," ").concat(un?"on-preview":""," ").concat($e?"mini":""," ").concat(xr?"full-screen":""),style:yi},s.a.createElement(R,{insertTemp:tt,watch:un,fullScreen:xr,showNullButton:G,onActionCallback:Yi,hidetoolBar:ne,uuid:mr.current,setOpenPhones:function(){dr.current=!0}}),s.a.createElement("div",{className:"markdown-editor-body"},s.a.createElement("div",{className:"codemirror-container"},s.a.createElement("textarea",{ref:ri,placeholder:nn})),un?s.a.createElement("div",{ref:Xi,className:"preview-container"},St==="stex"&&s.a.createElement(g,{value:rr}),St!=="stex"&&s.a.createElement(b.a,{edit:!0,value:rr,replaces:Zi})):null))),Pt?s.a.createElement("a",{ref:ii,className:"editor-resize"}):null,s.a.createElement(N.a,null,Oe[pr]?s.a.createElement(ee.a,{centered:!0,title:Oe[pr],visible:!0,onCancel:Di,footer:null,className:"markdown-popup-form"},Wi):null))}},P5Jw:function(Ye,We,z){"use strict";var ae=z("rHrb"),ee=ae.CopyToClipboard;ee.CopyToClipboard=ee,Ye.exports=ee},PD8m:function(Ye,We){Ye.exports={name:"memoryStorage",read:ae,write:ee,each:B,remove:O,clearAll:D};var z={};function ae(S){return z[S]}function ee(S,A){z[S]=A}function B(S){for(var A in z)z.hasOwnProperty(A)&&S(z[A],A)}function O(S){delete z[S]}function D(S){z={}}},RELg:function(Ye,We,z){var ae=z("MFOe"),ee=ae.Global;Ye.exports={name:"oldIE-userDataStorage",write:A,read:C,each:h,remove:p,clearAll:c};var B="storejs",O=ee.document,D=o(),S=(ee.navigator?ee.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function A(i,l){if(S)return;var a=n(i);D(function(r){r.setAttribute(a,l),r.save(B)})}function C(i){if(S)return;var l=n(i),a=null;return D(function(r){a=r.getAttribute(l)}),a}function h(i){D(function(l){for(var a=l.XMLDocument.documentElement.attributes,r=a.length-1;r>=0;r--){var t=a[r];i(l.getAttribute(t.name),t.name)}})}function p(i){var l=n(i);D(function(a){a.removeAttribute(l),a.save(B)})}function c(){D(function(i){var l=i.XMLDocument.documentElement.attributes;i.load(B);for(var a=l.length-1;a>=0;a--)i.removeAttribute(l[a].name);i.save(B)})}var s=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function n(i){return i.replace(/^\d/,"___$&").replace(s,"___")}function o(){if(!O||!O.documentElement||!O.documentElement.addBehavior)return null;var i="script",l,a,r;try{a=new ActiveXObject("htmlfile"),a.open(),a.write("<"+i+">document.w=window</"+i+'><iframe src="/favicon.ico"></iframe>'),a.close(),l=a.w.frames[0].document,r=l.createElement("div")}catch(t){r=O.createElement("div"),l=O.body}return function(t){var d=[].slice.call(arguments,0);d.unshift(r),l.appendChild(r),r.addBehavior("#default#userData"),r.load(B),t.apply(this,d),l.removeChild(r);return}}},RpDr:function(Ye,We,z){"use strict";z.d(We,"a",function(){return b}),z.d(We,"c",function(){return _});var ae=z("+L6B"),ee=z("2/Rp"),B=z("tJVT"),O=z("k1fw"),D=z("jrin"),S=z("5NDa"),A=z("5rEg"),C=z("cDcd"),h=z.n(C),p=z("8Skl"),c=z("y3Kf"),s=z("bdLU"),n=z("J66h"),o=z.n(n),i=z("++UQ"),l=z.n(i),a=z("IxHN"),r=z("9Bee"),t=z("1vsH"),d,v=A.a.TextArea,y={visible:!1,tabIndex:"0"},b=(d={},Object(D.a)(d,s.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(D.a)(d,s.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(D.a)(d,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(D.a)(d,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(D.a)(d,4,"\u7F16\u8BD1\u5931\u8D25"),Object(D.a)(d,5,"\u6267\u884C\u5931\u8D25"),d),g;(function(f){f[f.SET_VISIBLE=0]="SET_VISIBLE",f[f.SET_TABINDEX=1]="SET_TABINDEX"})(g||(g={}));function m(f,E){switch(E.type){case g.SET_VISIBLE:return Object(O.a)(Object(O.a)({},f),{},{visible:E.payload});case g.SET_TABINDEX:return Object(O.a)(Object(O.a)({},f),{},{tabIndex:E.payload});default:throw new Error}}function _(f){var E=f.status,w=f.error_msg,T=f.output,R=f.input,N=f.expected_output,j=f.is_file,W=f.input_file_url,J=f.output_file_url,F=f.expected_output_file_url,k=null,K={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(E){case s.a.NOMATCH:k=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!j&&h.a.createElement(r.a,{value:R,style:K}),j&&h.a.createElement("div",{style:K},h.a.createElement("a",{onClick:function(){return Object(t.y)(W,R)}},R)),h.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!j&&h.a.createElement(r.a,{value:T&&n.Base64.decode(T)||"",style:K}),j&&h.a.createElement("div",{style:K},h.a.createElement("a",{onClick:function(){return Object(t.y)(J,T)}},T)),h.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!j&&h.a.createElement(r.a,{value:N&&n.Base64.decode(N)||"",style:K}),j&&h.a.createElement("div",{style:K},h.a.createElement("a",{onClick:function(){return Object(t.y)(F,N)}},N)));break;case s.a.EXECUTEFAILURE:k=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!j&&h.a.createElement(r.a,{value:R,style:K}),j&&h.a.createElement("div",{style:K},h.a.createElement("a",{onClick:function(){return Object(t.y)(W,R)}},R)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},n.Base64.decode(w)));break;case s.a.COMPILEFAILURE:k=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!j&&h.a.createElement(r.a,{value:R,style:K}),j&&h.a.createElement("div",{style:K},h.a.createElement("a",{onClick:function(){return Object(t.y)(W,R)}},R)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},n.Base64.decode(w)));break;case s.a.PODFAILURE:k=h.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case s.a.TIMEOUT:k=h.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return h.a.createElement(h.a.Fragment,null," ",k," ")}function x(f){var E=f.status,w=f.error_msg,T=f.execute_time,R=f.output,N=f.input,j=f.expected_output,W=f.is_file,J=f.input_file_url,F=f.output_file_url,k=f.expected_output_file_url,K=null;switch(E){case s.a.OK:K=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",T),h.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),h.a.createElement("pre",null,n.Base64.decode(R)));break;case s.a.NOMATCH:K=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u8F93\u5165\uFF1A",h.a.createElement("pre",null,N)),h.a.createElement("p",null,"\u8F93\u51FA\uFF1A",R&&n.Base64.decode(R)),h.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",j&&n.Base64.decode(j)));break;case s.a.EXECUTEFAILURE:K=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",h.a.createElement("pre",null,N)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},n.Base64.decode(w)));break;case s.a.COMPILEFAILURE:K=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",h.a.createElement("pre",null,N)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},n.Base64.decode(w)));break;case s.a.PODFAILURE:K=h.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case s.a.TIMEOUT:K=h.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return h.a.createElement(h.a.Fragment,null," ",K," ")}We.b=function(f){var E=f.id,w=f.input,T=f.debuging,R=f.submitting,N=f.executingMessage,j=f.debugResult,W=f.onChangeInput,J=f.onDebugCode,F=f.onSubmitCode,k=Object(C.useReducer)(m,y),K=Object(B.a)(k,2),Y=K[0],H=K[1],Q=Y.visible,re=Y.tabIndex;Object(C.useEffect)(function(){H({type:g.SET_VISIBLE,payload:!1})},[E]);function oe(de){var be=de.target.id;H({type:g.SET_TABINDEX,payload:be})}function me(){H({type:g.SET_VISIBLE,payload:!Q})}var he=Object(C.useMemo)(function(){if(j){var de=j.status;return h.a.createElement(h.a.Fragment,null,x(j))}return null},[j]);function Ee(){H({type:g.SET_VISIBLE,payload:!0}),H({type:g.SET_TABINDEX,payload:"1"}),J()}return h.a.createElement("div",{className:"test-case-panel"},h.a.createElement("div",{className:"test-case-panel-body ".concat(Q?"active":"")},h.a.createElement("ul",{className:"s-navs"},h.a.createElement("li",null,h.a.createElement("a",{className:re==="0"?"active":"",id:"0",onClick:oe},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),h.a.createElement("li",null,h.a.createElement("a",{className:re==="1"?"active":"",id:"1",onClick:oe},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),h.a.createElement("div",{className:"tab-panel-body ".concat(re==="0"?"":"hide")},h.a.createElement(v,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:w,onChange:W})),h.a.createElement("div",{className:"tab-panel-body ".concat(re==="1"?"":"hide")},T?h.a.createElement(a.a,{message:N}):j?h.a.createElement("section",{style:{height:200}}," ",he," "):h.a.createElement("p",{className:"tip"},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D"))),h.a.createElement("a",{className:"btn-collapse ".concat(Q?"up":""),onClick:me},Q?h.a.createElement(p.a,null):h.a.createElement(c.a,null)),h.a.createElement("footer",{className:"footer"},h.a.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),h.a.createElement("div",{className:"flex-container"},h.a.createElement(ee.a,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),h.a.createElement(ee.a,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),h.a.createElement(ee.a,{className:"btn-green",type:"ghost",loading:T,onClick:Ee},"\u8C03\u8BD5\u4EE3\u7801"),h.a.createElement(ee.a,{type:"primary",loading:R,disabled:R,onClick:function(){H({type:g.SET_VISIBLE,payload:!1}),F()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},"S/kP":function(Ye,We,z){Ye.exports=z.p+"static/time.a3dc82f3.svg"},"SA+Z":function(Ye,We,z){var ae=z("wTVA"),ee=z("EbDI"),B=z("ZhPi"),O=z("wkBT");function D(S){return ae(S)||ee(S)||B(S)||O()}Ye.exports=D,Ye.exports.__esModule=!0,Ye.exports.default=Ye.exports},SJMd:function(Ye,We){/**
|
|
|
* @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 z,ae,ee,B=!1,O,D;window.PR_SHOULD_USE_CONTINUATION=!0;var S,A;(function(){var C=window,h=["break,continue,do,else,for,if,return,while"],p=[h,"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"],c=[p,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],s=[c,"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"],n=[c,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],o=[c,"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"],i="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",l=[c,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],a="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",r=[h,"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"],t=[h,"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"],d=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],v=[s,o,n,l,a,r,t,d],y=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,b="str",g="kwd",m="com",_="typ",x="lit",f="pun",E="pln",w="tag",T="dec",R="src",N="atn",j="atv",W="nocode",J="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function F(ce){for(var ke=0,Ne=!1,Je=!1,te=0,P=ce.length;te<P;++te){var U=ce[te];if(U.ignoreCase)Je=!0;else if(/[a-z]/i.test(U.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ne=!0,Je=!1;break}}var q={b:8,t:9,n:10,v:11,f:12,r:13};function X(Le){var Me=Le.charCodeAt(0);if(Me!==92)return Me;var Xe=Le.charAt(1);return Me=q[Xe],Me||("0"<=Xe&&Xe<="7"?parseInt(Le.substring(1),8):Xe==="u"||Xe==="x"?parseInt(Le.substring(2),16):Le.charCodeAt(1))}function $(Le){if(Le<32)return(Le<16?"\\x0":"\\x")+Le.toString(16);var Me=String.fromCharCode(Le);return Me==="\\"||Me==="-"||Me==="]"||Me==="^"?"\\"+Me:Me}function ge(Le){var Me=Le.substring(1,Le.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")),Xe=[],et=Me[0]==="^",ze=["["];et&&ze.push("^");for(var Ke=et?1:0,Pe=Me.length;Ke<Pe;++Ke){var Ie=Me[Ke];if(/\\[bdsw]/i.test(Ie))ze.push(Ie);else{var Ce=X(Ie),pe;Ke+2<Pe&&Me[Ke+1]==="-"?(pe=X(Me[Ke+2]),Ke+=2):pe=Ce,Xe.push([Ce,pe]),pe<65||Ce>122||(pe<65||Ce>90||Xe.push([Math.max(65,Ce)|32,Math.min(pe,90)|32]),pe<97||Ce>122||Xe.push([Math.max(97,Ce)&~32,Math.min(pe,122)&~32]))}}Xe.sort(function(Be,qe){return Be[0]-qe[0]||qe[1]-Be[1]});for(var _e=[],Oe=[],Ke=0;Ke<Xe.length;++Ke){var we=Xe[Ke];we[0]<=Oe[1]+1?Oe[1]=Math.max(Oe[1],we[1]):_e.push(Oe=we)}for(var Ke=0;Ke<_e.length;++Ke){var we=_e[Ke];ze.push($(we[0])),we[1]>we[0]&&(we[1]+1>we[0]&&ze.push("-"),ze.push($(we[1])))}return ze.push("]"),ze.join("")}function Ae(Le){for(var Me=Le.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")),Xe=Me.length,et=[],ze=0,Ke=0;ze<Xe;++ze){var Pe=Me[ze];if(Pe==="(")++Ke;else if(Pe.charAt(0)==="\\"){var Ie=+Pe.substring(1);Ie&&(Ie<=Ke?et[Ie]=-1:Me[ze]=$(Ie))}}for(var ze=1;ze<et.length;++ze)et[ze]===-1&&(et[ze]=++ke);for(var ze=0,Ke=0;ze<Xe;++ze){var Pe=Me[ze];if(Pe==="(")++Ke,et[Ke]||(Me[ze]="(?:");else if(Pe.charAt(0)==="\\"){var Ie=+Pe.substring(1);Ie&&Ie<=Ke&&(Me[ze]="\\"+et[Ie])}}for(var ze=0;ze<Xe;++ze)Me[ze]==="^"&&Me[ze+1]!=="^"&&(Me[ze]="");if(Le.ignoreCase&&Ne)for(var ze=0;ze<Xe;++ze){var Pe=Me[ze],Ce=Pe.charAt(0);Pe.length>=2&&Ce==="["?Me[ze]=ge(Pe):Ce!=="\\"&&(Me[ze]=Pe.replace(/[a-zA-Z]/g,function(Oe){var we=Oe.charCodeAt(0);return"["+String.fromCharCode(we&~32,we|32)+"]"}))}return Me.join("")}for(var at=[],te=0,P=ce.length;te<P;++te){var U=ce[te];if(U.global||U.multiline)throw new Error(""+U);at.push("(?:"+Ae(U)+")")}return new RegExp(at.join("|"),Je?"gi":"g")}function k(ce,ke){var Ne=/(?:^|\s)nocode(?:\s|$)/,Je=[],te=0,P=[],U=0;function q(X){var $=X.nodeType;if($==1){if(Ne.test(X.className))return;for(var ge=X.firstChild;ge;ge=ge.nextSibling)q(ge);var Ae=X.nodeName.toLowerCase();(Ae==="br"||Ae==="li")&&(Je[U]=`
|
|
|
`,P[U<<1]=te++,P[U++<<1|1]=X)}else if($==3||$==4){var at=X.nodeValue;at.length&&(ke?at=at.replace(/\r\n?/g,`
|
|
|
`):at=at.replace(/[ \t\r\n]+/g," "),Je[U]=at,P[U<<1]=te,te+=at.length,P[U++<<1|1]=X)}}return q(ce),{sourceCode:Je.join("").replace(/\n$/,""),spans:P}}function K(ce,ke,Ne,Je,te){if(!Ne)return;var P={sourceNode:ce,pre:1,langExtension:null,numberLines:null,sourceCode:Ne,spans:null,basePos:ke,decorations:null};Je(P),te.push.apply(te,P.decorations)}var Y=/\S/;function H(ce){for(var ke=void 0,Ne=ce.firstChild;Ne;Ne=Ne.nextSibling){var Je=Ne.nodeType;ke=Je===1?ke?ce:Ne:Je===3&&Y.test(Ne.nodeValue)?ce:ke}return ke===ce?void 0:ke}function Q(ce,ke){var Ne={},Je;(function(){for(var U=ce.concat(ke),q=[],X={},$=0,ge=U.length;$<ge;++$){var Ae=U[$],at=Ae[3];if(at)for(var Le=at.length;--Le>=0;)Ne[at.charAt(Le)]=Ae;var Me=Ae[1],Xe=""+Me;X.hasOwnProperty(Xe)||(q.push(Me),X[Xe]=null)}q.push(/[\0-\uffff]/),Je=F(q)})();var te=ke.length,P=function(U){for(var q=U.sourceCode,X=U.basePos,$=U.sourceNode,ge=[X,E],Ae=0,at=q.match(Je)||[],Le={},Me=0,Xe=at.length;Me<Xe;++Me){var et=at[Me],ze=Le[et],Ke=void 0,Pe;if(typeof ze=="string")Pe=!1;else{var Ie=Ne[et.charAt(0)];if(Ie)Ke=et.match(Ie[1]),ze=Ie[0];else{for(var Ce=0;Ce<te;++Ce)if(Ie=ke[Ce],Ke=et.match(Ie[1]),Ke){ze=Ie[0];break}Ke||(ze=E)}Pe=ze.length>=5&&ze.substring(0,5)==="lang-",Pe&&!(Ke&&typeof Ke[1]=="string")&&(Pe=!1,ze=R),Pe||(Le[et]=ze)}var pe=Ae;if(Ae+=et.length,!Pe)ge.push(X+pe,ze);else{var _e=Ke[1],Oe=et.indexOf(_e),we=Oe+_e.length;Ke[2]&&(we=et.length-Ke[2].length,Oe=we-_e.length);var Be=ze.substring(5);K($,X+pe,et.substring(0,Oe),P,ge),K($,X+pe+Oe,_e,be(Be,_e),ge),K($,X+pe+we,et.substring(we),P,ge)}}U.decorations=ge};return P}function re(ce){var ke=[],Ne=[];ce.tripleQuotedStrings?ke.push([b,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ce.multiLineStrings?ke.push([b,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ke.push([b,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ce.verbatimStrings&&Ne.push([b,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Je=ce.hashComments;Je&&(ce.cStyleComments?(Je>1?ke.push([m,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ke.push([m,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ne.push([b,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ke.push([m,/^#[^\r\n]*/,null,"#"])),ce.cStyleComments&&(Ne.push([m,/^\/\/[^\r\n]*/,null]),Ne.push([m,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var te=ce.regexLiterals;if(te){var P=te>1?"":`
|
|
|
\r`,U=P?".":"[\\S\\s]",q="/(?=[^/*"+P+"])(?:[^/\\x5B\\x5C"+P+"]|\\x5C"+U+"|\\x5B(?:[^\\x5C\\x5D"+P+"]|\\x5C"+U+")*(?:\\x5D|$))+/";Ne.push(["lang-regex",RegExp("^"+J+"("+q+")")])}var X=ce.types;X&&Ne.push([_,X]);var $=(""+ce.keywords).replace(/^ | $/g,"");$.length&&Ne.push([g,new RegExp("^(?:"+$.replace(/[\s,]+/g,"|")+")\\b"),null]),ke.push([E,/^\s+/,null,` \r
|
|
|
\xA0`]);var ge="^.[^\\s\\w.$@'\"`/\\\\]*";return ce.regexLiterals&&(ge+="(?!s*/)"),Ne.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[_,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[E,/^[a-z_$][a-z_$@0-9]*/i,null],[x,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[E,/^\\[\s\S]?/,null],[f,new RegExp(ge),null]),Q(ke,Ne)}var oe=re({keywords:v,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function me(ce,ke,Ne){for(var Je=/(?:^|\s)nocode(?:\s|$)/,te=/\r\n?|\n/,P=ce.ownerDocument,U=P.createElement("li");ce.firstChild;)U.appendChild(ce.firstChild);var q=[U];function X(Me){var Xe=Me.nodeType;if(Xe==1&&!Je.test(Me.className))if(Me.nodeName==="br")$(Me),Me.parentNode&&Me.parentNode.removeChild(Me);else for(var et=Me.firstChild;et;et=et.nextSibling)X(et);else if((Xe==3||Xe==4)&&Ne){var ze=Me.nodeValue,Ke=ze.match(te);if(Ke){var Pe=ze.substring(0,Ke.index);Me.nodeValue=Pe;var Ie=ze.substring(Ke.index+Ke[0].length);if(Ie){var Ce=Me.parentNode;Ce.insertBefore(P.createTextNode(Ie),Me.nextSibling)}$(Me),Pe||Me.parentNode.removeChild(Me)}}}function $(Me){for(;!Me.nextSibling;)if(Me=Me.parentNode,!Me)return;function Xe(Ke,Pe){var Ie=Pe?Ke.cloneNode(!1):Ke,Ce=Ke.parentNode;if(Ce){var pe=Xe(Ce,1),_e=Ke.nextSibling;pe.appendChild(Ie);for(var Oe=_e;Oe;Oe=_e)_e=Oe.nextSibling,pe.appendChild(Oe)}return Ie}for(var et=Xe(Me.nextSibling,0),ze;(ze=et.parentNode)&&ze.nodeType===1;)et=ze;q.push(et)}for(var ge=0;ge<q.length;++ge)X(q[ge]);ke===(ke|0)&&q[0].setAttribute("value",ke);var Ae=P.createElement("ol");Ae.className="linenums";for(var at=Math.max(0,ke-1|0)||0,ge=0,Le=q.length;ge<Le;++ge)U=q[ge],U.className="L"+(ge+at)%10,U.firstChild||U.appendChild(P.createTextNode("\xA0")),Ae.appendChild(U);ce.appendChild(Ae)}function he(ce){var ke=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ke=ke&&+ke[1]<=8;var Ne=/\n/g,Je=ce.sourceCode,te=Je.length,P=0,U=ce.spans,q=U.length,X=0,$=ce.decorations,ge=$.length,Ae=0;$[ge]=te;var at,Le;for(Le=at=0;Le<ge;)$[Le]!==$[Le+2]?($[at++]=$[Le++],$[at++]=$[Le++]):Le+=2;for(ge=at,Le=at=0;Le<ge;){for(var Me=$[Le],Xe=$[Le+1],et=Le+2;et+2<=ge&&$[et+1]===Xe;)et+=2;$[at++]=Me,$[at++]=Xe,Le=et}ge=$.length=at;var ze=ce.sourceNode,Ke="";ze&&(Ke=ze.style.display,ze.style.display="none");try{for(var Pe=null;X<q;){var Ie=U[X],Ce=U[X+2]||te,pe=$[Ae+2]||te,et=Math.min(Ce,pe),_e=U[X+1],Oe;if(_e.nodeType!==1&&(Oe=Je.substring(P,et))){ke&&(Oe=Oe.replace(Ne,"\r")),_e.nodeValue=Oe;var we=_e.ownerDocument,Be=we.createElement("span");Be.className=$[Ae+1];var qe=_e.parentNode;qe.replaceChild(Be,_e),Be.appendChild(_e),P<Ce&&(U[X+1]=_e=we.createTextNode(Je.substring(et,Ce)),qe.insertBefore(_e,Be.nextSibling))}P=et,P>=Ce&&(X+=2),P>=pe&&(Ae+=2)}}finally{ze&&(ze.style.display=Ke)}}var Ee={};function de(ce,ke){for(var Ne=ke.length;--Ne>=0;){var Je=ke[Ne];Ee.hasOwnProperty(Je)?C.console&&console.warn("cannot override language handler %s",Je):Ee[Je]=ce}}function be(ce,ke){return ce&&Ee.hasOwnProperty(ce)||(ce=/^\s*</.test(ke)?"default-markup":"default-code"),Ee[ce]}de(oe,["default-code"]),de(Q([],[[E,/^[^<?]+/],[T,/^<!\w[^>]*(?:>|$)/],[m,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[f,/^(?:<[%?]|[%?]>)/],["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"]),de(Q([[E,/^[\s]+/,null,` \r
|
|
|
`],[j,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[w,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[N,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[f,/^[=<>\/]+/],["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"]),de(Q([],[[j,/^[\s\S]+/]]),["uq.val"]),de(re({keywords:s,hashComments:!0,cStyleComments:!0,types:y}),["c","cc","cpp","cxx","cyc","m"]),de(re({keywords:"null,true,false"}),["json"]),de(re({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:y}),["cs"]),de(re({keywords:n,cStyleComments:!0}),["java"]),de(re({keywords:d,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),de(re({keywords:r,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),de(re({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),de(re({keywords:t,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),de(re({keywords:l,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),de(re({keywords:i,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),de(Q([],[[b,/^[\s\S]+/]]),["regex"]);function Ue(ce){var ke=ce.langExtension;try{var Ne=k(ce.sourceNode,ce.pre),Je=Ne.sourceCode;ce.sourceCode=Je,ce.spans=Ne.spans,ce.basePos=0,be(ke,Je)(ce),he(ce)}catch(te){C.console&&console.log(te&&te.stack||te)}}function Re(ce,ke,Ne){var Je=Ne||!1,te=ke||null,P=document.createElement("div");P.innerHTML="<pre>"+ce+"</pre>",P=P.firstChild,Je&&me(P,Je,!0);var U={langExtension:te,numberLines:Je,sourceNode:P,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Ue(U),P.innerHTML}function De(ce,ke){var Ne=ke||document.body,Je=Ne.ownerDocument||document;function te(Ie){return Ne.getElementsByTagName(Ie)}for(var P=[te("pre"),te("code"),te("xmp")],U=[],q=0;q<P.length;++q)for(var X=0,$=P[q].length;X<$;++X)U.push(P[q][X]);P=null;var ge=Date;ge.now||(ge={now:function(){return+new Date}});var Ae=0,at=/\blang(?:uage)?-([\w.]+)(?!\S)/,Le=/\bprettyprint\b/,Me=/\bprettyprinted\b/,Xe=/pre|xmp/i,et=/^code$/i,ze=/^(?:pre|code|xmp)$/i,Ke={};function Pe(){for(var Ie=C.PR_SHOULD_USE_CONTINUATION?ge.now()+250:Infinity;Ae<U.length&&ge.now()<Ie;Ae++){for(var Ce=U[Ae],pe=Ke,_e=Ce;_e=_e.previousSibling;){var Oe=_e.nodeType,we=(Oe===7||Oe===8)&&_e.nodeValue;if(we?!/^\??prettify\b/.test(we):Oe!==3||/\S/.test(_e.nodeValue))break;if(we){pe={},we.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ct,tt,wt){pe[tt]=wt});break}}var Be=Ce.className;if((pe!==Ke||Le.test(Be))&&!Me.test(Be)){for(var qe=!1,dt=Ce.parentNode;dt;dt=dt.parentNode){var Et=dt.tagName;if(ze.test(Et)&&dt.className&&Le.test(dt.className)){qe=!0;break}}if(!qe){Ce.className+=" prettyprinted";var It=pe.lang;if(!It){It=Be.match(at);var Rt;!It&&(Rt=H(Ce))&&et.test(Rt.tagName)&&(It=Rt.className.match(at)),It&&(It=It[1])}var Ct;if(Xe.test(Ce.tagName))Ct=1;else{var st=Ce.currentStyle,ut=Je.defaultView,$e=st?st.whiteSpace:ut&&ut.getComputedStyle?ut.getComputedStyle(Ce,null).getPropertyValue("white-space"):0;Ct=$e&&$e.substring(0,3)==="pre"}var xe=pe.linenums;(xe=xe==="true"||+xe)||(xe=Be.match(/\blinenums\b(?::(\d+))?/),xe=xe?xe[1]&&xe[1].length?+xe[1]:!0:!1),xe&&me(Ce,xe,Ct);var Fe={langExtension:It,sourceNode:Ce,numberLines:xe,pre:Ct,sourceCode:null,basePos:null,spans:null,decorations:null};Ue(Fe)}}}Ae<U.length?C.setTimeout(Pe,250):typeof ce=="function"&&ce()}Pe()}var je=C.PR={createSimpleLexer:Q,registerLangHandler:de,sourceDecorator:re,PR_ATTRIB_NAME:N,PR_ATTRIB_VALUE:j,PR_COMMENT:m,PR_DECLARATION:T,PR_KEYWORD:g,PR_LITERAL:x,PR_NOCODE:W,PR_PLAIN:E,PR_PUNCTUATION:f,PR_SOURCE:R,PR_STRING:b,PR_TAG:w,PR_TYPE:_,prettyPrintOne:B?C.prettyPrintOne=Re:S=Re,prettyPrint:A=B?C.prettyPrint=De:A=De},ve=C.define;typeof ve=="function"&&ve.amd&&ve("google-code-prettify",[],function(){return je})})()},TXwP:function(Ye,We,z){var ae,ee;(function(){var B;(function(){"use strict";var D=[,,function(h){function p(n){this.__parent=n,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}p.prototype.clone_empty=function(){var n=new p(this.__parent);return n.set_indent(this.__indent_count,this.__alignment_count),n},p.prototype.item=function(n){return n<0?this.__items[this.__items.length+n]:this.__items[n]},p.prototype.has_match=function(n){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(n))return!0;return!1},p.prototype.set_indent=function(n,o){this.is_empty()&&(this.__indent_count=n||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},p.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},p.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},p.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var n=this.__parent.current_line;return n.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),n.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),n.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,n.__items[0]===" "&&(n.__items.splice(0,1),n.__character_count-=1),!0}return!1},p.prototype.is_empty=function(){return this.__items.length===0},p.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},p.prototype.push=function(n){this.__items.push(n);var o=n.lastIndexOf(`
|
|
|
`);o!==-1?this.__character_count=n.length-o:this.__character_count+=n.length},p.prototype.pop=function(){var n=null;return this.is_empty()||(n=this.__items.pop(),this.__character_count-=n.length),n},p.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},p.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},p.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},p.prototype.toString=function(){var n="";return this.is_empty()?this.__parent.indent_empty_lines&&(n=this.__parent.get_indent_string(this.__indent_count)):(n=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),n+=this.__items.join("")),n};function c(n,o){this.__cache=[""],this.__indent_size=n.indent_size,this.__indent_string=n.indent_char,n.indent_with_tabs||(this.__indent_string=new Array(n.indent_size+1).join(n.indent_char)),o=o||"",n.indent_level>0&&(o=new Array(n.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}c.prototype.get_indent_size=function(n,o){var i=this.__base_string_length;return o=o||0,n<0&&(i=0),i+=n*this.__indent_size,i+=o,i},c.prototype.get_indent_string=function(n,o){var i=this.__base_string;return o=o||0,n<0&&(n=0,i=""),o+=n*this.__indent_size,this.__ensure_cache(o),i+=this.__cache[o],i},c.prototype.__ensure_cache=function(n){for(;n>=this.__cache.length;)this.__add_column()},c.prototype.__add_column=function(){var n=this.__cache.length,o=0,i="";this.__indent_size&&n>=this.__indent_size&&(o=Math.floor(n/this.__indent_size),n-=o*this.__indent_size,i=new Array(o+1).join(this.__indent_string)),n&&(i+=new Array(n+1).join(" ")),this.__cache.push(i)};function s(n,o){this.__indent_cache=new c(n,o),this.raw=!1,this._end_with_newline=n.end_with_newline,this.indent_size=n.indent_size,this.wrap_line_length=n.wrap_line_length,this.indent_empty_lines=n.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new p(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(n,o){return this.__indent_cache.get_indent_string(n,o)},s.prototype.get_indent_size=function(n,o){return this.__indent_cache.get_indent_size(n,o)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(n){return this.is_empty()||!n&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(n){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===`
|
|
|
`&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(`
|
|
|
`);return n!==`
|
|
|
`&&(i=i.replace(/[\n]/g,n)),i},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(n,o){return n=n||0,o=o||0,this.next_line.set_indent(n,o),this.__lines.length>1?(this.current_line.set_indent(n,o),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(n){for(var o=0;o<n.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(n.whitespace_before),this.current_line.push(n.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(n){this.__add_space_before_token(),this.current_line.push(n),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},s.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},s.prototype.remove_indent=function(n){for(var o=this.__lines.length;n<o;)this.__lines[n]._remove_indent(),n++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(n){for(n=n===void 0?!1:n,this.current_line.trim();n&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(n,o){for(var i=this.__lines.length-2;i>=0;){var l=this.__lines[i];if(l.is_empty())break;if(l.item(0).indexOf(n)!==0&&l.item(-1)!==o){this.__lines.splice(i+1,0,new p(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},h.exports.Output=s},,,,function(h){function p(n,o){this.raw_options=c(n,o),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}p.prototype._get_array=function(n,o){var i=this.raw_options[n],l=o||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(l=i.concat()):typeof i=="string"&&(l=i.split(/[^a-zA-Z0-9_\/\-]+/)),l},p.prototype._get_boolean=function(n,o){var i=this.raw_options[n],l=i===void 0?!!o:!!i;return l},p.prototype._get_characters=function(n,o){var i=this.raw_options[n],l=o||"";return typeof i=="string"&&(l=i.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),l},p.prototype._get_number=function(n,o){var i=this.raw_options[n];o=parseInt(o,10),isNaN(o)&&(o=0);var l=parseInt(i,10);return isNaN(l)&&(l=o),l},p.prototype._get_selection=function(n,o,i){var l=this._get_selection_list(n,o,i);if(l.length!==1)throw new Error("Invalid Option Value: The option '"+n+`' can only be one of the following values:
|
|
|
`+o+`
|
|
|
You passed in: '`+this.raw_options[n]+"'");return l[0]},p.prototype._get_selection_list=function(n,o,i){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[o[0]],!this._is_valid_selection(i,o))throw new Error("Invalid Default Value!");var l=this._get_array(n,i);if(!this._is_valid_selection(l,o))throw new Error("Invalid Option Value: The option '"+n+`' can contain only the following values:
|
|
|
`+o+`
|
|
|
You passed in: '`+this.raw_options[n]+"'");return l},p.prototype._is_valid_selection=function(n,o){return n.length&&o.length&&!n.some(function(i){return o.indexOf(i)===-1})};function c(n,o){var i={};n=s(n);var l;for(l in n)l!==o&&(i[l]=n[l]);if(o&&n[o])for(l in n[o])i[l]=n[o][l];return i}function s(n){var o={},i;for(i in n){var l=i.replace(/-/g,"_");o[l]=n[i]}return o}h.exports.Options=p,h.exports.normalizeOpts=s,h.exports.mergeOpts=c},,function(h){var p=RegExp.prototype.hasOwnProperty("sticky");function c(s){this.__input=s||"",this.__input_length=this.__input.length,this.__position=0}c.prototype.restart=function(){this.__position=0},c.prototype.back=function(){this.__position>0&&(this.__position-=1)},c.prototype.hasNext=function(){return this.__position<this.__input_length},c.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__input.charAt(this.__position),this.__position+=1),s},c.prototype.peek=function(s){var n=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(n=this.__input.charAt(s)),n},c.prototype.__match=function(s,n){s.lastIndex=n;var o=s.exec(this.__input);return o&&!(p&&s.sticky)&&(o.index!==n&&(o=null)),o},c.prototype.test=function(s,n){return n=n||0,n+=this.__position,n>=0&&n<this.__input_length?!!this.__match(s,n):!1},c.prototype.testChar=function(s,n){var o=this.peek(n);return s.lastIndex=0,o!==null&&s.test(o)},c.prototype.match=function(s){var n=this.__match(s,this.__position);return n?this.__position+=n[0].length:n=null,n},c.prototype.read=function(s,n,o){var i="",l;return s&&(l=this.match(s),l&&(i+=l[0])),n&&(l||!s)&&(i+=this.readUntil(n,o)),i},c.prototype.readUntil=function(s,n){var o="",i=this.__position;s.lastIndex=this.__position;var l=s.exec(this.__input);return l?(i=l.index,n&&(i+=l[0].length)):i=this.__input_length,o=this.__input.substring(this.__position,i),this.__position=i,o},c.prototype.readUntilAfter=function(s){return this.readUntil(s,!0)},c.prototype.get_regexp=function(s,n){var o=null,i="g";return n&&p&&(i="y"),typeof s=="string"&&s!==""?o=new RegExp(s,i):s&&(o=new RegExp(s.source,i)),o},c.prototype.get_literal_regexp=function(s){return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},c.prototype.peekUntilAfter=function(s){var n=this.__position,o=this.readUntilAfter(s);return this.__position=n,o},c.prototype.lookBack=function(s){var n=this.__position-1;return n>=s.length&&this.__input.substring(n-s.length,n).toLowerCase()===s},h.exports.InputScanner=c},,,,,function(h){function p(c,s){c=typeof c=="string"?c:c.source,s=typeof s=="string"?s:s.source,this.__directives_block_pattern=new RegExp(c+/ beautify( \w+[:]\w+)+ /.source+s,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(c+/\sbeautify\signore:end\s/.source+s,"g")}p.prototype.get_directives=function(c){if(!c.match(this.__directives_block_pattern))return null;var s={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(c);n;)s[n[1]]=n[2],n=this.__directive_pattern.exec(c);return s},p.prototype.readIgnored=function(c){return c.readUntilAfter(this.__directives_end_ignore_pattern)},h.exports.Directives=p},,function(h,p,c){var s=c(16).Beautifier,n=c(17).Options;function o(i,l){var a=new s(i,l);return a.beautify()}h.exports=o,h.exports.defaultOptions=function(){return new n}},function(h,p,c){var s=c(17).Options,n=c(2).Output,o=c(8).InputScanner,i=c(13).Directives,l=new i(/\/\*/,/\*\//),a=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,t=/\s/,d=/(?:\s|\n)+/g,v=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,y=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function b(g,m){this._source_text=g||"",this._options=new s(m),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}b.prototype.eatString=function(g){var m="";for(this._ch=this._input.next();this._ch;){if(m+=this._ch,this._ch==="\\")m+=this._input.next();else if(g.indexOf(this._ch)!==-1||this._ch===`
|
|
|
`)break;this._ch=this._input.next()}return m},b.prototype.eatWhitespace=function(g){for(var m=t.test(this._input.peek()),_=0;t.test(this._input.peek());)this._ch=this._input.next(),g&&this._ch===`
|
|
|
`&&((_===0||_<this._options.max_preserve_newlines)&&(_++,this._output.add_new_line(!0)));return m},b.prototype.foundNestedPseudoClass=function(){for(var g=0,m=1,_=this._input.peek(m);_;){if(_==="{")return!0;if(_==="(")g+=1;else if(_===")"){if(g===0)return!1;g-=1}else if(_===";"||_==="}")return!1;m++,_=this._input.peek(m)}return!1},b.prototype.print_string=function(g){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(g)},b.prototype.preserveSingleSpace=function(g){g&&(this._output.space_before_token=!0)},b.prototype.indent=function(){this._indentLevel++},b.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},b.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var g=this._source_text,m=this._options.eol;m==="auto"&&(m=`
|
|
|
`,g&&a.test(g||"")&&(m=g.match(a)[0])),g=g.replace(r,`
|
|
|
`);var _=g.match(/^[\t ]*/)[0];this._output=new n(this._options,_),this._input=new o(g),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var x=0,f=!1,E=!1,w=!1,T=!1,R=!1,N=!1,j=this._ch,W=!1,J,F,k;J=this._input.read(d),F=J!=="",k=j,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),j=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var K=this._input.read(v),Y=l.get_directives(K);Y&&Y.ignore==="start"&&(K+=l.readIgnored(this._input)),this.print_string(K),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(y)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(F),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var H=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);H.match(/[ :]$/)&&(H=this.eatString(": ").replace(/\s$/,""),this.print_string(H),this._output.space_before_token=!0),H=H.replace(/\s$/,""),H==="extend"?T=!0:H==="import"&&(R=!0),H in this.NESTED_AT_RULE?(this._nestedLevel+=1,H in this.CONDITIONAL_GROUP_RULE&&(w=!0)):!f&&x===0&&H.indexOf(":")!==-1&&(E=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(F),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")E&&(E=!1,this.outdent()),w?(w=!1,f=this._indentLevel>=this._nestedLevel):f=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&f&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(k==="("?this._output.space_before_token=!1:k!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),k==="{"&&this._output.trim(!0),R=!1,T=!1,E&&(this.outdent(),E=!1),this.print_string(this._ch),f=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var Q=0;Q<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Q++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Q])){W=!0;break}(f||w)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!T&&x===0?(this.print_string(":"),E||(E=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var re=k==='"'||k==="'";this.preserveSingleSpace(re||F),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")W=!1,x===0?(E&&(this.outdent(),E=!1),T=!1,R=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),x++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),x&&(x--,this.outdent()));else{var oe=!1;this._input.lookBack("with")&&(oe=!0),this.preserveSingleSpace(F||oe),this.print_string(this._ch),E&&k==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),N=!0):(this.eatWhitespace(),x++,this.indent())}else if(this._ch===")")x&&(x--,this.outdent()),N&&this._input.peek()===";"&&this._options.selector_separator_newline&&(N=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!E||N)&&x===0&&!R&&!T?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!E&&x===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&t.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(F),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),t.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var me=k==='"'||k==="'";this.preserveSingleSpace(me||F),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
|
`&&W&&this._output.add_new_line()}var he=this._output.get_code(m);return he},h.exports.Beautifier=b},function(h,p,c){var s=c(6).Options;function n(o){s.call(this,o,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var i=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||i;var l=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var a=0;a<l.length;a++)l[a]!=="expand"?this.brace_style="collapse":this.brace_style=l[a]}n.prototype=new s,h.exports.Options=n}],S={};function A(h){var p=S[h];if(p!==void 0)return p.exports;var c=S[h]={exports:{}};return D[h](c,c.exports,A),c.exports}var C=A(15);B=C})();var O=B;!(ae=[],ee=function(){return{css_beautify:O}}.apply(We,ae),ee!==void 0&&(Ye.exports=ee))})()},TcMa:function(Ye,We,z){Ye.exports={desc:"desc___qlRMF",info:"info___JEaKq","commit-info":"commit-info___3-4e0"}},UZu5:function(Ye,We,z){},VEzc:function(Ye,We,z){Ye.exports={flex_box_center:"flex_box_center___z2AYj",flex_space_between:"flex_space_between___2PZH7",flex_box_vertical_center:"flex_box_vertical_center___3Vw8I",flex_box_center_end:"flex_box_center_end___1dJQf",flex_box_column:"flex_box_column___kstqC",wrap:"wrap___wWYG3",head:"head___1xABk",title:"title___yYb50",content:"content___fzoVv",list:"list___2q90P",footer:"footer___3zT-e"}},"VrN/":function(Ye,We,z){(function(ae,ee){Ye.exports=ee()})(this,function(){"use strict";var ae=navigator.userAgent,ee=navigator.platform,B=/gecko\/\d/i.test(ae),O=/MSIE \d/.test(ae),D=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ae),S=/Edge\/(\d+)/.exec(ae),A=O||D||S,C=A&&(O?document.documentMode||6:+(S||D)[1]),h=!S&&/WebKit\//.test(ae),p=h&&/Qt\/\d+\.\d+/.test(ae),c=!S&&/Chrome\//.test(ae),s=/Opera\//.test(ae),n=/Apple Computer/.test(navigator.vendor),o=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ae),i=/PhantomJS/.test(ae),l=!S&&/AppleWebKit/.test(ae)&&/Mobile\/\w+/.test(ae),a=/Android/.test(ae),r=l||a||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ae),t=l||/Mac/.test(ee),d=/\bCrOS\b/.test(ae),v=/win/i.test(ee),y=s&&ae.match(/Version\/(\d*\.\d*)/);y&&(y=Number(y[1])),y&&y>=15&&(s=!1,h=!0);var b=t&&(p||s&&(y==null||y<12.11)),g=B||A&&C>=9;function m(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _=function(e,u){var I=e.className,L=m(u).exec(I);if(L){var M=I.slice(L.index+L[0].length);e.className=I.slice(0,L.index)+(M?L[1]+M:"")}};function x(e){for(var u=e.childNodes.length;u>0;--u)e.removeChild(e.firstChild);return e}function f(e,u){return x(e).appendChild(u)}function E(e,u,I,L){var M=document.createElement(e);if(I&&(M.className=I),L&&(M.style.cssText=L),typeof u=="string")M.appendChild(document.createTextNode(u));else if(u)for(var V=0;V<u.length;++V)M.appendChild(u[V]);return M}function w(e,u,I,L){var M=E(e,u,I,L);return M.setAttribute("role","presentation"),M}var T;document.createRange?T=function(e,u,I,L){var M=document.createRange();return M.setEnd(L||e,I),M.setStart(e,u),M}:T=function(e,u,I){var L=document.body.createTextRange();try{L.moveToElementText(e.parentNode)}catch(M){return L}return L.collapse(!0),L.moveEnd("character",I),L.moveStart("character",u),L};function R(e,u){if(u.nodeType==3&&(u=u.parentNode),e.contains)return e.contains(u);do if(u.nodeType==11&&(u=u.host),u==e)return!0;while(u=u.parentNode)}function N(){var e;try{e=document.activeElement}catch(u){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function j(e,u){var I=e.className;m(u).test(I)||(e.className+=(I?" ":"")+u)}function W(e,u){for(var I=e.split(" "),L=0;L<I.length;L++)I[L]&&!m(I[L]).test(u)&&(u+=" "+I[L]);return u}var J=function(e){e.select()};l?J=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:A&&(J=function(e){try{e.select()}catch(u){}});function F(e){var u=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,u)}}function k(e,u,I){u||(u={});for(var L in e)e.hasOwnProperty(L)&&(I!==!1||!u.hasOwnProperty(L))&&(u[L]=e[L]);return u}function K(e,u,I,L,M){u==null&&(u=e.search(/[^\s\u00a0]/),u==-1&&(u=e.length));for(var V=L||0,ie=M||0;;){var le=e.indexOf(" ",V);if(le<0||le>=u)return ie+(u-V);ie+=le-V,ie+=I-ie%I,V=le+1}}var Y=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};Y.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Y.prototype.set=function(e,u){this.f=u;var I=+new Date+e;(!this.id||I<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=I)};function H(e,u){for(var I=0;I<e.length;++I)if(e[I]==u)return I;return-1}var Q=50,re={toString:function(){return"CodeMirror.Pass"}},oe={scroll:!1},me={origin:"*mouse"},he={origin:"+move"};function Ee(e,u,I){for(var L=0,M=0;;){var V=e.indexOf(" ",L);V==-1&&(V=e.length);var ie=V-L;if(V==e.length||M+ie>=u)return L+Math.min(ie,u-M);if(M+=V-L,M+=I-M%I,L=V+1,M>=u)return L}}var de=[""];function be(e){for(;de.length<=e;)de.push(Ue(de)+" ");return de[e]}function Ue(e){return e[e.length-1]}function Re(e,u){for(var I=[],L=0;L<e.length;L++)I[L]=u(e[L],L);return I}function De(e,u,I){for(var L=0,M=I(u);L<e.length&&I(e[L])<=M;)L++;e.splice(L,0,u)}function je(){}function ve(e,u){var I;return Object.create?I=Object.create(e):(je.prototype=e,I=new je),u&&k(u,I),I}var ce=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ke(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ce.test(e))}function Ne(e,u){return u?u.source.indexOf("\\w")>-1&&ke(e)?!0:u.test(e):ke(e)}function Je(e){for(var u in e)if(e.hasOwnProperty(u)&&e[u])return!1;return!0}var te=/[\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 P(e){return e.charCodeAt(0)>=768&&te.test(e)}function U(e,u,I){for(;(I<0?u>0:u<e.length)&&P(e.charAt(u));)u+=I;return u}function q(e,u,I){for(var L=u>I?-1:1;;){if(u==I)return u;var M=(u+I)/2,V=L<0?Math.ceil(M):Math.floor(M);if(V==u)return e(V)?u:I;e(V)?I=V:u=V+L}}function X(e,u,I,L){if(!e)return L(u,I,"ltr",0);for(var M=!1,V=0;V<e.length;++V){var ie=e[V];(ie.from<I&&ie.to>u||u==I&&ie.to==u)&&(L(Math.max(ie.from,u),Math.min(ie.to,I),ie.level==1?"rtl":"ltr",V),M=!0)}M||L(u,I,"ltr")}var $=null;function ge(e,u,I){var L;$=null;for(var M=0;M<e.length;++M){var V=e[M];if(V.from<u&&V.to>u)return M;V.to==u&&(V.from!=V.to&&I=="before"?L=M:$=M),V.from==u&&(V.from!=V.to&&I!="before"?L=M:$=M)}return L!=null?L:$}var Ae=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",u="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function I(ye){return ye<=247?e.charAt(ye):1424<=ye&&ye<=1524?"R":1536<=ye&&ye<=1785?u.charAt(ye-1536):1774<=ye&&ye<=2220?"r":8192<=ye&&ye<=8203?"w":ye==8204?"b":"L"}var L=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,M=/[stwN]/,V=/[LRr]/,ie=/[Lb1n]/,le=/[1n]/;function ue(ye,He,Ve){this.level=ye,this.from=He,this.to=Ve}return function(ye,He){var Ve=He=="ltr"?"L":"R";if(ye.length==0||He=="ltr"&&!L.test(ye))return!1;for(var ot=ye.length,nt=[],_t=0;_t<ot;++_t)nt.push(I(ye.charCodeAt(_t)));for(var Ot=0,kt=Ve;Ot<ot;++Ot){var Ht=nt[Ot];Ht=="m"?nt[Ot]=kt:kt=Ht}for(var $t=0,Kt=Ve;$t<ot;++$t){var en=nt[$t];en=="1"&&Kt=="r"?nt[$t]="n":V.test(en)&&(Kt=en,en=="r"&&(nt[$t]="R"))}for(var yn=1,dn=nt[0];yn<ot-1;++yn){var Gn=nt[yn];Gn=="+"&&dn=="1"&&nt[yn+1]=="1"?nt[yn]="1":Gn==","&&dn==nt[yn+1]&&(dn=="1"||dn=="n")&&(nt[yn]=dn),dn=Gn}for(var br=0;br<ot;++br){var Jr=nt[br];if(Jr==",")nt[br]="N";else if(Jr=="%"){var Ar=void 0;for(Ar=br+1;Ar<ot&&nt[Ar]=="%";++Ar);for(var Li=br&&nt[br-1]=="!"||Ar<ot&&nt[Ar]=="1"?"1":"N",Ti=br;Ti<Ar;++Ti)nt[Ti]=Li;br=Ar-1}}for(var Br=0,wi=Ve;Br<ot;++Br){var ti=nt[Br];wi=="L"&&ti=="1"?nt[Br]="L":V.test(ti)&&(wi=ti)}for(var Vr=0;Vr<ot;++Vr)if(M.test(nt[Vr])){var Wr=void 0;for(Wr=Vr+1;Wr<ot&&M.test(nt[Wr]);++Wr);for(var Ir=(Vr?nt[Vr-1]:Ve)=="L",Si=(Wr<ot?nt[Wr]:Ve)=="L",Da=Ir==Si?Ir?"L":"R":Ve,fa=Vr;fa<Wr;++fa)nt[fa]=Da;Vr=Wr-1}for(var li=[],qi,Qr=0;Qr<ot;)if(ie.test(nt[Qr])){var Fo=Qr;for(++Qr;Qr<ot&&ie.test(nt[Qr]);++Qr);li.push(new ue(0,Fo,Qr))}else{var ta=Qr,_a=li.length,ya=He=="rtl"?1:0;for(++Qr;Qr<ot&&nt[Qr]!="L";++Qr);for(var gi=ta;gi<Qr;)if(le.test(nt[gi])){ta<gi&&(li.splice(_a,0,new ue(1,ta,gi)),_a+=ya);var Pa=gi;for(++gi;gi<Qr&&le.test(nt[gi]);++gi);li.splice(_a,0,new ue(2,Pa,gi)),_a+=ya,ta=gi}else++gi;ta<Qr&&li.splice(_a,0,new ue(1,ta,Qr))}return He=="ltr"&&(li[0].level==1&&(qi=ye.match(/^\s+/))&&(li[0].from=qi[0].length,li.unshift(new ue(0,0,qi[0].length))),Ue(li).level==1&&(qi=ye.match(/\s+$/))&&(Ue(li).to-=qi[0].length,li.push(new ue(0,ot-qi[0].length,ot)))),He=="rtl"?li.reverse():li}}();function at(e,u){var I=e.order;return I==null&&(I=e.order=Ae(e.text,u)),I}var Le=[],Me=function(e,u,I){if(e.addEventListener)e.addEventListener(u,I,!1);else if(e.attachEvent)e.attachEvent("on"+u,I);else{var L=e._handlers||(e._handlers={});L[u]=(L[u]||Le).concat(I)}};function Xe(e,u){return e._handlers&&e._handlers[u]||Le}function et(e,u,I){if(e.removeEventListener)e.removeEventListener(u,I,!1);else if(e.detachEvent)e.detachEvent("on"+u,I);else{var L=e._handlers,M=L&&L[u];if(M){var V=H(M,I);V>-1&&(L[u]=M.slice(0,V).concat(M.slice(V+1)))}}}function ze(e,u){var I=Xe(e,u);if(!I.length)return;for(var L=Array.prototype.slice.call(arguments,2),M=0;M<I.length;++M)I[M].apply(null,L)}function Ke(e,u,I){return typeof u=="string"&&(u={type:u,preventDefault:function(){this.defaultPrevented=!0}}),ze(e,I||u.type,e,u),Oe(u)||u.codemirrorIgnore}function Pe(e){var u=e._handlers&&e._handlers.cursorActivity;if(!u)return;for(var I=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),L=0;L<u.length;++L)H(I,u[L])==-1&&I.push(u[L])}function Ie(e,u){return Xe(e,u).length>0}function Ce(e){e.prototype.on=function(u,I){Me(this,u,I)},e.prototype.off=function(u,I){et(this,u,I)}}function pe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Oe(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function we(e){pe(e),_e(e)}function Be(e){return e.target||e.srcElement}function qe(e){var u=e.which;return u==null&&(e.button&1?u=1:e.button&2?u=3:e.button&4&&(u=2)),t&&e.ctrlKey&&u==1&&(u=3),u}var dt=function(){if(A&&C<9)return!1;var e=E("div");return"draggable"in e||"dragDrop"in e}(),Et;function It(e){if(Et==null){var u=E("span","\u200B");f(e,E("span",[u,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Et=u.offsetWidth<=1&&u.offsetHeight>2&&!(A&&C<8))}var I=Et?E("span","\u200B"):E("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return I.setAttribute("cm-text",""),I}var Rt;function Ct(e){if(Rt!=null)return Rt;var u=f(e,document.createTextNode("A\u062EA")),I=T(u,0,1).getBoundingClientRect(),L=T(u,1,2).getBoundingClientRect();return x(e),!I||I.left==I.right?!1:Rt=L.right-I.right<3}var st=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var u=0,I=[],L=e.length;u<=L;){var M=e.indexOf(`
|
|
|
`,u);M==-1&&(M=e.length);var V=e.slice(u,e.charAt(M-1)=="\r"?M-1:M),ie=V.indexOf("\r");ie!=-1?(I.push(V.slice(0,ie)),u+=ie+1):(I.push(V),u=M+1)}return I}:function(e){return e.split(/\r\n?|\n/)},ut=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(u){return!1}}:function(e){var u;try{u=e.ownerDocument.selection.createRange()}catch(I){}return!u||u.parentElement()!=e?!1:u.compareEndPoints("StartToEnd",u)!=0},$e=function(){var e=E("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),xe=null;function Fe(e){if(xe!=null)return xe;var u=f(e,E("span","x")),I=u.getBoundingClientRect(),L=T(u,0,1).getBoundingClientRect();return xe=Math.abs(I.left-L.left)>1}var ct={},tt={};function wt(e,u){arguments.length>2&&(u.dependencies=Array.prototype.slice.call(arguments,2)),ct[e]=u}function St(e,u){tt[e]=u}function Qe(e){if(typeof e=="string"&&tt.hasOwnProperty(e))e=tt[e];else if(e&&typeof e.name=="string"&&tt.hasOwnProperty(e.name)){var u=tt[e.name];typeof u=="string"&&(u={name:u}),e=ve(u,e),e.name=u.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Qe("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Qe("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function lt(e,u){u=Qe(u);var I=ct[u.name];if(!I)return lt(e,"text/plain");var L=I(e,u);if(xt.hasOwnProperty(u.name)){var M=xt[u.name];for(var V in M){if(!M.hasOwnProperty(V))continue;L.hasOwnProperty(V)&&(L["_"+V]=L[V]),L[V]=M[V]}}if(L.name=u.name,u.helperType&&(L.helperType=u.helperType),u.modeProps)for(var ie in u.modeProps)L[ie]=u.modeProps[ie];return L}var xt={};function Pt(e,u){var I=xt.hasOwnProperty(e)?xt[e]:xt[e]={};k(u,I)}function zt(e,u){if(u===!0)return u;if(e.copyState)return e.copyState(u);var I={};for(var L in u){var M=u[L];M instanceof Array&&(M=M.concat([])),I[L]=M}return I}function Se(e,u){for(var I;e.innerMode&&!(I=e.innerMode(u),!I||I.mode==e);)u=I.state,e=I.mode;return I||{mode:e,state:u}}function fe(e,u,I){return e.startState?e.startState(u,I):!0}var G=function(e,u,I){this.pos=this.start=0,this.string=e,this.tabSize=u||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=I};G.prototype.eol=function(){return this.pos>=this.string.length},G.prototype.sol=function(){return this.pos==this.lineStart},G.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},G.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},G.prototype.eat=function(e){var u=this.string.charAt(this.pos),I;if(typeof e=="string"?I=u==e:I=u&&(e.test?e.test(u):e(u)),I)return++this.pos,u},G.prototype.eatWhile=function(e){for(var u=this.pos;this.eat(e););return this.pos>u},G.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},G.prototype.skipToEnd=function(){this.pos=this.string.length},G.prototype.skipTo=function(e){var u=this.string.indexOf(e,this.pos);if(u>-1)return this.pos=u,!0},G.prototype.backUp=function(e){this.pos-=e},G.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=K(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?K(this.string,this.lineStart,this.tabSize):0)},G.prototype.indentation=function(){return K(this.string,null,this.tabSize)-(this.lineStart?K(this.string,this.lineStart,this.tabSize):0)},G.prototype.match=function(e,u,I){if(typeof e=="string"){var L=function(ie){return I?ie.toLowerCase():ie},M=this.string.substr(this.pos,e.length);if(L(M)==L(e))return u!==!1&&(this.pos+=e.length),!0}else{var V=this.string.slice(this.pos).match(e);return V&&V.index>0?null:(V&&u!==!1&&(this.pos+=V[0].length),V)}},G.prototype.current=function(){return this.string.slice(this.start,this.pos)},G.prototype.hideFirstChars=function(e,u){this.lineStart+=e;try{return u()}finally{this.lineStart-=e}},G.prototype.lookAhead=function(e){var u=this.lineOracle;return u&&u.lookAhead(e)},G.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Z(e,u){if(u-=e.first,u<0||u>=e.size)throw new Error("There is no line "+(u+e.first)+" in the document.");for(var I=e;!I.lines;)for(var L=0;;++L){var M=I.children[L],V=M.chunkSize();if(u<V){I=M;break}u-=V}return I.lines[u]}function ne(e,u,I){var L=[],M=u.line;return e.iter(u.line,I.line+1,function(V){var ie=V.text;M==I.line&&(ie=ie.slice(0,I.ch)),M==u.line&&(ie=ie.slice(u.ch)),L.push(ie),++M}),L}function se(e,u,I){var L=[];return e.iter(u,I,function(M){L.push(M.text)}),L}function Te(e,u){var I=u-e.height;if(I)for(var L=e;L;L=L.parent)L.height+=I}function Ge(e){if(e.parent==null)return null;for(var u=e.parent,I=H(u.lines,e),L=u.parent;L;u=L,L=L.parent)for(var M=0;!(L.children[M]==u);++M)I+=L.children[M].chunkSize();return I+u.first}function Ze(e,u){var I=e.first;e:do{for(var L=0;L<e.children.length;++L){var M=e.children[L],V=M.height;if(u<V){e=M;continue e}u-=V,I+=M.chunkSize()}return I}while(!e.lines);for(var ie=0;ie<e.lines.length;++ie){var le=e.lines[ie],ue=le.height;if(u<ue)break;u-=ue}return I+ie}function bt(e,u){return u>=e.first&&u<e.first+e.size}function At(e,u){return String(e.lineNumberFormatter(u+e.firstLineNumber))}function it(e,u,I){if(I===void 0&&(I=null),!(this instanceof it))return new it(e,u,I);this.line=e,this.ch=u,this.sticky=I}function Tt(e,u){return e.line-u.line||e.ch-u.ch}function Qt(e,u){return e.sticky==u.sticky&&Tt(e,u)==0}function yt(e){return it(e.line,e.ch)}function nn(e,u){return Tt(e,u)<0?u:e}function Jt(e,u){return Tt(e,u)<0?e:u}function Nt(e,u){return Math.max(e.first,Math.min(u,e.first+e.size-1))}function vt(e,u){if(u.line<e.first)return it(e.first,0);var I=e.first+e.size-1;return u.line>I?it(I,Z(e,I).text.length):Tn(u,Z(e,u.line).text.length)}function Tn(e,u){var I=e.ch;return I==null||I>u?it(e.line,u):I<0?it(e.line,0):e}function mt(e,u){for(var I=[],L=0;L<u.length;L++)I[L]=vt(e,u[L]);return I}var ln=function(e,u){this.state=e,this.lookAhead=u},fn=function(e,u,I,L){this.state=u,this.doc=e,this.line=I,this.maxLookAhead=L||0,this.baseTokens=null,this.baseTokenPos=1};fn.prototype.lookAhead=function(e){var u=this.doc.getLine(this.line+e);return u!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),u},fn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var u=this.baseTokens[this.baseTokenPos+1];return{type:u&&u.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},fn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},fn.fromSaved=function(e,u,I){return u instanceof ln?new fn(e,zt(e.mode,u.state),I,u.lookAhead):new fn(e,zt(e.mode,u),I)},fn.prototype.save=function(e){var u=e!==!1?zt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ln(u,this.maxLookAhead):u};function Zn(e,u,I,L){var M=[e.state.modeGen],V={};xr(e,u.text,e.doc.mode,I,function(ye,He){return M.push(ye,He)},V,L);for(var ie=I.state,le=function(ye){I.baseTokens=M;var He=e.state.overlays[ye],Ve=1,ot=0;I.state=!0,xr(e,u.text,He.mode,I,function(nt,_t){for(var Ot=Ve;ot<nt;){var kt=M[Ve];kt>nt&&M.splice(Ve,1,nt,M[Ve+1],kt),Ve+=2,ot=Math.min(nt,kt)}if(!_t)return;if(He.opaque)M.splice(Ot,Ve-Ot,nt,"overlay "+_t),Ve=Ot+2;else for(;Ot<Ve;Ot+=2){var Ht=M[Ot+1];M[Ot+1]=(Ht?Ht+" ":"")+"overlay "+_t}},V),I.state=ie,I.baseTokens=null,I.baseTokenPos=1},ue=0;ue<e.state.overlays.length;++ue)le(ue);return{styles:M,classes:V.bgClass||V.textClass?V:null}}function rr(e,u,I){if(!u.styles||u.styles[0]!=e.state.modeGen){var L=xn(e,Ge(u)),M=u.text.length>e.options.maxHighlightLength&&zt(e.doc.mode,L.state),V=Zn(e,u,L);M&&(L.state=M),u.stateAfter=L.save(!M),u.styles=V.styles,V.classes?u.styleClasses=V.classes:u.styleClasses&&(u.styleClasses=null),I===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return u.styles}function xn(e,u,I){var L=e.doc,M=e.display;if(!L.mode.startState)return new fn(L,!0,u);var V=ur(e,u,I),ie=V>L.first&&Z(L,V-1).stateAfter,le=ie?fn.fromSaved(L,ie,V):new fn(L,fe(L.mode),V);return L.iter(V,u,function(ue){Er(e,ue.text,le);var ye=le.line;ue.stateAfter=ye==u-1||ye%5==0||ye>=M.viewFrom&&ye<M.viewTo?le.save():null,le.nextLine()}),I&&(L.modeFrontier=le.line),le}function Er(e,u,I,L){var M=e.doc.mode,V=new G(u,e.options.tabSize,I);for(V.start=V.pos=L||0,u==""&&Or(M,I.state);!V.eol();)un(M,V,I.state),V.start=V.pos}function Or(e,u){if(e.blankLine)return e.blankLine(u);if(!e.innerMode)return;var I=Se(e,u);if(I.mode.blankLine)return I.mode.blankLine(I.state)}function un(e,u,I,L){for(var M=0;M<10;M++){L&&(L[0]=Se(e,I).mode);var V=e.token(u,I);if(u.pos>u.start)return V}throw new Error("Mode "+e.name+" failed to advance stream.")}var Pn=function(e,u,I){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=u||null,this.state=I};function Nr(e,u,I,L){var M=e.doc,V=M.mode,ie;u=vt(M,u);var le=Z(M,u.line),ue=xn(e,u.line,I),ye=new G(le.text,e.options.tabSize,ue),He;for(L&&(He=[]);(L||ye.pos<u.ch)&&!ye.eol();)ye.start=ye.pos,ie=un(V,ye,ue.state),L&&He.push(new Pn(ye,ie,zt(M.mode,ue.state)));return L?He:new Pn(ye,ie,ue.state)}function Xr(e,u){if(e)for(;;){var I=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!I)break;e=e.slice(0,I.index)+e.slice(I.index+I[0].length);var L=I[1]?"bgClass":"textClass";u[L]==null?u[L]=I[2]:new RegExp("(?:^|\\s)"+I[2]+"(?:$|\\s)").test(u[L])||(u[L]+=" "+I[2])}return e}function xr(e,u,I,L,M,V,ie){var le=I.flattenSpans;le==null&&(le=e.options.flattenSpans);var ue=0,ye=null,He=new G(u,e.options.tabSize,L),Ve,ot=e.options.addModeClass&&[null];for(u==""&&Xr(Or(I,L.state),V);!He.eol();){if(He.pos>e.options.maxHighlightLength?(le=!1,ie&&Er(e,u,L,He.pos),He.pos=u.length,Ve=null):Ve=Xr(un(I,He,L.state,ot),V),ot){var nt=ot[0].name;nt&&(Ve="m-"+(Ve?nt+" "+Ve:nt))}if(!le||ye!=Ve){for(;ue<He.start;)ue=Math.min(He.start,ue+5e3),M(ue,ye);ye=Ve}He.start=He.pos}for(;ue<He.pos;){var _t=Math.min(He.pos,ue+5e3);M(_t,ye),ue=_t}}function ur(e,u,I){for(var L,M,V=e.doc,ie=I?-1:u-(e.doc.mode.innerMode?1e3:100),le=u;le>ie;--le){if(le<=V.first)return V.first;var ue=Z(V,le-1),ye=ue.stateAfter;if(ye&&(!I||le+(ye instanceof ln?ye.lookAhead:0)<=V.modeFrontier))return le;var He=K(ue.text,null,e.options.tabSize);(M==null||L>He)&&(M=le-1,L=He)}return M}function vr(e,u){if(e.modeFrontier=Math.min(e.modeFrontier,u),e.highlightFrontier<u-10)return;for(var I=e.first,L=u-1;L>I;L--){var M=Z(e,L).stateAfter;if(M&&(!(M instanceof ln)||L+M.lookAhead<u)){I=L+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,I)}var vi=!1,pr=!1;function _r(){vi=!0}function Cr(){pr=!0}function Hr(e,u,I){this.marker=e,this.from=u,this.to=I}function Tr(e,u){if(e)for(var I=0;I<e.length;++I){var L=e[I];if(L.marker==u)return L}}function ui(e,u){for(var I,L=0;L<e.length;++L)e[L]!=u&&(I||(I=[])).push(e[L]);return I}function Dr(e,u){e.markedSpans=e.markedSpans?e.markedSpans.concat([u]):[u],u.marker.attachLine(e)}function _i(e,u,I){var L;if(e)for(var M=0;M<e.length;++M){var V=e[M],ie=V.marker,le=V.from==null||(ie.inclusiveLeft?V.from<=u:V.from<u);if(le||V.from==u&&ie.type=="bookmark"&&(!I||!V.marker.insertLeft)){var ue=V.to==null||(ie.inclusiveRight?V.to>=u:V.to>u);(L||(L=[])).push(new Hr(ie,V.from,ue?null:V.to))}}return L}function ci(e,u,I){var L;if(e)for(var M=0;M<e.length;++M){var V=e[M],ie=V.marker,le=V.to==null||(ie.inclusiveRight?V.to>=u:V.to>u);if(le||V.from==u&&ie.type=="bookmark"&&(!I||V.marker.insertLeft)){var ue=V.from==null||(ie.inclusiveLeft?V.from<=u:V.from<u);(L||(L=[])).push(new Hr(ie,ue?null:V.from-u,V.to==null?null:V.to-u))}}return L}function ni(e,u){if(u.full)return null;var I=bt(e,u.from.line)&&Z(e,u.from.line).markedSpans,L=bt(e,u.to.line)&&Z(e,u.to.line).markedSpans;if(!I&&!L)return null;var M=u.from.ch,V=u.to.ch,ie=Tt(u.from,u.to)==0,le=_i(I,M,ie),ue=ci(L,V,ie),ye=u.text.length==1,He=Ue(u.text).length+(ye?M:0);if(le)for(var Ve=0;Ve<le.length;++Ve){var ot=le[Ve];if(ot.to==null){var nt=Tr(ue,ot.marker);nt?ye&&(ot.to=nt.to==null?null:nt.to+He):ot.to=M}}if(ue)for(var _t=0;_t<ue.length;++_t){var Ot=ue[_t];if(Ot.to!=null&&(Ot.to+=He),Ot.from==null){var kt=Tr(le,Ot.marker);kt||(Ot.from=He,ye&&(le||(le=[])).push(Ot))}else Ot.from+=He,ye&&(le||(le=[])).push(Ot)}le&&(le=Ii(le)),ue&&ue!=le&&(ue=Ii(ue));var Ht=[le];if(!ye){var $t=u.text.length-2,Kt;if($t>0&&le)for(var en=0;en<le.length;++en)le[en].to==null&&(Kt||(Kt=[])).push(new Hr(le[en].marker,null,null));for(var yn=0;yn<$t;++yn)Ht.push(Kt);Ht.push(ue)}return Ht}function Ii(e){for(var u=0;u<e.length;++u){var I=e[u];I.from!=null&&I.from==I.to&&I.marker.clearWhenEmpty!==!1&&e.splice(u--,1)}return e.length?e:null}function Ni(e,u,I){var L=null;if(e.iter(u.line,I.line+1,function(nt){if(nt.markedSpans)for(var _t=0;_t<nt.markedSpans.length;++_t){var Ot=nt.markedSpans[_t].marker;Ot.readOnly&&(!L||H(L,Ot)==-1)&&(L||(L=[])).push(Ot)}}),!L)return null;for(var M=[{from:u,to:I}],V=0;V<L.length;++V)for(var ie=L[V],le=ie.find(0),ue=0;ue<M.length;++ue){var ye=M[ue];if(Tt(ye.to,le.from)<0||Tt(ye.from,le.to)>0)continue;var He=[ue,1],Ve=Tt(ye.from,le.from),ot=Tt(ye.to,le.to);(Ve<0||!ie.inclusiveLeft&&!Ve)&&He.push({from:ye.from,to:le.from}),(ot>0||!ie.inclusiveRight&&!ot)&&He.push({from:le.to,to:ye.to}),M.splice.apply(M,He),ue+=He.length-3}return M}function Ui(e){var u=e.markedSpans;if(!u)return;for(var I=0;I<u.length;++I)u[I].marker.detachLine(e);e.markedSpans=null}function di(e,u){if(!u)return;for(var I=0;I<u.length;++I)u[I].marker.attachLine(e);e.markedSpans=u}function mr(e){return e.inclusiveLeft?-1:0}function dr(e){return e.inclusiveRight?1:0}function qr(e,u){var I=e.lines.length-u.lines.length;if(I!=0)return I;var L=e.find(),M=u.find(),V=Tt(L.from,M.from)||mr(e)-mr(u);if(V)return-V;var ie=Tt(L.to,M.to)||dr(e)-dr(u);return ie||u.id-e.id}function ri(e,u){var I=pr&&e.markedSpans,L;if(I)for(var M=void 0,V=0;V<I.length;++V)M=I[V],M.marker.collapsed&&(u?M.from:M.to)==null&&(!L||qr(L,M.marker)<0)&&(L=M.marker);return L}function fi(e){return ri(e,!0)}function ii(e){return ri(e,!1)}function Xi(e,u){var I=pr&&e.markedSpans,L;if(I)for(var M=0;M<I.length;++M){var V=I[M];V.marker.collapsed&&(V.from==null||V.from<u)&&(V.to==null||V.to>u)&&(!L||qr(L,V.marker)<0)&&(L=V.marker)}return L}function na(e,u,I,L,M){var V=Z(e,u),ie=pr&&V.markedSpans;if(ie)for(var le=0;le<ie.length;++le){var ue=ie[le];if(!ue.marker.collapsed)continue;var ye=ue.marker.find(0),He=Tt(ye.from,I)||mr(ue.marker)-mr(M),Ve=Tt(ye.to,L)||dr(ue.marker)-dr(M);if(He>=0&&Ve<=0||He<=0&&Ve>=0)continue;if(He<=0&&(ue.marker.inclusiveRight&&M.inclusiveLeft?Tt(ye.to,I)>=0:Tt(ye.to,I)>0)||He>=0&&(ue.marker.inclusiveRight&&M.inclusiveLeft?Tt(ye.from,L)<=0:Tt(ye.from,L)<0))return!0}}function ai(e){for(var u;u=fi(e);)e=u.find(-1,!0).line;return e}function Yi(e){for(var u;u=ii(e);)e=u.find(1,!0).line;return e}function Zr(e){for(var u,I;u=ii(e);)e=u.find(1,!0).line,(I||(I=[])).push(e);return I}function Wi(e,u){var I=Z(e,u),L=ai(I);return I==L?u:Ge(L)}function Di(e,u){if(u>e.lastLine())return u;var I=Z(e,u),L;if(!Oi(e,I))return u;for(;L=ii(I);)I=L.find(1,!0).line;return Ge(I)+1}function Oi(e,u){var I=pr&&u.markedSpans;if(I)for(var L=void 0,M=0;M<I.length;++M){if(L=I[M],!L.marker.collapsed)continue;if(L.from==null)return!0;if(L.marker.widgetNode)continue;if(L.from==0&&L.marker.inclusiveLeft&&$i(e,u,L))return!0}}function $i(e,u,I){if(I.to==null){var L=I.marker.find(1,!0);return $i(e,L.line,Tr(L.line.markedSpans,I.marker))}if(I.marker.inclusiveRight&&I.to==u.text.length)return!0;for(var M=void 0,V=0;V<u.markedSpans.length;++V)if(M=u.markedSpans[V],M.marker.collapsed&&!M.marker.widgetNode&&M.from==I.to&&(M.to==null||M.to!=I.from)&&(M.marker.inclusiveLeft||I.marker.inclusiveRight)&&$i(e,u,M))return!0}function yi(e){e=ai(e);for(var u=0,I=e.parent,L=0;L<I.lines.length;++L){var M=I.lines[L];if(M==e)break;u+=M.height}for(var V=I.parent;V;I=V,V=I.parent)for(var ie=0;ie<V.children.length;++ie){var le=V.children[ie];if(le==I)break;u+=le.height}return u}function Ji(e){if(e.height==0)return 0;for(var u=e.text.length,I,L=e;I=fi(L);){var M=I.find(0,!0);L=M.from.line,u+=M.from.ch-M.to.ch}for(L=e;I=ii(L);){var V=I.find(0,!0);u-=L.text.length-V.from.ch,L=V.to.line,u+=L.text.length-V.to.ch}return u}function Qi(e){var u=e.display,I=e.doc;u.maxLine=Z(I,I.first),u.maxLineLength=Ji(u.maxLine),u.maxLineChanged=!0,I.iter(function(L){var M=Ji(L);M>u.maxLineLength&&(u.maxLineLength=M,u.maxLine=L)})}var hi=function(e,u,I){this.text=e,di(this,u),this.height=I?I(this):1};hi.prototype.lineNo=function(){return Ge(this)},Ce(hi);function Zi(e,u,I,L){e.text=u,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Ui(e),di(e,I);var M=L?L(e):1;M!=e.height&&Te(e,M)}function tn(e){e.parent=null,Ui(e)}var _n={},an={};function Ln(e,u){if(!e||/^\s*$/.test(e))return null;var I=u.addModeClass?an:_n;return I[e]||(I[e]=e.replace(/\S+/g,"cm-$&"))}function Xn(e,u){var I=w("span",null,null,h?"padding-right: .1px":null),L={pre:w("pre",[I],"CodeMirror-line"),content:I,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};u.measure={};for(var M=0;M<=(u.rest?u.rest.length:0);M++){var V=M?u.rest[M-1]:u.line,ie=void 0;L.pos=0,L.addToken=Xt,Ct(e.display.measure)&&(ie=at(V,e.doc.direction))&&(L.addToken=Kr(L.addToken,ie)),L.map=[];var le=u!=e.display.externalMeasured&&Ge(V);Ci(V,L,rr(e,V,le)),V.styleClasses&&(V.styleClasses.bgClass&&(L.bgClass=W(V.styleClasses.bgClass,L.bgClass||"")),V.styleClasses.textClass&&(L.textClass=W(V.styleClasses.textClass,L.textClass||""))),L.map.length==0&&L.map.push(0,0,L.content.appendChild(It(e.display.measure))),M==0?(u.measure.map=L.map,u.measure.cache={}):((u.measure.maps||(u.measure.maps=[])).push(L.map),(u.measure.caches||(u.measure.caches=[])).push({}))}if(h){var ue=L.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(L.content.className="cm-tab-wrap-hack")}return ze(e,"renderLine",e,u.line,L.pre),L.pre.className&&(L.textClass=W(L.pre.className,L.textClass||"")),L}function or(e){var u=E("span","\u2022","cm-invalidchar");return u.title="\\u"+e.charCodeAt(0).toString(16),u.setAttribute("aria-label",u.title),u}function Xt(e,u,I,L,M,V,ie){if(!u)return;var le=e.splitSpaces?yr(u,e.trailingSpace):u,ue=e.cm.state.specialChars,ye=!1,He;if(!ue.test(u))e.col+=u.length,He=document.createTextNode(le),e.map.push(e.pos,e.pos+u.length,He),A&&C<9&&(ye=!0),e.pos+=u.length;else{He=document.createDocumentFragment();for(var Ve=0;;){ue.lastIndex=Ve;var ot=ue.exec(u),nt=ot?ot.index-Ve:u.length-Ve;if(nt){var _t=document.createTextNode(le.slice(Ve,Ve+nt));A&&C<9?He.appendChild(E("span",[_t])):He.appendChild(_t),e.map.push(e.pos,e.pos+nt,_t),e.col+=nt,e.pos+=nt}if(!ot)break;Ve+=nt+1;var Ot=void 0;if(ot[0]==" "){var kt=e.cm.options.tabSize,Ht=kt-e.col%kt;Ot=He.appendChild(E("span",be(Ht),"cm-tab")),Ot.setAttribute("role","presentation"),Ot.setAttribute("cm-text"," "),e.col+=Ht}else ot[0]=="\r"||ot[0]==`
|
|
|
`?(Ot=He.appendChild(E("span",ot[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ot.setAttribute("cm-text",ot[0]),e.col+=1):(Ot=e.cm.options.specialCharPlaceholder(ot[0]),Ot.setAttribute("cm-text",ot[0]),A&&C<9?He.appendChild(E("span",[Ot])):He.appendChild(Ot),e.col+=1);e.map.push(e.pos,e.pos+1,Ot),e.pos++}}if(e.trailingSpace=le.charCodeAt(u.length-1)==32,I||L||M||ye||V||ie){var $t=I||"";L&&($t+=L),M&&($t+=M);var Kt=E("span",[He],$t,V);if(ie)for(var en in ie)ie.hasOwnProperty(en)&&en!="style"&&en!="class"&&Kt.setAttribute(en,ie[en]);return e.content.appendChild(Kt)}e.content.appendChild(He)}function yr(e,u){if(e.length>1&&!/ /.test(e))return e;for(var I=u,L="",M=0;M<e.length;M++){var V=e.charAt(M);V==" "&&I&&(M==e.length-1||e.charCodeAt(M+1)==32)&&(V="\xA0"),L+=V,I=V==" "}return L}function Kr(e,u){return function(I,L,M,V,ie,le,ue){M=M?M+" cm-force-border":"cm-force-border";for(var ye=I.pos,He=ye+L.length;;){for(var Ve=void 0,ot=0;ot<u.length&&!(Ve=u[ot],Ve.to>ye&&Ve.from<=ye);ot++);if(Ve.to>=He)return e(I,L,M,V,ie,le,ue);e(I,L.slice(0,Ve.to-ye),M,V,null,le,ue),V=null,L=L.slice(Ve.to-ye),ye=Ve.to}}}function Mn(e,u,I,L){var M=!L&&I.widgetNode;M&&e.map.push(e.pos,e.pos+u,M),!L&&e.cm.display.input.needsContentAttribute&&(M||(M=e.content.appendChild(document.createElement("span"))),M.setAttribute("cm-marker",I.id)),M&&(e.cm.display.input.setUneditable(M),e.content.appendChild(M)),e.pos+=u,e.trailingSpace=!1}function Ci(e,u,I){var L=e.markedSpans,M=e.text,V=0;if(!L){for(var ie=1;ie<I.length;ie+=2)u.addToken(u,M.slice(V,V=I[ie]),Ln(I[ie+1],u.cm.options));return}for(var le=M.length,ue=0,ye=1,He="",Ve,ot,nt=0,_t,Ot,kt,Ht,$t;;){if(nt==ue){_t=Ot=kt=ot="",$t=null,Ht=null,nt=Infinity;for(var Kt=[],en=void 0,yn=0;yn<L.length;++yn){var dn=L[yn],Gn=dn.marker;if(Gn.type=="bookmark"&&dn.from==ue&&Gn.widgetNode)Kt.push(Gn);else if(dn.from<=ue&&(dn.to==null||dn.to>ue||Gn.collapsed&&dn.to==ue&&dn.from==ue)){if(dn.to!=null&&dn.to!=ue&&nt>dn.to&&(nt=dn.to,Ot=""),Gn.className&&(_t+=" "+Gn.className),Gn.css&&(ot=(ot?ot+";":"")+Gn.css),Gn.startStyle&&dn.from==ue&&(kt+=" "+Gn.startStyle),Gn.endStyle&&dn.to==nt&&(en||(en=[])).push(Gn.endStyle,dn.to),Gn.title&&(($t||($t={})).title=Gn.title),Gn.attributes)for(var br in Gn.attributes)($t||($t={}))[br]=Gn.attributes[br];Gn.collapsed&&(!Ht||qr(Ht.marker,Gn)<0)&&(Ht=dn)}else dn.from>ue&&nt>dn.from&&(nt=dn.from)}if(en)for(var Jr=0;Jr<en.length;Jr+=2)en[Jr+1]==nt&&(Ot+=" "+en[Jr]);if(!Ht||Ht.from==ue)for(var Ar=0;Ar<Kt.length;++Ar)Mn(u,0,Kt[Ar]);if(Ht&&(Ht.from||0)==ue){if(Mn(u,(Ht.to==null?le+1:Ht.to)-ue,Ht.marker,Ht.from==null),Ht.to==null)return;Ht.to==ue&&(Ht=!1)}}if(ue>=le)break;for(var Li=Math.min(le,nt);;){if(He){var Ti=ue+He.length;if(!Ht){var Br=Ti>Li?He.slice(0,Li-ue):He;u.addToken(u,Br,Ve?Ve+_t:_t,kt,ue+Br.length==nt?Ot:"",ot,$t)}if(Ti>=Li){He=He.slice(Li-ue),ue=Li;break}ue=Ti,kt=""}He=M.slice(V,V=I[ye++]),Ve=Ln(I[ye++],u.cm.options)}}}function nr(e,u,I){this.line=u,this.rest=Zr(u),this.size=this.rest?Ge(Ue(this.rest))-I+1:1,this.node=this.text=null,this.hidden=Oi(e,u)}function Ur(e,u,I){for(var L=[],M,V=u;V<I;V=M){var ie=new nr(e.doc,Z(e.doc,V),V);M=V+ie.size,L.push(ie)}return L}var rt=null;function pt(e){rt?rt.ops.push(e):e.ownsGroup=rt={ops:[e],delayedCallbacks:[]}}function Mt(e){var u=e.delayedCallbacks,I=0;do{for(;I<u.length;I++)u[I].call(null);for(var L=0;L<e.ops.length;L++){var M=e.ops[L];if(M.cursorActivityHandlers)for(;M.cursorActivityCalled<M.cursorActivityHandlers.length;)M.cursorActivityHandlers[M.cursorActivityCalled++].call(null,M.cm)}}while(I<u.length)}function Dt(e,u){var I=e.ownsGroup;if(!I)return;try{Mt(I)}finally{rt=null,u(I)}}var Gt=null;function Ft(e,u){var I=Xe(e,u);if(!I.length)return;var L=Array.prototype.slice.call(arguments,2),M;rt?M=rt.delayedCallbacks:Gt?M=Gt:(M=Gt=[],setTimeout(ht,0));for(var V=function(le){M.push(function(){return I[le].apply(null,L)})},ie=0;ie<I.length;++ie)V(ie)}function ht(){var e=Gt;Gt=null;for(var u=0;u<e.length;++u)e[u]()}function ft(e,u,I,L){for(var M=0;M<u.changes.length;M++){var V=u.changes[M];V=="text"?Lt(e,u):V=="gutter"?Fn(e,u,I,L):V=="class"?rn(e,u):V=="widget"&&wn(e,u,L)}u.changes=null}function Bt(e){return e.node==e.text&&(e.node=E("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),A&&C<8&&(e.node.style.zIndex=2)),e.node}function gt(e,u){var I=u.bgClass?u.bgClass+" "+(u.line.bgClass||""):u.line.bgClass;if(I&&(I+=" CodeMirror-linebackground"),u.background)I?u.background.className=I:(u.background.parentNode.removeChild(u.background),u.background=null);else if(I){var L=Bt(u);u.background=L.insertBefore(E("div",null,I),L.firstChild),e.display.input.setUneditable(u.background)}}function Zt(e,u){var I=e.display.externalMeasured;return I&&I.line==u.line?(e.display.externalMeasured=null,u.measure=I.measure,I.built):Xn(e,u)}function Lt(e,u){var I=u.text.className,L=Zt(e,u);u.text==u.node&&(u.node=L.pre),u.text.parentNode.replaceChild(L.pre,u.text),u.text=L.pre,L.bgClass!=u.bgClass||L.textClass!=u.textClass?(u.bgClass=L.bgClass,u.textClass=L.textClass,rn(e,u)):I&&(u.text.className=I)}function rn(e,u){gt(e,u),u.line.wrapClass?Bt(u).className=u.line.wrapClass:u.node!=u.text&&(u.node.className="");var I=u.textClass?u.textClass+" "+(u.line.textClass||""):u.line.textClass;u.text.className=I||""}function Fn(e,u,I,L){if(u.gutter&&(u.node.removeChild(u.gutter),u.gutter=null),u.gutterBackground&&(u.node.removeChild(u.gutterBackground),u.gutterBackground=null),u.line.gutterClass){var M=Bt(u);u.gutterBackground=E("div",null,"CodeMirror-gutter-background "+u.line.gutterClass,"left: "+(e.options.fixedGutter?L.fixedPos:-L.gutterTotalWidth)+"px; width: "+L.gutterTotalWidth+"px"),e.display.input.setUneditable(u.gutterBackground),M.insertBefore(u.gutterBackground,u.text)}var V=u.line.gutterMarkers;if(e.options.lineNumbers||V){var ie=Bt(u),le=u.gutter=E("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?L.fixedPos:-L.gutterTotalWidth)+"px");if(e.display.input.setUneditable(le),ie.insertBefore(le,u.text),u.line.gutterClass&&(le.className+=" "+u.line.gutterClass),e.options.lineNumbers&&(!V||!V["CodeMirror-linenumbers"])&&(u.lineNumber=le.appendChild(E("div",At(e.options,I),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+L.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),V)for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var ye=e.display.gutterSpecs[ue].className,He=V.hasOwnProperty(ye)&&V[ye];He&&le.appendChild(E("div",[He],"CodeMirror-gutter-elt","left: "+L.gutterLeft[ye]+"px; width: "+L.gutterWidth[ye]+"px"))}}}function wn(e,u,I){u.alignable&&(u.alignable=null);for(var L=m("CodeMirror-linewidget"),M=u.node.firstChild,V=void 0;M;M=V)V=M.nextSibling,L.test(M.className)&&u.node.removeChild(M);zn(e,u,I)}function gn(e,u,I,L){var M=Zt(e,u);return u.text=u.node=M.pre,M.bgClass&&(u.bgClass=M.bgClass),M.textClass&&(u.textClass=M.textClass),rn(e,u),Fn(e,u,I,L),zn(e,u,L),u.node}function zn(e,u,I){if(Sn(e,u.line,u,I,!0),u.rest)for(var L=0;L<u.rest.length;L++)Sn(e,u.rest[L],u,I,!1)}function Sn(e,u,I,L,M){if(!u.widgets)return;for(var V=Bt(I),ie=0,le=u.widgets;ie<le.length;++ie){var ue=le[ie],ye=E("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||ye.setAttribute("cm-ignore-events","true"),Bn(ue,ye,I,L),e.display.input.setUneditable(ye),M&&ue.above?V.insertBefore(ye,I.gutter||I.text):V.appendChild(ye),Ft(ue,"redraw")}}function Bn(e,u,I,L){if(e.noHScroll){(I.alignable||(I.alignable=[])).push(u);var M=L.wrapperWidth;u.style.left=L.fixedPos+"px",e.coverGutter||(M-=L.gutterTotalWidth,u.style.paddingLeft=L.gutterTotalWidth+"px"),u.style.width=M+"px"}e.coverGutter&&(u.style.zIndex=5,u.style.position="relative",e.noHScroll||(u.style.marginLeft=-L.gutterTotalWidth+"px"))}function kn(e){if(e.height!=null)return e.height;var u=e.doc.cm;if(!u)return 0;if(!R(document.body,e.node)){var I="position: relative;";e.coverGutter&&(I+="margin-left: -"+u.display.gutters.offsetWidth+"px;"),e.noHScroll&&(I+="width: "+u.display.wrapper.clientWidth+"px;"),f(u.display.measure,E("div",[e.node],null,I))}return e.height=e.node.parentNode.offsetHeight}function ir(e,u){for(var I=Be(u);I!=e.wrapper;I=I.parentNode)if(!I||I.nodeType==1&&I.getAttribute("cm-ignore-events")=="true"||I.parentNode==e.sizer&&I!=e.mover)return!0}function Vn(e){return e.lineSpace.offsetTop}function cr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function gr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var u=f(e.measure,E("pre","x","CodeMirror-line-like")),I=window.getComputedStyle?window.getComputedStyle(u):u.currentStyle,L={left:parseInt(I.paddingLeft),right:parseInt(I.paddingRight)};return!isNaN(L.left)&&!isNaN(L.right)&&(e.cachedPaddingH=L),L}function er(e){return Q-e.display.nativeBarWidth}function In(e){return e.display.scroller.clientWidth-er(e)-e.display.barWidth}function Qn(e){return e.display.scroller.clientHeight-er(e)-e.display.barHeight}function Dn(e,u,I){var L=e.options.lineWrapping,M=L&&In(e);if(!u.measure.heights||L&&u.measure.width!=M){var V=u.measure.heights=[];if(L){u.measure.width=M;for(var ie=u.text.firstChild.getClientRects(),le=0;le<ie.length-1;le++){var ue=ie[le],ye=ie[le+1];Math.abs(ue.bottom-ye.bottom)>2&&V.push((ue.bottom+ye.top)/2-I.top)}}V.push(I.bottom-I.top)}}function jt(e,u,I){if(e.line==u)return{map:e.measure.map,cache:e.measure.cache};for(var L=0;L<e.rest.length;L++)if(e.rest[L]==u)return{map:e.measure.maps[L],cache:e.measure.caches[L]};for(var M=0;M<e.rest.length;M++)if(Ge(e.rest[M])>I)return{map:e.measure.maps[M],cache:e.measure.caches[M],before:!0}}function cn(e,u){u=ai(u);var I=Ge(u),L=e.display.externalMeasured=new nr(e.doc,u,I);L.lineN=I;var M=L.built=Xn(e,L);return L.text=M.pre,f(e.display.lineMeasure,M.pre),L}function tr(e,u,I,L){return On(e,qn(e,u),I,L)}function sr(e,u){if(u>=e.display.viewFrom&&u<e.display.viewTo)return e.display.view[Gr(e,u)];var I=e.display.externalMeasured;if(I&&u>=I.lineN&&u<I.lineN+I.size)return I}function qn(e,u){var I=Ge(u),L=sr(e,I);L&&!L.text?L=null:L&&L.changes&&(ft(e,L,I,Jn(e)),e.curOp.forceUpdate=!0),L||(L=cn(e,u));var M=jt(L,u,I);return{line:u,view:L,rect:null,map:M.map,cache:M.cache,before:M.before,hasHeights:!1}}function On(e,u,I,L,M){u.before&&(I=-1);var V=I+(L||""),ie;return u.cache.hasOwnProperty(V)?ie=u.cache[V]:(u.rect||(u.rect=u.view.text.getBoundingClientRect()),u.hasHeights||(Dn(e,u.view,u.rect),u.hasHeights=!0),ie=Ut(e,u,I,L),ie.bogus||(u.cache[V]=ie)),{left:ie.left,right:ie.right,top:M?ie.rtop:ie.top,bottom:M?ie.rbottom:ie.bottom}}var Wn={left:0,right:0,top:0,bottom:0};function on(e,u,I){for(var L,M,V,ie,le,ue,ye=0;ye<e.length;ye+=3)if(le=e[ye],ue=e[ye+1],u<le?(M=0,V=1,ie="left"):u<ue?(M=u-le,V=M+1):(ye==e.length-3||u==ue&&e[ye+3]>u)&&(V=ue-le,M=V-1,u>=ue&&(ie="right")),M!=null){if(L=e[ye+2],le==ue&&I==(L.insertLeft?"left":"right")&&(ie=I),I=="left"&&M==0)for(;ye&&e[ye-2]==e[ye-3]&&e[ye-1].insertLeft;)L=e[(ye-=3)+2],ie="left";if(I=="right"&&M==ue-le)for(;ye<e.length-3&&e[ye+3]==e[ye+4]&&!e[ye+5].insertLeft;)L=e[(ye+=3)+2],ie="right";break}return{node:L,start:M,end:V,collapse:ie,coverStart:le,coverEnd:ue}}function bn(e,u){var I=Wn;if(u=="left")for(var L=0;L<e.length&&!((I=e[L]).left!=I.right);L++);else for(var M=e.length-1;M>=0&&!((I=e[M]).left!=I.right);M--);return I}function Ut(e,u,I,L){var M=on(u.map,I,L),V=M.node,ie=M.start,le=M.end,ue=M.collapse,ye;if(V.nodeType==3){for(var He=0;He<4;He++){for(;ie&&P(u.line.text.charAt(M.coverStart+ie));)--ie;for(;M.coverStart+le<M.coverEnd&&P(u.line.text.charAt(M.coverStart+le));)++le;if(A&&C<9&&ie==0&&le==M.coverEnd-M.coverStart?ye=V.parentNode.getBoundingClientRect():ye=bn(T(V,ie,le).getClientRects(),L),ye.left||ye.right||ie==0)break;le=ie,ie=ie-1,ue="right"}A&&C<11&&(ye=Wt(e.display.measure,ye))}else{ie>0&&(ue=L="right");var Ve;e.options.lineWrapping&&(Ve=V.getClientRects()).length>1?ye=Ve[L=="right"?Ve.length-1:0]:ye=V.getBoundingClientRect()}if(A&&C<9&&!ie&&(!ye||!ye.left&&!ye.right)){var ot=V.parentNode.getClientRects()[0];ot?ye={left:ot.left,right:ot.left+jn(e.display),top:ot.top,bottom:ot.bottom}:ye=Wn}for(var nt=ye.top-u.rect.top,_t=ye.bottom-u.rect.top,Ot=(nt+_t)/2,kt=u.view.measure.heights,Ht=0;Ht<kt.length-1&&!(Ot<kt[Ht]);Ht++);var $t=Ht?kt[Ht-1]:0,Kt=kt[Ht],en={left:(ue=="right"?ye.right:ye.left)-u.rect.left,right:(ue=="left"?ye.left:ye.right)-u.rect.left,top:$t,bottom:Kt};return!ye.left&&!ye.right&&(en.bogus=!0),e.options.singleCursorHeightPerLine||(en.rtop=nt,en.rbottom=_t),en}function Wt(e,u){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Fe(e))return u;var I=screen.logicalXDPI/screen.deviceXDPI,L=screen.logicalYDPI/screen.deviceYDPI;return{left:u.left*I,right:u.right*I,top:u.top*L,bottom:u.bottom*L}}function Yt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var u=0;u<e.rest.length;u++)e.measure.caches[u]={}}function hn(e){e.display.externalMeasure=null,x(e.display.lineMeasure);for(var u=0;u<e.display.view.length;u++)Yt(e.display.view[u])}function qt(e){hn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Nn(){return c&&a?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function pn(){return c&&a?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Cn(e){var u=0;if(e.widgets)for(var I=0;I<e.widgets.length;++I)e.widgets[I].above&&(u+=kn(e.widgets[I]));return u}function vn(e,u,I,L,M){if(!M){var V=Cn(u);I.top+=V,I.bottom+=V}if(L=="line")return I;L||(L="local");var ie=yi(u);if(L=="local"?ie+=Vn(e.display):ie-=e.display.viewOffset,L=="page"||L=="window"){var le=e.display.lineSpace.getBoundingClientRect();ie+=le.top+(L=="window"?0:pn());var ue=le.left+(L=="window"?0:Nn());I.left+=ue,I.right+=ue}return I.top+=ie,I.bottom+=ie,I}function ar(e,u,I){if(I=="div")return u;var L=u.left,M=u.top;if(I=="page")L-=Nn(),M-=pn();else if(I=="local"||!I){var V=e.display.sizer.getBoundingClientRect();L+=V.left,M+=V.top}var ie=e.display.lineSpace.getBoundingClientRect();return{left:L-ie.left,top:M-ie.top}}function Yn(e,u,I,L,M){return L||(L=Z(e.doc,u.line)),vn(e,L,tr(e,L,u.ch,M),I)}function $n(e,u,I,L,M,V){L=L||Z(e.doc,u.line),M||(M=qn(e,L));function ie(_t,Ot){var kt=On(e,M,_t,Ot?"right":"left",V);return Ot?kt.left=kt.right:kt.right=kt.left,vn(e,L,kt,I)}var le=at(L,e.doc.direction),ue=u.ch,ye=u.sticky;if(ue>=L.text.length?(ue=L.text.length,ye="before"):ue<=0&&(ue=0,ye="after"),!le)return ie(ye=="before"?ue-1:ue,ye=="before");function He(_t,Ot,kt){var Ht=le[Ot],$t=Ht.level==1;return ie(kt?_t-1:_t,$t!=kt)}var Ve=ge(le,ue,ye),ot=$,nt=He(ue,Ve,ye=="before");return ot!=null&&(nt.other=He(ue,ot,ye!="before")),nt}function wr(e,u){var I=0;u=vt(e.doc,u),e.options.lineWrapping||(I=jn(e.display)*u.ch);var L=Z(e.doc,u.line),M=yi(L)+Vn(e.display);return{left:I,right:I,top:M,bottom:M+L.height}}function jr(e,u,I,L,M){var V=it(e,u,I);return V.xRel=M,L&&(V.outside=L),V}function Ai(e,u,I){var L=e.doc;if(I+=e.display.viewOffset,I<0)return jr(L.first,0,null,-1,-1);var M=Ze(L,I),V=L.first+L.size-1;if(M>V)return jr(L.first+L.size-1,Z(L,V).text.length,null,1,1);u<0&&(u=0);for(var ie=Z(L,M);;){var le=Ki(e,ie,M,u,I),ue=Xi(ie,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ue)return le;var ye=ue.find(1);if(ye.line==M)return ye;ie=Z(L,M=ye.line)}}function zr(e,u,I,L){L-=Cn(u);var M=u.text.length,V=q(function(ie){return On(e,I,ie-1).bottom<=L},M,0);return M=q(function(ie){return On(e,I,ie).top>L},V,M),{begin:V,end:M}}function Pi(e,u,I,L){I||(I=qn(e,u));var M=vn(e,u,On(e,I,L),"line").top;return zr(e,u,I,M)}function Hi(e,u,I,L){return e.bottom<=I?!1:e.top>I?!0:(L?e.left:e.right)>u}function Ki(e,u,I,L,M){M-=yi(u);var V=qn(e,u),ie=Cn(u),le=0,ue=u.text.length,ye=!0,He=at(u,e.doc.direction);if(He){var Ve=(e.options.lineWrapping?ba:ji)(e,u,I,V,He,L,M);ye=Ve.level!=1,le=ye?Ve.from:Ve.to-1,ue=ye?Ve.to:Ve.from-1}var ot=null,nt=null,_t=q(function(yn){var dn=On(e,V,yn);return dn.top+=ie,dn.bottom+=ie,Hi(dn,L,M,!1)?(dn.top<=M&&dn.left<=L&&(ot=yn,nt=dn),!0):!1},le,ue),Ot,kt,Ht=!1;if(nt){var $t=L-nt.left<nt.right-L,Kt=$t==ye;_t=ot+(Kt?0:1),kt=Kt?"after":"before",Ot=$t?nt.left:nt.right}else{!ye&&(_t==ue||_t==le)&&_t++,kt=_t==0?"after":_t==u.text.length?"before":On(e,V,_t-(ye?1:0)).bottom+ie<=M==ye?"after":"before";var en=$n(e,it(I,_t,kt),"line",u,V);Ot=en.left,Ht=M<en.top?-1:M>=en.bottom?1:0}return _t=U(u.text,_t,1),jr(I,_t,kt,Ht,L-Ot)}function ji(e,u,I,L,M,V,ie){var le=q(function(Ve){var ot=M[Ve],nt=ot.level!=1;return Hi($n(e,it(I,nt?ot.to:ot.from,nt?"before":"after"),"line",u,L),V,ie,!0)},0,M.length-1),ue=M[le];if(le>0){var ye=ue.level!=1,He=$n(e,it(I,ye?ue.from:ue.to,ye?"after":"before"),"line",u,L);Hi(He,V,ie,!0)&&He.top>ie&&(ue=M[le-1])}return ue}function ba(e,u,I,L,M,V,ie){var le=zr(e,u,L,ie),ue=le.begin,ye=le.end;/\s/.test(u.text.charAt(ye-1))&&ye--;for(var He=null,Ve=null,ot=0;ot<M.length;ot++){var nt=M[ot];if(nt.from>=ye||nt.to<=ue)continue;var _t=nt.level!=1,Ot=On(e,L,_t?Math.min(ye,nt.to)-1:Math.max(ue,nt.from)).right,kt=Ot<V?V-Ot+1e9:Ot-V;(!He||Ve>kt)&&(He=nt,Ve=kt)}return He||(He=M[M.length-1]),He.from<ue&&(He={from:ue,to:He.to,level:He.level}),He.to>ye&&(He={from:He.from,to:ye,level:He.level}),He}var Un;function mn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Un==null){Un=E("pre",null,"CodeMirror-line-like");for(var u=0;u<49;++u)Un.appendChild(document.createTextNode("x")),Un.appendChild(E("br"));Un.appendChild(document.createTextNode("x"))}f(e.measure,Un);var I=Un.offsetHeight/50;return I>3&&(e.cachedTextHeight=I),x(e.measure),I||1}function jn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var u=E("span","xxxxxxxxxx"),I=E("pre",[u],"CodeMirror-line-like");f(e.measure,I);var L=u.getBoundingClientRect(),M=(L.right-L.left)/10;return M>2&&(e.cachedCharWidth=M),M||10}function Jn(e){for(var u=e.display,I={},L={},M=u.gutters.clientLeft,V=u.gutters.firstChild,ie=0;V;V=V.nextSibling,++ie){var le=e.display.gutterSpecs[ie].className;I[le]=V.offsetLeft+V.clientLeft+M,L[le]=V.clientWidth}return{fixedPos:Rr(u),gutterTotalWidth:u.gutters.offsetWidth,gutterLeft:I,gutterWidth:L,wrapperWidth:u.wrapper.clientWidth}}function Rr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Hn(e){var u=mn(e.display),I=e.options.lineWrapping,L=I&&Math.max(5,e.display.scroller.clientWidth/jn(e.display)-3);return function(M){if(Oi(e.doc,M))return 0;var V=0;if(M.widgets)for(var ie=0;ie<M.widgets.length;ie++)M.widgets[ie].height&&(V+=M.widgets[ie].height);return I?V+(Math.ceil(M.text.length/L)||1)*u:V+u}}function bi(e){var u=e.doc,I=Hn(e);u.iter(function(L){var M=I(L);M!=L.height&&Te(L,M)})}function pi(e,u,I,L){var M=e.display;if(!I&&Be(u).getAttribute("cm-not-content")=="true")return null;var V,ie,le=M.lineSpace.getBoundingClientRect();try{V=u.clientX-le.left,ie=u.clientY-le.top}catch(Ve){return null}var ue=Ai(e,V,ie),ye;if(L&&ue.xRel>0&&(ye=Z(e.doc,ue.line).text).length==ue.ch){var He=K(ye,ye.length,e.options.tabSize)-ye.length;ue=it(ue.line,Math.max(0,Math.round((V-gr(e.display).left)/jn(e.display))-He))}return ue}function Gr(e,u){if(u>=e.display.viewTo)return null;if(u-=e.display.viewFrom,u<0)return null;for(var I=e.display.view,L=0;L<I.length;L++)if(u-=I[L].size,u<0)return L}function Pr(e,u,I,L){u==null&&(u=e.doc.first),I==null&&(I=e.doc.first+e.doc.size),L||(L=0);var M=e.display;if(L&&I<M.viewTo&&(M.updateLineNumbers==null||M.updateLineNumbers>u)&&(M.updateLineNumbers=u),e.curOp.viewChanged=!0,u>=M.viewTo)pr&&Wi(e.doc,u)<M.viewTo&&ei(e);else if(I<=M.viewFrom)pr&&Di(e.doc,I+L)>M.viewFrom?ei(e):(M.viewFrom+=L,M.viewTo+=L);else if(u<=M.viewFrom&&I>=M.viewTo)ei(e);else if(u<=M.viewFrom){var V=Rn(e,I,I+L,1);V?(M.view=M.view.slice(V.index),M.viewFrom=V.lineN,M.viewTo+=L):ei(e)}else if(I>=M.viewTo){var ie=Rn(e,u,u,-1);ie?(M.view=M.view.slice(0,ie.index),M.viewTo=ie.lineN):ei(e)}else{var le=Rn(e,u,u,-1),ue=Rn(e,I,I+L,1);le&&ue?(M.view=M.view.slice(0,le.index).concat(Ur(e,le.lineN,ue.lineN)).concat(M.view.slice(ue.index)),M.viewTo+=L):ei(e)}var ye=M.externalMeasured;ye&&(I<ye.lineN?ye.lineN+=L:u<ye.lineN+ye.size&&(M.externalMeasured=null))}function oi(e,u,I){e.curOp.viewChanged=!0;var L=e.display,M=e.display.externalMeasured;if(M&&u>=M.lineN&&u<M.lineN+M.size&&(L.externalMeasured=null),u<L.viewFrom||u>=L.viewTo)return;var V=L.view[Gr(e,u)];if(V.node==null)return;var ie=V.changes||(V.changes=[]);H(ie,I)==-1&&ie.push(I)}function ei(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Rn(e,u,I,L){var M=Gr(e,u),V,ie=e.display.view;if(!pr||I==e.doc.first+e.doc.size)return{index:M,lineN:I};for(var le=e.display.viewFrom,ue=0;ue<M;ue++)le+=ie[ue].size;if(le!=u){if(L>0){if(M==ie.length-1)return null;V=le+ie[M].size-u,M++}else V=le-u;u+=V,I+=V}for(;Wi(e.doc,I)!=I;){if(M==(L<0?0:ie.length-1))return null;I+=L*ie[M-(L<0?1:0)].size,M+=L}return{index:M,lineN:I}}function En(e,u,I){var L=e.display,M=L.view;M.length==0||u>=L.viewTo||I<=L.viewFrom?(L.view=Ur(e,u,I),L.viewFrom=u):(L.viewFrom>u?L.view=Ur(e,u,L.viewFrom).concat(L.view):L.viewFrom<u&&(L.view=L.view.slice(Gr(e,u))),L.viewFrom=u,L.viewTo<I?L.view=L.view.concat(Ur(e,L.viewTo,I)):L.viewTo>I&&(L.view=L.view.slice(0,Gr(e,I)))),L.viewTo=I}function Kn(e){for(var u=e.display.view,I=0,L=0;L<u.length;L++){var M=u[L];!M.hidden&&(!M.node||M.changes)&&++I}return I}function Vt(e){e.display.input.showSelection(e.display.input.prepareSelection())}function An(e,u){u===void 0&&(u=!0);for(var I=e.doc,L={},M=L.cursors=document.createDocumentFragment(),V=L.selection=document.createDocumentFragment(),ie=0;ie<I.sel.ranges.length;ie++){if(!u&&ie==I.sel.primIndex)continue;var le=I.sel.ranges[ie];if(le.from().line>=e.display.viewTo||le.to().line<e.display.viewFrom)continue;var ue=le.empty();(ue||e.options.showCursorWhenSelecting)&&fr(e,le.head,M),ue||Fr(e,le,V)}return L}function fr(e,u,I){var L=$n(e,u,"div",null,null,!e.options.singleCursorHeightPerLine),M=I.appendChild(E("div","\xA0","CodeMirror-cursor"));if(M.style.left=L.left+"px",M.style.top=L.top+"px",M.style.height=Math.max(0,L.bottom-L.top)*e.options.cursorHeight+"px",L.other){var V=I.appendChild(E("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));V.style.display="",V.style.left=L.other.left+"px",V.style.top=L.other.top+"px",V.style.height=(L.other.bottom-L.other.top)*.85+"px"}}function Lr(e,u){return e.top-u.top||e.left-u.left}function Fr(e,u,I){var L=e.display,M=e.doc,V=document.createDocumentFragment(),ie=gr(e.display),le=ie.left,ue=Math.max(L.sizerWidth,In(e)-L.sizer.offsetLeft)-ie.right,ye=M.direction=="ltr";function He(Kt,en,yn,dn){en<0&&(en=0),en=Math.round(en),dn=Math.round(dn),V.appendChild(E("div",null,"CodeMirror-selected","position: absolute; left: "+Kt+`px;
|
|
|
top: `+en+"px; width: "+(yn==null?ue-Kt:yn)+`px;
|
|
|
height: `+(dn-en)+"px"))}function Ve(Kt,en,yn){var dn=Z(M,Kt),Gn=dn.text.length,br,Jr;function Ar(Br,wi){return Yn(e,it(Kt,Br),"div",dn,wi)}function Li(Br,wi,ti){var Vr=Pi(e,dn,null,Br),Wr=wi=="ltr"==(ti=="after")?"left":"right",Ir=ti=="after"?Vr.begin:Vr.end-(/\s/.test(dn.text.charAt(Vr.end-1))?2:1);return Ar(Ir,Wr)[Wr]}var Ti=at(dn,M.direction);return X(Ti,en||0,yn==null?Gn:yn,function(Br,wi,ti,Vr){var Wr=ti=="ltr",Ir=Ar(Br,Wr?"left":"right"),Si=Ar(wi-1,Wr?"right":"left"),Da=en==null&&Br==0,fa=yn==null&&wi==Gn,li=Vr==0,qi=!Ti||Vr==Ti.length-1;if(Si.top-Ir.top<=3){var Qr=(ye?Da:fa)&&li,Fo=(ye?fa:Da)&&qi,ta=Qr?le:(Wr?Ir:Si).left,_a=Fo?ue:(Wr?Si:Ir).right;He(ta,Ir.top,_a-ta,Ir.bottom)}else{var ya,gi,Pa,Bo;Wr?(ya=ye&&Da&&li?le:Ir.left,gi=ye?ue:Li(Br,ti,"before"),Pa=ye?le:Li(wi,ti,"after"),Bo=ye&&fa&&qi?ue:Si.right):(ya=ye?Li(Br,ti,"before"):le,gi=!ye&&Da&&li?ue:Ir.right,Pa=!ye&&fa&&qi?le:Si.left,Bo=ye?Li(wi,ti,"after"):ue),He(ya,Ir.top,gi-ya,Ir.bottom),Ir.bottom<Si.top&&He(le,Ir.bottom,null,Si.top),He(Pa,Si.top,Bo-Pa,Si.bottom)}(!br||Lr(Ir,br)<0)&&(br=Ir),Lr(Si,br)<0&&(br=Si),(!Jr||Lr(Ir,Jr)<0)&&(Jr=Ir),Lr(Si,Jr)<0&&(Jr=Si)}),{start:br,end:Jr}}var ot=u.from(),nt=u.to();if(ot.line==nt.line)Ve(ot.line,ot.ch,nt.ch);else{var _t=Z(M,ot.line),Ot=Z(M,nt.line),kt=ai(_t)==ai(Ot),Ht=Ve(ot.line,ot.ch,kt?_t.text.length+1:null).end,$t=Ve(nt.line,kt?0:null,nt.ch).start;kt&&(Ht.top<$t.top-2?(He(Ht.right,Ht.top,null,Ht.bottom),He(le,$t.top,$t.left,$t.bottom)):He(Ht.right,Ht.top,$t.left-Ht.right,Ht.bottom)),Ht.bottom<$t.top&&He(le,Ht.bottom,null,$t.top)}I.appendChild(V)}function ra(e){if(!e.state.focused)return;var u=e.display;clearInterval(u.blinker);var I=!0;u.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?u.blinker=setInterval(function(){e.hasFocus()||Ei(e),u.cursorDiv.style.visibility=(I=!I)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(u.cursorDiv.style.visibility="hidden")}function sn(e){e.state.focused||(e.display.input.focus(),ha(e))}function ia(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ei(e))},100)}function ha(e,u){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ze(e,"focus",e,u),e.state.focused=!0,j(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),h&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ra(e)}function Ei(e,u){if(e.state.delayingBlurEvent)return;e.state.focused&&(ze(e,"blur",e,u),e.state.focused=!1,_(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Fi(e){for(var u=e.display,I=u.lineDiv.offsetTop,L=0;L<u.view.length;L++){var M=u.view[L],V=e.options.lineWrapping,ie=void 0,le=0;if(M.hidden)continue;if(A&&C<8){var ue=M.node.offsetTop+M.node.offsetHeight;ie=ue-I,I=ue}else{var ye=M.node.getBoundingClientRect();ie=ye.bottom-ye.top,!V&&M.text.firstChild&&(le=M.text.firstChild.getBoundingClientRect().right-ye.left-1)}var He=M.line.height-ie;if((He>.005||He<-.005)&&(Te(M.line,ie),Bi(M.line),M.rest))for(var Ve=0;Ve<M.rest.length;Ve++)Bi(M.rest[Ve]);if(le>e.display.sizerWidth){var ot=Math.ceil(le/jn(e.display));ot>e.display.maxLineLength&&(e.display.maxLineLength=ot,e.display.maxLine=M.line,e.display.maxLineChanged=!0)}}}function Bi(e){if(e.widgets)for(var u=0;u<e.widgets.length;++u){var I=e.widgets[u],L=I.node.parentNode;L&&(I.height=L.offsetHeight)}}function zi(e,u,I){var L=I&&I.top!=null?Math.max(0,I.top):e.scroller.scrollTop;L=Math.floor(L-Vn(e));var M=I&&I.bottom!=null?I.bottom:L+e.wrapper.clientHeight,V=Ze(u,L),ie=Ze(u,M);if(I&&I.ensure){var le=I.ensure.from.line,ue=I.ensure.to.line;le<V?(V=le,ie=Ze(u,yi(Z(u,le))+e.wrapper.clientHeight)):Math.min(ue,u.lastLine())>=ie&&(V=Ze(u,yi(Z(u,ue))-e.wrapper.clientHeight),ie=ue)}return{from:V,to:Math.max(ie,V+1)}}function aa(e,u){if(Ke(e,"scrollCursorIntoView"))return;var I=e.display,L=I.sizer.getBoundingClientRect(),M=null;if(u.top+L.top<0?M=!0:u.bottom+L.top>(window.innerHeight||document.documentElement.clientHeight)&&(M=!1),M!=null&&!i){var V=E("div","\u200B",null,`position: absolute;
|
|
|
top: `+(u.top-I.viewOffset-Vn(e.display))+`px;
|
|
|
height: `+(u.bottom-u.top+er(e)+I.barHeight)+`px;
|
|
|
left: `+u.left+"px; width: "+Math.max(2,u.right-u.left)+"px;");e.display.lineSpace.appendChild(V),V.scrollIntoView(M),e.display.lineSpace.removeChild(V)}}function oa(e,u,I,L){L==null&&(L=0);var M;!e.options.lineWrapping&&u==I&&(u=u.ch?it(u.line,u.sticky=="before"?u.ch-1:u.ch,"after"):u,I=u.sticky=="before"?it(u.line,u.ch+1,"before"):u);for(var V=0;V<5;V++){var ie=!1,le=$n(e,u),ue=!I||I==u?le:$n(e,I);M={left:Math.min(le.left,ue.left),top:Math.min(le.top,ue.top)-L,right:Math.max(le.left,ue.left),bottom:Math.max(le.bottom,ue.bottom)+L};var ye=Mr(e,M),He=e.doc.scrollTop,Ve=e.doc.scrollLeft;if(ye.scrollTop!=null&&(ka(e,ye.scrollTop),Math.abs(e.doc.scrollTop-He)>1&&(ie=!0)),ye.scrollLeft!=null&&(pa(e,ye.scrollLeft),Math.abs(e.doc.scrollLeft-Ve)>1&&(ie=!0)),!ie)break}return M}function vo(e,u){var I=Mr(e,u);I.scrollTop!=null&&ka(e,I.scrollTop),I.scrollLeft!=null&&pa(e,I.scrollLeft)}function Mr(e,u){var I=e.display,L=mn(e.display);u.top<0&&(u.top=0);var M=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:I.scroller.scrollTop,V=Qn(e),ie={};u.bottom-u.top>V&&(u.bottom=u.top+V);var le=e.doc.height+cr(I),ue=u.top<L,ye=u.bottom>le-L;if(u.top<M)ie.scrollTop=ue?0:u.top;else if(u.bottom>M+V){var He=Math.min(u.top,(ye?le:u.bottom)-V);He!=M&&(ie.scrollTop=He)}var Ve=e.options.fixedGutter?0:I.gutters.offsetWidth,ot=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:I.scroller.scrollLeft-Ve,nt=In(e)-I.gutters.offsetWidth,_t=u.right-u.left>nt;return _t&&(u.right=u.left+nt),u.left<10?ie.scrollLeft=0:u.left<ot?ie.scrollLeft=Math.max(0,u.left+Ve-(_t?0:10)):u.right>nt+ot-3&&(ie.scrollLeft=u.right+(_t?0:10)-nt),ie}function _o(e,u){if(u==null)return;eo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+u}function Ea(e){eo(e);var u=e.getCursor();e.curOp.scrollToPos={from:u,to:u,margin:e.options.cursorScrollMargin}}function Ma(e,u,I){(u!=null||I!=null)&&eo(e),u!=null&&(e.curOp.scrollLeft=u),I!=null&&(e.curOp.scrollTop=I)}function Qs(e,u){eo(e),e.curOp.scrollToPos=u}function eo(e){var u=e.curOp.scrollToPos;if(u){e.curOp.scrollToPos=null;var I=wr(e,u.from),L=wr(e,u.to);Wo(e,I,L,u.margin)}}function Wo(e,u,I,L){var M=Mr(e,{left:Math.min(u.left,I.left),top:Math.min(u.top,I.top)-L,right:Math.max(u.right,I.right),bottom:Math.max(u.bottom,I.bottom)+L});Ma(e,M.scrollLeft,M.scrollTop)}function ka(e,u){if(Math.abs(e.doc.scrollTop-u)<2)return;B||bo(e,{top:u}),Ho(e,u,!0),B&&bo(e),ja(e,100)}function Ho(e,u,I){if(u=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,u)),e.display.scroller.scrollTop==u&&!I)return;e.doc.scrollTop=u,e.display.scrollbars.setScrollTop(u),e.display.scroller.scrollTop!=u&&(e.display.scroller.scrollTop=u)}function pa(e,u,I,L){if(u=Math.max(0,Math.min(u,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(I?u==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-u)<2)&&!L)return;e.doc.scrollLeft=u,Xo(e),e.display.scroller.scrollLeft!=u&&(e.display.scroller.scrollLeft=u),e.display.scrollbars.setScrollLeft(u)}function Na(e){var u=e.display,I=u.gutters.offsetWidth,L=Math.round(e.doc.height+cr(e.display));return{clientHeight:u.scroller.clientHeight,viewHeight:u.wrapper.clientHeight,scrollWidth:u.scroller.scrollWidth,clientWidth:u.scroller.clientWidth,viewWidth:u.wrapper.clientWidth,barLeft:e.options.fixedGutter?I:0,docHeight:L,scrollHeight:L+er(e)+u.barHeight,nativeBarWidth:u.nativeBarWidth,gutterWidth:I}}var ma=function(e,u,I){this.cm=I;var L=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),M=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");L.tabIndex=M.tabIndex=-1,e(L),e(M),Me(L,"scroll",function(){L.clientHeight&&u(L.scrollTop,"vertical")}),Me(M,"scroll",function(){M.clientWidth&&u(M.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,A&&C<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ma.prototype.update=function(e){var u=e.scrollWidth>e.clientWidth+1,I=e.scrollHeight>e.clientHeight+1,L=e.nativeBarWidth;if(I){this.vert.style.display="block",this.vert.style.bottom=u?L+"px":"0";var M=e.viewHeight-(u?L:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+M)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(u){this.horiz.style.display="block",this.horiz.style.right=I?L+"px":"0",this.horiz.style.left=e.barLeft+"px";var V=e.viewWidth-e.barLeft-(I?L:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+V)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(L==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:I?L:0,bottom:u?L:0}},ma.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ma.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ma.prototype.zeroWidthHack=function(){var e=t&&!o?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Y,this.disableVert=new Y},ma.prototype.enableZeroWidthBar=function(e,u,I){e.style.pointerEvents="auto";function L(){var M=e.getBoundingClientRect(),V=I=="vert"?document.elementFromPoint(M.right-1,(M.top+M.bottom)/2):document.elementFromPoint((M.right+M.left)/2,M.bottom-1);V!=e?e.style.pointerEvents="none":u.set(1e3,L)}u.set(1e3,L)},ma.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ua=function(){};Ua.prototype.update=function(){return{bottom:0,right:0}},Ua.prototype.setScrollLeft=function(){},Ua.prototype.setScrollTop=function(){},Ua.prototype.clear=function(){};function xa(e,u){u||(u=Na(e));var I=e.display.barWidth,L=e.display.barHeight;Ko(e,u);for(var M=0;M<4&&I!=e.display.barWidth||L!=e.display.barHeight;M++)I!=e.display.barWidth&&e.options.lineWrapping&&Fi(e),Ko(e,Na(e)),I=e.display.barWidth,L=e.display.barHeight}function Ko(e,u){var I=e.display,L=I.scrollbars.update(u);I.sizer.style.paddingRight=(I.barWidth=L.right)+"px",I.sizer.style.paddingBottom=(I.barHeight=L.bottom)+"px",I.heightForcer.style.borderBottom=L.bottom+"px solid transparent",L.right&&L.bottom?(I.scrollbarFiller.style.display="block",I.scrollbarFiller.style.height=L.bottom+"px",I.scrollbarFiller.style.width=L.right+"px"):I.scrollbarFiller.style.display="",L.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(I.gutterFiller.style.display="block",I.gutterFiller.style.height=L.bottom+"px",I.gutterFiller.style.width=u.gutterWidth+"px"):I.gutterFiller.style.display=""}var zo={native:ma,null:Ua};function Go(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new zo[e.options.scrollbarStyle](function(u){e.display.wrapper.insertBefore(u,e.display.scrollbarFiller),Me(u,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),u.setAttribute("cm-not-content","true")},function(u,I){I=="horizontal"?pa(e,u):ka(e,u)},e),e.display.scrollbars.addClass&&j(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function ga(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:++Zs},pt(e.curOp)}function va(e){var u=e.curOp;u&&Dt(u,function(I){for(var L=0;L<I.ops.length;L++)I.ops[L].cm.curOp=null;el(I)})}function el(e){for(var u=e.ops,I=0;I<u.length;I++)tl(u[I]);for(var L=0;L<u.length;L++)nl(u[L]);for(var M=0;M<u.length;M++)rl(u[M]);for(var V=0;V<u.length;V++)il(u[V]);for(var ie=0;ie<u.length;ie++)al(u[ie])}function tl(e){var u=e.cm,I=u.display;sl(u),e.updateMaxLine&&Qi(u),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<I.viewFrom||e.scrollToPos.to.line>=I.viewTo)||I.maxLineChanged&&u.options.lineWrapping,e.update=e.mustUpdate&&new to(u,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function nl(e){e.updatedDisplay=e.mustUpdate&&yo(e.cm,e.update)}function rl(e){var u=e.cm,I=u.display;e.updatedDisplay&&Fi(u),e.barMeasure=Na(u),I.maxLineChanged&&!u.options.lineWrapping&&(e.adjustWidthTo=tr(u,I.maxLine,I.maxLine.text.length).left+3,u.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(I.scroller.clientWidth,I.sizer.offsetLeft+e.adjustWidthTo+er(u)+u.display.barWidth),e.maxScrollLeft=Math.max(0,I.sizer.offsetLeft+e.adjustWidthTo-In(u))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=I.input.prepareSelection())}function il(e){var u=e.cm;e.adjustWidthTo!=null&&(u.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<u.doc.scrollLeft&&pa(u,Math.min(u.display.scroller.scrollLeft,e.maxScrollLeft),!0),u.display.maxLineChanged=!1);var I=e.focus&&e.focus==N();e.preparedSelection&&u.display.input.showSelection(e.preparedSelection,I),(e.updatedDisplay||e.startHeight!=u.doc.height)&&xa(u,e.barMeasure),e.updatedDisplay&&xo(u,e.barMeasure),e.selectionChanged&&ra(u),u.state.focused&&e.updateInput&&u.display.input.reset(e.typing),I&&sn(e.cm)}function al(e){var u=e.cm,I=u.display,L=u.doc;if(e.updatedDisplay&&Vo(u,e.update),I.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(I.wheelStartX=I.wheelStartY=null),e.scrollTop!=null&&Ho(u,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&pa(u,e.scrollLeft,!0,!0),e.scrollToPos){var M=oa(u,vt(L,e.scrollToPos.from),vt(L,e.scrollToPos.to),e.scrollToPos.margin);aa(u,M)}var V=e.maybeHiddenMarkers,ie=e.maybeUnhiddenMarkers;if(V)for(var le=0;le<V.length;++le)V[le].lines.length||ze(V[le],"hide");if(ie)for(var ue=0;ue<ie.length;++ue)ie[ue].lines.length&&ze(ie[ue],"unhide");I.wrapper.offsetHeight&&(L.scrollTop=u.display.scroller.scrollTop),e.changeObjs&&ze(u,"changes",u,e.changeObjs),e.update&&e.update.finish()}function Ri(e,u){if(e.curOp)return u();ga(e);try{return u()}finally{va(e)}}function Yr(e,u){return function(){if(e.curOp)return u.apply(e,arguments);ga(e);try{return u.apply(e,arguments)}finally{va(e)}}}function mi(e){return function(){if(this.curOp)return e.apply(this,arguments);ga(this);try{return e.apply(this,arguments)}finally{va(this)}}}function $r(e){return function(){var u=this.cm;if(!u||u.curOp)return e.apply(this,arguments);ga(u);try{return e.apply(this,arguments)}finally{va(u)}}}function ja(e,u){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(u,F(ol,e))}function ol(e){var u=e.doc;if(u.highlightFrontier>=e.display.viewTo)return;var I=+new Date+e.options.workTime,L=xn(e,u.highlightFrontier),M=[];u.iter(L.line,Math.min(u.first+u.size,e.display.viewTo+500),function(V){if(L.line>=e.display.viewFrom){var ie=V.styles,le=V.text.length>e.options.maxHighlightLength?zt(u.mode,L.state):null,ue=Zn(e,V,L,!0);le&&(L.state=le),V.styles=ue.styles;var ye=V.styleClasses,He=ue.classes;He?V.styleClasses=He:ye&&(V.styleClasses=null);for(var Ve=!ie||ie.length!=V.styles.length||ye!=He&&(!ye||!He||ye.bgClass!=He.bgClass||ye.textClass!=He.textClass),ot=0;!Ve&&ot<ie.length;++ot)Ve=ie[ot]!=V.styles[ot];Ve&&M.push(L.line),V.stateAfter=L.save(),L.nextLine()}else V.text.length<=e.options.maxHighlightLength&&Er(e,V.text,L),V.stateAfter=L.line%5==0?L.save():null,L.nextLine();if(+new Date>I)return ja(e,e.options.workDelay),!0}),u.highlightFrontier=L.line,u.modeFrontier=Math.max(u.modeFrontier,L.line),M.length&&Ri(e,function(){for(var V=0;V<M.length;V++)oi(e,M[V],"text")})}var to=function(e,u,I){var L=e.display;this.viewport=u,this.visible=zi(L,e.doc,u),this.editorIsHidden=!L.wrapper.offsetWidth,this.wrapperHeight=L.wrapper.clientHeight,this.wrapperWidth=L.wrapper.clientWidth,this.oldDisplayWidth=In(e),this.force=I,this.dims=Jn(e),this.events=[]};to.prototype.signal=function(e,u){Ie(e,u)&&this.events.push(arguments)},to.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ze.apply(null,this.events[e])};function sl(e){var u=e.display;!u.scrollbarsClipped&&u.scroller.offsetWidth&&(u.nativeBarWidth=u.scroller.offsetWidth-u.scroller.clientWidth,u.heightForcer.style.height=er(e)+"px",u.sizer.style.marginBottom=-u.nativeBarWidth+"px",u.sizer.style.borderRightWidth=er(e)+"px",u.scrollbarsClipped=!0)}function ll(e){if(e.hasFocus())return null;var u=N();if(!u||!R(e.display.lineDiv,u))return null;var I={activeElt:u};if(window.getSelection){var L=window.getSelection();L.anchorNode&&L.extend&&R(e.display.lineDiv,L.anchorNode)&&(I.anchorNode=L.anchorNode,I.anchorOffset=L.anchorOffset,I.focusNode=L.focusNode,I.focusOffset=L.focusOffset)}return I}function ul(e){if(!e||!e.activeElt||e.activeElt==N())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&R(document.body,e.anchorNode)&&R(document.body,e.focusNode)){var u=window.getSelection(),I=document.createRange();I.setEnd(e.anchorNode,e.anchorOffset),I.collapse(!1),u.removeAllRanges(),u.addRange(I),u.extend(e.focusNode,e.focusOffset)}}function yo(e,u){var I=e.display,L=e.doc;if(u.editorIsHidden)return ei(e),!1;if(!u.force&&u.visible.from>=I.viewFrom&&u.visible.to<=I.viewTo&&(I.updateLineNumbers==null||I.updateLineNumbers>=I.viewTo)&&I.renderedView==I.view&&Kn(e)==0)return!1;Yo(e)&&(ei(e),u.dims=Jn(e));var M=L.first+L.size,V=Math.max(u.visible.from-e.options.viewportMargin,L.first),ie=Math.min(M,u.visible.to+e.options.viewportMargin);I.viewFrom<V&&V-I.viewFrom<20&&(V=Math.max(L.first,I.viewFrom)),I.viewTo>ie&&I.viewTo-ie<20&&(ie=Math.min(M,I.viewTo)),pr&&(V=Wi(e.doc,V),ie=Di(e.doc,ie));var le=V!=I.viewFrom||ie!=I.viewTo||I.lastWrapHeight!=u.wrapperHeight||I.lastWrapWidth!=u.wrapperWidth;En(e,V,ie),I.viewOffset=yi(Z(e.doc,I.viewFrom)),e.display.mover.style.top=I.viewOffset+"px";var ue=Kn(e);if(!le&&ue==0&&!u.force&&I.renderedView==I.view&&(I.updateLineNumbers==null||I.updateLineNumbers>=I.viewTo))return!1;var ye=ll(e);return ue>4&&(I.lineDiv.style.display="none"),cl(e,I.updateLineNumbers,u.dims),ue>4&&(I.lineDiv.style.display=""),I.renderedView=I.view,ul(ye),x(I.cursorDiv),x(I.selectionDiv),I.gutters.style.height=I.sizer.style.minHeight=0,le&&(I.lastWrapHeight=u.wrapperHeight,I.lastWrapWidth=u.wrapperWidth,ja(e,400)),I.updateLineNumbers=null,!0}function Vo(e,u){for(var I=u.viewport,L=!0;;L=!1){if(!L||!e.options.lineWrapping||u.oldDisplayWidth==In(e)){if(I&&I.top!=null&&(I={top:Math.min(e.doc.height+cr(e.display)-Qn(e),I.top)}),u.visible=zi(e.display,e.doc,I),u.visible.from>=e.display.viewFrom&&u.visible.to<=e.display.viewTo)break}else L&&(u.visible=zi(e.display,e.doc,I));if(!yo(e,u))break;Fi(e);var M=Na(e);Vt(e),xa(e,M),xo(e,M),u.force=!1}u.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(u.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function bo(e,u){var I=new to(e,u);if(yo(e,I)){Fi(e),Vo(e,I);var L=Na(e);Vt(e),xa(e,L),xo(e,L),I.finish()}}function cl(e,u,I){var L=e.display,M=e.options.lineNumbers,V=L.lineDiv,ie=V.firstChild;function le(_t){var Ot=_t.nextSibling;return h&&t&&e.display.currentWheelTarget==_t?_t.style.display="none":_t.parentNode.removeChild(_t),Ot}for(var ue=L.view,ye=L.viewFrom,He=0;He<ue.length;He++){var Ve=ue[He];if(!Ve.hidden)if(!Ve.node||Ve.node.parentNode!=V){var ot=gn(e,Ve,ye,I);V.insertBefore(ot,ie)}else{for(;ie!=Ve.node;)ie=le(ie);var nt=M&&u!=null&&u<=ye&&Ve.lineNumber;Ve.changes&&(H(Ve.changes,"gutter")>-1&&(nt=!1),ft(e,Ve,ye,I)),nt&&(x(Ve.lineNumber),Ve.lineNumber.appendChild(document.createTextNode(At(e.options,ye)))),ie=Ve.node.nextSibling}ye+=Ve.size}for(;ie;)ie=le(ie)}function Eo(e){var u=e.gutters.offsetWidth;e.sizer.style.marginLeft=u+"px"}function xo(e,u){e.display.sizer.style.minHeight=u.docHeight+"px",e.display.heightForcer.style.top=u.docHeight+"px",e.display.gutters.style.height=u.docHeight+e.display.barHeight+er(e)+"px"}function Xo(e){var u=e.display,I=u.view;if(!u.alignWidgets&&(!u.gutters.firstChild||!e.options.fixedGutter))return;for(var L=Rr(u)-u.scroller.scrollLeft+e.doc.scrollLeft,M=u.gutters.offsetWidth,V=L+"px",ie=0;ie<I.length;ie++)if(!I[ie].hidden){e.options.fixedGutter&&(I[ie].gutter&&(I[ie].gutter.style.left=V),I[ie].gutterBackground&&(I[ie].gutterBackground.style.left=V));var le=I[ie].alignable;if(le)for(var ue=0;ue<le.length;ue++)le[ue].style.left=V}e.options.fixedGutter&&(u.gutters.style.left=L+M+"px")}function Yo(e){if(!e.options.lineNumbers)return!1;var u=e.doc,I=At(e.options,u.first+u.size-1),L=e.display;if(I.length!=L.lineNumChars){var M=L.measure.appendChild(E("div",[E("div",I)],"CodeMirror-linenumber CodeMirror-gutter-elt")),V=M.firstChild.offsetWidth,ie=M.offsetWidth-V;return L.lineGutter.style.width="",L.lineNumInnerWidth=Math.max(V,L.lineGutter.offsetWidth-ie)+1,L.lineNumWidth=L.lineNumInnerWidth+ie,L.lineNumChars=L.lineNumInnerWidth?I.length:-1,L.lineGutter.style.width=L.lineNumWidth+"px",Eo(e.display),!0}return!1}function To(e,u){for(var I=[],L=!1,M=0;M<e.length;M++){var V=e[M],ie=null;if(typeof V!="string"&&(ie=V.style,V=V.className),V=="CodeMirror-linenumbers")if(u)L=!0;else continue;I.push({className:V,style:ie})}return u&&!L&&I.push({className:"CodeMirror-linenumbers",style:null}),I}function $o(e){var u=e.gutters,I=e.gutterSpecs;x(u),e.lineGutter=null;for(var L=0;L<I.length;++L){var M=I[L],V=M.className,ie=M.style,le=u.appendChild(E("div",null,"CodeMirror-gutter "+V));ie&&(le.style.cssText=ie),V=="CodeMirror-linenumbers"&&(e.lineGutter=le,le.style.width=(e.lineNumWidth||1)+"px")}u.style.display=I.length?"":"none",Eo(e)}function Fa(e){$o(e.display),Pr(e),Xo(e)}function dl(e,u,I,L){var M=this;this.input=I,M.scrollbarFiller=E("div",null,"CodeMirror-scrollbar-filler"),M.scrollbarFiller.setAttribute("cm-not-content","true"),M.gutterFiller=E("div",null,"CodeMirror-gutter-filler"),M.gutterFiller.setAttribute("cm-not-content","true"),M.lineDiv=w("div",null,"CodeMirror-code"),M.selectionDiv=E("div",null,null,"position: relative; z-index: 1"),M.cursorDiv=E("div",null,"CodeMirror-cursors"),M.measure=E("div",null,"CodeMirror-measure"),M.lineMeasure=E("div",null,"CodeMirror-measure"),M.lineSpace=w("div",[M.measure,M.lineMeasure,M.selectionDiv,M.cursorDiv,M.lineDiv],null,"position: relative; outline: none");var V=w("div",[M.lineSpace],"CodeMirror-lines");M.mover=E("div",[V],null,"position: relative"),M.sizer=E("div",[M.mover],"CodeMirror-sizer"),M.sizerWidth=null,M.heightForcer=E("div",null,null,"position: absolute; height: "+Q+"px; width: 1px;"),M.gutters=E("div",null,"CodeMirror-gutters"),M.lineGutter=null,M.scroller=E("div",[M.sizer,M.heightForcer,M.gutters],"CodeMirror-scroll"),M.scroller.setAttribute("tabIndex","-1"),M.wrapper=E("div",[M.scrollbarFiller,M.gutterFiller,M.scroller],"CodeMirror"),A&&C<8&&(M.gutters.style.zIndex=-1,M.scroller.style.paddingRight=0),!h&&!(B&&r)&&(M.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(M.wrapper):e(M.wrapper)),M.viewFrom=M.viewTo=u.first,M.reportedViewFrom=M.reportedViewTo=u.first,M.view=[],M.renderedView=null,M.externalMeasured=null,M.viewOffset=0,M.lastWrapHeight=M.lastWrapWidth=0,M.updateLineNumbers=null,M.nativeBarWidth=M.barHeight=M.barWidth=0,M.scrollbarsClipped=!1,M.lineNumWidth=M.lineNumInnerWidth=M.lineNumChars=null,M.alignWidgets=!1,M.cachedCharWidth=M.cachedTextHeight=M.cachedPaddingH=null,M.maxLine=null,M.maxLineLength=0,M.maxLineChanged=!1,M.wheelDX=M.wheelDY=M.wheelStartX=M.wheelStartY=null,M.shift=!1,M.selForContextMenu=null,M.activeTouch=null,M.gutterSpecs=To(L.gutters,L.lineNumbers),$o(M),I.init(M)}var no=0,Mi=null;A?Mi=-.53:B?Mi=15:c?Mi=-.7:n&&(Mi=-1/3);function Jo(e){var u=e.wheelDeltaX,I=e.wheelDeltaY;return u==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(u=e.detail),I==null&&e.detail&&e.axis==e.VERTICAL_AXIS?I=e.detail:I==null&&(I=e.wheelDelta),{x:u,y:I}}function fl(e){var u=Jo(e);return u.x*=Mi,u.y*=Mi,u}function Qo(e,u){var I=Jo(u),L=I.x,M=I.y,V=e.display,ie=V.scroller,le=ie.scrollWidth>ie.clientWidth,ue=ie.scrollHeight>ie.clientHeight;if(!(L&&le||M&&ue))return;if(M&&t&&h){e:for(var ye=u.target,He=V.view;ye!=ie;ye=ye.parentNode)for(var Ve=0;Ve<He.length;Ve++)if(He[Ve].node==ye){e.display.currentWheelTarget=ye;break e}}if(L&&!B&&!s&&Mi!=null){M&&ue&&ka(e,Math.max(0,ie.scrollTop+M*Mi)),pa(e,Math.max(0,ie.scrollLeft+L*Mi)),(!M||M&&ue)&&pe(u),V.wheelStartX=null;return}if(M&&Mi!=null){var ot=M*Mi,nt=e.doc.scrollTop,_t=nt+V.wrapper.clientHeight;ot<0?nt=Math.max(0,nt+ot-50):_t=Math.min(e.doc.height,_t+ot+50),bo(e,{top:nt,bottom:_t})}no<20&&(V.wheelStartX==null?(V.wheelStartX=ie.scrollLeft,V.wheelStartY=ie.scrollTop,V.wheelDX=L,V.wheelDY=M,setTimeout(function(){if(V.wheelStartX==null)return;var Ot=ie.scrollLeft-V.wheelStartX,kt=ie.scrollTop-V.wheelStartY,Ht=kt&&V.wheelDY&&kt/V.wheelDY||Ot&&V.wheelDX&&Ot/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!Ht)return;Mi=(Mi*no+Ht)/(no+1),++no},200)):(V.wheelDX+=L,V.wheelDY+=M))}var ki=function(e,u){this.ranges=e,this.primIndex=u};ki.prototype.primary=function(){return this.ranges[this.primIndex]},ki.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var u=0;u<this.ranges.length;u++){var I=this.ranges[u],L=e.ranges[u];if(!Qt(I.anchor,L.anchor)||!Qt(I.head,L.head))return!1}return!0},ki.prototype.deepCopy=function(){for(var e=[],u=0;u<this.ranges.length;u++)e[u]=new lr(yt(this.ranges[u].anchor),yt(this.ranges[u].head));return new ki(e,this.primIndex)},ki.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ki.prototype.contains=function(e,u){u||(u=e);for(var I=0;I<this.ranges.length;I++){var L=this.ranges[I];if(Tt(u,L.from())>=0&&Tt(e,L.to())<=0)return I}return-1};var lr=function(e,u){this.anchor=e,this.head=u};lr.prototype.from=function(){return Jt(this.anchor,this.head)},lr.prototype.to=function(){return nn(this.anchor,this.head)},lr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Gi(e,u,I){var L=e&&e.options.selectionsMayTouch,M=u[I];u.sort(function(ot,nt){return Tt(ot.from(),nt.from())}),I=H(u,M);for(var V=1;V<u.length;V++){var ie=u[V],le=u[V-1],ue=Tt(le.to(),ie.from());if(L&&!ie.empty()?ue>0:ue>=0){var ye=Jt(le.from(),ie.from()),He=nn(le.to(),ie.to()),Ve=le.empty()?ie.from()==ie.head:le.from()==le.head;V<=I&&--I,u.splice(--V,2,new lr(Ve?He:ye,Ve?ye:He))}}return new ki(u,I)}function sa(e,u){return new ki([new lr(e,u||e)],0)}function la(e){return e.text?it(e.from.line+e.text.length-1,Ue(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function qo(e,u){if(Tt(e,u.from)<0)return e;if(Tt(e,u.to)<=0)return la(u);var I=e.line+u.text.length-(u.to.line-u.from.line)-1,L=e.ch;return e.line==u.to.line&&(L+=la(u).ch-u.to.ch),it(I,L)}function wo(e,u){for(var I=[],L=0;L<e.sel.ranges.length;L++){var M=e.sel.ranges[L];I.push(new lr(qo(M.anchor,u),qo(M.head,u)))}return Gi(e.cm,I,e.sel.primIndex)}function Zo(e,u,I){return e.line==u.line?it(I.line,e.ch-u.ch+I.ch):it(I.line+(e.line-u.line),e.ch)}function hl(e,u,I){for(var L=[],M=it(e.first,0),V=M,ie=0;ie<u.length;ie++){var le=u[ie],ue=Zo(le.from,M,V),ye=Zo(la(le),M,V);if(M=le.to,V=ye,I=="around"){var He=e.sel.ranges[ie],Ve=Tt(He.head,He.anchor)<0;L[ie]=new lr(Ve?ye:ue,Ve?ue:ye)}else L[ie]=new lr(ue,ue)}return new ki(L,e.sel.primIndex)}function So(e){e.doc.mode=lt(e.options,e.doc.modeOption),Ba(e)}function Ba(e){e.doc.iter(function(u){u.stateAfter&&(u.stateAfter=null),u.styles&&(u.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ja(e,100),e.state.modeGen++,e.curOp&&Pr(e)}function es(e,u){return u.from.ch==0&&u.to.ch==0&&Ue(u.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Oo(e,u,I,L){function M($t){return I?I[$t]:null}function V($t,Kt,en){Zi($t,Kt,en,L),Ft($t,"change",$t,u)}function ie($t,Kt){for(var en=[],yn=$t;yn<Kt;++yn)en.push(new hi(ye[yn],M(yn),L));return en}var le=u.from,ue=u.to,ye=u.text,He=Z(e,le.line),Ve=Z(e,ue.line),ot=Ue(ye),nt=M(ye.length-1),_t=ue.line-le.line;if(u.full)e.insert(0,ie(0,ye.length)),e.remove(ye.length,e.size-ye.length);else if(es(e,u)){var Ot=ie(0,ye.length-1);V(Ve,Ve.text,nt),_t&&e.remove(le.line,_t),Ot.length&&e.insert(le.line,Ot)}else if(He==Ve)if(ye.length==1)V(He,He.text.slice(0,le.ch)+ot+He.text.slice(ue.ch),nt);else{var kt=ie(1,ye.length-1);kt.push(new hi(ot+He.text.slice(ue.ch),nt,L)),V(He,He.text.slice(0,le.ch)+ye[0],M(0)),e.insert(le.line+1,kt)}else if(ye.length==1)V(He,He.text.slice(0,le.ch)+ye[0]+Ve.text.slice(ue.ch),M(0)),e.remove(le.line+1,_t);else{V(He,He.text.slice(0,le.ch)+ye[0],M(0)),V(Ve,ot+Ve.text.slice(ue.ch),nt);var Ht=ie(1,ye.length-1);_t>1&&e.remove(le.line+1,_t-1),e.insert(le.line+1,Ht)}Ft(e,"change",e,u)}function ua(e,u,I){function L(M,V,ie){if(M.linked)for(var le=0;le<M.linked.length;++le){var ue=M.linked[le];if(ue.doc==V)continue;var ye=ie&&ue.sharedHist;if(I&&!ye)continue;u(ue.doc,ye),L(ue.doc,M,ye)}}L(e,null,!0)}function ts(e,u){if(u.cm)throw new Error("This document is already in use.");e.doc=u,u.cm=e,bi(e),So(e),ns(e),e.options.lineWrapping||Qi(e),e.options.mode=u.modeOption,Pr(e)}function ns(e){(e.doc.direction=="rtl"?j:_)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Ri(e,function(){ns(e),Pr(e)})}function ro(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 Co(e,u){var I={from:yt(u.from),to:la(u),text:ne(e,u.from,u.to)};return as(e,I,u.from.line,u.to.line+1),ua(e,function(L){return as(L,I,u.from.line,u.to.line+1)},!0),I}function rs(e){for(;e.length;){var u=Ue(e);if(u.ranges)e.pop();else break}}function ml(e,u){if(u)return rs(e.done),Ue(e.done);if(e.done.length&&!Ue(e.done).ranges)return Ue(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Ue(e.done)}function is(e,u,I,L){var M=e.history;M.undone.length=0;var V=+new Date,ie,le;if((M.lastOp==L||M.lastOrigin==u.origin&&u.origin&&(u.origin.charAt(0)=="+"&&M.lastModTime>V-(e.cm?e.cm.options.historyEventDelay:500)||u.origin.charAt(0)=="*"))&&(ie=ml(M,M.lastOp==L)))le=Ue(ie.changes),Tt(u.from,u.to)==0&&Tt(u.from,le.to)==0?le.to=la(u):ie.changes.push(Co(e,u));else{var ue=Ue(M.done);for((!ue||!ue.ranges)&&io(e.sel,M.done),ie={changes:[Co(e,u)],generation:M.generation},M.done.push(ie);M.done.length>M.undoDepth;)M.done.shift(),M.done[0].ranges||M.done.shift()}M.done.push(I),M.generation=++M.maxGeneration,M.lastModTime=M.lastSelTime=V,M.lastOp=M.lastSelOp=L,M.lastOrigin=M.lastSelOrigin=u.origin,le||ze(e,"historyAdded")}function gl(e,u,I,L){var M=u.charAt(0);return M=="*"||M=="+"&&I.ranges.length==L.ranges.length&&I.somethingSelected()==L.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,u,I,L){var M=e.history,V=L&&L.origin;I==M.lastSelOp||V&&M.lastSelOrigin==V&&(M.lastModTime==M.lastSelTime&&M.lastOrigin==V||gl(e,V,Ue(M.done),u))?M.done[M.done.length-1]=u:io(u,M.done),M.lastSelTime=+new Date,M.lastSelOrigin=V,M.lastSelOp=I,L&&L.clearRedo!==!1&&rs(M.undone)}function io(e,u){var I=Ue(u);I&&I.ranges&&I.equals(e)||u.push(e)}function as(e,u,I,L){var M=u["spans_"+e.id],V=0;e.iter(Math.max(e.first,I),Math.min(e.first+e.size,L),function(ie){ie.markedSpans&&((M||(M=u["spans_"+e.id]={}))[V]=ie.markedSpans),++V})}function _l(e){if(!e)return null;for(var u,I=0;I<e.length;++I)e[I].marker.explicitlyCleared?u||(u=e.slice(0,I)):u&&u.push(e[I]);return u?u.length?u:null:e}function yl(e,u){var I=u["spans_"+e.id];if(!I)return null;for(var L=[],M=0;M<u.text.length;++M)L.push(_l(I[M]));return L}function os(e,u){var I=yl(e,u),L=ni(e,u);if(!I)return L;if(!L)return I;for(var M=0;M<I.length;++M){var V=I[M],ie=L[M];if(V&&ie){e:for(var le=0;le<ie.length;++le){for(var ue=ie[le],ye=0;ye<V.length;++ye)if(V[ye].marker==ue.marker)continue e;V.push(ue)}}else ie&&(I[M]=ie)}return I}function Ta(e,u,I){for(var L=[],M=0;M<e.length;++M){var V=e[M];if(V.ranges){L.push(I?ki.prototype.deepCopy.call(V):V);continue}var ie=V.changes,le=[];L.push({changes:le});for(var ue=0;ue<ie.length;++ue){var ye=ie[ue],He=void 0;if(le.push({from:ye.from,to:ye.to,text:ye.text}),u)for(var Ve in ye)(He=Ve.match(/^spans_(\d+)$/))&&(H(u,Number(He[1]))>-1&&(Ue(le)[Ve]=ye[Ve],delete ye[Ve]))}}return L}function Ao(e,u,I,L){if(L){var M=e.anchor;if(I){var V=Tt(u,M)<0;V!=Tt(I,M)<0?(M=u,u=I):V!=Tt(u,I)<0&&(u=I)}return new lr(M,u)}else return new lr(I||u,u)}function ao(e,u,I,L,M){M==null&&(M=e.cm&&(e.cm.display.shift||e.extend)),si(e,new ki([Ao(e.sel.primary(),u,I,M)],0),L)}function ss(e,u,I){for(var L=[],M=e.cm&&(e.cm.display.shift||e.extend),V=0;V<e.sel.ranges.length;V++)L[V]=Ao(e.sel.ranges[V],u[V],null,M);var ie=Gi(e.cm,L,e.sel.primIndex);si(e,ie,I)}function Ro(e,u,I,L){var M=e.sel.ranges.slice(0);M[u]=I,si(e,Gi(e.cm,M,e.sel.primIndex),L)}function ls(e,u,I,L){si(e,sa(u,I),L)}function bl(e,u,I){var L={ranges:u.ranges,update:function(M){this.ranges=[];for(var V=0;V<M.length;V++)this.ranges[V]=new lr(vt(e,M[V].anchor),vt(e,M[V].head))},origin:I&&I.origin};return ze(e,"beforeSelectionChange",e,L),e.cm&&ze(e.cm,"beforeSelectionChange",e.cm,L),L.ranges!=u.ranges?Gi(e.cm,L.ranges,L.ranges.length-1):u}function us(e,u,I){var L=e.history.done,M=Ue(L);M&&M.ranges?(L[L.length-1]=u,oo(e,u,I)):si(e,u,I)}function si(e,u,I){oo(e,u,I),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,I)}function oo(e,u,I){(Ie(e,"beforeSelectionChange")||e.cm&&Ie(e.cm,"beforeSelectionChange"))&&(u=bl(e,u,I));var L=I&&I.bias||(Tt(u.primary().head,e.sel.primary().head)<0?-1:1);cs(e,fs(e,u,L,!0)),!(I&&I.scroll===!1)&&e.cm&&Ea(e.cm)}function cs(e,u){if(u.equals(e.sel))return;e.sel=u,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Pe(e.cm)),Ft(e,"cursorActivity",e)}function ds(e){cs(e,fs(e,e.sel,null,!1))}function fs(e,u,I,L){for(var M,V=0;V<u.ranges.length;V++){var ie=u.ranges[V],le=u.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],ue=so(e,ie.anchor,le&&le.anchor,I,L),ye=so(e,ie.head,le&&le.head,I,L);(M||ue!=ie.anchor||ye!=ie.head)&&(M||(M=u.ranges.slice(0,V)),M[V]=new lr(ue,ye))}return M?Gi(e.cm,M,u.primIndex):u}function wa(e,u,I,L,M){var V=Z(e,u.line);if(V.markedSpans)for(var ie=0;ie<V.markedSpans.length;++ie){var le=V.markedSpans[ie],ue=le.marker,ye="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,He="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((le.from==null||(ye?le.from<=u.ch:le.from<u.ch))&&(le.to==null||(He?le.to>=u.ch:le.to>u.ch))){if(M&&(ze(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(V.markedSpans){--ie;continue}else break;if(!ue.atomic)continue;if(I){var Ve=ue.find(L<0?1:-1),ot=void 0;if((L<0?He:ye)&&(Ve=hs(e,Ve,-L,Ve&&Ve.line==u.line?V:null)),Ve&&Ve.line==u.line&&(ot=Tt(Ve,I))&&(L<0?ot<0:ot>0))return wa(e,Ve,u,L,M)}var nt=ue.find(L<0?-1:1);return(L<0?ye:He)&&(nt=hs(e,nt,L,nt.line==u.line?V:null)),nt?wa(e,nt,u,L,M):null}}return u}function so(e,u,I,L,M){var V=L||1,ie=wa(e,u,I,V,M)||!M&&wa(e,u,I,V,!0)||wa(e,u,I,-V,M)||!M&&wa(e,u,I,-V,!0);return ie||(e.cantEdit=!0,it(e.first,0))}function hs(e,u,I,L){return I<0&&u.ch==0?u.line>e.first?vt(e,it(u.line-1)):null:I>0&&u.ch==(L||Z(e,u.line)).text.length?u.line<e.first+e.size-1?it(u.line+1,0):null:new it(u.line,u.ch+I)}function ps(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),oe)}function ms(e,u,I){var L={canceled:!1,from:u.from,to:u.to,text:u.text,origin:u.origin,cancel:function(){return L.canceled=!0}};return I&&(L.update=function(M,V,ie,le){M&&(L.from=vt(e,M)),V&&(L.to=vt(e,V)),ie&&(L.text=ie),le!==void 0&&(L.origin=le)}),ze(e,"beforeChange",e,L),e.cm&&ze(e.cm,"beforeChange",e.cm,L),L.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:L.from,to:L.to,text:L.text,origin:L.origin}}function Sa(e,u,I){if(e.cm){if(!e.cm.curOp)return Yr(e.cm,Sa)(e,u,I);if(e.cm.state.suppressEdits)return}if((Ie(e,"beforeChange")||e.cm&&Ie(e.cm,"beforeChange"))&&(u=ms(e,u,!0),!u))return;var L=vi&&!I&&Ni(e,u.from,u.to);if(L)for(var M=L.length-1;M>=0;--M)gs(e,{from:L[M].from,to:L[M].to,text:M?[""]:u.text,origin:u.origin});else gs(e,u)}function gs(e,u){if(u.text.length==1&&u.text[0]==""&&Tt(u.from,u.to)==0)return;var I=wo(e,u);is(e,u,I,e.cm?e.cm.curOp.id:NaN),Wa(e,u,I,ni(e,u));var L=[];ua(e,function(M,V){!V&&H(L,M.history)==-1&&(bs(M.history,u),L.push(M.history)),Wa(M,u,null,ni(M,u))})}function lo(e,u,I){var L=e.cm&&e.cm.state.suppressEdits;if(L&&!I)return;for(var M=e.history,V,ie=e.sel,le=u=="undo"?M.done:M.undone,ue=u=="undo"?M.undone:M.done,ye=0;ye<le.length&&!(V=le[ye],I?V.ranges&&!V.equals(e.sel):!V.ranges);ye++);if(ye==le.length)return;for(M.lastOrigin=M.lastSelOrigin=null;;)if(V=le.pop(),V.ranges){if(io(V,ue),I&&!V.equals(e.sel)){si(e,V,{clearRedo:!1});return}ie=V}else if(L){le.push(V);return}else break;var He=[];io(ie,ue),ue.push({changes:He,generation:M.generation}),M.generation=V.generation||++M.maxGeneration;for(var Ve=Ie(e,"beforeChange")||e.cm&&Ie(e.cm,"beforeChange"),ot=function(Ot){var kt=V.changes[Ot];if(kt.origin=u,Ve&&!ms(e,kt,!1))return le.length=0,{};He.push(Co(e,kt));var Ht=Ot?wo(e,kt):Ue(le);Wa(e,kt,Ht,os(e,kt)),!Ot&&e.cm&&e.cm.scrollIntoView({from:kt.from,to:la(kt)});var $t=[];ua(e,function(Kt,en){!en&&H($t,Kt.history)==-1&&(bs(Kt.history,kt),$t.push(Kt.history)),Wa(Kt,kt,null,os(Kt,kt))})},nt=V.changes.length-1;nt>=0;--nt){var _t=ot(nt);if(_t)return _t.v}}function vs(e,u){if(u==0)return;if(e.first+=u,e.sel=new ki(Re(e.sel.ranges,function(M){return new lr(it(M.anchor.line+u,M.anchor.ch),it(M.head.line+u,M.head.ch))}),e.sel.primIndex),e.cm){Pr(e.cm,e.first,e.first-u,u);for(var I=e.cm.display,L=I.viewFrom;L<I.viewTo;L++)oi(e.cm,L,"gutter")}}function Wa(e,u,I,L){if(e.cm&&!e.cm.curOp)return Yr(e.cm,Wa)(e,u,I,L);if(u.to.line<e.first){vs(e,u.text.length-1-(u.to.line-u.from.line));return}if(u.from.line>e.lastLine())return;if(u.from.line<e.first){var M=u.text.length-1-(e.first-u.from.line);vs(e,M),u={from:it(e.first,0),to:it(u.to.line+M,u.to.ch),text:[Ue(u.text)],origin:u.origin}}var V=e.lastLine();u.to.line>V&&(u={from:u.from,to:it(V,Z(e,V).text.length),text:[u.text[0]],origin:u.origin}),u.removed=ne(e,u.from,u.to),I||(I=wo(e,u)),e.cm?El(e.cm,u,L):Oo(e,u,L),oo(e,I,oe),e.cantEdit&&so(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,u,I){var L=e.doc,M=e.display,V=u.from,ie=u.to,le=!1,ue=V.line;e.options.lineWrapping||(ue=Ge(ai(Z(L,V.line))),L.iter(ue,ie.line+1,function(nt){if(nt==M.maxLine)return le=!0,!0})),L.sel.contains(u.from,u.to)>-1&&Pe(e),Oo(L,u,I,Hn(e)),e.options.lineWrapping||(L.iter(ue,V.line+u.text.length,function(nt){var _t=Ji(nt);_t>M.maxLineLength&&(M.maxLine=nt,M.maxLineLength=_t,M.maxLineChanged=!0,le=!1)}),le&&(e.curOp.updateMaxLine=!0)),vr(L,V.line),ja(e,400);var ye=u.text.length-(ie.line-V.line)-1;u.full?Pr(e):V.line==ie.line&&u.text.length==1&&!es(e.doc,u)?oi(e,V.line,"text"):Pr(e,V.line,ie.line+1,ye);var He=Ie(e,"changes"),Ve=Ie(e,"change");if(Ve||He){var ot={from:V,to:ie,text:u.text,removed:u.removed,origin:u.origin};Ve&&Ft(e,"change",e,ot),He&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ot)}e.display.selForContextMenu=null}function Oa(e,u,I,L,M){var V;L||(L=I),Tt(L,I)<0&&(V=[L,I],I=V[0],L=V[1]),typeof u=="string"&&(u=e.splitLines(u)),Sa(e,{from:I,to:L,text:u,origin:M})}function _s(e,u,I,L){I<e.line?e.line+=L:u<e.line&&(e.line=u,e.ch=0)}function ys(e,u,I,L){for(var M=0;M<e.length;++M){var V=e[M],ie=!0;if(V.ranges){V.copied||(V=e[M]=V.deepCopy(),V.copied=!0);for(var le=0;le<V.ranges.length;le++)_s(V.ranges[le].anchor,u,I,L),_s(V.ranges[le].head,u,I,L);continue}for(var ue=0;ue<V.changes.length;++ue){var ye=V.changes[ue];if(I<ye.from.line)ye.from=it(ye.from.line+L,ye.from.ch),ye.to=it(ye.to.line+L,ye.to.ch);else if(u<=ye.to.line){ie=!1;break}}ie||(e.splice(0,M+1),M=0)}}function bs(e,u){var I=u.from.line,L=u.to.line,M=u.text.length-(L-I)-1;ys(e.done,I,L,M),ys(e.undone,I,L,M)}function Ha(e,u,I,L){var M=u,V=u;return typeof u=="number"?V=Z(e,Nt(e,u)):M=Ge(u),M==null?null:(L(V,M)&&e.cm&&oi(e.cm,M,I),V)}function Ka(e){this.lines=e,this.parent=null;for(var u=0,I=0;I<e.length;++I)e[I].parent=this,u+=e[I].height;this.height=u}Ka.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,u){for(var I=e,L=e+u;I<L;++I){var M=this.lines[I];this.height-=M.height,tn(M),Ft(M,"delete")}this.lines.splice(e,u)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,u,I){this.height+=I,this.lines=this.lines.slice(0,e).concat(u).concat(this.lines.slice(e));for(var L=0;L<u.length;++L)u[L].parent=this},iterN:function(e,u,I){for(var L=e+u;e<L;++e)if(I(this.lines[e]))return!0}};function za(e){this.children=e;for(var u=0,I=0,L=0;L<e.length;++L){var M=e[L];u+=M.chunkSize(),I+=M.height,M.parent=this}this.size=u,this.height=I,this.parent=null}za.prototype={chunkSize:function(){return this.size},removeInner:function(e,u){this.size-=u;for(var I=0;I<this.children.length;++I){var L=this.children[I],M=L.chunkSize();if(e<M){var V=Math.min(u,M-e),ie=L.height;if(L.removeInner(e,V),this.height-=ie-L.height,M==V&&(this.children.splice(I--,1),L.parent=null),(u-=V)==0)break;e=0}else e-=M}if(this.size-u<25&&(this.children.length>1||!(this.children[0]instanceof Ka))){var le=[];this.collapse(le),this.children=[new Ka(le)],this.children[0].parent=this}},collapse:function(e){for(var u=0;u<this.children.length;++u)this.children[u].collapse(e)},insertInner:function(e,u,I){this.size+=u.length,this.height+=I;for(var L=0;L<this.children.length;++L){var M=this.children[L],V=M.chunkSize();if(e<=V){if(M.insertInner(e,u,I),M.lines&&M.lines.length>50){for(var ie=M.lines.length%25+25,le=ie;le<M.lines.length;){var ue=new Ka(M.lines.slice(le,le+=25));M.height-=ue.height,this.children.splice(++L,0,ue),ue.parent=this}M.lines=M.lines.slice(0,ie),this.maybeSpill()}break}e-=V}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var u=e.children.splice(e.children.length-5,5),I=new za(u);if(e.parent){e.size-=I.size,e.height-=I.height;var M=H(e.parent.children,e);e.parent.children.splice(M+1,0,I)}else{var L=new za(e.children);L.parent=e,e.children=[L,I],e=L}I.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,u,I){for(var L=0;L<this.children.length;++L){var M=this.children[L],V=M.chunkSize();if(e<V){var ie=Math.min(u,V-e);if(M.iterN(e,ie,I))return!0;if((u-=ie)==0)break;e=0}else e-=V}}};var Ga=function(e,u,I){if(I)for(var L in I)I.hasOwnProperty(L)&&(this[L]=I[L]);this.doc=e,this.node=u};Ga.prototype.clear=function(){var e=this.doc.cm,u=this.line.widgets,I=this.line,L=Ge(I);if(L==null||!u)return;for(var M=0;M<u.length;++M)u[M]==this&&u.splice(M--,1);u.length||(I.widgets=null);var V=kn(this);Te(I,Math.max(0,I.height-V)),e&&(Ri(e,function(){Es(e,I,-V),oi(e,L,"widget")}),Ft(e,"lineWidgetCleared",e,this,L))},Ga.prototype.changed=function(){var e=this,u=this.height,I=this.doc.cm,L=this.line;this.height=null;var M=kn(this)-u;if(!M)return;Oi(this.doc,L)||Te(L,L.height+M),I&&Ri(I,function(){I.curOp.forceUpdate=!0,Es(I,L,M),Ft(I,"lineWidgetChanged",I,e,Ge(L))})},Ce(Ga);function Es(e,u,I){yi(u)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&_o(e,I)}function xl(e,u,I,L){var M=new Ga(e,I,L),V=e.cm;return V&&M.noHScroll&&(V.display.alignWidgets=!0),Ha(e,u,"widget",function(ie){var le=ie.widgets||(ie.widgets=[]);if(M.insertAt==null?le.push(M):le.splice(Math.min(le.length-1,Math.max(0,M.insertAt)),0,M),M.line=ie,V&&!Oi(e,ie)){var ue=yi(ie)<e.scrollTop;Te(ie,ie.height+kn(M)),ue&&_o(V,M.height),V.curOp.forceUpdate=!0}return!0}),V&&Ft(V,"lineWidgetAdded",V,M,typeof u=="number"?u:Ge(u)),M}var xs=0,ca=function(e,u){this.lines=[],this.type=u,this.doc=e,this.id=++xs};ca.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,u=e&&!e.curOp;if(u&&ga(e),Ie(this,"clear")){var I=this.find();I&&Ft(this,"clear",I.from,I.to)}for(var L=null,M=null,V=0;V<this.lines.length;++V){var ie=this.lines[V],le=Tr(ie.markedSpans,this);e&&!this.collapsed?oi(e,Ge(ie),"text"):e&&(le.to!=null&&(M=Ge(ie)),le.from!=null&&(L=Ge(ie))),ie.markedSpans=ui(ie.markedSpans,le),le.from==null&&this.collapsed&&!Oi(this.doc,ie)&&e&&Te(ie,mn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var ye=ai(this.lines[ue]),He=Ji(ye);He>e.display.maxLineLength&&(e.display.maxLine=ye,e.display.maxLineLength=He,e.display.maxLineChanged=!0)}L!=null&&e&&this.collapsed&&Pr(e,L,M+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ds(e.doc)),e&&Ft(e,"markerCleared",e,this,L,M),u&&va(e),this.parent&&this.parent.clear()},ca.prototype.find=function(e,u){e==null&&this.type=="bookmark"&&(e=1);for(var I,L,M=0;M<this.lines.length;++M){var V=this.lines[M],ie=Tr(V.markedSpans,this);if(ie.from!=null&&(I=it(u?V:Ge(V),ie.from),e==-1))return I;if(ie.to!=null&&(L=it(u?V:Ge(V),ie.to),e==1))return L}return I&&{from:I,to:L}},ca.prototype.changed=function(){var e=this,u=this.find(-1,!0),I=this,L=this.doc.cm;if(!u||!L)return;Ri(L,function(){var M=u.line,V=Ge(u.line),ie=sr(L,V);if(ie&&(Yt(ie),L.curOp.selectionChanged=L.curOp.forceUpdate=!0),L.curOp.updateMaxLine=!0,!Oi(I.doc,M)&&I.height!=null){var le=I.height;I.height=null;var ue=kn(I)-le;ue&&Te(M,M.height+ue)}Ft(L,"markerChanged",L,e)})},ca.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var u=this.doc.cm.curOp;(!u.maybeHiddenMarkers||H(u.maybeHiddenMarkers,this)==-1)&&(u.maybeUnhiddenMarkers||(u.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ca.prototype.detachLine=function(e){if(this.lines.splice(H(this.lines,e),1),!this.lines.length&&this.doc.cm){var u=this.doc.cm.curOp;(u.maybeHiddenMarkers||(u.maybeHiddenMarkers=[])).push(this)}},Ce(ca);function Ca(e,u,I,L,M){if(L&&L.shared)return Tl(e,u,I,L,M);if(e.cm&&!e.cm.curOp)return Yr(e.cm,Ca)(e,u,I,L,M);var V=new ca(e,M),ie=Tt(u,I);if(L&&k(L,V,!1),ie>0||ie==0&&V.clearWhenEmpty!==!1)return V;if(V.replacedWith&&(V.collapsed=!0,V.widgetNode=w("span",[V.replacedWith],"CodeMirror-widget"),L.handleMouseEvents||V.widgetNode.setAttribute("cm-ignore-events","true"),L.insertLeft&&(V.widgetNode.insertLeft=!0)),V.collapsed){if(na(e,u.line,u,I,V)||u.line!=I.line&&na(e,I.line,u,I,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");Cr()}V.addToHistory&&is(e,{from:u,to:I,origin:"markText"},e.sel,NaN);var le=u.line,ue=e.cm,ye;if(e.iter(le,I.line+1,function(Ve){ue&&V.collapsed&&!ue.options.lineWrapping&&ai(Ve)==ue.display.maxLine&&(ye=!0),V.collapsed&&le!=u.line&&Te(Ve,0),Dr(Ve,new Hr(V,le==u.line?u.ch:null,le==I.line?I.ch:null)),++le}),V.collapsed&&e.iter(u.line,I.line+1,function(Ve){Oi(e,Ve)&&Te(Ve,0)}),V.clearOnEnter&&Me(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(_r(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),V.collapsed&&(V.id=++xs,V.atomic=!0),ue){if(ye&&(ue.curOp.updateMaxLine=!0),V.collapsed)Pr(ue,u.line,I.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var He=u.line;He<=I.line;He++)oi(ue,He,"text");V.atomic&&ds(ue.doc),Ft(ue,"markerAdded",ue,V)}return V}var Va=function(e,u){this.markers=e,this.primary=u;for(var I=0;I<e.length;++I)e[I].parent=this};Va.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Ft(this,"clear")},Va.prototype.find=function(e,u){return this.primary.find(e,u)},Ce(Va);function Tl(e,u,I,L,M){L=k(L),L.shared=!1;var V=[Ca(e,u,I,L,M)],ie=V[0],le=L.widgetNode;return ua(e,function(ue){le&&(L.widgetNode=le.cloneNode(!0)),V.push(Ca(ue,vt(ue,u),vt(ue,I),L,M));for(var ye=0;ye<ue.linked.length;++ye)if(ue.linked[ye].isParent)return;ie=Ue(V)}),new Va(V,ie)}function Ts(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),function(u){return u.parent})}function wl(e,u){for(var I=0;I<u.length;I++){var L=u[I],M=L.find(),V=e.clipPos(M.from),ie=e.clipPos(M.to);if(Tt(V,ie)){var le=Ca(e,V,ie,L.primary,L.primary.type);L.markers.push(le),le.parent=L}}}function Sl(e){for(var u=function(L){var M=e[L],V=[M.primary.doc];ua(M.primary.doc,function(ue){return V.push(ue)});for(var ie=0;ie<M.markers.length;ie++){var le=M.markers[ie];H(V,le.doc)==-1&&(le.parent=null,M.markers.splice(ie--,1))}},I=0;I<e.length;I++)u(I)}var Ol=0,xi=function(e,u,I,L,M){if(!(this instanceof xi))return new xi(e,u,I,L,M);I==null&&(I=0),za.call(this,[new Ka([new hi("",null)])]),this.first=I,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=I;var V=it(I,0);this.sel=sa(V),this.history=new ro(null),this.id=++Ol,this.modeOption=u,this.lineSep=L,this.direction=M=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Oo(this,{from:V,to:V,text:e}),si(this,sa(V),oe)};xi.prototype=ve(za.prototype,{constructor:xi,iter:function(e,u,I){I?this.iterN(e-this.first,u-e,I):this.iterN(this.first,this.first+this.size,e)},insert:function(e,u){for(var I=0,L=0;L<u.length;++L)I+=u[L].height;this.insertInner(e-this.first,u,I)},remove:function(e,u){this.removeInner(e-this.first,u)},getValue:function(e){var u=se(this,this.first,this.first+this.size);return e===!1?u:u.join(e||this.lineSeparator())},setValue:$r(function(e){var u=it(this.first,0),I=this.first+this.size-1;Sa(this,{from:u,to:it(I,Z(this,I).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ma(this.cm,0,0),si(this,sa(u),oe)}),replaceRange:function(e,u,I,L){u=vt(this,u),I=I?vt(this,I):u,Oa(this,e,u,I,L)},getRange:function(e,u,I){var L=ne(this,vt(this,e),vt(this,u));return I===!1?L:L.join(I||this.lineSeparator())},getLine:function(e){var u=this.getLineHandle(e);return u&&u.text},getLineHandle:function(e){if(bt(this,e))return Z(this,e)},getLineNumber:function(e){return Ge(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Z(this,e)),ai(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return vt(this,e)},getCursor:function(e){var u=this.sel.primary(),I;return e==null||e=="head"?I=u.head:e=="anchor"?I=u.anchor:e=="end"||e=="to"||e===!1?I=u.to():I=u.from(),I},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:$r(function(e,u,I){ls(this,vt(this,typeof e=="number"?it(e,u||0):e),null,I)}),setSelection:$r(function(e,u,I){ls(this,vt(this,e),vt(this,u||e),I)}),extendSelection:$r(function(e,u,I){ao(this,vt(this,e),u&&vt(this,u),I)}),extendSelections:$r(function(e,u){ss(this,mt(this,e),u)}),extendSelectionsBy:$r(function(e,u){var I=Re(this.sel.ranges,e);ss(this,mt(this,I),u)}),setSelections:$r(function(e,u,I){if(!e.length)return;for(var L=[],M=0;M<e.length;M++)L[M]=new lr(vt(this,e[M].anchor),vt(this,e[M].head));u==null&&(u=Math.min(e.length-1,this.sel.primIndex)),si(this,Gi(this.cm,L,u),I)}),addSelection:$r(function(e,u,I){var L=this.sel.ranges.slice(0);L.push(new lr(vt(this,e),vt(this,u||e))),si(this,Gi(this.cm,L,L.length-1),I)}),getSelection:function(e){for(var u=this.sel.ranges,I,L=0;L<u.length;L++){var M=ne(this,u[L].from(),u[L].to());I=I?I.concat(M):M}return e===!1?I:I.join(e||this.lineSeparator())},getSelections:function(e){for(var u=[],I=this.sel.ranges,L=0;L<I.length;L++){var M=ne(this,I[L].from(),I[L].to());e!==!1&&(M=M.join(e||this.lineSeparator())),u[L]=M}return u},replaceSelection:function(e,u,I){for(var L=[],M=0;M<this.sel.ranges.length;M++)L[M]=e;this.replaceSelections(L,u,I||"+input")},replaceSelections:$r(function(e,u,I){for(var L=[],M=this.sel,V=0;V<M.ranges.length;V++){var ie=M.ranges[V];L[V]={from:ie.from(),to:ie.to(),text:this.splitLines(e[V]),origin:I}}for(var le=u&&u!="end"&&hl(this,L,u),ue=L.length-1;ue>=0;ue--)Sa(this,L[ue]);le?us(this,le):this.cm&&Ea(this.cm)}),undo:$r(function(){lo(this,"undo")}),redo:$r(function(){lo(this,"redo")}),undoSelection:$r(function(){lo(this,"undo",!0)}),redoSelection:$r(function(){lo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,u=0,I=0,L=0;L<e.done.length;L++)e.done[L].ranges||++u;for(var M=0;M<e.undone.length;M++)e.undone[M].ranges||++I;return{undo:u,redo:I}},clearHistory:function(){var e=this;this.history=new ro(this.history.maxGeneration),ua(this,function(u){return u.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:Ta(this.history.done),undone:Ta(this.history.undone)}},setHistory:function(e){var u=this.history=new ro(this.history.maxGeneration);u.done=Ta(e.done.slice(0),null,!0),u.undone=Ta(e.undone.slice(0),null,!0)},setGutterMarker:$r(function(e,u,I){return Ha(this,e,"gutter",function(L){var M=L.gutterMarkers||(L.gutterMarkers={});return M[u]=I,!I&&Je(M)&&(L.gutterMarkers=null),!0})}),clearGutter:$r(function(e){var u=this;this.iter(function(I){I.gutterMarkers&&I.gutterMarkers[e]&&Ha(u,I,"gutter",function(){return I.gutterMarkers[e]=null,Je(I.gutterMarkers)&&(I.gutterMarkers=null),!0})})}),lineInfo:function(e){var u;if(typeof e=="number"){if(!bt(this,e))return null;if(u=e,e=Z(this,e),!e)return null}else if(u=Ge(e),u==null)return null;return{line:u,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:$r(function(e,u,I){return Ha(this,e,u=="gutter"?"gutter":"class",function(L){var M=u=="text"?"textClass":u=="background"?"bgClass":u=="gutter"?"gutterClass":"wrapClass";if(!L[M])L[M]=I;else{if(m(I).test(L[M]))return!1;L[M]+=" "+I}return!0})}),removeLineClass:$r(function(e,u,I){return Ha(this,e,u=="gutter"?"gutter":"class",function(L){var M=u=="text"?"textClass":u=="background"?"bgClass":u=="gutter"?"gutterClass":"wrapClass",V=L[M];if(V)if(I==null)L[M]=null;else{var ie=V.match(m(I));if(!ie)return!1;var le=ie.index+ie[0].length;L[M]=V.slice(0,ie.index)+(!ie.index||le==V.length?"":" ")+V.slice(le)||null}else return!1;return!0})}),addLineWidget:$r(function(e,u,I){return xl(this,e,u,I)}),removeLineWidget:function(e){e.clear()},markText:function(e,u,I){return Ca(this,vt(this,e),vt(this,u),I,I&&I.type||"range")},setBookmark:function(e,u){var I={replacedWith:u&&(u.nodeType==null?u.widget:u),insertLeft:u&&u.insertLeft,clearWhenEmpty:!1,shared:u&&u.shared,handleMouseEvents:u&&u.handleMouseEvents};return e=vt(this,e),Ca(this,e,e,I,"bookmark")},findMarksAt:function(e){e=vt(this,e);var u=[],I=Z(this,e.line).markedSpans;if(I)for(var L=0;L<I.length;++L){var M=I[L];(M.from==null||M.from<=e.ch)&&(M.to==null||M.to>=e.ch)&&u.push(M.marker.parent||M.marker)}return u},findMarks:function(e,u,I){e=vt(this,e),u=vt(this,u);var L=[],M=e.line;return this.iter(e.line,u.line+1,function(V){var ie=V.markedSpans;if(ie)for(var le=0;le<ie.length;le++){var ue=ie[le];!(ue.to!=null&&M==e.line&&e.ch>=ue.to||ue.from==null&&M!=e.line||ue.from!=null&&M==u.line&&ue.from>=u.ch)&&(!I||I(ue.marker))&&L.push(ue.marker.parent||ue.marker)}++M}),L},getAllMarks:function(){var e=[];return this.iter(function(u){var I=u.markedSpans;if(I)for(var L=0;L<I.length;++L)I[L].from!=null&&e.push(I[L].marker)}),e},posFromIndex:function(e){var u,I=this.first,L=this.lineSeparator().length;return this.iter(function(M){var V=M.text.length+L;if(V>e)return u=e,!0;e-=V,++I}),vt(this,it(I,u))},indexFromPos:function(e){e=vt(this,e);var u=e.ch;if(e.line<this.first||e.ch<0)return 0;var I=this.lineSeparator().length;return this.iter(this.first,e.line,function(L){u+=L.text.length+I}),u},copy:function(e){var u=new xi(se(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return u.scrollTop=this.scrollTop,u.scrollLeft=this.scrollLeft,u.sel=this.sel,u.extend=!1,e&&(u.history.undoDepth=this.history.undoDepth,u.setHistory(this.getHistory())),u},linkedDoc:function(e){e||(e={});var u=this.first,I=this.first+this.size;e.from!=null&&e.from>u&&(u=e.from),e.to!=null&&e.to<I&&(I=e.to);var L=new xi(se(this,u,I),e.mode||this.modeOption,u,this.lineSep,this.direction);return e.sharedHist&&(L.history=this.history),(this.linked||(this.linked=[])).push({doc:L,sharedHist:e.sharedHist}),L.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wl(L,Ts(this)),L},unlinkDoc:function(e){if(e instanceof Sr&&(e=e.doc),this.linked)for(var u=0;u<this.linked.length;++u){var I=this.linked[u];if(I.doc!=e)continue;this.linked.splice(u,1),e.unlinkDoc(this),Sl(Ts(this));break}if(e.history==this.history){var L=[e.id];ua(e,function(M){return L.push(M.id)},!0),e.history=new ro(null),e.history.done=Ta(this.history.done,L),e.history.undone=Ta(this.history.undone,L)}},iterLinkedDocs:function(e){ua(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:$r(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(u){return u.order=null}),this.cm&&pl(this.cm)})}),xi.prototype.eachLine=xi.prototype.iter;var ws=0;function Cl(e){var u=this;if(Ss(u),Ke(u,e)||ir(u.display,e))return;pe(e),A&&(ws=+new Date);var I=pi(u,e,!0),L=e.dataTransfer.files;if(!I||u.isReadOnly())return;if(L&&L.length&&window.FileReader&&window.File)for(var M=L.length,V=Array(M),ie=0,le=function(){++ie==M&&Yr(u,function(){I=vt(u.doc,I);var nt={from:I,to:I,text:u.doc.splitLines(V.filter(function(_t){return _t!=null}).join(u.doc.lineSeparator())),origin:"paste"};Sa(u.doc,nt),us(u.doc,sa(vt(u.doc,I),vt(u.doc,la(nt))))})()},ue=function(nt,_t){if(u.options.allowDropFileTypes&&H(u.options.allowDropFileTypes,nt.type)==-1){le();return}var Ot=new FileReader;Ot.onerror=function(){return le()},Ot.onload=function(){var kt=Ot.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(kt)){le();return}V[_t]=kt,le()},Ot.readAsText(nt)},ye=0;ye<L.length;ye++)ue(L[ye],ye);else{if(u.state.draggingText&&u.doc.sel.contains(I)>-1){u.state.draggingText(e),setTimeout(function(){return u.display.input.focus()},20);return}try{var He=e.dataTransfer.getData("Text");if(He){var Ve;if(u.state.draggingText&&!u.state.draggingText.copy&&(Ve=u.listSelections()),oo(u.doc,sa(I,I)),Ve)for(var ot=0;ot<Ve.length;++ot)Oa(u.doc,"",Ve[ot].anchor,Ve[ot].head,"drag");u.replaceSelection(He,"around","paste"),u.display.input.focus()}}catch(nt){}}}function Al(e,u){if(A&&(!e.state.draggingText||+new Date-ws<100)){we(u);return}if(Ke(e,u)||ir(e.display,u))return;if(u.dataTransfer.setData("Text",e.getSelection()),u.dataTransfer.effectAllowed="copyMove",u.dataTransfer.setDragImage&&!n){var I=E("img",null,null,"position: fixed; left: 0; top: 0;");I.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s&&(I.width=I.height=1,e.display.wrapper.appendChild(I),I._top=I.offsetTop),u.dataTransfer.setDragImage(I,0,0),s&&I.parentNode.removeChild(I)}}function Rl(e,u){var I=pi(e,u);if(!I)return;var L=document.createDocumentFragment();fr(e,I,L),e.display.dragCursor||(e.display.dragCursor=E("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),f(e.display.dragCursor,L)}function Ss(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Os(e){if(!document.getElementsByClassName)return;for(var u=document.getElementsByClassName("CodeMirror"),I=[],L=0;L<u.length;L++){var M=u[L].CodeMirror;M&&I.push(M)}I.length&&I[0].operation(function(){for(var V=0;V<I.length;V++)e(I[V])})}var Cs=!1;function Ll(){if(Cs)return;Il(),Cs=!0}function Il(){var e;Me(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Os(Dl)},100))}),Me(window,"blur",function(){return Os(Ei)})}function Dl(e){var u=e.display;u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.scrollbarsClipped=!1,e.setSize()}for(var da={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"},Xa=0;Xa<10;Xa++)da[Xa+48]=da[Xa+96]=String(Xa);for(var uo=65;uo<=90;uo++)da[uo]=String.fromCharCode(uo);for(var Ya=1;Ya<=12;Ya++)da[Ya+111]=da[Ya+63235]="F"+Ya;var ea={};ea.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"},ea.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"},ea.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"},ea.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"]},ea.default=t?ea.macDefault:ea.pcDefault;function Pl(e){var u=e.split(/-(?!$)/);e=u[u.length-1];for(var I,L,M,V,ie=0;ie<u.length-1;ie++){var le=u[ie];if(/^(cmd|meta|m)$/i.test(le))V=!0;else if(/^a(lt)?$/i.test(le))I=!0;else if(/^(c|ctrl|control)$/i.test(le))L=!0;else if(/^s(hift)?$/i.test(le))M=!0;else throw new Error("Unrecognized modifier name: "+le)}return I&&(e="Alt-"+e),L&&(e="Ctrl-"+e),V&&(e="Cmd-"+e),M&&(e="Shift-"+e),e}function Ml(e){var u={};for(var I in e)if(e.hasOwnProperty(I)){var L=e[I];if(/^(name|fallthrough|(de|at)tach)$/.test(I))continue;if(L=="..."){delete e[I];continue}for(var M=Re(I.split(" "),Pl),V=0;V<M.length;V++){var ie=void 0,le=void 0;V==M.length-1?(le=M.join(" "),ie=L):(le=M.slice(0,V+1).join(" "),ie="...");var ue=u[le];if(!ue)u[le]=ie;else if(ue!=ie)throw new Error("Inconsistent bindings for "+le)}delete e[I]}for(var ye in u)e[ye]=u[ye];return e}function Aa(e,u,I,L){u=co(u);var M=u.call?u.call(e,L):u[e];if(M===!1)return"nothing";if(M==="...")return"multi";if(M!=null&&I(M))return"handled";if(u.fallthrough){if(Object.prototype.toString.call(u.fallthrough)!="[object Array]")return Aa(e,u.fallthrough,I,L);for(var V=0;V<u.fallthrough.length;V++){var ie=Aa(e,u.fallthrough[V],I,L);if(ie)return ie}}}function As(e){var u=typeof e=="string"?e:da[e.keyCode];return u=="Ctrl"||u=="Alt"||u=="Shift"||u=="Mod"}function Rs(e,u,I){var L=e;return u.altKey&&L!="Alt"&&(e="Alt-"+e),(b?u.metaKey:u.ctrlKey)&&L!="Ctrl"&&(e="Ctrl-"+e),(b?u.ctrlKey:u.metaKey)&&L!="Mod"&&(e="Cmd-"+e),!I&&u.shiftKey&&L!="Shift"&&(e="Shift-"+e),e}function Ls(e,u){if(s&&e.keyCode==34&&e.char)return!1;var I=da[e.keyCode];return I==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(I=e.code),Rs(I,e,u))}function co(e){return typeof e=="string"?ea[e]:e}function Ra(e,u){for(var I=e.doc.sel.ranges,L=[],M=0;M<I.length;M++){for(var V=u(I[M]);L.length&&Tt(V.from,Ue(L).to)<=0;){var ie=L.pop();if(Tt(ie.from,V.from)<0){V.from=ie.from;break}}L.push(V)}Ri(e,function(){for(var le=L.length-1;le>=0;le--)Oa(e.doc,"",L[le].from,L[le].to,"+delete");Ea(e)})}function Lo(e,u,I){var L=U(e.text,u+I,I);return L<0||L>e.text.length?null:L}function Io(e,u,I){var L=Lo(e,u.ch,I);return L==null?null:new it(u.line,L,I<0?"after":"before")}function Do(e,u,I,L,M){if(e){u.doc.direction=="rtl"&&(M=-M);var V=at(I,u.doc.direction);if(V){var ie=M<0?Ue(V):V[0],le=M<0==(ie.level==1),ue=le?"after":"before",ye;if(ie.level>0||u.doc.direction=="rtl"){var He=qn(u,I);ye=M<0?I.text.length-1:0;var Ve=On(u,He,ye).top;ye=q(function(ot){return On(u,He,ot).top==Ve},M<0==(ie.level==1)?ie.from:ie.to-1,ye),ue=="before"&&(ye=Lo(I,ye,1))}else ye=M<0?ie.to:ie.from;return new it(L,ye,ue)}}return new it(L,M<0?I.text.length:0,M<0?"before":"after")}function kl(e,u,I,L){var M=at(u,e.doc.direction);if(!M)return Io(u,I,L);I.ch>=u.text.length?(I.ch=u.text.length,I.sticky="before"):I.ch<=0&&(I.ch=0,I.sticky="after");var V=ge(M,I.ch,I.sticky),ie=M[V];if(e.doc.direction=="ltr"&&ie.level%2==0&&(L>0?ie.to>I.ch:ie.from<I.ch))return Io(u,I,L);var le=function(Ht,$t){return Lo(u,Ht instanceof it?Ht.ch:Ht,$t)},ue,ye=function(Ht){return e.options.lineWrapping?(ue=ue||qn(e,u),Pi(e,u,ue,Ht)):{begin:0,end:u.text.length}},He=ye(I.sticky=="before"?le(I,-1):I.ch);if(e.doc.direction=="rtl"||ie.level==1){var Ve=ie.level==1==L<0,ot=le(I,Ve?1:-1);if(ot!=null&&(Ve?ot<=ie.to&&ot<=He.end:ot>=ie.from&&ot>=He.begin)){var nt=Ve?"before":"after";return new it(I.line,ot,nt)}}var _t=function(Ht,$t,Kt){for(var en=function(br,Jr){return Jr?new it(I.line,le(br,1),"before"):new it(I.line,br,"after")};Ht>=0&&Ht<M.length;Ht+=$t){var yn=M[Ht],dn=$t>0==(yn.level!=1),Gn=dn?Kt.begin:le(Kt.end,-1);if(yn.from<=Gn&&Gn<yn.to)return en(Gn,dn);if(Gn=dn?yn.from:le(yn.to,-1),Kt.begin<=Gn&&Gn<Kt.end)return en(Gn,dn)}},Ot=_t(V+L,L,He);if(Ot)return Ot;var kt=L>0?He.end:le(He.begin,-1);return kt!=null&&!(L>0&&kt==u.text.length)&&(Ot=_t(L>0?0:M.length-1,L,ye(kt)),Ot)?Ot:null}var $a={selectAll:ps,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),oe)},killLine:function(e){return Ra(e,function(u){if(u.empty()){var I=Z(e.doc,u.head.line).text.length;return u.head.ch==I&&u.head.line<e.lastLine()?{from:u.head,to:it(u.head.line+1,0)}:{from:u.head,to:it(u.head.line,I)}}else return{from:u.from(),to:u.to()}})},deleteLine:function(e){return Ra(e,function(u){return{from:it(u.from().line,0),to:vt(e.doc,it(u.to().line+1,0))}})},delLineLeft:function(e){return Ra(e,function(u){return{from:it(u.from().line,0),to:u.from()}})},delWrappedLineLeft:function(e){return Ra(e,function(u){var I=e.charCoords(u.head,"div").top+5,L=e.coordsChar({left:0,top:I},"div");return{from:L,to:u.from()}})},delWrappedLineRight:function(e){return Ra(e,function(u){var I=e.charCoords(u.head,"div").top+5,L=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:I},"div");return{from:u.from(),to:L}})},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(it(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(it(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(u){return Is(e,u.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(u){return Ds(e,u.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(u){return Nl(e,u.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(u){var I=e.cursorCoords(u.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:I},"div")},he)},goLineLeft:function(e){return e.extendSelectionsBy(function(u){var I=e.cursorCoords(u.head,"div").top+5;return e.coordsChar({left:0,top:I},"div")},he)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(u){var I=e.cursorCoords(u.head,"div").top+5,L=e.coordsChar({left:0,top:I},"div");return L.ch<e.getLine(L.line).search(/\S/)?Ds(e,u.head):L},he)},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 u=[],I=e.listSelections(),L=e.options.tabSize,M=0;M<I.length;M++){var V=I[M].from(),ie=K(e.getLine(V.line),V.ch,L);u.push(be(L-ie%L))}e.replaceSelections(u)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ri(e,function(){for(var u=e.listSelections(),I=[],L=0;L<u.length;L++){if(!u[L].empty())continue;var M=u[L].head,V=Z(e.doc,M.line).text;if(V){if(M.ch==V.length&&(M=new it(M.line,M.ch-1)),M.ch>0)M=new it(M.line,M.ch+1),e.replaceRange(V.charAt(M.ch-1)+V.charAt(M.ch-2),it(M.line,M.ch-2),M,"+transpose");else if(M.line>e.doc.first){var ie=Z(e.doc,M.line-1).text;ie&&(M=new it(M.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+ie.charAt(ie.length-1),it(M.line-1,ie.length-1),M,"+transpose"))}}I.push(new lr(M,M))}e.setSelections(I)})},newlineAndIndent:function(e){return Ri(e,function(){for(var u=e.listSelections(),I=u.length-1;I>=0;I--)e.replaceRange(e.doc.lineSeparator(),u[I].anchor,u[I].head,"+input");u=e.listSelections();for(var L=0;L<u.length;L++)e.indentLine(u[L].from().line,null,!0);Ea(e)})},openLine:function(e){return e.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Is(e,u){var I=Z(e.doc,u),L=ai(I);return L!=I&&(u=Ge(L)),Do(!0,e,L,u,1)}function Nl(e,u){var I=Z(e.doc,u),L=Yi(I);return L!=I&&(u=Ge(L)),Do(!0,e,I,u,-1)}function Ds(e,u){var I=Is(e,u.line),L=Z(e.doc,I.line),M=at(L,e.doc.direction);if(!M||M[0].level==0){var V=Math.max(I.ch,L.text.search(/\S/)),ie=u.line==I.line&&u.ch<=V&&u.ch;return it(I.line,ie?0:V,I.sticky)}return I}function fo(e,u,I){if(typeof u=="string"&&(u=$a[u],!u))return!1;e.display.input.ensurePolled();var L=e.display.shift,M=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),I&&(e.display.shift=!1),M=u(e)!=re}finally{e.display.shift=L,e.state.suppressEdits=!1}return M}function Ul(e,u,I){for(var L=0;L<e.state.keyMaps.length;L++){var M=Aa(u,e.state.keyMaps[L],I,e);if(M)return M}return e.options.extraKeys&&Aa(u,e.options.extraKeys,I,e)||Aa(u,e.options.keyMap,I,e)}var jl=new Y;function Ja(e,u,I,L){var M=e.state.keySeq;if(M){if(As(u))return"handled";if(/\'$/.test(u)?e.state.keySeq=null:jl.set(50,function(){e.state.keySeq==M&&(e.state.keySeq=null,e.display.input.reset())}),Ps(e,M+" "+u,I,L))return!0}return Ps(e,u,I,L)}function Ps(e,u,I,L){var M=Ul(e,u,L);return M=="multi"&&(e.state.keySeq=u),M=="handled"&&Ft(e,"keyHandled",e,u,I),(M=="handled"||M=="multi")&&(pe(I),ra(e)),!!M}function Ms(e,u){var I=Ls(u,!0);return I?u.shiftKey&&!e.state.keySeq?Ja(e,"Shift-"+I,u,function(L){return fo(e,L,!0)})||Ja(e,I,u,function(L){if(typeof L=="string"?/^go[A-Z]/.test(L):L.motion)return fo(e,L)}):Ja(e,I,u,function(L){return fo(e,L)}):!1}function Fl(e,u,I){return Ja(e,"'"+I+"'",u,function(L){return fo(e,L,!0)})}var Po=null;function ks(e){var u=this;if(e.target&&e.target!=u.display.input.getField())return;if(u.curOp.focus=N(),Ke(u,e))return;A&&C<11&&e.keyCode==27&&(e.returnValue=!1);var I=e.keyCode;u.display.shift=I==16||e.shiftKey;var L=Ms(u,e);s&&(Po=L?I:null,!L&&I==88&&!$e&&(t?e.metaKey:e.ctrlKey)&&u.replaceSelection("",null,"cut")),B&&!t&&!L&&I==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),I==18&&!/\bCodeMirror-crosshair\b/.test(u.display.lineDiv.className)&&Bl(u)}function Bl(e){var u=e.display.lineDiv;j(u,"CodeMirror-crosshair");function I(L){(L.keyCode==18||!L.altKey)&&(_(u,"CodeMirror-crosshair"),et(document,"keyup",I),et(document,"mouseover",I))}Me(document,"keyup",I),Me(document,"mouseover",I)}function Ns(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ke(this,e)}function Us(e){var u=this;if(e.target&&e.target!=u.display.input.getField())return;if(ir(u.display,e)||Ke(u,e)||e.ctrlKey&&!e.altKey||t&&e.metaKey)return;var I=e.keyCode,L=e.charCode;if(s&&I==Po){Po=null,pe(e);return}if(s&&(!e.which||e.which<10)&&Ms(u,e))return;var M=String.fromCharCode(L==null?I:L);if(M=="\b")return;if(Fl(u,e,M))return;u.display.input.onKeyPress(e)}var Wl=400,Mo=function(e,u,I){this.time=e,this.pos=u,this.button=I};Mo.prototype.compare=function(e,u,I){return this.time+Wl>e&&Tt(u,this.pos)==0&&I==this.button};var Qa,qa;function Hl(e,u){var I=+new Date;return qa&&qa.compare(I,e,u)?(Qa=qa=null,"triple"):Qa&&Qa.compare(I,e,u)?(qa=new Mo(I,e,u),Qa=null,"double"):(Qa=new Mo(I,e,u),qa=null,"single")}function js(e){var u=this,I=u.display;if(Ke(u,e)||I.activeTouch&&I.input.supportsTouch())return;if(I.input.ensurePolled(),I.shift=e.shiftKey,ir(I,e)){h||(I.scroller.draggable=!1,setTimeout(function(){return I.scroller.draggable=!0},100));return}if(ko(u,e))return;var L=pi(u,e),M=qe(e),V=L?Hl(L,M):"single";if(window.focus(),M==1&&u.state.selectingText&&u.state.selectingText(e),L&&Kl(u,M,L,V,e))return;M==1?L?Gl(u,L,V,e):Be(e)==I.scroller&&pe(e):M==2?(L&&ao(u.doc,L),setTimeout(function(){return I.input.focus()},20)):M==3&&(g?u.display.input.onContextMenu(e):ia(u))}function Kl(e,u,I,L,M){var V="Click";return L=="double"?V="Double"+V:L=="triple"&&(V="Triple"+V),V=(u==1?"Left":u==2?"Middle":"Right")+V,Ja(e,Rs(V,M),M,function(ie){if(typeof ie=="string"&&(ie=$a[ie]),!ie)return!1;var le=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),le=ie(e,I)!=re}finally{e.state.suppressEdits=!1}return le})}function zl(e,u,I){var L=e.getOption("configureMouse"),M=L?L(e,u,I):{};if(M.unit==null){var V=d?I.shiftKey&&I.metaKey:I.altKey;M.unit=V?"rectangle":u=="single"?"char":u=="double"?"word":"line"}return(M.extend==null||e.doc.extend)&&(M.extend=e.doc.extend||I.shiftKey),M.addNew==null&&(M.addNew=t?I.metaKey:I.ctrlKey),M.moveOnDrag==null&&(M.moveOnDrag=!(t?I.altKey:I.ctrlKey)),M}function Gl(e,u,I,L){A?setTimeout(F(sn,e),0):e.curOp.focus=N();var M=zl(e,I,L),V=e.doc.sel,ie;e.options.dragDrop&&dt&&!e.isReadOnly()&&I=="single"&&(ie=V.contains(u))>-1&&(Tt((ie=V.ranges[ie]).from(),u)<0||u.xRel>0)&&(Tt(ie.to(),u)>0||u.xRel<0)?Vl(e,L,u,M):Xl(e,L,u,M)}function Vl(e,u,I,L){var M=e.display,V=!1,ie=Yr(e,function(ye){h&&(M.scroller.draggable=!1),e.state.draggingText=!1,et(M.wrapper.ownerDocument,"mouseup",ie),et(M.wrapper.ownerDocument,"mousemove",le),et(M.scroller,"dragstart",ue),et(M.scroller,"drop",ie),V||(pe(ye),L.addNew||ao(e.doc,I,null,null,L.extend),h&&!n||A&&C==9?setTimeout(function(){M.wrapper.ownerDocument.body.focus({preventScroll:!0}),M.input.focus()},20):M.input.focus())}),le=function(ye){V=V||Math.abs(u.clientX-ye.clientX)+Math.abs(u.clientY-ye.clientY)>=10},ue=function(){return V=!0};h&&(M.scroller.draggable=!0),e.state.draggingText=ie,ie.copy=!L.moveOnDrag,M.scroller.dragDrop&&M.scroller.dragDrop(),Me(M.wrapper.ownerDocument,"mouseup",ie),Me(M.wrapper.ownerDocument,"mousemove",le),Me(M.scroller,"dragstart",ue),Me(M.scroller,"drop",ie),ia(e),setTimeout(function(){return M.input.focus()},20)}function Fs(e,u,I){if(I=="char")return new lr(u,u);if(I=="word")return e.findWordAt(u);if(I=="line")return new lr(it(u.line,0),vt(e.doc,it(u.line+1,0)));var L=I(e,u);return new lr(L.from,L.to)}function Xl(e,u,I,L){var M=e.display,V=e.doc;pe(u);var ie,le,ue=V.sel,ye=ue.ranges;if(L.addNew&&!L.extend?(le=V.sel.contains(I),le>-1?ie=ye[le]:ie=new lr(I,I)):(ie=V.sel.primary(),le=V.sel.primIndex),L.unit=="rectangle")L.addNew||(ie=new lr(I,I)),I=pi(e,u,!0,!0),le=-1;else{var He=Fs(e,I,L.unit);L.extend?ie=Ao(ie,He.anchor,He.head,L.extend):ie=He}L.addNew?le==-1?(le=ye.length,si(V,Gi(e,ye.concat([ie]),le),{scroll:!1,origin:"*mouse"})):ye.length>1&&ye[le].empty()&&L.unit=="char"&&!L.extend?(si(V,Gi(e,ye.slice(0,le).concat(ye.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ue=V.sel):Ro(V,le,ie,me):(le=0,si(V,new ki([ie],0),me),ue=V.sel);var Ve=I;function ot(Kt){if(Tt(Ve,Kt)==0)return;if(Ve=Kt,L.unit=="rectangle"){for(var en=[],yn=e.options.tabSize,dn=K(Z(V,I.line).text,I.ch,yn),Gn=K(Z(V,Kt.line).text,Kt.ch,yn),br=Math.min(dn,Gn),Jr=Math.max(dn,Gn),Ar=Math.min(I.line,Kt.line),Li=Math.min(e.lastLine(),Math.max(I.line,Kt.line));Ar<=Li;Ar++){var Ti=Z(V,Ar).text,Br=Ee(Ti,br,yn);br==Jr?en.push(new lr(it(Ar,Br),it(Ar,Br))):Ti.length>Br&&en.push(new lr(it(Ar,Br),it(Ar,Ee(Ti,Jr,yn))))}en.length||en.push(new lr(I,I)),si(V,Gi(e,ue.ranges.slice(0,le).concat(en),le),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Kt)}else{var wi=ie,ti=Fs(e,Kt,L.unit),Vr=wi.anchor,Wr;Tt(ti.anchor,Vr)>0?(Wr=ti.head,Vr=Jt(wi.from(),ti.anchor)):(Wr=ti.anchor,Vr=nn(wi.to(),ti.head));var Ir=ue.ranges.slice(0);Ir[le]=Yl(e,new lr(vt(V,Vr),Wr)),si(V,Gi(e,Ir,le),me)}}var nt=M.wrapper.getBoundingClientRect(),_t=0;function Ot(Kt){var en=++_t,yn=pi(e,Kt,!0,L.unit=="rectangle");if(!yn)return;if(Tt(yn,Ve)!=0){e.curOp.focus=N(),ot(yn);var dn=zi(M,V);(yn.line>=dn.to||yn.line<dn.from)&&setTimeout(Yr(e,function(){_t==en&&Ot(Kt)}),150)}else{var Gn=Kt.clientY<nt.top?-20:Kt.clientY>nt.bottom?20:0;Gn&&setTimeout(Yr(e,function(){if(_t!=en)return;M.scroller.scrollTop+=Gn,Ot(Kt)}),50)}}function kt(Kt){e.state.selectingText=!1,_t=Infinity,Kt&&(pe(Kt),M.input.focus()),et(M.wrapper.ownerDocument,"mousemove",Ht),et(M.wrapper.ownerDocument,"mouseup",$t),V.history.lastSelOrigin=null}var Ht=Yr(e,function(Kt){Kt.buttons===0||!qe(Kt)?kt(Kt):Ot(Kt)}),$t=Yr(e,kt);e.state.selectingText=$t,Me(M.wrapper.ownerDocument,"mousemove",Ht),Me(M.wrapper.ownerDocument,"mouseup",$t)}function Yl(e,u){var I=u.anchor,L=u.head,M=Z(e.doc,I.line);if(Tt(I,L)==0&&I.sticky==L.sticky)return u;var V=at(M);if(!V)return u;var ie=ge(V,I.ch,I.sticky),le=V[ie];if(le.from!=I.ch&&le.to!=I.ch)return u;var ue=ie+(le.from==I.ch==(le.level!=1)?0:1);if(ue==0||ue==V.length)return u;var ye;if(L.line!=I.line)ye=(L.line-I.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var He=ge(V,L.ch,L.sticky),Ve=He-ie||(L.ch-I.ch)*(le.level==1?-1:1);He==ue-1||He==ue?ye=Ve<0:ye=Ve>0}var ot=V[ue+(ye?-1:0)],nt=ye==(ot.level==1),_t=nt?ot.from:ot.to,Ot=nt?"after":"before";return I.ch==_t&&I.sticky==Ot?u:new lr(new it(I.line,_t,Ot),L)}function Bs(e,u,I,L){var M,V;if(u.touches)M=u.touches[0].clientX,V=u.touches[0].clientY;else try{M=u.clientX,V=u.clientY}catch(ot){return!1}if(M>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;L&&pe(u);var ie=e.display,le=ie.lineDiv.getBoundingClientRect();if(V>le.bottom||!Ie(e,I))return Oe(u);V-=le.top-ie.viewOffset;for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var ye=ie.gutters.childNodes[ue];if(ye&&ye.getBoundingClientRect().right>=M){var He=Ze(e.doc,V),Ve=e.display.gutterSpecs[ue];return ze(e,I,e,He,Ve.className,u),Oe(u)}}}function ko(e,u){return Bs(e,u,"gutterClick",!0)}function Ws(e,u){if(ir(e.display,u)||$l(e,u))return;if(Ke(e,u,"contextmenu"))return;g||e.display.input.onContextMenu(u)}function $l(e,u){return Ie(e,"gutterContextMenu")?Bs(e,u,"gutterContextMenu",!1):!1}function Hs(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),qt(e)}var La={toString:function(){return"CodeMirror.Init"}},Ks={},ho={};function Jl(e){var u=e.optionHandlers;function I(L,M,V,ie){e.defaults[L]=M,V&&(u[L]=ie?function(le,ue,ye){ye!=La&&V(le,ue,ye)}:V)}e.defineOption=I,e.Init=La,I("value","",function(L,M){return L.setValue(M)},!0),I("mode",null,function(L,M){L.doc.modeOption=M,So(L)},!0),I("indentUnit",2,So,!0),I("indentWithTabs",!1),I("smartIndent",!0),I("tabSize",4,function(L){Ba(L),qt(L),Pr(L)},!0),I("lineSeparator",null,function(L,M){if(L.doc.lineSep=M,!M)return;var V=[],ie=L.doc.first;L.doc.iter(function(ue){for(var ye=0;;){var He=ue.text.indexOf(M,ye);if(He==-1)break;ye=He+M.length,V.push(it(ie,He))}ie++});for(var le=V.length-1;le>=0;le--)Oa(L.doc,M,V[le],it(V[le].line,V[le].ch+M.length))}),I("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(L,M,V){L.state.specialChars=new RegExp(M.source+(M.test(" ")?"":"| "),"g"),V!=La&&L.refresh()}),I("specialCharPlaceholder",or,function(L){return L.refresh()},!0),I("electricChars",!0),I("inputStyle",r?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),I("spellcheck",!1,function(L,M){return L.getInputField().spellcheck=M},!0),I("autocorrect",!1,function(L,M){return L.getInputField().autocorrect=M},!0),I("autocapitalize",!1,function(L,M){return L.getInputField().autocapitalize=M},!0),I("rtlMoveVisually",!v),I("wholeLineUpdateBefore",!0),I("theme","default",function(L){Hs(L),Fa(L)},!0),I("keyMap","default",function(L,M,V){var ie=co(M),le=V!=La&&co(V);le&&le.detach&&le.detach(L,ie),ie.attach&&ie.attach(L,le||null)}),I("extraKeys",null),I("configureMouse",null),I("lineWrapping",!1,ql,!0),I("gutters",[],function(L,M){L.display.gutterSpecs=To(M,L.options.lineNumbers),Fa(L)},!0),I("fixedGutter",!0,function(L,M){L.display.gutters.style.left=M?Rr(L.display)+"px":"0",L.refresh()},!0),I("coverGutterNextToScrollbar",!1,function(L){return xa(L)},!0),I("scrollbarStyle","native",function(L){Go(L),xa(L),L.display.scrollbars.setScrollTop(L.doc.scrollTop),L.display.scrollbars.setScrollLeft(L.doc.scrollLeft)},!0),I("lineNumbers",!1,function(L,M){L.display.gutterSpecs=To(L.options.gutters,M),Fa(L)},!0),I("firstLineNumber",1,Fa,!0),I("lineNumberFormatter",function(L){return L},Fa,!0),I("showCursorWhenSelecting",!1,Vt,!0),I("resetSelectionOnContextMenu",!0),I("lineWiseCopyCut",!0),I("pasteLinesPerSelection",!0),I("selectionsMayTouch",!1),I("readOnly",!1,function(L,M){M=="nocursor"&&(Ei(L),L.display.input.blur()),L.display.input.readOnlyChanged(M)}),I("screenReaderLabel",null,function(L,M){M=M===""?null:M,L.display.input.screenReaderLabelChanged(M)}),I("disableInput",!1,function(L,M){M||L.display.input.reset()},!0),I("dragDrop",!0,Ql),I("allowDropFileTypes",null),I("cursorBlinkRate",530),I("cursorScrollMargin",0),I("cursorHeight",1,Vt,!0),I("singleCursorHeightPerLine",!0,Vt,!0),I("workTime",100),I("workDelay",100),I("flattenSpans",!0,Ba,!0),I("addModeClass",!1,Ba,!0),I("pollInterval",100),I("undoDepth",200,function(L,M){return L.doc.history.undoDepth=M}),I("historyEventDelay",1250),I("viewportMargin",10,function(L){return L.refresh()},!0),I("maxHighlightLength",1e4,Ba,!0),I("moveInputWithCursor",!0,function(L,M){M||L.display.input.resetPosition()}),I("tabindex",null,function(L,M){return L.display.input.getField().tabIndex=M||""}),I("autofocus",null),I("direction","ltr",function(L,M){return L.doc.setDirection(M)},!0),I("phrases",null)}function Ql(e,u,I){var L=I&&I!=La;if(!u!=!L){var M=e.display.dragFunctions,V=u?Me:et;V(e.display.scroller,"dragstart",M.start),V(e.display.scroller,"dragenter",M.enter),V(e.display.scroller,"dragover",M.over),V(e.display.scroller,"dragleave",M.leave),V(e.display.scroller,"drop",M.drop)}}function ql(e){e.options.lineWrapping?(j(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(_(e.display.wrapper,"CodeMirror-wrap"),Qi(e)),bi(e),Pr(e),qt(e),setTimeout(function(){return xa(e)},100)}function Sr(e,u){var I=this;if(!(this instanceof Sr))return new Sr(e,u);this.options=u=u?k(u):{},k(Ks,u,!1);var L=u.value;typeof L=="string"?L=new xi(L,u.mode,null,u.lineSeparator,u.direction):u.mode&&(L.modeOption=u.mode),this.doc=L;var M=new Sr.inputStyles[u.inputStyle](this),V=this.display=new dl(e,L,M,u);V.wrapper.CodeMirror=this,Hs(this),u.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Go(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 Y,keySeq:null,specialChars:null},u.autofocus&&!r&&V.input.focus(),A&&C<11&&setTimeout(function(){return I.display.input.reset(!0)},20),Zl(this),Ll(),ga(this),this.curOp.forceUpdate=!0,ts(this,L),u.autofocus&&!r||this.hasFocus()?setTimeout(function(){I.hasFocus()&&!I.state.focused&&ha(I)},20):Ei(this);for(var ie in ho)ho.hasOwnProperty(ie)&&ho[ie](this,u[ie],La);Yo(this),u.finishInit&&u.finishInit(this);for(var le=0;le<No.length;++le)No[le](this);va(this),h&&u.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}Sr.defaults=Ks,Sr.optionHandlers=ho;function Zl(e){var u=e.display;Me(u.scroller,"mousedown",Yr(e,js)),A&&C<11?Me(u.scroller,"dblclick",Yr(e,function(ue){if(Ke(e,ue))return;var ye=pi(e,ue);if(!ye||ko(e,ue)||ir(e.display,ue))return;pe(ue);var He=e.findWordAt(ye);ao(e.doc,He.anchor,He.head)})):Me(u.scroller,"dblclick",function(ue){return Ke(e,ue)||pe(ue)}),Me(u.scroller,"contextmenu",function(ue){return Ws(e,ue)}),Me(u.input.getField(),"contextmenu",function(ue){u.scroller.contains(ue.target)||Ws(e,ue)});var I,L={end:0};function M(){u.activeTouch&&(I=setTimeout(function(){return u.activeTouch=null},1e3),L=u.activeTouch,L.end=+new Date)}function V(ue){if(ue.touches.length!=1)return!1;var ye=ue.touches[0];return ye.radiusX<=1&&ye.radiusY<=1}function ie(ue,ye){if(ye.left==null)return!0;var He=ye.left-ue.left,Ve=ye.top-ue.top;return He*He+Ve*Ve>20*20}Me(u.scroller,"touchstart",function(ue){if(!Ke(e,ue)&&!V(ue)&&!ko(e,ue)){u.input.ensurePolled(),clearTimeout(I);var ye=+new Date;u.activeTouch={start:ye,moved:!1,prev:ye-L.end<=300?L:null},ue.touches.length==1&&(u.activeTouch.left=ue.touches[0].pageX,u.activeTouch.top=ue.touches[0].pageY)}}),Me(u.scroller,"touchmove",function(){u.activeTouch&&(u.activeTouch.moved=!0)}),Me(u.scroller,"touchend",function(ue){var ye=u.activeTouch;if(ye&&!ir(u,ue)&&ye.left!=null&&!ye.moved&&new Date-ye.start<300){var He=e.coordsChar(u.activeTouch,"page"),Ve;!ye.prev||ie(ye,ye.prev)?Ve=new lr(He,He):!ye.prev.prev||ie(ye,ye.prev.prev)?Ve=e.findWordAt(He):Ve=new lr(it(He.line,0),vt(e.doc,it(He.line+1,0))),e.setSelection(Ve.anchor,Ve.head),e.focus(),pe(ue)}M()}),Me(u.scroller,"touchcancel",M),Me(u.scroller,"scroll",function(){u.scroller.clientHeight&&(ka(e,u.scroller.scrollTop),pa(e,u.scroller.scrollLeft,!0),ze(e,"scroll",e))}),Me(u.scroller,"mousewheel",function(ue){return Qo(e,ue)}),Me(u.scroller,"DOMMouseScroll",function(ue){return Qo(e,ue)}),Me(u.wrapper,"scroll",function(){return u.wrapper.scrollTop=u.wrapper.scrollLeft=0}),u.dragFunctions={enter:function(ue){Ke(e,ue)||we(ue)},over:function(ue){Ke(e,ue)||(Rl(e,ue),we(ue))},start:function(ue){return Al(e,ue)},drop:Yr(e,Cl),leave:function(ue){Ke(e,ue)||Ss(e)}};var le=u.input.getField();Me(le,"keyup",function(ue){return Ns.call(e,ue)}),Me(le,"keydown",Yr(e,ks)),Me(le,"keypress",Yr(e,Us)),Me(le,"focus",function(ue){return ha(e,ue)}),Me(le,"blur",function(ue){return Ei(e,ue)})}var No=[];Sr.defineInitHook=function(e){return No.push(e)};function Za(e,u,I,L){var M=e.doc,V;I==null&&(I="add"),I=="smart"&&(M.mode.indent?V=xn(e,u).state:I="prev");var ie=e.options.tabSize,le=Z(M,u),ue=K(le.text,null,ie);le.stateAfter&&(le.stateAfter=null);var ye=le.text.match(/^\s*/)[0],He;if(!L&&!/\S/.test(le.text))He=0,I="not";else if(I=="smart"&&(He=M.mode.indent(V,le.text.slice(ye.length),le.text),He==re||He>150)){if(!L)return;I="prev"}I=="prev"?u>M.first?He=K(Z(M,u-1).text,null,ie):He=0:I=="add"?He=ue+e.options.indentUnit:I=="subtract"?He=ue-e.options.indentUnit:typeof I=="number"&&(He=ue+I),He=Math.max(0,He);var Ve="",ot=0;if(e.options.indentWithTabs)for(var nt=Math.floor(He/ie);nt;--nt)ot+=ie,Ve+=" ";if(ot<He&&(Ve+=be(He-ot)),Ve!=ye)return Oa(M,Ve,it(u,0),it(u,ye.length),"+input"),le.stateAfter=null,!0;for(var _t=0;_t<M.sel.ranges.length;_t++){var Ot=M.sel.ranges[_t];if(Ot.head.line==u&&Ot.head.ch<ye.length){var kt=it(u,ye.length);Ro(M,_t,new lr(kt,kt));break}}}var Vi=null;function po(e){Vi=e}function Uo(e,u,I,L,M){var V=e.doc;e.display.shift=!1,L||(L=V.sel);var ie=+new Date-200,le=M=="paste"||e.state.pasteIncoming>ie,ue=st(u),ye=null;if(le&&L.ranges.length>1)if(Vi&&Vi.text.join(`
|
|
|
`)==u){if(L.ranges.length%Vi.text.length==0){ye=[];for(var He=0;He<Vi.text.length;He++)ye.push(V.splitLines(Vi.text[He]))}}else ue.length==L.ranges.length&&e.options.pasteLinesPerSelection&&(ye=Re(ue,function(Ht){return[Ht]}));for(var Ve=e.curOp.updateInput,ot=L.ranges.length-1;ot>=0;ot--){var nt=L.ranges[ot],_t=nt.from(),Ot=nt.to();nt.empty()&&(I&&I>0?_t=it(_t.line,_t.ch-I):e.state.overwrite&&!le?Ot=it(Ot.line,Math.min(Z(V,Ot.line).text.length,Ot.ch+Ue(ue).length)):le&&Vi&&Vi.lineWise&&Vi.text.join(`
|
|
|
`)==ue.join(`
|
|
|
`)&&(_t=Ot=it(_t.line,0)));var kt={from:_t,to:Ot,text:ye?ye[ot%ye.length]:ue,origin:M||(le?"paste":e.state.cutIncoming>ie?"cut":"+input")};Sa(e.doc,kt),Ft(e,"inputRead",e,kt)}u&&!le&&Gs(e,u),Ea(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ve),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function zs(e,u){var I=e.clipboardData&&e.clipboardData.getData("Text");if(I)return e.preventDefault(),!u.isReadOnly()&&!u.options.disableInput&&Ri(u,function(){return Uo(u,I,0,null,"paste")}),!0}function Gs(e,u){if(!e.options.electricChars||!e.options.smartIndent)return;for(var I=e.doc.sel,L=I.ranges.length-1;L>=0;L--){var M=I.ranges[L];if(M.head.ch>100||L&&I.ranges[L-1].head.line==M.head.line)continue;var V=e.getModeAt(M.head),ie=!1;if(V.electricChars){for(var le=0;le<V.electricChars.length;le++)if(u.indexOf(V.electricChars.charAt(le))>-1){ie=Za(e,M.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(Z(e.doc,M.head.line).text.slice(0,M.head.ch))&&(ie=Za(e,M.head.line,"smart")));ie&&Ft(e,"electricInput",e,M.head.line)}}function Vs(e){for(var u=[],I=[],L=0;L<e.doc.sel.ranges.length;L++){var M=e.doc.sel.ranges[L].head.line,V={anchor:it(M,0),head:it(M+1,0)};I.push(V),u.push(e.getRange(V.anchor,V.head))}return{text:u,ranges:I}}function Xs(e,u,I,L){e.setAttribute("autocorrect",I?"":"off"),e.setAttribute("autocapitalize",L?"":"off"),e.setAttribute("spellcheck",!!u)}function Ys(){var e=E("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),u=E("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return h?e.style.width="1000px":e.setAttribute("wrap","off"),l&&(e.style.border="1px solid black"),Xs(e),u}function eu(e){var u=e.optionHandlers,I=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(L,M){var V=this.options,ie=V[L];if(V[L]==M&&L!="mode")return;V[L]=M,u.hasOwnProperty(L)&&Yr(this,u[L])(this,M,ie),ze(this,"optionChange",this,L)},getOption:function(L){return this.options[L]},getDoc:function(){return this.doc},addKeyMap:function(L,M){this.state.keyMaps[M?"push":"unshift"](co(L))},removeKeyMap:function(L){for(var M=this.state.keyMaps,V=0;V<M.length;++V)if(M[V]==L||M[V].name==L)return M.splice(V,1),!0},addOverlay:mi(function(L,M){var V=L.token?L:e.getMode(this.options,L);if(V.startState)throw new Error("Overlays may not be stateful.");De(this.state.overlays,{mode:V,modeSpec:L,opaque:M&&M.opaque,priority:M&&M.priority||0},function(ie){return ie.priority}),this.state.modeGen++,Pr(this)}),removeOverlay:mi(function(L){for(var M=this.state.overlays,V=0;V<M.length;++V){var ie=M[V].modeSpec;if(ie==L||typeof L=="string"&&ie.name==L){M.splice(V,1),this.state.modeGen++,Pr(this);return}}}),indentLine:mi(function(L,M,V){typeof M!="string"&&typeof M!="number"&&(M==null?M=this.options.smartIndent?"smart":"prev":M=M?"add":"subtract"),bt(this.doc,L)&&Za(this,L,M,V)}),indentSelection:mi(function(L){for(var M=this.doc.sel.ranges,V=-1,ie=0;ie<M.length;ie++){var le=M[ie];if(le.empty())le.head.line>V&&(Za(this,le.head.line,L,!0),V=le.head.line,ie==this.doc.sel.primIndex&&Ea(this));else{var ue=le.from(),ye=le.to(),He=Math.max(V,ue.line);V=Math.min(this.lastLine(),ye.line-(ye.ch?0:1))+1;for(var Ve=He;Ve<V;++Ve)Za(this,Ve,L);var ot=this.doc.sel.ranges;ue.ch==0&&M.length==ot.length&&ot[ie].from().ch>0&&Ro(this.doc,ie,new lr(ue,ot[ie].to()),oe)}}}),getTokenAt:function(L,M){return Nr(this,L,M)},getLineTokens:function(L,M){return Nr(this,it(L),M,!0)},getTokenTypeAt:function(L){L=vt(this.doc,L);var M=rr(this,Z(this.doc,L.line)),V=0,ie=(M.length-1)/2,le=L.ch,ue;if(le==0)ue=M[2];else for(;;){var ye=V+ie>>1;if((ye?M[ye*2-1]:0)>=le)ie=ye;else if(M[ye*2+1]<le)V=ye+1;else{ue=M[ye*2+2];break}}var He=ue?ue.indexOf("overlay "):-1;return He<0?ue:He==0?null:ue.slice(0,He-1)},getModeAt:function(L){var M=this.doc.mode;return M.innerMode?e.innerMode(M,this.getTokenAt(L).state).mode:M},getHelper:function(L,M){return this.getHelpers(L,M)[0]},getHelpers:function(L,M){var V=[];if(!I.hasOwnProperty(M))return V;var ie=I[M],le=this.getModeAt(L);if(typeof le[M]=="string")ie[le[M]]&&V.push(ie[le[M]]);else if(le[M])for(var ue=0;ue<le[M].length;ue++){var ye=ie[le[M][ue]];ye&&V.push(ye)}else le.helperType&&ie[le.helperType]?V.push(ie[le.helperType]):ie[le.name]&&V.push(ie[le.name]);for(var He=0;He<ie._global.length;He++){var Ve=ie._global[He];Ve.pred(le,this)&&H(V,Ve.val)==-1&&V.push(Ve.val)}return V},getStateAfter:function(L,M){var V=this.doc;return L=Nt(V,L==null?V.first+V.size-1:L),xn(this,L+1,M).state},cursorCoords:function(L,M){var V,ie=this.doc.sel.primary();return L==null?V=ie.head:typeof L=="object"?V=vt(this.doc,L):V=L?ie.from():ie.to(),$n(this,V,M||"page")},charCoords:function(L,M){return Yn(this,vt(this.doc,L),M||"page")},coordsChar:function(L,M){return L=ar(this,L,M||"page"),Ai(this,L.left,L.top)},lineAtHeight:function(L,M){return L=ar(this,{top:L,left:0},M||"page").top,Ze(this.doc,L+this.display.viewOffset)},heightAtLine:function(L,M,V){var ie=!1,le;if(typeof L=="number"){var ue=this.doc.first+this.doc.size-1;L<this.doc.first?L=this.doc.first:L>ue&&(L=ue,ie=!0),le=Z(this.doc,L)}else le=L;return vn(this,le,{top:0,left:0},M||"page",V||ie).top+(ie?this.doc.height-yi(le):0)},defaultTextHeight:function(){return mn(this.display)},defaultCharWidth:function(){return jn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(L,M,V,ie,le){var ue=this.display;L=$n(this,vt(this.doc,L));var ye=L.bottom,He=L.left;if(M.style.position="absolute",M.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(M),ue.sizer.appendChild(M),ie=="over")ye=L.top;else if(ie=="above"||ie=="near"){var Ve=Math.max(ue.wrapper.clientHeight,this.doc.height),ot=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(ie=="above"||L.bottom+M.offsetHeight>Ve)&&L.top>M.offsetHeight?ye=L.top-M.offsetHeight:L.bottom+M.offsetHeight<=Ve&&(ye=L.bottom),He+M.offsetWidth>ot&&(He=ot-M.offsetWidth)}M.style.top=ye+"px",M.style.left=M.style.right="",le=="right"?(He=ue.sizer.clientWidth-M.offsetWidth,M.style.right="0px"):(le=="left"?He=0:le=="middle"&&(He=(ue.sizer.clientWidth-M.offsetWidth)/2),M.style.left=He+"px"),V&&vo(this,{left:He,top:ye,right:He+M.offsetWidth,bottom:ye+M.offsetHeight})},triggerOnKeyDown:mi(ks),triggerOnKeyPress:mi(Us),triggerOnKeyUp:Ns,triggerOnMouseDown:mi(js),execCommand:function(L){if($a.hasOwnProperty(L))return $a[L].call(null,this)},triggerElectric:mi(function(L){Gs(this,L)}),findPosH:function(L,M,V,ie){var le=1;M<0&&(le=-1,M=-M);for(var ue=vt(this.doc,L),ye=0;ye<M&&!(ue=jo(this.doc,ue,le,V,ie),ue.hitSide);++ye);return ue},moveH:mi(function(L,M){var V=this;this.extendSelectionsBy(function(ie){return V.display.shift||V.doc.extend||ie.empty()?jo(V.doc,ie.head,L,M,V.options.rtlMoveVisually):L<0?ie.from():ie.to()},he)}),deleteH:mi(function(L,M){var V=this.doc.sel,ie=this.doc;V.somethingSelected()?ie.replaceSelection("",null,"+delete"):Ra(this,function(le){var ue=jo(ie,le.head,L,M,!1);return L<0?{from:ue,to:le.head}:{from:le.head,to:ue}})}),findPosV:function(L,M,V,ie){var le=1,ue=ie;M<0&&(le=-1,M=-M);for(var ye=vt(this.doc,L),He=0;He<M;++He){var Ve=$n(this,ye,"div");if(ue==null?ue=Ve.left:Ve.left=ue,ye=$s(this,Ve,le,V),ye.hitSide)break}return ye},moveV:mi(function(L,M){var V=this,ie=this.doc,le=[],ue=!this.display.shift&&!ie.extend&&ie.sel.somethingSelected();if(ie.extendSelectionsBy(function(He){if(ue)return L<0?He.from():He.to();var Ve=$n(V,He.head,"div");He.goalColumn!=null&&(Ve.left=He.goalColumn),le.push(Ve.left);var ot=$s(V,Ve,L,M);return M=="page"&&He==ie.sel.primary()&&_o(V,Yn(V,ot,"div").top-Ve.top),ot},he),le.length)for(var ye=0;ye<ie.sel.ranges.length;ye++)ie.sel.ranges[ye].goalColumn=le[ye]}),findWordAt:function(L){var M=this.doc,V=Z(M,L.line).text,ie=L.ch,le=L.ch;if(V){var ue=this.getHelper(L,"wordChars");(L.sticky=="before"||le==V.length)&&ie?--ie:++le;for(var ye=V.charAt(ie),He=Ne(ye,ue)?function(Ve){return Ne(Ve,ue)}:/\s/.test(ye)?function(Ve){return/\s/.test(Ve)}:function(Ve){return!/\s/.test(Ve)&&!Ne(Ve)};ie>0&&He(V.charAt(ie-1));)--ie;for(;le<V.length&&He(V.charAt(le));)++le}return new lr(it(L.line,ie),it(L.line,le))},toggleOverwrite:function(L){if(L!=null&&L==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?j(this.display.cursorDiv,"CodeMirror-overwrite"):_(this.display.cursorDiv,"CodeMirror-overwrite"),ze(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==N()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:mi(function(L,M){Ma(this,L,M)}),getScrollInfo:function(){var L=this.display.scroller;return{left:L.scrollLeft,top:L.scrollTop,height:L.scrollHeight-er(this)-this.display.barHeight,width:L.scrollWidth-er(this)-this.display.barWidth,clientHeight:Qn(this),clientWidth:In(this)}},scrollIntoView:mi(function(L,M){L==null?(L={from:this.doc.sel.primary().head,to:null},M==null&&(M=this.options.cursorScrollMargin)):typeof L=="number"?L={from:it(L,0),to:null}:L.from==null&&(L={from:L,to:null}),L.to||(L.to=L.from),L.margin=M||0,L.from.line!=null?Qs(this,L):Wo(this,L.from,L.to,L.margin)}),setSize:mi(function(L,M){var V=this,ie=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};L!=null&&(this.display.wrapper.style.width=ie(L)),M!=null&&(this.display.wrapper.style.height=ie(M)),this.options.lineWrapping&&hn(this);var le=this.display.viewFrom;this.doc.iter(le,this.display.viewTo,function(ue){if(ue.widgets){for(var ye=0;ye<ue.widgets.length;ye++)if(ue.widgets[ye].noHScroll){oi(V,le,"widget");break}}++le}),this.curOp.forceUpdate=!0,ze(this,"refresh",this)}),operation:function(L){return Ri(this,L)},startOperation:function(){return ga(this)},endOperation:function(){return va(this)},refresh:mi(function(){var L=this.display.cachedTextHeight;Pr(this),this.curOp.forceUpdate=!0,qt(this),Ma(this,this.doc.scrollLeft,this.doc.scrollTop),Eo(this.display),(L==null||Math.abs(L-mn(this.display))>.5||this.options.lineWrapping)&&bi(this),ze(this,"refresh",this)}),swapDoc:mi(function(L){var M=this.doc;return M.cm=null,this.state.selectingText&&this.state.selectingText(),ts(this,L),qt(this),this.display.input.reset(),Ma(this,L.scrollLeft,L.scrollTop),this.curOp.forceScroll=!0,Ft(this,"swapDoc",this,M),M}),phrase:function(L){var M=this.options.phrases;return M&&Object.prototype.hasOwnProperty.call(M,L)?M[L]:L},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}},Ce(e),e.registerHelper=function(L,M,V){I.hasOwnProperty(L)||(I[L]=e[L]={_global:[]}),I[L][M]=V},e.registerGlobalHelper=function(L,M,V,ie){e.registerHelper(L,M,ie),I[L]._global.push({pred:V,val:ie})}}function jo(e,u,I,L,M){var V=u,ie=I,le=Z(e,u.line),ue=M&&e.direction=="rtl"?-I:I;function ye(){var $t=u.line+ue;return $t<e.first||$t>=e.first+e.size?!1:(u=new it($t,u.ch,u.sticky),le=Z(e,$t))}function He($t){var Kt;if(L=="codepoint"){var en=le.text.charCodeAt(u.ch+(L>0?0:-1));isNaN(en)?Kt=null:Kt=new it(u.line,Math.max(0,Math.min(le.text.length,u.ch+I*(en>=55296&&en<56320?2:1))),-I)}else M?Kt=kl(e.cm,le,u,I):Kt=Io(le,u,I);if(Kt==null)if(!$t&&ye())u=Do(M,e.cm,le,u.line,ue);else return!1;else u=Kt;return!0}if(L=="char"||L=="codepoint")He();else if(L=="column")He(!0);else if(L=="word"||L=="group")for(var Ve=null,ot=L=="group",nt=e.cm&&e.cm.getHelper(u,"wordChars"),_t=!0;!(I<0&&!He(!_t));_t=!1){var Ot=le.text.charAt(u.ch)||`
|
|
|
`,kt=Ne(Ot,nt)?"w":ot&&Ot==`
|
|
|
`?"n":!ot||/\s/.test(Ot)?null:"p";if(ot&&!_t&&!kt&&(kt="s"),Ve&&Ve!=kt){I<0&&(I=1,He(),u.sticky="after");break}if(kt&&(Ve=kt),I>0&&!He(!_t))break}var Ht=so(e,u,V,ie,!0);return Qt(V,Ht)&&(Ht.hitSide=!0),Ht}function $s(e,u,I,L){var M=e.doc,V=u.left,ie;if(L=="page"){var le=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(le-.5*mn(e.display),3);ie=(I>0?u.bottom:u.top)+I*ue}else L=="line"&&(ie=I>0?u.bottom+3:u.top-3);for(var ye;!(ye=Ai(e,V,ie),!ye.outside);){if(I<0?ie<=0:ie>=M.height){ye.hitSide=!0;break}ie+=I*5}return ye}var hr=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Y,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};hr.prototype.init=function(e){var u=this,I=this,L=I.cm,M=I.div=e.lineDiv;Xs(M,L.options.spellcheck,L.options.autocorrect,L.options.autocapitalize);function V(le){for(var ue=le.target;ue;ue=ue.parentNode){if(ue==M)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}Me(M,"paste",function(le){if(!V(le)||Ke(L,le)||zs(le,L))return;C<=11&&setTimeout(Yr(L,function(){return u.updateFromDOM()}),20)}),Me(M,"compositionstart",function(le){u.composing={data:le.data,done:!1}}),Me(M,"compositionupdate",function(le){u.composing||(u.composing={data:le.data,done:!1})}),Me(M,"compositionend",function(le){u.composing&&(le.data!=u.composing.data&&u.readFromDOMSoon(),u.composing.done=!0)}),Me(M,"touchstart",function(){return I.forceCompositionEnd()}),Me(M,"input",function(){u.composing||u.readFromDOMSoon()});function ie(le){if(!V(le)||Ke(L,le))return;if(L.somethingSelected())po({lineWise:!1,text:L.getSelections()}),le.type=="cut"&&L.replaceSelection("",null,"cut");else if(L.options.lineWiseCopyCut){var ue=Vs(L);po({lineWise:!0,text:ue.text}),le.type=="cut"&&L.operation(function(){L.setSelections(ue.ranges,0,oe),L.replaceSelection("",null,"cut")})}else return;if(le.clipboardData){le.clipboardData.clearData();var ye=Vi.text.join(`
|
|
|
`);if(le.clipboardData.setData("Text",ye),le.clipboardData.getData("Text")==ye){le.preventDefault();return}}var He=Ys(),Ve=He.firstChild;L.display.lineSpace.insertBefore(He,L.display.lineSpace.firstChild),Ve.value=Vi.text.join(`
|
|
|
`);var ot=document.activeElement;J(Ve),setTimeout(function(){L.display.lineSpace.removeChild(He),ot.focus(),ot==M&&I.showPrimarySelection()},50)}Me(M,"copy",ie),Me(M,"cut",ie)},hr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},hr.prototype.prepareSelection=function(){var e=An(this.cm,!1);return e.focus=document.activeElement==this.div,e},hr.prototype.showSelection=function(e,u){if(!e||!this.cm.display.view.length)return;(e.focus||u)&&this.showPrimarySelection(),this.showMultipleSelections(e)},hr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},hr.prototype.showPrimarySelection=function(){var e=this.getSelection(),u=this.cm,I=u.doc.sel.primary(),L=I.from(),M=I.to();if(u.display.viewTo==u.display.viewFrom||L.line>=u.display.viewTo||M.line<u.display.viewFrom){e.removeAllRanges();return}var V=mo(u,e.anchorNode,e.anchorOffset),ie=mo(u,e.focusNode,e.focusOffset);if(V&&!V.bad&&ie&&!ie.bad&&Tt(Jt(V,ie),L)==0&&Tt(nn(V,ie),M)==0)return;var le=u.display.view,ue=L.line>=u.display.viewFrom&&Js(u,L)||{node:le[0].measure.map[2],offset:0},ye=M.line<u.display.viewTo&&Js(u,M);if(!ye){var He=le[le.length-1].measure,Ve=He.maps?He.maps[He.maps.length-1]:He.map;ye={node:Ve[Ve.length-1],offset:Ve[Ve.length-2]-Ve[Ve.length-3]}}if(!ue||!ye){e.removeAllRanges();return}var ot=e.rangeCount&&e.getRangeAt(0),nt;try{nt=T(ue.node,ue.offset,ye.offset,ye.node)}catch(_t){}nt&&(!B&&u.state.focused?(e.collapse(ue.node,ue.offset),nt.collapsed||(e.removeAllRanges(),e.addRange(nt))):(e.removeAllRanges(),e.addRange(nt)),ot&&e.anchorNode==null?e.addRange(ot):B&&this.startGracePeriod()),this.rememberSelection()},hr.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)},hr.prototype.showMultipleSelections=function(e){f(this.cm.display.cursorDiv,e.cursors),f(this.cm.display.selectionDiv,e.selection)},hr.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},hr.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var u=e.getRangeAt(0).commonAncestorContainer;return R(this.div,u)},hr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},hr.prototype.blur=function(){this.div.blur()},hr.prototype.getField=function(){return this.div},hr.prototype.supportsTouch=function(){return!0},hr.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Ri(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function u(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,u))}this.polling.set(this.cm.options.pollInterval,u)},hr.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},hr.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),u=this.cm;if(a&&c&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var I=mo(u,e.anchorNode,e.anchorOffset),L=mo(u,e.focusNode,e.focusOffset);I&&L&&Ri(u,function(){si(u.doc,sa(I,L),oe),(I.bad||L.bad)&&(u.curOp.selectionChanged=!0)})},hr.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,u=e.display,I=e.doc.sel.primary(),L=I.from(),M=I.to();if(L.ch==0&&L.line>e.firstLine()&&(L=it(L.line-1,Z(e.doc,L.line-1).length)),M.ch==Z(e.doc,M.line).text.length&&M.line<e.lastLine()&&(M=it(M.line+1,0)),L.line<u.viewFrom||M.line>u.viewTo-1)return!1;var V,ie,le;L.line==u.viewFrom||(V=Gr(e,L.line))==0?(ie=Ge(u.view[0].line),le=u.view[0].node):(ie=Ge(u.view[V].line),le=u.view[V-1].node.nextSibling);var ue=Gr(e,M.line),ye,He;if(ue==u.view.length-1?(ye=u.viewTo-1,He=u.lineDiv.lastChild):(ye=Ge(u.view[ue+1].line)-1,He=u.view[ue+1].node.previousSibling),!le)return!1;for(var Ve=e.doc.splitLines(nu(e,le,He,ie,ye)),ot=ne(e.doc,it(ie,0),it(ye,Z(e.doc,ye).text.length));Ve.length>1&&ot.length>1;)if(Ue(Ve)==Ue(ot))Ve.pop(),ot.pop(),ye--;else if(Ve[0]==ot[0])Ve.shift(),ot.shift(),ie++;else break;for(var nt=0,_t=0,Ot=Ve[0],kt=ot[0],Ht=Math.min(Ot.length,kt.length);nt<Ht&&Ot.charCodeAt(nt)==kt.charCodeAt(nt);)++nt;for(var $t=Ue(Ve),Kt=Ue(ot),en=Math.min($t.length-(Ve.length==1?nt:0),Kt.length-(ot.length==1?nt:0));_t<en&&$t.charCodeAt($t.length-_t-1)==Kt.charCodeAt(Kt.length-_t-1);)++_t;if(Ve.length==1&&ot.length==1&&ie==L.line)for(;nt&&nt>L.ch&&$t.charCodeAt($t.length-_t-1)==Kt.charCodeAt(Kt.length-_t-1);)nt--,_t++;Ve[Ve.length-1]=$t.slice(0,$t.length-_t).replace(/^\u200b+/,""),Ve[0]=Ve[0].slice(nt).replace(/\u200b+$/,"");var yn=it(ie,nt),dn=it(ye,ot.length?Ue(ot).length-_t:0);if(Ve.length>1||Ve[0]||Tt(yn,dn))return Oa(e.doc,Ve,yn,dn,"+input"),!0},hr.prototype.ensurePolled=function(){this.forceCompositionEnd()},hr.prototype.reset=function(){this.forceCompositionEnd()},hr.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},hr.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)},hr.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ri(this.cm,function(){return Pr(e.cm)})},hr.prototype.setUneditable=function(e){e.contentEditable="false"},hr.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Yr(this.cm,Uo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},hr.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},hr.prototype.onContextMenu=function(){},hr.prototype.resetPosition=function(){},hr.prototype.needsContentAttribute=!0;function Js(e,u){var I=sr(e,u.line);if(!I||I.hidden)return null;var L=Z(e.doc,u.line),M=jt(I,L,u.line),V=at(L,e.doc.direction),ie="left";if(V){var le=ge(V,u.ch);ie=le%2?"right":"left"}var ue=on(M.map,u.ch,ie);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}function tu(e){for(var u=e;u;u=u.parentNode)if(/CodeMirror-gutter-wrapper/.test(u.className))return!0;return!1}function Ia(e,u){return u&&(e.bad=!0),e}function nu(e,u,I,L,M){var V="",ie=!1,le=e.doc.lineSeparator(),ue=!1;function ye(nt){return function(_t){return _t.id==nt}}function He(){ie&&(V+=le,ue&&(V+=le),ie=ue=!1)}function Ve(nt){nt&&(He(),V+=nt)}function ot(nt){if(nt.nodeType==1){var _t=nt.getAttribute("cm-text");if(_t){Ve(_t);return}var Ot=nt.getAttribute("cm-marker"),kt;if(Ot){var Ht=e.findMarks(it(L,0),it(M+1,0),ye(+Ot));Ht.length&&(kt=Ht[0].find(0))&&Ve(ne(e.doc,kt.from,kt.to).join(le));return}if(nt.getAttribute("contenteditable")=="false")return;var $t=/^(pre|div|p|li|table|br)$/i.test(nt.nodeName);if(!/^br$/i.test(nt.nodeName)&&nt.textContent.length==0)return;$t&&He();for(var Kt=0;Kt<nt.childNodes.length;Kt++)ot(nt.childNodes[Kt]);/^(pre|p)$/i.test(nt.nodeName)&&(ue=!0),$t&&(ie=!0)}else nt.nodeType==3&&Ve(nt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(ot(u),u==I);)u=u.nextSibling,ue=!1;return V}function mo(e,u,I){var L;if(u==e.display.lineDiv){if(L=e.display.lineDiv.childNodes[I],!L)return Ia(e.clipPos(it(e.display.viewTo-1)),!0);u=null,I=0}else for(L=u;;L=L.parentNode){if(!L||L==e.display.lineDiv)return null;if(L.parentNode&&L.parentNode==e.display.lineDiv)break}for(var M=0;M<e.display.view.length;M++){var V=e.display.view[M];if(V.node==L)return ru(V,u,I)}}function ru(e,u,I){var L=e.text.firstChild,M=!1;if(!u||!R(L,u))return Ia(it(Ge(e.line),0),!0);if(u==L&&(M=!0,u=L.childNodes[I],I=0,!u)){var V=e.rest?Ue(e.rest):e.line;return Ia(it(Ge(V),V.text.length),M)}var ie=u.nodeType==3?u:null,le=u;for(!ie&&u.childNodes.length==1&&u.firstChild.nodeType==3&&(ie=u.firstChild,I&&(I=ie.nodeValue.length));le.parentNode!=L;)le=le.parentNode;var ue=e.measure,ye=ue.maps;function He(kt,Ht,$t){for(var Kt=-1;Kt<(ye?ye.length:0);Kt++)for(var en=Kt<0?ue.map:ye[Kt],yn=0;yn<en.length;yn+=3){var dn=en[yn+2];if(dn==kt||dn==Ht){var Gn=Ge(Kt<0?e.line:e.rest[Kt]),br=en[yn]+$t;return($t<0||dn!=kt)&&(br=en[yn+($t?1:0)]),it(Gn,br)}}}var Ve=He(ie,le,I);if(Ve)return Ia(Ve,M);for(var ot=le.nextSibling,nt=ie?ie.nodeValue.length-I:0;ot;ot=ot.nextSibling){if(Ve=He(ot,ot.firstChild,0),Ve)return Ia(it(Ve.line,Ve.ch-nt),M);nt+=ot.textContent.length}for(var _t=le.previousSibling,Ot=I;_t;_t=_t.previousSibling){if(Ve=He(_t,_t.firstChild,-1),Ve)return Ia(it(Ve.line,Ve.ch+Ot),M);Ot+=_t.textContent.length}}var kr=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Y,this.hasSelection=!1,this.composing=null};kr.prototype.init=function(e){var u=this,I=this,L=this.cm;this.createField(e);var M=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),l&&(M.style.width="0px"),Me(M,"input",function(){A&&C>=9&&u.hasSelection&&(u.hasSelection=null),I.poll()}),Me(M,"paste",function(ie){if(Ke(L,ie)||zs(ie,L))return;L.state.pasteIncoming=+new Date,I.fastPoll()});function V(ie){if(Ke(L,ie))return;if(L.somethingSelected())po({lineWise:!1,text:L.getSelections()});else if(L.options.lineWiseCopyCut){var le=Vs(L);po({lineWise:!0,text:le.text}),ie.type=="cut"?L.setSelections(le.ranges,null,oe):(I.prevInput="",M.value=le.text.join(`
|
|
|
`),J(M))}else return;ie.type=="cut"&&(L.state.cutIncoming=+new Date)}Me(M,"cut",V),Me(M,"copy",V),Me(e.scroller,"paste",function(ie){if(ir(e,ie)||Ke(L,ie))return;if(!M.dispatchEvent){L.state.pasteIncoming=+new Date,I.focus();return}var le=new Event("paste");le.clipboardData=ie.clipboardData,M.dispatchEvent(le)}),Me(e.lineSpace,"selectstart",function(ie){ir(e,ie)||pe(ie)}),Me(M,"compositionstart",function(){var ie=L.getCursor("from");I.composing&&I.composing.range.clear(),I.composing={start:ie,range:L.markText(ie,L.getCursor("to"),{className:"CodeMirror-composing"})}}),Me(M,"compositionend",function(){I.composing&&(I.poll(),I.composing.range.clear(),I.composing=null)})},kr.prototype.createField=function(e){this.wrapper=Ys(),this.textarea=this.wrapper.firstChild},kr.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},kr.prototype.prepareSelection=function(){var e=this.cm,u=e.display,I=e.doc,L=An(e);if(e.options.moveInputWithCursor){var M=$n(e,I.sel.primary().head,"div"),V=u.wrapper.getBoundingClientRect(),ie=u.lineDiv.getBoundingClientRect();L.teTop=Math.max(0,Math.min(u.wrapper.clientHeight-10,M.top+ie.top-V.top)),L.teLeft=Math.max(0,Math.min(u.wrapper.clientWidth-10,M.left+ie.left-V.left))}return L},kr.prototype.showSelection=function(e){var u=this.cm,I=u.display;f(I.cursorDiv,e.cursors),f(I.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},kr.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var u=this.cm;if(u.somethingSelected()){this.prevInput="";var I=u.getSelection();this.textarea.value=I,u.state.focused&&J(this.textarea),A&&C>=9&&(this.hasSelection=I)}else e||(this.prevInput=this.textarea.value="",A&&C>=9&&(this.hasSelection=null))},kr.prototype.getField=function(){return this.textarea},kr.prototype.supportsTouch=function(){return!1},kr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!r||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},kr.prototype.blur=function(){this.textarea.blur()},kr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},kr.prototype.receivedFocus=function(){this.slowPoll()},kr.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()})},kr.prototype.fastPoll=function(){var e=!1,u=this;u.pollingFast=!0;function I(){var L=u.poll();!L&&!e?(e=!0,u.polling.set(60,I)):(u.pollingFast=!1,u.slowPoll())}u.polling.set(20,I)},kr.prototype.poll=function(){var e=this,u=this.cm,I=this.textarea,L=this.prevInput;if(this.contextMenuPending||!u.state.focused||ut(I)&&!L&&!this.composing||u.isReadOnly()||u.options.disableInput||u.state.keySeq)return!1;var M=I.value;if(M==L&&!u.somethingSelected())return!1;if(A&&C>=9&&this.hasSelection===M||t&&/[\uf700-\uf7ff]/.test(M))return u.display.input.reset(),!1;if(u.doc.sel==u.display.selForContextMenu){var V=M.charCodeAt(0);if(V==8203&&!L&&(L="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,le=Math.min(L.length,M.length);ie<le&&L.charCodeAt(ie)==M.charCodeAt(ie);)++ie;return Ri(u,function(){Uo(u,M.slice(ie),L.length-ie,null,e.composing?"*compose":null),M.length>1e3||M.indexOf(`
|
|
|
`)>-1?I.value=e.prevInput="":e.prevInput=M,e.composing&&(e.composing.range.clear(),e.composing.range=u.markText(e.composing.start,u.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},kr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},kr.prototype.onKeyPress=function(){A&&C>=9&&(this.hasSelection=null),this.fastPoll()},kr.prototype.onContextMenu=function(e){var u=this,I=u.cm,L=I.display,M=u.textarea;u.contextMenuPending&&u.contextMenuPending();var V=pi(I,e),ie=L.scroller.scrollTop;if(!V||s)return;var le=I.options.resetSelectionOnContextMenu;le&&I.doc.sel.contains(V)==-1&&Yr(I,si)(I.doc,sa(V),oe);var ue=M.style.cssText,ye=u.wrapper.style.cssText,He=u.wrapper.offsetParent.getBoundingClientRect();u.wrapper.style.cssText="position: static",M.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-He.top-5)+"px; left: "+(e.clientX-He.left-5)+`px;
|
|
|
z-index: 1000; background: `+(A?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ve;h&&(Ve=window.scrollY),L.input.focus(),h&&window.scrollTo(null,Ve),L.input.reset(),I.somethingSelected()||(M.value=u.prevInput=" "),u.contextMenuPending=nt,L.selForContextMenu=I.doc.sel,clearTimeout(L.detectingSelectAll);function ot(){if(M.selectionStart!=null){var Ot=I.somethingSelected(),kt="\u200B"+(Ot?M.value:"");M.value="\u21DA",M.value=kt,u.prevInput=Ot?"":"\u200B",M.selectionStart=1,M.selectionEnd=kt.length,L.selForContextMenu=I.doc.sel}}function nt(){if(u.contextMenuPending!=nt)return;if(u.contextMenuPending=!1,u.wrapper.style.cssText=ye,M.style.cssText=ue,A&&C<9&&L.scrollbars.setScrollTop(L.scroller.scrollTop=ie),M.selectionStart!=null){(!A||A&&C<9)&&ot();var Ot=0,kt=function(){L.selForContextMenu==I.doc.sel&&M.selectionStart==0&&M.selectionEnd>0&&u.prevInput=="\u200B"?Yr(I,ps)(I):Ot++<10?L.detectingSelectAll=setTimeout(kt,500):(L.selForContextMenu=null,L.input.reset())};L.detectingSelectAll=setTimeout(kt,200)}}if(A&&C>=9&&ot(),g){we(e);var _t=function(){et(window,"mouseup",_t),setTimeout(nt,20)};Me(window,"mouseup",_t)}else setTimeout(nt,50)},kr.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},kr.prototype.setUneditable=function(){},kr.prototype.needsContentAttribute=!1;function iu(e,u){if(u=u?k(u):{},u.value=e.value,!u.tabindex&&e.tabIndex&&(u.tabindex=e.tabIndex),!u.placeholder&&e.placeholder&&(u.placeholder=e.placeholder),u.autofocus==null){var I=N();u.autofocus=I==e||e.getAttribute("autofocus")!=null&&I==document.body}function L(){e.value=le.getValue()}var M;if(e.form&&(Me(e.form,"submit",L),!u.leaveSubmitMethodAlone)){var V=e.form;M=V.submit;try{var ie=V.submit=function(){L(),V.submit=M,V.submit(),V.submit=ie}}catch(ue){}}u.finishInit=function(ue){ue.save=L,ue.getTextArea=function(){return e},ue.toTextArea=function(){ue.toTextArea=isNaN,L(),e.parentNode.removeChild(ue.getWrapperElement()),e.style.display="",e.form&&(et(e.form,"submit",L),!u.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=M))}},e.style.display="none";var le=Sr(function(ue){return e.parentNode.insertBefore(ue,e.nextSibling)},u);return le}function au(e){e.off=et,e.on=Me,e.wheelEventPixels=fl,e.Doc=xi,e.splitLines=st,e.countColumn=K,e.findColumn=Ee,e.isWordChar=ke,e.Pass=re,e.signal=ze,e.Line=hi,e.changeEnd=la,e.scrollbarModel=zo,e.Pos=it,e.cmpPos=Tt,e.modes=ct,e.mimeModes=tt,e.resolveMode=Qe,e.getMode=lt,e.modeExtensions=xt,e.extendMode=Pt,e.copyState=zt,e.startState=fe,e.innerMode=Se,e.commands=$a,e.keyMap=ea,e.keyName=Ls,e.isModifierKey=As,e.lookupKey=Aa,e.normalizeKeyMap=Ml,e.StringStream=G,e.SharedTextMarker=Va,e.TextMarker=ca,e.LineWidget=Ga,e.e_preventDefault=pe,e.e_stopPropagation=_e,e.e_stop=we,e.addClass=j,e.contains=R,e.rmClass=_,e.keyNames=da}Jl(Sr),eu(Sr);var ou="iter insert remove copy getEditor constructor".split(" ");for(var go in xi.prototype)xi.prototype.hasOwnProperty(go)&&H(ou,go)<0&&(Sr.prototype[go]=function(e){return function(){return e.apply(this.doc,arguments)}}(xi.prototype[go]));return Ce(xi),Sr.inputStyles={textarea:kr,contenteditable:hr},Sr.defineMode=function(e){!Sr.defaults.mode&&e!="null"&&(Sr.defaults.mode=e),wt.apply(this,arguments)},Sr.defineMIME=St,Sr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Sr.defineMIME("text/plain","null"),Sr.defineExtension=function(e,u){Sr.prototype[e]=u},Sr.defineDocExtension=function(e,u){xi.prototype[e]=u},Sr.fromTextArea=iu,au(Sr),Sr.version="5.58.2",Sr})},W7jJ:function(Ye,We,z){"use strict";z.r(We);var ae=z("0Owb"),ee=z("PpiC"),B=z("OaEy"),O=z("2fM7"),D=z("T2oS"),S=z("W9HT"),A=z("miYZ"),C=z("tsqr"),h=z("2qtc"),p=z("kLXV"),c=z("9og8"),s=z("tJVT"),n=z("k1fw"),o=z("aHsQ"),i=z("sGsY"),l=z("WmNS"),a=z.n(l),r=z("cDcd"),t=z.n(r),d=z("Fvcw"),v=z("GIiI"),y=z("Ty5D"),b=z("9kvl"),g=z("55Ip"),m=z("7qur"),_=z("cDPC"),x=z("m3rI"),f=z("RCxd"),E=z("EHPI"),w=z("J66h"),T=z("uMZB"),R=z.n(T),N=z("sNtx"),j=z("RpDr"),W=z("+L6B"),J=z("2/Rp"),F=z("y8nQ"),k=z("Vl3Y"),K=z("5NDa"),Y=z("5rEg"),H=Y.a.TextArea,Q=5e3,re=function(rt){var pt=rt.callback,Mt=rt.onCancel,Dt=rt.notes;function Gt(Ft){pt(Ft)}return t.a.createElement(k.a,{className:"note-form-panel",onFinish:Gt,initialValues:{notes:Dt}},t.a.createElement(k.a.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:Q,message:"\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A".concat(Q)}]},t.a.createElement(H,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),t.a.createElement(k.a.Item,{style:{textAlign:"right"}},t.a.createElement(J.a,{type:"ghost",onClick:Mt,style:{marginRight:10}}," \u53D6\u6D88 "),t.a.createElement(J.a,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},oe=z("ZsLC"),me=z.n(oe),he=z("DjyN"),Ee=z("NUBc"),de=z("g9YV"),be=z("wCAj"),Ue=z("Hw79"),Re=z.n(Ue),De=z("ye1Q"),je=z("lfch"),ve=z("bdLU"),ce=z("1vsH"),ke=z("wd/R"),Ne=z.n(ke),Je=be.a.Column,te=function(rt){var pt=rt.submitResult,Mt=rt.submitting,Dt=rt.submitRecords,Gt=rt.page,Ft=rt.onPageChange,ht=rt.topicId,ft=pt||{},Bt=ft.status,gt=ft.id,Zt=ft.input,Lt=ft.output,rn=ft.expected_output,Fn=ft.is_file,wn=ft.input_file_url,gn=ft.output_file_url,zn=ft.expected_output_file_url,Sn=ft.error_msg,Bn=Dt||{},kn=Bn.records,ir=Bn.records_count,Vn=Object(y.i)();function cr(){Fn?navigator.clipboard.writeText(w.Base64.decode(Sn)).then(function(){C.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(w.Base64.decode(Lt)).then(function(){C.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return t.a.createElement(S.a,{spinning:Mt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:t.a.createElement(De.a,{style:{fontSize:24},spin:!0})},gt?t.a.createElement(t.a.Fragment,null,t.a.createElement("ul",{className:Re.a.info},t.a.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",t.a.createElement("span",{className:Bt===ve.a.OK?"c-green":"c-red"},j.a[Bt])),t.a.createElement("li",{className:Re.a.error},t.a.createElement("a",{onClick:cr},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",t.a.createElement(je.a,null)," ")),t.a.createElement("li",null,t.a.createElement(g.a,{to:"/problems/".concat(ht,"/record-detail/").concat(gt,"?backId=").concat(Vn==null?void 0:Vn.save_identifier)},"\u663E\u793A\u8BE6\u60C5 > "))),Bt!==ve.a.OK?t.a.createElement(t.a.Fragment,null,t.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),t.a.createElement("pre",null,!Fn&&Zt,Fn&&t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ce.y)(wn,Zt)}},Zt)),t.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),t.a.createElement("pre",null,(Bt===4||Bt===5)&&w.Base64.decode(Sn),Bt!=4&&Bt!=5&&(Fn?t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ce.y)(gn,Lt)}},Lt):w.Base64.decode(Lt))),t.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),t.a.createElement("pre",null,!Fn&&w.Base64.decode(rn),Fn&&t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ce.y)(zn,rn)}},rn))):null):null,(kn==null?void 0:kn.length)>0?t.a.createElement(be.a,{dataSource:kn,rowKey:"id",pagination:!1},t.a.createElement(Je,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:function(er,In){return t.a.createElement("span",null," ",Ne()(er).format("YYYY-MM-DD HH:mm:ss"))}}),t.a.createElement(Je,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:function(er,In){var Qn;return t.a.createElement(g.a,{className:er===0?"c-green":"c-red",to:"/problems/".concat(ht,"/record-detail/").concat(In.id,"?backId=").concat(Vn==null?void 0:Vn.save_identifier)},(Qn=j.a[er])===null||Qn===void 0?void 0:Qn.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),t.a.createElement(Je,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),t.a.createElement(Je,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),t.a.createElement(Je,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,ir>15?t.a.createElement(Ee.a,{className:Re.a.pagination,current:Gt,pageSize:15,total:ir,onChange:Ft}):null)},P=z("BdwD"),U=z("DYRE"),q=z("zeV3"),X=z("+BJd"),$=z("mr32"),ge=z("TcMa"),Ae=z.n(ge),at=z("9Bee"),Le={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}},Me=function(rt){var pt=rt.hack,Mt=rt.onTriggerPraise,Dt=rt.toDiscuss,Gt=pt.language,Ft=pt.difficulty,ht=pt.time_limit,ft=pt.username,Bt=pt.user_path,gt=pt.user_praise,Zt=pt.comments_count,Lt=pt.praises_count,rn=pt.description,Fn=pt.pass_count,wn=pt.submit_count,gn=Object(y.h)();console.log(pt.language,"language");var zn=Le[Ft];return t.a.createElement(t.a.Fragment,null,t.a.createElement("ul",{className:Ae.a.info},t.a.createElement("li",null,"\u96BE\u5EA6\uFF1A",t.a.createElement($.a,{color:zn.color},zn.name)),t.a.createElement("li",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",t.a.createElement("b",null,ht,"\u79D2"))),t.a.createElement(at.a,{value:rn,className:Ae.a.desc}),t.a.createElement("ul",{className:Ae.a["commit-info"]},t.a.createElement("li",null,t.a.createElement(q.a,{size:4},t.a.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",t.a.createElement("b",null,Fn))),t.a.createElement("li",null,t.a.createElement(q.a,{size:4},t.a.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",t.a.createElement("b",null,wn))," "),t.a.createElement("li",{style:{flex:"1 0 0"}}),t.a.createElement("li",null,t.a.createElement(q.a,{size:4},t.a.createElement("i",{className:"iconfont icon-huifu1",onClick:Dt})," ",t.a.createElement("b",null,Zt))," ")))},Xe=z("dhSg"),et=z("ps8w"),ze=z.n(et),Ke=z("oBTY"),Pe=z("M8RZ"),Ie=z("OkW/"),Ce=z("ErOA");function pe(rt){return Object(Ce.c)("comments.json",rt)}function _e(rt){return Object(Ce.f)("/discusses/".concat(rt,"/plus.json"),{container_type:"Discuss",type:1})}function Oe(rt){return Object(Ce.f)("comments/reply.json",rt)}function we(rt){return Object(Ce.f)("comments.json",rt)}function Be(rt){return Object(Ce.f)("comments/".concat(rt==null?void 0:rt.id,"/hidden.json"),rt)}function qe(rt){return Object(Ce.b)("comments/".concat(rt==null?void 0:rt.id,".json"))}var dt=z("GgEA"),Et=z("AMnG"),It=z("xKgJ");function Rt(rt){var pt=rt.author;return t.a.createElement("a",{href:"/users/".concat(pt.login),target:"_blank"},t.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:"".concat(x.a.IMG_SERVER,"/images/").concat(pt.image_url),width:"50"}))}function Ct(rt){var pt=rt.data,Mt=rt.index,Dt=rt.parentDiscussIndex,Gt=rt.user,Ft=rt.onSetActionType,ht=pt.author,ft=pt.can_delete,Bt=pt.content,gt=pt.id,Zt=pt.time;function Lt(){Ft({id:gt,index:Mt,type:"delete-discuss",parentDiscussIndex:Dt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var rn=Gt.admin||ft||ht.user_id===Gt.user_id;return t.a.createElement("div",{className:"discuss-item-container second-discuss "},t.a.createElement(Rt,{author:ht}),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(ht.login),target:"_blank"},ht.name),t.a.createElement("span",{className:"grey"},Zt),t.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},rn?t.a.createElement("a",{onClick:Lt,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),t.a.createElement(at.a,{className:"discuss-content",value:Bt})))}var st=function(rt){var pt=rt.user,Mt=rt.data,Dt=rt.index,Gt=rt.onPlusDiscuss,Ft=rt.onSetActionType,ht=rt.activeDiscussIndex,ft=rt.onReplyDiscuss,Bt=rt.onSetActiveDiscussIndex,gt=Mt.content,Zt=Mt.children,Lt=Mt.hidden,rn=Mt.id,Fn=Mt.praise_count,wn=Mt.time,gn=Mt.user_praise,zn=Mt.can_delete,Sn=Mt.author;console.log(zn&&(!Zt||Zt.length==0),"children22");function Bn(){Bt(rn)}function kn(){Gt(rn,!gn,Dt)}function ir(){Ft({id:rn,index:Dt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Vn(){Ft({id:rn,index:Dt,params:{hidden:Lt?"0":"1"},type:"hidden-discuss",message:Lt?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}var cr=pt.admin||pt.user_id===Sn.user_id;return t.a.createElement("div",{className:"discuss-item-container",key:rn},t.a.createElement(Rt,{author:Sn}),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(Sn.login),target:"_blank"}," ",Sn.name," "),t.a.createElement("span",{className:"grey"},wn)),t.a.createElement(at.a,{className:"discuss-content",value:gt}),Zt&&Zt.length>0?t.a.createElement("div",{className:"reply-discuss-container"},Zt.map(function(gr,er){return t.a.createElement(Ct,{key:gr.id,data:gr,index:er,user:pt,onSetActionType:Ft,parentDiscussIndex:Dt})})):null,t.a.createElement("div",{className:"btn-group"},Object(It.v)()?t.a.createElement("a",{onClick:Vn,title:Lt?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:Lt?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,zn&&(!Zt||Zt.length==0)?t.a.createElement("a",{onClick:ir,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null,t.a.createElement("a",{onClick:Bn,title:"\u56DE\u590D"}," ",t.a.createElement("i",{className:"iconfont icon-huifu1"})," "),t.a.createElement("a",{onClick:kn,className:gn?"c-orange":""},t.a.createElement("i",{className:gn?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,Fn||""))),t.a.createElement(Et.a,{id:rn,activeDiscussIndex:ht,onReplyDiscuss:ft})))},ut=z("kaH+"),$e=z("Wx9E"),xe=z("Ot1p"),Fe=function(rt){var pt=rt.user_praise,Mt=rt.praise_count,Dt=rt.praisePlus,Gt=rt.onCreateDiscuss,Ft=rt.discuss_count,ht=Object(r.useState)(!1),ft=Object(s.a)(ht,2),Bt=ft[0],gt=ft[1],Zt=Object(r.useState)(""),Lt=Object(s.a)(Zt,2),rn=Lt[0],Fn=Lt[1];function wn(kn){Fn(kn)}function gn(){gt(!0)}function zn(){gt(!1)}function Sn(){return Bn.apply(this,arguments)}function Bn(){return Bn=Object(c.a)(a.a.mark(function kn(){return a.a.wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:Gt(rn),Fn(""),gt(!1);case 3:case"end":return Vn.stop()}},kn)})),Bn.apply(this,arguments)}return t.a.createElement("div",{className:"dis-input-editor-container ".concat(Bt?"active":""," ")},t.a.createElement("div",{className:Bt?"text-area hide":"text-area"},t.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:gn}),t.a.createElement("a",{style:{alignItems:"center"}}," ",t.a.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",Ft," "),t.a.createElement("a",{className:"c-light-black",onClick:Dt,style:{alignItems:"center"},title:pt?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},t.a.createElement("i",{className:"mr3 ".concat(pt?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),Mt?t.a.createElement("span",null,Mt):"")),Bt?t.a.createElement("div",{className:"input-mask",onClick:zn}):null,t.a.createElement("div",{className:Bt?"md-container":"md-container hide"},t.a.createElement(xe.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:rn,height:240,onChange:wn}),t.a.createElement("div",{className:"tip-container",onClick:zn},t.a.createElement("a",{className:"btn-send",onClick:Sn}," \u53D1\u9001 "))))},ct={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null},tt;(function(rt){rt[rt.GET_DISCUSSES=0]="GET_DISCUSSES",rt[rt.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",rt[rt.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",rt[rt.PLUS_DISCUSS=3]="PLUS_DISCUSS",rt[rt.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",rt[rt.SET_PAGE=5]="SET_PAGE",rt[rt.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"})(tt||(tt={}));function wt(rt,pt){switch(pt.type){case tt.SHOW_DISCUSSES_LOADING:return Object(n.a)(Object(n.a)({},rt),{},{loading:!0});case tt.GET_DISCUSSES:return Object(n.a)(Object(n.a)({},rt),pt.payload);case tt.TOP_OR_DOWN_DISCUSS:return Object(n.a)(Object(n.a)({},rt),pt.payload);case tt.SET_ACTION_TYPE:return Object(n.a)(Object(n.a)({},rt),pt.payload);case tt.PLUS_DISCUSS:return Object(n.a)(Object(n.a)({},rt),pt.payload);case tt.SET_PAGE:return Object(n.a)(Object(n.a)({},rt),{},{page:pt.payload});case tt.ACTIVE_DISCUSS_INDEX:return Object(n.a)(Object(n.a)({},rt),pt.payload);default:throw new Error}}var St=function(rt){var pt=rt.user,Mt=rt.identifier,Dt=rt.hack,Gt=rt.onTriggerPraise,Ft=rt.setDiscussTotal,ht=Object(r.useReducer)(wt,ct),ft=Object(s.a)(ht,2),Bt=ft[0],gt=ft[1],Zt=Bt.loading,Lt=Bt.page,rn=Bt.data,Fn=Bt.count,wn=Bt.actionType,gn=Bt.activeDiscussIndex,zn=Object(r.useCallback)(Object(c.a)(a.a.mark(function cn(){var tr,sr,qn;return a.a.wrap(function(Wn){for(;;)switch(Wn.prev=Wn.next){case 0:return gt({type:tt.SHOW_DISCUSSES_LOADING}),Wn.next=3,pe({container_type:"Practice",container_identifier:Mt,limit:10,page:Lt});case 3:tr=Wn.sent,sr=tr.comments,qn=tr.disscuss_count,gt({type:tt.GET_DISCUSSES,payload:{data:sr,count:qn,loading:!1}}),Ft(qn);case 7:case"end":return Wn.stop()}},cn)})),[Lt,Mt]);Object(r.useEffect)(function(){zn()},[Mt,Lt]);function Sn(cn){gt({type:tt.SET_PAGE,page:cn})}function Bn(cn){gt({type:tt.SET_ACTION_TYPE,payload:{actionType:cn}})}function kn(cn){gn===cn?gt({type:tt.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}):gt({type:tt.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:cn}})}function ir(cn,tr,sr){return Vn.apply(this,arguments)}function Vn(){return Vn=Object(c.a)(a.a.mark(function cn(tr,sr,qn){var On;return a.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return on.prev=0,on.next=3,_e(tr);case 3:On=on.sent,rn[qn].user_praise=sr,rn[qn].praise_count=On.praise_count,gt({type:tt.PLUS_DISCUSS,payload:{data:Object(Ke.a)(rn)}}),on.next=12;break;case 9:on.prev=9,on.t0=on.catch(0),console.log(on.t0);case 12:case"end":return on.stop()}},cn,null,[[0,9]])})),Vn.apply(this,arguments)}function cr(){return gr.apply(this,arguments)}function gr(){return gr=Object(c.a)(a.a.mark(function cn(){var tr,sr,qn,On,Wn;return a.a.wrap(function(bn){for(;;)switch(bn.prev=bn.next){case 0:if(tr=wn.id,sr=wn.params,qn=wn.type,On=wn.index,Wn=wn.parentDiscussIndex,!(qn==="hidden-discuss")){bn.next=7;break}return console.log(sr,"params"),bn.next=5,Be(Object(n.a)({id:tr,container_type:"Practice",container_identifier:Mt},sr));case 5:Wn?rn[Wn].children[On].hidden=sr.hidden==1:rn[On].hidden=sr.hidden==1,gt({type:tt.SET_ACTION_TYPE,payload:{actionType:null,data:Object(Ke.a)(rn)}});case 7:if(!(qn==="delete-discuss")){bn.next=13;break}return bn.next=10,qe({id:tr,container_type:"Practice",container_identifier:Mt});case 10:return gt({type:tt.SET_ACTION_TYPE,payload:{actionType:null}}),bn.next=13,zn();case 13:case"end":return bn.stop()}},cn)})),gr.apply(this,arguments)}function er(){gt({type:tt.SET_ACTION_TYPE,payload:{actionType:null}})}function In(cn,tr){return Qn.apply(this,arguments)}function Qn(){return Qn=Object(c.a)(a.a.mark(function cn(tr,sr){return a.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return On.prev=0,On.next=3,Oe({container_type:"Practice",container_identifier:Mt,comments:{content:sr,parent_id:tr}});case 3:zn(),On.next=9;break;case 6:On.prev=6,On.t0=On.catch(0),console.log(On.t0);case 9:case"end":return On.stop()}},cn,null,[[0,6]])})),Qn.apply(this,arguments)}function Dn(cn){return jt.apply(this,arguments)}function jt(){return jt=Object(c.a)(a.a.mark(function cn(tr){return a.a.wrap(function(qn){for(;;)switch(qn.prev=qn.next){case 0:return gt({type:tt.SHOW_DISCUSSES_LOADING}),qn.next=3,we({comments:{content:tr},container_type:"Practice",container_identifier:Mt});case 3:zn();case 4:case"end":return qn.stop()}},cn)})),jt.apply(this,arguments)}return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:"discuss-panel"},rn.length===0?t.a.createElement(P.a,null):rn.map(function(cn,tr){return t.a.createElement(st,{onReplyDiscuss:In,onPlusDiscuss:ir,onSetActiveDiscussIndex:kn,onSetActionType:Bn,data:cn,index:tr,user:pt,activeDiscussIndex:gn})}),Fn>10?t.a.createElement("div",{className:"pagination-container"},t.a.createElement(Ee.a,{showQuickJumper:!0,onChange:Sn,current:Lt,total:Fn})):null),t.a.createElement(Fe,{user_praise:Dt.user_praise,praise_count:Dt.praises_count,praisePlus:Gt,discuss_count:Dt.comments_count,onCreateDiscuss:Dn}),t.a.createElement(Pe.a,null,t.a.createElement(p.a,{centered:!0,title:"\u63D0\u793A",visible:!!wn,onOk:cr,onCancel:er},t.a.createElement("p",null,wn?wn.message:"")),t.a.createElement(ut.a,null)))},Qe=z("1FX+"),lt=z.n(Qe),xt=z("pYxM"),Pt=z.n(xt),zt=z("sB/4"),Se=z.n(zt),fe=z("Wtmd"),G=z.n(fe),Z=z("CNDd"),ne=z.n(Z),se=z("nCk5"),Te=z.n(se),Ge=z("kovY"),Ze=z.n(Ge),bt=function(pt){var Mt=pt.style,Dt=Mt===void 0?{}:Mt,Gt=pt.onClick,Ft=pt.onAssist,ht=pt.onHide,ft=pt.data,Bt=pt.active,gt=pt.showLine;return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:Bt===(ft==null?void 0:ft.id)?"".concat(Pt.a.list," ").concat(Pt.a.active):Pt.a.list,style:Dt,onClick:function(){return Gt(ft)}},(ft==null?void 0:ft.video)&&t.a.createElement("div",{className:Pt.a.left},t.a.createElement("img",{src:ft==null?void 0:ft.video_cover}),t.a.createElement("div",null,t.a.createElement("img",{src:Se.a}),t.a.createElement("span",null,ft==null?void 0:ft.video_duration)),t.a.createElement("div",{className:Pt.a.mask})),t.a.createElement("div",{className:Pt.a.right},t.a.createElement("div",{className:Pt.a.name},t.a.createElement("img",{src:x.a.IMG_SERVER+"/images/"+(ft==null?void 0:ft.image_url),width:30,height:30}),t.a.createElement("div",{title:ft==null?void 0:ft.name,className:Pt.a.title},ft==null?void 0:ft.name),(ft==null?void 0:ft.is_authority)&&t.a.createElement("div",{className:Pt.a.b},"\u5B98\u65B9"),(ft==null?void 0:ft.is_excellent)&&t.a.createElement("div",{className:Pt.a.a},"\u7CBE\u9009")),t.a.createElement("div",{className:Pt.a.des},t.a.createElement(at.a,{showLines:2,showTextOnly:!0,value:(ft==null?void 0:ft.content)||"\u6682\u65E0\u5185\u5BB9"})),t.a.createElement("div",{className:Pt.a.tag},t.a.createElement("span",{className:"current",onClick:function(Lt){Lt.stopPropagation(),Ft(ft)}},t.a.createElement("img",{src:ft!=null&&ft.user_liker?ne.a:G.a}),t.a.createElement("span",{style:{color:ft!=null&&ft.user_liker?"#0152d9":"#656f87"}},ft==null?void 0:ft.praises_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Te.a}),t.a.createElement("span",null,ft==null?void 0:ft.discusses_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Ze.a}),t.a.createElement("span",null,ft==null?void 0:ft.viewed_count)),Object(It.v)()&&t.a.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:function(Lt){Lt.stopPropagation(),ht(ft)}},ft!=null&&ft.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),gt&&t.a.createElement("div",{className:Pt.a.line}))},At=bt,it=z("5Dmo"),Tt=z("3S7+"),Qt=z("Z8dc"),yt=z.n(Qt),nn=z("Aky1"),Jt=z("7+5b"),Nt=z.n(Jt),vt=z("twBr"),Tn=z.n(vt),mt=z("oE5q"),ln=z.n(mt),fn=function(pt,Mt){var Dt,Gt,Ft,ht=Mt.payload.uploadInfo,ft=ht===void 0?{}:ht;switch(Mt.type){case"addVideo":return{videoList:[].concat(Object(Ke.a)(pt.videoList),[{name:ft.file.name,size:ft.file.size,type:ft.file.type,fileHash:ft.fileHash,state:ft.state,video_id:ft.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}])};case"removeVideo":return{videoList:pt.videoList.filter(function(Bt){return Bt.name!==Mt.payload.name})};case"replaceVideo":return{videoList:Mt.payload};case"removeAll":return[];case"updateProgress":return{videoList:pt.videoList.map(function(Bt){return Bt.name===Mt.payload.uploadInfo.file.name?Object(n.a)(Object(n.a)({},Bt),{loaded:Mt.payload.progressPercent,video_id:ft.videoId,fileHash:ft.fileHash}):Bt})};case"updateTitle":return{videoList:(Dt=pt.videoList)===null||Dt===void 0?void 0:Dt.map(function(Bt){return Bt.name===Mt.payload.item.name?Object(n.a)(Object(n.a)({},Bt),{title:Mt.payload.title}):Bt})};case"updateImg":return{videoList:(Gt=pt.videoList)===null||Gt===void 0?void 0:Gt.map(function(Bt){return Bt.name===Mt.payload.item.name?Object(n.a)(Object(n.a)({},Bt),{attachment_id:Mt.payload.attachment_id}):Bt})};case"updateImg":return{videoList:(Ft=pt.videoList)===null||Ft===void 0?void 0:Ft.map(function(Bt){return Bt.name===Mt.payload.item.name?Object(n.a)(Object(n.a)({},Bt),{attachment_id:Mt.payload.attachment_id}):Bt})};default:return[]}},Zn=function(pt){var Mt,Dt,Gt=pt.onClose,Ft=pt.onOk,ht=pt.identifier,ft=pt.active,Bt=k.a.useForm(),gt=Object(s.a)(Bt,1),Zt=gt[0],Lt=Object(r.useState)({}),rn=Object(s.a)(Lt,2),Fn=rn[0],wn=rn[1],gn=Object(r.useState)(!1),zn=Object(s.a)(gn,2),Sn=zn[0],Bn=zn[1],kn=Object(r.useState)(!1),ir=Object(s.a)(kn,2),Vn=ir[0],cr=ir[1],gr=Object(r.useReducer)(fn,{videoList:[]}),er=Object(s.a)(gr,2),In=er[0],Qn=er[1],Dn=Object(It.x)(),jt=Object(y.i)(),cn=Object(r.useRef)();Object(r.useEffect)(function(){ft&&tr()},[ft]);var tr=function(){var pn=Object(c.a)(a.a.mark(function Cn(){var vn,ar,Yn,$n,wr,jr,Ai,zr,Pi,Hi,Ki,ji;return a.a.wrap(function(Un){for(;;)switch(Un.prev=Un.next){case 0:return Un.next=2,Object(m.k)(ht,{active:ft});case 2:vn=Un.sent,(vn==null?void 0:vn.status)===0&&(jr={name:vn==null||((ar=vn.data)===null||ar===void 0)?void 0:ar.name,content:vn==null||((Yn=vn.data)===null||Yn===void 0)?void 0:Yn.content},Zt.setFieldsValue(jr),wn(jr),vn!=null&&($n=vn.data)!==null&&$n!==void 0&&(wr=$n.videos)!==null&&wr!==void 0&&wr[0]&&Qn({type:"replaceVideo",payload:[{video_id:vn==null||((Ai=vn.data)===null||Ai===void 0||((zr=Ai.videos)===null||zr===void 0||((Pi=zr[0])===null||Pi===void 0)))?void 0:Pi.video_id,name:vn==null||((Hi=vn.data)===null||Hi===void 0||((Ki=Hi.videos)===null||Ki===void 0||((ji=Ki[0])===null||ji===void 0)))?void 0:ji.title,loaded:100}]}));case 4:case"end":return Un.stop()}},Cn)}));return function(){return pn.apply(this,arguments)}}(),sr=function(Cn,vn){wn(Object(n.a)({},vn))},qn=function(){var pn=Object(c.a)(a.a.mark(function Cn(vn){var ar,Yn,$n,wr,jr;return a.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(Yn={videos:In.videoList,articles:vn},cr(!0),!ft){zr.next=9;break}return Yn.active=ft,zr.next=6,Object(m.j)(ht,Yn);case 6:$n=zr.sent,zr.next=12;break;case 9:return zr.next=11,Object(m.a)(ht,Yn);case 11:$n=zr.sent;case 12:((ar=$n)===null||ar===void 0?void 0:ar.status)===0&&(console.log(ft||((wr=$n)===null||wr===void 0?void 0:wr.id),44),Ft(ft||((jr=$n)===null||jr===void 0?void 0:jr.id))),cr(!1);case 14:case"end":return zr.stop()}},Cn)}));return function(vn){return pn.apply(this,arguments)}}(),On=function(){var Cn=document.getElementById("fileUpload");Cn.value=""},Wn=function(Cn){var vn='{"Vod":{}}';if(Bn(!0),cn.current){cn.current.addFile(Cn,null,null,null,vn);return}Object(nn.a)(Dn==null?void 0:Dn.login,"",{create:!cn,addFileSuccess:function(Yn){Qn({type:"addVideo",payload:{uploadInfo:Yn}})},onUploadProgress:function(Yn,$n,wr){var jr=Math.ceil(wr*100);Qn({type:"updateProgress",payload:{uploadInfo:Yn,progressPercent:jr}}),On()},onUploadFailed:function(Yn){C.b.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:function(Yn){Bn(!1)},onUploadSucceed:function(Yn){Bn(!1)},onUploadError:function(Yn){Bn(!1)},gotUploader:function(Yn){Yn.addFile(Cn,null,null,null,vn),cn.current=Yn}})},on=function(Cn){var vn,ar=1024,Yn=Cn.target.files[0];if(!Yn){On();return}var $n=Yn.name.toLowerCase();if($n&&$n.indexOf(".avi")==-1&&$n.indexOf(".flv")==-1&&$n.indexOf(".f4v")==-1&&$n.indexOf(".m4v")==-1&&$n.indexOf(".mov")==-1&&$n.indexOf(".mp4")==-1&&$n.indexOf(".rmvb")==-1&&$n.indexOf(".swf")==-1&&$n.indexOf(".webm")==-1&&$n.indexOf(".wmv")==-1){C.b.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),On();return}if(Yn.size>ar*1024*1024){C.b.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC7".concat(ar,"M")),On();return}if((vn=In.videoList)!==null&&vn!==void 0&&vn.find(function(wr){return wr.name===Yn.name})){C.b.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),On();return}Wn(Yn)},bn=function(Cn,vn){p.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",vn?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:function(){On(),Qn({type:"removeVideo",payload:{name:Cn}})}})},Ut=function(){return t.a.createElement("label",{htmlFor:"fileUpload",className:yt.a.main},t.a.createElement("img",{src:Nt.a,alt:""}),t.a.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891"))},Wt=function(Cn){return t.a.createElement("div",{className:yt.a.mainLoading},t.a.createElement("div",{className:yt.a.proWarp},t.a.createElement("div",{className:yt.a.pro},t.a.createElement("div",{style:{width:Cn}})),t.a.createElement("span",null,Cn||0,"%")),t.a.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),t.a.createElement("div",{className:yt.a.tip},t.a.createElement(Tt.a,{getPopupContainer:function(ar){return ar.parentNode},title:t.a.createElement("div",null,t.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",t.a.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),t.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),t.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},t.a.createElement("img",{src:ln.a,alt:""}))))},Yt=function(Cn){return t.a.createElement("div",{className:yt.a.mainSucceed},t.a.createElement("img",{src:Tn.a,alt:""}),t.a.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),t.a.createElement("div",{className:yt.a.tip},t.a.createElement(Tt.a,{getPopupContainer:function(ar){return ar.parentNode},title:t.a.createElement("div",null,t.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",t.a.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),t.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),t.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},t.a.createElement("img",{src:ln.a,alt:""}))),t.a.createElement("div",{className:yt.a.del,onClick:function(){return bn(Cn.name,Cn.loaded==100)}},t.a.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891"))},hn=function(){var Cn;return t.a.createElement(t.a.Fragment,null,(Cn=In.videoList)===null||Cn===void 0?void 0:Cn.map(function(vn,ar){return t.a.createElement(t.a.Fragment,{key:ar},vn.loaded==100?Yt(vn):Wt(vn.loaded))}))},qt=function(){p.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:Gt})},Nn=(Mt=In.videoList)===null||Mt===void 0?void 0:Mt.length;return t.a.createElement("div",{className:yt.a.listForm},t.a.createElement("header",null,ft?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),t.a.createElement("section",{className:yt.a.scroll,id:"sss"},t.a.createElement("div",{className:yt.a.formWrap}," ",t.a.createElement(k.a,{form:Zt,scrollToFirstError:!0,layout:"vertical",onValuesChange:sr,onFinish:qn},t.a.createElement(k.a.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},t.a.createElement(Y.a,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:"".concat(((Dt=Fn.name)===null||Dt===void 0?void 0:Dt.length)||0,"/60")})),t.a.createElement(k.a.Item,{name:"content",label:"\u5185\u5BB9:"},t.a.createElement(xe.a,{defaultValue:Fn.content||"",watch:!0})))),t.a.createElement("div",{className:yt.a.upload},Nn?hn():Ut(),t.a.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:on,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),t.a.createElement("div",{className:yt.a.btns},t.a.createElement(J.a,{onClick:qt,type:"primary",ghost:!0},"\u5173\u95ED"),t.a.createElement(J.a,{loading:Vn,disabled:Sn,onClick:function(){return Zt.submit()},type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},rr=Zn,xn=z("cWXX"),Er=z("/ezw"),Or=z("CaVn"),un=z.n(Or),Pn=z("s8/Y"),Nr=z.n(Pn),Xr=z("JOrW"),xr=z.n(Xr),ur=z("gqXR"),vr=z.n(ur),vi=z("14J3"),pr=z("BMrR"),_r=z("jCWc"),Cr=z("kPKH"),Hr=z("wW8i"),Tr=z.n(Hr),ui=z("MVJL"),Dr=z.n(ui),_i=function(pt){var Mt=pt.id,Dt=pt.cb,Gt=Object(r.useState)(""),Ft=Object(s.a)(Gt,2),ht=Ft[0],ft=Ft[1];return t.a.createElement("aside",{className:"mt10"},t.a.createElement(xe.a,{defaultValue:ht,id:"writeForumsReviewId",onChange:function(gt){ft(gt)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),t.a.createElement(pr.a,null,t.a.createElement(Cr.a,{flex:"1"}),t.a.createElement(Cr.a,null,t.a.createElement(J.a,{type:"primary",size:"large",onClick:Object(c.a)(a.a.mark(function Bt(){return a.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:ht===""?C.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):Dt(Mt,ht);case 1:case"end":return Zt.stop()}},Bt)}))},"\u53D1\u9001"))))},ci=function(pt){var Mt,Dt=pt.data;return t.a.createElement("div",{className:Dr.a.thirdlyLevelDiscuss},t.a.createElement("span",{className:"c-grey-333"},t.a.createElement("span",{className:"font 14 c-light-primary"},Dt==null||((Mt=Dt.author)===null||Mt===void 0)?void 0:Mt.name),"@",t.a.createElement("span",{className:"font 14 c-light-primary"},Dt==null?void 0:Dt.parent_name),":"),t.a.createElement(at.a,{value:Dt==null?void 0:Dt.content}))},ni=function(pt){var Mt,Dt,Gt,Ft,ht=pt.data,ft=pt.onReplyDiscuss,Bt=pt.thirdlyReply,gt=pt.setThirdlyReply,Zt=Object(It.x)();return console.log(Zt,"user"),t.a.createElement("div",{className:Dr.a.list},t.a.createElement("img",{src:x.a.IMG_SERVER+"/images/"+(ht==null||((Mt=ht.author)===null||Mt===void 0)?void 0:Mt.image_url)}),t.a.createElement("div",{className:Dr.a.wrap},t.a.createElement("div",{className:"font14",style:{marginBottom:6}},t.a.createElement("span",{className:"c-grey-333"},ht==null||((Dt=ht.author)===null||Dt===void 0)?void 0:Dt.name),(Zt==null?void 0:Zt.login)!==(ht==null||((Gt=ht.author)===null||Gt===void 0)?void 0:Gt.login)&&t.a.createElement("span",{onClick:function(){return gt(ht==null?void 0:ht.id)},className:"c-grey-999 current",style:{float:"right"}},t.a.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),t.a.createElement("span",null,"\u56DE\u590D"))),t.a.createElement(at.a,{value:ht==null?void 0:ht.content}),ht==null||((Ft=ht.children)===null||Ft===void 0)?void 0:Ft.map(function(Lt){return t.a.createElement(ci,{key:Lt.id,data:Lt})}),Bt===(ht==null?void 0:ht.id)&&t.a.createElement("div",null,t.a.createElement(_i,{id:ht==null?void 0:ht.id,cb:ft}),t.a.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:function(){return gt(null)},className:"c-light-primary current"},t.a.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),t.a.createElement("div",{className:Dr.a.line})))},Ii=function(pt){var Mt,Dt,Gt,Ft,ht=pt.data,ft=pt.onReplyDiscuss,Bt=pt.secondReply,gt=pt.setSecondReply,Zt=pt.thirdlyReply,Lt=pt.setThirdlyReply,rn=pt.onPlusDiscuss,Fn=Object(r.useState)(!1),wn=Object(s.a)(Fn,2),gn=wn[0],zn=wn[1];return console.log(ht,"data"),t.a.createElement("div",{className:Dr.a.discussItem},t.a.createElement("div",{className:Dr.a.list},t.a.createElement("img",{src:x.a.IMG_SERVER+"/images/"+(ht==null||((Mt=ht.author)===null||Mt===void 0)?void 0:Mt.image_url)}),t.a.createElement("div",{className:Dr.a.wrap},t.a.createElement("div",{className:"font14",style:{marginBottom:6}},t.a.createElement("span",{className:"c-grey-333 mr30"},ht==null||((Dt=ht.author)===null||Dt===void 0)?void 0:Dt.name),t.a.createElement("span",{className:"c-grey-999"},ht==null?void 0:ht.time)),t.a.createElement(at.a,{value:ht==null?void 0:ht.content}),t.a.createElement("div",{className:Dr.a.btns},t.a.createElement("div",{onClick:function(){return rn(ht==null?void 0:ht.id)},className:ht!=null&&ht.user_praise?"c-light-primary":"c-grey-999"},t.a.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),t.a.createElement("span",null,ht==null?void 0:ht.praise_count)),t.a.createElement("div",{onClick:function(){var Bn;if((ht==null||((Bn=ht.children)===null||Bn===void 0)?void 0:Bn.length)===0)return;gt(null),zn(!gn)},style:{color:gn?"#0152d9":"#999999"}},t.a.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),t.a.createElement("span",null,gn?"\u6536\u8D77\u8BC4\u8BBA":ht==null||((Gt=ht.children)===null||Gt===void 0)?void 0:Gt.length)),t.a.createElement("div",{onClick:function(){zn(!1),gt(Bt===(ht==null?void 0:ht.id)?null:ht==null?void 0:ht.id)},style:{color:Bt===(ht==null?void 0:ht.id)?"#0152d9":"#999999"}},t.a.createElement("i",{className:"iconfont icon-huifu3 mr3"}),t.a.createElement("span",null,Bt===(ht==null?void 0:ht.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Bt===(ht==null?void 0:ht.id)&&t.a.createElement(_i,{id:ht==null?void 0:ht.id,cb:function(Bn,kn){ft(Bn,kn),zn(!0)}}),gn&&t.a.createElement("div",{className:Dr.a.secondLevelDiscuss},ht==null||((Ft=ht.children)===null||Ft===void 0)?void 0:Ft.map(function(Sn){return t.a.createElement(ni,{thirdlyReply:Zt,setThirdlyReply:Lt,key:Sn.id,data:Sn,onReplyDiscuss:ft})})))))},Ni=Ii,Ui=function(pt){var Mt=pt.identifier,Dt=pt.active,Gt=pt.onOk,Ft=Object(r.useState)(""),ht=Object(s.a)(Ft,2),ft=ht[0],Bt=ht[1],gt=Object(r.useState)(1),Zt=Object(s.a)(gt,2),Lt=Zt[0],rn=Zt[1],Fn=Object(r.useState)([]),wn=Object(s.a)(Fn,2),gn=wn[0],zn=wn[1],Sn=Object(r.useState)(0),Bn=Object(s.a)(Sn,2),kn=Bn[0],ir=Bn[1],Vn=Object(r.useState)(null),cr=Object(s.a)(Vn,2),gr=cr[0],er=cr[1],In=Object(r.useState)(null),Qn=Object(s.a)(In,2),Dn=Qn[0],jt=Qn[1];Object(r.useEffect)(function(){cn(1),rn(1)},[Dt]);var cn=function(){var Wn=Object(c.a)(a.a.mark(function on(bn){var Ut;return a.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.next=2,pe({container_type:"QuestionSolutionArticle",container_identifier:Dt,limit:5,page:bn});case 2:Ut=Yt.sent,Ut!=null&&Ut.comments&&(zn((Ut==null?void 0:Ut.comments)||[]),rn(bn),ir(Ut==null?void 0:Ut.disscuss_count));case 4:case"end":return Yt.stop()}},on)}));return function(bn){return Wn.apply(this,arguments)}}(),tr=function(){var Wn=Object(c.a)(a.a.mark(function on(){var bn;return a.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(!(ft==="")){Wt.next=3;break}return C.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),Wt.abrupt("return");case 3:return Wt.next=5,we({comments:{content:ft},container_type:"QuestionSolutionArticle",container_identifier:Dt});case 5:bn=Wt.sent,bn!=null&&bn.discuss&&(Bt(""),cn(Lt),Gt());case 7:case"end":return Wt.stop()}},on)}));return function(){return Wn.apply(this,arguments)}}(),sr=function(){var Wn=Object(c.a)(a.a.mark(function on(bn,Ut,Wt){var Yt;return a.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Oe({container_type:"QuestionSolutionArticle",container_identifier:Dt,comments:{content:Ut,parent_id:bn}});case 2:Yt=qt.sent,er(null),jt(null),cn(Lt);case 6:case"end":return qt.stop()}},on)}));return function(bn,Ut,Wt){return Wn.apply(this,arguments)}}(),qn=function(){var Wn=Object(c.a)(a.a.mark(function on(bn){var Ut;return a.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.next=2,_e(bn);case 2:Ut=Yt.sent,cn(Lt);case 4:case"end":return Yt.stop()}},on)}));return function(bn){return Wn.apply(this,arguments)}}(),On=function(on){rn(on),cn(on)};return t.a.createElement("div",{className:Tr.a.discuss},t.a.createElement("aside",{className:Tr.a.reply,style:{borderWidth:kn?1:0}},t.a.createElement(xe.a,{defaultValue:ft,id:"writeForumsReviewId",onChange:function(on){Bt(on)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),t.a.createElement(pr.a,null,t.a.createElement(Cr.a,{flex:"1"}),t.a.createElement(Cr.a,null,t.a.createElement(J.a,{type:"primary",size:"large",onClick:function(){return tr()}},"\u53D1\u9001")))),gn==null?void 0:gn.map(function(Wn){return t.a.createElement(Ni,{secondReply:gr,setSecondReply:er,thirdlyReply:Dn,setThirdlyReply:jt,key:Wn.id,data:Wn,onReplyDiscuss:sr,onPlusDiscuss:qn})}),t.a.createElement(Ee.a,{className:Tr.a.pagination,showTotal:function(on){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},on),"\u6761\u6570\u636E")},current:Lt,onChange:On,total:kn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},di=Ui,mr=z("hgre"),dr=function(pt){var Mt,Dt,Gt,Ft,ht,ft,Bt,gt,Zt,Lt,rn=pt.active,Fn=pt.identifier,wn=pt.onAssist,gn=pt.onEdit,zn=pt.onArticlesSkip,Sn=pt.onClose,Bn=pt.onOk,kn=pt.onDelete,ir=pt.detailsIndex,Vn=pt.btnShowStatus,cr=Object(r.useState)(!0),gr=Object(s.a)(cr,2),er=gr[0],In=gr[1],Qn=Object(r.useState)({}),Dn=Object(s.a)(Qn,2),jt=Dn[0],cn=Dn[1];Object(r.useEffect)(function(){rn&&tr()},[rn,ir]);var tr=function(){var on=Object(c.a)(a.a.mark(function bn(){var Ut,Wt,Yt=arguments;return a.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return Ut=Yt.length>0&&Yt[0]!==void 0?Yt[0]:!0,Ut&&In(!0),qt.next=4,Object(m.d)(Fn,{active:rn});case 4:Wt=qt.sent,(Wt==null?void 0:Wt.status)===0&&cn((Wt==null?void 0:Wt.data)||{}),In(!1);case 7:case"end":return qt.stop()}},bn)}));return function(){return on.apply(this,arguments)}}(),sr=function(){var on=Object(c.a)(a.a.mark(function bn(Ut){var Wt;return a.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return hn.next=2,Object(m.g)(Fn,Object(n.a)({active:rn},Ut));case 2:Wt=hn.sent,(Wt==null?void 0:Wt.status)===0&&(tr(!1),Bn());case 4:case"end":return hn.stop()}},bn)}));return function(Ut){return on.apply(this,arguments)}}(),qn=function(){var on=Object(c.a)(a.a.mark(function bn(Ut){var Wt;return a.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return hn.next=2,Object(m.c)(Fn,{active:Ut==null?void 0:Ut.id});case 2:Wt=hn.sent,Wt.status===0&&(tr(!1),Bn());case 4:case"end":return hn.stop()}},bn)}));return function(Ut){return on.apply(this,arguments)}}(),On=function(bn){p.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:function(){return kn(bn)}})},Wn=function(){tr(!1),Bn()};return t.a.createElement("div",{className:un.a.listDetails},t.a.createElement(Er.a,{className:"pt20 pl20 pr20",loading:er,active:!0,paragraph:{rows:5}},t.a.createElement("div",{className:un.a.head},t.a.createElement("div",{className:un.a.name},t.a.createElement("div",{title:jt==null?void 0:jt.name,className:un.a.title},jt==null?void 0:jt.name),(jt==null?void 0:jt.is_authority)&&t.a.createElement("div",{className:un.a.b},"\u5B98\u65B9"),(jt==null?void 0:jt.is_excellent)&&t.a.createElement("div",{className:un.a.a},"\u7CBE\u9009")),t.a.createElement("div",{className:un.a.tag},t.a.createElement("img",{src:x.a.IMG_SERVER+"/images/"+(jt==null?void 0:jt.image_url)}),t.a.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},jt==null?void 0:jt.username),t.a.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ne()(jt==null?void 0:jt.created_at).format("YYYY-MM-DD")),t.a.createElement("span",null,t.a.createElement("img",{src:G.a}),t.a.createElement("span",null,jt==null?void 0:jt.praises_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Te.a}),t.a.createElement("span",null,jt==null?void 0:jt.discusses_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Ze.a}),t.a.createElement("span",null,jt==null?void 0:jt.viewed_count)),t.a.createElement("div",{className:un.a.btn},(Object(It.v)()||(jt==null?void 0:jt.is_self))&&t.a.createElement(t.a.Fragment,null,t.a.createElement(J.a,{onClick:function(){return On(jt)},type:"primary",ghost:!0},"\u5220\u9664"),t.a.createElement(J.a,{onClick:function(){return gn(jt)},type:"primary",ghost:!0},"\u7F16\u8F91")),Object(It.v)()&&t.a.createElement(J.a,{onClick:function(){return sr({is_authority:!(jt!=null&&jt.is_authority)})},type:"primary"},t.a.createElement("img",{src:xr.a}),jt!=null&&jt.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),Object(It.v)()&&t.a.createElement(J.a,{onClick:function(){return sr({is_excellent:!(jt!=null&&jt.is_excellent)})},type:"primary"},t.a.createElement("img",{src:Nr.a}),jt!=null&&jt.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),t.a.createElement("div",{className:un.a.scroll},(jt==null||((Mt=jt.videos)===null||Mt===void 0||((Dt=Mt[0])===null||Dt===void 0))?void 0:Dt.id)&&t.a.createElement("div",{className:un.a.video},t.a.createElement(S.a,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!(jt!=null&&(Gt=jt.videos)!==null&&Gt!==void 0&&(Ft=Gt[0])!==null&&Ft!==void 0&&Ft.transcoded)},t.a.createElement(mr.a,{poster:jt==null||((ht=jt.videos)===null||ht===void 0||((ft=ht[0])===null||ft===void 0))?void 0:ft.cover_url,src:(jt==null||((Bt=jt.videos)===null||Bt===void 0||((gt=Bt[0])===null||gt===void 0))?void 0:gt.play_url)||"",videoId:jt==null||((Zt=jt.videos)===null||Zt===void 0||((Lt=Zt[0])===null||Lt===void 0))?void 0:Lt.id,logWatchHistory:function(){}}))),t.a.createElement(at.a,{className:un.a.html,value:(jt==null?void 0:jt.content)||""}),t.a.createElement("div",{onClick:function(){return qn(jt)},className:un.a.g},t.a.createElement("img",{className:"mr10",src:(jt!=null&&jt.user_liker,vr.a)}),t.a.createElement("span",null,jt==null?void 0:jt.praises_count)),t.a.createElement(di,{onOk:Wn,active:rn,identifier:Fn})),t.a.createElement("div",{className:un.a.btns},t.a.createElement(J.a,{onClick:function(){return Sn()},type:"primary",ghost:!0},"\u5173\u95ED"),Vn[0]&&t.a.createElement(J.a,{onClick:function(bn){return zn(bn,"prev")},style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Vn[1]&&t.a.createElement(J.a,{onClick:function(bn){return zn(bn,"next")},style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},qr=dr,ri=z("3tLw"),fi=z.n(ri),ii=z("ek7X"),Xi=z("0NbB"),na=function(pt){var Mt=pt.identifier,Dt=pt.tabStatus,Gt=pt.setFilterListTotal,Ft=pt.setListStatus,ht={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null},ft=Object(r.useState)(Object(n.a)({},ht)),Bt=Object(s.a)(ft,2),gt=Bt[0],Zt=Bt[1],Lt=Object(r.useState)(!1),rn=Object(s.a)(Lt,2),Fn=rn[0],wn=rn[1],gn=Object(r.useState)(0),zn=Object(s.a)(gn,2),Sn=zn[0],Bn=zn[1],kn=Object(r.useState)(1),ir=Object(s.a)(kn,2),Vn=ir[0],cr=ir[1],gr=Object(r.useState)(null),er=Object(s.a)(gr,2),In=er[0],Qn=er[1],Dn=Object(r.useState)([]),jt=Object(s.a)(Dn,2),cn=jt[0],tr=jt[1],sr=Object(r.useState)([!0,!0]),qn=Object(s.a)(sr,2),On=qn[0],Wn=qn[1],on=Object(r.useState)(0),bn=Object(s.a)(on,2),Ut=bn[0],Wt=bn[1],Yt=Object(r.useRef)(null);Object(r.useEffect)(function(){wr()},[Dt]),Object(r.useEffect)(function(){hn()},[In]),Object(r.useEffect)(function(){Nn(Object(n.a)({},ht)),wr()},[Mt]),Object(r.useEffect)(function(){return window.addEventListener("resize",qt),Ft(Ut),function(){window.removeEventListener("resize",qt)}},[Ut]);var hn=function(){var Un=Object(c.a)(a.a.mark(function mn(){var jn,Jn;return a.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:if(In){Hn.next=3;break}return Wn([!0,!0]),Hn.abrupt("return");case 3:jn=[!0,!0],Jn=cn==null?void 0:cn.findIndex(function(bi){return bi.id===In}),Jn===0&>.page===1&&(jn[0]=!1),(gt.page-1)*gt.limit+(Jn+1)===gt.total&&(jn[1]=!1),Wn(jn);case 8:case"end":return Hn.stop()}},mn)}));return function(){return Un.apply(this,arguments)}}(),qt=function(){if(Ut){var mn,jn=window.innerWidth-((mn=Yt.current)===null||mn===void 0?void 0:mn.clientWidth);Bn(jn)}},Nn=function(){var Un=Object(c.a)(a.a.mark(function mn(jn){var Jn,Rr,Hn,bi;return a.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:return wn(!0),Gr.next=3,Object(m.f)(Mt,jn);case 3:return Jn=Gr.sent,(Jn==null?void 0:Jn.status)===0&&(tr((Jn==null||((Rr=Jn.data)===null||Rr===void 0)?void 0:Rr.articles)||[]),Zt(Object(n.a)(Object(n.a)({},jn),{},{total:Jn==null||((Hn=Jn.data)===null||Hn===void 0)?void 0:Hn.articles_count})),Gt(Jn==null||((bi=Jn.data)===null||bi===void 0)?void 0:bi.articles_count)),wn(!1),Gr.abrupt("return",Jn);case 7:case"end":return Gr.stop()}},mn)}));return function(jn){return Un.apply(this,arguments)}}(),pn=function(){(gt==null?void 0:gt.sort_direction)===null?gt.sort_direction="asc":(gt==null?void 0:gt.sort_direction)==="asc"?gt.sort_direction="desc":(gt==null?void 0:gt.sort_direction)==="desc"&&(gt.sort_direction=null),gt.page=1,wr(),Zt(Object(n.a)({},gt)),Nn(gt)},Cn=function(){gt.page=1,gt.search=gt==null?void 0:gt.save_search,wr(),Zt(Object(n.a)({},gt)),Nn(gt)},vn=function(){var mn,jn=document.getElementsByClassName("btn-resize");jn[0].style.visibility="hidden";var Jn=window.innerWidth-((mn=Yt.current)===null||mn===void 0?void 0:mn.clientWidth);Bn(Jn)},ar=function(){vn(),Wt(1)},Yn=function(mn){vn(),Qn(mn==null?void 0:mn.id),Wt(3)},$n=function(mn){vn(),Qn(mn==null?void 0:mn.id),Wt(2)},wr=function(){var mn=document.getElementsByClassName("btn-resize");mn[0].style.visibility="visible",Bn(0),Wt(0),Qn(null)},jr=function(mn){Wt(3),Qn(mn),gt.page=1,Zt(Object(n.a)({},gt)),Nn(gt)},Ai=function(mn){Wt(3),Qn(mn),Zt(Object(n.a)({},gt)),Nn(gt)},zr=function(mn){Zt(Object(n.a)({},gt)),Nn(gt)},Pi=function(){var Un=Object(c.a)(a.a.mark(function mn(jn){var Jn;return a.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Hn.next=2,Object(m.c)(Mt,{active:jn==null?void 0:jn.id});case 2:Jn=Hn.sent,Jn.status===0&&(Nn(gt),cr(Vn+1));case 4:case"end":return Hn.stop()}},mn)}));return function(jn){return Un.apply(this,arguments)}}(),Hi=function(){var Un=Object(c.a)(a.a.mark(function mn(jn){var Jn;return a.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Hn.next=2,Object(m.e)(Mt,{active:jn==null?void 0:jn.id});case 2:Jn=Hn.sent,Jn.status===0&&(Nn(gt),cr(Vn+1));case 4:case"end":return Hn.stop()}},mn)}));return function(jn){return Un.apply(this,arguments)}}(),Ki=function(){var Un=Object(c.a)(a.a.mark(function mn(jn){var Jn;return a.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Hn.next=2,Object(m.i)(Mt,{active:jn==null?void 0:jn.id});case 2:Jn=Hn.sent,Jn.status===0&&(wr(),Nn(gt));case 4:case"end":return Hn.stop()}},mn)}));return function(jn){return Un.apply(this,arguments)}}(),ji=function(mn){gt.page=mn,Zt(Object(n.a)({},gt)),Nn(gt)},ba=function(){var Un=Object(c.a)(a.a.mark(function mn(jn,Jn){var Rr,Hn,bi,pi,Gr,Pr,oi,ei,Rn,En,Kn;return a.a.wrap(function(An){for(;;)switch(An.prev=An.next){case 0:if(Rr=cn==null?void 0:cn.findIndex(function(fr){return fr.id===In}),console.log(Rr,Jn,22),!(Jn==="prev")){An.next=21;break}if(!(Rr===void 0)){An.next=6;break}return C.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),An.abrupt("return");case 6:if(!(Rr===0)){An.next=19;break}if(!(gt.page===1)){An.next=10;break}return C.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),An.abrupt("return");case 10:if(!(gt.page!==1)){An.next=17;break}return gt.page=gt.page-1,Zt(Object(n.a)({},gt)),An.next=15,Nn(gt);case 15:Hn=An.sent,(Hn==null?void 0:Hn.status)===0&&(Pr=Hn==null||((bi=Hn.data)===null||bi===void 0)?void 0:bi.articles[(Hn==null||((pi=Hn.data)===null||pi===void 0||((Gr=pi.articles)===null||Gr===void 0))?void 0:Gr.length)-1],Qn(Pr==null?void 0:Pr.id),console.log(jn.target,555));case 17:An.next=21;break;case 19:oi=cn[Rr-1],Qn(oi==null?void 0:oi.id);case 21:if(!(Jn==="next")){An.next=39;break}if(!(Rr===void 0)){An.next=25;break}return C.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),An.abrupt("return");case 25:if(!((gt.page-1)*gt.limit+(Rr+1)===gt.total)){An.next=28;break}return C.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),An.abrupt("return");case 28:if(!(Rr+1===gt.limit)){An.next=37;break}return gt.page=gt.page+1,Zt(Object(n.a)({},gt)),An.next=33,Nn(gt);case 33:ei=An.sent,(ei==null?void 0:ei.status)===0&&(En=ei==null||((Rn=ei.data)===null||Rn===void 0)?void 0:Rn.articles[0],Qn(En==null?void 0:En.id)),An.next=39;break;case 37:Kn=cn[Rr+1],Qn(Kn==null?void 0:Kn.id);case 39:case"end":return An.stop()}},mn)}));return function(jn,Jn){return Un.apply(this,arguments)}}();return t.a.createElement("div",{className:lt.a.wrap,ref:Yt},t.a.createElement("div",{className:lt.a.head},t.a.createElement("div",{className:lt.a.sort,onClick:pn},t.a.createElement("span",null,"\u6700\u65B0"),t.a.createElement("aside",null,t.a.createElement(ii.a,{style:{color:(gt==null?void 0:gt.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),t.a.createElement(Xi.a,{style:{color:(gt==null?void 0:gt.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),t.a.createElement(Y.a.Search,{value:gt.save_search,className:lt.a["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:function(mn){gt.save_search=mn.target.value,Zt(Object(n.a)({},gt))},onSearch:Cn}),t.a.createElement("div",{onClick:ar,className:lt.a.btn},t.a.createElement("img",{src:fi.a}),"\u5199\u9898\u89E3")),t.a.createElement("div",{className:lt.a.listWarp},t.a.createElement(S.a,{spinning:Fn,className:"mt20"},cn==null?void 0:cn.map(function(Un,mn){var jn=!0;return mn+1===cn.length&&mn!==0&&(jn=!1),t.a.createElement(At,{active:In,key:Un.id,data:Un,showLine:jn,onClick:Yn,onAssist:Pi,onHide:Hi})}),(cn==null?void 0:cn.length)===0&&t.a.createElement(P.a,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),t.a.createElement(Ee.a,{className:lt.a.pagination,showTotal:function(mn){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},mn),"\u6761\u6570\u636E")},total:gt.total,showSizeChanger:!1,current:gt==null?void 0:gt.page,onChange:ji,hideOnSinglePage:!0,showQuickJumper:!0}),Ut>0&&t.a.createElement("div",{className:lt.a.fixedRight,style:{width:Sn}},Ut===1&&t.a.createElement(rr,{identifier:Mt,onClose:wr,onOk:jr}),Ut===2&&t.a.createElement(rr,{active:In,identifier:Mt,onClose:wr,onOk:Ai}),Ut===3&&t.a.createElement(qr,{btnShowStatus:On,onArticlesSkip:ba,detailsIndex:Vn,active:In,identifier:Mt,onClose:wr,onOk:zr,onEdit:$n,onAssist:Pi,onDelete:Ki})))},ai=na,Yi=z("VEzc"),Zr=z.n(Yi),Wi=function(pt){var Mt,Dt=pt.visible,Gt=pt.onVisible,Ft=pt.value,ht=pt.onChange,ft=pt.setIndex,Bt={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null},gt=Object(r.useState)(Bt),Zt=Object(s.a)(gt,2),Lt=Zt[0],rn=Zt[1],Fn=Object(r.useState)([]),wn=Object(s.a)(Fn,2),gn=wn[0],zn=wn[1],Sn=Object(r.useState)([]),Bn=Object(s.a)(Sn,2),kn=Bn[0],ir=Bn[1],Vn=Object(r.useState)(!1),cr=Object(s.a)(Vn,2),gr=cr[0],er=cr[1],In=Object(r.useRef)([]),Qn=Object(r.useRef)(null),Dn=Object(y.i)();Object(r.useEffect)(function(){return Dn!=null&&Dn.id&&(Qn.current=setInterval(function(){jt(30)},3e4)),function(){clearInterval(Qn.current)}},[]);var jt=function(){var Ut=Object(c.a)(a.a.mark(function Wt(Yt){var hn;return a.a.wrap(function(Nn){for(;;)switch(Nn.prev=Nn.next){case 0:return Nn.next=2,Object(m.r)(Dn==null?void 0:Dn.id,{practice_time:Yt});case 2:hn=Nn.sent;case 3:case"end":return Nn.stop()}},Wt)}));return function(Yt){return Ut.apply(this,arguments)}}();Object(r.useEffect)(function(){Wn(Lt),qn()},[]),Object(r.useEffect)(function(){return window.addEventListener("click",tr),function(){window.removeEventListener("click",tr)}},[Dn==null?void 0:Dn.save_identifier,Dt]),Object(r.useEffect)(function(){var Ut=In.current.findIndex(function(Nn){return Nn.identifier===(Dn==null?void 0:Dn.save_identifier)}),Wt=In.current[Ut-1],Yt=In.current[Ut+1],hn=document.getElementById("oj-prev"),qt=document.getElementById("oj-next");Wt?hn.style.display="block":hn.style.display="none",Yt?qt.style.display="block":qt.style.display="none"},[Dn==null?void 0:Dn.save_identifier,In.current]);var cn=function(Wt,Yt){if(Wt.id===Yt)return Wt;for(var hn=0,qt=Wt;qt=qt.parentNode;hn++){if(qt.id===Yt)return qt;if(qt==document.documentElement)return!1}},tr=function(){var Ut=Object(c.a)(a.a.mark(function Wt(Yt){var hn,qt,Nn;return a.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:if(!cn(Yt.target,"oj-drawer")&&Dt&&Gt(!1),hn=In.current.findIndex(function(vn){return vn.identifier===(Dn==null?void 0:Dn.save_identifier)}),qt=In.current[hn-1],Nn=In.current[hn+1],!(Yt.target.id==="oj-prev")){Cn.next=14;break}if(!(!qt||hn===-1)){Cn.next=8;break}return C.b.warn("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728"),Cn.abrupt("return");case 8:return Yt.target.style.pointerEvents="none",Yt.target.style.cursor="not-allowed",Cn.next=12,on(qt==null?void 0:qt.identifier);case 12:ft("0"),setTimeout(function(){Yt.target.style.pointerEvents="auto",Yt.target.style.cursor="pointer"},400);case 14:if(!(Yt.target.id==="oj-next"||Yt.target.id==="oj-modal-next")){Cn.next=24;break}if(!(!Nn||hn===-1)){Cn.next=18;break}return C.b.warn("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728"),Cn.abrupt("return");case 18:return Yt.target.style.pointerEvents="none",Yt.target.style.cursor="not-allowed",Cn.next=22,on(Nn==null?void 0:Nn.identifier);case 22:ft("0"),setTimeout(function(){Yt.target.style.pointerEvents="auto",Yt.target.style.cursor="pointer"},400);case 24:case"end":return Cn.stop()}},Wt)}));return function(Yt){return Ut.apply(this,arguments)}}();Object(r.useEffect)(function(){ht(Dn==null?void 0:Dn.save_identifier);var Ut=kn.findIndex(function(Wt){return Wt.some(function(Yt){return Yt.identifier===(Dn==null?void 0:Dn.save_identifier)})});Ut===-1?rn(Object(n.a)(Object(n.a)({},Lt),{},{page:1})):rn(Object(n.a)(Object(n.a)({},Lt),{},{page:Ut+1}))},[Dn==null?void 0:Dn.save_identifier,kn]);var sr=function(Wt){Lt.page=1,Lt.tag_discipline_id=Wt,rn(Object(n.a)({},Lt)),Wn(Lt)},qn=function(){var Ut=Object(c.a)(a.a.mark(function Wt(){var Yt;return a.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Object(Ce.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});case 2:Yt=qt.sent,zn(Yt.tag_disciplines||[]);case 4:case"end":return qt.stop()}},Wt)}));return function(){return Ut.apply(this,arguments)}}(),On=function(Wt){Lt.page=1,Lt.difficulty=typeof Wt=="number"?Wt:null,rn(Object(n.a)({},Lt)),Wn(Lt)},Wn=function(){var Ut=Object(c.a)(a.a.mark(function Wt(Yt){var hn,qt,Nn,pn,Cn,vn;return a.a.wrap(function(Yn){for(;;)switch(Yn.prev=Yn.next){case 0:return er(!0),Yn.next=3,Object(m.p)(Yt);case 3:if(hn=Yn.sent,hn!=null&&hn.practices_list){for(Nn=hn==null||((qt=hn.practices_list)===null||qt===void 0)?void 0:qt.length,pn=[],Cn=0;Cn<Nn;Cn+=Lt==null?void 0:Lt.per_page)pn.push(hn==null||((vn=hn.practices_list)===null||vn===void 0)?void 0:vn.slice(Cn,Cn+(Lt==null?void 0:Lt.per_page)));rn(Object(n.a)(Object(n.a)({},Lt),{},{total:hn==null?void 0:hn.practices_count})),In.current=(hn==null?void 0:hn.practices_list)||[],ir(pn)}er(!1);case 6:case"end":return Yn.stop()}},Wt)}));return function(Yt){return Ut.apply(this,arguments)}}(),on=function(){var Ut=Object(c.a)(a.a.mark(function Wt(Yt,hn){var qt;return a.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return pn.next=2,Object(Ce.a)("/api/practices/".concat(Yt,"/start"),{method:"get"});case 2:qt=pn.sent,(qt==null?void 0:qt.status)===0&&b.d.push("/problems/".concat(qt==null?void 0:qt.identifier,"/oj/").concat(Yt));case 4:case"end":return pn.stop()}},Wt)}));return function(Yt,hn){return Ut.apply(this,arguments)}}(),bn=function(Wt){Lt.page=Wt,rn(Object(n.a)({},Lt))};return t.a.createElement("div",{className:Zr.a.wrap,id:"oj-drawer",style:{left:Dt?0:-700}},t.a.createElement("div",{className:Zr.a.head},t.a.createElement("div",{className:Zr.a.title},"\u9898\u76EE\u5217\u8868"),t.a.createElement(Y.a.Search,{value:Lt==null?void 0:Lt.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:178,marginLeft:"auto",marginRight:10},onChange:function(Wt){Lt.save_search=Wt.target.value,rn(Object(n.a)({},Lt))},onSearch:function(){Lt.page=1,Lt.search=Lt.save_search,rn(Object(n.a)({},Lt)),Wn(Lt)}}),t.a.createElement(O.a,{value:Lt==null?void 0:Lt.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:function(Wt){return Wt.parentNode},maxTagTextLength:2,maxTagCount:2,onChange:sr},gn.map(function(Ut){return t.a.createElement(O.a.Option,{key:Ut.id,value:Ut.id},Ut.name)})),t.a.createElement(O.a,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:function(Wt){return Wt.parentNode},value:Lt==null?void 0:Lt.difficulty,onChange:On},t.a.createElement(O.a.Option,{value:1},"\u7B80\u5355"),t.a.createElement(O.a.Option,{value:2},"\u9002\u4E2D"),t.a.createElement(O.a.Option,{value:3},"\u56F0\u96BE"))),t.a.createElement("div",{className:Zr.a.content},t.a.createElement(S.a,{spinning:gr},kn==null||((Mt=kn[Lt.page-1])===null||Mt===void 0)?void 0:Mt.map(function(Ut){return t.a.createElement("div",{key:Ut.identifier,className:Zr.a.list,onClick:function(Yt){return on(Ut.identifier,Yt)}},t.a.createElement("i",{style:{visibility:Ft===Ut.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),t.a.createElement("span",{style:{fontWeight:Ft===Ut.identifier?"bold":400,color:Ft===Ut.identifier?"#ffffff":"#bac4cd"},title:Ut==null?void 0:Ut.name},Ut.name),(Ut==null?void 0:Ut.difficulty)===1&&t.a.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(Ut==null?void 0:Ut.difficulty)===2&&t.a.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(Ut==null?void 0:Ut.difficulty)===3&&t.a.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))}))),t.a.createElement("div",{className:Zr.a.footer},t.a.createElement(Ee.a,{showTotal:function(Wt){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},Wt),"\u6761\u6570\u636E")},total:Lt.total,pageSize:Lt==null?void 0:Lt.per_page,current:Lt==null?void 0:Lt.page,showSizeChanger:!1,onChange:bn,showQuickJumper:!0,hideOnSinglePage:!0})))},Di=Wi,Oi=function(rt){var pt,Mt=rt.hack,Dt=rt.onTriggerPraise,Gt=rt.topicId,Ft=rt.page,ht=rt.onPageChange,ft=rt.user,Bt=rt.submitRecords,gt=rt.submitting,Zt=rt.submitResult,Lt=Object(y.h)(),rn=Object(r.useState)((Lt==null||((pt=Lt.query)===null||pt===void 0)?void 0:pt.tab)||"0"),Fn=Object(s.a)(rn,2),wn=Fn[0],gn=Fn[1],zn=Object(r.useState)(0),Sn=Object(s.a)(zn,2),Bn=Sn[0],kn=Sn[1],ir=Object(r.useState)(0),Vn=Object(s.a)(ir,2),cr=Vn[0],gr=Vn[1],er=Object(r.useState)(0),In=Object(s.a)(er,2),Qn=In[0],Dn=In[1],jt=Object(r.useState)(),cn=Object(s.a)(jt,2),tr=cn[0],sr=cn[1],qn=Object(r.useState)(!1),On=Object(s.a)(qn,2),Wn=On[0],on=On[1];function bn(Wt){var Yt=Wt.target.id;if(wn==="3"&&Yt!==wn&&(cr===1||cr===2)){p.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:function(){gn(Yt)}});return}gn(Yt)}Object(r.useEffect)(function(){var Wt=Xe.a.subscribe("to-commit-info",function(){gn("1")});return Wt},[]);function Ut(){gn("2")}return t.a.createElement("div",{className:me.a["left-panel"]},t.a.createElement("ul",{className:"".concat(me.a["s-navs"]," ").concat(me.a["bg-white"]," ").concat(me.a.b1)},t.a.createElement("li",{className:"mr40 current"},t.a.createElement("img",{onClick:function(){return on(!0)},src:ze.a})),t.a.createElement("li",{className:me.a["oj-mr"]},t.a.createElement("a",{className:wn==="0"?me.a.active:"",id:"0",onClick:bn},"\u4EFB\u52A1\u63CF\u8FF0")),t.a.createElement("li",{className:me.a["oj-mr"]},t.a.createElement("a",{className:wn==="3"?me.a.active:"",id:"3",onClick:bn},"\u9898\u89E3",Qn?"(".concat(Qn,")"):"")),t.a.createElement("li",{className:me.a["oj-mr"]},t.a.createElement("a",{className:wn==="2"?me.a.active:"",id:"2",onClick:bn},"\u8BC4\u8BBA",Bn?"(".concat(Bn,")"):"")),t.a.createElement("li",null,t.a.createElement("a",{className:wn==="1"?me.a.active:"",id:"1",onClick:bn},"\u63D0\u4EA4\u8BB0\u5F55"))),t.a.createElement("div",{className:"".concat(me.a["tab-panel-body"]," ").concat(wn==="0"?"":"hide"),style:{padding:"0 0 0 16px"}},t.a.createElement(Me,{hack:Mt,onTriggerPraise:Dt,toDiscuss:Ut})),t.a.createElement("div",{className:"".concat(me.a["tab-panel-body"]," ").concat(wn==="1"?"":"hide")},Bt!=null&&Bt.records_count?t.a.createElement(te,{page:Ft,onPageChange:ht,topicId:Gt,submitting:gt,submitRecords:Bt,submitResult:Zt}):t.a.createElement(P.a,null)),t.a.createElement("div",{className:"".concat(me.a["tab-panel-body"]," ").concat(wn==="2"?"":"hide"),style:{padding:0}},t.a.createElement(St,{setDiscussTotal:kn,user:ft,identifier:Mt.identifier,hack:Mt,onTriggerPraise:Dt})),t.a.createElement("div",{className:"".concat(me.a["tab-panel-body"]," ").concat(wn==="3"?"":"hide"),style:{padding:0}},t.a.createElement(ai,{setListStatus:gr,setFilterListTotal:Dn,tabStatus:wn,identifier:Mt.identifier})),t.a.createElement(Di,{visible:Wn,setIndex:gn,onVisible:function(Yt){return on(Yt)},value:tr,onChange:function(Yt){return sr(Yt)}}))},$i=z("+aKw"),yi=z("oFv4"),Ji=z.n(yi),Qi=z("S/kP"),hi=z.n(Qi),Zi=z("t/PP"),tn=z.n(Zi),_n=z("LvDl"),an=z.n(_n),Ln=z("P5Jw"),Xn=i.a.Countdown,or={Java:"java",C:"c",Python:"py","C++":"c"},Xt;(function(rt){rt[rt.SET_LOADING=0]="SET_LOADING",rt[rt.GET_DATA=1]="GET_DATA",rt[rt.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",rt[rt.SET_DATA=3]="SET_DATA",rt[rt.SET_DEBUGING=4]="SET_DEBUGING",rt[rt.SET_SUBMITING=5]="SET_SUBMITING",rt[rt.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",rt[rt.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",rt[rt.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",rt[rt.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",rt[rt.SET_PAGE=10]="SET_PAGE",rt[rt.GET_LANGUAGE=11]="GET_LANGUAGE",rt[rt.GET_DRAWER=12]="GET_DRAWER"})(Xt||(Xt={}));function yr(){return new Date().getTime()}var Kr={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function Mn(rt,pt){switch(pt.type){case Xt.GET_DATA:return Object(n.a)(Object(n.a)({},rt),pt.payload);case Xt.SET_DATA:return Object(n.a)(Object(n.a)({},rt),{},{data:pt.payload});case Xt.SET_LOADING:return Object(n.a)(Object(n.a)({},rt),{},{loading:pt.payload});case Xt.GET_LANGUAGE:return Object(n.a)(Object(n.a)({},rt),{},{languageList:pt.payload});case Xt.GET_DRAWER:return Object(n.a)(Object(n.a)({},rt),{},{drawerData:pt.payload});case Xt.SET_SHOW_NOTE:return Object(n.a)(Object(n.a)({},rt),{},{showNote:pt.payload});case Xt.SET_DEBUGING:return Object(n.a)(Object(n.a)({},rt),{},{debuging:pt.payload});case Xt.SET_SUBMITING:return Object(n.a)(Object(n.a)({},rt),{},{submitting:pt.payload});case Xt.GET_SUBMIT_RECORDS:return Object(n.a)(Object(n.a)({},rt),{},{submitRecords:pt.payload});case Xt.SET_PAGE:return Object(n.a)(Object(n.a)({},rt),{},{submitRecordPage:pt.payload});case Xt.SET_EXECUTE_MESSAGE:return Object(n.a)(Object(n.a)({},rt),{},{executingMessage:pt.payload});case Xt.SET_EXECUTE_RESULT:return Object(n.a)(Object(n.a)({},rt),pt.payload);case Xt.SET_SUBMIT_RESULT:return Object(n.a)(Object(n.a)({},rt),pt.payload);default:throw new Error}}var Ci=We.default=function(rt){var pt,Mt,Dt=rt.children,Gt=Object(r.useReducer)(Mn,Kr),Ft=Object(s.a)(Gt,2),ht=Ft[0],ft=Ft[1],Bt=Object(y.i)(),gt=Bt.id,Zt=Object(y.g)(),Lt=Object(y.h)(),rn=ht.languageValue,Fn=ht.languageList,wn=ht.loading,gn=ht.data,zn=ht.debugResult,Sn=ht.submitResult,Bn=ht.submitRecords,kn=ht.submitRecordPage,ir=ht.showNote,Vn=ht.debuging,cr=ht.submitting,gr=ht.executingMessage,er=Object(r.useState)("#FFF"),In=Object(s.a)(er,2),Qn=In[0],Dn=In[1],jt=Object(r.useState)(null),cn=Object(s.a)(jt,2),tr=cn[0],sr=cn[1],qn=Object(r.useState)({}),On=Object(s.a)(qn,2),Wn=On[0],on=On[1],bn=Object(r.useState)(!1),Ut=Object(s.a)(bn,2),Wt=Ut[0],Yt=Ut[1],hn=Object(r.useRef)(null),qt=Object(r.useRef)(null),Nn=gn==null?void 0:gn.user,pn=gn==null?void 0:gn.hack;Object(r.useEffect)(function(){return Object(b.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(b.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(b.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(b.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(r.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)}),Object(r.useEffect)(function(){if(Wt){var Rn,En=document.getElementById("oj-next"),Kn=document.getElementById("oj-modal-next");(En==null||((Rn=En.style)===null||Rn===void 0)?void 0:Rn.display)==="none"?Kn.style.display="none":Kn.style.display="block"}},[Wt]),Object(r.useEffect)(function(){function Rn(){return En.apply(this,arguments)}function En(){return En=Object(c.a)(a.a.mark(function Kn(){var Vt,An,fr,Lr,Fr;return a.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return sn.next=2,Object(m.m)(gt);case 2:Vt=sn.sent,Vt.status===401?document.location.href="/user/login":(Vt.hack=Vt.practice,Vt.hack.code=w.Base64.decode(Vt==null||((An=Vt.hack)===null||An===void 0)?void 0:An.code),Fr="".concat(Nn==null?void 0:Nn.login,"-language"),localStorage.getItem(Fr)&&(Vt.hack.language=localStorage.getItem(Fr)),qt.current=an.a.cloneDeep(Vt),qt.current.language=Vt==null||((fr=Vt.hack)===null||fr===void 0)?void 0:fr.language,ft({type:Xt.GET_DATA,payload:{loading:!1,data:Vt}}),ft({type:Xt.SET_SUBMIT_RESULT,payload:{languageValue:Vt==null||((Lr=Vt.hack)===null||Lr===void 0)?void 0:Lr.language}}));case 4:case"end":return sn.stop()}},Kn)})),En.apply(this,arguments)}gt&&Rn()},[gt]),Object(r.useEffect)(function(){ft({type:Xt.SET_SUBMIT_RESULT,payload:{debugResult:void 0}}),Yn(),Yt(!1)},[gt]),Object(r.useEffect)(function(){clearTimeout(hn.current)},[gt]),Object(r.useEffect)(function(){vn()},[gt,kn]);var Cn=function(){window.parent.postMessage("backExercise","*")};function vn(){return ar.apply(this,arguments)}function ar(){return ar=Object(c.a)(a.a.mark(function Rn(){var En;return a.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.prev=0,Vt.next=3,Object(m.o)(gt,{limit:15,page:kn});case 3:En=Vt.sent,ft({type:Xt.GET_SUBMIT_RECORDS,payload:En}),Vt.next=10;break;case 7:Vt.prev=7,Vt.t0=Vt.catch(0),console.log(Vt.t0);case 10:case"end":return Vt.stop()}},Rn,null,[[0,7]])})),ar.apply(this,arguments)}function Yn(){return $n.apply(this,arguments)}function $n(){return $n=Object(c.a)(a.a.mark(function Rn(){var En;return a.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.prev=0,Vt.next=3,Object(m.w)(gt);case 3:En=Vt.sent,ft({type:Xt.GET_LANGUAGE,payload:En==null?void 0:En.data}),Vt.next=10;break;case 7:Vt.prev=7,Vt.t0=Vt.catch(0),console.log(Vt.t0);case 10:case"end":return Vt.stop()}},Rn,null,[[0,7]])})),$n.apply(this,arguments)}function wr(Rn){ft({type:Xt.SET_PAGE,payload:Rn})}function jr(Rn){return Ai.apply(this,arguments)}function Ai(){return Ai=Object(c.a)(a.a.mark(function Rn(En){var Kn,Vt,An,fr,Lr,Fr;return a.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return Lr=((Kn=window)===null||Kn===void 0||((Vt=Kn.location)===null||Vt===void 0||((An=Vt.pathname)===null||An===void 0||((fr=An.split("/"))===null||fr===void 0)))?void 0:fr[2])||gt,sn.next=3,Object(m.v)(Lr,En||{code:w.Base64.encode(pn.code),language:rn});case 3:return Fr=sn.sent,sn.abrupt("return",Fr);case 5:case"end":return sn.stop()}},Rn)})),Ai.apply(this,arguments)}function zr(){return Pi.apply(this,arguments)}function Pi(){return Pi=Object(c.a)(a.a.mark(function Rn(){var En,Kn,Vt,An,fr,Lr,Fr;return a.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:if(!cr){sn.next=2;break}return sn.abrupt("return");case 2:return ft({type:Xt.SET_SUBMITING,payload:!0}),sn.prev=3,Xe.a.publish("to-commit-info"),sn.next=7,jr();case 7:if(En=sn.sent,!(En.status===0)){sn.next=21;break}return Fr=function(){return Fr=Object(c.a)(a.a.mark(function ha(){var Ei,Fi,Bi,zi,aa,oa;return a.a.wrap(function(Mr){for(;;)switch(Mr.prev=Mr.next){case 0:return Mr.next=2,Object(m.l)(gt,"submit");case 2:if(Ei=Mr.sent,Fi=Ei.status,Bi=Ei.data,zi=yr(),aa=zi-fr>(An+3)*1e3,Fi!==0&&!aa&&setTimeout(Lr,1e3),!aa){Mr.next=12;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),ft({type:Xt.SET_SUBMITING,payload:!1}),Mr.abrupt("return");case 12:if(!(Fi===0)){Mr.next=19;break}return Bi.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Mr.next=16,Object(m.o)(gt,{limit:15,page:kn});case 16:oa=Mr.sent,ft({type:Xt.SET_SUBMIT_RESULT,payload:Object(n.a)(Object(n.a)({},ht),{},{submitResult:Bi,submitting:!1,submitRecords:oa})}),(Bi==null?void 0:Bi.status)===0&&Yt(!0);case 19:case"end":return Mr.stop()}},ha)})),Fr.apply(this,arguments)},Lr=function(){return Fr.apply(this,arguments)},Kn={},sn.next=14,Object(m.s)(gt,Kn);case 14:if(Vt=sn.sent,!(Vt.status===-1)){sn.next=18;break}return window.parent.location.href="/classrooms/".concat(Lt.query.coursesId,"/exercise/").concat(Lt.query.exercisesId,"/detail"),sn.abrupt("return");case 18:An=pn.time_limit,fr=yr(),Lr();case 21:sn.next=26;break;case 23:sn.prev=23,sn.t0=sn.catch(3),ft({type:Xt.SET_SUBMITING,payload:!1});case 26:case"end":return sn.stop()}},Rn,null,[[3,23]])})),Pi.apply(this,arguments)}function Hi(){return Ki.apply(this,arguments)}function Ki(){return Ki=Object(c.a)(a.a.mark(function Rn(){var En,Kn,Vt,An,fr,Lr,Fr;return a.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return ht.debuging=!0,ft({type:Xt.SET_DEBUGING,payload:!0}),sn.prev=2,sn.next=5,jr();case 5:if(En=sn.sent,!(En.status===0)){sn.next=21;break}return Fr=function(){return Fr=Object(c.a)(a.a.mark(function ha(){var Ei,Fi,Bi,zi,aa,oa;return a.a.wrap(function(Mr){for(;;)switch(Mr.prev=Mr.next){case 0:return Mr.next=2,Object(m.l)(gt,"debug");case 2:if(Ei=Mr.sent,Fi=Ei.status,Bi=Ei.message,zi=Ei.data,aa=yr(),oa=aa-fr>(Kn+3)*1e3,Fi!==0&&!oa&&(ft({type:Xt.SET_EXECUTE_MESSAGE,payload:Bi}),setTimeout(Lr,1e3)),!oa){Mr.next=13;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),ft({type:Xt.SET_DEBUGING,payload:!1}),Mr.abrupt("return");case 13:Fi===0&&(ft({type:Xt.SET_DEBUGING,payload:!1}),zi.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),ft({type:Xt.SET_EXECUTE_RESULT,payload:Object(n.a)(Object(n.a)({},ht),{},{debugResult:zi,debuging:!1})}));case 14:case"end":return Mr.stop()}},ha)})),Fr.apply(this,arguments)},Lr=function(){return Fr.apply(this,arguments)},Kn=pn.time_limit,Vt={input:encodeURIComponent(gn.test_case.input)},sn.next=13,Object(m.h)(gt,Vt);case 13:if(An=sn.sent,!(An.status===-1)){sn.next=17;break}return window.parent.location.href="/classrooms/".concat(Lt.query.coursesId,"/exercise/").concat(Lt.query.exercisesId,"/detail"),sn.abrupt("return");case 17:fr=yr(),Lr(),sn.next=22;break;case 21:ft({type:Xt.SET_DEBUGING,payload:!1});case 22:sn.next=27;break;case 24:sn.prev=24,sn.t0=sn.catch(2),console.log(sn.t0);case 27:return sn.prev=27,sn.finish(27);case 29:case"end":return sn.stop()}},Rn,null,[[2,24,27,29]])})),Ki.apply(this,arguments)}function ji(Rn){var En;clearTimeout(hn.current),hn.current=setTimeout(function(){var Kn;jr({code:w.Base64.encode(Rn),language:qt==null||((Kn=qt.current)===null||Kn===void 0)?void 0:Kn.language})},2e3),ft({type:Xt.SET_DATA,payload:Object(n.a)(Object(n.a)({},qt==null?void 0:qt.current),{},{hack:Object(n.a)(Object(n.a)({},qt==null||((En=qt.current)===null||En===void 0)?void 0:En.hack),{},{code:Rn})})})}function ba(Rn){var En=Rn.target.value;ft({type:Xt.SET_DATA,payload:Object(n.a)(Object(n.a)({},gn),{},{test_case:{input:En}})})}var Un=function(){var Rn=Object(c.a)(a.a.mark(function En(Kn){var Vt,An,fr,Lr,Fr;return a.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return ft({type:Xt.SET_LOADING,payload:!0}),sn.next=3,jr();case 3:if(Vt=sn.sent,!(Vt.status===0)){sn.next=14;break}return ft({type:Xt.SET_SUBMIT_RESULT,payload:{languageValue:Kn}}),qt.current.language=Kn,An="".concat(Nn==null?void 0:Nn.login,"-language"),localStorage.setItem(An,Kn),sn.next=11,Object(m.w)(gt);case 11:fr=sn.sent,fr.status===0&&(Fr=fr==null||((Lr=fr.data)===null||Lr===void 0)?void 0:Lr.find(function(ia){return ia.language===Kn}),ji(w.Base64.decode(Fr.code))),setTimeout(function(){ft({type:Xt.SET_LOADING,payload:!1})},300);case 14:case"end":return sn.stop()}},En)}));return function(Kn){return Rn.apply(this,arguments)}}();function mn(){return jn.apply(this,arguments)}function jn(){return jn=Object(c.a)(a.a.mark(function Rn(){var En;return a.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.prev=0,Vt.next=3,Object(m.q)(gt,{language:rn});case 3:En=Vt.sent,En.status===401?Zt.replace("/login",{from:Lt.pathname}):(ji(w.Base64.decode(En.code)),Yn()),Vt.next=10;break;case 7:Vt.prev=7,Vt.t0=Vt.catch(0),console.log(Vt.t0);case 10:case"end":return Vt.stop()}},Rn,null,[[0,7]])})),jn.apply(this,arguments)}function Jn(){p.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:t.a.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",t.a.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk:function(){return Object(c.a)(a.a.mark(function En(){var Kn;return a.a.wrap(function(An){for(;;)switch(An.prev=An.next){case 0:return An.next=2,Object(m.t)(gt,{language:rn});case 2:Kn=An.sent,Kn.status===401?Zt.replace("/login",{from:Lt.pathname}):ji(w.Base64.decode(Kn.code));case 4:case"end":return An.stop()}},En)}))()}})}function Rr(){ft({type:Xt.SET_SHOW_NOTE,payload:!0})}function Hn(){ft({type:Xt.SET_SHOW_NOTE,payload:!1})}function bi(Rn){return pi.apply(this,arguments)}function pi(){return pi=Object(c.a)(a.a.mark(function Rn(En){return a.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.next=2,Object(m.b)(gt,En);case 2:ft({type:Xt.GET_DATA,payload:{showNote:!1,data:Object(n.a)(Object(n.a)({},gn),{},{hack:Object(n.a)(Object(n.a)({},pn),{},{notes:En.notes})})}});case 3:case"end":return Vt.stop()}},Rn)})),pi.apply(this,arguments)}var Gr={input:gn==null||((pt=gn.test_case)===null||pt===void 0)?void 0:pt.input,language:pn==null?void 0:pn.language,code:pn==null?void 0:pn.code,title:"main."+or[pn==null?void 0:pn.language],modify_code:pn==null?void 0:pn.modify_code,notes:pn==null?void 0:pn.notes,debugResult:zn,debuging:Vn,submitting:cr,executingMessage:gr,id:gt,languageValue:rn,languageList:Fn,onChangeLanguage:Un,onCancelNote:Hn,onAddNote:bi,showNote:ir,onShowNote:Rr,onSubmitCode:zr,onChangeCode:ji,onChangeInput:ba,onDebugCode:Hi,onResetCode:mn,onSyncCode:Jn,onUpdateCode:jr};function Pr(){return oi.apply(this,arguments)}function oi(){return oi=Object(c.a)(a.a.mark(function Rn(){var En,Kn,Vt;return a.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.next=2,Object(m.u)(pn.id,{container_type:"Hack",type:1});case 2:En=fr.sent,Kn=En.praise_count,Vt=Object(n.a)(Object(n.a)({},gn),{},{hack:Object(n.a)(Object(n.a)({},pn),{},{praises_count:Kn,user_praise:!pn.user_praise})}),ft({type:Xt.SET_DATA,payload:Vt});case 6:case"end":return fr.stop()}},Rn)})),oi.apply(this,arguments)}var ei={topicId:gt,submitResult:Sn,submitRecords:Bn,submitting:cr,page:kn,onPageChange:wr,hack:pn,user:gn==null?void 0:gn.user,onTriggerPraise:Pr};return console.log(gn,qt==null?void 0:qt.current,"data--------"),t.a.createElement(t.a.Fragment,null,t.a.createElement(S.a,{className:"oj-custom-large-spin",size:"large",spinning:wn},gn?t.a.createElement("div",{className:"oj-custom-warp"},t.a.createElement("header",{className:R.a.header,style:{minWidth:1200}},t.a.createElement("div",null,t.a.createElement("img",{src:"".concat(x.a.IMG_SERVER,"/images/").concat(Nn.image_url),alt:"user",width:30}),t.a.createElement("span",null,Nn.name)),t.a.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},t.a.createElement("div",null,pn.name),t.a.createElement($i.a,{onChange:function(En){},className:"font12 c-grey-999"})),t.a.createElement(Ln.CopyToClipboard,{text:"".concat((Mt=window.location)===null||Mt===void 0?void 0:Mt.origin,"/problems/").concat(pn.identifier,"/share"),onCopy:function(){return C.b.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")}},t.a.createElement("span",{className:R.a.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",t.a.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),pn.edit_privilege?t.a.createElement(g.a,{className:R.a.btn_back,to:"/problems/".concat(pn.identifier,"/ojedit"),style:{marginRight:10}}," ",t.a.createElement(d.a,null)," \u7F16\u8F91"):null,t.a.createElement(g.a,{className:R.a.btn_back,onClick:function(){},to:"/problems"}," ",t.a.createElement(v.a,null),"\u9000\u51FA")),t.a.createElement(_.a,{hideResize:!0,className:"my-problems oj-problems",leftChild:t.a.createElement(Oi,ei),rightChild:t.a.createElement(Ur,Gr)})):null),t.a.createElement(p.a,{centered:!0,closable:!1,width:680,footer:null,visible:Wt,className:"oj-modal"},t.a.createElement("section",{className:"oj-modal-content"},t.a.createElement("div",{className:"oj-modal-head"},t.a.createElement("img",{src:Ji.a,alt:""}),t.a.createElement("i",{onClick:function(){return Yt(!1)},className:"iconfont icon-guanbi1"})),t.a.createElement("aside",null,t.a.createElement("img",{className:"mr30",src:tn.a}),"\u8FD0\u884C\u65F6\u95F4:\xA0",t.a.createElement("span",{style:{color:"#75d6ba",marginRight:100}},Sn==null?void 0:Sn.execute_time,"s"),"\u4F18\u4E8E",t.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Sn==null?void 0:Sn.time_better_than)||100,"%"),"\u7684\u7528\u6237"),t.a.createElement("aside",{className:"mb50"},t.a.createElement("img",{src:hi.a,className:"mr30"}),t.a.createElement("span",{className:"oj-modal-tt"},t.a.createElement("span",null,t.a.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),t.a.createElement("span",{className:"c-light-primary"},Sn==null?void 0:Sn.execute_memory,"mb")),t.a.createElement("span",null,t.a.createElement("span",null))),"\u4F18\u4E8E",t.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Sn==null?void 0:Sn.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),t.a.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function nr(rt){var pt=rt.languageValue,Mt=rt.languageList,Dt=rt.onChangeLanguage,Gt=rt.title,Ft=rt.modify_code,ht=rt.onSyncCode,ft=rt.onShowCodeSetting,Bt=rt.onResetCode,gt=Object(y.h)(),Zt=function(){p.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:t.a.createElement(f.a,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Bt})};return t.a.createElement("div",{className:"action-bar"},t.a.createElement(O.a,{className:"oj-select",value:pt,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Dt},Mt==null?void 0:Mt.map(function(Lt){return t.a.createElement(O.a.Option,{key:Lt.language,value:Lt.language},Lt.language)})),t.a.createElement("span",null),t.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Zt},t.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),t.a.createElement("a",{onClick:ft},t.a.createElement("i",{className:"iconfont icon-shezhi"})))}function Ur(rt){var pt=rt.id,Mt=rt.input,Dt=rt.showNote,Gt=rt.onShowNote,Ft=rt.notes,ht=rt.onCancelNote,ft=rt.onAddNote,Bt=rt.debugResult,gt=rt.language,Zt=rt.debuging,Lt=rt.submitting,rn=rt.executingMessage,Fn=rt.code,wn=rt.onSubmitCode,gn=rt.onDebugCode,zn=rt.onChangeCode,Sn=rt.onChangeInput,Bn=rt.onUpdateCode,kn=Object(ee.a)(rt,["id","input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function ir(cr){return t.a.createElement(nr,Object(ae.a)({},kn,{onShowCodeSetting:cr}))}var Vn={id:pt,input:Mt,debugResult:Bt,debuging:Zt,submitting:Lt,executingMessage:rn,onDebugCode:gn,onChangeCode:zn,onSubmitCode:wn,onChangeInput:Sn};return t.a.createElement("div",{className:"right-panel"},t.a.createElement(E.a,{language:gt,value:Fn,onChange:zn,ActionBarRender:ir}),t.a.createElement("div",{className:"note-form-area ".concat(Dt?"active":"")},t.a.createElement(re,{onCancel:ht,notes:Ft,callback:ft})),t.a.createElement(j.b,Vn))}},WaYH:function(Ye,We,z){"use strict";var ae=z("rePB"),ee=z("Ff2n"),B=z("VTBJ"),O=z("1OyB"),D=z("vuIU"),S=z("JX7q"),A=z("Ji7U"),C=z("LK+K"),h=z("cDcd"),p=z("TSYQ"),c=z.n(p),s=z("sboe"),n=z("OZM5"),o=function(g){var m=g.prefixCls,_=g.level,x=g.isStart,f=g.isEnd;if(!_)return null;for(var E="".concat(m,"-indent-unit"),w=[],T=0;T<_;T+=1){var R;w.push(h.createElement("span",{key:T,className:c()(E,(R={},Object(ae.a)(R,"".concat(E,"-start"),x[T+1]),Object(ae.a)(R,"".concat(E,"-end"),f[T+1]),Object(ae.a)(R,"".concat(E,"-end-first-level"),!T&&f[0]),R))}))}return h.createElement("span",{"aria-hidden":"true",className:"".concat(m,"-indent")},w)},i=o,l=z("815F"),a="open",r="close",t="---",d=function(b){Object(A.a)(m,b);var g=Object(C.a)(m);function m(){var _;return Object(O.a)(this,m),_=g.apply(this,arguments),_.state={dragNodeHighlight:!1},_.onSelectorClick=function(x){var f=_.props.context.onNodeClick;f(x,Object(l.b)(_.props)),_.isSelectable()?_.onSelect(x):_.onCheck(x)},_.onSelectorDoubleClick=function(x){var f=_.props.context.onNodeDoubleClick;f(x,Object(l.b)(_.props))},_.onSelect=function(x){if(_.isDisabled())return;var f=_.props.context.onNodeSelect;x.preventDefault(),f(x,Object(l.b)(_.props))},_.onCheck=function(x){if(_.isDisabled())return;var f=_.props,E=f.disableCheckbox,w=f.checked,T=_.props.context.onNodeCheck;if(!_.isCheckable()||E)return;x.preventDefault();var R=!w;T(x,Object(l.b)(_.props),R)},_.onMouseEnter=function(x){var f=_.props.context.onNodeMouseEnter;f(x,Object(l.b)(_.props))},_.onMouseLeave=function(x){var f=_.props.context.onNodeMouseLeave;f(x,Object(l.b)(_.props))},_.onContextMenu=function(x){var f=_.props.context.onNodeContextMenu;f(x,Object(l.b)(_.props))},_.onDragStart=function(x){var f=_.props.context.onNodeDragStart;x.stopPropagation(),_.setState({dragNodeHighlight:!0}),f(x,Object(S.a)(_));try{x.dataTransfer.setData("text/plain","")}catch(E){}},_.onDragEnter=function(x){var f=_.props.context.onNodeDragEnter;x.preventDefault(),x.stopPropagation(),f(x,Object(S.a)(_))},_.onDragOver=function(x){var f=_.props.context.onNodeDragOver;x.preventDefault(),x.stopPropagation(),f(x,Object(S.a)(_))},_.onDragLeave=function(x){var f=_.props.context.onNodeDragLeave;x.stopPropagation(),f(x,Object(S.a)(_))},_.onDragEnd=function(x){var f=_.props.context.onNodeDragEnd;x.stopPropagation(),_.setState({dragNodeHighlight:!1}),f(x,Object(S.a)(_))},_.onDrop=function(x){var f=_.props.context.onNodeDrop;x.preventDefault(),x.stopPropagation(),_.setState({dragNodeHighlight:!1}),f(x,Object(S.a)(_))},_.onExpand=function(x){var f=_.props.context.onNodeExpand;f(x,Object(l.b)(_.props))},_.setSelectHandle=function(x){_.selectHandle=x},_.getNodeState=function(){var x=_.props.expanded;return _.isLeaf()?null:x?a:r},_.hasChildren=function(){var x=_.props.eventKey,f=_.props.context.keyEntities,E=f[x]||{},w=E.children;return!!(w||[]).length},_.isLeaf=function(){var x=_.props,f=x.isLeaf,E=x.loaded,w=_.props.context.loadData,T=_.hasChildren();return f===!1?!1:f||!w&&!T||w&&E&&!T},_.isDisabled=function(){var x=_.props.disabled,f=_.props.context.disabled;return!!(f||x)},_.isCheckable=function(){var x=_.props.checkable,f=_.props.context.checkable;return!f||x===!1?!1:f},_.syncLoadData=function(x){var f=x.expanded,E=x.loading,w=x.loaded,T=_.props.context,R=T.loadData,N=T.onNodeLoad;if(E)return;R&&f&&!_.isLeaf()&&(!_.hasChildren()&&!w&&N(Object(l.b)(_.props)))},_.renderSwitcher=function(){var x=_.props,f=x.expanded,E=x.switcherIcon,w=_.props.context,T=w.prefixCls,R=w.switcherIcon,N=E||R;if(_.isLeaf())return h.createElement("span",{className:c()("".concat(T,"-switcher"),"".concat(T,"-switcher-noop"))},typeof N=="function"?N(Object(B.a)(Object(B.a)({},_.props),{},{isLeaf:!0})):N);var j=c()("".concat(T,"-switcher"),"".concat(T,"-switcher_").concat(f?a:r));return h.createElement("span",{onClick:_.onExpand,className:j},typeof N=="function"?N(Object(B.a)(Object(B.a)({},_.props),{},{isLeaf:!1})):N)},_.renderCheckbox=function(){var x=_.props,f=x.checked,E=x.halfChecked,w=x.disableCheckbox,T=_.props.context.prefixCls,R=_.isDisabled(),N=_.isCheckable();if(!N)return null;var j=typeof N!="boolean"?N:null;return h.createElement("span",{className:c()("".concat(T,"-checkbox"),f&&"".concat(T,"-checkbox-checked"),!f&&E&&"".concat(T,"-checkbox-indeterminate"),(R||w)&&"".concat(T,"-checkbox-disabled")),onClick:_.onCheck},j)},_.renderIcon=function(){var x=_.props.loading,f=_.props.context.prefixCls;return h.createElement("span",{className:c()("".concat(f,"-iconEle"),"".concat(f,"-icon__").concat(_.getNodeState()||"docu"),x&&"".concat(f,"-icon_loading"))})},_.renderSelector=function(){var x=_.state.dragNodeHighlight,f=_.props,E=f.title,w=f.selected,T=f.icon,R=f.loading,N=f.data,j=_.props.context,W=j.prefixCls,J=j.showIcon,F=j.icon,k=j.draggable,K=j.loadData,Y=j.titleRender,H=_.isDisabled(),Q="".concat(W,"-node-content-wrapper"),re;if(J){var oe=T||F;re=oe?h.createElement("span",{className:c()("".concat(W,"-iconEle"),"".concat(W,"-icon__customize"))},typeof oe=="function"?oe(_.props):oe):_.renderIcon()}else K&&R&&(re=_.renderIcon());var me;typeof E=="function"?me=E(N):Y?me=Y(N):me=E;var he=h.createElement("span",{className:"".concat(W,"-title")},me);return h.createElement("span",{ref:_.setSelectHandle,title:typeof E=="string"?E:"",className:c()("".concat(Q),"".concat(Q,"-").concat(_.getNodeState()||"normal"),!H&&(w||x)&&"".concat(W,"-node-selected"),!H&&k&&"draggable"),draggable:!H&&k||void 0,"aria-grabbed":!H&&k||void 0,onMouseEnter:_.onMouseEnter,onMouseLeave:_.onMouseLeave,onContextMenu:_.onContextMenu,onClick:_.onSelectorClick,onDoubleClick:_.onSelectorDoubleClick,onDragStart:k?_.onDragStart:void 0},re,he)},_}return Object(D.a)(m,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var x=this.props.selectable,f=this.props.context.selectable;return typeof x=="boolean"?x:f}},{key:"render",value:function(){var x,f=this.props,E=f.eventKey,w=f.className,T=f.style,R=f.dragOver,N=f.dragOverGapTop,j=f.dragOverGapBottom,W=f.isLeaf,J=f.isStart,F=f.isEnd,k=f.expanded,K=f.selected,Y=f.checked,H=f.halfChecked,Q=f.loading,re=f.domRef,oe=f.active,me=f.onMouseMove,he=Object(ee.a)(f,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Ee=this.props.context,de=Ee.prefixCls,be=Ee.filterTreeNode,Ue=Ee.draggable,Re=Ee.keyEntities,De=this.isDisabled(),je=Object(n.f)(he),ve=Re[E]||{},ce=ve.level,ke=F[F.length-1];return h.createElement("div",Object.assign({ref:re,className:c()(w,"".concat(de,"-treenode"),(x={},Object(ae.a)(x,"".concat(de,"-treenode-disabled"),De),Object(ae.a)(x,"".concat(de,"-treenode-switcher-").concat(k?"open":"close"),!W),Object(ae.a)(x,"".concat(de,"-treenode-checkbox-checked"),Y),Object(ae.a)(x,"".concat(de,"-treenode-checkbox-indeterminate"),H),Object(ae.a)(x,"".concat(de,"-treenode-selected"),K),Object(ae.a)(x,"".concat(de,"-treenode-loading"),Q),Object(ae.a)(x,"".concat(de,"-treenode-active"),oe),Object(ae.a)(x,"".concat(de,"-treenode-leaf-last"),ke),Object(ae.a)(x,"drag-over",!De&&R),Object(ae.a)(x,"drag-over-gap-top",!De&&N),Object(ae.a)(x,"drag-over-gap-bottom",!De&&j),Object(ae.a)(x,"filter-node",be&&be(Object(l.b)(this.props))),x)),style:T,onDragEnter:Ue?this.onDragEnter:void 0,onDragOver:Ue?this.onDragOver:void 0,onDragLeave:Ue?this.onDragLeave:void 0,onDrop:Ue?this.onDrop:void 0,onDragEnd:Ue?this.onDragEnd:void 0,onMouseMove:me},je),h.createElement(i,{prefixCls:de,level:ce,isStart:J,isEnd:F}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),m}(h.Component),v=function(g){return h.createElement(s.a.Consumer,null,function(m){return h.createElement(d,Object.assign({},g,{context:m}))})};v.displayName="TreeNode",v.defaultProps={title:t},v.isTreeNode=1;var y=We.a=v},Wtmd:function(Ye,We,z){Ye.exports=z.p+"static/c.03ba6fd6.svg"},Wx9E:function(Ye,We,z){},XIdC:function(Ye,We,z){"use strict";var ae=z("rePB"),ee=z("ODXe"),B=z("Ff2n"),O=z("cDcd"),D=z.n(O),S=z("TSYQ"),A=z.n(S),C=z("6cGi"),h=z("4IlW"),p=O.forwardRef(function(c,s){var n,o=c.prefixCls,i=o===void 0?"rc-switch":o,l=c.className,a=c.checked,r=c.defaultChecked,t=c.disabled,d=c.loadingIcon,v=c.checkedChildren,y=c.unCheckedChildren,b=c.onClick,g=c.onChange,m=c.onKeyDown,_=Object(B.a)(c,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),x=Object(C.a)(!1,{value:a,defaultValue:r}),f=Object(ee.a)(x,2),E=f[0],w=f[1];function T(W,J){var F=E;return t||(F=W,w(F),g==null||g(F,J)),F}function R(W){W.which===h.a.LEFT?T(!1,W):W.which===h.a.RIGHT&&T(!0,W),m==null||m(W)}function N(W){var J=T(!E,W);b==null||b(J,W)}var j=A()(i,l,(n={},Object(ae.a)(n,"".concat(i,"-checked"),E),Object(ae.a)(n,"".concat(i,"-disabled"),t),n));return O.createElement("button",Object.assign({},_,{type:"button",role:"switch","aria-checked":E,disabled:t,className:j,ref:s,onKeyDown:R,onClick:N}),d,O.createElement("span",{className:"".concat(i,"-inner")},E?v:y))});p.displayName="Switch",We.a=p},Y1PL:function(Ye,We,z){"use strict";z.r(We),z.d(We,"ResizableTextArea",function(){return H});var ae=z("wx14"),ee=z("1OyB"),B=z("vuIU"),O=z("Ji7U"),D=z("LK+K"),S=z("cDcd"),A=z("VTBJ"),C=z("rePB"),h=z("Zm9Q"),p=z("Kwbf"),c=z("c+Xe"),s=z("m+aA"),n=z("bdgK"),o=new Map;function i(oe){oe.forEach(function(me){var he,Ee=me.target;(he=o.get(Ee))===null||he===void 0||he.forEach(function(de){return de(Ee)})})}var l=new n.default(i),a=null,r=null;function t(oe,me){o.has(oe)||(o.set(oe,new Set),l.observe(oe)),o.get(oe).add(me)}function d(oe,me){o.has(oe)&&(o.get(oe).delete(me),o.get(oe).size||(l.unobserve(oe),o.delete(oe)))}var v=function(oe){Object(O.a)(he,oe);var me=Object(D.a)(he);function he(){return Object(ee.a)(this,he),me.apply(this,arguments)}return Object(B.a)(he,[{key:"render",value:function(){return this.props.children}}]),he}(S.Component),y=S.createContext(null);function b(oe){var me=oe.children,he=oe.onBatchResize,Ee=S.useRef(0),de=S.useRef([]),be=S.useContext(y),Ue=S.useCallback(function(Re,De,je){Ee.current+=1;var ve=Ee.current;de.current.push({size:Re,element:De,data:je}),Promise.resolve().then(function(){ve===Ee.current&&(he==null||he(de.current),de.current=[])}),be==null||be(Re,De,je)},[he,be]);return S.createElement(y.Provider,{value:Ue},me)}function g(oe){var me=oe.children,he=oe.disabled,Ee=S.useRef(null),de=S.useRef(null),be=S.useContext(y),Ue=S.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Re=S.isValidElement(me)&&Object(c.c)(me),De=Re?me.ref:null,je=S.useMemo(function(){return Object(c.a)(De,Ee)},[De,Ee]),ve=S.useRef(oe);ve.current=oe;var ce=S.useCallback(function(ke){var Ne=ve.current,Je=Ne.onResize,te=Ne.data,P=ke.getBoundingClientRect(),U=P.width,q=P.height,X=ke.offsetWidth,$=ke.offsetHeight,ge=Math.floor(U),Ae=Math.floor(q);if(Ue.current.width!==ge||Ue.current.height!==Ae||Ue.current.offsetWidth!==X||Ue.current.offsetHeight!==$){var at={width:ge,height:Ae,offsetWidth:X,offsetHeight:$};Ue.current=at;var Le=X===Math.round(U)?U:X,Me=$===Math.round(q)?q:$,Xe=Object(A.a)(Object(A.a)({},at),{},{offsetWidth:Le,offsetHeight:Me});be==null||be(Xe,ke,te),Je&&Promise.resolve().then(function(){Je(Xe,ke)})}},[]);return S.useEffect(function(){var ke=Object(s.a)(Ee.current)||Object(s.a)(de.current);return ke&&!he&&t(ke,ce),function(){return d(ke,ce)}},[Ee.current,he]),S.createElement(v,{ref:de},Re?S.cloneElement(me,{ref:je}):me)}var m="rc-observer-key";function _(oe){var me=oe.children,he=Object(h.a)(me);return he.map(function(Ee,de){var be=(Ee==null?void 0:Ee.key)||"".concat(m,"-").concat(de);return S.createElement(g,Object(ae.a)({},oe,{key:be}),Ee)})}_.Collection=b;var x=_,f=z("bT9E"),E=z("TSYQ"),w=z.n(E),T=`
|
|
|
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
|
|
|
`,R=["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"],N={},j;function W(oe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,he=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(me&&N[he])return N[he];var Ee=window.getComputedStyle(oe),de=Ee.getPropertyValue("box-sizing")||Ee.getPropertyValue("-moz-box-sizing")||Ee.getPropertyValue("-webkit-box-sizing"),be=parseFloat(Ee.getPropertyValue("padding-bottom"))+parseFloat(Ee.getPropertyValue("padding-top")),Ue=parseFloat(Ee.getPropertyValue("border-bottom-width"))+parseFloat(Ee.getPropertyValue("border-top-width")),Re=R.map(function(je){return"".concat(je,":").concat(Ee.getPropertyValue(je))}).join(";"),De={sizingStyle:Re,paddingSize:be,borderSize:Ue,boxSizing:de};return me&&he&&(N[he]=De),De}function J(oe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,he=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ee=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;j||(j=document.createElement("textarea"),j.setAttribute("tab-index","-1"),j.setAttribute("aria-hidden","true"),document.body.appendChild(j)),oe.getAttribute("wrap")?j.setAttribute("wrap",oe.getAttribute("wrap")):j.removeAttribute("wrap");var de=W(oe,me),be=de.paddingSize,Ue=de.borderSize,Re=de.boxSizing,De=de.sizingStyle;j.setAttribute("style","".concat(De,";").concat(T)),j.value=oe.value||oe.placeholder||"";var je=Number.MIN_SAFE_INTEGER,ve=Number.MAX_SAFE_INTEGER,ce=j.scrollHeight,ke;if(Re==="border-box"?ce+=Ue:Re==="content-box"&&(ce-=be),he!==null||Ee!==null){j.value=" ";var Ne=j.scrollHeight-be;he!==null&&(je=Ne*he,Re==="border-box"&&(je=je+be+Ue),ce=Math.max(je,ce)),Ee!==null&&(ve=Ne*Ee,Re==="border-box"&&(ve=ve+be+Ue),ke=ce>ve?"":"hidden",ce=Math.min(ve,ce))}return{height:ce,minHeight:je,maxHeight:ve,overflowY:ke,resize:"none"}}var F=z("Gytx"),k=z.n(F),K;(function(oe){oe[oe.NONE=0]="NONE",oe[oe.RESIZING=1]="RESIZING",oe[oe.RESIZED=2]="RESIZED"})(K||(K={}));var Y=function(oe){Object(O.a)(he,oe);var me=Object(D.a)(he);function he(Ee){var de;return Object(ee.a)(this,he),de=me.call(this,Ee),de.nextFrameActionId=void 0,de.resizeFrameId=void 0,de.textArea=void 0,de.saveTextArea=function(be){de.textArea=be},de.handleResize=function(be){var Ue=de.state.resizeStatus,Re=de.props,De=Re.autoSize,je=Re.onResize;if(Ue!==K.NONE)return;typeof je=="function"&&je(be),De&&de.resizeOnNextFrame()},de.resizeOnNextFrame=function(){cancelAnimationFrame(de.nextFrameActionId),de.nextFrameActionId=requestAnimationFrame(de.resizeTextarea)},de.resizeTextarea=function(){var be=de.props.autoSize;if(!be||!de.textArea)return;var Ue=be.minRows,Re=be.maxRows,De=J(de.textArea,!1,Ue,Re);de.setState({textareaStyles:De,resizeStatus:K.RESIZING},function(){cancelAnimationFrame(de.resizeFrameId),de.resizeFrameId=requestAnimationFrame(function(){de.setState({resizeStatus:K.RESIZED},function(){de.resizeFrameId=requestAnimationFrame(function(){de.setState({resizeStatus:K.NONE}),de.fixFirefoxAutoScroll()})})})})},de.renderTextArea=function(){var be=de.props,Ue=be.prefixCls,Re=Ue===void 0?"rc-textarea":Ue,De=be.autoSize,je=be.onResize,ve=be.className,ce=be.disabled,ke=de.state,Ne=ke.textareaStyles,Je=ke.resizeStatus,te=Object(f.a)(de.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),P=w()(Re,ve,Object(C.a)({},"".concat(Re,"-disabled"),ce));"value"in te&&(te.value=te.value||"");var U=Object(A.a)(Object(A.a)(Object(A.a)({},de.props.style),Ne),Je===K.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return S.createElement(x,{onResize:de.handleResize,disabled:!(De||je)},S.createElement("textarea",Object(ae.a)({},te,{className:P,style:U,ref:de.saveTextArea})))},de.state={textareaStyles:{},resizeStatus:K.NONE},de}return Object(B.a)(he,[{key:"componentDidUpdate",value:function(de){(de.value!==this.props.value||!k()(de.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 de=this.textArea.selectionStart,be=this.textArea.selectionEnd;this.textArea.setSelectionRange(de,be)}}catch(Ue){}}},{key:"render",value:function(){return this.renderTextArea()}}]),he}(S.Component),H=Y,Q=function(oe){Object(O.a)(he,oe);var me=Object(D.a)(he);function he(Ee){var de;Object(ee.a)(this,he),de=me.call(this,Ee),de.resizableTextArea=void 0,de.focus=function(){de.resizableTextArea.textArea.focus()},de.saveTextArea=function(Ue){de.resizableTextArea=Ue},de.handleChange=function(Ue){var Re=de.props.onChange;de.setValue(Ue.target.value,function(){de.resizableTextArea.resizeTextarea()}),Re&&Re(Ue)},de.handleKeyDown=function(Ue){var Re=de.props,De=Re.onPressEnter,je=Re.onKeyDown;Ue.keyCode===13&&De&&De(Ue),je&&je(Ue)};var be=typeof Ee.value=="undefined"||Ee.value===null?Ee.defaultValue:Ee.value;return de.state={value:be},de}return Object(B.a)(he,[{key:"setValue",value:function(de,be){"value"in this.props||this.setState({value:de},be)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return S.createElement(H,Object(ae.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(de){return"value"in de?{value:de.value}:null}}]),he}(S.Component),re=We.default=Q},Z8dc:function(Ye,We,z){Ye.exports={flex_box_center:"flex_box_center___3U5jH",flex_space_between:"flex_space_between___10tgP",flex_box_vertical_center:"flex_box_vertical_center___1e5pu",flex_box_center_end:"flex_box_center_end___WDBuM",flex_box_column:"flex_box_column___3TSEG",listForm:"listForm___264Pu",scroll:"scroll___CK9uS",formWrap:"formWrap___2n6e2",btns:"btns___2wuct",main:"main___1WFqr",mainLoading:"mainLoading___1kJWi",tip:"tip___10JaH",proWarp:"proWarp___TMP84",pro:"pro___1CLLm",mainSucceed:"mainSucceed___3NYgf",del:"del___34rdE"}},ZD9Y:function(Ye,We,z){"use strict";var ae=z("BoS7"),ee=z("Sdc0"),B=z("OaEy"),O=z("2fM7"),D=z("cDcd"),S=z.n(D),A=z("lOMy"),C=z.n(A),h=O.a.Option;We.a=function(p){var c=p.onFontSizeChange,s=p.cmFontSize,n=p.cmCodeMode,o=p.onCodeModeChange,i=p.onTabToSpace,l=p.className,a=l===void 0?"":l,r=p.tabToSpace,t=p.children;return S.a.createElement("div",{className:"tpi-code-setting ".concat(a)},S.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),S.a.createElement("section",null,S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),S.a.createElement(O.a,{bordered:!1,size:"small",value:n,onChange:o},S.a.createElement(h,{value:"vs"},"\u767D\u8272\u80CC\u666F"),S.a.createElement(h,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),S.a.createElement(O.a,{bordered:!1,size:"small",value:s,onChange:c},S.a.createElement(h,{value:12},"12px"),S.a.createElement(h,{value:14},"14px"),S.a.createElement(h,{value:16},"16px"),S.a.createElement(h,{value:18},"18px"),S.a.createElement(h,{value:20},"20px"),S.a.createElement(h,{value:22},"22px"))),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"Tab\u8F6C\u6362"),S.a.createElement(ee.a,{checked:r,onChange:i}))),S.a.createElement("h3",null,"\u5FEB\u6377\u952E"),S.a.createElement("section",null,S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),S.a.createElement("span",null,"Ctrl + S")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),S.a.createElement("span",null,"F1 / Alt + F1")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),S.a.createElement("span",null,"Ctrl + ]/[")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),S.a.createElement("span",null,"Ctrl + Shift + \\")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),S.a.createElement("span",null,"Home")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),S.a.createElement("span",null,"End"))),t)}},ZW9T:function(Ye,We,z){"use strict";z.d(We,"a",function(){return J});var ae=z("k1fw"),ee=z("miYZ"),B=z("tsqr"),O=z("rAM+"),D=z("tJVT"),S=z("PpiC"),A=z("cDcd"),C=z.n(A),h=z("bdgK"),p=z("oBTY"),c=z("9og8"),s=z("WmNS"),n=z.n(s),o={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},i={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},l={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"#include",content:'include "$0"'},{label:"printf",content:"printf($0)"},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for( ; ; ){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"#include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"#include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"#include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"#include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"#include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},a={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
|
`)}]},r=z("5VLF"),t=z.n(r),d={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},v=function(k,K){return K.map(function(Y){return{label:Y,kind:k.languages.CompletionItemKind.Keyword,insertText:Y}})},y=function(k){return Object.keys(d.tables).map(function(K){return{label:K,kind:k.languages.CompletionItemKind.Variable,insertText:K}})},b=function(k,K){var Y=d.tables[k];return Y?Y.map(function(H){return{label:H,kind:K.languages.CompletionItemKind.Field,insertText:H}}):[]};function g(F,k,K,Y,H){var Q=k.getWordUntilPosition(K),re={startLineNumber:K.lineNumber,endLineNumber:K.lineNumber,startColumn:Q.startColumn,endColumn:Q.endColumn},oe=Y.map(function(me){return{label:me,kind:F.languages.CompletionItemKind.Keyword,insertText:me,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:re}});return H.map(function(me){oe.push(Object(ae.a)(Object(ae.a)({},me),{},{range:re}))}),oe}var m=function(F){d.languages.map(function(H){return F.languages.registerDocumentFormattingEditProvider(H,{provideDocumentFormattingEdits:function(re,oe,me){return Object(c.a)(n.a.mark(function he(){var Ee;return n.a.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return Ee=t()(re.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),be.abrupt("return",[{range:re.getFullModelRange(),text:Ee}]);case 2:case"end":return be.stop()}},he)}))()}}),H});var k=l.quickKey.map(function(H){return{label:H.label,kind:F.languages.CompletionItemKind.Method,insertText:H.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),K=a.quickKey.map(function(H){return{label:H.label,kind:F.languages.CompletionItemKind.Method,insertText:H.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Y=i.quickKey.map(function(H){return{label:H.label,kind:F.languages.CompletionItemKind.Method,insertText:H.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet}});F.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(p.a)(l.keywords),Object(p.a)(l.quickKey.map(function(H){return H.label}))),provideCompletionItems:function(Q,re){var oe=Q.getValueInRange({startLineNumber:re.lineNumber,startColumn:1,endLineNumber:re.lineNumber,endColumn:re.column}),me=oe.match(/cu/gim);console.log("match:",me,re,oe,Q);var he=[],Ee=re.lineNumber,de=re.column,be=Q.getValueInRange({startLineNumber:Ee,startColumn:0,endLineNumber:Ee,endColumn:de}),Ue=be.trim().split(/\s+/),Re=Ue[Ue.length-1];if(Re.endsWith(".")){var De=Re.slice(0,Re.length-1);Object.keys(d.tables).includes(De)&&(he=Object(p.a)(b(De,F)))}else Re==="."?he=[]:he=[].concat(Object(p.a)(y(F)),Object(p.a)(v(F,l.keywords)),Object(p.a)(k));return{suggestions:he}}}),F.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(p.a)(o.keywords)),provideCompletionItems:function(Q,re){var oe=Q.getValueInRange({startLineNumber:re.lineNumber,startColumn:1,endLineNumber:re.lineNumber,endColumn:re.column}),me=oe.match(/cu/gim);console.log("match:",me,re,oe,Q);var he=[],Ee=re.lineNumber,de=re.column,be=Q.getValueInRange({startLineNumber:Ee,startColumn:0,endLineNumber:Ee,endColumn:de}),Ue=be.trim().split(/\s+/),Re=Ue[Ue.length-1];if(Re.endsWith(".")){var De=Re.slice(0,Re.length-1);Object.keys(d.tables).includes(De)&&(he=Object(p.a)(b(De,F)))}else Re==="."?he=[]:he=[].concat(Object(p.a)(y(F)),Object(p.a)(v(F,o.keywords)));return{suggestions:he}}}),F.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(p.a)(i.keywords)),provideCompletionItems:function(Q,re){var oe=[],me=re.lineNumber,he=re.column,Ee=Q.getValueInRange({startLineNumber:me,startColumn:0,endLineNumber:me,endColumn:he}),de=Ee.trim().split(/\s+/),be=de[de.length-1];if(be.endsWith(".")){var Ue=be.slice(0,be.length-1);Object.keys(d.tables).includes(Ue)&&(oe=Object(p.a)(b(Ue,F)))}else be==="."?oe=[]:oe=[].concat(Object(p.a)(y(F)),Object(p.a)(v(F,i.keywords)),Object(p.a)(Y));return{suggestions:oe}}}),F.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(p.a)(a.keywords)),provideCompletionItems:function(Q,re){var oe=[],me=re.lineNumber,he=re.column,Ee=Q.getValueInRange({startLineNumber:me,startColumn:0,endLineNumber:me,endColumn:he}),de=Ee.trim().split(/\s+/),be=de[de.length-1];if(be.endsWith(".")){var Ue=be.slice(0,be.length-1);Object.keys(d.tables).includes(Ue)&&(oe=Object(p.a)(b(Ue,F)))}else be==="."?oe=[]:oe=[].concat(Object(p.a)(y(F)),Object(p.a)(v(F,a.keywords)),Object(p.a)(K));return{suggestions:oe}}})},_="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",x=z("LvDl"),f=z("+ua5");function E(F){return/^\d+$/.test(F)?"".concat(F,"px"):F}function w(){}var T=!1,R={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function N(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],k=F;if(Array.isArray(F)){for(var K=0;K<F.length;K++){var Y=R[F[K]];if(Y)return Y}return k[0]}return R[k]||k}var j=null,W=We.b=function(F){var k=F.width,K=k===void 0?"100%":k,Y=F.height,H=Y===void 0?"100%":Y,Q=F.value,re=F.language,oe=re===void 0?"javascript":re,me=F.style,he=me===void 0?{}:me,Ee=F.options,de=Ee===void 0?{}:Ee,be=F.overrideServices,Ue=be===void 0?{}:be,Re=F.theme,De=Re===void 0?"vs-dark":Re,je=F.onEditBlur,ve=F.onSave,ce=F.autoHeight,ke=ce===void 0?!1:ce,Ne=F.forbidCopy,Je=Ne===void 0?!1:Ne,te=F.onChange,P=te===void 0?w:te,U=F.editorDidMount,q=U===void 0?w:U,X=F.onFocus,$=X===void 0?w:X,ge=F.filename,Ae=ge===void 0?"educoder.txt":ge,at=F.errorLine,Le=F.errorContent,Me=Le===void 0?"":Le,Xe=Object(S.a)(F,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),et=Object(A.useRef)(),ze=Object(A.useRef)({}),Ke=Object(A.useRef)(),Pe=Object(A.useRef)(!1),Ie=Object(A.useRef)(),Ce=Object(A.useState)(!1),pe=Object(D.a)(Ce,2),_e=pe[0],Oe=pe[1];function we(){var Qe;return et.current&&(Qe=new h.default(function(lt){var xt=Object(O.a)(lt),Pt;try{for(xt.s();!(Pt=xt.n()).done;){var zt=Pt.value;(zt.target.offsetHeight>0||zt.target.offsetWidth>0)&&ze.current.instance.layout()}}catch(Se){xt.e(Se)}finally{xt.f()}}),Qe.observe(et.current)),Qe}function Be(){B.b.warn(decodeURIComponent(_))}var qe=function(){var lt=ze.current.instance;if(Q!=null&<&&_e){var xt=lt.getModel();xt&&Q!==xt.getValue()&&(T=!0,xt.setValue(Q),lt.layout(),T=!1)}};Object(A.useEffect)(function(){Ke.current&&clearTimeout(Ke.current),Ke.current=setTimeout(function(){qe()},500)},[Q,_e,ze.current]),Object(A.useEffect)(function(){if(at&&ze.current&&ze.current.instance){var Qe=ze.current.instance;Qe.changeViewZones(function(xt){var Pt=document.createElement("div");Pt.style.padding="10px 20px",Pt.style.width="calc(100% - 20px)",Pt.className="my-error-line-wrp",Pt.innerHTML=Me,xt.addZone({afterLineNumber:at||11,heightInLines:3,domNode:Pt})});var lt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Qe.addOverlayWidget(lt),Qe.revealPositionInCenter({lineNumber:20,column:1})}},[at,ze.current,_e]);function dt(){var Qe=ze.current.instance;if(Qe){var lt=Qe.getSelection(),xt=ze.current.pastePos||{},Pt=new j.Range(xt.startLineNumber||lt.endLineNumber,xt.startColumn||lt.endColumn,xt.endLineNumber||lt.endLineNumber,xt.endColumn||lt.endColumn);setTimeout(function(){Qe.executeEdits("",[{range:Pt,text:""}])},300)}}function Et(Qe){(window.navigator.platform.match("Mac")?Qe.metaKey:Qe.ctrlKey)&&Qe.keyCode==83&&(Qe.preventDefault(),ve())}var It=function(){if(ke&&ze.current.instance){var lt=ze.current.instance.getContentHeight();wt(lt<H?H:lt)}else wt(H)};function Rt(Qe){var lt=document.createEvent("MouseEvents");lt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Qe.dispatchEvent(lt)}function Ct(Qe,lt){var xt=window.URL||window.webkitURL||window,Pt=new Blob([lt]),zt=document.createElementNS("http://www.w3.org/1999/xhtml","a");zt.href=xt.createObjectURL(Pt),zt.download=Qe,Rt(zt)}Object(A.useEffect)(function(){It()},[It]),Object(A.useEffect)(function(){et.current&&!_e&&z.e(27).then(z.t.bind(null,"M/lh",7)).then(function(Qe){try{j=Qe,ze.current.instance=j.editor.create(et.current,{value:Q,language:N(oe),theme:De,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},Ue);var lt=ze.current.instance;if(q(lt,j),setTimeout(function(){It(),ze.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ct(Ae||"educoder.txt",lt.getValue())}})},500),ze.current.subscription=lt.onDidChangeModelContent(function(Pt){Pe.current?clearTimeout(Ie.current):(It(),P(lt.getValue(),Pt)),Ie.current=setTimeout(function(){Pe.current=!1},500)}),window.Monaco||m(j),Je&&(lt.addCommand(j.KeyMod.CtrlCmd|j.KeyMod.Shift|j.KeyCode.KEY_V,function(){return Be(),null}),lt.addCommand(j.KeyMod.CtrlCmd|j.KeyCode.KEY_C,function(){return Be(),null})),window.Monaco=j,je&<.onDidBlurEditorWidget(function(){je(lt.getValue())}),$&<.onDidFocusEditorText(function(){$(lt.getValue())}),Je){lt.addCommand(j.KeyMod.CtrlCmd|j.KeyCode.KEY_V,function(){return Be(),null}),lt.onDidPaste(function(Pt){ze.current.pastePos=Pt});try{window.addEventListener("paste",dt)}catch(Pt){}}var xt=we();return Oe(!0),function(){var Pt=ze.current.instance;Pt.dispose();var zt=Pt.getModel();zt&&zt.dispose(),ze.current.subscription&&ze.current.subscription.dispose(),Je&&window.removeEventListener("paste",dt),xt.unobserve(et.current)}}catch(Pt){}})},[]),Object(A.useEffect)(function(){var Qe=ze.current.instance;if(Qe&&_e)return document.addEventListener("keydown",Et,!1),function(){document.removeEventListener("keydown",Et)}},[ve,_e]),Object(A.useEffect)(function(){var Qe=ze.current.instance;if(Qe&&_e){var lt=N(oe);j.editor.setModelLanguage(Qe.getModel(),lt),console.log("language:",oe,Qe.getModel(),lt)}},[oe,_e]),Object(A.useEffect)(function(){var Qe=ze.current.instance;Qe&&_e&&j.editor.setTheme(De)},[De,_e]),Object(A.useEffect)(function(){var Qe=ze.current.instance;Qe&&_e&&(Qe.updateOptions(Object(ae.a)({},de)),setTimeout(function(){Qe.getModel().updateOptions(Object(ae.a)({},de))},200))},[JSON.stringify(de),_e]),Object(A.useEffect)(function(){var Qe=ze.current.instance;Qe&&_e&&Qe.layout()},[K,H,_e]);var st=Object(A.useState)(E(K)),ut=Object(D.a)(st,2),$e=ut[0],xe=ut[1],Fe=Object(A.useState)(E(H)),ct=Object(D.a)(Fe,2),tt=ct[0],wt=ct[1],St=Object(ae.a)(Object(ae.a)({},he),{},{width:$e,height:tt});return C.a.createElement("div",{className:"my-monaco-editor",ref:et,style:St})};function J(F){var k=F.width,K=k===void 0?"100%":k,Y=F.height,H=Y===void 0?"100%":Y,Q=F.original,re=F.modified,oe=F.language,me=F.options,he=me===void 0?{}:me,Ee=Object(A.useRef)(),de=Object(A.useState)(null),be=Object(D.a)(de,2),Ue=be[0],Re=be[1];function De(ke){var Ne;return Ee.current&&(Ne=new h.default(function(Je){var te=Object(O.a)(Je),P;try{for(te.s();!(P=te.n()).done;){var U=P.value;(U.target.offsetHeight>0||U.target.offsetWidth>0)&&ke.layout()}}catch(q){te.e(q)}finally{te.f()}}),Ne.observe(Ee.current)),Ne}Object(A.useEffect)(function(){Ee.current&&z.e(27).then(z.t.bind(null,"M/lh",7)).then(function(ke){j=ke;var Ne=j.editor.createDiffEditor(Ee.current,Object(ae.a)(Object(ae.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},he),{},{wordWrap:!0}));Re(Ne);var Je=De(Ne);return function(){Ne.dispose();var te=Ne.getModel();te&&te.dispose(),Je.unobserve(Ee.current)}})},[]),Object(A.useEffect)(function(){Ue&&Ue.setModel({original:j.editor.createModel(Q,oe),modified:j.editor.createModel(re,oe)})},[Q,re,oe,Ue]);var je=E(K),ve=E(H),ce={width:je,height:ve};return C.a.createElement("div",{className:"my-diff-editor",ref:Ee,style:ce})}},ZpRC:function(Ye,We,z){"use strict";function ae(c){return typeof c=="object"&&c!=null&&c.nodeType===1}function ee(c,s){return(!s||c!=="hidden")&&c!=="visible"&&c!=="clip"}function B(c,s){if(c.clientHeight<c.scrollHeight||c.clientWidth<c.scrollWidth){var n=getComputedStyle(c,null);return ee(n.overflowY,s)||ee(n.overflowX,s)||function(o){var i=function(l){if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch(a){return null}}(o);return!!i&&(i.clientHeight<o.scrollHeight||i.clientWidth<o.scrollWidth)}(c)}return!1}function O(c,s,n,o,i,l,a,r){return l<c&&a>s||l>c&&a<s?0:l<=c&&r<=n||a>=s&&r>=n?l-c-o:a>s&&r<n||l<c&&r>n?a-s+i:0}var D=function(c,s){var n=window,o=s.scrollMode,i=s.block,l=s.inline,a=s.boundary,r=s.skipOverflowHiddenElements,t=typeof a=="function"?a:function(Ne){return Ne!==a};if(!ae(c))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,v=[],y=c;ae(y)&&t(y);){if((y=y.parentElement)===d){v.push(y);break}y!=null&&y===document.body&&B(y)&&!B(document.documentElement)||y!=null&&B(y,r)&&v.push(y)}for(var b=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,_=window.scrollY||pageYOffset,x=c.getBoundingClientRect(),f=x.height,E=x.width,w=x.top,T=x.right,R=x.bottom,N=x.left,j=i==="start"||i==="nearest"?w:i==="end"?R:w+f/2,W=l==="center"?N+E/2:l==="end"?T:N,J=[],F=0;F<v.length;F++){var k=v[F],K=k.getBoundingClientRect(),Y=K.height,H=K.width,Q=K.top,re=K.right,oe=K.bottom,me=K.left;if(o==="if-needed"&&w>=0&&N>=0&&R<=g&&T<=b&&w>=Q&&R<=oe&&N>=me&&T<=re)return J;var he=getComputedStyle(k),Ee=parseInt(he.borderLeftWidth,10),de=parseInt(he.borderTopWidth,10),be=parseInt(he.borderRightWidth,10),Ue=parseInt(he.borderBottomWidth,10),Re=0,De=0,je="offsetWidth"in k?k.offsetWidth-k.clientWidth-Ee-be:0,ve="offsetHeight"in k?k.offsetHeight-k.clientHeight-de-Ue:0;if(d===k)Re=i==="start"?j:i==="end"?j-g:i==="nearest"?O(_,_+g,g,de,Ue,_+j,_+j+f,f):j-g/2,De=l==="start"?W:l==="center"?W-b/2:l==="end"?W-b:O(m,m+b,b,Ee,be,m+W,m+W+E,E),Re=Math.max(0,Re+_),De=Math.max(0,De+m);else{Re=i==="start"?j-Q-de:i==="end"?j-oe+Ue+ve:i==="nearest"?O(Q,oe,Y,de,Ue+ve,j,j+f,f):j-(Q+Y/2)+ve/2,De=l==="start"?W-me-Ee:l==="center"?W-(me+H/2)+je/2:l==="end"?W-re+be+je:O(me,re,H,Ee,be+je,W,W+E,E);var ce=k.scrollLeft,ke=k.scrollTop;j+=ke-(Re=Math.max(0,Math.min(ke+Re,k.scrollHeight-Y+ve))),W+=ce-(De=Math.max(0,Math.min(ce+De,k.scrollWidth-H+je)))}J.push({el:k,top:Re,left:De})}return J};function S(c){return c===Object(c)&&Object.keys(c).length!==0}function A(c,s){s===void 0&&(s="auto");var n="scrollBehavior"in document.body.style;c.forEach(function(o){var i=o.el,l=o.top,a=o.left;i.scroll&&n?i.scroll({top:l,left:a,behavior:s}):(i.scrollTop=l,i.scrollLeft=a)})}function C(c){return c===!1?{block:"end",inline:"nearest"}:S(c)?c:{block:"start",inline:"nearest"}}function h(c,s){var n=!c.ownerDocument.documentElement.contains(c);if(S(s)&&typeof s.behavior=="function")return s.behavior(n?[]:D(c,s));if(n)return;var o=C(s);return A(D(c,o),o.behavior)}var p=We.a=h},ZsLC:function(Ye,We,z){Ye.exports={"left-panel":"left-panel___FTwwW","tab-panel-body":"tab-panel-body___2YSOx",b1:"b1___3qx3o","oj-mr":"oj-mr___1GA9N","oj-width-input":"oj-width-input___3GkyP","s-navs":"s-navs___1fGGf","bg-white":"bg-white___1ZAy0",active:"active___39N6D"}},bCnd:function(Ye,We,z){"use strict";z.d(We,"b",function(){return O}),z.d(We,"a",function(){return D});var ae=z("je13"),ee=z.n(ae),B=!1;function O(S,A){var C=ee.a.get("__ec");C||(C={}),C[S]=A,ee.a.set("__ec",C)}function D(S,A){var C=ee.a.get("__ec");return C?C[S]===void 0?A:C[S]:A}},bT9E:function(Ye,We,z){"use strict";z.d(We,"a",function(){return ee});var ae=z("VTBJ");function ee(B,O){var D=Object(ae.a)({},B);return Array.isArray(O)&&O.forEach(function(S){delete D[S]}),D}},bdLU:function(Ye,We,z){"use strict";z.d(We,"a",function(){return ae});var ae;(function(ee){ee[ee.NOMATCH=-1]="NOMATCH",ee[ee.OK=0]="OK",ee[ee.TIMEOUT=2]="TIMEOUT",ee[ee.PODFAILURE=3]="PODFAILURE",ee[ee.COMPILEFAILURE=4]="COMPILEFAILURE",ee[ee.EXECUTEFAILURE=5]="EXECUTEFAILURE"})(ae||(ae={}))},biw7:function(Ye,We,z){"use strict";var ae=z("cDcd"),ee=z.n(ae),B=ae.createContext(null);We.a=B},c5Ni:function(Ye,We,z){},cDPC:function(Ye,We,z){"use strict";var ae=z("tJVT"),ee=z("cDcd"),B=z.n(ee),O=z("i3hx"),D=z.n(O);We.a=function(S){var A=S.defaultX,C=A===void 0?"40%":A,h=S.leftChild,p=S.rightChild,c=S.className,s=S.hideResize,n=s===void 0?!1:s,o=Object(ee.useState)(C),i=Object(ae.a)(o,2),l=i[0],a=i[1],r=Object(ee.useRef)();function t(){r.current=!0}Object(ee.useEffect)(function(){function y(g){r.current&&a(g.pageX)}function b(){r.current=!1}return window.addEventListener("mousemove",y),window.addEventListener("mouseup",b),function(){window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",b)}},[]);var d=typeof l=="number"&&l!==.01?"".concat(l,"px"):C,v="calc(100% - ".concat(n?"0px":"4px"," - ").concat(d,")");return B.a.createElement("div",{className:"split-panel-container ".concat(c)},B.a.createElement("section",{style:{width:d,display:l===.01?"none":""}},h),B.a.createElement("section",{className:"resize-x-bar",onMouseDown:t},B.a.createElement("a",{className:"btn-resize"},B.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},B.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),B.a.createElement("section",{style:{width:v}},p))}},dejd:function(Ye,We,z){},dmUQ:function(Ye,We,z){"use strict";var ae=z("Ff2n"),ee=z("rePB"),B=z("1OyB"),O=z("vuIU"),D=z("Ji7U"),S=z("md7G"),A=z("foSv"),C=z("cDcd"),h=z.n(C),p=z("TSYQ"),c=z.n(p),s=z("4IlW");function n(f,E){var w=Object.keys(f);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(f);E&&(T=T.filter(function(R){return Object.getOwnPropertyDescriptor(f,R).enumerable})),w.push.apply(w,T)}return w}function o(f){for(var E=1;E<arguments.length;E++){var w=arguments[E]!=null?arguments[E]:{};E%2?n(Object(w),!0).forEach(function(T){Object(ee.a)(f,T,w[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(w)):n(Object(w)).forEach(function(T){Object.defineProperty(f,T,Object.getOwnPropertyDescriptor(w,T))})}return f}function i(f){var E=l();return function(){var T=Object(A.a)(f),R;if(E){var N=Object(A.a)(this).constructor;R=Reflect.construct(T,arguments,N)}else R=T.apply(this,arguments);return Object(S.a)(this,R)}}function l(){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(f){return!1}}function a(){}function r(f){f.preventDefault()}var t=function(E){return E.replace(/[^\w.-]+/g,"")},d=200,v=600,y=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,b=function(E){return E!=null},g=function(E,w){return w===E||typeof w=="number"&&typeof E=="number"&&isNaN(w)&&isNaN(E)},m=function(f){Object(D.a)(w,f);var E=i(w);function w(T){var R;Object(B.a)(this,w),R=E.call(this,T),R.onKeyDown=function(W){var J=R.props,F=J.onKeyDown,k=J.onPressEnter;if(W.keyCode===s.a.UP){var K=R.getRatio(W);R.up(W,K,null),R.stop()}else if(W.keyCode===s.a.DOWN){var Y=R.getRatio(W);R.down(W,Y,null),R.stop()}else W.keyCode===s.a.ENTER&&k&&k(W);if(R.recordCursorPosition(),R.lastKeyCode=W.keyCode,F){for(var H=arguments.length,Q=new Array(H>1?H-1:0),re=1;re<H;re++)Q[re-1]=arguments[re];F.apply(void 0,[W].concat(Q))}},R.onKeyUp=function(W){var J=R.props.onKeyUp;if(R.stop(),R.recordCursorPosition(),J){for(var F=arguments.length,k=new Array(F>1?F-1:0),K=1;K<F;K++)k[K-1]=arguments[K];J.apply(void 0,[W].concat(k))}},R.onChange=function(W){var J=R.props.onChange;R.state.focused&&(R.inputting=!0),R.rawInput=R.props.parser(R.getValueFromEvent(W)),R.setState({inputValue:R.rawInput}),J(R.toNumber(R.rawInput))},R.onMouseUp=function(){var W=R.props.onMouseUp;R.recordCursorPosition(),W&&W.apply(void 0,arguments)},R.onFocus=function(){var W;R.setState({focused:!0}),(W=R.props).onFocus.apply(W,arguments)},R.onBlur=function(){var W=R.props.onBlur;R.inputting=!1,R.setState({focused:!1});var J=R.getCurrentValidValue(R.state.inputValue),F=R.setValue(J,a);if(W){var k=R.input.value,K=R.getInputDisplayValue({focus:!1,value:F});R.input.value=K&&Number(K),W.apply(void 0,arguments),R.input.value=k}},R.getRatio=function(W){var J=1;return W.metaKey||W.ctrlKey?J=.1:W.shiftKey&&(J=10),J},R.getFullNum=function(W){return isNaN(W)?W:/e/i.test(String(W))?Number(W).toFixed(18).replace(/\.?0+$/,""):W},R.getPrecision=function(W){if(b(R.props.precision))return R.props.precision;var J=String(W);if(J.indexOf("e-")>=0)return parseInt(J.slice(J.indexOf("e-")+2),10);var F=0;return J.indexOf(".")>=0&&(F=J.length-J.indexOf(".")-1),F},R.getInputDisplayValue=function(W){var J=W||R.state,F=J.focused,k=J.inputValue,K=J.value,Y;F?Y=k:Y=R.toPrecisionAsStep(K),Y==null&&(Y="");var H=R.formatWrapper(Y);return b(R.props.decimalSeparator)&&(H=H.toString().replace(".",R.props.decimalSeparator)),H},R.recordCursorPosition=function(){try{R.cursorStart=R.input.selectionStart,R.cursorEnd=R.input.selectionEnd,R.currentValue=R.input.value,R.cursorBefore=R.input.value.substring(0,R.cursorStart),R.cursorAfter=R.input.value.substring(R.cursorEnd)}catch(W){}},R.restoreByAfter=function(W){if(W===void 0)return!1;var J=R.input.value,F=J.lastIndexOf(W);if(F===-1)return!1;var k=R.cursorBefore.length;return R.lastKeyCode===s.a.DELETE&&R.cursorBefore.charAt(k-1)===W[0]?(R.fixCaret(k,k),!0):F+W.length===J.length?(R.fixCaret(F,F),!0):!1},R.partRestoreByAfter=function(W){return W===void 0?!1:Array.prototype.some.call(W,function(J,F){var k=W.substring(F);return R.restoreByAfter(k)})},R.isNotCompleteNumber=function(W){return isNaN(W)||W===""||W===null||W&&W.toString().indexOf(".")===W.toString().length-1},R.stop=function(){R.autoStepTimer&&clearTimeout(R.autoStepTimer)},R.down=function(W,J,F){R.pressingUpOrDown=!0,R.step("down",W,J,F)},R.up=function(W,J,F){R.pressingUpOrDown=!0,R.step("up",W,J,F)},R.saveInput=function(W){R.input=W};var N=T.value;N===void 0&&(N=T.defaultValue),R.state={focused:T.autoFocus};var j=R.getValidValue(R.toNumber(N));return R.state=o(o({},R.state),{},{inputValue:R.toPrecisionAsStep(j),value:j}),R}return Object(O.a)(w,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(R){var N=this.props,j=N.value,W=N.onChange,J=N.max,F=N.min,k=this.state.focused;if(R){if(!g(R.value,j)||!g(R.max,J)||!g(R.min,F)){var K=k?j:this.getValidValue(j),Y;this.pressingUpOrDown?Y=K:this.inputting?Y=this.rawInput:Y=this.toPrecisionAsStep(K),this.setState({value:K,inputValue:Y})}var H="value"in this.props?j:this.state.value;"max"in this.props&&R.max!==J&&typeof H=="number"&&H>J&&W&&W(J),"min"in this.props&&R.min!==F&&typeof H=="number"&&H<F&&W&&W(F)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Q=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===s.a.BACKSPACE?Q=this.cursorStart-1:this.lastKeyCode===s.a.DELETE&&(Q=this.cursorStart):Q=this.input.value.length,this.fixCaret(Q,Q)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case s.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case s.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(re){}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(R){var N=R;return N===""?N="":this.isNotCompleteNumber(parseFloat(N))?N=this.state.value:N=this.getValidValue(N),this.toNumber(N)}},{key:"getValueFromEvent",value:function(R){var N=R.target.value.trim().replace(/。/g,".");return b(this.props.decimalSeparator)&&(N=N.replace(this.props.decimalSeparator,".")),N}},{key:"getValidValue",value:function(R){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,W=parseFloat(R);return isNaN(W)?R:(W<N&&(W=N),W>j&&(W=j),W)}},{key:"setValue",value:function(R,N){var j=this.props.precision,W=this.isNotCompleteNumber(parseFloat(R))?null:parseFloat(R),J=this.state.value,F=J===void 0?null:J,k=this.state.inputValue,K=k===void 0?null:k,Y=typeof W=="number"?W.toFixed(j):"".concat(W),H=W!==F||Y!=="".concat(K);return"value"in this.props?(K=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:K},N)):this.setState({value:W,inputValue:this.toPrecisionAsStep(R)},N),H&&this.props.onChange(W),W}},{key:"getMaxPrecision",value:function(R){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,j=this.props,W=j.precision,J=j.step;if(b(W))return W;var F=this.getPrecision(N),k=this.getPrecision(J),K=this.getPrecision(R);return R?Math.max(K,F+k):F+k}},{key:"getPrecisionFactor",value:function(R){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,j=this.getMaxPrecision(R,N);return Math.pow(10,j)}},{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(R){return this.props.formatter?this.props.formatter(R):R}},{key:"toPrecisionAsStep",value:function(R){if(this.isNotCompleteNumber(R)||R==="")return R;var N=Math.abs(this.getMaxPrecision(R));return isNaN(N)?R.toString():Number(R).toFixed(N)}},{key:"toNumber",value:function(R){var N=this.props.precision,j=this.state.focused,W=R&&R.length>16&&j;return this.isNotCompleteNumber(R)||W?R:b(N)?Math.round(R*Math.pow(10,N))/Math.pow(10,N):Number(R)}},{key:"upStep",value:function(R,N){var j=this.props.step,W=this.getPrecisionFactor(R,N),J=Math.abs(this.getMaxPrecision(R,N)),F=((W*R+W*j*N)/W).toFixed(J);return this.toNumber(F)}},{key:"downStep",value:function(R,N){var j=this.props.step,W=this.getPrecisionFactor(R,N),J=Math.abs(this.getMaxPrecision(R,N)),F=((W*R-W*j*N)/W).toFixed(J);return this.toNumber(F)}},{key:"step",value:function(R,N){var j=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,J=arguments.length>3?arguments[3]:void 0;this.stop(),N&&(N.persist(),N.preventDefault());var F=this.props;if(F.disabled)return;var k=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(k))return;var K=this["".concat(R,"Step")](k,W),Y=K>F.max||K<F.min;if(K>F.max?K=F.max:K<F.min&&(K=F.min),this.setValue(K,null),this.setState({focused:!0},function(){j.pressingUpOrDown=!1}),Y)return;this.autoStepTimer=setTimeout(function(){j[R](N,W,!0)},J?d:v)}},{key:"fixCaret",value:function(R,N){if(R===void 0||N===void 0||!this.input||!this.input.value)return;try{var j=this.input.selectionStart,W=this.input.selectionEnd;(R!==j||N!==W)&&this.input.setSelectionRange(R,N)}catch(J){}}},{key:"render",value:function(){var R,N=this.props,j=N.prefixCls,W=N.disabled,J=N.readOnly,F=N.useTouch,k=N.autoComplete,K=N.upHandler,Y=N.downHandler,H=N.className,Q=N.max,re=N.min,oe=N.style,me=N.title,he=N.onMouseEnter,Ee=N.onMouseLeave,de=N.onMouseOver,be=N.onMouseOut,Ue=N.required,Re=N.onClick,De=N.tabIndex,je=N.type,ve=N.placeholder,ce=N.id,ke=N.inputMode,Ne=N.pattern,Je=N.step,te=N.maxLength,P=N.autoFocus,U=N.name,q=N.onPaste,X=N.onInput,$=Object(ae.a)(N,["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"]),ge=this.state,Ae=ge.value,at=ge.focused,Le=c()(j,(R={},Object(ee.a)(R,H,!!H),Object(ee.a)(R,"".concat(j,"-disabled"),W),Object(ee.a)(R,"".concat(j,"-focused"),at),R)),Me={};Object.keys($).forEach(function(we){(we.substr(0,5)==="data-"||we.substr(0,5)==="aria-"||we==="role")&&(Me[we]=$[we])});var Xe=!J&&!W,et=this.getInputDisplayValue(null),ze=(Ae||Ae===0)&&(isNaN(Ae)||Number(Ae)>=Q),Ke=(Ae||Ae===0)&&(isNaN(Ae)||Number(Ae)<=re),Pe=ze||W||J,Ie=Ke||W||J,Ce=c()("".concat(j,"-handler"),"".concat(j,"-handler-up"),Object(ee.a)({},"".concat(j,"-handler-up-disabled"),Pe)),pe=c()("".concat(j,"-handler"),"".concat(j,"-handler-down"),Object(ee.a)({},"".concat(j,"-handler-down-disabled"),Ie)),_e=F?{onTouchStart:Pe?a:this.up,onTouchEnd:this.stop}:{onMouseDown:Pe?a:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Oe=F?{onTouchStart:Ie?a:this.down,onTouchEnd:this.stop}:{onMouseDown:Ie?a:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:Le,style:oe,title:me,onMouseEnter:he,onMouseLeave:Ee,onMouseOver:de,onMouseOut:be,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(j,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},_e,{role:"button","aria-label":"Increase Value","aria-disabled":Pe,className:Ce}),K||h.a.createElement("span",{unselectable:"on",className:"".concat(j,"-handler-up-inner"),onClick:r})),h.a.createElement("span",Object.assign({unselectable:"on"},Oe,{role:"button","aria-label":"Decrease Value","aria-disabled":Ie,className:pe}),Y||h.a.createElement("span",{unselectable:"on",className:"".concat(j,"-handler-down-inner"),onClick:r}))),h.a.createElement("div",{className:"".concat(j,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":re,"aria-valuemax":Q,"aria-valuenow":Ae,required:Ue,type:je,placeholder:ve,onPaste:q,onClick:Re,onMouseUp:this.onMouseUp,className:"".concat(j,"-input"),tabIndex:De,autoComplete:k,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Xe?this.onKeyDown:a,onKeyUp:Xe?this.onKeyUp:a,autoFocus:P,maxLength:te,readOnly:J,disabled:W,max:Q,min:re,step:Je,name:U,title:me,id:ce,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(et),pattern:Ne,inputMode:ke,onInput:X},Me))))}}]),w}(h.a.Component);m.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:y,min:-y,step:1,style:{},onChange:a,onKeyDown:a,onPressEnter:a,onFocus:a,onBlur:a,parser:t,required:!1,autoComplete:"off"};var _=m,x=We.a=_},fcSX:function(Ye,We,z){"use strict";var ae=z("Ff2n"),ee=z("1OyB"),B=z("vuIU"),O=z("Ji7U"),D=z("md7G"),S=z("foSv"),A=z("1W/9"),C=z("cDcd"),h=z("rePB"),p=z("JX7q"),c=z("TSYQ"),s=z.n(c),n=z("qx4F"),o=z("4IlW");function i(W){return Array.isArray(W)?W:[W]}var l={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},a=Object.keys(l).filter(function(W){if(typeof document=="undefined")return!1;var J=document.getElementsByTagName("html")[0];return W in(J?J.style:{})})[0],r=l[a];function t(W,J,F,k){W.addEventListener?W.addEventListener(J,F,k):W.attachEvent&&W.attachEvent("on".concat(J),F)}function d(W,J,F,k){W.removeEventListener?W.removeEventListener(J,F,k):W.attachEvent&&W.detachEvent("on".concat(J),F)}function v(W,J){var F=typeof W=="function"?W(J):W;return Array.isArray(F)?F.length===2?F:[F[0],F[1]]:[F]}var y=function(J){return!isNaN(parseFloat(J))&&isFinite(J)},b=!(typeof window!="undefined"&&window.document&&window.document.createElement),g=function W(J,F,k,K){if(!F||F===document||F instanceof Document)return!1;if(F===J.parentNode)return!0;var Y=Math.max(Math.abs(k),Math.abs(K))===Math.abs(K),H=Math.max(Math.abs(k),Math.abs(K))===Math.abs(k),Q=F.scrollHeight-F.clientHeight,re=F.scrollWidth-F.clientWidth,oe=document.defaultView.getComputedStyle(F),me=oe.overflowY==="auto"||oe.overflowY==="scroll",he=oe.overflowX==="auto"||oe.overflowX==="scroll",Ee=Q&&me,de=re&&he;return Y&&(!Ee||Ee&&(F.scrollTop>=Q&&K<0||F.scrollTop<=0&&K>0))||H&&(!de||de&&(F.scrollLeft>=re&&k<0||F.scrollLeft<=0&&k>0))?W(J,F.parentNode,k,K):!1};function m(W){var J=_();return function(){var k=Object(S.a)(W),K;if(J){var Y=Object(S.a)(this).constructor;K=Reflect.construct(k,arguments,Y)}else K=k.apply(this,arguments);return Object(D.a)(this,K)}}function _(){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(W){return!1}}var x={},f=function(W){Object(O.a)(F,W);var J=m(F);function F(k){var K;return Object(ee.a)(this,F),K=J.call(this,k),K.domFocus=function(){K.dom&&K.dom.focus()},K.removeStartHandler=function(Y){if(Y.touches.length>1)return;K.startPos={x:Y.touches[0].clientX,y:Y.touches[0].clientY}},K.removeMoveHandler=function(Y){if(Y.changedTouches.length>1)return;var H=Y.currentTarget,Q=Y.changedTouches[0].clientX-K.startPos.x,re=Y.changedTouches[0].clientY-K.startPos.y;(H===K.maskDom||H===K.handlerDom||H===K.contentDom&&g(H,Y.target,Q,re))&&Y.cancelable&&Y.preventDefault()},K.transitionEnd=function(Y){var H=Y.target;d(H,r,K.transitionEnd),H.style.transition=""},K.onKeyDown=function(Y){if(Y.keyCode===o.a.ESC){var H=K.props.onClose;Y.stopPropagation(),H&&H(Y)}},K.onWrapperTransitionEnd=function(Y){var H=K.props,Q=H.open,re=H.afterVisibleChange;Y.target===K.contentWrapper&&Y.propertyName.match(/transform$/)&&(K.dom.style.transition="",!Q&&K.getCurrentDrawerSome()&&(document.body.style.overflowX="",K.maskDom&&(K.maskDom.style.left="",K.maskDom.style.width="")),re&&re(!!Q))},K.openLevelTransition=function(){var Y=K.props,H=Y.open,Q=Y.width,re=Y.height,oe=K.getHorizontalBoolAndPlacementName(),me=oe.isHorizontal,he=oe.placementName,Ee=K.contentDom?K.contentDom.getBoundingClientRect()[me?"width":"height"]:0,de=(me?Q:re)||Ee;K.setLevelAndScrolling(H,he,de)},K.setLevelTransform=function(Y,H,Q,re){var oe=K.props,me=oe.placement,he=oe.levelMove,Ee=oe.duration,de=oe.ease,be=oe.showMask;K.levelDom.forEach(function(Ue){Ue.style.transition="transform ".concat(Ee," ").concat(de),t(Ue,r,K.transitionEnd);var Re=Y?Q:0;if(he){var De=v(he,{target:Ue,open:Y});Re=Y?De[0]:De[1]||0}var je=typeof Re=="number"?"".concat(Re,"px"):Re,ve=me==="left"||me==="top"?je:"-".concat(je);ve=be&&me==="right"&&re?"calc(".concat(ve," + ").concat(re,"px)"):ve,Ue.style.transform=Re?"".concat(H,"(").concat(ve,")"):""})},K.setLevelAndScrolling=function(Y,H,Q){var re=K.props.onChange;if(!b){var oe=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(n.a)(!0):0;K.setLevelTransform(Y,H,Q,oe),K.toggleScrollingToDrawerAndBody(oe)}re&&re(Y)},K.toggleScrollingToDrawerAndBody=function(Y){var H=K.props,Q=H.getOpenCount,re=H.getContainer,oe=H.showMask,me=H.open,he=re&&re(),Ee=Q&&Q();if(he&&he.parentNode===document.body&&oe){var de=["touchstart"],be=[document.body,K.maskDom,K.handlerDom,K.contentDom];me&&document.body.style.overflow!=="hidden"?(Y&&K.addScrollingEffect(Y),Ee===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",be.forEach(function(Ue,Re){if(!Ue)return;t(Ue,de[Re]||"touchmove",Re?K.removeMoveHandler:K.removeStartHandler,K.passive)})):K.getCurrentDrawerSome()&&(Ee||(document.body.style.overflow=""),document.body.style.touchAction="",Y&&K.remScrollingEffect(Y),be.forEach(function(Ue,Re){if(!Ue)return;d(Ue,de[Re]||"touchmove",Re?K.removeMoveHandler:K.removeStartHandler,K.passive)}))}},K.addScrollingEffect=function(Y){var H=K.props,Q=H.placement,re=H.duration,oe=H.ease,me=H.getOpenCount,he=H.switchScrollingEffect,Ee=me&&me();Ee===1&&he();var de="width ".concat(re," ").concat(oe),be="transform ".concat(re," ").concat(oe);K.dom.style.transition="none";switch(Q){case"right":K.dom.style.transform="translateX(-".concat(Y,"px)");break;case"top":case"bottom":K.dom.style.width="calc(100% - ".concat(Y,"px)"),K.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(K.timeout),K.timeout=setTimeout(function(){K.dom&&(K.dom.style.transition="".concat(be,",").concat(de),K.dom.style.width="",K.dom.style.transform="")})},K.remScrollingEffect=function(Y){var H=K.props,Q=H.placement,re=H.duration,oe=H.ease,me=H.getOpenCount,he=H.switchScrollingEffect,Ee=me&&me();Ee||he(!0),a&&(document.body.style.overflowX="hidden"),K.dom.style.transition="none";var de,be="width ".concat(re," ").concat(oe),Ue="transform ".concat(re," ").concat(oe);switch(Q){case"left":{K.dom.style.width="100%",be="width 0s ".concat(oe," ").concat(re);break}case"right":{K.dom.style.transform="translateX(".concat(Y,"px)"),K.dom.style.width="100%",be="width 0s ".concat(oe," ").concat(re),K.maskDom&&(K.maskDom.style.left="-".concat(Y,"px"),K.maskDom.style.width="calc(100% + ".concat(Y,"px)"));break}case"top":case"bottom":{K.dom.style.width="calc(100% + ".concat(Y,"px)"),K.dom.style.height="100%",K.dom.style.transform="translateZ(0)",de="height 0s ".concat(oe," ").concat(re);break}default:break}clearTimeout(K.timeout),K.timeout=setTimeout(function(){K.dom&&(K.dom.style.transition="".concat(Ue,",").concat(de?"".concat(de,","):"").concat(be),K.dom.style.transform="",K.dom.style.width="",K.dom.style.height="")})},K.getCurrentDrawerSome=function(){return!Object.keys(x).some(function(Y){return x[Y]})},K.getLevelDom=function(Y){var H=Y.level,Q=Y.getContainer;if(b)return;var re=Q&&Q(),oe=re?re.parentNode:null;if(K.levelDom=[],H==="all"){var me=oe?Array.prototype.slice.call(oe.children):[];me.forEach(function(he){he.nodeName!=="SCRIPT"&&he.nodeName!=="STYLE"&&he.nodeName!=="LINK"&&he!==re&&K.levelDom.push(he)})}else H&&i(H).forEach(function(he){document.querySelectorAll(he).forEach(function(Ee){K.levelDom.push(Ee)})})},K.getHorizontalBoolAndPlacementName=function(){var Y=K.props.placement,H=Y==="left"||Y==="right",Q="translate".concat(H?"X":"Y");return{isHorizontal:H,placementName:Q}},K.state={_self:Object(p.a)(K)},K}return Object(B.a)(F,[{key:"componentDidMount",value:function(){var K=this;if(!b){var Y=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Y=!0,null}}))}catch(me){}this.passive=Y?{passive:!1}:!1}var H=this.props,Q=H.open,re=H.getContainer,oe=re&&re();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),Q&&(oe&&oe.parentNode===document.body&&(x[this.drawerId]=Q),this.openLevelTransition(),this.forceUpdate(function(){K.domFocus()}))}},{key:"componentDidUpdate",value:function(K){var Y=this.props,H=Y.open,Q=Y.getContainer,re=Q&&Q();H!==K.open&&(H&&this.domFocus(),re&&re.parentNode===document.body&&(x[this.drawerId]=!!H),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var K=this.props,Y=K.getOpenCount,H=K.open,Q=K.switchScrollingEffect,re=typeof Y=="function"&&Y();delete x[this.drawerId],H&&(this.setLevelTransform(!1),document.body.style.touchAction=""),re||(document.body.style.overflow="",Q(!0))}},{key:"render",value:function(){var K,Y=this,H=this.props,Q=H.className,re=H.children,oe=H.style,me=H.width,he=H.height,Ee=H.defaultOpen,de=H.open,be=H.prefixCls,Ue=H.placement,Re=H.level,De=H.levelMove,je=H.ease,ve=H.duration,ce=H.getContainer,ke=H.handler,Ne=H.onChange,Je=H.afterVisibleChange,te=H.showMask,P=H.maskClosable,U=H.maskStyle,q=H.onClose,X=H.onHandleClick,$=H.keyboard,ge=H.getOpenCount,Ae=H.switchScrollingEffect,at=Object(ae.a)(H,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Le=this.dom?de:!1,Me=s()(be,(K={},Object(h.a)(K,"".concat(be,"-").concat(Ue),!0),Object(h.a)(K,"".concat(be,"-open"),Le),Object(h.a)(K,Q||"",!!Q),Object(h.a)(K,"no-mask",!te),K)),Xe=this.getHorizontalBoolAndPlacementName(),et=Xe.placementName,ze=Ue==="left"||Ue==="top"?"-100%":"100%",Ke=Le?"":"".concat(et,"(").concat(ze,")"),Pe=ke&&C.cloneElement(ke,{onClick:function(Ce){ke.props.onClick&&ke.props.onClick(),X&&X(Ce)},ref:function(Ce){Y.handlerDom=Ce}});return C.createElement("div",Object.assign({},at,{tabIndex:-1,className:Me,style:oe,ref:function(Ce){Y.dom=Ce},onKeyDown:Le&&$?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),te&&C.createElement("div",{className:"".concat(be,"-mask"),onClick:P?q:void 0,style:U,ref:function(Ce){Y.maskDom=Ce}}),C.createElement("div",{className:"".concat(be,"-content-wrapper"),style:{transform:Ke,msTransform:Ke,width:y(me)?"".concat(me,"px"):me,height:y(he)?"".concat(he,"px"):he},ref:function(Ce){Y.contentWrapper=Ce}},C.createElement("div",{className:"".concat(be,"-content"),ref:function(Ce){Y.contentDom=Ce},onTouchStart:Le&&te?this.removeStartHandler:void 0,onTouchMove:Le&&te?this.removeMoveHandler:void 0},re),Pe))}}],[{key:"getDerivedStateFromProps",value:function(K,Y){var H=Y.prevProps,Q=Y._self,re={prevProps:K};if(H!==void 0){var oe=K.placement,me=K.level;oe!==H.placement&&(Q.contentDom=null),me!==H.level&&Q.getLevelDom(K)}return re}}]),F}(C.Component);f.defaultProps={switchScrollingEffect:function(){}};var E=f;function w(W){var J=T();return function(){var k=Object(S.a)(W),K;if(J){var Y=Object(S.a)(this).constructor;K=Reflect.construct(k,arguments,Y)}else K=k.apply(this,arguments);return Object(D.a)(this,K)}}function T(){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(W){return!1}}var R=function(W){Object(O.a)(F,W);var J=w(F);function F(k){var K;Object(ee.a)(this,F),K=J.call(this,k),K.onHandleClick=function(H){var Q=K.props,re=Q.onHandleClick,oe=Q.open;if(re&&re(H),typeof oe=="undefined"){var me=K.state.open;K.setState({open:!me})}},K.onClose=function(H){var Q=K.props,re=Q.onClose,oe=Q.open;re&&re(H),typeof oe=="undefined"&&K.setState({open:!1})};var Y=typeof k.open!="undefined"?k.open:!!k.defaultOpen;return K.state={open:Y},"onMaskClick"in k&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),K}return Object(B.a)(F,[{key:"render",value:function(){var K=this,Y=this.props,H=Y.defaultOpen,Q=Y.getContainer,re=Y.wrapperClassName,oe=Y.forceRender,me=Y.handler,he=Object(ae.a)(Y,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Ee=this.state.open;if(!Q)return C.createElement("div",{className:re,ref:function(Ue){K.dom=Ue}},C.createElement(E,Object.assign({},he,{open:Ee,handler:me,getContainer:function(){return K.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var de=!!me||oe;return C.createElement(A.a,{visible:Ee,forceRender:de,getContainer:Q,wrapperClassName:re},function(be){var Ue=be.visible,Re=be.afterClose,De=Object(ae.a)(be,["visible","afterClose"]);return C.createElement(E,Object.assign({},he,De,{open:Ue!==void 0?Ue:Ee,afterVisibleChange:Re!==void 0?Re:he.afterVisibleChange,handler:me,onClose:K.onClose,onHandleClick:K.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(K,Y){var H=Y.prevProps,Q={prevProps:K};return typeof H!="undefined"&&K.open!==H.open&&(Q.open=K.open),Q}}]),F}(C.Component);R.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:C.createElement("div",{className:"drawer-handle"},C.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var N=R,j=We.a=N},fcyK:function(Ye,We,z){},fyJ8:function(Ye,We,z){"use strict";var ae=z("rePB"),ee=z("VTBJ"),B=z("Ff2n"),O=z("U8pU"),D=z("cDcd"),S=z.n(D),A=z("TSYQ"),C=z.n(A),h=z("c+Xe"),p=z("sR1s");function c(l){return l&&Object(O.a)(l)==="object"&&!Array.isArray(l)&&!D.isValidElement(l)}function s(l){return typeof l=="string"?!0:Object(h.c)(l)}function n(l,a){var r,t=l.prefixCls,d=l.className,v=l.record,y=l.index,b=l.dataIndex,g=l.render,m=l.children,_=l.component,x=_===void 0?"td":_,f=l.colSpan,E=l.rowSpan,w=l.fixLeft,T=l.fixRight,R=l.firstFixLeft,N=l.lastFixLeft,j=l.firstFixRight,W=l.lastFixRight,J=l.appendNode,F=l.additionalProps,k=F===void 0?{}:F,K=l.ellipsis,Y=l.align,H=l.rowType,Q=l.isSticky,re="".concat(t,"-cell"),oe,me;if(m)me=m;else{var he=Object(p.b)(v,b);if(me=he,g){var Ee=g(he,v,y);c(Ee)?(me=Ee.children,oe=Ee.props):me=Ee}}Object(O.a)(me)==="object"&&!Array.isArray(me)&&!D.isValidElement(me)&&(me=null),K&&(N||j)&&(me=D.createElement("span",{className:"".concat(re,"-content")},me));var de=oe||{},be=de.colSpan,Ue=de.rowSpan,Re=de.style,De=de.className,je=Object(B.a)(de,["colSpan","rowSpan","style","className"]),ve=be!==void 0?be:f,ce=Ue!==void 0?Ue:E;if(ve===0||ce===0)return null;var ke={},Ne=typeof w=="number",Je=typeof T=="number";Ne&&(ke.position="sticky",ke.left=w),Je&&(ke.position="sticky",ke.right=T);var te={};Y&&(te.textAlign=Y);var P,U=K===!0?{showTitle:!0}:K;U&&(U.showTitle||H==="header")&&(typeof me=="string"||typeof me=="number"?P=me.toString():D.isValidElement(me)&&typeof me.props.children=="string"&&(P=me.props.children));var q=Object(ee.a)(Object(ee.a)(Object(ee.a)({title:P},je),k),{},{colSpan:ve&&ve!==1?ve:null,rowSpan:ce&&ce!==1?ce:null,className:C()(re,d,(r={},Object(ae.a)(r,"".concat(re,"-fix-left"),Ne),Object(ae.a)(r,"".concat(re,"-fix-left-first"),R),Object(ae.a)(r,"".concat(re,"-fix-left-last"),N),Object(ae.a)(r,"".concat(re,"-fix-right"),Je),Object(ae.a)(r,"".concat(re,"-fix-right-first"),j),Object(ae.a)(r,"".concat(re,"-fix-right-last"),W),Object(ae.a)(r,"".concat(re,"-ellipsis"),K),Object(ae.a)(r,"".concat(re,"-with-append"),J),Object(ae.a)(r,"".concat(re,"-fix-sticky"),(Ne||Je)&&Q),r),k.className,De),style:Object(ee.a)(Object(ee.a)(Object(ee.a)(Object(ee.a)({},k.style),te),ke),Re),ref:s(x)?a:null});return D.createElement(x,Object.assign({},q),J,me)}var o=D.forwardRef(n);o.displayName="Cell";var i=D.memo(o,function(l,a){return a.shouldCellUpdate?!a.shouldCellUpdate(a.record,l.record):!1});We.a=i},gRFJ:function(Ye,We,z){Ye.exports=[z("rdUC"),z("ynwM"),z("RELg"),z("DlR+"),z("CrYA"),z("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(Ye){return Ye<10?"0"+Ye:Ye}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(Ye){return rx_escapable.lastIndex=0,rx_escapable.test(Ye)?'"'+Ye.replace(rx_escapable,function(We){var z=meta[We];return typeof z=="string"?z:"\\u"+("0000"+We.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Ye+'"'}function str(Ye,We){var z,ae,ee,B,O=gap,D,S=We[Ye];S&&typeof S=="object"&&typeof S.toJSON=="function"&&(S=S.toJSON(Ye)),typeof rep=="function"&&(S=rep.call(We,Ye,S));switch(typeof S){case"string":return quote(S);case"number":return isFinite(S)?String(S):"null";case"boolean":case"null":return String(S);case"object":if(!S)return"null";if(gap+=indent,D=[],Object.prototype.toString.apply(S)==="[object Array]"){for(B=S.length,z=0;z<B;z+=1)D[z]=str(z,S)||"null";return ee=D.length===0?"[]":gap?`[
|
|
|
`+gap+D.join(`,
|
|
|
`+gap)+`
|
|
|
`+O+"]":"["+D.join(",")+"]",gap=O,ee}if(rep&&typeof rep=="object")for(B=rep.length,z=0;z<B;z+=1)typeof rep[z]=="string"&&(ae=rep[z],ee=str(ae,S),ee&&D.push(quote(ae)+(gap?": ":":")+ee));else for(ae in S)Object.prototype.hasOwnProperty.call(S,ae)&&(ee=str(ae,S),ee&&D.push(quote(ae)+(gap?": ":":")+ee));return ee=D.length===0?"{}":gap?`{
|
|
|
`+gap+D.join(`,
|
|
|
`+gap)+`
|
|
|
`+O+"}":"{"+D.join(",")+"}",gap=O,ee}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(Ye,We,z){var ae;if(gap="",indent="",typeof z=="number")for(ae=0;ae<z;ae+=1)indent+=" ";else typeof z=="string"&&(indent=z);if(rep=We,We&&typeof We!="function"&&(typeof We!="object"||typeof We.length!="number"))throw new Error("JSON.stringify");return str("",{"":Ye})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(Ye,We){var z,ae,ee=Ye[We];if(ee&&typeof ee=="object")for(z in ee)Object.prototype.hasOwnProperty.call(ee,z)&&(ae=walk(ee,z),ae!==void 0?ee[z]=ae:delete ee[z]);return reviver.call(Ye,We,ee)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(Ye){return"\\u"+("0000"+Ye.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},gqXR:function(Ye,We,z){Ye.exports=z.p+"static/g.a5bcde87.svg"},hW8S:function(Ye,We,z){"use strict";z.d(We,"a",function(){return O}),z.d(We,"c",function(){return D}),z.d(We,"b",function(){return S});var ae=z("VTBJ"),ee=z("Ff2n"),B=z("Kwbf"),O="RC_TABLE_INTERNAL_COL_DEFINE";function D(A){var C=A.expandable,h=Object(ee.a)(A,["expandable"]);return"expandable"in A?Object(ae.a)(Object(ae.a)({},h),C):h}function S(A){return Object.keys(A).reduce(function(C,h){return(h.substr(0,5)==="data-"||h.substr(0,5)==="aria-")&&(C[h]=A[h]),C},{})}},hgre:function(Ye,We,z){"use strict";var ae=z("miYZ"),ee=z("tsqr"),B=z("9og8"),O=z("WmNS"),D=z.n(O),S=z("cDcd"),A=z.n(S),C=z("GUcZ"),h=z("ulZh"),p=z.n(h),c=z("xKgJ"),s=z("P5Jw"),n=z.n(s),o=z("bntm"),i=z("4xil"),l=z.n(i);function a(v){if(isNaN(v))return{minutes:"00",seconds:"00"};var y=new Date(v*1e3).toISOString().substr(11,8);return{hour:y.substr(0,2),minutes:y.substr(3,2),seconds:y.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function r(v,y){return v-y}function t(v){v.sort(r);for(var y=0,b=0;b<v.length-1;b++){var g=Math.abs(v[b+1]-v[b]);g<21&&(y+=g)}return y}var d=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;We.a=Object(S.forwardRef)(function(v,y){var b,g=v.src,m=v.toLog,_=v.videoId,x=v.logWatchHistory,f=v.courseId,E=f===void 0?null:f,w=v.startTime,T=v.handlePause,R=T===void 0?function(){}:T,N=v.handlePlay,j=N===void 0?function(){}:N,W=v.handlePlayEnded,J=W===void 0?function(){}:W,F=v.videoSpeed,k=F===void 0?1:F,K=g==null||((b=g.split("."))===null||b===void 0)?void 0:b.pop(),Y=K==="flv",H=Object(S.useRef)(),Q=Object(S.useRef)(),re=Object(S.useRef)(),oe=Object(S.useRef)(),me=Object(S.useRef)(),he=Object(S.useRef)(),Ee=Object(S.useRef)(),de=Object(S.useRef)(),be=Object(S.useRef)(),Ue=Object(S.useRef)(),Re=Object(S.useRef)(),De=Object(S.useRef)(),je=Object(S.useRef)(),ve=Object(S.useRef)(),ce=navigator.userAgent.toLowerCase().match(d),ke=ce?ce[0]:"pc",Ne=Object(S.useRef)(!1),Je=Object(c.x)(),te=0,P=0,U=0,q=null,X=!1,$=20,ge=1,Ae=!1,at=!1,Le=[];Object(S.useImperativeHandle)(y,function(){return{getLastUpdatedTime:function(){return H.current.currentTime},getDuration:function(){return H.current.duration}}});var Me=Object(S.useCallback)(function(Pe){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce={point:H.current.currentTime};q?(Ce.log_id=q,Ce.watch_duration=t(Le),Ce.total_duration=P):(E?(Ce.video_id=parseInt(_,10),Ce.course_id=E):Ce.video_id=_,Ce.duration=te,Ce.device=ke),Ie&&(Ce.ed="1");function pe(){return _e.apply(this,arguments)}function _e(){return _e=Object(B.a)(D.a.mark(function Oe(){var we;return D.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return Ae=!0,qe.next=3,x(Ce);case 3:we=qe.sent,q=we,Ae=!1,Pe&&Pe();case 7:case"end":return qe.stop()}},Oe)})),_e.apply(this,arguments)}pe()},[_,E]);Object(S.useEffect)(function(){ee.b.destroy();var Pe=null;return C.a.isSupported&&Y&&g&&(g==null?void 0:g.indexOf(".m3u8"))<0?(Pe=C.a.createPlayer({type:"flv",volume:.8,cors:!0,url:g,muted:!1}),H.current&&(Pe.attachMediaElement(H.current),Pe.load())):H.current.setAttribute("src",g),et(),function(){Pe&&(Pe.unload(),Pe.pause(),Pe.destroy(),Pe=null)}},[H,Y,g]);function Xe(){H.current.paused?(oe.current.style.display="none",me.current.style.display="block"):(oe.current.style.display="block",me.current.style.display="none")}function et(){Re.current.style.display="none",je.current.style.display="none",De.current.style.display="none",H.current.muted||H.current.volume===0?Re.current.style.display="block":H.current.volume>0&&H.current.volume<=.5?je.current.style.display="block":De.current.style.display="block"}Object(S.useEffect)(function(){var Pe=document.getElementById("play"),Ie=document.querySelectorAll(".playback-icons use");function Ce(){j(),w&&!Ne.current&&(H.current.currentTime=w),Ne.current=!0,Le.push(H.current.currentTime),X||(X=!0,m&&Me())}function pe(){return _e.apply(this,arguments)}function _e(){return _e=Object(B.a)(D.a.mark(function $e(){return D.a.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:Xe(),Le.push(H.current.currentTime),m&&Me(function(){q=null,U=0,X=!1,Ae=!1,at=!1,Le=[],P=0,ge=1},!0);case 3:case"end":return Fe.stop()}},$e)})),_e.apply(this,arguments)}function Oe(){he.current.value=Math.round(H.current.currentTime),Ee.current.value=Math.round(H.current.currentTime)}function we(){var $e=a(Math.round(H.current.currentTime));be.current.innerText="".concat($e.hour>0?$e.hour+":":"").concat($e.minutes,":").concat($e.seconds),be.current.setAttribute("datetime","".concat($e.hour>0?" "+$e.hour+" ":"").concat($e.minutes,"m ").concat($e.seconds,"s"))}function Be(){var $e=Math.round(H.current.duration);he.current.setAttribute("max",$e),Ee.current.setAttribute("max",$e);var xe=a($e);de.current.innerText="".concat(xe.hour>0?xe.hour+":":"").concat(xe.minutes,":").concat(xe.seconds),de.current.setAttribute("datetime","".concat(xe.hour>0?" "+xe.hour+" ":"").concat(xe.minutes,"m ").concat(xe.seconds,"s"))}function qe(){var $e=Math.round(H.current.duration);he.current.setAttribute("max",$e),Ee.current.setAttribute("max",$e);var xe=a($e);de.current.innerText="".concat(xe.hour>0?xe.hour+":":"").concat(xe.minutes,":").concat(xe.seconds),de.current.setAttribute("datetime","".concat(xe.hour>0?" "+xe.hour+" ":"").concat(xe.minutes,"m ").concat(xe.seconds,"s")),Oe(),we();var Fe=Q.current.getBoundingClientRect(),ct=Fe.width,tt=Fe.height,wt=Fe.x,St=Fe.y;if(wt<0||St<0||!ct)return;if(!at){var Qe=H.current.currentTime,lt=Qe-U;Math.abs(lt)<10?(P+=Math.abs(lt),U=Qe,Ae||P-ge*$>=0&&(ge++,Le.push(U),m&&Me())):(U=Qe,m&&Me())}}function dt(){at=!0}function Et(){H.current.playing&&Le.push(H.current.currentTime,U),U=H.current.currentTime,at=!1}function It(){te=H.current.duration,te<=20&&($=te/3),H.current.addEventListener("play",Ce)}function Rt($e){$e.preventDefault(),Object(o.a)()?(H.current.style.width="100%",H.current.style.height="100%"):H.current.style.cssText=""}function Ct(){R()}function st($e){var xe=$e.target.dataset.seek?$e.target.dataset.seek:$e.target.value;H.current.currentTime=xe,Ee.current.value=xe,he.current.value=xe}function ut($e){var xe=Math.round($e.offsetX/$e.target.clientWidth*parseInt($e.target.getAttribute("max"),10));he.current.setAttribute("data-seek",xe);var Fe=a(xe);Ue.current.textContent="".concat(Fe.hour>0?Fe.hour+":":"").concat(Fe.minutes,":").concat(Fe.seconds);var ct=H.current.getBoundingClientRect();Ue.current.style.left="".concat($e.pageX-ct.left,"px")}return re.current.addEventListener(Object(o.c)(),Rt),H.current.addEventListener("canplay",It),H.current.addEventListener("ended",pe),H.current.addEventListener("seeking",dt),H.current.addEventListener("seeked",Et),H.current.addEventListener("loadedmetadata",Be),he.current.addEventListener("mousemove",ut),he.current.addEventListener("input",st),H.current.addEventListener("timeupdate",qe),H.current.addEventListener("pause",Ct),H.current.addEventListener("volumechange",et),function(){H.current.removeEventListener("canplay",It),H.current.removeEventListener("play",Ce),H.current.removeEventListener("ended",pe),H.current.removeEventListener("seeking",dt),H.current.removeEventListener("seeked",Et),he.current.removeEventListener("mousemove",ut),he.current.removeEventListener("input",st),H.current.removeEventListener("timeupdate",qe),H.current.removeEventListener("pause",Ct),H.current.removeEventListener("loadedmetadata",Be),H.current.removeEventListener("volumechange",et),H.current.playing&&(Le.push(U,H.current.currentTime),m&&Me())}},[H,g]),Object(S.useEffect)(function(){if(H.current.onended=function(){J(H)},H.current.oncontextmenu=function(){return!1},(g==null?void 0:g.indexOf(".m3u8"))>-1){if(H.current.canPlayType("application/vnd.apple.mpegurl"))H.current.src=g;else if(p.a.isSupported()){var Pe=new p.a;Pe.loadSource(g),Pe.attachMedia(H.current)}}},[g]),Object(S.useEffect)(function(){H.current.playbackRate=k},[k]);var ze=function(){H.current.paused||H.current.ended?H.current.play():H.current.pause(),Xe()};function Ke(){H.current.muted=!H.current.muted,H.current.muted?(ve.current.setAttribute("data-volume",volume.value),ve.current.value=0):ve.current.value=ve.current.dataset.volume}return A.a.createElement("div",{style:{position:"relative"},ref:re},A.a.createElement("div",{ref:Q,className:"".concat(l.a.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(l.a.animate__loop)},Je?Je.login:" "),A.a.createElement("div",{className:l.a.container},A.a.createElement("div",{className:l.a["video-container"],id:"video-container"},A.a.createElement("div",{className:l.a["playback-animation"],id:"playback-animation"},A.a.createElement("svg",{className:l.a["playback-icons"]},A.a.createElement("use",{className:"hidden",href:"#play-icon"}),A.a.createElement("use",{href:"#pause"}))),A.a.createElement("video",{className:l.a.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:H,autoPlay:!1}),A.a.createElement("div",{className:"".concat(l.a["video-controls"]," "),id:"video-controls"},A.a.createElement("div",{className:l.a["bottom-controls"]},A.a.createElement("div",{className:l.a["left-controls"]},A.a.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:ze},A.a.createElement("svg",{className:l.a["playback-icons"]},A.a.createElement("use",{ref:me,href:"#play-icon"}),A.a.createElement("use",{ref:oe,style:{display:"none"},href:"#pause"}))),A.a.createElement("div",{className:l.a.time},A.a.createElement("time",{id:"time-elapsed",ref:be},"00:00"),A.a.createElement("span",null," / "),A.a.createElement("time",{id:"duration",ref:de},"00:00"))),A.a.createElement("div",{className:l.a["right-controls"]},A.a.createElement(s.CopyToClipboard,{text:g,onCopy:function(){return ee.b.success("\u590D\u5236\u6210\u529F")}},A.a.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},A.a.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),A.a.createElement("div",{className:l.a["volume-controls"]},A.a.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:l.a["volume-button"],id:"volume-button",onClick:Ke},A.a.createElement("i",{ref:Re,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),A.a.createElement("i",{ref:je,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),A.a.createElement("i",{ref:De,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),A.a.createElement("input",{className:l.a.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:ve,style:{display:"none"},onClick:et})),A.a.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:l.a["fullscreen-button"],onClick:function(){Object(o.a)()?Object(o.b)():Object(o.d)(re.current)}},A.a.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),A.a.createElement("div",{className:l.a["video-progress"]},A.a.createElement("progress",{ref:Ee,value:"0",min:"0"}),A.a.createElement("input",{className:l.a.seek,ref:he,value:"0",min:"0",type:"range",step:"1"}),A.a.createElement("div",{className:l.a["seek-tooltip"],ref:Ue,id:"seek-tooltip"},"00:00"))))),A.a.createElement("svg",{style:{display:"none"}},A.a.createElement("defs",null,A.a.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},A.a.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),A.a.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},A.a.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),A.a.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},A.a.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),A.a.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},A.a.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),A.a.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},A.a.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),A.a.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},A.a.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),A.a.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},A.a.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),A.a.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},A.a.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},i3hx:function(Ye,We,z){},je13:function(Ye,We,z){var ae=z("5nXd"),ee=z("gRFJ"),B=[z("uQRt")];Ye.exports=ae.createStore(ee,B)},kSUc:function(Ye,We,z){},"kaH+":function(Ye,We,z){"use strict";var ae=z("+L6B"),ee=z("2/Rp"),B=z("tJVT"),O=z("cDcd"),D=z.n(O),S=z("UZu5"),A=z.n(S),C=z("dhSg"),h=z("rLCj"),p=z("dF/Y"),c=z("4i/N");We.a=function(){var s=Object(O.useState)(""),n=Object(B.a)(s,2),o=n[0],i=n[1],l=Object(O.useState)(0),a=Object(B.a)(l,2),r=a[0],t=a[1],d=Object(O.useRef)("");Object(O.useEffect)(function(){var x=C.a.subscribe("preview-image",function(f){i(f),document.body.style.overflow="hidden"});return x},[]),Object(O.useEffect)(function(){return document.addEventListener("keydown",v),function(){document.removeEventListener("keydown",v)}},[]),Object(O.useEffect)(function(){d.current=o},[o]);function v(x){x.keyCode==27&&d.current&&y()}function y(){document.body.style.overflow="auto",i("")}function b(){t(r+90)}var g=Object(O.useRef)(),m=Object(O.useRef)(),_=function(f){(f.nativeEvent.target===g.current||f.nativeEvent.target===m.current)&&y()};return D.a.createElement(O.Fragment,null,o?D.a.createElement("div",{className:"image-preview-container",ref:g,onClick:_},D.a.createElement("div",{className:"button-group"},D.a.createElement(ee.a,{onClick:b},"\u65CB\u8F6C",D.a.createElement(h.a,null)),D.a.createElement(ee.a,{href:o},"\u4E0B\u8F7D",D.a.createElement(p.a,null)),D.a.createElement(ee.a,{onClick:y},"\u5173\u95ED",D.a.createElement(c.a,null))),D.a.createElement("div",{className:"preview-wrp-group",ref:m},D.a.createElement("img",{className:"image-preview",src:o,alt:"\u9884\u89C8\u5927\u56FE",style:{transform:"rotate(".concat(r,"deg)")}}))):null)}},kovY:function(Ye,We,z){Ye.exports=z.p+"static/e.eabfa286.svg"},lOMy:function(Ye,We,z){},lZu9:function(Ye,We,z){(function(ae){ae(z("VrN/"),z("1eCo"),z("8EBN"))})(function(ae){"use strict";ae.defineMode("markdown",function(ee,B){var O=ae.getMode(ee,"text/html"),D=O.name=="null";function S(F){if(ae.findModeByName){var k=ae.findModeByName(F);k&&(F=k.mime||k.mimes[0])}var K=ae.getMode(ee,F);return K.name=="null"?null:K}B.highlightFormatting===void 0&&(B.highlightFormatting=!1),B.maxBlockquoteDepth===void 0&&(B.maxBlockquoteDepth=0),B.taskLists===void 0&&(B.taskLists=!1),B.strikethrough===void 0&&(B.strikethrough=!1),B.emoji===void 0&&(B.emoji=!1),B.fencedCodeBlockHighlighting===void 0&&(B.fencedCodeBlockHighlighting=!0),B.fencedCodeBlockDefaultMode===void 0&&(B.fencedCodeBlockDefaultMode="text/plain"),B.xml===void 0&&(B.xml=!0),B.tokenTypeOverrides===void 0&&(B.tokenTypeOverrides={});var A={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 C in A)A.hasOwnProperty(C)&&B.tokenTypeOverrides[C]&&(A[C]=B.tokenTypeOverrides[C]);var h=/^([*\-_])(?:\s*\1){2,}\s*$/,p=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,s=B.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,n=/^ {0,3}(?:\={1,}|-{2,})\s*$/,o=/^[^#!\[\]*_\\<>` "'(~:]+/,i=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,l=/^\s*\[[^\]]+?\]:.*$/,a=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,r=" ";function t(F,k,K){return k.f=k.inline=K,K(F,k)}function d(F,k,K){return k.f=k.block=K,K(F,k)}function v(F){return!F||!/\S/.test(F.string)}function y(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==g){var k=D;if(!k){var K=ae.innerMode(O,F.htmlState);k=K.mode.name=="xml"&&K.state.tagStart===null&&!K.state.context&&K.state.tokenize.isInText}k&&(F.f=f,F.block=b,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function b(F,k){var K=F.column()===k.indentation,Y=v(k.prevLine.stream),H=k.indentedCode,Q=k.prevLine.hr,re=k.list!==!1,oe=(k.listStack[k.listStack.length-1]||0)+3;k.indentedCode=!1;var me=k.indentation;if(k.indentationDiff===null&&(k.indentationDiff=k.indentation,re)){for(k.list=null;me<k.listStack[k.listStack.length-1];)k.listStack.pop(),k.listStack.length?k.indentation=k.listStack[k.listStack.length-1]:k.list=!1;k.list!==!1&&(k.indentationDiff=me-k.listStack[k.listStack.length-1])}var he=!Y&&!Q&&!k.prevLine.header&&(!re||!H)&&!k.prevLine.fencedCodeEnd,Ee=(k.list===!1||Q||Y)&&k.indentation<=oe&&F.match(h),de=null;if(k.indentationDiff>=4&&(H||k.prevLine.fencedCodeEnd||k.prevLine.header||Y))return F.skipToEnd(),k.indentedCode=!0,A.code;if(F.eatSpace())return null;if(K&&k.indentation<=oe&&(de=F.match(s))&&de[1].length<=6)return k.quote=0,k.header=de[1].length,k.thisLine.header=!0,B.highlightFormatting&&(k.formatting="header"),k.f=k.inline,_(k);if(k.indentation<=oe&&F.eat(">"))return k.quote=K?1:k.quote+1,B.highlightFormatting&&(k.formatting="quote"),F.eatSpace(),_(k);if(!Ee&&!k.setext&&K&&k.indentation<=oe&&(de=F.match(p))){var be=de[1]?"ol":"ul";return k.indentation=me+F.current().length,k.list=!0,k.quote=0,k.listStack.push(k.indentation),k.em=!1,k.strong=!1,k.code=!1,k.strikethrough=!1,B.taskLists&&F.match(c,!1)&&(k.taskList=!0),k.f=k.inline,B.highlightFormatting&&(k.formatting=["list","list-"+be]),_(k)}else{if(K&&k.indentation<=oe&&(de=F.match(i,!0)))return k.quote=0,k.fencedEndRE=new RegExp(de[1]+"+ *$"),k.localMode=B.fencedCodeBlockHighlighting&&S(de[2]||B.fencedCodeBlockDefaultMode),k.localMode&&(k.localState=ae.startState(k.localMode)),k.f=k.block=m,B.highlightFormatting&&(k.formatting="code-block"),k.code=-1,_(k);if(k.setext||(!he||!re)&&!k.quote&&k.list===!1&&!k.code&&!Ee&&!l.test(F.string)&&(de=F.lookAhead(1))&&(de=de.match(n)))return k.setext?(k.header=k.setext,k.setext=0,F.skipToEnd(),B.highlightFormatting&&(k.formatting="header")):(k.header=de[0].charAt(0)=="="?1:2,k.setext=k.header),k.thisLine.header=!0,k.f=k.inline,_(k);if(Ee)return F.skipToEnd(),k.hr=!0,k.thisLine.hr=!0,A.hr;if(F.peek()==="[")return t(F,k,N)}return t(F,k,k.inline)}function g(F,k){var K=O.token(F,k.htmlState);if(!D){var Y=ae.innerMode(O,k.htmlState);(Y.mode.name=="xml"&&Y.state.tagStart===null&&!Y.state.context&&Y.state.tokenize.isInText||k.md_inside&&F.current().indexOf(">")>-1)&&(k.f=f,k.block=b,k.htmlState=null)}return K}function m(F,k){var K=k.listStack[k.listStack.length-1]||0,Y=k.indentation<K,H=K+3;if(k.fencedEndRE&&k.indentation<=H&&(Y||F.match(k.fencedEndRE))){B.highlightFormatting&&(k.formatting="code-block");var Q;return Y||(Q=_(k)),k.localMode=k.localState=null,k.block=b,k.f=f,k.fencedEndRE=null,k.code=0,k.thisLine.fencedCodeEnd=!0,Y?d(F,k,k.block):Q}else return k.localMode?k.localMode.token(F,k.localState):(F.skipToEnd(),A.code)}function _(F){var k=[];if(F.formatting){k.push(A.formatting),typeof F.formatting=="string"&&(F.formatting=[F.formatting]);for(var K=0;K<F.formatting.length;K++)k.push(A.formatting+"-"+F.formatting[K]),F.formatting[K]==="header"&&k.push(A.formatting+"-"+F.formatting[K]+"-"+F.header),F.formatting[K]==="quote"&&(!B.maxBlockquoteDepth||B.maxBlockquoteDepth>=F.quote?k.push(A.formatting+"-"+F.formatting[K]+"-"+F.quote):k.push("error"))}if(F.taskOpen)return k.push("meta"),k.length?k.join(" "):null;if(F.taskClosed)return k.push("property"),k.length?k.join(" "):null;if(F.linkHref?k.push(A.linkHref,"url"):(F.strong&&k.push(A.strong),F.em&&k.push(A.em),F.strikethrough&&k.push(A.strikethrough),F.emoji&&k.push(A.emoji),F.linkText&&k.push(A.linkText),F.code&&k.push(A.code),F.image&&k.push(A.image),F.imageAltText&&k.push(A.imageAltText,"link"),F.imageMarker&&k.push(A.imageMarker)),F.header&&k.push(A.header,A.header+"-"+F.header),F.quote&&(k.push(A.quote),!B.maxBlockquoteDepth||B.maxBlockquoteDepth>=F.quote?k.push(A.quote+"-"+F.quote):k.push(A.quote+"-"+B.maxBlockquoteDepth)),F.list!==!1){var Y=(F.listStack.length-1)%3;Y?Y===1?k.push(A.list2):k.push(A.list3):k.push(A.list1)}return F.trailingSpaceNewLine?k.push("trailing-space-new-line"):F.trailingSpace&&k.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),k.length?k.join(" "):null}function x(F,k){return F.match(o,!0)?_(k):void 0}function f(F,k){var K=k.text(F,k);if(typeof K!="undefined")return K;if(k.list)return k.list=null,_(k);if(k.taskList){var Y=F.match(c,!0)[1]===" ";return Y?k.taskOpen=!0:k.taskClosed=!0,B.highlightFormatting&&(k.formatting="task"),k.taskList=!1,_(k)}if(k.taskOpen=!1,k.taskClosed=!1,k.header&&F.match(/^#+$/,!0))return B.highlightFormatting&&(k.formatting="header"),_(k);var H=F.next();if(k.linkTitle){k.linkTitle=!1;var Q=H;H==="("&&(Q=")"),Q=(Q+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var re="^\\s*(?:[^"+Q+"\\\\]+|\\\\\\\\|\\\\.)"+Q;if(F.match(new RegExp(re),!0))return A.linkHref}if(H==="`"){var oe=k.formatting;B.highlightFormatting&&(k.formatting="code"),F.eatWhile("`");var me=F.current().length;if(k.code==0&&(!k.quote||me==1))return k.code=me,_(k);if(me==k.code){var he=_(k);return k.code=0,he}else return k.formatting=oe,_(k)}else if(k.code)return _(k);if(H==="\\"&&(F.next(),B.highlightFormatting)){var Ee=_(k),de=A.formatting+"-escape";return Ee?Ee+" "+de:de}if(H==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return k.imageMarker=!0,k.image=!0,B.highlightFormatting&&(k.formatting="image"),_(k);if(H==="["&&k.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return k.imageMarker=!1,k.imageAltText=!0,B.highlightFormatting&&(k.formatting="image"),_(k);if(H==="]"&&k.imageAltText){B.highlightFormatting&&(k.formatting="image");var Ee=_(k);return k.imageAltText=!1,k.image=!1,k.inline=k.f=w,Ee}if(H==="["&&!k.image)return k.linkText&&F.match(/^.*?\]/)||(k.linkText=!0,B.highlightFormatting&&(k.formatting="link")),_(k);if(H==="]"&&k.linkText){B.highlightFormatting&&(k.formatting="link");var Ee=_(k);return k.linkText=!1,k.inline=k.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?w:f,Ee}if(H==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){k.f=k.inline=E,B.highlightFormatting&&(k.formatting="link");var Ee=_(k);return Ee?Ee+=" ":Ee="",Ee+A.linkInline}if(H==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){k.f=k.inline=E,B.highlightFormatting&&(k.formatting="link");var Ee=_(k);return Ee?Ee+=" ":Ee="",Ee+A.linkEmail}if(B.xml&&H==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var be=F.string.indexOf(">",F.pos);if(be!=-1){var Ue=F.string.substring(F.start,be);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ue)&&(k.md_inside=!0)}return F.backUp(1),k.htmlState=ae.startState(O),d(F,k,g)}if(B.xml&&H==="<"&&F.match(/^\/\w*?>/))return k.md_inside=!1,"tag";if(H==="*"||H==="_"){for(var Re=1,De=F.pos==1?" ":F.string.charAt(F.pos-2);Re<3&&F.eat(H);)Re++;var je=F.peek()||" ",ve=!/\s/.test(je)&&(!a.test(je)||/\s/.test(De)||a.test(De)),ce=!/\s/.test(De)&&(!a.test(De)||/\s/.test(je)||a.test(je)),ke=null,Ne=null;if(Re%2&&(!k.em&&ve&&(H==="*"||!ce||a.test(De))?ke=!0:k.em==H&&ce&&(H==="*"||!ve||a.test(je))&&(ke=!1)),Re>1&&(!k.strong&&ve&&(H==="*"||!ce||a.test(De))?Ne=!0:k.strong==H&&ce&&(H==="*"||!ve||a.test(je))&&(Ne=!1)),Ne!=null||ke!=null){B.highlightFormatting&&(k.formatting=ke==null?"strong":Ne==null?"em":"strong em"),ke===!0&&(k.em=H),Ne===!0&&(k.strong=H);var he=_(k);return ke===!1&&(k.em=!1),Ne===!1&&(k.strong=!1),he}}else if(H===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return _(k);F.backUp(1)}if(B.strikethrough){if(H==="~"&&F.eatWhile(H)){if(k.strikethrough){B.highlightFormatting&&(k.formatting="strikethrough");var he=_(k);return k.strikethrough=!1,he}else if(F.match(/^[^\s]/,!1))return k.strikethrough=!0,B.highlightFormatting&&(k.formatting="strikethrough"),_(k)}else if(H===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return _(k);F.backUp(2)}}if(B.emoji&&H===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){k.emoji=!0,B.highlightFormatting&&(k.formatting="emoji");var Je=_(k);return k.emoji=!1,Je}return H===" "&&(F.match(/^ +$/,!1)?k.trailingSpace++:k.trailingSpace&&(k.trailingSpaceNewLine=!0)),_(k)}function E(F,k){var K=F.next();if(K===">"){k.f=k.inline=f,B.highlightFormatting&&(k.formatting="link");var Y=_(k);return Y?Y+=" ":Y="",Y+A.linkInline}return F.match(/^[^>]+/,!0),A.linkInline}function w(F,k){if(F.eatSpace())return null;var K=F.next();return K==="("||K==="["?(k.f=k.inline=R(K==="("?")":"]"),B.highlightFormatting&&(k.formatting="link-string"),k.linkHref=!0,_(k)):"error"}var T={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function R(F){return function(k,K){var Y=k.next();if(Y===F){K.f=K.inline=f,B.highlightFormatting&&(K.formatting="link-string");var H=_(K);return K.linkHref=!1,H}return k.match(T[F]),K.linkHref=!0,_(K)}}function N(F,k){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(k.f=j,F.next(),B.highlightFormatting&&(k.formatting="link"),k.linkText=!0,_(k)):t(F,k,f)}function j(F,k){if(F.match(/^\]:/,!0)){k.f=k.inline=W,B.highlightFormatting&&(k.formatting="link");var K=_(k);return k.linkText=!1,K}return F.match(/^([^\]\\]|\\.)+/,!0),A.linkText}function W(F,k){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?k.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),k.f=k.inline=f,A.linkHref+" url")}var J={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:f,text:x,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&ae.copyState(O,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?ae.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,k){if(k.formatting=!1,F!=k.thisLine.stream){if(k.header=0,k.hr=!1,F.match(/^\s*$/,!0))return y(k),null;if(k.prevLine=k.thisLine,k.thisLine={stream:F},k.taskList=!1,k.trailingSpace=0,k.trailingSpaceNewLine=!1,!k.localState&&(k.f=k.block,k.f!=g)){var K=F.match(/^\s*/,!0)[0].replace(/\t/g,r).length;if(k.indentation=K,k.indentationDiff=null,K>0)return null}}return k.f(F,k)},innerMode:function(F){return F.block==g?{state:F.htmlState,mode:O}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:J}},indent:function(F,k,K){return F.block==g&&O.indent?O.indent(F.htmlState,k,K):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,k,K):ae.Pass},blankLine:y,getType:_,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return J},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},n6Qo:function(Ye,We,z){"use strict";z.d(We,"a",function(){return C});var ae=z("cDcd"),ee=z("biw7"),B=z("fyJ8");function O(h){var p=h.className,c=h.index,s=h.children,n=h.colSpan,o=h.rowSpan,i=ae.useContext(ee.a),l=i.prefixCls,a=i.fixedInfoList,r=a[c];return ae.createElement(B.a,Object.assign({className:p,index:c,component:"td",prefixCls:l,record:null,dataIndex:null,render:function(){return{children:s,props:{colSpan:n,rowSpan:o}}}},r))}function D(h){return ae.createElement("tr",Object.assign({},h))}function S(h){var p=h.children,c=ae.useContext(ee.a),s=c.prefixCls;return ae.createElement("tfoot",{className:"".concat(s,"-summary")},p)}var A=We.b=S,C={Cell:O,Row:D}},nCk5:function(Ye,We,z){Ye.exports=z.p+"static/d.53bf6ae3.svg"},nWbc:function(Ye,We,z){},oE5q:function(Ye,We,z){Ye.exports=z.p+"static/t.0b94c5c3.svg"},oFv4:function(Ye,We,z){Ye.exports=z.p+"static/internal.da228387.png"},osHv:function(Ye,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";var ee=ae.Pos;function B(a,r){return a.line-r.line||a.ch-r.ch}var O="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",D=O+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",S=new RegExp("<(/?)(["+O+"]["+D+"]*)","g");function A(a,r,t,d){this.line=r,this.ch=t,this.cm=a,this.text=a.getLine(r),this.min=d?Math.max(d.from,a.firstLine()):a.firstLine(),this.max=d?Math.min(d.to-1,a.lastLine()):a.lastLine()}function C(a,r){var t=a.cm.getTokenTypeAt(ee(a.line,r));return t&&/\btag\b/.test(t)}function h(a){return a.line>=a.max?void 0:(a.ch=0,a.text=a.cm.getLine(++a.line),!0)}function p(a){return a.line<=a.min?void 0:(a.text=a.cm.getLine(--a.line),a.ch=a.text.length,!0)}function c(a){for(;;){var r=a.text.indexOf(">",a.ch);if(r==-1){if(h(a))continue;return}if(!C(a,r+1)){a.ch=r+1;continue}var t=a.text.lastIndexOf("/",r),d=t>-1&&!/\S/.test(a.text.slice(t+1,r));return a.ch=r+1,d?"selfClose":"regular"}}function s(a){for(;;){var r=a.ch?a.text.lastIndexOf("<",a.ch-1):-1;if(r==-1){if(p(a))continue;return}if(!C(a,r+1)){a.ch=r;continue}S.lastIndex=r,a.ch=r;var t=S.exec(a.text);if(t&&t.index==r)return t}}function n(a){for(;;){S.lastIndex=a.ch;var r=S.exec(a.text);if(!r){if(h(a))continue;return}if(!C(a,r.index+1)){a.ch=r.index+1;continue}return a.ch=r.index+r[0].length,r}}function o(a){for(;;){var r=a.ch?a.text.lastIndexOf(">",a.ch-1):-1;if(r==-1){if(p(a))continue;return}if(!C(a,r+1)){a.ch=r;continue}var t=a.text.lastIndexOf("/",r),d=t>-1&&!/\S/.test(a.text.slice(t+1,r));return a.ch=r+1,d?"selfClose":"regular"}}function i(a,r){for(var t=[];;){var d=n(a),v,y=a.line,b=a.ch-(d?d[0].length:0);if(!d||!(v=c(a)))return;if(v=="selfClose")continue;if(d[1]){for(var g=t.length-1;g>=0;--g)if(t[g]==d[2]){t.length=g;break}if(g<0&&(!r||r==d[2]))return{tag:d[2],from:ee(y,b),to:ee(a.line,a.ch)}}else t.push(d[2])}}function l(a,r){for(var t=[];;){var d=o(a);if(!d)return;if(d=="selfClose"){s(a);continue}var v=a.line,y=a.ch,b=s(a);if(!b)return;if(b[1])t.push(b[2]);else{for(var g=t.length-1;g>=0;--g)if(t[g]==b[2]){t.length=g;break}if(g<0&&(!r||r==b[2]))return{tag:b[2],from:ee(a.line,a.ch),to:ee(v,y)}}}}ae.registerHelper("fold","xml",function(a,r){for(var t=new A(a,r.line,0);;){var d=n(t);if(!d||t.line!=r.line)return;var v=c(t);if(!v)return;if(!d[1]&&v!="selfClose"){var y=ee(t.line,t.ch),b=i(t,d[2]);return b&&B(b.from,y)>0?{from:y,to:b.from}:null}}}),ae.findMatchingTag=function(a,r,t){var d=new A(a,r.line,r.ch,t);if(d.text.indexOf(">")==-1&&d.text.indexOf("<")==-1)return;var v=c(d),y=v&&ee(d.line,d.ch),b=v&&s(d);if(!v||!b||B(d,r)>0)return;var g={from:ee(d.line,d.ch),to:y,tag:b[2]};return v=="selfClose"?{open:g,close:null,at:"open"}:b[1]?{open:l(d,b[2]),close:g,at:"close"}:(d=new A(a,y.line,y.ch,t),{open:g,close:i(d,b[2]),at:"open"})},ae.findEnclosingTag=function(a,r,t,d){for(var v=new A(a,r.line,r.ch,t);;){var y=l(v,d);if(!y)break;var b=new A(a,r.line,r.ch,t),g=i(b,y.tag);if(g)return{open:y,close:g}}},ae.scanForClosingTag=function(a,r,t,d){var v=new A(a,r.line,r.ch,d?{from:0,to:d}:null);return i(v,t)}})},p5ED:function(Ye,We,z){"use strict";var ae=z("+L6B"),ee=z("2/Rp"),B=z("5Dmo"),O=z("3S7+"),D=z("k1fw"),S=z("tJVT"),A=z("cDcd"),C=z.n(A),h=z("vHTk"),p=z.n(h),c=z("yEEn"),s=z("ZW9T"),n=z("1vsH");We.a=function(o){var i=o.name,l=o.data,a=o.theme,r=o.type,t=o.filename,d=o.monacoEditor,v=o.className,y=o.style,b=o.close,g=o.onClose,m=o.hasMask,_=Object(A.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),x=Object(S.a)(_,2),f=x[0],E=x[1],w=Object(A.useState)(""),T=Object(S.a)(w,2),R=T[0],N=T[1],j,W=1024*1024,J=10*W,F=Object(A.useRef)();r==="office"&&(j=Object(n.V)(l).filesize,j>J&&(r="other")),t&&(d.filename=t),Object(A.useEffect)(function(){var Y,H,Q=(Y=document.cookie)===null||Y===void 0||((H=Y.replace(/\s/g,""))===null||H===void 0)?void 0:H.split(";");Q==null||Q.map(function(re){var oe=re.split("=");oe[0]==="_educoder_session"&&N(oe[1])})},[]);var k=function(){if(l.startsWith("http")||l.startsWith("/")){K();return}Object(n.z)(t||"educoder",l,t)},K=function(){Object(n.x)(t||i,l)};return console.log("data:",l,"fileanme:",t," name:",i),C.a.createElement("div",{style:Object(D.a)({},y||{}),className:"".concat(m&&p.a.bgBlack," ").concat(r?p.a.wrp:"hide")},b&&C.a.createElement("div",{className:p.a.close,ref:F},C.a.createElement(O.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return F.current}},C.a.createElement("span",{onClick:K},C.a.createElement("i",{className:"icon-quxiaozhiding"}))),C.a.createElement(O.a,{title:"\u5173\u95ED",getPopupContainer:function(){return F.current}},C.a.createElement("span",{className:"",onClick:g},C.a.createElement("i",{className:"icon-guanbi1"})))),C.a.createElement("div",{className:"".concat(p.a[v]," ").concat(v," ").concat(p.a.monaco," ").concat(r==="txt"?"show":"hide")},r==="txt"&&C.a.createElement(s.b,d)),r==="audio"&&C.a.createElement("audio",{src:"".concat(l!=null&&l.startsWith("/")||(l==null?void 0:l.indexOf("https://"))>-1?l:"data:audio/mp3;base64,").concat(l),autoPlay:!0}),r==="video"&&C.a.createElement(C.a.Fragment,null,l!=null&&l.startsWith("/")?C.a.createElement("video",{controls:!0,src:"".concat(l),autoPlay:!0}):C.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(l),autoPlay:!0})),r==="html"&&C.a.createElement("iframe",{src:l+"&disposition=inline"}),r==="pdf"&&C.a.createElement("embed",{className:p.a.embed,src:l}),r==="image"&&C.a.createElement(C.a.Fragment,null,C.a.createElement("img",{src:"".concat(l!=null&&l.startsWith("/")||(l==null?void 0:l.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(l)})),r==="other"&&C.a.createElement("div",null,C.a.createElement(ee.a,{type:"primary",size:"large",onClick:k},C.a.createElement(c.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(r==="download"||r==="office")&&C.a.createElement(ee.a,{type:"primary",size:"large",onClick:k},C.a.createElement(c.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Ye,We,z){},pYxM:function(Ye,We,z){Ye.exports={flex_box_center:"flex_box_center___v-DUT",flex_space_between:"flex_space_between___1bRJc",flex_box_vertical_center:"flex_box_vertical_center___k_OZG",flex_box_center_end:"flex_box_center_end___2lt4j",flex_box_column:"flex_box_column___3fVE5",active:"active___-vjVj",line:"line___3pg8N",list:"list___3yqVJ",left:"left___2dr70",mask:"mask___186YH",right:"right___17A6Y",name:"name___v6M7T",title:"title___1BhMz",a:"a___3T4cN",b:"b___1z1Bk",des:"des___29QAn",tag:"tag___FfUI2"}},ppsT:function(Ye,We,z){(function(ae){var ee,ee;!function(B){if(!0)window.OSS=B(),Ye.exports=B();else var O}(function(){var B;return function(){function O(D,S,A){function C(c,s){if(!S[c]){if(!D[c]){var n=typeof ee=="function"&ⅇif(!s&&n)return ee(c,!0);if(h)return h(c,!0);var o=new Error("Cannot find module '"+c+"'");throw o.code="MODULE_NOT_FOUND",o}var i=S[c]={exports:{}};D[c][0].call(i.exports,function(l){return C(D[c][1][l]||l)},i,i.exports,O,D,S,A)}return S[c].exports}for(var h=typeof ee=="function"&&ee,p=0;p<A.length;p++)C(A[p]);return C}return O}()({1:[function(O,D,S){"use strict";var A=O("./browser/client");A.Buffer=O("buffer").Buffer,A.co=O("co"),A.urllib=O("../shims/xhr"),A.version=O("./browser/version").version,D.exports=A},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(O,D,S){(function(A,C){"use strict";function h(Y){return Y&&Y.__esModule?Y:{default:Y}}function p(Y,H){return Y[H]||Y[H.toLowerCase()]}function c(Y,H){var Q=f.parse(Y);if(!Q.protocol){var re=H?"https://":"http://";Q=f.parse(re+Y)}if(Q.protocol!=="http:"&&Q.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return Q}function s(Y,H,Q){var re=Q?"https://":"http://",oe=H?"-internal.aliyuncs.com":".aliyuncs.com";return Y.substr(0,"vpc100-oss-cn-".length)==="vpc100-oss-cn-"&&(oe=".aliyuncs.com"),f.parse(re+Y+oe)}function n(){return document&&document.location&&document.location.protocol==="https:"}function o(Y,H){if(!(this instanceof o))return new o(Y,H);Y&&Y.inited?this.options=Y:this.options=o.initOptions(Y),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=R,this.agent=this.options.agent||k),this.ctx=H,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var i=O("babel-runtime/regenerator"),l=h(i),a=O("babel-runtime/core-js/object/keys"),r=h(a),t=O("debug")("ali-oss"),d=O("./../../shims/crypto/crypto.js"),v=O("path"),y=O("copy-to"),b=O("mime"),g=O("xml2js"),m=O("humanize-ms"),_=O("agentkeepalive"),x=O("merge-descriptors"),f=O("url"),E=O("is-type-of"),w=O("platform"),T=O("utility"),R=O("urllib"),N=O("./version"),j=O("dateformat"),W=O("bowser"),J=O("../common/signUtils"),F=O("../common/utils"),k=new _;D.exports=o,o.initOptions=function(Y){if(!Y||!Y.accessKeyId||!Y.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var H=n(),Q={region:"oss-cn-hangzhou",internal:!1,secure:H,bucket:null,endpoint:null,cname:!1};if((0,r.default)(Y).forEach(function(re){Y[re]!==void 0&&(Q[re]=Y[re])}),Q.accessKeyId=Q.accessKeyId.trim(),Q.accessKeySecret=Q.accessKeySecret.trim(),Q.timeout&&(Q.timeout=m(Q.timeout)),Q.endpoint)Q.endpoint=c(Q.endpoint,Q.secure);else{if(!Q.region)throw new Error("require options.endpoint or options.region");Q.endpoint=s(Q.region,Q.internal,Q.secure)}return Q.inited=!0,Q};var K=o.prototype;x(K,O("./object")),x(K,O("./managed_upload")),x(K,O("../common/multipart")),x(K,O("../common/thunkpool.js")),o.Wrapper=O("./wrapper"),K.signature=function(Y){return t("authorization stringToSign: %s",Y),J.computeSignature(this.options.accessKeySecret,Y)},K.authorization=function(Y,H,Q,re){var oe=J.buildCanonicalString(Y.toUpperCase(),H,{headers:re,parameters:Q});return J.authorization(this.options.accessKeyId,this.options.accessKeySecret,oe)},K.createRequest=function(Y){var H={"x-oss-date":j(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(H["x-oss-security-token"]=this.options.stsToken),y(Y.headers).to(H),p(H,"Content-Type")||(Y.mime===b.default_type&&(Y.mime=""),Y.mime&&Y.mime.indexOf("/")>0?H["Content-Type"]=Y.mime:H["Content-Type"]=b.getType(Y.mime||v.extname(Y.object||""))||"application/octet-stream"),Y.content&&(H["Content-Md5"]=d.createHash("md5").update(new C(Y.content,"utf8")).digest("base64"),H["Content-Length"]||(H["Content-Length"]=Y.content.length));var Q=this._getResource(Y);H.authorization=this.authorization(Y.method,Q,Y.subres,H);var re=this._getReqUrl(Y);t("request %s %s, with headers %j, !!stream: %s",Y.method,re,H,!!Y.stream);var oe=Y.timeout||this.options.timeout;return{url:re,params:{agent:this.agent,method:Y.method,content:Y.content,stream:Y.stream,headers:H,timeout:oe,writeStream:Y.writeStream,customResponse:Y.customResponse,ctx:Y.ctx||this.ctx}}},K.request=l.default.mark(function Y(H){var Q,re,oe,me;return l.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return Q=this.createRequest(H),re=void 0,oe=void 0,he.prev=3,he.next=6,this.urllib.request(Q.url,Q.params);case 6:re=he.sent,t("response %s %s, got %s, headers: %j",H.method,Q.url,re.status,re.headers),he.next=13;break;case 10:he.prev=10,he.t0=he.catch(3),oe=he.t0;case 13:if(me=void 0,!re||!H.successStatuses||H.successStatuses.indexOf(re.status)!==-1){he.next=26;break}return he.next=17,this.requestError(re);case 17:if(me=he.sent,me.code!=="RequestTimeTooSkewed"){he.next=23;break}return this.options.amendTimeSkewed=+new Date(me.serverTime)-new Date,he.next=22,this.request(H);case 22:return he.abrupt("return",he.sent);case 23:me.params=H,he.next=30;break;case 26:if(!oe){he.next=30;break}return he.next=29,this.requestError(oe);case 29:me=he.sent;case 30:if(!me){he.next=32;break}throw me;case 32:if(!H.xmlResponse){he.next=36;break}return he.next=35,this.parseXML(re.data);case 35:re.data=he.sent;case 36:return he.abrupt("return",re);case 37:case"end":return he.stop()}},Y,this,[[3,10]])}),K._getResource=function(Y){var H="/";return Y.bucket&&(H+=Y.bucket+"/"),Y.object&&(H+=Y.object),H},K._isIP=function(Y){return F._isIP(Y)},K._escape=function(Y){return T.encodeURIComponent(Y).replace(/%2F/g,"/")},K._getReqUrl=function(Y){var H={};y(this.options.endpoint).to(H);var Q=this._isIP(H.hostname),re=this.options.cname;!Y.bucket||re||Q||(H.host=Y.bucket+"."+H.host);var oe="/";Y.bucket&&Q&&(oe+=Y.bucket+"/"),Y.object&&(oe+=this._escape(Y.object).replace(/\+/g,"%2B")),H.pathname=oe;var me={};if(Y.query&&x(me,Y.query),Y.subres){var he={};E.string(Y.subres)?he[Y.subres]="":E.array(Y.subres)?Y.subres.forEach(function(Ee){he[Ee]=""}):he=Y.subres,x(me,he)}return H.query=me,f.format(H)},K._getUserAgent=function(){var Y=A&&A.browser?"js":"nodejs",H="aliyun-sdk-"+Y+"/"+N.version,Q=w.description;return!Q&&A&&(Q="Node.js "+A.version.slice(1)+" on "+A.platform+" "+A.arch),this._checkUserAgent(H+" "+Q)},K._checkUserAgent=function(Y){return Y.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},K.checkBrowserAndVersion=function(Y,H){return W.name===Y&&W.version.split(".")[0]===H},K.parseXML=function(Y){return function(H){C.isBuffer(Y)&&(Y=Y.toString()),g.parseString(Y,{explicitRoot:!1,explicitArray:!1},H)}},K.requestError=l.default.mark(function Y(H){var Q,re,oe,me;return l.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(Q=null,H.data&&H.data.length){he.next=5;break}H.status===-1||H.status===-2?(Q=new Error(H.message),Q.name=H.name,Q.status=H.status,Q.code=H.name):(H.status===404?(Q=new Error("Object not exists"),Q.name="NoSuchKeyError",Q.status=404,Q.code="NoSuchKey"):H.status===412?(Q=new Error("Pre condition failed"),Q.name="PreconditionFailedError",Q.status=412,Q.code="PreconditionFailed"):(Q=new Error("Unknow error, status: "+H.status),Q.name="UnknowError",Q.status=H.status),Q.requestId=H.headers["x-oss-request-id"],Q.host=""),he.next=30;break;case 5:return re=String(H.data),t("request response error data: %s",re),oe=void 0,he.prev=8,he.next=11,this.parseXML(re)||{};case 11:oe=he.sent,he.next=21;break;case 14:return he.prev=14,he.t0=he.catch(8),t(re),he.t0.message+=`
|
|
|
raw xml: `+re,he.t0.status=H.status,he.t0.requestId=H.headers["x-oss-request-id"],he.abrupt("return",he.t0);case 21:me=oe.Message||"unknow request error, status: "+H.status,oe.Condition&&(me+=" (condition: "+oe.Condition+")"),Q=new Error(me),Q.name=oe.Code?oe.Code+"Error":"UnknowError",Q.status=H.status,Q.code=oe.Code,Q.requestId=oe.RequestId,Q.hostId=oe.HostId,Q.serverTime=oe.ServerTime;case 30:return t("generate error %j",Q),he.abrupt("return",Q);case 32:case"end":return he.stop()}},Y,this,[[8,14]])})}).call(this,O("_process"),O("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(O,D,S){(function(A){"use strict";function C(y){return y&&y.__esModule?y:{default:y}}function h(y,b){if(!(this instanceof h))return new h(y,b);v.call(this,b),this.file=y,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var p=O("babel-runtime/core-js/array/from"),c=C(p),s=O("babel-runtime/regenerator"),n=C(s),o=O("is-type-of"),i=O("util"),l=O("path"),a=O("mime"),r=O("copy-to"),t=S;t.multipartUpload=n.default.mark(function y(b,g,m){var _,x,f,E,w,T,R,N,j;return n.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(this.resetCancelFlag(),m=m||{},!m.checkpoint||!m.checkpoint.uploadId){W.next=6;break}return W.next=5,this._resumeMultipart(m.checkpoint,m);case 5:return W.abrupt("return",W.sent);case 6:return _=102400,m.mime||(o.file(g)?m.mime=a.getType(l.extname(g.name)):o.blob(g)?m.mime=g.type:m.mime=a.getType(l.extname(g))),m.headers=m.headers||{},this._convertMetaToHeaders(m.meta,m.headers),W.next=12,this._getFileSize(g);case 12:if(!((x=W.sent)<_)){W.next=25;break}return f=this._createStream(g,0,x),m.contentLength=x,W.next=18,this.putStream(b,f,m);case 18:if(E=W.sent,!m||!m.progress){W.next=22;break}return W.next=22,m.progress(1);case 22:return w={res:E.res,bucket:this.options.bucket,name:b,etag:E.res.headers.etag},(m.headers&&m.headers["x-oss-callback"]||m.callback)&&(w.data=E.data),W.abrupt("return",w);case 25:if(!(m.partSize&&m.partSize<_)){W.next=27;break}throw new Error("partSize must not be smaller than "+_);case 27:return W.next=29,this.initMultipartUpload(b,m);case 29:if(T=W.sent,R=T.uploadId,N=this._getPartSize(x,m.partSize),j={file:g,name:b,fileSize:x,partSize:N,uploadId:R,doneParts:[]},!m||!m.progress){W.next=36;break}return W.next=36,m.progress(0,j,T.res);case 36:return W.next=38,this._resumeMultipart(j,m);case 38:return W.abrupt("return",W.sent);case 39:case"end":return W.stop()}},y,this)}),t._resumeMultipart=n.default.mark(function y(b,g){var m,_,x,f,E,w,T,R,N,j,W,J,F,k,K,Y,H,Q,re,oe,me;return n.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(!this.isCancel()){he.next=2;break}throw this._makeCancelEvent();case 2:if(m=b.file,_=b.fileSize,x=b.partSize,f=b.uploadId,E=b.doneParts,w=b.name,T=[],E.length>0&&r(E).to(T),R=this._divideParts(_,x),N=R.length,j=!1,W=n.default.mark(function Ee(de,be){var Ue,Re,De;return n.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:if(de.isCancel()){je.next=21;break}return je.prev=1,Ue=R[be-1],Re={stream:de._createStream(m,Ue.start,Ue.end),size:Ue.end-Ue.start},je.next=6,de._uploadPart(w,f,be,Re);case 6:if(De=je.sent,de.isCancel()||j){je.next=13;break}if(b.doneParts.push({number:be,etag:De.res.headers.etag}),T.push({number:be,etag:De.res.headers.etag}),!g||!g.progress){je.next=13;break}return je.next=13,g.progress(E.length/N,b,De.res);case 13:je.next=21;break;case 15:if(je.prev=15,je.t0=je.catch(1),de.isCancel()){je.next=21;break}throw de.cancel(),je.t0.partNum=be,je.t0;case 21:case"end":return je.stop()}},Ee,this,[[1,15]])}),J=(0,c.default)(new Array(N),function(Ee,de){return de+1}),F=T.map(function(Ee){return Ee.number}),k=J.filter(function(Ee){return F.indexOf(Ee)<0}),K=5,Y=g.parallel||K,!this.checkBrowserAndVersion("Internet Explorer","10")&&Y!==1){he.next=26;break}H=0;case 16:if(!(H<k.length)){he.next=24;break}if(!this.isCancel()){he.next=19;break}throw this._makeCancelEvent();case 19:return he.next=21,W(this,k[H]);case 21:H++,he.next=16;break;case 24:he.next=40;break;case 26:for(Q=[],re=0;re<k.length;re++)Q.push(W(this,k[re]));return he.next=30,this._thunkPool(Q,Y);case 30:if(oe=he.sent,j=!0,!(oe&&oe.length>0)){he.next=37;break}throw this.resetCancelFlag(),me=oe[0],me.message="Failed to upload some parts with error: "+me.toString()+" part_num: "+me.partNum,me;case 37:if(!this.isCancel()){he.next=40;break}throw Q=null,this._makeCancelEvent();case 40:return he.next=42,this.completeMultipartUpload(w,f,T,g);case 42:return he.abrupt("return",he.sent);case 43:case"end":return he.stop()}},y,this)}),o.file=function(y){return typeof File!="undefined"&&y instanceof File},o.blob=function(y){return typeof Blob!="undefined"&&y instanceof Blob},t._getFileSize=n.default.mark(function y(b){var g;return n.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(!o.buffer(b)){m.next=4;break}return m.abrupt("return",b.length);case 4:if(!o.blob(b)&&!o.file(b)){m.next=6;break}return m.abrupt("return",b.size);case 6:if(!o.string(b)){m.next=11;break}return m.next=9,this._statFile(b);case 9:return g=m.sent,m.abrupt("return",g.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return m.stop()}},y,this)});var d=O("stream"),v=d.Readable;i.inherits(h,v),h.prototype.readFileAndPush=function(y){if(this.fileBuffer)for(var b=!0;b&&this.fileBuffer&&this.start<this.fileBuffer.length;){var g=this.start,m=g+y;m=m>this.fileBuffer.length?this.fileBuffer.length:m,this.start=m,b=this.push(this.fileBuffer.slice(g,m))}},h.prototype._read=function(y){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);y=y||16384;var b=this;this.reader.onload=function(g){b.fileBuffer=new A(new Uint8Array(g.target.result)),b.file=null,b.readFileAndPush(y)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(y)},t._createStream=function(y,b,g){if(o.blob(y)||o.file(y))return new h(y.slice(b,g));throw new Error("_createStream requires File/String.")},t._getPartSize=function(y,b){return b?Math.max(Math.ceil(y/1e4),b):1048576},t._divideParts=function(y,b){for(var g=Math.ceil(y/b),m=[],_=0;_<g;_++){var x=b*_,f=Math.min(x+b,y);m.push({start:x,end:f})}return m},t._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,O("buffer").Buffer)},{"babel-runtime/core-js/array/from":16,"babel-runtime/regenerator":33,buffer:38,"copy-to":43,"is-type-of":165,mime:242,path:170,stream:195,util:207}],4:[function(O,D,S){"use strict";function A(b){return b&&b.__esModule?b:{default:b}}var C=O("babel-runtime/core-js/object/keys"),h=A(C),p=O("babel-runtime/regenerator"),c=A(p),s=O("debug")("ali-oss:object"),n=O("utility"),o=O("fs"),i=O("is-type-of"),l=O("url"),a=O("copy-to"),r=O("path"),t=O("mime"),d=O("../common/callback"),v=O("../common/signUtils"),y=S;y.append=c.default.mark(function b(g,m,_){var x;return c.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return _=_||{},_.position===void 0&&(_.position="0"),_.subres={append:"",position:_.position},_.method="POST",f.next=6,this.put(g,m,_);case 6:return x=f.sent,x.nextAppendPosition=x.res.headers["x-oss-next-append-position"],f.abrupt("return",x);case 9:case"end":return f.stop()}},b,this)}),y.put=c.default.mark(function b(g,m,_){var x,f,E,w,T,R;return c.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(x=void 0,_=_||{},!i.buffer(m)){N.next=6;break}x=m,N.next=18;break;case 6:if(!i.blob(m)&&!i.file(m)){N.next=17;break}return _.mime||(i.file(m)?_.mime=t.getType(r.extname(m.name)):_.mime=m.type),f=this._createStream(m,0,m.size),N.next=11,this._getFileSize(m);case 11:return _.contentLength=N.sent,N.next=14,this.putStream(g,f,_);case 14:return N.abrupt("return",N.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return _.headers=_.headers||{},this._convertMetaToHeaders(_.meta,_.headers),E=_.method||"PUT",w=this._objectRequestParams(E,g,_),d.encodeCallback(w,_),w.mime=_.mime,w.content=x,w.successStatuses=[200],N.next=28,this.request(w);case 28:return T=N.sent,R={name:g,url:this._objectUrl(g),res:T.res},w.headers&&w.headers["x-oss-callback"]&&(R.data=JSON.parse(T.data.toString())),N.abrupt("return",R);case 32:case"end":return N.stop()}},b,this)}),y.putStream=c.default.mark(function b(g,m,_){var x,f,E,w;return c.default.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return _=_||{},_.headers=_.headers||{},_.contentLength?_.headers["Content-Length"]=_.contentLength:_.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(_.meta,_.headers),x=_.method||"PUT",f=this._objectRequestParams(x,g,_),d.encodeCallback(f,_),f.mime=_.mime,f.stream=m,f.successStatuses=[200],T.next=12,this.request(f);case 12:return E=T.sent,w={name:g,url:this._objectUrl(g),res:E.res},f.headers&&f.headers["x-oss-callback"]&&(w.data=JSON.parse(E.data.toString())),T.abrupt("return",w);case 16:case"end":return T.stop()}},b,this)}),y.head=c.default.mark(function b(g,m){var _,x,f;return c.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return _=this._objectRequestParams("HEAD",g,m),_.successStatuses=[200,304],E.next=4,this.request(_);case 4:return x=E.sent,f={meta:null,res:x.res,status:x.status},x.status===200&&(0,h.default)(x.headers).forEach(function(w){w.indexOf("x-oss-meta-")===0&&(f.meta||(f.meta={}),f.meta[w.substring(11)]=x.headers[w])}),E.abrupt("return",f);case 8:case"end":return E.stop()}},b,this)}),y.get=c.default.mark(function b(g,m,_){var x,f,E,w;return c.default.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return x=null,f=!1,i.writableStream(m)?x=m:i.string(m)?(x=o.createWriteStream(m),f=!0):_=m,_=_||{},_.process&&(_.subres=_.subres||{},_.subres["x-oss-process"]=_.process),E=void 0,T.prev=6,w=this._objectRequestParams("GET",g,_),w.writeStream=x,w.successStatuses=[200,206,304],T.next=12,this.request(w);case 12:E=T.sent,f&&x.destroy(),T.next=24;break;case 16:if(T.prev=16,T.t0=T.catch(6),!f){T.next=23;break}return x.destroy(),s("get error: %s, delete the exists file %s",T.t0,m),T.next=23,this._deleteFileSafe(m);case 23:throw T.t0;case 24:return T.abrupt("return",{res:E.res,content:E.data});case 25:case"end":return T.stop()}},b,this,[[6,16]])}),y.getStream=c.default.mark(function b(g,m){var _,x;return c.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return m=m||{},_=this._objectRequestParams("GET",g,m),_.customResponse=!0,_.successStatuses=[200,206,304],f.next=6,this.request(_);case 6:return x=f.sent,f.abrupt("return",{stream:x.res,res:{status:x.status,headers:x.headers}});case 8:case"end":return f.stop()}},b,this)}),y.delete=c.default.mark(function b(g,m){var _,x;return c.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return _=this._objectRequestParams("DELETE",g,m),_.successStatuses=[204],f.next=4,this.request(_);case 4:return x=f.sent,f.abrupt("return",{res:x.res});case 6:case"end":return f.stop()}},b,this)}),y.deleteMulti=c.default.mark(function b(g,m){var _,x,f,E,w,T;return c.default.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:for(m=m||{},_=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<Delete>
|
|
|
`,m.quiet?_+=` <Quiet>true</Quiet>
|
|
|
`:_+=` <Quiet>false</Quiet>
|
|
|
`,x=0;x<g.length;x++)_+=" <Object><Key>"+n.escape(this._objectName(g[x]))+`</Key></Object>
|
|
|
`;return _+="</Delete>",s("delete multi objects: %s",_),m.subres="delete",f=this._objectRequestParams("POST","",m),f.mime="xml",f.content=_,f.xmlResponse=!0,f.successStatuses=[200],R.next=14,this.request(f);case 14:return E=R.sent,w=E.data,T=w&&w.Deleted||null,T&&(Array.isArray(T)||(T=[T]),T=T.map(function(N){return N.Key})),R.abrupt("return",{res:E.res,deleted:T});case 19:case"end":return R.stop()}},b,this)}),y.copy=c.default.mark(function b(g,m,_){var x,f,E;return c.default.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return _=_||{},_.headers=_.headers||{},(0,h.default)(_.headers).forEach(function(T){_.headers["x-oss-copy-source-"+T.toLowerCase()]=_.headers[T]}),_.meta&&(_.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(_.meta,_.headers),m=m[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(m):"/"+encodeURIComponent(m.slice(1)),_.headers["x-oss-copy-source"]=m,x=this._objectRequestParams("PUT",g,_),x.xmlResponse=!0,x.successStatuses=[200,304],w.next=12,this.request(x);case 12:return f=w.sent,E=f.data,E&&(E={etag:E.ETag,lastModified:E.LastModified}),w.abrupt("return",{data:E,res:f.res});case 16:case"end":return w.stop()}},b,this)}),y.putMeta=c.default.mark(function b(g,m,_){return c.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,this.copy(g,g,{meta:m||{},timeout:_&&_.timeout,ctx:_&&_.ctx});case 2:return x.abrupt("return",x.sent);case 3:case"end":return x.stop()}},b,this)}),y.list=c.default.mark(function b(g,m){var _,x,f,E,w;return c.default.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return _=this._objectRequestParams("GET","",m),_.query=g,_.xmlResponse=!0,_.successStatuses=[200],T.next=6,this.request(_);case 6:return x=T.sent,f=x.data.Contents,E=this,f&&(Array.isArray(f)||(f=[f]),f=f.map(function(R){return{name:R.Key,url:E._objectUrl(R.Key),lastModified:R.LastModified,etag:R.ETag,type:R.Type,size:Number(R.Size),storageClass:R.StorageClass,owner:{id:R.Owner.ID,displayName:R.Owner.DisplayName}}})),w=x.data.CommonPrefixes||null,w&&(Array.isArray(w)||(w=[w]),w=w.map(function(R){return R.Prefix})),T.abrupt("return",{res:x.res,objects:f,prefixes:w,nextMarker:x.data.NextMarker||null,isTruncated:x.data.IsTruncated==="true"});case 13:case"end":return T.stop()}},b,this)}),y.putACL=c.default.mark(function b(g,m,_){var x,f;return c.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return _=_||{},_.subres="acl",_.headers=_.headers||{},_.headers["x-oss-object-acl"]=m,g=this._objectName(g),x=this._objectRequestParams("PUT",g,_),x.successStatuses=[200],E.next=9,this.request(x);case 9:return f=E.sent,E.abrupt("return",{res:f.res});case 11:case"end":return E.stop()}},b,this)}),y.getACL=c.default.mark(function b(g,m){var _,x;return c.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return m=m||{},m.subres="acl",g=this._objectName(g),_=this._objectRequestParams("GET",g,m),_.successStatuses=[200],_.xmlResponse=!0,f.next=8,this.request(_);case 8:return x=f.sent,f.abrupt("return",{acl:x.data.AccessControlList.Grant,owner:{id:x.data.Owner.ID,displayName:x.data.Owner.DisplayName},res:x.res});case 10:case"end":return f.stop()}},b,this)}),y.restore=c.default.mark(function b(g,m){var _,x;return c.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return m=m||{},m.subres="restore",_=this._objectRequestParams("POST",g,m),_.successStatuses=[202],f.next=6,this.request(_);case 6:return x=f.sent,f.abrupt("return",{res:x.res});case 8:case"end":return f.stop()}},b,this)}),y.signatureUrl=function(b,g){g=g||{},b=this._objectName(b),g.method=g.method||"GET";var m=n.timestamp()+(g.expires||1800),_={bucket:this.options.bucket,object:b},x=this._getResource(_);this.options.stsToken&&(g["security-token"]=this.options.stsToken);var f=v._signatureForURL(this.options.accessKeySecret,g,x,m),E=l.parse(this._getReqUrl(_));return E.query={OSSAccessKeyId:this.options.accessKeyId,Expires:m,Signature:f.Signature},a(f.subResource).to(E.query),E.format()},y.getObjectUrl=function(b,g){return g?g[g.length-1]!=="/"&&(g+="/"):g=this.options.endpoint.format(),g+this._escape(this._objectName(b))},y._objectUrl=function(b){return this._getReqUrl({bucket:this.options.bucket,object:b})},y.generateObjectUrl=function(b,g){if(g)g[g.length-1]!=="/"&&(g+="/");else{g=this.options.endpoint.format();var m=l.parse(g),_=this.options.bucket;m.hostname=_+"."+m.hostname,m.host=_+"."+m.host,g=m.format()}return g+this._escape(this._objectName(b))},y._objectRequestParams=function(b,g,m){if(!this.options.bucket)throw new Error("Please create a bucket first");m=m||{},g=this._objectName(g);var _={object:g,bucket:this.options.bucket,method:b,subres:m&&m.subres,timeout:m&&m.timeout,ctx:m&&m.ctx};return m.headers&&(_.headers={},a(m.headers).to(_.headers)),_},y._objectName=function(b){return b.replace(/^\/+/,"")},y._statFile=function(b){return function(g){o.stat(b,g)}},y._convertMetaToHeaders=function(b,g){b&&(0,h.default)(b).forEach(function(m){g["x-oss-meta-"+m]=b[m]})},y._deleteFileSafe=function(b){return function(g){o.exists(b,function(m){m?o.unlink(b,function(_){_&&s("unlink %j error: %s",b,_),g()}):g()})}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(O,D,S){"use strict";S.version="5.3.1"},{}],6:[function(O,D,S){"use strict";function A(r){return r&&r.__esModule?r:{default:r}}function C(r){return r&&typeof r.next=="function"&&typeof r.throw=="function"}function h(r){if(!r)return!1;var t=r.constructor;return!!t&&(t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction"||C(t.prototype)||C(r.prototype))}function p(r,t){var d=new r(t),v=(0,i.default)(d),y=(0,i.default)((0,n.default)(d));v.concat(y).forEach(function(b){h(d[b])?this[b]=l.wrap(d[b]).bind(d):this[b]=d[b]},this)}function c(r){if(!(this instanceof c))return new c(r);p.call(this,a,r)}var s=O("babel-runtime/core-js/object/get-prototype-of"),n=A(s),o=O("babel-runtime/core-js/object/keys"),i=A(o),l=O("co"),a=O("./client");D.exports=c,c.STS=function r(t){if(!(this instanceof r))return new r(t);p.call(this,a.STS,t)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(O,D,S){(function(A){"use strict";function C(n){return n&&n.__esModule?n:{default:n}}var h=O("babel-runtime/core-js/object/keys"),p=C(h),c=O("babel-runtime/core-js/json/stringify"),s=C(c);S.encodeCallback=function(n,o){if(n.headers=n.headers||{},!Object.prototype.hasOwnProperty.call(n.headers,"x-oss-callback")&&o.callback){var i={callbackUrl:encodeURI(o.callback.url),callbackBody:o.callback.body};o.callback.host&&(i.callbackHost=o.callback.host),o.callback.contentType&&(i.callbackBodyType=o.callback.contentType);var l=new A((0,s.default)(i)).toString("base64");if(n.headers["x-oss-callback"]=l,o.callback.customValue){var a={};(0,p.default)(o.callback.customValue).forEach(function(r){a["x:"+r]=o.callback.customValue[r]}),n.headers["x-oss-callback-var"]=new A((0,s.default)(a)).toString("base64")}}}}).call(this,O("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(O,D,S){"use strict";var A=O("babel-runtime/regenerator"),C=function(s){return s&&s.__esModule?s:{default:s}}(A),h=O("copy-to"),p=O("./callback"),c=S;c.listUploads=C.default.mark(function s(n,o){var i,l,a,r;return C.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=o||{},i={},h(o).to(i),i.subres="uploads",l=this._objectRequestParams("GET","",i),l.query=n,l.xmlResponse=!0,l.successStatuses=[200],t.next=10,this.request(l);case 10:return a=t.sent,r=a.data.Upload||[],Array.isArray(r)||(r=[r]),r=r.map(function(d){return{name:d.Key,uploadId:d.UploadId,initiated:d.Initiated}}),t.abrupt("return",{res:a.res,uploads:r,bucket:a.data.Bucket,nextKeyMarker:a.data.NextKeyMarker,nextUploadIdMarker:a.data.NextUploadIdMarker,isTruncated:a.data.IsTruncated==="true"});case 15:case"end":return t.stop()}},s,this)}),c.listParts=C.default.mark(function s(n,o,i,l){var a,r,t;return C.default.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=l||{},a={},h(l).to(a),a.subres={uploadId:o},r=this._objectRequestParams("GET",n,a),r.query=i,r.xmlResponse=!0,r.successStatuses=[200],d.next=10,this.request(r);case 10:return t=d.sent,d.abrupt("return",{res:t.res,uploadId:t.data.UploadId,bucket:t.data.Bucket,name:t.data.Key,partNumberMarker:t.data.PartNumberMarker,nextPartNumberMarker:t.data.NextPartNumberMarker,maxParts:t.data.MaxParts,isTruncated:t.data.IsTruncated,parts:t.data.Part||[]});case 12:case"end":return d.stop()}},s,this)}),c.abortMultipartUpload=C.default.mark(function s(n,o,i){var l,a,r;return C.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.cancel(),i=i||{},l={},h(i).to(l),l.subres={uploadId:o},a=this._objectRequestParams("DELETE",n,l),a.successStatuses=[204],t.next=9,this.request(a);case 9:return r=t.sent,t.abrupt("return",{res:r.res});case 11:case"end":return t.stop()}},s,this)}),c.initMultipartUpload=C.default.mark(function s(n,o){var i,l,a;return C.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return o=o||{},i={},h(o).to(i),i.headers=i.headers||{},this._convertMetaToHeaders(o.meta,i.headers),i.subres="uploads",l=this._objectRequestParams("POST",n,i),l.mime=o.mime,l.xmlResponse=!0,l.successStatuses=[200],r.next=12,this.request(l);case 12:return a=r.sent,r.abrupt("return",{res:a.res,bucket:a.data.Bucket,name:a.data.Key,uploadId:a.data.UploadId});case 14:case"end":return r.stop()}},s,this)}),c.uploadPart=C.default.mark(function s(n,o,i,l,a,r,t){var d;return C.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return d={stream:this._createStream(l,a,r),size:r-a},v.next=3,this._uploadPart(n,o,i,d,t);case 3:return v.abrupt("return",v.sent);case 4:case"end":return v.stop()}},s,this)}),c.completeMultipartUpload=C.default.mark(function s(n,o,i,l){var a,r,t,d,v,y,b,g;return C.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:for(a=i.concat().sort(function(_,x){return _.number-x.number}).filter(function(_,x,f){return!x||_.number!==f[x-1].number}),r=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,t=0;t<a.length;t++)d=a[t],r+=`<Part>
|
|
|
`,r+="<PartNumber>"+d.number+`</PartNumber>
|
|
|
`,r+="<ETag>"+d.etag+`</ETag>
|
|
|
`,r+=`</Part>
|
|
|
`;return r+="</CompleteMultipartUpload>",l=l||{},v={},h(l).to(v),v.subres={uploadId:o},y=this._objectRequestParams("POST",n,v),p.encodeCallback(y,v),y.mime="xml",y.content=r,y.headers&&y.headers["x-oss-callback"]||(y.xmlResponse=!0),y.successStatuses=[200],m.next=16,this.request(y);case 16:return b=m.sent,g={res:b.res,bucket:y.bucket,name:n,etag:b.res.headers.etag},y.headers&&y.headers["x-oss-callback"]&&(g.data=JSON.parse(b.data.toString())),m.abrupt("return",g);case 20:case"end":return m.stop()}},s,this)}),c._uploadPart=C.default.mark(function s(n,o,i,l,a){var r,t,d;return C.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return a=a||{},r={},h(a).to(r),r.headers={"Content-Length":l.size},r.subres={partNumber:i,uploadId:o},t=this._objectRequestParams("PUT",n,r),t.mime=r.mime,t.stream=l.stream,t.successStatuses=[200],v.next=11,this.request(t);case 11:return d=v.sent,l.stream=null,t.stream=null,v.abrupt("return",{name:n,etag:d.res.headers.etag,res:d.res});case 15:case"end":return v.stop()}},s,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(O,D,S){(function(A){"use strict";function C(i){return i&&i.__esModule?i:{default:i}}var h=O("babel-runtime/core-js/json/stringify"),p=C(h),c=O("babel-runtime/core-js/object/keys"),s=C(c),n=O("./../../shims/crypto/crypto.js"),o=O("is-type-of");S.buildCanonicalizedResource=function(i,l){var a=""+i,r="?";if(o.string(l)&&l.trim()!=="")a+=r+l;else if(o.array(l))l.sort(),a+=r+l.join("&");else if(l){var t=function(v,y){return v[0]>y[0]?1:v[0]<y[0]?-1:0},d=function(v){a+=r+v,l[v]&&(a+="="+l[v]),r="&"};(0,s.default)(l).sort(t).forEach(d)}return a},S.buildCanonicalString=function(i,l,a,r){a=a||{};var t=a.headers||{},d=[],v={},y=[i.toUpperCase(),t["Content-Md5"]||"",t["Content-Type"]||t["Content-Type".toLowerCase()],r||t["x-oss-date"]];return(0,s.default)(t).forEach(function(b){var g=b.toLowerCase();g.indexOf("x-oss-")===0&&(v[g]=String(t[b]).trim())}),(0,s.default)(v).sort().forEach(function(b){d.push(b+":"+v[b])}),y=y.concat(d),y.push(this.buildCanonicalizedResource(l,a.parameters)),y.join(`
|
|
|
`)},S.computeSignature=function(i,l){return n.createHmac("sha1",i).update(new A(l,"utf8")).digest("base64")},S.authorization=function(i,l,a){return"OSS "+i+":"+this.computeSignature(l,a)},S._signatureForURL=function(i,l,a,r){var t={},d={};if(l.process&&(d["x-oss-process"]=l.process),l.response&&(0,s.default)(l.response).forEach(function(g){var m="response-"+g.toLowerCase();d[m]=l.response[g]}),(0,s.default)(l).forEach(function(g){var m=g.toLowerCase(),_=l[g];m.indexOf("x-oss-")===0?t[m]=_:m.indexOf("content-md5")===0||m.indexOf("content-type")===0?t[g]=_:m!=="expires"&&m!=="response"&&m!=="process"&&m!=="method"&&(d[m]=_)}),Object.prototype.hasOwnProperty.call(l,"security-token")&&(d["security-token"]=l["security-token"]),Object.prototype.hasOwnProperty.call(l,"callback")){var v={callbackUrl:encodeURI(l.callback.url),callbackBody:l.callback.body};if(l.callback.host&&(v.callbackHost=l.callback.host),l.callback.contentType&&(v.callbackBodyType=l.callback.contentType),d.callback=new A((0,p.default)(v)).toString("base64"),l.callback.customValue){var y={};(0,s.default)(l.callback.customValue).forEach(function(g){y["x:"+g]=l.callback.customValue[g]}),d["callback-var"]=new A((0,p.default)(y)).toString("base64")}}var b=this.buildCanonicalString(l.method,a,{headers:t,parameters:d},r.toString());return{Signature:this.computeSignature(i,b),subResource:d}}}).call(this,O("buffer").Buffer)},{"./../../shims/crypto/crypto.js":237,"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38,"is-type-of":165}],10:[function(O,D,S){"use strict";var A=O("babel-runtime/regenerator"),C=function(n){return n&&n.__esModule?n:{default:n}}(A),h=O("co"),p=O("co-priority-queue"),c=O("any-promise"),s=S;s._thunkPool=function(n,o){function i(d,v){++r===d.length&&v(t)}function l(d,v){function y(){var f;return C.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:f=void 0;case 1:if(a.isCancel()){E.next=9;break}return E.next=4,m.next();case 4:return f=E.sent,E.next=7,f();case 7:E.next=1;break;case 9:_+=1,_===d&&(m.fns=[],m.buffer=[],v(t));case 11:case"end":return E.stop()}},g,this)}function b(f){console.error(f.stack)}for(var g=C.default.mark(y),m=new p,_=0,x=0;x<d;x++)h(y).catch(b);return function(f,E){return function(w){m.push(C.default.mark(function T(){return C.default.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.prev=0,R.t0=w,R.next=4,f;case 4:R.t1=R.sent,(0,R.t0)(null,R.t1),R.next=11;break;case 8:R.prev=8,R.t2=R.catch(0),w(R.t2);case 11:case"end":return R.stop()}},T,this,[[0,8]])}),E)}}}var a=this,r=0,t=[];return new c(function(d){function v(_){return C.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,g(n[_]);case 2:i(n,d);case 3:case"end":return x.stop()}},b,this)}function y(_){t.push(_),i(n,d)}for(var b=C.default.mark(v),g=new l(o,d),m=0;m<n.length;m++)h(v(m)).catch(y)})},s.cancel=function(){this.options.cancelFlag=!0},s.isCancel=function(){return this.options.cancelFlag},s.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(O,D,S){"use strict";S._isIP=function(A){var C=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,h=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return C.test(A)||h.test(A)}},{}],12:[function(O,D,S){function A(){}D.exports=A,D.exports.HttpsAgent=A},{}],13:[function(O,D,S){D.exports=O("./register")().Promise},{"./register":15}],14:[function(O,D,S){"use strict";var A=null;D.exports=function(C,h){return function(p,c){p=p||null,c=c||{};var s=c.global!==!1;if(A===null&&s&&(A=C["@@any-promise/REGISTRATION"]||null),A!==null&&p!==null&&A.implementation!==p)throw new Error('any-promise already defined as "'+A.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return A===null&&(A=p!==null&&c.Promise!==void 0?{Promise:c.Promise,implementation:p}:h(p),s&&(C["@@any-promise/REGISTRATION"]=A)),A}}},{}],15:[function(O,D,S){"use strict";function A(){if(window.Promise===void 0)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}D.exports=O("./loader")(window,A)},{"./loader":14}],16:[function(O,D,S){D.exports={default:O("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(O,D,S){D.exports={default:O("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(O,D,S){D.exports={default:O("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(O,D,S){D.exports={default:O("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(O,D,S){D.exports={default:O("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(O,D,S){D.exports={default:O("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(O,D,S){D.exports={default:O("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(O,D,S){D.exports={default:O("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(O,D,S){D.exports={default:O("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(O,D,S){D.exports={default:O("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(O,D,S){D.exports={default:O("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(O,D,S){D.exports={default:O("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(O,D,S){D.exports={default:O("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(O,D,S){D.exports={default:O("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(O,D,S){"use strict";S.__esModule=!0,S.default=function(A,C){if(!(A instanceof C))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(O,D,S){"use strict";S.__esModule=!0;var A=O("../core-js/object/define-property"),C=function(h){return h&&h.__esModule?h:{default:h}}(A);S.default=function(){function h(p,c){for(var s=0;s<c.length;s++){var n=c[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,C.default)(p,n.key,n)}}return function(p,c,s){return c&&h(p.prototype,c),s&&h(p,s),p}}()},{"../core-js/object/define-property":20}],32:[function(O,D,S){"use strict";function A(n){return n&&n.__esModule?n:{default:n}}S.__esModule=!0;var C=O("../core-js/symbol/iterator"),h=A(C),p=O("../core-js/symbol"),c=A(p),s=typeof c.default=="function"&&typeof h.default=="symbol"?function(n){return typeof n}:function(n){return n&&typeof c.default=="function"&&n.constructor===c.default&&n!==c.default.prototype?"symbol":typeof n};S.default=typeof c.default=="function"&&s(h.default)==="symbol"?function(n){return n===void 0?"undefined":s(n)}:function(n){return n&&typeof c.default=="function"&&n.constructor===c.default&&n!==c.default.prototype?"symbol":n===void 0?"undefined":s(n)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(O,D,S){D.exports=O("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(O,D,S){"use strict";function A(d){var v=d.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=d.indexOf("=");return y===-1&&(y=v),[y,y===v?0:4-y%4]}function C(d){var v=A(d),y=v[0],b=v[1];return 3*(y+b)/4-b}function h(d,v,y){return 3*(v+y)/4-y}function p(d){for(var v,y=A(d),b=y[0],g=y[1],m=new l(h(d,b,g)),_=0,x=g>0?b-4:b,f=0;f<x;f+=4)v=i[d.charCodeAt(f)]<<18|i[d.charCodeAt(f+1)]<<12|i[d.charCodeAt(f+2)]<<6|i[d.charCodeAt(f+3)],m[_++]=v>>16&255,m[_++]=v>>8&255,m[_++]=255&v;return g===2&&(v=i[d.charCodeAt(f)]<<2|i[d.charCodeAt(f+1)]>>4,m[_++]=255&v),g===1&&(v=i[d.charCodeAt(f)]<<10|i[d.charCodeAt(f+1)]<<4|i[d.charCodeAt(f+2)]>>2,m[_++]=v>>8&255,m[_++]=255&v),m}function c(d){return o[d>>18&63]+o[d>>12&63]+o[d>>6&63]+o[63&d]}function s(d,v,y){for(var b,g=[],m=v;m<y;m+=3)b=(d[m]<<16&16711680)+(d[m+1]<<8&65280)+(255&d[m+2]),g.push(c(b));return g.join("")}function n(d){for(var v,y=d.length,b=y%3,g=[],m=0,_=y-b;m<_;m+=16383)g.push(s(d,m,m+16383>_?_:m+16383));return b===1?(v=d[y-1],g.push(o[v>>2]+o[v<<4&63]+"==")):b===2&&(v=(d[y-2]<<8)+d[y-1],g.push(o[v>>10]+o[v>>4&63]+o[v<<2&63]+"=")),g.join("")}S.byteLength=C,S.toByteArray=p,S.fromByteArray=n;for(var o=[],i=[],l=typeof Uint8Array!="undefined"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,t=a.length;r<t;++r)o[r]=a[r],i[a.charCodeAt(r)]=r;i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],35:[function(O,D,S){!function(A,C,h){D!==void 0&&D.exports?D.exports=h():typeof B=="function"&&B.amd?B("bowser",h):A.bowser=h()}(this,0,function(){function A(i){function l(Y){var H=i.match(Y);return H&&H.length>1&&H[1]||""}function a(Y){var H=i.match(Y);return H&&H.length>1&&H[2]||""}var r,t=l(/(ipod|iphone|ipad)/i).toLowerCase(),d=/like android/i.test(i),v=!d&&/android/i.test(i),y=/nexus\s*[0-6]\s*/i.test(i),b=!y&&/nexus\s*[0-9]+/i.test(i),g=/CrOS/.test(i),m=/silk/i.test(i),_=/sailfish/i.test(i),x=/tizen/i.test(i),f=/(web|hpw)os/i.test(i),E=/windows phone/i.test(i),w=(/SamsungBrowser/i.test(i),!E&&/windows/i.test(i)),T=!t&&!m&&/macintosh/i.test(i),R=!v&&!_&&!x&&!f&&/linux/i.test(i),N=a(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),j=l(/version\/(\d+(\.\d+)?)/i),W=/tablet/i.test(i)&&!/tablet pc/i.test(i),J=!W&&/[^-]mobi/i.test(i),F=/xbox/i.test(i);/opera/i.test(i)?r={name:"Opera",opera:n,version:j||l(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(i)?r={name:"Opera",opera:n,version:l(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||j}:/SamsungBrowser/i.test(i)?r={name:"Samsung Internet for Android",samsungBrowser:n,version:j||l(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(i)?r={name:"Opera Coast",coast:n,version:j||l(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(i)?r={name:"Yandex Browser",yandexbrowser:n,version:j||l(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(i)?r={name:"UC Browser",ucbrowser:n,version:l(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(i)?r={name:"Maxthon",maxthon:n,version:l(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(i)?r={name:"Epiphany",epiphany:n,version:l(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(i)?r={name:"Puffin",puffin:n,version:l(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(i)?r={name:"Sleipnir",sleipnir:n,version:l(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(i)?r={name:"K-Meleon",kMeleon:n,version:l(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:E?(r={name:"Windows Phone",osname:"Windows Phone",windowsphone:n},N?(r.msedge=n,r.version=N):(r.msie=n,r.version=l(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(i)?r={name:"Internet Explorer",msie:n,version:l(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:g?r={name:"Chrome",osname:"Chrome OS",chromeos:n,chromeBook:n,chrome:n,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(i)?r={name:"Microsoft Edge",msedge:n,version:N}:/vivaldi/i.test(i)?r={name:"Vivaldi",vivaldi:n,version:l(/vivaldi\/(\d+(\.\d+)?)/i)||j}:_?r={name:"Sailfish",osname:"Sailfish OS",sailfish:n,version:l(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(i)?r={name:"SeaMonkey",seamonkey:n,version:l(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(i)?(r={name:"Firefox",firefox:n,version:l(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(i)&&(r.firefoxos=n,r.osname="Firefox OS")):m?r={name:"Amazon Silk",silk:n,version:l(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(i)?r={name:"PhantomJS",phantom:n,version:l(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(i)?r={name:"SlimerJS",slimer:n,version:l(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(i)||/rim\stablet/i.test(i)?r={name:"BlackBerry",osname:"BlackBerry OS",blackberry:n,version:j||l(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:f?(r={name:"WebOS",osname:"WebOS",webos:n,version:j||l(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(i)&&(r.touchpad=n)):/bada/i.test(i)?r={name:"Bada",osname:"Bada",bada:n,version:l(/dolfin\/(\d+(\.\d+)?)/i)}:x?r={name:"Tizen",osname:"Tizen",tizen:n,version:l(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||j}:/qupzilla/i.test(i)?r={name:"QupZilla",qupzilla:n,version:l(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||j}:/chromium/i.test(i)?r={name:"Chromium",chromium:n,version:l(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||j}:/chrome|crios|crmo/i.test(i)?r={name:"Chrome",chrome:n,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:v?r={name:"Android",version:j}:/safari|applewebkit/i.test(i)?(r={name:"Safari",safari:n},j&&(r.version=j)):t?(r={name:t=="iphone"?"iPhone":t=="ipad"?"iPad":"iPod"},j&&(r.version=j)):r=/googlebot/i.test(i)?{name:"Googlebot",googlebot:n,version:l(/googlebot\/(\d+(\.\d+))/i)||j}:{name:l(/^(.*)\/(.*) /),version:a(/^(.*)\/(.*) /)},!r.msedge&&/(apple)?webkit/i.test(i)?(/(apple)?webkit\/537\.36/i.test(i)?(r.name=r.name||"Blink",r.blink=n):(r.name=r.name||"Webkit",r.webkit=n),!r.version&&j&&(r.version=j)):!r.opera&&/gecko\//i.test(i)&&(r.name=r.name||"Gecko",r.gecko=n,r.version=r.version||l(/gecko\/(\d+(\.\d+)?)/i)),r.windowsphone||!v&&!r.silk?!r.windowsphone&&t?(r[t]=n,r.ios=n,r.osname="iOS"):T?(r.mac=n,r.osname="macOS"):F?(r.xbox=n,r.osname="Xbox"):w?(r.windows=n,r.osname="Windows"):R&&(r.linux=n,r.osname="Linux"):(r.android=n,r.osname="Android");var k="";r.windows?k=function(Y){switch(Y){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(l(/Windows ((NT|XP)( \d\d?.\d)?)/i)):r.windowsphone?k=l(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):r.mac?(k=l(/Mac OS X (\d+([_\.\s]\d+)*)/i),k=k.replace(/[_\s]/g,".")):t?(k=l(/os (\d+([_\s]\d+)*) like mac os x/i),k=k.replace(/[_\s]/g,".")):v?k=l(/android[ \/-](\d+(\.\d+)*)/i):r.webos?k=l(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):r.blackberry?k=l(/rim\stablet\sos\s(\d+(\.\d+)*)/i):r.bada?k=l(/bada\/(\d+(\.\d+)*)/i):r.tizen&&(k=l(/tizen[\/\s](\d+(\.\d+)*)/i)),k&&(r.osversion=k);var K=!r.windows&&k.split(".")[0];return W||b||t=="ipad"||v&&(K==3||K>=4&&!J)||r.silk?r.tablet=n:(J||t=="iphone"||t=="ipod"||v||y||r.blackberry||r.webos||r.bada)&&(r.mobile=n),r.msedge||r.msie&&r.version>=10||r.yandexbrowser&&r.version>=15||r.vivaldi&&r.version>=1||r.chrome&&r.version>=20||r.samsungBrowser&&r.version>=4||r.firefox&&r.version>=20||r.safari&&r.version>=6||r.opera&&r.version>=10||r.ios&&r.osversion&&r.osversion.split(".")[0]>=6||r.blackberry&&r.version>=10.1||r.chromium&&r.version>=20?r.a=n:r.msie&&r.version<10||r.chrome&&r.version<20||r.firefox&&r.version<20||r.safari&&r.version<6||r.opera&&r.version<10||r.ios&&r.osversion&&r.osversion.split(".")[0]<6||r.chromium&&r.version<20?r.c=n:r.x=n,r}function C(i){return i.split(".").length}function h(i,l){var a,r=[];if(Array.prototype.map)return Array.prototype.map.call(i,l);for(a=0;a<i.length;a++)r.push(l(i[a]));return r}function p(i){for(var l=Math.max(C(i[0]),C(i[1])),a=h(i,function(r){var t=l-C(r);return r+=new Array(t+1).join(".0"),h(r.split("."),function(d){return new Array(20-d.length).join("0")+d}).reverse()});--l>=0;){if(a[0][l]>a[1][l])return 1;if(a[0][l]!==a[1][l])return-1;if(l===0)return 0}}function c(i,l,a){var r=o;typeof l=="string"&&(a=l,l=void 0),l===void 0&&(l=!1),a&&(r=A(a));var t=""+r.version;for(var d in i)if(i.hasOwnProperty(d)&&r[d]){if(typeof i[d]!="string")throw new Error("Browser version in the minVersion map should be a string: "+d+": "+String(i));return p([t,i[d]])<0}return l}function s(i,l,a){return!c(i,l,a)}var n=!0,o=A(typeof navigator!="undefined"&&navigator.userAgent||"");return o.test=function(i){for(var l=0;l<i.length;++l){var a=i[l];if(typeof a=="string"&&a in o)return!0}return!1},o.isUnsupportedBrowser=c,o.compareVersions=p,o.check=s,o._detect=A,o.detect=A,o})},{}],36:[function(O,D,S){},{}],37:[function(O,D,S){function A(o){if(o&&!s(o))throw new Error("Unknown encoding: "+o)}function C(o){return o.toString(this.encoding)}function h(o){this.charReceived=o.length%2,this.charLength=this.charReceived?2:0}function p(o){this.charReceived=o.length%3,this.charLength=this.charReceived?3:0}var c=O("buffer").Buffer,s=c.isEncoding||function(o){switch(o&&o.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},n=S.StringDecoder=function(o){switch(this.encoding=(o||"utf8").toLowerCase().replace(/[-_]/,""),A(o),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=h;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=p;break;default:return void(this.write=C)}this.charBuffer=new c(6),this.charReceived=0,this.charLength=0};n.prototype.write=function(o){for(var i="";this.charLength;){var l=o.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:o.length;if(o.copy(this.charBuffer,this.charReceived,0,l),this.charReceived+=l,this.charReceived<this.charLength)return"";o=o.slice(l,o.length),i=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var r=i.charCodeAt(i.length-1);if(!(r>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,o.length===0)return i;break}this.charLength+=this.surrogateSize,i=""}this.detectIncompleteChar(o);var a=o.length;this.charLength&&(o.copy(this.charBuffer,0,o.length-this.charReceived,a),a-=this.charReceived),i+=o.toString(this.encoding,0,a);var a=i.length-1,r=i.charCodeAt(a);if(r>=55296&&r<=56319){var t=this.surrogateSize;return this.charLength+=t,this.charReceived+=t,this.charBuffer.copy(this.charBuffer,t,0,t),o.copy(this.charBuffer,0,0,t),i.substring(0,a)}return i},n.prototype.detectIncompleteChar=function(o){for(var i=o.length>=3?3:o.length;i>0;i--){var l=o[o.length-i];if(i==1&&l>>5==6){this.charLength=2;break}if(i<=2&&l>>4==14){this.charLength=3;break}if(i<=3&&l>>3==30){this.charLength=4;break}}this.charReceived=i},n.prototype.end=function(o){var i="";if(o&&o.length&&(i=this.write(o)),this.charReceived){var l=this.charReceived,a=this.charBuffer,r=this.encoding;i+=a.slice(0,l).toString(r)}return i}},{buffer:38}],38:[function(O,D,S){(function(A){"use strict";function C(){return p.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function h(P,U){if(C()<U)throw new RangeError("Invalid typed array length");return p.TYPED_ARRAY_SUPPORT?(P=new Uint8Array(U),P.__proto__=p.prototype):(P===null&&(P=new p(U)),P.length=U),P}function p(P,U,q){if(!(p.TYPED_ARRAY_SUPPORT||this instanceof p))return new p(P,U,q);if(typeof P=="number"){if(typeof U=="string")throw new Error("If encoding is specified then the first argument must be a string");return o(this,P)}return c(this,P,U,q)}function c(P,U,q,X){if(typeof U=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&U instanceof ArrayBuffer?a(P,U,q,X):typeof U=="string"?i(P,U,q):r(P,U)}function s(P){if(typeof P!="number")throw new TypeError('"size" argument must be a number');if(P<0)throw new RangeError('"size" argument must not be negative')}function n(P,U,q,X){return s(U),U<=0?h(P,U):q!==void 0?typeof X=="string"?h(P,U).fill(q,X):h(P,U).fill(q):h(P,U)}function o(P,U){if(s(U),P=h(P,U<0?0:0|t(U)),!p.TYPED_ARRAY_SUPPORT)for(var q=0;q<U;++q)P[q]=0;return P}function i(P,U,q){if(typeof q=="string"&&q!==""||(q="utf8"),!p.isEncoding(q))throw new TypeError('"encoding" must be a valid string encoding');var X=0|v(U,q);P=h(P,X);var $=P.write(U,q);return $!==X&&(P=P.slice(0,$)),P}function l(P,U){var q=U.length<0?0:0|t(U.length);P=h(P,q);for(var X=0;X<q;X+=1)P[X]=255&U[X];return P}function a(P,U,q,X){if(U.byteLength,q<0||U.byteLength<q)throw new RangeError("'offset' is out of bounds");if(U.byteLength<q+(X||0))throw new RangeError("'length' is out of bounds");return U=q===void 0&&X===void 0?new Uint8Array(U):X===void 0?new Uint8Array(U,q):new Uint8Array(U,q,X),p.TYPED_ARRAY_SUPPORT?(P=U,P.__proto__=p.prototype):P=l(P,U),P}function r(P,U){if(p.isBuffer(U)){var q=0|t(U.length);return P=h(P,q),P.length===0||U.copy(P,0,0,q),P}if(U){if(typeof ArrayBuffer!="undefined"&&U.buffer instanceof ArrayBuffer||"length"in U)return typeof U.length!="number"||ve(U.length)?h(P,0):l(P,U);if(U.type==="Buffer"&&Ne(U.data))return l(P,U.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function t(P){if(P>=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return 0|P}function d(P){return+P!=P&&(P=0),p.alloc(+P)}function v(P,U){if(p.isBuffer(P))return P.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(P)||P instanceof ArrayBuffer))return P.byteLength;typeof P!="string"&&(P=""+P);var q=P.length;if(q===0)return 0;for(var X=!1;;)switch(U){case"ascii":case"latin1":case"binary":return q;case"utf8":case"utf-8":case void 0:return be(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*q;case"hex":return q>>>1;case"base64":return De(P).length;default:if(X)return be(P).length;U=(""+U).toLowerCase(),X=!0}}function y(P,U,q){var X=!1;if((U===void 0||U<0)&&(U=0),U>this.length)return"";if((q===void 0||q>this.length)&&(q=this.length),q<=0)return"";if(q>>>=0,U>>>=0,q<=U)return"";for(P||(P="utf8");;)switch(P){case"hex":return F(this,U,q);case"utf8":case"utf-8":return N(this,U,q);case"ascii":return W(this,U,q);case"latin1":case"binary":return J(this,U,q);case"base64":return R(this,U,q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,U,q);default:if(X)throw new TypeError("Unknown encoding: "+P);P=(P+"").toLowerCase(),X=!0}}function b(P,U,q){var X=P[U];P[U]=P[q],P[q]=X}function g(P,U,q,X,$){if(P.length===0)return-1;if(typeof q=="string"?(X=q,q=0):q>2147483647?q=2147483647:q<-2147483648&&(q=-2147483648),q=+q,isNaN(q)&&(q=$?0:P.length-1),q<0&&(q=P.length+q),q>=P.length){if($)return-1;q=P.length-1}else if(q<0){if(!$)return-1;q=0}if(typeof U=="string"&&(U=p.from(U,X)),p.isBuffer(U))return U.length===0?-1:m(P,U,q,X,$);if(typeof U=="number")return U&=255,p.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?$?Uint8Array.prototype.indexOf.call(P,U,q):Uint8Array.prototype.lastIndexOf.call(P,U,q):m(P,[U],q,X,$);throw new TypeError("val must be string, number or Buffer")}function m(P,U,q,X,$){function ge(Ke,Pe){return Ae===1?Ke[Pe]:Ke.readUInt16BE(Pe*Ae)}var Ae=1,at=P.length,Le=U.length;if(X!==void 0&&((X=String(X).toLowerCase())==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if(P.length<2||U.length<2)return-1;Ae=2,at/=2,Le/=2,q/=2}var Me;if($){var Xe=-1;for(Me=q;Me<at;Me++)if(ge(P,Me)===ge(U,Xe===-1?0:Me-Xe)){if(Xe===-1&&(Xe=Me),Me-Xe+1===Le)return Xe*Ae}else Xe!==-1&&(Me-=Me-Xe),Xe=-1}else for(q+Le>at&&(q=at-Le),Me=q;Me>=0;Me--){for(var et=!0,ze=0;ze<Le;ze++)if(ge(P,Me+ze)!==ge(U,ze)){et=!1;break}if(et)return Me}return-1}function _(P,U,q,X){q=Number(q)||0;var $=P.length-q;X?(X=Number(X))>$&&(X=$):X=$;var ge=U.length;if(ge%2!=0)throw new TypeError("Invalid hex string");X>ge/2&&(X=ge/2);for(var Ae=0;Ae<X;++Ae){var at=parseInt(U.substr(2*Ae,2),16);if(isNaN(at))return Ae;P[q+Ae]=at}return Ae}function x(P,U,q,X){return je(be(U,P.length-q),P,q,X)}function f(P,U,q,X){return je(Ue(U),P,q,X)}function E(P,U,q,X){return f(P,U,q,X)}function w(P,U,q,X){return je(De(U),P,q,X)}function T(P,U,q,X){return je(Re(U,P.length-q),P,q,X)}function R(P,U,q){return U===0&&q===P.length?ce.fromByteArray(P):ce.fromByteArray(P.slice(U,q))}function N(P,U,q){q=Math.min(P.length,q);for(var X=[],$=U;$<q;){var ge=P[$],Ae=null,at=ge>239?4:ge>223?3:ge>191?2:1;if($+at<=q){var Le,Me,Xe,et;switch(at){case 1:ge<128&&(Ae=ge);break;case 2:Le=P[$+1],(192&Le)==128&&(et=(31&ge)<<6|63&Le)>127&&(Ae=et);break;case 3:Le=P[$+1],Me=P[$+2],(192&Le)==128&&(192&Me)==128&&(et=(15&ge)<<12|(63&Le)<<6|63&Me)>2047&&(et<55296||et>57343)&&(Ae=et);break;case 4:Le=P[$+1],Me=P[$+2],Xe=P[$+3],(192&Le)==128&&(192&Me)==128&&(192&Xe)==128&&(et=(15&ge)<<18|(63&Le)<<12|(63&Me)<<6|63&Xe)>65535&&et<1114112&&(Ae=et)}}Ae===null?(Ae=65533,at=1):Ae>65535&&(Ae-=65536,X.push(Ae>>>10&1023|55296),Ae=56320|1023&Ae),X.push(Ae),$+=at}return j(X)}function j(P){var U=P.length;if(U<=Je)return String.fromCharCode.apply(String,P);for(var q="",X=0;X<U;)q+=String.fromCharCode.apply(String,P.slice(X,X+=Je));return q}function W(P,U,q){var X="";q=Math.min(P.length,q);for(var $=U;$<q;++$)X+=String.fromCharCode(127&P[$]);return X}function J(P,U,q){var X="";q=Math.min(P.length,q);for(var $=U;$<q;++$)X+=String.fromCharCode(P[$]);return X}function F(P,U,q){var X=P.length;(!U||U<0)&&(U=0),(!q||q<0||q>X)&&(q=X);for(var $="",ge=U;ge<q;++ge)$+=de(P[ge]);return $}function k(P,U,q){for(var X=P.slice(U,q),$="",ge=0;ge<X.length;ge+=2)$+=String.fromCharCode(X[ge]+256*X[ge+1]);return $}function K(P,U,q){if(P%1!=0||P<0)throw new RangeError("offset is not uint");if(P+U>q)throw new RangeError("Trying to access beyond buffer length")}function Y(P,U,q,X,$,ge){if(!p.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(U>$||U<ge)throw new RangeError('"value" argument is out of bounds');if(q+X>P.length)throw new RangeError("Index out of range")}function H(P,U,q,X){U<0&&(U=65535+U+1);for(var $=0,ge=Math.min(P.length-q,2);$<ge;++$)P[q+$]=(U&255<<8*(X?$:1-$))>>>8*(X?$:1-$)}function Q(P,U,q,X){U<0&&(U=4294967295+U+1);for(var $=0,ge=Math.min(P.length-q,4);$<ge;++$)P[q+$]=U>>>8*(X?$:3-$)&255}function re(P,U,q,X,$,ge){if(q+X>P.length)throw new RangeError("Index out of range");if(q<0)throw new RangeError("Index out of range")}function oe(P,U,q,X,$){return $||re(P,U,q,4,34028234663852886e22,-34028234663852886e22),ke.write(P,U,q,X,23,4),q+4}function me(P,U,q,X,$){return $||re(P,U,q,8,17976931348623157e292,-17976931348623157e292),ke.write(P,U,q,X,52,8),q+8}function he(P){if(P=Ee(P).replace(te,""),P.length<2)return"";for(;P.length%4!=0;)P+="=";return P}function Ee(P){return P.trim?P.trim():P.replace(/^\s+|\s+$/g,"")}function de(P){return P<16?"0"+P.toString(16):P.toString(16)}function be(P,U){U=U||1/0;for(var q,X=P.length,$=null,ge=[],Ae=0;Ae<X;++Ae){if((q=P.charCodeAt(Ae))>55295&&q<57344){if(!$){if(q>56319){(U-=3)>-1&&ge.push(239,191,189);continue}if(Ae+1===X){(U-=3)>-1&&ge.push(239,191,189);continue}$=q;continue}if(q<56320){(U-=3)>-1&&ge.push(239,191,189),$=q;continue}q=65536+($-55296<<10|q-56320)}else $&&(U-=3)>-1&&ge.push(239,191,189);if($=null,q<128){if((U-=1)<0)break;ge.push(q)}else if(q<2048){if((U-=2)<0)break;ge.push(q>>6|192,63&q|128)}else if(q<65536){if((U-=3)<0)break;ge.push(q>>12|224,q>>6&63|128,63&q|128)}else{if(!(q<1114112))throw new Error("Invalid code point");if((U-=4)<0)break;ge.push(q>>18|240,q>>12&63|128,q>>6&63|128,63&q|128)}}return ge}function Ue(P){for(var U=[],q=0;q<P.length;++q)U.push(255&P.charCodeAt(q));return U}function Re(P,U){for(var q,X,$,ge=[],Ae=0;Ae<P.length&&!((U-=2)<0);++Ae)q=P.charCodeAt(Ae),X=q>>8,$=q%256,ge.push($),ge.push(X);return ge}function De(P){return ce.toByteArray(he(P))}function je(P,U,q,X){for(var $=0;$<X&&!($+q>=U.length||$>=P.length);++$)U[$+q]=P[$];return $}function ve(P){return P!==P}var ce=O("base64-js"),ke=O("ieee754"),Ne=O("isarray");S.Buffer=p,S.SlowBuffer=d,S.INSPECT_MAX_BYTES=50,p.TYPED_ARRAY_SUPPORT=A.TYPED_ARRAY_SUPPORT!==void 0?A.TYPED_ARRAY_SUPPORT:function(){try{var P=new Uint8Array(1);return P.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},P.foo()===42&&typeof P.subarray=="function"&&P.subarray(1,1).byteLength===0}catch(U){return!1}}(),S.kMaxLength=C(),p.poolSize=8192,p._augment=function(P){return P.__proto__=p.prototype,P},p.from=function(P,U,q){return c(null,P,U,q)},p.TYPED_ARRAY_SUPPORT&&(p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0})),p.alloc=function(P,U,q){return n(null,P,U,q)},p.allocUnsafe=function(P){return o(null,P)},p.allocUnsafeSlow=function(P){return o(null,P)},p.isBuffer=function(P){return!(P==null||!P._isBuffer)},p.compare=function(P,U){if(!p.isBuffer(P)||!p.isBuffer(U))throw new TypeError("Arguments must be Buffers");if(P===U)return 0;for(var q=P.length,X=U.length,$=0,ge=Math.min(q,X);$<ge;++$)if(P[$]!==U[$]){q=P[$],X=U[$];break}return q<X?-1:X<q?1:0},p.isEncoding=function(P){switch(String(P).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(P,U){if(!Ne(P))throw new TypeError('"list" argument must be an Array of Buffers');if(P.length===0)return p.alloc(0);var q;if(U===void 0)for(U=0,q=0;q<P.length;++q)U+=P[q].length;var X=p.allocUnsafe(U),$=0;for(q=0;q<P.length;++q){var ge=P[q];if(!p.isBuffer(ge))throw new TypeError('"list" argument must be an Array of Buffers');ge.copy(X,$),$+=ge.length}return X},p.byteLength=v,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var P=this.length;if(P%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var U=0;U<P;U+=2)b(this,U,U+1);return this},p.prototype.swap32=function(){var P=this.length;if(P%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var U=0;U<P;U+=4)b(this,U,U+3),b(this,U+1,U+2);return this},p.prototype.swap64=function(){var P=this.length;if(P%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var U=0;U<P;U+=8)b(this,U,U+7),b(this,U+1,U+6),b(this,U+2,U+5),b(this,U+3,U+4);return this},p.prototype.toString=function(){var P=0|this.length;return P===0?"":arguments.length===0?N(this,0,P):y.apply(this,arguments)},p.prototype.equals=function(P){if(!p.isBuffer(P))throw new TypeError("Argument must be a Buffer");return this===P||p.compare(this,P)===0},p.prototype.inspect=function(){var P="",U=S.INSPECT_MAX_BYTES;return this.length>0&&(P=this.toString("hex",0,U).match(/.{2}/g).join(" "),this.length>U&&(P+=" ... ")),"<Buffer "+P+">"},p.prototype.compare=function(P,U,q,X,$){if(!p.isBuffer(P))throw new TypeError("Argument must be a Buffer");if(U===void 0&&(U=0),q===void 0&&(q=P?P.length:0),X===void 0&&(X=0),$===void 0&&($=this.length),U<0||q>P.length||X<0||$>this.length)throw new RangeError("out of range index");if(X>=$&&U>=q)return 0;if(X>=$)return-1;if(U>=q)return 1;if(U>>>=0,q>>>=0,X>>>=0,$>>>=0,this===P)return 0;for(var ge=$-X,Ae=q-U,at=Math.min(ge,Ae),Le=this.slice(X,$),Me=P.slice(U,q),Xe=0;Xe<at;++Xe)if(Le[Xe]!==Me[Xe]){ge=Le[Xe],Ae=Me[Xe];break}return ge<Ae?-1:Ae<ge?1:0},p.prototype.includes=function(P,U,q){return this.indexOf(P,U,q)!==-1},p.prototype.indexOf=function(P,U,q){return g(this,P,U,q,!0)},p.prototype.lastIndexOf=function(P,U,q){return g(this,P,U,q,!1)},p.prototype.write=function(P,U,q,X){if(U===void 0)X="utf8",q=this.length,U=0;else if(q===void 0&&typeof U=="string")X=U,q=this.length,U=0;else{if(!isFinite(U))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");U|=0,isFinite(q)?(q|=0,X===void 0&&(X="utf8")):(X=q,q=void 0)}var $=this.length-U;if((q===void 0||q>$)&&(q=$),P.length>0&&(q<0||U<0)||U>this.length)throw new RangeError("Attempt to write outside buffer bounds");X||(X="utf8");for(var ge=!1;;)switch(X){case"hex":return _(this,P,U,q);case"utf8":case"utf-8":return x(this,P,U,q);case"ascii":return f(this,P,U,q);case"latin1":case"binary":return E(this,P,U,q);case"base64":return w(this,P,U,q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,P,U,q);default:if(ge)throw new TypeError("Unknown encoding: "+X);X=(""+X).toLowerCase(),ge=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Je=4096;p.prototype.slice=function(P,U){var q=this.length;P=~~P,U=U===void 0?q:~~U,P<0?(P+=q)<0&&(P=0):P>q&&(P=q),U<0?(U+=q)<0&&(U=0):U>q&&(U=q),U<P&&(U=P);var X;if(p.TYPED_ARRAY_SUPPORT)X=this.subarray(P,U),X.__proto__=p.prototype;else{var $=U-P;X=new p($,void 0);for(var ge=0;ge<$;++ge)X[ge]=this[ge+P]}return X},p.prototype.readUIntLE=function(P,U,q){P|=0,U|=0,q||K(P,U,this.length);for(var X=this[P],$=1,ge=0;++ge<U&&($*=256);)X+=this[P+ge]*$;return X},p.prototype.readUIntBE=function(P,U,q){P|=0,U|=0,q||K(P,U,this.length);for(var X=this[P+--U],$=1;U>0&&($*=256);)X+=this[P+--U]*$;return X},p.prototype.readUInt8=function(P,U){return U||K(P,1,this.length),this[P]},p.prototype.readUInt16LE=function(P,U){return U||K(P,2,this.length),this[P]|this[P+1]<<8},p.prototype.readUInt16BE=function(P,U){return U||K(P,2,this.length),this[P]<<8|this[P+1]},p.prototype.readUInt32LE=function(P,U){return U||K(P,4,this.length),(this[P]|this[P+1]<<8|this[P+2]<<16)+16777216*this[P+3]},p.prototype.readUInt32BE=function(P,U){return U||K(P,4,this.length),16777216*this[P]+(this[P+1]<<16|this[P+2]<<8|this[P+3])},p.prototype.readIntLE=function(P,U,q){P|=0,U|=0,q||K(P,U,this.length);for(var X=this[P],$=1,ge=0;++ge<U&&($*=256);)X+=this[P+ge]*$;return $*=128,X>=$&&(X-=Math.pow(2,8*U)),X},p.prototype.readIntBE=function(P,U,q){P|=0,U|=0,q||K(P,U,this.length);for(var X=U,$=1,ge=this[P+--X];X>0&&($*=256);)ge+=this[P+--X]*$;return $*=128,ge>=$&&(ge-=Math.pow(2,8*U)),ge},p.prototype.readInt8=function(P,U){return U||K(P,1,this.length),128&this[P]?-1*(255-this[P]+1):this[P]},p.prototype.readInt16LE=function(P,U){U||K(P,2,this.length);var q=this[P]|this[P+1]<<8;return 32768&q?4294901760|q:q},p.prototype.readInt16BE=function(P,U){U||K(P,2,this.length);var q=this[P+1]|this[P]<<8;return 32768&q?4294901760|q:q},p.prototype.readInt32LE=function(P,U){return U||K(P,4,this.length),this[P]|this[P+1]<<8|this[P+2]<<16|this[P+3]<<24},p.prototype.readInt32BE=function(P,U){return U||K(P,4,this.length),this[P]<<24|this[P+1]<<16|this[P+2]<<8|this[P+3]},p.prototype.readFloatLE=function(P,U){return U||K(P,4,this.length),ke.read(this,P,!0,23,4)},p.prototype.readFloatBE=function(P,U){return U||K(P,4,this.length),ke.read(this,P,!1,23,4)},p.prototype.readDoubleLE=function(P,U){return U||K(P,8,this.length),ke.read(this,P,!0,52,8)},p.prototype.readDoubleBE=function(P,U){return U||K(P,8,this.length),ke.read(this,P,!1,52,8)},p.prototype.writeUIntLE=function(P,U,q,X){(P=+P,U|=0,q|=0,!X)&&Y(this,P,U,q,Math.pow(2,8*q)-1,0);var $=1,ge=0;for(this[U]=255&P;++ge<q&&($*=256);)this[U+ge]=P/$&255;return U+q},p.prototype.writeUIntBE=function(P,U,q,X){(P=+P,U|=0,q|=0,!X)&&Y(this,P,U,q,Math.pow(2,8*q)-1,0);var $=q-1,ge=1;for(this[U+$]=255&P;--$>=0&&(ge*=256);)this[U+$]=P/ge&255;return U+q},p.prototype.writeUInt8=function(P,U,q){return P=+P,U|=0,q||Y(this,P,U,1,255,0),p.TYPED_ARRAY_SUPPORT||(P=Math.floor(P)),this[U]=255&P,U+1},p.prototype.writeUInt16LE=function(P,U,q){return P=+P,U|=0,q||Y(this,P,U,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[U]=255&P,this[U+1]=P>>>8):H(this,P,U,!0),U+2},p.prototype.writeUInt16BE=function(P,U,q){return P=+P,U|=0,q||Y(this,P,U,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[U]=P>>>8,this[U+1]=255&P):H(this,P,U,!1),U+2},p.prototype.writeUInt32LE=function(P,U,q){return P=+P,U|=0,q||Y(this,P,U,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[U+3]=P>>>24,this[U+2]=P>>>16,this[U+1]=P>>>8,this[U]=255&P):Q(this,P,U,!0),U+4},p.prototype.writeUInt32BE=function(P,U,q){return P=+P,U|=0,q||Y(this,P,U,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[U]=P>>>24,this[U+1]=P>>>16,this[U+2]=P>>>8,this[U+3]=255&P):Q(this,P,U,!1),U+4},p.prototype.writeIntLE=function(P,U,q,X){if(P=+P,U|=0,!X){var $=Math.pow(2,8*q-1);Y(this,P,U,q,$-1,-$)}var ge=0,Ae=1,at=0;for(this[U]=255&P;++ge<q&&(Ae*=256);)P<0&&at===0&&this[U+ge-1]!==0&&(at=1),this[U+ge]=(P/Ae>>0)-at&255;return U+q},p.prototype.writeIntBE=function(P,U,q,X){if(P=+P,U|=0,!X){var $=Math.pow(2,8*q-1);Y(this,P,U,q,$-1,-$)}var ge=q-1,Ae=1,at=0;for(this[U+ge]=255&P;--ge>=0&&(Ae*=256);)P<0&&at===0&&this[U+ge+1]!==0&&(at=1),this[U+ge]=(P/Ae>>0)-at&255;return U+q},p.prototype.writeInt8=function(P,U,q){return P=+P,U|=0,q||Y(this,P,U,1,127,-128),p.TYPED_ARRAY_SUPPORT||(P=Math.floor(P)),P<0&&(P=255+P+1),this[U]=255&P,U+1},p.prototype.writeInt16LE=function(P,U,q){return P=+P,U|=0,q||Y(this,P,U,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[U]=255&P,this[U+1]=P>>>8):H(this,P,U,!0),U+2},p.prototype.writeInt16BE=function(P,U,q){return P=+P,U|=0,q||Y(this,P,U,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[U]=P>>>8,this[U+1]=255&P):H(this,P,U,!1),U+2},p.prototype.writeInt32LE=function(P,U,q){return P=+P,U|=0,q||Y(this,P,U,4,2147483647,-2147483648),p.TYPED_ARRAY_SUPPORT?(this[U]=255&P,this[U+1]=P>>>8,this[U+2]=P>>>16,this[U+3]=P>>>24):Q(this,P,U,!0),U+4},p.prototype.writeInt32BE=function(P,U,q){return P=+P,U|=0,q||Y(this,P,U,4,2147483647,-2147483648),P<0&&(P=4294967295+P+1),p.TYPED_ARRAY_SUPPORT?(this[U]=P>>>24,this[U+1]=P>>>16,this[U+2]=P>>>8,this[U+3]=255&P):Q(this,P,U,!1),U+4},p.prototype.writeFloatLE=function(P,U,q){return oe(this,P,U,!0,q)},p.prototype.writeFloatBE=function(P,U,q){return oe(this,P,U,!1,q)},p.prototype.writeDoubleLE=function(P,U,q){return me(this,P,U,!0,q)},p.prototype.writeDoubleBE=function(P,U,q){return me(this,P,U,!1,q)},p.prototype.copy=function(P,U,q,X){if(q||(q=0),X||X===0||(X=this.length),U>=P.length&&(U=P.length),U||(U=0),X>0&&X<q&&(X=q),X===q)return 0;if(P.length===0||this.length===0)return 0;if(U<0)throw new RangeError("targetStart out of bounds");if(q<0||q>=this.length)throw new RangeError("sourceStart out of bounds");if(X<0)throw new RangeError("sourceEnd out of bounds");X>this.length&&(X=this.length),P.length-U<X-q&&(X=P.length-U+q);var $,ge=X-q;if(this===P&&q<U&&U<X)for($=ge-1;$>=0;--$)P[$+U]=this[$+q];else if(ge<1e3||!p.TYPED_ARRAY_SUPPORT)for($=0;$<ge;++$)P[$+U]=this[$+q];else Uint8Array.prototype.set.call(P,this.subarray(q,q+ge),U);return ge},p.prototype.fill=function(P,U,q,X){if(typeof P=="string"){if(typeof U=="string"?(X=U,U=0,q=this.length):typeof q=="string"&&(X=q,q=this.length),P.length===1){var $=P.charCodeAt(0);$<256&&(P=$)}if(X!==void 0&&typeof X!="string")throw new TypeError("encoding must be a string");if(typeof X=="string"&&!p.isEncoding(X))throw new TypeError("Unknown encoding: "+X)}else typeof P=="number"&&(P&=255);if(U<0||this.length<U||this.length<q)throw new RangeError("Out of range index");if(q<=U)return this;U>>>=0,q=q===void 0?this.length:q>>>0,P||(P=0);var ge;if(typeof P=="number")for(ge=U;ge<q;++ge)this[ge]=P;else{var Ae=p.isBuffer(P)?P:be(new p(P,X).toString()),at=Ae.length;for(ge=0;ge<q-U;++ge)this[ge+U]=Ae[ge%at]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(O,D,S){D.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],40:[function(O,D,S){"use strict";var A=function(){this.buffer=[],this.fns=[]};A.prototype.push=function(h,p){if(this.fns.length)return this.fns.shift()(null,h);var c={data:h,priority:p},s=C(this.buffer,c,function(n){return n.priority});this.buffer.splice(s,0,c)},A.prototype.next=function(){var h=this;return function(p){if(h.buffer.length)return p(null,h.buffer.pop().data);h.fns.push(p)}};var C=function(h,p,c){p=c(p);for(var s=0,n=h?h.length:s;s<n;){var o=s+n>>>1;c(h[o])<p?s=o+1:n=o}return s};D.exports=A},{}],41:[function(O,D,S){function A(a){var r=this,t=l.call(arguments,1);return new Promise(function(d,v){function y(m){var _;try{_=a.next(m)}catch(x){return v(x)}g(_)}function b(m){var _;try{_=a.throw(m)}catch(x){return v(x)}g(_)}function g(m){if(m.done)return d(m.value);var _=C.call(r,m.value);return _&&s(_)?_.then(y,b):b(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(m.value)+'"'))}if(typeof a=="function"&&(a=a.apply(r,t)),!a||typeof a.next!="function")return d(a);y()})}function C(a){return a&&(s(a)?a:o(a)||n(a)?A.call(this,a):typeof a=="function"?h.call(this,a):Array.isArray(a)?p.call(this,a):i(a)?c.call(this,a):a)}function h(a){var r=this;return new Promise(function(t,d){a.call(r,function(v,y){if(v)return d(v);arguments.length>2&&(y=l.call(arguments,1)),t(y)})})}function p(a){return Promise.all(a.map(C,this))}function c(a){for(var r=new a.constructor,t=Object.keys(a),d=[],v=0;v<t.length;v++){var y=t[v],b=C.call(this,a[y]);b&&s(b)?function(g,m){r[m]=void 0,d.push(g.then(function(_){r[m]=_}))}(b,y):r[y]=a[y]}return Promise.all(d).then(function(){return r})}function s(a){return typeof a.then=="function"}function n(a){return typeof a.next=="function"&&typeof a.throw=="function"}function o(a){var r=a.constructor;return!!r&&(r.name==="GeneratorFunction"||r.displayName==="GeneratorFunction"||n(r.prototype))}function i(a){return Object==a.constructor}var l=Array.prototype.slice;D.exports=A.default=A.co=A,A.wrap=function(a){function r(){return A.call(this,a.apply(this,arguments))}return r.__generatorFunction__=a,r}},{}],42:[function(O,D,S){D.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],43:[function(O,D,S){"use strict";function A(p,c){if(!(this instanceof A))return new A(p,c);this.src=p,this._withAccess=c}function C(p,c){return p[c]===void 0&&p.__lookupGetter__(c)===void 0&&p.__lookupSetter__(c)===void 0}var h=Array.prototype.slice;D.exports=A,A.prototype.withAccess=function(p){return this._withAccess=p!==!1,this},A.prototype.pick=function(p){return Array.isArray(p)||(p=h.call(arguments)),p.length&&(this.keys=p),this},A.prototype.to=function(p){if(p=p||{},!this.src)return p;var c=this.keys||Object.keys(this.src);if(!this._withAccess){for(var s=0;s<c.length;s++)n=c[s],p[n]===void 0&&(p[n]=this.src[n]);return p}for(var s=0;s<c.length;s++){var n=c[s];if(C(p,n)){var o=this.src.__lookupGetter__(n),i=this.src.__lookupSetter__(n);o&&p.__defineGetter__(n,o),i&&p.__defineSetter__(n,i),o||i||(p[n]=this.src[n])}}return p},A.prototype.toCover=function(p){for(var c=this.keys||Object.keys(this.src),s=0;s<c.length;s++){var n=c[s];delete p[n];var o=this.src.__lookupGetter__(n),i=this.src.__lookupSetter__(n);o&&p.__defineGetter__(n,o),i&&p.__defineSetter__(n,i),o||i||(p[n]=this.src[n])}},A.prototype.override=A.prototype.toCover,A.prototype.and=function(p){var c={};return this.to(c),this.src=p,this.to(c),this.src=c,this}},{}],44:[function(O,D,S){O("../../modules/es6.string.iterator"),O("../../modules/es6.array.from"),D.exports=O("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(O,D,S){var A=O("../../modules/_core"),C=A.JSON||(A.JSON={stringify:JSON.stringify});D.exports=function(h){return C.stringify.apply(C,arguments)}},{"../../modules/_core":65}],46:[function(O,D,S){O("../../modules/es6.object.assign"),D.exports=O("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(O,D,S){O("../../modules/es6.object.create");var A=O("../../modules/_core").Object;D.exports=function(C,h){return A.create(C,h)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(O,D,S){O("../../modules/es6.object.define-property");var A=O("../../modules/_core").Object;D.exports=function(C,h,p){return A.defineProperty(C,h,p)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(O,D,S){O("../../modules/es6.object.get-own-property-names");var A=O("../../modules/_core").Object;D.exports=function(C){return A.getOwnPropertyNames(C)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(O,D,S){O("../../modules/es6.object.get-prototype-of"),D.exports=O("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(O,D,S){O("../../modules/es6.object.keys"),D.exports=O("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(O,D,S){O("../modules/es6.object.to-string"),O("../modules/es6.string.iterator"),O("../modules/web.dom.iterable"),O("../modules/es6.promise"),O("../modules/es7.promise.finally"),O("../modules/es7.promise.try"),D.exports=O("../modules/_core").Promise},{"../modules/_core":65,"../modules/es6.object.to-string":142,"../modules/es6.promise":143,"../modules/es6.string.iterator":145,"../modules/es7.promise.finally":147,"../modules/es7.promise.try":148,"../modules/web.dom.iterable":151}],53:[function(O,D,S){O("../modules/web.immediate"),D.exports=O("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(O,D,S){O("../../modules/es6.string.from-code-point"),D.exports=O("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(O,D,S){O("../../modules/es6.function.has-instance"),D.exports=O("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(O,D,S){O("../../modules/es6.symbol"),O("../../modules/es6.object.to-string"),O("../../modules/es7.symbol.async-iterator"),O("../../modules/es7.symbol.observable"),D.exports=O("../../modules/_core").Symbol},{"../../modules/_core":65,"../../modules/es6.object.to-string":142,"../../modules/es6.symbol":146,"../../modules/es7.symbol.async-iterator":149,"../../modules/es7.symbol.observable":150}],57:[function(O,D,S){O("../../modules/es6.string.iterator"),O("../../modules/web.dom.iterable"),D.exports=O("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(O,D,S){D.exports=function(A){if(typeof A!="function")throw TypeError(A+" is not a function!");return A}},{}],59:[function(O,D,S){D.exports=function(){}},{}],60:[function(O,D,S){D.exports=function(A,C,h,p){if(!(A instanceof C)||p!==void 0&&p in A)throw TypeError(h+": incorrect invocation!");return A}},{}],61:[function(O,D,S){var A=O("./_is-object");D.exports=function(C){if(!A(C))throw TypeError(C+" is not an object!");return C}},{"./_is-object":85}],62:[function(O,D,S){var A=O("./_to-iobject"),C=O("./_to-length"),h=O("./_to-absolute-index");D.exports=function(p){return function(c,s,n){var o,i=A(c),l=C(i.length),a=h(n,l);if(p&&s!=s){for(;l>a;)if((o=i[a++])!=o)return!0}else for(;l>a;a++)if((p||a in i)&&i[a]===s)return p||a||0;return!p&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(O,D,S){var A=O("./_cof"),C=O("./_wks")("toStringTag"),h=A(function(){return arguments}())=="Arguments",p=function(c,s){try{return c[s]}catch(n){}};D.exports=function(c){var s,n,o;return c===void 0?"Undefined":c===null?"Null":typeof(n=p(s=Object(c),C))=="string"?n:h?A(s):(o=A(s))=="Object"&&typeof s.callee=="function"?"Arguments":o}},{"./_cof":64,"./_wks":131}],64:[function(O,D,S){var A={}.toString;D.exports=function(C){return A.call(C).slice(8,-1)}},{}],65:[function(O,D,S){var A=D.exports={version:"2.5.7"};typeof __e=="number"&&(__e=A)},{}],66:[function(O,D,S){"use strict";var A=O("./_object-dp"),C=O("./_property-desc");D.exports=function(h,p,c){p in h?A.f(h,p,C(0,c)):h[p]=c}},{"./_object-dp":98,"./_property-desc":111}],67:[function(O,D,S){var A=O("./_a-function");D.exports=function(C,h,p){if(A(C),h===void 0)return C;switch(p){case 1:return function(c){return C.call(h,c)};case 2:return function(c,s){return C.call(h,c,s)};case 3:return function(c,s,n){return C.call(h,c,s,n)}}return function(){return C.apply(h,arguments)}}},{"./_a-function":58}],68:[function(O,D,S){D.exports=function(A){if(A==null)throw TypeError("Can't call method on "+A);return A}},{}],69:[function(O,D,S){D.exports=!O("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(O,D,S){var A=O("./_is-object"),C=O("./_global").document,h=A(C)&&A(C.createElement);D.exports=function(p){return h?C.createElement(p):{}}},{"./_global":76,"./_is-object":85}],71:[function(O,D,S){D.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(O,D,S){var A=O("./_object-keys"),C=O("./_object-gops"),h=O("./_object-pie");D.exports=function(p){var c=A(p),s=C.f;if(s)for(var n,o=s(p),i=h.f,l=0;o.length>l;)i.call(p,n=o[l++])&&c.push(n);return c}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(O,D,S){var A=O("./_global"),C=O("./_core"),h=O("./_ctx"),p=O("./_hide"),c=O("./_has"),s=function(n,o,i){var l,a,r,t=n&s.F,d=n&s.G,v=n&s.S,y=n&s.P,b=n&s.B,g=n&s.W,m=d?C:C[o]||(C[o]={}),_=m.prototype,x=d?A:v?A[o]:(A[o]||{}).prototype;d&&(i=o);for(l in i)(a=!t&&x&&x[l]!==void 0)&&c(m,l)||(r=a?x[l]:i[l],m[l]=d&&typeof x[l]!="function"?i[l]:b&&a?h(r,A):g&&x[l]==r?function(f){var E=function(w,T,R){if(this instanceof f){switch(arguments.length){case 0:return new f;case 1:return new f(w);case 2:return new f(w,T)}return new f(w,T,R)}return f.apply(this,arguments)};return E.prototype=f.prototype,E}(r):y&&typeof r=="function"?h(Function.call,r):r,y&&((m.virtual||(m.virtual={}))[l]=r,n&s.R&&_&&!_[l]&&p(_,l,r)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,D.exports=s},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(O,D,S){D.exports=function(A){try{return!!A()}catch(C){return!0}}},{}],75:[function(O,D,S){var A=O("./_ctx"),C=O("./_iter-call"),h=O("./_is-array-iter"),p=O("./_an-object"),c=O("./_to-length"),s=O("./core.get-iterator-method"),n={},o={},S=D.exports=function(i,l,a,r,t){var d,v,y,b,g=t?function(){return i}:s(i),m=A(a,r,l?2:1),_=0;if(typeof g!="function")throw TypeError(i+" is not iterable!");if(h(g)){for(d=c(i.length);d>_;_++)if((b=l?m(p(v=i[_])[0],v[1]):m(i[_]))===n||b===o)return b}else for(y=g.call(i);!(v=y.next()).done;)if((b=C(y,m,v.value,l))===n||b===o)return b};S.BREAK=n,S.RETURN=o},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(O,D,S){var A=D.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=A)},{}],77:[function(O,D,S){var A={}.hasOwnProperty;D.exports=function(C,h){return A.call(C,h)}},{}],78:[function(O,D,S){var A=O("./_object-dp"),C=O("./_property-desc");D.exports=O("./_descriptors")?function(h,p,c){return A.f(h,p,C(1,c))}:function(h,p,c){return h[p]=c,h}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(O,D,S){var A=O("./_global").document;D.exports=A&&A.documentElement},{"./_global":76}],80:[function(O,D,S){D.exports=!O("./_descriptors")&&!O("./_fails")(function(){return Object.defineProperty(O("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(O,D,S){D.exports=function(A,C,h){var p=h===void 0;switch(C.length){case 0:return p?A():A.call(h);case 1:return p?A(C[0]):A.call(h,C[0]);case 2:return p?A(C[0],C[1]):A.call(h,C[0],C[1]);case 3:return p?A(C[0],C[1],C[2]):A.call(h,C[0],C[1],C[2]);case 4:return p?A(C[0],C[1],C[2],C[3]):A.call(h,C[0],C[1],C[2],C[3])}return A.apply(h,C)}},{}],82:[function(O,D,S){var A=O("./_cof");D.exports=Object("z").propertyIsEnumerable(0)?Object:function(C){return A(C)=="String"?C.split(""):Object(C)}},{"./_cof":64}],83:[function(O,D,S){var A=O("./_iterators"),C=O("./_wks")("iterator"),h=Array.prototype;D.exports=function(p){return p!==void 0&&(A.Array===p||h[C]===p)}},{"./_iterators":91,"./_wks":131}],84:[function(O,D,S){var A=O("./_cof");D.exports=Array.isArray||function(C){return A(C)=="Array"}},{"./_cof":64}],85:[function(O,D,S){D.exports=function(A){return typeof A=="object"?A!==null:typeof A=="function"}},{}],86:[function(O,D,S){var A=O("./_an-object");D.exports=function(C,h,p,c){try{return c?h(A(p)[0],p[1]):h(p)}catch(n){var s=C.return;throw s!==void 0&&A(s.call(C)),n}}},{"./_an-object":61}],87:[function(O,D,S){"use strict";var A=O("./_object-create"),C=O("./_property-desc"),h=O("./_set-to-string-tag"),p={};O("./_hide")(p,O("./_wks")("iterator"),function(){return this}),D.exports=function(c,s,n){c.prototype=A(p,{next:C(1,n)}),h(c,s+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(O,D,S){"use strict";var A=O("./_library"),C=O("./_export"),h=O("./_redefine"),p=O("./_hide"),c=O("./_iterators"),s=O("./_iter-create"),n=O("./_set-to-string-tag"),o=O("./_object-gpo"),i=O("./_wks")("iterator"),l=!([].keys&&"next"in[].keys()),a=function(){return this};D.exports=function(r,t,d,v,y,b,g){s(d,t,v);var m,_,x,f=function(F){if(!l&&F in R)return R[F];switch(F){case"keys":case"values":return function(){return new d(this,F)}}return function(){return new d(this,F)}},E=t+" Iterator",w=y=="values",T=!1,R=r.prototype,N=R[i]||R["@@iterator"]||y&&R[y],j=N||f(y),W=y?w?f("entries"):j:void 0,J=t=="Array"&&R.entries||N;if(J&&(x=o(J.call(new r)))!==Object.prototype&&x.next&&(n(x,E,!0),A||typeof x[i]=="function"||p(x,i,a)),w&&N&&N.name!=="values"&&(T=!0,j=function(){return N.call(this)}),A&&!g||!l&&!T&&R[i]||p(R,i,j),c[t]=j,c[E]=a,y)if(m={values:w?j:f("values"),keys:b?j:f("keys"),entries:W},g)for(_ in m)_ in R||h(R,_,m[_]);else C(C.P+C.F*(l||T),t,m);return m}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(O,D,S){var A=O("./_wks")("iterator"),C=!1;try{var h=[7][A]();h.return=function(){C=!0},Array.from(h,function(){throw 2})}catch(p){}D.exports=function(p,c){if(!c&&!C)return!1;var s=!1;try{var n=[7],o=n[A]();o.next=function(){return{done:s=!0}},n[A]=function(){return o},p(n)}catch(i){}return s}},{"./_wks":131}],90:[function(O,D,S){D.exports=function(A,C){return{value:C,done:!!A}}},{}],91:[function(O,D,S){D.exports={}},{}],92:[function(O,D,S){D.exports=!0},{}],93:[function(O,D,S){var A=O("./_uid")("meta"),C=O("./_is-object"),h=O("./_has"),p=O("./_object-dp").f,c=0,s=Object.isExtensible||function(){return!0},n=!O("./_fails")(function(){return s(Object.preventExtensions({}))}),o=function(t){p(t,A,{value:{i:"O"+ ++c,w:{}}})},i=function(t,d){if(!C(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!h(t,A)){if(!s(t))return"F";if(!d)return"E";o(t)}return t[A].i},l=function(t,d){if(!h(t,A)){if(!s(t))return!0;if(!d)return!1;o(t)}return t[A].w},a=function(t){return n&&r.NEED&&s(t)&&!h(t,A)&&o(t),t},r=D.exports={KEY:A,NEED:!1,fastKey:i,getWeak:l,onFreeze:a}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(O,D,S){var A=O("./_global"),C=O("./_task").set,h=A.MutationObserver||A.WebKitMutationObserver,p=A.process,c=A.Promise,s=O("./_cof")(p)=="process";D.exports=function(){var n,o,i,l=function(){var d,v;for(s&&(d=p.domain)&&d.exit();n;){v=n.fn,n=n.next;try{v()}catch(y){throw n?i():o=void 0,y}}o=void 0,d&&d.enter()};if(s)i=function(){p.nextTick(l)};else if(!h||A.navigator&&A.navigator.standalone)if(c&&c.resolve){var a=c.resolve(void 0);i=function(){a.then(l)}}else i=function(){C.call(A,l)};else{var r=!0,t=document.createTextNode("");new h(l).observe(t,{characterData:!0}),i=function(){t.data=r=!r}}return function(d){var v={fn:d,next:void 0};o&&(o.next=v),n||(n=v,i()),o=v}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(O,D,S){"use strict";function A(h){var p,c;this.promise=new h(function(s,n){if(p!==void 0||c!==void 0)throw TypeError("Bad Promise constructor");p=s,c=n}),this.resolve=C(p),this.reject=C(c)}var C=O("./_a-function");D.exports.f=function(h){return new A(h)}},{"./_a-function":58}],96:[function(O,D,S){"use strict";var A=O("./_object-keys"),C=O("./_object-gops"),h=O("./_object-pie"),p=O("./_to-object"),c=O("./_iobject"),s=Object.assign;D.exports=!s||O("./_fails")(function(){var n={},o={},i=Symbol(),l="abcdefghijklmnopqrst";return n[i]=7,l.split("").forEach(function(a){o[a]=a}),s({},n)[i]!=7||Object.keys(s({},o)).join("")!=l})?function(n,o){for(var i=p(n),l=arguments.length,a=1,r=C.f,t=h.f;l>a;)for(var d,v=c(arguments[a++]),y=r?A(v).concat(r(v)):A(v),b=y.length,g=0;b>g;)t.call(v,d=y[g++])&&(i[d]=v[d]);return i}:s},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(O,D,S){var A=O("./_an-object"),C=O("./_object-dps"),h=O("./_enum-bug-keys"),p=O("./_shared-key")("IE_PROTO"),c=function(){},s=function(){var n,o=O("./_dom-create")("iframe"),i=h.length;for(o.style.display="none",O("./_html").appendChild(o),o.src="javascript:",n=o.contentWindow.document,n.open(),n.write("<script>document.F=Object</script>"),n.close(),s=n.F;i--;)delete s.prototype[h[i]];return s()};D.exports=Object.create||function(n,o){var i;return n!==null?(c.prototype=A(n),i=new c,c.prototype=null,i[p]=n):i=s(),o===void 0?i:C(i,o)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(O,D,S){var A=O("./_an-object"),C=O("./_ie8-dom-define"),h=O("./_to-primitive"),p=Object.defineProperty;S.f=O("./_descriptors")?Object.defineProperty:function(c,s,n){if(A(c),s=h(s,!0),A(n),C)try{return p(c,s,n)}catch(o){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(c[s]=n.value),c}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(O,D,S){var A=O("./_object-dp"),C=O("./_an-object"),h=O("./_object-keys");D.exports=O("./_descriptors")?Object.defineProperties:function(p,c){C(p);for(var s,n=h(c),o=n.length,i=0;o>i;)A.f(p,s=n[i++],c[s]);return p}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(O,D,S){var A=O("./_object-pie"),C=O("./_property-desc"),h=O("./_to-iobject"),p=O("./_to-primitive"),c=O("./_has"),s=O("./_ie8-dom-define"),n=Object.getOwnPropertyDescriptor;S.f=O("./_descriptors")?n:function(o,i){if(o=h(o),i=p(i,!0),s)try{return n(o,i)}catch(l){}if(c(o,i))return C(!A.f.call(o,i),o[i])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(O,D,S){var A=O("./_to-iobject"),C=O("./_object-gopn").f,h={}.toString,p=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(s){try{return C(s)}catch(n){return p.slice()}};D.exports.f=function(s){return p&&h.call(s)=="[object Window]"?c(s):C(A(s))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(O,D,S){var A=O("./_object-keys-internal"),C=O("./_enum-bug-keys").concat("length","prototype");S.f=Object.getOwnPropertyNames||function(h){return A(h,C)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(O,D,S){S.f=Object.getOwnPropertySymbols},{}],104:[function(O,D,S){var A=O("./_has"),C=O("./_to-object"),h=O("./_shared-key")("IE_PROTO"),p=Object.prototype;D.exports=Object.getPrototypeOf||function(c){return c=C(c),A(c,h)?c[h]:typeof c.constructor=="function"&&c instanceof c.constructor?c.constructor.prototype:c instanceof Object?p:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(O,D,S){var A=O("./_has"),C=O("./_to-iobject"),h=O("./_array-includes")(!1),p=O("./_shared-key")("IE_PROTO");D.exports=function(c,s){var n,o=C(c),i=0,l=[];for(n in o)n!=p&&A(o,n)&&l.push(n);for(;s.length>i;)A(o,n=s[i++])&&(~h(l,n)||l.push(n));return l}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(O,D,S){var A=O("./_object-keys-internal"),C=O("./_enum-bug-keys");D.exports=Object.keys||function(h){return A(h,C)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(O,D,S){S.f={}.propertyIsEnumerable},{}],108:[function(O,D,S){var A=O("./_export"),C=O("./_core"),h=O("./_fails");D.exports=function(p,c){var s=(C.Object||{})[p]||Object[p],n={};n[p]=c(s),A(A.S+A.F*h(function(){s(1)}),"Object",n)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(O,D,S){D.exports=function(A){try{return{e:!1,v:A()}}catch(C){return{e:!0,v:C}}}},{}],110:[function(O,D,S){var A=O("./_an-object"),C=O("./_is-object"),h=O("./_new-promise-capability");D.exports=function(p,c){if(A(p),C(c)&&c.constructor===p)return c;var s=h.f(p);return(0,s.resolve)(c),s.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(O,D,S){D.exports=function(A,C){return{enumerable:!(1&A),configurable:!(2&A),writable:!(4&A),value:C}}},{}],112:[function(O,D,S){var A=O("./_hide");D.exports=function(C,h,p){for(var c in h)p&&C[c]?C[c]=h[c]:A(C,c,h[c]);return C}},{"./_hide":78}],113:[function(O,D,S){D.exports=O("./_hide")},{"./_hide":78}],114:[function(O,D,S){"use strict";var A=O("./_global"),C=O("./_core"),h=O("./_object-dp"),p=O("./_descriptors"),c=O("./_wks")("species");D.exports=function(s){var n=typeof C[s]=="function"?C[s]:A[s];p&&n&&!n[c]&&h.f(n,c,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(O,D,S){var A=O("./_object-dp").f,C=O("./_has"),h=O("./_wks")("toStringTag");D.exports=function(p,c,s){p&&!C(p=s?p:p.prototype,h)&&A(p,h,{configurable:!0,value:c})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(O,D,S){var A=O("./_shared")("keys"),C=O("./_uid");D.exports=function(h){return A[h]||(A[h]=C(h))}},{"./_shared":117,"./_uid":127}],117:[function(O,D,S){var A=O("./_core"),C=O("./_global"),h=C["__core-js_shared__"]||(C["__core-js_shared__"]={});(D.exports=function(p,c){return h[p]||(h[p]=c!==void 0?c:{})})("versions",[]).push({version:A.version,mode:O("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(O,D,S){var A=O("./_an-object"),C=O("./_a-function"),h=O("./_wks")("species");D.exports=function(p,c){var s,n=A(p).constructor;return n===void 0||(s=A(n)[h])==null?c:C(s)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(O,D,S){var A=O("./_to-integer"),C=O("./_defined");D.exports=function(h){return function(p,c){var s,n,o=String(C(p)),i=A(c),l=o.length;return i<0||i>=l?h?"":void 0:(s=o.charCodeAt(i),s<55296||s>56319||i+1===l||(n=o.charCodeAt(i+1))<56320||n>57343?h?o.charAt(i):s:h?o.slice(i,i+2):n-56320+(s-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(O,D,S){var A,C,h,p=O("./_ctx"),c=O("./_invoke"),s=O("./_html"),n=O("./_dom-create"),o=O("./_global"),i=o.process,l=o.setImmediate,a=o.clearImmediate,r=o.MessageChannel,t=o.Dispatch,d=0,v={},y=function(){var g=+this;if(v.hasOwnProperty(g)){var m=v[g];delete v[g],m()}},b=function(g){y.call(g.data)};l&&a||(l=function(g){for(var m=[],_=1;arguments.length>_;)m.push(arguments[_++]);return v[++d]=function(){c(typeof g=="function"?g:Function(g),m)},A(d),d},a=function(g){delete v[g]},O("./_cof")(i)=="process"?A=function(g){i.nextTick(p(y,g,1))}:t&&t.now?A=function(g){t.now(p(y,g,1))}:r?(C=new r,h=C.port2,C.port1.onmessage=b,A=p(h.postMessage,h,1)):o.addEventListener&&typeof postMessage=="function"&&!o.importScripts?(A=function(g){o.postMessage(g+"","*")},o.addEventListener("message",b,!1)):A="onreadystatechange"in n("script")?function(g){s.appendChild(n("script")).onreadystatechange=function(){s.removeChild(this),y.call(g)}}:function(g){setTimeout(p(y,g,1),0)}),D.exports={set:l,clear:a}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(O,D,S){var A=O("./_to-integer"),C=Math.max,h=Math.min;D.exports=function(p,c){return p=A(p),p<0?C(p+c,0):h(p,c)}},{"./_to-integer":122}],122:[function(O,D,S){var A=Math.ceil,C=Math.floor;D.exports=function(h){return isNaN(h=+h)?0:(h>0?C:A)(h)}},{}],123:[function(O,D,S){var A=O("./_iobject"),C=O("./_defined");D.exports=function(h){return A(C(h))}},{"./_defined":68,"./_iobject":82}],124:[function(O,D,S){var A=O("./_to-integer"),C=Math.min;D.exports=function(h){return h>0?C(A(h),9007199254740991):0}},{"./_to-integer":122}],125:[function(O,D,S){var A=O("./_defined");D.exports=function(C){return Object(A(C))}},{"./_defined":68}],126:[function(O,D,S){var A=O("./_is-object");D.exports=function(C,h){if(!A(C))return C;var p,c;if(h&&typeof(p=C.toString)=="function"&&!A(c=p.call(C)))return c;if(typeof(p=C.valueOf)=="function"&&!A(c=p.call(C)))return c;if(!h&&typeof(p=C.toString)=="function"&&!A(c=p.call(C)))return c;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(O,D,S){var A=0,C=Math.random();D.exports=function(h){return"Symbol(".concat(h===void 0?"":h,")_",(++A+C).toString(36))}},{}],128:[function(O,D,S){var A=O("./_global"),C=A.navigator;D.exports=C&&C.userAgent||""},{"./_global":76}],129:[function(O,D,S){var A=O("./_global"),C=O("./_core"),h=O("./_library"),p=O("./_wks-ext"),c=O("./_object-dp").f;D.exports=function(s){var n=C.Symbol||(C.Symbol=h?{}:A.Symbol||{});s.charAt(0)=="_"||s in n||c(n,s,{value:p.f(s)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(O,D,S){S.f=O("./_wks")},{"./_wks":131}],131:[function(O,D,S){var A=O("./_shared")("wks"),C=O("./_uid"),h=O("./_global").Symbol,p=typeof h=="function";(D.exports=function(c){return A[c]||(A[c]=p&&h[c]||(p?h:C)("Symbol."+c))}).store=A},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(O,D,S){var A=O("./_classof"),C=O("./_wks")("iterator"),h=O("./_iterators");D.exports=O("./_core").getIteratorMethod=function(p){if(p!=null)return p[C]||p["@@iterator"]||h[A(p)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(O,D,S){"use strict";var A=O("./_ctx"),C=O("./_export"),h=O("./_to-object"),p=O("./_iter-call"),c=O("./_is-array-iter"),s=O("./_to-length"),n=O("./_create-property"),o=O("./core.get-iterator-method");C(C.S+C.F*!O("./_iter-detect")(function(i){Array.from(i)}),"Array",{from:function(i){var l,a,r,t,d=h(i),v=typeof this=="function"?this:Array,y=arguments.length,b=y>1?arguments[1]:void 0,g=b!==void 0,m=0,_=o(d);if(g&&(b=A(b,y>2?arguments[2]:void 0,2)),_==null||v==Array&&c(_))for(l=s(d.length),a=new v(l);l>m;m++)n(a,m,g?b(d[m],m):d[m]);else for(t=_.call(d),a=new v;!(r=t.next()).done;m++)n(a,m,g?p(t,b,[r.value,m],!0):r.value);return a.length=m,a}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(O,D,S){"use strict";var A=O("./_add-to-unscopables"),C=O("./_iter-step"),h=O("./_iterators"),p=O("./_to-iobject");D.exports=O("./_iter-define")(Array,"Array",function(c,s){this._t=p(c),this._i=0,this._k=s},function(){var c=this._t,s=this._k,n=this._i++;return!c||n>=c.length?(this._t=void 0,C(1)):s=="keys"?C(0,n):s=="values"?C(0,c[n]):C(0,[n,c[n]])},"values"),h.Arguments=h.Array,A("keys"),A("values"),A("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(O,D,S){"use strict";var A=O("./_is-object"),C=O("./_object-gpo"),h=O("./_wks")("hasInstance"),p=Function.prototype;h in p||O("./_object-dp").f(p,h,{value:function(c){if(typeof this!="function"||!A(c))return!1;if(!A(this.prototype))return c instanceof this;for(;c=C(c);)if(this.prototype===c)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(O,D,S){var A=O("./_export");A(A.S+A.F,"Object",{assign:O("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(O,D,S){var A=O("./_export");A(A.S,"Object",{create:O("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(O,D,S){var A=O("./_export");A(A.S+A.F*!O("./_descriptors"),"Object",{defineProperty:O("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(O,D,S){O("./_object-sap")("getOwnPropertyNames",function(){return O("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(O,D,S){var A=O("./_to-object"),C=O("./_object-gpo");O("./_object-sap")("getPrototypeOf",function(){return function(h){return C(A(h))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(O,D,S){var A=O("./_to-object"),C=O("./_object-keys");O("./_object-sap")("keys",function(){return function(h){return C(A(h))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(O,D,S){arguments[4][36][0].apply(S,arguments)},{dup:36}],143:[function(O,D,S){"use strict";var A,C,h,p,c=O("./_library"),s=O("./_global"),n=O("./_ctx"),o=O("./_classof"),i=O("./_export"),l=O("./_is-object"),a=O("./_a-function"),r=O("./_an-instance"),t=O("./_for-of"),d=O("./_species-constructor"),v=O("./_task").set,y=O("./_microtask")(),b=O("./_new-promise-capability"),g=O("./_perform"),m=O("./_user-agent"),_=O("./_promise-resolve"),x=s.TypeError,f=s.process,E=f&&f.versions,w=E&&E.v8||"",T=s.Promise,R=o(f)=="process",N=function(){},j=C=b.f,W=!!function(){try{var re=T.resolve(1),oe=(re.constructor={})[O("./_wks")("species")]=function(me){me(N,N)};return(R||typeof PromiseRejectionEvent=="function")&&re.then(N)instanceof oe&&w.indexOf("6.6")!==0&&m.indexOf("Chrome/66")===-1}catch(me){}}(),J=function(re){var oe;return!(!l(re)||typeof(oe=re.then)!="function")&&oe},F=function(re,oe){if(!re._n){re._n=!0;var me=re._c;y(function(){for(var he=re._v,Ee=re._s==1,de=0;me.length>de;)!function(be){var Ue,Re,De,je=Ee?be.ok:be.fail,ve=be.resolve,ce=be.reject,ke=be.domain;try{je?(Ee||(re._h==2&&Y(re),re._h=1),je===!0?Ue=he:(ke&&ke.enter(),Ue=je(he),ke&&(ke.exit(),De=!0)),Ue===be.promise?ce(x("Promise-chain cycle")):(Re=J(Ue))?Re.call(Ue,ve,ce):ve(Ue)):ce(he)}catch(Ne){ke&&!De&&ke.exit(),ce(Ne)}}(me[de++]);re._c=[],re._n=!1,oe&&!re._h&&k(re)})}},k=function(re){v.call(s,function(){var oe,me,he,Ee=re._v,de=K(re);if(de&&(oe=g(function(){R?f.emit("unhandledRejection",Ee,re):(me=s.onunhandledrejection)?me({promise:re,reason:Ee}):(he=s.console)&&he.error&&he.error("Unhandled promise rejection",Ee)}),re._h=R||K(re)?2:1),re._a=void 0,de&&oe.e)throw oe.v})},K=function(re){return re._h!==1&&(re._a||re._c).length===0},Y=function(re){v.call(s,function(){var oe;R?f.emit("rejectionHandled",re):(oe=s.onrejectionhandled)&&oe({promise:re,reason:re._v})})},H=function(re){var oe=this;oe._d||(oe._d=!0,oe=oe._w||oe,oe._v=re,oe._s=2,oe._a||(oe._a=oe._c.slice()),F(oe,!0))},Q=function(re){var oe,me=this;if(!me._d){me._d=!0,me=me._w||me;try{if(me===re)throw x("Promise can't be resolved itself");(oe=J(re))?y(function(){var he={_w:me,_d:!1};try{oe.call(re,n(Q,he,1),n(H,he,1))}catch(Ee){H.call(he,Ee)}}):(me._v=re,me._s=1,F(me,!1))}catch(he){H.call({_w:me,_d:!1},he)}}};W||(T=function(re){r(this,T,"Promise","_h"),a(re),A.call(this);try{re(n(Q,this,1),n(H,this,1))}catch(oe){H.call(this,oe)}},A=function(re){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},A.prototype=O("./_redefine-all")(T.prototype,{then:function(re,oe){var me=j(d(this,T));return me.ok=typeof re!="function"||re,me.fail=typeof oe=="function"&&oe,me.domain=R?f.domain:void 0,this._c.push(me),this._a&&this._a.push(me),this._s&&F(this,!1),me.promise},catch:function(re){return this.then(void 0,re)}}),h=function(){var re=new A;this.promise=re,this.resolve=n(Q,re,1),this.reject=n(H,re,1)},b.f=j=function(re){return re===T||re===p?new h(re):C(re)}),i(i.G+i.W+i.F*!W,{Promise:T}),O("./_set-to-string-tag")(T,"Promise"),O("./_set-species")("Promise"),p=O("./_core").Promise,i(i.S+i.F*!W,"Promise",{reject:function(re){var oe=j(this);return(0,oe.reject)(re),oe.promise}}),i(i.S+i.F*(c||!W),"Promise",{resolve:function(re){return _(c&&this===p?T:this,re)}}),i(i.S+i.F*!(W&&O("./_iter-detect")(function(re){T.all(re).catch(N)})),"Promise",{all:function(re){var oe=this,me=j(oe),he=me.resolve,Ee=me.reject,de=g(function(){var be=[],Ue=0,Re=1;t(re,!1,function(De){var je=Ue++,ve=!1;be.push(void 0),Re++,oe.resolve(De).then(function(ce){ve||(ve=!0,be[je]=ce,--Re||he(be))},Ee)}),--Re||he(be)});return de.e&&Ee(de.v),me.promise},race:function(re){var oe=this,me=j(oe),he=me.reject,Ee=g(function(){t(re,!1,function(de){oe.resolve(de).then(me.resolve,he)})});return Ee.e&&he(Ee.v),me.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(O,D,S){var A=O("./_export"),C=O("./_to-absolute-index"),h=String.fromCharCode,p=String.fromCodePoint;A(A.S+A.F*(!!p&&p.length!=1),"String",{fromCodePoint:function(c){for(var s,n=[],o=arguments.length,i=0;o>i;){if(s=+arguments[i++],C(s,1114111)!==s)throw RangeError(s+" is not a valid code point");n.push(s<65536?h(s):h(55296+((s-=65536)>>10),s%1024+56320))}return n.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(O,D,S){"use strict";var A=O("./_string-at")(!0);O("./_iter-define")(String,"String",function(C){this._t=String(C),this._i=0},function(){var C,h=this._t,p=this._i;return p>=h.length?{value:void 0,done:!0}:(C=A(h,p),this._i+=C.length,{value:C,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(O,D,S){"use strict";var A=O("./_global"),C=O("./_has"),h=O("./_descriptors"),p=O("./_export"),c=O("./_redefine"),s=O("./_meta").KEY,n=O("./_fails"),o=O("./_shared"),i=O("./_set-to-string-tag"),l=O("./_uid"),a=O("./_wks"),r=O("./_wks-ext"),t=O("./_wks-define"),d=O("./_enum-keys"),v=O("./_is-array"),y=O("./_an-object"),b=O("./_is-object"),g=O("./_to-iobject"),m=O("./_to-primitive"),_=O("./_property-desc"),x=O("./_object-create"),f=O("./_object-gopn-ext"),E=O("./_object-gopd"),w=O("./_object-dp"),T=O("./_object-keys"),R=E.f,N=w.f,j=f.f,W=A.Symbol,J=A.JSON,F=J&&J.stringify,k=a("_hidden"),K=a("toPrimitive"),Y={}.propertyIsEnumerable,H=o("symbol-registry"),Q=o("symbols"),re=o("op-symbols"),oe=Object.prototype,me=typeof W=="function",he=A.QObject,Ee=!he||!he.prototype||!he.prototype.findChild,de=h&&n(function(){return x(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a!=7})?function(q,X,$){var ge=R(oe,X);ge&&delete oe[X],N(q,X,$),ge&&q!==oe&&N(oe,X,ge)}:N,be=function(q){var X=Q[q]=x(W.prototype);return X._k=q,X},Ue=me&&typeof W.iterator=="symbol"?function(q){return typeof q=="symbol"}:function(q){return q instanceof W},Re=function(q,X,$){return q===oe&&Re(re,X,$),y(q),X=m(X,!0),y($),C(Q,X)?($.enumerable?(C(q,k)&&q[k][X]&&(q[k][X]=!1),$=x($,{enumerable:_(0,!1)})):(C(q,k)||N(q,k,_(1,{})),q[k][X]=!0),de(q,X,$)):N(q,X,$)},De=function(q,X){y(q);for(var $,ge=d(X=g(X)),Ae=0,at=ge.length;at>Ae;)Re(q,$=ge[Ae++],X[$]);return q},je=function(q,X){return X===void 0?x(q):De(x(q),X)},ve=function(q){var X=Y.call(this,q=m(q,!0));return!(this===oe&&C(Q,q)&&!C(re,q))&&(!(X||!C(this,q)||!C(Q,q)||C(this,k)&&this[k][q])||X)},ce=function(q,X){if(q=g(q),X=m(X,!0),q!==oe||!C(Q,X)||C(re,X)){var $=R(q,X);return!$||!C(Q,X)||C(q,k)&&q[k][X]||($.enumerable=!0),$}},ke=function(q){for(var X,$=j(g(q)),ge=[],Ae=0;$.length>Ae;)C(Q,X=$[Ae++])||X==k||X==s||ge.push(X);return ge},Ne=function(q){for(var X,$=q===oe,ge=j($?re:g(q)),Ae=[],at=0;ge.length>at;)!C(Q,X=ge[at++])||$&&!C(oe,X)||Ae.push(Q[X]);return Ae};me||(W=function(){if(this instanceof W)throw TypeError("Symbol is not a constructor!");var q=l(arguments.length>0?arguments[0]:void 0),X=function($){this===oe&&X.call(re,$),C(this,k)&&C(this[k],q)&&(this[k][q]=!1),de(this,q,_(1,$))};return h&&Ee&&de(oe,q,{configurable:!0,set:X}),be(q)},c(W.prototype,"toString",function(){return this._k}),E.f=ce,w.f=Re,O("./_object-gopn").f=f.f=ke,O("./_object-pie").f=ve,O("./_object-gops").f=Ne,h&&!O("./_library")&&c(oe,"propertyIsEnumerable",ve,!0),r.f=function(q){return be(a(q))}),p(p.G+p.W+p.F*!me,{Symbol:W});for(var Je="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;Je.length>te;)a(Je[te++]);for(var P=T(a.store),U=0;P.length>U;)t(P[U++]);p(p.S+p.F*!me,"Symbol",{for:function(q){return C(H,q+="")?H[q]:H[q]=W(q)},keyFor:function(q){if(!Ue(q))throw TypeError(q+" is not a symbol!");for(var X in H)if(H[X]===q)return X},useSetter:function(){Ee=!0},useSimple:function(){Ee=!1}}),p(p.S+p.F*!me,"Object",{create:je,defineProperty:Re,defineProperties:De,getOwnPropertyDescriptor:ce,getOwnPropertyNames:ke,getOwnPropertySymbols:Ne}),J&&p(p.S+p.F*(!me||n(function(){var q=W();return F([q])!="[null]"||F({a:q})!="{}"||F(Object(q))!="{}"})),"JSON",{stringify:function(q){for(var X,$,ge=[q],Ae=1;arguments.length>Ae;)ge.push(arguments[Ae++]);if($=X=ge[1],(b(X)||q!==void 0)&&!Ue(q))return v(X)||(X=function(at,Le){if(typeof $=="function"&&(Le=$.call(this,at,Le)),!Ue(Le))return Le}),ge[1]=X,F.apply(J,ge)}}),W.prototype[K]||O("./_hide")(W.prototype,K,W.prototype.valueOf),i(W,"Symbol"),i(Math,"Math",!0),i(A.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(O,D,S){"use strict";var A=O("./_export"),C=O("./_core"),h=O("./_global"),p=O("./_species-constructor"),c=O("./_promise-resolve");A(A.P+A.R,"Promise",{finally:function(s){var n=p(this,C.Promise||h.Promise),o=typeof s=="function";return this.then(o?function(i){return c(n,s()).then(function(){return i})}:s,o?function(i){return c(n,s()).then(function(){throw i})}:s)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(O,D,S){"use strict";var A=O("./_export"),C=O("./_new-promise-capability"),h=O("./_perform");A(A.S,"Promise",{try:function(p){var c=C.f(this),s=h(p);return(s.e?c.reject:c.resolve)(s.v),c.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(O,D,S){O("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(O,D,S){O("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(O,D,S){O("./es6.array.iterator");for(var A=O("./_global"),C=O("./_hide"),h=O("./_iterators"),p=O("./_wks")("toStringTag"),c="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s<c.length;s++){var n=c[s],o=A[n],i=o&&o.prototype;i&&!i[p]&&C(i,p,n),h[n]=h.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(O,D,S){var A=O("./_export"),C=O("./_task");A(A.G+A.B,{setImmediate:C.set,clearImmediate:C.clear})},{"./_export":73,"./_task":120}],153:[function(O,D,S){(function(A){"use strict";function C(m){return Array.isArray?Array.isArray(m):y(m)==="[object Array]"}function h(m){return typeof m=="boolean"}function p(m){return m===null}function c(m){return m==null}function s(m){return typeof m=="number"}function n(m){return typeof m=="string"}function o(m){return(m===void 0?"undefined":(0,g.default)(m))==="symbol"}function i(m){return m===void 0}function l(m){return y(m)==="[object RegExp]"}function a(m){return(m===void 0?"undefined":(0,g.default)(m))==="object"&&m!==null}function r(m){return y(m)==="[object Date]"}function t(m){return y(m)==="[object Error]"||m instanceof Error}function d(m){return typeof m=="function"}function v(m){return m===null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||(m===void 0?"undefined":(0,g.default)(m))==="symbol"||m===void 0}function y(m){return Object.prototype.toString.call(m)}var b=O("babel-runtime/helpers/typeof"),g=function(m){return m&&m.__esModule?m:{default:m}}(b);S.isArray=C,S.isBoolean=h,S.isNull=p,S.isNullOrUndefined=c,S.isNumber=s,S.isString=n,S.isSymbol=o,S.isUndefined=i,S.isRegExp=l,S.isObject=a,S.isDate=r,S.isError=t,S.isFunction=d,S.isPrimitive=v,S.isBuffer=A.isBuffer}).call(this,{isBuffer:O("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(O,D,S){"use strict";var A=O("babel-runtime/helpers/typeof"),C=function(h){return h&&h.__esModule?h:{default:h}}(A);!function(h){function p(i,l){for(i=String(i),l=l||2;i.length<l;)i="0"+i;return i}function c(i){var l=new Date(i.getFullYear(),i.getMonth(),i.getDate());l.setDate(l.getDate()-(l.getDay()+6)%7+3);var a=new Date(l.getFullYear(),0,4);a.setDate(a.getDate()-(a.getDay()+6)%7+3);var r=l.getTimezoneOffset()-a.getTimezoneOffset();l.setHours(l.getHours()-r);var t=(l-a)/6048e5;return 1+Math.floor(t)}function s(i){var l=i.getDay();return l===0&&(l=7),l}function n(i){return i===null?"null":i===void 0?"undefined":(i===void 0?"undefined":(0,C.default)(i))!=="object"?i===void 0?"undefined":(0,C.default)(i):Array.isArray(i)?"array":{}.toString.call(i).slice(8,-1).toLowerCase()}var o=function(){var i=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,a=/[^-+\dA-Z]/g;return function(r,t,d,v){if(arguments.length!==1||n(r)!=="string"||/\d/.test(r)||(t=r,r=void 0),r=r||new Date,r instanceof Date||(r=new Date(r)),isNaN(r))throw TypeError("Invalid date");t=String(o.masks[t]||t||o.masks.default);var y=t.slice(0,4);y!=="UTC:"&&y!=="GMT:"||(t=t.slice(4),d=!0,y==="GMT:"&&(v=!0));var b=d?"getUTC":"get",g=r[b+"Date"](),m=r[b+"Day"](),_=r[b+"Month"](),x=r[b+"FullYear"](),f=r[b+"Hours"](),E=r[b+"Minutes"](),w=r[b+"Seconds"](),T=r[b+"Milliseconds"](),R=d?0:r.getTimezoneOffset(),N=c(r),j=s(r),W={d:g,dd:p(g),ddd:o.i18n.dayNames[m],dddd:o.i18n.dayNames[m+7],m:_+1,mm:p(_+1),mmm:o.i18n.monthNames[_],mmmm:o.i18n.monthNames[_+12],yy:String(x).slice(2),yyyy:x,h:f%12||12,hh:p(f%12||12),H:f,HH:p(f),M:E,MM:p(E),s:w,ss:p(w),l:p(T,3),L:p(Math.round(T/10)),t:f<12?"a":"p",tt:f<12?"am":"pm",T:f<12?"A":"P",TT:f<12?"AM":"PM",Z:v?"GMT":d?"UTC":(String(r).match(l)||[""]).pop().replace(a,""),o:(R>0?"-":"+")+p(100*Math.floor(Math.abs(R)/60)+Math.abs(R)%60,4),S:["th","st","nd","rd"][g%10>3?0:(g%100-g%10!=10)*g%10],W:N,N:j};return t.replace(i,function(J){return J in W?W[J]:J.slice(1,J.length-1)})}}();o.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},o.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof B=="function"&&B.amd?B(function(){return o}):(S===void 0?"undefined":(0,C.default)(S))==="object"?D.exports=o:h.dateFormat=o}(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(O,D,S){(function(A){function C(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function h(n){var o=this.useColors;if(n[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+n[0]+(o?"%c ":" ")+"+"+S.humanize(this.diff),o){var i="color: "+this.color;n.splice(1,0,i,"color: inherit");var l=0,a=0;n[0].replace(/%[a-zA-Z%]/g,function(r){r!=="%%"&&(l++,r==="%c"&&(a=l))}),n.splice(a,0,i)}}function p(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function c(n){try{n==null?S.storage.removeItem("debug"):S.storage.debug=n}catch(o){}}function s(){var n;try{n=S.storage.debug}catch(o){}return!n&&A!==void 0&&"env"in A&&(n=A.env.DEBUG),n}S=D.exports=O("./debug"),S.log=p,S.formatArgs=h,S.save=c,S.load=s,S.useColors=C,S.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(n){}}(),S.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],S.formatters.j=function(n){try{return JSON.stringify(n)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}},S.enable(s())}).call(this,O("_process"))},{"./debug":156,_process:173}],156:[function(O,D,S){function A(o){var i,l=0;for(i in o)l=(l<<5)-l+o.charCodeAt(i),l|=0;return S.colors[Math.abs(l)%S.colors.length]}function C(o){function i(){if(i.enabled){var l=i,a=+new Date,r=a-(n||a);l.diff=r,l.prev=n,l.curr=a,n=a;for(var t=new Array(arguments.length),d=0;d<t.length;d++)t[d]=arguments[d];t[0]=S.coerce(t[0]),typeof t[0]!="string"&&t.unshift("%O");var v=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(y,b){if(y==="%%")return y;v++;var g=S.formatters[b];if(typeof g=="function"){var m=t[v];y=g.call(l,m),t.splice(v,1),v--}return y}),S.formatArgs.call(l,t),(i.log||S.log||console.log.bind(console)).apply(l,t)}}return i.namespace=o,i.enabled=S.enabled(o),i.useColors=S.useColors(),i.color=A(o),typeof S.init=="function"&&S.init(i),i}function h(o){S.save(o),S.names=[],S.skips=[];for(var i=(typeof o=="string"?o:"").split(/[\s,]+/),l=i.length,a=0;a<l;a++)i[a]&&(o=i[a].replace(/\*/g,".*?"),o[0]==="-"?S.skips.push(new RegExp("^"+o.substr(1)+"$")):S.names.push(new RegExp("^"+o+"$")))}function p(){S.enable("")}function c(o){var i,l;for(i=0,l=S.skips.length;i<l;i++)if(S.skips[i].test(o))return!1;for(i=0,l=S.names.length;i<l;i++)if(S.names[i].test(o))return!0;return!1}function s(o){return o instanceof Error?o.stack||o.message:o}S=D.exports=C.debug=C.default=C,S.coerce=s,S.disable=p,S.enable=h,S.enabled=c,S.humanize=O("ms"),S.names=[],S.skips=[],S.formatters={};var n},{ms:169}],157:[function(O,D,S){"use strict";function A(h){var p=""+h,c=C.exec(p);if(!c)return p;var s,n="",o=0,i=0;for(o=c.index;o<p.length;o++){switch(p.charCodeAt(o)){case 34:s=""";break;case 38:s="&";break;case 39:s="'";break;case 60:s="<";break;case 62:s=">";break;default:continue}i!==o&&(n+=p.substring(i,o)),i=o+1,n+=s}return i!==o?n+p.substring(i,o):n}var C=/["'&<>]/;D.exports=A},{}],158:[function(O,D,S){function A(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function C(s){return typeof s=="function"}function h(s){return typeof s=="number"}function p(s){return typeof s=="object"&&s!==null}function c(s){return s===void 0}D.exports=A,A.EventEmitter=A,A.prototype._events=void 0,A.prototype._maxListeners=void 0,A.defaultMaxListeners=10,A.prototype.setMaxListeners=function(s){if(!h(s)||s<0||isNaN(s))throw TypeError("n must be a positive number");return this._maxListeners=s,this},A.prototype.emit=function(s){var n,o,i,l,a,r;if(this._events||(this._events={}),s==="error"&&(!this._events.error||p(this._events.error)&&!this._events.error.length)){if((n=arguments[1])instanceof Error)throw n;var t=new Error('Uncaught, unspecified "error" event. ('+n+")");throw t.context=n,t}if(o=this._events[s],c(o))return!1;if(C(o))switch(arguments.length){case 1:o.call(this);break;case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:l=Array.prototype.slice.call(arguments,1),o.apply(this,l)}else if(p(o))for(l=Array.prototype.slice.call(arguments,1),r=o.slice(),i=r.length,a=0;a<i;a++)r[a].apply(this,l);return!0},A.prototype.addListener=function(s,n){var o;if(!C(n))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",s,C(n.listener)?n.listener:n),this._events[s]?p(this._events[s])?this._events[s].push(n):this._events[s]=[this._events[s],n]:this._events[s]=n,p(this._events[s])&&!this._events[s].warned&&(o=c(this._maxListeners)?A.defaultMaxListeners:this._maxListeners)&&o>0&&this._events[s].length>o&&(this._events[s].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[s].length),typeof console.trace=="function"&&console.trace()),this},A.prototype.on=A.prototype.addListener,A.prototype.once=function(s,n){function o(){this.removeListener(s,o),i||(i=!0,n.apply(this,arguments))}if(!C(n))throw TypeError("listener must be a function");var i=!1;return o.listener=n,this.on(s,o),this},A.prototype.removeListener=function(s,n){var o,i,l,a;if(!C(n))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(o=this._events[s],l=o.length,i=-1,o===n||C(o.listener)&&o.listener===n)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,n);else if(p(o)){for(a=l;a-- >0;)if(o[a]===n||o[a].listener&&o[a].listener===n){i=a;break}if(i<0)return this;o.length===1?(o.length=0,delete this._events[s]):o.splice(i,1),this._events.removeListener&&this.emit("removeListener",s,n)}return this},A.prototype.removeAllListeners=function(s){var n,o;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[s]&&delete this._events[s],this;if(arguments.length===0){for(n in this._events)n!=="removeListener"&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(o=this._events[s],C(o))this.removeListener(s,o);else if(o)for(;o.length;)this.removeListener(s,o[o.length-1]);return delete this._events[s],this},A.prototype.listeners=function(s){return this._events&&this._events[s]?C(this._events[s])?[this._events[s]]:this._events[s].slice():[]},A.prototype.listenerCount=function(s){if(this._events){var n=this._events[s];if(C(n))return 1;if(n)return n.length}return 0},A.listenerCount=function(s,n){return s.listenerCount(n)}},{}],159:[function(O,D,S){var A=O("http"),C=D.exports;for(var h in A)A.hasOwnProperty(h)&&(C[h]=A[h]);C.request=function(p,c){return p||(p={}),p.scheme="https",p.protocol="https:",A.request.call(this,p,c)}},{http:196}],160:[function(O,D,S){"use strict";var A=O("util"),C=O("ms");D.exports=function(h){if(typeof h=="number")return h;var p=C(h);if(p===void 0){var c=new Error(A.format("humanize-ms(%j) result undefined",h));console.warn(c.stack)}return p}},{ms:169,util:207}],161:[function(O,D,S){S.read=function(A,C,h,p,c){var s,n,o=8*c-p-1,i=(1<<o)-1,l=i>>1,a=-7,r=h?c-1:0,t=h?-1:1,d=A[C+r];for(r+=t,s=d&(1<<-a)-1,d>>=-a,a+=o;a>0;s=256*s+A[C+r],r+=t,a-=8);for(n=s&(1<<-a)-1,s>>=-a,a+=p;a>0;n=256*n+A[C+r],r+=t,a-=8);if(s===0)s=1-l;else{if(s===i)return n?NaN:1/0*(d?-1:1);n+=Math.pow(2,p),s-=l}return(d?-1:1)*n*Math.pow(2,s-p)},S.write=function(A,C,h,p,c,s){var n,o,i,l=8*s-c-1,a=(1<<l)-1,r=a>>1,t=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=p?0:s-1,v=p?1:-1,y=C<0||C===0&&1/C<0?1:0;for(C=Math.abs(C),isNaN(C)||C===1/0?(o=isNaN(C)?1:0,n=a):(n=Math.floor(Math.log(C)/Math.LN2),C*(i=Math.pow(2,-n))<1&&(n--,i*=2),C+=n+r>=1?t/i:t*Math.pow(2,1-r),C*i>=2&&(n++,i/=2),n+r>=a?(o=0,n=a):n+r>=1?(o=(C*i-1)*Math.pow(2,c),n+=r):(o=C*Math.pow(2,r-1)*Math.pow(2,c),n=0));c>=8;A[h+d]=255&o,d+=v,o/=256,c-=8);for(n=n<<c|o,l+=c;l>0;A[h+d]=255&n,d+=v,n/=256,l-=8);A[h+d-v]|=128*y}},{}],162:[function(O,D,S){typeof Object.create=="function"?D.exports=function(A,C){A.super_=C,A.prototype=Object.create(C.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}})}:D.exports=function(A,C){A.super_=C;var h=function(){};h.prototype=C.prototype,A.prototype=new h,A.prototype.constructor=A}},{}],163:[function(O,D,S){function A(h){return!!h.constructor&&typeof h.constructor.isBuffer=="function"&&h.constructor.isBuffer(h)}function C(h){return typeof h.readFloatLE=="function"&&typeof h.slice=="function"&&A(h.slice(0,0))}D.exports=function(h){return h!=null&&(A(h)||C(h)||!!h._isBuffer)}},{}],164:[function(O,D,S){!function(A){function C(c){return p.call(c).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function h(c){return typeof c=="function"&&(/^class(\s|\{\}$)/.test(p.call(c))||/^.*classCallCheck\(/.test(C(c)))}var p=Function.prototype.toString;S!==void 0?(D!==void 0&&D.exports&&(S=D.exports=h),S.isClass=h):typeof B=="function"&&B.amd?B([],function(){return h}):A.isClass=h}(this)},{}],165:[function(O,D,S){"use strict";function A(s){var n=s.slice(2);return n=n[0].toLowerCase()+n.slice(1)}var C=O("core-util-is"),h=O("isstream"),p=O("is-class");Object.keys(C).map(function(s){S[A(s)]=C[s]}),S.stream=h,S.readableStream=h.isReadable,S.writableStream=h.isWritable,S.duplexStream=h.isDuplex,S.class=p,S.finite=function(s){return Number.isFinite(s)},S.NaN=function(s){return Number.isNaN(s)},S.generator=function(s){return s&&typeof s.next=="function"&&typeof s.throw=="function"},S.generatorFunction=function(s){return s&&s.constructor&&s.constructor.name==="GeneratorFunction"},S.asyncFunction=function(s){return s&&s.constructor&&s.constructor.name==="AsyncFunction"},S.promise=function(s){return s&&typeof s.then=="function"};var c=Math.pow(2,31);S.int=function(s){return C.isNumber(s)&&s%1==0},S.int32=function(s){return S.int(s)&&s<c&&s>=-c},S.long=function(s){return S.int(s)&&(s>=c||s<-c)},S.Long=function(s){return S.object(s)&&S.number(s.high)&&S.number(s.low)},S.double=function(s){return C.isNumber(s)&&!isNaN(s)&&s%1!=0},S.date=function(s){return s instanceof Date},S.regExp=function(s){return s instanceof RegExp},S.regexp=S.regExp,S.error=function(s){return s instanceof Error},S.array=function(s){return Array.isArray(s)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(O,D,S){var A={}.toString;D.exports=Array.isArray||function(C){return A.call(C)=="[object Array]"}},{}],167:[function(O,D,S){function A(s){return s instanceof c.Stream}function C(s){return A(s)&&typeof s._read=="function"&&typeof s._readableState=="object"}function h(s){return A(s)&&typeof s._write=="function"&&typeof s._writableState=="object"}function p(s){return C(s)&&h(s)}var c=O("stream");D.exports=A,D.exports.isReadable=C,D.exports.isWritable=h,D.exports.isDuplex=p},{stream:195}],168:[function(O,D,S){"use strict";function A(h,p,c){if(!h)throw new TypeError("argument dest is required");if(!p)throw new TypeError("argument src is required");return c===void 0&&(c=!0),Object.getOwnPropertyNames(p).forEach(function(s){if(c||!C.call(h,s)){var n=Object.getOwnPropertyDescriptor(p,s);Object.defineProperty(h,s,n)}}),h}D.exports=A;var C=Object.prototype.hasOwnProperty},{}],169:[function(O,D,S){function A(l){if(l=String(l),!(l.length>100)){var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(l);if(a){var r=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*i;case"days":case"day":case"d":return r*o;case"hours":case"hour":case"hrs":case"hr":case"h":return r*n;case"minutes":case"minute":case"mins":case"min":case"m":return r*s;case"seconds":case"second":case"secs":case"sec":case"s":return r*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function C(l){return l>=o?Math.round(l/o)+"d":l>=n?Math.round(l/n)+"h":l>=s?Math.round(l/s)+"m":l>=c?Math.round(l/c)+"s":l+"ms"}function h(l){return p(l,o,"day")||p(l,n,"hour")||p(l,s,"minute")||p(l,c,"second")||l+" ms"}function p(l,a,r){if(!(l<a))return l<1.5*a?Math.floor(l/a)+" "+r:Math.ceil(l/a)+" "+r+"s"}var c=1e3,s=60*c,n=60*s,o=24*n,i=365.25*o;D.exports=function(l,a){a=a||{};var r=typeof l;if(r==="string"&&l.length>0)return A(l);if(r==="number"&&isNaN(l)===!1)return a.long?h(l):C(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))}},{}],170:[function(O,D,S){(function(A){function C(s,n){for(var o=0,i=s.length-1;i>=0;i--){var l=s[i];l==="."?s.splice(i,1):l===".."?(s.splice(i,1),o++):o&&(s.splice(i,1),o--)}if(n)for(;o--;o)s.unshift("..");return s}function h(s){typeof s!="string"&&(s+="");var n,o=0,i=-1,l=!0;for(n=s.length-1;n>=0;--n)if(s.charCodeAt(n)===47){if(!l){o=n+1;break}}else i===-1&&(l=!1,i=n+1);return i===-1?"":s.slice(o,i)}function p(s,n){if(s.filter)return s.filter(n);for(var o=[],i=0;i<s.length;i++)n(s[i],i,s)&&o.push(s[i]);return o}S.resolve=function(){for(var s="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var i=o>=0?arguments[o]:A.cwd();if(typeof i!="string")throw new TypeError("Arguments to path.resolve must be strings");i&&(s=i+"/"+s,n=i.charAt(0)==="/")}return s=C(p(s.split("/"),function(l){return!!l}),!n).join("/"),(n?"/":"")+s||"."},S.normalize=function(s){var n=S.isAbsolute(s),o=c(s,-1)==="/";return s=C(p(s.split("/"),function(i){return!!i}),!n).join("/"),s||n||(s="."),s&&o&&(s+="/"),(n?"/":"")+s},S.isAbsolute=function(s){return s.charAt(0)==="/"},S.join=function(){var s=Array.prototype.slice.call(arguments,0);return S.normalize(p(s,function(n,o){if(typeof n!="string")throw new TypeError("Arguments to path.join must be strings");return n}).join("/"))},S.relative=function(s,n){function o(v){for(var y=0;y<v.length&&v[y]==="";y++);for(var b=v.length-1;b>=0&&v[b]==="";b--);return y>b?[]:v.slice(y,b-y+1)}s=S.resolve(s).substr(1),n=S.resolve(n).substr(1);for(var i=o(s.split("/")),l=o(n.split("/")),a=Math.min(i.length,l.length),r=a,t=0;t<a;t++)if(i[t]!==l[t]){r=t;break}for(var d=[],t=r;t<i.length;t++)d.push("..");return d=d.concat(l.slice(r)),d.join("/")},S.sep="/",S.delimiter=":",S.dirname=function(s){if(typeof s!="string"&&(s+=""),s.length===0)return".";for(var n=s.charCodeAt(0),o=n===47,i=-1,l=!0,a=s.length-1;a>=1;--a)if((n=s.charCodeAt(a))===47){if(!l){i=a;break}}else l=!1;return i===-1?o?"/":".":o&&i===1?"/":s.slice(0,i)},S.basename=function(s,n){var o=h(s);return n&&o.substr(-1*n.length)===n&&(o=o.substr(0,o.length-n.length)),o},S.extname=function(s){typeof s!="string"&&(s+="");for(var n=-1,o=0,i=-1,l=!0,a=0,r=s.length-1;r>=0;--r){var t=s.charCodeAt(r);if(t!==47)i===-1&&(l=!1,i=r+1),t===46?n===-1?n=r:a!==1&&(a=1):n!==-1&&(a=-1);else if(!l){o=r+1;break}}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===o+1?"":s.slice(n,i)};var c="ab".substr(-1)==="b"?function(s,n,o){return s.substr(n,o)}:function(s,n,o){return n<0&&(n=s.length+n),s.substr(n,o)}}).call(this,O("_process"))},{_process:173}],171:[function(O,D,S){(function(A){(function(){"use strict";function C(w){return w=String(w),w.charAt(0).toUpperCase()+w.slice(1)}function h(w,T,R){var N={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return T&&R&&/^Win/i.test(w)&&!/^Windows Phone /i.test(w)&&(N=N[/[\d.]+$/.exec(w)])&&(w="Windows "+N),w=String(w),T&&R&&(w=w.replace(RegExp(T,"i"),R)),w=c(w.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function p(w,T){var R=-1,N=w?w.length:0;if(typeof N=="number"&&N>-1&&N<=g)for(;++R<N;)T(w[R],R,w);else s(w,T)}function c(w){return w=a(w),/^(?:webOS|i(?:OS|P))/.test(w)?w:C(w)}function s(w,T){for(var R in w)x.call(w,R)&&T(w[R],R,w)}function n(w){return w==null?C(w):f.call(w).slice(8,-1)}function o(w,T){var R=w!=null?typeof w[T]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(R)||R=="object"&&!w[T])}function i(w){return String(w).replace(/([ -])(?!$)/g,"$1?")}function l(w,T){var R=null;return p(w,function(N,j){R=T(R,N,j,w)}),R}function a(w){return String(w).replace(/^ +| +$/g,"")}function r(w){function T(q){return l(q,function(X,$){var ge=$.pattern||i($);return!X&&(X=RegExp("\\b"+ge+" *\\d+[.\\w_]*","i").exec(w)||RegExp("\\b"+ge+" *\\w+-[\\w]*","i").exec(w)||RegExp("\\b"+ge+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(w))&&((X=String($.label&&!RegExp(ge,"i").test($.label)?$.label:X).split("/"))[1]&&!/[\d.]+/.test(X[0])&&(X[0]+=" "+X[1]),$=$.label||$,X=c(X[0].replace(RegExp(ge,"i"),$).replace(RegExp("; *(?:"+$+"[_-])?","i")," ").replace(RegExp("("+$+")[-_.]?(\\w)","i"),"$1 $2"))),X})}function R(){return this.description||""}var N=d,j=w&&typeof w=="object"&&n(w)!="String";j&&(N=w,w=null);var W=N.navigator||{},J=W.userAgent||"";w||(w=J);var F,k,K=j?!!W.likeChrome:/\bChrome\b/.test(w)&&!/internal|\n/i.test(f.toString()),Y=j?"Object":"ScriptBridgingProxyObject",H=j?"Object":"Environment",Q=j&&N.java?"JavaPackage":n(N.java),re=j?"Object":"RuntimeObject",oe=/\bJava/.test(Q)&&N.java,me=oe&&n(N.environment)==H,he=oe?"a":"\u4F2A",Ee=oe?"b":"\u5C3E",de=N.document||{},be=N.operamini||N.opera,Ue=m.test(Ue=j&&be?be["[[Class]]"]:n(be))?Ue:be=null,Re=w,De=[],je=null,ve=w==J,ce=ve&&be&&typeof be.version=="function"&&be.version(),ke=function(q){return l(q,function(X,$){return X||RegExp("\\b"+($.pattern||i($))+"\\b","i").exec(w)&&($.label||$)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Ne=function(q){return l(q,function(X,$){return X||RegExp("\\b"+($.pattern||i($))+"\\b","i").exec(w)&&($.label||$)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Je=T([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),te=function(q){return l(q,function(X,$,ge){return X||($[Je]||$[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Je)]||RegExp("\\b"+i(ge)+"(?:\\b|\\w*\\d)","i").exec(w))&&ge})}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),P=function(q){return l(q,function(X,$){var ge=$.pattern||i($);return!X&&(X=RegExp("\\b"+ge+"(?:/[\\d.]+|[ \\w.]*)","i").exec(w))&&(X=h(X,ge,$.label||$)),X})}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(ke&&(ke=[ke]),te&&!Je&&(Je=T([te])),(F=/\bGoogle TV\b/.exec(Je))&&(Je=F[0]),/\bSimulator\b/i.test(w)&&(Je=(Je?Je+" ":"")+"Simulator"),Ne=="Opera Mini"&&/\bOPiOS\b/.test(w)&&De.push("running in Turbo/Uncompressed mode"),Ne=="IE"&&/\blike iPhone OS\b/.test(w)?(F=r(w.replace(/like iPhone OS/,"")),te=F.manufacturer,Je=F.product):/^iP/.test(Je)?(Ne||(Ne="Safari"),P="iOS"+((F=/ OS ([\d_]+)/i.exec(w))?" "+F[1].replace(/_/g,"."):"")):Ne!="Konqueror"||/buntu/i.test(P)?te&&te!="Google"&&(/Chrome/.test(Ne)&&!/\bMobile Safari\b/i.test(w)||/\bVita\b/.test(Je))||/\bAndroid\b/.test(P)&&/^Chrome/.test(Ne)&&/\bVersion\//i.test(w)?(Ne="Android Browser",P=/\bAndroid\b/.test(P)?P:"Android"):Ne=="Silk"?(/\bMobi/i.test(w)||(P="Android",De.unshift("desktop mode")),/Accelerated *= *true/i.test(w)&&De.unshift("accelerated")):Ne=="PaleMoon"&&(F=/\bFirefox\/([\d.]+)\b/.exec(w))?De.push("identifying as Firefox "+F[1]):Ne=="Firefox"&&(F=/\b(Mobile|Tablet|TV)\b/i.exec(w))?(P||(P="Firefox OS"),Je||(Je=F[1])):!Ne||(F=!/\bMinefield\b/i.test(w)&&/\b(?:Firefox|Safari)\b/.exec(Ne))?(Ne&&!Je&&/[\/,]|^[^(]+?\)/.test(w.slice(w.indexOf(F+"/")+8))&&(Ne=null),(F=Je||te||P)&&(Je||te||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(P))&&(Ne=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(P)?P:F)+" Browser")):Ne=="Electron"&&(F=(/\bChrome\/([\d.]+)\b/.exec(w)||0)[1])&&De.push("Chromium "+F):P="Kubuntu",ce||(ce=function(q){return l(q,function(X,$){return X||(RegExp($+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(w)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",i(Ne),"(?:Firefox|Minefield|NetFront)"])),(F=ke=="iCab"&&parseFloat(ce)>3&&"WebKit"||/\bOpera\b/.test(Ne)&&(/\bOPR\b/.test(w)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(w)&&!/^(?:Trident|EdgeHTML)$/.test(ke)&&"WebKit"||!ke&&/\bMSIE\b/i.test(w)&&(P=="Mac OS"?"Tasman":"Trident")||ke=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ne)&&"NetFront")&&(ke=[F]),Ne=="IE"&&(F=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(w)||0)[1])?(Ne+=" Mobile",P="Windows Phone "+(/\+$/.test(F)?F:F+".x"),De.unshift("desktop mode")):/\bWPDesktop\b/i.test(w)?(Ne="IE Mobile",P="Windows Phone 8.x",De.unshift("desktop mode"),ce||(ce=(/\brv:([\d.]+)/.exec(w)||0)[1])):Ne!="IE"&&ke=="Trident"&&(F=/\brv:([\d.]+)/.exec(w))&&(Ne&&De.push("identifying as "+Ne+(ce?" "+ce:"")),Ne="IE",ce=F[1]),ve){if(o(N,"global"))if(oe&&(F=oe.lang.System,Re=F.getProperty("os.arch"),P=P||F.getProperty("os.name")+" "+F.getProperty("os.version")),me){try{ce=N.require("ringo/engine").version.join("."),Ne="RingoJS"}catch(q){(F=N.system)&&F.global.system==N.system&&(Ne="Narwhal",P||(P=F[0].os||null))}Ne||(Ne="Rhino")}else typeof N.process=="object"&&!N.process.browser&&(F=N.process)&&(typeof F.versions=="object"&&(typeof F.versions.electron=="string"?(De.push("Node "+F.versions.node),Ne="Electron",ce=F.versions.electron):typeof F.versions.nw=="string"&&(De.push("Chromium "+ce,"Node "+F.versions.node),Ne="NW.js",ce=F.versions.nw)),Ne||(Ne="Node.js",Re=F.arch,P=F.platform,ce=/[\d.]+/.exec(F.version),ce=ce?ce[0]:null));else n(F=N.runtime)==Y?(Ne="Adobe AIR",P=F.flash.system.Capabilities.os):n(F=N.phantom)==re?(Ne="PhantomJS",ce=(F=F.version||null)&&F.major+"."+F.minor+"."+F.patch):typeof de.documentMode=="number"&&(F=/\bTrident\/(\d+)/i.exec(w))?(ce=[ce,de.documentMode],(F=+F[1]+4)!=ce[1]&&(De.push("IE "+ce[1]+" mode"),ke&&(ke[1]=""),ce[1]=F),ce=Ne=="IE"?String(ce[1].toFixed(1)):ce[0]):typeof de.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ne)&&(De.push("masking as "+Ne+" "+ce),Ne="IE",ce="11.0",ke=["Trident"],P="Windows");P=P&&c(P)}if(ce&&(F=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ce)||/(?:alpha|beta)(?: ?\d)?/i.exec(w+";"+(ve&&W.appMinorVersion))||/\bMinefield\b/i.test(w)&&"a")&&(je=/b/i.test(F)?"beta":"alpha",ce=ce.replace(RegExp(F+"\\+?$"),"")+(je=="beta"?Ee:he)+(/\d+\+?/.exec(F)||"")),Ne=="Fennec"||Ne=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(P))Ne="Firefox Mobile";else if(Ne=="Maxthon"&&ce)ce=ce.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Je))Je=="Xbox 360"&&(P=null),Je=="Xbox 360"&&/\bIEMobile\b/.test(w)&&De.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(Ne)&&(!Ne||Je||/Browser|Mobi/.test(Ne))||P!="Windows CE"&&!/Mobi/i.test(w))if(Ne=="IE"&&ve)try{N.external===null&&De.unshift("platform preview")}catch(q){De.unshift("embedded")}else(/\bBlackBerry\b/.test(Je)||/\bBB10\b/.test(w))&&(F=(RegExp(Je.replace(/ +/g," *")+"/([.\\d]+)","i").exec(w)||0)[1]||ce)?(F=[F,/BB10/.test(w)],P=(F[1]?(Je=null,te="BlackBerry"):"Device Software")+" "+F[0],ce=null):this!=s&&Je!="Wii"&&(ve&&be||/Opera/.test(Ne)&&/\b(?:MSIE|Firefox)\b/i.test(w)||Ne=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(P)||Ne=="IE"&&(P&&!/^Win/.test(P)&&ce>5.5||/\bWindows XP\b/.test(P)&&ce>8||ce==8&&!/\bTrident\b/.test(w)))&&!m.test(F=r.call(s,w.replace(m,"")+";"))&&F.name&&(F="ing as "+F.name+((F=F.version)?" "+F:""),m.test(Ne)?(/\bIE\b/.test(F)&&P=="Mac OS"&&(P=null),F="identify"+F):(F="mask"+F,Ne=Ue?c(Ue.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(F)&&(P=null),ve||(ce=null)),ke=["Presto"],De.push(F));else Ne+=" Mobile";(F=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(w)||0)[1])&&(F=[parseFloat(F.replace(/\.(\d)$/,".0$1")),F],Ne=="Safari"&&F[1].slice(-1)=="+"?(Ne="WebKit Nightly",je="alpha",ce=F[1].slice(0,-1)):ce!=F[1]&&ce!=(F[2]=(/\bSafari\/([\d.]+\+?)/i.exec(w)||0)[1])||(ce=null),F[1]=(/\bChrome\/([\d.]+)/i.exec(w)||0)[1],F[0]==537.36&&F[2]==537.36&&parseFloat(F[1])>=28&&ke=="WebKit"&&(ke=["Blink"]),ve&&(K||F[1])?(ke&&(ke[1]="like Chrome"),F=F[1]||(F=F[0],F<530?1:F<532?2:F<532.05?3:F<533?4:F<534.03?5:F<534.07?6:F<534.1?7:F<534.13?8:F<534.16?9:F<534.24?10:F<534.3?11:F<535.01?12:F<535.02?"13+":F<535.07?15:F<535.11?16:F<535.19?17:F<536.05?18:F<536.1?19:F<537.01?20:F<537.11?"21+":F<537.13?23:F<537.18?24:F<537.24?25:F<537.36?26:ke!="Blink"?"27":"28")):(ke&&(ke[1]="like Safari"),F=F[0],F=F<400?1:F<500?2:F<526?3:F<533?4:F<534?"4+":F<535?5:F<537?6:F<538?7:F<601?8:"8"),ke&&(ke[1]+=" "+(F+=typeof F=="number"?".x":/[.+]/.test(F)?"":"+")),Ne=="Safari"&&(!ce||parseInt(ce)>45)&&(ce=F)),Ne=="Opera"&&(F=/\bzbov|zvav$/.exec(P))?(Ne+=" ",De.unshift("desktop mode"),F=="zvav"?(Ne+="Mini",ce=null):Ne+="Mobile",P=P.replace(RegExp(" *"+F+"$"),"")):Ne=="Safari"&&/\bChrome\b/.exec(ke&&ke[1])&&(De.unshift("desktop mode"),Ne="Chrome Mobile",ce=null,/\bOS X\b/.test(P)?(te="Apple",P="iOS 4.3+"):P=null),ce&&ce.indexOf(F=/[\d.]+$/.exec(P))==0&&w.indexOf("/"+F+"-")>-1&&(P=a(P.replace(F,""))),ke&&!/\b(?:Avant|Nook)\b/.test(Ne)&&(/Browser|Lunascape|Maxthon/.test(Ne)||Ne!="Safari"&&/^iOS/.test(P)&&/\bSafari\b/.test(ke[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Ne)&&ke[1])&&(F=ke[ke.length-1])&&De.push(F),De.length&&(De=["("+De.join("; ")+")"]),te&&Je&&Je.indexOf(te)<0&&De.push("on "+te),Je&&De.push((/^on /.test(De[De.length-1])?"":"on ")+Je),P&&(F=/ ([\d.+]+)$/.exec(P),k=F&&P.charAt(P.length-F[0].length-1)=="/",P={architecture:32,family:F&&!k?P.replace(F[0],""):P,version:F?F[1]:null,toString:function(){var q=this.version;return this.family+(q&&!k?" "+q:"")+(this.architecture==64?" 64-bit":"")}}),(F=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Re))&&!/\bi686\b/i.test(Re)?(P&&(P.architecture=64,P.family=P.family.replace(RegExp(" *"+F),"")),Ne&&(/\bWOW64\b/i.test(w)||ve&&/\w(?:86|32)$/.test(W.cpuClass||W.platform)&&!/\bWin64; x64\b/i.test(w))&&De.unshift("32-bit")):P&&/^OS X/.test(P.family)&&Ne=="Chrome"&&parseFloat(ce)>=39&&(P.architecture=64),w||(w=null);var U={};return U.description=w,U.layout=ke&&ke[0],U.manufacturer=te,U.name=Ne,U.prerelease=je,U.product=Je,U.ua=w,U.version=Ne&&ce,U.os=P||{architecture:null,family:null,version:null,toString:function(){return"null"}},U.parse=r,U.toString=R,U.version&&De.unshift(ce),U.name&&De.unshift(Ne),P&&Ne&&(P!=String(P).split(" ")[0]||P!=Ne.split(" ")[0]&&!Je)&&De.push(Je?"("+P+")":"on "+P),De.length&&(U.description=De.join(" ")),U}var t={function:!0,object:!0},d=t[typeof window]&&window||this,v=t[typeof S]&&S,y=t[typeof D]&&D&&!D.nodeType&&D,b=v&&y&&typeof A=="object"&&A;!b||b.global!==b&&b.window!==b&&b.self!==b||(d=b);var g=Math.pow(2,53)-1,m=/\bOpera/,_=Object.prototype,x=_.hasOwnProperty,f=_.toString,E=r();typeof B=="function"&&typeof B.amd=="object"&&B.amd?(d.platform=E,B(function(){return E})):v&&y?s(E,function(w,T){v[T]=w}):d.platform=E}).call(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(O,D,S){(function(A){"use strict";function C(h,p,c,s){if(typeof h!="function")throw new TypeError('"callback" argument must be a function');var n,o,i=arguments.length;switch(i){case 0:case 1:return A.nextTick(h);case 2:return A.nextTick(function(){h.call(null,p)});case 3:return A.nextTick(function(){h.call(null,p,c)});case 4:return A.nextTick(function(){h.call(null,p,c,s)});default:for(n=new Array(i-1),o=0;o<n.length;)n[o++]=arguments[o];return A.nextTick(function(){h.apply(null,n)})}}!A.version||A.version.indexOf("v0.")===0||A.version.indexOf("v1.")===0&&A.version.indexOf("v1.8.")!==0?D.exports={nextTick:C}:D.exports=A}).call(this,O("_process"))},{_process:173}],173:[function(O,D,S){function A(){throw new Error("setTimeout has not been defined")}function C(){throw new Error("clearTimeout has not been defined")}function h(y){if(i===setTimeout)return setTimeout(y,0);if((i===A||!i)&&setTimeout)return i=setTimeout,setTimeout(y,0);try{return i(y,0)}catch(b){try{return i.call(null,y,0)}catch(g){return i.call(this,y,0)}}}function p(y){if(l===clearTimeout)return clearTimeout(y);if((l===C||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(y);try{return l(y)}catch(b){try{return l.call(null,y)}catch(g){return l.call(this,y)}}}function c(){d&&r&&(d=!1,r.length?t=r.concat(t):v=-1,t.length&&s())}function s(){if(!d){var y=h(c);d=!0;for(var b=t.length;b;){for(r=t,t=[];++v<b;)r&&r[v].run();v=-1,b=t.length}r=null,d=!1,p(y)}}function n(y,b){this.fun=y,this.array=b}function o(){}var i,l,a=D.exports={};!function(){try{i=typeof setTimeout=="function"?setTimeout:A}catch(y){i=A}try{l=typeof clearTimeout=="function"?clearTimeout:C}catch(y){l=C}}();var r,t=[],d=!1,v=-1;a.nextTick=function(y){var b=new Array(arguments.length-1);if(arguments.length>1)for(var g=1;g<arguments.length;g++)b[g-1]=arguments[g];t.push(new n(y,b)),t.length!==1||d||h(s)},n.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.prependListener=o,a.prependOnceListener=o,a.listeners=function(y){return[]},a.binding=function(y){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(y){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],174:[function(O,D,S){(function(A){!function(C){function h(Q){throw new RangeError(k[Q])}function p(Q,re){for(var oe=Q.length,me=[];oe--;)me[oe]=re(Q[oe]);return me}function c(Q,re){var oe=Q.split("@"),me="";return oe.length>1&&(me=oe[0]+"@",Q=oe[1]),Q=Q.replace(F,"."),me+p(Q.split("."),re).join(".")}function s(Q){for(var re,oe,me=[],he=0,Ee=Q.length;he<Ee;)re=Q.charCodeAt(he++),re>=55296&&re<=56319&&he<Ee?(oe=Q.charCodeAt(he++),(64512&oe)==56320?me.push(((1023&re)<<10)+(1023&oe)+65536):(me.push(re),he--)):me.push(re);return me}function n(Q){return p(Q,function(re){var oe="";return re>65535&&(re-=65536,oe+=H(re>>>10&1023|55296),re=56320|1023&re),oe+=H(re)}).join("")}function o(Q){return Q-48<10?Q-22:Q-65<26?Q-65:Q-97<26?Q-97:x}function i(Q,re){return Q+22+75*(Q<26)-((re!=0)<<5)}function l(Q,re,oe){var me=0;for(Q=oe?Y(Q/T):Q>>1,Q+=Y(Q/re);Q>K*E>>1;me+=x)Q=Y(Q/K);return Y(me+(K+1)*Q/(Q+w))}function a(Q){var re,oe,me,he,Ee,de,be,Ue,Re,De,je=[],ve=Q.length,ce=0,ke=N,Ne=R;for(oe=Q.lastIndexOf(j),oe<0&&(oe=0),me=0;me<oe;++me)Q.charCodeAt(me)>=128&&h("not-basic"),je.push(Q.charCodeAt(me));for(he=oe>0?oe+1:0;he<ve;){for(Ee=ce,de=1,be=x;he>=ve&&h("invalid-input"),Ue=o(Q.charCodeAt(he++)),(Ue>=x||Ue>Y((_-ce)/de))&&h("overflow"),ce+=Ue*de,Re=be<=Ne?f:be>=Ne+E?E:be-Ne,!(Ue<Re);be+=x)De=x-Re,de>Y(_/De)&&h("overflow"),de*=De;re=je.length+1,Ne=l(ce-Ee,re,Ee==0),Y(ce/re)>_-ke&&h("overflow"),ke+=Y(ce/re),ce%=re,je.splice(ce++,0,ke)}return n(je)}function r(Q){var re,oe,me,he,Ee,de,be,Ue,Re,De,je,ve,ce,ke,Ne,Je=[];for(Q=s(Q),ve=Q.length,re=N,oe=0,Ee=R,de=0;de<ve;++de)(je=Q[de])<128&&Je.push(H(je));for(me=he=Je.length,he&&Je.push(j);me<ve;){for(be=_,de=0;de<ve;++de)(je=Q[de])>=re&&je<be&&(be=je);for(ce=me+1,be-re>Y((_-oe)/ce)&&h("overflow"),oe+=(be-re)*ce,re=be,de=0;de<ve;++de)if(je=Q[de],je<re&&++oe>_&&h("overflow"),je==re){for(Ue=oe,Re=x;De=Re<=Ee?f:Re>=Ee+E?E:Re-Ee,!(Ue<De);Re+=x)Ne=Ue-De,ke=x-De,Je.push(H(i(De+Ne%ke,0))),Ue=Y(Ne/ke);Je.push(H(i(Ue,0))),Ee=l(oe,ce,me==he),oe=0,++me}++oe,++re}return Je.join("")}function t(Q){return c(Q,function(re){return W.test(re)?a(re.slice(4).toLowerCase()):re})}function d(Q){return c(Q,function(re){return J.test(re)?"xn--"+r(re):re})}var v=typeof S=="object"&&S&&!S.nodeType&&S,y=typeof D=="object"&&D&&!D.nodeType&&D,b=typeof A=="object"&&A;b.global!==b&&b.window!==b&&b.self!==b||(C=b);var g,m,_=2147483647,x=36,f=1,E=26,w=38,T=700,R=72,N=128,j="-",W=/^xn--/,J=/[^\x20-\x7E]/,F=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},K=x-f,Y=Math.floor,H=String.fromCharCode;if(g={version:"1.4.1",ucs2:{decode:s,encode:n},decode:a,encode:r,toASCII:d,toUnicode:t},typeof B=="function"&&typeof B.amd=="object"&&B.amd)B("punycode",function(){return g});else if(v&&y)if(D.exports==v)y.exports=g;else for(m in g)g.hasOwnProperty(m)&&(v[m]=g[m]);else C.punycode=g}(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(O,D,S){"use strict";function A(h,p){return Object.prototype.hasOwnProperty.call(h,p)}D.exports=function(h,p,c,s){p=p||"&",c=c||"=";var n={};if(typeof h!="string"||h.length===0)return n;var o=/\+/g;h=h.split(p);var i=1e3;s&&typeof s.maxKeys=="number"&&(i=s.maxKeys);var l=h.length;i>0&&l>i&&(l=i);for(var a=0;a<l;++a){var r,t,d,v,y=h[a].replace(o,"%20"),b=y.indexOf(c);b>=0?(r=y.substr(0,b),t=y.substr(b+1)):(r=y,t=""),d=decodeURIComponent(r),v=decodeURIComponent(t),A(n,d)?C(n[d])?n[d].push(v):n[d]=[n[d],v]:n[d]=v}return n};var C=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"}},{}],176:[function(O,D,S){"use strict";function A(c,s){if(c.map)return c.map(s);for(var n=[],o=0;o<c.length;o++)n.push(s(c[o],o));return n}var C=function(c){switch(typeof c){case"string":return c;case"boolean":return c?"true":"false";case"number":return isFinite(c)?c:"";default:return""}};D.exports=function(c,s,n,o){return s=s||"&",n=n||"=",c===null&&(c=void 0),typeof c=="object"?A(p(c),function(i){var l=encodeURIComponent(C(i))+n;return h(c[i])?A(c[i],function(a){return l+encodeURIComponent(C(a))}).join(s):l+encodeURIComponent(C(c[i]))}).join(s):o?encodeURIComponent(C(o))+n+encodeURIComponent(C(c)):""};var h=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"},p=Object.keys||function(c){var s=[];for(var n in c)Object.prototype.hasOwnProperty.call(c,n)&&s.push(n);return s}},{}],177:[function(O,D,S){"use strict";S.decode=S.parse=O("./decode"),S.encode=S.stringify=O("./encode")},{"./decode":175,"./encode":176}],178:[function(O,D,S){D.exports=O("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(O,D,S){"use strict";function A(d){if(!(this instanceof A))return new A(d);i.call(this,d),l.call(this,d),d&&d.readable===!1&&(this.readable=!1),d&&d.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,d&&d.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",C)}function C(){this.allowHalfOpen||this._writableState.ended||s.nextTick(h,this)}function h(d){d.end()}var p=O("babel-runtime/core-js/object/keys"),c=function(d){return d&&d.__esModule?d:{default:d}}(p),s=O("process-nextick-args"),n=c.default||function(d){var v=[];for(var y in d)v.push(y);return v};D.exports=A;var o=O("core-util-is");o.inherits=O("inherits");var i=O("./_stream_readable"),l=O("./_stream_writable");o.inherits(A,i);for(var a=n(l.prototype),r=0;r<a.length;r++){var t=a[r];A.prototype[t]||(A.prototype[t]=l.prototype[t])}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(d){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=d,this._writableState.destroyed=d)}}),A.prototype._destroy=function(d,v){this.push(null),this.end(),s.nextTick(v,d)}},{"./_stream_readable":181,"./_stream_writable":183,"babel-runtime/core-js/object/keys":23,"core-util-is":153,inherits:162,"process-nextick-args":172}],180:[function(O,D,S){"use strict";function A(p){if(!(this instanceof A))return new A(p);C.call(this,p)}D.exports=A;var C=O("./_stream_transform"),h=O("core-util-is");h.inherits=O("inherits"),h.inherits(A,C),A.prototype._transform=function(p,c,s){s(null,p)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(O,D,S){(function(A,C){"use strict";function h(ve){return oe.from(ve)}function p(ve){return oe.isBuffer(ve)||ve instanceof me}function c(ve,ce,ke){if(typeof ve.prependListener=="function")return ve.prependListener(ce,ke);ve._events&&ve._events[ce]?H(ve._events[ce])?ve._events[ce].unshift(ke):ve._events[ce]=[ke,ve._events[ce]]:ve.on(ce,ke)}function s(ve,ce){Y=Y||O("./_stream_duplex"),ve=ve||{};var ke=ce instanceof Y;this.objectMode=!!ve.objectMode,ke&&(this.objectMode=this.objectMode||!!ve.readableObjectMode);var Ne=ve.highWaterMark,Je=ve.readableHighWaterMark,te=this.objectMode?16:16384;this.highWaterMark=Ne||Ne===0?Ne:ke&&(Je||Je===0)?Je:te,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Ue,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=ve.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ve.encoding&&(be||(be=O("string_decoder/").StringDecoder),this.decoder=new be(ve.encoding),this.encoding=ve.encoding)}function n(ve){if(Y=Y||O("./_stream_duplex"),!(this instanceof n))return new n(ve);this._readableState=new s(ve,this),this.readable=!0,ve&&(typeof ve.read=="function"&&(this._read=ve.read),typeof ve.destroy=="function"&&(this._destroy=ve.destroy)),re.call(this)}function o(ve,ce,ke,Ne,Je){var te=ve._readableState;if(ce===null)te.reading=!1,d(ve,te);else{var P;Je||(P=l(te,ce)),P?ve.emit("error",P):te.objectMode||ce&&ce.length>0?(typeof ce=="string"||te.objectMode||(0,k.default)(ce)===oe.prototype||(ce=h(ce)),Ne?te.endEmitted?ve.emit("error",new Error("stream.unshift() after end event")):i(ve,te,ce,!0):te.ended?ve.emit("error",new Error("stream.push() after EOF")):(te.reading=!1,te.decoder&&!ke?(ce=te.decoder.write(ce),te.objectMode||ce.length!==0?i(ve,te,ce,!1):b(ve,te)):i(ve,te,ce,!1))):Ne||(te.reading=!1)}return a(te)}function i(ve,ce,ke,Ne){ce.flowing&&ce.length===0&&!ce.sync?(ve.emit("data",ke),ve.read(0)):(ce.length+=ce.objectMode?1:ke.length,Ne?ce.buffer.unshift(ke):ce.buffer.push(ke),ce.needReadable&&v(ve)),b(ve,ce)}function l(ve,ce){var ke;return p(ce)||typeof ce=="string"||ce===void 0||ve.objectMode||(ke=new TypeError("Invalid non-string/buffer chunk")),ke}function a(ve){return!ve.ended&&(ve.needReadable||ve.length<ve.highWaterMark||ve.length===0)}function r(ve){return ve>=je?ve=je:(ve--,ve|=ve>>>1,ve|=ve>>>2,ve|=ve>>>4,ve|=ve>>>8,ve|=ve>>>16,ve++),ve}function t(ve,ce){return ve<=0||ce.length===0&&ce.ended?0:ce.objectMode?1:ve!==ve?ce.flowing&&ce.length?ce.buffer.head.data.length:ce.length:(ve>ce.highWaterMark&&(ce.highWaterMark=r(ve)),ve<=ce.length?ve:ce.ended?ce.length:(ce.needReadable=!0,0))}function d(ve,ce){if(!ce.ended){if(ce.decoder){var ke=ce.decoder.end();ke&&ke.length&&(ce.buffer.push(ke),ce.length+=ce.objectMode?1:ke.length)}ce.ended=!0,v(ve)}}function v(ve){var ce=ve._readableState;ce.needReadable=!1,ce.emittedReadable||(de("emitReadable",ce.flowing),ce.emittedReadable=!0,ce.sync?K.nextTick(y,ve):y(ve))}function y(ve){de("emit readable"),ve.emit("readable"),E(ve)}function b(ve,ce){ce.readingMore||(ce.readingMore=!0,K.nextTick(g,ve,ce))}function g(ve,ce){for(var ke=ce.length;!ce.reading&&!ce.flowing&&!ce.ended&&ce.length<ce.highWaterMark&&(de("maybeReadMore read 0"),ve.read(0),ke!==ce.length);)ke=ce.length;ce.readingMore=!1}function m(ve){return function(){var ce=ve._readableState;de("pipeOnDrain",ce.awaitDrain),ce.awaitDrain&&ce.awaitDrain--,ce.awaitDrain===0&&Q(ve,"data")&&(ce.flowing=!0,E(ve))}}function _(ve){de("readable nexttick read 0"),ve.read(0)}function x(ve,ce){ce.resumeScheduled||(ce.resumeScheduled=!0,K.nextTick(f,ve,ce))}function f(ve,ce){ce.reading||(de("resume read 0"),ve.read(0)),ce.resumeScheduled=!1,ce.awaitDrain=0,ve.emit("resume"),E(ve),ce.flowing&&!ce.reading&&ve.read(0)}function E(ve){var ce=ve._readableState;for(de("flow",ce.flowing);ce.flowing&&ve.read()!==null;);}function w(ve,ce){if(ce.length===0)return null;var ke;return ce.objectMode?ke=ce.buffer.shift():!ve||ve>=ce.length?(ke=ce.decoder?ce.buffer.join(""):ce.buffer.length===1?ce.buffer.head.data:ce.buffer.concat(ce.length),ce.buffer.clear()):ke=T(ve,ce.buffer,ce.decoder),ke}function T(ve,ce,ke){var Ne;return ve<ce.head.data.length?(Ne=ce.head.data.slice(0,ve),ce.head.data=ce.head.data.slice(ve)):Ne=ve===ce.head.data.length?ce.shift():ke?R(ve,ce):N(ve,ce),Ne}function R(ve,ce){var ke=ce.head,Ne=1,Je=ke.data;for(ve-=Je.length;ke=ke.next;){var te=ke.data,P=ve>te.length?te.length:ve;if(P===te.length?Je+=te:Je+=te.slice(0,ve),(ve-=P)===0){P===te.length?(++Ne,ke.next?ce.head=ke.next:ce.head=ce.tail=null):(ce.head=ke,ke.data=te.slice(P));break}++Ne}return ce.length-=Ne,Je}function N(ve,ce){var ke=oe.allocUnsafe(ve),Ne=ce.head,Je=1;for(Ne.data.copy(ke),ve-=Ne.data.length;Ne=Ne.next;){var te=Ne.data,P=ve>te.length?te.length:ve;if(te.copy(ke,ke.length-ve,0,P),(ve-=P)===0){P===te.length?(++Je,Ne.next?ce.head=Ne.next:ce.head=ce.tail=null):(ce.head=Ne,Ne.data=te.slice(P));break}++Je}return ce.length-=Je,ke}function j(ve){var ce=ve._readableState;if(ce.length>0)throw new Error('"endReadable()" called on non-empty stream');ce.endEmitted||(ce.ended=!0,K.nextTick(W,ce,ve))}function W(ve,ce){ve.endEmitted||ve.length!==0||(ve.endEmitted=!0,ce.readable=!1,ce.emit("end"))}function J(ve,ce){for(var ke=0,Ne=ve.length;ke<Ne;ke++)if(ve[ke]===ce)return ke;return-1}var F=O("babel-runtime/core-js/object/get-prototype-of"),k=function(ve){return ve&&ve.__esModule?ve:{default:ve}}(F),K=O("process-nextick-args");D.exports=n;var Y,H=O("isarray");n.ReadableState=s;var Q=(O("events").EventEmitter,function(ve,ce){return ve.listeners(ce).length}),re=O("./internal/streams/stream"),oe=O("safe-buffer").Buffer,me=C.Uint8Array||function(){},he=O("core-util-is");he.inherits=O("inherits");var Ee=O("util"),de=void 0;de=Ee&&Ee.debuglog?Ee.debuglog("stream"):function(){};var be,Ue=O("./internal/streams/BufferList"),Re=O("./internal/streams/destroy");he.inherits(n,re);var De=["error","close","destroy","pause","resume"];Object.defineProperty(n.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(ve){this._readableState&&(this._readableState.destroyed=ve)}}),n.prototype.destroy=Re.destroy,n.prototype._undestroy=Re.undestroy,n.prototype._destroy=function(ve,ce){this.push(null),ce(ve)},n.prototype.push=function(ve,ce){var ke,Ne=this._readableState;return Ne.objectMode?ke=!0:typeof ve=="string"&&(ce=ce||Ne.defaultEncoding,ce!==Ne.encoding&&(ve=oe.from(ve,ce),ce=""),ke=!0),o(this,ve,ce,!1,ke)},n.prototype.unshift=function(ve){return o(this,ve,null,!0,!1)},n.prototype.isPaused=function(){return this._readableState.flowing===!1},n.prototype.setEncoding=function(ve){return be||(be=O("string_decoder/").StringDecoder),this._readableState.decoder=new be(ve),this._readableState.encoding=ve,this};var je=8388608;n.prototype.read=function(ve){de("read",ve),ve=parseInt(ve,10);var ce=this._readableState,ke=ve;if(ve!==0&&(ce.emittedReadable=!1),ve===0&&ce.needReadable&&(ce.length>=ce.highWaterMark||ce.ended))return de("read: emitReadable",ce.length,ce.ended),ce.length===0&&ce.ended?j(this):v(this),null;if((ve=t(ve,ce))===0&&ce.ended)return ce.length===0&&j(this),null;var Ne=ce.needReadable;de("need readable",Ne),(ce.length===0||ce.length-ve<ce.highWaterMark)&&(Ne=!0,de("length less than watermark",Ne)),ce.ended||ce.reading?(Ne=!1,de("reading or ended",Ne)):Ne&&(de("do read"),ce.reading=!0,ce.sync=!0,ce.length===0&&(ce.needReadable=!0),this._read(ce.highWaterMark),ce.sync=!1,ce.reading||(ve=t(ke,ce)));var Je;return Je=ve>0?w(ve,ce):null,Je===null?(ce.needReadable=!0,ve=0):ce.length-=ve,ce.length===0&&(ce.ended||(ce.needReadable=!0),ke!==ve&&ce.ended&&j(this)),Je!==null&&this.emit("data",Je),Je},n.prototype._read=function(ve){this.emit("error",new Error("_read() is not implemented"))},n.prototype.pipe=function(ve,ce){function ke(et,ze){de("onunpipe"),et===$&&ze&&ze.hasUnpiped===!1&&(ze.hasUnpiped=!0,Je())}function Ne(){de("onend"),ve.end()}function Je(){de("cleanup"),ve.removeListener("close",U),ve.removeListener("finish",q),ve.removeListener("drain",Le),ve.removeListener("error",P),ve.removeListener("unpipe",ke),$.removeListener("end",Ne),$.removeListener("end",X),$.removeListener("data",te),Me=!0,!ge.awaitDrain||ve._writableState&&!ve._writableState.needDrain||Le()}function te(et){de("ondata"),Xe=!1,ve.write(et)!==!1||Xe||((ge.pipesCount===1&&ge.pipes===ve||ge.pipesCount>1&&J(ge.pipes,ve)!==-1)&&!Me&&(de("false write response, pause",$._readableState.awaitDrain),$._readableState.awaitDrain++,Xe=!0),$.pause())}function P(et){de("onerror",et),X(),ve.removeListener("error",P),Q(ve,"error")===0&&ve.emit("error",et)}function U(){ve.removeListener("finish",q),X()}function q(){de("onfinish"),ve.removeListener("close",U),X()}function X(){de("unpipe"),$.unpipe(ve)}var $=this,ge=this._readableState;switch(ge.pipesCount){case 0:ge.pipes=ve;break;case 1:ge.pipes=[ge.pipes,ve];break;default:ge.pipes.push(ve)}ge.pipesCount+=1,de("pipe count=%d opts=%j",ge.pipesCount,ce);var Ae=(!ce||ce.end!==!1)&&ve!==A.stdout&&ve!==A.stderr,at=Ae?Ne:X;ge.endEmitted?K.nextTick(at):$.once("end",at),ve.on("unpipe",ke);var Le=m($);ve.on("drain",Le);var Me=!1,Xe=!1;return $.on("data",te),c(ve,"error",P),ve.once("close",U),ve.once("finish",q),ve.emit("pipe",$),ge.flowing||(de("pipe resume"),$.resume()),ve},n.prototype.unpipe=function(ve){var ce=this._readableState,ke={hasUnpiped:!1};if(ce.pipesCount===0)return this;if(ce.pipesCount===1)return ve&&ve!==ce.pipes?this:(ve||(ve=ce.pipes),ce.pipes=null,ce.pipesCount=0,ce.flowing=!1,ve&&ve.emit("unpipe",this,ke),this);if(!ve){var Ne=ce.pipes,Je=ce.pipesCount;ce.pipes=null,ce.pipesCount=0,ce.flowing=!1;for(var te=0;te<Je;te++)Ne[te].emit("unpipe",this,ke);return this}var P=J(ce.pipes,ve);return P===-1?this:(ce.pipes.splice(P,1),ce.pipesCount-=1,ce.pipesCount===1&&(ce.pipes=ce.pipes[0]),ve.emit("unpipe",this,ke),this)},n.prototype.on=function(ve,ce){var ke=re.prototype.on.call(this,ve,ce);if(ve==="data")this._readableState.flowing!==!1&&this.resume();else if(ve==="readable"){var Ne=this._readableState;Ne.endEmitted||Ne.readableListening||(Ne.readableListening=Ne.needReadable=!0,Ne.emittedReadable=!1,Ne.reading?Ne.length&&v(this):K.nextTick(_,this))}return ke},n.prototype.addListener=n.prototype.on,n.prototype.resume=function(){var ve=this._readableState;return ve.flowing||(de("resume"),ve.flowing=!0,x(this,ve)),this},n.prototype.pause=function(){return de("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(de("pause"),this._readableState.flowing=!1,this.emit("pause")),this},n.prototype.wrap=function(ve){var ce=this,ke=this._readableState,Ne=!1;ve.on("end",function(){if(de("wrapped end"),ke.decoder&&!ke.ended){var P=ke.decoder.end();P&&P.length&&ce.push(P)}ce.push(null)}),ve.on("data",function(P){(de("wrapped data"),ke.decoder&&(P=ke.decoder.write(P)),(!ke.objectMode||P!=null)&&(ke.objectMode||P&&P.length))&&(ce.push(P)||(Ne=!0,ve.pause()))});for(var Je in ve)this[Je]===void 0&&typeof ve[Je]=="function"&&(this[Je]=function(P){return function(){return ve[P].apply(ve,arguments)}}(Je));for(var te=0;te<De.length;te++)ve.on(De[te],this.emit.bind(this,De[te]));return this._read=function(P){de("wrapped _read",P),Ne&&(Ne=!1,ve.resume())},this},Object.defineProperty(n.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),n._fromList=w}).call(this,O("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/BufferList":184,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/get-prototype-of":22,"core-util-is":153,events:158,inherits:162,isarray:166,"process-nextick-args":172,"safe-buffer":193,"string_decoder/":200,util:36}],182:[function(O,D,S){"use strict";function A(n,o){var i=this._transformState;i.transforming=!1;var l=i.writecb;if(!l)return this.emit("error",new Error("write callback called multiple times"));i.writechunk=null,i.writecb=null,o!=null&&this.push(o),l(n);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function C(n){if(!(this instanceof C))return new C(n);c.call(this,n),this._transformState={afterTransform:A.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,n&&(typeof n.transform=="function"&&(this._transform=n.transform),typeof n.flush=="function"&&(this._flush=n.flush)),this.on("prefinish",h)}function h(){var n=this;typeof this._flush=="function"?this._flush(function(o,i){p(n,o,i)}):p(this,null,null)}function p(n,o,i){if(o)return n.emit("error",o);if(i!=null&&n.push(i),n._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(n._transformState.transforming)throw new Error("Calling transform done when still transforming");return n.push(null)}D.exports=C;var c=O("./_stream_duplex"),s=O("core-util-is");s.inherits=O("inherits"),s.inherits(C,c),C.prototype.push=function(n,o){return this._transformState.needTransform=!1,c.prototype.push.call(this,n,o)},C.prototype._transform=function(n,o,i){throw new Error("_transform() is not implemented")},C.prototype._write=function(n,o,i){var l=this._transformState;if(l.writecb=i,l.writechunk=n,l.writeencoding=o,!l.transforming){var a=this._readableState;(l.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}},C.prototype._read=function(n){var o=this._transformState;o.writechunk!==null&&o.writecb&&!o.transforming?(o.transforming=!0,this._transform(o.writechunk,o.writeencoding,o.afterTransform)):o.needTransform=!0},C.prototype._destroy=function(n,o){var i=this;c.prototype._destroy.call(this,n,function(l){o(l),i.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(O,D,S){(function(A,C){"use strict";function h(Re){return Re&&Re.__esModule?Re:{default:Re}}function p(Re){var De=this;this.next=null,this.entry=null,this.finish=function(){R(De,Re)}}function c(Re){return Ee.from(Re)}function s(Re){return Ee.isBuffer(Re)||Re instanceof de}function n(){}function o(Re,De){Q=Q||O("./_stream_duplex"),Re=Re||{};var je=De instanceof Q;this.objectMode=!!Re.objectMode,je&&(this.objectMode=this.objectMode||!!Re.writableObjectMode);var ve=Re.highWaterMark,ce=Re.writableHighWaterMark,ke=this.objectMode?16:16384;this.highWaterMark=ve||ve===0?ve:je&&(ce||ce===0)?ce:ke,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Ne=Re.decodeStrings===!1;this.decodeStrings=!Ne,this.defaultEncoding=Re.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Je){b(De,Je)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new p(this)}function i(Re){if(Q=Q||O("./_stream_duplex"),!(Ue.call(i,this)||this instanceof Q))return new i(Re);this._writableState=new o(Re,this),this.writable=!0,Re&&(typeof Re.write=="function"&&(this._write=Re.write),typeof Re.writev=="function"&&(this._writev=Re.writev),typeof Re.destroy=="function"&&(this._destroy=Re.destroy),typeof Re.final=="function"&&(this._final=Re.final)),he.call(this)}function l(Re,De){var je=new Error("write after end");Re.emit("error",je),H.nextTick(De,je)}function a(Re,De,je,ve){var ce=!0,ke=!1;return je===null?ke=new TypeError("May not write null values to stream"):typeof je=="string"||je===void 0||De.objectMode||(ke=new TypeError("Invalid non-string/buffer chunk")),ke&&(Re.emit("error",ke),H.nextTick(ve,ke),ce=!1),ce}function r(Re,De,je){return Re.objectMode||Re.decodeStrings===!1||typeof De!="string"||(De=Ee.from(De,je)),De}function t(Re,De,je,ve,ce,ke){if(!je){var Ne=r(De,ve,ce);ve!==Ne&&(je=!0,ce="buffer",ve=Ne)}var Je=De.objectMode?1:ve.length;De.length+=Je;var te=De.length<De.highWaterMark;if(te||(De.needDrain=!0),De.writing||De.corked){var P=De.lastBufferedRequest;De.lastBufferedRequest={chunk:ve,encoding:ce,isBuf:je,callback:ke,next:null},P?P.next=De.lastBufferedRequest:De.bufferedRequest=De.lastBufferedRequest,De.bufferedRequestCount+=1}else d(Re,De,!1,Je,ve,ce,ke);return te}function d(Re,De,je,ve,ce,ke,Ne){De.writelen=ve,De.writecb=Ne,De.writing=!0,De.sync=!0,je?Re._writev(ce,De.onwrite):Re._write(ce,ke,De.onwrite),De.sync=!1}function v(Re,De,je,ve,ce){--De.pendingcb,je?(H.nextTick(ce,ve),H.nextTick(w,Re,De),Re._writableState.errorEmitted=!0,Re.emit("error",ve)):(ce(ve),Re._writableState.errorEmitted=!0,Re.emit("error",ve),w(Re,De))}function y(Re){Re.writing=!1,Re.writecb=null,Re.length-=Re.writelen,Re.writelen=0}function b(Re,De){var je=Re._writableState,ve=je.sync,ce=je.writecb;if(y(je),De)v(Re,je,ve,De,ce);else{var ke=x(je);ke||je.corked||je.bufferProcessing||!je.bufferedRequest||_(Re,je),ve?re(g,Re,je,ke,ce):g(Re,je,ke,ce)}}function g(Re,De,je,ve){je||m(Re,De),De.pendingcb--,ve(),w(Re,De)}function m(Re,De){De.length===0&&De.needDrain&&(De.needDrain=!1,Re.emit("drain"))}function _(Re,De){De.bufferProcessing=!0;var je=De.bufferedRequest;if(Re._writev&&je&&je.next){var ve=De.bufferedRequestCount,ce=new Array(ve),ke=De.corkedRequestsFree;ke.entry=je;for(var Ne=0,Je=!0;je;)ce[Ne]=je,je.isBuf||(Je=!1),je=je.next,Ne+=1;ce.allBuffers=Je,d(Re,De,!0,De.length,ce,"",ke.finish),De.pendingcb++,De.lastBufferedRequest=null,ke.next?(De.corkedRequestsFree=ke.next,ke.next=null):De.corkedRequestsFree=new p(De),De.bufferedRequestCount=0}else{for(;je;){var te=je.chunk,P=je.encoding,U=je.callback;if(d(Re,De,!1,De.objectMode?1:te.length,te,P,U),je=je.next,De.bufferedRequestCount--,De.writing)break}je===null&&(De.lastBufferedRequest=null)}De.bufferedRequest=je,De.bufferProcessing=!1}function x(Re){return Re.ending&&Re.length===0&&Re.bufferedRequest===null&&!Re.finished&&!Re.writing}function f(Re,De){Re._final(function(je){De.pendingcb--,je&&Re.emit("error",je),De.prefinished=!0,Re.emit("prefinish"),w(Re,De)})}function E(Re,De){De.prefinished||De.finalCalled||(typeof Re._final=="function"?(De.pendingcb++,De.finalCalled=!0,H.nextTick(f,Re,De)):(De.prefinished=!0,Re.emit("prefinish")))}function w(Re,De){var je=x(De);return je&&(E(Re,De),De.pendingcb===0&&(De.finished=!0,Re.emit("finish"))),je}function T(Re,De,je){De.ending=!0,w(Re,De),je&&(De.finished?H.nextTick(je):Re.once("finish",je)),De.ended=!0,Re.writable=!1}function R(Re,De,je){var ve=Re.entry;for(Re.entry=null;ve;){var ce=ve.callback;De.pendingcb--,ce(je),ve=ve.next}De.corkedRequestsFree?De.corkedRequestsFree.next=Re:De.corkedRequestsFree=Re}var N=O("babel-runtime/core-js/object/define-property"),j=h(N),W=O("babel-runtime/core-js/symbol/has-instance"),J=h(W),F=O("babel-runtime/core-js/symbol"),k=h(F),K=O("babel-runtime/core-js/set-immediate"),Y=h(K),H=O("process-nextick-args");D.exports=i;var Q,re=!A.browser&&["v0.10","v0.9."].indexOf(A.version.slice(0,5))>-1?Y.default:H.nextTick;i.WritableState=o;var oe=O("core-util-is");oe.inherits=O("inherits");var me={deprecate:O("util-deprecate")},he=O("./internal/streams/stream"),Ee=O("safe-buffer").Buffer,de=C.Uint8Array||function(){},be=O("./internal/streams/destroy");oe.inherits(i,he),o.prototype.getBuffer=function(){for(var Re=this.bufferedRequest,De=[];Re;)De.push(Re),Re=Re.next;return De},function(){try{Object.defineProperty(o.prototype,"buffer",{get:me.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Re){}}();var Ue;typeof k.default=="function"&&J.default&&typeof Function.prototype[J.default]=="function"?(Ue=Function.prototype[J.default],(0,j.default)(i,J.default,{value:function(Re){return!!Ue.call(this,Re)||this===i&&Re&&Re._writableState instanceof o}})):Ue=function(Re){return Re instanceof this},i.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},i.prototype.write=function(Re,De,je){var ve=this._writableState,ce=!1,ke=!ve.objectMode&&s(Re);return ke&&!Ee.isBuffer(Re)&&(Re=c(Re)),typeof De=="function"&&(je=De,De=null),ke?De="buffer":De||(De=ve.defaultEncoding),typeof je!="function"&&(je=n),ve.ended?l(this,je):(ke||a(this,ve,Re,je))&&(ve.pendingcb++,ce=t(this,ve,ke,Re,De,je)),ce},i.prototype.cork=function(){this._writableState.corked++},i.prototype.uncork=function(){var Re=this._writableState;Re.corked&&(Re.corked--,Re.writing||Re.corked||Re.finished||Re.bufferProcessing||!Re.bufferedRequest||_(this,Re))},i.prototype.setDefaultEncoding=function(Re){if(typeof Re=="string"&&(Re=Re.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Re+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Re);return this._writableState.defaultEncoding=Re,this},Object.defineProperty(i.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),i.prototype._write=function(Re,De,je){je(new Error("_write() is not implemented"))},i.prototype._writev=null,i.prototype.end=function(Re,De,je){var ve=this._writableState;typeof Re=="function"?(je=Re,Re=null,De=null):typeof De=="function"&&(je=De,De=null),Re!=null&&this.write(Re,De),ve.corked&&(ve.corked=1,this.uncork()),ve.ending||ve.finished||T(this,ve,je)},Object.defineProperty(i.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Re){this._writableState&&(this._writableState.destroyed=Re)}}),i.prototype.destroy=be.destroy,i.prototype._undestroy=be.undestroy,i.prototype._destroy=function(Re,De){this.end(),De(Re)}}).call(this,O("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(O,D,S){"use strict";function A(c,s){if(!(c instanceof s))throw new TypeError("Cannot call a class as a function")}function C(c,s,n){c.copy(s,n)}var h=O("safe-buffer").Buffer,p=O("util");D.exports=function(){function c(){A(this,c),this.head=null,this.tail=null,this.length=0}return c.prototype.push=function(s){var n={data:s,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},c.prototype.unshift=function(s){var n={data:s,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},c.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},c.prototype.clear=function(){this.head=this.tail=null,this.length=0},c.prototype.join=function(s){if(this.length===0)return"";for(var n=this.head,o=""+n.data;n=n.next;)o+=s+n.data;return o},c.prototype.concat=function(s){if(this.length===0)return h.alloc(0);if(this.length===1)return this.head.data;for(var n=h.allocUnsafe(s>>>0),o=this.head,i=0;o;)C(o.data,n,i),i+=o.data.length,o=o.next;return n},c}(),p&&p.inspect&&p.inspect.custom&&(D.exports.prototype[p.inspect.custom]=function(){var c=p.inspect({length:this.length});return this.constructor.name+" "+c})},{"safe-buffer":193,util:36}],185:[function(O,D,S){"use strict";function A(c,s){var n=this,o=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return o||i?(s?s(c):!c||this._writableState&&this._writableState.errorEmitted||p.nextTick(h,this,c),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(c||null,function(l){!s&&l?(p.nextTick(h,n,l),n._writableState&&(n._writableState.errorEmitted=!0)):s&&s(l)}),this)}function C(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function h(c,s){c.emit("error",s)}var p=O("process-nextick-args");D.exports={destroy:A,undestroy:C}},{"process-nextick-args":172}],186:[function(O,D,S){"use strict";D.exports=O("events").EventEmitter},{events:158}],187:[function(O,D,S){D.exports=O("./readable").PassThrough},{"./readable":188}],188:[function(O,D,S){S=D.exports=O("./lib/_stream_readable.js"),S.Stream=S,S.Readable=S,S.Writable=O("./lib/_stream_writable.js"),S.Duplex=O("./lib/_stream_duplex.js"),S.Transform=O("./lib/_stream_transform.js"),S.PassThrough=O("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(O,D,S){D.exports=O("./readable").Transform},{"./readable":188}],190:[function(O,D,S){D.exports=O("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(O,D,S){var A=function(){return this}()||Function("return this")(),C=A.regeneratorRuntime&&Object.getOwnPropertyNames(A).indexOf("regeneratorRuntime")>=0,h=C&&A.regeneratorRuntime;if(A.regeneratorRuntime=void 0,D.exports=O("./runtime"),C)A.regeneratorRuntime=h;else try{delete A.regeneratorRuntime}catch(p){A.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(O,D,S){!function(A){"use strict";function C(Y,H,Q,re){var oe=H&&H.prototype instanceof p?H:p,me=Object.create(oe.prototype),he=new t(re||[]);return me._invoke=i(Y,Q,he),me}function h(Y,H,Q){try{return{type:"normal",arg:Y.call(H,Q)}}catch(re){return{type:"throw",arg:re}}}function p(){}function c(){}function s(){}function n(Y){["next","throw","return"].forEach(function(H){Y[H]=function(Q){return this._invoke(H,Q)}})}function o(Y){function H(oe,me,he,Ee){var de=h(Y[oe],Y,me);if(de.type!=="throw"){var be=de.arg,Ue=be.value;return Ue&&typeof Ue=="object"&&g.call(Ue,"__await")?Promise.resolve(Ue.__await).then(function(Re){H("next",Re,he,Ee)},function(Re){H("throw",Re,he,Ee)}):Promise.resolve(Ue).then(function(Re){be.value=Re,he(be)},Ee)}Ee(de.arg)}function Q(oe,me){function he(){return new Promise(function(Ee,de){H(oe,me,Ee,de)})}return re=re?re.then(he,he):he()}var re;this._invoke=Q}function i(Y,H,Q){var re=T;return function(oe,me){if(re===N)throw new Error("Generator is already running");if(re===j){if(oe==="throw")throw me;return v()}for(Q.method=oe,Q.arg=me;;){var he=Q.delegate;if(he){var Ee=l(he,Q);if(Ee){if(Ee===W)continue;return Ee}}if(Q.method==="next")Q.sent=Q._sent=Q.arg;else if(Q.method==="throw"){if(re===T)throw re=j,Q.arg;Q.dispatchException(Q.arg)}else Q.method==="return"&&Q.abrupt("return",Q.arg);re=N;var de=h(Y,H,Q);if(de.type==="normal"){if(re=Q.done?j:R,de.arg===W)continue;return{value:de.arg,done:Q.done}}de.type==="throw"&&(re=j,Q.method="throw",Q.arg=de.arg)}}}function l(Y,H){var Q=Y.iterator[H.method];if(Q===y){if(H.delegate=null,H.method==="throw"){if(Y.iterator.return&&(H.method="return",H.arg=y,l(Y,H),H.method==="throw"))return W;H.method="throw",H.arg=new TypeError("The iterator does not provide a 'throw' method")}return W}var re=h(Q,Y.iterator,H.arg);if(re.type==="throw")return H.method="throw",H.arg=re.arg,H.delegate=null,W;var oe=re.arg;return oe?oe.done?(H[Y.resultName]=oe.value,H.next=Y.nextLoc,H.method!=="return"&&(H.method="next",H.arg=y),H.delegate=null,W):oe:(H.method="throw",H.arg=new TypeError("iterator result is not an object"),H.delegate=null,W)}function a(Y){var H={tryLoc:Y[0]};1 in Y&&(H.catchLoc=Y[1]),2 in Y&&(H.finallyLoc=Y[2],H.afterLoc=Y[3]),this.tryEntries.push(H)}function r(Y){var H=Y.completion||{};H.type="normal",delete H.arg,Y.completion=H}function t(Y){this.tryEntries=[{tryLoc:"root"}],Y.forEach(a,this),this.reset(!0)}function d(Y){if(Y){var H=Y[_];if(H)return H.call(Y);if(typeof Y.next=="function")return Y;if(!isNaN(Y.length)){var Q=-1,re=function oe(){for(;++Q<Y.length;)if(g.call(Y,Q))return oe.value=Y[Q],oe.done=!1,oe;return oe.value=y,oe.done=!0,oe};return re.next=re}}return{next:v}}function v(){return{value:y,done:!0}}var y,b=Object.prototype,g=b.hasOwnProperty,m=typeof Symbol=="function"?Symbol:{},_=m.iterator||"@@iterator",x=m.asyncIterator||"@@asyncIterator",f=m.toStringTag||"@@toStringTag",E=typeof D=="object",w=A.regeneratorRuntime;if(w)return void(E&&(D.exports=w));w=A.regeneratorRuntime=E?D.exports:{},w.wrap=C;var T="suspendedStart",R="suspendedYield",N="executing",j="completed",W={},J={};J[_]=function(){return this};var F=Object.getPrototypeOf,k=F&&F(F(d([])));k&&k!==b&&g.call(k,_)&&(J=k);var K=s.prototype=p.prototype=Object.create(J);c.prototype=K.constructor=s,s.constructor=c,s[f]=c.displayName="GeneratorFunction",w.isGeneratorFunction=function(Y){var H=typeof Y=="function"&&Y.constructor;return!!H&&(H===c||(H.displayName||H.name)==="GeneratorFunction")},w.mark=function(Y){return Object.setPrototypeOf?Object.setPrototypeOf(Y,s):(Y.__proto__=s,f in Y||(Y[f]="GeneratorFunction")),Y.prototype=Object.create(K),Y},w.awrap=function(Y){return{__await:Y}},n(o.prototype),o.prototype[x]=function(){return this},w.AsyncIterator=o,w.async=function(Y,H,Q,re){var oe=new o(C(Y,H,Q,re));return w.isGeneratorFunction(H)?oe:oe.next().then(function(me){return me.done?me.value:oe.next()})},n(K),K[f]="Generator",K[_]=function(){return this},K.toString=function(){return"[object Generator]"},w.keys=function(Y){var H=[];for(var Q in Y)H.push(Q);return H.reverse(),function re(){for(;H.length;){var oe=H.pop();if(oe in Y)return re.value=oe,re.done=!1,re}return re.done=!0,re}},w.values=d,t.prototype={constructor:t,reset:function(Y){if(this.prev=0,this.next=0,this.sent=this._sent=y,this.done=!1,this.delegate=null,this.method="next",this.arg=y,this.tryEntries.forEach(r),!Y)for(var H in this)H.charAt(0)==="t"&&g.call(this,H)&&!isNaN(+H.slice(1))&&(this[H]=y)},stop:function(){this.done=!0;var Y=this.tryEntries[0],H=Y.completion;if(H.type==="throw")throw H.arg;return this.rval},dispatchException:function(Y){function H(de,be){return me.type="throw",me.arg=Y,Q.next=de,be&&(Q.method="next",Q.arg=y),!!be}if(this.done)throw Y;for(var Q=this,re=this.tryEntries.length-1;re>=0;--re){var oe=this.tryEntries[re],me=oe.completion;if(oe.tryLoc==="root")return H("end");if(oe.tryLoc<=this.prev){var he=g.call(oe,"catchLoc"),Ee=g.call(oe,"finallyLoc");if(he&&Ee){if(this.prev<oe.catchLoc)return H(oe.catchLoc,!0);if(this.prev<oe.finallyLoc)return H(oe.finallyLoc)}else if(he){if(this.prev<oe.catchLoc)return H(oe.catchLoc,!0)}else{if(!Ee)throw new Error("try statement without catch or finally");if(this.prev<oe.finallyLoc)return H(oe.finallyLoc)}}}},abrupt:function(Y,H){for(var Q=this.tryEntries.length-1;Q>=0;--Q){var re=this.tryEntries[Q];if(re.tryLoc<=this.prev&&g.call(re,"finallyLoc")&&this.prev<re.finallyLoc){var oe=re;break}}oe&&(Y==="break"||Y==="continue")&&oe.tryLoc<=H&&H<=oe.finallyLoc&&(oe=null);var me=oe?oe.completion:{};return me.type=Y,me.arg=H,oe?(this.method="next",this.next=oe.finallyLoc,W):this.complete(me)},complete:function(Y,H){if(Y.type==="throw")throw Y.arg;return Y.type==="break"||Y.type==="continue"?this.next=Y.arg:Y.type==="return"?(this.rval=this.arg=Y.arg,this.method="return",this.next="end"):Y.type==="normal"&&H&&(this.next=H),W},finish:function(Y){for(var H=this.tryEntries.length-1;H>=0;--H){var Q=this.tryEntries[H];if(Q.finallyLoc===Y)return this.complete(Q.completion,Q.afterLoc),r(Q),W}},catch:function(Y){for(var H=this.tryEntries.length-1;H>=0;--H){var Q=this.tryEntries[H];if(Q.tryLoc===Y){var re=Q.completion;if(re.type==="throw"){var oe=re.arg;r(Q)}return oe}}throw new Error("illegal catch attempt")},delegateYield:function(Y,H,Q){return this.delegate={iterator:d(Y),resultName:H,nextLoc:Q},this.method==="next"&&(this.arg=y),W}}}(function(){return this}()||Function("return this")())},{}],193:[function(O,D,S){function A(c,s){for(var n in c)s[n]=c[n]}function C(c,s,n){return p(c,s,n)}var h=O("buffer"),p=h.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?D.exports=h:(A(h,S),S.Buffer=C),A(p,C),C.from=function(c,s,n){if(typeof c=="number")throw new TypeError("Argument must not be a number");return p(c,s,n)},C.alloc=function(c,s,n){if(typeof c!="number")throw new TypeError("Argument must be a number");var o=p(c);return s!==void 0?typeof n=="string"?o.fill(s,n):o.fill(s):o.fill(0),o},C.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return p(c)},C.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return h.SlowBuffer(c)}},{buffer:38}],194:[function(O,D,S){(function(A){"use strict";function C(v){return v&&v.__esModule?v:{default:v}}var h=O("babel-runtime/core-js/string/from-code-point"),p=C(h),c=O("babel-runtime/core-js/json/stringify"),s=C(c),n=O("babel-runtime/helpers/typeof"),o=C(n),i=O("babel-runtime/core-js/object/define-property"),l=C(i),a=O("babel-runtime/core-js/object/keys"),r=C(a),t=O("babel-runtime/core-js/object/create"),d=C(t);!function(v){function y(X,$){if(!(this instanceof y))return new y(X,$);var ge=this;g(ge),ge.q=ge.c="",ge.bufferCheckPosition=v.MAX_BUFFER_LENGTH,ge.opt=$||{},ge.opt.lowercase=ge.opt.lowercase||ge.opt.lowercasetags,ge.looseCase=ge.opt.lowercase?"toLowerCase":"toUpperCase",ge.tags=[],ge.closed=ge.closedRoot=ge.sawRoot=!1,ge.tag=ge.error=null,ge.strict=!!X,ge.noscript=!(!X&&!ge.opt.noscript),ge.state=U.BEGIN,ge.strictEntities=ge.opt.strictEntities,ge.ENTITIES=ge.strictEntities?(0,d.default)(v.XML_ENTITIES):(0,d.default)(v.ENTITIES),ge.attribList=[],ge.opt.xmlns&&(ge.ns=(0,d.default)(ke)),ge.trackPosition=ge.opt.position!==!1,ge.trackPosition&&(ge.position=ge.line=ge.column=0),N(ge,"onready")}function b(X){for(var $=Math.max(v.MAX_BUFFER_LENGTH,10),ge=0,Ae=0,at=be.length;Ae<at;Ae++){var Le=X[be[Ae]].length;if(Le>$)switch(be[Ae]){case"textNode":W(X);break;case"cdata":j(X,"oncdata",X.cdata),X.cdata="";break;case"script":j(X,"onscript",X.script),X.script="";break;default:F(X,"Max buffer length exceeded: "+be[Ae])}ge=Math.max(ge,Le)}var Me=v.MAX_BUFFER_LENGTH-ge;X.bufferCheckPosition=Me+X.position}function g(X){for(var $=0,ge=be.length;$<ge;$++)X[be[$]]=""}function m(X){W(X),X.cdata!==""&&(j(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(j(X,"onscript",X.script),X.script="")}function _(X,$){return new x(X,$)}function x(X,$){if(!(this instanceof x))return new x(X,$);Ue.apply(this),this._parser=new y(X,$),this.writable=!0,this.readable=!0;var ge=this;this._parser.onend=function(){ge.emit("end")},this._parser.onerror=function(Ae){ge.emit("error",Ae),ge._parser.error=null},this._decoder=null,Re.forEach(function(Ae){(0,l.default)(ge,"on"+Ae,{get:function(){return ge._parser["on"+Ae]},set:function(at){if(!at)return ge.removeAllListeners(Ae),ge._parser["on"+Ae]=at,at;ge.on(Ae,at)},enumerable:!0,configurable:!1})})}function f(X){return X===" "||X===`
|
|
|
`||X==="\r"||X===" "}function E(X){return X==='"'||X==="'"}function w(X){return X===">"||f(X)}function T(X,$){return X.test($)}function R(X,$){return!T(X,$)}function N(X,$,ge){X[$]&&X[$](ge)}function j(X,$,ge){X.textNode&&W(X),N(X,$,ge)}function W(X){X.textNode=J(X.opt,X.textNode),X.textNode&&N(X,"ontext",X.textNode),X.textNode=""}function J(X,$){return X.trim&&($=$.trim()),X.normalize&&($=$.replace(/\s+/g," ")),$}function F(X,$){return W(X),X.trackPosition&&($+=`
|
|
|
Line: `+X.line+`
|
|
|
Column: `+X.column+`
|
|
|
Char: `+X.c),$=new Error($),X.error=$,N(X,"onerror",$),X}function k(X){return X.sawRoot&&!X.closedRoot&&K(X,"Unclosed root tag"),X.state!==U.BEGIN&&X.state!==U.BEGIN_WHITESPACE&&X.state!==U.TEXT&&F(X,"Unexpected end"),W(X),X.c="",X.closed=!0,N(X,"onend"),y.call(X,X.strict,X.opt),X}function K(X,$){if((X===void 0?"undefined":(0,o.default)(X))!=="object"||!(X instanceof y))throw new Error("bad call to strictFail");X.strict&&F(X,$)}function Y(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var $=X.tags[X.tags.length-1]||X,ge=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(ge.ns=$.ns),X.attribList.length=0,j(X,"onopentagstart",ge)}function H(X,$){var ge=X.indexOf(":"),Ae=ge<0?["",X]:X.split(":"),at=Ae[0],Le=Ae[1];return $&&X==="xmlns"&&(at="xmlns",Le=""),{prefix:at,local:Le}}function Q(X){if(X.strict||(X.attribName=X.attribName[X.looseCase]()),X.attribList.indexOf(X.attribName)!==-1||X.tag.attributes.hasOwnProperty(X.attribName))return void(X.attribName=X.attribValue="");if(X.opt.xmlns){var $=H(X.attribName,!0),ge=$.prefix,Ae=$.local;if(ge==="xmlns")if(Ae==="xml"&&X.attribValue!==ve)K(X,"xml: prefix must be bound to "+ve+`
|
|
|
Actual: `+X.attribValue);else if(Ae==="xmlns"&&X.attribValue!==ce)K(X,"xmlns: prefix must be bound to "+ce+`
|
|
|
Actual: `+X.attribValue);else{var at=X.tag,Le=X.tags[X.tags.length-1]||X;at.ns===Le.ns&&(at.ns=(0,d.default)(Le.ns)),at.ns[Ae]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,j(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function re(X,$){if(X.opt.xmlns){var ge=X.tag,Ae=H(X.tagName);ge.prefix=Ae.prefix,ge.local=Ae.local,ge.uri=ge.ns[Ae.prefix]||"",ge.prefix&&!ge.uri&&(K(X,"Unbound namespace prefix: "+(0,s.default)(X.tagName)),ge.uri=Ae.prefix);var at=X.tags[X.tags.length-1]||X;ge.ns&&at.ns!==ge.ns&&(0,r.default)(ge.ns).forEach(function(_e){j(X,"onopennamespace",{prefix:_e,uri:ge.ns[_e]})});for(var Le=0,Me=X.attribList.length;Le<Me;Le++){var Xe=X.attribList[Le],et=Xe[0],ze=Xe[1],Ke=H(et,!0),Pe=Ke.prefix,Ie=Ke.local,Ce=Pe===""?"":ge.ns[Pe]||"",pe={name:et,value:ze,prefix:Pe,local:Ie,uri:Ce};Pe&&Pe!=="xmlns"&&!Ce&&(K(X,"Unbound namespace prefix: "+(0,s.default)(Pe)),pe.uri=Pe),X.tag.attributes[et]=pe,j(X,"onattribute",pe)}X.attribList.length=0}X.tag.isSelfClosing=!!$,X.sawRoot=!0,X.tags.push(X.tag),j(X,"onopentag",X.tag),$||(X.noscript||X.tagName.toLowerCase()!=="script"?X.state=U.TEXT:X.state=U.SCRIPT,X.tag=null,X.tagName=""),X.attribName=X.attribValue="",X.attribList.length=0}function oe(X){if(!X.tagName)return K(X,"Weird empty close tag."),X.textNode+="</>",void(X.state=U.TEXT);if(X.script){if(X.tagName!=="script")return X.script+="</"+X.tagName+">",X.tagName="",void(X.state=U.SCRIPT);j(X,"onscript",X.script),X.script=""}var $=X.tags.length,ge=X.tagName;X.strict||(ge=ge[X.looseCase]());for(var Ae=ge;$--&&!(X.tags[$].name===Ae);)K(X,"Unexpected close tag");if($<0)return K(X,"Unmatched closing tag: "+X.tagName),X.textNode+="</"+X.tagName+">",void(X.state=U.TEXT);X.tagName=ge;for(var at=X.tags.length;at-- >$;){var Le=X.tag=X.tags.pop();X.tagName=X.tag.name,j(X,"onclosetag",X.tagName);var Me={};for(var Xe in Le.ns)Me[Xe]=Le.ns[Xe];var et=X.tags[X.tags.length-1]||X;X.opt.xmlns&&Le.ns!==et.ns&&(0,r.default)(Le.ns).forEach(function(ze){var Ke=Le.ns[ze];j(X,"onclosenamespace",{prefix:ze,uri:Ke})})}$===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=U.TEXT}function me(X){var $,ge=X.entity,Ae=ge.toLowerCase(),at="";return X.ENTITIES[ge]?X.ENTITIES[ge]:X.ENTITIES[Ae]?X.ENTITIES[Ae]:(ge=Ae,ge.charAt(0)==="#"&&(ge.charAt(1)==="x"?(ge=ge.slice(2),$=parseInt(ge,16),at=$.toString(16)):(ge=ge.slice(1),$=parseInt(ge,10),at=$.toString(10))),ge=ge.replace(/^0+/,""),isNaN($)||at.toLowerCase()!==ge?(K(X,"Invalid character entity"),"&"+X.entity+";"):(0,p.default)($))}function he(X,$){$==="<"?(X.state=U.OPEN_WAKA,X.startTagPosition=X.position):f($)||(K(X,"Non-whitespace before first tag."),X.textNode=$,X.state=U.TEXT)}function Ee(X,$){var ge="";return $<X.length&&(ge=X.charAt($)),ge}function de(X){var $=this;if(this.error)throw this.error;if($.closed)return F($,"Cannot write after close. Assign an onready handler.");if(X===null)return k($);(X===void 0?"undefined":(0,o.default)(X))==="object"&&(X=X.toString());for(var ge=0,Ae="";!(Ae=Ee(X,ge++),$.c=Ae,!Ae);)switch($.trackPosition&&($.position++,Ae===`
|
|
|
`?($.line++,$.column=0):$.column++),$.state){case U.BEGIN:if($.state=U.BEGIN_WHITESPACE,Ae==="\uFEFF")continue;he($,Ae);continue;case U.BEGIN_WHITESPACE:he($,Ae);continue;case U.TEXT:if($.sawRoot&&!$.closedRoot){for(var at=ge-1;Ae&&Ae!=="<"&&Ae!=="&";)(Ae=Ee(X,ge++))&&$.trackPosition&&($.position++,Ae===`
|
|
|
`?($.line++,$.column=0):$.column++);$.textNode+=X.substring(at,ge-1)}Ae!=="<"||$.sawRoot&&$.closedRoot&&!$.strict?(f(Ae)||$.sawRoot&&!$.closedRoot||K($,"Text data outside of root node."),Ae==="&"?$.state=U.TEXT_ENTITY:$.textNode+=Ae):($.state=U.OPEN_WAKA,$.startTagPosition=$.position);continue;case U.SCRIPT:Ae==="<"?$.state=U.SCRIPT_ENDING:$.script+=Ae;continue;case U.SCRIPT_ENDING:Ae==="/"?$.state=U.CLOSE_TAG:($.script+="<"+Ae,$.state=U.SCRIPT);continue;case U.OPEN_WAKA:if(Ae==="!")$.state=U.SGML_DECL,$.sgmlDecl="";else if(!f(Ae))if(T(Ne,Ae))$.state=U.OPEN_TAG,$.tagName=Ae;else if(Ae==="/")$.state=U.CLOSE_TAG,$.tagName="";else if(Ae==="?")$.state=U.PROC_INST,$.procInstName=$.procInstBody="";else{if(K($,"Unencoded <"),$.startTagPosition+1<$.position){var Le=$.position-$.startTagPosition;Ae=new Array(Le).join(" ")+Ae}$.textNode+="<"+Ae,$.state=U.TEXT}continue;case U.SGML_DECL:($.sgmlDecl+Ae).toUpperCase()===De?(j($,"onopencdata"),$.state=U.CDATA,$.sgmlDecl="",$.cdata=""):$.sgmlDecl+Ae==="--"?($.state=U.COMMENT,$.comment="",$.sgmlDecl=""):($.sgmlDecl+Ae).toUpperCase()===je?($.state=U.DOCTYPE,($.doctype||$.sawRoot)&&K($,"Inappropriately located doctype declaration"),$.doctype="",$.sgmlDecl=""):Ae===">"?(j($,"onsgmldeclaration",$.sgmlDecl),$.sgmlDecl="",$.state=U.TEXT):(E(Ae)&&($.state=U.SGML_DECL_QUOTED),$.sgmlDecl+=Ae);continue;case U.SGML_DECL_QUOTED:Ae===$.q&&($.state=U.SGML_DECL,$.q=""),$.sgmlDecl+=Ae;continue;case U.DOCTYPE:Ae===">"?($.state=U.TEXT,j($,"ondoctype",$.doctype),$.doctype=!0):($.doctype+=Ae,Ae==="["?$.state=U.DOCTYPE_DTD:E(Ae)&&($.state=U.DOCTYPE_QUOTED,$.q=Ae));continue;case U.DOCTYPE_QUOTED:$.doctype+=Ae,Ae===$.q&&($.q="",$.state=U.DOCTYPE);continue;case U.DOCTYPE_DTD:$.doctype+=Ae,Ae==="]"?$.state=U.DOCTYPE:E(Ae)&&($.state=U.DOCTYPE_DTD_QUOTED,$.q=Ae);continue;case U.DOCTYPE_DTD_QUOTED:$.doctype+=Ae,Ae===$.q&&($.state=U.DOCTYPE_DTD,$.q="");continue;case U.COMMENT:Ae==="-"?$.state=U.COMMENT_ENDING:$.comment+=Ae;continue;case U.COMMENT_ENDING:Ae==="-"?($.state=U.COMMENT_ENDED,$.comment=J($.opt,$.comment),$.comment&&j($,"oncomment",$.comment),$.comment=""):($.comment+="-"+Ae,$.state=U.COMMENT);continue;case U.COMMENT_ENDED:Ae!==">"?(K($,"Malformed comment"),$.comment+="--"+Ae,$.state=U.COMMENT):$.state=U.TEXT;continue;case U.CDATA:Ae==="]"?$.state=U.CDATA_ENDING:$.cdata+=Ae;continue;case U.CDATA_ENDING:Ae==="]"?$.state=U.CDATA_ENDING_2:($.cdata+="]"+Ae,$.state=U.CDATA);continue;case U.CDATA_ENDING_2:Ae===">"?($.cdata&&j($,"oncdata",$.cdata),j($,"onclosecdata"),$.cdata="",$.state=U.TEXT):Ae==="]"?$.cdata+="]":($.cdata+="]]"+Ae,$.state=U.CDATA);continue;case U.PROC_INST:Ae==="?"?$.state=U.PROC_INST_ENDING:f(Ae)?$.state=U.PROC_INST_BODY:$.procInstName+=Ae;continue;case U.PROC_INST_BODY:if(!$.procInstBody&&f(Ae))continue;Ae==="?"?$.state=U.PROC_INST_ENDING:$.procInstBody+=Ae;continue;case U.PROC_INST_ENDING:Ae===">"?(j($,"onprocessinginstruction",{name:$.procInstName,body:$.procInstBody}),$.procInstName=$.procInstBody="",$.state=U.TEXT):($.procInstBody+="?"+Ae,$.state=U.PROC_INST_BODY);continue;case U.OPEN_TAG:T(Je,Ae)?$.tagName+=Ae:(Y($),Ae===">"?re($):Ae==="/"?$.state=U.OPEN_TAG_SLASH:(f(Ae)||K($,"Invalid character in tag name"),$.state=U.ATTRIB));continue;case U.OPEN_TAG_SLASH:Ae===">"?(re($,!0),oe($)):(K($,"Forward-slash in opening tag not followed by >"),$.state=U.ATTRIB);continue;case U.ATTRIB:if(f(Ae))continue;Ae===">"?re($):Ae==="/"?$.state=U.OPEN_TAG_SLASH:T(Ne,Ae)?($.attribName=Ae,$.attribValue="",$.state=U.ATTRIB_NAME):K($,"Invalid attribute name");continue;case U.ATTRIB_NAME:Ae==="="?$.state=U.ATTRIB_VALUE:Ae===">"?(K($,"Attribute without value"),$.attribValue=$.attribName,Q($),re($)):f(Ae)?$.state=U.ATTRIB_NAME_SAW_WHITE:T(Je,Ae)?$.attribName+=Ae:K($,"Invalid attribute name");continue;case U.ATTRIB_NAME_SAW_WHITE:if(Ae==="=")$.state=U.ATTRIB_VALUE;else{if(f(Ae))continue;K($,"Attribute without value"),$.tag.attributes[$.attribName]="",$.attribValue="",j($,"onattribute",{name:$.attribName,value:""}),$.attribName="",Ae===">"?re($):T(Ne,Ae)?($.attribName=Ae,$.state=U.ATTRIB_NAME):(K($,"Invalid attribute name"),$.state=U.ATTRIB)}continue;case U.ATTRIB_VALUE:if(f(Ae))continue;E(Ae)?($.q=Ae,$.state=U.ATTRIB_VALUE_QUOTED):(K($,"Unquoted attribute value"),$.state=U.ATTRIB_VALUE_UNQUOTED,$.attribValue=Ae);continue;case U.ATTRIB_VALUE_QUOTED:if(Ae!==$.q){Ae==="&"?$.state=U.ATTRIB_VALUE_ENTITY_Q:$.attribValue+=Ae;continue}Q($),$.q="",$.state=U.ATTRIB_VALUE_CLOSED;continue;case U.ATTRIB_VALUE_CLOSED:f(Ae)?$.state=U.ATTRIB:Ae===">"?re($):Ae==="/"?$.state=U.OPEN_TAG_SLASH:T(Ne,Ae)?(K($,"No whitespace between attributes"),$.attribName=Ae,$.attribValue="",$.state=U.ATTRIB_NAME):K($,"Invalid attribute name");continue;case U.ATTRIB_VALUE_UNQUOTED:if(!w(Ae)){Ae==="&"?$.state=U.ATTRIB_VALUE_ENTITY_U:$.attribValue+=Ae;continue}Q($),Ae===">"?re($):$.state=U.ATTRIB;continue;case U.CLOSE_TAG:if($.tagName)Ae===">"?oe($):T(Je,Ae)?$.tagName+=Ae:$.script?($.script+="</"+$.tagName,$.tagName="",$.state=U.SCRIPT):(f(Ae)||K($,"Invalid tagname in closing tag"),$.state=U.CLOSE_TAG_SAW_WHITE);else{if(f(Ae))continue;R(Ne,Ae)?$.script?($.script+="</"+Ae,$.state=U.SCRIPT):K($,"Invalid tagname in closing tag."):$.tagName=Ae}continue;case U.CLOSE_TAG_SAW_WHITE:if(f(Ae))continue;Ae===">"?oe($):K($,"Invalid characters in closing tag");continue;case U.TEXT_ENTITY:case U.ATTRIB_VALUE_ENTITY_Q:case U.ATTRIB_VALUE_ENTITY_U:var Me,Xe;switch($.state){case U.TEXT_ENTITY:Me=U.TEXT,Xe="textNode";break;case U.ATTRIB_VALUE_ENTITY_Q:Me=U.ATTRIB_VALUE_QUOTED,Xe="attribValue";break;case U.ATTRIB_VALUE_ENTITY_U:Me=U.ATTRIB_VALUE_UNQUOTED,Xe="attribValue"}Ae===";"?($[Xe]+=me($),$.entity="",$.state=Me):T($.entity.length?P:te,Ae)?$.entity+=Ae:(K($,"Invalid character in entity name"),$[Xe]+="&"+$.entity+Ae,$.entity="",$.state=Me);continue;default:throw new Error($,"Unknown state: "+$.state)}return $.position>=$.bufferCheckPosition&&b($),$}v.parser=function(X,$){return new y(X,$)},v.SAXParser=y,v.SAXStream=x,v.createStream=_,v.MAX_BUFFER_LENGTH=65536;var be=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];v.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],d.default||(Object.create=function(X){function $(){}return $.prototype=X,new $}),r.default||(Object.keys=function(X){var $=[];for(var ge in X)X.hasOwnProperty(ge)&&$.push(ge);return $}),y.prototype={end:function(){k(this)},write:de,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){m(this)}};var Ue;try{Ue=O("stream").Stream}catch(X){Ue=function(){}}var Re=v.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});x.prototype=(0,d.default)(Ue.prototype,{constructor:{value:x}}),x.prototype.write=function(X){if(typeof A=="function"&&typeof A.isBuffer=="function"&&A.isBuffer(X)){if(!this._decoder){var $=O("string_decoder").StringDecoder;this._decoder=new $("utf8")}X=this._decoder.write(X)}return this._parser.write(X.toString()),this.emit("data",X),!0},x.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},x.prototype.on=function(X,$){var ge=this;return ge._parser["on"+X]||Re.indexOf(X)===-1||(ge._parser["on"+X]=function(){var Ae=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Ae.splice(0,0,X),ge.emit.apply(ge,Ae)}),Ue.prototype.on.call(ge,X,$)};var De="[CDATA[",je="DOCTYPE",ve="http://www.w3.org/XML/1998/namespace",ce="http://www.w3.org/2000/xmlns/",ke={xml:ve,xmlns:ce},Ne=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Je=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,te=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,P=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,U=0;v.STATE={BEGIN:U++,BEGIN_WHITESPACE:U++,TEXT:U++,TEXT_ENTITY:U++,OPEN_WAKA:U++,SGML_DECL:U++,SGML_DECL_QUOTED:U++,DOCTYPE:U++,DOCTYPE_QUOTED:U++,DOCTYPE_DTD:U++,DOCTYPE_DTD_QUOTED:U++,COMMENT_STARTING:U++,COMMENT:U++,COMMENT_ENDING:U++,COMMENT_ENDED:U++,CDATA:U++,CDATA_ENDING:U++,CDATA_ENDING_2:U++,PROC_INST:U++,PROC_INST_BODY:U++,PROC_INST_ENDING:U++,OPEN_TAG:U++,OPEN_TAG_SLASH:U++,ATTRIB:U++,ATTRIB_NAME:U++,ATTRIB_NAME_SAW_WHITE:U++,ATTRIB_VALUE:U++,ATTRIB_VALUE_QUOTED:U++,ATTRIB_VALUE_CLOSED:U++,ATTRIB_VALUE_UNQUOTED:U++,ATTRIB_VALUE_ENTITY_Q:U++,ATTRIB_VALUE_ENTITY_U:U++,CLOSE_TAG:U++,CLOSE_TAG_SAW_WHITE:U++,SCRIPT:U++,SCRIPT_ENDING:U++},v.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},v.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,r.default)(v.ENTITIES).forEach(function(X){var $=v.ENTITIES[X],ge=typeof $=="number"?String.fromCharCode($):$;v.ENTITIES[X]=ge});for(var q in v.STATE)v.STATE[v.STATE[q]]=q;U=v.STATE,p.default||function(){var X=String.fromCharCode,$=Math.floor,ge=function(){var Ae,at,Le=[],Me=-1,Xe=arguments.length;if(!Xe)return"";for(var et="";++Me<Xe;){var ze=Number(arguments[Me]);if(!isFinite(ze)||ze<0||ze>1114111||$(ze)!==ze)throw RangeError("Invalid code point: "+ze);ze<=65535?Le.push(ze):(ze-=65536,Ae=55296+(ze>>10),at=ze%1024+56320,Le.push(Ae,at)),(Me+1===Xe||Le.length>16384)&&(et+=X.apply(null,Le),Le.length=0)}return et};l.default?Object.defineProperty(String,"fromCodePoint",{value:ge,configurable:!0,writable:!0}):String.fromCodePoint=ge}()}(S===void 0?(void 0).sax={}:S)}).call(this,O("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/create":19,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/object/keys":23,"babel-runtime/core-js/string/from-code-point":26,"babel-runtime/helpers/typeof":32,buffer:38,stream:195,string_decoder:37}],195:[function(O,D,S){function A(){C.call(this)}D.exports=A;var C=O("events").EventEmitter;O("inherits")(A,C),A.Readable=O("readable-stream/readable.js"),A.Writable=O("readable-stream/writable.js"),A.Duplex=O("readable-stream/duplex.js"),A.Transform=O("readable-stream/transform.js"),A.PassThrough=O("readable-stream/passthrough.js"),A.Stream=A,A.prototype.pipe=function(h,p){function c(t){h.writable&&h.write(t)===!1&&a.pause&&a.pause()}function s(){a.readable&&a.resume&&a.resume()}function n(){r||(r=!0,h.end())}function o(){r||(r=!0,typeof h.destroy=="function"&&h.destroy())}function i(t){if(l(),C.listenerCount(this,"error")===0)throw t}function l(){a.removeListener("data",c),h.removeListener("drain",s),a.removeListener("end",n),a.removeListener("close",o),a.removeListener("error",i),h.removeListener("error",i),a.removeListener("end",l),a.removeListener("close",l),h.removeListener("close",l)}var a=this;a.on("data",c),h.on("drain",s),h._isStdio||p&&p.end===!1||(a.on("end",n),a.on("close",o));var r=!1;return a.on("error",i),h.on("error",i),a.on("end",l),a.on("close",l),h.on("close",l),h.emit("pipe",a),h}},{events:158,inherits:162,"readable-stream/duplex.js":178,"readable-stream/passthrough.js":187,"readable-stream/readable.js":188,"readable-stream/transform.js":189,"readable-stream/writable.js":190}],196:[function(O,D,S){(function(A){var C=O("./lib/request"),h=O("./lib/response"),p=O("xtend"),c=O("builtin-status-codes"),s=O("url"),n=S;n.request=function(o,i){o=typeof o=="string"?s.parse(o):p(o);var l=A.location.protocol.search(/^https?:$/)===-1?"http:":"",a=o.protocol||l,r=o.hostname||o.host,t=o.port,d=o.path||"/";r&&r.indexOf(":")!==-1&&(r="["+r+"]"),o.url=(r?a+"//"+r:"")+(t?":"+t:"")+d,o.method=(o.method||"GET").toUpperCase(),o.headers=o.headers||{};var v=new C(o);return i&&v.on("response",i),v},n.get=function(o,i){var l=n.request(o,i);return l.end(),l},n.ClientRequest=C,n.IncomingMessage=h.IncomingMessage,n.Agent=function(){},n.Agent.defaultMaxSockets=4,n.globalAgent=new n.Agent,n.STATUS_CODES=c,n.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(O,D,S){(function(A){"use strict";function C(){if(c!==void 0)return c;if(A.XMLHttpRequest){c=new A.XMLHttpRequest;try{c.open("GET",A.XDomainRequest?"/":"https://example.com")}catch(o){c=null}}else c=null;return c}function h(o){var i=C();if(!i)return!1;try{return i.responseType=o,i.responseType===o}catch(l){}return!1}function p(o){return typeof o=="function"}S.fetch=p(A.fetch)&&p(A.ReadableStream),S.writableStream=p(A.WritableStream),S.abortController=p(A.AbortController),S.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),S.blobConstructor=!0}catch(o){}var c,s=A.ArrayBuffer!==void 0,n=s&&p(A.ArrayBuffer.prototype.slice);S.arraybuffer=S.fetch||s&&h("arraybuffer"),S.msstream=!S.fetch&&n&&h("ms-stream"),S.mozchunkedarraybuffer=!S.fetch&&s&&h("moz-chunked-arraybuffer"),S.overrideMimeType=S.fetch||!!C()&&p(C().overrideMimeType),S.vbArray=p(A.VBArray),c=null}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(O,D,S){(function(A,C,h){"use strict";function p(b,g){return o.fetch&&g?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&b?"arraybuffer":o.vbArray&&b?"text:vbarray":"text"}function c(b){try{var g=b.status;return g!==null&&g!==0}catch(m){return!1}}var s=O("babel-runtime/core-js/object/keys"),n=function(b){return b&&b.__esModule?b:{default:b}}(s),o=O("./capability"),i=O("inherits"),l=O("./response"),a=O("readable-stream"),r=O("to-arraybuffer"),t=l.IncomingMessage,d=l.readyStates,v=D.exports=function(b){var g=this;a.Writable.call(g),g._opts=b,g._body=[],g._headers={},b.auth&&g.setHeader("Authorization","Basic "+new h(b.auth).toString("base64")),(0,n.default)(b.headers).forEach(function(x){g.setHeader(x,b.headers[x])});var m,_=!0;if(b.mode==="disable-fetch"||"requestTimeout"in b&&!o.abortController)_=!1,m=!0;else if(b.mode==="prefer-streaming")m=!1;else if(b.mode==="allow-wrong-content-type")m=!o.overrideMimeType;else{if(b.mode&&b.mode!=="default"&&b.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");m=!0}g._mode=p(m,_),g._fetchTimer=null,g.on("finish",function(){g._onFinish()})};i(v,a.Writable),v.prototype.setHeader=function(b,g){var m=this,_=b.toLowerCase();y.indexOf(_)===-1&&(m._headers[_]={name:b,value:g})},v.prototype.getHeader=function(b){var g=this._headers[b.toLowerCase()];return g?g.value:null},v.prototype.removeHeader=function(b){delete this._headers[b.toLowerCase()]},v.prototype._onFinish=function(){var b=this;if(!b._destroyed){var g=b._opts,m=b._headers,_=null;g.method!=="GET"&&g.method!=="HEAD"&&(_=o.arraybuffer?r(h.concat(b._body)):o.blobConstructor?new C.Blob(b._body.map(function(T){return r(T)}),{type:(m["content-type"]||{}).value||""}):h.concat(b._body).toString());var x=[];if((0,n.default)(m).forEach(function(T){var R=m[T].name,N=m[T].value;Array.isArray(N)?N.forEach(function(j){x.push([R,j])}):x.push([R,N])}),b._mode==="fetch"){var f=null;if(o.abortController){var E=new AbortController;f=E.signal,b._fetchAbortController=E,"requestTimeout"in g&&g.requestTimeout!==0&&(b._fetchTimer=C.setTimeout(function(){b.emit("requestTimeout"),b._fetchAbortController&&b._fetchAbortController.abort()},g.requestTimeout))}C.fetch(b._opts.url,{method:b._opts.method,headers:x,body:_||void 0,mode:"cors",credentials:g.withCredentials?"include":"same-origin",signal:f}).then(function(T){b._fetchResponse=T,b._connect()},function(T){C.clearTimeout(b._fetchTimer),b._destroyed||b.emit("error",T)})}else{var w=b._xhr=new C.XMLHttpRequest;try{w.open(b._opts.method,b._opts.url,!0)}catch(T){return void A.nextTick(function(){b.emit("error",T)})}"responseType"in w&&(w.responseType=b._mode.split(":")[0]),"withCredentials"in w&&(w.withCredentials=!!g.withCredentials),b._mode==="text"&&"overrideMimeType"in w&&w.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in g&&(w.timeout=g.requestTimeout,w.ontimeout=function(){b.emit("requestTimeout")}),x.forEach(function(T){w.setRequestHeader(T[0],T[1])}),b._response=null,w.onreadystatechange=function(){switch(w.readyState){case d.LOADING:case d.DONE:b._onXHRProgress()}},b._mode==="moz-chunked-arraybuffer"&&(w.onprogress=function(){b._onXHRProgress()}),w.onerror=function(){b._destroyed||b.emit("error",new Error("XHR error"))};try{w.send(_)}catch(T){return void A.nextTick(function(){b.emit("error",T)})}}}},v.prototype._onXHRProgress=function(){var b=this;c(b._xhr)&&!b._destroyed&&(b._response||b._connect(),b._response._onXHRProgress())},v.prototype._connect=function(){var b=this;b._destroyed||(b._response=new t(b._xhr,b._fetchResponse,b._mode,b._fetchTimer),b._response.on("error",function(g){b.emit("error",g)}),b.emit("response",b._response))},v.prototype._write=function(b,g,m){this._body.push(b),m()},v.prototype.abort=v.prototype.destroy=function(){var b=this;b._destroyed=!0,C.clearTimeout(b._fetchTimer),b._response&&(b._response._destroyed=!0),b._xhr?b._xhr.abort():b._fetchAbortController&&b._fetchAbortController.abort()},v.prototype.end=function(b,g,m){var _=this;typeof b=="function"&&(m=b,b=void 0),a.Writable.prototype.end.call(_,b,g,m)},v.prototype.flushHeaders=function(){},v.prototype.setTimeout=function(){},v.prototype.setNoDelay=function(){},v.prototype.setSocketKeepAlive=function(){};var y=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,O("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{},O("buffer").Buffer)},{"./capability":197,"./response":199,_process:173,"babel-runtime/core-js/object/keys":23,buffer:38,inherits:162,"readable-stream":188,"to-arraybuffer":202}],199:[function(O,D,S){(function(A,C,h){"use strict";var p=O("babel-runtime/core-js/promise"),c=function(a){return a&&a.__esModule?a:{default:a}}(p),s=O("./capability"),n=O("inherits"),o=O("readable-stream"),i=S.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=S.IncomingMessage=function(a,r,t,d){var v=this;if(o.Readable.call(v),v._mode=t,v.headers={},v.rawHeaders=[],v.trailers={},v.rawTrailers=[],v.on("end",function(){A.nextTick(function(){v.emit("close")})}),t==="fetch"){if(v._fetchResponse=r,v.url=r.url,v.statusCode=r.status,v.statusMessage=r.statusText,r.headers.forEach(function(_,x){v.headers[x.toLowerCase()]=_,v.rawHeaders.push(x,_)}),s.writableStream){var y=new WritableStream({write:function(_){return new c.default(function(x,f){v._destroyed?f():v.push(new h(_))?x():v._resumeFetch=x})},close:function(){C.clearTimeout(d),v._destroyed||v.push(null)},abort:function(_){v._destroyed||v.emit("error",_)}});try{return void r.body.pipeTo(y).catch(function(_){C.clearTimeout(d),v._destroyed||v.emit("error",_)})}catch(_){}}var b=r.body.getReader();!function _(){b.read().then(function(x){if(!v._destroyed){if(x.done)return C.clearTimeout(d),void v.push(null);v.push(new h(x.value)),_()}}).catch(function(x){C.clearTimeout(d),v._destroyed||v.emit("error",x)})}()}else if(v._xhr=a,v._pos=0,v.url=a.responseURL,v.statusCode=a.status,v.statusMessage=a.statusText,a.getAllResponseHeaders().split(/\r?\n/).forEach(function(_){var x=_.match(/^([^:]+):\s*(.*)/);if(x){var f=x[1].toLowerCase();f==="set-cookie"?(v.headers[f]===void 0&&(v.headers[f]=[]),v.headers[f].push(x[2])):v.headers[f]!==void 0?v.headers[f]+=", "+x[2]:v.headers[f]=x[2],v.rawHeaders.push(x[1],x[2])}}),v._charset="x-user-defined",!s.overrideMimeType){var g=v.rawHeaders["mime-type"];if(g){var m=g.match(/;\s*charset=([^;])(;|$)/);m&&(v._charset=m[1].toLowerCase())}v._charset||(v._charset="utf-8")}};n(l,o.Readable),l.prototype._read=function(){var a=this,r=a._resumeFetch;r&&(a._resumeFetch=null,r())},l.prototype._onXHRProgress=function(){var a=this,r=a._xhr,t=null;switch(a._mode){case"text:vbarray":if(r.readyState!==i.DONE)break;try{t=new C.VBArray(r.responseBody).toArray()}catch(g){}if(t!==null){a.push(new h(t));break}case"text":try{t=r.responseText}catch(g){a._mode="text:vbarray";break}if(t.length>a._pos){var d=t.substr(a._pos);if(a._charset==="x-user-defined"){for(var v=new h(d.length),y=0;y<d.length;y++)v[y]=255&d.charCodeAt(y);a.push(v)}else a.push(d,a._charset);a._pos=t.length}break;case"arraybuffer":if(r.readyState!==i.DONE||!r.response)break;t=r.response,a.push(new h(new Uint8Array(t)));break;case"moz-chunked-arraybuffer":if(t=r.response,r.readyState!==i.LOADING||!t)break;a.push(new h(new Uint8Array(t)));break;case"ms-stream":if(t=r.response,r.readyState!==i.LOADING)break;var b=new C.MSStreamReader;b.onprogress=function(){b.result.byteLength>a._pos&&(a.push(new h(new Uint8Array(b.result.slice(a._pos)))),a._pos=b.result.byteLength)},b.onload=function(){a.push(null)},b.readAsArrayBuffer(t)}a._xhr.readyState===i.DONE&&a._mode!=="ms-stream"&&a.push(null)}}).call(this,O("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{},O("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(O,D,S){"use strict";function A(g){if(!g)return"utf8";for(var m;;)switch(g){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return g;default:if(m)return;g=(""+g).toLowerCase(),m=!0}}function C(g){var m=A(g);if(typeof m!="string"&&(y.isEncoding===b||!b(g)))throw new Error("Unknown encoding: "+g);return m||g}function h(g){this.encoding=C(g);var m;switch(this.encoding){case"utf16le":this.text=l,this.end=a,m=4;break;case"utf8":this.fillLast=n,m=4;break;case"base64":this.text=r,this.end=t,m=3;break;default:return this.write=d,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=y.allocUnsafe(m)}function p(g){return g<=127?0:g>>5==6?2:g>>4==14?3:g>>3==30?4:g>>6==2?-1:-2}function c(g,m,_){var x=m.length-1;if(x<_)return 0;var f=p(m[x]);return f>=0?(f>0&&(g.lastNeed=f-1),f):--x<_||f===-2?0:(f=p(m[x]))>=0?(f>0&&(g.lastNeed=f-2),f):--x<_||f===-2?0:(f=p(m[x]),f>=0?(f>0&&(f===2?f=0:g.lastNeed=f-3),f):0)}function s(g,m,_){if((192&m[0])!=128)return g.lastNeed=0,"\u951F\uFFFD";if(g.lastNeed>1&&m.length>1){if((192&m[1])!=128)return g.lastNeed=1,"\u951F\uFFFD";if(g.lastNeed>2&&m.length>2&&(192&m[2])!=128)return g.lastNeed=2,"\u951F\uFFFD"}}function n(g){var m=this.lastTotal-this.lastNeed,_=s(this,g,m);return _!==void 0?_:this.lastNeed<=g.length?(g.copy(this.lastChar,m,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(g.copy(this.lastChar,m,0,g.length),void(this.lastNeed-=g.length))}function o(g,m){var _=c(this,g,m);if(!this.lastNeed)return g.toString("utf8",m);this.lastTotal=_;var x=g.length-(_-this.lastNeed);return g.copy(this.lastChar,0,x),g.toString("utf8",m,x)}function i(g){var m=g&&g.length?this.write(g):"";return this.lastNeed?m+"\u951F\uFFFD":m}function l(g,m){if((g.length-m)%2==0){var _=g.toString("utf16le",m);if(_){var x=_.charCodeAt(_.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",m,g.length-1)}function a(g){var m=g&&g.length?this.write(g):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return m+this.lastChar.toString("utf16le",0,_)}return m}function r(g,m){var _=(g.length-m)%3;return _===0?g.toString("base64",m):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",m,g.length-_))}function t(g){var m=g&&g.length?this.write(g):"";return this.lastNeed?m+this.lastChar.toString("base64",0,3-this.lastNeed):m}function d(g){return g.toString(this.encoding)}function v(g){return g&&g.length?this.write(g):""}var y=O("safe-buffer").Buffer,b=y.isEncoding||function(g){switch((g=""+g)&&g.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};S.StringDecoder=h,h.prototype.write=function(g){if(g.length===0)return"";var m,_;if(this.lastNeed){if((m=this.fillLast(g))===void 0)return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _<g.length?m?m+this.text(g,_):this.text(g,_):m||""},h.prototype.end=i,h.prototype.text=o,h.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length}},{"safe-buffer":193}],201:[function(O,D,S){(function(A,C){function h(i,l){this._id=i,this._clearFn=l}var p=O("process/browser.js").nextTick,c=Function.prototype.apply,s=Array.prototype.slice,n={},o=0;S.setTimeout=function(){return new h(c.call(setTimeout,window,arguments),clearTimeout)},S.setInterval=function(){return new h(c.call(setInterval,window,arguments),clearInterval)},S.clearTimeout=S.clearInterval=function(i){i.close()},h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},S.enroll=function(i,l){clearTimeout(i._idleTimeoutId),i._idleTimeout=l},S.unenroll=function(i){clearTimeout(i._idleTimeoutId),i._idleTimeout=-1},S._unrefActive=S.active=function(i){clearTimeout(i._idleTimeoutId);var l=i._idleTimeout;l>=0&&(i._idleTimeoutId=setTimeout(function(){i._onTimeout&&i._onTimeout()},l))},S.setImmediate=typeof A=="function"?A:function(i){var l=o++,a=!(arguments.length<2)&&s.call(arguments,1);return n[l]=!0,p(function(){n[l]&&(a?i.apply(null,a):i.call(null),S.clearImmediate(l))}),l},S.clearImmediate=typeof C=="function"?C:function(i){delete n[i]}}).call(this,O("timers").setImmediate,O("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(O,D,S){var A=O("buffer").Buffer;D.exports=function(C){if(C instanceof Uint8Array){if(C.byteOffset===0&&C.byteLength===C.buffer.byteLength)return C.buffer;if(typeof C.buffer.slice=="function")return C.buffer.slice(C.byteOffset,C.byteOffset+C.byteLength)}if(A.isBuffer(C)){for(var h=new Uint8Array(C.length),p=C.length,c=0;c<p;c++)h[c]=C[c];return h.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(O,D,S){"use strict";function A(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function C(f,E,w){if(f&&n.isObject(f)&&f instanceof A)return f;var T=new A;return T.parse(f,E,w),T}function h(f){return n.isString(f)&&(f=C(f)),f instanceof A?f.format():A.prototype.format.call(f)}function p(f,E){return C(f,!1,!0).resolve(E)}function c(f,E){return f?C(f,!1,!0).resolveObject(E):E}var s=O("punycode"),n=O("./util");S.parse=C,S.resolve=p,S.resolveObject=c,S.format=h,S.Url=A;var o=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,a=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],r=["{","}","|","\\","^","`"].concat(a),t=["'"].concat(r),d=["%","/","?",";","#"].concat(t),v=["/","?","#"],y=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=O("querystring");A.prototype.parse=function(f,E,w){if(!n.isString(f))throw new TypeError("Parameter 'url' must be a string, not "+typeof f);var T=f.indexOf("?"),R=T!==-1&&T<f.indexOf("#")?"?":"#",N=f.split(R),j=/\\/g;N[0]=N[0].replace(j,"/"),f=N.join(R);var W=f;if(W=W.trim(),!w&&f.split("#").length===1){var J=l.exec(W);if(J)return this.path=W,this.href=W,this.pathname=J[1],J[2]?(this.search=J[2],this.query=E?x.parse(this.search.substr(1)):this.search.substr(1)):E&&(this.search="",this.query={}),this}var F=o.exec(W);if(F){F=F[0];var k=F.toLowerCase();this.protocol=k,W=W.substr(F.length)}if(w||F||W.match(/^\/\/[^@\/]+@[^@\/]+/)){var K=W.substr(0,2)==="//";!K||F&&m[F]||(W=W.substr(2),this.slashes=!0)}if(!m[F]&&(K||F&&!_[F])){for(var Y=-1,H=0;H<v.length;H++){var Q=W.indexOf(v[H]);Q!==-1&&(Y===-1||Q<Y)&&(Y=Q)}var re,oe;oe=Y===-1?W.lastIndexOf("@"):W.lastIndexOf("@",Y),oe!==-1&&(re=W.slice(0,oe),W=W.slice(oe+1),this.auth=decodeURIComponent(re)),Y=-1;for(var H=0;H<d.length;H++){var Q=W.indexOf(d[H]);Q!==-1&&(Y===-1||Q<Y)&&(Y=Q)}Y===-1&&(Y=W.length),this.host=W.slice(0,Y),W=W.slice(Y),this.parseHost(),this.hostname=this.hostname||"";var me=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!me)for(var he=this.hostname.split(/\./),H=0,Ee=he.length;H<Ee;H++){var de=he[H];if(de&&!de.match(y)){for(var be="",Ue=0,Re=de.length;Ue<Re;Ue++)de.charCodeAt(Ue)>127?be+="x":be+=de[Ue];if(!be.match(y)){var De=he.slice(0,H),je=he.slice(H+1),ve=de.match(b);ve&&(De.push(ve[1]),je.unshift(ve[2])),je.length&&(W="/"+je.join(".")+W),this.hostname=De.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),me||(this.hostname=s.toASCII(this.hostname));var ce=this.port?":"+this.port:"",ke=this.hostname||"";this.host=ke+ce,this.href+=this.host,me&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),W[0]!=="/"&&(W="/"+W))}if(!g[k])for(var H=0,Ee=t.length;H<Ee;H++){var Ne=t[H];if(W.indexOf(Ne)!==-1){var Je=encodeURIComponent(Ne);Je===Ne&&(Je=escape(Ne)),W=W.split(Ne).join(Je)}}var te=W.indexOf("#");te!==-1&&(this.hash=W.substr(te),W=W.slice(0,te));var P=W.indexOf("?");if(P!==-1?(this.search=W.substr(P),this.query=W.substr(P+1),E&&(this.query=x.parse(this.query)),W=W.slice(0,P)):E&&(this.search="",this.query={}),W&&(this.pathname=W),_[k]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ce=this.pathname||"",U=this.search||"";this.path=ce+U}return this.href=this.format(),this},A.prototype.format=function(){var f=this.auth||"";f&&(f=encodeURIComponent(f),f=f.replace(/%3A/i,":"),f+="@");var E=this.protocol||"",w=this.pathname||"",T=this.hash||"",R=!1,N="";this.host?R=f+this.host:this.hostname&&(R=f+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(R+=":"+this.port)),this.query&&n.isObject(this.query)&&Object.keys(this.query).length&&(N=x.stringify(this.query));var j=this.search||N&&"?"+N||"";return E&&E.substr(-1)!==":"&&(E+=":"),this.slashes||(!E||_[E])&&R!==!1?(R="//"+(R||""),w&&w.charAt(0)!=="/"&&(w="/"+w)):R||(R=""),T&&T.charAt(0)!=="#"&&(T="#"+T),j&&j.charAt(0)!=="?"&&(j="?"+j),w=w.replace(/[?#]/g,function(W){return encodeURIComponent(W)}),j=j.replace("#","%23"),E+R+w+j+T},A.prototype.resolve=function(f){return this.resolveObject(C(f,!1,!0)).format()},A.prototype.resolveObject=function(f){if(n.isString(f)){var E=new A;E.parse(f,!1,!0),f=E}for(var w=new A,T=Object.keys(this),R=0;R<T.length;R++){var N=T[R];w[N]=this[N]}if(w.hash=f.hash,f.href==="")return w.href=w.format(),w;if(f.slashes&&!f.protocol){for(var j=Object.keys(f),W=0;W<j.length;W++){var J=j[W];J!=="protocol"&&(w[J]=f[J])}return _[w.protocol]&&w.hostname&&!w.pathname&&(w.path=w.pathname="/"),w.href=w.format(),w}if(f.protocol&&f.protocol!==w.protocol){if(!_[f.protocol]){for(var F=Object.keys(f),k=0;k<F.length;k++){var K=F[k];w[K]=f[K]}return w.href=w.format(),w}if(w.protocol=f.protocol,f.host||m[f.protocol])w.pathname=f.pathname;else{for(var Ee=(f.pathname||"").split("/");Ee.length&&!(f.host=Ee.shift()););f.host||(f.host=""),f.hostname||(f.hostname=""),Ee[0]!==""&&Ee.unshift(""),Ee.length<2&&Ee.unshift(""),w.pathname=Ee.join("/")}if(w.search=f.search,w.query=f.query,w.host=f.host||"",w.auth=f.auth,w.hostname=f.hostname||f.host,w.port=f.port,w.pathname||w.search){var Y=w.pathname||"",H=w.search||"";w.path=Y+H}return w.slashes=w.slashes||f.slashes,w.href=w.format(),w}var Q=w.pathname&&w.pathname.charAt(0)==="/",re=f.host||f.pathname&&f.pathname.charAt(0)==="/",oe=re||Q||w.host&&f.pathname,me=oe,he=w.pathname&&w.pathname.split("/")||[],Ee=f.pathname&&f.pathname.split("/")||[],de=w.protocol&&!_[w.protocol];if(de&&(w.hostname="",w.port=null,w.host&&(he[0]===""?he[0]=w.host:he.unshift(w.host)),w.host="",f.protocol&&(f.hostname=null,f.port=null,f.host&&(Ee[0]===""?Ee[0]=f.host:Ee.unshift(f.host)),f.host=null),oe=oe&&(Ee[0]===""||he[0]==="")),re)w.host=f.host||f.host===""?f.host:w.host,w.hostname=f.hostname||f.hostname===""?f.hostname:w.hostname,w.search=f.search,w.query=f.query,he=Ee;else if(Ee.length)he||(he=[]),he.pop(),he=he.concat(Ee),w.search=f.search,w.query=f.query;else if(!n.isNullOrUndefined(f.search)){if(de){w.hostname=w.host=he.shift();var be=!!(w.host&&w.host.indexOf("@")>0)&&w.host.split("@");be&&(w.auth=be.shift(),w.host=w.hostname=be.shift())}return w.search=f.search,w.query=f.query,n.isNull(w.pathname)&&n.isNull(w.search)||(w.path=(w.pathname?w.pathname:"")+(w.search?w.search:"")),w.href=w.format(),w}if(!he.length)return w.pathname=null,w.search?w.path="/"+w.search:w.path=null,w.href=w.format(),w;for(var Ue=he.slice(-1)[0],Re=(w.host||f.host||he.length>1)&&(Ue==="."||Ue==="..")||Ue==="",De=0,je=he.length;je>=0;je--)Ue=he[je],Ue==="."?he.splice(je,1):Ue===".."?(he.splice(je,1),De++):De&&(he.splice(je,1),De--);if(!oe&&!me)for(;De--;De)he.unshift("..");!oe||he[0]===""||he[0]&&he[0].charAt(0)==="/"||he.unshift(""),Re&&he.join("/").substr(-1)!=="/"&&he.push("");var ve=he[0]===""||he[0]&&he[0].charAt(0)==="/";if(de){w.hostname=w.host=ve?"":he.length?he.shift():"";var be=!!(w.host&&w.host.indexOf("@")>0)&&w.host.split("@");be&&(w.auth=be.shift(),w.host=w.hostname=be.shift())}return oe=oe||w.host&&he.length,oe&&!ve&&he.unshift(""),he.length?w.pathname=he.join("/"):(w.pathname=null,w.path=null),n.isNull(w.pathname)&&n.isNull(w.search)||(w.path=(w.pathname?w.pathname:"")+(w.search?w.search:"")),w.auth=f.auth||w.auth,w.slashes=w.slashes||f.slashes,w.href=w.format(),w},A.prototype.parseHost=function(){var f=this.host,E=i.exec(f);E&&(E=E[0],E!==":"&&(this.port=E.substr(1)),f=f.substr(0,f.length-E.length)),f&&(this.hostname=f)}},{"./util":204,punycode:174,querystring:177}],204:[function(O,D,S){"use strict";D.exports={isString:function(A){return typeof A=="string"},isObject:function(A){return typeof A=="object"&&A!==null},isNull:function(A){return A===null},isNullOrUndefined:function(A){return A==null}}},{}],205:[function(O,D,S){(function(A){function C(p,c){function s(){if(!n){if(h("throwDeprecation"))throw new Error(c);h("traceDeprecation")?console.trace(c):console.warn(c),n=!0}return p.apply(this,arguments)}if(h("noDeprecation"))return p;var n=!1;return s}function h(p){try{if(!A.localStorage)return!1}catch(s){return!1}var c=A.localStorage[p];return c!=null&&String(c).toLowerCase()==="true"}D.exports=C}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(O,D,S){D.exports=function(A){return A&&typeof A=="object"&&typeof A.copy=="function"&&typeof A.fill=="function"&&typeof A.readUInt8=="function"}},{}],207:[function(O,D,S){(function(A,C){function h(H,Q){var re={seen:[],stylize:c};return arguments.length>=3&&(re.depth=arguments[2]),arguments.length>=4&&(re.colors=arguments[3]),d(Q)?re.showHidden=Q:Q&&S._extend(re,Q),_(re.showHidden)&&(re.showHidden=!1),_(re.depth)&&(re.depth=2),_(re.colors)&&(re.colors=!1),_(re.customInspect)&&(re.customInspect=!0),re.colors&&(re.stylize=p),n(re,H,re.depth)}function p(H,Q){var re=h.styles[Q];return re?"["+h.colors[re][0]+"m"+H+"["+h.colors[re][1]+"m":H}function c(H,Q){return H}function s(H){var Q={};return H.forEach(function(re,oe){Q[re]=!0}),Q}function n(H,Q,re){if(H.customInspect&&Q&&T(Q.inspect)&&Q.inspect!==S.inspect&&(!Q.constructor||Q.constructor.prototype!==Q)){var oe=Q.inspect(re,H);return g(oe)||(oe=n(H,oe,re)),oe}var me=o(H,Q);if(me)return me;var he=Object.keys(Q),Ee=s(he);if(H.showHidden&&(he=Object.getOwnPropertyNames(Q)),w(Q)&&(he.indexOf("message")>=0||he.indexOf("description")>=0))return i(Q);if(he.length===0){if(T(Q)){var de=Q.name?": "+Q.name:"";return H.stylize("[Function"+de+"]","special")}if(x(Q))return H.stylize(RegExp.prototype.toString.call(Q),"regexp");if(E(Q))return H.stylize(Date.prototype.toString.call(Q),"date");if(w(Q))return i(Q)}var be="",Ue=!1,Re=["{","}"];if((t(Q)&&(Ue=!0,Re=["[","]"]),T(Q))&&(be=" [Function"+(Q.name?": "+Q.name:"")+"]"),x(Q)&&(be=" "+RegExp.prototype.toString.call(Q)),E(Q)&&(be=" "+Date.prototype.toUTCString.call(Q)),w(Q)&&(be=" "+i(Q)),he.length===0&&(!Ue||Q.length==0))return Re[0]+be+Re[1];if(re<0)return x(Q)?H.stylize(RegExp.prototype.toString.call(Q),"regexp"):H.stylize("[Object]","special");H.seen.push(Q);var De;return De=Ue?l(H,Q,re,Ee,he):he.map(function(je){return a(H,Q,re,Ee,je,Ue)}),H.seen.pop(),r(De,be,Re)}function o(H,Q){if(_(Q))return H.stylize("undefined","undefined");if(g(Q)){var re="'"+JSON.stringify(Q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return H.stylize(re,"string")}return b(Q)?H.stylize(""+Q,"number"):d(Q)?H.stylize(""+Q,"boolean"):v(Q)?H.stylize("null","null"):void 0}function i(H){return"["+Error.prototype.toString.call(H)+"]"}function l(H,Q,re,oe,me){for(var he=[],Ee=0,de=Q.length;Ee<de;++Ee)J(Q,String(Ee))?he.push(a(H,Q,re,oe,String(Ee),!0)):he.push("");return me.forEach(function(be){be.match(/^\d+$/)||he.push(a(H,Q,re,oe,be,!0))}),he}function a(H,Q,re,oe,me,he){var Ee,de,be;if(be=Object.getOwnPropertyDescriptor(Q,me)||{value:Q[me]},be.get?de=be.set?H.stylize("[Getter/Setter]","special"):H.stylize("[Getter]","special"):be.set&&(de=H.stylize("[Setter]","special")),J(oe,me)||(Ee="["+me+"]"),de||(H.seen.indexOf(be.value)<0?(de=v(re)?n(H,be.value,null):n(H,be.value,re-1),de.indexOf(`
|
|
|
`)>-1&&(de=he?de.split(`
|
|
|
`).map(function(Ue){return" "+Ue}).join(`
|
|
|
`).substr(2):`
|
|
|
`+de.split(`
|
|
|
`).map(function(Ue){return" "+Ue}).join(`
|
|
|
`))):de=H.stylize("[Circular]","special")),_(Ee)){if(he&&me.match(/^\d+$/))return de;Ee=JSON.stringify(""+me),Ee.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Ee=Ee.substr(1,Ee.length-2),Ee=H.stylize(Ee,"name")):(Ee=Ee.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Ee=H.stylize(Ee,"string"))}return Ee+": "+de}function r(H,Q,re){var oe=0;return H.reduce(function(me,he){return oe++,he.indexOf(`
|
|
|
`)>=0&&oe++,me+he.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?re[0]+(Q===""?"":Q+`
|
|
|
`)+" "+H.join(`,
|
|
|
`)+" "+re[1]:re[0]+Q+" "+H.join(", ")+" "+re[1]}function t(H){return Array.isArray(H)}function d(H){return typeof H=="boolean"}function v(H){return H===null}function y(H){return H==null}function b(H){return typeof H=="number"}function g(H){return typeof H=="string"}function m(H){return typeof H=="symbol"}function _(H){return H===void 0}function x(H){return f(H)&&N(H)==="[object RegExp]"}function f(H){return typeof H=="object"&&H!==null}function E(H){return f(H)&&N(H)==="[object Date]"}function w(H){return f(H)&&(N(H)==="[object Error]"||H instanceof Error)}function T(H){return typeof H=="function"}function R(H){return H===null||typeof H=="boolean"||typeof H=="number"||typeof H=="string"||typeof H=="symbol"||H===void 0}function N(H){return Object.prototype.toString.call(H)}function j(H){return H<10?"0"+H.toString(10):H.toString(10)}function W(){var H=new Date,Q=[j(H.getHours()),j(H.getMinutes()),j(H.getSeconds())].join(":");return[H.getDate(),Y[H.getMonth()],Q].join(" ")}function J(H,Q){return Object.prototype.hasOwnProperty.call(H,Q)}var F=/%[sdj%]/g;S.format=function(H){if(!g(H)){for(var Q=[],re=0;re<arguments.length;re++)Q.push(h(arguments[re]));return Q.join(" ")}for(var re=1,oe=arguments,me=oe.length,he=String(H).replace(F,function(be){if(be==="%%")return"%";if(re>=me)return be;switch(be){case"%s":return String(oe[re++]);case"%d":return Number(oe[re++]);case"%j":try{return JSON.stringify(oe[re++])}catch(Ue){return"[Circular]"}default:return be}}),Ee=oe[re];re<me;Ee=oe[++re])v(Ee)||!f(Ee)?he+=" "+Ee:he+=" "+h(Ee);return he},S.deprecate=function(H,Q){function re(){if(!oe){if(A.throwDeprecation)throw new Error(Q);A.traceDeprecation?console.trace(Q):console.error(Q),oe=!0}return H.apply(this,arguments)}if(_(C.process))return function(){return S.deprecate(H,Q).apply(this,arguments)};if(A.noDeprecation===!0)return H;var oe=!1;return re};var k,K={};S.debuglog=function(H){if(_(k)&&(k=A.env.NODE_DEBUG||""),H=H.toUpperCase(),!K[H])if(new RegExp("\\b"+H+"\\b","i").test(k)){var Q=A.pid;K[H]=function(){var re=S.format.apply(S,arguments);console.error("%s %d: %s",H,Q,re)}}else K[H]=function(){};return K[H]},S.inspect=h,h.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},h.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},S.isArray=t,S.isBoolean=d,S.isNull=v,S.isNullOrUndefined=y,S.isNumber=b,S.isString=g,S.isSymbol=m,S.isUndefined=_,S.isRegExp=x,S.isObject=f,S.isDate=E,S.isError=w,S.isFunction=T,S.isPrimitive=R,S.isBuffer=O("./support/isBuffer");var Y=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];S.log=function(){console.log("%s - %s",W(),S.format.apply(S,arguments))},S.inherits=O("inherits"),S._extend=function(H,Q){if(!Q||!f(Q))return H;for(var re=Object.keys(Q),oe=re.length;oe--;)H[re[oe]]=Q[re[oe]];return H}}).call(this,O("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(O,D,S){"use strict";(function(){S.stripBOM=function(A){return A[0]==="\uFEFF"?A.substring(1):A}}).call(void 0)},{}],209:[function(O,D,S){"use strict";function A(s){return s&&s.__esModule?s:{default:s}}var C=O("babel-runtime/helpers/typeof"),h=A(C),p=O("babel-runtime/core-js/object/keys"),c=A(p);(function(){var s,n,o,i,l,a={}.hasOwnProperty;s=O("xmlbuilder"),n=O("./defaults").defaults,i=function(r){return typeof r=="string"&&(r.indexOf("&")>=0||r.indexOf(">")>=0||r.indexOf("<")>=0)},l=function(r){return"<![CDATA["+o(r)+"]]>"},o=function(r){return r.replace("]]>","]]]]><![CDATA[>")},S.Builder=function(){function r(t){var d,v,y;this.options={},v=n[.2];for(d in v)a.call(v,d)&&(y=v[d],this.options[d]=y);for(d in t)a.call(t,d)&&(y=t[d],this.options[d]=y)}return r.prototype.buildObject=function(t){var d,v,y,b,g;return d=this.options.attrkey,v=this.options.charkey,(0,c.default)(t).length===1&&this.options.rootName===n[.2].rootName?(g=(0,c.default)(t)[0],t=t[g]):g=this.options.rootName,y=function(m){return function(_,x){var f,E,w,T,R,N;if((x===void 0?"undefined":(0,h.default)(x))!=="object")m.options.cdata&&i(x)?_.raw(l(x)):_.txt(x);else if(Array.isArray(x)){for(T in x)if(a.call(x,T)){E=x[T];for(R in E)w=E[R],_=y(_.ele(R),w).up()}}else for(R in x)if(a.call(x,R))if(E=x[R],R===d){if((E===void 0?"undefined":(0,h.default)(E))==="object")for(f in E)N=E[f],_=_.att(f,N)}else if(R===v)_=m.options.cdata&&i(E)?_.raw(l(E)):_.txt(E);else if(Array.isArray(E))for(T in E)a.call(E,T)&&(w=E[T],_=typeof w=="string"?m.options.cdata&&i(w)?_.ele(R).raw(l(w)).up():_.ele(R,w).up():y(_.ele(R),w).up());else(E===void 0?"undefined":(0,h.default)(E))==="object"?_=y(_.ele(R),E).up():typeof E=="string"&&m.options.cdata&&i(E)?_=_.ele(R).raw(l(E)).up():(E==null&&(E=""),_=_.ele(R,E.toString()).up());return _}}(this),b=s.create(g,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),y(b,t).end(this.options.renderOpts)},r}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(O,D,S){"use strict";(function(){S.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(O,D,S){"use strict";function A(o){return o&&o.__esModule?o:{default:o}}var C=O("babel-runtime/core-js/object/get-own-property-names"),h=A(C),p=O("babel-runtime/core-js/object/keys"),c=A(p),s=O("babel-runtime/helpers/typeof"),n=A(s);(function(){var o,i,l,a,r,t,d,v,y=function(m,_){return function(){return m.apply(_,arguments)}},b=function(m,_){function x(){this.constructor=m}for(var f in _)g.call(_,f)&&(m[f]=_[f]);return x.prototype=_.prototype,m.prototype=new x,m.__super__=_.prototype,m},g={}.hasOwnProperty;d=O("sax"),l=O("events"),o=O("./bom"),t=O("./processors"),v=O("timers").setImmediate,i=O("./defaults").defaults,a=function(m){return(m===void 0?"undefined":(0,n.default)(m))==="object"&&m!=null&&(0,c.default)(m).length===0},r=function(m,_,x){var f,E,w;for(f=0,E=m.length;f<E;f++)w=m[f],_=w(_,x);return _},S.Parser=function(m){function _(x){this.parseString=y(this.parseString,this),this.reset=y(this.reset,this),this.assignOrPush=y(this.assignOrPush,this),this.processAsync=y(this.processAsync,this);var f,E,w;if(!(this instanceof S.Parser))return new S.Parser(x);this.options={},E=i[.2];for(f in E)g.call(E,f)&&(w=E[f],this.options[f]=w);for(f in x)g.call(x,f)&&(w=x[f],this.options[f]=w);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(t.normalize)),this.reset()}return b(_,m),_.prototype.processAsync=function(){var x,f;try{return this.remaining.length<=this.options.chunkSize?(x=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(x),this.saxParser.close()):(x=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(x),v(this.processAsync))}catch(E){if(f=E,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(f)}},_.prototype.assignOrPush=function(x,f,E){return f in x?(x[f]instanceof Array||(x[f]=[x[f]]),x[f].push(E)):this.options.explicitArray?x[f]=[E]:x[f]=E},_.prototype.reset=function(){var x,f,E,w;return this.removeAllListeners(),this.saxParser=d.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(T){return function(R){if(T.saxParser.resume(),!T.saxParser.errThrown)return T.saxParser.errThrown=!0,T.emit("error",R)}}(this),this.saxParser.onend=function(T){return function(){if(!T.saxParser.ended)return T.saxParser.ended=!0,T.emit("end",T.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,w=[],x=this.options.attrkey,f=this.options.charkey,this.saxParser.onopentag=function(T){return function(R){var N,j,W,J,F;if(W={},W[f]="",!T.options.ignoreAttrs){F=R.attributes;for(N in F)g.call(F,N)&&(x in W||T.options.mergeAttrs||(W[x]={}),j=T.options.attrValueProcessors?r(T.options.attrValueProcessors,R.attributes[N],N):R.attributes[N],J=T.options.attrNameProcessors?r(T.options.attrNameProcessors,N):N,T.options.mergeAttrs?T.assignOrPush(W,J,j):W[x][J]=j)}return W["#name"]=T.options.tagNameProcessors?r(T.options.tagNameProcessors,R.name):R.name,T.options.xmlns&&(W[T.options.xmlnskey]={uri:R.uri,local:R.local}),w.push(W)}}(this),this.saxParser.onclosetag=function(T){return function(){var R,N,j,W,J,F,k,K,Y,H;if(F=w.pop(),J=F["#name"],T.options.explicitChildren&&T.options.preserveChildrenOrder||delete F["#name"],F.cdata===!0&&(R=F.cdata,delete F.cdata),Y=w[w.length-1],F[f].match(/^\s*$/)&&!R?(N=F[f],delete F[f]):(T.options.trim&&(F[f]=F[f].trim()),T.options.normalize&&(F[f]=F[f].replace(/\s{2,}/g," ").trim()),F[f]=T.options.valueProcessors?r(T.options.valueProcessors,F[f],J):F[f],(0,c.default)(F).length===1&&f in F&&!T.EXPLICIT_CHARKEY&&(F=F[f])),a(F)&&(F=T.options.emptyTag!==""?T.options.emptyTag:N),T.options.validator!=null&&(H="/"+function(){var Q,re,oe;for(oe=[],Q=0,re=w.length;Q<re;Q++)W=w[Q],oe.push(W["#name"]);return oe}().concat(J).join("/"),function(){var Q;try{F=T.options.validator(H,Y&&Y[J],F)}catch(re){return Q=re,T.emit("error",Q)}}()),T.options.explicitChildren&&!T.options.mergeAttrs&&(F===void 0?"undefined":(0,n.default)(F))==="object")if(T.options.preserveChildrenOrder){if(Y){Y[T.options.childkey]=Y[T.options.childkey]||[],k={};for(j in F)g.call(F,j)&&(k[j]=F[j]);Y[T.options.childkey].push(k),delete F["#name"],(0,c.default)(F).length===1&&f in F&&!T.EXPLICIT_CHARKEY&&(F=F[f])}}else W={},T.options.attrkey in F&&(W[T.options.attrkey]=F[T.options.attrkey],delete F[T.options.attrkey]),!T.options.charsAsChildren&&T.options.charkey in F&&(W[T.options.charkey]=F[T.options.charkey],delete F[T.options.charkey]),(0,h.default)(F).length>0&&(W[T.options.childkey]=F),F=W;return w.length>0?T.assignOrPush(Y,J,F):(T.options.explicitRoot&&(K=F,F={},F[J]=K),T.resultObject=F,T.saxParser.ended=!0,T.emit("end",T.resultObject))}}(this),E=function(T){return function(R){var N,j;if(j=w[w.length-1])return j[f]+=R,T.options.explicitChildren&&T.options.preserveChildrenOrder&&T.options.charsAsChildren&&(T.options.includeWhiteChars||R.replace(/\\n/g,"").trim()!=="")&&(j[T.options.childkey]=j[T.options.childkey]||[],N={"#name":"__text__"},N[f]=R,T.options.normalize&&(N[f]=N[f].replace(/\s{2,}/g," ").trim()),j[T.options.childkey].push(N)),j}}(this),this.saxParser.ontext=E,this.saxParser.oncdata=function(T){return function(R){var N;if(N=E(R))return N.cdata=!0}}()},_.prototype.parseString=function(x,f){var E;f!=null&&typeof f=="function"&&(this.on("end",function(w){return this.reset(),f(null,w)}),this.on("error",function(w){return this.reset(),f(w)}));try{return x=x.toString(),x.trim()===""?(this.emit("end",null),!0):(x=o.stripBOM(x),this.options.async?(this.remaining=x,v(this.processAsync),this.saxParser):this.saxParser.write(x).close())}catch(w){if(E=w,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",E),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw E}},_}(l.EventEmitter),S.parseString=function(m,_,x){var f,E,w;return x!=null?(typeof x=="function"&&(f=x),(_===void 0?"undefined":(0,n.default)(_))==="object"&&(E=_)):(typeof _=="function"&&(f=_),E={}),w=new S.Parser(E),w.parseString(m,f)}}).call(void 0)},{"./bom":208,"./defaults":210,"./processors":212,"babel-runtime/core-js/object/get-own-property-names":21,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,events:158,sax:194,timers:201}],212:[function(O,D,S){"use strict";(function(){var A;A=new RegExp(/(?!xmlns)^.*:/),S.normalize=function(C){return C.toLowerCase()},S.firstCharLowerCase=function(C){return C.charAt(0).toLowerCase()+C.slice(1)},S.stripPrefix=function(C){return C.replace(A,"")},S.parseNumbers=function(C){return isNaN(C)||(C=C%1==0?parseInt(C,10):parseFloat(C)),C},S.parseBooleans=function(C){return/^(?:true|false)$/i.test(C)&&(C=C.toLowerCase()==="true"),C}}).call(void 0)},{}],213:[function(O,D,S){"use strict";(function(){var A,C,h,p,c=function(n,o){function i(){this.constructor=n}for(var l in o)s.call(o,l)&&(n[l]=o[l]);return i.prototype=o.prototype,n.prototype=new i,n.__super__=o.prototype,n},s={}.hasOwnProperty;C=O("./defaults"),A=O("./builder"),h=O("./parser"),p=O("./processors"),S.defaults=C.defaults,S.processors=p,S.ValidationError=function(n){function o(i){this.message=i}return c(o,n),o}(Error),S.Builder=A.Builder,S.Parser=h.Parser,S.parseString=h.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(O,D,S){"use strict";function A(o){return o&&o.__esModule?o:{default:o}}var C=O("babel-runtime/core-js/object/get-prototype-of"),h=A(C),p=O("babel-runtime/helpers/typeof"),c=A(p),s=O("babel-runtime/core-js/object/assign"),n=A(s);(function(){var o,i,l,a,r,t,d=[].slice,v={}.hasOwnProperty;o=function(){var y,b,g,m,_,x;if(x=arguments[0],_=2<=arguments.length?d.call(arguments,1):[],a(n.default))n.default.apply(null,arguments);else for(y=0,g=_.length;y<g;y++)if((m=_[y])!=null)for(b in m)v.call(m,b)&&(x[b]=m[b]);return x},a=function(y){return!!y&&Object.prototype.toString.call(y)==="[object Function]"},r=function(y){var b;return!!y&&((b=y===void 0?"undefined":(0,c.default)(y))==="function"||b==="object")},i=function(y){return a(Array.isArray)?Array.isArray(y):Object.prototype.toString.call(y)==="[object Array]"},l=function(y){var b;if(i(y))return!y.length;for(b in y)if(v.call(y,b))return!1;return!0},t=function(y){var b,g;return r(y)&&(g=(0,h.default)(y))&&(b=g.constructor)&&typeof b=="function"&&b instanceof b&&Function.prototype.toString.call(b)===Function.prototype.toString.call(Object)},D.exports.assign=o,D.exports.isFunction=a,D.exports.isObject=r,D.exports.isArray=i,D.exports.isEmpty=l,D.exports.isPlainObject=t}).call(void 0)},{"babel-runtime/core-js/object/assign":18,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/helpers/typeof":32}],215:[function(O,D,S){"use strict";var A=O("babel-runtime/core-js/object/create"),C=function(h){return h&&h.__esModule?h:{default:h}}(A);(function(){D.exports=function(){function h(p,c,s){if(this.options=p.options,this.stringify=p.stringify,c==null)throw new Error("Missing attribute name of element "+p.name);if(s==null)throw new Error("Missing attribute value for attribute "+c+" of element "+p.name);this.name=this.stringify.attName(c),this.value=this.stringify.attValue(s)}return h.prototype.clone=function(){return(0,C.default)(this)},h.prototype.toString=function(p){return this.options.writer.set(p).attribute(this)},h}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(O,D,S){"use strict";var A=O("babel-runtime/core-js/object/create"),C=function(h){return h&&h.__esModule?h:{default:h}}(A);(function(){var h,p=function(s,n){function o(){this.constructor=s}for(var i in n)c.call(n,i)&&(s[i]=n[i]);return o.prototype=n.prototype,s.prototype=new o,s.__super__=n.prototype,s},c={}.hasOwnProperty;h=O("./XMLNode"),D.exports=function(s){function n(o,i){if(n.__super__.constructor.call(this,o),i==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(i)}return p(n,s),n.prototype.clone=function(){return(0,C.default)(this)},n.prototype.toString=function(o){return this.options.writer.set(o).cdata(this)},n}(h)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(O,D,S){"use strict";var A=O("babel-runtime/core-js/object/create"),C=function(h){return h&&h.__esModule?h:{default:h}}(A);(function(){var h,p=function(s,n){function o(){this.constructor=s}for(var i in n)c.call(n,i)&&(s[i]=n[i]);return o.prototype=n.prototype,s.prototype=new o,s.__super__=n.prototype,s},c={}.hasOwnProperty;h=O("./XMLNode"),D.exports=function(s){function n(o,i){if(n.__super__.constructor.call(this,o),i==null)throw new Error("Missing comment text");this.text=this.stringify.comment(i)}return p(n,s),n.prototype.clone=function(){return(0,C.default)(this)},n.prototype.toString=function(o){return this.options.writer.set(o).comment(this)},n}(h)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(O,D,S){"use strict";(function(){var A,C=function(p,c){function s(){this.constructor=p}for(var n in c)h.call(c,n)&&(p[n]=c[n]);return s.prototype=c.prototype,p.prototype=new s,p.__super__=c.prototype,p},h={}.hasOwnProperty;A=O("./XMLNode"),D.exports=function(p){function c(s,n,o,i,l,a){if(c.__super__.constructor.call(this,s),n==null)throw new Error("Missing DTD element name");if(o==null)throw new Error("Missing DTD attribute name");if(!i)throw new Error("Missing DTD attribute type");if(!l)throw new Error("Missing DTD attribute default");if(l.indexOf("#")!==0&&(l="#"+l),!l.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(a&&!l.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(n),this.attributeName=this.stringify.attName(o),this.attributeType=this.stringify.dtdAttType(i),this.defaultValue=this.stringify.dtdAttDefault(a),this.defaultValueType=l}return C(c,p),c.prototype.toString=function(s){return this.options.writer.set(s).dtdAttList(this)},c}(A)}).call(void 0)},{"./XMLNode":227}],219:[function(O,D,S){"use strict";(function(){var A,C=function(p,c){function s(){this.constructor=p}for(var n in c)h.call(c,n)&&(p[n]=c[n]);return s.prototype=c.prototype,p.prototype=new s,p.__super__=c.prototype,p},h={}.hasOwnProperty;A=O("./XMLNode"),D.exports=function(p){function c(s,n,o){if(c.__super__.constructor.call(this,s),n==null)throw new Error("Missing DTD element name");o||(o="(#PCDATA)"),Array.isArray(o)&&(o="("+o.join(",")+")"),this.name=this.stringify.eleName(n),this.value=this.stringify.dtdElementValue(o)}return C(c,p),c.prototype.toString=function(s){return this.options.writer.set(s).dtdElement(this)},c}(A)}).call(void 0)},{"./XMLNode":227}],220:[function(O,D,S){"use strict";(function(){var A,C,h=function(c,s){function n(){this.constructor=c}for(var o in s)p.call(s,o)&&(c[o]=s[o]);return n.prototype=s.prototype,c.prototype=new n,c.__super__=s.prototype,c},p={}.hasOwnProperty;C=O("./Utility").isObject,A=O("./XMLNode"),D.exports=function(c){function s(n,o,i,l){if(s.__super__.constructor.call(this,n),i==null)throw new Error("Missing entity name");if(l==null)throw new Error("Missing entity value");if(this.pe=!!o,this.name=this.stringify.eleName(i),C(l)){if(!l.pubID&&!l.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(l.pubID&&!l.sysID)throw new Error("System identifier is required for a public external entity");if(l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID)),l.nData!=null&&(this.nData=this.stringify.dtdNData(l.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(l)}return h(s,c),s.prototype.toString=function(n){return this.options.writer.set(n).dtdEntity(this)},s}(A)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(O,D,S){"use strict";(function(){var A,C=function(p,c){function s(){this.constructor=p}for(var n in c)h.call(c,n)&&(p[n]=c[n]);return s.prototype=c.prototype,p.prototype=new s,p.__super__=c.prototype,p},h={}.hasOwnProperty;A=O("./XMLNode"),D.exports=function(p){function c(s,n,o){if(c.__super__.constructor.call(this,s),n==null)throw new Error("Missing notation name");if(!o.pubID&&!o.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(n),o.pubID!=null&&(this.pubID=this.stringify.dtdPubID(o.pubID)),o.sysID!=null&&(this.sysID=this.stringify.dtdSysID(o.sysID))}return C(c,p),c.prototype.toString=function(s){return this.options.writer.set(s).dtdNotation(this)},c}(A)}).call(void 0)},{"./XMLNode":227}],222:[function(O,D,S){"use strict";(function(){var A,C,h=function(c,s){function n(){this.constructor=c}for(var o in s)p.call(s,o)&&(c[o]=s[o]);return n.prototype=s.prototype,c.prototype=new n,c.__super__=s.prototype,c},p={}.hasOwnProperty;C=O("./Utility").isObject,A=O("./XMLNode"),D.exports=function(c){function s(n,o,i,l){var a;s.__super__.constructor.call(this,n),C(o)&&(a=o,o=a.version,i=a.encoding,l=a.standalone),o||(o="1.0"),this.version=this.stringify.xmlVersion(o),i!=null&&(this.encoding=this.stringify.xmlEncoding(i)),l!=null&&(this.standalone=this.stringify.xmlStandalone(l))}return h(s,c),s.prototype.toString=function(n){return this.options.writer.set(n).declaration(this)},s}(A)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(O,D,S){"use strict";(function(){var A,C,h,p,c,s,n=function(i,l){function a(){this.constructor=i}for(var r in l)o.call(l,r)&&(i[r]=l[r]);return a.prototype=l.prototype,i.prototype=new a,i.__super__=l.prototype,i},o={}.hasOwnProperty;s=O("./Utility").isObject,c=O("./XMLNode"),A=O("./XMLDTDAttList"),h=O("./XMLDTDEntity"),C=O("./XMLDTDElement"),p=O("./XMLDTDNotation"),D.exports=function(i){function l(a,r,t){var d,v;l.__super__.constructor.call(this,a),this.documentObject=a,s(r)&&(d=r,r=d.pubID,t=d.sysID),t==null&&(v=[r,t],t=v[0],r=v[1]),r!=null&&(this.pubID=this.stringify.dtdPubID(r)),t!=null&&(this.sysID=this.stringify.dtdSysID(t))}return n(l,i),l.prototype.element=function(a,r){var t;return t=new C(this,a,r),this.children.push(t),this},l.prototype.attList=function(a,r,t,d,v){var y;return y=new A(this,a,r,t,d,v),this.children.push(y),this},l.prototype.entity=function(a,r){var t;return t=new h(this,!1,a,r),this.children.push(t),this},l.prototype.pEntity=function(a,r){var t;return t=new h(this,!0,a,r),this.children.push(t),this},l.prototype.notation=function(a,r){var t;return t=new p(this,a,r),this.children.push(t),this},l.prototype.toString=function(a){return this.options.writer.set(a).docType(this)},l.prototype.ele=function(a,r){return this.element(a,r)},l.prototype.att=function(a,r,t,d,v){return this.attList(a,r,t,d,v)},l.prototype.ent=function(a,r){return this.entity(a,r)},l.prototype.pent=function(a,r){return this.pEntity(a,r)},l.prototype.not=function(a,r){return this.notation(a,r)},l.prototype.up=function(){return this.root()||this.documentObject},l}(c)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(O,D,S){"use strict";(function(){var A,C,h,p,c=function(n,o){function i(){this.constructor=n}for(var l in o)s.call(o,l)&&(n[l]=o[l]);return i.prototype=o.prototype,n.prototype=new i,n.__super__=o.prototype,n},s={}.hasOwnProperty;p=O("./Utility").isPlainObject,A=O("./XMLNode"),h=O("./XMLStringifier"),C=O("./XMLStringWriter"),D.exports=function(n){function o(i){o.__super__.constructor.call(this,null),i||(i={}),i.writer||(i.writer=new C),this.options=i,this.stringify=new h(i),this.isDocument=!0}return c(o,n),o.prototype.end=function(i){var l;return i?p(i)&&(l=i,i=this.options.writer.set(l)):i=this.options.writer,i.document(this)},o.prototype.toString=function(i){return this.options.writer.set(i).document(this)},o}(A)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(O,D,S){"use strict";(function(){var A,C,h,p,c,s,n,o,i,l,a,r,t,d,v,y,b,g,m,_={}.hasOwnProperty;m=O("./Utility"),b=m.isObject,y=m.isFunction,g=m.isPlainObject,l=O("./XMLElement"),C=O("./XMLCData"),h=O("./XMLComment"),r=O("./XMLRaw"),v=O("./XMLText"),a=O("./XMLProcessingInstruction"),o=O("./XMLDeclaration"),i=O("./XMLDocType"),p=O("./XMLDTDAttList"),s=O("./XMLDTDEntity"),c=O("./XMLDTDElement"),n=O("./XMLDTDNotation"),A=O("./XMLAttribute"),d=O("./XMLStringifier"),t=O("./XMLStringWriter"),D.exports=function(){function x(f,E,w){var T;f||(f={}),f.writer?g(f.writer)&&(T=f.writer,f.writer=new t(T)):f.writer=new t(f),this.options=f,this.writer=f.writer,this.stringify=new d(f),this.onDataCallback=E||function(){},this.onEndCallback=w||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return x.prototype.node=function(f,E,w){var T;if(f==null)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),f=f.valueOf(),E==null&&(E={}),E=E.valueOf(),b(E)||(T=[E,w],w=T[0],E=T[1]),this.currentNode=new l(this,f,E),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,w!=null&&this.text(w),this},x.prototype.element=function(f,E,w){return this.currentNode&&this.currentNode instanceof i?this.dtdElement.apply(this,arguments):this.node(f,E,w)},x.prototype.attribute=function(f,E){var w,T;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(f!=null&&(f=f.valueOf()),b(f))for(w in f)_.call(f,w)&&(T=f[w],this.attribute(w,T));else y(E)&&(E=E.apply()),this.options.skipNullAttributes&&E==null||(this.currentNode.attributes[f]=new A(this,f,E));return this},x.prototype.text=function(f){var E;return this.openCurrent(),E=new v(this,f),this.onData(this.writer.text(E,this.currentLevel+1)),this},x.prototype.cdata=function(f){var E;return this.openCurrent(),E=new C(this,f),this.onData(this.writer.cdata(E,this.currentLevel+1)),this},x.prototype.comment=function(f){var E;return this.openCurrent(),E=new h(this,f),this.onData(this.writer.comment(E,this.currentLevel+1)),this},x.prototype.raw=function(f){var E;return this.openCurrent(),E=new r(this,f),this.onData(this.writer.raw(E,this.currentLevel+1)),this},x.prototype.instruction=function(f,E){var w,T,R,N,j;if(this.openCurrent(),f!=null&&(f=f.valueOf()),E!=null&&(E=E.valueOf()),Array.isArray(f))for(w=0,N=f.length;w<N;w++)T=f[w],this.instruction(T);else if(b(f))for(T in f)_.call(f,T)&&(R=f[T],this.instruction(T,R));else y(E)&&(E=E.apply()),j=new a(this,f,E),this.onData(this.writer.processingInstruction(j,this.currentLevel+1));return this},x.prototype.declaration=function(f,E,w){var T;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return T=new o(this,f,E,w),this.onData(this.writer.declaration(T,this.currentLevel+1)),this},x.prototype.doctype=function(f,E,w){if(this.openCurrent(),f==null)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new i(this,E,w),this.currentNode.rootNodeName=f,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},x.prototype.dtdElement=function(f,E){var w;return this.openCurrent(),w=new c(this,f,E),this.onData(this.writer.dtdElement(w,this.currentLevel+1)),this},x.prototype.attList=function(f,E,w,T,R){var N;return this.openCurrent(),N=new p(this,f,E,w,T,R),this.onData(this.writer.dtdAttList(N,this.currentLevel+1)),this},x.prototype.entity=function(f,E){var w;return this.openCurrent(),w=new s(this,!1,f,E),this.onData(this.writer.dtdEntity(w,this.currentLevel+1)),this},x.prototype.pEntity=function(f,E){var w;return this.openCurrent(),w=new s(this,!0,f,E),this.onData(this.writer.dtdEntity(w,this.currentLevel+1)),this},x.prototype.notation=function(f,E){var w;return this.openCurrent(),w=new n(this,f,E),this.onData(this.writer.dtdNotation(w,this.currentLevel+1)),this},x.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},x.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},x.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},x.prototype.openNode=function(f){if(!f.isOpen)return!this.root&&this.currentLevel===0&&f instanceof l&&(this.root=f),this.onData(this.writer.openNode(f,this.currentLevel)),f.isOpen=!0},x.prototype.closeNode=function(f){if(!f.isClosed)return this.onData(this.writer.closeNode(f,this.currentLevel)),f.isClosed=!0},x.prototype.onData=function(f){return this.documentStarted=!0,this.onDataCallback(f)},x.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},x.prototype.ele=function(){return this.element.apply(this,arguments)},x.prototype.nod=function(f,E,w){return this.node(f,E,w)},x.prototype.txt=function(f){return this.text(f)},x.prototype.dat=function(f){return this.cdata(f)},x.prototype.com=function(f){return this.comment(f)},x.prototype.ins=function(f,E){return this.instruction(f,E)},x.prototype.dec=function(f,E,w){return this.declaration(f,E,w)},x.prototype.dtd=function(f,E,w){return this.doctype(f,E,w)},x.prototype.e=function(f,E,w){return this.element(f,E,w)},x.prototype.n=function(f,E,w){return this.node(f,E,w)},x.prototype.t=function(f){return this.text(f)},x.prototype.d=function(f){return this.cdata(f)},x.prototype.c=function(f){return this.comment(f)},x.prototype.r=function(f){return this.raw(f)},x.prototype.i=function(f,E){return this.instruction(f,E)},x.prototype.att=function(){return this.currentNode&&this.currentNode instanceof i?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},x.prototype.a=function(){return this.currentNode&&this.currentNode instanceof i?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},x.prototype.ent=function(f,E){return this.entity(f,E)},x.prototype.pent=function(f,E){return this.pEntity(f,E)},x.prototype.not=function(f,E){return this.notation(f,E)},x}()}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLStringWriter":231,"./XMLStringifier":232,"./XMLText":233}],226:[function(O,D,S){"use strict";var A=O("babel-runtime/core-js/object/create"),C=function(h){return h&&h.__esModule?h:{default:h}}(A);(function(){var h,p,c,s,n,o=function(l,a){function r(){this.constructor=l}for(var t in a)i.call(a,t)&&(l[t]=a[t]);return r.prototype=a.prototype,l.prototype=new r,l.__super__=a.prototype,l},i={}.hasOwnProperty;n=O("./Utility"),s=n.isObject,c=n.isFunction,p=O("./XMLNode"),h=O("./XMLAttribute"),D.exports=function(l){function a(r,t,d){if(a.__super__.constructor.call(this,r),t==null)throw new Error("Missing element name");this.name=this.stringify.eleName(t),this.attributes={},d!=null&&this.attribute(d),r.isDocument&&(this.isRoot=!0,this.documentObject=r,r.rootObject=this)}return o(a,l),a.prototype.clone=function(){var r,t,d,v;d=(0,C.default)(this),d.isRoot&&(d.documentObject=null),d.attributes={},v=this.attributes;for(t in v)i.call(v,t)&&(r=v[t],d.attributes[t]=r.clone());return d.children=[],this.children.forEach(function(y){var b;return b=y.clone(),b.parent=d,d.children.push(b)}),d},a.prototype.attribute=function(r,t){var d,v;if(r!=null&&(r=r.valueOf()),s(r))for(d in r)i.call(r,d)&&(v=r[d],this.attribute(d,v));else c(t)&&(t=t.apply()),this.options.skipNullAttributes&&t==null||(this.attributes[r]=new h(this,r,t));return this},a.prototype.removeAttribute=function(r){var t,d,v;if(r==null)throw new Error("Missing attribute name");if(r=r.valueOf(),Array.isArray(r))for(d=0,v=r.length;d<v;d++)t=r[d],delete this.attributes[t];else delete this.attributes[r];return this},a.prototype.toString=function(r){return this.options.writer.set(r).element(this)},a.prototype.att=function(r,t){return this.attribute(r,t)},a.prototype.a=function(r,t){return this.attribute(r,t)},a}(p)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(O,D,S){"use strict";(function(){var A,C,h,p,c,s,n,o,i,l,a,r,t={}.hasOwnProperty;r=O("./Utility"),a=r.isObject,l=r.isFunction,i=r.isEmpty,c=null,A=null,C=null,h=null,p=null,n=null,o=null,s=null,D.exports=function(){function d(v){this.parent=v,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],c||(c=O("./XMLElement"),A=O("./XMLCData"),C=O("./XMLComment"),h=O("./XMLDeclaration"),p=O("./XMLDocType"),n=O("./XMLRaw"),o=O("./XMLText"),s=O("./XMLProcessingInstruction"))}return d.prototype.element=function(v,y,b){var g,m,_,x,f,E,w,T,R,N;if(E=null,y==null&&(y={}),y=y.valueOf(),a(y)||(R=[y,b],b=R[0],y=R[1]),v!=null&&(v=v.valueOf()),Array.isArray(v))for(_=0,w=v.length;_<w;_++)m=v[_],E=this.element(m);else if(l(v))E=this.element(v.apply());else if(a(v)){for(f in v)if(t.call(v,f))if(N=v[f],l(N)&&(N=N.apply()),a(N)&&i(N)&&(N=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&f.indexOf(this.stringify.convertAttKey)===0)E=this.attribute(f.substr(this.stringify.convertAttKey.length),N);else if(!this.options.separateArrayItems&&Array.isArray(N))for(x=0,T=N.length;x<T;x++)m=N[x],g={},g[f]=m,E=this.element(g);else a(N)?(E=this.element(f),E.element(N)):E=this.element(f,N)}else E=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&v.indexOf(this.stringify.convertTextKey)===0?this.text(b):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&v.indexOf(this.stringify.convertCDataKey)===0?this.cdata(b):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&v.indexOf(this.stringify.convertCommentKey)===0?this.comment(b):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&v.indexOf(this.stringify.convertRawKey)===0?this.raw(b):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&v.indexOf(this.stringify.convertPIKey)===0?this.instruction(v.substr(this.stringify.convertPIKey.length),b):this.node(v,y,b);if(E==null)throw new Error("Could not create any elements with: "+v);return E},d.prototype.insertBefore=function(v,y,b){var g,m,_;if(this.isRoot)throw new Error("Cannot insert elements at root level");return m=this.parent.children.indexOf(this),_=this.parent.children.splice(m),g=this.parent.element(v,y,b),Array.prototype.push.apply(this.parent.children,_),g},d.prototype.insertAfter=function(v,y,b){var g,m,_;if(this.isRoot)throw new Error("Cannot insert elements at root level");return m=this.parent.children.indexOf(this),_=this.parent.children.splice(m+1),g=this.parent.element(v,y,b),Array.prototype.push.apply(this.parent.children,_),g},d.prototype.remove=function(){var v;if(this.isRoot)throw new Error("Cannot remove the root element");return v=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[v,v-v+1].concat([])),this.parent},d.prototype.node=function(v,y,b){var g,m;return v!=null&&(v=v.valueOf()),y||(y={}),y=y.valueOf(),a(y)||(m=[y,b],b=m[0],y=m[1]),g=new c(this,v,y),b!=null&&g.text(b),this.children.push(g),g},d.prototype.text=function(v){var y;return y=new o(this,v),this.children.push(y),this},d.prototype.cdata=function(v){var y;return y=new A(this,v),this.children.push(y),this},d.prototype.comment=function(v){var y;return y=new C(this,v),this.children.push(y),this},d.prototype.commentBefore=function(v){var y,b;return y=this.parent.children.indexOf(this),b=this.parent.children.splice(y),this.parent.comment(v),Array.prototype.push.apply(this.parent.children,b),this},d.prototype.commentAfter=function(v){var y,b;return y=this.parent.children.indexOf(this),b=this.parent.children.splice(y+1),this.parent.comment(v),Array.prototype.push.apply(this.parent.children,b),this},d.prototype.raw=function(v){var y;return y=new n(this,v),this.children.push(y),this},d.prototype.instruction=function(v,y){var b,g,m,_,x;if(v!=null&&(v=v.valueOf()),y!=null&&(y=y.valueOf()),Array.isArray(v))for(_=0,x=v.length;_<x;_++)b=v[_],this.instruction(b);else if(a(v))for(b in v)t.call(v,b)&&(g=v[b],this.instruction(b,g));else l(y)&&(y=y.apply()),m=new s(this,v,y),this.children.push(m);return this},d.prototype.instructionBefore=function(v,y){var b,g;return b=this.parent.children.indexOf(this),g=this.parent.children.splice(b),this.parent.instruction(v,y),Array.prototype.push.apply(this.parent.children,g),this},d.prototype.instructionAfter=function(v,y){var b,g;return b=this.parent.children.indexOf(this),g=this.parent.children.splice(b+1),this.parent.instruction(v,y),Array.prototype.push.apply(this.parent.children,g),this},d.prototype.declaration=function(v,y,b){var g,m;return g=this.document(),m=new h(g,v,y,b),g.children[0]instanceof h?g.children[0]=m:g.children.unshift(m),g.root()||g},d.prototype.doctype=function(v,y){var b,g,m,_,x,f,E,w,T,R;for(g=this.document(),m=new p(g,v,y),T=g.children,_=x=0,E=T.length;x<E;_=++x)if((b=T[_])instanceof p)return g.children[_]=m,m;for(R=g.children,_=f=0,w=R.length;f<w;_=++f)if(b=R[_],b.isRoot)return g.children.splice(_,0,m),m;return g.children.push(m),m},d.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},d.prototype.root=function(){var v;for(v=this;v;){if(v.isDocument)return v.rootObject;if(v.isRoot)return v;v=v.parent}},d.prototype.document=function(){var v;for(v=this;v;){if(v.isDocument)return v;v=v.parent}},d.prototype.end=function(v){return this.document().end(v)},d.prototype.prev=function(){var v;if((v=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[v-1]},d.prototype.next=function(){var v;if((v=this.parent.children.indexOf(this))===-1||v===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[v+1]},d.prototype.importDocument=function(v){var y;return y=v.root().clone(),y.parent=this,y.isRoot=!1,this.children.push(y),this},d.prototype.ele=function(v,y,b){return this.element(v,y,b)},d.prototype.nod=function(v,y,b){return this.node(v,y,b)},d.prototype.txt=function(v){return this.text(v)},d.prototype.dat=function(v){return this.cdata(v)},d.prototype.com=function(v){return this.comment(v)},d.prototype.ins=function(v,y){return this.instruction(v,y)},d.prototype.doc=function(){return this.document()},d.prototype.dec=function(v,y,b){return this.declaration(v,y,b)},d.prototype.dtd=function(v,y){return this.doctype(v,y)},d.prototype.e=function(v,y,b){return this.element(v,y,b)},d.prototype.n=function(v,y,b){return this.node(v,y,b)},d.prototype.t=function(v){return this.text(v)},d.prototype.d=function(v){return this.cdata(v)},d.prototype.c=function(v){return this.comment(v)},d.prototype.r=function(v){return this.raw(v)},d.prototype.i=function(v,y){return this.instruction(v,y)},d.prototype.u=function(){return this.up()},d.prototype.importXMLBuilder=function(v){return this.importDocument(v)},d}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(O,D,S){"use strict";var A=O("babel-runtime/core-js/object/create"),C=function(h){return h&&h.__esModule?h:{default:h}}(A);(function(){var h,p=function(s,n){function o(){this.constructor=s}for(var i in n)c.call(n,i)&&(s[i]=n[i]);return o.prototype=n.prototype,s.prototype=new o,s.__super__=n.prototype,s},c={}.hasOwnProperty;h=O("./XMLNode"),D.exports=function(s){function n(o,i,l){if(n.__super__.constructor.call(this,o),i==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(i),l&&(this.value=this.stringify.insValue(l))}return p(n,s),n.prototype.clone=function(){return(0,C.default)(this)},n.prototype.toString=function(o){return this.options.writer.set(o).processingInstruction(this)},n}(h)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(O,D,S){"use strict";var A=O("babel-runtime/core-js/object/create"),C=function(h){return h&&h.__esModule?h:{default:h}}(A);(function(){var h,p=function(s,n){function o(){this.constructor=s}for(var i in n)c.call(n,i)&&(s[i]=n[i]);return o.prototype=n.prototype,s.prototype=new o,s.__super__=n.prototype,s},c={}.hasOwnProperty;h=O("./XMLNode"),D.exports=function(s){function n(o,i){if(n.__super__.constructor.call(this,o),i==null)throw new Error("Missing raw text");this.value=this.stringify.raw(i)}return p(n,s),n.prototype.clone=function(){return(0,C.default)(this)},n.prototype.toString=function(o){return this.options.writer.set(o).raw(this)},n}(h)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(O,D,S){"use strict";(function(){var A,C,h,p,c,s,n,o,i,l,a,r,t,d=function(y,b){function g(){this.constructor=y}for(var m in b)v.call(b,m)&&(y[m]=b[m]);return g.prototype=b.prototype,y.prototype=new g,y.__super__=b.prototype,y},v={}.hasOwnProperty;n=O("./XMLDeclaration"),o=O("./XMLDocType"),A=O("./XMLCData"),C=O("./XMLComment"),i=O("./XMLElement"),a=O("./XMLRaw"),r=O("./XMLText"),l=O("./XMLProcessingInstruction"),h=O("./XMLDTDAttList"),p=O("./XMLDTDElement"),c=O("./XMLDTDEntity"),s=O("./XMLDTDNotation"),t=O("./XMLWriterBase"),D.exports=function(y){function b(g,m){b.__super__.constructor.call(this,m),this.stream=g}return d(b,y),b.prototype.document=function(g){var m,_,x,f,E,w,T,R;for(w=g.children,_=0,f=w.length;_<f;_++)m=w[_],m.isLastRootNode=!1;for(g.children[g.children.length-1].isLastRootNode=!0,T=g.children,R=[],x=0,E=T.length;x<E;x++)switch(m=T[x],!1){case!(m instanceof n):R.push(this.declaration(m));break;case!(m instanceof o):R.push(this.docType(m));break;case!(m instanceof C):R.push(this.comment(m));break;case!(m instanceof l):R.push(this.processingInstruction(m));break;default:R.push(this.element(m))}return R},b.prototype.attribute=function(g){return this.stream.write(" "+g.name+'="'+g.value+'"')},b.prototype.cdata=function(g,m){return this.stream.write(this.space(m)+"<![CDATA["+g.text+"]]>"+this.endline(g))},b.prototype.comment=function(g,m){return this.stream.write(this.space(m)+"<!-- "+g.text+" -->"+this.endline(g))},b.prototype.declaration=function(g,m){return this.stream.write(this.space(m)),this.stream.write('<?xml version="'+g.version+'"'),g.encoding!=null&&this.stream.write(' encoding="'+g.encoding+'"'),g.standalone!=null&&this.stream.write(' standalone="'+g.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(g))},b.prototype.docType=function(g,m){var _,x,f,E;if(m||(m=0),this.stream.write(this.space(m)),this.stream.write("<!DOCTYPE "+g.root().name),g.pubID&&g.sysID?this.stream.write(' PUBLIC "'+g.pubID+'" "'+g.sysID+'"'):g.sysID&&this.stream.write(' SYSTEM "'+g.sysID+'"'),g.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(g)),E=g.children,x=0,f=E.length;x<f;x++)switch(_=E[x],!1){case!(_ instanceof h):this.dtdAttList(_,m+1);break;case!(_ instanceof p):this.dtdElement(_,m+1);break;case!(_ instanceof c):this.dtdEntity(_,m+1);break;case!(_ instanceof s):this.dtdNotation(_,m+1);break;case!(_ instanceof A):this.cdata(_,m+1);break;case!(_ instanceof C):this.comment(_,m+1);break;case!(_ instanceof l):this.processingInstruction(_,m+1);break;default:throw new Error("Unknown DTD node type: "+_.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(g))},b.prototype.element=function(g,m){var _,x,f,E,w,T,R,N;m||(m=0),N=this.space(m),this.stream.write(N+"<"+g.name),T=g.attributes;for(w in T)v.call(T,w)&&(_=T[w],this.attribute(_));if(g.children.length===0||g.children.every(function(j){return j.value===""}))this.allowEmpty?this.stream.write("></"+g.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&g.children.length===1&&g.children[0].value!=null)this.stream.write(">"),this.stream.write(g.children[0].value),this.stream.write("</"+g.name+">");else{for(this.stream.write(">"+this.newline),R=g.children,f=0,E=R.length;f<E;f++)switch(x=R[f],!1){case!(x instanceof A):this.cdata(x,m+1);break;case!(x instanceof C):this.comment(x,m+1);break;case!(x instanceof i):this.element(x,m+1);break;case!(x instanceof a):this.raw(x,m+1);break;case!(x instanceof r):this.text(x,m+1);break;case!(x instanceof l):this.processingInstruction(x,m+1);break;default:throw new Error("Unknown XML node type: "+x.constructor.name)}this.stream.write(N+"</"+g.name+">")}return this.stream.write(this.endline(g))},b.prototype.processingInstruction=function(g,m){return this.stream.write(this.space(m)+"<?"+g.target),g.value&&this.stream.write(" "+g.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(g))},b.prototype.raw=function(g,m){return this.stream.write(this.space(m)+g.value+this.endline(g))},b.prototype.text=function(g,m){return this.stream.write(this.space(m)+g.value+this.endline(g))},b.prototype.dtdAttList=function(g,m){return this.stream.write(this.space(m)+"<!ATTLIST "+g.elementName+" "+g.attributeName+" "+g.attributeType),g.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+g.defaultValueType),g.defaultValue&&this.stream.write(' "'+g.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(g))},b.prototype.dtdElement=function(g,m){return this.stream.write(this.space(m)+"<!ELEMENT "+g.name+" "+g.value),this.stream.write(this.spacebeforeslash+">"+this.endline(g))},b.prototype.dtdEntity=function(g,m){return this.stream.write(this.space(m)+"<!ENTITY"),g.pe&&this.stream.write(" %"),this.stream.write(" "+g.name),g.value?this.stream.write(' "'+g.value+'"'):(g.pubID&&g.sysID?this.stream.write(' PUBLIC "'+g.pubID+'" "'+g.sysID+'"'):g.sysID&&this.stream.write(' SYSTEM "'+g.sysID+'"'),g.nData&&this.stream.write(" NDATA "+g.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(g))},b.prototype.dtdNotation=function(g,m){return this.stream.write(this.space(m)+"<!NOTATION "+g.name),g.pubID&&g.sysID?this.stream.write(' PUBLIC "'+g.pubID+'" "'+g.sysID+'"'):g.pubID?this.stream.write(' PUBLIC "'+g.pubID+'"'):g.sysID&&this.stream.write(' SYSTEM "'+g.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(g))},b.prototype.endline=function(g){return g.isLastRootNode?"":this.newline},b}(t)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],231:[function(O,D,S){"use strict";(function(){var A,C,h,p,c,s,n,o,i,l,a,r,t,d=function(y,b){function g(){this.constructor=y}for(var m in b)v.call(b,m)&&(y[m]=b[m]);return g.prototype=b.prototype,y.prototype=new g,y.__super__=b.prototype,y},v={}.hasOwnProperty;n=O("./XMLDeclaration"),o=O("./XMLDocType"),A=O("./XMLCData"),C=O("./XMLComment"),i=O("./XMLElement"),a=O("./XMLRaw"),r=O("./XMLText"),l=O("./XMLProcessingInstruction"),h=O("./XMLDTDAttList"),p=O("./XMLDTDElement"),c=O("./XMLDTDEntity"),s=O("./XMLDTDNotation"),t=O("./XMLWriterBase"),D.exports=function(y){function b(g){b.__super__.constructor.call(this,g)}return d(b,y),b.prototype.document=function(g){var m,_,x,f,E;for(this.textispresent=!1,f="",E=g.children,_=0,x=E.length;_<x;_++)m=E[_],f+=function(){switch(!1){case!(m instanceof n):return this.declaration(m);case!(m instanceof o):return this.docType(m);case!(m instanceof C):return this.comment(m);case!(m instanceof l):return this.processingInstruction(m);default:return this.element(m,0)}}.call(this);return this.pretty&&f.slice(-this.newline.length)===this.newline&&(f=f.slice(0,-this.newline.length)),f},b.prototype.attribute=function(g){return" "+g.name+'="'+g.value+'"'},b.prototype.cdata=function(g,m){return this.space(m)+"<![CDATA["+g.text+"]]>"+this.newline},b.prototype.comment=function(g,m){return this.space(m)+"<!-- "+g.text+" -->"+this.newline},b.prototype.declaration=function(g,m){var _;return _=this.space(m),_+='<?xml version="'+g.version+'"',g.encoding!=null&&(_+=' encoding="'+g.encoding+'"'),g.standalone!=null&&(_+=' standalone="'+g.standalone+'"'),_+=this.spacebeforeslash+"?>",_+=this.newline},b.prototype.docType=function(g,m){var _,x,f,E,w;if(m||(m=0),E=this.space(m),E+="<!DOCTYPE "+g.root().name,g.pubID&&g.sysID?E+=' PUBLIC "'+g.pubID+'" "'+g.sysID+'"':g.sysID&&(E+=' SYSTEM "'+g.sysID+'"'),g.children.length>0){for(E+=" [",E+=this.newline,w=g.children,x=0,f=w.length;x<f;x++)_=w[x],E+=function(){switch(!1){case!(_ instanceof h):return this.dtdAttList(_,m+1);case!(_ instanceof p):return this.dtdElement(_,m+1);case!(_ instanceof c):return this.dtdEntity(_,m+1);case!(_ instanceof s):return this.dtdNotation(_,m+1);case!(_ instanceof A):return this.cdata(_,m+1);case!(_ instanceof C):return this.comment(_,m+1);case!(_ instanceof l):return this.processingInstruction(_,m+1);default:throw new Error("Unknown DTD node type: "+_.constructor.name)}}.call(this);E+="]"}return E+=this.spacebeforeslash+">",E+=this.newline},b.prototype.element=function(g,m){var _,x,f,E,w,T,R,N,j,W,J,F,k;m||(m=0),k=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),F=this.space(m),N="",N+=F+"<"+g.name,j=g.attributes;for(R in j)v.call(j,R)&&(_=j[R],N+=this.attribute(_));if(g.children.length===0||g.children.every(function(K){return K.value===""}))this.allowEmpty?N+="></"+g.name+">"+this.newline:N+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&g.children.length===1&&g.children[0].value!=null)N+=">",N+=g.children[0].value,N+="</"+g.name+">"+this.newline;else{if(this.dontprettytextnodes){for(W=g.children,f=0,w=W.length;f<w;f++)if(x=W[f],x.value!=null){this.textispresent++,k=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,F=this.space(m)),N+=">"+this.newline,J=g.children,E=0,T=J.length;E<T;E++)x=J[E],N+=function(){switch(!1){case!(x instanceof A):return this.cdata(x,m+1);case!(x instanceof C):return this.comment(x,m+1);case!(x instanceof i):return this.element(x,m+1);case!(x instanceof a):return this.raw(x,m+1);case!(x instanceof r):return this.text(x,m+1);case!(x instanceof l):return this.processingInstruction(x,m+1);default:throw new Error("Unknown XML node type: "+x.constructor.name)}}.call(this);k&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),N+=F+"</"+g.name+">"+this.newline}return N},b.prototype.processingInstruction=function(g,m){var _;return _=this.space(m)+"<?"+g.target,g.value&&(_+=" "+g.value),_+=this.spacebeforeslash+"?>"+this.newline},b.prototype.raw=function(g,m){return this.space(m)+g.value+this.newline},b.prototype.text=function(g,m){return this.space(m)+g.value+this.newline},b.prototype.dtdAttList=function(g,m){var _;return _=this.space(m)+"<!ATTLIST "+g.elementName+" "+g.attributeName+" "+g.attributeType,g.defaultValueType!=="#DEFAULT"&&(_+=" "+g.defaultValueType),g.defaultValue&&(_+=' "'+g.defaultValue+'"'),_+=this.spacebeforeslash+">"+this.newline},b.prototype.dtdElement=function(g,m){return this.space(m)+"<!ELEMENT "+g.name+" "+g.value+this.spacebeforeslash+">"+this.newline},b.prototype.dtdEntity=function(g,m){var _;return _=this.space(m)+"<!ENTITY",g.pe&&(_+=" %"),_+=" "+g.name,g.value?_+=' "'+g.value+'"':(g.pubID&&g.sysID?_+=' PUBLIC "'+g.pubID+'" "'+g.sysID+'"':g.sysID&&(_+=' SYSTEM "'+g.sysID+'"'),g.nData&&(_+=" NDATA "+g.nData)),_+=this.spacebeforeslash+">"+this.newline},b.prototype.dtdNotation=function(g,m){var _;return _=this.space(m)+"<!NOTATION "+g.name,g.pubID&&g.sysID?_+=' PUBLIC "'+g.pubID+'" "'+g.sysID+'"':g.pubID?_+=' PUBLIC "'+g.pubID+'"':g.sysID&&(_+=' SYSTEM "'+g.sysID+'"'),_+=this.spacebeforeslash+">"+this.newline},b.prototype.openNode=function(g,m){var _,x,f,E;if(m||(m=0),g instanceof i){f=this.space(m)+"<"+g.name,E=g.attributes;for(x in E)v.call(E,x)&&(_=E[x],f+=this.attribute(_));return f+=(g.children?">":"/>")+this.newline}return f=this.space(m)+"<!DOCTYPE "+g.rootNodeName,g.pubID&&g.sysID?f+=' PUBLIC "'+g.pubID+'" "'+g.sysID+'"':g.sysID&&(f+=' SYSTEM "'+g.sysID+'"'),f+=(g.children?" [":">")+this.newline},b.prototype.closeNode=function(g,m){switch(m||(m=0),!1){case!(g instanceof i):return this.space(m)+"</"+g.name+">"+this.newline;case!(g instanceof o):return this.space(m)+"]>"+this.newline}},b}(t)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],232:[function(O,D,S){"use strict";(function(){var A=function(h,p){return function(){return h.apply(p,arguments)}},C={}.hasOwnProperty;D.exports=function(){function h(p){this.assertLegalChar=A(this.assertLegalChar,this);var c,s,n;p||(p={}),this.noDoubleEncoding=p.noDoubleEncoding,s=p.stringify||{};for(c in s)C.call(s,c)&&(n=s[c],this[c]=n)}return h.prototype.eleName=function(p){return p=""+p||"",this.assertLegalChar(p)},h.prototype.eleText=function(p){return p=""+p||"",this.assertLegalChar(this.elEscape(p))},h.prototype.cdata=function(p){return p=""+p||"",p=p.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(p)},h.prototype.comment=function(p){if(p=""+p||"",p.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+p);return this.assertLegalChar(p)},h.prototype.raw=function(p){return""+p||""},h.prototype.attName=function(p){return p=""+p||""},h.prototype.attValue=function(p){return p=""+p||"",this.attEscape(p)},h.prototype.insTarget=function(p){return""+p||""},h.prototype.insValue=function(p){if(p=""+p||"",p.match(/\?>/))throw new Error("Invalid processing instruction value: "+p);return p},h.prototype.xmlVersion=function(p){if(p=""+p||"",!p.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+p);return p},h.prototype.xmlEncoding=function(p){if(p=""+p||"",!p.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+p);return p},h.prototype.xmlStandalone=function(p){return p?"yes":"no"},h.prototype.dtdPubID=function(p){return""+p||""},h.prototype.dtdSysID=function(p){return""+p||""},h.prototype.dtdElementValue=function(p){return""+p||""},h.prototype.dtdAttType=function(p){return""+p||""},h.prototype.dtdAttDefault=function(p){return p!=null?""+p||"":p},h.prototype.dtdEntityValue=function(p){return""+p||""},h.prototype.dtdNData=function(p){return""+p||""},h.prototype.convertAttKey="@",h.prototype.convertPIKey="?",h.prototype.convertTextKey="#text",h.prototype.convertCDataKey="#cdata",h.prototype.convertCommentKey="#comment",h.prototype.convertRawKey="#raw",h.prototype.assertLegalChar=function(p){var c;if(c=p.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+p+" at index "+c.index);return p},h.prototype.elEscape=function(p){var c;return c=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(c,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},h.prototype.attEscape=function(p){var c;return c=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(c,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},h}()}).call(void 0)},{}],233:[function(O,D,S){"use strict";var A=O("babel-runtime/core-js/object/create"),C=function(h){return h&&h.__esModule?h:{default:h}}(A);(function(){var h,p=function(s,n){function o(){this.constructor=s}for(var i in n)c.call(n,i)&&(s[i]=n[i]);return o.prototype=n.prototype,s.prototype=new o,s.__super__=n.prototype,s},c={}.hasOwnProperty;h=O("./XMLNode"),D.exports=function(s){function n(o,i){if(n.__super__.constructor.call(this,o),i==null)throw new Error("Missing element text");this.value=this.stringify.eleText(i)}return p(n,s),n.prototype.clone=function(){return(0,C.default)(this)},n.prototype.toString=function(o){return this.options.writer.set(o).text(this)},n}(h)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(O,D,S){"use strict";(function(){var A={}.hasOwnProperty;D.exports=function(){function C(h){var p,c,s,n,o,i,l,a,r;h||(h={}),this.pretty=h.pretty||!1,this.allowEmpty=(c=h.allowEmpty)!=null&&c,this.pretty?(this.indent=(s=h.indent)!=null?s:" ",this.newline=(n=h.newline)!=null?n:`
|
|
|
`,this.offset=(o=h.offset)!=null?o:0,this.dontprettytextnodes=(i=h.dontprettytextnodes)!=null?i:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(l=h.spacebeforeslash)!=null?l:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,a=h.writer||{};for(p in a)A.call(a,p)&&(r=a[p],this[p]=r)}return C.prototype.set=function(h){var p,c,s;h||(h={}),"pretty"in h&&(this.pretty=h.pretty),"allowEmpty"in h&&(this.allowEmpty=h.allowEmpty),this.pretty?(this.indent="indent"in h?h.indent:" ",this.newline="newline"in h?h.newline:`
|
|
|
`,this.offset="offset"in h?h.offset:0,this.dontprettytextnodes="dontprettytextnodes"in h?h.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in h?h.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,c=h.writer||{};for(p in c)A.call(c,p)&&(s=c[p],this[p]=s);return this},C.prototype.space=function(h){var p;return this.pretty?(p=(h||0)+this.offset+1,p>0?new Array(p).join(this.indent):""):""},C}()}).call(void 0)},{}],235:[function(O,D,S){"use strict";(function(){var A,C,h,p,c,s,n;n=O("./Utility"),c=n.assign,s=n.isFunction,A=O("./XMLDocument"),C=O("./XMLDocumentCB"),p=O("./XMLStringWriter"),h=O("./XMLStreamWriter"),D.exports.create=function(o,i,l,a){var r,t;if(o==null)throw new Error("Root element needs a name");return a=c({},i,l,a),r=new A(a),t=r.element(o),a.headless||(r.declaration(a),a.pubID==null&&a.sysID==null||r.doctype(a)),t},D.exports.begin=function(o,i,l){var a;return s(o)&&(a=[o,i],i=a[0],l=a[1],o={}),i?new C(o,i,l):new A(o)},D.exports.stringWriter=function(o){return new p(o)},D.exports.streamWriter=function(o,i){return new h(o,i)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(O,D,S){function A(){for(var h={},p=0;p<arguments.length;p++){var c=arguments[p];for(var s in c)C.call(c,s)&&(h[s]=c[s])}return h}D.exports=A;var C=Object.prototype.hasOwnProperty},{}],237:[function(O,D,S){"use strict";function A(a,r,t){p.isBuffer(r)||(r=new p(r)),p.isBuffer(t)||(t=new p(t)),r.length>i?r=a(r):r.length<i&&(r=p.concat([r,l],i));for(var d=new p(i),v=new p(i),y=0;y<i;y++)d[y]=54^r[y],v[y]=92^r[y];var b=a(p.concat([d,t]));return a(p.concat([v,b]))}function C(a,r){a=a||"sha1";var t=o[a],d=[],v=0;return t||h("algorithm:",a,"is not yet supported"),{update:function(y){return p.isBuffer(y)||(y=new p(y)),d.push(y),v+=y.length,this},digest:function(y){var b=p.concat(d),g=r?A(t,r,b):t(b);return d=null,y?g.toString(y):g}}}function h(){var a=[].slice.call(arguments).join(" ");throw new Error([a,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}var p=O("buffer").Buffer,c=O("./sha"),s=O("./sha256"),n=O("./md5"),o={sha1:c,sha256:s,md5:n},i=64,l=new p(i);l.fill(0),S.createHash=function(a){return C(a)},S.createHmac=function(a,r){return C(a,r)},function(a,r){for(var t in a)r(a[t],t)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(a){S[a]=function(){h("sorry,",a,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(O,D,S){"use strict";function A(o,i){if(o.length%c!=0){var l=o.length+(c-o.length%c);o=p.concat([o,s],l)}for(var a=[],r=i?o.readInt32BE:o.readInt32LE,t=0;t<o.length;t+=c)a.push(r.call(o,t));return a}function C(o,i,l){for(var a=new p(i),r=l?a.writeInt32BE:a.writeInt32LE,t=0;t<o.length;t++)r.call(a,o[t],4*t,!0);return a}function h(o,i,l,a){return p.isBuffer(o)||(o=new p(o)),C(i(A(o,a),o.length*n),l,a)}var p=O("buffer").Buffer,c=4,s=new p(c);s.fill(0);var n=8;D.exports={hash:h}},{buffer:38}],239:[function(O,D,S){"use strict";function A(l,a){l[a>>5]|=128<<a%32,l[14+(a+64>>>9<<4)]=a;for(var r=1732584193,t=-271733879,d=-1732584194,v=271733878,y=0;y<l.length;y+=16){var b=r,g=t,m=d,_=v;r=h(r,t,d,v,l[y+0],7,-680876936),v=h(v,r,t,d,l[y+1],12,-389564586),d=h(d,v,r,t,l[y+2],17,606105819),t=h(t,d,v,r,l[y+3],22,-1044525330),r=h(r,t,d,v,l[y+4],7,-176418897),v=h(v,r,t,d,l[y+5],12,1200080426),d=h(d,v,r,t,l[y+6],17,-1473231341),t=h(t,d,v,r,l[y+7],22,-45705983),r=h(r,t,d,v,l[y+8],7,1770035416),v=h(v,r,t,d,l[y+9],12,-1958414417),d=h(d,v,r,t,l[y+10],17,-42063),t=h(t,d,v,r,l[y+11],22,-1990404162),r=h(r,t,d,v,l[y+12],7,1804603682),v=h(v,r,t,d,l[y+13],12,-40341101),d=h(d,v,r,t,l[y+14],17,-1502002290),t=h(t,d,v,r,l[y+15],22,1236535329),r=p(r,t,d,v,l[y+1],5,-165796510),v=p(v,r,t,d,l[y+6],9,-1069501632),d=p(d,v,r,t,l[y+11],14,643717713),t=p(t,d,v,r,l[y+0],20,-373897302),r=p(r,t,d,v,l[y+5],5,-701558691),v=p(v,r,t,d,l[y+10],9,38016083),d=p(d,v,r,t,l[y+15],14,-660478335),t=p(t,d,v,r,l[y+4],20,-405537848),r=p(r,t,d,v,l[y+9],5,568446438),v=p(v,r,t,d,l[y+14],9,-1019803690),d=p(d,v,r,t,l[y+3],14,-187363961),t=p(t,d,v,r,l[y+8],20,1163531501),r=p(r,t,d,v,l[y+13],5,-1444681467),v=p(v,r,t,d,l[y+2],9,-51403784),d=p(d,v,r,t,l[y+7],14,1735328473),t=p(t,d,v,r,l[y+12],20,-1926607734),r=c(r,t,d,v,l[y+5],4,-378558),v=c(v,r,t,d,l[y+8],11,-2022574463),d=c(d,v,r,t,l[y+11],16,1839030562),t=c(t,d,v,r,l[y+14],23,-35309556),r=c(r,t,d,v,l[y+1],4,-1530992060),v=c(v,r,t,d,l[y+4],11,1272893353),d=c(d,v,r,t,l[y+7],16,-155497632),t=c(t,d,v,r,l[y+10],23,-1094730640),r=c(r,t,d,v,l[y+13],4,681279174),v=c(v,r,t,d,l[y+0],11,-358537222),d=c(d,v,r,t,l[y+3],16,-722521979),t=c(t,d,v,r,l[y+6],23,76029189),r=c(r,t,d,v,l[y+9],4,-640364487),v=c(v,r,t,d,l[y+12],11,-421815835),d=c(d,v,r,t,l[y+15],16,530742520),t=c(t,d,v,r,l[y+2],23,-995338651),r=s(r,t,d,v,l[y+0],6,-198630844),v=s(v,r,t,d,l[y+7],10,1126891415),d=s(d,v,r,t,l[y+14],15,-1416354905),t=s(t,d,v,r,l[y+5],21,-57434055),r=s(r,t,d,v,l[y+12],6,1700485571),v=s(v,r,t,d,l[y+3],10,-1894986606),d=s(d,v,r,t,l[y+10],15,-1051523),t=s(t,d,v,r,l[y+1],21,-2054922799),r=s(r,t,d,v,l[y+8],6,1873313359),v=s(v,r,t,d,l[y+15],10,-30611744),d=s(d,v,r,t,l[y+6],15,-1560198380),t=s(t,d,v,r,l[y+13],21,1309151649),r=s(r,t,d,v,l[y+4],6,-145523070),v=s(v,r,t,d,l[y+11],10,-1120210379),d=s(d,v,r,t,l[y+2],15,718787259),t=s(t,d,v,r,l[y+9],21,-343485551),r=n(r,b),t=n(t,g),d=n(d,m),v=n(v,_)}return Array(r,t,d,v)}function C(l,a,r,t,d,v){return n(o(n(n(a,l),n(t,v)),d),r)}function h(l,a,r,t,d,v,y){return C(a&r|~a&t,l,a,d,v,y)}function p(l,a,r,t,d,v,y){return C(a&t|r&~t,l,a,d,v,y)}function c(l,a,r,t,d,v,y){return C(a^r^t,l,a,d,v,y)}function s(l,a,r,t,d,v,y){return C(r^(a|~t),l,a,d,v,y)}function n(l,a){var r=(65535&l)+(65535&a);return(l>>16)+(a>>16)+(r>>16)<<16|65535&r}function o(l,a){return l<<a|l>>>32-a}var i=O("./helpers");D.exports=function(l){return i.hash(l,A,16)}},{"./helpers":238}],240:[function(O,D,S){"use strict";function A(n,o){n[o>>5]|=128<<24-o%32,n[15+(o+64>>9<<4)]=o;for(var i=Array(80),l=1732584193,a=-271733879,r=-1732584194,t=271733878,d=-1009589776,v=0;v<n.length;v+=16){for(var y=l,b=a,g=r,m=t,_=d,x=0;x<80;x++){i[x]=x<16?n[v+x]:c(i[x-3]^i[x-8]^i[x-14]^i[x-16],1);var f=p(p(c(l,5),C(x,a,r,t)),p(p(d,i[x]),h(x)));d=t,t=r,r=c(a,30),a=l,l=f}l=p(l,y),a=p(a,b),r=p(r,g),t=p(t,m),d=p(d,_)}return Array(l,a,r,t,d)}function C(n,o,i,l){return n<20?o&i|~o&l:n<40?o^i^l:n<60?o&i|o&l|i&l:o^i^l}function h(n){return n<20?1518500249:n<40?1859775393:n<60?-1894007588:-899497514}function p(n,o){var i=(65535&n)+(65535&o);return(n>>16)+(o>>16)+(i>>16)<<16|65535&i}function c(n,o){return n<<o|n>>>32-o}var s=O("./helpers");D.exports=function(n){return s.hash(n,A,20,!0)}},{"./helpers":238}],241:[function(O,D,S){"use strict";var A=O("./helpers"),C=function(r,t){var d=(65535&r)+(65535&t);return(r>>16)+(t>>16)+(d>>16)<<16|65535&d},h=function(r,t){return r>>>t|r<<32-t},p=function(r,t){return r>>>t},c=function(r,t,d){return r&t^~r&d},s=function(r,t,d){return r&t^r&d^t&d},n=function(r){return h(r,2)^h(r,13)^h(r,22)},o=function(r){return h(r,6)^h(r,11)^h(r,25)},i=function(r){return h(r,7)^h(r,18)^p(r,3)},l=function(r){return h(r,17)^h(r,19)^p(r,10)},a=function(r,t){var d,v,y,b,g,m,_,x,f,E,w,T,R=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),N=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),j=new Array(64);r[t>>5]|=128<<24-t%32,r[15+(t+64>>9<<4)]=t;for(var f=0;f<r.length;f+=16){d=N[0],v=N[1],y=N[2],b=N[3],g=N[4],m=N[5],_=N[6],x=N[7];for(var E=0;E<64;E++)j[E]=E<16?r[E+f]:C(C(C(l(j[E-2]),j[E-7]),i(j[E-15])),j[E-16]),w=C(C(C(C(x,o(g)),c(g,m,_)),R[E]),j[E]),T=C(n(d),s(d,v,y)),x=_,_=m,m=g,g=C(b,w),b=y,y=v,v=d,d=C(w,T);N[0]=C(d,N[0]),N[1]=C(v,N[1]),N[2]=C(y,N[2]),N[3]=C(b,N[3]),N[4]=C(g,N[4]),N[5]=C(m,N[5]),N[6]=C(_,N[6]),N[7]=C(x,N[7])}return N};D.exports=function(r){return A.hash(r,a,32,!0)}},{"./helpers":238}],242:[function(O,D,S){(function(A){"use strict";function C(a){return a&&a.__esModule?a:{default:a}}var h=O("babel-runtime/core-js/object/create"),p=C(h),c=O("babel-runtime/helpers/classCallCheck"),s=C(c),n=O("babel-runtime/helpers/createClass"),o=C(n),i=O("babel-runtime/helpers/typeof"),l=C(i);!function(a){if((S===void 0?"undefined":(0,l.default)(S))==="object"&&D!==void 0)D.exports=a();else if(typeof B=="function"&&B.amd)B([],a);else{var r;r=typeof window!="undefined"?window:A!==void 0?A:typeof self!="undefined"?self:this,r.mime=a()}}(function(){return function a(r,t,d){function v(g,m){if(!t[g]){if(!r[g]){var _=typeof O=="function"&&O;if(!m&&_)return _(g,!0);if(y)return y(g,!0);var x=new Error("Cannot find module '"+g+"'");throw x.code="MODULE_NOT_FOUND",x}var f=t[g]={exports:{}};r[g][0].call(f.exports,function(E){var w=r[g][1][E];return v(w||E)},f,f.exports,a,r,t,d)}return t[g].exports}for(var y=typeof O=="function"&&O,b=0;b<d.length;b++)v(d[b]);return v}({1:[function(a,r,t){var d=function(){function v(){(0,s.default)(this,v),this._types=(0,p.default)(null),this._extensions=(0,p.default)(null);for(var y=0;y<arguments.length;y++)this.define(arguments[y])}return(0,o.default)(v,[{key:"define",value:function(y,b){for(var g in y){for(var m=y[g],_=0;_<m.length;_++){var x=m[_];if(!b&&x in this._types)throw new Error('Attempt to change mapping for "'+x+'" extension from "'+this._types[x]+'" to "'+g+'". Pass `force=true` to allow this, otherwise remove "'+x+'" from the list of extensions for "'+g+'".');this._types[x]=g}!b&&this._extensions[g]||(this._extensions[g]=m[0])}}},{key:"getType",value:function(y){y=String(y);var b=y.replace(/^.*[\/\\]/,"").toLowerCase(),g=b.replace(/^.*\./,"").toLowerCase(),m=b.length<y.length;return(g.length<b.length-1||!m)&&this._types[g]||null}},{key:"getExtension",value:function(y){return(y=/^\s*([^;\s]*)/.test(y)&&RegExp.$1)&&this._extensions[y.toLowerCase()]||null}}]),v}();r.exports=d},{}],2:[function(a,r,t){var d=a("./Mime");r.exports=new d(a("./types/standard"),a("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(a,r,t){r.exports={"application/prs.cww":["cww"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":[],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],4:[function(a,r,t){r.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/xm":["xm"],"font/otf":["otf"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/webp":["webp"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}]},{},[2])(2)})}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"babel-runtime/core-js/object/create":19,"babel-runtime/helpers/classCallCheck":30,"babel-runtime/helpers/createClass":31,"babel-runtime/helpers/typeof":32}],243:[function(O,D,S){"use strict";S.encodeURIComponent=function(A){try{return encodeURIComponent(A)}catch(C){return A}},S.escape=O("escape-html"),S.timestamp=function(A){if(A){var C=A;return typeof C=="string"&&(C=Number(C)),String(A).length===10&&(C*=1e3),new Date(C)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(O,D,S){(function(A,C){"use strict";function h(x){return x&&x.__esModule?x:{default:x}}function p(x,f){return x===void 0?f:x}function c(x,f){return function(E,w,T){if(E)return f(E);x({data:w,status:T.statusCode,headers:T.headers,res:T})}}var s,n=O("babel-runtime/core-js/json/stringify"),o=h(n),i=O("babel-runtime/helpers/typeof"),l=h(i),a=O("util"),r=O("url"),t=O("http"),d=O("https"),v=O("debug")("urllib"),y=O("humanize-ms"),b=0,g=Math.pow(2,31)-10,m=/^https?:\/\//i;S.TIMEOUTS=[y("300s"),y("300s")];var _=["json","text"];S.request=function(x,f,E){return arguments.length===2&&typeof f=="function"&&(E=f,f=null),typeof E=="function"?S.requestWithCallback(x,f,E):(s||(s=O("any-promise")),new s(function(w,T){S.requestWithCallback(x,f,c(w,T))}))},S.requestWithCallback=function(x,f,E){function w(){Je&&(clearTimeout(Je),Je=null)}function T(){te&&(clearTimeout(te),te=null)}function R(Ke,Pe,Ie){if(T(),!E)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),K,A.pid,de.method,x),void(Ke&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),K,A.pid,Ke.name,Ke.message,Ke.stack));var Ce=E;E=null;var pe={};if(Ie&&($=Ie.statusCode,pe=Ie.headers),$===401&&pe["www-authenticate"]&&(!f.headers||!f.headers.Authorization)&&f.digestAuth){var _e=pe["www-authenticate"];if(_e.indexOf("Digest ")>=0)return v("Request#%d %s: got digest auth header WWW-Authenticate: %s",K,x,_e),f.headers=f.headers||{},f.headers.Authorization=digestAuthHeader(de.method,de.path,_e,f.digestAuth),v("Request#%d %s: auth with digest header: %s",K,x,f.headers.Authorization),Ie.headers["set-cookie"]&&(f.headers.Cookie=Ie.headers["set-cookie"].join(";")),S.requestWithCallback(x,f,Ce)}var Oe=Date.now()-Q;Le&&(Le.contentDownload=Oe),v("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Oe,X,$,de.method,de.host,de.path,q,Le);var we={status:$,statusCode:$,headers:pe,size:X,aborted:ge,rt:Oe,keepAliveSocket:q,data:Pe,requestUrls:f.requestUrls,timing:Le,remoteAddress:Ae,remotePort:at};if(Ke){var Be="";he&&typeof he.getCurrentStatus=="function"&&(Be=", agent status: "+(0,o.default)(he.getCurrentStatus())),Ke.message+=", "+de.method+" "+x+" "+$+" (connected: "+U+", keepalive socket: "+q+Be+`)
|
|
|
headers: `+(0,o.default)(pe),Ke.data=Pe,Ke.path=de.path,Ke.status=$,Ke.headers=pe,Ke.res=we}Ce(Ke,Pe,f.streaming?Ie:we),f.emitter&&(Y.url=x,Y.socket=ze&&ze.connection,Y.options=de,Y.size=ke,f.emitter.emit("response",{requestId:K,error:Ke,ctx:f.ctx,req:Y,res:we}))}function N(Ke){var Pe=null;if(f.followRedirect&&statuses.redirect[Ke.statusCode]){f._followRedirectCount=(f._followRedirectCount||0)+1;var Ie=Ke.headers.location;if(Ie){if(!(f._followRedirectCount>f.maxRedirects)){var Ce=f.formatRedirectUrl?f.formatRedirectUrl(x,Ie):r.resolve(x,Ie);v("Request#%d %s: `redirected` from %s to %s",K,de.path,x,Ce),T(),f.headers&&f.headers.Host&&m.test(Ie)&&(f.headers.Host=null);var pe=E;return E=null,S.requestWithCallback(Ce,f,pe),{redirect:!0,error:null}}Pe=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+x),Pe.name="MaxRedirectError"}else Pe=new Error("Got statusCode "+Ke.statusCode+" but cannot resolve next location from headers"),Pe.name="FollowRedirectError"}return{redirect:!1,error:Pe}}function j(Ke,Pe,Ie){return Ie(null,Pe,Ke.headers["content-encoding"])}function W(Ke){if(Le&&(Le.waiting=Date.now()-Q),v("Request#%d %s `req response` event emit: status %d, headers: %j",K,x,Ke.statusCode,Ke.headers),f.streaming){var Pe=N(Ke);return Pe.redirect?void Ke.resume():Pe.error?(Ke.resume(),R(Pe.error,null,Ke)):R(null,null,Ke)}if(Ke.on("close",function(){v("Request#%d %s: `res close` event emit, total size %d",K,x,X)}),Ke.on("error",function(){v("Request#%d %s: `res error` event emit, total size %d",K,x,X)}),Ke.on("aborted",function(){ge=!0,v("Request#%d %s: `res aborted` event emit, total size %d",K,x,X)}),Me){var Pe=N(Ke);return Pe.redirect?void Ke.resume():Pe.error?(Ke.resume(),Me.end(),R(Pe.error,null,Ke)):(f.consumeWriteStream===!1?Ke.on("end",R.bind(null,null,null,Ke)):isNode010||isNode012?first([[Me,"close"],[Ke,"aborted"]],function(pe,_e,Oe){v("Request#%d %s: writeStream or res %s event emitted",K,x,Oe),R(P||null,null,Ke)}):Me.on("close",function(){v("Request#%d %s: writeStream close event emitted",K,x),R(P||null,null,Ke)}),Ke.pipe(Me))}var Ie=[];Ke.on("data",function(Ce){v("Request#%d %s: `res data` event emit, size %d",K,x,Ce.length),X+=Ce.length,Ie.push(Ce)}),Ke.on("end",function(){var Ce=C.concat(Ie,X);if(v("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",K,x,X,Ke._dumped),P)return R(P,Ce,Ke);var pe=N(Ke);if(pe.error)return R(pe.error,Ce,Ke);pe.redirect||j(Ke,Ce,function(_e,Oe,we){if(_e)return R(_e,Ce,Ke);if(!we&&_.indexOf(f.dataType)>=0){try{Oe=decodeBodyByCharset(Oe,Ke)}catch(qe){return v("decodeBodyByCharset error: %s",qe),R(null,Oe,Ke)}if(f.dataType==="json")if(X===0)Oe=null;else{var Be=parseJSON(Oe,Ee);Be.error?_e=Be.error:Oe=Be.data}}ge&&v("Request#%d %s: Remote socket was terminated before `response.end()` was called",K,x),R(_e,Oe,Ke)})})}function J(){v("Response timer ticking, timeout: %d",et),te=setTimeout(function(){te=null;var Ke="Response timeout for "+et+"ms";P=new Error(Ke),P.name="ResponseTimeoutError",P.requestId=K,v("ResponseTimeout: Request#%d %s %s: %s, connected: %s",K,x,P.name,Ke,U),F()},et)}function F(){v("Request#%d %s abort, connected: %s",K,x,U),ze.socket||(P.noSocket=!0,R(P)),ze.abort()}if(!x||typeof x!="string"&&(x===void 0?"undefined":(0,l.default)(x))!=="object"){var k=a.format("expect request url to be a string or a http request options, but got %j",x);throw new Error(k)}arguments.length===2&&typeof f=="function"&&(E=f,f=null),f=f||{},b>=g&&(b=0);var K=++b;f.requestUrls=f.requestUrls||[];var Y={requestId:K,url:x,args:f,ctx:f.ctx};f.emitter&&f.emitter.emit("request",Y),f.timeout=f.timeout||S.TIMEOUTS,f.maxRedirects=f.maxRedirects||10,f.streaming=f.streaming||f.customResponse;var H,Q=Date.now();typeof x=="string"?(m.test(x)||(x="http://"+x),H=r.parse(x)):H=x;var re=(f.type||f.method||H.method||"GET").toUpperCase(),oe=H.port||80,me=t,he=p(f.agent,S.agent),Ee=f.fixJSONCtlChars;H.protocol==="https:"&&(me=d,he=p(f.httpsAgent,S.httpsAgent),H.port||(oe=443));var de={host:H.hostname||H.host||"localhost",path:H.path||"/",method:re,port:oe,agent:he,headers:f.headers||{},lookup:f.lookup};Array.isArray(f.timeout)?de.requestTimeout=f.timeout[f.timeout.length-1]:f.timeout!==void 0&&(de.requestTimeout=f.timeout);for(var be=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Ue=0;Ue<be.length;Ue++){var Re=be[Ue];f.hasOwnProperty(Re)&&(de[Re]=f[Re])}de.rejectUnauthorized!==!1||de.hasOwnProperty("secureOptions")||(de.secureOptions=O("constants").SSL_OP_NO_TLSv1_2);var De=f.auth||H.auth;De&&(de.auth=De);var je=f.content||f.data,ve=re==="GET"||re==="HEAD"||f.dataAsQueryString;if(!f.content&&je&&typeof je!="string"&&!C.isBuffer(je))if(ve)je=f.nestedQuerystring?qs.stringify(je):querystring.stringify(je);else{var ce=de.headers["Content-Type"]||de.headers["content-type"];ce||(ce=f.contentType==="json"?"application/json":"application/x-www-form-urlencoded",de.headers["Content-Type"]=ce),je=parseContentType(ce).type==="application/json"?(0,o.default)(je):f.nestedQuerystring?qs.stringify(je):querystring.stringify(je)}ve&&je&&(de.path+=(H.query?"&":"?")+je,je=null);var ke=0;if(je){var Ne=je.length;C.isBuffer(je)||(Ne=C.byteLength(je)),ke=de.headers["Content-Length"]=Ne}f.dataType==="json"&&(de.headers.Accept="application/json"),typeof f.beforeRequest=="function"&&f.beforeRequest(de);var Je=null,te=null,P=null,U=!1,q=!1,X=0,$=-1,ge=!1,Ae="",at="",Le=null;f.timing&&(Le={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),de.headers["User-Agent"]||de.headers["user-agent"]||(de.headers["User-Agent"]=navigator.userAgent),f.gzip&&(de.headers["Accept-Encoding"]||de.headers["accept-encoding"]||(de.headers["Accept-Encoding"]="gzip"));var Me=f.writeStream;v("Request#%d %s %s with headers %j, options.path: %s",K,re,x,de.headers,de.path),f.requestUrls.push(x);var Xe,et;Array.isArray(f.timeout)?(Xe=y(f.timeout[0]),et=y(f.timeout[1])):Xe=et=y(f.timeout),v("ConnectTimeout: %d, ResponseTimeout: %d",Xe,et);var ze;try{ze=me.request(de,W)}catch(Ke){return R(Ke)}return typeof window=="undefined"?function(){v("Connect timer ticking, timeout: %d",Xe),Je=setTimeout(function(){Je=null,$===-1&&($=-2);var Ke="Connect timeout for "+Xe+"ms",Pe="ConnectionTimeoutError";ze.socket||(Pe="SocketAssignTimeoutError",Ke+=", working sockets is full"),P=new Error(Ke),P.name=Pe,P.requestId=K,v("ConnectTimeout: Request#%d %s %s: %s, connected: %s",K,x,P.name,Ke,U),F()},Xe)}():ze.on("requestTimeout",function(){$===-1&&($=-2);var Ke="Connect timeout for "+Xe+"ms";P=new Error(Ke),P.name="ConnectionTimeoutError",P.requestId=K,F()}),Le&&ze.on("finish",function(){Le.requestSent=Date.now()-Q}),ze.once("socket",function(Ke){Le&&(Le.queuing=Date.now()-Q),isNode010&&Ke.socket&&(Ke=Ke.socket);var Pe=Ke.readyState;if(Pe==="opening")return Ke.once("lookup",function(Ie,Ce,pe){v("Request#%d %s lookup: %s, %s, %s",K,x,Ie,Ce,pe),Le&&(Le.dnslookup=Date.now()-Q),Ce&&(Ae=Ce)}),void Ke.once("connect",function(){Le&&(Le.connected=Date.now()-Q),w(),J(),v("Request#%d %s new socket connected",K,x),U=!0,Ae||(Ae=Ke.remoteAddress),at=Ke.remotePort});v("Request#%d %s reuse socket connected, readyState: %s",K,x,Pe),U=!0,q=!0,Ae||(Ae=Ke.remoteAddress),at=Ke.remotePort,w(),J()}),ze.on("error",function(Ke){Ke.name!=="Error"&&Ke.name!=="TypeError"||(Ke.name=U?"ResponseError":"RequestError"),Ke.message+=' (req "error")',v("Request#%d %s `req error` event emit, %s: %s",K,x,Ke.name,Ke.message),R(P||Ke)}),Me&&Me.once("error",function(Ke){Ke.message+=' (writeStream "error")',P=Ke,v("Request#%d %s `writeStream error` event emit, %s: %s",K,x,Ke.name,Ke.message),F()}),f.stream?(f.stream.pipe(ze),f.stream.once("error",function(Ke){Ke.message+=' (stream "error")',P=Ke,v("Request#%d %s `readStream error` event emit, %s: %s",K,x,Ke.name,Ke.message),F()})):ze.end(je),ze.requestId=K,ze}}).call(this,O("_process"),O("buffer").Buffer)},{_process:173,"any-promise":13,"babel-runtime/core-js/json/stringify":17,"babel-runtime/helpers/typeof":32,buffer:38,constants:42,debug:155,http:196,https:159,"humanize-ms":160,url:203,util:207}]},{},[1])(1)}),!function(B){function O(S){if(D[S])return D[S].exports;var A=D[S]={i:S,l:!1,exports:{}};return B[S].call(A.exports,A,A.exports,O),A.l=!0,A.exports}var D={};O.m=B,O.c=D,O.d=function(S,A,C){O.o(S,A)||Object.defineProperty(S,A,{configurable:!1,enumerable:!0,get:C})},O.n=function(S){var A=S&&S.__esModule?function(){return S.default}:function(){return S};return O.d(A,"a",A),A},O.o=function(S,A){return Object.prototype.hasOwnProperty.call(S,A)},O.p="",O(O.s=12)}([function(B,O,D){!function(S,A){B.exports=O=A()}(0,function(){var S=S||function(A,C){var h=Object.create||function(){function d(){}return function(v){var y;return d.prototype=v,y=new d,d.prototype=null,y}}(),p={},c=p.lib={},s=c.Base=function(){return{extend:function(d){var v=h(this);return d&&v.mixIn(d),v.hasOwnProperty("init")&&this.init!==v.init||(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},create:function(){var d=this.extend();return d.init.apply(d,arguments),d},init:function(){},mixIn:function(d){for(var v in d)d.hasOwnProperty(v)&&(this[v]=d[v]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),n=c.WordArray=s.extend({init:function(d,v){d=this.words=d||[],this.sigBytes=v!=null?v:4*d.length},toString:function(d){return(d||i).stringify(this)},concat:function(d){var v=this.words,y=d.words,b=this.sigBytes,g=d.sigBytes;if(this.clamp(),b%4)for(var m=0;m<g;m++){var _=y[m>>>2]>>>24-m%4*8&255;v[b+m>>>2]|=_<<24-(b+m)%4*8}else for(var m=0;m<g;m+=4)v[b+m>>>2]=y[m>>>2];return this.sigBytes+=g,this},clamp:function(){var d=this.words,v=this.sigBytes;d[v>>>2]&=4294967295<<32-v%4*8,d.length=A.ceil(v/4)},clone:function(){var d=s.clone.call(this);return d.words=this.words.slice(0),d},random:function(d){for(var v,y=[],b=0;b<d;b+=4){var g=function(m){var m=m,_=987654321,x=4294967295;return function(){_=36969*(65535&_)+(_>>16)&x,m=18e3*(65535&m)+(m>>16)&x;var f=(_<<16)+m&x;return f/=4294967296,(f+=.5)*(A.random()>.5?1:-1)}}(4294967296*(v||A.random()));v=987654071*g(),y.push(4294967296*g()|0)}return new n.init(y,d)}}),o=p.enc={},i=o.Hex={stringify:function(d){for(var v=d.words,y=d.sigBytes,b=[],g=0;g<y;g++){var m=v[g>>>2]>>>24-g%4*8&255;b.push((m>>>4).toString(16)),b.push((15&m).toString(16))}return b.join("")},parse:function(d){for(var v=d.length,y=[],b=0;b<v;b+=2)y[b>>>3]|=parseInt(d.substr(b,2),16)<<24-b%8*4;return new n.init(y,v/2)}},l=o.Latin1={stringify:function(d){for(var v=d.words,y=d.sigBytes,b=[],g=0;g<y;g++){var m=v[g>>>2]>>>24-g%4*8&255;b.push(String.fromCharCode(m))}return b.join("")},parse:function(d){for(var v=d.length,y=[],b=0;b<v;b++)y[b>>>2]|=(255&d.charCodeAt(b))<<24-b%4*8;return new n.init(y,v)}},a=o.Utf8={stringify:function(d){try{return decodeURIComponent(escape(l.stringify(d)))}catch(v){throw new Error("Malformed UTF-8 data")}},parse:function(d){return l.parse(unescape(encodeURIComponent(d)))}},r=c.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(d){typeof d=="string"&&(d=a.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},_process:function(d){var v=this._data,y=v.words,b=v.sigBytes,g=this.blockSize,m=4*g,_=b/m;_=d?A.ceil(_):A.max((0|_)-this._minBufferSize,0);var x=_*g,f=A.min(4*x,b);if(x){for(var E=0;E<x;E+=g)this._doProcessBlock(y,E);var w=y.splice(0,x);v.sigBytes-=f}return new n.init(w,f)},clone:function(){var d=s.clone.call(this);return d._data=this._data.clone(),d},_minBufferSize:0}),t=(c.Hasher=r.extend({cfg:s.extend(),init:function(d){this.cfg=this.cfg.extend(d),this.reset()},reset:function(){r.reset.call(this),this._doReset()},update:function(d){return this._append(d),this._process(),this},finalize:function(d){return d&&this._append(d),this._doFinalize()},blockSize:16,_createHelper:function(d){return function(v,y){return new d.init(y).finalize(v)}},_createHmacHelper:function(d){return function(v,y){return new t.HMAC.init(d,y).finalize(v)}}}),p.algo={});return p}(Math);return S})},function(B,O,D){"use strict";function S(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var A=function(){function h(p,c){for(var s=0;s<c.length;s++){var n=c[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}return function(p,c,s){return c&&h(p.prototype,c),s&&h(p,s),p}}(),C=function(){function h(){S(this,h)}return A(h,null,[{key:"detectIEVersion",value:function(){for(var p=4,c=document.createElement("div"),s=c.getElementsByTagName("i");c.innerHTML="<!--[if gt IE "+p+"]><i></i><![endif]-->",s[0];)p++;return p>4&&p}},{key:"extend",value:function(p,c){for(var s in c)Object.prototype.hasOwnProperty.call(c,s)&&c[s]&&(p[s]=c[s])}},{key:"isArray",value:function(p){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(p){return p=p.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(p)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(p)?"audio":/.bmp|.jpg|.jpeg|.png/.test(p)?"img":"other"}},{key:"isImage",value:function(p){return p=p.toLowerCase(),!!/.jpg|.jpeg|.png/.test(p)}},{key:"ISODateString",value:function(p){function c(s){return s<10?"0"+s:s}return p.getUTCFullYear()+"-"+c(p.getUTCMonth()+1)+"-"+c(p.getUTCDate())+"T"+c(p.getUTCHours())+":"+c(p.getUTCMinutes())+":"+c(p.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(p){return!!/^\d+$/.test(p)}}]),h}();O.default=C},function(B,O,D){!function(S,A){B.exports=O=A(D(0))}(0,function(S){return function(A){function C(t,d,v,y,b,g,m){var _=t+(d&v|~d&y)+b+m;return(_<<g|_>>>32-g)+d}function h(t,d,v,y,b,g,m){var _=t+(d&y|v&~y)+b+m;return(_<<g|_>>>32-g)+d}function p(t,d,v,y,b,g,m){var _=t+(d^v^y)+b+m;return(_<<g|_>>>32-g)+d}function c(t,d,v,y,b,g,m){var _=t+(v^(d|~y))+b+m;return(_<<g|_>>>32-g)+d}var s=S,n=s.lib,o=n.WordArray,i=n.Hasher,l=s.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*A.abs(A.sin(t+1))|0}();var r=l.MD5=i.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,d){for(var v=0;v<16;v++){var y=d+v,b=t[y];t[y]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8)}var g=this._hash.words,m=t[d+0],_=t[d+1],x=t[d+2],f=t[d+3],E=t[d+4],w=t[d+5],T=t[d+6],R=t[d+7],N=t[d+8],j=t[d+9],W=t[d+10],J=t[d+11],F=t[d+12],k=t[d+13],K=t[d+14],Y=t[d+15],H=g[0],Q=g[1],re=g[2],oe=g[3];H=C(H,Q,re,oe,m,7,a[0]),oe=C(oe,H,Q,re,_,12,a[1]),re=C(re,oe,H,Q,x,17,a[2]),Q=C(Q,re,oe,H,f,22,a[3]),H=C(H,Q,re,oe,E,7,a[4]),oe=C(oe,H,Q,re,w,12,a[5]),re=C(re,oe,H,Q,T,17,a[6]),Q=C(Q,re,oe,H,R,22,a[7]),H=C(H,Q,re,oe,N,7,a[8]),oe=C(oe,H,Q,re,j,12,a[9]),re=C(re,oe,H,Q,W,17,a[10]),Q=C(Q,re,oe,H,J,22,a[11]),H=C(H,Q,re,oe,F,7,a[12]),oe=C(oe,H,Q,re,k,12,a[13]),re=C(re,oe,H,Q,K,17,a[14]),Q=C(Q,re,oe,H,Y,22,a[15]),H=h(H,Q,re,oe,_,5,a[16]),oe=h(oe,H,Q,re,T,9,a[17]),re=h(re,oe,H,Q,J,14,a[18]),Q=h(Q,re,oe,H,m,20,a[19]),H=h(H,Q,re,oe,w,5,a[20]),oe=h(oe,H,Q,re,W,9,a[21]),re=h(re,oe,H,Q,Y,14,a[22]),Q=h(Q,re,oe,H,E,20,a[23]),H=h(H,Q,re,oe,j,5,a[24]),oe=h(oe,H,Q,re,K,9,a[25]),re=h(re,oe,H,Q,f,14,a[26]),Q=h(Q,re,oe,H,N,20,a[27]),H=h(H,Q,re,oe,k,5,a[28]),oe=h(oe,H,Q,re,x,9,a[29]),re=h(re,oe,H,Q,R,14,a[30]),Q=h(Q,re,oe,H,F,20,a[31]),H=p(H,Q,re,oe,w,4,a[32]),oe=p(oe,H,Q,re,N,11,a[33]),re=p(re,oe,H,Q,J,16,a[34]),Q=p(Q,re,oe,H,K,23,a[35]),H=p(H,Q,re,oe,_,4,a[36]),oe=p(oe,H,Q,re,E,11,a[37]),re=p(re,oe,H,Q,R,16,a[38]),Q=p(Q,re,oe,H,W,23,a[39]),H=p(H,Q,re,oe,k,4,a[40]),oe=p(oe,H,Q,re,m,11,a[41]),re=p(re,oe,H,Q,f,16,a[42]),Q=p(Q,re,oe,H,T,23,a[43]),H=p(H,Q,re,oe,j,4,a[44]),oe=p(oe,H,Q,re,F,11,a[45]),re=p(re,oe,H,Q,Y,16,a[46]),Q=p(Q,re,oe,H,x,23,a[47]),H=c(H,Q,re,oe,m,6,a[48]),oe=c(oe,H,Q,re,R,10,a[49]),re=c(re,oe,H,Q,K,15,a[50]),Q=c(Q,re,oe,H,w,21,a[51]),H=c(H,Q,re,oe,F,6,a[52]),oe=c(oe,H,Q,re,f,10,a[53]),re=c(re,oe,H,Q,W,15,a[54]),Q=c(Q,re,oe,H,_,21,a[55]),H=c(H,Q,re,oe,N,6,a[56]),oe=c(oe,H,Q,re,Y,10,a[57]),re=c(re,oe,H,Q,T,15,a[58]),Q=c(Q,re,oe,H,k,21,a[59]),H=c(H,Q,re,oe,E,6,a[60]),oe=c(oe,H,Q,re,J,10,a[61]),re=c(re,oe,H,Q,x,15,a[62]),Q=c(Q,re,oe,H,j,21,a[63]),g[0]=g[0]+H|0,g[1]=g[1]+Q|0,g[2]=g[2]+re|0,g[3]=g[3]+oe|0},_doFinalize:function(){var t=this._data,d=t.words,v=8*this._nDataBytes,y=8*t.sigBytes;d[y>>>5]|=128<<24-y%32;var b=A.floor(v/4294967296),g=v;d[15+(y+64>>>9<<4)]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8),d[14+(y+64>>>9<<4)]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),t.sigBytes=4*(d.length+1),this._process();for(var m=this._hash,_=m.words,x=0;x<4;x++){var f=_[x];_[x]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return m},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});s.MD5=i._createHelper(r),s.HmacMD5=i._createHmacHelper(r)}(Math),S.MD5})},function(B,O,D){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},O.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},O.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(B,O,D){"use strict";function S(r){return r&&r.__esModule?r:{default:r}}function A(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var C=function(){function r(t,d){for(var v=0;v<d.length;v++){var y=d[v];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(t,y.key,y)}}return function(t,d,v){return d&&r(t.prototype,d),v&&r(t,v),t}}(),h=D(5),p=S(h),c=D(25),s=S(c),n=D(6),o=S(n),i=D(7),l=S(i),a=function(){function r(t){A(this,r);var d=l.default.os.name,v=l.default.os.version||"",y=l.default.browser.name,b=l.default.browser.version||"",g=window.location.href,m="";g&&(m=l.default.getHost(g));var _="pc";l.default.os.ipad?_="pad":(l.default.os.iphone||l.default.os.android)&&(_="phone"),this._ri=p.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:o.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:r.getUuid(),os:d,ov:v,et:y,ev:b,uat:navigator.userAgent,app_n:m,tt:_,dm:"h5",ut:""}}return C(r,[{key:"log",value:function(t,d){d&&d.ri?(this._ri=d.ri,delete d.ri):this._ri=p.default.create(),d&&d.ut&&(this.initParam.ut=d.ut,delete d.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=t=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=t;var v=[];if(d)for(var y in d)v.push(y+"="+d[y]);var b=v.join("&");this.initParam.args=encodeURIComponent(b==""?"0":b);var g=[];for(var y in this.initParam)g.push(y+"="+this.initParam[y]);var m=g.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(m):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+m}}],[{key:"getUuid",value:function(){var t=s.default.get("p_h5_upload_u");return t||(t=p.default.create(),s.default.set("p_h5_upload_u",t,730)),t}},{key:"getClientId",value:function(){return s.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(t){return t||(t=p.default.create()),s.default.set("p_h5_upload_clientId",t,730),t}}]),r}();O.default=a},function(B,O,D){"use strict";function S(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var A=function(){function h(p,c){for(var s=0;s<c.length;s++){var n=c[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}return function(p,c,s){return c&&h(p.prototype,c),s&&h(p,s),p}}(),C=function(){function h(){S(this,h)}return A(h,null,[{key:"create",value:function(p,c){var s,n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=[];if(c=c||n.length,p)for(s=0;s<p;s++)o[s]=n[0|Math.random()*c];else{var i;for(o[8]=o[13]=o[18]=o[23]="-",o[14]="4",s=0;s<36;s++)o[s]||(i=0|16*Math.random(),o[s]=n[s==19?3&i|8:i])}return o.join("")}}]),h}();O.default=C},function(B,O,D){"use strict";Object.defineProperty(O,"__esModule",{value:!0});var S={version:"1.5.0"};O.default=S},function(B,O,D){"use strict";function S(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var A=function(){function n(o,i){for(var l=0;l<i.length;l++){var a=i[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,a.key,a)}}return function(o,i,l){return i&&n(o.prototype,i),l&&n(o,l),o}}(),C=function(n){var o=navigator.userAgent,i="other";if(n.ios)return"iOS";if(n.android)return"android";if(o.indexOf("Baiduspider")>-1)return"Baiduspider";if(o.indexOf("PlayStation")>-1)return"PS4";var l=navigator.platform=="Win32"||navigator.platform=="Windows"||o.indexOf("Windows")>-1,a=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";return a&&(i="macOS"),navigator.platform=="X11"&&!l&&!a&&(i="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(i="Linux"),l?"windows":i},h=function(){var n=navigator.userAgent,o="";return(n.indexOf("Windows NT 5.0")>-1||n.indexOf("Windows 2000")>-1)&&(o="2000"),(n.indexOf("Windows NT 5.1")>-1||n.indexOf("Windows XP")>-1)&&(o="XP"),(n.indexOf("Windows NT 5.2")>-1||n.indexOf("Windows 2003")>-1)&&(o="2003"),(n.indexOf("Windows NT 6.0")>-1||n.indexOf("Windows Vista")>-1)&&(o="Vista"),(n.indexOf("Windows NT 6.1")>-1||n.indexOf("Windows 7")>-1)&&(o="7"),(n.indexOf("Windows NT 6.2")>-1||n.indexOf("Windows 8")>-1)&&(o="8"),(n.indexOf("Windows NT 6.3")>-1||n.indexOf("Windows 8.1")>-1)&&(o="8.1"),(n.indexOf("Windows NT 10")>-1||n.indexOf("Windows 10")>-1)&&(o="10"),o},p=function(n){var o=navigator.userAgent.toLowerCase();return n.chrome?"Chrome":n.firefox?"Firefox":n.safari?"Safari":n.webview?"webview":n.ie?/edge/.test(o)?"Edge":"IE":/baiduspider/.test(o)?"Baiduspider":/ucweb/.test(o)||/UCBrowser/.test(o)?"UC":/opera/.test(o)?"Opera":/ucweb/.test(o)?"UC":/360se/.test(o)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(o)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(o)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(o)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(o)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(o)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(o)?"PS4\u6D4F\u89C8\u5668":void 0},c=function(){var n={},o={},i=navigator.userAgent,l=navigator.platform,a=i.match(/Web[kK]it[\/]{0,1}([\d.]+)/),r=i.match(/(Android);?[\s\/]+([\d.]+)?/),t=!!i.match(/\(Macintosh\; Intel /),d=i.match(/(iPad).*OS\s([\d_]+)/),v=i.match(/(iPod)(.*OS\s([\d_]+))?/),y=!d&&i.match(/(iPhone\sOS)\s([\d_]+)/),b=i.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),g=/Win\d{2}|Windows/.test(l),m=i.match(/Windows Phone ([\d.]+)/),_=b&&i.match(/TouchPad/),x=i.match(/Kindle\/([\d.]+)/),f=i.match(/Silk\/([\d._]+)/),E=i.match(/(BlackBerry).*Version\/([\d.]+)/),w=i.match(/(BB10).*Version\/([\d.]+)/),T=i.match(/(RIM\sTablet\sOS)\s([\d.]+)/),R=i.match(/PlayBook/),N=i.match(/Chrome\/([\d.]+)/)||i.match(/CriOS\/([\d.]+)/),j=i.match(/Firefox\/([\d.]+)/),W=i.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),J=i.match(/MSIE\s([\d.]+)/)||i.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),F=!N&&i.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),k=F||i.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((o.webkit=!!a)&&(o.version=a[1]),r&&(n.android=!0,n.version=r[2]),y&&!v&&(n.ios=n.iphone=!0,n.version=y[2].replace(/_/g,".")),d&&(n.ios=n.ipad=!0,n.version=d[2].replace(/_/g,".")),v&&(n.ios=n.ipod=!0,n.version=v[3]?v[3].replace(/_/g,"."):null),m&&(n.wp=!0,n.version=m[1]),b&&(n.webos=!0,n.version=b[2]),_&&(n.touchpad=!0),E&&(n.blackberry=!0,n.version=E[2]),w&&(n.bb10=!0,n.version=w[2]),T&&(n.rimtabletos=!0,n.version=T[2]),R&&(o.playbook=!0),x&&(n.kindle=!0,n.version=x[1]),f&&(o.silk=!0,o.version=f[1]),!f&&n.android&&i.match(/Kindle Fire/)&&(o.silk=!0),N&&(o.chrome=!0,o.version=N[1]),j&&(o.firefox=!0,o.version=j[1]),W&&(n.firefoxos=!0,n.version=W[1]),J&&(o.ie=!0,o.version=J[1]),k&&(t||n.ios||g||r)&&(o.safari=!0,n.ios||(o.version=k[1])),F&&(o.webview=!0),t){var K=i.match(/[\d]*_[\d]*_[\d]*/);K&&K.length>0&&K[0]&&(n.version=K[0].replace(/_/g,"."))}return n.tablet=!!(d||R||r&&!i.match(/Mobile/)||j&&i.match(/Tablet/)||J&&!i.match(/Phone/)&&i.match(/Touch/)),n.phone=!(n.tablet||n.ipod||!(r||y||b||E||w||N&&i.match(/Android/)||N&&i.match(/CriOS\/([\d.]+)/)||j&&i.match(/Mobile/)||J&&i.match(/Touch/))),n.pc=!n.tablet&&!n.phone,t?n.name="macOS":g?(n.name="windows",n.version=h()):n.name=C(n),o.name=p(o),{os:n,browser:o}}(),s=function(){function n(){S(this,n)}return A(n,null,[{key:"getHost",value:function(o){var i="";if(o===void 0||o==null||o=="")return"";var l=o.indexOf("//"),a=o;l>-1&&(a=o.substring(l+2));var i=a,r=a.split("/");return r&&r.length>0&&(i=r[0]),r=i.split(":"),r&&r.length>0&&(i=r[0]),i}},{key:"os",get:function(){return c.os}},{key:"browser",get:function(){var o=c.browser;return o.name||(o.name=p()),o}}]),n}();O.default=s},function(B,O,D){"use strict";function S(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var A=function(){function h(p,c){for(var s=0;s<c.length;s++){var n=c[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}return function(p,c,s){return c&&h(p.prototype,c),s&&h(p,s),p}}(),C=function(){function h(){S(this,h)}return A(h,null,[{key:"get",value:function(p,c,s,n,o){var i;s=s||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(l){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(l){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(l){}throw new Error("This browser does not support XMLHttpRequest.")}),i=new XMLHttpRequest,i.onreadystatechange=function(){i.readyState===4&&(i.status===200?c(i.responseText):s(i.responseText))};try{n===void 0&&(n=!0),i.open("GET",p,n),o&&(i.withCredentials=!0)}catch(l){return void s(l)}try{i.send()}catch(l){s(l)}}}]),h}();O.default=C},function(B,O,D){"use strict";function S(c,s){if(!(c instanceof s))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var A=function(){function c(s,n){for(var o=0;o<n.length;o++){var i=n[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(s,i.key,i)}}return function(s,n,o){return n&&c(s.prototype,n),o&&c(s,o),s}}(),C=D(27),h=D(30),p=(D(10),function(){function c(){S(this,c)}return A(c,null,[{key:"randomUUID",value:function(){for(var s=[],n="0123456789abcdef",o=0;o<36;o++)s[o]=n.substr(Math.floor(16*Math.random()),1);return s[14]="4",s[19]=n.substr(3&s[19]|8,1),s[8]=s[13]=s[18]=s[23]="-",s.join("")}},{key:"aliyunEncodeURI",value:function(s){var n=encodeURIComponent(s);return n=n.replace(/\+/g,"%20").replace(/\*/g,"%2A").replace(/%7E/g,"~").replace(/!/g,"%21").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}},{key:"makeUTF8sort",value:function(s,n,o){if(!s)throw new Error("PrismPlayer Error: vid should not be null!");var i=[];for(var l in s)i.push(l);for(var a=i.sort(),r="",t=a.length,l=0;l<t;l++){var d=c.aliyunEncodeURI(a[l]),v=c.aliyunEncodeURI(s[a[l]]);r==""?r=d+n+v:r+=o+d+n+v}return r}},{key:"makeChangeSiga",value:function(s,n){if(!s)throw new Error("PrismPlayer Error: vid should not be null!");return h.stringify(C("GET&"+c.aliyunEncodeURI("/")+"&"+c.aliyunEncodeURI(c.makeUTF8sort(s,"=","&")),n+"&"))}}]),c}());O.default=p},function(B,O,D){!function(S,A){B.exports=O=A(D(0))}(0,function(S){return S.enc.Utf8})},function(B,O,D){!function(S,A){B.exports=O=A(D(0))}(0,function(S){return S.enc.Hex})},function(B,O,D){B.exports=D(13)},function(B,O,D){"use strict";var S,A,C=(typeof Symbol=="function"&&Symbol.iterator,D(14)),h=function(c){return c&&c.__esModule?c:{default:c}}(C),p={Vod:h.default};S=[],(A=function(){return p}.apply(O,S))!==void 0&&(B.exports=A),window.AliyunUpload=p,Ye.exports=AliyunUpload},function(B,O,D){"use strict";function S(w){return w&&w.__esModule?w:{default:w}}function A(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var C=function(){function w(T,R){for(var N=0;N<R.length;N++){var j=R[N];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(T,j.key,j)}}return function(T,R,N){return R&&w(T.prototype,R),N&&w(T,N),T}}(),h=D(15),p=D(3),c=D(16),s=S(c),n=D(18),o=S(n),i=D(24),l=S(i),a=D(4),r=S(a),t=D(1),d=S(t),v=D(5),y=S(v),b=D(26),g=S(b),m=D(31),_=S(m),x=D(32),f=S(x),E=(D(2),function(){function w(T){A(this,w),this.options=T,this.options.partSize=this.options.partSize||p.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||p.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,this.options.enableUploadProgress===void 0&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=h.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new r.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=h.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return C(w,[{key:"init",value:function(T,R,N,j){return this._retryCount=0,!(N&&!j||!N&&j)&&!(T&&!R||!T&&R)&&(this._ossCreditor.accessKeyId=T,this._ossCreditor.accessKeySecret=R,this._ossCreditor.securityToken=N,this._ossCreditor.expireTime=j,!0)}},{key:"addFile",value:function(T,R,N,j,W,J){if(!T)return!1;if(T.size==0)try{this.options.onUploadFailed({file:T},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch(Y){console.log(Y)}for(var F=(this.options,0);F<this._uploadList.length;F++)if(this._uploadList[F].file==T)return!1;var k=new Object;if(k.file=T,k._endpoint=R,k._bucket=N,k._object=j,k.state=h.UPLOADSTATE.INIT,k.isImage=d.default.isImage(T.name),!k.isImage&&this.options.enableUploadProgress){var K=this;f.default.getMd5(T,function(Y){k.fileHash=Y;var H=K._getCheckoutpoint(k);K.options.localCheckpoint||H||K._getCheckoutpointFromCloud(k,function(Q){if(Q.UploadPoint){var re=JSON.parse(Q.UploadPoint);re.loaded!=1&&(k.checkpoint=re.checkpoint,k.loaded=re.loaded,k.videoId=Q.VideoId,K._saveCheckoutpoint(k,re.checkpoint))}},function(Q){try{if((Q=JSON.parse(Q))&&Q.Code=="InvalidParameter"&&Q.Message.indexOf("UserId")>0){K._invalidUserId=!0;var re=Q.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(re)}}catch(oe){console.log(oe)}})})}W&&(k.videoInfo=W?JSON.parse(W).Vod:{},k.userData=o.default.encode(W)),k.ri=y.default.create(),this._uploadList.push(k),this._reportLog("20001",k,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(k)}catch(Y){console.log(Y)}return!0}},{key:"deleteFile",value:function(T){return!!this.cancelFile(T)&&(this._uploadList.splice(T,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(T){if(this.options,T<0||T>=this._uploadList.length)return!1;var R=this._uploadList[T];if(T==this._curIndex&&R.state==h.UPLOADSTATE.UPLOADING){R.state=h.UPLOADSTATE.CANCELED;var N=this._getCheckoutpoint(R);N&&N.checkpoint&&(N=N.checkpoint),N&&this._ossUpload.abort(R),this._removeCheckoutpoint(R),this.nextUpload()}else R.state!=h.UPLOADSTATE.SUCCESS&&(R.state=h.UPLOADSTATE.CANCELED);return this._reportLog("20008",R),!0}},{key:"resumeFile",value:function(T){if(this.options,T<0||T>=this._uploadList.length)return!1;var R=this._uploadList[T];return R.state==h.UPLOADSTATE.CANCELED&&(R.state=h.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(T){return this._getCheckoutpoint({file:T})}},{key:"startUpload",value:function(T){if(this._retryCount=0,this.options,this._state==h.VODSTATE.START||this._state==h.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=h.VODSTATE.END);var R=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(R),this._state=h.VODSTATE.START}},{key:"nextUpload",value:function(){var T=this.options;if(this._state==h.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var R=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(R)}else{this._state=h.VODSTATE.END;try{T.onUploadEnd&&T.onUploadEnd(R)}catch(N){console.log(N)}}}},{key:"clear",value:function(T){for(var R=this.options,N=0,j=0;j<this._uploadList.length;j++)R.uploadList[j].state==h.UPLOADSTATE.SUCCESS&&N++,this._uploadList[j].state==T&&(R.uploadList.splice(j,1),j--);R.onClear&&R.onClear(R.uploadList.length,N)}},{key:"stopUpload",value:function(){if((this._state==h.VODSTATE.START||this._state==h.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var T=this._uploadList[this._curIndex];this._state=h.VODSTATE.STOP,T.state=h.UPLOADSTATE.STOPED,this._changeState(T,h.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(T){var R=this;if(!T)return!1;var N=JSON.parse(o.default.decode(T));return!!(N.AccessKeyId&&N.AccessKeySecret&&N.SecurityToken&&N.Expiration)&&R.resumeUploadWithToken(N.AccessKeyId,N.AccessKeySecret,N.SecurityToken,N.Expiration)}},{key:"resumeUploadWithToken",value:function(T,R,N,j){if(this.options,!(T&&R&&N&&j))return!1;if(this._state!=h.VODSTATE.EXPIRE)return!1;if(this._curIndex==-1)return!1;var W="";return this._uploadList.length>this._curIndex&&(W=this._uploadList[this._curIndex]),W&&(this.init(T,R,N,j),this._state=h.VODSTATE.START,this._ossUpload=null,this._uploadCore(W,W.retry),W.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(T,R,N){if(this._curIndex==-1)return!1;if(this._state!=h.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var j=this._uploadList[this._curIndex];j.object?this._refreshSTSTokenUpload(j,T,R,N):this.setSTSToken(j,T,R,N)}}},{key:"setSTSTokenDirectlyUpload",value:function(T,R,N,j,W){if(!(R&&N&&j&&W))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var J=T;this.init(R,N,j,W),J.endpoint=J._endpoint,J.bucket=J._bucket,J.object=J._object,this._ossUpload=null,this._uploadCore(J,T.retry),T.retry=!1}},{key:"setSTSToken",value:function(T,R,N,j){if(!R||!N||!j)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var W=T.videoInfo,J={accessKeyId:R,securityToken:j,accessKeySecret:N,fileName:T.file.name,title:W.Title,requestId:T.ri,region:this.options.region};W.ImageType&&(J.imageType=W.ImageType),W.ImageExt&&(J.imageExt=W.ImageExt),W.FileSize&&(J.fileSize=W.FileSize),W.Description&&(J.description=W.Description),W.CateId&&(J.cateId=W.CateId),W.Tags&&(J.tags=W.Tags),W.TemplateGroupId&&(J.templateGroupId=W.TemplateGroupId),W.StorageLocation&&(J.storageLocation=W.StorageLocation),W.CoverURL&&(J.coverUrl=W.CoverURL),W.TransCodeMode&&(J.transCodeMode=W.TransCodeMode),W.UserData&&(J.userData=W.UserData);var F=this,k="getUploadAuth";T.videoId?(J.videoId=T.videoId,k="refreshUploadAuth"):T.isImage&&(k="getImageUploadAuth"),g.default[k](J,function(K){T.videoId=K.VideoId?K.VideoId:T.videoId,F.setUploadAuthAndAddress(T,K.UploadAuth,K.UploadAddress),F._state=h.VODSTATE.START},function(K){F._error(T,{name:K.Code,code:K.Code,message:K.Message,requestId:K.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(T,R,N,j){if(!T||!R||!N)return!1;var W=JSON.parse(o.default.decode(R));if(!(W.AccessKeyId&&W.AccessKeySecret&&W.SecurityToken&&W.Expiration))return console.error("uploadauth is invalid"),!1;var J={},F=T;if(N){if(J=JSON.parse(o.default.decode(N)),!J.Endpoint||!J.Bucket||!J.FileName)return console.error("uploadAddress is invalid"),!1}else J.Endpoint=F.endpoint,J.Bucket=F.bucket,J.FileName=F.object;this._ut="vod",this._uploadWay="vod",this.options.region=W.Region||this.options.region,this.init(W.AccessKeyId,W.AccessKeySecret,W.SecurityToken,W.Expiration),F.endpoint=F._endpoint?F._endpoint:J.Endpoint,F.bucket=F._bucket?F._bucket:J.Bucket,F.object=F._object?F._object:J.FileName,F.region=this.options.region,j&&(F.videoId=j),this._ossUpload=null,this._uploadCore(F,T.retry),T.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(T,R,N,j){if(!R||!N||!j)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var W={accessKeyId:R,securityToken:j,accessKeySecret:N,videoId:T.object,requestId:T.ri,region:this.options.region},J=this,F="refreshUploadAuth";T.isImage&&(F="getImageUploadAuth"),g.default[F](W,function(k){J.setUploadAuthAndAddress(T,k.UploadAuth,UploadAddress),J._state=h.VODSTATE.START},function(k){J._error(T,{name:k.Code,code:k.Code,message:k.Message,requestId:k.RequestId})})}},{key:"_upload",value:function(T){var R=arguments.length>1&&arguments[1]!==void 0&&arguments[1],N=this.options;if(T.retry=R,N.onUploadstarted&&!R)try{var j=this._getCheckoutpoint(T);j&&j.state!=h.UPLOADSTATE.UPLOADING&&(T.checkpoint=j,T.videoId=j.videoId),N.onUploadstarted(T)}catch(W){console.log(W)}}},{key:"_uploadCore",value:function(T){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1],!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId\u3001AccessKeySecret\u3001securityToken should not be null");if(T.state=h.UPLOADSTATE.UPLOADING,!this._ossUpload){T.endpoint=T.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var R=this;this._ossUpload=new s.default({bucket:T.bucket,endpoint:T.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(K,Y){R._error.call(R,K,Y)},oncomplete:function(K,Y){R._complete.call(R,K,Y)},onprogress:function(K,Y,H){R._progress.call(R,K,Y,H)}})}var N=d.default.getFileType(T.file.name),j=this._getCheckoutpoint(T),W="",J="";j&&j.checkpoint&&(J=j.state,W=j.videoId,j=j.checkpoint),j&&W==T.videoId&&J!=h.UPLOADSTATE.UPLOADING&&(j.file=T.file,T.checkpoint=j,j.uploadId);var F=this._adjustPartSize(T);this._reportLog("20002",T,{ft:N,fs:T.file.size,bu:T.bucket,ok:T.object,vid:T.videoId||"",fn:T.file.name,fw:null,fh:null,ps:F});var k={headers:{"x-oss-notification":T.userData?T.userData:""},partSize:F,parallel:this.options.parallel};this._ossUpload.upload(T,k)}},{key:"_findUploadIndex",value:function(){for(var T=-1,R=0;R<this._uploadList.length;R++)if(this._uploadList[R].state==h.UPLOADSTATE.INIT){T=R;break}return T}},{key:"_error",value:function(T,R){if(R.name=="cancel")try{this.options.onUploadCanceled(T,R)}catch(j){console.log(j)}else{if(R.message.indexOf("InvalidAccessKeyIdError")>0||R.name=="SignatureDoesNotMatchError"||R.code=="SecurityTokenExpired"||R.code=="InvalidSecurityToken.Expired"||R.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=h.VODSTATE.EXPIRE,T.state=h.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(T,R)}catch(j){console.log(j)}}return}if((R.name=="RequestTimeoutError"||R.name=="ConnectionTimeout"||R.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var N=this;return setTimeout(function(){N._uploadCore(T,!0)},1e3*N._retryDuration),void this._retryCount++}R.name=="NoSuchUploadError"&&this._removeCheckoutpoint(T),this._handleError(T,R)}}},{key:"_handleError",value:function(T,R){var N=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],j=h.UPLOADSTATE.FAIlURE;if(T.state!=h.UPLOADSTATE.CANCELED&&(T.state=h.UPLOADSTATE.FAIlURE,this._state=h.VODSTATE.FAILURE,this.options.onUploadFailed&&R&&R.code&&R.message))try{this.options.onUploadFailed(T,R.code,R.message)}catch(J){console.log(J)}if(N&&this._changeState(T,j),this._reportLog("20006",T,{code:R.name,message:R.message,requestId:R.requestId,fs:T.file.size,bu:T.bucket,ok:T.object,fn:T.file.name}),this._reportLog("20004",T,{requestId:R.requestId,fs:T.file.size,bu:T.bucket,ok:T.object,fn:T.file.name}),T.ri=y.default.create(),this._findUploadIndex()!=-1){var W=this;this._state=h.VODSTATE.START,setTimeout(function(){W.nextUpload()},100)}}},{key:"_complete",value:function(T,R){if(T.state=h.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(T)}catch(W){console.log(W)}var N=0;R&&R.res&&R.res.headers&&(N=R.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(T);var j=this;setTimeout(function(){j.nextUpload()},100),this._retryCount=0,this._reportLog("20003",T,{requestId:N})}},{key:"_progress",value:function(T,R,N){if(this.options.onUploadProgress)try{T.loaded=R.loaded,this.options.onUploadProgress(T,R.total,R.loaded)}catch(Y){console.log(Y)}var j=R.checkpoint,W=0;j&&(T.checkpoint=j,this._saveCheckoutpoint(T,j,h.UPLOADSTATE.UPLOADING),W=j.uploadId),this._retryCount=0;var J=this._getPortNumber(j),F=0;if(N&&N.headers&&(F=N.headers["x-oss-request-id"]),R.loaded!=0&&this._reportLog("20007",T,{pn:J,requestId:F}),R.loaded!=1&&this._reportLog("20005",T,{UploadId:W,pn:J+1,pr:T.retry?1:0,fs:T.file.size,bu:T.bucket,ok:T.object,fn:T.file.name}),!this._invalidUserId&&!T.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var k={file:T.file,checkpoint:R,userId:this.options.userId,videoId:T.videoId,region:this.options.region,fileHash:T.fileHash};try{var K=this;_.default.upload(k,function(){},function(Y){if((Y=JSON.parse(Y))&&Y.Code=="InvalidParameter"&&Y.Message.indexOf("UserId")>0){K._invalidUserId=!0;var H=Y.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(H)}})}catch(Y){console.log(Y)}}}},{key:"_getPortNumber",value:function(T){if(T){var R=T.doneParts;if(R&&R.length>0)return R[R.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(T){var R=this._getCheckoutpointKey(T);l.default.remove(R)}},{key:"_getCheckoutpoint",value:function(T){var R=this._getCheckoutpointKey(T),N=l.default.get(R);if(N)try{return JSON.parse(N)}catch(j){}return""}},{key:"_saveCheckoutpoint",value:function(T,R,N){if(R){var j=this._getCheckoutpointKey(T),W=T.file,J={fileName:W.name,lastModified:W.lastModified,size:W.size,object:T.object,videoId:T.videoId,bucket:T.bucket,endpoint:T.endpoint,checkpoint:R,loaded:T.loaded,state:N};l.default.set(j,JSON.stringify(J))}}},{key:"_changeState",value:function(T,R){var N=this._getCheckoutpoint(T);N&&((this._onbeforeunload=!0)&&(R=h.UPLOADSTATE.STOPED),this._saveCheckoutpoint(T,N.checkpoint,R))}},{key:"_getCheckoutpointKey",value:function(T){return"upload_"+T.file.lastModified+"_"+T.file.name+"_"+T.file.size}},{key:"_getCheckoutpointFromCloud",value:function(T,R,N){var j={userId:this.options.userId,uploadInfoList:[{FileName:T.file.name,FileSize:T.file.size,FileCreateTime:T.file.lastModified,FileHash:T.fileHash}],region:this.options.region};_.default.get(j,function(W){R(W)},N)}},{key:"_reportLog",value:function(T,R,N){N||(N={}),N.ri=R.ri,this._ut&&(N.ut=this._ut),this._log.log(T,N)}},{key:"_initEvent",value:function(){var T=this;window&&(window.onbeforeunload=function(R){if(T._onbeforeunload=!0,T._curIndex!=-1&&T._uploadList.length>T._curIndex){var N=T._uploadList[T._curIndex];T._changeState(N,h.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var T=0;T<this._uploadList.length;T++){var R=this._uploadList[T];R.state!=h.UPLOADSTATE.FAIlURE&&R.state!=h.UPLOADSTATE.STOPED||(R.state=h.UPLOADSTATE.INIT)}this._state=h.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(T){return T.file.size/this.options.partSize>1e4?T.file.size/9999:this.options.partSize}}]),w}());O.default=E},function(B,O,D){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},O.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(B,O,D){"use strict";function S(n){return n&&n.__esModule?n:{default:n}}function A(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var C=function(){function n(o,i){for(var l=0;l<i.length;l++){var a=i[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,a.key,a)}}return function(o,i,l){return i&&n(o.prototype,i),l&&n(o,l),o}}(),h=D(3),p=D(17),c=(S(p),D(1)),s=(S(c),function(){function n(o,i){if(A(this,n),o){this._config=o,this.create(this._config),this._uploadInfo=null,this._callback={};var l=function(){};this._callback.onerror=i.onerror||l,this._callback.oncomplete=i.oncomplete||l,this._callback.onprogress=i.onprogress||l}}return C(n,[{key:"create",value:function(o){if(o.endpoint=o.endpoint||this._config.endpoint,o.bucket=o.bucket||this._config.bucket,!(o.AccessKeyId&&o.AccessKeySecret&&o.endpoint&&o.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var i={accessKeyId:o.AccessKeyId,accessKeySecret:o.AccessKeySecret,stsToken:o.SecurityToken,endpoint:o.endpoint||this._config.endpoint,bucket:o.bucket||this._config.bucket,secure:!0,cname:o.cname};o.timeout&&(i.timeout=o.timeout),this.oss=new OSS.Wrapper(i)}},{key:"abort",value:function(o){if(o.checkpoint){var i=o.checkpoint.uploadId;this.oss.abortMultipartUpload(o.object,i)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(o,i){this._uploadInfo=o;var l=this,a=function(t,d,v){return function(y){l._progress(t,d,v),y()}},r={parallel:i.parallel||this._config.parallel||h.UPLOADDEFAULT.PARALLEL,partSize:i.partSize||this._config.partSize||h.UPLOADDEFAULT.PARTSIZE,progress:a};i.headers&&(r.headers=i.headers),o.checkpoint&&(r.checkpoint=o.checkpoint),o.bucket||(this.oss.options.bucket=o.bucket),o.endpoint||(this.oss.options.endpoint=o.endpoint),this.oss.multipartUpload(o.object,o.file,r).then(function(t,d){l._complete(t)}).catch(function(t){l.oss.cancel&&(l.oss&&l.oss.isCancel()?console.log("oss is cancel as error"):l.oss.cancel()),l._error(t)})}},{key:"header",value:function(o,i,l){this.oss.get(o.object).then(function(a){i(a)}).catch(function(a){l(a)})}},{key:"_progress",value:function(o,i,l){this._callback.onprogress(this._uploadInfo,{loaded:o,total:this._uploadInfo.file.size,checkpoint:i},l)}},{key:"_error",value:function(o){this._callback.onerror(this._uploadInfo,o)}},{key:"_complete",value:function(o){this._callback.oncomplete(this._uploadInfo,o)}}]),n}());O.default=s},function(B,O,D){"use strict";function S(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var A=function(){function h(p,c){for(var s=0;s<c.length;s++){var n=c[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}return function(p,c,s){return c&&h(p.prototype,c),s&&h(p,s),p}}(),C=function(){function h(){S(this,h)}return A(h,null,[{key:"format",value:function(p){if(arguments.length<2)return null;for(var c=arguments[1],s=1;s<arguments.length;s++){var n=new RegExp("\\{"+(s-1)+"\\}","gm");c=c.replace(n,arguments[s+1])}return{code:p,message:c}}},{key:"CODE",get:function(){return{SUCCESS:"Successful",EmptyValue:"InvalidParameter.EmptyValue",STSInvalid:"InvalidParameter.TokenInvalid",ReadFileError:"ReadFileError",FILEDUPLICATION:"FileDuplication",UploadALEADRYSTARTED:"UploadAlearyStarted"}}},{key:"MESSAGE",get:function(){return{SUCCESS:"Successful",EmptyValue:"\u53C2\u6570 {0} \u4E0D\u80FD\u4E3A\u7A7A\u3002",STSInvalid:"STS\u53C2\u6570\u975E\u6CD5\uFF0C accessKeyId\u3001accessKeySecret\u3001secretToken\u3001expireTime\u90FD\u4E0D\u80FD\u4E3A\u7A7A\u3002",ReadFileError:"\u8BFB\u53D6\u6587\u4EF6{0}{1}\u5931\u8D25.",FILEDUPLICATION:"\u6587\u4EF6\u91CD\u590D\u6DFB\u52A0 {0}",UploadALEADRYSTARTED:"\u91CD\u590D\u5F00\u59CB."}}}]),h}();O.default=C},function(B,O,D){"use strict";(function(S){function A(p,c){if(!(p instanceof c))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var C=function(){function p(c,s){for(var n=0;n<s.length;n++){var o=s[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(c,o.key,o)}}return function(c,s,n){return s&&p(c.prototype,s),n&&p(c,n),c}}(),h=function(){function p(){A(this,p)}return C(p,null,[{key:"encode",value:function(c){return new S(c).toString("base64")}},{key:"decode",value:function(c){return new S(c,"base64").toString()}}]),p}();O.default=h}).call(O,D(19).Buffer)},function(B,O,D){"use strict";(function(S){function A(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function C(te,P){if(A()<P)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(te=new Uint8Array(P),te.__proto__=h.prototype):(te===null&&(te=new h(P)),te.length=P),te}function h(te,P,U){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(te,P,U);if(typeof te=="number"){if(typeof P=="string")throw new Error("If encoding is specified then the first argument must be a string");return n(this,te)}return p(this,te,P,U)}function p(te,P,U,q){if(typeof P=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&P instanceof ArrayBuffer?l(te,P,U,q):typeof P=="string"?o(te,P,U):a(te,P)}function c(te){if(typeof te!="number")throw new TypeError('"size" argument must be a number');if(te<0)throw new RangeError('"size" argument must not be negative')}function s(te,P,U,q){return c(P),P<=0?C(te,P):U!==void 0?typeof q=="string"?C(te,P).fill(U,q):C(te,P).fill(U):C(te,P)}function n(te,P){if(c(P),te=C(te,P<0?0:0|r(P)),!h.TYPED_ARRAY_SUPPORT)for(var U=0;U<P;++U)te[U]=0;return te}function o(te,P,U){if(typeof U=="string"&&U!==""||(U="utf8"),!h.isEncoding(U))throw new TypeError('"encoding" must be a valid string encoding');var q=0|d(P,U);te=C(te,q);var X=te.write(P,U);return X!==q&&(te=te.slice(0,X)),te}function i(te,P){var U=P.length<0?0:0|r(P.length);te=C(te,U);for(var q=0;q<U;q+=1)te[q]=255&P[q];return te}function l(te,P,U,q){if(P.byteLength,U<0||P.byteLength<U)throw new RangeError("'offset' is out of bounds");if(P.byteLength<U+(q||0))throw new RangeError("'length' is out of bounds");return P=U===void 0&&q===void 0?new Uint8Array(P):q===void 0?new Uint8Array(P,U):new Uint8Array(P,U,q),h.TYPED_ARRAY_SUPPORT?(te=P,te.__proto__=h.prototype):te=i(te,P),te}function a(te,P){if(h.isBuffer(P)){var U=0|r(P.length);return te=C(te,U),te.length===0||P.copy(te,0,0,U),te}if(P){if(typeof ArrayBuffer!="undefined"&&P.buffer instanceof ArrayBuffer||"length"in P)return typeof P.length!="number"||je(P.length)?C(te,0):i(te,P);if(P.type==="Buffer"&&ke(P.data))return i(te,P.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function r(te){if(te>=A())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A().toString(16)+" bytes");return 0|te}function t(te){return+te!=te&&(te=0),h.alloc(+te)}function d(te,P){if(h.isBuffer(te))return te.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(te)||te instanceof ArrayBuffer))return te.byteLength;typeof te!="string"&&(te=""+te);var U=te.length;if(U===0)return 0;for(var q=!1;;)switch(P){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":case void 0:return de(te).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*U;case"hex":return U>>>1;case"base64":return Re(te).length;default:if(q)return de(te).length;P=(""+P).toLowerCase(),q=!0}}function v(te,P,U){var q=!1;if((P===void 0||P<0)&&(P=0),P>this.length)return"";if((U===void 0||U>this.length)&&(U=this.length),U<=0)return"";if(U>>>=0,P>>>=0,U<=P)return"";for(te||(te="utf8");;)switch(te){case"hex":return J(this,P,U);case"utf8":case"utf-8":return R(this,P,U);case"ascii":return j(this,P,U);case"latin1":case"binary":return W(this,P,U);case"base64":return T(this,P,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,P,U);default:if(q)throw new TypeError("Unknown encoding: "+te);te=(te+"").toLowerCase(),q=!0}}function y(te,P,U){var q=te[P];te[P]=te[U],te[U]=q}function b(te,P,U,q,X){if(te.length===0)return-1;if(typeof U=="string"?(q=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),U=+U,isNaN(U)&&(U=X?0:te.length-1),U<0&&(U=te.length+U),U>=te.length){if(X)return-1;U=te.length-1}else if(U<0){if(!X)return-1;U=0}if(typeof P=="string"&&(P=h.from(P,q)),h.isBuffer(P))return P.length===0?-1:g(te,P,U,q,X);if(typeof P=="number")return P&=255,h.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?X?Uint8Array.prototype.indexOf.call(te,P,U):Uint8Array.prototype.lastIndexOf.call(te,P,U):g(te,[P],U,q,X);throw new TypeError("val must be string, number or Buffer")}function g(te,P,U,q,X){function $(ze,Ke){return ge===1?ze[Ke]:ze.readUInt16BE(Ke*ge)}var ge=1,Ae=te.length,at=P.length;if(q!==void 0&&((q=String(q).toLowerCase())==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le")){if(te.length<2||P.length<2)return-1;ge=2,Ae/=2,at/=2,U/=2}var Le;if(X){var Me=-1;for(Le=U;Le<Ae;Le++)if($(te,Le)===$(P,Me===-1?0:Le-Me)){if(Me===-1&&(Me=Le),Le-Me+1===at)return Me*ge}else Me!==-1&&(Le-=Le-Me),Me=-1}else for(U+at>Ae&&(U=Ae-at),Le=U;Le>=0;Le--){for(var Xe=!0,et=0;et<at;et++)if($(te,Le+et)!==$(P,et)){Xe=!1;break}if(Xe)return Le}return-1}function m(te,P,U,q){U=Number(U)||0;var X=te.length-U;q?(q=Number(q))>X&&(q=X):q=X;var $=P.length;if($%2!=0)throw new TypeError("Invalid hex string");q>$/2&&(q=$/2);for(var ge=0;ge<q;++ge){var Ae=parseInt(P.substr(2*ge,2),16);if(isNaN(Ae))return ge;te[U+ge]=Ae}return ge}function _(te,P,U,q){return De(de(P,te.length-U),te,U,q)}function x(te,P,U,q){return De(be(P),te,U,q)}function f(te,P,U,q){return x(te,P,U,q)}function E(te,P,U,q){return De(Re(P),te,U,q)}function w(te,P,U,q){return De(Ue(P,te.length-U),te,U,q)}function T(te,P,U){return P===0&&U===te.length?ve.fromByteArray(te):ve.fromByteArray(te.slice(P,U))}function R(te,P,U){U=Math.min(te.length,U);for(var q=[],X=P;X<U;){var $=te[X],ge=null,Ae=$>239?4:$>223?3:$>191?2:1;if(X+Ae<=U){var at,Le,Me,Xe;switch(Ae){case 1:$<128&&(ge=$);break;case 2:at=te[X+1],(192&at)==128&&(Xe=(31&$)<<6|63&at)>127&&(ge=Xe);break;case 3:at=te[X+1],Le=te[X+2],(192&at)==128&&(192&Le)==128&&(Xe=(15&$)<<12|(63&at)<<6|63&Le)>2047&&(Xe<55296||Xe>57343)&&(ge=Xe);break;case 4:at=te[X+1],Le=te[X+2],Me=te[X+3],(192&at)==128&&(192&Le)==128&&(192&Me)==128&&(Xe=(15&$)<<18|(63&at)<<12|(63&Le)<<6|63&Me)>65535&&Xe<1114112&&(ge=Xe)}}ge===null?(ge=65533,Ae=1):ge>65535&&(ge-=65536,q.push(ge>>>10&1023|55296),ge=56320|1023&ge),q.push(ge),X+=Ae}return N(q)}function N(te){var P=te.length;if(P<=Ne)return String.fromCharCode.apply(String,te);for(var U="",q=0;q<P;)U+=String.fromCharCode.apply(String,te.slice(q,q+=Ne));return U}function j(te,P,U){var q="";U=Math.min(te.length,U);for(var X=P;X<U;++X)q+=String.fromCharCode(127&te[X]);return q}function W(te,P,U){var q="";U=Math.min(te.length,U);for(var X=P;X<U;++X)q+=String.fromCharCode(te[X]);return q}function J(te,P,U){var q=te.length;(!P||P<0)&&(P=0),(!U||U<0||U>q)&&(U=q);for(var X="",$=P;$<U;++$)X+=Ee(te[$]);return X}function F(te,P,U){for(var q=te.slice(P,U),X="",$=0;$<q.length;$+=2)X+=String.fromCharCode(q[$]+256*q[$+1]);return X}function k(te,P,U){if(te%1!=0||te<0)throw new RangeError("offset is not uint");if(te+P>U)throw new RangeError("Trying to access beyond buffer length")}function K(te,P,U,q,X,$){if(!h.isBuffer(te))throw new TypeError('"buffer" argument must be a Buffer instance');if(P>X||P<$)throw new RangeError('"value" argument is out of bounds');if(U+q>te.length)throw new RangeError("Index out of range")}function Y(te,P,U,q){P<0&&(P=65535+P+1);for(var X=0,$=Math.min(te.length-U,2);X<$;++X)te[U+X]=(P&255<<8*(q?X:1-X))>>>8*(q?X:1-X)}function H(te,P,U,q){P<0&&(P=4294967295+P+1);for(var X=0,$=Math.min(te.length-U,4);X<$;++X)te[U+X]=P>>>8*(q?X:3-X)&255}function Q(te,P,U,q,X,$){if(U+q>te.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function re(te,P,U,q,X){return X||Q(te,P,U,4,34028234663852886e22,-34028234663852886e22),ce.write(te,P,U,q,23,4),U+4}function oe(te,P,U,q,X){return X||Q(te,P,U,8,17976931348623157e292,-17976931348623157e292),ce.write(te,P,U,q,52,8),U+8}function me(te){if(te=he(te).replace(Je,""),te.length<2)return"";for(;te.length%4!=0;)te+="=";return te}function he(te){return te.trim?te.trim():te.replace(/^\s+|\s+$/g,"")}function Ee(te){return te<16?"0"+te.toString(16):te.toString(16)}function de(te,P){P=P||1/0;for(var U,q=te.length,X=null,$=[],ge=0;ge<q;++ge){if((U=te.charCodeAt(ge))>55295&&U<57344){if(!X){if(U>56319){(P-=3)>-1&&$.push(239,191,189);continue}if(ge+1===q){(P-=3)>-1&&$.push(239,191,189);continue}X=U;continue}if(U<56320){(P-=3)>-1&&$.push(239,191,189),X=U;continue}U=65536+(X-55296<<10|U-56320)}else X&&(P-=3)>-1&&$.push(239,191,189);if(X=null,U<128){if((P-=1)<0)break;$.push(U)}else if(U<2048){if((P-=2)<0)break;$.push(U>>6|192,63&U|128)}else if(U<65536){if((P-=3)<0)break;$.push(U>>12|224,U>>6&63|128,63&U|128)}else{if(!(U<1114112))throw new Error("Invalid code point");if((P-=4)<0)break;$.push(U>>18|240,U>>12&63|128,U>>6&63|128,63&U|128)}}return $}function be(te){for(var P=[],U=0;U<te.length;++U)P.push(255&te.charCodeAt(U));return P}function Ue(te,P){for(var U,q,X,$=[],ge=0;ge<te.length&&!((P-=2)<0);++ge)U=te.charCodeAt(ge),q=U>>8,X=U%256,$.push(X),$.push(q);return $}function Re(te){return ve.toByteArray(me(te))}function De(te,P,U,q){for(var X=0;X<q&&!(X+U>=P.length||X>=te.length);++X)P[X+U]=te[X];return X}function je(te){return te!==te}/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/var ve=D(21),ce=D(22),ke=D(23);O.Buffer=h,O.SlowBuffer=t,O.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=S.TYPED_ARRAY_SUPPORT!==void 0?S.TYPED_ARRAY_SUPPORT:function(){try{var te=new Uint8Array(1);return te.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},te.foo()===42&&typeof te.subarray=="function"&&te.subarray(1,1).byteLength===0}catch(P){return!1}}(),O.kMaxLength=A(),h.poolSize=8192,h._augment=function(te){return te.__proto__=h.prototype,te},h.from=function(te,P,U){return p(null,te,P,U)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(te,P,U){return s(null,te,P,U)},h.allocUnsafe=function(te){return n(null,te)},h.allocUnsafeSlow=function(te){return n(null,te)},h.isBuffer=function(te){return!(te==null||!te._isBuffer)},h.compare=function(te,P){if(!h.isBuffer(te)||!h.isBuffer(P))throw new TypeError("Arguments must be Buffers");if(te===P)return 0;for(var U=te.length,q=P.length,X=0,$=Math.min(U,q);X<$;++X)if(te[X]!==P[X]){U=te[X],q=P[X];break}return U<q?-1:q<U?1:0},h.isEncoding=function(te){switch(String(te).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(te,P){if(!ke(te))throw new TypeError('"list" argument must be an Array of Buffers');if(te.length===0)return h.alloc(0);var U;if(P===void 0)for(P=0,U=0;U<te.length;++U)P+=te[U].length;var q=h.allocUnsafe(P),X=0;for(U=0;U<te.length;++U){var $=te[U];if(!h.isBuffer($))throw new TypeError('"list" argument must be an Array of Buffers');$.copy(q,X),X+=$.length}return q},h.byteLength=d,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var te=this.length;if(te%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var P=0;P<te;P+=2)y(this,P,P+1);return this},h.prototype.swap32=function(){var te=this.length;if(te%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var P=0;P<te;P+=4)y(this,P,P+3),y(this,P+1,P+2);return this},h.prototype.swap64=function(){var te=this.length;if(te%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var P=0;P<te;P+=8)y(this,P,P+7),y(this,P+1,P+6),y(this,P+2,P+5),y(this,P+3,P+4);return this},h.prototype.toString=function(){var te=0|this.length;return te===0?"":arguments.length===0?R(this,0,te):v.apply(this,arguments)},h.prototype.equals=function(te){if(!h.isBuffer(te))throw new TypeError("Argument must be a Buffer");return this===te||h.compare(this,te)===0},h.prototype.inspect=function(){var te="",P=O.INSPECT_MAX_BYTES;return this.length>0&&(te=this.toString("hex",0,P).match(/.{2}/g).join(" "),this.length>P&&(te+=" ... ")),"<Buffer "+te+">"},h.prototype.compare=function(te,P,U,q,X){if(!h.isBuffer(te))throw new TypeError("Argument must be a Buffer");if(P===void 0&&(P=0),U===void 0&&(U=te?te.length:0),q===void 0&&(q=0),X===void 0&&(X=this.length),P<0||U>te.length||q<0||X>this.length)throw new RangeError("out of range index");if(q>=X&&P>=U)return 0;if(q>=X)return-1;if(P>=U)return 1;if(P>>>=0,U>>>=0,q>>>=0,X>>>=0,this===te)return 0;for(var $=X-q,ge=U-P,Ae=Math.min($,ge),at=this.slice(q,X),Le=te.slice(P,U),Me=0;Me<Ae;++Me)if(at[Me]!==Le[Me]){$=at[Me],ge=Le[Me];break}return $<ge?-1:ge<$?1:0},h.prototype.includes=function(te,P,U){return this.indexOf(te,P,U)!==-1},h.prototype.indexOf=function(te,P,U){return b(this,te,P,U,!0)},h.prototype.lastIndexOf=function(te,P,U){return b(this,te,P,U,!1)},h.prototype.write=function(te,P,U,q){if(P===void 0)q="utf8",U=this.length,P=0;else if(U===void 0&&typeof P=="string")q=P,U=this.length,P=0;else{if(!isFinite(P))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");P|=0,isFinite(U)?(U|=0,q===void 0&&(q="utf8")):(q=U,U=void 0)}var X=this.length-P;if((U===void 0||U>X)&&(U=X),te.length>0&&(U<0||P<0)||P>this.length)throw new RangeError("Attempt to write outside buffer bounds");q||(q="utf8");for(var $=!1;;)switch(q){case"hex":return m(this,te,P,U);case"utf8":case"utf-8":return _(this,te,P,U);case"ascii":return x(this,te,P,U);case"latin1":case"binary":return f(this,te,P,U);case"base64":return E(this,te,P,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,te,P,U);default:if($)throw new TypeError("Unknown encoding: "+q);q=(""+q).toLowerCase(),$=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ne=4096;h.prototype.slice=function(te,P){var U=this.length;te=~~te,P=P===void 0?U:~~P,te<0?(te+=U)<0&&(te=0):te>U&&(te=U),P<0?(P+=U)<0&&(P=0):P>U&&(P=U),P<te&&(P=te);var q;if(h.TYPED_ARRAY_SUPPORT)q=this.subarray(te,P),q.__proto__=h.prototype;else{var X=P-te;q=new h(X,void 0);for(var $=0;$<X;++$)q[$]=this[$+te]}return q},h.prototype.readUIntLE=function(te,P,U){te|=0,P|=0,U||k(te,P,this.length);for(var q=this[te],X=1,$=0;++$<P&&(X*=256);)q+=this[te+$]*X;return q},h.prototype.readUIntBE=function(te,P,U){te|=0,P|=0,U||k(te,P,this.length);for(var q=this[te+--P],X=1;P>0&&(X*=256);)q+=this[te+--P]*X;return q},h.prototype.readUInt8=function(te,P){return P||k(te,1,this.length),this[te]},h.prototype.readUInt16LE=function(te,P){return P||k(te,2,this.length),this[te]|this[te+1]<<8},h.prototype.readUInt16BE=function(te,P){return P||k(te,2,this.length),this[te]<<8|this[te+1]},h.prototype.readUInt32LE=function(te,P){return P||k(te,4,this.length),(this[te]|this[te+1]<<8|this[te+2]<<16)+16777216*this[te+3]},h.prototype.readUInt32BE=function(te,P){return P||k(te,4,this.length),16777216*this[te]+(this[te+1]<<16|this[te+2]<<8|this[te+3])},h.prototype.readIntLE=function(te,P,U){te|=0,P|=0,U||k(te,P,this.length);for(var q=this[te],X=1,$=0;++$<P&&(X*=256);)q+=this[te+$]*X;return X*=128,q>=X&&(q-=Math.pow(2,8*P)),q},h.prototype.readIntBE=function(te,P,U){te|=0,P|=0,U||k(te,P,this.length);for(var q=P,X=1,$=this[te+--q];q>0&&(X*=256);)$+=this[te+--q]*X;return X*=128,$>=X&&($-=Math.pow(2,8*P)),$},h.prototype.readInt8=function(te,P){return P||k(te,1,this.length),128&this[te]?-1*(255-this[te]+1):this[te]},h.prototype.readInt16LE=function(te,P){P||k(te,2,this.length);var U=this[te]|this[te+1]<<8;return 32768&U?4294901760|U:U},h.prototype.readInt16BE=function(te,P){P||k(te,2,this.length);var U=this[te+1]|this[te]<<8;return 32768&U?4294901760|U:U},h.prototype.readInt32LE=function(te,P){return P||k(te,4,this.length),this[te]|this[te+1]<<8|this[te+2]<<16|this[te+3]<<24},h.prototype.readInt32BE=function(te,P){return P||k(te,4,this.length),this[te]<<24|this[te+1]<<16|this[te+2]<<8|this[te+3]},h.prototype.readFloatLE=function(te,P){return P||k(te,4,this.length),ce.read(this,te,!0,23,4)},h.prototype.readFloatBE=function(te,P){return P||k(te,4,this.length),ce.read(this,te,!1,23,4)},h.prototype.readDoubleLE=function(te,P){return P||k(te,8,this.length),ce.read(this,te,!0,52,8)},h.prototype.readDoubleBE=function(te,P){return P||k(te,8,this.length),ce.read(this,te,!1,52,8)},h.prototype.writeUIntLE=function(te,P,U,q){(te=+te,P|=0,U|=0,!q)&&K(this,te,P,U,Math.pow(2,8*U)-1,0);var X=1,$=0;for(this[P]=255&te;++$<U&&(X*=256);)this[P+$]=te/X&255;return P+U},h.prototype.writeUIntBE=function(te,P,U,q){(te=+te,P|=0,U|=0,!q)&&K(this,te,P,U,Math.pow(2,8*U)-1,0);var X=U-1,$=1;for(this[P+X]=255&te;--X>=0&&($*=256);)this[P+X]=te/$&255;return P+U},h.prototype.writeUInt8=function(te,P,U){return te=+te,P|=0,U||K(this,te,P,1,255,0),h.TYPED_ARRAY_SUPPORT||(te=Math.floor(te)),this[P]=255&te,P+1},h.prototype.writeUInt16LE=function(te,P,U){return te=+te,P|=0,U||K(this,te,P,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[P]=255&te,this[P+1]=te>>>8):Y(this,te,P,!0),P+2},h.prototype.writeUInt16BE=function(te,P,U){return te=+te,P|=0,U||K(this,te,P,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[P]=te>>>8,this[P+1]=255&te):Y(this,te,P,!1),P+2},h.prototype.writeUInt32LE=function(te,P,U){return te=+te,P|=0,U||K(this,te,P,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[P+3]=te>>>24,this[P+2]=te>>>16,this[P+1]=te>>>8,this[P]=255&te):H(this,te,P,!0),P+4},h.prototype.writeUInt32BE=function(te,P,U){return te=+te,P|=0,U||K(this,te,P,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[P]=te>>>24,this[P+1]=te>>>16,this[P+2]=te>>>8,this[P+3]=255&te):H(this,te,P,!1),P+4},h.prototype.writeIntLE=function(te,P,U,q){if(te=+te,P|=0,!q){var X=Math.pow(2,8*U-1);K(this,te,P,U,X-1,-X)}var $=0,ge=1,Ae=0;for(this[P]=255&te;++$<U&&(ge*=256);)te<0&&Ae===0&&this[P+$-1]!==0&&(Ae=1),this[P+$]=(te/ge>>0)-Ae&255;return P+U},h.prototype.writeIntBE=function(te,P,U,q){if(te=+te,P|=0,!q){var X=Math.pow(2,8*U-1);K(this,te,P,U,X-1,-X)}var $=U-1,ge=1,Ae=0;for(this[P+$]=255&te;--$>=0&&(ge*=256);)te<0&&Ae===0&&this[P+$+1]!==0&&(Ae=1),this[P+$]=(te/ge>>0)-Ae&255;return P+U},h.prototype.writeInt8=function(te,P,U){return te=+te,P|=0,U||K(this,te,P,1,127,-128),h.TYPED_ARRAY_SUPPORT||(te=Math.floor(te)),te<0&&(te=255+te+1),this[P]=255&te,P+1},h.prototype.writeInt16LE=function(te,P,U){return te=+te,P|=0,U||K(this,te,P,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[P]=255&te,this[P+1]=te>>>8):Y(this,te,P,!0),P+2},h.prototype.writeInt16BE=function(te,P,U){return te=+te,P|=0,U||K(this,te,P,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[P]=te>>>8,this[P+1]=255&te):Y(this,te,P,!1),P+2},h.prototype.writeInt32LE=function(te,P,U){return te=+te,P|=0,U||K(this,te,P,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[P]=255&te,this[P+1]=te>>>8,this[P+2]=te>>>16,this[P+3]=te>>>24):H(this,te,P,!0),P+4},h.prototype.writeInt32BE=function(te,P,U){return te=+te,P|=0,U||K(this,te,P,4,2147483647,-2147483648),te<0&&(te=4294967295+te+1),h.TYPED_ARRAY_SUPPORT?(this[P]=te>>>24,this[P+1]=te>>>16,this[P+2]=te>>>8,this[P+3]=255&te):H(this,te,P,!1),P+4},h.prototype.writeFloatLE=function(te,P,U){return re(this,te,P,!0,U)},h.prototype.writeFloatBE=function(te,P,U){return re(this,te,P,!1,U)},h.prototype.writeDoubleLE=function(te,P,U){return oe(this,te,P,!0,U)},h.prototype.writeDoubleBE=function(te,P,U){return oe(this,te,P,!1,U)},h.prototype.copy=function(te,P,U,q){if(U||(U=0),q||q===0||(q=this.length),P>=te.length&&(P=te.length),P||(P=0),q>0&&q<U&&(q=U),q===U)return 0;if(te.length===0||this.length===0)return 0;if(P<0)throw new RangeError("targetStart out of bounds");if(U<0||U>=this.length)throw new RangeError("sourceStart out of bounds");if(q<0)throw new RangeError("sourceEnd out of bounds");q>this.length&&(q=this.length),te.length-P<q-U&&(q=te.length-P+U);var X,$=q-U;if(this===te&&U<P&&P<q)for(X=$-1;X>=0;--X)te[X+P]=this[X+U];else if($<1e3||!h.TYPED_ARRAY_SUPPORT)for(X=0;X<$;++X)te[X+P]=this[X+U];else Uint8Array.prototype.set.call(te,this.subarray(U,U+$),P);return $},h.prototype.fill=function(te,P,U,q){if(typeof te=="string"){if(typeof P=="string"?(q=P,P=0,U=this.length):typeof U=="string"&&(q=U,U=this.length),te.length===1){var X=te.charCodeAt(0);X<256&&(te=X)}if(q!==void 0&&typeof q!="string")throw new TypeError("encoding must be a string");if(typeof q=="string"&&!h.isEncoding(q))throw new TypeError("Unknown encoding: "+q)}else typeof te=="number"&&(te&=255);if(P<0||this.length<P||this.length<U)throw new RangeError("Out of range index");if(U<=P)return this;P>>>=0,U=U===void 0?this.length:U>>>0,te||(te=0);var $;if(typeof te=="number")for($=P;$<U;++$)this[$]=te;else{var ge=h.isBuffer(te)?te:de(new h(te,q).toString()),Ae=ge.length;for($=0;$<U-P;++$)this[$+P]=ge[$%Ae]}return this};var Je=/[^+\/0-9A-Za-z-_]/g}).call(O,D(20))},function(B,O){var D;D=function(){return this}();try{D=D||Function("return this")()||(0,eval)("this")}catch(S){typeof window=="object"&&(D=window)}B.exports=D},function(B,O,D){"use strict";function S(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return r[t-2]==="="?2:r[t-1]==="="?1:0}function A(r){return 3*r.length/4-S(r)}function C(r){var t,d,v,y,b,g=r.length;y=S(r),b=new o(3*g/4-y),d=y>0?g-4:g;var m=0;for(t=0;t<d;t+=4)v=n[r.charCodeAt(t)]<<18|n[r.charCodeAt(t+1)]<<12|n[r.charCodeAt(t+2)]<<6|n[r.charCodeAt(t+3)],b[m++]=v>>16&255,b[m++]=v>>8&255,b[m++]=255&v;return y===2?(v=n[r.charCodeAt(t)]<<2|n[r.charCodeAt(t+1)]>>4,b[m++]=255&v):y===1&&(v=n[r.charCodeAt(t)]<<10|n[r.charCodeAt(t+1)]<<4|n[r.charCodeAt(t+2)]>>2,b[m++]=v>>8&255,b[m++]=255&v),b}function h(r){return s[r>>18&63]+s[r>>12&63]+s[r>>6&63]+s[63&r]}function p(r,t,d){for(var v,y=[],b=t;b<d;b+=3)v=(r[b]<<16)+(r[b+1]<<8)+r[b+2],y.push(h(v));return y.join("")}function c(r){for(var t,d=r.length,v=d%3,y="",b=[],g=0,m=d-v;g<m;g+=16383)b.push(p(r,g,g+16383>m?m:g+16383));return v===1?(t=r[d-1],y+=s[t>>2],y+=s[t<<4&63],y+="=="):v===2&&(t=(r[d-2]<<8)+r[d-1],y+=s[t>>10],y+=s[t>>4&63],y+=s[t<<2&63],y+="="),b.push(y),b.join("")}O.byteLength=A,O.toByteArray=C,O.fromByteArray=c;for(var s=[],n=[],o=typeof Uint8Array!="undefined"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,a=i.length;l<a;++l)s[l]=i[l],n[i.charCodeAt(l)]=l;n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(B,O){O.read=function(D,S,A,C,h){var p,c,s=8*h-C-1,n=(1<<s)-1,o=n>>1,i=-7,l=A?h-1:0,a=A?-1:1,r=D[S+l];for(l+=a,p=r&(1<<-i)-1,r>>=-i,i+=s;i>0;p=256*p+D[S+l],l+=a,i-=8);for(c=p&(1<<-i)-1,p>>=-i,i+=C;i>0;c=256*c+D[S+l],l+=a,i-=8);if(p===0)p=1-o;else{if(p===n)return c?NaN:1/0*(r?-1:1);c+=Math.pow(2,C),p-=o}return(r?-1:1)*c*Math.pow(2,p-C)},O.write=function(D,S,A,C,h,p){var c,s,n,o=8*p-h-1,i=(1<<o)-1,l=i>>1,a=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,r=C?0:p-1,t=C?1:-1,d=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(s=isNaN(S)?1:0,c=i):(c=Math.floor(Math.log(S)/Math.LN2),S*(n=Math.pow(2,-c))<1&&(c--,n*=2),S+=c+l>=1?a/n:a*Math.pow(2,1-l),S*n>=2&&(c++,n/=2),c+l>=i?(s=0,c=i):c+l>=1?(s=(S*n-1)*Math.pow(2,h),c+=l):(s=S*Math.pow(2,l-1)*Math.pow(2,h),c=0));h>=8;D[A+r]=255&s,r+=t,s/=256,h-=8);for(c=c<<h|s,o+=h;o>0;D[A+r]=255&c,r+=t,c/=256,o-=8);D[A+r-t]|=128*d}},function(B,O){var D={}.toString;B.exports=Array.isArray||function(S){return D.call(S)=="[object Array]"}},function(B,O,D){"use strict";function S(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var A=function(){function h(p,c){for(var s=0;s<c.length;s++){var n=c[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}return function(p,c,s){return c&&h(p.prototype,c),s&&h(p,s),p}}(),C=function(){function h(){S(this,h)}return A(h,null,[{key:"set",value:function(p,c){try{window.localStorage&&localStorage.setItem(p,c)}catch(s){window[p+"_localStorage"]=c}}},{key:"get",value:function(p){try{if(window.localStorage)return localStorage.getItem(p)}catch(c){return window[p+"_localStorage"]}return""}},{key:"remove",value:function(p){try{window.localStorage&&localStorage.removeItem(p)}catch(c){delete window[p+"_localStorage"]}}}]),h}();O.default=C},function(B,O,D){"use strict";function S(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var A=function(){function h(p,c){for(var s=0;s<c.length;s++){var n=c[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}return function(p,c,s){return c&&h(p.prototype,c),s&&h(p,s),p}}(),C=function(){function h(){S(this,h)}return A(h,null,[{key:"get",value:function(p){for(var c=p+"",s=document.cookie.split(";"),n=0;n<s.length;n++){var o=s[n].trim();if(o.indexOf(c)==0)return unescape(o.substring(c.length+1,o.length))}return""}},{key:"set",value:function(p,c,s){var n=new Date;n.setTime(n.getTime()+24*s*60*60*1e3);var o="expires="+n.toGMTString();document.cookie=p+"="+escape(c)+"; "+o}}]),h}();O.default=C},function(B,O,D){"use strict";function S(o){return o&&o.__esModule?o:{default:o}}function A(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var C=function(){function o(i,l){for(var a=0;a<l.length;a++){var r=l[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(i,r.key,r)}}return function(i,l,a){return l&&o(i.prototype,l),a&&o(i,a),i}}(),h=D(8),p=S(h),c=D(9),s=S(c),n=function(){function o(){A(this,o)}return C(o,null,[{key:"refreshUploadAuth",value:function(i,l,a){var r=(s.default.randomUUID(),s.default.randomUUID()),t={AccessKeyId:i.accessKeyId,SecurityToken:i.securityToken,Action:"RefreshUploadVideo",VideoId:i.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:r,RequestId:i.requestId},d=s.default.makeUTF8sort(t,"=","&")+"&Signature="+s.default.aliyunEncodeURI(s.default.makeChangeSiga(t,i.accessKeySecret)),v="https://vod."+i.region+".aliyuncs.com/?"+d;p.default.get(v,function(y){var y=JSON.parse(y);l&&l(y)},function(y){if(a){var b=JSON.parse(y);a(b)}})}},{key:"getUploadAuth",value:function(i,l,a){var r=(s.default.randomUUID(),s.default.randomUUID()),t={AccessKeyId:i.accessKeyId,SecurityToken:i.securityToken,Action:"CreateUploadVideo",Title:i.title,FileName:i.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:r,RequestId:i.requestId};i.fileSize&&(t.FileSize=i.fileSize),i.description&&(t.Description=i.description),i.cateId&&(t.CateId=i.cateId),i.tags&&(t.Tags=i.tags),i.templateGroupId&&(t.TemplateGroupId=i.templateGroupId),i.storageLocation&&(t.StorageLocation=i.storageLocation),i.coverUrl&&(t.CoverURL=i.coverUrl),i.transCodeMode&&(t.TransCodeMode=i.transCodeMode),i.userData&&(t.UserData=JSON.stringify(i.userData));var d=s.default.makeUTF8sort(t,"=","&")+"&Signature="+s.default.aliyunEncodeURI(s.default.makeChangeSiga(t,i.accessKeySecret)),v="https://vod."+i.region+".aliyuncs.com/?"+d;p.default.get(v,function(y){try{y=JSON.parse(y)}catch(b){if(a)return void a({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}l&&l(y)},function(y){if(a){var b={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{b=JSON.parse(y)}catch(g){}a(b)}})}},{key:"getImageUploadAuth",value:function(i,l,a){var r=(s.default.randomUUID(),s.default.randomUUID()),t={AccessKeyId:i.accessKeyId,SecurityToken:i.securityToken,Action:"CreateUploadImage",ImageType:i.imageType?i.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:r,RequestId:i.requestId};i.title&&(t.Title=i.title),i.imageExt&&(t.ImageExt=i.imageExt),i.tags&&(t.Tags=i.tags),i.storageLocation&&(t.StorageLocation=i.storageLocation);var d=s.default.makeUTF8sort(t,"=","&")+"&Signature="+s.default.aliyunEncodeURI(s.default.makeChangeSiga(t,i.accessKeySecret)),v="https://vod."+i.region+".aliyuncs.com/?"+d;p.default.get(v,function(y){y=JSON.parse(y),l&&l(y)},function(y){if(a){var b=JSON.parse(y);a(b)}})}}]),o}();O.default=n},function(B,O,D){!function(S,A,C){B.exports=O=A(D(0),D(28),D(29))}(0,function(S){return S.HmacSHA1})},function(B,O,D){!function(S,A){B.exports=O=A(D(0))}(0,function(S){return function(){var A=S,C=A.lib,h=C.WordArray,p=C.Hasher,c=A.algo,s=[],n=c.SHA1=p.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(o,i){for(var l=this._hash.words,a=l[0],r=l[1],t=l[2],d=l[3],v=l[4],y=0;y<80;y++){if(y<16)s[y]=0|o[i+y];else{var b=s[y-3]^s[y-8]^s[y-14]^s[y-16];s[y]=b<<1|b>>>31}var g=(a<<5|a>>>27)+v+s[y];g+=y<20?1518500249+(r&t|~r&d):y<40?1859775393+(r^t^d):y<60?(r&t|r&d|t&d)-1894007588:(r^t^d)-899497514,v=d,d=t,t=r<<30|r>>>2,r=a,a=g}l[0]=l[0]+a|0,l[1]=l[1]+r|0,l[2]=l[2]+t|0,l[3]=l[3]+d|0,l[4]=l[4]+v|0},_doFinalize:function(){var o=this._data,i=o.words,l=8*this._nDataBytes,a=8*o.sigBytes;return i[a>>>5]|=128<<24-a%32,i[14+(a+64>>>9<<4)]=Math.floor(l/4294967296),i[15+(a+64>>>9<<4)]=l,o.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var o=p.clone.call(this);return o._hash=this._hash.clone(),o}});A.SHA1=p._createHelper(n),A.HmacSHA1=p._createHmacHelper(n)}(),S.SHA1})},function(B,O,D){!function(S,A){B.exports=O=A(D(0))}(0,function(S){!function(){var A=S,C=A.lib,h=C.Base,p=A.enc,c=p.Utf8,s=A.algo;s.HMAC=h.extend({init:function(n,o){n=this._hasher=new n.init,typeof o=="string"&&(o=c.parse(o));var i=n.blockSize,l=4*i;o.sigBytes>l&&(o=n.finalize(o)),o.clamp();for(var a=this._oKey=o.clone(),r=this._iKey=o.clone(),t=a.words,d=r.words,v=0;v<i;v++)t[v]^=1549556828,d[v]^=909522486;a.sigBytes=r.sigBytes=l,this.reset()},reset:function(){var n=this._hasher;n.reset(),n.update(this._iKey)},update:function(n){return this._hasher.update(n),this},finalize:function(n){var o=this._hasher,i=o.finalize(n);return o.reset(),o.finalize(this._oKey.clone().concat(i))}})}()})},function(B,O,D){!function(S,A){B.exports=O=A(D(0))}(0,function(S){return function(){function A(s,n,o){for(var i=[],l=0,a=0;a<n;a++)if(a%4){var r=o[s.charCodeAt(a-1)]<<a%4*2,t=o[s.charCodeAt(a)]>>>6-a%4*2;i[l>>>2]|=(r|t)<<24-l%4*8,l++}return p.create(i,l)}var C=S,h=C.lib,p=h.WordArray,c=C.enc;c.Base64={stringify:function(s){var n=s.words,o=s.sigBytes,i=this._map;s.clamp();for(var l=[],a=0;a<o;a+=3)for(var r=n[a>>>2]>>>24-a%4*8&255,t=n[a+1>>>2]>>>24-(a+1)%4*8&255,d=n[a+2>>>2]>>>24-(a+2)%4*8&255,v=r<<16|t<<8|d,y=0;y<4&&a+.75*y<o;y++)l.push(i.charAt(v>>>6*(3-y)&63));var b=i.charAt(64);if(b)for(;l.length%4;)l.push(b);return l.join("")},parse:function(s){var n=s.length,o=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var l=0;l<o.length;l++)i[o.charCodeAt(l)]=l}var a=o.charAt(64);if(a){var r=s.indexOf(a);r!==-1&&(n=r)}return A(s,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),S.enc.Base64})},function(B,O,D){"use strict";function S(m){return m&&m.__esModule?m:{default:m}}function A(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var C=function(){function m(_,x){for(var f=0;f<x.length;f++){var E=x[f];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,x,f){return x&&m(_.prototype,x),f&&m(_,f),_}}(),h=D(8),p=S(h),c=D(7),s=S(c),n=D(4),o=S(n),i=D(6),l=S(i),a=D(1),r=S(a),t=D(9),d=S(t),v=D(2),y=D(11),b=D(10),g=function(){function m(){A(this,m)}return C(m,null,[{key:"getAuthInfo",value:function(_,x,f){var E=_+"|f#Ylm&^1TppeRhLg|"+f;return x&&(E=_+"|"+x+"|f#Ylm&^1TppeRhLg|"+f),v(b.parse(E)).toString(y)}},{key:"upload",value:function(_,x,f){var E=r.default.ISODateString(new Date),w=Math.floor(new Date().valueOf()/1e3),T=o.default.getClientId();T=o.default.setClientId(T);var R=m.getAuthInfo(_.userId,T,w),N=d.default.randomUUID(),j={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:s.default.browser.name+(s.default.browser.version||""),AppVersion:l.default.version,AuthTimestamp:w,Timestamp:E,AuthInfo:R,FileName:_.file.name,FileSize:_.file.size,FileCreateTime:_.file.lastModified,FileHash:_.fileHash,UploadId:_.checkpoint.checkpoint.uploadId,PartSize:_.checkpoint.checkpoint.partSize,DonePartsCount:_.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(_.checkpoint),UploadRatio:_.checkpoint.loaded,UserId:_.userId,VideoId:_.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:N};T&&(j.ClientId=T);var W=d.default.makeUTF8sort(j,"=","&")+"&Signature="+d.default.aliyunEncodeURI(d.default.makeChangeSiga(j,_.accessKeySecret)),J="https://vod."+_.region+".aliyuncs.com/?"+W;p.default.get(J,function(F){x&&x()},function(F){F&&(f(F),console.log(F))})}},{key:"get",value:function(_,x,f){var E=r.default.ISODateString(new Date),w=Math.floor(new Date().valueOf()/1e3),T=o.default.getClientId(),R=m.getAuthInfo(_.userId,T,w),N=d.default.randomUUID(),j={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:s.default.browser.name+(s.default.browser.version||""),AppVersion:l.default.version,AuthTimestamp:w,Timestamp:E,AuthInfo:R,UserId:_.userId,UploadInfoList:JSON.stringify(_.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:N};T&&(j.ClientId=T);var W=d.default.makeUTF8sort(j,"=","&")+"&Signature="+d.default.aliyunEncodeURI(d.default.makeChangeSiga(j,_.accessKeySecret)),J="https://vod."+_.region+".aliyuncs.com/?"+W;p.default.get(J,function(F){var k={},K=T;F=F?JSON.parse(F):{},F.UploadProgress&&F.UploadProgress.UploadProgressList&&F.UploadProgress.UploadProgressList.length>0&&(k=F.UploadProgress.UploadProgressList[0],K=k.ClientId),o.default.setClientId(K),x&&x(k)},function(F){F&&(f(F),console.log(F))})}}]),m}();O.default=g},function(B,O,D){"use strict";function S(c,s){if(!(c instanceof s))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0});var A=function(){function c(s,n){for(var o=0;o<n.length;o++){var i=n[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(s,i.key,i)}}return function(s,n,o){return n&&c(s.prototype,n),o&&c(s,o),s}}(),C=D(2),h=D(33),p=(D(11),function(){function c(){S(this,c)}return A(c,null,[{key:"getMd5",value:function(s,n,o){var i=new FileReader;i.onload=function(r){try{if(r&&r.target){var t=C(h.parse(r.target.result)),d=t.toString();n(d)}}catch(v){console.log(v)}},i.onerror=function(r){console.log(r),errorCallback(r)};var l=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,a=l.call(s,0,1024);i.readAsBinaryString(a)}}]),c}());O.default=p},function(B,O,D){!function(S,A){B.exports=O=A(D(0))}(0,function(S){return S.enc.Latin1})}])}).call(this,z("IyRk"))},ps8w:function(Ye,We,z){Ye.exports=z.p+"static/show.6268a056.svg"},psGv:function(Ye,We,z){var ae,ee;(function(){var B;(function(){"use strict";var A=[,,function(c){function s(i){this.__parent=i,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}s.prototype.clone_empty=function(){var i=new s(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},s.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},s.prototype.has_match=function(i){for(var l=this.__items.length-1;l>=0;l--)if(this.__items[l].match(i))return!0;return!1},s.prototype.set_indent=function(i,l){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=l||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(i){this.__items.push(i);var l=i.lastIndexOf(`
|
|
|
`);l!==-1?this.__character_count=i.length-l:this.__character_count+=i.length},s.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function n(i,l){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),l=l||"",i.indent_level>0&&(l=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=l,this.__base_string_length=l.length}n.prototype.get_indent_size=function(i,l){var a=this.__base_string_length;return l=l||0,i<0&&(a=0),a+=i*this.__indent_size,a+=l,a},n.prototype.get_indent_string=function(i,l){var a=this.__base_string;return l=l||0,i<0&&(i=0,a=""),l+=i*this.__indent_size,this.__ensure_cache(l),a+=this.__cache[l],a},n.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var i=this.__cache.length,l=0,a="";this.__indent_size&&i>=this.__indent_size&&(l=Math.floor(i/this.__indent_size),i-=l*this.__indent_size,a=new Array(l+1).join(this.__indent_string)),i&&(a+=new Array(i+1).join(" ")),this.__cache.push(a)};function o(i,l){this.__indent_cache=new n(i,l),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(i,l){return this.__indent_cache.get_indent_string(i,l)},o.prototype.get_indent_size=function(i,l){return this.__indent_cache.get_indent_size(i,l)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(i){this.trim(!0);var l=this.current_line.pop();l&&(l[l.length-1]===`
|
|
|
`&&(l=l.replace(/\n+$/g,"")),this.current_line.push(l)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join(`
|
|
|
`);return i!==`
|
|
|
`&&(a=a.replace(/[\n]/g,i)),a},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(i,l){return i=i||0,l=l||0,this.next_line.set_indent(i,l),this.__lines.length>1?(this.current_line.set_indent(i,l),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(i){for(var l=0;l<i.newlines;l++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(i.whitespace_before),this.current_line.push(i.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},o.prototype.add_token=function(i){this.__add_space_before_token(),this.current_line.push(i),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},o.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},o.prototype.remove_indent=function(i){for(var l=this.__lines.length;i<l;)this.__lines[i]._remove_indent(),i++;this.current_line._remove_wrap_indent()},o.prototype.trim=function(i){for(i=i===void 0?!1:i,this.current_line.trim();i&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(i,l){for(var a=this.__lines.length-2;a>=0;){var r=this.__lines[a];if(r.is_empty())break;if(r.item(0).indexOf(i)!==0&&r.item(-1)!==l){this.__lines.splice(a+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}a--}},c.exports.Output=o},function(c){function s(n,o,i,l){this.type=n,this.text=o,this.comments_before=null,this.newlines=i||0,this.whitespace_before=l||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}c.exports.Token=s},,,function(c){function s(i,l){this.raw_options=n(i,l),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(i,l){var a=this.raw_options[i],r=l||[];return typeof a=="object"?a!==null&&typeof a.concat=="function"&&(r=a.concat()):typeof a=="string"&&(r=a.split(/[^a-zA-Z0-9_\/\-]+/)),r},s.prototype._get_boolean=function(i,l){var a=this.raw_options[i],r=a===void 0?!!l:!!a;return r},s.prototype._get_characters=function(i,l){var a=this.raw_options[i],r=l||"";return typeof a=="string"&&(r=a.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),r},s.prototype._get_number=function(i,l){var a=this.raw_options[i];l=parseInt(l,10),isNaN(l)&&(l=0);var r=parseInt(a,10);return isNaN(r)&&(r=l),r},s.prototype._get_selection=function(i,l,a){var r=this._get_selection_list(i,l,a);if(r.length!==1)throw new Error("Invalid Option Value: The option '"+i+`' can only be one of the following values:
|
|
|
`+l+`
|
|
|
You passed in: '`+this.raw_options[i]+"'");return r[0]},s.prototype._get_selection_list=function(i,l,a){if(!l||l.length===0)throw new Error("Selection list cannot be empty.");if(a=a||[l[0]],!this._is_valid_selection(a,l))throw new Error("Invalid Default Value!");var r=this._get_array(i,a);if(!this._is_valid_selection(r,l))throw new Error("Invalid Option Value: The option '"+i+`' can contain only the following values:
|
|
|
`+l+`
|
|
|
You passed in: '`+this.raw_options[i]+"'");return r},s.prototype._is_valid_selection=function(i,l){return i.length&&l.length&&!i.some(function(a){return l.indexOf(a)===-1})};function n(i,l){var a={};i=o(i);var r;for(r in i)r!==l&&(a[r]=i[r]);if(l&&i[l])for(r in i[l])a[r]=i[l][r];return a}function o(i){var l={},a;for(a in i){var r=a.replace(/-/g,"_");l[r]=i[a]}return l}c.exports.Options=s,c.exports.normalizeOpts=o,c.exports.mergeOpts=n},,function(c){var s=RegExp.prototype.hasOwnProperty("sticky");function n(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__input.charAt(this.__position),this.__position+=1),o},n.prototype.peek=function(o){var i=null;return o=o||0,o+=this.__position,o>=0&&o<this.__input_length&&(i=this.__input.charAt(o)),i},n.prototype.__match=function(o,i){o.lastIndex=i;var l=o.exec(this.__input);return l&&!(s&&o.sticky)&&(l.index!==i&&(l=null)),l},n.prototype.test=function(o,i){return i=i||0,i+=this.__position,i>=0&&i<this.__input_length?!!this.__match(o,i):!1},n.prototype.testChar=function(o,i){var l=this.peek(i);return o.lastIndex=0,l!==null&&o.test(l)},n.prototype.match=function(o){var i=this.__match(o,this.__position);return i?this.__position+=i[0].length:i=null,i},n.prototype.read=function(o,i,l){var a="",r;return o&&(r=this.match(o),r&&(a+=r[0])),i&&(r||!o)&&(a+=this.readUntil(i,l)),a},n.prototype.readUntil=function(o,i){var l="",a=this.__position;o.lastIndex=this.__position;var r=o.exec(this.__input);return r?(a=r.index,i&&(a+=r[0].length)):a=this.__input_length,l=this.__input.substring(this.__position,a),this.__position=a,l},n.prototype.readUntilAfter=function(o){return this.readUntil(o,!0)},n.prototype.get_regexp=function(o,i){var l=null,a="g";return i&&s&&(a="y"),typeof o=="string"&&o!==""?l=new RegExp(o,a):o&&(l=new RegExp(o.source,a)),l},n.prototype.get_literal_regexp=function(o){return RegExp(o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(o){var i=this.__position,l=this.readUntilAfter(o);return this.__position=i,l},n.prototype.lookBack=function(o){var i=this.__position-1;return i>=o.length&&this.__input.substring(i-o.length,i).toLowerCase()===o},c.exports.InputScanner=n},function(c,s,n){var o=n(8).InputScanner,i=n(3).Token,l=n(10).TokenStream,a=n(11).WhitespacePattern,r={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},t=function(d,v){this._input=new o(d),this._options=v||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new a(this._input)};t.prototype.tokenize=function(){this._input.restart(),this.__tokens=new l,this._reset();for(var d,v=new i(r.START,""),y=null,b=[],g=new l;v.type!==r.EOF;){for(d=this._get_next_token(v,y);this._is_comment(d);)g.add(d),d=this._get_next_token(v,y);g.isEmpty()||(d.comments_before=g,g=new l),d.parent=y,this._is_opening(d)?(b.push(y),y=d):y&&this._is_closing(d,y)&&(d.opened=y,y.closed=d,y=b.pop(),d.parent=y),d.previous=v,v.next=d,this.__tokens.add(d),v=d}return this.__tokens},t.prototype._is_first_token=function(){return this.__tokens.isEmpty()},t.prototype._reset=function(){},t.prototype._get_next_token=function(d,v){this._readWhitespace();var y=this._input.read(/.+/g);return y?this._create_token(r.RAW,y):this._create_token(r.EOF,"")},t.prototype._is_comment=function(d){return!1},t.prototype._is_opening=function(d){return!1},t.prototype._is_closing=function(d,v){return!1},t.prototype._create_token=function(d,v){var y=new i(d,v,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return y},t.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},c.exports.Tokenizer=t,c.exports.TOKEN=r},function(c){function s(n){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=n}s.prototype.restart=function(){this.__position=0},s.prototype.isEmpty=function(){return this.__tokens_length===0},s.prototype.hasNext=function(){return this.__position<this.__tokens_length},s.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__tokens[this.__position],this.__position+=1),n},s.prototype.peek=function(n){var o=null;return n=n||0,n+=this.__position,n>=0&&n<this.__tokens_length&&(o=this.__tokens[n]),o},s.prototype.add=function(n){this.__parent_token&&(n.parent=this.__parent_token),this.__tokens.push(n),this.__tokens_length+=1},c.exports.TokenStream=s},function(c,s,n){var o=n(12).Pattern;function i(l,a){o.call(this,l,a),a?this._line_regexp=this._input.get_regexp(a._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}i.prototype=new o,i.prototype.__set_whitespace_patterns=function(l,a){l+="\\t ",a+="\\n\\r",this._match_pattern=this._input.get_regexp("["+l+a+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+a+"]")},i.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var l=this._input.read(this._match_pattern);if(l===" ")this.whitespace_before_token=" ";else if(l){var a=this.__split(this._newline_regexp,l);this.newline_count=a.length-1,this.whitespace_before_token=a[this.newline_count]}return l},i.prototype.matching=function(l,a){var r=this._create();return r.__set_whitespace_patterns(l,a),r._update(),r},i.prototype._create=function(){return new i(this._input,this)},i.prototype.__split=function(l,a){l.lastIndex=0;for(var r=0,t=[],d=l.exec(a);d;)t.push(a.substring(r,d.index)),r=d.index+d[0].length,d=l.exec(a);return r<a.length?t.push(a.substring(r,a.length)):t.push(""),t},c.exports.WhitespacePattern=i},function(c){function s(n,o){this._input=n,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,o&&(this._starting_pattern=this._input.get_regexp(o._starting_pattern,!0),this._match_pattern=this._input.get_regexp(o._match_pattern,!0),this._until_pattern=this._input.get_regexp(o._until_pattern),this._until_after=o._until_after)}s.prototype.read=function(){var n=this._input.read(this._starting_pattern);return(!this._starting_pattern||n)&&(n+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),n},s.prototype.read_match=function(){return this._input.match(this._match_pattern)},s.prototype.until_after=function(n){var o=this._create();return o._until_after=!0,o._until_pattern=this._input.get_regexp(n),o._update(),o},s.prototype.until=function(n){var o=this._create();return o._until_after=!1,o._until_pattern=this._input.get_regexp(n),o._update(),o},s.prototype.starting_with=function(n){var o=this._create();return o._starting_pattern=this._input.get_regexp(n,!0),o._update(),o},s.prototype.matching=function(n){var o=this._create();return o._match_pattern=this._input.get_regexp(n,!0),o._update(),o},s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){},c.exports.Pattern=s},function(c){function s(n,o){n=typeof n=="string"?n:n.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(n+/\sbeautify\signore:end\s/.source+o,"g")}s.prototype.get_directives=function(n){if(!n.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(n);i;)o[i[1]]=i[2],i=this.__directive_pattern.exec(n);return o},s.prototype.readIgnored=function(n){return n.readUntilAfter(this.__directives_end_ignore_pattern)},c.exports.Directives=s},function(c,s,n){var o=n(12).Pattern,i={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function l(a,r){o.call(this,a,r),this.__template_pattern=null,this._disabled=Object.assign({},i),this._excluded=Object.assign({},i),r&&(this.__template_pattern=this._input.get_regexp(r.__template_pattern),this._excluded=Object.assign(this._excluded,r._excluded),this._disabled=Object.assign(this._disabled,r._disabled));var t=new o(a);this.__patterns={handlebars_comment:t.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:t.starting_with(/{{{/).until_after(/}}}/),handlebars:t.starting_with(/{{/).until_after(/}}/),php:t.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:t.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:t.starting_with(/{%/).until_after(/%}/),django_value:t.starting_with(/{{/).until_after(/}}/),django_comment:t.starting_with(/{#/).until_after(/#}/),smarty:t.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:t.starting_with(/{\*/).until_after(/\*}/),smarty_literal:t.starting_with(/{literal}/).until_after(/{\/literal}/)}}l.prototype=new o,l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){this.__set_templated_pattern()},l.prototype.disable=function(a){var r=this._create();return r._disabled[a]=!0,r._update(),r},l.prototype.read_options=function(a){var r=this._create();for(var t in i)r._disabled[t]=a.templating.indexOf(t)===-1;return r._update(),r},l.prototype.exclude=function(a){var r=this._create();return r._excluded[a]=!0,r._update(),r},l.prototype.read=function(){var a="";this._match_pattern?a=this._input.read(this._starting_pattern):a=this._input.read(this._starting_pattern,this.__template_pattern);for(var r=this._read_template();r;)this._match_pattern?r+=this._input.read(this._match_pattern):r+=this._input.readUntil(this.__template_pattern),a+=r,r=this._read_template();return this._until_after&&(a+=this._input.readUntilAfter(this._until_pattern)),a},l.prototype.__set_templated_pattern=function(){var a=[];this._disabled.php||a.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||a.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||a.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(a.push(this.__patterns.django._starting_pattern.source),a.push(this.__patterns.django_value._starting_pattern.source),a.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||a.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&a.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+a.join("|")+")")},l.prototype._read_template=function(){var a="",r=this._input.peek();if(r==="<"){var t=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&t==="?"&&(a=a||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&t==="%"&&(a=a||this.__patterns.erb.read())}else r==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(a=a||this.__patterns.handlebars_comment.read(),a=a||this.__patterns.handlebars_unescaped.read(),a=a||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(a=a||this.__patterns.django_value.read()),this._excluded.django||(a=a||this.__patterns.django_comment.read(),a=a||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(a=a||this.__patterns.smarty_comment.read(),a=a||this.__patterns.smarty_literal.read(),a=a||this.__patterns.smarty.read()));return a},c.exports.TemplatablePattern=l},,,,function(c,s,n){var o=n(19).Beautifier,i=n(20).Options;function l(a,r,t,d){var v=new o(a,r,t,d);return v.beautify()}c.exports=l,c.exports.defaultOptions=function(){return new i}},function(c,s,n){var o=n(20).Options,i=n(2).Output,l=n(21).Tokenizer,a=n(21).TOKEN,r=/\r\n|[\r\n]/,t=/\r\n|[\r\n]/g,d=function(w,T){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=w.max_preserve_newlines,this.preserve_newlines=w.preserve_newlines,this._output=new i(w,T)};d.prototype.current_line_has_match=function(w){return this._output.current_line.has_match(w)},d.prototype.set_space_before_token=function(w,T){this._output.space_before_token=w,this._output.non_breaking_space=T},d.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},d.prototype.add_raw_token=function(w){this._output.add_raw_token(w)},d.prototype.print_preserved_newlines=function(w){var T=0;w.type!==a.TEXT&&w.previous.type!==a.TEXT&&(T=w.newlines?1:0),this.preserve_newlines&&(T=w.newlines<this.max_preserve_newlines+1?w.newlines:this.max_preserve_newlines+1);for(var R=0;R<T;R++)this.print_newline(R>0);return T!==0},d.prototype.traverse_whitespace=function(w){return w.whitespace_before||w.newlines?(this.print_preserved_newlines(w)||(this._output.space_before_token=!0),!0):!1},d.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},d.prototype.print_newline=function(w){this._output.add_new_line(w)},d.prototype.print_token=function(w){w.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(w.text))},d.prototype.indent=function(){this.indent_level++},d.prototype.get_full_indent=function(w){return w=this.indent_level+(w||0),w<1?"":this._output.get_indent_string(w)};var v=function(w){for(var T=null,R=w.next;R.type!==a.EOF&&w.closed!==R;){if(R.type===a.ATTRIBUTE&&R.text==="type"){R.next&&R.next.type===a.EQUALS&&R.next.next&&R.next.next.type===a.VALUE&&(T=R.next.next.text);break}R=R.next}return T},y=function(w,T){var R=null,N=null;return T.closed?(w==="script"?R="text/javascript":w==="style"&&(R="text/css"),R=v(T)||R,R.search("text/css")>-1?N="css":R.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?N="javascript":R.search(/(text|application|dojo)\/(x-)?(html)/)>-1?N="html":R.search(/test\/null/)>-1&&(N="null"),N):null};function b(w,T){return T.indexOf(w)!==-1}function g(w,T,R){this.parent=w||null,this.tag=T?T.tag_name:"",this.indent_level=R||0,this.parser_token=T||null}function m(w){this._printer=w,this._current_frame=null}m.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},m.prototype.record_tag=function(w){var T=new g(this._current_frame,w,this._printer.indent_level);this._current_frame=T},m.prototype._try_pop_frame=function(w){var T=null;return w&&(T=w.parser_token,this._printer.indent_level=w.indent_level,this._current_frame=w.parent),T},m.prototype._get_frame=function(w,T){for(var R=this._current_frame;R&&!(w.indexOf(R.tag)!==-1);){if(T&&T.indexOf(R.tag)!==-1){R=null;break}R=R.parent}return R},m.prototype.try_pop=function(w,T){var R=this._get_frame([w],T);return this._try_pop_frame(R)},m.prototype.indent_to_tag=function(w){var T=this._get_frame(w);T&&(this._printer.indent_level=T.indent_level)};function _(w,T,R,N){this._source_text=w||"",T=T||{},this._js_beautify=R,this._css_beautify=N,this._tag_stack=null;var j=new o(T,"html");this._options=j,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}_.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var w=this._source_text,T=this._options.eol;this._options.eol==="auto"&&(T=`
|
|
|
`,w&&r.test(w)&&(T=w.match(r)[0])),w=w.replace(t,`
|
|
|
`);var R=w.match(/^[\t ]*/)[0],N={text:"",type:""},j=new x,W=new d(this._options,R),J=new l(w,this._options).tokenize();this._tag_stack=new m(W);for(var F=null,k=J.next();k.type!==a.EOF;)k.type===a.TAG_OPEN||k.type===a.COMMENT?(F=this._handle_tag_open(W,k,j,N),j=F):k.type===a.ATTRIBUTE||k.type===a.EQUALS||k.type===a.VALUE||k.type===a.TEXT&&!j.tag_complete?F=this._handle_inside_tag(W,k,j,J):k.type===a.TAG_CLOSE?F=this._handle_tag_close(W,k,j):k.type===a.TEXT?F=this._handle_text(W,k,j):W.add_raw_token(k),N=F,k=J.next();var K=W._output.get_code(T);return K},_.prototype._handle_tag_close=function(w,T,R){var N={text:T.text,type:T.type};return w.alignment_size=0,R.tag_complete=!0,w.set_space_before_token(T.newlines||T.whitespace_before!=="",!0),R.is_unformatted?w.add_raw_token(T):(R.tag_start_char==="<"&&(w.set_space_before_token(T.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&R.has_wrapped_attrs&&w.print_newline(!1)),w.print_token(T)),R.indent_content&&!(R.is_unformatted||R.is_content_unformatted)&&(w.indent(),R.indent_content=!1),!R.is_inline_element&&!(R.is_unformatted||R.is_content_unformatted)&&w.set_wrap_point(),N},_.prototype._handle_inside_tag=function(w,T,R,N){var j=R.has_wrapped_attrs,W={text:T.text,type:T.type};if(w.set_space_before_token(T.newlines||T.whitespace_before!=="",!0),R.is_unformatted)w.add_raw_token(T);else if(R.tag_start_char==="{"&&T.type===a.TEXT)w.print_preserved_newlines(T)?(T.newlines=0,w.add_raw_token(T)):w.print_token(T);else{if(T.type===a.ATTRIBUTE?(w.set_space_before_token(!0),R.attr_count+=1):(T.type===a.EQUALS||T.type===a.VALUE&&T.previous.type===a.EQUALS)&&w.set_space_before_token(!1),T.type===a.ATTRIBUTE&&R.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(w.traverse_whitespace(T),j=j||T.newlines!==0),this._is_wrap_attributes_force)){var J=R.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&R.attr_count===1){var F=!0,k=0,K;do{if(K=N.peek(k),K.type===a.ATTRIBUTE){F=!1;break}k+=1}while(k<4&&K.type!==a.EOF&&K.type!==a.TAG_CLOSE);J=!F}J&&(w.print_newline(!1),j=!0)}w.print_token(T),j=j||w.previous_token_wrapped(),R.has_wrapped_attrs=j}return W},_.prototype._handle_text=function(w,T,R){var N={text:T.text,type:"TK_CONTENT"};return R.custom_beautifier_name?this._print_custom_beatifier_text(w,T,R):R.is_unformatted||R.is_content_unformatted?w.add_raw_token(T):(w.traverse_whitespace(T),w.print_token(T)),N},_.prototype._print_custom_beatifier_text=function(w,T,R){var N=this;if(T.text!==""){var j=T.text,W,J=1,F="",k="";R.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?W=this._js_beautify:R.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?W=this._css_beautify:R.custom_beautifier_name==="html"&&(W=function(oe,me){var he=new _(oe,me,N._js_beautify,N._css_beautify);return he.beautify()}),this._options.indent_scripts==="keep"?J=0:this._options.indent_scripts==="separate"&&(J=-w.indent_level);var K=w.get_full_indent(J);if(j=j.replace(/\n[ \t]*$/,""),R.custom_beautifier_name!=="html"&&j[0]==="<"&&j.match(/^(<!--|<!\[CDATA\[)/)){var Y=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(j);if(!Y){w.add_raw_token(T);return}F=K+Y[1]+`
|
|
|
`,j=Y[4],Y[5]&&(k=K+Y[5]),j=j.replace(/\n[ \t]*$/,""),(Y[2]||Y[3].indexOf(`
|
|
|
`)!==-1)&&(Y=Y[3].match(/[ \t]+$/),Y&&(T.whitespace_before=Y[0]))}if(j)if(W){var H=function(){this.eol=`
|
|
|
`};H.prototype=this._options.raw_options;var Q=new H;j=W(K+j,Q)}else{var re=T.whitespace_before;re&&(j=j.replace(new RegExp(`
|
|
|
(`+re+")?","g"),`
|
|
|
`)),j=K+j.replace(/\n/g,`
|
|
|
`+K)}F&&(j?j=F+j+`
|
|
|
`+k:j=F+k),w.print_newline(!1),j&&(T.text=j,T.whitespace_before="",T.newlines=0,w.add_raw_token(T),w.print_newline(!0))}},_.prototype._handle_tag_open=function(w,T,R,N){var j=this._get_tag_open_token(T);return(R.is_unformatted||R.is_content_unformatted)&&!R.is_empty_element&&T.type===a.TAG_OPEN&&T.text.indexOf("</")===0?(w.add_raw_token(T),j.start_tag_token=this._tag_stack.try_pop(j.tag_name)):(w.traverse_whitespace(T),this._set_tag_position(w,T,j,R,N),j.is_inline_element||w.set_wrap_point(),w.print_token(T)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(j.alignment_size=T.text.length+1),!j.tag_complete&&!j.is_unformatted&&(w.alignment_size=j.alignment_size),j};var x=function(w,T){if(this.parent=w||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!T)this.tag_complete=!0;else{var R;this.tag_start_char=T.text[0],this.text=T.text,this.tag_start_char==="<"?(R=T.text.match(/^<([^\s>]*)/),this.tag_check=R?R[1]:""):(R=T.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=R?R[1]:"",(T.text.startsWith("{{#>")||T.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&T.next!==null?this.tag_check=T.next.text.split(" ")[0]:this.tag_check=T.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),T.type===a.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||T.closed&&T.closed.text==="/>";var N=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(N=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(N)))}};_.prototype._get_tag_open_token=function(w){var T=new x(this._tag_stack.get_parser_token(),w);return T.alignment_size=this._options.wrap_attributes_indent_size,T.is_end_tag=T.is_end_tag||b(T.tag_check,this._options.void_elements),T.is_empty_element=T.tag_complete||T.is_start_tag&&T.is_end_tag,T.is_unformatted=!T.tag_complete&&b(T.tag_check,this._options.unformatted),T.is_content_unformatted=!T.is_empty_element&&b(T.tag_check,this._options.content_unformatted),T.is_inline_element=b(T.tag_name,this._options.inline)||T.tag_name.includes("-")||T.tag_start_char==="{",T},_.prototype._set_tag_position=function(w,T,R,N,j){if(R.is_empty_element||(R.is_end_tag?R.start_tag_token=this._tag_stack.try_pop(R.tag_name):(this._do_optional_end_element(R)&&(R.is_inline_element||w.print_newline(!1)),this._tag_stack.record_tag(R),(R.tag_name==="script"||R.tag_name==="style")&&!(R.is_unformatted||R.is_content_unformatted)&&(R.custom_beautifier_name=y(R.tag_check,T)))),b(R.tag_check,this._options.extra_liners)&&(w.print_newline(!1),w._output.just_added_blankline()||w.print_newline(!0)),R.is_empty_element){if(R.tag_start_char==="{"&&R.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),R.indent_content=!0;var W=w.current_line_has_match(/{{#if/);W||w.print_newline(!1)}R.tag_name==="!--"&&j.type===a.TAG_CLOSE&&N.is_end_tag&&R.text.indexOf(`
|
|
|
`)===-1||(R.is_inline_element||R.is_unformatted||w.print_newline(!1),this._calcluate_parent_multiline(w,R))}else if(R.is_end_tag){var J=!1;J=R.start_tag_token&&R.start_tag_token.multiline_content,J=J||!R.is_inline_element&&!(N.is_inline_element||N.is_unformatted)&&!(j.type===a.TAG_CLOSE&&R.start_tag_token===N)&&j.type!=="TK_CONTENT",(R.is_content_unformatted||R.is_unformatted)&&(J=!1),J&&w.print_newline(!1)}else R.indent_content=!R.custom_beautifier_name,R.tag_start_char==="<"&&(R.tag_name==="html"?R.indent_content=this._options.indent_inner_html:R.tag_name==="head"?R.indent_content=this._options.indent_head_inner_html:R.tag_name==="body"&&(R.indent_content=this._options.indent_body_inner_html)),!(R.is_inline_element||R.is_unformatted)&&(j.type!=="TK_CONTENT"||R.is_content_unformatted)&&w.print_newline(!1),this._calcluate_parent_multiline(w,R)},_.prototype._calcluate_parent_multiline=function(w,T){T.parent&&w._output.just_added_newline()&&!((T.is_inline_element||T.is_unformatted)&&T.parent.is_inline_element)&&(T.parent.multiline_content=!0)};var f=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],E=["a","audio","del","ins","map","noscript","video"];_.prototype._do_optional_end_element=function(w){var T=null;if(w.is_empty_element||!w.is_start_tag||!w.parent)return;if(w.tag_name==="body")T=T||this._tag_stack.try_pop("head");else if(w.tag_name==="li")T=T||this._tag_stack.try_pop("li",["ol","ul"]);else if(w.tag_name==="dd"||w.tag_name==="dt")T=T||this._tag_stack.try_pop("dt",["dl"]),T=T||this._tag_stack.try_pop("dd",["dl"]);else if(w.parent.tag_name==="p"&&f.indexOf(w.tag_name)!==-1){var R=w.parent.parent;(!R||E.indexOf(R.tag_name)===-1)&&(T=T||this._tag_stack.try_pop("p"))}else w.tag_name==="rp"||w.tag_name==="rt"?(T=T||this._tag_stack.try_pop("rt",["ruby","rtc"]),T=T||this._tag_stack.try_pop("rp",["ruby","rtc"])):w.tag_name==="optgroup"?T=T||this._tag_stack.try_pop("optgroup",["select"]):w.tag_name==="option"?T=T||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):w.tag_name==="colgroup"?T=T||this._tag_stack.try_pop("caption",["table"]):w.tag_name==="thead"?(T=T||this._tag_stack.try_pop("caption",["table"]),T=T||this._tag_stack.try_pop("colgroup",["table"])):w.tag_name==="tbody"||w.tag_name==="tfoot"?(T=T||this._tag_stack.try_pop("caption",["table"]),T=T||this._tag_stack.try_pop("colgroup",["table"]),T=T||this._tag_stack.try_pop("thead",["table"]),T=T||this._tag_stack.try_pop("tbody",["table"])):w.tag_name==="tr"?(T=T||this._tag_stack.try_pop("caption",["table"]),T=T||this._tag_stack.try_pop("colgroup",["table"]),T=T||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(w.tag_name==="th"||w.tag_name==="td")&&(T=T||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),T=T||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return w.parent=this._tag_stack.get_parser_token(),T},c.exports.Beautifier=_},function(c,s,n){var o=n(6).Options;function i(l){o.call(this,l,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}i.prototype=new o,c.exports.Options=i},function(c,s,n){var o=n(9).Tokenizer,i=n(9).TOKEN,l=n(13).Directives,a=n(14).TemplatablePattern,r=n(12).Pattern,t={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:i.START,RAW:i.RAW,EOF:i.EOF},d=new l(/<\!--/,/-->/),v=function(y,b){o.call(this,y,b),this._current_tag_name="";var g=new a(this._input).read_options(this._options),m=new r(this._input);if(this.__patterns={word:g.until(/[\n\r\t <]/),single_quote:g.until_after(/'/),double_quote:g.until_after(/"/),attribute:g.until(/[\n\r\t =>]|\/>/),element_name:g.until(/[\n\r\t >\/]/),handlebars_comment:m.starting_with(/{{!--/).until_after(/--}}/),handlebars:m.starting_with(/{{/).until_after(/}}/),handlebars_open:m.until(/[\n\r\t }]/),handlebars_raw_close:m.until(/}}/),comment:m.starting_with(/<!--/).until_after(/-->/),cdata:m.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:m.starting_with(/<!\[/).until_after(/]>/),processing:m.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var _=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=m.matching(_).until_after(_)}};v.prototype=new o,v.prototype._is_comment=function(y){return!1},v.prototype._is_opening=function(y){return y.type===t.TAG_OPEN},v.prototype._is_closing=function(y,b){return y.type===t.TAG_CLOSE&&b&&((y.text===">"||y.text==="/>")&&b.text[0]==="<"||y.text==="}}"&&b.text[0]==="{"&&b.text[1]==="{")},v.prototype._reset=function(){this._current_tag_name=""},v.prototype._get_next_token=function(y,b){var g=null;this._readWhitespace();var m=this._input.peek();return m===null?this._create_token(t.EOF,""):(g=g||this._read_open_handlebars(m,b),g=g||this._read_attribute(m,y,b),g=g||this._read_close(m,b),g=g||this._read_raw_content(m,y,b),g=g||this._read_content_word(m),g=g||this._read_comment_or_cdata(m),g=g||this._read_processing(m),g=g||this._read_open(m,b),g=g||this._create_token(t.UNKNOWN,this._input.next()),g)},v.prototype._read_comment_or_cdata=function(y){var b=null,g=null,m=null;if(y==="<"){var _=this._input.peek(1);_==="!"&&(g=this.__patterns.comment.read(),g?(m=d.get_directives(g),m&&m.ignore==="start"&&(g+=d.readIgnored(this._input))):g=this.__patterns.cdata.read()),g&&(b=this._create_token(t.COMMENT,g),b.directives=m)}return b},v.prototype._read_processing=function(y){var b=null,g=null,m=null;if(y==="<"){var _=this._input.peek(1);(_==="!"||_==="?")&&(g=this.__patterns.conditional_comment.read(),g=g||this.__patterns.processing.read()),g&&(b=this._create_token(t.COMMENT,g),b.directives=m)}return b},v.prototype._read_open=function(y,b){var g=null,m=null;return b||y==="<"&&(g=this._input.next(),this._input.peek()==="/"&&(g+=this._input.next()),g+=this.__patterns.element_name.read(),m=this._create_token(t.TAG_OPEN,g)),m},v.prototype._read_open_handlebars=function(y,b){var g=null,m=null;return b||this._options.indent_handlebars&&y==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(g=this.__patterns.handlebars_comment.read(),g=g||this.__patterns.handlebars.read(),m=this._create_token(t.COMMENT,g)):(g=this.__patterns.handlebars_open.read(),m=this._create_token(t.TAG_OPEN,g))),m},v.prototype._read_close=function(y,b){var g=null,m=null;return b&&(b.text[0]==="<"&&(y===">"||y==="/"&&this._input.peek(1)===">")?(g=this._input.next(),y==="/"&&(g+=this._input.next()),m=this._create_token(t.TAG_CLOSE,g)):b.text[0]==="{"&&y==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),m=this._create_token(t.TAG_CLOSE,"}}"))),m},v.prototype._read_attribute=function(y,b,g){var m=null,_="";if(g&&g.text[0]==="<")if(y==="=")m=this._create_token(t.EQUALS,this._input.next());else if(y==='"'||y==="'"){var x=this._input.next();y==='"'?x+=this.__patterns.double_quote.read():x+=this.__patterns.single_quote.read(),m=this._create_token(t.VALUE,x)}else _=this.__patterns.attribute.read(),_&&(b.type===t.EQUALS?m=this._create_token(t.VALUE,_):m=this._create_token(t.ATTRIBUTE,_));return m},v.prototype._is_content_unformatted=function(y){return this._options.void_elements.indexOf(y)===-1&&(this._options.content_unformatted.indexOf(y)!==-1||this._options.unformatted.indexOf(y)!==-1)},v.prototype._read_raw_content=function(y,b,g){var m="";if(g&&g.text[0]==="{")m=this.__patterns.handlebars_raw_close.read();else if(b.type===t.TAG_CLOSE&&b.opened.text[0]==="<"&&b.text[0]!=="/"){var _=b.opened.text.substr(1).toLowerCase();if(_==="script"||_==="style"){var x=this._read_comment_or_cdata(y);if(x)return x.type=t.TEXT,x;m=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(_)&&(m=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig")))}return m?this._create_token(t.TEXT,m):null},v.prototype._read_content_word=function(y){var b="";if(this._options.unformatted_content_delimiter&&(y===this._options.unformatted_content_delimiter[0]&&(b=this.__patterns.unformatted_content_delimiter.read())),b||(b=this.__patterns.word.read()),b)return this._create_token(t.TEXT,b)},c.exports.Tokenizer=v,c.exports.TOKEN=t}],C={};function h(c){var s=C[c];if(s!==void 0)return s.exports;var n=C[c]={exports:{}};return A[c](n,n.exports,h),n.exports}var p=h(18);B=p})();var O=B;if(!0)!(ae=[z,z("6UM0"),z("TXwP")],ee=function(A){var C=z("6UM0"),h=z("TXwP");return{html_beautify:function(p,c){return O(p,c,C.js_beautify,h.css_beautify)}}}.apply(We,ae),ee!==void 0&&(Ye.exports=ee));else var D,S})()},"rAM+":function(Ye,We,z){"use strict";z.d(We,"a",function(){return ee});var ae=z("Qw5x");function ee(B,O){var D;if(typeof Symbol=="undefined"||B[Symbol.iterator]==null){if(Array.isArray(B)||(D=Object(ae.a)(B))||O&&B&&typeof B.length=="number"){D&&(B=D);var S=0,A=function(){};return{s:A,n:function(){return S>=B.length?{done:!0}:{done:!1,value:B[S++]}},e:function(s){throw s},f: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.`)}var C=!0,h=!1,p;return{s:function(){D=B[Symbol.iterator]()},n:function(){var s=D.next();return C=s.done,s},e:function(s){h=!0,p=s},f:function(){try{!C&&D.return!=null&&D.return()}finally{if(h)throw p}}}}},rHrb:function(Ye,We,z){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.CopyToClipboard=void 0;var ae=B(z("cDcd")),ee=B(z("+QRC"));function B(t){return t&&t.__esModule?t:{default:t}}function O(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O=function(v){return typeof v}:O=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},O(t)}function D(t,d){var v=Object.keys(t);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(t);d&&(y=y.filter(function(b){return Object.getOwnPropertyDescriptor(t,b).enumerable})),v.push.apply(v,y)}return v}function S(t){for(var d=1;d<arguments.length;d++){var v=arguments[d]!=null?arguments[d]:{};d%2?D(v,!0).forEach(function(y){a(t,y,v[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(v)):D(v).forEach(function(y){Object.defineProperty(t,y,Object.getOwnPropertyDescriptor(v,y))})}return t}function A(t,d){if(t==null)return{};var v=C(t,d),y,b;if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(t);for(b=0;b<g.length;b++){if(y=g[b],d.indexOf(y)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(t,y))continue;v[y]=t[y]}}return v}function C(t,d){if(t==null)return{};var v={},y=Object.keys(t),b,g;for(g=0;g<y.length;g++){if(b=y[g],d.indexOf(b)>=0)continue;v[b]=t[b]}return v}function h(t,d){if(!(t instanceof d))throw new TypeError("Cannot call a class as a function")}function p(t,d){for(var v=0;v<d.length;v++){var y=d[v];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(t,y.key,y)}}function c(t,d,v){return d&&p(t.prototype,d),v&&p(t,v),t}function s(t,d){return d&&(O(d)==="object"||typeof d=="function")?d:o(t)}function n(t){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},n(t)}function o(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(d&&d.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),d&&l(t,d)}function l(t,d){return l=Object.setPrototypeOf||function(y,b){return y.__proto__=b,y},l(t,d)}function a(t,d,v){return d in t?Object.defineProperty(t,d,{value:v,enumerable:!0,configurable:!0,writable:!0}):t[d]=v,t}var r=function(t){i(d,t);function d(){var v,y;h(this,d);for(var b=arguments.length,g=new Array(b),m=0;m<b;m++)g[m]=arguments[m];return y=s(this,(v=n(d)).call.apply(v,[this].concat(g))),a(o(y),"onClick",function(_){var x=y.props,f=x.text,E=x.onCopy,w=x.children,T=x.options,R=ae.default.Children.only(w),N=(0,ee.default)(f,T);E&&E(f,N),R&&R.props&&typeof R.props.onClick=="function"&&R.props.onClick(_)}),y}return c(d,[{key:"render",value:function(){var y=this.props,b=y.text,g=y.onCopy,m=y.options,_=y.children,x=A(y,["text","onCopy","options","children"]),f=ae.default.Children.only(_);return ae.default.cloneElement(f,S({},x,{onClick:this.onClick}))}}]),d}(ae.default.PureComponent);We.CopyToClipboard=r,a(r,"defaultProps",{onCopy:void 0,options:void 0})},rUJ1:function(Ye,We){const z=/[&<>"']/,ae=/[&<>"']/g,ee=/[<>"']|&(?!#?\w+;)/,B=/[<>"']|&(?!#?\w+;)/g,O={"&":"&","<":"<",">":">",'"':""","'":"'"},D=m=>O[m];function S(m,_){if(_){if(z.test(m))return m.replace(ae,D)}else if(ee.test(m))return m.replace(B,D);return m}const A=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function C(m){return m.replace(A,(_,x)=>(x=x.toLowerCase(),x==="colon"?":":x.charAt(0)==="#"?x.charAt(1)==="x"?String.fromCharCode(parseInt(x.substring(2),16)):String.fromCharCode(+x.substring(1)):""))}const h=/(^|[^\[])\^/g;function p(m,_){m=m.source||m,_=_||"";const x={replace:(f,E)=>(E=E.source||E,E=E.replace(h,"$1"),m=m.replace(f,E),x),getRegex:()=>new RegExp(m,_)};return x}const c=/[^\w:]/g,s=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function n(m,_,x){if(m){let f;try{f=decodeURIComponent(C(x)).replace(c,"").toLowerCase()}catch(E){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}_&&!s.test(x)&&(x=r(_,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(f){return null}return x}const o={},i=/^[^:]+:\/*[^/]*$/,l=/^([^:]+:)[\s\S]*$/,a=/^([^:]+:\/*[^/]*)[\s\S]*$/;function r(m,_){o[" "+m]||(i.test(m)?o[" "+m]=m+"/":o[" "+m]=y(m,"/",!0)),m=o[" "+m];const x=m.indexOf(":")===-1;return _.substring(0,2)==="//"?x?_:m.replace(l,"$1")+_:_.charAt(0)==="/"?x?_:m.replace(a,"$1")+_:m+_}const t={exec:function(){}};function d(m){let _=1,x,f;for(;_<arguments.length;_++){x=arguments[_];for(f in x)Object.prototype.hasOwnProperty.call(x,f)&&(m[f]=x[f])}return m}function v(m,_){const x=m.replace(/\|/g,(w,T,R)=>{let N=!1,j=T;for(;--j>=0&&R[j]==="\\";)N=!N;return N?"|":" |"}),f=x.split(/ \|/);let E=0;if(f.length>_)f.splice(_);else for(;f.length<_;)f.push("");for(;E<f.length;E++)f[E]=f[E].trim().replace(/\\\|/g,"|");return f}function y(m,_,x){const f=m.length;if(f===0)return"";let E=0;for(;E<f;){const w=m.charAt(f-E-1);if(w===_&&!x)E++;else if(w!==_&&x)E++;else break}return m.substr(0,f-E)}function b(m,_){if(m.indexOf(_[1])===-1)return-1;const x=m.length;let f=0,E=0;for(;E<x;E++)if(m[E]==="\\")E++;else if(m[E]===_[0])f++;else if(m[E]===_[1]&&(f--,f<0))return E;return-1}function g(m){m&&m.sanitize&&!m.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")}Ye.exports={escape:S,unescape:C,edit:p,cleanUrl:n,resolveUrl:r,noopTest:t,merge:d,splitCells:v,rtrim:y,findClosingBracket:b,checkSanitizeDeprecation:g}},rdUC:function(Ye,We,z){var ae=z("MFOe"),ee=ae.Global;Ye.exports={name:"localStorage",read:O,write:D,each:S,remove:A,clearAll:C};function B(){return ee.localStorage}function O(h){return B().getItem(h)}function D(h,p){return B().setItem(h,p)}function S(h){for(var p=B().length-1;p>=0;p--){var c=B().key(p);h(O(c),c)}}function A(h){return B().removeItem(h)}function C(){return B().clear()}},"s8/Y":function(Ye,We,z){Ye.exports=z.p+"static/jx.6713fc81.svg"},"sB/4":function(Ye,We,z){Ye.exports=z.p+"static/b.7405990c.svg"},sNtx:function(Ye,We,z){},sR1s:function(Ye,We,z){"use strict";z.d(We,"b",function(){return O}),z.d(We,"a",function(){return D}),z.d(We,"c",function(){return S}),z.d(We,"d",function(){return A});var ae=z("U8pU"),ee="RC_TABLE_KEY";function B(C){return C==null?[]:Array.isArray(C)?C:[C]}function O(C,h){if(!h&&typeof h!="number")return C;for(var p=B(h),c=C,s=0;s<p.length;s+=1){if(!c)return null;var n=p[s];c=c[n]}return c}function D(C){var h=[],p={};return C.forEach(function(c){for(var s=c||{},n=s.key,o=s.dataIndex,i=n||B(o).join("-")||ee;p[i];)i="".concat(i,"_next");p[i]=!0,h.push(i)}),h}function S(){var C={};function h(n,o){o&&Object.keys(o).forEach(function(i){var l=o[i];l&&Object(ae.a)(l)==="object"?(n[i]=n[i]||{},h(n[i],l)):n[i]=l})}for(var p=arguments.length,c=new Array(p),s=0;s<p;s++)c[s]=arguments[s];return c.forEach(function(n){h(C,n)}),C}function A(C){return C!=null}},sboe:function(Ye,We,z){"use strict";z.d(We,"a",function(){return B});var ae=z("cDcd"),ee=z.n(ae),B=ae.createContext(null)},"t/PP":function(Ye,We,z){Ye.exports=z.p+"static/title.dd3b799f.svg"},t23M:function(Ye,We,z){"use strict";var ae=z("VTBJ"),ee=z("1OyB"),B=z("vuIU"),O=z("Ji7U"),D=z("LK+K"),S=z("cDcd"),A=z.n(S),C=z("m+aA"),h=z("Zm9Q"),p=z("Kwbf"),c=z("c+Xe"),s=z("bdgK"),n="rc-observer-key",o=function(i){Object(O.a)(a,i);var l=Object(D.a)(a);function a(){var r;return Object(ee.a)(this,a),r=l.apply(this,arguments),r.resizeObserver=null,r.childNode=null,r.currentElement=null,r.state={width:0,height:0,offsetHeight:0,offsetWidth:0},r.onResize=function(t){var d=r.props.onResize,v=t[0].target,y=v.getBoundingClientRect(),b=y.width,g=y.height,m=v.offsetWidth,_=v.offsetHeight,x=Math.floor(b),f=Math.floor(g);if(r.state.width!==x||r.state.height!==f||r.state.offsetWidth!==m||r.state.offsetHeight!==_){var E={width:x,height:f,offsetWidth:m,offsetHeight:_};r.setState(E),d&&Promise.resolve().then(function(){d(Object(ae.a)(Object(ae.a)({},E),{},{offsetWidth:m,offsetHeight:_}))})}},r.setChildNode=function(t){r.childNode=t},r}return Object(B.a)(a,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var t=this.props.disabled;if(t){this.destroyObserver();return}var d=Object(C.a)(this.childNode||this),v=d!==this.currentElement;v&&(this.destroyObserver(),this.currentElement=d),!this.resizeObserver&&d&&(this.resizeObserver=new s.default(this.onResize),this.resizeObserver.observe(d))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var t=this.props.children,d=Object(h.a)(t);if(d.length>1)Object(p.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(d.length===0)return Object(p.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var v=d[0];if(S.isValidElement(v)&&Object(c.c)(v)){var y=v.ref;d[0]=S.cloneElement(v,{ref:Object(c.a)(y,this.setChildNode)})}return d.length===1?d[0]:d.map(function(b,g){return!S.isValidElement(b)||"key"in b&&b.key!==null?b:S.cloneElement(b,{key:"".concat(n,"-").concat(g)})})}}]),a}(S.Component);o.displayName="ResizeObserver",We.a=o},twBr:function(Ye,We,z){Ye.exports=z.p+"static/s.1f286590.svg"},uMZB:function(Ye,We,z){Ye.exports={header:"header___3a50V",checkboxs:"checkboxs___3TnBC",field:"field___SHW6f","oj-form-container":"oj-form-container___36KBv","oj-left-panel":"oj-left-panel___3Fdj5","oj-form-info":"oj-form-info___dilPb",footer:"footer___1Ie9U","test-case-name":"test-case-name___356US","btn-remove-case":"btn-remove-case___1Z5cd","icon-tag":"icon-tag___3zUaP",btn_back:"btn_back___2UBbR",testJi:"testJi___1dyLk",upBtn:"upBtn___1I0SJ"}},uQRt:function(Ye,We,z){Ye.exports=ae;function ae(){return z("gaXo"),{}}},ulZh:function(Ye,We,z){typeof window!="undefined"&&function(ee,B){Ye.exports=B()}(this,function(){return function(ae){var ee={};function B(O){if(ee[O])return ee[O].exports;var D=ee[O]={i:O,l:!1,exports:{}};return ae[O].call(D.exports,D,D.exports,B),D.l=!0,D.exports}return B.m=ae,B.c=ee,B.d=function(O,D,S){B.o(O,D)||Object.defineProperty(O,D,{enumerable:!0,get:S})},B.r=function(O){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})},B.t=function(O,D){if(D&1&&(O=B(O)),D&8)return O;if(D&4&&typeof O=="object"&&O&&O.__esModule)return O;var S=Object.create(null);if(B.r(S),Object.defineProperty(S,"default",{enumerable:!0,value:O}),D&2&&typeof O!="string")for(var A in O)B.d(S,A,function(C){return O[C]}.bind(null,A));return S},B.n=function(O){var D=O&&O.__esModule?function(){return O.default}:function(){return O};return B.d(D,"a",D),D},B.o=function(O,D){return Object.prototype.hasOwnProperty.call(O,D)},B.p="/dist/",B(B.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ae,ee,B){"use strict";var O=Object.prototype.hasOwnProperty,D="~";function S(){}Object.create&&(S.prototype=Object.create(null),new S().__proto__||(D=!1));function A(c,s,n){this.fn=c,this.context=s,this.once=n||!1}function C(c,s,n,o,i){if(typeof n!="function")throw new TypeError("The listener must be a function");var l=new A(n,o||c,i),a=D?D+s:s;return c._events[a]?c._events[a].fn?c._events[a]=[c._events[a],l]:c._events[a].push(l):(c._events[a]=l,c._eventsCount++),c}function h(c,s){--c._eventsCount===0?c._events=new S:delete c._events[s]}function p(){this._events=new S,this._eventsCount=0}p.prototype.eventNames=function(){var s=[],n,o;if(this._eventsCount===0)return s;for(o in n=this._events)O.call(n,o)&&s.push(D?o.slice(1):o);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(n)):s},p.prototype.listeners=function(s){var n=D?D+s:s,o=this._events[n];if(!o)return[];if(o.fn)return[o.fn];for(var i=0,l=o.length,a=new Array(l);i<l;i++)a[i]=o[i].fn;return a},p.prototype.listenerCount=function(s){var n=D?D+s:s,o=this._events[n];return o?o.fn?1:o.length:0},p.prototype.emit=function(s,n,o,i,l,a){var r=D?D+s:s;if(!this._events[r])return!1;var t=this._events[r],d=arguments.length,v,y;if(t.fn){t.once&&this.removeListener(s,t.fn,void 0,!0);switch(d){case 1:return t.fn.call(t.context),!0;case 2:return t.fn.call(t.context,n),!0;case 3:return t.fn.call(t.context,n,o),!0;case 4:return t.fn.call(t.context,n,o,i),!0;case 5:return t.fn.call(t.context,n,o,i,l),!0;case 6:return t.fn.call(t.context,n,o,i,l,a),!0}for(y=1,v=new Array(d-1);y<d;y++)v[y-1]=arguments[y];t.fn.apply(t.context,v)}else{var b=t.length,g;for(y=0;y<b;y++){t[y].once&&this.removeListener(s,t[y].fn,void 0,!0);switch(d){case 1:t[y].fn.call(t[y].context);break;case 2:t[y].fn.call(t[y].context,n);break;case 3:t[y].fn.call(t[y].context,n,o);break;case 4:t[y].fn.call(t[y].context,n,o,i);break;default:if(!v)for(g=1,v=new Array(d-1);g<d;g++)v[g-1]=arguments[g];t[y].fn.apply(t[y].context,v)}}}return!0},p.prototype.on=function(s,n,o){return C(this,s,n,o,!1)},p.prototype.once=function(s,n,o){return C(this,s,n,o,!0)},p.prototype.removeListener=function(s,n,o,i){var l=D?D+s:s;if(!this._events[l])return this;if(!n)return h(this,l),this;var a=this._events[l];if(a.fn)a.fn===n&&(!i||a.once)&&(!o||a.context===o)&&h(this,l);else{for(var r=0,t=[],d=a.length;r<d;r++)(a[r].fn!==n||i&&!a[r].once||o&&a[r].context!==o)&&t.push(a[r]);t.length?this._events[l]=t.length===1?t[0]:t:h(this,l)}return this},p.prototype.removeAllListeners=function(s){var n;return s?(n=D?D+s:s,this._events[n]&&h(this,n)):(this._events=new S,this._eventsCount=0),this},p.prototype.off=p.prototype.removeListener,p.prototype.addListener=p.prototype.on,p.prefixed=D,p.EventEmitter=p,ae.exports=p},"./node_modules/url-toolkit/src/url-toolkit.js":function(ae,ee,B){(function(O){var D=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,S=/^([^\/?#]*)([^]*)$/,A=/(?:\/|^)\.(?=\/)/g,C=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,h={buildAbsoluteURL:function(p,c,s){if(s=s||{},p=p.trim(),c=c.trim(),!c){if(!s.alwaysNormalize)return p;var n=h.parseURL(p);if(!n)throw new Error("Error trying to parse base URL.");return n.path=h.normalizePath(n.path),h.buildURLFromParts(n)}var o=h.parseURL(c);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return s.alwaysNormalize?(o.path=h.normalizePath(o.path),h.buildURLFromParts(o)):c;var i=h.parseURL(p);if(!i)throw new Error("Error trying to parse base URL.");if(!i.netLoc&&i.path&&i.path[0]!=="/"){var l=S.exec(i.path);i.netLoc=l[1],i.path=l[2]}i.netLoc&&!i.path&&(i.path="/");var a={scheme:i.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(a.netLoc=i.netLoc,o.path[0]!=="/"))if(!o.path)a.path=i.path,o.params||(a.params=i.params,o.query||(a.query=i.query));else{var r=i.path,t=r.substring(0,r.lastIndexOf("/")+1)+o.path;a.path=h.normalizePath(t)}return a.path===null&&(a.path=s.alwaysNormalize?h.normalizePath(o.path):o.path),h.buildURLFromParts(a)},parseURL:function(p){var c=D.exec(p);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(p){for(p=p.split("").reverse().join("").replace(A,"");p.length!==(p=p.replace(C,"")).length;);return p.split("").reverse().join("")},buildURLFromParts:function(p){return p.scheme+p.netLoc+p.path+p.params+p.query+p.fragment}};ae.exports=h})(this)},"./node_modules/webworkify-webpack/index.js":function(ae,ee,B){function O(s){var n={};function o(l){if(n[l])return n[l].exports;var a=n[l]={i:l,l:!1,exports:{}};return s[l].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=s,o.c=n,o.i=function(l){return l},o.d=function(l,a,r){o.o(l,a)||Object.defineProperty(l,a,{configurable:!1,enumerable:!0,get:r})},o.r=function(l){Object.defineProperty(l,"__esModule",{value:!0})},o.n=function(l){var a=l&&l.__esModule?function(){return l.default}:function(){return l};return o.d(a,"a",a),a},o.o=function(l,a){return Object.prototype.hasOwnProperty.call(l,a)},o.p="/",o.oe=function(l){throw console.error(l),l};var i=o(o.s=ENTRY_MODULE);return i.default||i}var D="[\\.|\\-|\\+|\\w|/|@]+",S="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+D+").*?\\)";function A(s){return(s+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function C(s){return!isNaN(1*s)}function h(s,n,o){var i={};i[o]=[];var l=n.toString(),a=l.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!a)return i;for(var r=a[1],t=new RegExp("(\\\\n|\\W)"+A(r)+S,"g"),d;d=t.exec(l);){if(d[3]==="dll-reference")continue;i[o].push(d[3])}for(t=new RegExp("\\("+A(r)+'\\("(dll-reference\\s('+D+'))"\\)\\)'+S,"g");d=t.exec(l);)s[d[2]]||(i[o].push(d[1]),s[d[2]]=B(d[1]).m),i[d[2]]=i[d[2]]||[],i[d[2]].push(d[4]);for(var v=Object.keys(i),y=0;y<v.length;y++)for(var b=0;b<i[v[y]].length;b++)C(i[v[y]][b])&&(i[v[y]][b]=1*i[v[y]][b]);return i}function p(s){var n=Object.keys(s);return n.reduce(function(o,i){return o||s[i].length>0},!1)}function c(s,n){for(var o={main:[n]},i={main:[]},l={main:{}};p(o);)for(var a=Object.keys(o),r=0;r<a.length;r++){var t=a[r],d=o[t],v=d.pop();if(l[t]=l[t]||{},l[t][v]||!s[t][v])continue;l[t][v]=!0,i[t]=i[t]||[],i[t].push(v);for(var y=h(s,s[t][v],t),b=Object.keys(y),g=0;g<b.length;g++)o[b[g]]=o[b[g]]||[],o[b[g]]=o[b[g]].concat(y[b[g]])}return i}ae.exports=function(s,n){n=n||{};var o={main:B.m},i=n.all?{main:Object.keys(o.main)}:c(o,s),l="";Object.keys(i).filter(function(v){return v!=="main"}).forEach(function(v){for(var y=0;i[v][y];)y++;i[v].push(y),o[v][y]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",l=l+"var "+v+" = ("+O.toString().replace("ENTRY_MODULE",JSON.stringify(y))+")({"+i[v].map(function(b){return""+JSON.stringify(b)+": "+o[v][b].toString()}).join(",")+`});
|
|
|
`}),l=l+"new (("+O.toString().replace("ENTRY_MODULE",JSON.stringify(s))+")({"+i.main.map(function(v){return""+JSON.stringify(v)+": "+o.main[v].toString()}).join(",")+"}))(self);";var a=new window.Blob([l],{type:"text/javascript"});if(n.bare)return a;var r=window.URL||window.webkitURL||window.mozURL||window.msURL,t=r.createObjectURL(a),d=new window.Worker(t);return d.objectURL=t,d}},"./src/config.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"hlsDefaultConfig",function(){return g}),B.d(ee,"mergeConfig",function(){return _}),B.d(ee,"enableStreamingMode",function(){return x});var O=B("./src/controller/abr-controller.ts"),D=B("./src/controller/audio-stream-controller.ts"),S=B("./src/controller/audio-track-controller.ts"),A=B("./src/controller/subtitle-stream-controller.ts"),C=B("./src/controller/subtitle-track-controller.ts"),h=B("./src/controller/buffer-controller.ts"),p=B("./src/controller/timeline-controller.ts"),c=B("./src/controller/cap-level-controller.ts"),s=B("./src/controller/fps-controller.ts"),n=B("./src/controller/eme-controller.ts"),o=B("./src/controller/cmcd-controller.ts"),i=B("./src/utils/xhr-loader.ts"),l=B("./src/utils/fetch-loader.ts"),a=B("./src/utils/cues.ts"),r=B("./src/utils/mediakeys-helper.ts"),t=B("./src/utils/logger.ts");function d(){return d=Object.assign||function(f){for(var E=1;E<arguments.length;E++){var w=arguments[E];for(var T in w)Object.prototype.hasOwnProperty.call(w,T)&&(f[T]=w[T])}return f},d.apply(this,arguments)}function v(f,E){var w=Object.keys(f);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(f);E&&(T=T.filter(function(R){return Object.getOwnPropertyDescriptor(f,R).enumerable})),w.push.apply(w,T)}return w}function y(f){for(var E=1;E<arguments.length;E++){var w=arguments[E]!=null?arguments[E]:{};E%2?v(Object(w),!0).forEach(function(T){b(f,T,w[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(w)):v(Object(w)).forEach(function(T){Object.defineProperty(f,T,Object.getOwnPropertyDescriptor(w,T))})}return f}function b(f,E,w){return E in f?Object.defineProperty(f,E,{value:w,enumerable:!0,configurable:!0,writable:!0}):f[E]=w,f}var g=y(y({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:i.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:O.default,bufferController:h.default,capLevelController:c.default,fpsController:s.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:r.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},m()),{},{subtitleStreamController:A.SubtitleStreamController,subtitleTrackController:C.default,timelineController:p.TimelineController,audioStreamController:D.default,audioTrackController:S.default,emeController:n.default,cmcdController:o.default});function m(){return{cueHandler:a.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,E){if((E.liveSyncDurationCount||E.liveMaxLatencyDurationCount)&&(E.liveSyncDuration||E.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(E.liveMaxLatencyDurationCount!==void 0&&(E.liveSyncDurationCount===void 0||E.liveMaxLatencyDurationCount<=E.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(E.liveMaxLatencyDuration!==void 0&&(E.liveSyncDuration===void 0||E.liveMaxLatencyDuration<=E.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return d({},f,E)}function x(f){var E=f.loader;if(E!==l.default&&E!==i.default)t.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),f.progressive=!1;else{var w=Object(l.fetchSupported)();w&&(f.loader=l.default,f.progressive=!0,f.enableSoftwareAES=!0,t.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/polyfills/number.ts"),D=B("./src/utils/ewma-bandwidth-estimator.ts"),S=B("./src/events.ts"),A=B("./src/utils/buffer-helper.ts"),C=B("./src/errors.ts"),h=B("./src/types/loader.ts"),p=B("./src/utils/logger.ts");function c(o,i){for(var l=0;l<i.length;l++){var a=i[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,a.key,a)}}function s(o,i,l){return i&&c(o.prototype,i),l&&c(o,l),o}var n=function(){function o(l){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=l;var a=l.config;this.bwEstimator=new D.default(a.abrEwmaSlowVoD,a.abrEwmaFastVoD,a.abrEwmaDefaultEstimate),this.registerListeners()}var i=o.prototype;return i.registerListeners=function(){var a=this.hls;a.on(S.Events.FRAG_LOADING,this.onFragLoading,this),a.on(S.Events.FRAG_LOADED,this.onFragLoaded,this),a.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),a.on(S.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var a=this.hls;a.off(S.Events.FRAG_LOADING,this.onFragLoading,this),a.off(S.Events.FRAG_LOADED,this.onFragLoaded,this),a.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),a.off(S.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},i.onFragLoading=function(a,r){var t=r.frag;if(t.type===h.PlaylistLevelType.MAIN&&!this.timer){var d;this.fragCurrent=t,this.partCurrent=(d=r.part)!=null?d:null,this.timer=self.setInterval(this.onCheck,100)}},i.onLevelLoaded=function(a,r){var t=this.hls.config;r.details.live?this.bwEstimator.update(t.abrEwmaSlowLive,t.abrEwmaFastLive):this.bwEstimator.update(t.abrEwmaSlowVoD,t.abrEwmaFastVoD)},i._abandonRulesCheck=function(){var a=this.fragCurrent,r=this.partCurrent,t=this.hls,d=t.autoLevelEnabled,v=t.config,y=t.media;if(!a||!y)return;var b=r?r.stats:a.stats,g=r?r.duration:a.duration;if(b.aborted){p.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!d||y.paused||!y.playbackRate||!y.readyState)return;var m=performance.now()-b.loading.start,_=Math.abs(y.playbackRate);if(m<=500*g/_)return;var x=t.levels,f=t.minAutoLevel,E=x[a.level],w=b.total||Math.max(b.loaded,Math.round(g*E.maxBitrate/8)),T=Math.max(1,b.bwEstimate?b.bwEstimate/8:b.loaded*1e3/m),R=(w-b.loaded)/T,N=y.currentTime,j=(A.BufferHelper.bufferInfo(y,N,v.maxBufferHole).end-N)/_;if(j>=2*g/_||R<=j)return;var W=Number.POSITIVE_INFINITY,J;for(J=a.level-1;J>f;J--){var F=x[J].maxBitrate;if(W=g*F/(8*.8*T),W<j)break}if(W>=R)return;var k=this.bwEstimator.getEstimate();p.logger.warn("Fragment "+a.sn+(r?" part "+r.index:"")+" of level "+a.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+J+`
|
|
|
Current BW estimate: `+(Object(O.isFiniteNumber)(k)?(k/1024).toFixed(3):"Unknown")+` Kb/s
|
|
|
Estimated load time for current fragment: `+R.toFixed(3)+` s
|
|
|
Estimated load time for the next fragment: `+W.toFixed(3)+` s
|
|
|
Time to underbuffer: `+j.toFixed(3)+" s"),t.nextLoadLevel=J,this.bwEstimator.sample(m,b.loaded),this.clearTimer(),a.loader&&(this.fragCurrent=this.partCurrent=null,a.loader.abort()),t.trigger(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:a,part:r,stats:b})},i.onFragLoaded=function(a,r){var t=r.frag,d=r.part;if(t.type===h.PlaylistLevelType.MAIN&&Object(O.isFiniteNumber)(t.sn)){var v=d?d.stats:t.stats,y=d?d.duration:t.duration;if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var b=this.hls.levels[t.level],g=(b.loaded?b.loaded.bytes:0)+v.loaded,m=(b.loaded?b.loaded.duration:0)+y;b.loaded={bytes:g,duration:m},b.realBitrate=Math.round(8*g/m)}if(t.bitrateTest){var _={stats:v,frag:t,part:d,id:t.type};this.onFragBuffered(S.Events.FRAG_BUFFERED,_),t.bitrateTest=!1}}},i.onFragBuffered=function(a,r){var t=r.frag,d=r.part,v=d?d.stats:t.stats;if(v.aborted)return;if(t.type!==h.PlaylistLevelType.MAIN||t.sn==="initSegment")return;var y=v.parsing.end-v.loading.start;this.bwEstimator.sample(y,v.loaded),v.bwEstimate=this.bwEstimator.getEstimate(),t.bitrateTest?this.bitrateTestDelay=y/1e3:this.bitrateTestDelay=0},i.onError=function(a,r){switch(r.details){case C.ErrorDetails.FRAG_LOAD_ERROR:case C.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},i.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},i.getNextABRAutoLevel=function(){var a=this.fragCurrent,r=this.partCurrent,t=this.hls,d=t.maxAutoLevel,v=t.config,y=t.minAutoLevel,b=t.media,g=r?r.duration:a?a.duration:0,m=b?b.currentTime:0,_=b&&b.playbackRate!==0?Math.abs(b.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():v.abrEwmaDefaultEstimate,f=(A.BufferHelper.bufferInfo(b,m,v.maxBufferHole).end-m)/_,E=this.findBestLevel(x,y,d,f,v.abrBandWidthFactor,v.abrBandWidthUpFactor);if(E>=0)return E;p.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var w=g?Math.min(g,v.maxStarvationDelay):v.maxStarvationDelay,T=v.abrBandWidthFactor,R=v.abrBandWidthUpFactor;if(!f){var N=this.bitrateTestDelay;if(N){var j=g?Math.min(g,v.maxLoadingDelay):v.maxLoadingDelay;w=j-N,p.logger.trace("bitrate test took "+Math.round(1e3*N)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*w)+" ms"),T=R=1}}return E=this.findBestLevel(x,y,d,f+w,T,R),Math.max(E,0)},i.findBestLevel=function(a,r,t,d,v,y){for(var b,g=this.fragCurrent,m=this.partCurrent,_=this.lastLoadedFragLevel,x=this.hls.levels,f=x[_],E=!!(f!=null&&(b=f.details)!==null&&b!==void 0&&b.live),w=f==null?void 0:f.codecSet,T=m?m.duration:g?g.duration:0,R=t;R>=r;R--){var N=x[R];if(!N||w&&N.codecSet!==w)continue;var j=N.details,W=(m?j==null?void 0:j.partTarget:j==null?void 0:j.averagetargetduration)||T,J=void 0;R<=_?J=v*a:J=y*a;var F=x[R].maxBitrate,k=F*W/J;if(p.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+R+"/"+Math.round(J)+"/"+F+"/"+W+"/"+d+"/"+k),J>F&&(!k||E&&!this.bitrateTestDelay||k<d))return R}return-1},s(o,[{key:"nextAutoLevel",get:function(){var a=this._nextAutoLevel,r=this.bwEstimator;if(a!==-1&&(!r||!r.canEstimate()))return a;var t=this.getNextABRAutoLevel();return a!==-1&&(t=Math.min(a,t)),t},set:function(a){this._nextAutoLevel=a}}]),o}();ee.default=n},"./src/controller/audio-stream-controller.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/polyfills/number.ts"),D=B("./src/controller/base-stream-controller.ts"),S=B("./src/events.ts"),A=B("./src/utils/buffer-helper.ts"),C=B("./src/controller/fragment-tracker.ts"),h=B("./src/types/level.ts"),p=B("./src/types/loader.ts"),c=B("./src/loader/fragment.ts"),s=B("./src/demux/chunk-cache.ts"),n=B("./src/demux/transmuxer-interface.ts"),o=B("./src/types/transmuxer.ts"),i=B("./src/controller/fragment-finders.ts"),l=B("./src/utils/discontinuities.ts"),a=B("./src/errors.ts"),r=B("./src/utils/logger.ts");function t(){return t=Object.assign||function(g){for(var m=1;m<arguments.length;m++){var _=arguments[m];for(var x in _)Object.prototype.hasOwnProperty.call(_,x)&&(g[x]=_[x])}return g},t.apply(this,arguments)}function d(g,m){g.prototype=Object.create(m.prototype),g.prototype.constructor=g,v(g,m)}function v(g,m){return v=Object.setPrototypeOf||function(x,f){return x.__proto__=f,x},v(g,m)}var y=100,b=function(g){d(m,g);function m(x,f){var E;return E=g.call(this,x,f,"[audio-stream-controller]")||this,E.videoBuffer=null,E.videoTrackCC=-1,E.waitingVideoCC=-1,E.audioSwitch=!1,E.trackId=-1,E.waitingData=null,E.mainDetails=null,E.bufferFlushed=!1,E._registerListeners(),E}var _=m.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._registerListeners=function(){var f=this.hls;f.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),f.on(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),f.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),f.on(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),f.on(S.Events.ERROR,this.onError,this),f.on(S.Events.BUFFER_RESET,this.onBufferReset,this),f.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),f.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),f.on(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),f.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_._unregisterListeners=function(){var f=this.hls;f.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),f.off(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),f.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),f.off(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),f.off(S.Events.ERROR,this.onError,this),f.off(S.Events.BUFFER_RESET,this.onBufferReset,this),f.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),f.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),f.off(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),f.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_.onInitPtsFound=function(f,E){var w=E.frag,T=E.id,R=E.initPTS;if(T==="main"){var N=w.cc;this.initPTS[w.cc]=R,this.log("InitPTS for cc: "+N+" found from main: "+R),this.videoTrackCC=N,this.state===D.State.WAITING_INIT_PTS&&this.tick()}},_.startLoad=function(f){if(!this.levels){this.startPosition=f,this.state=D.State.STOPPED;return}var E=this.lastCurrentTime;this.stopLoad(),this.setInterval(y),this.fragLoadError=0,E>0&&f===-1?(this.log("Override startPosition with lastCurrentTime @"+E.toFixed(3)),this.state=D.State.IDLE):(this.loadedmetadata=!1,this.state=D.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=f,this.tick()},_.doTick=function(){switch(this.state){case D.State.IDLE:this.doTickIdle();break;case D.State.WAITING_TRACK:{var f,E=this.levels,w=this.trackId,T=E==null||((f=E[w])===null||f===void 0)?void 0:f.details;if(T){if(this.waitForCdnTuneIn(T))break;this.state=D.State.WAITING_INIT_PTS}break}case D.State.FRAG_LOADING_WAITING_RETRY:{var R,N=performance.now(),j=this.retryDate;(!j||N>=j||(R=this.media)!==null&&R!==void 0&&R.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=D.State.IDLE);break}case D.State.WAITING_INIT_PTS:{var W=this.waitingData;if(W){var J=W.frag,F=W.part,k=W.cache,K=W.complete;if(this.initPTS[J.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=D.State.FRAG_LOADING;var Y=k.flush(),H={frag:J,part:F,payload:Y,networkDetails:null};this._handleFragmentLoadProgress(H),K&&g.prototype._handleFragmentLoadComplete.call(this,H)}else if(this.videoTrackCC!==this.waitingVideoCC)r.logger.log("Waiting fragment cc ("+J.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Q=this.getLoadPosition(),re=A.BufferHelper.bufferInfo(this.mediaBuffer,Q,this.config.maxBufferHole),oe=Object(i.fragmentWithinToleranceTest)(re.end,this.config.maxFragLookUpTolerance,J);oe<0&&(r.logger.log("Waiting fragment cc ("+J.cc+") @ "+J.start+" cancelled because another fragment at "+re.end+" is needed"),this.clearWaitingFragment())}}else this.state=D.State.IDLE}}this.onTickEnd()},_.clearWaitingFragment=function(){var f=this.waitingData;f&&(this.fragmentTracker.removeFragment(f.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=D.State.IDLE)},_.onTickEnd=function(){var f=this.media;if(!f||!f.readyState)return;var E=this.mediaBuffer?this.mediaBuffer:f,w=E.buffered;!this.loadedmetadata&&w.length&&(this.loadedmetadata=!0),this.lastCurrentTime=f.currentTime},_.doTickIdle=function(){var f,E,w=this.hls,T=this.levels,R=this.media,N=this.trackId,j=w.config;if(!T||!T[N])return;if(!R&&(this.startFragRequested||!j.startFragPrefetch))return;var W=T[N],J=W.details;if(!J||J.live&&this.levelLastLoaded!==N||this.waitForCdnTuneIn(J)){this.state=D.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,c.ElementaryStreamTypes.AUDIO,p.PlaylistLevelType.AUDIO));var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,p.PlaylistLevelType.AUDIO);if(F===null)return;var k=F.len,K=this.getMaxBufferLength(),Y=this.audioSwitch;if(k>=K&&!Y)return;if(!Y&&this._streamEnded(F,J)){w.trigger(S.Events.BUFFER_EOS,{type:"audio"}),this.state=D.State.ENDED;return}var H=J.fragments,Q=H[0].start,re=F.end;if(Y){var oe=this.getLoadPosition();re=oe,J.PTSKnown&&oe<Q&&((F.end>Q||F.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),R.currentTime=Q+.05))}var me=this.getNextFragment(re,J);if(!me){this.bufferFlushed=!0;return}((f=me.decryptdata)===null||f===void 0?void 0:f.keyFormat)==="identity"&&!((E=me.decryptdata)!==null&&E!==void 0&&E.key)?this.loadKey(me,J):this.loadFragment(me,J,re)},_.getMaxBufferLength=function(){var f=g.prototype.getMaxBufferLength.call(this),E=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,p.PlaylistLevelType.MAIN);return E===null?f:Math.max(f,E.len)},_.onMediaDetaching=function(){this.videoBuffer=null,g.prototype.onMediaDetaching.call(this)},_.onAudioTracksUpdated=function(f,E){var w=E.audioTracks;this.resetTransmuxer(),this.levels=w.map(function(T){return new h.Level(T)})},_.onAudioTrackSwitching=function(f,E){var w=!!E.url;this.trackId=E.id;var T=this.fragCurrent;T!=null&&T.loader&&T.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),w?this.setInterval(y):this.resetTransmuxer(),w?(this.audioSwitch=!0,this.state=D.State.IDLE):this.state=D.State.STOPPED,this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},_.onLevelLoaded=function(f,E){this.mainDetails=E.details},_.onAudioTrackLoaded=function(f,E){var w,T=this.levels,R=E.details,N=E.id;if(!T){this.warn("Audio tracks were reset while loading level "+N);return}this.log("Track "+N+" loaded ["+R.startSN+","+R.endSN+"],duration:"+R.totalduration);var j=T[N],W=0;if(R.live||(w=j.details)!==null&&w!==void 0&&w.live){var J=this.mainDetails;if(R.fragments[0]||(R.deltaUpdateFailed=!0),R.deltaUpdateFailed||!J)return;!j.details&&R.hasProgramDateTime&&J.hasProgramDateTime?(Object(l.alignMediaPlaylistByPDT)(R,J),W=R.fragments[0].start):W=this.alignPlaylists(R,j.details)}j.details=R,this.levelLastLoaded=N,!this.startFragRequested&&(this.mainDetails||!R.live)&&this.setStartPosition(j.details,W),this.state===D.State.WAITING_TRACK&&!this.waitForCdnTuneIn(R)&&(this.state=D.State.IDLE),this.tick()},_._handleFragmentLoadProgress=function(f){var E,w=f.frag,T=f.part,R=f.payload,N=this.config,j=this.trackId,W=this.levels;if(!W){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+w.sn+" of level "+w.level+" will not be buffered");return}var J=W[j];console.assert(J,"Audio track is defined on fragment load progress");var F=J.details;console.assert(F,"Audio track details are defined on fragment load progress");var k=N.defaultAudioCodec||J.audioCodec||"mp4a.40.2",K=this.transmuxer;K||(K=this.transmuxer=new n.default(this.hls,p.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Y=this.initPTS[w.cc],H=(E=w.initSegment)===null||E===void 0?void 0:E.data;if(Y!==void 0){var Q=!1,re=T?T.index:-1,oe=re!==-1,me=new o.ChunkMetadata(w.level,w.sn,w.stats.chunkCount,R.byteLength,re,oe);K.push(R,H,k,"",w,T,F.totalduration,Q,me,Y)}else{r.logger.log("Unknown video PTS for cc "+w.cc+", waiting for video PTS before demuxing audio frag "+w.sn+" of ["+F.startSN+" ,"+F.endSN+"],track "+j);var he=this.waitingData=this.waitingData||{frag:w,part:T,cache:new s.default,complete:!1},Ee=he.cache;Ee.push(new Uint8Array(R)),this.waitingVideoCC=this.videoTrackCC,this.state=D.State.WAITING_INIT_PTS}},_._handleFragmentLoadComplete=function(f){if(this.waitingData){this.waitingData.complete=!0;return}g.prototype._handleFragmentLoadComplete.call(this,f)},_.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},_.onBufferCreated=function(f,E){var w=E.tracks.audio;w&&(this.mediaBuffer=w.buffer),E.tracks.video&&(this.videoBuffer=E.tracks.video.buffer)},_.onFragBuffered=function(f,E){var w=E.frag,T=E.part;if(w.type!==p.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(w)){this.warn("Fragment "+w.sn+(T?" p: "+T.index:"")+" of level "+w.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}w.sn!=="initSegment"&&(this.fragPrevious=w,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(w,T)},_.onError=function(f,E){switch(E.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(p.PlaylistLevelType.AUDIO,E);break;case a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==D.State.ERROR&&this.state!==D.State.STOPPED&&(this.state=E.fatal?D.State.ERROR:D.State.IDLE,this.warn(E.details+" while loading frag, switching to "+this.state+" state"));break;case a.ErrorDetails.BUFFER_FULL_ERROR:if(E.parent==="audio"&&(this.state===D.State.PARSING||this.state===D.State.PARSED)){var w=!0,T=this.getFwdBufferInfo(this.mediaBuffer,p.PlaylistLevelType.AUDIO);T&&T.len>.5&&(w=!this.reduceMaxBufferLength(T.len)),w&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,g.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},_.onBufferFlushed=function(f,E){var w=E.type;w===c.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},_._handleTransmuxComplete=function(f){var E,w="audio",T=this.hls,R=f.remuxResult,N=f.chunkMeta,j=this.getCurrentContext(N);if(!j){this.warn("The loading context changed while buffering fragment "+N.sn+" of level "+N.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(N.level);return}var W=j.frag,J=j.part,F=R.audio,k=R.text,K=R.id3,Y=R.initSegment;if(this.fragContextChanged(W))return;if(this.state=D.State.PARSING,this.audioSwitch&&F&&this.completeAudioSwitch(),Y!=null&&Y.tracks&&(this._bufferInitSegment(Y.tracks,W,N),T.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:w,tracks:Y.tracks})),F){var H=F.startPTS,Q=F.endPTS,re=F.startDTS,oe=F.endDTS;J&&(J.elementaryStreams[c.ElementaryStreamTypes.AUDIO]={startPTS:H,endPTS:Q,startDTS:re,endDTS:oe}),W.setElementaryStreamInfo(c.ElementaryStreamTypes.AUDIO,H,Q,re,oe),this.bufferFragmentData(F,W,J,N)}if(K!=null&&(E=K.samples)!==null&&E!==void 0&&E.length){var me=t({frag:W,id:w},K);T.trigger(S.Events.FRAG_PARSING_METADATA,me)}if(k){var he=t({frag:W,id:w},k);T.trigger(S.Events.FRAG_PARSING_USERDATA,he)}},_._bufferInitSegment=function(f,E,w){if(this.state!==D.State.PARSING)return;f.video&&delete f.video;var T=f.audio;if(!T)return;T.levelCodec=T.codec,T.id="audio",this.log("Init audio buffer, container:"+T.container+", codecs[parsed]=["+T.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,f);var R=T.initSegment;if(R!=null&&R.byteLength){var N={type:"audio",frag:E,part:null,chunkMeta:w,parent:E.type,data:R};this.hls.trigger(S.Events.BUFFER_APPENDING,N)}this.tick()},_.loadFragment=function(f,E,w){var T=this.fragmentTracker.getState(f);this.fragCurrent=f,(this.audioSwitch||T===C.FragmentState.NOT_LOADED||T===C.FragmentState.PARTIAL)&&(f.sn==="initSegment"?this._loadInitSegment(f):E.live&&!Object(O.isFiniteNumber)(this.initPTS[f.cc])?(this.log("Waiting for video PTS in continuity counter "+f.cc+" of live stream before loading audio fragment "+f.sn+" of level "+this.trackId),this.state=D.State.WAITING_INIT_PTS):(this.startFragRequested=!0,g.prototype.loadFragment.call(this,f,E,w)))},_.completeAudioSwitch=function(){var f=this.hls,E=this.media,w=this.trackId;E&&(this.log("Switching audio track : flushing all audio"),g.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,f.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:w})},m}(D.default);ee.default=b},"./src/controller/audio-track-controller.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/events.ts"),D=B("./src/errors.ts"),S=B("./src/controller/base-playlist-controller.ts"),A=B("./src/types/loader.ts");function C(n,o){for(var i=0;i<o.length;i++){var l=o[i];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(n,l.key,l)}}function h(n,o,i){return o&&C(n.prototype,o),i&&C(n,i),n}function p(n,o){n.prototype=Object.create(o.prototype),n.prototype.constructor=n,c(n,o)}function c(n,o){return c=Object.setPrototypeOf||function(l,a){return l.__proto__=a,l},c(n,o)}var s=function(n){p(o,n);function o(l){var a;return a=n.call(this,l,"[audio-track-controller]")||this,a.tracks=[],a.groupId=null,a.tracksInGroup=[],a.trackId=-1,a.trackName="",a.selectDefaultTrack=!0,a.registerListeners(),a}var i=o.prototype;return i.registerListeners=function(){var a=this.hls;a.on(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(O.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(O.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(O.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.on(O.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),a.on(O.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var a=this.hls;a.off(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(O.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(O.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(O.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.off(O.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),a.off(O.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,n.prototype.destroy.call(this)},i.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},i.onManifestParsed=function(a,r){this.tracks=r.audioTracks||[]},i.onAudioTrackLoaded=function(a,r){var t=r.id,d=r.details,v=this.tracksInGroup[t];if(!v){this.warn("Invalid audio track id "+t);return}var y=v.details;v.details=r.details,this.log("audioTrack "+t+" loaded ["+d.startSN+"-"+d.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,r,y))},i.onLevelLoading=function(a,r){this.switchLevel(r.level)},i.onLevelSwitching=function(a,r){this.switchLevel(r.level)},i.switchLevel=function(a){var r=this.hls.levels[a];if(!(r!=null&&r.audioGroupIds))return;var t=r.audioGroupIds[r.urlId];if(this.groupId!==t){this.groupId=t;var d=this.tracks.filter(function(y){return!t||y.groupId===t});this.selectDefaultTrack&&!d.some(function(y){return y.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=d;var v={audioTracks:d};this.log("Updating audio tracks, "+d.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(O.Events.AUDIO_TRACKS_UPDATED,v),this.selectInitialTrack()}},i.onError=function(a,r){if(n.prototype.onError.call(this,a,r),r.fatal||!r.context)return;r.context.type===A.PlaylistContextType.AUDIO_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.retryLoadingOrFail(r)},i.setAudioTrack=function(a){var r=this.tracksInGroup;if(a<0||a>=r.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var t=r[this.trackId];this.log("Now switching to audio-track index "+a);var d=r[a],v=d.id,y=d.groupId,b=y===void 0?"":y,g=d.name,m=d.type,_=d.url;if(this.trackId=a,this.trackName=g,this.selectDefaultTrack=!1,this.hls.trigger(O.Events.AUDIO_TRACK_SWITCHING,{id:v,groupId:b,name:g,type:m,url:_}),d.details&&!d.details.live)return;var x=this.switchParams(d.url,t==null?void 0:t.details);this.loadPlaylist(x)},i.selectInitialTrack=function(){var a=this.tracksInGroup;console.assert(a.length,"Initial audio track should be selected when tracks are known");var r=this.trackName,t=this.findTrackId(r)||this.findTrackId();t!==-1?this.setAudioTrack(t):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(O.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},i.findTrackId=function(a){for(var r=this.tracksInGroup,t=0;t<r.length;t++){var d=r[t];if((!this.selectDefaultTrack||d.default)&&(!a||a===d.name))return d.id}return-1},i.loadPlaylist=function(a){var r=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(r)){var t=r.id,d=r.groupId,v=r.url;if(a)try{v=a.addDirectives(v)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("loading audio-track playlist for id: "+t),this.clearTimer(),this.hls.trigger(O.Events.AUDIO_TRACK_LOADING,{url:v,id:t,groupId:d,deliveryDirectives:a||null})}},h(o,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(a){this.selectDefaultTrack=!1,this.setAudioTrack(a)}}]),o}(S.default);ee.default=s},"./src/controller/base-playlist-controller.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return h});var O=B("./src/polyfills/number.ts"),D=B("./src/types/level.ts"),S=B("./src/controller/level-helper.ts"),A=B("./src/utils/logger.ts"),C=B("./src/errors.ts"),h=function(){function p(s,n){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=A.logger.log.bind(A.logger,n+":"),this.warn=A.logger.warn.bind(A.logger,n+":"),this.hls=s}var c=p.prototype;return c.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},c.onError=function(n,o){o.fatal&&o.type===C.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},c.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},c.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},c.stopLoad=function(){this.canLoad=!1,this.clearTimer()},c.switchParams=function(n,o){var i=o==null?void 0:o.renditionReports;if(i)for(var l=0;l<i.length;l++){var a=i[l],r=""+a.URI;if(r===n.substr(-r.length)){var t=parseInt(a["LAST-MSN"]),d=parseInt(a["LAST-PART"]);if(o&&this.hls.config.lowLatencyMode){var v=Math.min(o.age-o.partTarget,o.targetduration);d!==void 0&&v>o.partTarget&&(d+=1)}if(Object(O.isFiniteNumber)(t))return new D.HlsUrlParameters(t,Object(O.isFiniteNumber)(d)?d:void 0,D.HlsSkip.No)}}},c.loadPlaylist=function(n){},c.shouldLoadTrack=function(n){return this.canLoad&&n&&!!n.url&&(!n.details||n.details.live)},c.playlistLoaded=function(n,o,i){var l=this,a=o.details,r=o.stats,t=r.loading.end?Math.max(0,self.performance.now()-r.loading.end):0;if(a.advancedDateTime=Date.now()-t,a.live||i!=null&&i.live){if(a.reloaded(i),i&&this.log("live playlist "+n+" "+(a.advanced?"REFRESHED "+a.lastPartSn+"-"+a.lastPartIndex:"MISSED")),i&&a.fragments.length>0&&Object(S.mergeDetails)(i,a),!this.canLoad||!a.live)return;var d,v=void 0,y=void 0;if(a.canBlockReload&&a.endSN&&a.advanced){var b=this.hls.config.lowLatencyMode,g=a.lastPartSn,m=a.endSN,_=a.lastPartIndex,x=_!==-1,f=g===m,E=b?0:_;x?(v=f?m+1:g,y=f?E:_+1):v=m+1;var w=a.age,T=w+a.ageHeader,R=Math.min(T-a.partTarget,a.targetduration*1.5);if(R>0){if(i&&R>i.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+i.tuneInGoal+" to: "+R+" with playlist age: "+a.age),R=0;else{var N=Math.floor(R/a.targetduration);if(v+=N,y!==void 0){var j=Math.round(R%a.targetduration/a.partTarget);y+=j}this.log("CDN Tune-in age: "+a.ageHeader+"s last advanced "+w.toFixed(2)+"s goal: "+R+" skip sn "+N+" to part "+y)}a.tuneInGoal=R}if(d=this.getDeliveryDirectives(a,o.deliveryDirectives,v,y),b||!f){this.loadPlaylist(d);return}}else d=this.getDeliveryDirectives(a,o.deliveryDirectives,v,y);var W=Object(S.computeReloadInterval)(a,r);v!==void 0&&a.canBlockReload&&(W-=a.partTarget||1),this.log("reload live playlist "+n+" in "+Math.round(W)+" ms"),this.timer=self.setTimeout(function(){return l.loadPlaylist(d)},W)}else this.clearTimer()},c.getDeliveryDirectives=function(n,o,i,l){var a=Object(D.getSkipValue)(n,i);return o!=null&&o.skip&&n.deltaUpdateFailed&&(i=o.msn,l=o.part,a=D.HlsSkip.No),new D.HlsUrlParameters(i,l,a)},c.retryLoadingOrFail=function(n){var o=this,i=this.hls.config,l=this.retryCount<i.levelLoadingMaxRetry;if(l){var a;if(this.retryCount++,n.details.indexOf("LoadTimeOut")>-1&&(a=n.context)!==null&&a!==void 0&&a.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+n.details+'"'),this.loadPlaylist();else{var r=Math.min(Math.pow(2,this.retryCount)*i.levelLoadingRetryDelay,i.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return o.loadPlaylist()},r),this.warn("retry playlist loading #"+this.retryCount+" in "+r+' ms after "'+n.details+'"')}}else this.warn('cannot recover from error "'+n.details+'"'),this.clearTimer(),n.fatal=!0;return l},p}()},"./src/controller/base-stream-controller.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"State",function(){return m}),B.d(ee,"default",function(){return _});var O=B("./src/polyfills/number.ts"),D=B("./src/task-loop.ts"),S=B("./src/controller/fragment-tracker.ts"),A=B("./src/utils/buffer-helper.ts"),C=B("./src/utils/logger.ts"),h=B("./src/events.ts"),p=B("./src/errors.ts"),c=B("./src/types/transmuxer.ts"),s=B("./src/utils/mp4-tools.ts"),n=B("./src/utils/discontinuities.ts"),o=B("./src/controller/fragment-finders.ts"),i=B("./src/controller/level-helper.ts"),l=B("./src/loader/fragment-loader.ts"),a=B("./src/crypt/decrypter.ts"),r=B("./src/utils/time-ranges.ts"),t=B("./src/types/loader.ts");function d(x,f){for(var E=0;E<f.length;E++){var w=f[E];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(x,w.key,w)}}function v(x,f,E){return f&&d(x.prototype,f),E&&d(x,E),x}function y(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function b(x,f){x.prototype=Object.create(f.prototype),x.prototype.constructor=x,g(x,f)}function g(x,f){return g=Object.setPrototypeOf||function(w,T){return w.__proto__=T,w},g(x,f)}var m={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"},_=function(x){b(f,x);function f(w,T,R){var N;return N=x.call(this)||this,N.hls=void 0,N.fragPrevious=null,N.fragCurrent=null,N.fragmentTracker=void 0,N.transmuxer=null,N._state=m.STOPPED,N.media=void 0,N.mediaBuffer=void 0,N.config=void 0,N.bitrateTest=!1,N.lastCurrentTime=0,N.nextLoadPosition=0,N.startPosition=0,N.loadedmetadata=!1,N.fragLoadError=0,N.retryDate=0,N.levels=null,N.fragmentLoader=void 0,N.levelLastLoaded=null,N.startFragRequested=!1,N.decrypter=void 0,N.initPTS=[],N.onvseeking=null,N.onvended=null,N.logPrefix="",N.log=void 0,N.warn=void 0,N.logPrefix=R,N.log=C.logger.log.bind(C.logger,R+":"),N.warn=C.logger.warn.bind(C.logger,R+":"),N.hls=w,N.fragmentLoader=new l.default(w.config),N.fragmentTracker=T,N.config=w.config,N.decrypter=new a.default(w,w.config),w.on(h.Events.KEY_LOADED,N.onKeyLoaded,y(N)),N}var E=f.prototype;return E.doTick=function(){this.onTickEnd()},E.onTickEnd=function(){},E.startLoad=function(T){},E.stopLoad=function(){this.fragmentLoader.abort();var T=this.fragCurrent;T&&this.fragmentTracker.removeFragment(T),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=m.STOPPED},E._streamEnded=function(T,R){var N=this.fragCurrent,j=this.fragmentTracker;if(!R.live&&N&&N.sn===R.endSN&&!T.nextStart){var W=j.getState(N);return W===S.FragmentState.PARTIAL||W===S.FragmentState.OK}return!1},E.onMediaAttached=function(T,R){var N=this.media=this.mediaBuffer=R.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),N.addEventListener("seeking",this.onvseeking),N.addEventListener("ended",this.onvended);var j=this.config;this.levels&&j.autoStartLoad&&this.state===m.STOPPED&&this.startLoad(j.startPosition)},E.onMediaDetaching=function(){var T=this.media;T!=null&&T.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),T&&(T.removeEventListener("seeking",this.onvseeking),T.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},E.onMediaSeeking=function(){var T=this.config,R=this.fragCurrent,N=this.media,j=this.mediaBuffer,W=this.state,J=N?N.currentTime:0,F=A.BufferHelper.bufferInfo(j||N,J,T.maxBufferHole);if(this.log("media seeking to "+(Object(O.isFiniteNumber)(J)?J.toFixed(3):J)+", state: "+W),W===m.ENDED)this.resetLoadingState();else if(R&&!F.len){var k=T.maxFragLookUpTolerance,K=R.start-k,Y=R.start+R.duration+k,H=J>Y;(J<K||H)&&(H&&R.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),R.loader.abort()),this.resetLoadingState())}N&&(this.lastCurrentTime=J),!this.loadedmetadata&&!F.len&&(this.nextLoadPosition=this.startPosition=J),this.tickImmediate()},E.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},E.onKeyLoaded=function(T,R){if(this.state!==m.KEY_LOADING||R.frag!==this.fragCurrent||!this.levels)return;this.state=m.IDLE;var N=this.levels[R.frag.level].details;N&&this.loadFragment(R.frag,N,R.frag.start)},E.onHandlerDestroying=function(){this.stopLoad(),x.prototype.onHandlerDestroying.call(this)},E.onHandlerDestroyed=function(){this.state=m.STOPPED,this.hls.off(h.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,x.prototype.onHandlerDestroyed.call(this)},E.loadKey=function(T,R){this.log("Loading key for "+T.sn+" of ["+R.startSN+"-"+R.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+T.level),this.state=m.KEY_LOADING,this.fragCurrent=T,this.hls.trigger(h.Events.KEY_LOADING,{frag:T})},E.loadFragment=function(T,R,N){this._loadFragForPlayback(T,R,N)},E._loadFragForPlayback=function(T,R,N){var j=this,W=function(F){if(j.fragContextChanged(T)){j.warn("Fragment "+T.sn+(F.part?" p: "+F.part.index:"")+" of level "+T.level+" was dropped during download."),j.fragmentTracker.removeFragment(T);return}T.stats.chunkCount++,j._handleFragmentLoadProgress(F)};this._doFragLoad(T,R,N,W).then(function(J){if(!J)return;j.fragLoadError=0;var F=j.state;if(j.fragContextChanged(T)){(F===m.FRAG_LOADING||F===m.BACKTRACKING||!j.fragCurrent&&F===m.PARSING)&&(j.fragmentTracker.removeFragment(T),j.state=m.IDLE);return}if("payload"in J&&(j.log("Loaded fragment "+T.sn+" of level "+T.level),j.hls.trigger(h.Events.FRAG_LOADED,J),j.state===m.BACKTRACKING)){j.fragmentTracker.backtrack(T,J),j.resetFragmentLoading(T);return}j._handleFragmentLoadComplete(J)}).catch(function(J){j.warn(J),j.resetFragmentLoading(T)})},E.flushMainBuffer=function(T,R,N){if(N===void 0&&(N=null),!(T-R))return;var j={startOffset:T,endOffset:R,type:N};this.fragLoadError=0,this.hls.trigger(h.Events.BUFFER_FLUSHING,j)},E._loadInitSegment=function(T){var R=this;this._doFragLoad(T).then(function(N){if(!N||R.fragContextChanged(T)||!R.levels)throw new Error("init load aborted");return N}).then(function(N){var j=R.hls,W=N.payload,J=T.decryptdata;if(W&&W.byteLength>0&&J&&J.key&&J.iv&&J.method==="AES-128"){var F=self.performance.now();return R.decrypter.webCryptoDecrypt(new Uint8Array(W),J.key.buffer,J.iv.buffer).then(function(k){var K=self.performance.now();return j.trigger(h.Events.FRAG_DECRYPTED,{frag:T,payload:k,stats:{tstart:F,tdecrypt:K}}),N.payload=k,N})}return N}).then(function(N){var j=R.fragCurrent,W=R.hls,J=R.levels;if(!J)throw new Error("init load aborted, missing levels");var F=J[T.level].details;console.assert(F,"Level details are defined when init segment is loaded");var k=T.stats;R.state=m.IDLE,R.fragLoadError=0,T.data=new Uint8Array(N.payload),k.parsing.start=k.buffering.start=self.performance.now(),k.parsing.end=k.buffering.end=self.performance.now(),N.frag===j&&W.trigger(h.Events.FRAG_BUFFERED,{stats:k,frag:j,part:null,id:T.type}),R.tick()}).catch(function(N){R.warn(N),R.resetFragmentLoading(T)})},E.fragContextChanged=function(T){var R=this.fragCurrent;return!T||!R||T.level!==R.level||T.sn!==R.sn||T.urlId!==R.urlId},E.fragBufferedComplete=function(T,R){var N=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+T.type+" sn: "+T.sn+(R?" part: "+R.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+T.level+" "+r.default.toString(A.BufferHelper.getBuffered(N))),this.state=m.IDLE,this.tick()},E._handleFragmentLoadComplete=function(T){var R=this.transmuxer;if(!R)return;var N=T.frag,j=T.part,W=T.partsLoaded,J=!W||W.length===0||W.some(function(k){return!k}),F=new c.ChunkMetadata(N.level,N.sn,N.stats.chunkCount+1,0,j?j.index:-1,!J);R.flush(F)},E._handleFragmentLoadProgress=function(T){},E._doFragLoad=function(T,R,N,j){var W=this;if(N===void 0&&(N=null),!this.levels)throw new Error("frag load aborted, missing levels");if(N=Math.max(T.start,N||0),this.config.lowLatencyMode&&R){var J=R.partList;if(J&&j){N>T.end&&R.fragmentHint&&(T=R.fragmentHint);var F=this.getNextPart(J,T,N);if(F>-1){var k=J[F];return this.log("Loading part sn: "+T.sn+" p: "+k.index+" cc: "+T.cc+" of playlist ["+R.startSN+"-"+R.endSN+"] parts [0-"+F+"-"+(J.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+T.level+", target: "+parseFloat(N.toFixed(3))),this.nextLoadPosition=k.start+k.duration,this.state=m.FRAG_LOADING,this.hls.trigger(h.Events.FRAG_LOADING,{frag:T,part:J[F],targetBufferTime:N}),this.doFragPartsLoad(T,J,F,j).catch(function(K){return W.handleFragLoadError(K)})}else if(!T.url||this.loadedEndOfParts(J,N))return Promise.resolve(null)}}return this.log("Loading fragment "+T.sn+" cc: "+T.cc+" "+(R?"of ["+R.startSN+"-"+R.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+T.level+", target: "+parseFloat(N.toFixed(3))),Object(O.isFiniteNumber)(T.sn)&&!this.bitrateTest&&(this.nextLoadPosition=T.start+T.duration),this.state=m.FRAG_LOADING,this.hls.trigger(h.Events.FRAG_LOADING,{frag:T,targetBufferTime:N}),this.fragmentLoader.load(T,j).catch(function(K){return W.handleFragLoadError(K)})},E.doFragPartsLoad=function(T,R,N,j){var W=this;return new Promise(function(J,F){var k=[],K=function Y(H){var Q=R[H];W.fragmentLoader.loadPart(T,Q,j).then(function(re){k[Q.index]=re;var oe=re.part;W.hls.trigger(h.Events.FRAG_LOADED,re);var me=R[H+1];if(me&&me.fragment===T)Y(H+1);else return J({frag:T,part:oe,partsLoaded:k})}).catch(F)};K(N)})},E.handleFragLoadError=function(T){var R=T.data;return R&&R.details===p.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(R.frag,R.part):this.hls.trigger(h.Events.ERROR,R),null},E._handleTransmuxerFlush=function(T){var R=this.getCurrentContext(T);if(!R||this.state!==m.PARSING){this.fragCurrent||(this.state=m.IDLE);return}var N=R.frag,j=R.part,W=R.level,J=self.performance.now();N.stats.parsing.end=J,j&&(j.stats.parsing.end=J),this.updateLevelTiming(N,j,W,T.partial)},E.getCurrentContext=function(T){var R=this.levels,N=T.level,j=T.sn,W=T.part;if(!R||!R[N])return this.warn("Levels object was unset while buffering fragment "+j+" of level "+N+". The current chunk will not be buffered."),null;var J=R[N],F=W>-1?Object(i.getPartWith)(J,j,W):null,k=F?F.fragment:Object(i.getFragmentWithSN)(J,j,this.fragCurrent);return k?{frag:k,part:F,level:J}:null},E.bufferFragmentData=function(T,R,N,j){if(!T||this.state!==m.PARSING)return;var W=T.data1,J=T.data2,F=W;if(W&&J&&(F=Object(s.appendUint8Array)(W,J)),!F||!F.length)return;var k={type:T.type,frag:R,part:N,chunkMeta:j,parent:R.type,data:F};this.hls.trigger(h.Events.BUFFER_APPENDING,k),T.dropped&&T.independent&&!N&&this.flushBufferGap(R)},E.flushBufferGap=function(T){var R=this.media;if(!R)return;if(!A.BufferHelper.isBuffered(R,R.currentTime)){this.flushMainBuffer(0,T.start);return}var N=R.currentTime,j=A.BufferHelper.bufferInfo(R,N,0),W=T.duration,J=Math.min(this.config.maxFragLookUpTolerance*2,W*.25),F=Math.max(Math.min(T.start-J,j.end-J),N+J);T.start-F>J&&this.flushMainBuffer(F,T.start)},E.getFwdBufferInfo=function(T,R){var N=this.config,j=this.getLoadPosition();if(!Object(O.isFiniteNumber)(j))return null;var W=A.BufferHelper.bufferInfo(T,j,N.maxBufferHole);if(W.len===0&&W.nextStart!==void 0){var J=this.fragmentTracker.getBufferedFrag(j,R);if(J&&W.nextStart<J.end)return A.BufferHelper.bufferInfo(T,j,Math.max(W.nextStart,N.maxBufferHole))}return W},E.getMaxBufferLength=function(T){var R=this.config,N;return T?N=Math.max(8*R.maxBufferSize/T,R.maxBufferLength):N=R.maxBufferLength,Math.min(N,R.maxMaxBufferLength)},E.reduceMaxBufferLength=function(T){var R=this.config,N=T||R.maxBufferLength;return R.maxMaxBufferLength>=N?(R.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+R.maxMaxBufferLength+"s"),!0):!1},E.getNextFragment=function(T,R){var N,j,W=R.fragments,J=W.length;if(!J)return null;var F=this.config,k=W[0].start,K;if(R.live){var Y=F.initialLiveManifestSize;if(J<Y)return this.warn("Not enough fragments to start playback (have: "+J+", need: "+Y+")"),null;!R.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(K=this.getInitialLiveFragment(R,W),this.startPosition=K?this.hls.liveSyncPosition||K.start:T)}else T<=k&&(K=W[0]);if(!K){var H=F.lowLatencyMode?R.partEnd:R.fragmentEnd;K=this.getFragmentAtPosition(T,H,R)}return(N=K)!==null&&N!==void 0&&N.initSegment&&!((j=K)!==null&&j!==void 0&&j.initSegment.data)&&!this.bitrateTest&&(K=K.initSegment),K},E.getNextPart=function(T,R,N){for(var j=-1,W=!1,J=!0,F=0,k=T.length;F<k;F++){var K=T[F];if(J=J&&!K.independent,j>-1&&N<K.start)break;var Y=K.loaded;!Y&&(W||K.independent||J)&&K.fragment===R&&(j=F),W=Y}return j},E.loadedEndOfParts=function(T,R){var N=T[T.length-1];return N&&R>N.start&&N.loaded},E.getInitialLiveFragment=function(T,R){var N=this.fragPrevious,j=null;if(N){if(T.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+N.programDateTime),j=Object(o.findFragmentByPDT)(R,N.endProgramDateTime,this.config.maxFragLookUpTolerance)),!j){var W=N.sn+1;if(W>=T.startSN&&W<=T.endSN){var J=R[W-T.startSN];N.cc===J.cc&&(j=J,this.log("Live playlist, switching playlist, load frag with next SN: "+j.sn))}j||(j=Object(o.findFragWithCC)(R,N.cc),j&&this.log("Live playlist, switching playlist, load frag with same CC: "+j.sn))}}else{var F=this.hls.liveSyncPosition;F!==null&&(j=this.getFragmentAtPosition(F,this.bitrateTest?T.fragmentEnd:T.edge,T))}return j},E.getFragmentAtPosition=function(T,R,N){var j=this.config,W=this.fragPrevious,J=N.fragments,F=N.endSN,k=N.fragmentHint,K=j.maxFragLookUpTolerance,Y=!!(j.lowLatencyMode&&N.partList&&k);Y&&k&&!this.bitrateTest&&(J=J.concat(k),F=k.sn);var H;if(T<R){var Q=T>R-K?0:K;H=Object(o.findFragmentByPTS)(W,J,T,Q)}else H=J[J.length-1];if(H){var re=H.sn-N.startSN,oe=W&&H.level===W.level,me=J[re+1],he=this.fragmentTracker.getState(H);if(he===S.FragmentState.BACKTRACKED){H=null;for(var Ee=re;J[Ee]&&this.fragmentTracker.getState(J[Ee])===S.FragmentState.BACKTRACKED;)W?H=J[Ee--]:H=J[--Ee];H||(H=me)}else W&&H.sn===W.sn&&!Y&&(oe&&(H.sn<F&&this.fragmentTracker.getState(me)!==S.FragmentState.OK?(this.log("SN "+H.sn+" just loaded, load next one: "+me.sn),H=me):H=null))}return H},E.synchronizeToLiveEdge=function(T){var R=this.config,N=this.media;if(!N)return;var j=this.hls.liveSyncPosition,W=N.currentTime,J=T.fragments[0].start,F=T.edge,k=W>=J-R.maxFragLookUpTolerance&&W<=F;if(j!==null&&N.duration>j&&(W<j||!k)){var K=R.liveMaxLatencyDuration!==void 0?R.liveMaxLatencyDuration:R.liveMaxLatencyDurationCount*T.targetduration;(!k&&N.readyState<4||W<F-K)&&(this.loadedmetadata||(this.nextLoadPosition=j),N.readyState&&(this.warn("Playback: "+W.toFixed(3)+" is located too far from the end of live sliding playlist: "+F+", reset currentTime to : "+j.toFixed(3)),N.currentTime=j))}},E.alignPlaylists=function(T,R){var N=this.levels,j=this.levelLastLoaded,W=this.fragPrevious,J=j!==null?N[j]:null,F=T.fragments.length;if(!F)return this.warn("No fragments in live playlist"),0;var k=T.fragments[0].start,K=!R,Y=T.alignedSliding&&Object(O.isFiniteNumber)(k);if(K||!Y&&!k){Object(n.alignStream)(W,J,T);var H=T.fragments[0].start;return this.log("Live playlist sliding: "+H.toFixed(2)+" start-sn: "+(R?R.startSN:"na")+"->"+T.startSN+" prev-sn: "+(W?W.sn:"na")+" fragments: "+F),H}return k},E.waitForCdnTuneIn=function(T){var R=3;return T.live&&T.canBlockReload&&T.tuneInGoal>Math.max(T.partHoldBack,T.partTarget*R)},E.setStartPosition=function(T,R){var N=this.startPosition;if(N<R&&(N=-1),N===-1||this.lastCurrentTime===-1){var j=T.startTimeOffset;Object(O.isFiniteNumber)(j)?(N=R+j,j<0&&(N+=T.totalduration),N=Math.min(Math.max(R,N),R+T.totalduration),this.log("Start time offset "+j+" found in playlist, adjust startPosition to "+N),this.startPosition=N):T.live?N=this.hls.liveSyncPosition||R:this.startPosition=N=0,this.lastCurrentTime=N}this.nextLoadPosition=N},E.getLoadPosition=function(){var T=this.media,R=0;return this.loadedmetadata&&T?R=T.currentTime:this.nextLoadPosition&&(R=this.nextLoadPosition),R},E.handleFragLoadAborted=function(T,R){this.transmuxer&&T.sn!=="initSegment"&&T.stats.aborted&&(this.warn("Fragment "+T.sn+(R?" part"+R.index:"")+" of level "+T.level+" was aborted"),this.resetFragmentLoading(T))},E.resetFragmentLoading=function(T){(!this.fragCurrent||!this.fragContextChanged(T))&&(this.state=m.IDLE)},E.onFragmentOrKeyLoadError=function(T,R){if(R.fatal)return;var N=R.frag;if(!N||N.type!==T)return;var j=this.fragCurrent;console.assert(j&&N.sn===j.sn&&N.level===j.level&&N.urlId===j.urlId,"Frag load error must match current frag to retry");var W=this.config;if(this.fragLoadError+1<=W.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(N.level))return;var J=Math.min(Math.pow(2,this.fragLoadError)*W.fragLoadingRetryDelay,W.fragLoadingMaxRetryTimeout);this.warn("Fragment "+N.sn+" of "+T+" "+N.level+" failed to load, retrying in "+J+"ms"),this.retryDate=self.performance.now()+J,this.fragLoadError++,this.state=m.FRAG_LOADING_WAITING_RETRY}else R.levelRetry?(T===t.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=m.IDLE):(C.logger.error(R.details+" reaches max retry, redispatch as fatal ..."),R.fatal=!0,this.hls.stopLoad(),this.state=m.ERROR)},E.afterBufferFlushed=function(T,R,N){if(!T)return;var j=A.BufferHelper.getBuffered(T);this.fragmentTracker.detectEvictedFragments(R,j,N),this.state===m.ENDED&&this.resetLoadingState()},E.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=m.IDLE},E.resetLiveStartWhenNotLoaded=function(T){if(!this.loadedmetadata){this.startFragRequested=!1;var R=this.levels?this.levels[T].details:null;if(R!=null&&R.live)return this.startPosition=-1,this.setStartPosition(R,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},E.updateLevelTiming=function(T,R,N,j){var W=this,J=N.details;console.assert(!!J,"level.details must be defined");var F=Object.keys(T.elementaryStreams).reduce(function(k,K){var Y=T.elementaryStreams[K];if(Y){var H=Y.endPTS-Y.startPTS;if(H<=0)return W.warn("Could not parse fragment "+T.sn+" "+K+" duration reliably ("+H+") resetting transmuxer to fallback to playlist timing"),W.resetTransmuxer(),k||!1;var Q=j?0:Object(i.updateFragPTSDTS)(J,T,Y.startPTS,Y.endPTS,Y.startDTS,Y.endDTS);return W.hls.trigger(h.Events.LEVEL_PTS_UPDATED,{details:J,level:N,drift:Q,type:K,frag:T,start:Y.startPTS,end:Y.endPTS}),!0}return k},!1);F?(this.state=m.PARSED,this.hls.trigger(h.Events.FRAG_PARSED,{frag:T,part:R})):this.resetLoadingState()},E.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},v(f,[{key:"state",get:function(){return this._state},set:function(T){var R=this._state;R!==T&&(this._state=T,this.log(R+"->"+T))}}]),f}(D.default)},"./src/controller/buffer-controller.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return o});var O=B("./src/polyfills/number.ts"),D=B("./src/events.ts"),S=B("./src/utils/logger.ts"),A=B("./src/errors.ts"),C=B("./src/utils/buffer-helper.ts"),h=B("./src/utils/mediasource-helper.ts"),p=B("./src/loader/fragment.ts"),c=B("./src/controller/buffer-operation-queue.ts"),s=Object(h.getMediaSource)(),n=/([ha]vc.)(?:\.[^.,]+)+/,o=function(){function i(a){var r=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 t=r.hls,d=r.media,v=r.mediaSource;S.logger.log("[buffer-controller]: Media source opened"),d&&(r.updateMediaElementDuration(),t.trigger(D.Events.MEDIA_ATTACHED,{media:d})),v&&v.removeEventListener("sourceopen",r._onMediaSourceOpen),r.checkPendingTracks()},this._onMediaSourceClose=function(){S.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){S.logger.log("[buffer-controller]: Media source ended")},this.hls=a,this._initSourceBuffer(),this.registerListeners()}var l=i.prototype;return l.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},l.destroy=function(){this.unregisterListeners(),this.details=null},l.registerListeners=function(){var r=this.hls;r.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(D.Events.BUFFER_RESET,this.onBufferReset,this),r.on(D.Events.BUFFER_APPENDING,this.onBufferAppending,this),r.on(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.on(D.Events.BUFFER_EOS,this.onBufferEos,this),r.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),r.on(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),r.on(D.Events.FRAG_PARSED,this.onFragParsed,this),r.on(D.Events.FRAG_CHANGED,this.onFragChanged,this)},l.unregisterListeners=function(){var r=this.hls;r.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(D.Events.BUFFER_RESET,this.onBufferReset,this),r.off(D.Events.BUFFER_APPENDING,this.onBufferAppending,this),r.off(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.off(D.Events.BUFFER_EOS,this.onBufferEos,this),r.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),r.off(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),r.off(D.Events.FRAG_PARSED,this.onFragParsed,this),r.off(D.Events.FRAG_CHANGED,this.onFragChanged,this)},l._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new c.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},l.onManifestParsed=function(r,t){var d=2;(t.audio&&!t.video||!t.altAudio)&&(d=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=d,this.details=null,S.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},l.onMediaAttaching=function(r,t){var d=this.media=t.media;if(d&&s){var v=this.mediaSource=new s;v.addEventListener("sourceopen",this._onMediaSourceOpen),v.addEventListener("sourceended",this._onMediaSourceEnded),v.addEventListener("sourceclose",this._onMediaSourceClose),d.src=self.URL.createObjectURL(v),this._objectUrl=d.src}},l.onMediaDetaching=function(){var r=this.media,t=this.mediaSource,d=this._objectUrl;if(t){if(S.logger.log("[buffer-controller]: media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(v){S.logger.warn("[buffer-controller]: onMediaDetaching: "+v.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),r&&(d&&self.URL.revokeObjectURL(d),r.src===d?(r.removeAttribute("src"),r.load()):S.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(D.Events.MEDIA_DETACHED,void 0)},l.onBufferReset=function(){var r=this;this.getSourceBufferTypes().forEach(function(t){var d=r.sourceBuffer[t];try{d&&(r.removeBufferListeners(t),r.mediaSource&&r.mediaSource.removeSourceBuffer(d),r.sourceBuffer[t]=void 0)}catch(v){S.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",v)}}),this._initSourceBuffer()},l.onBufferCodecs=function(r,t){var d=this,v=this.getSourceBufferTypes().length;if(Object.keys(t).forEach(function(y){if(v){var b=d.tracks[y];if(b&&typeof b.buffer.changeType=="function"){var g=t[y],m=g.codec,_=g.levelCodec,x=g.container,f=(b.levelCodec||b.codec).replace(n,"$1"),E=(_||m).replace(n,"$1");if(f!==E){var w=x+";codecs="+(_||m);d.appendChangeType(y,w)}}}else d.pendingTracks[y]=t[y]}),v)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},l.appendChangeType=function(r,t){var d=this,v=this.operationQueue,y={execute:function(){var g=d.sourceBuffer[r];g&&(S.logger.log("[buffer-controller]: changing "+r+" sourceBuffer type to "+t),g.changeType(t)),v.shiftAndExecuteNext(r)},onStart:function(){},onComplete:function(){},onError:function(g){S.logger.warn("[buffer-controller]: Failed to change "+r+" SourceBuffer type",g)}};v.append(y,r)},l.onBufferAppending=function(r,t){var d=this,v=this.hls,y=this.operationQueue,b=this.tracks,g=t.data,m=t.type,_=t.frag,x=t.part,f=t.chunkMeta,E=f.buffering[m],w=self.performance.now();E.start=w;var T=_.stats.buffering,R=x?x.stats.buffering:null;T.start===0&&(T.start=w),R&&R.start===0&&(R.start=w);var N=b.audio,j=m==="audio"&&f.id===1&&(N==null?void 0:N.container)==="audio/mpeg",W={execute:function(){if(E.executeStart=self.performance.now(),j){var F=d.sourceBuffer[m];if(F){var k=_.start-F.timestampOffset;Math.abs(k)>=.1&&(S.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+_.start+" (delta: "+k+") sn: "+_.sn+")"),F.timestampOffset=_.start)}}d.appendExecutor(g,m)},onStart:function(){},onComplete:function(){var F=self.performance.now();E.executeEnd=E.end=F,T.first===0&&(T.first=F),R&&R.first===0&&(R.first=F);var k=d.sourceBuffer,K={};for(var Y in k)K[Y]=C.BufferHelper.getBuffered(k[Y]);d.appendError=0,d.hls.trigger(D.Events.BUFFER_APPENDED,{type:m,frag:_,part:x,chunkMeta:f,parent:_.type,timeRanges:K})},onError:function(F){S.logger.error("[buffer-controller]: Error encountered while trying to append to the "+m+" SourceBuffer",F);var k={type:A.ErrorTypes.MEDIA_ERROR,parent:_.type,details:A.ErrorDetails.BUFFER_APPEND_ERROR,err:F,fatal:!1};F.code===DOMException.QUOTA_EXCEEDED_ERR?k.details=A.ErrorDetails.BUFFER_FULL_ERROR:(d.appendError++,k.details=A.ErrorDetails.BUFFER_APPEND_ERROR,d.appendError>v.config.appendErrorMaxRetry&&(S.logger.error("[buffer-controller]: Failed "+v.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),k.fatal=!0)),v.trigger(D.Events.ERROR,k)}};y.append(W,m)},l.onBufferFlushing=function(r,t){var d=this,v=this.operationQueue,y=function(g){return{execute:d.removeExecutor.bind(d,g,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){d.hls.trigger(D.Events.BUFFER_FLUSHED,{type:g})},onError:function(_){S.logger.warn("[buffer-controller]: Failed to remove from "+g+" SourceBuffer",_)}}};t.type?v.append(y(t.type),t.type):this.getSourceBufferTypes().forEach(function(b){v.append(y(b),b)})},l.onFragParsed=function(r,t){var d=this,v=t.frag,y=t.part,b=[],g=y?y.elementaryStreams:v.elementaryStreams;g[p.ElementaryStreamTypes.AUDIOVIDEO]?b.push("audiovideo"):(g[p.ElementaryStreamTypes.AUDIO]&&b.push("audio"),g[p.ElementaryStreamTypes.VIDEO]&&b.push("video"));var m=function(){var x=self.performance.now();v.stats.buffering.end=x,y&&(y.stats.buffering.end=x);var f=y?y.stats:v.stats;d.hls.trigger(D.Events.FRAG_BUFFERED,{frag:v,part:y,stats:f,id:v.type})};b.length===0&&S.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+v.type+" level: "+v.level+" sn: "+v.sn),this.blockBuffers(m,b)},l.onFragChanged=function(r,t){this.flushBackBuffer()},l.onBufferEos=function(r,t){var d=this,v=this.getSourceBufferTypes().reduce(function(y,b){var g=d.sourceBuffer[b];return(!t.type||t.type===b)&&(g&&!g.ended&&(g.ended=!0,S.logger.log("[buffer-controller]: "+b+" sourceBuffer now EOS"))),y&&!!(!g||g.ended)},!0);v&&this.blockBuffers(function(){var y=d.mediaSource;if(!y||y.readyState!=="open")return;y.endOfStream()})},l.onLevelUpdated=function(r,t){var d=t.details;if(!d.fragments.length)return;this.details=d,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},l.flushBackBuffer=function(){var r=this.hls,t=this.details,d=this.media,v=this.sourceBuffer;if(!d||t===null)return;var y=this.getSourceBufferTypes();if(!y.length)return;var b=t.live&&r.config.liveBackBufferLength!==null?r.config.liveBackBufferLength:r.config.backBufferLength;if(!Object(O.isFiniteNumber)(b)||b<0)return;var g=d.currentTime,m=t.levelTargetDuration,_=Math.max(b,m),x=Math.floor(g/m)*m-_;y.forEach(function(f){var E=v[f];if(E){var w=C.BufferHelper.getBuffered(E);w.length>0&&x>w.start(0)&&(r.trigger(D.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),t.live&&r.trigger(D.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),r.trigger(D.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:f}))}})},l.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var r=this.details,t=this.hls,d=this.media,v=this.mediaSource,y=r.fragments[0].start+r.totalduration,b=d.duration,g=Object(O.isFiniteNumber)(v.duration)?v.duration:0;r.live&&t.config.liveDurationInfinity?(S.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),v.duration=Infinity,this.updateSeekableRange(r)):(y>g&&y>b||!Object(O.isFiniteNumber)(b))&&(S.logger.log("[buffer-controller]: Updating Media Source duration to "+y.toFixed(3)),v.duration=y)},l.updateSeekableRange=function(r){var t=this.mediaSource,d=r.fragments,v=d.length;if(v&&r.live&&t!==null&&t!==void 0&&t.setLiveSeekableRange){var y=Math.max(0,d[0].start),b=Math.max(y,y+r.totalduration);t.setLiveSeekableRange(y,b)}},l.checkPendingTracks=function(){var r=this.bufferCodecEventsExpected,t=this.operationQueue,d=this.pendingTracks,v=Object.keys(d).length;if(v&&!r||v===2){this.createSourceBuffers(d),this.pendingTracks={};var y=this.getSourceBufferTypes();if(y.length===0){this.hls.trigger(D.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}y.forEach(function(b){t.executeNext(b)})}},l.createSourceBuffers=function(r){var t=this.sourceBuffer,d=this.mediaSource;if(!d)throw Error("createSourceBuffers called when mediaSource was null");var v=0;for(var y in r)if(!t[y]){var b=r[y];if(!b)throw Error("source buffer exists for track "+y+", however track does not");var g=b.levelCodec||b.codec,m=b.container+";codecs="+g;S.logger.log("[buffer-controller]: creating sourceBuffer("+m+")");try{var _=t[y]=d.addSourceBuffer(m),x=y;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[y]={buffer:_,codec:g,container:b.container,levelCodec:b.levelCodec,id:b.id},v++}catch(f){S.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+f.message),this.hls.trigger(D.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:f,mimeType:m})}}v&&this.hls.trigger(D.Events.BUFFER_CREATED,{tracks:this.tracks})},l._onSBUpdateStart=function(r){var t=this.operationQueue,d=t.current(r);d.onStart()},l._onSBUpdateEnd=function(r){var t=this.operationQueue,d=t.current(r);d.onComplete(),t.shiftAndExecuteNext(r)},l._onSBUpdateError=function(r,t){S.logger.error("[buffer-controller]: "+r+" SourceBuffer error",t),this.hls.trigger(D.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var d=this.operationQueue.current(r);d&&d.onError(t)},l.removeExecutor=function(r,t,d){var v=this.media,y=this.mediaSource,b=this.operationQueue,g=this.sourceBuffer,m=g[r];if(!v||!y||!m){S.logger.warn("[buffer-controller]: Attempting to remove from the "+r+" SourceBuffer, but it does not exist"),b.shiftAndExecuteNext(r);return}var _=Object(O.isFiniteNumber)(v.duration)?v.duration:Infinity,x=Object(O.isFiniteNumber)(y.duration)?y.duration:Infinity,f=Math.max(0,t),E=Math.min(d,_,x);E>f?(S.logger.log("[buffer-controller]: Removing ["+f+","+E+"] from the "+r+" SourceBuffer"),console.assert(!m.updating,r+" sourceBuffer must not be updating"),m.remove(f,E)):b.shiftAndExecuteNext(r)},l.appendExecutor=function(r,t){var d=this.operationQueue,v=this.sourceBuffer,y=v[t];if(!y){S.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),d.shiftAndExecuteNext(t);return}y.ended=!1,console.assert(!y.updating,t+" sourceBuffer must not be updating"),y.appendBuffer(r)},l.blockBuffers=function(r,t){var d=this;if(t===void 0&&(t=this.getSourceBufferTypes()),!t.length){S.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(r);return}var v=this.operationQueue,y=t.map(function(b){return v.appendBlocker(b)});Promise.all(y).then(function(){r(),t.forEach(function(b){var g=d.sourceBuffer[b];(!g||!g.updating)&&v.shiftAndExecuteNext(b)})})},l.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},l.addBufferListener=function(r,t,d){var v=this.sourceBuffer[r];if(!v)return;var y=d.bind(this,r);this.listeners[r].push({event:t,listener:y}),v.addEventListener(t,y)},l.removeBufferListeners=function(r){var t=this.sourceBuffer[r];if(!t)return;this.listeners[r].forEach(function(d){t.removeEventListener(d.event,d.listener)})},i}()},"./src/controller/buffer-operation-queue.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return D});var O=B("./src/utils/logger.ts"),D=function(){function S(C){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=C}var A=S.prototype;return A.append=function(h,p){var c=this.queues[p];c.push(h),c.length===1&&this.buffers[p]&&this.executeNext(p)},A.insertAbort=function(h,p){var c=this.queues[p];c.unshift(h),this.executeNext(p)},A.appendBlocker=function(h){var p,c=new Promise(function(n){p=n}),s={execute:p,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(s,h),c},A.executeNext=function(h){var p=this.buffers,c=this.queues,s=p[h],n=c[h];if(n.length){var o=n[0];try{o.execute()}catch(i){O.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(i),(!s||!s.updating)&&(n.shift(),this.executeNext(h))}}},A.shiftAndExecuteNext=function(h){this.queues[h].shift(),this.executeNext(h)},A.current=function(h){return this.queues[h][0]},S}()},"./src/controller/cap-level-controller.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/events.ts");function D(C,h){for(var p=0;p<h.length;p++){var c=h[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(C,c.key,c)}}function S(C,h,p){return h&&D(C.prototype,h),p&&D(C,p),C}var A=function(){function C(p){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=p,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var h=C.prototype;return h.setStreamController=function(c){this.streamController=c},h.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},h.registerListeners=function(){var c=this.hls;c.on(O.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),c.on(O.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),c.on(O.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.on(O.Events.BUFFER_CODECS,this.onBufferCodecs,this),c.on(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},h.unregisterListener=function(){var c=this.hls;c.off(O.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),c.off(O.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),c.off(O.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.off(O.Events.BUFFER_CODECS,this.onBufferCodecs,this),c.off(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},h.onFpsDropLevelCapping=function(c,s){C.isLevelAllowed(s.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(s.droppedLevel)},h.onMediaAttaching=function(c,s){this.media=s.media instanceof HTMLVideoElement?s.media:null},h.onManifestParsed=function(c,s){var n=this.hls;this.restrictedLevels=[],this.firstLevel=s.firstLevel,n.config.capLevelToPlayerSize&&s.video&&this.startCapping()},h.onBufferCodecs=function(c,s){var n=this.hls;n.config.capLevelToPlayerSize&&s.video&&this.startCapping()},h.onMediaDetaching=function(){this.stopCapping()},h.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var c=this.hls.levels;if(c.length){var s=this.hls;s.autoLevelCapping=this.getMaxLevel(c.length-1),s.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=s.autoLevelCapping}}},h.getMaxLevel=function(c){var s=this,n=this.hls.levels;if(!n.length)return-1;var o=n.filter(function(i,l){return C.isLevelAllowed(l,s.restrictedLevels)&&l<=c});return this.clientRect=null,C.getMaxLevelByMediaSize(o,this.mediaWidth,this.mediaHeight)},h.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()},h.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},h.getDimensions=function(){if(this.clientRect)return this.clientRect;var c=this.media,s={width:0,height:0};if(c){var n=c.getBoundingClientRect();s.width=n.width,s.height=n.height,!s.width&&!s.height&&(s.width=n.right-n.left||c.width||0,s.height=n.bottom-n.top||c.height||0)}return this.clientRect=s,s},C.isLevelAllowed=function(c,s){return s===void 0&&(s=[]),s.indexOf(c)===-1},C.getMaxLevelByMediaSize=function(c,s,n){if(!c||!c.length)return-1;for(var o=function(t,d){return d?t.width!==d.width||t.height!==d.height:!0},i=c.length-1,l=0;l<c.length;l+=1){var a=c[l];if((a.width>=s||a.height>=n)&&o(a,c[l+1])){i=l;break}}return i},S(C,[{key:"mediaWidth",get:function(){return this.getDimensions().width*C.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*C.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var c=1;try{c=self.devicePixelRatio}catch(s){}return c}}]),C}();ee.default=A},"./src/controller/cmcd-controller.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return o});var O=B("./src/events.ts"),D=B("./src/types/cmcd.ts"),S=B("./src/utils/buffer-helper.ts"),A=B("./src/utils/logger.ts");function C(i,l){for(var a=0;a<l.length;a++){var r=l[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(i,r.key,r)}}function h(i,l,a){return l&&C(i.prototype,l),a&&C(i,a),i}function p(i,l){var a=typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(a)return(a=a.call(i)).next.bind(a);if(Array.isArray(i)||(a=c(i))||l&&i&&typeof i.length=="number"){a&&(i=a);var r=0;return function(){return r>=i.length?{done:!0}:{done:!1,value:i[r++]}}}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 c(i,l){if(!i)return;if(typeof i=="string")return s(i,l);var a=Object.prototype.toString.call(i).slice(8,-1);if(a==="Object"&&i.constructor&&(a=i.constructor.name),a==="Map"||a==="Set")return Array.from(i);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return s(i,l)}function s(i,l){(l==null||l>i.length)&&(l=i.length);for(var a=0,r=new Array(l);a<l;a++)r[a]=i[a];return r}function n(){return n=Object.assign||function(i){for(var l=1;l<arguments.length;l++){var a=arguments[l];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i[r]=a[r])}return i},n.apply(this,arguments)}var o=function(){function i(a){var r=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(){r.initialized&&(r.starved=!0),r.buffering=!0},this.onPlaying=function(){r.initialized||(r.initialized=!0),r.buffering=!1},this.applyPlaylistData=function(v){try{r.apply(v,{ot:D.CMCDObjectType.MANIFEST,su:!r.initialized})}catch(y){A.logger.warn("Could not generate manifest CMCD data.",y)}},this.applyFragmentData=function(v){try{var y=v.frag,b=r.hls.levels[y.level],g=r.getObjectType(y),m={d:y.duration*1e3,ot:g};(g===D.CMCDObjectType.VIDEO||g===D.CMCDObjectType.AUDIO||g==D.CMCDObjectType.MUXED)&&(m.br=b.bitrate/1e3,m.tb=r.getTopBandwidth(g),m.bl=r.getBufferLength(g)),r.apply(v,m)}catch(_){A.logger.warn("Could not generate segment CMCD data.",_)}},this.hls=a;var t=this.config=a.config,d=t.cmcd;d!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=d.sessionId||i.uuid(),this.cid=d.contentId,this.useHeaders=d.useHeaders===!0,this.registerListeners())}var l=i.prototype;return l.registerListeners=function(){var r=this.hls;r.on(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(O.Events.MEDIA_DETACHED,this.onMediaDetached,this),r.on(O.Events.BUFFER_CREATED,this.onBufferCreated,this)},l.unregisterListeners=function(){var r=this.hls;r.off(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(O.Events.MEDIA_DETACHED,this.onMediaDetached,this),r.off(O.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},l.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},l.onMediaAttached=function(r,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},l.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},l.onBufferCreated=function(r,t){var d,v;this.audioBuffer=(d=t.tracks.audio)===null||d===void 0?void 0:d.buffer,this.videoBuffer=(v=t.tracks.video)===null||v===void 0?void 0:v.buffer},l.createData=function(){var r;return{v:D.CMCDVersion,sf:D.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(r=this.media)===null||r===void 0?void 0:r.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},l.apply=function(r,t){t===void 0&&(t={}),n(t,this.createData());var d=t.ot===D.CMCDObjectType.INIT||t.ot===D.CMCDObjectType.VIDEO||t.ot===D.CMCDObjectType.MUXED;if(this.starved&&d&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering),this.useHeaders){var v=i.toHeaders(t);if(!Object.keys(v).length)return;r.headers||(r.headers={}),n(r.headers,v)}else{var y=i.toQuery(t);if(!y)return;r.url=i.appendQueryToUri(r.url,y)}},l.getObjectType=function(r){var t=r.type;return t==="subtitle"?D.CMCDObjectType.TIMED_TEXT:r.sn==="initSegment"?D.CMCDObjectType.INIT:t==="audio"?D.CMCDObjectType.AUDIO:t==="main"?this.hls.audioTracks.length?D.CMCDObjectType.VIDEO:D.CMCDObjectType.MUXED:void 0},l.getTopBandwidth=function(r){for(var t=0,d=r===D.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,v=p(d),y;!(y=v()).done;){var b=y.value;b.bitrate>t&&(t=b.bitrate)}return t>0?t:NaN},l.getBufferLength=function(r){var t=this.hls.media,d=r===D.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!d||!t)return NaN;var v=S.BufferHelper.bufferInfo(d,t.currentTime,this.config.maxBufferHole);return v.len*1e3},l.createPlaylistLoader=function(){var r=this.config.pLoader,t=this.applyPlaylistData,d=r||this.config.loader;return function(){function v(b){this.loader=void 0,this.loader=new d(b)}var y=v.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(g,m,_){t(g),this.loader.load(g,m,_)},h(v,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),v}()},l.createFragmentLoader=function(){var r=this.config.fLoader,t=this.applyFragmentData,d=r||this.config.loader;return function(){function v(b){this.loader=void 0,this.loader=new d(b)}var y=v.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(g,m,_){t(g),this.loader.load(g,m,_)},h(v,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),v}()},i.uuid=function(){var r=URL.createObjectURL(new Blob),t=r.toString();return URL.revokeObjectURL(r),t.substr(t.lastIndexOf("/")+1)},i.serialize=function(r){for(var t=[],d=function(j){return!Number.isNaN(j)&&j!=null&&j!==""&&j!==!1},v=function(j){return Math.round(j)},y=function(j){return v(j/100)*100},b=function(j){return encodeURIComponent(j)},g={br:v,d:v,bl:y,dl:y,mtp:y,nor:b,rtp:y,tb:v},m=Object.keys(r||{}).sort(),_=p(m),x;!(x=_()).done;){var f=x.value,E=r[f];if(!d(E))continue;if(f==="v"&&E===1)continue;if(f=="pr"&&E===1)continue;var w=g[f];w&&(E=w(E));var T=typeof E,R=void 0;f==="ot"||f==="sf"||f==="st"?R=f+"="+E:T==="boolean"?R=f:T==="number"?R=f+"="+E:R=f+"="+JSON.stringify(E),t.push(R)}return t.join(",")},i.toHeaders=function(r){for(var t=Object.keys(r),d={},v=["Object","Request","Session","Status"],y=[{},{},{},{}],b={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},g=0,m=t;g<m.length;g++){var _=m[g],x=b[_]!=null?b[_]:1;y[x][_]=r[_]}for(var f=0;f<y.length;f++){var E=i.serialize(y[f]);E&&(d["CMCD-"+v[f]]=E)}return d},i.toQuery=function(r){return"CMCD="+encodeURIComponent(i.serialize(r))},i.appendQueryToUri=function(r,t){if(!t)return r;var d=r.includes("?")?"&":"?";return""+r+d+t},i}()},"./src/controller/eme-controller.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/events.ts"),D=B("./src/errors.ts"),S=B("./src/utils/logger.ts"),A=B("./src/utils/mediakeys-helper.ts");function C(o,i){for(var l=0;l<i.length;l++){var a=i[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,a.key,a)}}function h(o,i,l){return i&&C(o.prototype,i),l&&C(o,l),o}var p=3,c=function(i,l,a){var r={audioCapabilities:[],videoCapabilities:[]};return i.forEach(function(t){r.audioCapabilities.push({contentType:'audio/mp4; codecs="'+t+'"',robustness:a.audioRobustness||""})}),l.forEach(function(t){r.videoCapabilities.push({contentType:'video/mp4; codecs="'+t+'"',robustness:a.videoRobustness||""})}),[r]},s=function(i,l,a,r){switch(i){case A.KeySystems.WIDEVINE:return c(l,a,r);default:throw new Error("Unknown key-system: "+i)}},n=function(){function o(l){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=l,this._config=l.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 i=o.prototype;return i.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},i._registerListeners=function(){this.hls.on(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(O.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(O.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i._unregisterListeners=function(){this.hls.off(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(O.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(O.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i.getLicenseServerUrl=function(a){switch(a){case A.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+a+'"')},i._attemptKeySystemAccess=function(a,r,t){var d=this,v=s(a,r,t,this._drmSystemOptions);S.logger.log("Requesting encrypted media key-system access");var y=this.requestMediaKeySystemAccess(a,v);this.mediaKeysPromise=y.then(function(b){return d._onMediaKeySystemAccessObtained(a,b)}),y.catch(function(b){S.logger.error('Failed to obtain key-system "'+a+'" access:',b)})},i._onMediaKeySystemAccessObtained=function(a,r){var t=this;S.logger.log('Access for key-system "'+a+'" obtained');var d={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:r,mediaKeySystemDomain:a};this._mediaKeysList.push(d);var v=Promise.resolve().then(function(){return r.createMediaKeys()}).then(function(y){return d.mediaKeys=y,S.logger.log('Media-keys created for key-system "'+a+'"'),t._onMediaKeysCreated(),y});return v.catch(function(y){S.logger.error("Failed to create media-keys:",y)}),v},i._onMediaKeysCreated=function(){var a=this;this._mediaKeysList.forEach(function(r){r.mediaKeysSession||(r.mediaKeysSession=r.mediaKeys.createSession(),a._onNewMediaKeySession(r.mediaKeysSession))})},i._onNewMediaKeySession=function(a){var r=this;S.logger.log("New key-system session "+a.sessionId),a.addEventListener("message",function(t){r._onKeySessionMessage(a,t.message)},!1)},i._onKeySessionMessage=function(a,r){S.logger.log("Got EME message event, creating license request"),this._requestLicense(r,function(t){S.logger.log("Received license data (length: "+(t&&t.byteLength)+"), updating key-session"),a.update(t)})},i.onMediaEncrypted=function(a){var r=this;if(S.logger.log('Media is encrypted using "'+a.initDataType+'" init data type'),!this.mediaKeysPromise){S.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(O.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var t=function(v){if(!r._media)return;r._attemptSetMediaKeys(v),r._generateRequestWithPreferredKeySession(a.initDataType,a.initData)};this.mediaKeysPromise.then(t).catch(t)},i._attemptSetMediaKeys=function(a){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var r=this._mediaKeysList[0];if(!r||!r.mediaKeys){S.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(O.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}S.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(r.mediaKeys),this._hasSetMediaKeys=!0}},i._generateRequestWithPreferredKeySession=function(a,r){var t=this,d=this._mediaKeysList[0];if(!d){S.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(O.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(d.mediaKeysSessionInitialized){S.logger.warn("Key-Session already initialized but requested again");return}var v=d.mediaKeysSession;if(!v){S.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(O.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!r){S.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(O.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}S.logger.log('Generating key-session request for "'+a+'" init data type'),d.mediaKeysSessionInitialized=!0,v.generateRequest(a,r).then(function(){S.logger.debug("Key-session generation succeeded")}).catch(function(y){S.logger.error("Error generating key-session request:",y),t.hls.trigger(O.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},i._createLicenseXhr=function(a,r,t){var d=new XMLHttpRequest;d.responseType="arraybuffer",d.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,d,a,r,t);var v=this._licenseXhrSetup;if(v)try{v.call(this.hls,d,a),v=void 0}catch(y){S.logger.error(y)}try{d.readyState||d.open("POST",a,!0),v&&v.call(this.hls,d,a)}catch(y){throw new Error("issue setting up KeySystem license XHR "+y)}return d},i._onLicenseRequestReadyStageChange=function(a,r,t,d){switch(a.readyState){case 4:if(a.status===200){this._requestLicenseFailureCount=0,S.logger.log("License request succeeded");var v=a.response,y=this._licenseResponseCallback;if(y)try{v=y.call(this.hls,a,r)}catch(g){S.logger.error(g)}d(v)}else{if(S.logger.error("License Request XHR failed ("+r+"). Status: "+a.status+" ("+a.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>p){this.hls.trigger(O.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var b=p-this._requestLicenseFailureCount+1;S.logger.warn("Retrying license request, "+b+" attempts left"),this._requestLicense(t,d)}break}},i._generateLicenseRequestChallenge=function(a,r){switch(a.mediaKeySystemDomain){case A.KeySystems.WIDEVINE:return r}throw new Error("unsupported key-system: "+a.mediaKeySystemDomain)},i._requestLicense=function(a,r){S.logger.log("Requesting content license for key-system");var t=this._mediaKeysList[0];if(!t){S.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(O.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var d=this.getLicenseServerUrl(t.mediaKeySystemDomain),v=this._createLicenseXhr(d,a,r);S.logger.log("Sending license request to URL: "+d);var y=this._generateLicenseRequestChallenge(t,a);v.send(y)}catch(b){S.logger.error("Failure requesting DRM license: "+b),this.hls.trigger(O.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},i.onMediaAttached=function(a,r){if(!this._emeEnabled)return;var t=r.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)},i.onMediaDetached=function(){var a=this._media,r=this._mediaKeysList;if(!a)return;a.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(r.map(function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch(function(){})})).then(function(){return a.setMediaKeys(null)}).catch(function(){})},i.onManifestParsed=function(a,r){if(!this._emeEnabled)return;var t=r.levels.map(function(v){return v.audioCodec}).filter(function(v){return!!v}),d=r.levels.map(function(v){return v.videoCodec}).filter(function(v){return!!v});this._attemptKeySystemAccess(A.KeySystems.WIDEVINE,t,d)},h(o,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),o}();ee.default=n},"./src/controller/fps-controller.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/events.ts"),D=B("./src/utils/logger.ts"),S=function(){function A(h){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=h,this.registerListeners()}var C=A.prototype;return C.setStreamController=function(p){this.streamController=p},C.registerListeners=function(){this.hls.on(O.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},C.unregisterListeners=function(){this.hls.off(O.Events.MEDIA_ATTACHING,this.onMediaAttaching)},C.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},C.onMediaAttaching=function(p,c){var s=this.hls.config;if(s.capLevelOnFPSDrop){var n=c.media instanceof self.HTMLVideoElement?c.media:null;this.media=n,n&&typeof n.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),s.fpsDroppedMonitoringPeriod)}},C.checkFPS=function(p,c,s){var n=performance.now();if(c){if(this.lastTime){var o=n-this.lastTime,i=s-this.lastDroppedFrames,l=c-this.lastDecodedFrames,a=1e3*i/o,r=this.hls;if(r.trigger(O.Events.FPS_DROP,{currentDropped:i,currentDecoded:l,totalDroppedFrames:s}),a>0&&i>r.config.fpsDroppedMonitoringThreshold*l){var t=r.currentLevel;D.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+t),t>0&&(r.autoLevelCapping===-1||r.autoLevelCapping>=t)&&(t=t-1,r.trigger(O.Events.FPS_DROP_LEVEL_CAPPING,{level:t,droppedLevel:r.currentLevel}),r.autoLevelCapping=t,this.streamController.nextLevelSwitch())}}this.lastTime=n,this.lastDroppedFrames=s,this.lastDecodedFrames=c}},C.checkFPSInterval=function(){var p=this.media;if(p)if(this.isVideoPlaybackQualityAvailable){var c=p.getVideoPlaybackQuality();this.checkFPS(p,c.totalVideoFrames,c.droppedVideoFrames)}else this.checkFPS(p,p.webkitDecodedFrameCount,p.webkitDroppedFrameCount)},A}();ee.default=S},"./src/controller/fragment-finders.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"findFragmentByPDT",function(){return S}),B.d(ee,"findFragmentByPTS",function(){return A}),B.d(ee,"fragmentWithinToleranceTest",function(){return C}),B.d(ee,"pdtWithinToleranceTest",function(){return h}),B.d(ee,"findFragWithCC",function(){return p});var O=B("./src/polyfills/number.ts"),D=B("./src/utils/binary-search.ts");function S(c,s,n){if(s===null||!Array.isArray(c)||!c.length||!Object(O.isFiniteNumber)(s))return null;var o=c[0].programDateTime;if(s<(o||0))return null;var i=c[c.length-1].endProgramDateTime;if(s>=(i||0))return null;n=n||0;for(var l=0;l<c.length;++l){var a=c[l];if(h(s,n,a))return a}return null}function A(c,s,n,o){n===void 0&&(n=0),o===void 0&&(o=0);var i=null;if(c?i=s[c.sn-s[0].sn+1]||null:n===0&&s[0].start===0&&(i=s[0]),i&&C(n,o,i)===0)return i;var l=D.default.search(s,C.bind(null,n,o));return l||i}function C(c,s,n){c===void 0&&(c=0),s===void 0&&(s=0);var o=Math.min(s,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-o<=c?1:n.start-o>c&&n.start?-1:0}function h(c,s,n){var o=Math.min(s,n.duration+(n.deltaPTS?n.deltaPTS:0))*1e3,i=n.endProgramDateTime||0;return i-o>c}function p(c,s){return D.default.search(c,function(n){return n.cc<s?1:n.cc>s?-1:0})}},"./src/controller/fragment-tracker.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"FragmentState",function(){return S}),B.d(ee,"FragmentTracker",function(){return A});var O=B("./src/events.ts"),D=B("./src/types/loader.ts"),S;(function(p){p.NOT_LOADED="NOT_LOADED",p.BACKTRACKED="BACKTRACKED",p.APPENDING="APPENDING",p.PARTIAL="PARTIAL",p.OK="OK"})(S||(S={}));var A=function(){function p(s){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=s,this._registerListeners()}var c=p.prototype;return c._registerListeners=function(){var n=this.hls;n.on(O.Events.BUFFER_APPENDED,this.onBufferAppended,this),n.on(O.Events.FRAG_BUFFERED,this.onFragBuffered,this),n.on(O.Events.FRAG_LOADED,this.onFragLoaded,this)},c._unregisterListeners=function(){var n=this.hls;n.off(O.Events.BUFFER_APPENDED,this.onBufferAppended,this),n.off(O.Events.FRAG_BUFFERED,this.onFragBuffered,this),n.off(O.Events.FRAG_LOADED,this.onFragLoaded,this)},c.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},c.getAppendedFrag=function(n,o){if(o===D.PlaylistLevelType.MAIN){var i=this.activeFragment,l=this.activeParts;if(!i)return null;if(l)for(var a=l.length;a--;){var r=l[a],t=r?r.end:i.appendedPTS;if(r.start<=n&&t!==void 0&&n<=t)return a>9&&(this.activeParts=l.slice(a-9)),r}else if(i.start<=n&&i.appendedPTS!==void 0&&n<=i.appendedPTS)return i}return this.getBufferedFrag(n,o)},c.getBufferedFrag=function(n,o){for(var i=this.fragments,l=Object.keys(i),a=l.length;a--;){var r=i[l[a]];if((r==null?void 0:r.body.type)===o&&r.buffered){var t=r.body;if(t.start<=n&&n<=t.end)return t}}return null},c.detectEvictedFragments=function(n,o,i){var l=this;Object.keys(this.fragments).forEach(function(a){var r=l.fragments[a];if(!r)return;if(!r.buffered){r.body.type===i&&l.removeFragment(r.body);return}var t=r.range[n];if(!t)return;t.time.some(function(d){var v=!l.isTimeBuffered(d.startPTS,d.endPTS,o);return v&&l.removeFragment(r.body),v})})},c.detectPartialFragments=function(n){var o=this,i=this.timeRanges,l=n.frag,a=n.part;if(!i||l.sn==="initSegment")return;var r=h(l),t=this.fragments[r];if(!t)return;Object.keys(i).forEach(function(d){var v=l.elementaryStreams[d];if(!v)return;var y=i[d],b=a!==null||v.partial===!0;t.range[d]=o.getBufferedTimes(l,a,b,y)}),t.backtrack=t.loaded=null,Object.keys(t.range).length?t.buffered=!0:this.removeFragment(t.body)},c.fragBuffered=function(n){var o=h(n),i=this.fragments[o];i&&(i.backtrack=i.loaded=null,i.buffered=!0)},c.getBufferedTimes=function(n,o,i,l){for(var a={time:[],partial:i},r=o?o.start:n.start,t=o?o.end:n.end,d=n.minEndPTS||t,v=n.maxStartPTS||r,y=0;y<l.length;y++){var b=l.start(y)-this.bufferPadding,g=l.end(y)+this.bufferPadding;if(v>=b&&d<=g){a.time.push({startPTS:Math.max(r,l.start(y)),endPTS:Math.min(t,l.end(y))});break}else if(r<g&&t>b)a.partial=!0,a.time.push({startPTS:Math.max(r,l.start(y)),endPTS:Math.min(t,l.end(y))});else if(t<=b)break}return a},c.getPartialFragment=function(n){var o=null,i,l,a,r=0,t=this.bufferPadding,d=this.fragments;return Object.keys(d).forEach(function(v){var y=d[v];if(!y)return;C(y)&&(l=y.body.start-t,a=y.body.end+t,n>=l&&n<=a&&(i=Math.min(n-l,a-n),r<=i&&(o=y.body,r=i)))}),o},c.getState=function(n){var o=h(n),i=this.fragments[o];return i?i.buffered?C(i)?S.PARTIAL:S.OK:i.backtrack?S.BACKTRACKED:S.APPENDING:S.NOT_LOADED},c.backtrack=function(n,o){var i=h(n),l=this.fragments[i];if(!l||l.backtrack)return null;var a=l.backtrack=o||l.loaded;return l.loaded=null,a},c.getBacktrackData=function(n){var o=h(n),i=this.fragments[o];if(i){var l,a=i.backtrack;if(a!=null&&(l=a.payload)!==null&&l!==void 0&&l.byteLength)return a;this.removeFragment(n)}return null},c.isTimeBuffered=function(n,o,i){for(var l,a,r=0;r<i.length;r++){if(l=i.start(r)-this.bufferPadding,a=i.end(r)+this.bufferPadding,n>=l&&o<=a)return!0;if(o<=l)return!1}return!1},c.onFragLoaded=function(n,o){var i=o.frag,l=o.part;if(i.sn==="initSegment"||i.bitrateTest||l)return;var a=h(i);this.fragments[a]={body:i,loaded:o,backtrack:null,buffered:!1,range:Object.create(null)}},c.onBufferAppended=function(n,o){var i=this,l=o.frag,a=o.part,r=o.timeRanges;if(l.type===D.PlaylistLevelType.MAIN)if(this.activeFragment=l,a){var t=this.activeParts;t||(this.activeParts=t=[]),t.push(a)}else this.activeParts=null;this.timeRanges=r,Object.keys(r).forEach(function(d){var v=r[d];if(i.detectEvictedFragments(d,v),!a)for(var y=0;y<v.length;y++)l.appendedPTS=Math.max(v.end(y),l.appendedPTS||0)})},c.onFragBuffered=function(n,o){this.detectPartialFragments(o)},c.hasFragment=function(n){var o=h(n);return!!this.fragments[o]},c.removeFragmentsInRange=function(n,o,i){var l=this;Object.keys(this.fragments).forEach(function(a){var r=l.fragments[a];if(!r)return;if(r.buffered){var t=r.body;t.type===i&&t.start<o&&t.end>n&&l.removeFragment(t)}})},c.removeFragment=function(n){var o=h(n);n.stats.loaded=0,n.clearElementaryStreamInfo(),delete this.fragments[o]},c.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},p}();function C(p){var c,s;return p.buffered&&(((c=p.range.video)===null||c===void 0?void 0:c.partial)||((s=p.range.audio)===null||s===void 0?void 0:s.partial))}function h(p){return p.type+"_"+p.level+"_"+p.urlId+"_"+p.sn}},"./src/controller/gap-controller.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"STALL_MINIMUM_DURATION_MS",function(){return C}),B.d(ee,"MAX_START_GAP_JUMP",function(){return h}),B.d(ee,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return p}),B.d(ee,"SKIP_BUFFER_RANGE_START",function(){return c}),B.d(ee,"default",function(){return s});var O=B("./src/utils/buffer-helper.ts"),D=B("./src/errors.ts"),S=B("./src/events.ts"),A=B("./src/utils/logger.ts"),C=250,h=2,p=.1,c=.05,s=function(){function n(i,l,a,r){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=i,this.media=l,this.fragmentTracker=a,this.hls=r}var o=n.prototype;return o.destroy=function(){this.hls=this.fragmentTracker=this.media=null},o.poll=function(l){var a=this.config,r=this.media,t=this.stalled,d=r.currentTime,v=r.seeking,y=this.seeking&&!v,b=!this.seeking&&v;if(this.seeking=v,d!==l){if(this.moved=!0,t!==null){if(this.stallReported){var g=self.performance.now()-t;A.logger.warn("playback not stuck anymore @"+d+", after "+Math.round(g)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((b||y)&&(this.stalled=null),r.paused||r.ended||r.playbackRate===0||!O.BufferHelper.getBuffered(r).length)return;var m=O.BufferHelper.bufferInfo(r,d,0),_=m.len>0,x=m.nextStart||0;if(!_&&!x)return;if(v){var f=m.len>h,E=!x||x-d>h&&!this.fragmentTracker.getPartialFragment(d);if(f||E)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var w,T=Math.max(x,m.start||0)-d,R=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,N=R==null||((w=R.details)===null||w===void 0)?void 0:w.live,j=N?R.details.targetduration*2:h;if(T>0&&T<=j){this._trySkipBufferHole(null);return}}var W=self.performance.now();if(t===null){this.stalled=W;return}var J=W-t;!v&&J>=C&&this._reportStall(m.len);var F=O.BufferHelper.bufferInfo(r,d,a.maxBufferHole);this._tryFixBufferStall(F,J)},o._tryFixBufferStall=function(l,a){var r=this.config,t=this.fragmentTracker,d=this.media,v=d.currentTime,y=t.getPartialFragment(v);if(y){var b=this._trySkipBufferHole(y);if(b)return}l.len>r.maxBufferHole&&a>r.highBufferWatchdogPeriod*1e3&&(A.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},o._reportStall=function(l){var a=this.hls,r=this.media,t=this.stallReported;t||(this.stallReported=!0,A.logger.warn("Playback stalling at @"+r.currentTime+" due to low buffer (buffer="+l+")"),a.trigger(S.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:l}))},o._trySkipBufferHole=function(l){for(var a=this.config,r=this.hls,t=this.media,d=t.currentTime,v=0,y=O.BufferHelper.getBuffered(t),b=0;b<y.length;b++){var g=y.start(b);if(d+a.maxBufferHole>=v&&d<g){var m=Math.max(g+c,t.currentTime+p);return A.logger.warn("skipping hole, adjusting currentTime from "+d+" to "+m),this.moved=!0,this.stalled=null,t.currentTime=m,l&&r.trigger(S.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+d+" to "+m,frag:l}),m}v=y.end(b)}return 0},o._tryNudgeBuffer=function(){var l=this.config,a=this.hls,r=this.media,t=r.currentTime,d=(this.nudgeRetry||0)+1;if(this.nudgeRetry=d,d<l.nudgeMaxRetry){var v=t+d*l.nudgeOffset;A.logger.warn("Nudging 'currentTime' from "+t+" to "+v),r.currentTime=v,a.trigger(S.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else A.logger.error("Playhead still not moving while enough data buffered @"+t+" after "+l.nudgeMaxRetry+" nudges"),a.trigger(S.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},n}()},"./src/controller/id3-track-controller.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/events.ts"),D=B("./src/utils/texttrack-utils.ts"),S=B("./src/demux/id3.ts"),A=.25,C=function(){function h(c){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=c,this._registerListeners()}var p=h.prototype;return p.destroy=function(){this._unregisterListeners()},p._registerListeners=function(){var s=this.hls;s.on(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.on(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(O.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),s.on(O.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},p._unregisterListeners=function(){var s=this.hls;s.off(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.off(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(O.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),s.off(O.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},p.onMediaAttached=function(s,n){this.media=n.media},p.onMediaDetaching=function(){if(!this.id3Track)return;Object(D.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},p.getID3Track=function(s){if(!this.media)return;for(var n=0;n<s.length;n++){var o=s[n];if(o.kind==="metadata"&&o.label==="id3")return Object(D.sendAddTrackEvent)(o,this.media),o}return this.media.addTextTrack("metadata","id3")},p.onFragParsingMetadata=function(s,n){if(!this.media)return;var o=n.frag,i=n.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var l=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,a=0;a<i.length;a++){var r=S.getID3Frames(i[a].data);if(r){var t=i[a].pts,d=a<i.length-1?i[a+1].pts:o.end,v=d-t;v<=0&&(d=t+A);for(var y=0;y<r.length;y++){var b=r[y];if(!S.isTimeStampFrame(b)){var g=new l(t,d,"");g.value=b,this.id3Track.addCue(g)}}}}},p.onBufferFlushing=function(s,n){var o=n.startOffset,i=n.endOffset,l=n.type;if(!l||l==="audio"){var a=this.id3Track;a&&Object(D.removeCuesInRange)(a,o,i)}},h}();ee.default=C},"./src/controller/latency-controller.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return h});var O=B("./src/errors.ts"),D=B("./src/events.ts"),S=B("./src/utils/logger.ts");function A(p,c){for(var s=0;s<c.length;s++){var n=c[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}function C(p,c,s){return c&&A(p.prototype,c),s&&A(p,s),p}var h=function(){function p(s){var n=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 n.timeupdate()},this.hls=s,this.config=s.config,this.registerListeners()}var c=p.prototype;return c.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},c.registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(D.Events.ERROR,this.onError,this)},c.unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(D.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(D.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(D.Events.ERROR,this.onError)},c.onMediaAttached=function(n,o){this.media=o.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},c.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},c.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},c.onLevelUpdated=function(n,o){var i=o.details;this.levelDetails=i,i.advanced&&this.timeupdate(),!i.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},c.onError=function(n,o){if(o.details!==O.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,S.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},c.timeupdate=function(){var n=this.media,o=this.levelDetails;if(!n||!o)return;this.currentTime=n.currentTime;var i=this.computeLatency();if(i===null)return;this._latency=i;var l=this.config,a=l.lowLatencyMode,r=l.maxLiveSyncPlaybackRate;if(!a||r===1)return;var t=this.targetLatency;if(t===null)return;var d=i-t,v=Math.min(this.maxLatency,t+o.targetduration),y=d<v;if(o.live&&y&&d>.05&&this.forwardBufferLength>1){var b=Math.min(2,Math.max(1,r)),g=Math.round(2/(1+Math.exp(-.75*d-this.edgeStalled))*20)/20;n.playbackRate=Math.min(b,Math.max(1,g))}else n.playbackRate!==1&&n.playbackRate!==0&&(n.playbackRate=1)},c.estimateLiveEdge=function(){var n=this.levelDetails;return n===null?null:n.edge+n.age},c.computeLatency=function(){var n=this.estimateLiveEdge();return n===null?null:n-this.currentTime},C(p,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var n=this.config,o=this.levelDetails;return n.liveMaxLatencyDuration!==void 0?n.liveMaxLatencyDuration:o?n.liveMaxLatencyDurationCount*o.targetduration:0}},{key:"targetLatency",get:function(){var n=this.levelDetails;if(n===null)return null;var o=n.holdBack,i=n.partHoldBack,l=n.targetduration,a=this.config,r=a.liveSyncDuration,t=a.liveSyncDurationCount,d=a.lowLatencyMode,v=this.hls.userConfig,y=d&&i||o;(v.liveSyncDuration||v.liveSyncDurationCount||y===0)&&(y=r!==void 0?r:t*l);var b=l,g=1;return y+Math.min(this.stallCount*g,b)}},{key:"liveSyncPosition",get:function(){var n=this.estimateLiveEdge(),o=this.targetLatency,i=this.levelDetails;if(n===null||o===null||i===null)return null;var l=i.edge,a=n-o-this.edgeStalled,r=l-i.totalduration,t=l-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(r,a),t)}},{key:"drift",get:function(){var n=this.levelDetails;return n===null?1:n.drift}},{key:"edgeStalled",get:function(){var n=this.levelDetails;if(n===null)return 0;var o=(this.config.lowLatencyMode&&n.partTarget||n.targetduration)*3;return Math.max(n.age-o,0)}},{key:"forwardBufferLength",get:function(){var n=this.media,o=this.levelDetails;if(!n||!o)return 0;var i=n.buffered.length;return i?n.buffered.end(i-1):o.edge-this.currentTime}}]),p}()},"./src/controller/level-controller.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return a});var O=B("./src/types/level.ts"),D=B("./src/events.ts"),S=B("./src/errors.ts"),A=B("./src/utils/codecs.ts"),C=B("./src/controller/level-helper.ts"),h=B("./src/controller/base-playlist-controller.ts"),p=B("./src/types/loader.ts");function c(){return c=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var d=arguments[t];for(var v in d)Object.prototype.hasOwnProperty.call(d,v)&&(r[v]=d[v])}return r},c.apply(this,arguments)}function s(r,t){for(var d=0;d<t.length;d++){var v=t[d];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(r,v.key,v)}}function n(r,t,d){return t&&s(r.prototype,t),d&&s(r,d),r}function o(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,i(r,t)}function i(r,t){return i=Object.setPrototypeOf||function(v,y){return v.__proto__=y,v},i(r,t)}var l=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),a=function(r){o(t,r);function t(v){var y;return y=r.call(this,v,"[level-controller]")||this,y._levels=[],y._firstLevel=-1,y._startLevel=void 0,y.currentLevelIndex=-1,y.manualLevelIndex=-1,y.onParsedComplete=void 0,y._registerListeners(),y}var d=t.prototype;return d._registerListeners=function(){var y=this.hls;y.on(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.on(D.Events.FRAG_LOADED,this.onFragLoaded,this),y.on(D.Events.ERROR,this.onError,this)},d._unregisterListeners=function(){var y=this.hls;y.off(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.off(D.Events.FRAG_LOADED,this.onFragLoaded,this),y.off(D.Events.ERROR,this.onError,this)},d.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,r.prototype.destroy.call(this)},d.startLoad=function(){var y=this._levels;y.forEach(function(b){b.loadError=0}),r.prototype.startLoad.call(this)},d.onManifestLoaded=function(y,b){var g=[],m=[],_=[],x,f={},E,w=!1,T=!1,R=!1;if(b.levels.forEach(function(J){var F=J.attrs;w=w||!!(J.width&&J.height),T=T||!!J.videoCodec,R=R||!!J.audioCodec,l&&J.audioCodec&&J.audioCodec.indexOf("mp4a.40.34")!==-1&&(J.audioCodec=void 0);var k=J.bitrate+"-"+J.attrs.RESOLUTION+"-"+J.attrs.CODECS;E=f[k],E?E.url.push(J.url):(E=new O.Level(J),f[k]=E,g.push(E)),F&&(F.AUDIO&&Object(C.addGroupId)(E,"audio",F.AUDIO),F.SUBTITLES&&Object(C.addGroupId)(E,"text",F.SUBTITLES))}),(w||T)&&R&&(g=g.filter(function(J){var F=J.videoCodec,k=J.width,K=J.height;return!!F||!!(k&&K)})),g=g.filter(function(J){var F=J.audioCodec,k=J.videoCodec;return(!F||Object(A.isCodecSupportedInMp4)(F,"audio"))&&(!k||Object(A.isCodecSupportedInMp4)(k,"video"))}),b.audioTracks&&(m=b.audioTracks.filter(function(J){return!J.audioCodec||Object(A.isCodecSupportedInMp4)(J.audioCodec,"audio")}),Object(C.assignTrackIdsByGroup)(m)),b.subtitles&&(_=b.subtitles,Object(C.assignTrackIdsByGroup)(_)),g.length>0){x=g[0].bitrate,g.sort(function(J,F){return J.bitrate-F.bitrate}),this._levels=g;for(var N=0;N<g.length;N++)if(g[N].bitrate===x){this._firstLevel=N,this.log("manifest loaded, "+g.length+" level(s) found, first bitrate: "+x);break}var j=R&&!T,W={levels:g,audioTracks:m,subtitleTracks:_,firstLevel:this._firstLevel,stats:b.stats,audio:R,video:T,altAudio:!j&&m.some(function(J){return!!J.url})};this.hls.trigger(D.Events.MANIFEST_PARSED,W),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(D.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:b.url,reason:"no level with compatible codecs found in manifest"})},d.onError=function(y,b){if(r.prototype.onError.call(this,y,b),b.fatal)return;var g=b.context,m=this._levels[this.currentLevelIndex];if(g&&(g.type===p.PlaylistContextType.AUDIO_TRACK&&m.audioGroupIds&&g.groupId===m.audioGroupIds[m.urlId]||g.type===p.PlaylistContextType.SUBTITLE_TRACK&&m.textGroupIds&&g.groupId===m.textGroupIds[m.urlId])){this.redundantFailover(this.currentLevelIndex);return}var _=!1,x=!0,f;switch(b.details){case S.ErrorDetails.FRAG_LOAD_ERROR:case S.ErrorDetails.FRAG_LOAD_TIMEOUT:case S.ErrorDetails.KEY_LOAD_ERROR:case S.ErrorDetails.KEY_LOAD_TIMEOUT:if(b.frag){var E=this._levels[b.frag.level];E?(E.fragmentError++,E.fragmentError>this.hls.config.fragLoadingMaxRetry&&(f=b.frag.level)):f=b.frag.level}break;case S.ErrorDetails.LEVEL_LOAD_ERROR:case S.ErrorDetails.LEVEL_LOAD_TIMEOUT:g&&(g.deliveryDirectives&&(x=!1),f=g.level),_=!0;break;case S.ErrorDetails.REMUX_ALLOC_ERROR:f=b.level,_=!0;break}f!==void 0&&this.recoverLevel(b,f,_,x)},d.recoverLevel=function(y,b,g,m){var _=y.details,x=this._levels[b];if(x.loadError++,g){var f=this.retryLoadingOrFail(y);if(f)y.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(m){var E=x.url.length;if(E>1&&x.loadError<E)y.levelRetry=!0,this.redundantFailover(b);else if(this.manualLevelIndex===-1){var w=b===0?this._levels.length-1:b-1;this.currentLevelIndex!==w&&this._levels[w].loadError===0&&(this.warn(_+": switch to "+w),y.levelRetry=!0,this.hls.nextAutoLevel=w)}}},d.redundantFailover=function(y){var b=this._levels[y],g=b.url.length;if(g>1){var m=(b.urlId+1)%g;this.warn("Switching to redundant URL-id "+m),this._levels.forEach(function(_){_.urlId=m}),this.level=y}},d.onFragLoaded=function(y,b){var g=b.frag;if(g!==void 0&&g.type===p.PlaylistLevelType.MAIN){var m=this._levels[g.level];m!==void 0&&(m.fragmentError=0,m.loadError=0)}},d.onLevelLoaded=function(y,b){var g,m=b.level,_=b.details,x=this._levels[m];if(!x){var f;this.warn("Invalid level index "+m),(f=b.deliveryDirectives)!==null&&f!==void 0&&f.skip&&(_.deltaUpdateFailed=!0);return}m===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(m,b,x.details)):(g=b.deliveryDirectives)!==null&&g!==void 0&&g.skip&&(_.deltaUpdateFailed=!0)},d.onAudioTrackSwitched=function(y,b){var g=this.hls.levels[this.currentLevelIndex];if(!g)return;if(g.audioGroupIds){for(var m=-1,_=this.hls.audioTracks[b.id].groupId,x=0;x<g.audioGroupIds.length;x++)if(g.audioGroupIds[x]===_){m=x;break}m!==g.urlId&&(g.urlId=m,this.startLoad())}},d.loadPlaylist=function(y){var b=this.currentLevelIndex,g=this._levels[b];if(this.canLoad&&g&&g.url.length>0){var m=g.urlId,_=g.url[m];if(y)try{_=y.addDirectives(_)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+b+(y?" at sn "+y.msn+" part "+y.part:"")+" with URL-id "+m+" "+_),this.clearTimer(),this.hls.trigger(D.Events.LEVEL_LOADING,{url:_,level:b,id:m,deliveryDirectives:y||null})}},d.removeLevel=function(y,b){var g=function(x,f){return f!==b},m=this._levels.filter(function(_,x){return x!==y?!0:_.url.length>1&&b!==void 0?(_.url=_.url.filter(g),_.audioGroupIds&&(_.audioGroupIds=_.audioGroupIds.filter(g)),_.textGroupIds&&(_.textGroupIds=_.textGroupIds.filter(g)),_.urlId=0,!0):!1}).map(function(_,x){var f=_.details;return f!=null&&f.fragments&&f.fragments.forEach(function(E){E.level=x}),_});this._levels=m,this.hls.trigger(D.Events.LEVELS_UPDATED,{levels:m})},n(t,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(y){var b,g=this._levels;if(g.length===0)return;if(this.currentLevelIndex===y&&(b=g[y])!==null&&b!==void 0&&b.details)return;if(y<0||y>=g.length){var m=y<0;if(this.hls.trigger(D.Events.ERROR,{type:S.ErrorTypes.OTHER_ERROR,details:S.ErrorDetails.LEVEL_SWITCH_ERROR,level:y,fatal:m,reason:"invalid level idx"}),m)return;y=Math.min(y,g.length-1)}this.clearTimer();var _=this.currentLevelIndex,x=g[_],f=g[y];this.log("switching to level "+y+" from "+_),this.currentLevelIndex=y;var E=c({},f,{level:y,maxBitrate:f.maxBitrate,uri:f.uri,urlId:f.urlId});delete E._urlId,this.hls.trigger(D.Events.LEVEL_SWITCHING,E);var w=f.details;if(!w||w.live){var T=this.switchParams(f.uri,x==null?void 0:x.details);this.loadPlaylist(T)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(y){this.manualLevelIndex=y,this._startLevel===void 0&&(this._startLevel=y),y!==-1&&(this.level=y)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(y){this._firstLevel=y}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var y=this.hls.config.startLevel;return y!==void 0?y:this._firstLevel}else return this._startLevel},set:function(y){this._startLevel=y}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(y){this.level=y,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=y)}}]),t}(h.default)},"./src/controller/level-helper.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"addGroupId",function(){return S}),B.d(ee,"assignTrackIdsByGroup",function(){return A}),B.d(ee,"updatePTS",function(){return C}),B.d(ee,"updateFragPTSDTS",function(){return p}),B.d(ee,"mergeDetails",function(){return c}),B.d(ee,"mapPartIntersection",function(){return s}),B.d(ee,"mapFragmentIntersection",function(){return n}),B.d(ee,"adjustSliding",function(){return o}),B.d(ee,"addSliding",function(){return i}),B.d(ee,"computeReloadInterval",function(){return l}),B.d(ee,"getFragmentWithSN",function(){return a}),B.d(ee,"getPartWith",function(){return r});var O=B("./src/polyfills/number.ts"),D=B("./src/utils/logger.ts");function S(t,d,v){switch(d){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(v);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(v);break}}function A(t){var d={};t.forEach(function(v){var y=v.groupId||"";v.id=d[y]=d[y]||0,d[y]++})}function C(t,d,v){var y=t[d],b=t[v];h(y,b)}function h(t,d){var v=d.startPTS;if(Object(O.isFiniteNumber)(v)){var y=0,b;d.sn>t.sn?(y=v-t.start,b=t):(y=t.start-v,b=d),b.duration!==y&&(b.duration=y)}else if(d.sn>t.sn){var g=t.cc===d.cc;g&&t.minEndPTS?d.start=t.start+(t.minEndPTS-t.start):d.start=t.start+t.duration}else d.start=Math.max(t.start-d.duration,0)}function p(t,d,v,y,b,g){var m=y-v;m<=0&&(D.logger.warn("Fragment should have a positive duration",d),y=v+d.duration,g=b+d.duration);var _=v,x=y,f=d.startPTS,E=d.endPTS;if(Object(O.isFiniteNumber)(f)){var w=Math.abs(f-v);Object(O.isFiniteNumber)(d.deltaPTS)?d.deltaPTS=Math.max(w,d.deltaPTS):d.deltaPTS=w,_=Math.max(v,f),v=Math.min(v,f),b=Math.min(b,d.startDTS),x=Math.min(y,E),y=Math.max(y,E),g=Math.max(g,d.endDTS)}d.duration=y-v;var T=v-d.start;d.appendedPTS=y,d.start=d.startPTS=v,d.maxStartPTS=_,d.startDTS=b,d.endPTS=y,d.minEndPTS=x,d.endDTS=g;var R=d.sn;if(!t||R<t.startSN||R>t.endSN)return 0;var N,j=R-t.startSN,W=t.fragments;for(W[j]=d,N=j;N>0;N--)h(W[N],W[N-1]);for(N=j;N<W.length-1;N++)h(W[N],W[N+1]);return t.fragmentHint&&h(W[W.length-1],t.fragmentHint),t.PTSKnown=t.alignedSliding=!0,T}function c(t,d){for(var v=null,y=t.fragments,b=y.length-1;b>=0;b--){var g=y[b].initSegment;if(g){v=g;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var m=0,_;if(n(t,d,function(N,j){N.relurl&&(m=N.cc-j.cc),Object(O.isFiniteNumber)(N.startPTS)&&Object(O.isFiniteNumber)(N.endPTS)&&(j.start=j.startPTS=N.startPTS,j.startDTS=N.startDTS,j.appendedPTS=N.appendedPTS,j.maxStartPTS=N.maxStartPTS,j.endPTS=N.endPTS,j.endDTS=N.endDTS,j.minEndPTS=N.minEndPTS,j.duration=N.endPTS-N.startPTS,j.duration&&(_=j),d.PTSKnown=d.alignedSliding=!0),j.elementaryStreams=N.elementaryStreams,j.loader=N.loader,j.stats=N.stats,j.urlId=N.urlId,N.initSegment&&(j.initSegment=N.initSegment,v=N.initSegment)}),v){var x=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments;x.forEach(function(N){var j;(!N.initSegment||N.initSegment.relurl===((j=v)===null||j===void 0?void 0:j.relurl))&&(N.initSegment=v)})}if(d.skippedSegments&&(d.deltaUpdateFailed=d.fragments.some(function(N){return!N}),d.deltaUpdateFailed)){D.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var f=d.skippedSegments;f--;)d.fragments.shift();d.startSN=d.fragments[0].sn,d.startCC=d.fragments[0].cc}var E=d.fragments;if(m){D.logger.warn("discontinuity sliding from playlist, take drift into account");for(var w=0;w<E.length;w++)E[w].cc+=m}d.skippedSegments&&(d.startCC=d.fragments[0].cc),s(t.partList,d.partList,function(N,j){j.elementaryStreams=N.elementaryStreams,j.stats=N.stats}),_?p(d,_,_.startPTS,_.endPTS,_.startDTS,_.endDTS):o(t,d),E.length&&(d.totalduration=d.edge-E[0].start),d.driftStartTime=t.driftStartTime,d.driftStart=t.driftStart;var T=d.advancedDateTime;if(d.advanced&&T){var R=d.edge;d.driftStart||(d.driftStartTime=T,d.driftStart=R),d.driftEndTime=T,d.driftEnd=R}else d.driftEndTime=t.driftEndTime,d.driftEnd=t.driftEnd,d.advancedDateTime=t.advancedDateTime}function s(t,d,v){if(t&&d)for(var y=0,b=0,g=t.length;b<=g;b++){var m=t[b],_=d[b+y];m&&_&&m.index===_.index&&m.fragment.sn===_.fragment.sn?v(m,_):y--}}function n(t,d,v){for(var y=d.skippedSegments,b=Math.max(t.startSN,d.startSN)-d.startSN,g=(t.fragmentHint?1:0)+(y?d.endSN:Math.min(t.endSN,d.endSN))-d.startSN,m=d.startSN-t.startSN,_=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments,x=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,f=b;f<=g;f++){var E=x[m+f],w=_[f];y&&!w&&f<y&&(w=d.fragments[f]=E),E&&w&&v(E,w)}}function o(t,d){var v=d.startSN+d.skippedSegments-t.startSN,y=t.fragments;if(v<0||v>=y.length)return;i(d,y[v].start)}function i(t,d){if(d){for(var v=t.fragments,y=t.skippedSegments;y<v.length;y++)v[y].start+=d;t.fragmentHint&&(t.fragmentHint.start+=d)}}function l(t,d){var v=1e3*t.levelTargetDuration,y=v/2,b=t.age,g=b>0&&b<v*3,m=d.loading.end-d.loading.start,_,x=t.availabilityDelay;if(t.updated===!1)if(g){var f=333*t.misses;_=Math.max(Math.min(y,m*2),f),t.availabilityDelay=(t.availabilityDelay||0)+_}else _=y;else g?(x=Math.min(x||v/2,b),t.availabilityDelay=x,_=x+v-b):_=v-m;return Math.round(_)}function a(t,d,v){if(!t||!t.details)return null;var y=t.details,b=y.fragments[d-y.startSN];return b||(b=y.fragmentHint,b&&b.sn===d?b:d<y.startSN&&v&&v.sn===d?v:null)}function r(t,d,v){if(!t||!t.details)return null;var y=t.details.partList;if(y)for(var b=y.length;b--;){var g=y[b];if(g.index===v&&g.fragment.sn===d)return g}return null}},"./src/controller/stream-controller.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return y});var O=B("./src/polyfills/number.ts"),D=B("./src/controller/base-stream-controller.ts"),S=B("./src/is-supported.ts"),A=B("./src/events.ts"),C=B("./src/utils/buffer-helper.ts"),h=B("./src/controller/fragment-tracker.ts"),p=B("./src/types/loader.ts"),c=B("./src/loader/fragment.ts"),s=B("./src/demux/transmuxer-interface.ts"),n=B("./src/types/transmuxer.ts"),o=B("./src/controller/gap-controller.ts"),i=B("./src/errors.ts"),l=B("./src/utils/logger.ts");function a(b,g){for(var m=0;m<g.length;m++){var _=g[m];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(b,_.key,_)}}function r(b,g,m){return g&&a(b.prototype,g),m&&a(b,m),b}function t(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,d(b,g)}function d(b,g){return d=Object.setPrototypeOf||function(_,x){return _.__proto__=x,_},d(b,g)}var v=100,y=function(b){t(g,b);function g(_,x){var f;return f=b.call(this,_,x,"[stream-controller]")||this,f.audioCodecSwap=!1,f.gapController=null,f.level=-1,f._forceStartLoad=!1,f.altAudio=!1,f.audioOnly=!1,f.fragPlaying=null,f.onvplaying=null,f.onvseeked=null,f.fragLastKbps=0,f.stalled=!1,f.couldBacktrack=!1,f.audioCodecSwitch=!1,f.videoBuffer=null,f._registerListeners(),f}var m=g.prototype;return m._registerListeners=function(){var x=this.hls;x.on(A.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(A.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(A.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(A.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.on(A.Events.LEVEL_LOADING,this.onLevelLoading,this),x.on(A.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(A.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.on(A.Events.ERROR,this.onError,this),x.on(A.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.on(A.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.on(A.Events.BUFFER_CREATED,this.onBufferCreated,this),x.on(A.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.on(A.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.on(A.Events.FRAG_BUFFERED,this.onFragBuffered,this)},m._unregisterListeners=function(){var x=this.hls;x.off(A.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(A.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(A.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(A.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.off(A.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(A.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.off(A.Events.ERROR,this.onError,this),x.off(A.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.off(A.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.off(A.Events.BUFFER_CREATED,this.onBufferCreated,this),x.off(A.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.off(A.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.off(A.Events.FRAG_BUFFERED,this.onFragBuffered,this)},m.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},m.startLoad=function(x){if(this.levels){var f=this.lastCurrentTime,E=this.hls;if(this.stopLoad(),this.setInterval(v),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var w=E.startLevel;w===-1&&(E.config.testBandwidth?(w=0,this.bitrateTest=!0):w=E.nextAutoLevel),this.level=E.nextLoadLevel=w,this.loadedmetadata=!1}f>0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+f.toFixed(3)),x=f),this.state=D.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=D.State.STOPPED},m.stopLoad=function(){this._forceStartLoad=!1,b.prototype.stopLoad.call(this)},m.doTick=function(){switch(this.state){case D.State.IDLE:this.doTickIdle();break;case D.State.WAITING_LEVEL:{var x,f=this.levels,E=this.level,w=f==null||((x=f[E])===null||x===void 0)?void 0:x.details;if(w&&(!w.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(w))break;this.state=D.State.IDLE;break}break}case D.State.FRAG_LOADING_WAITING_RETRY:{var T,R=self.performance.now(),N=this.retryDate;(!N||R>=N||(T=this.media)!==null&&T!==void 0&&T.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=D.State.IDLE)}break;default:break}this.onTickEnd()},m.onTickEnd=function(){b.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},m.doTickIdle=function(){var x,f,E=this.hls,w=this.levelLastLoaded,T=this.levels,R=this.media,N=E.config,j=E.nextLoadLevel;if(w===null||!R&&(this.startFragRequested||!N.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!T||!T[j])return;var W=T[j];this.level=E.nextLoadLevel=j;var J=W.details;if(!J||this.state===D.State.WAITING_LEVEL||J.live&&this.levelLastLoaded!==j){this.state=D.State.WAITING_LEVEL;return}var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:R,p.PlaylistLevelType.MAIN);if(F===null)return;var k=F.len,K=this.getMaxBufferLength(W.maxBitrate);if(k>=K)return;if(this._streamEnded(F,J)){var Y={};this.altAudio&&(Y.type="video"),this.hls.trigger(A.Events.BUFFER_EOS,Y),this.state=D.State.ENDED;return}var H=F.end,Q=this.getNextFragment(H,J);if(this.couldBacktrack&&!this.fragPrevious&&Q&&Q.sn!=="initSegment"){var re=Q.sn-J.startSN;re>1&&(Q=J.fragments[re-1],this.fragmentTracker.removeFragment(Q))}if(Q&&this.fragmentTracker.getState(Q)===h.FragmentState.OK&&this.nextLoadPosition>H){var oe=this.audioOnly&&!this.altAudio?c.ElementaryStreamTypes.AUDIO:c.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(R,oe,p.PlaylistLevelType.MAIN),Q=this.getNextFragment(this.nextLoadPosition,J)}if(!Q)return;Q.initSegment&&!Q.initSegment.data&&!this.bitrateTest&&(Q=Q.initSegment),((x=Q.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((f=Q.decryptdata)!==null&&f!==void 0&&f.key)?this.loadKey(Q,J):this.loadFragment(Q,J,H)},m.loadFragment=function(x,f,E){var w,T=this.fragmentTracker.getState(x);if(this.fragCurrent=x,T===h.FragmentState.BACKTRACKED){var R=this.fragmentTracker.getBacktrackData(x);if(R){this._handleFragmentLoadProgress(R),this._handleFragmentLoadComplete(R);return}else T=h.FragmentState.NOT_LOADED}T===h.FragmentState.NOT_LOADED||T===h.FragmentState.PARTIAL?x.sn==="initSegment"?this._loadInitSegment(x):this.bitrateTest?(x.bitrateTest=!0,this.log("Fragment "+x.sn+" of level "+x.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(x)):(this.startFragRequested=!0,b.prototype.loadFragment.call(this,x,f,E)):T===h.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((w=this.media)===null||w===void 0?void 0:w.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},m.getAppendedFrag=function(x){var f=this.fragmentTracker.getAppendedFrag(x,p.PlaylistLevelType.MAIN);return f&&"fragment"in f?f.fragment:f},m.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,p.PlaylistLevelType.MAIN)},m.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},m.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},m.nextLevelSwitch=function(){var x=this.levels,f=this.media;if(f!=null&&f.readyState){var E,w=this.getAppendedFrag(f.currentTime);if(w&&w.start>1&&this.flushMainBuffer(0,w.start-1),!f.paused&&x){var T=this.hls.nextLoadLevel,R=x[T],N=this.fragLastKbps;N&&this.fragCurrent?E=this.fragCurrent.duration*R.maxBitrate/(1e3*N)+1:E=0}else E=0;var j=this.getBufferedFrag(f.currentTime+E);if(j){var W=this.followingBufferedFrag(j);if(W){this.abortCurrentFrag();var J=W.maxStartPTS?W.maxStartPTS:W.start,F=W.duration,k=Math.max(j.end,J+Math.min(Math.max(F-this.config.maxFragLookUpTolerance,F*.5),F*.75));this.flushMainBuffer(k,Number.POSITIVE_INFINITY)}}}},m.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===D.State.KEY_LOADING&&(this.state=D.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},m.flushMainBuffer=function(x,f){b.prototype.flushMainBuffer.call(this,x,f,this.altAudio?"video":null)},m.onMediaAttached=function(x,f){b.prototype.onMediaAttached.call(this,x,f);var E=f.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),E.addEventListener("playing",this.onvplaying),E.addEventListener("seeked",this.onvseeked),this.gapController=new o.default(this.config,E,this.fragmentTracker,this.hls)},m.onMediaDetaching=function(){var x=this.media;x&&(x.removeEventListener("playing",this.onvplaying),x.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),b.prototype.onMediaDetaching.call(this)},m.onMediaPlaying=function(){this.tick()},m.onMediaSeeked=function(){var x=this.media,f=x?x.currentTime:null;Object(O.isFiniteNumber)(f)&&this.log("Media seeked to "+f.toFixed(3)),this.tick()},m.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(A.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},m.onManifestParsed=function(x,f){var E=!1,w=!1,T;f.levels.forEach(function(R){T=R.audioCodec,T&&(T.indexOf("mp4a.40.2")!==-1&&(E=!0),T.indexOf("mp4a.40.5")!==-1&&(w=!0))}),this.audioCodecSwitch=E&&w&&!Object(S.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=f.levels,this.startFragRequested=!1},m.onLevelLoading=function(x,f){var E=this.levels;if(!E||this.state!==D.State.IDLE)return;var w=E[f.level];(!w.details||w.details.live&&this.levelLastLoaded!==f.level||this.waitForCdnTuneIn(w.details))&&(this.state=D.State.WAITING_LEVEL)},m.onLevelLoaded=function(x,f){var E,w=this.levels,T=f.level,R=f.details,N=R.totalduration;if(!w){this.warn("Levels were reset while loading level "+T);return}this.log("Level "+T+" loaded ["+R.startSN+","+R.endSN+"], cc ["+R.startCC+", "+R.endCC+"] duration:"+N);var j=this.fragCurrent;j&&(this.state===D.State.FRAG_LOADING||this.state===D.State.FRAG_LOADING_WAITING_RETRY)&&(j.level!==f.level&&j.loader&&(this.state=D.State.IDLE,j.loader.abort()));var W=w[T],J=0;if(R.live||(E=W.details)!==null&&E!==void 0&&E.live){if(R.fragments[0]||(R.deltaUpdateFailed=!0),R.deltaUpdateFailed)return;J=this.alignPlaylists(R,W.details)}if(W.details=R,this.levelLastLoaded=T,this.hls.trigger(A.Events.LEVEL_UPDATED,{details:R,level:T}),this.state===D.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(R))return;this.state=D.State.IDLE}this.startFragRequested?R.live&&this.synchronizeToLiveEdge(R):this.setStartPosition(R,J),this.tick()},m._handleFragmentLoadProgress=function(x){var f,E=x.frag,w=x.part,T=x.payload,R=this.levels;if(!R){this.warn("Levels were reset while fragment load was in progress. Fragment "+E.sn+" of level "+E.level+" will not be buffered");return}var N=R[E.level],j=N.details;if(!j){this.warn("Dropping fragment "+E.sn+" of level "+E.level+" after level details were reset");return}var W=N.videoCodec,J=j.PTSKnown||!j.live,F=(f=E.initSegment)===null||f===void 0?void 0:f.data,k=this._getAudioCodec(N),K=this.transmuxer=this.transmuxer||new s.default(this.hls,p.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Y=w?w.index:-1,H=Y!==-1,Q=new n.ChunkMetadata(E.level,E.sn,E.stats.chunkCount,T.byteLength,Y,H),re=this.initPTS[E.cc];K.push(T,F,k,W,E,w,j.totalduration,J,Q,re)},m.onAudioTrackSwitching=function(x,f){var E=this.altAudio,w=!!f.url,T=f.id;if(!w){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var R=this.fragCurrent;R!=null&&R.loader&&(this.log("Switching to main audio track, cancel main fragment load"),R.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var N=this.hls;E&&N.trigger(A.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),N.trigger(A.Events.AUDIO_TRACK_SWITCHED,{id:T})}},m.onAudioTrackSwitched=function(x,f){var E=f.id,w=!!this.hls.audioTracks[E].url;if(w){var T=this.videoBuffer;T&&this.mediaBuffer!==T&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=T)}this.altAudio=w,this.tick()},m.onBufferCreated=function(x,f){var E=f.tracks,w,T,R=!1;for(var N in E){var j=E[N];if(j.id==="main"){if(T=N,w=j,N==="video"){var W=E[N];W&&(this.videoBuffer=W.buffer)}}else R=!0}R&&w?(this.log("Alternate track found, use "+T+".buffered to schedule main fragment loading"),this.mediaBuffer=w.buffer):this.mediaBuffer=this.media},m.onFragBuffered=function(x,f){var E=f.frag,w=f.part;if(E&&E.type!==p.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(E)){this.warn("Fragment "+E.sn+(w?" p: "+w.index:"")+" of level "+E.level+" finished buffering, but was aborted. state: "+this.state),this.state===D.State.PARSED&&(this.state=D.State.IDLE);return}var T=w?w.stats:E.stats;this.fragLastKbps=Math.round(8*T.total/(T.buffering.end-T.loading.first)),E.sn!=="initSegment"&&(this.fragPrevious=E),this.fragBufferedComplete(E,w)},m.onError=function(x,f){switch(f.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(p.PlaylistLevelType.MAIN,f);break;case i.ErrorDetails.LEVEL_LOAD_ERROR:case i.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==D.State.ERROR&&(f.fatal?(this.warn(""+f.details),this.state=D.State.ERROR):!f.levelRetry&&this.state===D.State.WAITING_LEVEL&&(this.state=D.State.IDLE));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(f.parent==="main"&&(this.state===D.State.PARSING||this.state===D.State.PARSED)){var E=!0,w=this.getFwdBufferInfo(this.media,p.PlaylistLevelType.MAIN);w&&w.len>.5&&(E=!this.reduceMaxBufferLength(w.len)),E&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},m.checkBuffer=function(){var x=this.media,f=this.gapController;if(!x||!f||!x.readyState)return;var E=C.BufferHelper.getBuffered(x);!this.loadedmetadata&&E.length?(this.loadedmetadata=!0,this.seekToStartPos()):f.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},m.onFragLoadEmergencyAborted=function(){this.state=D.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},m.onBufferFlushed=function(x,f){var E=f.type;if(E!==c.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var w=(E===c.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(w,E,p.PlaylistLevelType.MAIN)}},m.onLevelsUpdated=function(x,f){this.levels=f.levels},m.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},m.seekToStartPos=function(){var x=this.media,f=x.currentTime,E=this.startPosition;if(E>=0&&f<E){if(x.seeking){l.logger.log("could not seek to "+E+", already seeking at "+f);return}var w=C.BufferHelper.getBuffered(x),T=w.length?w.start(0):0,R=T-E;R>0&&(R<this.config.maxBufferHole||R<this.config.maxFragLookUpTolerance)&&(l.logger.log("adjusting start position by "+R+" to match buffer start"),E+=R,this.startPosition=E),this.log("seek to target start position "+E+" from current time "+f),x.currentTime=E}},m._getAudioCodec=function(x){var f=this.config.defaultAudioCodec||x.audioCodec;return this.audioCodecSwap&&f&&(this.log("Swapping audio codec"),f.indexOf("mp4a.40.5")!==-1?f="mp4a.40.2":f="mp4a.40.5"),f},m._loadBitrateTestFrag=function(x){var f=this;this._doFragLoad(x).then(function(E){var w=f.hls;if(!E||w.nextLoadLevel||f.fragContextChanged(x))return;f.fragLoadError=0,f.state=D.State.IDLE,f.startFragRequested=!1,f.bitrateTest=!1;var T=x.stats;T.parsing.start=T.parsing.end=T.buffering.start=T.buffering.end=self.performance.now(),w.trigger(A.Events.FRAG_LOADED,E)})},m._handleTransmuxComplete=function(x){var f,E="main",w=this.hls,T=x.remuxResult,R=x.chunkMeta,N=this.getCurrentContext(R);if(!N){this.warn("The loading context changed while buffering fragment "+R.sn+" of level "+R.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(R.level);return}var j=N.frag,W=N.part,J=N.level,F=T.video,k=T.text,K=T.id3,Y=T.initSegment,H=this.altAudio?void 0:T.audio;if(this.fragContextChanged(j))return;if(this.state=D.State.PARSING,Y){Y.tracks&&(this._bufferInitSegment(J,Y.tracks,j,R),w.trigger(A.Events.FRAG_PARSING_INIT_SEGMENT,{frag:j,id:E,tracks:Y.tracks}));var Q=Y.initPTS,re=Y.timescale;Object(O.isFiniteNumber)(Q)&&(this.initPTS[j.cc]=Q,w.trigger(A.Events.INIT_PTS_FOUND,{frag:j,id:E,initPTS:Q,timescale:re}))}if(F&&T.independent!==!1){if(J.details){var oe=F.startPTS,me=F.endPTS,he=F.startDTS,Ee=F.endDTS;if(W)W.elementaryStreams[F.type]={startPTS:oe,endPTS:me,startDTS:he,endDTS:Ee};else if(F.firstKeyFrame&&F.independent&&(this.couldBacktrack=!0),F.dropped&&F.independent){var de=this.getLoadPosition()+this.config.maxBufferHole;if(de<oe){this.backtrack(j);return}j.setElementaryStreamInfo(F.type,j.start,me,j.start,Ee,!0)}j.setElementaryStreamInfo(F.type,oe,me,he,Ee),this.bufferFragmentData(F,j,W,R)}}else if(T.independent===!1){this.backtrack(j);return}if(H){var be=H.startPTS,Ue=H.endPTS,Re=H.startDTS,De=H.endDTS;W&&(W.elementaryStreams[c.ElementaryStreamTypes.AUDIO]={startPTS:be,endPTS:Ue,startDTS:Re,endDTS:De}),j.setElementaryStreamInfo(c.ElementaryStreamTypes.AUDIO,be,Ue,Re,De),this.bufferFragmentData(H,j,W,R)}if(K!=null&&(f=K.samples)!==null&&f!==void 0&&f.length){var je={frag:j,id:E,samples:K.samples};w.trigger(A.Events.FRAG_PARSING_METADATA,je)}if(k){var ve={frag:j,id:E,samples:k.samples};w.trigger(A.Events.FRAG_PARSING_USERDATA,ve)}},m._bufferInitSegment=function(x,f,E,w){var T=this;if(this.state!==D.State.PARSING)return;this.audioOnly=!!f.audio&&!f.video,this.altAudio&&!this.audioOnly&&delete f.audio;var R=f.audio,N=f.video,j=f.audiovideo;if(R){var W=x.audioCodec,J=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(W&&(W.indexOf("mp4a.40.5")!==-1?W="mp4a.40.2":W="mp4a.40.5"),R.metadata.channelCount!==1&&J.indexOf("firefox")===-1&&(W="mp4a.40.5")),J.indexOf("android")!==-1&&R.container!=="audio/mpeg"&&(W="mp4a.40.2",this.log("Android: force audio codec to "+W)),x.audioCodec&&x.audioCodec!==W&&this.log('Swapping manifest audio codec "'+x.audioCodec+'" for "'+W+'"'),R.levelCodec=W,R.id="main",this.log("Init audio buffer, container:"+R.container+", codecs[selected/level/parsed]=["+(W||"")+"/"+(x.audioCodec||"")+"/"+R.codec+"]")}N&&(N.levelCodec=x.videoCodec,N.id="main",this.log("Init video buffer, container:"+N.container+", codecs[level/parsed]=["+(x.videoCodec||"")+"/"+N.codec+"]")),j&&this.log("Init audiovideo buffer, container:"+j.container+", codecs[level/parsed]=["+(x.attrs.CODECS||"")+"/"+j.codec+"]"),this.hls.trigger(A.Events.BUFFER_CODECS,f),Object.keys(f).forEach(function(F){var k=f[F],K=k.initSegment;K!=null&&K.byteLength&&T.hls.trigger(A.Events.BUFFER_APPENDING,{type:F,data:K,frag:E,part:null,chunkMeta:w,parent:E.type})}),this.tick()},m.backtrack=function(x){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(x);var f=this.fragmentTracker.backtrack(x);this.fragPrevious=null,this.nextLoadPosition=x.start,f?this.resetFragmentLoading(x):this.state=D.State.BACKTRACKING},m.checkFragmentChanged=function(){var x=this.media,f=null;if(x&&x.readyState>1&&x.seeking===!1){var E=x.currentTime;if(C.BufferHelper.isBuffered(x,E)?f=this.getAppendedFrag(E):C.BufferHelper.isBuffered(x,E+.1)&&(f=this.getAppendedFrag(E+.1)),f){var w=this.fragPlaying,T=f.level;(!w||f.sn!==w.sn||w.level!==T||f.urlId!==w.urlId)&&(this.hls.trigger(A.Events.FRAG_CHANGED,{frag:f}),(!w||w.level!==T)&&this.hls.trigger(A.Events.LEVEL_SWITCHED,{level:T}),this.fragPlaying=f)}}},r(g,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var f=this.getAppendedFrag(x.currentTime);if(f)return f.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var f=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(f)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),g}(D.default)},"./src/controller/subtitle-stream-controller.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"SubtitleStreamController",function(){return t});var O=B("./src/events.ts"),D=B("./src/utils/logger.ts"),S=B("./src/utils/buffer-helper.ts"),A=B("./src/controller/fragment-finders.ts"),C=B("./src/utils/discontinuities.ts"),h=B("./src/controller/level-helper.ts"),p=B("./src/controller/fragment-tracker.ts"),c=B("./src/controller/base-stream-controller.ts"),s=B("./src/types/loader.ts"),n=B("./src/types/level.ts");function o(d,v){for(var y=0;y<v.length;y++){var b=v[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(d,b.key,b)}}function i(d,v,y){return v&&o(d.prototype,v),y&&o(d,y),d}function l(d,v){d.prototype=Object.create(v.prototype),d.prototype.constructor=d,a(d,v)}function a(d,v){return a=Object.setPrototypeOf||function(b,g){return b.__proto__=g,b},a(d,v)}var r=500,t=function(d){l(v,d);function v(b,g){var m;return m=d.call(this,b,g,"[subtitle-stream-controller]")||this,m.levels=[],m.currentTrackId=-1,m.tracksBuffered=[],m.mainDetails=null,m._registerListeners(),m}var y=v.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var g=this.hls;g.on(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),g.on(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),g.on(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),g.on(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),g.on(O.Events.ERROR,this.onError,this),g.on(O.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),g.on(O.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),g.on(O.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),g.on(O.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),g.on(O.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y._unregisterListeners=function(){var g=this.hls;g.off(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),g.off(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),g.off(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),g.off(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),g.off(O.Events.ERROR,this.onError,this),g.off(O.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),g.off(O.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),g.off(O.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),g.off(O.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),g.off(O.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y.startLoad=function(){this.stopLoad(),this.state=c.State.IDLE,this.setInterval(r),this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},y.onLevelLoaded=function(g,m){this.mainDetails=m.details},y.onSubtitleFragProcessed=function(g,m){var _=m.frag,x=m.success;if(this.fragPrevious=_,this.state=c.State.IDLE,!x)return;var f=this.tracksBuffered[this.currentTrackId];if(!f)return;for(var E,w=_.start,T=0;T<f.length;T++)if(w>=f[T].start&&w<=f[T].end){E=f[T];break}var R=_.start+_.duration;E?E.end=R:(E={start:w,end:R},f.push(E)),this.fragmentTracker.fragBuffered(_)},y.onBufferFlushing=function(g,m){var _=m.startOffset,x=m.endOffset;if(_===0&&x!==Number.POSITIVE_INFINITY){var f=this.currentTrackId,E=this.levels;if(!E.length||!E[f]||!E[f].details)return;var w=E[f].details,T=w.targetduration,R=x-T;if(R<=0)return;m.endOffsetSubtitles=Math.max(0,R),this.tracksBuffered.forEach(function(N){for(var j=0;j<N.length;){if(N[j].end<=R){N.shift();continue}else if(N[j].start<R)N[j].start=R;else break;j++}}),this.fragmentTracker.removeFragmentsInRange(_,R,s.PlaylistLevelType.SUBTITLE)}},y.onError=function(g,m){var _,x=m.frag;if(!x||x.type!==s.PlaylistLevelType.SUBTITLE)return;(_=this.fragCurrent)!==null&&_!==void 0&&_.loader&&this.fragCurrent.loader.abort(),this.state=c.State.IDLE},y.onSubtitleTracksUpdated=function(g,m){var _=this,x=m.subtitleTracks;this.tracksBuffered=[],this.levels=x.map(function(f){return new n.Level(f)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(f){_.tracksBuffered[f.id]=[]}),this.mediaBuffer=null},y.onSubtitleTrackSwitch=function(g,m){if(this.currentTrackId=m.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var _=this.levels[this.currentTrackId];_!=null&&_.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,_&&this.setInterval(r)},y.onSubtitleTrackLoaded=function(g,m){var _,x=m.details,f=m.id,E=this.currentTrackId,w=this.levels;if(!w.length)return;var T=w[E];if(f>=w.length||f!==E||!T)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(_=T.details)!==null&&_!==void 0&&_.live){var R=this.mainDetails;if(x.deltaUpdateFailed||!R)return;var N=R.fragments[0];if(!T.details)x.hasProgramDateTime&&R.hasProgramDateTime?Object(C.alignMediaPlaylistByPDT)(x,R):N&&Object(h.addSliding)(x,N.start);else{var j=this.alignPlaylists(x,T.details);j===0&&N&&Object(h.addSliding)(x,N.start)}}if(T.details=x,this.levelLastLoaded=f,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===c.State.IDLE){var W=Object(A.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);W||(this.warn("Subtitle playlist not aligned with playback"),T.details=void 0)}},y._handleFragmentLoadComplete=function(g){var m=g.frag,_=g.payload,x=m.decryptdata,f=this.hls;if(this.fragContextChanged(m))return;if(_&&_.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var E=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(_),x.key.buffer,x.iv.buffer).then(function(w){var T=performance.now();f.trigger(O.Events.FRAG_DECRYPTED,{frag:m,payload:w,stats:{tstart:E,tdecrypt:T}})})}},y.doTick=function(){if(!this.media){this.state=c.State.IDLE;return}if(this.state===c.State.IDLE){var g,m=this.currentTrackId,_=this.levels;if(!_.length||!_[m]||!_[m].details)return;var x=_[m].details,f=x.targetduration,E=this.config,w=this.media,T=S.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,w.currentTime-f,E.maxBufferHole),R=T.end,N=T.len,j=this.getMaxBufferLength()+f;if(N>j)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var W=x.fragments,J=W.length,F=x.edge,k,K=this.fragPrevious;if(R<F){var Y=E.maxFragLookUpTolerance;K&&x.hasProgramDateTime&&(k=Object(A.findFragmentByPDT)(W,K.endProgramDateTime,Y)),k||(k=Object(A.findFragmentByPTS)(K,W,R,Y),!k&&K&&K.start<W[0].start&&(k=W[0]))}else k=W[J-1];(g=k)!==null&&g!==void 0&&g.encrypted?(D.logger.log("Loading key for "+k.sn),this.state=c.State.KEY_LOADING,this.hls.trigger(O.Events.KEY_LOADING,{frag:k})):k&&this.fragmentTracker.getState(k)===p.FragmentState.NOT_LOADED&&this.loadFragment(k,x,R)}},y.loadFragment=function(g,m,_){this.fragCurrent=g,d.prototype.loadFragment.call(this,g,m,_)},i(v,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),v}(c.default)},"./src/controller/subtitle-track-controller.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/events.ts"),D=B("./src/utils/texttrack-utils.ts"),S=B("./src/controller/base-playlist-controller.ts"),A=B("./src/types/loader.ts");function C(o,i){for(var l=0;l<i.length;l++){var a=i[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,a.key,a)}}function h(o,i,l){return i&&C(o.prototype,i),l&&C(o,l),o}function p(o,i){o.prototype=Object.create(i.prototype),o.prototype.constructor=o,c(o,i)}function c(o,i){return c=Object.setPrototypeOf||function(a,r){return a.__proto__=r,a},c(o,i)}var s=function(o){p(i,o);function i(a){var r;return r=o.call(this,a,"[subtitle-track-controller]")||this,r.media=null,r.tracks=[],r.groupId=null,r.tracksInGroup=[],r.trackId=-1,r.selectDefaultTrack=!0,r.queuedDefaultTrack=-1,r.trackChangeListener=function(){return r.onTextTracksChanged()},r.asyncPollTrackChange=function(){return r.pollTrackChange(0)},r.useTextTrackPolling=!1,r.subtitlePollingInterval=-1,r.subtitleDisplay=!0,r.registerListeners(),r}var l=i.prototype;return l.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,o.prototype.destroy.call(this)},l.registerListeners=function(){var r=this.hls;r.on(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(O.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(O.Events.LEVEL_LOADING,this.onLevelLoading,this),r.on(O.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),r.on(O.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),r.on(O.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){var r=this.hls;r.off(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(O.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(O.Events.LEVEL_LOADING,this.onLevelLoading,this),r.off(O.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),r.off(O.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),r.off(O.Events.ERROR,this.onError,this)},l.onMediaAttached=function(r,t){if(this.media=t.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)},l.pollTrackChange=function(r){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,r)},l.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 r=n(this.media.textTracks);r.forEach(function(t){Object(D.clearCurrentCues)(t)}),this.subtitleTrack=-1,this.media=null},l.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},l.onManifestParsed=function(r,t){this.tracks=t.subtitleTracks},l.onSubtitleTrackLoaded=function(r,t){var d=t.id,v=t.details,y=this.trackId,b=this.tracksInGroup[y];if(!b){this.warn("Invalid subtitle track id "+d);return}var g=b.details;b.details=t.details,this.log("subtitle track "+d+" loaded ["+v.startSN+"-"+v.endSN+"]"),d===this.trackId&&(this.retryCount=0,this.playlistLoaded(d,t,g))},l.onLevelLoading=function(r,t){this.switchLevel(t.level)},l.onLevelSwitching=function(r,t){this.switchLevel(t.level)},l.switchLevel=function(r){var t=this.hls.levels[r];if(!(t!=null&&t.textGroupIds))return;var d=t.textGroupIds[t.urlId];if(this.groupId!==d){var v=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,y=this.tracks.filter(function(m){return!d||m.groupId===d});this.tracksInGroup=y;var b=this.findTrackId(v==null?void 0:v.name)||this.findTrackId();this.groupId=d;var g={subtitleTracks:y};this.log("Updating subtitle tracks, "+y.length+' track(s) found in "'+d+'" group-id'),this.hls.trigger(O.Events.SUBTITLE_TRACKS_UPDATED,g),b!==-1&&this.setSubtitleTrack(b,v)}},l.findTrackId=function(r){for(var t=this.tracksInGroup,d=0;d<t.length;d++){var v=t[d];if((!this.selectDefaultTrack||v.default)&&(!r||r===v.name))return v.id}return-1},l.onError=function(r,t){if(o.prototype.onError.call(this,r,t),t.fatal||!t.context)return;t.context.type===A.PlaylistContextType.SUBTITLE_TRACK&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&this.retryLoadingOrFail(t)},l.loadPlaylist=function(r){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var d=t.id,v=t.groupId,y=t.url;if(r)try{y=r.addDirectives(y)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("Loading subtitle playlist for id "+d),this.hls.trigger(O.Events.SUBTITLE_TRACK_LOADING,{url:y,id:d,groupId:v,deliveryDirectives:r||null})}},l.toggleTrackModes=function(r){var t=this,d=this.media,v=this.subtitleDisplay,y=this.trackId;if(!d)return;var b=n(d.textTracks),g=b.filter(function(x){return x.groupId===t.groupId});if(r===-1)[].slice.call(b).forEach(function(x){x.mode="disabled"});else{var m=g[y];m&&(m.mode="disabled")}var _=g[r];_&&(_.mode=v?"showing":"hidden")},l.setSubtitleTrack=function(r,t){var d,v=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=r;return}if(this.trackId!==r&&this.toggleTrackModes(r),this.trackId===r&&(r===-1||(d=v[r])!==null&&d!==void 0&&d.details)||r<-1||r>=v.length)return;this.clearTimer();var y=v[r];if(this.log("Switching to subtitle track "+r),this.trackId=r,y){var b=y.id,g=y.groupId,m=g===void 0?"":g,_=y.name,x=y.type,f=y.url;this.hls.trigger(O.Events.SUBTITLE_TRACK_SWITCH,{id:b,groupId:m,name:_,type:x,url:f});var E=this.switchParams(y.url,t==null?void 0:t.details);this.loadPlaylist(E)}else this.hls.trigger(O.Events.SUBTITLE_TRACK_SWITCH,{id:r})},l.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var r=-1,t=n(this.media.textTracks),d=0;d<t.length;d++)if(t[d].mode==="hidden")r=d;else if(t[d].mode==="showing"){r=d;break}this.subtitleTrack!==r&&(this.subtitleTrack=r)},h(i,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(r){this.selectDefaultTrack=!1;var t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(r,t)}}]),i}(S.default);function n(o){for(var i=[],l=0;l<o.length;l++){var a=o[l];a.kind==="subtitles"&&a.label&&i.push(o[l])}return i}ee.default=s},"./src/controller/timeline-controller.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"TimelineController",function(){return n});var O=B("./src/polyfills/number.ts"),D=B("./src/events.ts"),S=B("./src/utils/cea-608-parser.ts"),A=B("./src/utils/output-filter.ts"),C=B("./src/utils/webvtt-parser.ts"),h=B("./src/utils/texttrack-utils.ts"),p=B("./src/utils/imsc1-ttml-parser.ts"),c=B("./src/types/loader.ts"),s=B("./src/utils/logger.ts"),n=function(){function a(t){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=l(),this.captionsProperties=void 0,this.hls=t,this.config=t.config,this.Cues=t.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 d=new A.default(this,"textTrack1"),v=new A.default(this,"textTrack2"),y=new A.default(this,"textTrack3"),b=new A.default(this,"textTrack4");this.cea608Parser1=new S.default(1,d,v),this.cea608Parser2=new S.default(3,y,b)}t.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(D.Events.FRAG_LOADING,this.onFragLoading,this),t.on(D.Events.FRAG_LOADED,this.onFragLoaded,this),t.on(D.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.on(D.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.on(D.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(D.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var r=a.prototype;return r.destroy=function(){var d=this.hls;d.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),d.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),d.off(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),d.off(D.Events.FRAG_LOADING,this.onFragLoading,this),d.off(D.Events.FRAG_LOADED,this.onFragLoaded,this),d.off(D.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),d.off(D.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),d.off(D.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),d.off(D.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),d.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},r.addCues=function(d,v,y,b,g){for(var m=!1,_=g.length;_--;){var x=g[_],f=i(x[0],x[1],v,y);if(f>=0&&(x[0]=Math.min(x[0],v),x[1]=Math.max(x[1],y),m=!0,f/(y-v)>.5))return}if(m||g.push([v,y]),this.config.renderTextTracksNatively){var E=this.captionsTracks[d];this.Cues.newCue(E,v,y,b)}else{var w=this.Cues.newCue(null,v,y,b);this.hls.trigger(D.Events.CUES_PARSED,{type:"captions",cues:w,track:d})}},r.onInitPtsFound=function(d,v){var y=this,b=v.frag,g=v.id,m=v.initPTS,_=v.timescale,x=this.unparsedVttFrags;g==="main"&&(this.initPTS[b.cc]=m,this.timescale[b.cc]=_),x.length&&(this.unparsedVttFrags=[],x.forEach(function(f){y.onFragLoaded(D.Events.FRAG_LOADED,f)}))},r.getExistingTrack=function(d){var v=this.media;if(v)for(var y=0;y<v.textTracks.length;y++){var b=v.textTracks[y];if(b[d])return b}return null},r.createCaptionsTrack=function(d){this.config.renderTextTracksNatively?this.createNativeTrack(d):this.createNonNativeTrack(d)},r.createNativeTrack=function(d){if(this.captionsTracks[d])return;var v=this.captionsProperties,y=this.captionsTracks,b=this.media,g=v[d],m=g.label,_=g.languageCode,x=this.getExistingTrack(d);if(x)y[d]=x,Object(h.clearCurrentCues)(y[d]),Object(h.sendAddTrackEvent)(y[d],b);else{var f=this.createTextTrack("captions",m,_);f&&(f[d]=!0,y[d]=f)}},r.createNonNativeTrack=function(d){if(this.nonNativeCaptionsTracks[d])return;var v=this.captionsProperties[d];if(!v)return;var y=v.label,b={_id:d,label:y,kind:"captions",default:v.media?!!v.media.default:!1,closedCaptions:v.media};this.nonNativeCaptionsTracks[d]=b,this.hls.trigger(D.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[b]})},r.createTextTrack=function(d,v,y){var b=this.media;return b?b.addTextTrack(d,v,y):void 0},r.onMediaAttaching=function(d,v){this.media=v.media,this._cleanTracks()},r.onMediaDetaching=function(){var d=this.captionsTracks;Object.keys(d).forEach(function(v){Object(h.clearCurrentCues)(d[v]),delete d[v]}),this.nonNativeCaptionsTracks={}},r.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=l(),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())},r._cleanTracks=function(){var d=this.media;if(!d)return;var v=d.textTracks;if(v)for(var y=0;y<v.length;y++)Object(h.clearCurrentCues)(v[y])},r.onSubtitleTracksUpdated=function(d,v){var y=this;this.textTracks=[];var b=v.subtitleTracks||[],g=b.some(function(f){return f.textCodec===p.IMSC1_CODEC});if(this.config.enableWebVTT||g&&this.config.enableIMSC1){var m=this.tracks&&b&&this.tracks.length===b.length;if(this.tracks=b||[],this.config.renderTextTracksNatively){var _=this.media?this.media.textTracks:[];this.tracks.forEach(function(f,E){var w;if(E<_.length){for(var T=null,R=0;R<_.length;R++)if(o(_[R],f)){T=_[R];break}T&&(w=T)}w?Object(h.clearCurrentCues)(w):(w=y.createTextTrack("subtitles",f.name,f.lang),w&&(w.mode="disabled")),w&&(w.groupId=f.groupId,y.textTracks.push(w))})}else if(!m&&this.tracks&&this.tracks.length){var x=this.tracks.map(function(f){return{label:f.name,kind:f.type.toLowerCase(),default:f.default,subtitleTrack:f}});this.hls.trigger(D.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:x})}}},r.onManifestLoaded=function(d,v){var y=this;this.config.enableCEA708Captions&&v.captions&&v.captions.forEach(function(b){var g=/(?:CC|SERVICE)([1-4])/.exec(b.instreamId);if(!g)return;var m="textTrack"+g[1],_=y.captionsProperties[m];if(!_)return;_.label=b.name,b.lang&&(_.languageCode=b.lang),_.media=b})},r.onFragLoading=function(d,v){var y=this.cea608Parser1,b=this.cea608Parser2,g=this.lastSn,m=this.lastPartIndex;if(!this.enabled||!(y&&b))return;if(v.frag.type===c.PlaylistLevelType.MAIN){var _,x,f=v.frag.sn,E=(_=v==null||((x=v.part)===null||x===void 0)?void 0:x.index)!=null?_:-1;f===g+1||f===g&&E===m+1||(y.reset(),b.reset()),this.lastSn=f,this.lastPartIndex=E}},r.onFragLoaded=function(d,v){var y=v.frag,b=v.payload,g=this.initPTS,m=this.unparsedVttFrags;if(y.type===c.PlaylistLevelType.SUBTITLE)if(b.byteLength){if(!Object(O.isFiniteNumber)(g[y.cc])){m.push(v),g.length&&this.hls.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Missing initial subtitle PTS")});return}var _=y.decryptdata;if(_==null||_.key==null||_.method!=="AES-128"){var x=this.tracks[y.level],f=this.vttCCs;f[y.cc]||(f[y.cc]={start:y.start,prevCC:this.prevCC,new:!0},this.prevCC=y.cc),x&&x.textCodec===p.IMSC1_CODEC?this._parseIMSC1(y,b):this._parseVTTs(y,b,f)}}else this.hls.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Empty subtitle payload")})},r._parseIMSC1=function(d,v){var y=this,b=this.hls;Object(p.parseIMSC1)(v,this.initPTS[d.cc],this.timescale[d.cc],function(g){y._appendCues(g,d.level),b.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:d})},function(g){s.logger.log("Failed to parse IMSC1: "+g),b.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d,error:g})})},r._parseVTTs=function(d,v,y){var b=this,g=this.hls;Object(C.parseWebVTT)(v,this.initPTS[d.cc],this.timescale[d.cc],y,d.cc,d.start,function(m){b._appendCues(m,d.level),g.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:d})},function(m){b._fallbackToIMSC1(d,v),s.logger.log("Failed to parse VTT cue: "+m),g.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d,error:m})})},r._fallbackToIMSC1=function(d,v){var y=this,b=this.tracks[d.level];b.textCodec||Object(p.parseIMSC1)(v,this.initPTS[d.cc],this.timescale[d.cc],function(){b.textCodec=p.IMSC1_CODEC,y._parseIMSC1(d,v)},function(){b.textCodec="wvtt"})},r._appendCues=function(d,v){var y=this.hls;if(this.config.renderTextTracksNatively){var b=this.textTracks[v];if(b.mode==="disabled")return;d.forEach(function(_){return Object(h.addCueToTrack)(b,_)})}else{var g=this.tracks[v],m=g.default?"default":"subtitles"+v;y.trigger(D.Events.CUES_PARSED,{type:"subtitles",cues:d,track:m})}},r.onFragDecrypted=function(d,v){var y=v.frag;if(y.type===c.PlaylistLevelType.SUBTITLE){if(!Object(O.isFiniteNumber)(this.initPTS[y.cc])){this.unparsedVttFrags.push(v);return}this.onFragLoaded(D.Events.FRAG_LOADED,v)}},r.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},r.onFragParsingUserdata=function(d,v){var y=this.cea608Parser1,b=this.cea608Parser2;if(!this.enabled||!(y&&b))return;for(var g=0;g<v.samples.length;g++){var m=v.samples[g].bytes;if(m){var _=this.extractCea608Data(m);y.addData(v.samples[g].pts,_[0]),b.addData(v.samples[g].pts,_[1])}}},r.onBufferFlushing=function(d,v){var y=v.startOffset,b=v.endOffset,g=v.endOffsetSubtitles,m=v.type,_=this.media;if(!_||_.currentTime<b)return;if(!m||m==="video"){var x=this.captionsTracks;Object.keys(x).forEach(function(E){return Object(h.removeCuesInRange)(x[E],y,b)})}if(this.config.renderTextTracksNatively&&(y===0&&g!==void 0)){var f=this.textTracks;Object.keys(f).forEach(function(E){return Object(h.removeCuesInRange)(f[E],y,g)})}},r.extractCea608Data=function(d){for(var v=d[0]&31,y=2,b=[[],[]],g=0;g<v;g++){var m=d[y++],_=127&d[y++],x=127&d[y++],f=(4&m)!==0,E=3&m;if(_===0&&x===0)continue;f&&((E===0||E===1)&&(b[E].push(_),b[E].push(x)))}return b},a}();function o(a,r){return a&&a.label===r.name&&!(a.textTrack1||a.textTrack2)}function i(a,r,t,d){return Math.min(r,d)-Math.max(a,t)}function l(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return O});var O=function(){function D(A,C){this.subtle=void 0,this.aesIV=void 0,this.subtle=A,this.aesIV=C}var S=D.prototype;return S.decrypt=function(C,h){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},h,C)},D}()},"./src/crypt/aes-decryptor.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"removePadding",function(){return D}),B.d(ee,"default",function(){return S});var O=B("./src/utils/typed-array.ts");function D(A){var C=A.byteLength,h=C&&new DataView(A.buffer).getUint8(C-1);return h?Object(O.sliceUint8)(A,0,C-h):A}var S=function(){function A(){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 C=A.prototype;return C.uint8ArrayToUint32Array_=function(p){for(var c=new DataView(p),s=new Uint32Array(4),n=0;n<4;n++)s[n]=c.getUint32(n*4);return s},C.initTable=function(){var p=this.sBox,c=this.invSBox,s=this.subMix,n=s[0],o=s[1],i=s[2],l=s[3],a=this.invSubMix,r=a[0],t=a[1],d=a[2],v=a[3],y=new Uint32Array(256),b=0,g=0,m=0;for(m=0;m<256;m++)m<128?y[m]=m<<1:y[m]=m<<1^283;for(m=0;m<256;m++){var _=g^g<<1^g<<2^g<<3^g<<4;_=_>>>8^_&255^99,p[b]=_,c[_]=b;var x=y[b],f=y[x],E=y[f],w=y[_]*257^_*16843008;n[b]=w<<24|w>>>8,o[b]=w<<16|w>>>16,i[b]=w<<8|w>>>24,l[b]=w,w=E*16843009^f*65537^x*257^b*16843008,r[_]=w<<24|w>>>8,t[_]=w<<16|w>>>16,d[_]=w<<8|w>>>24,v[_]=w,b?(b=x^y[y[y[E^x]]],g^=y[y[g]]):b=g=1}},C.expandKey=function(p){for(var c=this.uint8ArrayToUint32Array_(p),s=!0,n=0;n<c.length&&s;)s=c[n]===this.key[n],n++;if(s)return;this.key=c;var o=this.keySize=c.length;if(o!==4&&o!==6&&o!==8)throw new Error("Invalid aes key size="+o);var i=this.ksRows=(o+6+1)*4,l,a,r=this.keySchedule=new Uint32Array(i),t=this.invKeySchedule=new Uint32Array(i),d=this.sBox,v=this.rcon,y=this.invSubMix,b=y[0],g=y[1],m=y[2],_=y[3],x,f;for(l=0;l<i;l++){if(l<o){x=r[l]=c[l];continue}f=x,l%o===0?(f=f<<8|f>>>24,f=d[f>>>24]<<24|d[f>>>16&255]<<16|d[f>>>8&255]<<8|d[f&255],f^=v[l/o|0]<<24):o>6&&l%o===4&&(f=d[f>>>24]<<24|d[f>>>16&255]<<16|d[f>>>8&255]<<8|d[f&255]),r[l]=x=(r[l-o]^f)>>>0}for(a=0;a<i;a++)l=i-a,a&3?f=r[l]:f=r[l-4],a<4||l<=4?t[a]=f:t[a]=b[d[f>>>24]]^g[d[f>>>16&255]]^m[d[f>>>8&255]]^_[d[f&255]],t[a]=t[a]>>>0},C.networkToHostOrderSwap=function(p){return p<<24|(p&65280)<<8|(p&16711680)>>8|p>>>24},C.decrypt=function(p,c,s){for(var n=this.keySize+6,o=this.invKeySchedule,i=this.invSBox,l=this.invSubMix,a=l[0],r=l[1],t=l[2],d=l[3],v=this.uint8ArrayToUint32Array_(s),y=v[0],b=v[1],g=v[2],m=v[3],_=new Int32Array(p),x=new Int32Array(_.length),f,E,w,T,R,N,j,W,J,F,k,K,Y,H,Q=this.networkToHostOrderSwap;c<_.length;){for(J=Q(_[c]),F=Q(_[c+1]),k=Q(_[c+2]),K=Q(_[c+3]),R=J^o[0],N=K^o[1],j=k^o[2],W=F^o[3],Y=4,H=1;H<n;H++)f=a[R>>>24]^r[N>>16&255]^t[j>>8&255]^d[W&255]^o[Y],E=a[N>>>24]^r[j>>16&255]^t[W>>8&255]^d[R&255]^o[Y+1],w=a[j>>>24]^r[W>>16&255]^t[R>>8&255]^d[N&255]^o[Y+2],T=a[W>>>24]^r[R>>16&255]^t[N>>8&255]^d[j&255]^o[Y+3],R=f,N=E,j=w,W=T,Y=Y+4;f=i[R>>>24]<<24^i[N>>16&255]<<16^i[j>>8&255]<<8^i[W&255]^o[Y],E=i[N>>>24]<<24^i[j>>16&255]<<16^i[W>>8&255]<<8^i[R&255]^o[Y+1],w=i[j>>>24]<<24^i[W>>16&255]<<16^i[R>>8&255]<<8^i[N&255]^o[Y+2],T=i[W>>>24]<<24^i[R>>16&255]<<16^i[N>>8&255]<<8^i[j&255]^o[Y+3],x[c]=Q(f^y),x[c+1]=Q(T^b),x[c+2]=Q(w^g),x[c+3]=Q(E^m),y=J,b=F,g=k,m=K,c=c+4}return x.buffer},A}()},"./src/crypt/decrypter.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return c});var O=B("./src/crypt/aes-crypto.ts"),D=B("./src/crypt/fast-aes-key.ts"),S=B("./src/crypt/aes-decryptor.ts"),A=B("./src/utils/logger.ts"),C=B("./src/utils/mp4-tools.ts"),h=B("./src/utils/typed-array.ts"),p=16,c=function(){function s(o,i,l){var a=l===void 0?{}:l,r=a.removePKCS7Padding,t=r===void 0?!0:r;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=o,this.config=i,this.removePKCS7Padding=t,t)try{var d=self.crypto;d&&(this.subtle=d.subtle||d.webkitSubtle)}catch(v){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var n=s.prototype;return n.destroy=function(){this.observer=null},n.isSync=function(){return this.config.enableSoftwareAES},n.flush=function(){var i=this.currentResult;if(!i){this.reset();return}var l=new Uint8Array(i);return this.reset(),this.removePKCS7Padding?Object(S.removePadding)(l):l},n.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},n.decrypt=function(i,l,a,r){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(i),l,a);var t=this.flush();t&&r(t.buffer)}else this.webCryptoDecrypt(new Uint8Array(i),l,a).then(r)},n.softwareDecrypt=function(i,l,a){var r=this.currentIV,t=this.currentResult,d=this.remainderData;this.logOnce("JS AES decrypt"),d&&(i=Object(C.appendUint8Array)(d,i),this.remainderData=null);var v=this.getValidChunk(i);if(!v.length)return null;r&&(a=r);var y=this.softwareDecrypter;y||(y=this.softwareDecrypter=new S.default),y.expandKey(l);var b=t;return this.currentResult=y.decrypt(v.buffer,0,a),this.currentIV=Object(h.sliceUint8)(v,-16).buffer,b||null},n.webCryptoDecrypt=function(i,l,a){var r=this,t=this.subtle;return(this.key!==l||!this.fastAesKey)&&(this.key=l,this.fastAesKey=new D.default(t,l)),this.fastAesKey.expandKey().then(function(d){if(!t)return Promise.reject(new Error("web crypto not initialized"));var v=new O.default(t,a);return v.decrypt(i.buffer,d)}).catch(function(d){return r.onWebCryptoError(d,i,l,a)})},n.onWebCryptoError=function(i,l,a,r){return A.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",i),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(l,a,r)},n.getValidChunk=function(i){var l=i,a=i.length-i.length%p;return a!==i.length&&(l=Object(h.sliceUint8)(i,0,a),this.remainderData=Object(h.sliceUint8)(i,a)),l},n.logOnce=function(i){if(!this.logEnabled)return;A.logger.log("[decrypter.ts]: "+i),this.logEnabled=!1},s}()},"./src/crypt/fast-aes-key.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return O});var O=function(){function D(A,C){this.subtle=void 0,this.key=void 0,this.subtle=A,this.key=C}var S=D.prototype;return S.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},D}()},"./src/demux/aacdemuxer.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/demux/base-audio-demuxer.ts"),D=B("./src/demux/adts.ts"),S=B("./src/utils/logger.ts"),A=B("./src/demux/id3.ts");function C(c,s){c.prototype=Object.create(s.prototype),c.prototype.constructor=c,h(c,s)}function h(c,s){return h=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},h(c,s)}var p=function(c){C(s,c);function s(o,i){var l;return l=c.call(this)||this,l.observer=void 0,l.config=void 0,l.observer=o,l.config=i,l}var n=s.prototype;return n.resetInitSegment=function(i,l,a){c.prototype.resetInitSegment.call(this,i,l,a),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:i,duration:a,inputTimeScale:9e4,dropped:0}},s.probe=function(i){if(!i)return!1;for(var l=A.getID3Data(i,0)||[],a=l.length,r=i.length;a<r;a++)if(D.probe(i,a))return S.logger.log("ADTS sync word found !"),!0;return!1},n.canParse=function(i,l){return D.canParse(i,l)},n.appendFrame=function(i,l,a){D.initTrackConfig(i,this.observer,l,a,i.manifestCodec);var r=D.appendFrame(i,l,a,this.initPTS,this.frameIndex);if(r&&r.missing===0)return r},s}(O.default);p.minProbeByteLength=9,ee.default=p},"./src/demux/adts.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"getAudioConfig",function(){return A}),B.d(ee,"isHeaderPattern",function(){return C}),B.d(ee,"getHeaderLength",function(){return h}),B.d(ee,"getFullFrameLength",function(){return p}),B.d(ee,"canGetFrameLength",function(){return c}),B.d(ee,"isHeader",function(){return s}),B.d(ee,"canParse",function(){return n}),B.d(ee,"probe",function(){return o}),B.d(ee,"initTrackConfig",function(){return i}),B.d(ee,"getFrameDuration",function(){return l}),B.d(ee,"parseFrameHeader",function(){return a}),B.d(ee,"appendFrame",function(){return r});var O=B("./src/utils/logger.ts"),D=B("./src/errors.ts"),S=B("./src/events.ts");function A(t,d,v,y){var b,g,m,_,x=navigator.userAgent.toLowerCase(),f=y,E=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];b=((d[v+2]&192)>>>6)+1;var w=(d[v+2]&60)>>>2;if(w>E.length-1){t.trigger(S.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+w});return}return m=(d[v+2]&1)<<2,m|=(d[v+3]&192)>>>6,O.logger.log("manifest codec:"+y+", ADTS type:"+b+", samplingIndex:"+w),/firefox/i.test(x)?w>=6?(b=5,_=new Array(4),g=w-3):(b=2,_=new Array(2),g=w):x.indexOf("android")!==-1?(b=2,_=new Array(2),g=w):(b=5,_=new Array(4),y&&(y.indexOf("mp4a.40.29")!==-1||y.indexOf("mp4a.40.5")!==-1)||!y&&w>=6?g=w-3:((y&&y.indexOf("mp4a.40.2")!==-1&&(w>=6&&m===1||/vivaldi/i.test(x))||!y&&m===1)&&(b=2,_=new Array(2)),g=w)),_[0]=b<<3,_[0]|=(w&14)>>1,_[1]|=(w&1)<<7,_[1]|=m<<3,b===5&&(_[1]|=(g&14)>>1,_[2]=(g&1)<<7,_[2]|=2<<2,_[3]=0),{config:_,samplerate:E[w],channelCount:m,codec:"mp4a.40."+b,manifestCodec:f}}function C(t,d){return t[d]===255&&(t[d+1]&246)===240}function h(t,d){return t[d+1]&1?7:9}function p(t,d){return(t[d+3]&3)<<11|t[d+4]<<3|(t[d+5]&224)>>>5}function c(t,d){return d+5<t.length}function s(t,d){return d+1<t.length&&C(t,d)}function n(t,d){return c(t,d)&&C(t,d)&&p(t,d)<=t.length-d}function o(t,d){if(s(t,d)){var v=h(t,d);if(d+v>=t.length)return!1;var y=p(t,d);if(y<=v)return!1;var b=d+y;return b===t.length||s(t,b)}return!1}function i(t,d,v,y,b){if(!t.samplerate){var g=A(d,v,y,b);if(!g)return;t.config=g.config,t.samplerate=g.samplerate,t.channelCount=g.channelCount,t.codec=g.codec,t.manifestCodec=g.manifestCodec,O.logger.log("parsed codec:"+t.codec+", rate:"+g.samplerate+", channels:"+g.channelCount)}}function l(t){return 1024*9e4/t}function a(t,d,v,y,b){var g=h(t,d),m=p(t,d);if(m-=g,m>0){var _=v+y*b;return{headerLength:g,frameLength:m,stamp:_}}}function r(t,d,v,y,b){var g=l(t.samplerate),m=a(d,v,y,b,g);if(m){var _=m.frameLength,x=m.headerLength,f=m.stamp,E=x+_,w=Math.max(0,v+E-d.length),T;w?(T=new Uint8Array(E-x),T.set(d.subarray(v+x,d.length),0)):T=d.subarray(v+x,v+E);var R={unit:T,pts:f};return w||t.samples.push(R),{sample:R,length:E,missing:w}}}},"./src/demux/base-audio-demuxer.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"initPTSFn",function(){return p});var O=B("./src/polyfills/number.ts"),D=B("./src/demux/id3.ts"),S=B("./src/demux/dummy-demuxed-track.ts"),A=B("./src/utils/mp4-tools.ts"),C=B("./src/utils/typed-array.ts"),h=function(){function c(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var s=c.prototype;return s.resetInitSegment=function(o,i,l){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},s.resetTimeStamp=function(){},s.resetContiguity=function(){},s.canParse=function(o,i){return!1},s.appendFrame=function(o,i,l){},s.demux=function(o,i){this.cachedData&&(o=Object(A.appendUint8Array)(this.cachedData,o),this.cachedData=null);var l=D.getID3Data(o,0),a=l?l.length:0,r,t,d=this._audioTrack,v=this._id3Track,y=l?D.getTimeStamp(l):void 0,b=o.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=p(y,i)),l&&l.length>0&&v.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),t=this.initPTS;a<b;){if(this.canParse(o,a)){var g=this.appendFrame(d,o,a);g?(this.frameIndex++,t=g.sample.pts,a+=g.length,r=a):a=b}else D.canParse(o,a)?(l=D.getID3Data(o,a),v.samples.push({pts:t,dts:t,data:l}),a+=l.length,r=a):a++;if(a===b&&r!==b){var m=Object(C.sliceUint8)(o,r);this.cachedData?this.cachedData=Object(A.appendUint8Array)(this.cachedData,m):this.cachedData=m}}return{audioTrack:d,avcTrack:Object(S.dummyTrack)(),id3Track:v,textTrack:Object(S.dummyTrack)()}},s.demuxSampleAes=function(o,i,l){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},s.flush=function(o){var i=this.cachedData;return i&&(this.cachedData=null,this.demux(i,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(S.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(S.dummyTrack)()}},s.destroy=function(){},c}(),p=function(s,n){return Object(O.isFiniteNumber)(s)?s*90:n*9e4};ee.default=h},"./src/demux/chunk-cache.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return O});var O=function(){function S(){this.chunks=[],this.dataLength=0}var A=S.prototype;return A.push=function(h){this.chunks.push(h),this.dataLength+=h.length},A.flush=function(){var h=this.chunks,p=this.dataLength,c;if(h.length)h.length===1?c=h[0]:c=D(h,p);else return new Uint8Array(0);return this.reset(),c},A.reset=function(){this.chunks.length=0,this.dataLength=0},S}();function D(S,A){for(var C=new Uint8Array(A),h=0,p=0;p<S.length;p++){var c=S[p];C.set(c,h),h+=c.length}return C}},"./src/demux/dummy-demuxed-track.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"dummyTrack",function(){return O});function O(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/utils/logger.ts"),D=function(){function S(C){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=C,this.bytesAvailable=C.byteLength,this.word=0,this.bitsAvailable=0}var A=S.prototype;return A.loadWord=function(){var h=this.data,p=this.bytesAvailable,c=h.byteLength-p,s=new Uint8Array(4),n=Math.min(4,p);if(n===0)throw new Error("no bytes available");s.set(h.subarray(c,c+n)),this.word=new DataView(s.buffer).getUint32(0),this.bitsAvailable=n*8,this.bytesAvailable-=n},A.skipBits=function(h){var p;this.bitsAvailable>h?(this.word<<=h,this.bitsAvailable-=h):(h-=this.bitsAvailable,p=h>>3,h-=p>>3,this.bytesAvailable-=p,this.loadWord(),this.word<<=h,this.bitsAvailable-=h)},A.readBits=function(h){var p=Math.min(this.bitsAvailable,h),c=this.word>>>32-p;return h>32&&O.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=p,this.bitsAvailable>0?this.word<<=p:this.bytesAvailable>0&&this.loadWord(),p=h-p,p>0&&this.bitsAvailable?c<<p|this.readBits(p):c},A.skipLZ=function(){var h;for(h=0;h<this.bitsAvailable;++h)if((this.word&2147483648>>>h)!==0)return this.word<<=h,this.bitsAvailable-=h,h;return this.loadWord(),h+this.skipLZ()},A.skipUEG=function(){this.skipBits(1+this.skipLZ())},A.skipEG=function(){this.skipBits(1+this.skipLZ())},A.readUEG=function(){var h=this.skipLZ();return this.readBits(h+1)-1},A.readEG=function(){var h=this.readUEG();return 1&h?1+h>>>1:-1*(h>>>1)},A.readBoolean=function(){return this.readBits(1)===1},A.readUByte=function(){return this.readBits(8)},A.readUShort=function(){return this.readBits(16)},A.readUInt=function(){return this.readBits(32)},A.skipScalingList=function(h){for(var p=8,c=8,s,n=0;n<h;n++)c!==0&&(s=this.readEG(),c=(p+s+256)%256),p=c===0?p:c},A.readSPS=function(){var h=0,p=0,c=0,s=0,n,o,i,l=this.readUByte.bind(this),a=this.readBits.bind(this),r=this.readUEG.bind(this),t=this.readBoolean.bind(this),d=this.skipBits.bind(this),v=this.skipEG.bind(this),y=this.skipUEG.bind(this),b=this.skipScalingList.bind(this);l();var g=l();if(a(5),d(3),l(),y(),g===100||g===110||g===122||g===244||g===44||g===83||g===86||g===118||g===128){var m=r();if(m===3&&d(1),y(),y(),d(1),t())for(o=m!==3?8:12,i=0;i<o;i++)t()&&(i<6?b(16):b(64))}y();var _=r();if(_===0)r();else if(_===1)for(d(1),v(),v(),n=r(),i=0;i<n;i++)v();y(),d(1);var x=r(),f=r(),E=a(1);E===0&&d(1),d(1),t()&&(h=r(),p=r(),c=r(),s=r());var w=[1,1];if(t()&&t()){var T=l();switch(T){case 1:w=[1,1];break;case 2:w=[12,11];break;case 3:w=[10,11];break;case 4:w=[16,11];break;case 5:w=[40,33];break;case 6:w=[24,11];break;case 7:w=[20,11];break;case 8:w=[32,11];break;case 9:w=[80,33];break;case 10:w=[18,11];break;case 11:w=[15,11];break;case 12:w=[64,33];break;case 13:w=[160,99];break;case 14:w=[4,3];break;case 15:w=[3,2];break;case 16:w=[2,1];break;case 255:{w=[l()<<8|l(),l()<<8|l()];break}}}return{width:Math.ceil((x+1)*16-h*2-p*2),height:(2-E)*(f+1)*16-(E?2:4)*(c+s),pixelRatio:w}},A.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},S}();ee.default=D},"./src/demux/id3.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"isHeader",function(){return O}),B.d(ee,"isFooter",function(){return D}),B.d(ee,"getID3Data",function(){return S}),B.d(ee,"canParse",function(){return C}),B.d(ee,"getTimeStamp",function(){return h}),B.d(ee,"isTimeStampFrame",function(){return p}),B.d(ee,"getID3Frames",function(){return s}),B.d(ee,"decodeFrame",function(){return n}),B.d(ee,"utf8ArrayToStr",function(){return r}),B.d(ee,"testables",function(){return t});var O=function(b,g){return g+10<=b.length&&(b[g]===73&&b[g+1]===68&&b[g+2]===51&&(b[g+3]<255&&b[g+4]<255&&(b[g+6]<128&&b[g+7]<128&&b[g+8]<128&&b[g+9]<128)))},D=function(b,g){return g+10<=b.length&&(b[g]===51&&b[g+1]===68&&b[g+2]===73&&(b[g+3]<255&&b[g+4]<255&&(b[g+6]<128&&b[g+7]<128&&b[g+8]<128&&b[g+9]<128)))},S=function(b,g){for(var m=g,_=0;O(b,g);){_+=10;var x=A(b,g+6);_+=x,D(b,g+10)&&(_+=10),g+=_}return _>0?b.subarray(m,m+_):void 0},A=function(b,g){var m=0;return m=(b[g]&127)<<21,m|=(b[g+1]&127)<<14,m|=(b[g+2]&127)<<7,m|=b[g+3]&127,m},C=function(b,g){return O(b,g)&&A(b,g+6)+10<=b.length-g},h=function(b){for(var g=s(b),m=0;m<g.length;m++){var _=g[m];if(p(_))return a(_)}return},p=function(b){return b&&b.key==="PRIV"&&b.info==="com.apple.streaming.transportStreamTimestamp"},c=function(b){var g=String.fromCharCode(b[0],b[1],b[2],b[3]),m=A(b,4),_=10;return{type:g,size:m,data:b.subarray(_,_+m)}},s=function(b){for(var g=0,m=[];O(b,g);){var _=A(b,g+6);g+=10;for(var x=g+_;g+8<x;){var f=c(b.subarray(g)),E=n(f);E&&m.push(E),g+=f.size+10}D(b,g)&&(g+=10)}return m},n=function(b){return b.type==="PRIV"?o(b):b.type[0]==="W"?l(b):i(b)},o=function(b){if(b.size<2)return;var g=r(b.data,!0),m=new Uint8Array(b.data.subarray(g.length+1));return{key:b.type,info:g,data:m.buffer}},i=function(b){if(b.size<2)return;if(b.type==="TXXX"){var g=1,m=r(b.data.subarray(g),!0);g+=m.length+1;var _=r(b.data.subarray(g));return{key:b.type,info:m,data:_}}var x=r(b.data.subarray(1));return{key:b.type,data:x}},l=function(b){if(b.type==="WXXX"){if(b.size<2)return;var g=1,m=r(b.data.subarray(g),!0);g+=m.length+1;var _=r(b.data.subarray(g));return{key:b.type,info:m,data:_}}var x=r(b.data);return{key:b.type,data:x}},a=function(b){if(b.data.byteLength===8){var g=new Uint8Array(b.data),m=g[3]&1,_=(g[4]<<23)+(g[5]<<15)+(g[6]<<7)+g[7];return _/=45,m&&(_+=4772185884e-2),Math.round(_)}return},r=function(b,g){g===void 0&&(g=!1);var m=v();if(m){var _=m.decode(b);if(g){var x=_.indexOf("\0");return x!==-1?_.substring(0,x):_}return _.replace(/\0/g,"")}for(var f=b.length,E,w,T,R="",N=0;N<f;){if(E=b[N++],E===0&&g)return R;if(E===0||E===3)continue;switch(E>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:R+=String.fromCharCode(E);break;case 12:case 13:w=b[N++],R+=String.fromCharCode((E&31)<<6|w&63);break;case 14:w=b[N++],T=b[N++],R+=String.fromCharCode((E&15)<<12|(w&63)<<6|(T&63)<<0);break;default:}}return R},t={decodeTextFrame:i},d;function v(){return!d&&typeof self.TextDecoder!="undefined"&&(d=new self.TextDecoder("utf-8")),d}},"./src/demux/mp3demuxer.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/demux/base-audio-demuxer.ts"),D=B("./src/demux/id3.ts"),S=B("./src/utils/logger.ts"),A=B("./src/demux/mpegaudio.ts");function C(c,s){c.prototype=Object.create(s.prototype),c.prototype.constructor=c,h(c,s)}function h(c,s){return h=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},h(c,s)}var p=function(c){C(s,c);function s(){return c.apply(this,arguments)||this}var n=s.prototype;return n.resetInitSegment=function(i,l,a){c.prototype.resetInitSegment.call(this,i,l,a),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:i,duration:a,inputTimeScale:9e4,dropped:0}},s.probe=function(i){if(!i)return!1;for(var l=D.getID3Data(i,0)||[],a=l.length,r=i.length;a<r;a++)if(A.probe(i,a))return S.logger.log("MPEG Audio sync word found !"),!0;return!1},n.canParse=function(i,l){return A.canParse(i,l)},n.appendFrame=function(i,l,a){return this.initPTS===null?void 0:A.appendFrame(i,l,a,this.initPTS,this.frameIndex)},s}(O.default);p.minProbeByteLength=4,ee.default=p},"./src/demux/mp4demuxer.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/utils/mp4-tools.ts"),D=B("./src/demux/dummy-demuxed-track.ts"),S=function(){function A(h,p){this.remainderData=null,this.config=void 0,this.config=p}var C=A.prototype;return C.resetTimeStamp=function(){},C.resetInitSegment=function(){},C.resetContiguity=function(){},A.probe=function(p){return Object(O.findBox)({data:p,start:0,end:Math.min(p.length,16384)},["moof"]).length>0},C.demux=function(p){var c=p,s=Object(D.dummyTrack)();if(this.config.progressive){this.remainderData&&(c=Object(O.appendUint8Array)(this.remainderData,p));var n=Object(O.segmentValidRange)(c);this.remainderData=n.remainder,s.samples=n.valid||new Uint8Array}else s.samples=c;return{audioTrack:Object(D.dummyTrack)(),avcTrack:s,id3Track:Object(D.dummyTrack)(),textTrack:Object(D.dummyTrack)()}},C.flush=function(){var p=Object(D.dummyTrack)();return p.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(D.dummyTrack)(),avcTrack:p,id3Track:Object(D.dummyTrack)(),textTrack:Object(D.dummyTrack)()}},C.demuxSampleAes=function(p,c,s){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},C.destroy=function(){},A}();S.minProbeByteLength=1024,ee.default=S},"./src/demux/mpegaudio.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"appendFrame",function(){return h}),B.d(ee,"parseHeader",function(){return p}),B.d(ee,"isHeaderPattern",function(){return c}),B.d(ee,"isHeader",function(){return s}),B.d(ee,"canParse",function(){return n}),B.d(ee,"probe",function(){return o});var O=null,D=[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],S=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],A=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],C=[0,1,1,4];function h(i,l,a,r,t){if(a+24>l.length)return;var d=p(l,a);if(d&&a+d.frameLength<=l.length){var v=d.samplesPerFrame*9e4/d.sampleRate,y=r+t*v,b={unit:l.subarray(a,a+d.frameLength),pts:y,dts:y};return i.config=[],i.channelCount=d.channelCount,i.samplerate=d.sampleRate,i.samples.push(b),{sample:b,length:d.frameLength,missing:0}}}function p(i,l){var a=i[l+1]>>3&3,r=i[l+1]>>1&3,t=i[l+2]>>4&15,d=i[l+2]>>2&3;if(a!==1&&t!==0&&t!==15&&d!==3){var v=i[l+2]>>1&1,y=i[l+3]>>6,b=a===3?3-r:r===3?3:4,g=D[b*14+t-1]*1e3,m=a===3?0:a===2?1:2,_=S[m*3+d],x=y===3?1:2,f=A[a][r],E=C[r],w=f*8*E,T=Math.floor(f*g/_+v)*E;if(O===null){var R=navigator.userAgent||"",N=R.match(/Chrome\/(\d+)/i);O=N?parseInt(N[1]):0}var j=!!O&&O<=87;return j&&r===2&&g>=224e3&&y===0&&(i[l+3]=i[l+3]|128),{sampleRate:_,channelCount:x,frameLength:T,samplesPerFrame:w}}}function c(i,l){return i[l]===255&&(i[l+1]&224)===224&&(i[l+1]&6)!==0}function s(i,l){return l+1<i.length&&c(i,l)}function n(i,l){var a=4;return c(i,l)&&a<=i.length-l}function o(i,l){if(l+1<i.length&&c(i,l)){var a=4,r=p(i,l),t=a;r!=null&&r.frameLength&&(t=r.frameLength);var d=l+t;return d===i.length||s(i,d)}return!1}},"./src/demux/sample-aes.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/crypt/decrypter.ts"),D=B("./src/demux/tsdemuxer.ts"),S=function(){function A(h,p,c){this.keyData=void 0,this.decrypter=void 0,this.keyData=c,this.decrypter=new O.default(h,p,{removePKCS7Padding:!1})}var C=A.prototype;return C.decryptBuffer=function(p,c){this.decrypter.decrypt(p,this.keyData.key.buffer,this.keyData.iv.buffer,c)},C.decryptAacSample=function(p,c,s,n){var o=p[c].unit,i=o.subarray(16,o.length-o.length%16),l=i.buffer.slice(i.byteOffset,i.byteOffset+i.length),a=this;this.decryptBuffer(l,function(r){var t=new Uint8Array(r);o.set(t,16),n||a.decryptAacSamples(p,c+1,s)})},C.decryptAacSamples=function(p,c,s){for(;;c++){if(c>=p.length){s();return}if(p[c].unit.length<32)continue;var n=this.decrypter.isSync();if(this.decryptAacSample(p,c,s,n),!n)return}},C.getAvcEncryptedData=function(p){for(var c=Math.floor((p.length-48)/160)*16+16,s=new Int8Array(c),n=0,o=32;o<=p.length-16;o+=160,n+=16)s.set(p.subarray(o,o+16),n);return s},C.getAvcDecryptedUnit=function(p,c){for(var s=new Uint8Array(c),n=0,o=32;o<=p.length-16;o+=160,n+=16)p.set(s.subarray(n,n+16),o);return p},C.decryptAvcSample=function(p,c,s,n,o,i){var l=Object(D.discardEPB)(o.data),a=this.getAvcEncryptedData(l),r=this;this.decryptBuffer(a.buffer,function(t){o.data=r.getAvcDecryptedUnit(l,t),i||r.decryptAvcSamples(p,c,s+1,n)})},C.decryptAvcSamples=function(p,c,s,n){if(p instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;c++,s=0){if(c>=p.length){n();return}for(var o=p[c].units;!(s>=o.length);s++){var i=o[s];if(i.data.length<=48||i.type!==1&&i.type!==5)continue;var l=this.decrypter.isSync();if(this.decryptAvcSample(p,c,s,n,i,l),!l)return}}},A}();ee.default=S},"./src/demux/transmuxer-interface.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return o});var O=B("./node_modules/webworkify-webpack/index.js"),D=B.n(O),S=B("./src/events.ts"),A=B("./src/demux/transmuxer.ts"),C=B("./src/utils/logger.ts"),h=B("./src/errors.ts"),p=B("./src/utils/mediasource-helper.ts"),c=B("./node_modules/eventemitter3/index.js"),s=B.n(c),n=Object(p.getMediaSource)()||{isTypeSupported:function(){return!1}},o=function(){function i(a,r,t,d){var v=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=a,this.id=r,this.onTransmuxComplete=t,this.onFlush=d;var y=a.config,b=function(f,E){E=E||{},E.frag=v.frag,E.id=v.id,a.trigger(f,E)};this.observer=new c.EventEmitter,this.observer.on(S.Events.FRAG_DECRYPTED,b),this.observer.on(S.Events.ERROR,b);var g={mp4:n.isTypeSupported("video/mp4"),mpeg:n.isTypeSupported("audio/mpeg"),mp3:n.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(y.enableWorker&&typeof Worker!="undefined"){C.logger.log("demuxing in webworker");var _;try{_=this.worker=O("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),_.addEventListener("message",this.onwmsg),_.onerror=function(x){a.trigger(S.Events.ERROR,{type:h.ErrorTypes.OTHER_ERROR,details:h.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},_.postMessage({cmd:"init",typeSupported:g,vendor:m,id:r,config:JSON.stringify(y)})}catch(x){C.logger.warn("Error in worker:",x),C.logger.error("Error while initializing DemuxerWorker, fallback to inline"),_&&self.URL.revokeObjectURL(_.objectURL),this.transmuxer=new A.default(this.observer,g,y,m,r),this.worker=null}}else this.transmuxer=new A.default(this.observer,g,y,m,r)}var l=i.prototype;return l.destroy=function(){var r=this.worker;if(r)r.removeEventListener("message",this.onwmsg),r.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var d=this.observer;d&&d.removeAllListeners(),this.observer=null},l.push=function(r,t,d,v,y,b,g,m,_,x){var f=this;_.transmuxing.start=self.performance.now();var E=this.transmuxer,w=this.worker,T=b?b.start:y.start,R=y.decryptdata,N=this.frag,j=!(N&&y.cc===N.cc),W=!(N&&_.level===N.level),J=N?_.sn-N.sn:-1,F=this.part?_.part-this.part.index:1,k=!W&&(J===1||J===0&&F===1),K=self.performance.now();(W||J||y.stats.parsing.start===0)&&(y.stats.parsing.start=K),b&&(F||!k)&&(b.stats.parsing.start=K);var Y=new A.TransmuxState(j,k,m,W,T);if(!k||j){C.logger.log("[transmuxer-interface, "+y.type+"]: Starting new transmux session for sn: "+_.sn+" p: "+_.part+" level: "+_.level+" id: "+_.id+`
|
|
|
discontinuity: `+j+`
|
|
|
trackSwitch: `+W+`
|
|
|
contiguous: `+k+`
|
|
|
accurateTimeOffset: `+m+`
|
|
|
timeOffset: `+T);var H=new A.TransmuxConfig(d,v,t,g,x);this.configureTransmuxer(H)}if(this.frag=y,this.part=b,w)w.postMessage({cmd:"demux",data:r,decryptdata:R,chunkMeta:_,state:Y},r instanceof ArrayBuffer?[r]:[]);else if(E){var Q=E.push(r,R,_,Y);Object(A.isPromise)(Q)?Q.then(function(re){f.handleTransmuxComplete(re)}):this.handleTransmuxComplete(Q)}},l.flush=function(r){var t=this;r.transmuxing.start=self.performance.now();var d=this.transmuxer,v=this.worker;if(v)v.postMessage({cmd:"flush",chunkMeta:r});else if(d){var y=d.flush(r);Object(A.isPromise)(y)?y.then(function(b){t.handleFlushResult(b,r)}):this.handleFlushResult(y,r)}},l.handleFlushResult=function(r,t){var d=this;r.forEach(function(v){d.handleTransmuxComplete(v)}),this.onFlush(t)},l.onWorkerMessage=function(r){var t=r.data,d=this.hls;switch(t.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,d.trigger(t.event,t.data);break}}},l.configureTransmuxer=function(r){var t=this.worker,d=this.transmuxer;t?t.postMessage({cmd:"configure",config:r}):d&&d.configure(r)},l.handleTransmuxComplete=function(r){r.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(r)},i}()},"./src/demux/transmuxer-worker.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return h});var O=B("./src/demux/transmuxer.ts"),D=B("./src/events.ts"),S=B("./src/utils/logger.ts"),A=B("./node_modules/eventemitter3/index.js"),C=B.n(A);function h(o){var i=new A.EventEmitter,l=function(r,t){o.postMessage({event:r,data:t})};i.on(D.Events.FRAG_DECRYPTED,l),i.on(D.Events.ERROR,l),o.addEventListener("message",function(a){var r=a.data;switch(r.cmd){case"init":{var t=JSON.parse(r.config);o.transmuxer=new O.default(i,r.typeSupported,t,r.vendor,r.id),Object(S.enableLogs)(t.debug),l("init",null);break}case"configure":{o.transmuxer.configure(r.config);break}case"demux":{var d=o.transmuxer.push(r.data,r.decryptdata,r.chunkMeta,r.state);Object(O.isPromise)(d)?d.then(function(b){p(o,b)}):p(o,d);break}case"flush":{var v=r.chunkMeta,y=o.transmuxer.flush(v);Object(O.isPromise)(y)?y.then(function(b){s(o,b,v)}):s(o,y,v);break}default:break}})}function p(o,i){if(n(i.remuxResult))return;var l=[],a=i.remuxResult,r=a.audio,t=a.video;r&&c(l,r),t&&c(l,t),o.postMessage({event:"transmuxComplete",data:i},l)}function c(o,i){i.data1&&o.push(i.data1.buffer),i.data2&&o.push(i.data2.buffer)}function s(o,i,l){i.forEach(function(a){p(o,a)}),o.postMessage({event:"flush",data:l})}function n(o){return!o.audio&&!o.video&&!o.text&&!o.id3&&!o.initSegment}},"./src/demux/transmuxer.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return t}),B.d(ee,"isPromise",function(){return y}),B.d(ee,"TransmuxConfig",function(){return b}),B.d(ee,"TransmuxState",function(){return g});var O=B("./src/events.ts"),D=B("./src/errors.ts"),S=B("./src/crypt/decrypter.ts"),A=B("./src/demux/aacdemuxer.ts"),C=B("./src/demux/mp4demuxer.ts"),h=B("./src/demux/tsdemuxer.ts"),p=B("./src/demux/mp3demuxer.ts"),c=B("./src/remux/mp4-remuxer.ts"),s=B("./src/remux/passthrough-remuxer.ts"),n=B("./src/demux/chunk-cache.ts"),o=B("./src/utils/mp4-tools.ts"),i=B("./src/utils/logger.ts"),l;try{l=self.performance.now.bind(self.performance)}catch(m){i.logger.debug("Unable to use Performance API on this environment"),l=self.Date.now}var a=[{demux:h.default,remux:c.default},{demux:C.default,remux:s.default},{demux:A.default,remux:c.default},{demux:p.default,remux:c.default}],r=1024;a.forEach(function(m){var _=m.demux;r=Math.max(r,_.minProbeByteLength)});var t=function(){function m(x,f,E,w,T){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 n.default,this.observer=x,this.typeSupported=f,this.config=E,this.vendor=w,this.id=T}var _=m.prototype;return _.configure=function(f){this.transmuxConfig=f,this.decrypter&&this.decrypter.reset()},_.push=function(f,E,w,T){var R=this,N=w.transmuxing;N.executeStart=l();var j=new Uint8Array(f),W=this.cache,J=this.config,F=this.currentTransmuxState,k=this.transmuxConfig;T&&(this.currentTransmuxState=T);var K=d(j,E);if(K&&K.method==="AES-128"){var Y=this.getDecrypter();if(J.enableSoftwareAES){var H=Y.softwareDecrypt(j,K.key.buffer,K.iv.buffer);if(!H)return N.executeEnd=l(),v(w);j=new Uint8Array(H)}else return this.decryptionPromise=Y.webCryptoDecrypt(j,K.key.buffer,K.iv.buffer).then(function(ke){var Ne=R.push(ke,null,w);return R.decryptionPromise=null,Ne}),this.decryptionPromise}var Q=T||F,re=Q.contiguous,oe=Q.discontinuity,me=Q.trackSwitch,he=Q.accurateTimeOffset,Ee=Q.timeOffset,de=k.audioCodec,be=k.videoCodec,Ue=k.defaultInitPts,Re=k.duration,De=k.initSegmentData;if((oe||me)&&this.resetInitSegment(De,de,be,Re),oe&&this.resetInitialTimestamp(Ue),re||this.resetContiguity(),this.needsProbing(j,oe,me)){if(W.dataLength){var je=W.flush();j=Object(o.appendUint8Array)(je,j)}this.configureTransmuxer(j,k)}var ve=this.transmux(j,K,Ee,he,w),ce=this.currentTransmuxState;return ce.contiguous=!0,ce.discontinuity=!1,ce.trackSwitch=!1,N.executeEnd=l(),ve},_.flush=function(f){var E=this,w=f.transmuxing;w.executeStart=l();var T=this.decrypter,R=this.cache,N=this.currentTransmuxState,j=this.decryptionPromise;if(j)return j.then(function(){return E.flush(f)});var W=[],J=N.timeOffset;if(T){var F=T.flush();F&&W.push(this.push(F,null,f))}var k=R.dataLength;R.reset();var K=this.demuxer,Y=this.remuxer;if(!K||!Y)return k>=r&&this.observer.emit(O.Events.ERROR,O.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),w.executeEnd=l(),[v(f)];var H=K.flush(J);return y(H)?H.then(function(Q){return E.flushRemux(W,Q,f),W}):(this.flushRemux(W,H,f),W)},_.flushRemux=function(f,E,w){var T=E.audioTrack,R=E.avcTrack,N=E.id3Track,j=E.textTrack,W=this.currentTransmuxState,J=W.accurateTimeOffset,F=W.timeOffset;i.logger.log("[transmuxer.ts]: Flushed fragment "+w.sn+(w.part>-1?" p: "+w.part:"")+" of level "+w.level);var k=this.remuxer.remux(T,R,N,j,F,J,!0,this.id);f.push({remuxResult:k,chunkMeta:w}),w.transmuxing.executeEnd=l()},_.resetInitialTimestamp=function(f){var E=this.demuxer,w=this.remuxer;if(!E||!w)return;E.resetTimeStamp(f),w.resetTimeStamp(f)},_.resetContiguity=function(){var f=this.demuxer,E=this.remuxer;if(!f||!E)return;f.resetContiguity(),E.resetNextTimestamp()},_.resetInitSegment=function(f,E,w,T){var R=this.demuxer,N=this.remuxer;if(!R||!N)return;R.resetInitSegment(E,w,T),N.resetInitSegment(f,E,w)},_.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},_.transmux=function(f,E,w,T,R){var N;return E&&E.method==="SAMPLE-AES"?N=this.transmuxSampleAes(f,E,w,T,R):N=this.transmuxUnencrypted(f,w,T,R),N},_.transmuxUnencrypted=function(f,E,w,T){var R=this.demuxer.demux(f,E,!1,!this.config.progressive),N=R.audioTrack,j=R.avcTrack,W=R.id3Track,J=R.textTrack,F=this.remuxer.remux(N,j,W,J,E,w,!1,this.id);return{remuxResult:F,chunkMeta:T}},_.transmuxSampleAes=function(f,E,w,T,R){var N=this;return this.demuxer.demuxSampleAes(f,E,w).then(function(j){var W=N.remuxer.remux(j.audioTrack,j.avcTrack,j.id3Track,j.textTrack,w,T,!1,N.id);return{remuxResult:W,chunkMeta:R}})},_.configureTransmuxer=function(f,E){for(var w=this.config,T=this.observer,R=this.typeSupported,N=this.vendor,j=E.audioCodec,W=E.defaultInitPts,J=E.duration,F=E.initSegmentData,k=E.videoCodec,K,Y=0,H=a.length;Y<H;Y++)if(a[Y].demux.probe(f)){K=a[Y];break}K||(i.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),K={demux:C.default,remux:s.default});var Q=this.demuxer,re=this.remuxer,oe=K.remux,me=K.demux;(!re||!(re instanceof oe))&&(this.remuxer=new oe(T,w,R,N)),(!Q||!(Q instanceof me))&&(this.demuxer=new me(T,w,R),this.probe=me.probe),this.resetInitSegment(F,j,k,J),this.resetInitialTimestamp(W)},_.needsProbing=function(f,E,w){return!this.demuxer||!this.remuxer||E||w},_.getDecrypter=function(){var f=this.decrypter;return f||(f=this.decrypter=new S.default(this.observer,this.config)),f},m}();function d(m,_){var x=null;return m.byteLength>0&&_!=null&&_.key!=null&&_.iv!==null&&_.method!=null&&(x=_),x}var v=function(_){return{remuxResult:{},chunkMeta:_}};function y(m){return"then"in m&&m.then instanceof Function}var b=function(_,x,f,E,w){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=_,this.videoCodec=x,this.initSegmentData=f,this.duration=E,this.defaultInitPts=w},g=function(_,x,f,E,w){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=_,this.contiguous=x,this.accurateTimeOffset=f,this.trackSwitch=E,this.timeOffset=w}},"./src/demux/tsdemuxer.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"discardEPB",function(){return v});var O=B("./src/demux/adts.ts"),D=B("./src/demux/mpegaudio.ts"),S=B("./src/demux/exp-golomb.ts"),A=B("./src/demux/id3.ts"),C=B("./src/demux/sample-aes.ts"),h=B("./src/events.ts"),p=B("./src/utils/mp4-tools.ts"),c=B("./src/utils/logger.ts"),s=B("./src/errors.ts"),n={video:1,audio:2,id3:3,text:4},o=function(){function y(g,m,_){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=g,this.config=m,this.typeSupported=_}y.probe=function(m){var _=y.syncOffset(m);return _<0?!1:(_&&c.logger.warn("MPEG2-TS detected but first sync word found @ offset "+_+", junk ahead ?"),!0)},y.syncOffset=function(m){for(var _=Math.min(1e3,m.length-3*188),x=0;x<_;){if(m[x]===71&&m[x+188]===71&&m[x+2*188]===71)return x;x++}return-1},y.createTrack=function(m,_){return{container:m==="video"||m==="audio"?"video/mp2t":void 0,type:m,id:n[m],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:m==="audio"?_:void 0}};var b=y.prototype;return b.resetInitSegment=function(m,_,x){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=y.createTrack("video",x),this._audioTrack=y.createTrack("audio",x),this._id3Track=y.createTrack("id3",x),this._txtTrack=y.createTrack("text",x),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=m,this.videoCodec=_,this._duration=x},b.resetTimeStamp=function(){},b.resetContiguity=function(){var m=this._audioTrack,_=this._avcTrack,x=this._id3Track;m&&(m.pesData=null),_&&(_.pesData=null),x&&(x.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},b.demux=function(m,_,x,f){x===void 0&&(x=!1),f===void 0&&(f=!1),x||(this.sampleAes=null);var E,w=this._avcTrack,T=this._audioTrack,R=this._id3Track,N=w.pid,j=w.pesData,W=T.pid,J=R.pid,F=T.pesData,k=R.pesData,K=!1,Y=this.pmtParsed,H=this._pmtId,Q=m.length;if(this.remainderData&&(m=Object(p.appendUint8Array)(this.remainderData,m),Q=m.length,this.remainderData=null),Q<188&&!f)return this.remainderData=m,{audioTrack:T,avcTrack:w,id3Track:R,textTrack:this._txtTrack};var re=Math.max(0,y.syncOffset(m));Q-=(Q+re)%188,Q<m.byteLength&&!f&&(this.remainderData=new Uint8Array(m.buffer,Q,m.buffer.byteLength-Q));for(var oe=re;oe<Q;oe+=188)if(m[oe]===71){var me=!!(m[oe+1]&64),he=((m[oe+1]&31)<<8)+m[oe+2],Ee=(m[oe+3]&48)>>4,de=void 0;if(Ee>1){if(de=oe+5+m[oe+4],de===oe+188)continue}else de=oe+4;switch(he){case N:me&&(j&&(E=r(j))&&this.parseAVCPES(E,!1),j={data:[],size:0}),j&&(j.data.push(m.subarray(de,oe+188)),j.size+=oe+188-de);break;case W:me&&(F&&(E=r(F))&&(T.isAAC?this.parseAACPES(E):this.parseMPEGPES(E)),F={data:[],size:0}),F&&(F.data.push(m.subarray(de,oe+188)),F.size+=oe+188-de);break;case J:me&&(k&&(E=r(k))&&this.parseID3PES(E),k={data:[],size:0}),k&&(k.data.push(m.subarray(de,oe+188)),k.size+=oe+188-de);break;case 0:me&&(de+=m[de]+1),H=this._pmtId=l(m,de);break;case H:{me&&(de+=m[de]+1);var be=a(m,de,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);N=be.avc,N>0&&(w.pid=N),W=be.audio,W>0&&(T.pid=W,T.isAAC=be.isAAC),J=be.id3,J>0&&(R.pid=J),K&&!Y&&(c.logger.log("reparse from beginning"),K=!1,oe=re-188),Y=this.pmtParsed=!0;break}case 17:case 8191:break;default:K=!0;break}}else this.observer.emit(h.Events.ERROR,h.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});w.pesData=j,T.pesData=F,R.pesData=k;var Ue={audioTrack:T,avcTrack:w,id3Track:R,textTrack:this._txtTrack};return f&&this.extractRemainingSamples(Ue),Ue},b.flush=function(){var m=this.remainderData;this.remainderData=null;var _;return m?_=this.demux(m,-1,!1,!0):_={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(_),this.sampleAes?this.decrypt(_,this.sampleAes):_},b.extractRemainingSamples=function(m){var _=m.audioTrack,x=m.avcTrack,f=m.id3Track,E=x.pesData,w=_.pesData,T=f.pesData,R;E&&(R=r(E))?(this.parseAVCPES(R,!0),x.pesData=null):x.pesData=E,w&&(R=r(w))?(_.isAAC?this.parseAACPES(R):this.parseMPEGPES(R),_.pesData=null):(w!=null&&w.size&&c.logger.log("last AAC PES packet truncated,might overlap between fragments"),_.pesData=w),T&&(R=r(T))?(this.parseID3PES(R),f.pesData=null):f.pesData=T},b.demuxSampleAes=function(m,_,x){var f=this.demux(m,x,!0,!this.config.progressive),E=this.sampleAes=new C.default(this.observer,this.config,_);return this.decrypt(f,E)},b.decrypt=function(m,_){return new Promise(function(x){var f=m.audioTrack,E=m.avcTrack;f.samples&&f.isAAC?_.decryptAacSamples(f.samples,0,function(){E.samples?_.decryptAvcSamples(E.samples,0,0,function(){x(m)}):x(m)}):E.samples&&_.decryptAvcSamples(E.samples,0,0,function(){x(m)})})},b.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},b.parseAVCPES=function(m,_){var x=this,f=this._avcTrack,E=this.parseAVCNALu(m.data),w=!1,T=this.avcSample,R,N=!1;m.data=null,T&&E.length&&!f.audFound&&(t(T,f),T=this.avcSample=i(!1,m.pts,m.dts,"")),E.forEach(function(j){switch(j.type){case 1:{R=!0,T||(T=x.avcSample=i(!0,m.pts,m.dts,"")),w&&(T.debug+="NDR "),T.frame=!0;var W=j.data;if(N&&W.length>4){var J=new S.default(W).readSliceType();(J===2||J===4||J===7||J===9)&&(T.key=!0)}break}case 5:R=!0,T||(T=x.avcSample=i(!0,m.pts,m.dts,"")),w&&(T.debug+="IDR "),T.key=!0,T.frame=!0;break;case 6:{R=!0,w&&T&&(T.debug+="SEI ");var F=new S.default(v(j.data));F.readUByte();for(var k=0,K=0,Y=!1,H=0;!Y&&F.bytesAvailable>1;){k=0;do H=F.readUByte(),k+=H;while(H===255);K=0;do H=F.readUByte(),K+=H;while(H===255);if(k===4&&F.bytesAvailable!==0){Y=!0;var Q=F.readUByte();if(Q===181){var re=F.readUShort();if(re===49){var oe=F.readUInt();if(oe===1195456820){var me=F.readUByte();if(me===3){for(var he=F.readUByte(),Ee=F.readUByte(),de=31&he,be=[he,Ee],Ue=0;Ue<de;Ue++)be.push(F.readUByte()),be.push(F.readUByte()),be.push(F.readUByte());d(x._txtTrack.samples,{type:3,pts:m.pts,bytes:be})}}}}}else if(k===5&&F.bytesAvailable!==0){if(Y=!0,K>16){for(var Re=[],De=0;De<16;De++)Re.push(F.readUByte().toString(16)),(De===3||De===5||De===7||De===9)&&Re.push("-");for(var je=K-16,ve=new Uint8Array(je),ce=0;ce<je;ce++)ve[ce]=F.readUByte();d(x._txtTrack.samples,{pts:m.pts,payloadType:k,uuid:Re.join(""),userData:Object(A.utf8ArrayToStr)(ve),userDataBytes:ve})}}else if(K<F.bytesAvailable)for(var ke=0;ke<K;ke++)F.readUByte()}break}case 7:if(R=!0,N=!0,w&&T&&(T.debug+="SPS "),!f.sps){var Ne=new S.default(j.data),Je=Ne.readSPS();f.width=Je.width,f.height=Je.height,f.pixelRatio=Je.pixelRatio,f.sps=[j.data],f.duration=x._duration;for(var te=j.data.subarray(1,4),P="avc1.",U=0;U<3;U++){var q=te[U].toString(16);q.length<2&&(q="0"+q),P+=q}f.codec=P}break;case 8:R=!0,w&&T&&(T.debug+="PPS "),f.pps||(f.pps=[j.data]);break;case 9:R=!1,f.audFound=!0,T&&t(T,f),T=x.avcSample=i(!1,m.pts,m.dts,w?"AUD ":"");break;case 12:R=!1;break;default:R=!1,T&&(T.debug+="unknown NAL "+j.type+" ");break}if(T&&R){var X=T.units;X.push(j)}}),_&&T&&(t(T,f),this.avcSample=null)},b.getLastNalUnit=function(){var m,_=this.avcSample,x;if(!_||_.units.length===0){var f=this._avcTrack.samples;_=f[f.length-1]}if((m=_)!==null&&m!==void 0&&m.units){var E=_.units;x=E[E.length-1]}return x},b.parseAVCNALu=function(m){var _=m.byteLength,x=this._avcTrack,f=x.naluState||0,E=f,w=[],T=0,R,N,j,W=-1,J=0;for(f===-1&&(W=0,J=m[0]&31,f=0,T=1);T<_;){if(R=m[T++],!f){f=R?0:1;continue}if(f===1){f=R?0:2;continue}if(!R)f=3;else if(R===1){if(W>=0){var F={data:m.subarray(W,T-f-1),type:J};w.push(F)}else{var k=this.getLastNalUnit();if(k&&(E&&T<=4-E&&(k.state&&(k.data=k.data.subarray(0,k.data.byteLength-E))),N=T-f-1,N>0)){var K=new Uint8Array(k.data.byteLength+N);K.set(k.data,0),K.set(m.subarray(0,N),k.data.byteLength),k.data=K,k.state=0}}T<_?(j=m[T]&31,W=T,J=j,f=0):f=-1}else f=0}if(W>=0&&f>=0){var Y={data:m.subarray(W,_),type:J,state:f};w.push(Y)}if(w.length===0){var H=this.getLastNalUnit();if(H){var Q=new Uint8Array(H.data.byteLength+m.byteLength);Q.set(H.data,0),Q.set(m,H.data.byteLength),H.data=Q}}return x.naluState=f,w},b.parseAACPES=function(m){var _=0,x=this._audioTrack,f=this.aacOverFlow,E=m.data;if(f){this.aacOverFlow=null;var w=f.sample.unit.byteLength,T=Math.min(f.missing,w),R=w-T;f.sample.unit.set(E.subarray(0,T),R),x.samples.push(f.sample),_=f.missing}var N,j;for(N=_,j=E.length;N<j-1&&!O.isHeader(E,N);N++);if(N!==_){var W,J;if(N<j-1?(W="AAC PES did not start with ADTS header,offset:"+N,J=!1):(W="no ADTS header found in AAC PES",J=!0),c.logger.warn("parsing error:"+W),this.observer.emit(h.Events.ERROR,h.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:J,reason:W}),J)return}O.initTrackConfig(x,this.observer,E,N,this.audioCodec);var F;if(m.pts!==void 0)F=m.pts;else if(f){var k=O.getFrameDuration(x.samplerate);F=f.sample.pts+k}else{c.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var K=0;N<j;)if(O.isHeader(E,N)){if(N+5<j){var Y=O.appendFrame(x,E,N,F,K);if(Y)if(Y.missing)this.aacOverFlow=Y;else{N+=Y.length,K++;continue}}break}else N++},b.parseMPEGPES=function(m){var _=m.data,x=_.length,f=0,E=0,w=m.pts;if(w===void 0){c.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;E<x;)if(D.isHeader(_,E)){var T=D.appendFrame(this._audioTrack,_,E,w,f);if(T)E+=T.length,f++;else break}else E++},b.parseID3PES=function(m){if(m.pts===void 0){c.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(m)},y}();o.minProbeByteLength=188;function i(y,b,g,m){return{key:y,frame:!1,pts:b,dts:g,units:[],debug:m,length:0}}function l(y,b){return(y[b+10]&31)<<8|y[b+11]}function a(y,b,g,m){var _={audio:-1,avc:-1,id3:-1,isAAC:!0},x=(y[b+1]&15)<<8|y[b+2],f=b+3+x-4,E=(y[b+10]&15)<<8|y[b+11];for(b+=12+E;b<f;){var w=(y[b+1]&31)<<8|y[b+2];switch(y[b]){case 207:if(!m){c.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:_.audio===-1&&(_.audio=w);break;case 21:_.id3===-1&&(_.id3=w);break;case 219:if(!m){c.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:_.avc===-1&&(_.avc=w);break;case 3:case 4:g?_.audio===-1&&(_.audio=w,_.isAAC=!1):c.logger.log("MPEG audio found, not supported in this browser");break;case 36:c.logger.warn("Unsupported HEVC stream type found");break;default:break}b+=((y[b+3]&15)<<8|y[b+4])+5}return _}function r(y){var b=0,g,m,_,x,f,E=y.data;if(!y||y.size===0)return null;for(;E[0].length<19&&E.length>1;){var w=new Uint8Array(E[0].length+E[1].length);w.set(E[0]),w.set(E[1],E[0].length),E[0]=w,E.splice(1,1)}g=E[0];var T=(g[0]<<16)+(g[1]<<8)+g[2];if(T===1){if(m=(g[4]<<8)+g[5],m&&m>y.size-6)return null;var R=g[7];R&192&&(x=(g[9]&14)*536870912+(g[10]&255)*4194304+(g[11]&254)*16384+(g[12]&255)*128+(g[13]&254)/2,R&64?(f=(g[14]&14)*536870912+(g[15]&255)*4194304+(g[16]&254)*16384+(g[17]&255)*128+(g[18]&254)/2,x-f>60*9e4&&(c.logger.warn(Math.round((x-f)/9e4)+"s delta between PTS and DTS, align them"),x=f)):f=x),_=g[8];var N=_+9;if(y.size<=N)return null;y.size-=N;for(var j=new Uint8Array(y.size),W=0,J=E.length;W<J;W++){g=E[W];var F=g.byteLength;if(N)if(N>F){N-=F;continue}else g=g.subarray(N),F-=N,N=0;j.set(g,b),b+=F}return m&&(m-=_+3),{data:j,pts:x,dts:f,len:m}}return null}function t(y,b){if(y.units.length&&y.frame){if(y.pts===void 0){var g=b.samples,m=g.length;if(m){var _=g[m-1];y.pts=_.pts,y.dts=_.dts}else{b.dropped++;return}}b.samples.push(y)}y.debug.length&&c.logger.log(y.pts+"/"+y.dts+":"+y.debug)}function d(y,b){var g=y.length;if(g>0){if(b.pts>=y[g-1].pts)y.push(b);else for(var m=g-1;m>=0;m--)if(b.pts<y[m].pts){y.splice(m,0,b);break}}else y.push(b)}function v(y){for(var b=y.byteLength,g=[],m=1;m<b-2;)y[m]===0&&y[m+1]===0&&y[m+2]===3?(g.push(m+2),m+=2):m++;if(g.length===0)return y;var _=b-g.length,x=new Uint8Array(_),f=0;for(m=0;m<_;f++,m++)f===g[0]&&(f++,g.shift()),x[m]=y[f];return x}ee.default=o},"./src/errors.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"ErrorTypes",function(){return O}),B.d(ee,"ErrorDetails",function(){return D});var O;(function(S){S.NETWORK_ERROR="networkError",S.MEDIA_ERROR="mediaError",S.KEY_SYSTEM_ERROR="keySystemError",S.MUX_ERROR="muxError",S.OTHER_ERROR="otherError"})(O||(O={}));var D;(function(S){S.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",S.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",S.KEY_SYSTEM_NO_SESSION="keySystemNoSession",S.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",S.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",S.MANIFEST_LOAD_ERROR="manifestLoadError",S.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",S.MANIFEST_PARSING_ERROR="manifestParsingError",S.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",S.LEVEL_EMPTY_ERROR="levelEmptyError",S.LEVEL_LOAD_ERROR="levelLoadError",S.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",S.LEVEL_SWITCH_ERROR="levelSwitchError",S.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",S.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",S.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",S.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",S.FRAG_LOAD_ERROR="fragLoadError",S.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",S.FRAG_DECRYPT_ERROR="fragDecryptError",S.FRAG_PARSING_ERROR="fragParsingError",S.REMUX_ALLOC_ERROR="remuxAllocError",S.KEY_LOAD_ERROR="keyLoadError",S.KEY_LOAD_TIMEOUT="keyLoadTimeOut",S.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",S.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",S.BUFFER_APPEND_ERROR="bufferAppendError",S.BUFFER_APPENDING_ERROR="bufferAppendingError",S.BUFFER_STALLED_ERROR="bufferStalledError",S.BUFFER_FULL_ERROR="bufferFullError",S.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",S.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",S.INTERNAL_EXCEPTION="internalException",S.INTERNAL_ABORTED="aborted",S.UNKNOWN="unknown"})(D||(D={}))},"./src/events.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"Events",function(){return O});var O;(function(D){D.MEDIA_ATTACHING="hlsMediaAttaching",D.MEDIA_ATTACHED="hlsMediaAttached",D.MEDIA_DETACHING="hlsMediaDetaching",D.MEDIA_DETACHED="hlsMediaDetached",D.BUFFER_RESET="hlsBufferReset",D.BUFFER_CODECS="hlsBufferCodecs",D.BUFFER_CREATED="hlsBufferCreated",D.BUFFER_APPENDING="hlsBufferAppending",D.BUFFER_APPENDED="hlsBufferAppended",D.BUFFER_EOS="hlsBufferEos",D.BUFFER_FLUSHING="hlsBufferFlushing",D.BUFFER_FLUSHED="hlsBufferFlushed",D.MANIFEST_LOADING="hlsManifestLoading",D.MANIFEST_LOADED="hlsManifestLoaded",D.MANIFEST_PARSED="hlsManifestParsed",D.LEVEL_SWITCHING="hlsLevelSwitching",D.LEVEL_SWITCHED="hlsLevelSwitched",D.LEVEL_LOADING="hlsLevelLoading",D.LEVEL_LOADED="hlsLevelLoaded",D.LEVEL_UPDATED="hlsLevelUpdated",D.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",D.LEVELS_UPDATED="hlsLevelsUpdated",D.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",D.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",D.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",D.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",D.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",D.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",D.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",D.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",D.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",D.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",D.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",D.CUES_PARSED="hlsCuesParsed",D.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",D.INIT_PTS_FOUND="hlsInitPtsFound",D.FRAG_LOADING="hlsFragLoading",D.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",D.FRAG_LOADED="hlsFragLoaded",D.FRAG_DECRYPTED="hlsFragDecrypted",D.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",D.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",D.FRAG_PARSING_METADATA="hlsFragParsingMetadata",D.FRAG_PARSED="hlsFragParsed",D.FRAG_BUFFERED="hlsFragBuffered",D.FRAG_CHANGED="hlsFragChanged",D.FPS_DROP="hlsFpsDrop",D.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",D.ERROR="hlsError",D.DESTROYING="hlsDestroying",D.KEY_LOADING="hlsKeyLoading",D.KEY_LOADED="hlsKeyLoaded",D.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",D.BACK_BUFFER_REACHED="hlsBackBufferReached"})(O||(O={}))},"./src/hls.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return y});var O=B("./node_modules/url-toolkit/src/url-toolkit.js"),D=B.n(O),S=B("./src/loader/playlist-loader.ts"),A=B("./src/loader/key-loader.ts"),C=B("./src/controller/id3-track-controller.ts"),h=B("./src/controller/latency-controller.ts"),p=B("./src/controller/level-controller.ts"),c=B("./src/controller/fragment-tracker.ts"),s=B("./src/controller/stream-controller.ts"),n=B("./src/is-supported.ts"),o=B("./src/utils/logger.ts"),i=B("./src/config.ts"),l=B("./node_modules/eventemitter3/index.js"),a=B.n(l),r=B("./src/events.ts"),t=B("./src/errors.ts");function d(b,g){for(var m=0;m<g.length;m++){var _=g[m];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(b,_.key,_)}}function v(b,g,m){return g&&d(b.prototype,g),m&&d(b,m),b}var y=function(){b.isSupported=function(){return Object(n.isSupported)()};function b(m){m===void 0&&(m={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new l.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 _=this.config=Object(i.mergeConfig)(b.DefaultConfig,m);this.userConfig=m,Object(o.enableLogs)(_.debug),this._autoLevelCapping=-1,_.progressive&&Object(i.enableStreamingMode)(_);var x=_.abrController,f=_.bufferController,E=_.capLevelController,w=_.fpsController,T=this.abrController=new x(this),R=this.bufferController=new f(this),N=this.capLevelController=new E(this),j=new w(this),W=new S.default(this),J=new A.default(this),F=new C.default(this),k=this.levelController=new p.default(this),K=new c.FragmentTracker(this),Y=this.streamController=new s.default(this,K);N.setStreamController(Y),j.setStreamController(Y);var H=[k,Y];this.networkControllers=H;var Q=[W,J,T,R,N,j,F,K];this.audioTrackController=this.createController(_.audioTrackController,null,H),this.createController(_.audioStreamController,K,H),this.subtitleTrackController=this.createController(_.subtitleTrackController,null,H),this.createController(_.subtitleStreamController,K,H),this.createController(_.timelineController,null,Q),this.emeController=this.createController(_.emeController,null,Q),this.cmcdController=this.createController(_.cmcdController,null,Q),this.latencyController=this.createController(h.default,null,Q),this.coreComponents=Q}var g=b.prototype;return g.createController=function(_,x,f){if(_){var E=x?new _(this,x):new _(this);return f&&f.push(E),E}return null},g.on=function(_,x,f){f===void 0&&(f=this),this._emitter.on(_,x,f)},g.once=function(_,x,f){f===void 0&&(f=this),this._emitter.once(_,x,f)},g.removeAllListeners=function(_){this._emitter.removeAllListeners(_)},g.off=function(_,x,f,E){f===void 0&&(f=this),this._emitter.off(_,x,f,E)},g.listeners=function(_){return this._emitter.listeners(_)},g.emit=function(_,x,f){return this._emitter.emit(_,x,f)},g.trigger=function(_,x){if(this.config.debug)return this.emit(_,_,x);try{return this.emit(_,_,x)}catch(f){o.logger.error("An internal error happened while handling event "+_+'. Error message: "'+f.message+'". Here is a stacktrace:',f),this.trigger(r.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:_,error:f})}return!1},g.listenerCount=function(_){return this._emitter.listenerCount(_)},g.destroy=function(){o.logger.log("destroy"),this.trigger(r.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(_){return _.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(_){return _.destroy()}),this.coreComponents.length=0},g.attachMedia=function(_){o.logger.log("attachMedia"),this._media=_,this.trigger(r.Events.MEDIA_ATTACHING,{media:_})},g.detachMedia=function(){o.logger.log("detachMedia"),this.trigger(r.Events.MEDIA_DETACHING,void 0),this._media=null},g.loadSource=function(_){this.stopLoad();var x=this.media,f=this.url,E=this.url=O.buildAbsoluteURL(self.location.href,_,{alwaysNormalize:!0});o.logger.log("loadSource:"+E),x&&f&&f!==E&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(x)),this.trigger(r.Events.MANIFEST_LOADING,{url:_})},g.startLoad=function(_){_===void 0&&(_=-1),o.logger.log("startLoad("+_+")"),this.networkControllers.forEach(function(x){x.startLoad(_)})},g.stopLoad=function(){o.logger.log("stopLoad"),this.networkControllers.forEach(function(_){_.stopLoad()})},g.swapAudioCodec=function(){o.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},g.recoverMediaError=function(){o.logger.log("recoverMediaError");var _=this._media;this.detachMedia(),_&&this.attachMedia(_)},g.removeLevel=function(_,x){x===void 0&&(x=0),this.levelController.removeLevel(_,x)},v(b,[{key:"levels",get:function(){var _=this.levelController.levels;return _||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(_){o.logger.log("set currentLevel:"+_),this.loadLevel=_,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(_){o.logger.log("set nextLevel:"+_),this.levelController.manualLevel=_,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(_){o.logger.log("set loadLevel:"+_),this.levelController.manualLevel=_}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(_){this.levelController.nextLoadLevel=_}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(_){o.logger.log("set firstLevel:"+_),this.levelController.firstLevel=_}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(_){o.logger.log("set startLevel:"+_),_!==-1&&(_=Math.max(_,this.minAutoLevel)),this.levelController.startLevel=_}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(_){var x=!!_;x!==this.config.capLevelToPlayerSize&&(x?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=x)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(_){this._autoLevelCapping!==_&&(o.logger.log("set autoLevelCapping:"+_),this._autoLevelCapping=_)}},{key:"bandwidthEstimate",get:function(){var _=this.abrController.bwEstimator;return _?_.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var _=this.levels,x=this.config.minAutoBitrate;if(!_)return 0;for(var f=_.length,E=0;E<f;E++)if(_[E].maxBitrate>x)return E;return 0}},{key:"maxAutoLevel",get:function(){var _=this.levels,x=this.autoLevelCapping,f;return x===-1&&_&&_.length?f=_.length-1:f=x,f}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(_){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,_)}},{key:"audioTracks",get:function(){var _=this.audioTrackController;return _?_.audioTracks:[]}},{key:"audioTrack",get:function(){var _=this.audioTrackController;return _?_.audioTrack:-1},set:function(_){var x=this.audioTrackController;x&&(x.audioTrack=_)}},{key:"subtitleTracks",get:function(){var _=this.subtitleTrackController;return _?_.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var _=this.subtitleTrackController;return _?_.subtitleTrack:-1},set:function(_){var x=this.subtitleTrackController;x&&(x.subtitleTrack=_)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var _=this.subtitleTrackController;return _?_.subtitleDisplay:!1},set:function(_){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=_)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(_){this.config.lowLatencyMode=_}},{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 r.Events}},{key:"ErrorTypes",get:function(){return t.ErrorTypes}},{key:"ErrorDetails",get:function(){return t.ErrorDetails}},{key:"DefaultConfig",get:function(){return b.defaultConfig?b.defaultConfig:i.hlsDefaultConfig},set:function(_){b.defaultConfig=_}}]),b}();y.defaultConfig=void 0},"./src/is-supported.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"isSupported",function(){return S}),B.d(ee,"changeTypeSupported",function(){return A});var O=B("./src/utils/mediasource-helper.ts");function D(){return self.SourceBuffer||self.WebKitSourceBuffer}function S(){var C=Object(O.getMediaSource)();if(!C)return!1;var h=D(),p=C&&typeof C.isTypeSupported=="function"&&C.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),c=!h||h.prototype&&typeof h.prototype.appendBuffer=="function"&&typeof h.prototype.remove=="function";return!!p&&!!c}function A(){var C,h=D();return typeof(h==null||((C=h.prototype)===null||C===void 0)?void 0:C.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return o}),B.d(ee,"LoadError",function(){return l});var O=B("./src/polyfills/number.ts"),D=B("./src/errors.ts");function S(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,c(a,r)}function A(a){var r=typeof Map=="function"?new Map:void 0;return A=function(d){if(d===null||!p(d))return d;if(typeof d!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r!="undefined"){if(r.has(d))return r.get(d);r.set(d,v)}function v(){return C(d,arguments,s(this).constructor)}return v.prototype=Object.create(d.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),c(v,d)},A(a)}function C(a,r,t){return h()?C=Reflect.construct:C=function(v,y,b){var g=[null];g.push.apply(g,y);var m=Function.bind.apply(v,g),_=new m;return b&&c(_,b.prototype),_},C.apply(null,arguments)}function h(){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(a){return!1}}function p(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function c(a,r){return c=Object.setPrototypeOf||function(d,v){return d.__proto__=v,d},c(a,r)}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var n=Math.pow(2,17),o=function(){function a(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var r=a.prototype;return r.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},r.abort=function(){this.loader&&this.loader.abort()},r.load=function(d,v){var y=this,b=d.url;if(!b)return Promise.reject(new l({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:d,networkDetails:null},"Fragment does not have a "+(b?"part list":"url")));this.abort();var g=this.config,m=g.fLoader,_=g.loader;return new Promise(function(x,f){y.loader&&y.loader.destroy();var E=y.loader=d.loader=m?new m(g):new _(g),w=i(d),T={timeout:g.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:g.fragLoadingMaxRetryTimeout,highWaterMark:n};d.stats=E.stats,E.load(w,T,{onSuccess:function(N,j,W,J){y.resetLoader(d,E),x({frag:d,part:null,payload:N.data,networkDetails:J})},onError:function(N,j,W){y.resetLoader(d,E),f(new l({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:d,response:N,networkDetails:W}))},onAbort:function(N,j,W){y.resetLoader(d,E),f(new l({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:d,networkDetails:W}))},onTimeout:function(N,j,W){y.resetLoader(d,E),f(new l({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:d,networkDetails:W}))},onProgress:function(N,j,W,J){v&&v({frag:d,part:null,payload:W,networkDetails:J})}})})},r.loadPart=function(d,v,y){var b=this;this.abort();var g=this.config,m=g.fLoader,_=g.loader;return new Promise(function(x,f){b.loader&&b.loader.destroy();var E=b.loader=d.loader=m?new m(g):new _(g),w=i(d,v),T={timeout:g.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:g.fragLoadingMaxRetryTimeout,highWaterMark:n};v.stats=E.stats,E.load(w,T,{onSuccess:function(N,j,W,J){b.resetLoader(d,E),b.updateStatsFromPart(d,v);var F={frag:d,part:v,payload:N.data,networkDetails:J};y(F),x(F)},onError:function(N,j,W){b.resetLoader(d,E),f(new l({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:d,part:v,response:N,networkDetails:W}))},onAbort:function(N,j,W){d.stats.aborted=v.stats.aborted,b.resetLoader(d,E),f(new l({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:d,part:v,networkDetails:W}))},onTimeout:function(N,j,W){b.resetLoader(d,E),f(new l({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:d,part:v,networkDetails:W}))}})})},r.updateStatsFromPart=function(d,v){var y=d.stats,b=v.stats,g=b.total;if(y.loaded+=b.loaded,g){var m=Math.round(d.duration/v.duration),_=Math.min(Math.round(y.loaded/g),m),x=m-_,f=x*Math.round(y.loaded/_);y.total=y.loaded+f}else y.total=Math.max(y.loaded,y.total);var E=y.loading,w=b.loading;E.start?E.first+=w.first-w.start:(E.start=w.start,E.first=w.first),E.end=w.end},r.resetLoader=function(d,v){d.loader=null,this.loader===v&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),v.destroy()},a}();function i(a,r){r===void 0&&(r=null);var t=r||a,d={frag:a,part:r,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},v=t.byteRangeStartOffset,y=t.byteRangeEndOffset;return Object(O.isFiniteNumber)(v)&&Object(O.isFiniteNumber)(y)&&(d.rangeStart=v,d.rangeEnd=y),d}var l=function(a){S(r,a);function r(t){for(var d,v=arguments.length,y=new Array(v>1?v-1:0),b=1;b<v;b++)y[b-1]=arguments[b];return d=a.call.apply(a,[this].concat(y))||this,d.data=void 0,d.data=t,d}return r}(A(Error))},"./src/loader/fragment.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"ElementaryStreamTypes",function(){return o}),B.d(ee,"BaseSegment",function(){return i}),B.d(ee,"Fragment",function(){return l}),B.d(ee,"Part",function(){return a});var O=B("./src/polyfills/number.ts"),D=B("./node_modules/url-toolkit/src/url-toolkit.js"),S=B.n(D),A=B("./src/utils/logger.ts"),C=B("./src/loader/level-key.ts"),h=B("./src/loader/load-stats.ts");function p(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,c(r,t)}function c(r,t){return c=Object.setPrototypeOf||function(v,y){return v.__proto__=y,v},c(r,t)}function s(r,t){for(var d=0;d<t.length;d++){var v=t[d];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(r,v.key,v)}}function n(r,t,d){return t&&s(r.prototype,t),d&&s(r,d),r}var o;(function(r){r.AUDIO="audio",r.VIDEO="video",r.AUDIOVIDEO="audiovideo"})(o||(o={}));var i=function(){function r(d){var v;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(v={},v[o.AUDIO]=null,v[o.VIDEO]=null,v[o.AUDIOVIDEO]=null,v),this.baseurl=d}var t=r.prototype;return t.setByteRange=function(v,y){var b=v.split("@",2),g=[];b.length===1?g[0]=y?y.byteRangeEndOffset:0:g[0]=parseInt(b[1]),g[1]=parseInt(b[0])+g[0],this._byteRange=g},n(r,[{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(D.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(v){this._url=v}}]),r}(),l=function(r){p(t,r);function t(v,y){var b;return b=r.call(this,y)||this,b._decryptdata=null,b.rawProgramDateTime=null,b.programDateTime=null,b.tagList=[],b.duration=0,b.sn=0,b.levelkey=void 0,b.type=void 0,b.loader=null,b.level=-1,b.cc=0,b.startPTS=void 0,b.endPTS=void 0,b.appendedPTS=void 0,b.startDTS=void 0,b.endDTS=void 0,b.start=0,b.deltaPTS=void 0,b.maxStartPTS=void 0,b.minEndPTS=void 0,b.stats=new h.LoadStats,b.urlId=0,b.data=void 0,b.bitrateTest=!1,b.title=null,b.initSegment=null,b.type=v,b}var d=t.prototype;return d.createInitializationVector=function(y){for(var b=new Uint8Array(16),g=12;g<16;g++)b[g]=y>>8*(15-g)&255;return b},d.setDecryptDataFromLevelKey=function(y,b){var g=y;return(y==null?void 0:y.method)==="AES-128"&&y.uri&&!y.iv&&(g=C.LevelKey.fromURI(y.uri),g.method=y.method,g.iv=this.createInitializationVector(b),g.keyFormat="identity"),g},d.setElementaryStreamInfo=function(y,b,g,m,_,x){x===void 0&&(x=!1);var f=this.elementaryStreams,E=f[y];if(!E){f[y]={startPTS:b,endPTS:g,startDTS:m,endDTS:_,partial:x};return}E.startPTS=Math.min(E.startPTS,b),E.endPTS=Math.max(E.endPTS,g),E.startDTS=Math.min(E.startDTS,m),E.endDTS=Math.max(E.endDTS,_)},d.clearElementaryStreamInfo=function(){var y=this.elementaryStreams;y[o.AUDIO]=null,y[o.VIDEO]=null,y[o.AUDIOVIDEO]=null},n(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var y=this.sn;typeof y!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&A.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),y=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,y)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(O.isFiniteNumber)(this.programDateTime))return null;var y=Object(O.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+y*1e3}},{key:"encrypted",get:function(){var y;return!!((y=this.decryptdata)!==null&&y!==void 0&&y.keyFormat&&this.decryptdata.uri)}}]),t}(i),a=function(r){p(t,r);function t(d,v,y,b,g){var m;m=r.call(this,y)||this,m.fragOffset=0,m.duration=0,m.gap=!1,m.independent=!1,m.relurl=void 0,m.fragment=void 0,m.index=void 0,m.stats=new h.LoadStats,m.duration=d.decimalFloatingPoint("DURATION"),m.gap=d.bool("GAP"),m.independent=d.bool("INDEPENDENT"),m.relurl=d.enumeratedString("URI"),m.fragment=v,m.index=b;var _=d.enumeratedString("BYTERANGE");return _&&m.setByteRange(_,g),g&&(m.fragOffset=g.fragOffset+g.duration),m}return n(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var v=this.elementaryStreams;return!!(v.audio||v.video||v.audiovideo)}}]),t}(i)},"./src/loader/key-loader.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return A});var O=B("./src/events.ts"),D=B("./src/errors.ts"),S=B("./src/utils/logger.ts"),A=function(){function C(p){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=p,this._registerListeners()}var h=C.prototype;return h._registerListeners=function(){this.hls.on(O.Events.KEY_LOADING,this.onKeyLoading,this)},h._unregisterListeners=function(){this.hls.off(O.Events.KEY_LOADING,this.onKeyLoading)},h.destroy=function(){this._unregisterListeners();for(var c in this.loaders){var s=this.loaders[c];s&&s.destroy()}this.loaders={}},h.onKeyLoading=function(c,s){var n=s.frag,o=n.type,i=this.loaders[o];if(!n.decryptdata){S.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var l=n.decryptdata.uri;if(l!==this.decrypturl||this.decryptkey===null){var a=this.hls.config;if(i&&(S.logger.warn("abort previous key loader for type:"+o),i.abort()),!l){S.logger.warn("key uri is falsy");return}var r=a.loader,t=n.loader=this.loaders[o]=new r(a);this.decrypturl=l,this.decryptkey=null;var d={url:l,frag:n,responseType:"arraybuffer"},v={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:a.fragLoadingRetryDelay,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.load(d,v,y)}else this.decryptkey&&(n.decryptdata.key=this.decryptkey,this.hls.trigger(O.Events.KEY_LOADED,{frag:n}))},h.loadsuccess=function(c,s,n){var o=n.frag;if(!o.decryptdata){S.logger.error("after key load, decryptdata unset");return}this.decryptkey=o.decryptdata.key=new Uint8Array(c.data),o.loader=null,delete this.loaders[o.type],this.hls.trigger(O.Events.KEY_LOADED,{frag:o})},h.loaderror=function(c,s){var n=s.frag,o=n.loader;o&&o.abort(),delete this.loaders[n.type],this.hls.trigger(O.Events.ERROR,{type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:c})},h.loadtimeout=function(c,s){var n=s.frag,o=n.loader;o&&o.abort(),delete this.loaders[n.type],this.hls.trigger(O.Events.ERROR,{type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},C}()},"./src/loader/level-details.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"LevelDetails",function(){return C});var O=B("./src/polyfills/number.ts");function D(h,p){for(var c=0;c<p.length;c++){var s=p[c];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(h,s.key,s)}}function S(h,p,c){return p&&D(h.prototype,p),c&&D(h,c),h}var A=10,C=function(){function h(c){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=c}var p=h.prototype;return p.reloaded=function(s){if(!s){this.advanced=!0,this.updated=!0;return}var n=this.lastPartSn-s.lastPartSn,o=this.lastPartIndex-s.lastPartIndex;this.updated=this.endSN!==s.endSN||!!o||!!n,this.advanced=this.endSN>s.endSN||n>0||n===0&&o>0,this.updated||this.advanced?this.misses=Math.floor(s.misses*.6):this.misses=s.misses+1,this.availabilityDelay=s.availabilityDelay},S(h,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(O.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||A}},{key:"drift",get:function(){var s=this.driftEndTime-this.driftStartTime;if(s>0){var n=this.driftEnd-this.driftStart;return n*1e3/s}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var s;return(s=this.partList)!==null&&s!==void 0&&s.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var s;return(s=this.fragments)!==null&&s!==void 0&&s.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var s;return(s=this.partList)!==null&&s!==void 0&&s.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var s;return(s=this.partList)!==null&&s!==void 0&&s.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),h}()},"./src/loader/level-key.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"LevelKey",function(){return C});var O=B("./node_modules/url-toolkit/src/url-toolkit.js"),D=B.n(O);function S(h,p){for(var c=0;c<p.length;c++){var s=p[c];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(h,s.key,s)}}function A(h,p,c){return p&&S(h.prototype,p),c&&S(h,c),h}var C=function(){h.fromURL=function(c,s){return new h(c,s)},h.fromURI=function(c){return new h(c)};function h(p,c){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,c?this._uri=Object(O.buildAbsoluteURL)(p,c,{alwaysNormalize:!0}):this._uri=p}return A(h,[{key:"uri",get:function(){return this._uri}}]),h}()},"./src/loader/load-stats.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"LoadStats",function(){return O});var O=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(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return t});var O=B("./src/polyfills/number.ts"),D=B("./node_modules/url-toolkit/src/url-toolkit.js"),S=B.n(D),A=B("./src/loader/fragment.ts"),C=B("./src/loader/level-details.ts"),h=B("./src/loader/level-key.ts"),p=B("./src/utils/attr-list.ts"),c=B("./src/utils/logger.ts"),s=B("./src/utils/codecs.ts"),n=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,o=/#EXT-X-MEDIA:(.*)/g,i=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),l=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("|")),a=/\.(mp4|m4s|m4v|m4a)$/i;function r(g){var m,_;return a.test((m=(_=D.parseURL(g))===null||_===void 0?void 0:_.path)!=null?m:"")}var t=function(){function g(){}return g.findGroup=function(_,x){for(var f=0;f<_.length;f++){var E=_[f];if(E.id===x)return E}},g.convertAVC1ToAVCOTI=function(_){var x=_.split(".");if(x.length>2){var f=x.shift()+".";return f+=parseInt(x.shift()).toString(16),f+=("000"+parseInt(x.shift()).toString(16)).substr(-4),f}return _},g.resolve=function(_,x){return D.buildAbsoluteURL(x,_,{alwaysNormalize:!0})},g.parseMasterPlaylist=function(_,x){var f=[],E={},w=!1;n.lastIndex=0;for(var T;(T=n.exec(_))!=null;)if(T[1]){var R=new p.AttrList(T[1]),N={attrs:R,bitrate:R.decimalInteger("AVERAGE-BANDWIDTH")||R.decimalInteger("BANDWIDTH"),name:R.NAME,url:g.resolve(T[2],x)},j=R.decimalResolution("RESOLUTION");j&&(N.width=j.width,N.height=j.height),d((R.CODECS||"").split(/[ ,]+/).filter(function(J){return J}),N),N.videoCodec&&N.videoCodec.indexOf("avc1")!==-1&&(N.videoCodec=g.convertAVC1ToAVCOTI(N.videoCodec)),f.push(N)}else if(T[3]){var W=new p.AttrList(T[3]);W["DATA-ID"]&&(w=!0,E[W["DATA-ID"]]=W)}return{levels:f,sessionData:w?E:null}},g.parseMasterPlaylistMedia=function(_,x,f,E){E===void 0&&(E=[]);var w,T=[],R=0;for(o.lastIndex=0;(w=o.exec(_))!==null;){var N=new p.AttrList(w[1]);if(N.TYPE===f){var j={attrs:N,bitrate:0,id:R++,groupId:N["GROUP-ID"],instreamId:N["INSTREAM-ID"],name:N.NAME||N.LANGUAGE||"",type:f,default:N.bool("DEFAULT"),autoselect:N.bool("AUTOSELECT"),forced:N.bool("FORCED"),lang:N.LANGUAGE,url:N.URI?g.resolve(N.URI,x):""};if(E.length){var W=g.findGroup(E,j.groupId)||E[0];v(j,W,"audioCodec"),v(j,W,"textCodec")}T.push(j)}}return T},g.parseLevelPlaylist=function(_,x,f,E,w){var T=new C.LevelDetails(x),R=T.fragments,N=null,j=0,W=0,J=0,F=0,k=null,K=new A.Fragment(E,x),Y,H,Q,re=-1,oe=!1;for(i.lastIndex=0,T.m3u8=_;(Y=i.exec(_))!==null;){oe&&(oe=!1,K=new A.Fragment(E,x),K.start=J,K.sn=j,K.cc=F,K.level=f,N&&(K.initSegment=N,K.rawProgramDateTime=N.rawProgramDateTime));var me=Y[1];if(me){K.duration=parseFloat(me);var he=(" "+Y[2]).slice(1);K.title=he||null,K.tagList.push(he?["INF",me,he]:["INF",me])}else if(Y[3])Object(O.isFiniteNumber)(K.duration)&&(K.start=J,Q&&(K.levelkey=Q),K.sn=j,K.level=f,K.cc=F,K.urlId=w,R.push(K),K.relurl=(" "+Y[3]).slice(1),b(K,k),k=K,J+=K.duration,j++,W=0,oe=!0);else if(Y[4]){var Ee=(" "+Y[4]).slice(1);k?K.setByteRange(Ee,k):K.setByteRange(Ee)}else if(Y[5])K.rawProgramDateTime=(" "+Y[5]).slice(1),K.tagList.push(["PROGRAM-DATE-TIME",K.rawProgramDateTime]),re===-1&&(re=R.length);else{if(Y=Y[0].match(l),!Y){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(H=1;H<Y.length&&!(typeof Y[H]!="undefined");H++);var de=(" "+Y[H]).slice(1),be=(" "+Y[H+1]).slice(1),Ue=Y[H+2]?(" "+Y[H+2]).slice(1):"";switch(de){case"PLAYLIST-TYPE":T.type=be.toUpperCase();break;case"MEDIA-SEQUENCE":j=T.startSN=parseInt(be);break;case"SKIP":{var Re=new p.AttrList(be),De=Re.decimalInteger("SKIPPED-SEGMENTS");if(Object(O.isFiniteNumber)(De)){T.skippedSegments=De;for(var je=De;je--;)R.unshift(null);j+=De}var ve=Re.enumeratedString("RECENTLY-REMOVED-DATERANGES");ve&&(T.recentlyRemovedDateranges=ve.split(" "));break}case"TARGETDURATION":T.targetduration=parseFloat(be);break;case"VERSION":T.version=parseInt(be);break;case"EXTM3U":break;case"ENDLIST":T.live=!1;break;case"#":(be||Ue)&&K.tagList.push(Ue?[be,Ue]:[be]);break;case"DIS":F++;case"GAP":K.tagList.push([de]);break;case"BITRATE":K.tagList.push([de,be]);break;case"DISCONTINUITY-SEQ":F=parseInt(be);break;case"KEY":{var ce,ke=new p.AttrList(be),Ne=ke.enumeratedString("METHOD"),Je=ke.URI,te=ke.hexadecimalInteger("IV"),P=ke.enumeratedString("KEYFORMATVERSIONS"),U=ke.enumeratedString("KEYID"),q=(ce=ke.enumeratedString("KEYFORMAT"))!=null?ce:"identity",X=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(X.indexOf(q)>-1){c.logger.warn("Keyformat "+q+" is not supported from the manifest");continue}else if(q!=="identity")continue;Ne&&(Q=h.LevelKey.fromURL(x,Je),Je&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ne)>=0&&(Q.method=Ne,Q.keyFormat=q,U&&(Q.keyID=U),P&&(Q.keyFormatVersions=P),Q.iv=te));break}case"START":{var $=new p.AttrList(be),ge=$.decimalFloatingPoint("TIME-OFFSET");Object(O.isFiniteNumber)(ge)&&(T.startTimeOffset=ge);break}case"MAP":{var Ae=new p.AttrList(be);K.relurl=Ae.URI,Ae.BYTERANGE&&K.setByteRange(Ae.BYTERANGE),K.level=f,K.sn="initSegment",Q&&(K.levelkey=Q),K.initSegment=null,N=K,oe=!0;break}case"SERVER-CONTROL":{var at=new p.AttrList(be);T.canBlockReload=at.bool("CAN-BLOCK-RELOAD"),T.canSkipUntil=at.optionalFloat("CAN-SKIP-UNTIL",0),T.canSkipDateRanges=T.canSkipUntil>0&&at.bool("CAN-SKIP-DATERANGES"),T.partHoldBack=at.optionalFloat("PART-HOLD-BACK",0),T.holdBack=at.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Le=new p.AttrList(be);T.partTarget=Le.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Me=T.partList;Me||(Me=T.partList=[]);var Xe=W>0?Me[Me.length-1]:void 0,et=W++,ze=new A.Part(new p.AttrList(be),K,x,et,Xe);Me.push(ze),K.duration+=ze.duration;break}case"PRELOAD-HINT":{var Ke=new p.AttrList(be);T.preloadHint=Ke;break}case"RENDITION-REPORT":{var Pe=new p.AttrList(be);T.renditionReports=T.renditionReports||[],T.renditionReports.push(Pe);break}default:c.logger.warn("line parsed but not handled: "+Y);break}}}k&&!k.relurl?(R.pop(),J-=k.duration,T.partList&&(T.fragmentHint=k)):T.partList&&(b(K,k),K.cc=F,T.fragmentHint=K);var Ie=R.length,Ce=R[0],pe=R[Ie-1];if(J+=T.skippedSegments*T.targetduration,J>0&&Ie&&pe){T.averagetargetduration=J/Ie;var _e=pe.sn;T.endSN=_e!=="initSegment"?_e:0,Ce&&(T.startCC=Ce.cc,Ce.initSegment||T.fragments.every(function(Oe){return Oe.relurl&&r(Oe.relurl)})&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),K=new A.Fragment(E,x),K.relurl=pe.relurl,K.level=f,K.sn="initSegment",Ce.initSegment=K,T.needSidxRanges=!0))}else T.endSN=0,T.startCC=0;return T.fragmentHint&&(J+=T.fragmentHint.duration),T.totalduration=J,T.endCC=F,re>0&&y(R,re),T},g}();function d(g,m){["video","audio","text"].forEach(function(_){var x=g.filter(function(E){return Object(s.isCodecType)(E,_)});if(x.length){var f=x.filter(function(E){return E.lastIndexOf("avc1",0)===0||E.lastIndexOf("mp4a",0)===0});m[_+"Codec"]=f.length>0?f[0]:x[0],g=g.filter(function(E){return x.indexOf(E)===-1})}}),m.unknownCodecs=g}function v(g,m,_){var x=m[_];x&&(g[_]=x)}function y(g,m){for(var _=g[m],x=m;x--;){var f=g[x];if(!f)return;f.programDateTime=_.programDateTime-f.duration*1e3,_=f}}function b(g,m){g.rawProgramDateTime?g.programDateTime=Date.parse(g.rawProgramDateTime):m!=null&&m.programDateTime&&(g.programDateTime=m.endProgramDateTime),Object(O.isFiniteNumber)(g.programDateTime)||(g.programDateTime=null,g.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/polyfills/number.ts"),D=B("./src/events.ts"),S=B("./src/errors.ts"),A=B("./src/utils/logger.ts"),C=B("./src/utils/mp4-tools.ts"),h=B("./src/loader/m3u8-parser.ts"),p=B("./src/types/loader.ts"),c=B("./src/utils/attr-list.ts");function s(i){var l=i.type;switch(l){case p.PlaylistContextType.AUDIO_TRACK:return p.PlaylistLevelType.AUDIO;case p.PlaylistContextType.SUBTITLE_TRACK:return p.PlaylistLevelType.SUBTITLE;default:return p.PlaylistLevelType.MAIN}}function n(i,l){var a=i.url;return(a===void 0||a.indexOf("data:")===0)&&(a=l.url),a}var o=function(){function i(a){this.hls=void 0,this.loaders=Object.create(null),this.hls=a,this.registerListeners()}var l=i.prototype;return l.registerListeners=function(){var r=this.hls;r.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),r.on(D.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),r.on(D.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},l.unregisterListeners=function(){var r=this.hls;r.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),r.off(D.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),r.off(D.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},l.createInternalLoader=function(r){var t=this.hls.config,d=t.pLoader,v=t.loader,y=d||v,b=new y(t);return r.loader=b,this.loaders[r.type]=b,b},l.getInternalLoader=function(r){return this.loaders[r.type]},l.resetInternalLoader=function(r){this.loaders[r]&&delete this.loaders[r]},l.destroyInternalLoaders=function(){for(var r in this.loaders){var t=this.loaders[r];t&&t.destroy(),this.resetInternalLoader(r)}},l.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},l.onManifestLoading=function(r,t){var d=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:p.PlaylistContextType.MANIFEST,url:d,deliveryDirectives:null})},l.onLevelLoading=function(r,t){var d=t.id,v=t.level,y=t.url,b=t.deliveryDirectives;this.load({id:d,groupId:null,level:v,responseType:"text",type:p.PlaylistContextType.LEVEL,url:y,deliveryDirectives:b})},l.onAudioTrackLoading=function(r,t){var d=t.id,v=t.groupId,y=t.url,b=t.deliveryDirectives;this.load({id:d,groupId:v,level:null,responseType:"text",type:p.PlaylistContextType.AUDIO_TRACK,url:y,deliveryDirectives:b})},l.onSubtitleTrackLoading=function(r,t){var d=t.id,v=t.groupId,y=t.url,b=t.deliveryDirectives;this.load({id:d,groupId:v,level:null,responseType:"text",type:p.PlaylistContextType.SUBTITLE_TRACK,url:y,deliveryDirectives:b})},l.load=function(r){var t,d=this.hls.config,v=this.getInternalLoader(r);if(v){var y=v.context;if(y&&y.url===r.url){A.logger.trace("[playlist-loader]: playlist request ongoing");return}A.logger.log("[playlist-loader]: aborting previous loader for type: "+r.type),v.abort()}var b,g,m,_;switch(r.type){case p.PlaylistContextType.MANIFEST:b=d.manifestLoadingMaxRetry,g=d.manifestLoadingTimeOut,m=d.manifestLoadingRetryDelay,_=d.manifestLoadingMaxRetryTimeout;break;case p.PlaylistContextType.LEVEL:case p.PlaylistContextType.AUDIO_TRACK:case p.PlaylistContextType.SUBTITLE_TRACK:b=0,g=d.levelLoadingTimeOut;break;default:b=d.levelLoadingMaxRetry,g=d.levelLoadingTimeOut,m=d.levelLoadingRetryDelay,_=d.levelLoadingMaxRetryTimeout;break}if(v=this.createInternalLoader(r),(t=r.deliveryDirectives)!==null&&t!==void 0&&t.part){var x;if(r.type===p.PlaylistContextType.LEVEL&&r.level!==null?x=this.hls.levels[r.level].details:r.type===p.PlaylistContextType.AUDIO_TRACK&&r.id!==null?x=this.hls.audioTracks[r.id].details:r.type===p.PlaylistContextType.SUBTITLE_TRACK&&r.id!==null&&(x=this.hls.subtitleTracks[r.id].details),x){var f=x.partTarget,E=x.targetduration;f&&E&&(g=Math.min(Math.max(f*3,E*.8)*1e3,g))}}var w={timeout:g,maxRetry:b,retryDelay:m,maxRetryDelay:_,highWaterMark:0},T={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};v.load(r,w,T)},l.loadsuccess=function(r,t,d,v){if(v===void 0&&(v=null),d.isSidxRequest){this.handleSidxRequest(r,d),this.handlePlaylistLoaded(r,t,d,v);return}this.resetInternalLoader(d.type);var y=r.data;if(y.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(r,d,"no EXTM3U delimiter",v);return}t.parsing.start=performance.now(),y.indexOf("#EXTINF:")>0||y.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(r,t,d,v):this.handleMasterPlaylist(r,t,d,v)},l.loaderror=function(r,t,d){d===void 0&&(d=null),this.handleNetworkError(t,d,!1,r)},l.loadtimeout=function(r,t,d){d===void 0&&(d=null),this.handleNetworkError(t,d,!0)},l.handleMasterPlaylist=function(r,t,d,v){var y=this.hls,b=r.data,g=n(r,d),m=h.default.parseMasterPlaylist(b,g),_=m.levels,x=m.sessionData;if(!_.length){this.handleManifestParsingError(r,d,"no level found in manifest",v);return}var f=_.map(function(j){return{id:j.attrs.AUDIO,audioCodec:j.audioCodec}}),E=_.map(function(j){return{id:j.attrs.SUBTITLES,textCodec:j.textCodec}}),w=h.default.parseMasterPlaylistMedia(b,g,"AUDIO",f),T=h.default.parseMasterPlaylistMedia(b,g,"SUBTITLES",E),R=h.default.parseMasterPlaylistMedia(b,g,"CLOSED-CAPTIONS");if(w.length){var N=w.some(function(j){return!j.url});!N&&_[0].audioCodec&&!_[0].attrs.AUDIO&&(A.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),w.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new c.AttrList({}),bitrate:0,url:""}))}y.trigger(D.Events.MANIFEST_LOADED,{levels:_,audioTracks:w,subtitles:T,captions:R,url:g,stats:t,networkDetails:v,sessionData:x})},l.handleTrackOrLevelPlaylist=function(r,t,d,v){var y=this.hls,b=d.id,g=d.level,m=d.type,_=n(r,d),x=Object(O.isFiniteNumber)(b)?b:0,f=Object(O.isFiniteNumber)(g)?g:x,E=s(d),w=h.default.parseLevelPlaylist(r.data,_,f,E,x);if(!w.fragments.length){y.trigger(D.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:_,reason:"no fragments found in level",level:typeof d.level=="number"?d.level:void 0});return}if(m===p.PlaylistContextType.MANIFEST){var T={attrs:new c.AttrList({}),bitrate:0,details:w,name:"",url:_};y.trigger(D.Events.MANIFEST_LOADED,{levels:[T],audioTracks:[],url:_,stats:t,networkDetails:v,sessionData:null})}if(t.parsing.end=performance.now(),w.needSidxRanges){var R,N=(R=w.fragments[0].initSegment)===null||R===void 0?void 0:R.url;this.load({url:N,isSidxRequest:!0,type:m,level:g,levelDetails:w,id:b,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}d.levelDetails=w,this.handlePlaylistLoaded(r,t,d,v)},l.handleSidxRequest=function(r,t){var d=Object(C.parseSegmentIndex)(new Uint8Array(r.data));if(!d)return;var v=d.references,y=t.levelDetails;v.forEach(function(b,g){var m=b.info,_=y.fragments[g];_.byteRange.length===0&&_.setByteRange(String(1+m.end-m.start)+"@"+String(m.start)),_.initSegment&&_.initSegment.setByteRange(String(d.moovEndOffset)+"@0")})},l.handleManifestParsingError=function(r,t,d,v){this.hls.trigger(D.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===p.PlaylistContextType.MANIFEST,url:r.url,reason:d,response:r,context:t,networkDetails:v})},l.handleNetworkError=function(r,t,d,v){d===void 0&&(d=!1),A.logger.warn("[playlist-loader]: A network "+(d?"timeout":"error")+" occurred while loading "+r.type+" level: "+r.level+" id: "+r.id+' group-id: "'+r.groupId+'"');var y=S.ErrorDetails.UNKNOWN,b=!1,g=this.getInternalLoader(r);switch(r.type){case p.PlaylistContextType.MANIFEST:y=d?S.ErrorDetails.MANIFEST_LOAD_TIMEOUT:S.ErrorDetails.MANIFEST_LOAD_ERROR,b=!0;break;case p.PlaylistContextType.LEVEL:y=d?S.ErrorDetails.LEVEL_LOAD_TIMEOUT:S.ErrorDetails.LEVEL_LOAD_ERROR,b=!1;break;case p.PlaylistContextType.AUDIO_TRACK:y=d?S.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,b=!1;break;case p.PlaylistContextType.SUBTITLE_TRACK:y=d?S.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:S.ErrorDetails.SUBTITLE_LOAD_ERROR,b=!1;break}g&&this.resetInternalLoader(r.type);var m={type:S.ErrorTypes.NETWORK_ERROR,details:y,fatal:b,url:r.url,loader:g,context:r,networkDetails:t};v&&(m.response=v),this.hls.trigger(D.Events.ERROR,m)},l.handlePlaylistLoaded=function(r,t,d,v){var y=d.type,b=d.level,g=d.id,m=d.groupId,_=d.loader,x=d.levelDetails,f=d.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(r,d,"invalid target duration",v);return}if(!_)return;x.live&&(_.getCacheAge&&(x.ageHeader=_.getCacheAge()||0),(!_.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(y){case p.PlaylistContextType.MANIFEST:case p.PlaylistContextType.LEVEL:this.hls.trigger(D.Events.LEVEL_LOADED,{details:x,level:b||0,id:g||0,stats:t,networkDetails:v,deliveryDirectives:f});break;case p.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(D.Events.AUDIO_TRACK_LOADED,{details:x,id:g||0,groupId:m||"",stats:t,networkDetails:v,deliveryDirectives:f});break;case p.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(D.Events.SUBTITLE_TRACK_LOADED,{details:x,id:g||0,groupId:m||"",stats:t,networkDetails:v,deliveryDirectives:f});break}},i}();ee.default=o},"./src/polyfills/number.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"isFiniteNumber",function(){return O}),B.d(ee,"MAX_SAFE_INTEGER",function(){return D});var O=Number.isFinite||function(S){return typeof S=="number"&&isFinite(S)},D=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ae,ee,B){"use strict";B.r(ee);var O=function(){function D(){}return D.getSilentFrame=function(A,C){switch(A){case"mp4a.40.2":if(C===1)return new Uint8Array([0,200,0,128,35,128]);if(C===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(C===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(C===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(C===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(C===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(C===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(C===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(C===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},D}();ee.default=O},"./src/remux/mp4-generator.ts":function(ae,ee,B){"use strict";B.r(ee);var O=Math.pow(2,32)-1,D=function(){function S(){}return S.init=function(){S.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 C;for(C in S.types)S.types.hasOwnProperty(C)&&(S.types[C]=[C.charCodeAt(0),C.charCodeAt(1),C.charCodeAt(2),C.charCodeAt(3)]);var h=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),p=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);S.HDLR_TYPES={video:h,audio:p};var c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),s=new Uint8Array([0,0,0,0,0,0,0,0]);S.STTS=S.STSC=S.STCO=s,S.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),S.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),S.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),S.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var n=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]);S.FTYP=S.box(S.types.ftyp,n,i,n,o),S.DINF=S.box(S.types.dinf,S.box(S.types.dref,c))},S.box=function(C){for(var h=8,p=arguments.length,c=new Array(p>1?p-1:0),s=1;s<p;s++)c[s-1]=arguments[s];for(var n=c.length,o=n;n--;)h+=c[n].byteLength;var i=new Uint8Array(h);for(i[0]=h>>24&255,i[1]=h>>16&255,i[2]=h>>8&255,i[3]=h&255,i.set(C,4),n=0,h=8;n<o;n++)i.set(c[n],h),h+=c[n].byteLength;return i},S.hdlr=function(C){return S.box(S.types.hdlr,S.HDLR_TYPES[C])},S.mdat=function(C){return S.box(S.types.mdat,C)},S.mdhd=function(C,h){h*=C;var p=Math.floor(h/(O+1)),c=Math.floor(h%(O+1));return S.box(S.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,C>>24&255,C>>16&255,C>>8&255,C&255,p>>24,p>>16&255,p>>8&255,p&255,c>>24,c>>16&255,c>>8&255,c&255,85,196,0,0]))},S.mdia=function(C){return S.box(S.types.mdia,S.mdhd(C.timescale,C.duration),S.hdlr(C.type),S.minf(C))},S.mfhd=function(C){return S.box(S.types.mfhd,new Uint8Array([0,0,0,0,C>>24,C>>16&255,C>>8&255,C&255]))},S.minf=function(C){return C.type==="audio"?S.box(S.types.minf,S.box(S.types.smhd,S.SMHD),S.DINF,S.stbl(C)):S.box(S.types.minf,S.box(S.types.vmhd,S.VMHD),S.DINF,S.stbl(C))},S.moof=function(C,h,p){return S.box(S.types.moof,S.mfhd(C),S.traf(p,h))},S.moov=function(C){for(var h=C.length,p=[];h--;)p[h]=S.trak(C[h]);return S.box.apply(null,[S.types.moov,S.mvhd(C[0].timescale,C[0].duration)].concat(p).concat(S.mvex(C)))},S.mvex=function(C){for(var h=C.length,p=[];h--;)p[h]=S.trex(C[h]);return S.box.apply(null,[S.types.mvex].concat(p))},S.mvhd=function(C,h){h*=C;var p=Math.floor(h/(O+1)),c=Math.floor(h%(O+1)),s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,C>>24&255,C>>16&255,C>>8&255,C&255,p>>24,p>>16&255,p>>8&255,p&255,c>>24,c>>16&255,c>>8&255,c&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 S.box(S.types.mvhd,s)},S.sdtp=function(C){var h=C.samples||[],p=new Uint8Array(4+h.length),c,s;for(c=0;c<h.length;c++)s=h[c].flags,p[c+4]=s.dependsOn<<4|s.isDependedOn<<2|s.hasRedundancy;return S.box(S.types.sdtp,p)},S.stbl=function(C){return S.box(S.types.stbl,S.stsd(C),S.box(S.types.stts,S.STTS),S.box(S.types.stsc,S.STSC),S.box(S.types.stsz,S.STSZ),S.box(S.types.stco,S.STCO))},S.avc1=function(C){var h=[],p=[],c,s,n;for(c=0;c<C.sps.length;c++)s=C.sps[c],n=s.byteLength,h.push(n>>>8&255),h.push(n&255),h=h.concat(Array.prototype.slice.call(s));for(c=0;c<C.pps.length;c++)s=C.pps[c],n=s.byteLength,p.push(n>>>8&255),p.push(n&255),p=p.concat(Array.prototype.slice.call(s));var o=S.box(S.types.avcC,new Uint8Array([1,h[3],h[4],h[5],252|3,224|C.sps.length].concat(h).concat([C.pps.length]).concat(p))),i=C.width,l=C.height,a=C.pixelRatio[0],r=C.pixelRatio[1];return S.box(S.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,i>>8&255,i&255,l>>8&255,l&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]),o,S.box(S.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),S.box(S.types.pasp,new Uint8Array([a>>24,a>>16&255,a>>8&255,a&255,r>>24,r>>16&255,r>>8&255,r&255])))},S.esds=function(C){var h=C.config.length;return new Uint8Array([0,0,0,0,3,23+h,0,1,0,4,15+h,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([h]).concat(C.config).concat([6,1,2]))},S.mp4a=function(C){var h=C.samplerate;return S.box(S.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,C.channelCount,0,16,0,0,0,0,h>>8&255,h&255,0,0]),S.box(S.types.esds,S.esds(C)))},S.mp3=function(C){var h=C.samplerate;return S.box(S.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,C.channelCount,0,16,0,0,0,0,h>>8&255,h&255,0,0]))},S.stsd=function(C){return C.type==="audio"?!C.isAAC&&C.codec==="mp3"?S.box(S.types.stsd,S.STSD,S.mp3(C)):S.box(S.types.stsd,S.STSD,S.mp4a(C)):S.box(S.types.stsd,S.STSD,S.avc1(C))},S.tkhd=function(C){var h=C.id,p=C.duration*C.timescale,c=C.width,s=C.height,n=Math.floor(p/(O+1)),o=Math.floor(p%(O+1));return S.box(S.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,h>>24&255,h>>16&255,h>>8&255,h&255,0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255,o>>24,o>>16&255,o>>8&255,o&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,c>>8&255,c&255,0,0,s>>8&255,s&255,0,0]))},S.traf=function(C,h){var p=S.sdtp(C),c=C.id,s=Math.floor(h/(O+1)),n=Math.floor(h%(O+1));return S.box(S.types.traf,S.box(S.types.tfhd,new Uint8Array([0,0,0,0,c>>24,c>>16&255,c>>8&255,c&255])),S.box(S.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,n>>24,n>>16&255,n>>8&255,n&255])),S.trun(C,p.length+16+20+8+16+8+8),p)},S.trak=function(C){return C.duration=C.duration||4294967295,S.box(S.types.trak,S.tkhd(C),S.mdia(C))},S.trex=function(C){var h=C.id;return S.box(S.types.trex,new Uint8Array([0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},S.trun=function(C,h){var p=C.samples||[],c=p.length,s=12+16*c,n=new Uint8Array(s),o,i,l,a,r,t;for(h+=8+s,n.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,c&255,h>>>24&255,h>>>16&255,h>>>8&255,h&255],0),o=0;o<c;o++)i=p[o],l=i.duration,a=i.size,r=i.flags,t=i.cts,n.set([l>>>24&255,l>>>16&255,l>>>8&255,l&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255,r.isLeading<<2|r.dependsOn,r.isDependedOn<<6|r.hasRedundancy<<4|r.paddingValue<<1|r.isNonSync,r.degradPrio&240<<8,r.degradPrio&15,t>>>24&255,t>>>16&255,t>>>8&255,t&255],12+16*o);return S.box(S.types.trun,n)},S.initSegment=function(C){S.types||S.init();var h=S.moov(C),p=new Uint8Array(S.FTYP.byteLength+h.byteLength);return p.set(S.FTYP),p.set(h,S.FTYP.byteLength),p},S}();D.types=void 0,D.HDLR_TYPES=void 0,D.STTS=void 0,D.STSC=void 0,D.STCO=void 0,D.STSZ=void 0,D.VMHD=void 0,D.SMHD=void 0,D.STSD=void 0,D.FTYP=void 0,D.DINF=void 0,ee.default=D},"./src/remux/mp4-remuxer.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return t}),B.d(ee,"normalizePts",function(){return d});var O=B("./src/polyfills/number.ts"),D=B("./src/remux/aac-helper.ts"),S=B("./src/remux/mp4-generator.ts"),A=B("./src/events.ts"),C=B("./src/errors.ts"),h=B("./src/utils/logger.ts"),p=B("./src/types/loader.ts"),c=B("./src/utils/timescale-conversion.ts");function s(){return s=Object.assign||function(g){for(var m=1;m<arguments.length;m++){var _=arguments[m];for(var x in _)Object.prototype.hasOwnProperty.call(_,x)&&(g[x]=_[x])}return g},s.apply(this,arguments)}var n=10*1e3,o=1024,i=1152,l=null,a=null,r=!1,t=function(){function g(_,x,f,E){if(E===void 0&&(E=""),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=_,this.config=x,this.typeSupported=f,this.ISGenerated=!1,l===null){var w=navigator.userAgent||"",T=w.match(/Chrome\/(\d+)/i);l=T?parseInt(T[1]):0}if(a===null){var R=navigator.userAgent.match(/Safari\/(\d+)/i);a=R?parseInt(R[1]):0}r=!!l&&l<75||!!a&&a<600}var m=g.prototype;return m.destroy=function(){},m.resetTimeStamp=function(x){h.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=x},m.resetNextTimestamp=function(){h.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},m.resetInitSegment=function(){h.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},m.getVideoStartPts=function(x){var f=!1,E=x.reduce(function(w,T){var R=T.pts-w;return R<-4294967296?(f=!0,d(w,T.pts)):R>0?w:T.pts},x[0].pts);return f&&h.logger.debug("PTS rollover detected"),E},m.remux=function(x,f,E,w,T,R,N,j){var W,J,F,k,K,Y,H=T,Q=T,re=x.pid>-1,oe=f.pid>-1,me=f.samples.length,he=x.samples.length>0,Ee=me>1,de=(!re||he)&&(!oe||Ee)||this.ISGenerated||N;if(de){this.ISGenerated||(F=this.generateIS(x,f,T));var be=this.isVideoContiguous,Ue=-1;if(Ee&&(Ue=v(f.samples),!be&&this.config.forceKeyFrameOnDiscontinuity))if(Y=!0,Ue>0){h.logger.warn("[mp4-remuxer]: Dropped "+Ue+" out of "+me+" video samples due to a missing keyframe");var Re=this.getVideoStartPts(f.samples);f.samples=f.samples.slice(Ue),f.dropped+=Ue,Q+=(f.samples[0].pts-Re)/(f.timescale||9e4)}else Ue===-1&&(h.logger.warn("[mp4-remuxer]: No keyframe found out of "+me+" video samples"),Y=!1);if(this.ISGenerated){if(he&&Ee){var De=this.getVideoStartPts(f.samples),je=d(x.samples[0].pts,De)-De,ve=je/f.inputTimeScale;H+=Math.max(0,ve),Q+=Math.max(0,-ve)}if(he){if(x.samplerate||(h.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),F=this.generateIS(x,f,T)),J=this.remuxAudio(x,H,this.isAudioContiguous,R,oe||Ee||j===p.PlaylistLevelType.AUDIO?Q:void 0),Ee){var ce=J?J.endPTS-J.startPTS:0;f.inputTimeScale||(h.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),F=this.generateIS(x,f,T)),W=this.remuxVideo(f,Q,be,ce)}}else Ee&&(W=this.remuxVideo(f,Q,be,0));W&&(W.firstKeyFrame=Ue,W.independent=Ue!==-1)}}return this.ISGenerated&&(E.samples.length&&(K=this.remuxID3(E,T)),w.samples.length&&(k=this.remuxText(w,T))),{audio:J,video:W,initSegment:F,independent:Y,text:k,id3:K}},m.generateIS=function(x,f,E){var w=x.samples,T=f.samples,R=this.typeSupported,N={},j=!Object(O.isFiniteNumber)(this._initPTS),W="audio/mp4",J,F,k;if(j&&(J=F=Infinity),x.config&&w.length&&(x.timescale=x.samplerate,x.isAAC||(R.mpeg?(W="audio/mpeg",x.codec=""):R.mp3&&(x.codec="mp3")),N.audio={id:"audio",container:W,codec:x.codec,initSegment:!x.isAAC&&R.mpeg?new Uint8Array(0):S.default.initSegment([x]),metadata:{channelCount:x.channelCount}},j&&(k=x.inputTimeScale,J=F=w[0].pts-Math.round(k*E))),f.sps&&f.pps&&T.length&&(f.timescale=f.inputTimeScale,N.video={id:"main",container:"video/mp4",codec:f.codec,initSegment:S.default.initSegment([f]),metadata:{width:f.width,height:f.height}},j)){k=f.inputTimeScale;var K=this.getVideoStartPts(T),Y=Math.round(k*E);F=Math.min(F,d(T[0].dts,K)-Y),J=Math.min(J,K-Y)}if(Object.keys(N).length)return this.ISGenerated=!0,j&&(this._initPTS=J,this._initDTS=F),{tracks:N,initPTS:J,timescale:k}},m.remuxVideo=function(x,f,E,w){var T=x.inputTimeScale,R=x.samples,N=[],j=R.length,W=this._initPTS,J=this.nextAvcDts,F=8,k,K,Y,H=Number.POSITIVE_INFINITY,Q=Number.NEGATIVE_INFINITY,re=0,oe=!1;if(!E||J===null){var me=f*T,he=R[0].pts-d(R[0].dts,R[0].pts);J=me-he}for(var Ee=0;Ee<j;Ee++){var de=R[Ee];if(de.pts=d(de.pts-W,J),de.dts=d(de.dts-W,J),de.dts>de.pts){var be=9e4*.2;re=Math.max(Math.min(re,de.pts-de.dts),-1*be)}de.dts<R[Ee>0?Ee-1:Ee].dts&&(oe=!0)}oe&&R.sort(function(Ct,st){var ut=Ct.dts-st.dts,$e=Ct.pts-st.pts;return ut||$e}),K=R[0].dts,Y=R[R.length-1].dts;var Ue=Math.round((Y-K)/(j-1));if(re<0){if(re<Ue*-2){h.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(c.toMsFromMpegTsClock)(-Ue,!0)+" ms");for(var Re=re,De=0;De<j;De++)R[De].dts=Re=Math.max(Re,R[De].pts-Ue),R[De].pts=Math.max(Re,R[De].pts)}else{h.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(c.toMsFromMpegTsClock)(re,!0)+" ms to overcome this issue");for(var je=0;je<j;je++)R[je].dts=R[je].dts+re}K=R[0].dts}if(E){var ve=K-J,ce=ve>Ue,ke=ve<-1;if(ce||ke){ce?h.logger.warn("AVC: "+Object(c.toMsFromMpegTsClock)(ve,!0)+" ms ("+ve+"dts) hole between fragments detected, filling it"):h.logger.warn("AVC: "+Object(c.toMsFromMpegTsClock)(-ve,!0)+" ms ("+ve+"dts) overlapping between fragments detected"),K=J;var Ne=R[0].pts-ve;R[0].dts=K,R[0].pts=Ne,h.logger.log("Video: First PTS/DTS adjusted: "+Object(c.toMsFromMpegTsClock)(Ne,!0)+"/"+Object(c.toMsFromMpegTsClock)(K,!0)+", delta: "+Object(c.toMsFromMpegTsClock)(ve,!0)+" ms")}}r&&(K=Math.max(0,K));for(var Je=0,te=0,P=0;P<j;P++){for(var U=R[P],q=U.units,X=q.length,$=0,ge=0;ge<X;ge++)$+=q[ge].data.length;te+=$,Je+=X,U.length=$,U.dts=Math.max(U.dts,K),U.pts=Math.max(U.pts,U.dts,0),H=Math.min(U.pts,H),Q=Math.max(U.pts,Q)}Y=R[j-1].dts;var Ae=te+4*Je+8,at;try{at=new Uint8Array(Ae)}catch(Ct){this.observer.emit(A.Events.ERROR,A.Events.ERROR,{type:C.ErrorTypes.MUX_ERROR,details:C.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ae,reason:"fail allocating video mdat "+Ae});return}var Le=new DataView(at.buffer);Le.setUint32(0,Ae),at.set(S.default.types.mdat,4);for(var Me=0;Me<j;Me++){for(var Xe=R[Me],et=Xe.units,ze=0,Ke=0,Pe=et.length;Ke<Pe;Ke++){var Ie=et[Ke],Ce=Ie.data,pe=Ie.data.byteLength;Le.setUint32(F,pe),F+=4,at.set(Ce,F),F+=pe,ze+=4+pe}if(Me<j-1)k=R[Me+1].dts-Xe.dts;else{var _e=this.config,Oe=Xe.dts-R[Me>0?Me-1:Me].dts;if(_e.stretchShortVideoTrack&&this.nextAudioPts!==null){var we=Math.floor(_e.maxBufferHole*T),Be=(w?H+w*T:this.nextAudioPts)-Xe.pts;Be>we?(k=Be-Oe,k<0&&(k=Oe),h.logger.log("[mp4-remuxer]: It is approximately "+Be/90+" ms to the next segment; using duration "+k/90+" ms for the last video frame.")):k=Oe}else k=Oe}var qe=Math.round(Xe.pts-Xe.dts);N.push(new y(Xe.key,k,ze,qe))}if(N.length&&l&&l<70){var dt=N[0].flags;dt.dependsOn=2,dt.isNonSync=0}console.assert(k!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=J=Y+k,this.isVideoContiguous=!0;var Et=S.default.moof(x.sequenceNumber++,K,s({},x,{samples:N})),It="video",Rt={data1:Et,data2:at,startPTS:H/T,endPTS:(Q+k)/T,startDTS:K/T,endDTS:J/T,type:It,hasAudio:!1,hasVideo:!0,nb:N.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(at.length,"MDAT length must not be zero"),Rt},m.remuxAudio=function(x,f,E,w,T){var R=x.inputTimeScale,N=x.samplerate?x.samplerate:R,j=R/N,W=x.isAAC?o:i,J=W*j,F=this._initPTS,k=!x.isAAC&&this.typeSupported.mpeg,K=[],Y=x.samples,H=k?0:8,Q=this.nextAudioPts||-1,re=f*R;if(this.isAudioContiguous=E=E||Y.length&&Q>0&&(w&&Math.abs(re-Q)<9e3||Math.abs(d(Y[0].pts-F,re)-Q)<20*J),Y.forEach(function(Ce){Ce.pts=d(Ce.pts-F,re)}),!E||Q<0){if(Y=Y.filter(function(Ce){return Ce.pts>=0}),!Y.length)return;T===0?Q=0:w?Q=Math.max(0,re):Q=Y[0].pts}if(x.isAAC)for(var oe=T!==void 0,me=this.config.maxAudioFramesDrift,he=0,Ee=Q;he<Y.length;he++){var de=Y[he],be=de.pts,Ue=be-Ee,Re=Math.abs(1e3*Ue/R);if(Ue<=-me*J&&oe)he===0&&(h.logger.warn("Audio frame @ "+(be/R).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Ue/R)+" ms."),this.nextAudioPts=Q=Ee=be);else if(Ue>=me*J&&Re<n&&oe){var De=Math.round(Ue/J);Ee=be-De*J,Ee<0&&(De--,Ee+=J),he===0&&(this.nextAudioPts=Q=Ee),h.logger.warn("[mp4-remuxer]: Injecting "+De+" audio frame @ "+(Ee/R).toFixed(3)+"s due to "+Math.round(1e3*Ue/R)+" ms gap.");for(var je=0;je<De;je++){var ve=Math.max(Ee,0),ce=D.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);ce||(h.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ce=de.unit.subarray()),Y.splice(he,0,{unit:ce,pts:ve}),Ee+=J,he++}}de.pts=Ee,Ee+=J}for(var ke=null,Ne=null,Je,te=0,P=Y.length;P--;)te+=Y[P].unit.byteLength;for(var U=0,q=Y.length;U<q;U++){var X=Y[U],$=X.unit,ge=X.pts;if(Ne!==null){var Ae=K[U-1];Ae.duration=Math.round((ge-Ne)/j)}else if(E&&x.isAAC&&(ge=Q),ke=ge,te>0){te+=H;try{Je=new Uint8Array(te)}catch(Ce){this.observer.emit(A.Events.ERROR,A.Events.ERROR,{type:C.ErrorTypes.MUX_ERROR,details:C.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:te,reason:"fail allocating audio mdat "+te});return}if(!k){var at=new DataView(Je.buffer);at.setUint32(0,te),Je.set(S.default.types.mdat,4)}}else return;Je.set($,H);var Le=$.byteLength;H+=Le,K.push(new y(!0,W,Le,0)),Ne=ge}var Me=K.length;if(!Me)return;var Xe=K[K.length-1];this.nextAudioPts=Q=Ne+j*Xe.duration;var et=k?new Uint8Array(0):S.default.moof(x.sequenceNumber++,ke/j,s({},x,{samples:K}));x.samples=[];var ze=ke/R,Ke=Q/R,Pe="audio",Ie={data1:et,data2:Je,startPTS:ze,endPTS:Ke,startDTS:ze,endDTS:Ke,type:Pe,hasAudio:!0,hasVideo:!1,nb:Me};return this.isAudioContiguous=!0,console.assert(Je.length,"MDAT length must not be zero"),Ie},m.remuxEmptyAudio=function(x,f,E,w){var T=x.inputTimeScale,R=x.samplerate?x.samplerate:T,N=T/R,j=this.nextAudioPts,W=(j!==null?j:w.startDTS*T)+this._initDTS,J=w.endDTS*T+this._initDTS,F=N*o,k=Math.ceil((J-W)/F),K=D.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(h.logger.warn("[mp4-remuxer]: remux empty Audio"),!K){h.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Y=[],H=0;H<k;H++){var Q=W+H*F;Y.push({unit:K,pts:Q,dts:Q})}return x.samples=Y,this.remuxAudio(x,f,E,!1)},m.remuxID3=function(x,f){var E=x.samples.length;if(!E)return;for(var w=x.inputTimeScale,T=this._initPTS,R=this._initDTS,N=0;N<E;N++){var j=x.samples[N];j.pts=d(j.pts-T,f*w)/w,j.dts=d(j.dts-R,f*w)/w}var W=x.samples;return x.samples=[],{samples:W}},m.remuxText=function(x,f){var E=x.samples.length;if(!E)return;for(var w=x.inputTimeScale,T=this._initPTS,R=0;R<E;R++){var N=x.samples[R];N.pts=d(N.pts-T,f*w)/w}x.samples.sort(function(W,J){return W.pts-J.pts});var j=x.samples;return x.samples=[],{samples:j}},g}();function d(g,m){var _;if(m===null)return g;for(m<g?_=-8589934592:_=8589934592;Math.abs(g-m)>4294967296;)g+=_;return g}function v(g){for(var m=0;m<g.length;m++)if(g[m].key)return m;return-1}var y=function(m,_,x,f){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=_,this.size=x,this.cts=f,this.flags=new b(m)},b=function(m){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=m?2:1,this.isNonSync=m?0:1}},"./src/remux/passthrough-remuxer.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/polyfills/number.ts"),D=B("./src/utils/mp4-tools.ts"),S=B("./src/loader/fragment.ts"),A=B("./src/utils/logger.ts"),C=function(){function c(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var s=c.prototype;return s.destroy=function(){},s.resetTimeStamp=function(o){this.initPTS=o,this.lastEndDTS=null},s.resetNextTimestamp=function(){this.lastEndDTS=null},s.resetInitSegment=function(o,i,l){this.audioCodec=i,this.videoCodec=l,this.generateInitSegment(o),this.emitInitSegment=!0},s.generateInitSegment=function(o){var i=this.audioCodec,l=this.videoCodec;if(!o||!o.byteLength){this.initTracks=void 0,this.initData=void 0;return}var a=this.initData=Object(D.parseInitSegment)(o);i||(i=p(a.audio,S.ElementaryStreamTypes.AUDIO)),l||(l=p(a.video,S.ElementaryStreamTypes.VIDEO));var r={};a.audio&&a.video?r.audiovideo={container:"video/mp4",codec:i+","+l,initSegment:o,id:"main"}:a.audio?r.audio={container:"audio/mp4",codec:i,initSegment:o,id:"audio"}:a.video?r.video={container:"video/mp4",codec:l,initSegment:o,id:"main"}:A.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=r},s.remux=function(o,i,l,a,r){var t=this.initPTS,d=this.lastEndDTS,v={audio:void 0,video:void 0,text:a,id3:l,initSegment:void 0};Object(O.isFiniteNumber)(d)||(d=this.lastEndDTS=r||0);var y=i.samples;if(!y||!y.length)return v;var b={initPTS:void 0,timescale:1},g=this.initData;if((!g||!g.length)&&(this.generateInitSegment(y),g=this.initData),!g||!g.length)return A.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),v;this.emitInitSegment&&(b.tracks=this.initTracks,this.emitInitSegment=!1),Object(O.isFiniteNumber)(t)||(this.initPTS=b.initPTS=t=h(g,y,d));var m=Object(D.getDuration)(y,g),_=d,x=m+_;Object(D.offsetStartDTS)(g,y,t),m>0?this.lastEndDTS=x:(A.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var f=!!g.audio,E=!!g.video,w="";f&&(w+="audio"),E&&(w+="video");var T={data1:y,startPTS:_,startDTS:_,endPTS:x,endDTS:x,type:w,hasAudio:f,hasVideo:E,nb:1,dropped:0};return v.audio=T.type==="audio"?T:void 0,v.video=T.type!=="audio"?T:void 0,v.text=a,v.id3=l,v.initSegment=b,v},c}(),h=function(s,n,o){return Object(D.getStartDTS)(s,n)-o};function p(c,s){var n=c==null?void 0:c.codec;return n&&n.length>4?n:n==="hvc1"?"hvc1.1.c.L120.90":n==="av01"?"av01.0.04M.08":n==="avc1"||s===S.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}ee.default=C},"./src/task-loop.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return O});var O=function(){function D(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var S=D.prototype;return S.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},S.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},S.onHandlerDestroyed=function(){},S.hasInterval=function(){return!!this._tickInterval},S.hasNextTick=function(){return!!this._tickTimer},S.setInterval=function(C){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,C),!0)},S.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},S.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},S.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},S.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},S.doTick=function(){},D}()},"./src/types/cmcd.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"CMCDVersion",function(){return O}),B.d(ee,"CMCDObjectType",function(){return D}),B.d(ee,"CMCDStreamingFormat",function(){return S}),B.d(ee,"CMCDStreamType",function(){return A});var O=1,D;(function(C){C.MANIFEST="m",C.AUDIO="a",C.VIDEO="v",C.MUXED="av",C.INIT="i",C.CAPTION="c",C.TIMED_TEXT="tt",C.KEY="k",C.OTHER="o"})(D||(D={}));var S;(function(C){C.DASH="d",C.HLS="h",C.SMOOTH="s",C.OTHER="o"})(S||(S={}));var A;(function(C){C.VOD="v",C.LIVE="l"})(A||(A={}))},"./src/types/level.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"HlsSkip",function(){return S}),B.d(ee,"getSkipValue",function(){return A}),B.d(ee,"HlsUrlParameters",function(){return C}),B.d(ee,"Level",function(){return h});function O(p,c){for(var s=0;s<c.length;s++){var n=c[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}function D(p,c,s){return c&&O(p.prototype,c),s&&O(p,s),p}var S;(function(p){p.No="",p.Yes="YES",p.v2="v2"})(S||(S={}));function A(p,c){var s=p.canSkipUntil,n=p.canSkipDateRanges,o=p.endSN,i=c!==void 0?c-o:0;return s&&i<s?n?S.v2:S.Yes:S.No}var C=function(){function p(s,n,o){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=s,this.part=n,this.skip=o}var c=p.prototype;return c.addDirectives=function(n){var o=new self.URL(n);return this.msn!==void 0&&o.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&o.searchParams.set("_HLS_part",this.part.toString()),this.skip&&o.searchParams.set("_HLS_skip",this.skip),o.toString()},p}(),h=function(){function p(c){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=[c.url],this.attrs=c.attrs,this.bitrate=c.bitrate,c.details&&(this.details=c.details),this.id=c.id||0,this.name=c.name,this.width=c.width||0,this.height=c.height||0,this.audioCodec=c.audioCodec,this.videoCodec=c.videoCodec,this.unknownCodecs=c.unknownCodecs,this.codecSet=[c.videoCodec,c.audioCodec].filter(function(s){return s}).join(",").replace(/\.[^.,]+/g,"")}return D(p,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(s){var n=s%this.url.length;this._urlId!==n&&(this.details=void 0,this._urlId=n)}}]),p}()},"./src/types/loader.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"PlaylistContextType",function(){return O}),B.d(ee,"PlaylistLevelType",function(){return D});var O;(function(S){S.MANIFEST="manifest",S.LEVEL="level",S.AUDIO_TRACK="audioTrack",S.SUBTITLE_TRACK="subtitleTrack"})(O||(O={}));var D;(function(S){S.MAIN="main",S.AUDIO="audio",S.SUBTITLE="subtitle"})(D||(D={}))},"./src/types/transmuxer.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"ChunkMetadata",function(){return O});var O=function(A,C,h,p,c,s){p===void 0&&(p=0),c===void 0&&(c=-1),s===void 0&&(s=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=D(),this.buffering={audio:D(),video:D(),audiovideo:D()},this.level=A,this.sn=C,this.id=h,this.size=p,this.part=c,this.partial=s};function D(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"AttrList",function(){return S});var O=/^(\d+)x(\d+)$/,D=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,S=function(){function A(h){typeof h=="string"&&(h=A.parseAttrList(h));for(var p in h)h.hasOwnProperty(p)&&(this[p]=h[p])}var C=A.prototype;return C.decimalInteger=function(p){var c=parseInt(this[p],10);return c>Number.MAX_SAFE_INTEGER?Infinity:c},C.hexadecimalInteger=function(p){if(this[p]){var c=(this[p]||"0x").slice(2);c=(c.length&1?"0":"")+c;for(var s=new Uint8Array(c.length/2),n=0;n<c.length/2;n++)s[n]=parseInt(c.slice(n*2,n*2+2),16);return s}else return null},C.hexadecimalIntegerAsNumber=function(p){var c=parseInt(this[p],16);return c>Number.MAX_SAFE_INTEGER?Infinity:c},C.decimalFloatingPoint=function(p){return parseFloat(this[p])},C.optionalFloat=function(p,c){var s=this[p];return s?parseFloat(s):c},C.enumeratedString=function(p){return this[p]},C.bool=function(p){return this[p]==="YES"},C.decimalResolution=function(p){var c=O.exec(this[p]);return c===null?void 0:{width:parseInt(c[1],10),height:parseInt(c[2],10)}},A.parseAttrList=function(p){var c,s={},n='"';for(D.lastIndex=0;(c=D.exec(p))!==null;){var o=c[2];o.indexOf(n)===0&&o.lastIndexOf(n)===o.length-1&&(o=o.slice(1,-1)),s[c[1]]=o}return s},A}()},"./src/utils/binary-search.ts":function(ae,ee,B){"use strict";B.r(ee);var O={search:function(S,A){for(var C=0,h=S.length-1,p=null,c=null;C<=h;){p=(C+h)/2|0,c=S[p];var s=A(c);if(s>0)C=p+1;else if(s<0)h=p-1;else return c}return null}};ee.default=O},"./src/utils/buffer-helper.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"BufferHelper",function(){return S});var O=B("./src/utils/logger.ts"),D={length:0,start:function(){return 0},end:function(){return 0}},S=function(){function A(){}return A.isBuffered=function(h,p){try{if(h){for(var c=A.getBuffered(h),s=0;s<c.length;s++)if(p>=c.start(s)&&p<=c.end(s))return!0}}catch(n){}return!1},A.bufferInfo=function(h,p,c){try{if(h){var s=A.getBuffered(h),n=[],o;for(o=0;o<s.length;o++)n.push({start:s.start(o),end:s.end(o)});return this.bufferedInfo(n,p,c)}}catch(i){}return{len:0,start:p,end:p,nextStart:void 0}},A.bufferedInfo=function(h,p,c){p=Math.max(0,p),h.sort(function(b,g){var m=b.start-g.start;return m||g.end-b.end});var s=[];if(c)for(var n=0;n<h.length;n++){var o=s.length;if(o){var i=s[o-1].end;h[n].start-i<c?h[n].end>i&&(s[o-1].end=h[n].end):s.push(h[n])}else s.push(h[n])}else s=h;for(var l=0,a,r=p,t=p,d=0;d<s.length;d++){var v=s[d].start,y=s[d].end;if(p+c>=v&&p<y)r=v,t=y,l=t-p;else if(p+c<v){a=v;break}}return{len:l,start:r||0,end:t||0,nextStart:a}},A.getBuffered=function(h){try{return h.buffered}catch(p){return O.logger.log("failed to get media.buffered",p),D}},A}()},"./src/utils/cea-608-parser.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"Row",function(){return t}),B.d(ee,"CaptionScreen",function(){return d});var O=B("./src/utils/logger.ts"),D={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},S=function(x){var f=x;return D.hasOwnProperty(x)&&(f=D[x]),String.fromCharCode(f)},A=15,C=100,h={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},p={17:2,18:4,21:6,22:8,23:10,19:13,20:15},c={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},s={25:2,26:4,29:6,30:8,31:10,27:13,28:15},n=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],o;(function(_){_[_.ERROR=0]="ERROR",_[_.TEXT=1]="TEXT",_[_.WARNING=2]="WARNING",_[_.INFO=2]="INFO",_[_.DEBUG=3]="DEBUG",_[_.DATA=3]="DATA"})(o||(o={}));var i=function(){function _(){this.time=null,this.verboseLevel=o.ERROR}var x=_.prototype;return x.log=function(E,w){this.verboseLevel>=E&&O.logger.log(this.time+" ["+E+"] "+w)},_}(),l=function(x){for(var f=[],E=0;E<x.length;E++)f.push(x[E].toString(16));return f},a=function(){function _(f,E,w,T,R){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=f||"white",this.underline=E||!1,this.italics=w||!1,this.background=T||"black",this.flash=R||!1}var x=_.prototype;return x.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},x.setStyles=function(E){for(var w=["foreground","underline","italics","background","flash"],T=0;T<w.length;T++){var R=w[T];E.hasOwnProperty(R)&&(this[R]=E[R])}},x.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},x.equals=function(E){return this.foreground===E.foreground&&this.underline===E.underline&&this.italics===E.italics&&this.background===E.background&&this.flash===E.flash},x.copy=function(E){this.foreground=E.foreground,this.underline=E.underline,this.italics=E.italics,this.background=E.background,this.flash=E.flash},x.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},_}(),r=function(){function _(f,E,w,T,R,N){this.uchar=void 0,this.penState=void 0,this.uchar=f||" ",this.penState=new a(E,w,T,R,N)}var x=_.prototype;return x.reset=function(){this.uchar=" ",this.penState.reset()},x.setChar=function(E,w){this.uchar=E,this.penState.copy(w)},x.setPenState=function(E){this.penState.copy(E)},x.equals=function(E){return this.uchar===E.uchar&&this.penState.equals(E.penState)},x.copy=function(E){this.uchar=E.uchar,this.penState.copy(E.penState)},x.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},_}(),t=function(){function _(f){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var E=0;E<C;E++)this.chars.push(new r);this.logger=f,this.pos=0,this.currPenState=new a}var x=_.prototype;return x.equals=function(E){for(var w=!0,T=0;T<C;T++)if(!this.chars[T].equals(E.chars[T])){w=!1;break}return w},x.copy=function(E){for(var w=0;w<C;w++)this.chars[w].copy(E.chars[w])},x.isEmpty=function(){for(var E=!0,w=0;w<C;w++)if(!this.chars[w].isEmpty()){E=!1;break}return E},x.setCursor=function(E){this.pos!==E&&(this.pos=E),this.pos<0?(this.logger.log(o.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>C&&(this.logger.log(o.DEBUG,"Too large cursor position "+this.pos),this.pos=C)},x.moveCursor=function(E){var w=this.pos+E;if(E>1)for(var T=this.pos+1;T<w+1;T++)this.chars[T].setPenState(this.currPenState);this.setCursor(w)},x.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},x.insertChar=function(E){E>=144&&this.backSpace();var w=S(E);if(this.pos>=C){this.logger.log(o.ERROR,"Cannot insert "+E.toString(16)+" ("+w+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(w,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(E){var w;for(w=E;w<C;w++)this.chars[w].reset()},x.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},x.clearToEndOfRow=function(){this.clearFromPos(this.pos)},x.getTextString=function(){for(var E=[],w=!0,T=0;T<C;T++){var R=this.chars[T].uchar;R!==" "&&(w=!1),E.push(R)}return w?"":E.join("")},x.setPenStyles=function(E){this.currPenState.setStyles(E);var w=this.chars[this.pos];w.setPenState(this.currPenState)},_}(),d=function(){function _(f){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var E=0;E<A;E++)this.rows.push(new t(f));this.logger=f,this.currRow=A-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var x=_.prototype;return x.reset=function(){for(var E=0;E<A;E++)this.rows[E].clear();this.currRow=A-1},x.equals=function(E){for(var w=!0,T=0;T<A;T++)if(!this.rows[T].equals(E.rows[T])){w=!1;break}return w},x.copy=function(E){for(var w=0;w<A;w++)this.rows[w].copy(E.rows[w])},x.isEmpty=function(){for(var E=!0,w=0;w<A;w++)if(!this.rows[w].isEmpty()){E=!1;break}return E},x.backSpace=function(){var E=this.rows[this.currRow];E.backSpace()},x.clearToEndOfRow=function(){var E=this.rows[this.currRow];E.clearToEndOfRow()},x.insertChar=function(E){var w=this.rows[this.currRow];w.insertChar(E)},x.setPen=function(E){var w=this.rows[this.currRow];w.setPenStyles(E)},x.moveCursor=function(E){var w=this.rows[this.currRow];w.moveCursor(E)},x.setCursor=function(E){this.logger.log(o.INFO,"setCursor: "+E);var w=this.rows[this.currRow];w.setCursor(E)},x.setPAC=function(E){this.logger.log(o.INFO,"pacData = "+JSON.stringify(E));var w=E.row-1;if(this.nrRollUpRows&&w<this.nrRollUpRows-1&&(w=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==w){for(var T=0;T<A;T++)this.rows[T].clear();var R=this.currRow+1-this.nrRollUpRows,N=this.lastOutputScreen;if(N){var j=N.rows[R].cueStartTime,W=this.logger.time;if(j&&W!==null&&j<W)for(var J=0;J<this.nrRollUpRows;J++)this.rows[w-this.nrRollUpRows+J+1].copy(N.rows[R+J])}}this.currRow=w;var F=this.rows[this.currRow];if(E.indent!==null){var k=E.indent,K=Math.max(k-1,0);F.setCursor(E.indent),E.color=F.chars[K].penState.foreground}var Y={foreground:E.color,underline:E.underline,italics:E.italics,background:"black",flash:!1};this.setPen(Y)},x.setBkgData=function(E){this.logger.log(o.INFO,"bkgData = "+JSON.stringify(E)),this.backSpace(),this.setPen(E),this.insertChar(32)},x.setRollUpRows=function(E){this.nrRollUpRows=E},x.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(o.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(o.TEXT,this.getDisplayText());var E=this.currRow+1-this.nrRollUpRows,w=this.rows.splice(E,1)[0];w.clear(),this.rows.splice(this.currRow,0,w),this.logger.log(o.INFO,"Rolling up")},x.getDisplayText=function(E){E=E||!1;for(var w=[],T="",R=-1,N=0;N<A;N++){var j=this.rows[N].getTextString();j&&(R=N+1,E?w.push("Row "+R+": '"+j+"'"):w.push(j.trim()))}return w.length>0&&(E?T="["+w.join(" | ")+"]":T=w.join(`
|
|
|
`)),T},x.getTextAndFormat=function(){return this.rows},_}(),v=function(){function _(f,E,w){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=f,this.outputFilter=E,this.mode=null,this.verbose=0,this.displayedMemory=new d(w),this.nonDisplayedMemory=new d(w),this.lastOutputScreen=new d(w),this.currRollUpRow=this.displayedMemory.rows[A-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=w}var x=_.prototype;return x.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[A-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},x.getHandler=function(){return this.outputFilter},x.setHandler=function(E){this.outputFilter=E},x.setPAC=function(E){this.writeScreen.setPAC(E)},x.setBkgData=function(E){this.writeScreen.setBkgData(E)},x.setMode=function(E){if(E===this.mode)return;this.mode=E,this.logger.log(o.INFO,"MODE="+E),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=E},x.insertChars=function(E){for(var w=0;w<E.length;w++)this.writeScreen.insertChar(E[w]);var T=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(o.INFO,T+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(o.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},x.ccRCL=function(){this.logger.log(o.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},x.ccBS=function(){if(this.logger.log(o.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},x.ccAOF=function(){},x.ccAON=function(){},x.ccDER=function(){this.logger.log(o.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},x.ccRU=function(E){this.logger.log(o.INFO,"RU("+E+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(E)},x.ccFON=function(){this.logger.log(o.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},x.ccRDC=function(){this.logger.log(o.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},x.ccTR=function(){this.logger.log(o.INFO,"TR"),this.setMode("MODE_TEXT")},x.ccRTD=function(){this.logger.log(o.INFO,"RTD"),this.setMode("MODE_TEXT")},x.ccEDM=function(){this.logger.log(o.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},x.ccCR=function(){this.logger.log(o.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},x.ccENM=function(){this.logger.log(o.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},x.ccEOC=function(){if(this.logger.log(o.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var E=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=E,this.writeScreen=this.nonDisplayedMemory,this.logger.log(o.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},x.ccTO=function(E){this.logger.log(o.INFO,"TO("+E+") - Tab Offset"),this.writeScreen.moveCursor(E)},x.ccMIDROW=function(E){var w={flash:!1};if(w.underline=E%2===1,w.italics=E>=46,w.italics)w.foreground="white";else{var T=Math.floor(E/2)-16,R=["white","green","blue","cyan","red","yellow","magenta"];w.foreground=R[T]}this.logger.log(o.INFO,"MIDROW: "+JSON.stringify(w)),this.writeScreen.setPen(w)},x.outputDataUpdate=function(E){E===void 0&&(E=!1);var w=this.logger.time;if(w===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=w:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,w,this.lastOutputScreen),E&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:w),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(E){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,E,this.displayedMemory),this.cueStartTime=E))},_}(),y=function(){function _(f,E,w){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var T=new i;this.channels=[null,new v(f,E,T),new v(f+1,w,T)],this.cmdHistory=m(),this.logger=T}var x=_.prototype;return x.getHandler=function(E){return this.channels[E].getHandler()},x.setHandler=function(E,w){this.channels[E].setHandler(w)},x.addData=function(E,w){var T,R,N,j=!1;this.logger.time=E;for(var W=0;W<w.length;W+=2){if(R=w[W]&127,N=w[W+1]&127,R===0&&N===0)continue;if(this.logger.log(o.DATA,"["+l([w[W],w[W+1]])+"] -> ("+l([R,N])+")"),T=this.parseCmd(R,N),T||(T=this.parseMidrow(R,N)),T||(T=this.parsePAC(R,N)),T||(T=this.parseBackgroundAttributes(R,N)),!T&&(j=this.parseChars(R,N),j)){var J=this.currentChannel;if(J&&J>0){var F=this.channels[J];F.insertChars(j)}else this.logger.log(o.WARNING,"No channel found yet. TEXT-MODE?")}!T&&!j&&this.logger.log(o.WARNING,"Couldn't parse cleaned data "+l([R,N])+" orig: "+l([w[W],w[W+1]]))}},x.parseCmd=function(E,w){var T=this.cmdHistory,R=(E===20||E===28||E===21||E===29)&&w>=32&&w<=47,N=(E===23||E===31)&&w>=33&&w<=35;if(!(R||N))return!1;if(g(E,w,T))return b(null,null,T),this.logger.log(o.DEBUG,"Repeated command ("+l([E,w])+") is dropped"),!0;var j=E===20||E===21||E===23?1:2,W=this.channels[j];return E===20||E===21||E===28||E===29?w===32?W.ccRCL():w===33?W.ccBS():w===34?W.ccAOF():w===35?W.ccAON():w===36?W.ccDER():w===37?W.ccRU(2):w===38?W.ccRU(3):w===39?W.ccRU(4):w===40?W.ccFON():w===41?W.ccRDC():w===42?W.ccTR():w===43?W.ccRTD():w===44?W.ccEDM():w===45?W.ccCR():w===46?W.ccENM():w===47&&W.ccEOC():W.ccTO(w-32),b(E,w,T),this.currentChannel=j,!0},x.parseMidrow=function(E,w){var T=0;if((E===17||E===25)&&w>=32&&w<=47){if(E===17?T=1:T=2,T!==this.currentChannel)return this.logger.log(o.ERROR,"Mismatch channel in midrow parsing"),!1;var R=this.channels[T];return R?(R.ccMIDROW(w),this.logger.log(o.DEBUG,"MIDROW ("+l([E,w])+")"),!0):!1}return!1},x.parsePAC=function(E,w){var T,R=this.cmdHistory,N=(E>=17&&E<=23||E>=25&&E<=31)&&w>=64&&w<=127,j=(E===16||E===24)&&w>=64&&w<=95;if(!(N||j))return!1;if(g(E,w,R))return b(null,null,R),!0;var W=E<=23?1:2;w>=64&&w<=95?T=W===1?h[E]:c[E]:T=W===1?p[E]:s[E];var J=this.channels[W];return J?(J.setPAC(this.interpretPAC(T,w)),b(E,w,R),this.currentChannel=W,!0):!1},x.interpretPAC=function(E,w){var T,R={color:null,italics:!1,indent:null,underline:!1,row:E};return w>95?T=w-96:T=w-64,R.underline=(T&1)===1,T<=13?R.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(T/2)]:T<=15?(R.italics=!0,R.color="white"):R.indent=Math.floor((T-16)/2)*4,R},x.parseChars=function(E,w){var T,R=null,N=null;if(E>=25?(T=2,N=E-8):(T=1,N=E),N>=17&&N<=19){var j;N===17?j=w+80:N===18?j=w+112:j=w+144,this.logger.log(o.INFO,"Special char '"+S(j)+"' in channel "+T),R=[j]}else E>=32&&E<=127&&(R=w===0?[E]:[E,w]);if(R){var W=l(R);this.logger.log(o.DEBUG,"Char codes = "+W.join(",")),b(E,w,this.cmdHistory)}return R},x.parseBackgroundAttributes=function(E,w){var T=(E===16||E===24)&&w>=32&&w<=47,R=(E===23||E===31)&&w>=45&&w<=47;if(!(T||R))return!1;var N,j={};E===16||E===24?(N=Math.floor((w-32)/2),j.background=n[N],w%2===1&&(j.background=j.background+"_semi")):w===45?j.background="transparent":(j.foreground="black",w===47&&(j.underline=!0));var W=E<=23?1:2,J=this.channels[W];return J.setBkgData(j),b(E,w,this.cmdHistory),!0},x.reset=function(){for(var E=0;E<Object.keys(this.channels).length;E++){var w=this.channels[E];w&&w.reset()}this.cmdHistory=m()},x.cueSplitAtTime=function(E){for(var w=0;w<this.channels.length;w++){var T=this.channels[w];T&&T.cueSplitAtTime(E)}},_}();function b(_,x,f){f.a=_,f.b=x}function g(_,x,f){return f.a===_&&f.b===x}function m(){return{a:null,b:null}}ee.default=y},"./src/utils/codecs.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"isCodecType",function(){return D}),B.d(ee,"isCodecSupportedInMp4",function(){return S});var O={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 D(A,C){var h=O[C];return!!h&&h[A.slice(0,4)]===!0}function S(A,C){return MediaSource.isTypeSupported((C||"video")+'/mp4;codecs="'+A+'"')}},"./src/utils/cues.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/utils/vttparser.ts"),D=B("./src/utils/webvtt-parser.ts"),S=B("./src/utils/texttrack-utils.ts"),A=/\s/,C={newCue:function(p,c,s,n){for(var o=[],i,l,a,r,t,d=self.VTTCue||self.TextTrackCue,v=0;v<n.rows.length;v++)if(i=n.rows[v],a=!0,r=0,t="",!i.isEmpty()){for(var y=0;y<i.chars.length;y++)A.test(i.chars[y].uchar)&&a?r++:(t+=i.chars[y].uchar,a=!1);i.cueStartTime=c,c===s&&(s+=1e-4),r>=16?r--:r++;var b=Object(O.fixLineBreaks)(t.trim()),g=Object(D.generateCueId)(c,s,b);(!p||!p.cues||!p.cues.getCueById(g))&&(l=new d(c,s,b),l.id=g,l.line=v+1,l.align="left",l.position=10+Math.min(80,Math.floor(r*8/32)*10),o.push(l))}return p&&o.length&&(o.sort(function(m,_){return m.line==="auto"||_.line==="auto"?0:m.line>8&&_.line>8?_.line-m.line:m.line-_.line}),o.forEach(function(m){return Object(S.addCueToTrack)(p,m)})),o}};ee.default=C},"./src/utils/discontinuities.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"findFirstFragWithCC",function(){return A}),B.d(ee,"shouldAlignOnDiscontinuities",function(){return C}),B.d(ee,"findDiscontinuousReferenceFrag",function(){return h}),B.d(ee,"adjustSlidingStart",function(){return c}),B.d(ee,"alignStream",function(){return s}),B.d(ee,"alignPDT",function(){return o}),B.d(ee,"alignFragmentByPDTDelta",function(){return i}),B.d(ee,"alignMediaPlaylistByPDT",function(){return l});var O=B("./src/polyfills/number.ts"),D=B("./src/utils/logger.ts"),S=B("./src/controller/level-helper.ts");function A(a,r){for(var t=null,d=0,v=a.length;d<v;d++){var y=a[d];if(y&&y.cc===r){t=y;break}}return t}function C(a,r,t){return!!(r.details&&(t.endCC>t.startCC||a&&a.cc<t.startCC))}function h(a,r){var t=a.fragments,d=r.fragments;if(!d.length||!t.length){D.logger.log("No fragments to align");return}var v=A(t,d[0].cc);if(!v||v&&!v.startPTS){D.logger.log("No frag in previous level to align on");return}return v}function p(a,r){if(a){var t=a.start+r;a.start=a.startPTS=t,a.endPTS=t+a.duration}}function c(a,r){for(var t=r.fragments,d=0,v=t.length;d<v;d++)p(t[d],a);r.fragmentHint&&p(r.fragmentHint,a),r.alignedSliding=!0}function s(a,r,t){if(!r)return;n(a,t,r),!t.alignedSliding&&r.details&&o(t,r.details),!t.alignedSliding&&r.details&&!t.skippedSegments&&Object(S.adjustSliding)(r.details,t)}function n(a,r,t){if(C(a,t,r)){var d=h(t.details,r);d&&Object(O.isFiniteNumber)(d.start)&&(D.logger.log("Adjusting PTS using last level due to CC increase within current level "+r.url),c(d.start,r))}}function o(a,r){if(!r.fragments.length||!a.hasProgramDateTime||!r.hasProgramDateTime)return;var t=r.fragments[0].programDateTime,d=a.fragments[0].programDateTime,v=(d-t)/1e3+r.fragments[0].start;v&&Object(O.isFiniteNumber)(v)&&(D.logger.log("Adjusting PTS using programDateTime delta "+(d-t)+"ms, sliding:"+v.toFixed(3)+" "+a.url+" "),c(v,a))}function i(a,r){var t=a.programDateTime;if(!t)return;var d=(t-r)/1e3;a.start=a.startPTS=d,a.endPTS=d+a.duration}function l(a,r){if(!r.fragments.length||!a.hasProgramDateTime||!r.hasProgramDateTime)return;var t=r.fragments[0].programDateTime,d=r.fragments[0].start,v=t-d*1e3;a.fragments.forEach(function(y){i(y,v)}),a.fragmentHint&&i(a.fragmentHint,v),a.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/utils/ewma.ts"),D=function(){function S(C,h,p){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=p,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new O.default(C),this.fast_=new O.default(h)}var A=S.prototype;return A.update=function(h,p){var c=this.slow_,s=this.fast_;this.slow_.halfLife!==h&&(this.slow_=new O.default(h,c.getEstimate(),c.getTotalWeight())),this.fast_.halfLife!==p&&(this.fast_=new O.default(p,s.getEstimate(),s.getTotalWeight()))},A.sample=function(h,p){h=Math.max(h,this.minDelayMs_);var c=8*p,s=h/1e3,n=c/s;this.fast_.sample(s,n),this.slow_.sample(s,n)},A.canEstimate=function(){var h=this.fast_;return h&&h.getTotalWeight()>=this.minWeight_},A.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},A.destroy=function(){},S}();ee.default=D},"./src/utils/ewma.ts":function(ae,ee,B){"use strict";B.r(ee);var O=function(){function D(A,C,h){C===void 0&&(C=0),h===void 0&&(h=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=A,this.alpha_=A?Math.exp(Math.log(.5)/A):0,this.estimate_=C,this.totalWeight_=h}var S=D.prototype;return S.sample=function(C,h){var p=Math.pow(this.alpha_,C);this.estimate_=h*(1-p)+p*this.estimate_,this.totalWeight_+=C},S.getTotalWeight=function(){return this.totalWeight_},S.getEstimate=function(){if(this.alpha_){var C=1-Math.pow(this.alpha_,this.totalWeight_);if(C)return this.estimate_/C}return this.estimate_},D}();ee.default=O},"./src/utils/fetch-loader.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"fetchSupported",function(){return i});var O=B("./src/polyfills/number.ts"),D=B("./src/loader/load-stats.ts"),S=B("./src/demux/chunk-cache.ts");function A(d,v){d.prototype=Object.create(v.prototype),d.prototype.constructor=d,s(d,v)}function C(d){var v=typeof Map=="function"?new Map:void 0;return C=function(b){if(b===null||!c(b))return b;if(typeof b!="function")throw new TypeError("Super expression must either be null or a function");if(typeof v!="undefined"){if(v.has(b))return v.get(b);v.set(b,g)}function g(){return h(b,arguments,n(this).constructor)}return g.prototype=Object.create(b.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),s(g,b)},C(d)}function h(d,v,y){return p()?h=Reflect.construct:h=function(g,m,_){var x=[null];x.push.apply(x,m);var f=Function.bind.apply(g,x),E=new f;return _&&s(E,_.prototype),E},h.apply(null,arguments)}function p(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(d){return!1}}function c(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function s(d,v){return s=Object.setPrototypeOf||function(b,g){return b.__proto__=g,b},s(d,v)}function n(d){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},n(d)}function o(){return o=Object.assign||function(d){for(var v=1;v<arguments.length;v++){var y=arguments[v];for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(d[b]=y[b])}return d},o.apply(this,arguments)}function i(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(d){}return!1}var l=function(){function d(y){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=y.fetchSetup||r,this.controller=new self.AbortController,this.stats=new D.LoadStats}var v=d.prototype;return v.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},v.abortInternal=function(){var b=this.response;(!b||!b.ok)&&(this.stats.aborted=!0,this.controller.abort())},v.abort=function(){var b;this.abortInternal(),(b=this.callbacks)!==null&&b!==void 0&&b.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},v.load=function(b,g,m){var _=this,x=this.stats;if(x.loading.start)throw new Error("Loader can only be used once.");x.loading.start=self.performance.now();var f=a(b,this.controller.signal),E=m.onProgress,w=b.responseType==="arraybuffer",T=w?"byteLength":"length";this.context=b,this.config=g,this.callbacks=m,this.request=this.fetchSetup(b,f),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){_.abortInternal(),m.onTimeout(x,b,_.response)},g.timeout),self.fetch(this.request).then(function(R){if(_.response=_.loader=R,!R.ok){var N=R.status,j=R.statusText;throw new t(j||"fetch, bad network response",N,R)}return x.loading.first=Math.max(self.performance.now(),x.loading.start),x.total=parseInt(R.headers.get("Content-Length")||"0"),E&&Object(O.isFiniteNumber)(g.highWaterMark)?_.loadProgressively(R,x,b,g.highWaterMark,E):w?R.arrayBuffer():R.text()}).then(function(R){var N=_.response;self.clearTimeout(_.requestTimeout),x.loading.end=Math.max(self.performance.now(),x.loading.first),x.loaded=x.total=R[T];var j={url:N.url,data:R};E&&!Object(O.isFiniteNumber)(g.highWaterMark)&&E(x,b,R,N),m.onSuccess(j,x,b,N)}).catch(function(R){if(self.clearTimeout(_.requestTimeout),x.aborted)return;var N=R.code||0;m.onError({code:N,text:R.message},b,R.details)})},v.getCacheAge=function(){var b=null;if(this.response){var g=this.response.headers.get("age");b=g?parseFloat(g):null}return b},v.loadProgressively=function(b,g,m,_,x){_===void 0&&(_=0);var f=new S.default,E=b.body.getReader(),w=function T(){return E.read().then(function(R){if(R.done)return f.dataLength&&x(g,m,f.flush(),b),Promise.resolve(new ArrayBuffer(0));var N=R.value,j=N.length;return g.loaded+=j,j<_||f.dataLength?(f.push(N),f.dataLength>=_&&x(g,m,f.flush(),b)):x(g,m,N,b),T()}).catch(function(){return Promise.reject()})};return w()},d}();function a(d,v){var y={method:"GET",mode:"cors",credentials:"same-origin",signal:v,headers:new self.Headers(o({},d.headers))};return d.rangeEnd&&y.headers.set("Range","bytes="+d.rangeStart+"-"+String(d.rangeEnd-1)),y}function r(d,v){return new self.Request(d.url,v)}var t=function(d){A(v,d);function v(y,b,g){var m;return m=d.call(this,y)||this,m.code=void 0,m.details=void 0,m.code=b,m.details=g,m}return v}(C(Error));ee.default=l},"./src/utils/imsc1-ttml-parser.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"IMSC1_CODEC",function(){return c}),B.d(ee,"parseIMSC1",function(){return i});var O=B("./src/utils/mp4-tools.ts"),D=B("./src/utils/vttparser.ts"),S=B("./src/utils/vttcue.ts"),A=B("./src/demux/id3.ts"),C=B("./src/utils/timescale-conversion.ts"),h=B("./src/utils/webvtt-parser.ts");function p(){return p=Object.assign||function(_){for(var x=1;x<arguments.length;x++){var f=arguments[x];for(var E in f)Object.prototype.hasOwnProperty.call(f,E)&&(_[E]=f[E])}return _},p.apply(this,arguments)}var c="stpp.ttml.im1t",s=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,n=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,o={left:"start",center:"center",right:"end",start:"start",end:"end"};function i(_,x,f,E,w){var T=Object(O.findBox)(new Uint8Array(_),["mdat"]);if(T.length===0){w(new Error("Could not parse IMSC1 mdat"));return}var R=T[0],N=Object(A.utf8ArrayToStr)(new Uint8Array(_,R.start,R.end-R.start)),j=Object(C.toTimescaleFromScale)(x,1,f);try{E(l(N,j))}catch(W){w(W)}}function l(_,x){var f=new DOMParser,E=f.parseFromString(_,"text/xml"),w=E.getElementsByTagName("tt")[0];if(!w)throw new Error("Invalid ttml");var T={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},R=Object.keys(T).reduce(function(F,k){return F[k]=w.getAttribute("ttp:"+k)||T[k],F},{}),N=w.getAttribute("xml:space")!=="preserve",j=r(a(w,"styling","style")),W=r(a(w,"layout","region")),J=a(w,"body","[begin]");return[].map.call(J,function(F){var k=t(F,N);if(!k||!F.hasAttribute("begin"))return null;var K=b(F.getAttribute("begin"),R),Y=b(F.getAttribute("dur"),R),H=b(F.getAttribute("end"),R);if(K===null)throw y(F);if(H===null){if(Y===null)throw y(F);H=K+Y}var Q=new S.default(K-x,H-x,k);Q.id=Object(h.generateCueId)(Q.startTime,Q.endTime,Q.text);var re=W[F.getAttribute("region")],oe=j[F.getAttribute("style")];Q.position=10,Q.size=80;var me=d(re,oe),he=me.textAlign;if(he){var Ee=o[he];Ee&&(Q.lineAlign=Ee),Q.align=he}return p(Q,me),Q}).filter(function(F){return F!==null})}function a(_,x,f){var E=_.getElementsByTagName(x)[0];return E?[].slice.call(E.querySelectorAll(f)):[]}function r(_){return _.reduce(function(x,f){var E=f.getAttribute("xml:id");return E&&(x[E]=f),x},{})}function t(_,x){return[].slice.call(_.childNodes).reduce(function(f,E,w){var T;return E.nodeName==="br"&&w?f+`
|
|
|
`:(T=E.childNodes)!==null&&T!==void 0&&T.length?t(E,x):x?f+E.textContent.trim().replace(/\s+/g," "):f+E.textContent},"")}function d(_,x){var f="http://www.w3.org/ns/ttml#styling",E=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return E.reduce(function(w,T){var R=v(x,f,T)||v(_,f,T);return R&&(w[T]=R),w},{})}function v(_,x,f){return _.hasAttributeNS(x,f)?_.getAttributeNS(x,f):null}function y(_){return new Error("Could not parse ttml timestamp "+_)}function b(_,x){if(!_)return null;var f=Object(D.parseTimeStamp)(_);return f===null&&(s.test(_)?f=g(_,x):n.test(_)&&(f=m(_,x))),f}function g(_,x){var f=s.exec(_),E=(f[4]|0)+(f[5]|0)/x.subFrameRate;return(f[1]|0)*3600+(f[2]|0)*60+(f[3]|0)+E/x.frameRate}function m(_,x){var f=n.exec(_),E=Number(f[1]),w=f[2];switch(w){case"h":return E*3600;case"m":return E*60;case"ms":return E*1e3;case"f":return E/x.frameRate;case"t":return E/x.tickRate}return E}},"./src/utils/logger.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"enableLogs",function(){return h}),B.d(ee,"logger",function(){return p});var O=function(){},D={trace:O,debug:O,log:O,warn:O,info:O,error:O},S=D;function A(c){var s=self.console[c];return s?s.bind(self.console,"["+c+"] >"):O}function C(c){for(var s=arguments.length,n=new Array(s>1?s-1:0),o=1;o<s;o++)n[o-1]=arguments[o];n.forEach(function(i){S[i]=c[i]?c[i].bind(c):A(i)})}function h(c){if(self.console&&c===!0||typeof c=="object"){C(c,"debug","log","info","warn","error");try{S.log()}catch(s){S=D}}else S=D}var p=S},"./src/utils/mediakeys-helper.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"KeySystems",function(){return O}),B.d(ee,"requestMediaKeySystemAccess",function(){return D});var O;(function(S){S.WIDEVINE="com.widevine.alpha",S.PLAYREADY="com.microsoft.playready"})(O||(O={}));var D=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"getMediaSource",function(){return O});function O(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"bin2str",function(){return C}),B.d(ee,"readUint16",function(){return h}),B.d(ee,"readUint32",function(){return p}),B.d(ee,"writeUint32",function(){return c}),B.d(ee,"findBox",function(){return s}),B.d(ee,"parseSegmentIndex",function(){return n}),B.d(ee,"parseInitSegment",function(){return o}),B.d(ee,"getStartDTS",function(){return i}),B.d(ee,"getDuration",function(){return l}),B.d(ee,"computeRawDurationFromSamples",function(){return a}),B.d(ee,"offsetStartDTS",function(){return r}),B.d(ee,"segmentValidRange",function(){return t}),B.d(ee,"appendUint8Array",function(){return d});var O=B("./src/utils/typed-array.ts"),D=B("./src/loader/fragment.ts"),S=Math.pow(2,32)-1,A=[].push;function C(v){return String.fromCharCode.apply(null,v)}function h(v,y){"data"in v&&(y+=v.start,v=v.data);var b=v[y]<<8|v[y+1];return b<0?65536+b:b}function p(v,y){"data"in v&&(y+=v.start,v=v.data);var b=v[y]<<24|v[y+1]<<16|v[y+2]<<8|v[y+3];return b<0?4294967296+b:b}function c(v,y,b){"data"in v&&(y+=v.start,v=v.data),v[y]=b>>24,v[y+1]=b>>16&255,v[y+2]=b>>8&255,v[y+3]=b&255}function s(v,y){var b=[];if(!y.length)return b;var g,m,_;"data"in v?(g=v.data,m=v.start,_=v.end):(g=v,m=0,_=g.byteLength);for(var x=m;x<_;){var f=p(g,x),E=C(g.subarray(x+4,x+8)),w=f>1?x+f:_;if(E===y[0])if(y.length===1)b.push({data:g,start:x+8,end:w});else{var T=s({data:g,start:x+8,end:w},y.slice(1));T.length&&A.apply(b,T)}x=w}return b}function n(v){var y=s(v,["moov"]),b=y[0],g=b?b.end:null,m=s(v,["sidx"]);if(!m||!m[0])return null;var _=[],x=m[0],f=x.data[0],E=f===0?8:16,w=p(x,E);E+=4;var T=0,R=0;f===0?E+=8:E+=16,E+=2;var N=x.end+R,j=h(x,E);E+=2;for(var W=0;W<j;W++){var J=E,F=p(x,J);J+=4;var k=F&2147483647,K=(F&2147483648)>>>31;if(K===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Y=p(x,J);J+=4,_.push({referenceSize:k,subsegmentDuration:Y,info:{duration:Y/w,start:N,end:N+k-1}}),N+=k,J+=4,E=J}return{earliestPresentationTime:T,timescale:w,version:f,referencesCount:j,references:_,moovEndOffset:g}}function o(v){for(var y=[],b=s(v,["moov","trak"]),g=0;g<b.length;g++){var m=b[g],_=s(m,["tkhd"])[0];if(_){var x=_.data[_.start],f=x===0?12:20,E=p(_,f),w=s(m,["mdia","mdhd"])[0];if(w){x=w.data[w.start],f=x===0?12:20;var T=p(w,f),R=s(m,["mdia","hdlr"])[0];if(R){var N=C(R.data.subarray(R.start+8,R.start+12)),j={soun:D.ElementaryStreamTypes.AUDIO,vide:D.ElementaryStreamTypes.VIDEO}[N];if(j){var W=s(m,["mdia","minf","stbl","stsd"])[0],J=void 0;W&&(J=C(W.data.subarray(W.start+12,W.start+16))),y[E]={timescale:T,type:j},y[j]={timescale:T,id:E,codec:J}}}}}}var F=s(v,["moov","mvex","trex"]);return F.forEach(function(k){var K=p(k,4),Y=y[K];Y&&(Y.default={duration:p(k,12),flags:p(k,20)})}),y}function i(v,y){return s(y,["moof","traf"]).reduce(function(b,g){var m=s(g,["tfdt"])[0],_=m.data[m.start],x=s(g,["tfhd"]).reduce(function(f,E){var w=p(E,4),T=v[w];if(T){var R=p(m,4);_===1&&(R*=Math.pow(2,32),R+=p(m,8));var N=T.timescale||9e4,j=R/N;if(isFinite(j)&&(f===null||j<f))return j}return f},null);return x!==null&&isFinite(x)&&(b===null||x<b)?x:b},null)||0}function l(v,y){for(var b=0,g=0,m=0,_=s(v,["moof","traf"]),x=0;x<_.length;x++){var f=_[x],E=s(f,["tfhd"])[0],w=p(E,4),T=y[w];if(!T)continue;var R=T.default,N=p(E,0)|(R==null?void 0:R.flags),j=R==null?void 0:R.duration;N&8&&(N&2?j=p(E,12):j=p(E,8));for(var W=T.timescale||9e4,J=s(f,["trun"]),F=0;F<J.length;F++){if(j){var k=p(J[F],4);b=j*k}else b=a(J[F]);T.type===D.ElementaryStreamTypes.VIDEO?g+=b/W:T.type===D.ElementaryStreamTypes.AUDIO&&(m+=b/W)}}if(g===0&&m===0){var K=n(v);if(K!=null&&K.references)return K.references.reduce(function(Y,H){return Y+H.info.duration||0},0)}return g||m}function a(v){var y=p(v,0),b=8;y&1&&(b+=4),y&4&&(b+=4);for(var g=0,m=p(v,4),_=0;_<m;_++){if(y&256){var x=p(v,b);g+=x,b+=4}y&512&&(b+=4),y&1024&&(b+=4),y&2048&&(b+=4)}return g}function r(v,y,b){s(y,["moof","traf"]).forEach(function(g){s(g,["tfhd"]).forEach(function(m){var _=p(m,4),x=v[_];if(!x)return;var f=x.timescale||9e4;s(g,["tfdt"]).forEach(function(E){var w=E.data[E.start],T=p(E,4);if(w===0)c(E,4,T-b*f);else{T*=Math.pow(2,32),T+=p(E,8),T-=b*f,T=Math.max(T,0);var R=Math.floor(T/(S+1)),N=Math.floor(T%(S+1));c(E,4,R),c(E,8,N)}})})})}function t(v){var y={valid:null,remainder:null},b=s(v,["moof"]);if(b){if(b.length<2)return y.remainder=v,y}else return y;var g=b[b.length-1];return y.valid=Object(O.sliceUint8)(v,0,g.start-8),y.remainder=Object(O.sliceUint8)(v,g.start-8),y}function d(v,y){var b=new Uint8Array(v.length+y.length);return b.set(v),b.set(y,v.length),b}},"./src/utils/output-filter.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"default",function(){return O});var O=function(){function D(A,C){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=A,this.trackName=C}var S=D.prototype;return S.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},S.newCue=function(C,h,p){(this.startTime===null||this.startTime>C)&&(this.startTime=C),this.endTime=h,this.screen=p,this.timelineController.createCaptionsTrack(this.trackName)},S.reset=function(){this.cueRanges=[]},D}()},"./src/utils/texttrack-utils.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"sendAddTrackEvent",function(){return D}),B.d(ee,"addCueToTrack",function(){return S}),B.d(ee,"clearCurrentCues",function(){return A}),B.d(ee,"removeCuesInRange",function(){return C}),B.d(ee,"getCuesInRange",function(){return p});var O=B("./src/utils/logger.ts");function D(c,s){var n;try{n=new Event("addtrack")}catch(o){n=document.createEvent("Event"),n.initEvent("addtrack",!1,!1)}n.track=c,s.dispatchEvent(n)}function S(c,s){var n=c.mode;if(n==="disabled"&&(c.mode="hidden"),c.cues&&!c.cues.getCueById(s.id))try{if(c.addCue(s),!c.cues.getCueById(s.id))throw new Error("addCue is failed for: "+s)}catch(i){O.logger.debug("[texttrack-utils]: "+i);var o=new self.TextTrackCue(s.startTime,s.endTime,s.text);o.id=s.id,c.addCue(o)}n==="disabled"&&(c.mode=n)}function A(c){var s=c.mode;if(s==="disabled"&&(c.mode="hidden"),c.cues)for(var n=c.cues.length;n--;)c.removeCue(c.cues[n]);s==="disabled"&&(c.mode=s)}function C(c,s,n){var o=c.mode;if(o==="disabled"&&(c.mode="hidden"),c.cues&&c.cues.length>0)for(var i=p(c.cues,s,n),l=0;l<i.length;l++)c.removeCue(i[l]);o==="disabled"&&(c.mode=o)}function h(c,s){if(s<c[0].startTime)return 0;var n=c.length-1;if(s>c[n].endTime)return-1;for(var o=0,i=n;o<=i;){var l=Math.floor((i+o)/2);if(s<c[l].startTime)i=l-1;else if(s>c[l].startTime&&o<n)o=l+1;else return l}return c[o].startTime-s<s-c[i].startTime?o:i}function p(c,s,n){var o=[],i=h(c,s);if(i>-1)for(var l=i,a=c.length;l<a;l++){var r=c[l];if(r.startTime>=s&&r.endTime<=n)o.push(r);else if(r.startTime>n)return o}return o}},"./src/utils/time-ranges.ts":function(ae,ee,B){"use strict";B.r(ee);var O={toString:function(S){for(var A="",C=S.length,h=0;h<C;h++)A+="["+S.start(h).toFixed(3)+","+S.end(h).toFixed(3)+"]";return A}};ee.default=O},"./src/utils/timescale-conversion.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"toTimescaleFromBase",function(){return D}),B.d(ee,"toTimescaleFromScale",function(){return S}),B.d(ee,"toMsFromMpegTsClock",function(){return A}),B.d(ee,"toMpegTsClockFromTimescale",function(){return C});var O=9e4;function D(h,p,c,s){c===void 0&&(c=1),s===void 0&&(s=!1);var n=h*p*c;return s?Math.round(n):n}function S(h,p,c,s){return c===void 0&&(c=1),s===void 0&&(s=!1),D(h,p,1/c,s)}function A(h,p){return p===void 0&&(p=!1),D(h,1e3,1/O,p)}function C(h,p){return p===void 0&&(p=1),D(h,O,1/p)}},"./src/utils/typed-array.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"sliceUint8",function(){return O});function O(D,S,A){return Uint8Array.prototype.slice?D.slice(S,A):new Uint8Array(Array.prototype.slice.call(D,S,A))}},"./src/utils/vttcue.ts":function(ae,ee,B){"use strict";B.r(ee),ee.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var O=["","lr","rl"],D=["start","middle","end","left","right"];function S(c,s){if(typeof s!="string")return!1;if(!Array.isArray(c))return!1;var n=s.toLowerCase();return~c.indexOf(n)?n:!1}function A(c){return S(O,c)}function C(c){return S(D,c)}function h(c){for(var s=arguments.length,n=new Array(s>1?s-1:0),o=1;o<s;o++)n[o-1]=arguments[o];for(var i=1;i<arguments.length;i++){var l=arguments[i];for(var a in l)c[a]=l[a]}return c}function p(c,s,n){var o=this,i={enumerable:!0};o.hasBeenReset=!1;var l="",a=!1,r=c,t=s,d=n,v=null,y="",b=!0,g="auto",m="start",_=50,x="middle",f=50,E="middle";Object.defineProperty(o,"id",h({},i,{get:function(){return l},set:function(T){l=""+T}})),Object.defineProperty(o,"pauseOnExit",h({},i,{get:function(){return a},set:function(T){a=!!T}})),Object.defineProperty(o,"startTime",h({},i,{get:function(){return r},set:function(T){if(typeof T!="number")throw new TypeError("Start time must be set to a number.");r=T,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",h({},i,{get:function(){return t},set:function(T){if(typeof T!="number")throw new TypeError("End time must be set to a number.");t=T,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",h({},i,{get:function(){return d},set:function(T){d=""+T,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",h({},i,{get:function(){return v},set:function(T){v=T,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",h({},i,{get:function(){return y},set:function(T){var R=A(T);if(R===!1)throw new SyntaxError("An invalid or illegal string was specified.");y=R,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",h({},i,{get:function(){return b},set:function(T){b=!!T,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",h({},i,{get:function(){return g},set:function(T){if(typeof T!="number"&&T!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");g=T,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",h({},i,{get:function(){return m},set:function(T){var R=C(T);if(!R)throw new SyntaxError("An invalid or illegal string was specified.");m=R,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",h({},i,{get:function(){return _},set:function(T){if(T<0||T>100)throw new Error("Position must be between 0 and 100.");_=T,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",h({},i,{get:function(){return x},set:function(T){var R=C(T);if(!R)throw new SyntaxError("An invalid or illegal string was specified.");x=R,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",h({},i,{get:function(){return f},set:function(T){if(T<0||T>100)throw new Error("Size must be between 0 and 100.");f=T,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",h({},i,{get:function(){return E},set:function(T){var R=C(T);if(!R)throw new SyntaxError("An invalid or illegal string was specified.");E=R,this.hasBeenReset=!0}})),o.displayState=void 0}return p.prototype.getCueAsHTML=function(){var c=self.WebVTT;return c.convertCueToDOMTree(self,this.text)},p}()},"./src/utils/vttparser.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"parseTimeStamp",function(){return S}),B.d(ee,"fixLineBreaks",function(){return s}),B.d(ee,"VTTParser",function(){return n});var O=B("./src/utils/vttcue.ts"),D=function(){function o(){}var i=o.prototype;return i.decode=function(a,r){if(!a)return"";if(typeof a!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))},o}();function S(o){function i(a,r,t,d){return(a|0)*3600+(r|0)*60+(t|0)+parseFloat(d||0)}var l=o.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return l?parseFloat(l[2])>59?i(l[2],l[3],0,l[4]):i(l[1],l[2],l[3],l[4]):null}var A=function(){function o(){this.values=Object.create(null)}var i=o.prototype;return i.set=function(a,r){!this.get(a)&&r!==""&&(this.values[a]=r)},i.get=function(a,r,t){return t?this.has(a)?this.values[a]:r[t]:this.has(a)?this.values[a]:r},i.has=function(a){return a in this.values},i.alt=function(a,r,t){for(var d=0;d<t.length;++d)if(r===t[d]){this.set(a,r);break}},i.integer=function(a,r){/^-?\d+$/.test(r)&&this.set(a,parseInt(r,10))},i.percent=function(a,r){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(r)){var t=parseFloat(r);if(t>=0&&t<=100)return this.set(a,t),!0}return!1},o}();function C(o,i,l,a){var r=a?o.split(a):[o];for(var t in r){if(typeof r[t]!="string")continue;var d=r[t].split(l);if(d.length!==2)continue;var v=d[0],y=d[1];i(v,y)}}var h=new O.default(0,0,""),p=h.align==="middle"?"middle":"center";function c(o,i,l){var a=o;function r(){var v=S(o);if(v===null)throw new Error("Malformed timestamp: "+a);return o=o.replace(/^[^\sa-zA-Z-]+/,""),v}function t(v,y){var b=new A;C(v,function(_,x){var f;switch(_){case"region":for(var E=l.length-1;E>=0;E--)if(l[E].id===x){b.set(_,l[E].region);break}break;case"vertical":b.alt(_,x,["rl","lr"]);break;case"line":f=x.split(","),b.integer(_,f[0]),b.percent(_,f[0])&&b.set("snapToLines",!1),b.alt(_,f[0],["auto"]),f.length===2&&b.alt("lineAlign",f[1],["start",p,"end"]);break;case"position":f=x.split(","),b.percent(_,f[0]),f.length===2&&b.alt("positionAlign",f[1],["start",p,"end","line-left","line-right","auto"]);break;case"size":b.percent(_,x);break;case"align":b.alt(_,x,["start",p,"end","left","right"]);break}},/:/,/\s/),y.region=b.get("region",null),y.vertical=b.get("vertical","");var g=b.get("line","auto");g==="auto"&&h.line===-1&&(g=-1),y.line=g,y.lineAlign=b.get("lineAlign","start"),y.snapToLines=b.get("snapToLines",!0),y.size=b.get("size",100),y.align=b.get("align",p);var m=b.get("position","auto");m==="auto"&&h.position===50&&(m=y.align==="start"||y.align==="left"?0:y.align==="end"||y.align==="right"?100:50),y.position=m}function d(){o=o.replace(/^\s+/,"")}if(d(),i.startTime=r(),d(),o.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+a);o=o.substr(3),d(),i.endTime=r(),d(),t(o,i)}function s(o){return o.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var n=function(){function o(){this.state="INITIAL",this.buffer="",this.decoder=new D,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var i=o.prototype;return i.parse=function(a){var r=this;a&&(r.buffer+=r.decoder.decode(a,{stream:!0}));function t(){var m=r.buffer,_=0;for(m=s(m);_<m.length&&m[_]!=="\r"&&m[_]!==`
|
|
|
`;)++_;var x=m.substr(0,_);return m[_]==="\r"&&++_,m[_]===`
|
|
|
`&&++_,r.buffer=m.substr(_),x}function d(m){C(m,function(_,x){},/:/)}try{var v="";if(r.state==="INITIAL"){if(!/\r\n|\n/.test(r.buffer))return this;v=t();var y=v.match(/^()?WEBVTT([ \t].*)?$/);if(!y||!y[0])throw new Error("Malformed WebVTT signature.");r.state="HEADER"}for(var b=!1;r.buffer;){if(!/\r\n|\n/.test(r.buffer))return this;b?b=!1:v=t();switch(r.state){case"HEADER":/:/.test(v)?d(v):v||(r.state="ID");continue;case"NOTE":v||(r.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(v)){r.state="NOTE";break}if(!v)continue;if(r.cue=new O.default(0,0,""),r.state="CUE",v.indexOf("-->")===-1){r.cue.id=v;continue}case"CUE":if(!r.cue){r.state="BADCUE";continue}try{c(v,r.cue,r.regionList)}catch(m){r.cue=null,r.state="BADCUE";continue}r.state="CUETEXT";continue;case"CUETEXT":{var g=v.indexOf("-->")!==-1;if(!v||g&&(b=!0)){r.oncue&&r.cue&&r.oncue(r.cue),r.cue=null,r.state="ID";continue}if(r.cue===null)continue;r.cue.text&&(r.cue.text+=`
|
|
|
`),r.cue.text+=v}continue;case"BADCUE":v||(r.state="ID")}}}catch(m){r.state==="CUETEXT"&&r.cue&&r.oncue&&r.oncue(r.cue),r.cue=null,r.state=r.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},i.flush=function(){var a=this;try{if((a.cue||a.state==="HEADER")&&(a.buffer+=`
|
|
|
|
|
|
`,a.parse()),a.state==="INITIAL"||a.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(r){a.onparsingerror&&a.onparsingerror(r)}return a.onflush&&a.onflush(),this},o}()},"./src/utils/webvtt-parser.ts":function(ae,ee,B){"use strict";B.r(ee),B.d(ee,"generateCueId",function(){return n}),B.d(ee,"parseWebVTT",function(){return i});var O=B("./src/polyfills/number.ts"),D=B("./src/utils/vttparser.ts"),S=B("./src/demux/id3.ts"),A=B("./src/utils/timescale-conversion.ts"),C=B("./src/remux/mp4-remuxer.ts"),h=/\r\n|\n\r|\n|\r/g,p=function(a,r,t){return t===void 0&&(t=0),a.substr(t,r.length)===r},c=function(a){var r=parseInt(a.substr(-3)),t=parseInt(a.substr(-6,2)),d=parseInt(a.substr(-9,2)),v=a.length>9?parseInt(a.substr(0,a.indexOf(":"))):0;if(!Object(O.isFiniteNumber)(r)||!Object(O.isFiniteNumber)(t)||!Object(O.isFiniteNumber)(d)||!Object(O.isFiniteNumber)(v))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+a);return r+=1e3*t,r+=60*1e3*d,r+=60*60*1e3*v,r},s=function(a){for(var r=5381,t=a.length;t;)r=r*33^a.charCodeAt(--t);return(r>>>0).toString()};function n(l,a,r){return s(l.toString())+s(a.toString())+s(r)}var o=function(a,r,t){var d=a[r],v=a[d.prevCC];if(!v||!v.new&&d.new){a.ccOffset=a.presentationOffset=d.start,d.new=!1;return}for(;(y=v)!==null&&y!==void 0&&y.new;){var y;a.ccOffset+=d.start-v.start,d.new=!1,d=v,v=a[d.prevCC]}a.presentationOffset=t};function i(l,a,r,t,d,v,y,b){var g=new D.VTTParser,m=Object(S.utf8ArrayToStr)(new Uint8Array(l)).trim().replace(h,`
|
|
|
`).split(`
|
|
|
`),_=[],x=Object(A.toMpegTsClockFromTimescale)(a,r),f="00:00.000",E=0,w=0,T,R=!0,N=!1;g.oncue=function(j){var W=t[d],J=t.ccOffset,F=(E-x)/9e4;if(W!=null&&W.new&&(w!==void 0?J=t.ccOffset=W.start:o(t,d,F)),F&&(J=F-t.presentationOffset),N){var k=j.endTime-j.startTime,K=Object(C.normalizePts)((j.startTime+J-w)*9e4,v*9e4)/9e4;j.startTime=K,j.endTime=K+k}var Y=j.text.trim();j.text=decodeURIComponent(encodeURIComponent(Y)),j.id||(j.id=n(j.startTime,j.endTime,Y)),j.endTime>0&&_.push(j)},g.onparsingerror=function(j){T=j},g.onflush=function(){if(T){b(T);return}y(_)},m.forEach(function(j){if(R)if(p(j,"X-TIMESTAMP-MAP=")){R=!1,N=!0,j.substr(16).split(",").forEach(function(W){p(W,"LOCAL:")?f=W.substr(6):p(W,"MPEGTS:")&&(E=parseInt(W.substr(7)))});try{w=c(f)/1e3}catch(W){N=!1,T=W}return}else j===""&&(R=!1);g.parse(j+`
|
|
|
`)}),g.flush()}},"./src/utils/xhr-loader.ts":function(ae,ee,B){"use strict";B.r(ee);var O=B("./src/utils/logger.ts"),D=B("./src/loader/load-stats.ts"),S=/^age:\s*[\d.]+\s*$/m,A=function(){function C(p){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=p?p.xhrSetup:null,this.stats=new D.LoadStats,this.retryDelay=0}var h=C.prototype;return h.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},h.abortInternal=function(){var c=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),c&&(c.onreadystatechange=null,c.onprogress=null,c.readyState!==4&&(this.stats.aborted=!0,c.abort()))},h.abort=function(){var c;this.abortInternal(),(c=this.callbacks)!==null&&c!==void 0&&c.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},h.load=function(c,s,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=c,this.config=s,this.callbacks=n,this.retryDelay=s.retryDelay,this.loadInternal()},h.loadInternal=function(){var c=this.config,s=this.context;if(!c)return;var n=this.loader=new self.XMLHttpRequest,o=this.stats;o.loading.first=0,o.loaded=0;var i=this.xhrSetup;try{if(i)try{i(n,s.url)}catch(r){n.open("GET",s.url,!0),i(n,s.url)}n.readyState||n.open("GET",s.url,!0);var l=this.context.headers;if(l)for(var a in l)n.setRequestHeader(a,l[a])}catch(r){this.callbacks.onError({code:n.status,text:r.message},s,n);return}s.rangeEnd&&n.setRequestHeader("Range","bytes="+s.rangeStart+"-"+(s.rangeEnd-1)),n.onreadystatechange=this.readystatechange.bind(this),n.onprogress=this.loadprogress.bind(this),n.responseType=s.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),c.timeout),n.send()},h.readystatechange=function(){var c=this.context,s=this.loader,n=this.stats;if(!c||!s)return;var o=s.readyState,i=this.config;if(n.aborted)return;if(o>=2)if(self.clearTimeout(this.requestTimeout),n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),o===4){s.onreadystatechange=null,s.onprogress=null;var l=s.status;if(l>=200&&l<300){n.loading.end=Math.max(self.performance.now(),n.loading.first);var a,r;if(c.responseType==="arraybuffer"?(a=s.response,r=a.byteLength):(a=s.responseText,r=a.length),n.loaded=n.total=r,!this.callbacks)return;var t=this.callbacks.onProgress;if(t&&t(n,c,a,s),!this.callbacks)return;var d={url:s.responseURL,data:a};this.callbacks.onSuccess(d,n,c,s)}else n.retry>=i.maxRetry||l>=400&&l<499?(O.logger.error(l+" while loading "+c.url),this.callbacks.onError({code:l,text:s.statusText},c,s)):(O.logger.warn(l+" while loading "+c.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,i.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout)},h.loadtimeout=function(){O.logger.warn("timeout while loading "+this.context.url);var c=this.callbacks;c&&(this.abortInternal(),c.onTimeout(this.stats,this.context,this.loader))},h.loadprogress=function(c){var s=this.stats;s.loaded=c.loaded,c.lengthComputable&&(s.total=c.total)},h.getCacheAge=function(){var c=null;if(this.loader&&S.test(this.loader.getAllResponseHeaders())){var s=this.loader.getResponseHeader("age");c=s?parseFloat(s):null}return c},C}();ee.default=A}}).default})},vHTk:function(Ye,We,z){Ye.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(Ye,We,z){"use strict";z.d(We,"a",function(){return $});var ae=z("rePB"),ee=z("VTBJ"),B=z("KQm4"),O=z("U8pU"),D=z("ODXe"),S=z("cDcd"),A=z("TSYQ"),C=z.n(A),h=z("Gytx"),p=z.n(h),c=z("Kwbf"),s=z("t23M"),n=z("qx4F"),o=z("6eGT"),i=z("IBYe"),l=z("Ff2n"),a=z("c+Xe"),r=z("fyJ8"),t=z("biw7");function d(Le,Me,Xe,et,ze){var Ke=Xe[Le]||{},Pe=Xe[Me]||{},Ie,Ce;Ke.fixed==="left"?Ie=et.left[Le]:Pe.fixed==="right"&&(Ce=et.right[Me]);var pe=!1,_e=!1,Oe=!1,we=!1,Be=Xe[Me+1],qe=Xe[Le-1];if(ze==="rtl"){if(Ie!==void 0){var dt=qe&&qe.fixed==="left";we=!dt}else if(Ce!==void 0){var Et=Be&&Be.fixed==="right";Oe=!Et}}else if(Ie!==void 0){var It=Be&&Be.fixed==="left";pe=!It}else if(Ce!==void 0){var Rt=qe&&qe.fixed==="right";_e=!Rt}return{fixLeft:Ie,fixRight:Ce,lastFixLeft:pe,firstFixRight:_e,lastFixRight:Oe,firstFixLeft:we,isSticky:et.isSticky}}var v=z("sR1s");function y(Le){var Me=Le.cells,Xe=Le.stickyOffsets,et=Le.flattenColumns,ze=Le.rowComponent,Ke=Le.cellComponent,Pe=Le.onHeaderRow,Ie=Le.index,Ce=S.useContext(t.a),pe=Ce.prefixCls,_e=Ce.direction,Oe;Pe&&(Oe=Pe(Me.map(function(Be){return Be.column}),Ie));var we=Object(v.a)(Me.map(function(Be){return Be.column}));return S.createElement(ze,Object.assign({},Oe),Me.map(function(Be,qe){var dt=Be.column,Et=d(Be.colStart,Be.colEnd,et,Xe,_e),It;return dt&&dt.onHeaderCell&&(It=Be.column.onHeaderCell(dt)),S.createElement(r.a,Object.assign({},Be,{ellipsis:dt.ellipsis,align:dt.align,component:Ke,prefixCls:pe,key:we[qe]},Et,{additionalProps:It,rowType:"header"}))}))}y.displayName="HeaderRow";var b=y;function g(Le){var Me=[];function Xe(Pe,Ie){var Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Me[Ce]=Me[Ce]||[];var pe=Ie,_e=Pe.filter(Boolean).map(function(Oe){var we={key:Oe.key,className:Oe.className||"",children:Oe.title,column:Oe,colStart:pe},Be=1,qe=Oe.children;return qe&&qe.length>0&&(Be=Xe(qe,pe,Ce+1).reduce(function(dt,Et){return dt+Et},0),we.hasSubColumns=!0),"colSpan"in Oe&&(Be=Oe.colSpan),"rowSpan"in Oe&&(we.rowSpan=Oe.rowSpan),we.colSpan=Be,we.colEnd=we.colStart+Be-1,Me[Ce].push(we),pe+=Be,Be});return _e}Xe(Le,0);for(var et=Me.length,ze=function(Ie){Me[Ie].forEach(function(Ce){!("rowSpan"in Ce)&&!Ce.hasSubColumns&&(Ce.rowSpan=et-Ie)})},Ke=0;Ke<et;Ke+=1)ze(Ke);return Me}function m(Le){var Me=Le.stickyOffsets,Xe=Le.columns,et=Le.flattenColumns,ze=Le.onHeaderRow,Ke=S.useContext(t.a),Pe=Ke.prefixCls,Ie=Ke.getComponent,Ce=S.useMemo(function(){return g(Xe)},[Xe]),pe=Ie(["header","wrapper"],"thead"),_e=Ie(["header","row"],"tr"),Oe=Ie(["header","cell"],"th");return S.createElement(pe,{className:"".concat(Pe,"-thead")},Ce.map(function(we,Be){var qe=S.createElement(b,{key:Be,flattenColumns:et,cells:we,stickyOffsets:Me,rowComponent:_e,cellComponent:Oe,onHeaderRow:ze,index:Be});return qe}))}var _=m,x=z("hW8S");function f(Le){for(var Me=Le.colWidths,Xe=Le.columns,et=Le.columCount,ze=[],Ke=et||Xe.length,Pe=!1,Ie=Ke-1;Ie>=0;Ie-=1){var Ce=Me[Ie],pe=Xe&&Xe[Ie],_e=pe&&pe[x.a];(Ce||_e||Pe)&&(ze.unshift(S.createElement("col",Object.assign({key:Ie,style:{width:Ce,minWidth:Ce}},_e))),Pe=!0)}return S.createElement("colgroup",null,ze)}var E=f;function w(Le,Me){return Object(S.useMemo)(function(){for(var Xe=[],et=0;et<Me;et+=1){var ze=Le[et];if(ze!==void 0)Xe[et]=ze;else return null}return Xe},[Le.join("_"),Me])}var T=S.forwardRef(function(Le,Me){var Xe=Le.noData,et=Le.columns,ze=Le.flattenColumns,Ke=Le.colWidths,Pe=Le.columCount,Ie=Le.stickyOffsets,Ce=Le.direction,pe=Le.fixHeader,_e=Le.offsetHeader,Oe=Le.stickyClassName,we=Le.onScroll,Be=Object(l.a)(Le,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),qe=S.useContext(t.a),dt=qe.prefixCls,Et=qe.scrollbarSize,It=qe.isSticky,Rt=It&&!pe?0:Et,Ct=S.useRef(null),st=S.useCallback(function(wt){Object(a.b)(Me,wt),Object(a.b)(Ct,wt)},[]);S.useEffect(function(){var wt;function St(Qe){var lt=Qe.currentTarget,xt=Qe.deltaX;xt&&(we({currentTarget:lt,scrollLeft:lt.scrollLeft+xt}),Qe.preventDefault())}return(wt=Ct.current)===null||wt===void 0||wt.addEventListener("wheel",St),function(){var Qe;(Qe=Ct.current)===null||Qe===void 0||Qe.removeEventListener("wheel",St)}},[]);var ut=ze[ze.length-1],$e={fixed:ut?ut.fixed:null,onHeaderCell:function(){return{className:"".concat(dt,"-cell-scrollbar")}}},xe=Object(S.useMemo)(function(){return Rt?[].concat(Object(B.a)(et),[$e]):et},[Rt,et]),Fe=Object(S.useMemo)(function(){return Rt?[].concat(Object(B.a)(ze),[$e]):ze},[Rt,ze]),ct=Object(S.useMemo)(function(){var wt=Ie.right,St=Ie.left;return Object(ee.a)(Object(ee.a)({},Ie),{},{left:Ce==="rtl"?[].concat(Object(B.a)(St.map(function(Qe){return Qe+Rt})),[0]):St,right:Ce==="rtl"?wt:[].concat(Object(B.a)(wt.map(function(Qe){return Qe+Rt})),[0]),isSticky:It})},[Rt,Ie,It]),tt=w(Ke,Pe);return S.createElement("div",{style:Object(ee.a)({overflow:"hidden"},It?{top:_e}:{}),ref:st,className:C()("".concat(dt,"-header"),Object(ae.a)({},Oe,!!Oe))},S.createElement("table",{style:{tableLayout:"fixed",visibility:Xe||tt?null:"hidden"}},S.createElement(E,{colWidths:tt?[].concat(Object(B.a)(tt),[Rt]):[],columCount:Pe+1,columns:Fe}),S.createElement(_,Object.assign({},Be,{stickyOffsets:ct,columns:xe,flattenColumns:Fe}))))});T.displayName="FixedHeader";var R=T,N=S.createContext(null),j=N;function W(Le){var Me=Le.prefixCls,Xe=Le.children,et=Le.component,ze=Le.cellComponent,Ke=Le.fixHeader,Pe=Le.fixColumn,Ie=Le.horizonScroll,Ce=Le.className,pe=Le.expanded,_e=Le.componentWidth,Oe=Le.colSpan,we=S.useContext(t.a),Be=we.scrollbarSize;return S.useMemo(function(){var qe=Xe;return Pe&&(qe=S.createElement("div",{style:{width:_e-(Ke?Be:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Me,"-expanded-row-fixed")},qe)),S.createElement(et,{className:Ce,style:{display:pe?null:"none"}},S.createElement(r.a,{component:ze,prefixCls:Me,colSpan:Oe},qe))},[Xe,et,Ke,Ie,Ce,pe,_e,Oe,Be])}var J=W;function F(Le){var Me=Le.className,Xe=Le.style,et=Le.record,ze=Le.index,Ke=Le.rowKey,Pe=Le.getRowKey,Ie=Le.rowExpandable,Ce=Le.expandedKeys,pe=Le.onRow,_e=Le.indent,Oe=_e===void 0?0:_e,we=Le.rowComponent,Be=Le.cellComponent,qe=Le.childrenColumnName,dt=S.useContext(t.a),Et=dt.prefixCls,It=dt.fixedInfoList,Rt=S.useContext(j),Ct=Rt.fixHeader,st=Rt.fixColumn,ut=Rt.horizonScroll,$e=Rt.componentWidth,xe=Rt.flattenColumns,Fe=Rt.expandableType,ct=Rt.expandRowByClick,tt=Rt.onTriggerExpand,wt=Rt.rowClassName,St=Rt.expandedRowClassName,Qe=Rt.indentSize,lt=Rt.expandIcon,xt=Rt.expandedRowRender,Pt=Rt.expandIconColumnIndex,zt=S.useState(!1),Se=Object(D.a)(zt,2),fe=Se[0],G=Se[1],Z=Ce&&Ce.has(Le.recordKey);S.useEffect(function(){Z&&G(!0)},[Z]);var ne=Fe==="row"&&(!Ie||Ie(et)),se=Fe==="nest",Te=qe&&et&&et[qe],Ge=ne||se,Ze;pe&&(Ze=pe(et,ze));var bt=function(vt){if(ct&&Ge&&tt(et,vt),Ze&&Ze.onClick){for(var Tn,mt=arguments.length,ln=new Array(mt>1?mt-1:0),fn=1;fn<mt;fn++)ln[fn-1]=arguments[fn];(Tn=Ze).onClick.apply(Tn,[vt].concat(ln))}},At;typeof wt=="string"?At=wt:typeof wt=="function"&&(At=wt(et,ze,Oe));var it=Object(v.a)(xe),Tt=S.createElement(we,Object.assign({},Ze,{"data-row-key":Ke,className:C()(Me,"".concat(Et,"-row"),"".concat(Et,"-row-level-").concat(Oe),At,Ze&&Ze.className),style:Object(ee.a)(Object(ee.a)({},Xe),Ze?Ze.style:null),onClick:bt}),xe.map(function(Nt,vt){var Tn=Nt.render,mt=Nt.dataIndex,ln=Nt.className,fn=it[vt],Zn=It[vt],rr;vt===(Pt||0)&&se&&(rr=S.createElement(S.Fragment,null,S.createElement("span",{style:{paddingLeft:"".concat(Qe*Oe,"px")},className:"".concat(Et,"-row-indent indent-level-").concat(Oe)}),lt({prefixCls:Et,expanded:Z,expandable:Te,record:et,onExpand:tt})));var xn;return Nt.onCell&&(xn=Nt.onCell(et,ze)),S.createElement(r.a,Object.assign({className:ln,ellipsis:Nt.ellipsis,align:Nt.align,component:Be,prefixCls:Et,key:fn,record:et,index:ze,dataIndex:mt,render:Tn,shouldCellUpdate:Nt.shouldCellUpdate},Zn,{appendNode:rr,additionalProps:xn}))})),Qt;if(ne&&(fe||Z)){var yt=xt(et,ze,Oe+1,Z),nn=St&&St(et,ze,Oe);Qt=S.createElement(J,{expanded:Z,className:C()("".concat(Et,"-expanded-row"),"".concat(Et,"-expanded-row-level-").concat(Oe+1),nn),prefixCls:Et,fixHeader:Ct,fixColumn:st,horizonScroll:ut,component:we,componentWidth:$e,cellComponent:Be,colSpan:xe.length},yt)}var Jt;return Te&&Z&&(Jt=(et[qe]||[]).map(function(Nt,vt){var Tn=Pe(Nt,vt);return S.createElement(F,Object.assign({},Le,{key:Tn,rowKey:Tn,record:Nt,recordKey:Tn,index:vt,indent:Oe+1}))})),S.createElement(S.Fragment,null,Tt,Qt,Jt)}F.displayName="BodyRow";var k=F,K=S.createContext(null),Y=K;function H(Le){var Me=Le.columnKey,Xe=Le.onColumnResize,et=S.useRef();return S.useEffect(function(){et.current&&Xe(Me,et.current.offsetWidth)},[]),S.createElement(s.a,{onResize:function(Ke){var Pe=Ke.offsetWidth;Xe(Me,Pe)}},S.createElement("td",{ref:et,style:{padding:0,border:0,height:0}},S.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Q(Le){var Me=Le.data,Xe=Le.getRowKey,et=Le.measureColumnWidth,ze=Le.expandedKeys,Ke=Le.onRow,Pe=Le.rowExpandable,Ie=Le.emptyNode,Ce=Le.childrenColumnName,pe=S.useContext(Y),_e=pe.onColumnResize,Oe=S.useContext(t.a),we=Oe.prefixCls,Be=Oe.getComponent,qe=S.useContext(j),dt=qe.fixHeader,Et=qe.horizonScroll,It=qe.flattenColumns,Rt=qe.componentWidth;return S.useMemo(function(){var Ct=Be(["body","wrapper"],"tbody"),st=Be(["body","row"],"tr"),ut=Be(["body","cell"],"td"),$e;Me.length?$e=Me.map(function(Fe,ct){var tt=Xe(Fe,ct);return S.createElement(k,{key:tt,rowKey:tt,record:Fe,recordKey:tt,index:ct,rowComponent:st,cellComponent:ut,expandedKeys:ze,onRow:Ke,getRowKey:Xe,rowExpandable:Pe,childrenColumnName:Ce})}):$e=S.createElement(J,{expanded:!0,className:"".concat(we,"-placeholder"),prefixCls:we,fixHeader:dt,fixColumn:Et,horizonScroll:Et,component:st,componentWidth:Rt,cellComponent:ut,colSpan:It.length},Ie);var xe=Object(v.a)(It);return S.createElement(Ct,{className:"".concat(we,"-tbody")},et&&S.createElement("tr",{"aria-hidden":"true",className:"".concat(we,"-measure-row"),style:{height:0}},xe.map(function(Fe){return S.createElement(H,{key:Fe,columnKey:Fe,onColumnResize:_e})})),$e)},[Me,we,Ke,et,ze,Xe,Be,Rt,Ie,It])}var re=S.memo(Q);re.displayName="Body";var oe=re,me=z("wRmb"),he=z("xEkU"),Ee=z.n(he);function de(Le){var Me=Object(S.useRef)(Le),Xe=Object(S.useState)({}),et=Object(D.a)(Xe,2),ze=et[1],Ke=Object(S.useRef)(null),Pe=Object(S.useRef)([]);function Ie(Ce){Ke.current===null&&(Pe.current=[],Ke.current=Ee()(function(){Pe.current.forEach(function(pe){Me.current=pe(Me.current)}),Ke.current=null,ze({})})),Pe.current.push(Ce)}return Object(S.useEffect)(function(){return function(){Ee.a.cancel(Ke.current)}},[]),[Me.current,Ie]}function be(Le){var Me=Object(S.useRef)(Le),Xe=Object(S.useRef)(null);function et(){window.clearTimeout(Xe.current)}function ze(Pe){Me.current=Pe,et(),Xe.current=window.setTimeout(function(){Me.current=null,Xe.current=null},100)}function Ke(){return Me.current}return Object(S.useEffect)(function(){return et},[]),[ze,Ke]}function Ue(Le,Me,Xe){var et=Object(S.useMemo)(function(){for(var ze=[],Ke=[],Pe=0,Ie=0,Ce=0;Ce<Me;Ce+=1)if(Xe==="rtl"){Ke[Ce]=Ie,Ie+=Le[Ce]||0;var pe=Me-Ce-1;ze[pe]=Pe,Pe+=Le[pe]||0}else{ze[Ce]=Pe,Pe+=Le[Ce]||0;var _e=Me-Ce-1;Ke[_e]=Ie,Ie+=Le[_e]||0}return{left:ze,right:Ke}},[Le,Me,Xe]);return et}var Re=Ue;function De(Le){var Me=Le.className,Xe=Le.children;return S.createElement("div",{className:Me},Xe)}var je=De,ve=z("n6Qo");function ce(Le){var Me,Xe=Le.prefixCls,et=Le.record,ze=Le.onExpand,Ke=Le.expanded,Pe=Le.expandable,Ie="".concat(Xe,"-row-expand-icon");if(!Pe)return S.createElement("span",{className:C()(Ie,"".concat(Xe,"-row-spaced"))});var Ce=function(_e){ze(et,_e),_e.stopPropagation()};return S.createElement("span",{className:C()(Ie,(Me={},Object(ae.a)(Me,"".concat(Xe,"-row-expanded"),Ke),Object(ae.a)(Me,"".concat(Xe,"-row-collapsed"),!Ke),Me)),onClick:Ce})}function ke(Le,Me,Xe){var et=[];function ze(Ke){(Ke||[]).forEach(function(Pe,Ie){et.push(Me(Pe,Ie)),ze(Pe[Xe])})}return ze(Le),et}var Ne=z("zT1h"),Je=z("y0+3"),te=function(Me,Xe){var et,ze,Ke=Me.scrollBodyRef,Pe=Me.onScroll,Ie=Me.offsetScroll,Ce=S.useContext(t.a),pe=Ce.prefixCls,_e=((et=Ke.current)===null||et===void 0?void 0:et.scrollWidth)||0,Oe=((ze=Ke.current)===null||ze===void 0?void 0:ze.clientWidth)||0,we=_e&&Oe*(Oe/_e),Be=S.useRef(),qe=de({scrollLeft:0,isHiddenScrollBar:!1}),dt=Object(D.a)(qe,2),Et=dt[0],It=dt[1],Rt=S.useRef({delta:0,x:0}),Ct=S.useState(!1),st=Object(D.a)(Ct,2),ut=st[0],$e=st[1],xe=function(){$e(!1)},Fe=function(Qe){Qe.persist(),Rt.current.delta=Qe.pageX-Et.scrollLeft,Rt.current.x=0,$e(!0),Qe.preventDefault()},ct=function(Qe){var lt,xt=Qe||((lt=window)===null||lt===void 0?void 0:lt.event),Pt=xt.buttons;if(!ut||Pt===0){ut&&$e(!1);return}var zt=Rt.current.x+Qe.pageX-Rt.current.x-Rt.current.delta;zt<=0&&(zt=0),zt+we>=Oe&&(zt=Oe-we),Pe({scrollLeft:zt/Oe*(_e+2)}),Rt.current.x=Qe.pageX},tt=function(){var Qe=Object(Je.b)(Ke.current).top,lt=Qe+Ke.current.offsetHeight,xt=document.documentElement.scrollTop+window.innerHeight;lt-Object(n.a)()<=xt||Qe>=xt-Ie?It(function(Pt){return Object(ee.a)(Object(ee.a)({},Pt),{},{isHiddenScrollBar:!0})}):It(function(Pt){return Object(ee.a)(Object(ee.a)({},Pt),{},{isHiddenScrollBar:!1})})},wt=function(Qe){It(function(lt){return Object(ee.a)(Object(ee.a)({},lt),{},{scrollLeft:Qe/_e*Oe||0})})};return S.useImperativeHandle(Xe,function(){return{setScrollLeft:wt}}),S.useEffect(function(){var St=Object(Ne.a)(document.body,"mouseup",xe,!1),Qe=Object(Ne.a)(document.body,"mousemove",ct,!1);return tt(),function(){St.remove(),Qe.remove()}},[we,ut]),S.useEffect(function(){var St=Object(Ne.a)(window,"scroll",tt,!1),Qe=Object(Ne.a)(window,"resize",tt,!1);return function(){St.remove(),Qe.remove()}},[]),S.useEffect(function(){Et.isHiddenScrollBar||It(function(St){var Qe,lt;return Object(ee.a)(Object(ee.a)({},St),{},{scrollLeft:Ke.current.scrollLeft/((Qe=Ke.current)===null||Qe===void 0?void 0:Qe.scrollWidth)*((lt=Ke.current)===null||lt===void 0?void 0:lt.clientWidth)})})},[Et.isHiddenScrollBar]),_e<=Oe||!we||Et.isHiddenScrollBar?null:S.createElement("div",{style:{height:Object(n.a)(),width:Oe,bottom:Ie},className:"".concat(pe,"-sticky-scroll")},S.createElement("div",{onMouseDown:Fe,ref:Be,className:C()("".concat(pe,"-sticky-scroll-bar"),Object(ae.a)({},"".concat(pe,"-sticky-scroll-bar-active"),ut)),style:{width:"".concat(we,"px"),transform:"translate3d(".concat(Et.scrollLeft,"px, 0, 0)")}}))},P=S.forwardRef(te);function U(Le,Me){return S.useMemo(function(){var Xe=!!Le;return{isSticky:Xe,stickyClassName:Xe?"".concat(Me,"-sticky-header"):"",offsetHeader:Object(O.a)(Le)==="object"&&Le.offsetHeader||0,offsetScroll:Object(O.a)(Le)==="object"&&Le.offsetScroll||0}},[Le,Me])}var q=[],X={},$="rc-table-internal-hook",ge=S.memo(function(Le){var Me=Le.children;return Me},function(Le,Me){return p()(Le.props,Me.props)?Le.pingLeft!==Me.pingLeft||Le.pingRight!==Me.pingRight:!1});function Ae(Le){var Me,Xe=Le.prefixCls,et=Le.className,ze=Le.rowClassName,Ke=Le.style,Pe=Le.data,Ie=Le.rowKey,Ce=Le.scroll,pe=Le.tableLayout,_e=Le.direction,Oe=Le.title,we=Le.footer,Be=Le.summary,qe=Le.id,dt=Le.showHeader,Et=Le.components,It=Le.emptyText,Rt=Le.onRow,Ct=Le.onHeaderRow,st=Le.internalHooks,ut=Le.transformColumns,$e=Le.internalRefs,xe=Le.sticky,Fe=Pe||q,ct=!!Fe.length,tt=S.useState(0),wt=Object(D.a)(tt,2),St=wt[0],Qe=wt[1];S.useEffect(function(){Qe(Object(n.a)())});var lt=S.useMemo(function(){return Object(v.c)(Et,{})},[Et]),xt=S.useCallback(function(Dt,Gt){return Object(v.b)(lt,Dt)||Gt},[lt]),Pt=S.useMemo(function(){return typeof Ie=="function"?Ie:function(Dt){var Gt=Dt&&Dt[Ie];return Gt}},[Ie]),zt=Object(x.c)(Le),Se=zt.expandIcon,fe=zt.expandedRowKeys,G=zt.defaultExpandedRowKeys,Z=zt.defaultExpandAllRows,ne=zt.expandedRowRender,se=zt.onExpand,Te=zt.onExpandedRowsChange,Ge=zt.expandRowByClick,Ze=zt.rowExpandable,bt=zt.expandIconColumnIndex,At=zt.expandedRowClassName,it=zt.childrenColumnName,Tt=zt.indentSize,Qt=Se||ce,yt=it||"children",nn=S.useMemo(function(){return ne?"row":Le.expandable&&st===$&&Le.expandable.__PARENT_RENDER_ICON__||Fe.some(function(Dt){return Dt&&Object(O.a)(Dt)==="object"&&Dt[yt]})?"nest":!1},[!!ne,Fe]),Jt=S.useState(function(){return G||(Z?ke(Fe,Pt,yt):[])}),Nt=Object(D.a)(Jt,2),vt=Nt[0],Tn=Nt[1],mt=S.useMemo(function(){return new Set(fe||vt||[])},[fe,vt]),ln=S.useCallback(function(Dt){var Gt=Pt(Dt,Fe.indexOf(Dt)),Ft,ht=mt.has(Gt);ht?(mt.delete(Gt),Ft=Object(B.a)(mt)):Ft=[].concat(Object(B.a)(mt),[Gt]),Tn(Ft),se&&se(!ht,Dt),Te&&Te(Ft)},[Pt,mt,Fe,se,Te]),fn=S.useState(0),Zn=Object(D.a)(fn,2),rr=Zn[0],xn=Zn[1],Er=Object(me.b)(Object(ee.a)(Object(ee.a)(Object(ee.a)({},Le),zt),{},{expandable:!!ne,expandedKeys:mt,getRowKey:Pt,onTriggerExpand:ln,expandIcon:Qt,expandIconColumnIndex:bt,direction:_e}),st===$?ut:null),Or=Object(D.a)(Er,2),un=Or[0],Pn=Or[1],Nr=S.useMemo(function(){return{columns:un,flattenColumns:Pn}},[un,Pn]),Xr=S.useRef(),xr=S.useRef(),ur=S.useRef(),vr=S.useState(!1),vi=Object(D.a)(vr,2),pr=vi[0],_r=vi[1],Cr=S.useState(!1),Hr=Object(D.a)(Cr,2),Tr=Hr[0],ui=Hr[1],Dr=de(new Map),_i=Object(D.a)(Dr,2),ci=_i[0],ni=_i[1],Ii=Object(v.a)(Pn),Ni=Ii.map(function(Dt){return ci.get(Dt)}),Ui=S.useMemo(function(){return Ni},[Ni.join("_")]),di=Re(Ui,Pn.length,_e),mr=Ce&&Object(v.d)(Ce.y),dr=Ce&&Object(v.d)(Ce.x),qr=dr&&Pn.some(function(Dt){var Gt=Dt.fixed;return Gt}),ri=S.useRef(),fi=U(xe,Xe),ii=fi.isSticky,Xi=fi.offsetHeader,na=fi.offsetScroll,ai=fi.stickyClassName,Yi,Zr,Wi;mr&&(Zr={overflowY:"scroll",maxHeight:Ce.y}),dr&&(Yi={overflowX:"auto"},mr||(Zr={overflowY:"hidden"}),Wi={width:Ce.x===!0?"auto":Ce.x,minWidth:"100%"});var Di=S.useCallback(function(Dt,Gt){ni(function(Ft){var ht=new Map(Ft);return ht.set(Dt,Gt),ht})},[]),Oi=be(null),$i=Object(D.a)(Oi,2),yi=$i[0],Ji=$i[1];function Qi(Dt,Gt){if(!Gt)return;typeof Gt=="function"?Gt(Dt):Gt.scrollLeft!==Dt&&(Gt.scrollLeft=Dt)}var hi=function(Gt){var Ft=Gt.currentTarget,ht=Gt.scrollLeft,ft=typeof ht=="number"?ht:Ft.scrollLeft,Bt=Ft||X;if(!Ji()||Ji()===Bt){var gt;yi(Bt),Qi(ft,xr.current),Qi(ft,ur.current),Qi(ft,(gt=ri.current)===null||gt===void 0?void 0:gt.setScrollLeft)}if(Ft){var Zt=Ft.scrollWidth,Lt=Ft.clientWidth;_r(ft>0),ui(ft<Zt-Lt)}},Zi=function(){ur.current&&hi({currentTarget:ur.current})},tn=function(Gt){var Ft=Gt.width;Zi(),xn(Xr.current?Xr.current.offsetWidth:Ft)};S.useEffect(function(){return Zi},[]),S.useEffect(function(){dr&&Zi()},[dr]),S.useEffect(function(){st===$&&$e&&($e.body.current=ur.current)});var _n=xt(["table"],"table"),an=S.useMemo(function(){return pe||(qr?Ce.x==="max-content"?"auto":"fixed":mr||Pn.some(function(Dt){var Gt=Dt.ellipsis;return Gt})?"fixed":"auto")},[mr,qr,Pn,pe]),Ln,Xn={colWidths:Ui,columCount:Pn.length,stickyOffsets:di,onHeaderRow:Ct,fixHeader:mr},or=S.useMemo(function(){return ct?null:typeof It=="function"?It():It},[ct,It]),Xt=S.createElement(oe,{data:Fe,measureColumnWidth:mr||dr||ii,expandedKeys:mt,rowExpandable:Ze,getRowKey:Pt,onRow:Rt,emptyNode:or,childrenColumnName:yt}),yr=S.createElement(E,{colWidths:Pn.map(function(Dt){var Gt=Dt.width;return Gt}),columns:Pn}),Kr=Be&&S.createElement(ve.b,null,Be(Fe)),Mn=xt(["body"]);if(mr||ii){var Ci;typeof Mn=="function"?(Ci=Mn(Fe,{scrollbarSize:St,ref:ur,onScroll:hi}),Xn.colWidths=Pn.map(function(Dt,Gt){var Ft=Dt.width,ht=Gt===un.length-1?Ft-St:Ft;return typeof ht=="number"&&!Number.isNaN(ht)?ht:(Object(c.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Ci=S.createElement("div",{style:Object(ee.a)(Object(ee.a)({},Yi),Zr),onScroll:hi,ref:ur,className:C()("".concat(Xe,"-body"))},S.createElement(_n,{style:Object(ee.a)(Object(ee.a)({},Wi),{},{tableLayout:an})},yr,Xt,Kr),ii&&S.createElement(P,{ref:ri,offsetScroll:na,scrollBodyRef:ur,onScroll:hi})),Ln=S.createElement(S.Fragment,null,dt!==!1&&S.createElement(R,Object.assign({noData:!Fe.length},Xn,Nr,{direction:_e,offsetHeader:Xi,stickyClassName:ai,ref:xr,onScroll:hi})),Ci)}else Ln=S.createElement("div",{style:Object(ee.a)(Object(ee.a)({},Yi),Zr),className:C()("".concat(Xe,"-content")),onScroll:hi,ref:ur},S.createElement(_n,{style:Object(ee.a)(Object(ee.a)({},Wi),{},{tableLayout:an})},yr,dt!==!1&&S.createElement(_,Object.assign({},Xn,Nr)),Xt,Kr));var nr=Object(x.b)(Le),Ur=S.createElement("div",Object.assign({className:C()(Xe,et,(Me={},Object(ae.a)(Me,"".concat(Xe,"-rtl"),_e==="rtl"),Object(ae.a)(Me,"".concat(Xe,"-ping-left"),pr),Object(ae.a)(Me,"".concat(Xe,"-ping-right"),Tr),Object(ae.a)(Me,"".concat(Xe,"-layout-fixed"),pe==="fixed"),Object(ae.a)(Me,"".concat(Xe,"-fixed-header"),mr),Object(ae.a)(Me,"".concat(Xe,"-fixed-column"),qr),Object(ae.a)(Me,"".concat(Xe,"-scroll-horizontal"),dr),Object(ae.a)(Me,"".concat(Xe,"-has-fix-left"),Pn[0]&&Pn[0].fixed),Object(ae.a)(Me,"".concat(Xe,"-has-fix-right"),Pn[Pn.length-1]&&Pn[Pn.length-1].fixed==="right"),Me)),style:Ke,id:qe,ref:Xr},nr),S.createElement(ge,{pingLeft:pr,pingRight:Tr,props:Object(ee.a)(Object(ee.a)({},Le),{},{stickyOffsets:di,mergedExpandedKeys:mt})},Oe&&S.createElement(je,{className:"".concat(Xe,"-title")},Oe(Fe)),S.createElement("div",{className:"".concat(Xe,"-container")},Ln),we&&S.createElement(je,{className:"".concat(Xe,"-footer")},we(Fe))));dr&&(Ur=S.createElement(s.a,{onResize:tn},Ur));var rt=S.useMemo(function(){return{prefixCls:Xe,getComponent:xt,scrollbarSize:St,direction:_e,fixedInfoList:Pn.map(function(Dt,Gt){return d(Gt,Gt,Pn,di,_e)}),isSticky:ii}},[Xe,xt,St,_e,Pn,di,_e,ii]),pt=S.useMemo(function(){return Object(ee.a)(Object(ee.a)({},Nr),{},{tableLayout:an,rowClassName:ze,expandedRowClassName:At,componentWidth:rr,fixHeader:mr,fixColumn:qr,horizonScroll:dr,expandIcon:Qt,expandableType:nn,expandRowByClick:Ge,expandedRowRender:ne,onTriggerExpand:ln,expandIconColumnIndex:bt,indentSize:Tt})},[Nr,an,ze,At,rr,mr,qr,dr,Qt,nn,Ge,ne,ln,bt,Tt]),Mt=S.useMemo(function(){return{onColumnResize:Di}},[Di]);return S.createElement(t.a.Provider,{value:rt},S.createElement(j.Provider,{value:pt},S.createElement(Y.Provider,{value:Mt},Ur)))}Ae.Column=i.a,Ae.ColumnGroup=o.a,Ae.Summary=ve.a,Ae.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var at=We.b=Ae},wRmb:function(Ye,We,z){"use strict";z.d(We,"a",function(){return p});var ae=z("rePB"),ee=z("KQm4"),B=z("VTBJ"),O=z("Ff2n"),D=z("cDcd"),S=z.n(D),A=z("Kwbf"),C=z("Zm9Q"),h=z("hW8S");function p(i){return Object(C.a)(i).filter(function(l){return D.isValidElement(l)}).map(function(l){var a=l.key,r=l.props,t=r.children,d=Object(O.a)(r,["children"]),v=Object(B.a)({key:a},d);return t&&(v.children=p(t)),v})}function c(i){return i.reduce(function(l,a){var r=a.fixed,t=r===!0?"left":r,d=a.children;return d&&d.length>0?[].concat(Object(ee.a)(l),Object(ee.a)(c(d).map(function(v){return Object(B.a)({fixed:t},v)}))):[].concat(Object(ee.a)(l),[Object(B.a)(Object(B.a)({},a),{},{fixed:t})])},[])}function s(i){for(var l=!0,a=0;a<i.length;a+=1){var r=i[a];if(l&&r.fixed!=="left")l=!1;else if(!l&&r.fixed==="left"){Object(A.a)(!1,"Index ".concat(a-1," of `columns` missing `fixed='left'` prop."));break}}for(var t=!0,d=i.length-1;d>=0;d-=1){var v=i[d];if(t&&v.fixed!=="right")t=!1;else if(!t&&v.fixed==="right"){Object(A.a)(!1,"Index ".concat(d+1," of `columns` missing `fixed='right'` prop."));break}}}function n(i){return i.map(function(l){var a=l.fixed,r=Object(O.a)(l,["fixed"]),t=a;return a==="left"?t="right":a==="right"&&(t="left"),Object(B.a)({fixed:t},r)})}function o(i,l){var a=i.prefixCls,r=i.columns,t=i.children,d=i.expandable,v=i.expandedKeys,y=i.getRowKey,b=i.onTriggerExpand,g=i.expandIcon,m=i.rowExpandable,_=i.expandIconColumnIndex,x=i.direction,f=i.expandRowByClick,E=D.useMemo(function(){return r||p(t)},[r,t]),w=D.useMemo(function(){if(d){var N,j=_||0,W=E[j],J=(N={},Object(ae.a)(N,h.a,{className:"".concat(a,"-expand-icon-col")}),Object(ae.a)(N,"title",""),Object(ae.a)(N,"fixed",W?W.fixed:null),Object(ae.a)(N,"className","".concat(a,"-row-expand-icon-cell")),Object(ae.a)(N,"render",function(K,Y,H){var Q=y(Y,H),re=v.has(Q),oe=m?m(Y):!0,me=g({prefixCls:a,expanded:re,expandable:oe,record:Y,onExpand:b});return f?D.createElement("span",{onClick:function(Ee){return Ee.stopPropagation()}},me):me}),N),F=E.slice();return j>=0&&F.splice(j,0,J),F}return E},[d,E,y,v,g,x]),T=D.useMemo(function(){var N=w;return l&&(N=l(N)),N.length||(N=[{render:function(){return null}}]),N},[l,w,x]),R=D.useMemo(function(){return x==="rtl"?n(c(T)):c(T)},[T,x]);return[T,R]}We.b=o},wW8i:function(Ye,We,z){Ye.exports={flex_box_center:"flex_box_center___3xqQI",flex_space_between:"flex_space_between___1fvHN",flex_box_vertical_center:"flex_box_vertical_center___1Gb4J",flex_box_center_end:"flex_box_center_end___8RbQi",flex_box_column:"flex_box_column___3xL78",discuss:"discuss___ybobd",reply:"reply___3EgHc",pagination:"pagination___2EiMG"}},"y0+3":function(Ye,We,z){"use strict";z.d(We,"a",function(){return c}),z.d(We,"b",function(){return n});var ae=/margin|padding|width|height|max|min|offset/,ee={left:!0,top:!0},B={cssFloat:1,styleFloat:1,float:1};function O(o){return o.nodeType===1?o.ownerDocument.defaultView.getComputedStyle(o,null):{}}function D(o,i,l){if(i=i.toLowerCase(),l==="auto"){if(i==="height")return o.offsetHeight;if(i==="width")return o.offsetWidth}return i in ee||(ee[i]=ae.test(i)),ee[i]?parseFloat(l)||0:l}function S(o,i){var l=arguments.length,a=O(o);return i=B[i]?"cssFloat"in o.style?"cssFloat":"styleFloat":i,l===1?a:D(o,i,a[i]||o.style[i])}function A(o,i,l){var a=arguments.length;if(i=B[i]?"cssFloat"in o.style?"cssFloat":"styleFloat":i,a===3)return typeof l=="number"&&ae.test(i)&&(l="".concat(l,"px")),o.style[i]=l,l;for(var r in i)i.hasOwnProperty(r)&&A(o,r,i[r]);return O(o)}function C(o){return o===document.body?document.documentElement.clientWidth:o.offsetWidth}function h(o){return o===document.body?window.innerHeight||document.documentElement.clientHeight:o.offsetHeight}function p(){var o=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),i=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:o,height:i}}function c(){var o=document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight;return{width:o,height:i}}function s(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function n(o){var i=o.getBoundingClientRect(),l=document.documentElement;return{left:i.left+(window.pageXOffset||l.scrollLeft)-(l.clientLeft||document.body.clientLeft||0),top:i.top+(window.pageYOffset||l.scrollTop)-(l.clientTop||document.body.clientTop||0)}}},ynwM:function(Ye,We,z){var ae=z("MFOe"),ee=ae.Global;Ye.exports={name:"oldFF-globalStorage",read:O,write:D,each:S,remove:A,clearAll:C};var B=ee.globalStorage;function O(h){return B[h]}function D(h,p){B[h]=p}function S(h){for(var p=B.length-1;p>=0;p--){var c=B.key(p);h(B[c],c)}}function A(h){return B.removeItem(h)}function C(){S(function(h,p){delete B[h]})}}}]);
|