You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Exerc...

445 lines
1.4 MiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[62,3,5,6,7,8,9],{"+NIl":function(We,se,B){(function(Z){Z(B("VrN/"))})(function(Z){"use strict";Z.defineMode("stex",function(G,U){"use strict";function V(c,r){c.cmdState.push(r)}function W(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function M(c){var r=c.cmdState.pop();r&&r.closeBracket()}function K(c){for(var r=c.cmdState,d=r.length-1;d>=0;d--){var u=r[d];if(u.name=="DEFAULT")continue;return u}return{styleIdentifier:function(){return null}}}function j(c,r,d){return function(){this.name=c,this.bracketNo=0,this.style=r,this.styles=d,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var n={};n.importmodule=j("importmodule","tag",["string","builtin"]),n.documentclass=j("documentclass","tag",["","atom"]),n.usepackage=j("usepackage","tag",["atom"]),n.begin=j("begin","tag",["atom"]),n.end=j("end","tag",["atom"]),n.label=j("label","tag",["atom"]),n.ref=j("ref","tag",["atom"]),n.eqref=j("eqref","tag",["atom"]),n.cite=j("cite","tag",["atom"]),n.bibitem=j("bibitem","tag",["atom"]),n.Bibitem=j("Bibitem","tag",["atom"]),n.RBibitem=j("RBibitem","tag",["atom"]),n.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function w(c,r){c.f=r}function m(c,r){var d;if(c.match(/^\\[a-zA-Z@]+/)){var u=c.current().slice(1);return d=n.hasOwnProperty(u)?n[u]:n.DEFAULT,d=new d,V(r,d),w(r,p),d.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return w(r,function(s,a){return f(s,a,"\\]")}),"keyword";if(c.match("\\("))return w(r,function(s,a){return f(s,a,"\\)")}),"keyword";if(c.match("$$"))return w(r,function(s,a){return f(s,a,"$$")}),"keyword";if(c.match("$"))return w(r,function(s,a){return f(s,a,"$")}),"keyword";var o=c.next();if(o=="%")return c.skipToEnd(),"comment";if(o=="}"||o=="]"){if(d=W(r),d)d.closeBracket(o),w(r,p);else return"error";return"bracket"}else return o=="{"||o=="["?(d=n.DEFAULT,d=new d,V(r,d),"bracket"):/\d/.test(o)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),d=K(r),d.name=="begin"&&(d.argument=c.current()),d.styleIdentifier())}function f(c,r,d){if(c.eatSpace())return null;if(d&&c.match(d))return w(r,m),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var u=c.next();return u=="{"||u=="}"||u=="["||u=="]"||u=="("||u==")"?"bracket":u=="%"?(c.skipToEnd(),"comment"):"error"}function p(c,r){var d=c.peek(),u;return d=="{"||d=="["?(u=W(r),u.openBracket(d),c.eat(d),w(r,m),"bracket"):/[ \t\r]/.test(d)?(c.eat(d),null):(w(r,m),M(r),m(c,r))}return{startState:function(){var c=U.inMathMode?function(r,d){return f(r,d)}:m;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,r){return r.f(c,r)},blankLine:function(c){c.f=m,c.cmdState.length=0},lineComment:"%"}}),Z.defineMIME("text/x-stex","stex"),Z.defineMIME("text/x-latex","stex")})},"+ua5":function(We,se,B){},"/GNS":function(We,se,B){We.exports=B.p+"static/search1.c4136dd4.png"},"/cxE":function(We,se,B){"use strict";B.d(se,"f",function(){return U}),B.d(se,"g",function(){return V}),B.d(se,"h",function(){return W}),B.d(se,"e",function(){return K}),B.d(se,"b",function(){return j}),B.d(se,"c",function(){return n}),B.d(se,"d",function(){return w}),B.d(se,"a",function(){return m});class Z{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(f){setTimeout(()=>{throw f.stack?new Error(f.message+`
`+f.stack):f},0)}}emit(f){this.listeners.forEach(p=>{p(f)})}onUnexpectedError(f){this.unexpectedErrorHandler(f),this.emit(f)}onUnexpectedExternalError(f){this.unexpectedErrorHandler(f)}}const G=new Z;function U(f){K(f)||G.onUnexpectedError(f);return}function V(f){K(f)||G.onUnexpectedExternalError(f);return}function W(f){if(f instanceof Error){let{name:p,message:c}=f;const r=f.stacktrace||f.stack;return{$isError:!0,name:p,message:c,stack:r}}return f}const M="Canceled";function K(f){return f instanceof Error&&f.name===M&&f.message===M}function j(){const f=new Error(M);return f.name=f.message,f}function n(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}function w(f){return f?new Error(`Illegal state: ${f}`):new Error("Illegal state")}class m extends Error{constructor(f){super("NotSupported");f&&(this.message=f)}}},"19Vz":function(We,se,B){(function(Z){Z(B("VrN/"))})(function(Z){Z.defineOption("placeholder","",function(j,n,w){var m=w&&w!=Z.Init;if(n&&!m)j.on("blur",W),j.on("change",M),j.on("swapDoc",M),Z.on(j.getInputField(),"compositionupdate",j.state.placeholderCompose=function(){V(j)}),M(j);else if(!n&&m){j.off("blur",W),j.off("change",M),j.off("swapDoc",M),Z.off(j.getInputField(),"compositionupdate",j.state.placeholderCompose),G(j);var f=j.getWrapperElement();f.className=f.className.replace(" CodeMirror-empty","")}n&&!j.hasFocus()&&W(j)});function G(j){j.state.placeholder&&(j.state.placeholder.parentNode.removeChild(j.state.placeholder),j.state.placeholder=null)}function U(j){G(j);var n=j.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=j.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var w=j.getOption("placeholder");typeof w=="string"&&(w=document.createTextNode(w)),n.appendChild(w),j.display.lineSpace.insertBefore(n,j.display.lineSpace.firstChild)}function V(j){setTimeout(function(){var n=!1,w=j.getInputField();w.nodeName=="TEXTAREA"?n=!w.value:j.lineCount()==1&&(n=!/[^\u200b]/.test(w.querySelector(".CodeMirror-line").textContent)),n?U(j):G(j)},20)}function W(j){K(j)&&U(j)}function M(j){var n=j.getWrapperElement(),w=K(j);n.className=n.className.replace(" CodeMirror-empty","")+(w?" CodeMirror-empty":""),w?U(j):G(j)}function K(j){return j.lineCount()===1&&j.getLine(0)===""}})},"1eCo":function(We,se,B){(function(Z){Z(B("VrN/"))})(function(Z){"use strict";var G={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},U={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Z.defineMode("xml",function(V,W){var M=V.indentUnit,K={},j=W.htmlMode?G:U;for(var n in j)K[n]=j[n];for(var n in W)K[n]=W[n];var w,m;function f(h,C){function x(k){return C.tokenize=k,k(h,C)}var g=h.next();if(g=="<")return h.eat("!")?h.eat("[")?h.match("CDATA[")?x(r("atom","]]>")):null:h.match("--")?x(r("comment","-->")):h.match("DOCTYPE",!0,!0)?(h.eatWhile(/[\w\._\-]/),x(d(1))):null:h.eat("?")?(h.eatWhile(/[\w\._\-]/),C.tokenize=r("meta","?>"),"meta"):(w=h.eat("/")?"closeTag":"openTag",C.tokenize=p,"tag bracket");if(g=="&"){var P;return h.eat("#")?h.eat("x")?P=h.eatWhile(/[a-fA-F\d]/)&&h.eat(";"):P=h.eatWhile(/[\d]/)&&h.eat(";"):P=h.eatWhile(/[\w\.\-:]/)&&h.eat(";"),P?"atom":"error"}else return h.eatWhile(/[^&<]/),null}f.isInText=!0;function p(h,C){var x=h.next();if(x==">"||x=="/"&&h.eat(">"))return C.tokenize=f,w=x==">"?"endTag":"selfcloseTag","tag bracket";if(x=="=")return w="equals",null;if(x=="<"){C.tokenize=f,C.state=a,C.tagName=C.tagStart=null;var g=C.tokenize(h,C);return g?g+" tag error":"tag error"}else return/[\'\"]/.test(x)?(C.tokenize=c(x),C.stringStartCol=h.column(),C.tokenize(h,C)):(h.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(h){var C=function(x,g){for(;!x.eol();)if(x.next()==h){g.tokenize=p;break}return"string"};return C.isInAttribute=!0,C}function r(h,C){return function(x,g){for(;!x.eol();){if(x.match(C)){g.tokenize=f;break}x.next()}return h}}function d(h){return function(C,x){for(var g;(g=C.next())!=null;){if(g=="<")return x.tokenize=d(h+1),x.tokenize(C,x);if(g==">")if(h==1){x.tokenize=f;break}else return x.tokenize=d(h-1),x.tokenize(C,x)}return"meta"}}function u(h,C,x){this.prev=h.context,this.tagName=C,this.indent=h.indented,this.startOfLine=x,(K.doNotIndent.hasOwnProperty(C)||h.context&&h.context.noIndent)&&(this.noIndent=!0)}function o(h){h.context&&(h.context=h.context.prev)}function s(h,C){for(var x;;){if(!h.context)return;if(x=h.context.tagName,!K.contextGrabbers.hasOwnProperty(x)||!K.contextGrabbers[x].hasOwnProperty(C))return;o(h)}}function a(h,C,x){return h=="openTag"?(x.tagStart=C.column(),R):h=="closeTag"?O:a}function R(h,C,x){return h=="word"?(x.tagName=C.current(),m="tag",I):K.allowMissingTagName&&h=="endTag"?(m="tag bracket",I(h,C,x)):(m="error",R)}function O(h,C,x){if(h=="word"){var g=C.current();return x.context&&x.context.tagName!=g&&K.implicitlyClosed.hasOwnProperty(x.context.tagName)&&o(x),x.context&&x.context.tagName==g||K.matchClosing===!1?(m="tag",S):(m="tag error",D)}else return K.allowMissingTagName&&h=="endTag"?(m="tag bracket",S(h,C,x)):(m="error",D)}function S(h,C,x){return h!="endTag"?(m="error",S):(o(x),a)}function D(h,C,x){return m="error",S(h,C,x)}function I(h,C,x){if(h=="word")return m="attribute",_;if(h=="endTag"||h=="selfcloseTag"){var g=x.tagName,P=x.tagStart;return x.tagName=x.tagStart=null,h=="selfcloseTag"||K.autoSelfClosers.hasOwnProperty(g)?s(x,g):(s(x,g),x.context=new u(x,g,P==x.indented)),a}return m="error",I}function _(h,C,x){return h=="equals"?b:(K.allowMissing||(m="error"),I(h,C,x))}function b(h,C,x){return h=="string"?v:h=="word"&&K.allowUnquoted?(m="string",I):(m="error",I(h,C,x))}function v(h,C,x){return h=="string"?v:I(h,C,x)}return{startState:function(h){var C={tokenize:f,state:a,indented:h||0,tagName:null,tagStart:null,context:null};return h!=null&&(C.baseIndent=h),C},token:function(h,C){if(!C.tagName&&h.sol()&&(C.indented=h.indentation()),h.eatSpace())return null;w=null;var x=C.tokenize(h,C);return(x||w)&&x!="comment"&&(m=null,C.state=C.state(w||x,h,C),m&&(x=m=="error"?x+" error":m)),x},indent:function(h,C,x){var g=h.context;if(h.tokenize.isInAttribute)return h.tagStart==h.indented?h.stringStartCol+1:h.indented+M;if(g&&g.noIndent)return Z.Pass;if(h.tokenize!=p&&h.tokenize!=f)return x?x.match(/^(\s*)/)[0].length:0;if(h.tagName)return K.multilineTagIndentPastTag!==!1?h.tagStart+h.tagName.length+2:h.tagStart+M*(K.multilineTagIndentFactor||1);if(K.alignCDATA&&/<!\[CDATA\[/.test(C))return 0;var P=C&&/^<(\/)?([\w_:\.-]*)/.exec(C);if(P&&P[1])for(;g;)if(g.tagName==P[2]){g=g.prev;break}else if(K.implicitlyClosed.hasOwnProperty(g.tagName))g=g.prev;else break;else if(P)for(;g;){var k=K.contextGrabbers[g.tagName];if(k&&k.hasOwnProperty(P[2]))g=g.prev;else break}for(;g&&g.prev&&!g.startOfLine;)g=g.prev;return g?g.indent+M:h.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:K.htmlMode?"html":"xml",helperType:K.htmlMode?"html":"xml",skipAttribute:function(h){h.state==b&&(h.state=I)},xmlCurrentTag:function(h){return h.tagName?{name:h.tagName,close:h.type=="closeTag"}:null},xmlCurrentContext:function(h){for(var C=[],x=h.context;x;x=x.prev)x.tagName&&C.push(x.tagName);return C.reverse()}}}),Z.defineMIME("text/xml","xml"),Z.defineMIME("application/xml","xml"),Z.mimeModes.hasOwnProperty("text/html")||Z.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(We,se,B){"use strict";B.d(se,"d",function(){return it}),B.d(se,"b",function(){return Ae}),B.d(se,"c",function(){return ot}),B.d(se,"a",function(){return Dt});var Z=B("VTBJ"),G=B("1OyB"),U=B("vuIU"),V=B("JX7q"),W=B("Ji7U"),M=B("LK+K"),K=B("q1tI"),j=B("I8Z2"),n=B("BGR+"),w=B("wx14"),m=B("rePB"),f=B("4IlW"),p=B("2GS6"),c=B("Gytx"),r=B.n(c),d=B("TSYQ"),u=B.n(d),o=B("U8pU"),s=B("ODXe"),a=/iPhone/i,R=/iPod/i,O=/iPad/i,S=/\bAndroid(?:.+)Mobile\b/i,D=/Android/i,I=/\bAndroid(?:.+)SD4930UR\b/i,_=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,b=/Windows Phone/i,v=/\bWindows(?:.+)ARM\b/i,h=/BlackBerry/i,C=/BB10/i,x=/Opera Mini/i,g=/\b(CriOS|Chrome)(?:.+)Mobile/i,P=/Mobile(?:.+)Firefox\b/i;function k(vt,$e){return vt.test($e)}function y(vt){var $e=vt||(typeof navigator!="undefined"?navigator.userAgent:""),et=$e.split("[FBAN");if(typeof et[1]!="undefined"){var Ye=et,ce=Object(s.a)(Ye,1);$e=ce[0]}if(et=$e.split("Twitter"),typeof et[1]!="undefined"){var xe=et,at=Object(s.a)(xe,1);$e=at[0]}var Je={apple:{phone:k(a,$e)&&!k(b,$e),ipod:k(R,$e),tablet:!k(a,$e)&&k(O,$e)&&!k(b,$e),device:(k(a,$e)||k(R,$e)||k(O,$e))&&!k(b,$e)},amazon:{phone:k(I,$e),tablet:!k(I,$e)&&k(_,$e),device:k(I,$e)||k(_,$e)},android:{phone:!k(b,$e)&&k(I,$e)||!k(b,$e)&&k(S,$e),tablet:!k(b,$e)&&!k(I,$e)&&!k(S,$e)&&(k(_,$e)||k(D,$e)),device:!k(b,$e)&&(k(I,$e)||k(_,$e)||k(S,$e)||k(D,$e))||k(/\bokhttp\b/i,$e)},windows:{phone:k(b,$e),tablet:k(v,$e),device:k(b,$e)||k(v,$e)},other:{blackberry:k(h,$e),blackberry10:k(C,$e),opera:k(x,$e),firefox:k(P,$e),chrome:k(g,$e),device:k(h,$e)||k(C,$e)||k(x,$e)||k(P,$e)||k(g,$e)},any:null,phone:null,tablet:null};return Je.any=Je.apple.device||Je.android.device||Je.windows.device||Je.other.device,Je.phone=Je.apple.phone||Je.android.phone||Je.windows.phone,Je.tablet=Je.apple.tablet||Je.android.tablet||Je.windows.tablet,Je}var A=Object(Z.a)(Object(Z.a)({},y()),{},{isMobile:y}),F=A;function T(){}function Y(vt,$e,et){var Ye=$e||"";return vt.key||"".concat(Ye,"item_").concat(et)}function $(vt){return"".concat(vt,"-menu-")}function le(vt,$e){var et=-1;K.Children.forEach(vt,function(Ye){et+=1,Ye&&Ye.type&&Ye.type.isMenuItemGroup?K.Children.forEach(Ye.props.children,function(ce){et+=1,$e(ce,et)}):$e(Ye,et)})}function de(vt,$e,et){if(!vt||et.find)return;K.Children.forEach(vt,function(Ye){if(Ye){var ce=Ye.type;if(!ce||!(ce.isSubMenu||ce.isMenuItem||ce.isMenuItemGroup))return;$e.indexOf(Ye.key)!==-1?et.find=!0:Ye.props.children&&de(Ye.props.children,$e,et)}})}var Pe=["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"],Se=function($e){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ye=$e&&typeof $e.getBoundingClientRect=="function"&&$e.getBoundingClientRect().width;if(Ye){if(et){var ce=getComputedStyle($e),xe=ce.marginLeft,at=ce.marginRight;Ye+=+xe.replace("px","")+ +at.replace("px","")}Ye=+Ye.toFixed(6)}return Ye||0},we=function($e,et,Ye){$e&&Object(o.a)($e.style)==="object"&&($e.style[et]=Ye)},Fe=function(){return F.any},Me=B("KQm4"),me=B("Ff2n"),pe=B("i8i4"),ne=B("bdgK"),Ee=B("uciX"),ae=B("8XRh"),ke={adjustX:1,adjustY:1},je={topLeft:{points:["bl","tl"],overflow:ke,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ke,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ke,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ke,offset:[4,0]}},Oe={topLeft:{points:["bl","tl"],overflow:ke,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ke,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ke,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ke,offset:[4,0]}},Ve=je,qe=0,ue={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ve=function($e,et,Ye){var ce=$(et),xe=$e.getState();$e.setState({defaultActiveFirst:Object(Z.a)(Object(Z.a)({},xe.defaultActiveFirst),{},Object(m.a)({},ce,Ye))})},De=function(vt){Object(W.a)(et,vt);var $e=Object(M.a)(et);function et(Ye){var ce;Object(G.a)(this,et),ce=$e.call(this,Ye),ce.onDestroy=function(Be){ce.props.onDestroy(Be)},ce.onKeyDown=function(Be){var Ze=Be.keyCode,nt=ce.menuInstance,ut=ce.props,Et=ut.isOpen,st=ut.store;if(Ze===f.a.ENTER)return ce.onTitleClick(Be),ve(st,ce.props.eventKey,!0),!0;if(Ze===f.a.RIGHT)return Et?nt.onKeyDown(Be):(ce.triggerOpenChange(!0),ve(st,ce.props.eventKey,!0)),!0;if(Ze===f.a.LEFT){var Ut;if(Et)Ut=nt.onKeyDown(Be);else return;return Ut||(ce.triggerOpenChange(!1),Ut=!0),Ut}return Et&&(Ze===f.a.UP||Ze===f.a.DOWN)?nt.onKeyDown(Be):void 0},ce.onOpenChange=function(Be){ce.props.onOpenChange(Be)},ce.onPopupVisibleChange=function(Be){ce.triggerOpenChange(Be,Be?"mouseenter":"mouseleave")},ce.onMouseEnter=function(Be){var Ze=ce.props,nt=Ze.eventKey,ut=Ze.onMouseEnter,Et=Ze.store;ve(Et,ce.props.eventKey,!1),ut({key:nt,domEvent:Be})},ce.onMouseLeave=function(Be){var Ze=ce.props,nt=Ze.parentMenu,ut=Ze.eventKey,Et=Ze.onMouseLeave;nt.subMenuInstance=Object(V.a)(ce),Et({key:ut,domEvent:Be})},ce.onTitleMouseEnter=function(Be){var Ze=ce.props,nt=Ze.eventKey,ut=Ze.onItemHover,Et=Ze.onTitleMouseEnter;ut({key:nt,hover:!0}),Et({key:nt,domEvent:Be})},ce.onTitleMouseLeave=function(Be){var Ze=ce.props,nt=Ze.parentMenu,ut=Ze.eventKey,Et=Ze.onItemHover,st=Ze.onTitleMouseLeave;nt.subMenuInstance=Object(V.a)(ce),Et({key:ut,hover:!1}),st({key:ut,domEvent:Be})},ce.onTitleClick=function(Be){var Ze=Object(V.a)(ce),nt=Ze.props;if(nt.onTitleClick({key:nt.eventKey,domEvent:Be}),nt.triggerSubMenuAction==="hover")return;ce.triggerOpenChange(!nt.isOpen,"click"),ve(nt.store,ce.props.eventKey,!1)},ce.onSubMenuClick=function(Be){typeof ce.props.onClick=="function"&&ce.props.onClick(ce.addKeyPath(Be))},ce.onSelect=function(Be){ce.props.onSelect(Be)},ce.onDeselect=function(Be){ce.props.onDeselect(Be)},ce.getPrefixCls=function(){return"".concat(ce.props.rootPrefixCls,"-submenu")},ce.getActiveClassName=function(){return"".concat(ce.getPrefixCls(),"-active")},ce.getDisabledClassName=function(){return"".concat(ce.getPrefixCls(),"-disabled")},ce.getSelectedClassName=function(){return"".concat(ce.getPrefixCls(),"-selected")},ce.getOpenClassName=function(){return"".concat(ce.props.rootPrefixCls,"-submenu-open")},ce.saveMenuInstance=function(Be){ce.menuInstance=Be},ce.addKeyPath=function(Be){return Object(Z.a)(Object(Z.a)({},Be),{},{keyPath:(Be.keyPath||[]).concat(ce.props.eventKey)})},ce.triggerOpenChange=function(Be,Ze){var nt=ce.props.eventKey,ut=function(){ce.onOpenChange({key:nt,item:Object(V.a)(ce),trigger:Ze,open:Be})};Ze==="mouseenter"?ce.mouseenterTimeout=setTimeout(function(){ut()},0):ut()},ce.isChildrenSelected=function(){var Be={find:!1};return de(ce.props.children,ce.props.selectedKeys,Be),Be.find},ce.isOpen=function(){return ce.props.openKeys.indexOf(ce.props.eventKey)!==-1},ce.adjustWidth=function(){if(!ce.subMenuTitle||!ce.menuInstance)return;var Be=pe.findDOMNode(ce.menuInstance);if(Be.offsetWidth>=ce.subMenuTitle.offsetWidth)return;Be.style.minWidth="".concat(ce.subMenuTitle.offsetWidth,"px")},ce.saveSubMenuTitle=function(Be){ce.subMenuTitle=Be},ce.getBaseProps=function(){var Be=Object(V.a)(ce),Ze=Be.props;return{mode:Ze.mode==="horizontal"?"vertical":Ze.mode,visible:ce.props.isOpen,level:Ze.level+1,inlineIndent:Ze.inlineIndent,focusable:!1,onClick:ce.onSubMenuClick,onSelect:ce.onSelect,onDeselect:ce.onDeselect,onDestroy:ce.onDestroy,selectedKeys:Ze.selectedKeys,eventKey:"".concat(Ze.eventKey,"-menu-"),openKeys:Ze.openKeys,motion:Ze.motion,onOpenChange:ce.onOpenChange,subMenuOpenDelay:Ze.subMenuOpenDelay,parentMenu:Object(V.a)(ce),subMenuCloseDelay:Ze.subMenuCloseDelay,forceSubMenuRender:Ze.forceSubMenuRender,triggerSubMenuAction:Ze.triggerSubMenuAction,builtinPlacements:Ze.builtinPlacements,defaultActiveFirst:Ze.store.getState().defaultActiveFirst[$(Ze.eventKey)],multiple:Ze.multiple,prefixCls:Ze.rootPrefixCls,id:ce.internalMenuId,manualRef:ce.saveMenuInstance,itemIcon:Ze.itemIcon,expandIcon:Ze.expandIcon,direction:Ze.direction}},ce.getMotion=function(Be,Ze){var nt=Object(V.a)(ce),ut=nt.haveRendered,Et=ce.props,st=Et.motion,Ut=Et.rootPrefixCls,Zt=Object(Z.a)(Object(Z.a)({},st),{},{leavedClassName:"".concat(Ut,"-hidden"),removeOnLeave:!1,motionAppear:ut||!Ze||Be!=="inline"});return Zt};var xe=Ye.store,at=Ye.eventKey,Je=xe.getState(),_t=Je.defaultActiveFirst;ce.isRootMenu=!1;var yt=!1;return _t&&(yt=_t[at]),ve(xe,at,yt),ce}return Object(U.a)(et,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ce=this,xe=this.props,at=xe.mode,Je=xe.parentMenu,_t=xe.manualRef;if(_t&&_t(this),at!=="horizontal"||!Je.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return ce.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var ce=this.props,xe=ce.onDestroy,at=ce.eventKey;xe&&xe(at),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(ce){var xe=this,at=this.getBaseProps(),Je=this.getMotion(at.mode,at.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||at.visible||at.forceSubMenuRender,!this.haveOpened)return K.createElement("div",null);var _t=at.direction;return K.createElement(ae.default,Object.assign({visible:at.visible},Je),function(yt){var Be=yt.className,Ze=yt.style,nt=u()("".concat(at.prefixCls,"-sub"),Be,Object(m.a)({},"".concat(at.prefixCls,"-rtl"),_t==="rtl"));return K.createElement(Ce,Object.assign({},at,{id:xe.internalMenuId,className:nt,style:Ze}),ce)})}},{key:"render",value:function(){var ce,xe=Object(Z.a)({},this.props),at=xe.isOpen,Je=this.getPrefixCls(),_t=xe.mode==="inline",yt=u()(Je,"".concat(Je,"-").concat(xe.mode),(ce={},Object(m.a)(ce,xe.className,!!xe.className),Object(m.a)(ce,this.getOpenClassName(),at),Object(m.a)(ce,this.getActiveClassName(),xe.active||at&&!_t),Object(m.a)(ce,this.getDisabledClassName(),xe.disabled),Object(m.a)(ce,this.getSelectedClassName(),this.isChildrenSelected()),ce));this.internalMenuId||(xe.eventKey?this.internalMenuId="".concat(xe.eventKey,"$Menu"):(qe+=1,this.internalMenuId="$__$".concat(qe,"$Menu")));var Be={},Ze={},nt={};xe.disabled||(Be={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ze={onClick:this.onTitleClick},nt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var ut={},Et=xe.direction;_t&&(Et==="rtl"?ut.paddingRight=xe.inlineIndent*xe.level:ut.paddingLeft=xe.inlineIndent*xe.level);var st={};this.props.isOpen&&(st={"aria-owns":this.internalMenuId});var Ut=null;xe.mode!=="horizontal"&&(Ut=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Ut=K.createElement(this.props.expandIcon,Object(Z.a)({},this.props))));var Zt=K.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:ut,className:"".concat(Je,"-title"),role:"button"},nt,Ze,{"aria-expanded":at},st,{"aria-haspopup":"true",title:typeof xe.title=="string"?xe.title:void 0}),xe.title,Ut||K.createElement("i",{className:"".concat(Je,"-arrow")})),Rt=this.renderChildren(xe.children),qt=xe.parentMenu.isRootMenu?xe.parentMenu.props.getPopupContainer:function(nn){return nn.parentNode},Qt=ue[xe.mode],en=xe.popupOffset?{offset:xe.popupOffset}:{},Yt=xe.mode==="inline"?"":xe.popupClassName;Yt+=Et==="rtl"?" ".concat(Je,"-rtl"):"";var cn=xe.disabled,Sn=xe.triggerSubMenuAction,kn=xe.subMenuOpenDelay,gt=xe.forceSubMenuRender,Wt=xe.subMenuCloseDelay,Jt=xe.builtinPlacements;Pe.forEach(function(nn){return delete xe[nn]}),delete xe.onClick;var tn=Et==="rtl"?Object.assign({},Oe,Jt):Object.assign({},je,Jt);return delete xe.direction,K.createElement("li",Object.assign({},xe,Be,{className:yt,role:"menuitem"}),_t&&Zt,_t&&Rt,!_t&&K.createElement(Ee.a,{prefixCls:Je,popupClassName:u()("".concat(Je,"-popup"),Yt),getPopupContainer:qt,builtinPlacements:tn,popupPlacement:Qt,popupVisible:at,popupAlign:en,popup:Rt,action:cn?[]:[Sn],mouseEnterDelay:kn,mouseLeaveDelay:Wt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:gt},Zt))}}]),et}(K.Component);De.defaultProps={onMouseEnter:T,onMouseLeave:T,onTitleMouseEnter:T,onTitleMouseLeave:T,onTitleClick:T,manualRef:T,mode:"vertical",title:""};var Ne=Object(j.b)(function(vt,$e){var et=vt.openKeys,Ye=vt.activeKey,ce=vt.selectedKeys,xe=$e.eventKey,at=$e.subMenuKey;return{isOpen:et.indexOf(xe)>-1,active:Ye[at]===xe,selectedKeys:ce}})(De);Ne.isSubMenu=!0;var it=Ne,pt="menuitem-overflowed",mt=.5,dt=function(vt){Object(W.a)(et,vt);var $e=Object(M.a)(et);function et(){var Ye;return Object(G.a)(this,et),Ye=$e.apply(this,arguments),Ye.resizeObserver=null,Ye.mutationObserver=null,Ye.originalTotalWidth=0,Ye.overflowedItems=[],Ye.menuItemSizes=[],Ye.cancelFrameId=null,Ye.state={lastVisibleIndex:void 0},Ye.getMenuItemNodes=function(){var ce=Ye.props.prefixCls,xe=pe.findDOMNode(Object(V.a)(Ye));return xe?[].slice.call(xe.children).filter(function(at){return at.className.split(" ").indexOf("".concat(ce,"-overflowed-submenu"))<0}):[]},Ye.getOverflowedSubMenuItem=function(ce,xe,at){var Je=Ye.props,_t=Je.overflowedIndicator,yt=Je.level,Be=Je.mode,Ze=Je.prefixCls,nt=Je.theme;if(yt!==1||Be!=="horizontal")return null;var ut=Ye.props.children[0],Et=ut.props,st=Et.children,Ut=Et.title,Zt=Et.style,Rt=Object(me.a)(Et,["children","title","style"]),qt=Object(Z.a)({},Zt),Qt="".concat(ce,"-overflowed-indicator"),en="".concat(ce,"-overflowed-indicator");xe.length===0&&at!==!0?qt=Object(Z.a)(Object(Z.a)({},qt),{},{display:"none"}):at&&(qt=Object(Z.a)(Object(Z.a)({},qt),{},{visibility:"hidden",position:"absolute"}),Qt="".concat(Qt,"-placeholder"),en="".concat(en,"-placeholder"));var Yt=nt?"".concat(Ze,"-").concat(nt):"",cn={};return Pe.forEach(function(Sn){Rt[Sn]!==void 0&&(cn[Sn]=Rt[Sn])}),K.createElement(it,Object.assign({title:_t,className:"".concat(Ze,"-overflowed-submenu"),popupClassName:Yt},cn,{key:Qt,eventKey:en,disabled:!1,style:qt}),xe)},Ye.setChildrenWidthAndResize=function(){if(Ye.props.mode!=="horizontal")return;var ce=pe.findDOMNode(Object(V.a)(Ye));if(!ce)return;var xe=ce.children;if(!xe||xe.length===0)return;var at=ce.children[xe.length-1];we(at,"display","inline-block");var Je=Ye.getMenuItemNodes(),_t=Je.filter(function(yt){return yt.className.split(" ").indexOf(pt)>=0});_t.forEach(function(yt){we(yt,"display","inline-block")}),Ye.menuItemSizes=Je.map(function(yt){return Se(yt,!0)}),_t.forEach(function(yt){we(yt,"display","none")}),Ye.overflowedIndicatorWidth=Se(ce.children[ce.children.length-1],!0),Ye.originalTotalWidth=Ye.menuItemSizes.reduce(function(yt,Be){return yt+Be},0),Ye.handleResize(),we(at,"display","none")},Ye.handleResize=function(){if(Ye.props.mode!=="horizontal")return;var ce=pe.findDOMNode(Object(V.a)(Ye));if(!ce)return;var xe=Se(ce);Ye.overflowedItems=[];var at=0,Je;Ye.originalTotalWidth>xe+mt&&(Je=-1,Ye.menuItemSizes.forEach(function(_t){at+=_t,at+Ye.overflowedIndicatorWidth<=xe&&(Je+=1)})),Ye.setState({lastVisibleIndex:Je})},Ye}return Object(U.a)(et,[{key:"componentDidMount",value:function(){var ce=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var xe=pe.findDOMNode(this);if(!xe)return;this.resizeObserver=new ne.default(function(at){at.forEach(function(){var Je=ce.cancelFrameId;cancelAnimationFrame(Je),ce.cancelFrameId=requestAnimationFrame(ce.setChildrenWidthAndResize)})}),[].slice.call(xe.children).concat(xe).forEach(function(at){ce.resizeObserver.observe(at)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){ce.resizeObserver.disconnect(),[].slice.call(xe.children).concat(xe).forEach(function(at){ce.resizeObserver.observe(at)}),ce.setChildrenWidthAndResize()}),this.mutationObserver.observe(xe,{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(ce){var xe=this,at=this.state.lastVisibleIndex;return(ce||[]).reduce(function(Je,_t,yt){var Be=_t;if(xe.props.mode==="horizontal"){var Ze=xe.getOverflowedSubMenuItem(_t.props.eventKey,[]);at!==void 0&&xe.props.className.indexOf("".concat(xe.props.prefixCls,"-root"))!==-1&&(yt>at&&(Be=K.cloneElement(_t,{style:{display:"none"},eventKey:"".concat(_t.props.eventKey,"-hidden"),className:"".concat(pt)})),yt===at+1&&(xe.overflowedItems=ce.slice(at+1).map(function(ut){return K.cloneElement(ut,{key:ut.props.eventKey,mode:"vertical-left"})}),Ze=xe.getOverflowedSubMenuItem(_t.props.eventKey,xe.overflowedItems)));var nt=[].concat(Object(Me.a)(Je),[Ze,Be]);return yt===ce.length-1&&nt.push(xe.getOverflowedSubMenuItem(_t.props.eventKey,[],!0)),nt}return[].concat(Object(Me.a)(Je),[Be])},[])}},{key:"render",value:function(){var ce=this.props,xe=ce.visible,at=ce.prefixCls,Je=ce.overflowedIndicator,_t=ce.mode,yt=ce.level,Be=ce.tag,Ze=ce.children,nt=ce.theme,ut=Object(me.a)(ce,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Et=Be;return K.createElement(Et,Object.assign({},ut),this.renderChildren(Ze))}}]),et}(K.Component);dt.defaultProps={tag:"div",className:""};var Tt=dt;function St(vt){return vt.length?vt.every(function($e){return!!$e.props.disabled}):!0}function Ue(vt,$e,et){var Ye=vt.getState();vt.setState({activeKey:Object(Z.a)(Object(Z.a)({},Ye.activeKey),{},Object(m.a)({},$e,et))})}function Ie(vt){return vt.eventKey||"0-menu-"}function tt(vt,$e){var et=$e,Ye=vt.children,ce=vt.eventKey;if(et){var xe;if(le(Ye,function(at,Je){at&&at.props&&!at.props.disabled&&et===Y(at,ce,Je)&&(xe=!0)}),xe)return et}return et=null,vt.defaultActiveFirst&&le(Ye,function(at,Je){!et&&at&&!at.props.disabled&&(et=Y(at,ce,Je))}),et}function lt(vt){if(vt){var $e=this.instanceArray.indexOf(vt);$e!==-1?this.instanceArray[$e]=vt:this.instanceArray.push(vt)}}var Ke=function(vt){Object(W.a)(et,vt);var $e=Object(M.a)(et);function et(Ye){var ce;return Object(G.a)(this,et),ce=$e.call(this,Ye),ce.onKeyDown=function(xe,at){var Je=xe.keyCode,_t;if(ce.getFlatInstanceArray().forEach(function(Be){Be&&Be.props.active&&Be.onKeyDown&&(_t=Be.onKeyDown(xe))}),_t)return 1;var yt=null;return(Je===f.a.UP||Je===f.a.DOWN)&&(yt=ce.step(Je===f.a.UP?-1:1)),yt?(xe.preventDefault(),Ue(ce.props.store,Ie(ce.props),yt.props.eventKey),typeof at=="function"&&at(yt),1):void 0},ce.onItemHover=function(xe){var at=xe.key,Je=xe.hover;Ue(ce.props.store,Ie(ce.props),Je?at:null)},ce.onDeselect=function(xe){ce.props.onDeselect(xe)},ce.onSelect=function(xe){ce.props.onSelect(xe)},ce.onClick=function(xe){ce.props.onClick(xe)},ce.onOpenChange=function(xe){ce.props.onOpenChange(xe)},ce.onDestroy=function(xe){ce.props.onDestroy(xe)},ce.getFlatInstanceArray=function(){return ce.instanceArray},ce.step=function(xe){var at=ce.getFlatInstanceArray(),Je=ce.props.store.getState().activeKey[Ie(ce.props)],_t=at.length;if(!_t)return null;xe<0&&(at=at.concat().reverse());var yt=-1;if(at.every(function(ut,Et){return ut&&ut.props.eventKey===Je?(yt=Et,!1):!0}),!ce.props.defaultActiveFirst&&yt!==-1&&St(at.slice(yt,_t-1)))return;var Be=(yt+1)%_t,Ze=Be;do{var nt=at[Ze];if(!nt||nt.props.disabled)Ze=(Ze+1)%_t;else return nt}while(Ze!==Be);return null},ce.renderCommonMenuItem=function(xe,at,Je){var _t=ce.props.store.getState(),yt=Object(V.a)(ce),Be=yt.props,Ze=Y(xe,Be.eventKey,at),nt=xe.props;if(!nt||typeof xe.type=="string")return xe;var ut=Ze===_t.activeKey,Et=Object(Z.a)(Object(Z.a)({mode:nt.mode||Be.mode,level:Be.level,inlineIndent:Be.inlineIndent,renderMenuItem:ce.renderMenuItem,rootPrefixCls:Be.prefixCls,index:at,parentMenu:Be.parentMenu,manualRef:nt.disabled?void 0:Object(p.a)(xe.ref,lt.bind(Object(V.a)(ce))),eventKey:Ze,active:!nt.disabled&&ut,multiple:Be.multiple,onClick:function(Ut){(nt.onClick||T)(Ut),ce.onClick(Ut)},onItemHover:ce.onItemHover,motion:Be.motion,subMenuOpenDelay:Be.subMenuOpenDelay,subMenuCloseDelay:Be.subMenuCloseDelay,forceSubMenuRender:Be.forceSubMenuRender,onOpenChange:ce.onOpenChange,onDeselect:ce.onDeselect,onSelect:ce.onSelect,builtinPlacements:Be.builtinPlacements,itemIcon:nt.itemIcon||ce.props.itemIcon,expandIcon:nt.expandIcon||ce.props.expandIcon},Je),{},{direction:Be.direction});return(Be.mode==="inline"||Fe())&&(Et.triggerSubMenuAction="click"),K.cloneElement(xe,Et)},ce.renderMenuItem=function(xe,at,Je){if(!xe)return null;var _t=ce.props.store.getState(),yt={openKeys:_t.openKeys,selectedKeys:_t.selectedKeys,triggerSubMenuAction:ce.props.triggerSubMenuAction,subMenuKey:Je};return ce.renderCommonMenuItem(xe,at,yt)},Ye.store.setState({activeKey:Object(Z.a)(Object(Z.a)({},Ye.store.getState().activeKey),{},Object(m.a)({},Ye.eventKey,tt(Ye,Ye.activeKey)))}),ce.instanceArray=[],ce}return Object(U.a)(et,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(ce){return this.props.visible||ce.visible||this.props.className!==ce.className||!r()(this.props.style,ce.style)}},{key:"componentDidUpdate",value:function(ce){var xe=this.props,at="activeKey"in xe?xe.activeKey:xe.store.getState().activeKey[Ie(xe)],Je=tt(xe,at);if(Je!==at)Ue(xe.store,Ie(xe),Je);else if("activeKey"in ce){var _t=tt(ce,ce.activeKey);Je!==_t&&Ue(xe.store,Ie(xe),Je)}}},{key:"render",value:function(){var ce=this,xe=Object(w.a)({},this.props);this.instanceArray=[];var at=u()(xe.prefixCls,xe.className,"".concat(xe.prefixCls,"-").concat(xe.mode)),Je={className:at,role:xe.role||"menu"};xe.id&&(Je.id=xe.id),xe.focusable&&(Je.tabIndex=0,Je.onKeyDown=this.onKeyDown);var _t=xe.prefixCls,yt=xe.eventKey,Be=xe.visible,Ze=xe.level,nt=xe.mode,ut=xe.overflowedIndicator,Et=xe.theme;return Pe.forEach(function(st){return delete xe[st]}),delete xe.onClick,K.createElement(Tt,Object.assign({},xe,{prefixCls:_t,mode:nt,tag:"ul",level:Ze,theme:Et,visible:Be,overflowedIndicator:ut},Je),K.Children.map(xe.children,function(st,Ut){return ce.renderMenuItem(st,Ut,yt||"0-menu-")}))}}]),et}(K.Component);Ke.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:T};var Xe=Object(j.b)()(Ke),Ce=Xe,ge=B("Kwbf");function be(vt,$e,et){var Ye=vt.prefixCls,ce=vt.motion,xe=vt.defaultMotions,at=xe===void 0?{}:xe,Je=vt.openAnimation,_t=vt.openTransitionName,yt=$e.switchingModeFromInline;if(ce)return ce;if(Object(o.a)(Je)==="object"&&Je)Object(ge.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Je=="string")return{motionName:"".concat(Ye,"-open-").concat(Je)};if(_t)return{motionName:_t};var Be=at[et];return Be||(yt?null:at.other)}var ie=function(vt){Object(W.a)(et,vt);var $e=Object(M.a)(et);function et(Ye){var ce;Object(G.a)(this,et),ce=$e.call(this,Ye),ce.inlineOpenKeys=[],ce.onSelect=function(Je){var _t=Object(V.a)(ce),yt=_t.props;if(yt.selectable){var Be=ce.store.getState(),Ze=Be.selectedKeys,nt=Je.key;yt.multiple?Ze=Ze.concat([nt]):Ze=[nt],"selectedKeys"in yt||ce.store.setState({selectedKeys:Ze}),yt.onSelect(Object(Z.a)(Object(Z.a)({},Je),{},{selectedKeys:Ze}))}},ce.onClick=function(Je){var _t=ce.getRealMenuMode(),yt=Object(V.a)(ce),Be=yt.store,Ze=yt.props.onOpenChange;_t!=="inline"&&!("openKeys"in ce.props)&&(Be.setState({openKeys:[]}),Ze([])),ce.props.onClick(Je)},ce.onKeyDown=function(Je,_t){ce.innerMenu.getWrappedInstance().onKeyDown(Je,_t)},ce.onOpenChange=function(Je){var _t=Object(V.a)(ce),yt=_t.props,Be=ce.store.getState().openKeys.concat(),Ze=!1,nt=function(Et){var st=!1;if(Et.open)st=Be.indexOf(Et.key)===-1,st&&Be.push(Et.key);else{var Ut=Be.indexOf(Et.key);st=Ut!==-1,st&&Be.splice(Ut,1)}Ze=Ze||st};Array.isArray(Je)?Je.forEach(nt):nt(Je),Ze&&("openKeys"in ce.props||ce.store.setState({openKeys:Be}),yt.onOpenChange(Be))},ce.onDeselect=function(Je){var _t=Object(V.a)(ce),yt=_t.props;if(yt.selectable){var Be=ce.store.getState().selectedKeys.concat(),Ze=Je.key,nt=Be.indexOf(Ze);nt!==-1&&Be.splice(nt,1),"selectedKeys"in yt||ce.store.setState({selectedKeys:Be}),yt.onDeselect(Object(Z.a)(Object(Z.a)({},Je),{},{selectedKeys:Be}))}},ce.onMouseEnter=function(Je){ce.restoreModeVerticalFromInline();var _t=ce.props.onMouseEnter;_t&&_t(Je)},ce.onTransitionEnd=function(Je){var _t=Je.propertyName==="width"&&Je.target===Je.currentTarget,yt=Je.target.className,Be=Object.prototype.toString.call(yt)==="[object SVGAnimatedString]"?yt.animVal:yt,Ze=Je.propertyName==="font-size"&&Be.indexOf("anticon")>=0;(_t||Ze)&&ce.restoreModeVerticalFromInline()},ce.setInnerMenu=function(Je){ce.innerMenu=Je},ce.isRootMenu=!0;var xe=Ye.defaultSelectedKeys,at=Ye.defaultOpenKeys;return"selectedKeys"in Ye&&(xe=Ye.selectedKeys||[]),"openKeys"in Ye&&(at=Ye.openKeys||[]),ce.store=Object(j.c)({selectedKeys:xe,openKeys:at,activeKey:{"0-menu-":tt(Ye,Ye.activeKey)}}),ce.state={switchingModeFromInline:!1},ce}return Object(U.a)(et,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(ce){this.updateOpentKeysWhenSwitchMode(ce),this.updateMiniStore();var xe=this.props,at=xe.siderCollapsed,Je=xe.inlineCollapsed,_t=xe.onOpenChange;(!ce.inlineCollapsed&&Je||!ce.siderCollapsed&&at)&&_t([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(ce){var xe=this.props,at=this.store,Je=this.inlineOpenKeys,_t=at.getState(),yt={};ce.mode==="inline"&&xe.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in xe||((xe.inlineCollapsed&&!ce.inlineCollapsed||xe.siderCollapsed&&!ce.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=_t.openKeys.concat(),yt.openKeys=[]),(!xe.inlineCollapsed&&ce.inlineCollapsed||!xe.siderCollapsed&&ce.siderCollapsed)&&(yt.openKeys=Je,this.inlineOpenKeys=[])),Object.keys(yt).length&&at.setState(yt)}},{key:"updateMenuDisplay",value:function(){var ce=this.props.collapsedWidth,xe=this.store,at=this.prevOpenKeys,Je=this.getInlineCollapsed()&&(ce===0||ce==="0"||ce==="0px");Je?(this.prevOpenKeys=xe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):at&&(this.store.setState({openKeys:at}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var ce=this.props.mode,xe=this.state.switchingModeFromInline,at=this.getInlineCollapsed();return xe&&at?"inline":at?"vertical":ce}},{key:"getInlineCollapsed",value:function(){var ce=this.props,xe=ce.inlineCollapsed,at=ce.siderCollapsed;return at!==void 0?at:xe}},{key:"restoreModeVerticalFromInline",value:function(){var ce=this.state.switchingModeFromInline;ce&&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 ce=Object(Z.a)({},Object(n.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),xe=this.getRealMenuMode();return ce.className+=" ".concat(ce.prefixCls,"-root"),ce.direction==="rtl"&&(ce.className+=" ".concat(ce.prefixCls,"-rtl")),ce=Object(Z.a)(Object(Z.a)({},ce),{},{mode:xe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:be(this.props,this.state,xe)}),delete ce.openAnimation,delete ce.openTransitionName,K.createElement(j.a,{store:this.store},K.createElement(Ce,Object.assign({},ce,{ref:this.setInnerMenu}),this.props.children))}}]),et}(K.Component);ie.defaultProps={selectable:!0,onClick:T,onSelect:T,onOpenChange:T,onDeselect:T,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:K.createElement("span",null,"\xB7\xB7\xB7")};var oe=ie,fe=function(vt){Object(W.a)(et,vt);var $e=Object(M.a)(et);function et(){var Ye;return Object(G.a)(this,et),Ye=$e.apply(this,arguments),Ye.onKeyDown=function(ce){var xe=ce.keyCode;return xe===f.a.ENTER?(Ye.onClick(ce),!0):void 0},Ye.onMouseLeave=function(ce){var xe=Ye.props,at=xe.eventKey,Je=xe.onItemHover,_t=xe.onMouseLeave;Je({key:at,hover:!1}),_t({key:at,domEvent:ce})},Ye.onMouseEnter=function(ce){var xe=Ye.props,at=xe.eventKey,Je=xe.onItemHover,_t=xe.onMouseEnter;Je({key:at,hover:!0}),_t({key:at,domEvent:ce})},Ye.onClick=function(ce){var xe=Ye.props,at=xe.eventKey,Je=xe.multiple,_t=xe.onClick,yt=xe.onSelect,Be=xe.onDeselect,Ze=xe.isSelected,nt={key:at,keyPath:[at],item:Object(V.a)(Ye),domEvent:ce};_t(nt),Je?Ze?Be(nt):yt(nt):Ze||yt(nt)},Ye.saveNode=function(ce){Ye.node=ce},Ye}return Object(U.a)(et,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var ce=this.props;ce.onDestroy&&ce.onDestroy(ce.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 ce,xe=Object(Z.a)({},this.props),at=u()(this.getPrefixCls(),xe.className,(ce={},Object(m.a)(ce,this.getActiveClassName(),!xe.disabled&&xe.active),Object(m.a)(ce,this.getSelectedClassName(),xe.isSelected),Object(m.a)(ce,this.getDisabledClassName(),xe.disabled),ce)),Je=Object(Z.a)(Object(Z.a)({},xe.attribute),{},{title:typeof xe.title=="string"?xe.title:void 0,className:at,role:xe.role||"menuitem","aria-disabled":xe.disabled});xe.role==="option"?Je=Object(Z.a)(Object(Z.a)({},Je),{},{role:"option","aria-selected":xe.isSelected}):(xe.role===null||xe.role==="none")&&(Je.role="none");var _t={onClick:xe.disabled?null:this.onClick,onMouseLeave:xe.disabled?null:this.onMouseLeave,onMouseEnter:xe.disabled?null:this.onMouseEnter},yt=Object(Z.a)({},xe.style);xe.mode==="inline"&&(xe.direction==="rtl"?yt.paddingRight=xe.inlineIndent*xe.level:yt.paddingLeft=xe.inlineIndent*xe.level),Pe.forEach(function(Ze){return delete xe[Ze]}),delete xe.direction;var Be=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Be=K.createElement(this.props.itemIcon,this.props)),K.createElement("li",Object.assign({},Object(n.default)(xe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Je,_t,{style:yt,ref:this.saveNode}),xe.children,Be)}}]),et}(K.Component);fe.isMenuItem=!0,fe.defaultProps={onSelect:T,onMouseEnter:T,onMouseLeave:T,manualRef:T};var ye=Object(j.b)(function(vt,$e){var et=vt.activeKey,Ye=vt.selectedKeys,ce=$e.eventKey,xe=$e.subMenuKey;return{active:et[xe]===ce,isSelected:Ye.indexOf(ce)!==-1}})(fe),Ae=ye,Ge=function(vt){Object(W.a)(et,vt);var $e=Object(M.a)(et);function et(){var Ye;return Object(G.a)(this,et),Ye=$e.apply(this,arguments),Ye.renderInnerMenuItem=function(ce){var xe=Ye.props,at=xe.renderMenuItem,Je=xe.index;return at(ce,Je,Ye.props.subMenuKey)},Ye}return Object(U.a)(et,[{key:"render",value:function(){var ce=Object(w.a)({},this.props),xe=ce.className,at=xe===void 0?"":xe,Je=ce.rootPrefixCls,_t="".concat(Je,"-item-group-title"),yt="".concat(Je,"-item-group-list"),Be=ce.title,Ze=ce.children;return Pe.forEach(function(nt){return delete ce[nt]}),delete ce.onClick,delete ce.direction,K.createElement("li",Object.assign({},ce,{className:"".concat(at," ").concat(Je,"-item-group")}),K.createElement("div",{className:_t,title:typeof Be=="string"?Be:void 0},Be),K.createElement("ul",{className:yt},K.Children.map(Ze,this.renderInnerMenuItem)))}}]),et}(K.Component);Ge.isMenuItemGroup=!0,Ge.defaultProps={disabled:!0};var ot=Ge,wt=function($e){var et=$e.className,Ye=$e.rootPrefixCls,ce=$e.style;return K.createElement("li",{className:"".concat(et," ").concat(Ye,"-item-divider"),style:ce})};wt.defaultProps={disabled:!0,className:"",style:{}};var Dt=wt,At=se.e=oe},"24hK":function(We,se,B){"use strict";B.d(se,"a",function(){return G});class Z{constructor(U){this.element=U,this.next=Z.Undefined,this.prev=Z.Undefined}}Z.Undefined=new Z(void 0);class G{constructor(){this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Z.Undefined}clear(){let U=this._first;for(;U!==Z.Undefined;){const V=U.next;U.prev=Z.Undefined,U.next=Z.Undefined,U=V}this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}unshift(U){return this._insert(U,!1)}push(U){return this._insert(U,!0)}_insert(U,V){const W=new Z(U);if(this._first===Z.Undefined)this._first=W,this._last=W;else if(V){const K=this._last;this._last=W,W.prev=K,K.next=W}else{const K=this._first;this._first=W,W.next=K,K.prev=W}this._size+=1;let M=!1;return()=>{M||(M=!0,this._remove(W))}}shift(){if(this._first===Z.Undefined)return;{const U=this._first.element;return this._remove(this._first),U}}pop(){if(this._last===Z.Undefined)return;{const U=this._last.element;return this._remove(this._last),U}}_remove(U){if(U.prev!==Z.Undefined&&U.next!==Z.Undefined){const V=U.prev;V.next=U.next,U.next.prev=V}else U.prev===Z.Undefined&&U.next===Z.Undefined?(this._first=Z.Undefined,this._last=Z.Undefined):U.next===Z.Undefined?(this._last=this._last.prev,this._last.next=Z.Undefined):U.prev===Z.Undefined&&(this._first=this._first.next,this._first.prev=Z.Undefined);this._size-=1}*[Symbol.iterator](){let U=this._first;for(;U!==Z.Undefined;)yield U.element,U=U.next}}},"3/fG":function(We,se,B){"use strict";B.d(se,"a",function(){return G});function Z(U,V){let W;return V.length===0?W=U:W=U.replace(/\{(\d+)\}/g,function(M,K){const j=K[0];return typeof V[j]!="undefined"?V[j]:M}),W}function G(U,V,...W){return Z(V,W)}},"4qgm":function(We,se){We.exports="data:image/png;base64,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"},"4u4S":function(We,se){We.exports="data:image/png;base64,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"},"55Ip":function(We,se,B){"use strict";B.d(se,"a",function(){return s});var Z=B("Ty5D"),G=B("dI71"),U=B("q1tI"),V=B.n(U),W=B("YS25"),M=B("17x9"),K=B.n(M),j=B("wx14"),n=B("zLVn"),w=B("9R94"),m=function(b){Object(G.a)(v,b);function v(){for(var C,x=arguments.length,g=new Array(x),P=0;P<x;P++)g[P]=arguments[P];return C=b.call.apply(b,[this].concat(g))||this,C.history=Object(W.a)(C.props),C}var h=v.prototype;return h.render=function(){return V.a.createElement(Z.c,{history:this.history,children:this.props.children})},v}(V.a.Component),f=function(b){Object(G.a)(v,b);function v(){for(var C,x=arguments.length,g=new Array(x),P=0;P<x;P++)g[P]=arguments[P];return C=b.call.apply(b,[this].concat(g))||this,C.history=Object(W.b)(C.props),C}var h=v.prototype;return h.render=function(){return V.a.createElement(Z.c,{history:this.history,children:this.props.children})},v}(V.a.Component),p=function(v,h){return typeof v=="function"?v(h):v},c=function(v,h){return typeof v=="string"?Object(W.c)(v,null,null,h):v},r=function(v){return v},d=V.a.forwardRef;typeof d=="undefined"&&(d=r);function u(b){return!!(b.metaKey||b.altKey||b.ctrlKey||b.shiftKey)}var o=d(function(b,v){var h=b.innerRef,C=b.navigate,x=b.onClick,g=Object(n.a)(b,["innerRef","navigate","onClick"]),P=g.target,k=Object(j.a)({},g,{onClick:function(A){try{x&&x(A)}catch(F){throw A.preventDefault(),F}!A.defaultPrevented&&A.button===0&&(!P||P==="_self")&&!u(A)&&(A.preventDefault(),C())}});return r!==d?k.ref=v||h:k.ref=h,V.a.createElement("a",k)}),s=d(function(b,v){var h=b.component,C=h===void 0?o:h,x=b.replace,g=b.to,P=b.innerRef,k=Object(n.a)(b,["component","replace","to","innerRef"]);return V.a.createElement(Z.e.Consumer,null,function(y){y||Object(w.a)(!1);var A=y.history,F=c(p(g,y.location),y.location),T=F?A.createHref(F):"",Y=Object(j.a)({},k,{href:T,navigate:function(){var le=p(g,y.location),de=x?A.replace:A.push;de(le)}});return r!==d?Y.ref=v||P:Y.innerRef=P,V.a.createElement(C,Y)})});if(!1)var a,R;var O=function(v){return v},S=V.a.forwardRef;typeof S=="undefined"&&(S=O);function D(){for(var b=arguments.length,v=new Array(b),h=0;h<b;h++)v[h]=arguments[h];return v.filter(function(C){return C}).join(" ")}var I=S(function(b,v){var h=b["aria-current"],C=h===void 0?"page":h,x=b.activeClassName,g=x===void 0?"active":x,P=b.activeStyle,k=b.className,y=b.exact,A=b.isActive,F=b.location,T=b.sensitive,Y=b.strict,$=b.style,le=b.to,de=b.innerRef,Pe=Object(n.a)(b,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return V.a.createElement(Z.e.Consumer,null,function(Se){Se||Object(w.a)(!1);var we=F||Se.location,Fe=c(p(le,we),we),Me=Fe.pathname,me=Me&&Me.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),pe=me?Object(Z.f)(we.pathname,{path:me,exact:y,sensitive:T,strict:Y}):null,ne=!!(A?A(pe,we):pe),Ee=ne?D(k,g):k,ae=ne?Object(j.a)({},$,{},P):$,ke=Object(j.a)({"aria-current":ne&&C||null,className:Ee,style:ae,to:Fe},Pe);return O!==S?ke.ref=v||de:ke.innerRef=de,V.a.createElement(s,ke)})});if(!1)var _},"5D2P":function(We,se){We.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFTklEQVRoQ91aS4xURRQ993UzUUZcqFEc4meh0cQFSlwgrvAHSgQWhOhCk4GZqmdw+ERUWDkrBMUBnIzzqqYjcTaaGBLFxA8MjIk/3PhZCCa6UAyKC11ARnDo6Wvu+HrS0/R7r96nWVBJpxfv3nPPrbp169aHUEAzxsxl5gcB3AdgAREtkH8AXSH87wBOMfMp+QfwFREd0Vr/k9c8ZQUwxixi5mWe5y1l5qUAyimxqkQ0XqvVxonoE631Nyn1p8VTO7B///75Fy5c2MzMWwB0ZDHaQmeSiPbMmTNnb3d39+k0mKkcMMZsBiC/W9IYSSH7K4C9Wuu9rjpODoyMjNxQq9VGADzuCpxT7gPP83p7e3v/TMJJdCAIgoVEdBDAzUlgBX8/ycwrfd//Pg431gFr7RPM/HbBxFLBEdGTSql3opQiHQiCoI+IXk9lrU3CzLzR9/3BVvAtHbDWPsrMH7aJTyZYInpMKfVRs/JFDlQqlduq1eoxIro2k6U2KTHzX+VyeXFPT8/PjSYucsBae4iZH24Tj1ywRHRYKfVIpANhnt+Ty0r7lbc0rhMzI2CMuRHAlwBubT+HXBZ+AbBEa/3HrFLCWruTmV/MBZ1N+TiAdyNUX2qZeYh2KaW2zThQqVTumZqaOlZgbePqynEiWquU+qFZwRjzBoBnIoAmS6WSTOhvp0PIGPMcgN2uVguSiyQfBIFPRMMJdrZqrV+bdsBa+x4zryqImAtMJHlr7RJmPgxgbhwQEb2vlFpNAwMDV3Z2dp7JUM+7EG0lE0l+dHS089y5c4dkkjqAVycmJq4ma+0yZv7YQaEIkUjyAh4EwTAR+a6GiGg5BUGwg4i2uyrlkEsi7xL3s8wz88syAm8x89M5iLmoxpIP4348bRYkolEyxowBkA25S1sLQJbyHhfhUCaWvMT9+fPnx5h5cQrMuugRceAEgDsdlKfTVph2rwMgC4mk37gWSz5L3DcZ+1EckAw0L44FM4/4vq+aZfr7+zu6urq2MbPMoSuavieSt9b6zJyU7+OonXVygIjWKKUOxCGFhaA4cj0AF/KS7z8D4DmMfpTIGdcQOgtgldZaJlpss9auA/B1q/Kgrhjm+08B3JuEF/ediE44T2IikiOP1Uqp7/IYDePeElFvXhwAY2nTqJCXkTiZ1XgBcT9jmplHxYEd4SR04kRER0ul0ur169dLWKVqYb7/IpVSjHB9IctSShzQWq9JQySMeyG/MI1ewhxYnqeYq2itnePYGPMmgO6iyAP4v5gTwBzl9Cta68RdnDHmWQAtz3WyOjRTTodZYSsRvZoRbLvWemeU7vDw8P2e532eETtSjZmf931/d31HtkguHdIWUw3oWmttm60NDQ1dVS6XZat6V8EOTMplitwpNJ5K7ALwQg5Da7XWszbnxphRAE/lwIxSnQnd5mMVGYWsZ///MvMK3/ePiFVjjFyADLSBvCyo0vuzj1VCo3J5kflgi5lPE9EKIprHzFIqtKO1PtiqWzLGyIb6oRyW5ZynBOCOHBhRqmNa61nHnhedjQZBcDsRycS7pg0E8kD+LZse3/d/agS5/I7XG0JpI4B9ebqsQN1NWuuWly2X7xVTvfestXfXarWDRHRTgT2aCMXMv3metzJp/5F4SymWhoaG5pfLZVlpL9k1a7VaVRs2bEi89HZyIOwu2b1tukQX3TL3OHGYsjw1GBwc7Oro6Kg7UthTA7mhn5yc3NfX1ycPQ5xbmhGYBSqPPYhINkMPAJDHHrJ4pWlTAOShx1FmvnSPPVoxbHxu43neAmauP7eRf2nTz2yI6FStViv0uc1/ndZCH8rgOooAAAAASUVORK5CYII="},"5VLF":function(We,se,B){"use strict";var Z,G;function U(V,W,M){var K=function(j,n){return V.js_beautify(j,n)};return K.js=V.js_beautify,K.css=W.css_beautify,K.html=M.html_beautify,K.js_beautify=V.js_beautify,K.css_beautify=W.css_beautify,K.html_beautify=M.html_beautify,K}!(Z=[B("6UM0"),B("TXwP"),B("psGv")],G=function(V,W,M){return U(V,W,M)}.apply(se,Z),G!==void 0&&(We.exports=G))},"5Y4S":function(We,se,B){"use strict";B.d(se,"a",function(){return U});var Z=B("MNsG");const G=Z.b.performance&&typeof Z.b.performance.now=="function";class U{constructor(V){this._highResolution=G&&V,this._startTime=this._now(),this._stopTime=-1}static create(V=!0){return new U(V)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Z.b.performance.now():Date.now()}}},"6+eU":function(We,se,B){"use strict";B.d(se,"a",function(){return S});var Z=B("wx14"),G=B("rePB"),U=B("VTBJ"),V=B("1OyB"),W=B("vuIU"),M=B("Ji7U"),K=B("LK+K"),j=B("q1tI"),n=B.n(j),w=B("TSYQ"),m=B.n(w),f=function(I){var _,b="".concat(I.rootPrefixCls,"-item"),v=m()(b,"".concat(b,"-").concat(I.page),(_={},Object(G.a)(_,"".concat(b,"-active"),I.active),Object(G.a)(_,I.className,!!I.className),Object(G.a)(_,"".concat(b,"-disabled"),!I.page),_)),h=function(){I.onClick(I.page)},C=function(g){I.onKeyPress(g,I.onClick,I.page)};return n.a.createElement("li",{title:I.showTitle?I.page:null,className:v,onClick:h,onKeyPress:C,tabIndex:"0"},I.itemRender(I.page,"page",n.a.createElement("a",{rel:"nofollow"},I.page)))},p=f,c={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},r=function(D){Object(M.a)(_,D);var I=Object(K.a)(_);function _(){var b;Object(V.a)(this,_);for(var v=arguments.length,h=new Array(v),C=0;C<v;C++)h[C]=arguments[C];return b=I.call.apply(I,[this].concat(h)),b.state={goInputText:""},b.buildOptionText=function(x){return"".concat(x," ").concat(b.props.locale.items_per_page)},b.changeSize=function(x){b.props.changeSize(Number(x))},b.handleChange=function(x){b.setState({goInputText:x.target.value})},b.handleBlur=function(x){var g=b.props,P=g.goButton,k=g.quickGo,y=g.rootPrefixCls,A=b.state.goInputText;if(P||A==="")return;if(x.relatedTarget&&(x.relatedTarget.className.indexOf("".concat(y,"-prev"))>=0||x.relatedTarget.className.indexOf("".concat(y,"-next"))>=0))return;b.setState({goInputText:""}),k(b.getValidValue())},b.go=function(x){var g=b.state.goInputText;if(g==="")return;(x.keyCode===c.ENTER||x.type==="click")&&(b.setState({goInputText:""}),b.props.quickGo(b.getValidValue()))},b}return Object(W.a)(_,[{key:"getValidValue",value:function(){var v=this.state,h=v.goInputText,C=v.current;return!h||isNaN(h)?C:Number(h)}},{key:"getPageSizeOptions",value:function(){var v=this.props,h=v.pageSize,C=v.pageSizeOptions;return C.some(function(x){return x.toString()===h.toString()})?C:C.concat([h.toString()]).sort(function(x,g){var P=isNaN(Number(x))?0:Number(x),k=isNaN(Number(g))?0:Number(g);return P-k})}},{key:"render",value:function(){var v=this,h=this.props,C=h.pageSize,x=h.locale,g=h.rootPrefixCls,P=h.changeSize,k=h.quickGo,y=h.goButton,A=h.selectComponentClass,F=h.buildOptionText,T=h.selectPrefixCls,Y=h.disabled,$=this.state.goInputText,le="".concat(g,"-options"),de=A,Pe=null,Se=null,we=null;if(!P&&!k)return null;var Fe=this.getPageSizeOptions();if(P&&de){var Me=Fe.map(function(me,pe){return n.a.createElement(de.Option,{key:pe,value:me.toString()},(F||v.buildOptionText)(me))});Pe=n.a.createElement(de,{disabled:Y,prefixCls:T,showSearch:!1,className:"".concat(le,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||Fe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(pe){return pe.parentNode}},Me)}return k&&(y&&(we=typeof y=="boolean"?n.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Y,className:"".concat(le,"-quick-jumper-button")},x.jump_to_confirm):n.a.createElement("span",{onClick:this.go,onKeyUp:this.go},y)),Se=n.a.createElement("div",{className:"".concat(le,"-quick-jumper")},x.jump_to,n.a.createElement("input",{disabled:Y,type:"text",value:$,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),x.page,we)),n.a.createElement("li",{className:"".concat(le)},Pe,Se)}}]),_}(n.a.Component);r.defaultProps={pageSizeOptions:["10","20","50","100"]};var d=r,u=B("N2Kk");function o(){}function s(D){return typeof D=="number"&&isFinite(D)&&Math.floor(D)===D}function a(D,I,_){return _}function R(D,I,_){var b=typeof D=="undefined"?I.pageSize:D;return Math.floor((_.total-1)/b)+1}var O=function(D){Object(M.a)(_,D);var I=Object(K.a)(_);function _(b){var v;Object(V.a)(this,_),v=I.call(this,b),v.getJumpPrevPage=function(){return Math.max(1,v.state.current-(v.props.showLessItems?3:5))},v.getJumpNextPage=function(){return Math.min(R(void 0,v.state,v.props),v.state.current+(v.props.showLessItems?3:5))},v.getItemIcon=function(P,k){var y=v.props.prefixCls,A=P||n.a.createElement("button",{type:"button","aria-label":k,className:"".concat(y,"-item-link")});return typeof P=="function"&&(A=n.a.createElement(P,Object(U.a)({},v.props))),A},v.savePaginationNode=function(P){v.paginationNode=P},v.isValid=function(P){return s(P)&&P!==v.state.current},v.shouldDisplayQuickJumper=function(){var P=v.props,k=P.showQuickJumper,y=P.pageSize,A=P.total;return A<=y?!1:k},v.handleKeyDown=function(P){(P.keyCode===c.ARROW_UP||P.keyCode===c.ARROW_DOWN)&&P.preventDefault()},v.handleKeyUp=function(P){var k=v.getValidValue(P),y=v.state.currentInputValue;k!==y&&v.setState({currentInputValue:k}),P.keyCode===c.ENTER?v.handleChange(k):P.keyCode===c.ARROW_UP?v.handleChange(k-1):P.keyCode===c.ARROW_DOWN&&v.handleChange(k+1)},v.changePageSize=function(P){var k=v.state.current,y=R(P,v.state,v.props);k=k>y?y:k,y===0&&(k=v.state.current),typeof P=="number"&&("pageSize"in v.props||v.setState({pageSize:P}),"current"in v.props||v.setState({current:k,currentInputValue:k})),v.props.onShowSizeChange(k,P),"onChange"in v.props&&v.props.onChange&&v.props.onChange(k,P)},v.handleChange=function(P){var k=v.props.disabled,y=P;if(v.isValid(y)&&!k){var A=R(void 0,v.state,v.props);y>A?y=A:y<1&&(y=1),"current"in v.props||v.setState({current:y,currentInputValue:y});var F=v.state.pageSize;return v.props.onChange(y,F),y}return v.state.current},v.prev=function(){v.hasPrev()&&v.handleChange(v.state.current-1)},v.next=function(){v.hasNext()&&v.handleChange(v.state.current+1)},v.jumpPrev=function(){v.handleChange(v.getJumpPrevPage())},v.jumpNext=function(){v.handleChange(v.getJumpNextPage())},v.hasPrev=function(){return v.state.current>1},v.hasNext=function(){return v.state.current<R(void 0,v.state,v.props)},v.runIfEnter=function(P,k){if(P.key==="Enter"||P.charCode===13){for(var y=arguments.length,A=new Array(y>2?y-2:0),F=2;F<y;F++)A[F-2]=arguments[F];k.apply(void 0,A)}},v.runIfEnterPrev=function(P){v.runIfEnter(P,v.prev)},v.runIfEnterNext=function(P){v.runIfEnter(P,v.next)},v.runIfEnterJumpPrev=function(P){v.runIfEnter(P,v.jumpPrev)},v.runIfEnterJumpNext=function(P){v.runIfEnter(P,v.jumpNext)},v.handleGoTO=function(P){(P.keyCode===c.ENTER||P.type==="click")&&v.handleChange(v.state.currentInputValue)};var h=b.onChange!==o,C="current"in b;C&&!h&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var x=b.defaultCurrent;"current"in b&&(x=b.current);var g=b.defaultPageSize;return"pageSize"in b&&(g=b.pageSize),x=Math.min(x,R(g,void 0,b)),v.state={current:x,currentInputValue:x,pageSize:g},v}return Object(W.a)(_,[{key:"componentDidUpdate",value:function(v,h){var C=this.props.prefixCls;if(h.current!==this.state.current&&this.paginationNode){var x=this.paginationNode.querySelector(".".concat(C,"-item-").concat(h.current));x&&document.activeElement===x&&x.blur()}}},{key:"getValidValue",value:function(v){var h=v.target.value,C=R(void 0,this.state,this.props),x=this.state.currentInputValue,g;return h===""?g=h:isNaN(Number(h))?g=x:h>=C?g=C:g=Number(h),g}},{key:"getShowSizeChanger",value:function(){var v=this.props,h=v.showSizeChanger,C=v.total,x=v.totalBoundaryShowSizeChanger;return typeof h!="undefined"?h:C>x}},{key:"renderPrev",value:function(v){var h=this.props,C=h.prevIcon,x=h.itemRender,g=x(v,"prev",this.getItemIcon(C,"prev page")),P=!this.hasPrev();return Object(j.isValidElement)(g)?Object(j.cloneElement)(g,{disabled:P}):g}},{key:"renderNext",value:function(v){var h=this.props,C=h.nextIcon,x=h.itemRender,g=x(v,"next",this.getItemIcon(C,"next page")),P=!this.hasNext();return Object(j.isValidElement)(g)?Object(j.cloneElement)(g,{disabled:P}):g}},{key:"render",value:function(){var v=this,h=this.props,C=h.prefixCls,x=h.className,g=h.style,P=h.disabled,k=h.hideOnSinglePage,y=h.total,A=h.locale,F=h.showQuickJumper,T=h.showLessItems,Y=h.showTitle,$=h.showTotal,le=h.simple,de=h.itemRender,Pe=h.showPrevNextJumpers,Se=h.jumpPrevIcon,we=h.jumpNextIcon,Fe=h.selectComponentClass,Me=h.selectPrefixCls,me=h.pageSizeOptions,pe=this.state,ne=pe.current,Ee=pe.pageSize,ae=pe.currentInputValue;if(k===!0&&y<=Ee)return null;var ke=R(void 0,this.state,this.props),je=[],Oe=null,Ve=null,qe=null,ue=null,ve=null,De=F&&F.goButton,Ne=T?1:2,it=ne-1>0?ne-1:0,pt=ne+1<ke?ne+1:ke,mt=Object.keys(this.props).reduce(function(ie,oe){return(oe.substr(0,5)==="data-"||oe.substr(0,5)==="aria-"||oe==="role")&&(ie[oe]=v.props[oe]),ie},{});if(le)return De&&(typeof De=="boolean"?ve=n.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},A.jump_to_confirm):ve=n.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},De),ve=n.a.createElement("li",{title:Y?"".concat(A.jump_to).concat(ne,"/").concat(ke):null,className:"".concat(C,"-simple-pager")},ve)),n.a.createElement("ul",Object(Z.a)({className:m()(C,"".concat(C,"-simple"),Object(G.a)({},"".concat(C,"-disabled"),P),x),style:g,ref:this.savePaginationNode},mt),n.a.createElement("li",{title:Y?A.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:m()("".concat(C,"-prev"),Object(G.a)({},"".concat(C,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(it)),n.a.createElement("li",{title:Y?"".concat(ne,"/").concat(ke):null,className:"".concat(C,"-simple-pager")},n.a.createElement("input",{type:"text",value:ae,disabled:P,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),n.a.createElement("span",{className:"".concat(C,"-slash")},"/"),ke),n.a.createElement("li",{title:Y?A.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:m()("".concat(C,"-next"),Object(G.a)({},"".concat(C,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(pt)),ve);if(ke<=3+Ne*2){var dt={locale:A,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Y,itemRender:de};ke||je.push(n.a.createElement(p,Object(Z.a)({},dt,{key:"noPager",page:ke,className:"".concat(C,"-disabled")})));for(var Tt=1;Tt<=ke;Tt+=1){var St=ne===Tt;je.push(n.a.createElement(p,Object(Z.a)({},dt,{key:Tt,page:Tt,active:St})))}}else{var Ue=T?A.prev_3:A.prev_5,Ie=T?A.next_3:A.next_5;Pe&&(Oe=n.a.createElement("li",{title:Y?Ue:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:m()("".concat(C,"-jump-prev"),Object(G.a)({},"".concat(C,"-jump-prev-custom-icon"),!!Se))},de(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Se,"prev page"))),Ve=n.a.createElement("li",{title:Y?Ie:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:m()("".concat(C,"-jump-next"),Object(G.a)({},"".concat(C,"-jump-next-custom-icon"),!!we))},de(this.getJumpNextPage(),"jump-next",this.getItemIcon(we,"next page")))),ue=n.a.createElement(p,{locale:A,last:!0,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ke,page:ke,active:!1,showTitle:Y,itemRender:de}),qe=n.a.createElement(p,{locale:A,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Y,itemRender:de});var tt=Math.max(1,ne-Ne),lt=Math.min(ne+Ne,ke);ne-1<=Ne&&(lt=1+Ne*2),ke-ne<=Ne&&(tt=ke-Ne*2);for(var Ke=tt;Ke<=lt;Ke+=1){var Xe=ne===Ke;je.push(n.a.createElement(p,{locale:A,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ke,page:Ke,active:Xe,showTitle:Y,itemRender:de}))}ne-1>=Ne*2&&ne!==1+2&&(je[0]=Object(j.cloneElement)(je[0],{className:"".concat(C,"-item-after-jump-prev")}),je.unshift(Oe)),ke-ne>=Ne*2&&ne!==ke-2&&(je[je.length-1]=Object(j.cloneElement)(je[je.length-1],{className:"".concat(C,"-item-before-jump-next")}),je.push(Ve)),tt!==1&&je.unshift(qe),lt!==ke&&je.push(ue)}var Ce=null;$&&(Ce=n.a.createElement("li",{className:"".concat(C,"-total-text")},$(y,[y===0?0:(ne-1)*Ee+1,ne*Ee>y?y:ne*Ee])));var ge=!this.hasPrev()||!ke,be=!this.hasNext()||!ke;return n.a.createElement("ul",Object(Z.a)({className:m()(C,x,Object(G.a)({},"".concat(C,"-disabled"),P)),style:g,unselectable:"unselectable",ref:this.savePaginationNode},mt),Ce,n.a.createElement("li",{title:Y?A.prev_page:null,onClick:this.prev,tabIndex:ge?null:0,onKeyPress:this.runIfEnterPrev,className:m()("".concat(C,"-prev"),Object(G.a)({},"".concat(C,"-disabled"),ge)),"aria-disabled":ge},this.renderPrev(it)),je,n.a.createElement("li",{title:Y?A.next_page:null,onClick:this.next,tabIndex:be?null:0,onKeyPress:this.runIfEnterNext,className:m()("".concat(C,"-next"),Object(G.a)({},"".concat(C,"-disabled"),be)),"aria-disabled":be},this.renderNext(pt)),n.a.createElement(d,{disabled:P,locale:A,rootPrefixCls:C,selectComponentClass:Fe,selectPrefixCls:Me,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:ne,pageSize:Ee,pageSizeOptions:me,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:De}))}}],[{key:"getDerivedStateFromProps",value:function(v,h){var C={};if("current"in v&&(C.current=v.current,v.current!==h.current&&(C.currentInputValue=C.current)),"pageSize"in v&&v.pageSize!==h.pageSize){var x=h.current,g=R(v.pageSize,h,v);x=x>g?g:x,"current"in v||(C.current=x,C.currentInputValue=x),C.pageSize=v.pageSize}return C}}]),_}(n.a.Component);O.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:o,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:o,locale:u.a,style:{},itemRender:a,totalBoundaryShowSizeChanger:50};var S=O},"6RRn":function(We,se,B){"use strict";var Z=B("wCXF"),G=B("n6Qo");B.d(se,"b",function(){return G.a});var U=B("IBYe"),V=B("6eGT"),W=B("hW8S");B.d(se,"a",function(){return W.a}),se.c=Z.b},"6UM0":function(We,se,B){var Z,G;(function(){var U;(function(){"use strict";var W=[function(n,w,m){var f=m(1).Beautifier,p=m(5).Options;function c(r,d){var u=new f(r,d);return u.beautify()}n.exports=c,n.exports.defaultOptions=function(){return new p}},function(n,w,m){var f=m(2).Output,p=m(3).Token,c=m(4),r=m(5).Options,d=m(7).Tokenizer,u=m(7).line_starters,o=m(7).positionable_operators,s=m(7).TOKEN;function a(T,Y){return Y.indexOf(T)!==-1}function R(T){return T.replace(/^\s+/g,"")}function O(T){for(var Y={},$=0;$<T.length;$++)Y[T[$].replace(/-/g,"_")]=T[$];return Y}function S(T,Y){return T&&T.type===s.RESERVED&&T.text===Y}function D(T,Y){return T&&T.type===s.RESERVED&&a(T.text,Y)}var I=["case","return","do","if","throw","else","await","break","continue","async"],_=["before-newline","after-newline","preserve-newline"],b=O(_),v=[b.before_newline,b.preserve_newline],h={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function C(T,Y){if(Y.multiline_frame||Y.mode===h.ForInitializer||Y.mode===h.Conditional)return;T.remove_indent(Y.start_line_index)}function x(T){T=T.replace(c.allLineBreaks,`
`);for(var Y=[],$=T.indexOf(`
`);$!==-1;)Y.push(T.substring(0,$)),T=T.substring($+1),$=T.indexOf(`
`);return T.length&&Y.push(T),Y}function g(T){return T===h.ArrayLiteral}function P(T){return a(T,[h.Expression,h.ForInitializer,h.Conditional])}function k(T,Y){for(var $=0;$<T.length;$++){var le=T[$].trim();if(le.charAt(0)!==Y)return!1}return!0}function y(T,Y){for(var $=0,le=T.length,de;$<le;$++)if(de=T[$],de&&de.indexOf(Y)!==0)return!1;return!0}function A(T,Y){Y=Y||{},this._source_text=T||"",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 r(Y)}A.prototype.create_flags=function(T,Y){var $=0;T&&($=T.indentation_level,!this._output.just_added_newline()&&T.line_indent_level>$&&($=T.line_indent_level));var le={mode:Y,parent:T,last_token:T?T.last_token:new p(s.START_BLOCK,""),last_word:T?T.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:$,alignment:0,line_indent_level:T?T.line_indent_level:$,start_line_index:this._output.get_line_number(),ternary_depth:0};return le},A.prototype._reset=function(T){var Y=T.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new f(this._options,Y),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(h.BlockStatement);var $=new d(T,this._options);return this._tokens=$.tokenize(),T},A.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var T,Y=this._reset(this._source_text),$=this._options.eol;this._options.eol==="auto"&&($=`
`,Y&&c.lineBreak.test(Y||"")&&($=Y.match(c.lineBreak)[0]));for(var le=this._tokens.next();le;)this.handle_token(le),this._last_last_text=this._flags.last_token.text,this._flags.last_token=le,le=this._tokens.next();return T=this._output.get_code($),T},A.prototype.handle_token=function(T,Y){T.type===s.START_EXPR?this.handle_start_expr(T):T.type===s.END_EXPR?this.handle_end_expr(T):T.type===s.START_BLOCK?this.handle_start_block(T):T.type===s.END_BLOCK?this.handle_end_block(T):T.type===s.WORD?this.handle_word(T):T.type===s.RESERVED?this.handle_word(T):T.type===s.SEMICOLON?this.handle_semicolon(T):T.type===s.STRING?this.handle_string(T):T.type===s.EQUALS?this.handle_equals(T):T.type===s.OPERATOR?this.handle_operator(T):T.type===s.COMMA?this.handle_comma(T):T.type===s.BLOCK_COMMENT?this.handle_block_comment(T,Y):T.type===s.COMMENT?this.handle_comment(T,Y):T.type===s.DOT?this.handle_dot(T):T.type===s.EOF?this.handle_eof(T):T.type===s.UNKNOWN?this.handle_unknown(T,Y):this.handle_unknown(T,Y)},A.prototype.handle_whitespace_and_comments=function(T,Y){var $=T.newlines,le=this._options.keep_array_indentation&&g(this._flags.mode);if(T.comments_before)for(var de=T.comments_before.next();de;)this.handle_whitespace_and_comments(de,Y),this.handle_token(de,Y),de=T.comments_before.next();if(le)for(var Pe=0;Pe<$;Pe+=1)this.print_newline(Pe>0,Y);else if(this._options.max_preserve_newlines&&$>this._options.max_preserve_newlines&&($=this._options.max_preserve_newlines),this._options.preserve_newlines&&$>1){this.print_newline(!1,Y);for(var Se=1;Se<$;Se+=1)this.print_newline(!0,Y)}};var F=["async","break","continue","return","throw","yield"];A.prototype.allow_wrap_or_preserved_newline=function(T,Y){if(Y=Y===void 0?!1:Y,this._output.just_added_newline())return;var $=this._options.preserve_newlines&&T.newlines||Y,le=a(this._flags.last_token.text,o)||a(T.text,o);if(le){var de=a(this._flags.last_token.text,o)&&a(this._options.operator_position,v)||a(T.text,o);$=$&&de}if($)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(D(this._flags.last_token,F))return;this._output.set_wrap_point()}},A.prototype.print_newline=function(T,Y){if(!Y&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var $=this._tokens.peek();this._flags.mode===h.Statement&&!(this._flags.if_block&&S($,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(T)&&(this._flags.multiline_frame=!0)},A.prototype.print_token_line_indentation=function(T){this._output.just_added_newline()&&(this._options.keep_array_indentation&&T.newlines&&(T.text==="["||g(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(T.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))},A.prototype.print_token=function(T){if(this._output.raw){this._output.add_raw_token(T);return}if(this._options.comma_first&&T.previous&&T.previous.type===s.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var Y=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(Y),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(T),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(T),this._output.non_breaking_space=!0,this._output.add_token(T.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},A.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},A.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))},A.prototype.set_mode=function(T){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,T),this._flags=this.create_flags(this._previous_flags,T),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},A.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===h.Statement&&C(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},A.prototype.start_of_object_property=function(){return this._flags.parent.mode===h.ObjectLiteral&&this._flags.mode===h.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"]))},A.prototype.start_of_statement=function(T){var Y=!1;return Y=Y||D(this._flags.last_token,["var","let","const"])&&T.type===s.WORD,Y=Y||S(this._flags.last_token,"do"),Y=Y||!(this._flags.parent.mode===h.ObjectLiteral&&this._flags.mode===h.Statement)&&D(this._flags.last_token,F)&&!T.newlines,Y=Y||S(this._flags.last_token,"else")&&!(S(T,"if")&&!T.comments_before),Y=Y||this._flags.last_token.type===s.END_EXPR&&(this._previous_flags.mode===h.ForInitializer||this._previous_flags.mode===h.Conditional),Y=Y||this._flags.last_token.type===s.WORD&&this._flags.mode===h.BlockStatement&&!this._flags.in_case&&!(T.text==="--"||T.text==="++")&&this._last_last_text!=="function"&&T.type!==s.WORD&&T.type!==s.RESERVED,Y=Y||this._flags.mode===h.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"])),Y?(this.set_mode(h.Statement),this.indent(),this.handle_whitespace_and_comments(T,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T,D(T,["do","for","if","while"])),!0):!1},A.prototype.handle_start_expr=function(T){this.start_of_statement(T)||this.handle_whitespace_and_comments(T);var Y=h.Expression;if(T.text==="["){if(this._flags.last_token.type===s.WORD||this._flags.last_token.text===")"){D(this._flags.last_token,u)&&(this._output.space_before_token=!0),this.print_token(T),this.set_mode(Y),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Y=h.ArrayLiteral,g(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())),a(this._flags.last_token.type,[s.START_EXPR,s.END_EXPR,s.WORD,s.OPERATOR,s.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===s.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,Y=h.ForInitializer):a(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Y=h.Conditional):a(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&T.whitespace_before===""?this._output.space_before_token=!1:(a(this._flags.last_token.text,u)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T);else if(this._flags.last_token.type===s.WORD){this._output.space_before_token=!1;var $=this._tokens.peek(-3);if(this._options.space_after_named_function&&$){var le=this._tokens.peek(-4);D($,["async","function"])||$.text==="*"&&D(le,["async","function"])?this._output.space_before_token=!0:this._flags.mode===h.ObjectLiteral?($.text==="{"||$.text===","||$.text==="*"&&(le.text==="{"||le.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(T);(this._flags.last_token.type===s.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(a(this._last_last_text,["function","yield"])||this._flags.mode===h.ObjectLiteral&&a(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===s.START_BLOCK?this.print_newline():(this._flags.last_token.type===s.END_EXPR||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===s.COMMA)&&this.allow_wrap_or_preserved_newline(T,T.newlines),this.print_token(T),this.set_mode(Y),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},A.prototype.handle_end_expr=function(T){for(;this._flags.mode===h.Statement;)this.restore_mode();this.handle_whitespace_and_comments(T),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(T,T.text==="]"&&g(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===s.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(T),this.restore_mode(),C(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===h.Conditional&&(this._previous_flags.mode=h.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},A.prototype.handle_start_block=function(T){this.handle_whitespace_and_comments(T);var Y=this._tokens.peek(),$=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===s.END_EXPR?(this.set_mode(h.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(h.BlockStatement):$&&(a($.text,[":",","])&&a(Y.type,[s.STRING,s.WORD,s.RESERVED])||a(Y.text,["get","set","..."])&&a($.type,[s.WORD,s.RESERVED]))?a(this._last_last_text,["class","interface"])&&!a($.text,[":",","])?this.set_mode(h.BlockStatement):this.set_mode(h.ObjectLiteral):this._flags.last_token.type===s.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(h.BlockStatement):a(this._flags.last_token.type,[s.EQUALS,s.START_EXPR,s.COMMA,s.OPERATOR])||D(this._flags.last_token,["return","throw","import","default"])?this.set_mode(h.ObjectLiteral):this.set_mode(h.BlockStatement),this._flags.last_token&&(D(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var le=!Y.comments_before&&Y.text==="}",de=le&&this._flags.last_word==="function"&&this._flags.last_token.type===s.END_EXPR;if(this._options.brace_preserve_inline){var Pe=0,Se=null;this._flags.inline_frame=!0;do if(Pe+=1,Se=this._tokens.peek(Pe-1),Se.newlines){this._flags.inline_frame=!1;break}while(Se.type!==s.EOF&&!(Se.type===s.END_BLOCK&&Se.opened===T))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&T.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==s.OPERATOR&&(de||this._flags.last_token.type===s.EQUALS||D(this._flags.last_token,I)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(g(this._previous_flags.mode)&&(this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.COMMA)&&((this._flags.last_token.type===s.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(T),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==s.OPERATOR&&this._flags.last_token.type!==s.START_EXPR&&(this._flags.last_token.type===s.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(T),this.indent(),!le&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},A.prototype.handle_end_block=function(T){for(this.handle_whitespace_and_comments(T);this._flags.mode===h.Statement;)this.restore_mode();var Y=this._flags.last_token.type===s.START_BLOCK;this._flags.inline_frame&&!Y?this._output.space_before_token=!0:this._options.brace_style==="expand"?Y||this.print_newline():Y||(g(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(T)},A.prototype.handle_word=function(T){if(T.type===s.RESERVED){if(a(T.text,["set","get"])&&this._flags.mode!==h.ObjectLiteral)T.type=s.WORD;else if(T.text==="import"&&a(this._tokens.peek().text,["(","."]))T.type=s.WORD;else if(a(T.text,["as","from"])&&!this._flags.import_block)T.type=s.WORD;else if(this._flags.mode===h.ObjectLiteral){var Y=this._tokens.peek();Y.text===":"&&(T.type=s.WORD)}}if(this.start_of_statement(T)?D(this._flags.last_token,["var","let","const"])&&T.type===s.WORD&&(this._flags.declaration_statement=!0):T.newlines&&!P(this._flags.mode)&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==s.EQUALS&&(this._options.preserve_newlines||!D(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(T),this.print_newline()):this.handle_whitespace_and_comments(T),this._flags.do_block&&!this._flags.do_while)if(S(T,"while")){this._output.space_before_token=!0,this.print_token(T),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&&S(T,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===h.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&D(T,["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(T),this._flags.in_case=!0;return}if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T)),S(T,"function")){(a(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(a(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===s.OPERATOR))&&(!this._output.just_added_blankline()&&!T.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD?D(this._flags.last_token,["get","set","new","export"])||D(this._flags.last_token,F)?this._output.space_before_token=!0:S(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===s.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(P(this._flags.mode)||g(this._flags.mode))||this.print_newline(),this.print_token(T),this._flags.last_word=T.text;return}var $="NONE";if(this._flags.last_token.type===s.END_BLOCK?this._previous_flags.inline_frame?$="SPACE":D(T,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&T.newlines?$="NEWLINE":($="SPACE",this._output.space_before_token=!0):$="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&this._flags.mode===h.BlockStatement?$="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&P(this._flags.mode)?$="SPACE":this._flags.last_token.type===s.STRING?$="NEWLINE":this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.last_token.text==="*"&&(a(this._last_last_text,["function","yield"])||this._flags.mode===h.ObjectLiteral&&a(this._last_last_text,["{",","]))?$="SPACE":this._flags.last_token.type===s.START_BLOCK?this._flags.inline_frame?$="SPACE":$="NEWLINE":this._flags.last_token.type===s.END_EXPR&&(this._output.space_before_token=!0,$="NEWLINE"),D(T,u)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?$="SPACE":$="NEWLINE"),D(T,["else","catch","finally"]))if((!(this._flags.last_token.type===s.END_BLOCK&&this._previous_flags.mode===h.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&T.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var le=this._output.current_line;le.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else $==="NEWLINE"?D(this._flags.last_token,I)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&D(T,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==s.END_EXPR?(this._flags.last_token.type!==s.START_EXPR||!D(T,["var","let","const"]))&&this._flags.last_token.text!==":"&&(S(T,"if")&&S(T.previous,"else")?this._output.space_before_token=!0:this.print_newline()):D(T,u)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&g(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():$==="SPACE"&&(this._output.space_before_token=!0);T.previous&&(T.previous.type===s.WORD||T.previous.type===s.RESERVED)&&(this._output.space_before_token=!0),this.print_token(T),this._flags.last_word=T.text,T.type===s.RESERVED&&(T.text==="do"?this._flags.do_block=!0:T.text==="if"?this._flags.if_block=!0:T.text==="import"?this._flags.import_block=!0:this._flags.import_block&&S(T,"from")&&(this._flags.import_block=!1))},A.prototype.handle_semicolon=function(T){this.start_of_statement(T)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(T);for(var Y=this._tokens.peek();this._flags.mode===h.Statement&&!(this._flags.if_block&&S(Y,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(T)},A.prototype.handle_string=function(T){T.text.startsWith("`")&&T.newlines===0&&T.whitespace_before===""&&(T.previous.text===")"||this._flags.last_token.type===s.WORD)||(this.start_of_statement(T)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(T),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T):T.text.startsWith("`")&&this._flags.last_token.type===s.END_EXPR&&(T.previous.text==="]"||T.previous.text===")")&&T.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(T)},A.prototype.handle_equals=function(T){this.start_of_statement(T)||this.handle_whitespace_and_comments(T),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0},A.prototype.handle_comma=function(T){this.handle_whitespace_and_comments(T,!0),this.print_token(T),this._output.space_before_token=!0,this._flags.declaration_statement?(P(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(T)):this._flags.mode===h.ObjectLiteral||this._flags.mode===h.Statement&&this._flags.parent.mode===h.ObjectLiteral?(this._flags.mode===h.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(T)},A.prototype.handle_operator=function(T){var Y=T.text==="*"&&(D(this._flags.last_token,["function","yield"])||a(this._flags.last_token.type,[s.START_BLOCK,s.COMMA,s.END_BLOCK,s.SEMICOLON])),$=a(T.text,["-","+"])&&(a(this._flags.last_token.type,[s.START_BLOCK,s.START_EXPR,s.EQUALS,s.OPERATOR])||a(this._flags.last_token.text,u)||this._flags.last_token.text===",");if(!this.start_of_statement(T)){var le=!Y;this.handle_whitespace_and_comments(T,le)}if(T.text==="*"&&this._flags.last_token.type===s.DOT){this.print_token(T);return}if(T.text==="::"){this.print_token(T);return}if(this._flags.last_token.type===s.OPERATOR&&a(this._options.operator_position,v)&&this.allow_wrap_or_preserved_newline(T),T.text===":"&&this._flags.in_case){this.print_token(T),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==s.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 de=!0,Pe=!0,Se=!1;if(T.text===":"?this._flags.ternary_depth===0?de=!1:(this._flags.ternary_depth-=1,Se=!0):T.text==="?"&&(this._flags.ternary_depth+=1),!$&&!Y&&this._options.preserve_newlines&&a(T.text,o)){var we=T.text===":",Fe=we&&Se,Me=we&&!Se;switch(this._options.operator_position){case b.before_newline:this._output.space_before_token=!Me,this.print_token(T),(!we||Fe)&&this.allow_wrap_or_preserved_newline(T),this._output.space_before_token=!0;return;case b.after_newline:this._output.space_before_token=!0,!we||Fe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(T):this._output.space_before_token=!1,this.print_token(T),this._output.space_before_token=!0;return;case b.preserve_newline:Me||this.allow_wrap_or_preserved_newline(T),de=!(this._output.just_added_newline()||Me),this._output.space_before_token=de,this.print_token(T),this._output.space_before_token=!0;return}}if(Y){this.allow_wrap_or_preserved_newline(T),de=!1;var me=this._tokens.peek();Pe=me&&a(me.type,[s.WORD,s.RESERVED])}else if(T.text==="...")this.allow_wrap_or_preserved_newline(T),de=this._flags.last_token.type===s.START_BLOCK,Pe=!1;else if(a(T.text,["--","++","!","~"])||$){if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR)&&this.allow_wrap_or_preserved_newline(T),de=!1,Pe=!1,T.newlines&&(T.text==="--"||T.text==="++"||T.text==="~")){var pe=D(this._flags.last_token,I)&&T.newlines;pe&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(pe,!0)}this._flags.last_token.text===";"&&P(this._flags.mode)&&(de=!0),this._flags.last_token.type===s.RESERVED?de=!0:this._flags.last_token.type===s.END_EXPR?de=!(this._flags.last_token.text==="]"&&(T.text==="--"||T.text==="++")):this._flags.last_token.type===s.OPERATOR&&(de=a(T.text,["--","-","++","+"])&&a(this._flags.last_token.text,["--","-","++","+"]),a(T.text,["+","-"])&&a(this._flags.last_token.text,["--","++"])&&(Pe=!0)),(this._flags.mode===h.BlockStatement&&!this._flags.inline_frame||this._flags.mode===h.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||de,this.print_token(T),this._output.space_before_token=Pe},A.prototype.handle_block_comment=function(T,Y){if(this._output.raw){this._output.add_raw_token(T),T.directives&&T.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(T.directives){this.print_newline(!1,Y),this.print_token(T),T.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!c.newline.test(T.text)&&!T.newlines){this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0;return}else this.print_block_commment(T,Y)},A.prototype.print_block_commment=function(T,Y){var $=x(T.text),le,de=!1,Pe=!1,Se=T.whitespace_before,we=Se.length;if(this.print_newline(!1,Y),this.print_token_line_indentation(T),this._output.add_token($[0]),this.print_newline(!1,Y),$.length>1){for($=$.slice(1),de=k($,"*"),Pe=y($,Se),de&&(this._flags.alignment=1),le=0;le<$.length;le++)de?(this.print_token_line_indentation(T),this._output.add_token(R($[le]))):Pe&&$[le]?(this.print_token_line_indentation(T),this._output.add_token($[le].substring(we))):(this._output.current_line.set_indent(-1),this._output.add_token($[le])),this.print_newline(!1,Y);this._flags.alignment=0}},A.prototype.handle_comment=function(T,Y){T.newlines?this.print_newline(!1,Y):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(T),this.print_newline(!1,Y)},A.prototype.handle_dot=function(T){this.start_of_statement(T)||this.handle_whitespace_and_comments(T,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),D(this._flags.last_token,I)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(T,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(T)},A.prototype.handle_unknown=function(T,Y){this.print_token(T),T.text[T.text.length-1]===`
`&&this.print_newline(!1,Y)},A.prototype.handle_eof=function(T){for(;this._flags.mode===h.Statement;)this.restore_mode();this.handle_whitespace_and_comments(T)},n.exports.Beautifier=A},function(n){function w(p){this.__parent=p,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=[]}w.prototype.clone_empty=function(){var p=new w(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},w.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},w.prototype.has_match=function(p){for(var c=this.__items.length-1;c>=0;c--)if(this.__items[c].match(p))return!0;return!1},w.prototype.set_indent=function(p,c){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},w.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)},w.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},w.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},w.prototype.is_empty=function(){return this.__items.length===0},w.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},w.prototype.push=function(p){this.__items.push(p);var c=p.lastIndexOf(`
`);c!==-1?this.__character_count=p.length-c:this.__character_count+=p.length},w.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},w.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},w.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},w.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},w.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function m(p,c){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),c=c||"",p.indent_level>0&&(c=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}m.prototype.get_indent_size=function(p,c){var r=this.__base_string_length;return c=c||0,p<0&&(r=0),r+=p*this.__indent_size,r+=c,r},m.prototype.get_indent_string=function(p,c){var r=this.__base_string;return c=c||0,p<0&&(p=0,r=""),c+=p*this.__indent_size,this.__ensure_cache(c),r+=this.__cache[c],r},m.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},m.prototype.__add_column=function(){var p=this.__cache.length,c=0,r="";this.__indent_size&&p>=this.__indent_size&&(c=Math.floor(p/this.__indent_size),p-=c*this.__indent_size,r=new Array(c+1).join(this.__indent_string)),p&&(r+=new Array(p+1).join(" ")),this.__cache.push(r)};function f(p,c){this.__indent_cache=new m(p,c),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new w(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(p,c){return this.__indent_cache.get_indent_string(p,c)},f.prototype.get_indent_size=function(p,c){return this.__indent_cache.get_indent_size(p,c)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(p){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===`
`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join(`
`);return p!==`
`&&(r=r.replace(/[\n]/g,p)),r},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(p,c){return p=p||0,c=c||0,this.next_line.set_indent(p,c),this.__lines.length>1?(this.current_line.set_indent(p,c),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(p){for(var c=0;c<p.newlines;c++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(p.whitespace_before),this.current_line.push(p.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},f.prototype.add_token=function(p){this.__add_space_before_token(),this.current_line.push(p),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},f.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(" "))},f.prototype.remove_indent=function(p){for(var c=this.__lines.length;p<c;)this.__lines[p]._remove_indent(),p++;this.current_line._remove_wrap_indent()},f.prototype.trim=function(p){for(p=p===void 0?!1:p,this.current_line.trim();p&&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},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(p,c){for(var r=this.__lines.length-2;r>=0;){var d=this.__lines[r];if(d.is_empty())break;if(d.item(0).indexOf(p)!==0&&d.item(-1)!==c){this.__lines.splice(r+1,0,new w(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},n.exports.Output=f},function(n){function w(m,f,p,c){this.type=m,this.text=f,this.comments_before=null,this.newlines=p||0,this.whitespace_before=c||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=w},function(n,w){var m="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",f="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",p="\\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",c="\\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",r="(?:\\\\u[0-9a-fA-F]{4}|["+m+p+"])",d="(?:\\\\u[0-9a-fA-F]{4}|["+f+p+c+"])*";w.identifier=new RegExp(r+d,"g"),w.identifierStart=new RegExp(r),w.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+f+p+c+"])+");var u=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;w.newline=/[\n\r\u2028\u2029]/,w.lineBreak=new RegExp(`\r
|`+w.newline.source),w.allLineBreaks=new RegExp(w.lineBreak.source,"g")},function(n,w,m){var f=m(6).Options,p=["before-newline","after-newline","preserve-newline"];function c(r){f.call(this,r,"js");var d=this.raw_options.brace_style||null;d==="expand-strict"?this.raw_options.brace_style="expand":d==="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 u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var o=0;o<u.length;o++)u[o]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=u[o];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",p),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}c.prototype=new f,n.exports.Options=c},function(n){function w(p,c){this.raw_options=m(p,c),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"])}w.prototype._get_array=function(p,c){var r=this.raw_options[p],d=c||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(d=r.concat()):typeof r=="string"&&(d=r.split(/[^a-zA-Z0-9_\/\-]+/)),d},w.prototype._get_boolean=function(p,c){var r=this.raw_options[p],d=r===void 0?!!c:!!r;return d},w.prototype._get_characters=function(p,c){var r=this.raw_options[p],d=c||"";return typeof r=="string"&&(d=r.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),d},w.prototype._get_number=function(p,c){var r=this.raw_options[p];c=parseInt(c,10),isNaN(c)&&(c=0);var d=parseInt(r,10);return isNaN(d)&&(d=c),d},w.prototype._get_selection=function(p,c,r){var d=this._get_selection_list(p,c,r);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+p+`' can only be one of the following values:
`+c+`
You passed in: '`+this.raw_options[p]+"'");return d[0]},w.prototype._get_selection_list=function(p,c,r){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(r=r||[c[0]],!this._is_valid_selection(r,c))throw new Error("Invalid Default Value!");var d=this._get_array(p,r);if(!this._is_valid_selection(d,c))throw new Error("Invalid Option Value: The option '"+p+`' can contain only the following values:
`+c+`
You passed in: '`+this.raw_options[p]+"'");return d},w.prototype._is_valid_selection=function(p,c){return p.length&&c.length&&!p.some(function(r){return c.indexOf(r)===-1})};function m(p,c){var r={};p=f(p);var d;for(d in p)d!==c&&(r[d]=p[d]);if(c&&p[c])for(d in p[c])r[d]=p[c][d];return r}function f(p){var c={},r;for(r in p){var d=r.replace(/-/g,"_");c[d]=p[r]}return c}n.exports.Options=w,n.exports.normalizeOpts=f,n.exports.mergeOpts=m},function(n,w,m){var f=m(8).InputScanner,p=m(9).Tokenizer,c=m(9).TOKEN,r=m(13).Directives,d=m(4),u=m(12).Pattern,o=m(14).TemplatablePattern;function s(k,y){return y.indexOf(k)!==-1}var a={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:c.START,RAW:c.RAW,EOF:c.EOF},R=new r(/\/\*/,/\*\//),O=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,S=/[0-9]/,D=/[^\d\.]/,I=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),_=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";_=_.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),_="\\?\\.(?!\\d) "+_,_=_.replace(/ /g,"|");var b=new RegExp(_),v="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),h=v.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),C=new RegExp("^(?:"+h.join("|")+")$"),x,g=function(k,y){p.call(this,k,y),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var A=new u(this._input),F=new o(this._input).read_options(this._options);this.__patterns={template:F,identifier:F.starting_with(d.identifier).matching(d.identifierMatch),number:A.matching(O),punct:A.matching(b),comment:A.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:A.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:A.matching(/<!--/),html_comment_end:A.matching(/-->/),include:A.starting_with(/#include/).until_after(d.lineBreak),shebang:A.starting_with(/#!/).until_after(d.lineBreak),xml:A.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(/[`}\\]/)}};g.prototype=new p,g.prototype._is_comment=function(k){return k.type===a.COMMENT||k.type===a.BLOCK_COMMENT||k.type===a.UNKNOWN},g.prototype._is_opening=function(k){return k.type===a.START_BLOCK||k.type===a.START_EXPR},g.prototype._is_closing=function(k,y){return(k.type===a.END_BLOCK||k.type===a.END_EXPR)&&y&&(k.text==="]"&&y.text==="["||k.text===")"&&y.text==="("||k.text==="}"&&y.text==="{")},g.prototype._reset=function(){x=!1},g.prototype._get_next_token=function(k,y){var A=null;this._readWhitespace();var F=this._input.peek();return F===null?this._create_token(a.EOF,""):(A=A||this._read_non_javascript(F),A=A||this._read_string(F),A=A||this._read_word(k),A=A||this._read_singles(F),A=A||this._read_comment(F),A=A||this._read_regexp(F,k),A=A||this._read_xml(F,k),A=A||this._read_punctuation(),A=A||this._create_token(a.UNKNOWN,this._input.next()),A)},g.prototype._read_word=function(k){var y;if(y=this.__patterns.identifier.read(),y!=="")return y=y.replace(d.allLineBreaks,`
`),!(k.type===a.DOT||k.type===a.RESERVED&&(k.text==="set"||k.text==="get"))&&C.test(y)?(y==="in"||y==="of")&&(k.type===a.WORD||k.type===a.STRING)?this._create_token(a.OPERATOR,y):this._create_token(a.RESERVED,y):this._create_token(a.WORD,y);if(y=this.__patterns.number.read(),y!=="")return this._create_token(a.WORD,y)},g.prototype._read_singles=function(k){var y=null;return k==="("||k==="["?y=this._create_token(a.START_EXPR,k):k===")"||k==="]"?y=this._create_token(a.END_EXPR,k):k==="{"?y=this._create_token(a.START_BLOCK,k):k==="}"?y=this._create_token(a.END_BLOCK,k):k===";"?y=this._create_token(a.SEMICOLON,k):k==="."&&D.test(this._input.peek(1))?y=this._create_token(a.DOT,k):k===","&&(y=this._create_token(a.COMMA,k)),y&&this._input.next(),y},g.prototype._read_punctuation=function(){var k=this.__patterns.punct.read();if(k!=="")return k==="="?this._create_token(a.EQUALS,k):k==="?."?this._create_token(a.DOT,k):this._create_token(a.OPERATOR,k)},g.prototype._read_non_javascript=function(k){var y="";if(k==="#"){if(this._is_first_token()&&(y=this.__patterns.shebang.read(),y))return this._create_token(a.UNKNOWN,y.trim()+`
`);if(y=this.__patterns.include.read(),y)return this._create_token(a.UNKNOWN,y.trim()+`
`);k=this._input.next();var A="#";if(this._input.hasNext()&&this._input.testChar(S)){do k=this._input.next(),A+=k;while(this._input.hasNext()&&k!=="#"&&k!=="=");return k==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(A+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(A+="{}",this._input.next(),this._input.next())),this._create_token(a.WORD,A)}this._input.back()}else if(k==="<"&&this._is_first_token()){if(y=this.__patterns.html_comment_start.read(),y){for(;this._input.hasNext()&&!this._input.testChar(d.newline);)y+=this._input.next();return x=!0,this._create_token(a.COMMENT,y)}}else if(x&&k==="-"&&(y=this.__patterns.html_comment_end.read(),y))return x=!1,this._create_token(a.COMMENT,y);return null},g.prototype._read_comment=function(k){var y=null;if(k==="/"){var A="";if(this._input.peek(1)==="*"){A=this.__patterns.block_comment.read();var F=R.get_directives(A);F&&F.ignore==="start"&&(A+=R.readIgnored(this._input)),A=A.replace(d.allLineBreaks,`
`),y=this._create_token(a.BLOCK_COMMENT,A),y.directives=F}else this._input.peek(1)==="/"&&(A=this.__patterns.comment.read(),y=this._create_token(a.COMMENT,A))}return y},g.prototype._read_string=function(k){if(k==="`"||k==="'"||k==='"'){var y=this._input.next();return this.has_char_escapes=!1,k==="`"?y+=this._read_string_recursive("`",!0,"${"):y+=this._read_string_recursive(k),this.has_char_escapes&&this._options.unescape_strings&&(y=P(y)),this._input.peek()===k&&(y+=this._input.next()),y=y.replace(d.allLineBreaks,`
`),this._create_token(a.STRING,y)}return null},g.prototype._allow_regexp_or_xml=function(k){return k.type===a.RESERVED&&s(k.text,["return","case","throw","else","do","typeof","yield"])||k.type===a.END_EXPR&&k.text===")"&&k.opened.previous.type===a.RESERVED&&s(k.opened.previous.text,["if","while","for"])||s(k.type,[a.COMMENT,a.START_EXPR,a.START_BLOCK,a.START,a.END_BLOCK,a.OPERATOR,a.EQUALS,a.EOF,a.SEMICOLON,a.COMMA])},g.prototype._read_regexp=function(k,y){if(k==="/"&&this._allow_regexp_or_xml(y)){for(var A=this._input.next(),F=!1,T=!1;this._input.hasNext()&&(F||T||this._input.peek()!==k)&&!this._input.testChar(d.newline);)A+=this._input.peek(),F?F=!1:(F=this._input.peek()==="\\",this._input.peek()==="["?T=!0:this._input.peek()==="]"&&(T=!1)),this._input.next();return this._input.peek()===k&&(A+=this._input.next(),A+=this._input.read(d.identifier)),this._create_token(a.STRING,A)}return null},g.prototype._read_xml=function(k,y){if(this._options.e4x&&k==="<"&&this._allow_regexp_or_xml(y)){var A="",F=this.__patterns.xml.read_match();if(F){for(var T=F[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Y=T.indexOf("{")===0,$=0;F;){var le=!!F[1],de=F[2],Pe=!!F[F.length-1]||de.slice(0,8)==="![CDATA[";if(!Pe&&(de===T||Y&&de.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(le?--$:++$),A+=F[0],$<=0)break;F=this.__patterns.xml.read_match()}return F||(A+=this._input.match(/[\s\S]*/g)[0]),A=A.replace(d.allLineBreaks,`
`),this._create_token(a.STRING,A)}}return null};function P(k){for(var y="",A=0,F=new f(k),T=null;F.hasNext();)if(T=F.match(/([\s]|[^\\]|\\\\)+/g),T&&(y+=T[0]),F.peek()==="\\"){if(F.next(),F.peek()==="x")T=F.match(/x([0-9A-Fa-f]{2})/g);else if(F.peek()==="u")T=F.match(/u([0-9A-Fa-f]{4})/g);else{y+="\\",F.hasNext()&&(y+=F.next());continue}if(!T)return k;if(A=parseInt(T[1],16),A>126&&A<=255&&T[0].indexOf("x")===0)return k;if(A>=0&&A<32){y+="\\"+T[0];continue}else A===34||A===39||A===92?y+="\\"+String.fromCharCode(A):y+=String.fromCharCode(A)}return y}g.prototype._read_string_recursive=function(k,y,A){var F,T;k==="'"?T=this.__patterns.single_quote:k==='"'?T=this.__patterns.double_quote:k==="`"?T=this.__patterns.template_text:k==="}"&&(T=this.__patterns.template_expression);for(var Y=T.read(),$="";this._input.hasNext();){if($=this._input.next(),$===k||!y&&d.newline.test($)){this._input.back();break}else $==="\\"&&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(),$+=this._input.next()):A&&(A==="${"&&$==="$"&&this._input.peek()==="{"&&($+=this._input.next()),A===$&&(k==="`"?$+=this._read_string_recursive("}",y,"`"):$+=this._read_string_recursive("`",y,"${"),this._input.hasNext()&&($+=this._input.next())));$+=T.read(),Y+=$}return Y},n.exports.Tokenizer=g,n.exports.TOKEN=a,n.exports.positionable_operators=I.slice(),n.exports.line_starters=v.slice()},function(n){var w=RegExp.prototype.hasOwnProperty("sticky");function m(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}m.prototype.restart=function(){this.__position=0},m.prototype.back=function(){this.__position>0&&(this.__position-=1)},m.prototype.hasNext=function(){return this.__position<this.__input_length},m.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__input.charAt(this.__position),this.__position+=1),f},m.prototype.peek=function(f){var p=null;return f=f||0,f+=this.__position,f>=0&&f<this.__input_length&&(p=this.__input.charAt(f)),p},m.prototype.__match=function(f,p){f.lastIndex=p;var c=f.exec(this.__input);return c&&!(w&&f.sticky)&&(c.index!==p&&(c=null)),c},m.prototype.test=function(f,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(f,p):!1},m.prototype.testChar=function(f,p){var c=this.peek(p);return f.lastIndex=0,c!==null&&f.test(c)},m.prototype.match=function(f){var p=this.__match(f,this.__position);return p?this.__position+=p[0].length:p=null,p},m.prototype.read=function(f,p,c){var r="",d;return f&&(d=this.match(f),d&&(r+=d[0])),p&&(d||!f)&&(r+=this.readUntil(p,c)),r},m.prototype.readUntil=function(f,p){var c="",r=this.__position;f.lastIndex=this.__position;var d=f.exec(this.__input);return d?(r=d.index,p&&(r+=d[0].length)):r=this.__input_length,c=this.__input.substring(this.__position,r),this.__position=r,c},m.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)},m.prototype.get_regexp=function(f,p){var c=null,r="g";return p&&w&&(r="y"),typeof f=="string"&&f!==""?c=new RegExp(f,r):f&&(c=new RegExp(f.source,r)),c},m.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},m.prototype.peekUntilAfter=function(f){var p=this.__position,c=this.readUntilAfter(f);return this.__position=p,c},m.prototype.lookBack=function(f){var p=this.__position-1;return p>=f.length&&this.__input.substring(p-f.length,p).toLowerCase()===f},n.exports.InputScanner=m},function(n,w,m){var f=m(8).InputScanner,p=m(3).Token,c=m(10).TokenStream,r=m(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},u=function(o,s){this._input=new f(o),this._options=s||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new r(this._input)};u.prototype.tokenize=function(){this._input.restart(),this.__tokens=new c,this._reset();for(var o,s=new p(d.START,""),a=null,R=[],O=new c;s.type!==d.EOF;){for(o=this._get_next_token(s,a);this._is_comment(o);)O.add(o),o=this._get_next_token(s,a);O.isEmpty()||(o.comments_before=O,O=new c),o.parent=a,this._is_opening(o)?(R.push(a),a=o):a&&this._is_closing(o,a)&&(o.opened=a,a.closed=o,a=R.pop(),o.parent=a),o.previous=s,s.next=o,this.__tokens.add(o),s=o}return this.__tokens},u.prototype._is_first_token=function(){return this.__tokens.isEmpty()},u.prototype._reset=function(){},u.prototype._get_next_token=function(o,s){this._readWhitespace();var a=this._input.read(/.+/g);return a?this._create_token(d.RAW,a):this._create_token(d.EOF,"")},u.prototype._is_comment=function(o){return!1},u.prototype._is_opening=function(o){return!1},u.prototype._is_closing=function(o,s){return!1},u.prototype._create_token=function(o,s){var a=new p(o,s,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return a},u.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=u,n.exports.TOKEN=d},function(n){function w(m){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=m}w.prototype.restart=function(){this.__position=0},w.prototype.isEmpty=function(){return this.__tokens_length===0},w.prototype.hasNext=function(){return this.__position<this.__tokens_length},w.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__tokens[this.__position],this.__position+=1),m},w.prototype.peek=function(m){var f=null;return m=m||0,m+=this.__position,m>=0&&m<this.__tokens_length&&(f=this.__tokens[m]),f},w.prototype.add=function(m){this.__parent_token&&(m.parent=this.__parent_token),this.__tokens.push(m),this.__tokens_length+=1},n.exports.TokenStream=w},function(n,w,m){var f=m(12).Pattern;function p(c,r){f.call(this,c,r),r?this._line_regexp=this._input.get_regexp(r._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}p.prototype=new f,p.prototype.__set_whitespace_patterns=function(c,r){c+="\\t ",r+="\\n\\r",this._match_pattern=this._input.get_regexp("["+c+r+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+r+"]")},p.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var c=this._input.read(this._match_pattern);if(c===" ")this.whitespace_before_token=" ";else if(c){var r=this.__split(this._newline_regexp,c);this.newline_count=r.length-1,this.whitespace_before_token=r[this.newline_count]}return c},p.prototype.matching=function(c,r){var d=this._create();return d.__set_whitespace_patterns(c,r),d._update(),d},p.prototype._create=function(){return new p(this._input,this)},p.prototype.__split=function(c,r){c.lastIndex=0;for(var d=0,u=[],o=c.exec(r);o;)u.push(r.substring(d,o.index)),d=o.index+o[0].length,o=c.exec(r);return d<r.length?u.push(r.substring(d,r.length)):u.push(""),u},n.exports.WhitespacePattern=p},function(n){function w(m,f){this._input=m,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,f&&(this._starting_pattern=this._input.get_regexp(f._starting_pattern,!0),this._match_pattern=this._input.get_regexp(f._match_pattern,!0),this._until_pattern=this._input.get_regexp(f._until_pattern),this._until_after=f._until_after)}w.prototype.read=function(){var m=this._input.read(this._starting_pattern);return(!this._starting_pattern||m)&&(m+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),m},w.prototype.read_match=function(){return this._input.match(this._match_pattern)},w.prototype.until_after=function(m){var f=this._create();return f._until_after=!0,f._until_pattern=this._input.get_regexp(m),f._update(),f},w.prototype.until=function(m){var f=this._create();return f._until_after=!1,f._until_pattern=this._input.get_regexp(m),f._update(),f},w.prototype.starting_with=function(m){var f=this._create();return f._starting_pattern=this._input.get_regexp(m,!0),f._update(),f},w.prototype.matching=function(m){var f=this._create();return f._match_pattern=this._input.get_regexp(m,!0),f._update(),f},w.prototype._create=function(){return new w(this._input,this)},w.prototype._update=function(){},n.exports.Pattern=w},function(n){function w(m,f){m=typeof m=="string"?m:m.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(m+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(m+/\sbeautify\signore:end\s/.source+f,"g")}w.prototype.get_directives=function(m){if(!m.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(m);p;)f[p[1]]=p[2],p=this.__directive_pattern.exec(m);return f},w.prototype.readIgnored=function(m){return m.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=w},function(n,w,m){var f=m(12).Pattern,p={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function c(r,d){f.call(this,r,d),this.__template_pattern=null,this._disabled=Object.assign({},p),this._excluded=Object.assign({},p),d&&(this.__template_pattern=this._input.get_regexp(d.__template_pattern),this._excluded=Object.assign(this._excluded,d._excluded),this._disabled=Object.assign(this._disabled,d._disabled));var u=new f(r);this.__patterns={handlebars_comment:u.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:u.starting_with(/{{{/).until_after(/}}}/),handlebars:u.starting_with(/{{/).until_after(/}}/),php:u.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:u.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:u.starting_with(/{%/).until_after(/%}/),django_value:u.starting_with(/{{/).until_after(/}}/),django_comment:u.starting_with(/{#/).until_after(/#}/),smarty:u.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:u.starting_with(/{\*/).until_after(/\*}/),smarty_literal:u.starting_with(/{literal}/).until_after(/{\/literal}/)}}c.prototype=new f,c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){this.__set_templated_pattern()},c.prototype.disable=function(r){var d=this._create();return d._disabled[r]=!0,d._update(),d},c.prototype.read_options=function(r){var d=this._create();for(var u in p)d._disabled[u]=r.templating.indexOf(u)===-1;return d._update(),d},c.prototype.exclude=function(r){var d=this._create();return d._excluded[r]=!0,d._update(),d},c.prototype.read=function(){var r="";this._match_pattern?r=this._input.read(this._starting_pattern):r=this._input.read(this._starting_pattern,this.__template_pattern);for(var d=this._read_template();d;)this._match_pattern?d+=this._input.read(this._match_pattern):d+=this._input.readUntil(this.__template_pattern),r+=d,d=this._read_template();return this._until_after&&(r+=this._input.readUntilAfter(this._until_pattern)),r},c.prototype.__set_templated_pattern=function(){var r=[];this._disabled.php||r.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||r.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||r.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(r.push(this.__patterns.django._starting_pattern.source),r.push(this.__patterns.django_value._starting_pattern.source),r.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||r.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&r.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+r.join("|")+")")},c.prototype._read_template=function(){var r="",d=this._input.peek();if(d==="<"){var u=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&u==="?"&&(r=r||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&u==="%"&&(r=r||this.__patterns.erb.read())}else d==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(r=r||this.__patterns.handlebars_comment.read(),r=r||this.__patterns.handlebars_unescaped.read(),r=r||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(r=r||this.__patterns.django_value.read()),this._excluded.django||(r=r||this.__patterns.django_comment.read(),r=r||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(r=r||this.__patterns.smarty_comment.read(),r=r||this.__patterns.smarty_literal.read(),r=r||this.__patterns.smarty.read()));return r},n.exports.TemplatablePattern=c}],M={};function K(n){var w=M[n];if(w!==void 0)return w.exports;var m=M[n]={exports:{}};return W[n](m,m.exports,K),m.exports}var j=K(0);U=j})();var V=U;!(Z=[],G=function(){return{js_beautify:V}}.apply(se,Z),G!==void 0&&(We.exports=G))})()},"6eGT":function(We,se,B){"use strict";function Z(G){return null}se.a=Z},"746U":function(We,se,B){"use strict";B.d(se,"f",function(){return Z}),B.d(se,"l",function(){return G}),B.d(se,"k",function(){return U}),B.d(se,"j",function(){return V}),B.d(se,"g",function(){return W}),B.d(se,"m",function(){return M}),B.d(se,"h",function(){return K}),B.d(se,"n",function(){return j}),B.d(se,"c",function(){return n}),B.d(se,"a",function(){return w}),B.d(se,"i",function(){return m}),B.d(se,"o",function(){return f}),B.d(se,"e",function(){return r}),B.d(se,"d",function(){return d}),B.d(se,"p",function(){return u}),B.d(se,"b",function(){return o});function Z(s){return Array.isArray(s)}function G(s){return typeof s=="string"}function U(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&!(s instanceof RegExp)&&!(s instanceof Date)}function V(s){return typeof s=="number"&&!isNaN(s)}function W(s){return s===!0||s===!1}function M(s){return typeof s=="undefined"}function K(s){return!j(s)}function j(s){return M(s)||s===null}function n(s,a){if(!s)throw new Error(a?`Unexpected type, expected '${a}'`:"Unexpected type")}function w(s){if(j(s))throw new Error("Assertion Failed: argument is undefined or null");return s}function m(s){return typeof s=="function"}function f(s,a){const R=Math.min(s.length,a.length);for(let O=0;O<R;O++)p(s[O],a[O])}function p(s,a){if(G(a)){if(typeof s!==a)throw new Error(`argument does not match constraint: typeof ${a}`)}else if(m(a)){try{if(s instanceof a)return}catch(R){}if(!j(s)&&s.constructor===a)return;if(a.length===1&&a.call(void 0,s)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function c(s){let a=[],R=Object.getPrototypeOf(s);for(;Object.prototype!==R;)a=a.concat(Object.getOwnPropertyNames(R)),R=Object.getPrototypeOf(R);return a}function r(s){const a=[];for(const R of c(s))typeof s[R]=="function"&&a.push(R);return a}function d(s,a){const R=S=>function(){const D=Array.prototype.slice.call(arguments,0);return a(S,D)};let O={};for(const S of s)O[S]=R(S);return O}function u(s){return s===null?void 0:s}function o(s,a="Unreachable"){throw new Error(a)}},"7Cbv":function(We,se,B){"use strict";var Z=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),G=new Uint8Array(16);function U(){if(!Z)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(G)}var V=/^(?:[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 W(p){return typeof p=="string"&&V.test(p)}for(var M=W,K=[],j=0;j<256;++j)K.push((j+256).toString(16).substr(1));function n(p){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(K[p[c+0]]+K[p[c+1]]+K[p[c+2]]+K[p[c+3]]+"-"+K[p[c+4]]+K[p[c+5]]+"-"+K[p[c+6]]+K[p[c+7]]+"-"+K[p[c+8]]+K[p[c+9]]+"-"+K[p[c+10]]+K[p[c+11]]+K[p[c+12]]+K[p[c+13]]+K[p[c+14]]+K[p[c+15]]).toLowerCase();if(!M(r))throw TypeError("Stringified UUID is invalid");return r}var w=n;function m(p,c,r){p=p||{};var d=p.random||(p.rng||U)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,c){r=r||0;for(var u=0;u<16;++u)c[r+u]=d[u];return c}return w(d)}var f=se.a=m},"7ZXX":function(We,se,B){We.exports=B.p+"static/err.6e7c5817.png"},"7ahc":function(We,se,B){"use strict";B.d(se,"a",function(){return R});var Z=B("k1fw"),G=B("0Owb"),U=B("+L6B"),V=B("2/Rp"),W=B("y8nQ"),M=B("Vl3Y"),K=B("tJVT"),j=B("OaEy"),n=B("2fM7"),w=B("q1tI"),m=B.n(w),f=B("VrN/"),p=B.n(f),c=B("p77/"),r=B.n(c),d=B("c5Ni"),u=B.n(d),o=n.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},a={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"]};se.b=function(O){var S=O.callback,D=O.onCancel,I=Object(w.useState)("python"),_=Object(K.a)(I,2),b=_[0],v=_[1];function h(x){v(a[x][1])}function C(x){S(x)}return m.a.createElement(M.a,Object(G.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:C}),m.a.createElement(M.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},m.a.createElement(n.a,{onChange:h},Object.keys(a).map(function(x){return m.a.createElement(o,{key:x,value:x},a[x][0])}))),m.a.createElement(M.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},m.a.createElement(R,{mode:b})),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(V.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function R(O){var S=O.value,D=O.onChange,I=O.mode,_=O.options,b=_===void 0?{}:_,v=Object(w.useRef)(),h=Object(w.useState)(),C=Object(K.a)(h,2),x=C[0],g=C[1];return Object(w.useEffect)(function(){if(x){function P(k){var y=k.getValue();D&&D(y)}return x.on("change",P),function(){x.off("change",P)}}},[x,D]),Object(w.useEffect)(function(){x&&x.setOption("mode",I)},[x,I]),Object(w.useEffect)(function(){x&&((S!==x.getValue()||S==="")&&setTimeout(function(){x.setValue(S||" ")},300))},[x,S]),Object(w.useEffect)(function(){if(v.current&&!x){var P=p.a.fromTextArea(v.current,Object(Z.a)({mode:I,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},b));g(P)}},[v.current,x]),m.a.createElement("div",{className:"my-codemirror-container"},m.a.createElement("textarea",{ref:v}))}},"7ixt":function(We,se,B){"use strict";B.d(se,"a",function(){return U});var Z={adjustX:1,adjustY:1},G=[0,0],U={left:{points:["cr","cl"],overflow:Z,offset:[-4,0],targetOffset:G},right:{points:["cl","cr"],overflow:Z,offset:[4,0],targetOffset:G},top:{points:["bc","tc"],overflow:Z,offset:[0,-4],targetOffset:G},bottom:{points:["tc","bc"],overflow:Z,offset:[0,4],targetOffset:G},topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-4],targetOffset:G},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0],targetOffset:G},topRight:{points:["br","tr"],overflow:Z,offset:[0,-4],targetOffset:G},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0],targetOffset:G},bottomRight:{points:["tr","br"],overflow:Z,offset:[0,4],targetOffset:G},rightBottom:{points:["bl","br"],overflow:Z,offset:[4,0],targetOffset:G},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,4],targetOffset:G},leftBottom:{points:["br","bl"],overflow:Z,offset:[-4,0],targetOffset:G}},V=U},"7v3h":function(We,se,B){We.exports=B.p+"static/empty2.dd73f390.png"},"8/bI":function(We,se,B){We.exports=B.p+"static/empty.8918e228.png"},"815F":function(We,se,B){"use strict";B.d(se,"e",function(){return K}),B.d(se,"c",function(){return n}),B.d(se,"d",function(){return w}),B.d(se,"a",function(){return f}),B.d(se,"f",function(){return p}),B.d(se,"b",function(){return c});var Z=B("KQm4"),G=B("VTBJ"),U=B("Ff2n"),V=B("Zm9Q"),W=B("Kwbf"),M=B("OZM5");function K(r,d){return r!=null?r:d}function j(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=new Map;function u(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(o||[]).forEach(function(a){var R=a.key,O=a.children;Object(W.a)(R!=null,"Tree node must have a certain key: [".concat(s).concat(R,"]"));var S=String(R);Object(W.a)(!d.has(S)||R===null||R===void 0,"Same 'key' exist in the Tree: ".concat(S)),d.set(S,!0),u(O,"".concat(s).concat(S," > "))})}u(r)}function n(r){function d(u){var o=Object(V.a)(u);return o.map(function(s){if(!Object(M.i)(s))return Object(W.a)(!s,"Tree/TreeNode can only accept TreeNode as children."),null;var a=s.key,R=s.props,O=R.children,S=Object(U.a)(R,["children"]),D=Object(G.a)({key:a},S),I=d(O);return I.length&&(D.children=I),D}).filter(function(s){return s})}return d(r)}function w(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],u=new Set(d===!0?[]:d),o=[];function s(a){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return a.map(function(O,S){var D=Object(M.h)(R?R.pos:"0",S),I=K(O.key,D),_=Object(G.a)(Object(G.a)({},O),{},{parent:R,pos:D,children:null,data:O,isStart:[].concat(Object(Z.a)(R?R.isStart:[]),[S===0]),isEnd:[].concat(Object(Z.a)(R?R.isEnd:[]),[S===a.length-1])});return o.push(_),d===!0||u.has(I)?_.children=s(O.children||[],_):_.children=[],_})}return s(r),o}function m(r,d,u){var o;u?typeof u=="string"?o=function(R){return R[u]}:typeof u=="function"&&(o=function(R){return u(R)}):o=function(R,O){return K(R.key,O)};function s(a,R,O){var S=a?a.children:r,D=a?Object(M.h)(O.pos,R):"0";if(a){var I=o(a,D),_={node:a,index:R,pos:D,key:I,parentPos:O.node?O.pos:null,level:O.level+1};d(_)}S&&S.forEach(function(b,v){s(b,v,{node:a,pos:D,level:O?O.level+1:-1})})}s(null)}function f(r){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=d.initWrapper,o=d.processEntity,s=d.onProcessFinished,a=arguments.length>2?arguments[2]:void 0,R={},O={},S={posEntities:R,keyEntities:O};return u&&(S=u(S)||S),m(r,function(D){var I=D.node,_=D.index,b=D.pos,v=D.key,h=D.parentPos,C=D.level,x={node:I,index:_,key:v,pos:b,level:C},g=K(v,b);R[b]=x,O[g]=x,x.parent=R[h],x.parent&&(x.parent.children=x.parent.children||[],x.parent.children.push(x)),o&&o(x,S)},a),s&&s(S),S}function p(r,d){var u=d.expandedKeys,o=d.selectedKeys,s=d.loadedKeys,a=d.loadingKeys,R=d.checkedKeys,O=d.halfCheckedKeys,S=d.dragOverNodeKey,D=d.dropPosition,I=d.keyEntities,_=I[r],b={eventKey:r,expanded:u.indexOf(r)!==-1,selected:o.indexOf(r)!==-1,loaded:s.indexOf(r)!==-1,loading:a.indexOf(r)!==-1,checked:R.indexOf(r)!==-1,halfChecked:O.indexOf(r)!==-1,pos:String(_?_.pos:""),dragOver:S===r&&D===0,dragOverGapTop:S===r&&D===-1,dragOverGapBottom:S===r&&D===1};return b}function c(r){var d=r.data,u=r.expanded,o=r.selected,s=r.checked,a=r.loaded,R=r.loading,O=r.halfChecked,S=r.dragOver,D=r.dragOverGapTop,I=r.dragOverGapBottom,_=r.pos,b=r.active,v=Object(G.a)(Object(G.a)({},d),{},{expanded:u,selected:o,checked:s,loaded:a,loading:R,halfChecked:O,dragOver:S,dragOverGapTop:D,dragOverGapBottom:I,pos:_,active:b});return"props"in v||Object.defineProperty(v,"props",{get:function(){return Object(W.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),r}}),v}},"8EBN":function(We,se,B){(function(Z){Z(B("VrN/"))})(function(Z){"use strict";Z.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var G=0;G<Z.modeInfo.length;G++){var U=Z.modeInfo[G];U.mimes&&(U.mime=U.mimes[0])}Z.findModeByMIME=function(V){V=V.toLowerCase();for(var W=0;W<Z.modeInfo.length;W++){var M=Z.modeInfo[W];if(M.mime==V)return M;if(M.mimes){for(var K=0;K<M.mimes.length;K++)if(M.mimes[K]==V)return M}}if(/\+xml$/.test(V))return Z.findModeByMIME("application/xml");if(/\+json$/.test(V))return Z.findModeByMIME("application/json")},Z.findModeByExtension=function(V){V=V.toLowerCase();for(var W=0;W<Z.modeInfo.length;W++){var M=Z.modeInfo[W];if(M.ext){for(var K=0;K<M.ext.length;K++)if(M.ext[K]==V)return M}}},Z.findModeByFileName=function(V){for(var W=0;W<Z.modeInfo.length;W++){var M=Z.modeInfo[W];if(M.file&&M.file.test(V))return M}var K=V.lastIndexOf("."),j=K>-1&&V.substring(K+1,V.length);if(j)return Z.findModeByExtension(j)},Z.findModeByName=function(V){V=V.toLowerCase();for(var W=0;W<Z.modeInfo.length;W++){var M=Z.modeInfo[W];if(M.name.toLowerCase()==V)return M;if(M.alias){for(var K=0;K<M.alias.length;K++)if(M.alias[K].toLowerCase()==V)return M}}}})},"8HAY":function(We,se,B){"use strict";B.d(se,"a",function(){return W}),B.d(se,"b",function(){return M}),B.d(se,"d",function(){return K}),B.d(se,"e",function(){return j}),B.d(se,"c",function(){return n});var Z=B("MI8n"),G=B("pmY6"),U=B("3/fG"),V=function(w,m,f,p){function c(r){return r instanceof f?r:new f(function(d){d(r)})}return new(f||(f=Promise))(function(r,d){function u(a){try{s(p.next(a))}catch(R){d(R)}}function o(a){try{s(p.throw(a))}catch(R){d(R)}}function s(a){a.done?r(a.value):c(a.value).then(u,o)}s((p=p.apply(w,m||[])).next())})};class W extends G.a{constructor(w,m="",f="",p=!0,c){super();this._onDidChange=this._register(new Z.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=w,this._label=m,this._cssClass=f,this._enabled=p,this._actionCallback=c}get id(){return this._id}get label(){return this._label}set label(w){this._setLabel(w)}_setLabel(w){this._label!==w&&(this._label=w,this._onDidChange.fire({label:w}))}get tooltip(){return this._tooltip||""}set tooltip(w){this._setTooltip(w)}_setTooltip(w){this._tooltip!==w&&(this._tooltip=w,this._onDidChange.fire({tooltip:w}))}get class(){return this._cssClass}set class(w){this._setClass(w)}_setClass(w){this._cssClass!==w&&(this._cssClass=w,this._onDidChange.fire({class:w}))}get enabled(){return this._enabled}set enabled(w){this._setEnabled(w)}_setEnabled(w){this._enabled!==w&&(this._enabled=w,this._onDidChange.fire({enabled:w}))}get checked(){return this._checked}set checked(w){this._setChecked(w)}_setChecked(w){this._checked!==w&&(this._checked=w,this._onDidChange.fire({checked:w}))}run(w,m){return V(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(w))})}}class M extends G.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new Z.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new Z.b),this.onDidRun=this._onDidRun.event}run(w,m){return V(this,void 0,void 0,function*(){if(!w.enabled)return;this._onBeforeRun.fire({action:w});let f;try{yield this.runAction(w,m)}catch(p){f=p}this._onDidRun.fire({action:w,error:f})})}runAction(w,m){return V(this,void 0,void 0,function*(){yield w.run(m)})}}class K extends W{constructor(w){super(K.ID,w,w?"separator text":"separator");this.checked=!1,this.enabled=!1}}K.ID="vs.actions.separator";class j{constructor(w,m,f,p){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=w,this.label=m,this.class=p,this._actions=f}get actions(){return this._actions}dispose(){}run(){return V(this,void 0,void 0,function*(){})}}class n extends W{constructor(){super(n.ID,U.a("submenu.empty","(empty)"),void 0,!1)}}n.ID="vs.actions.empty"},"8hTe":function(We,se,B){We.exports={button:"button___1wy9m"}},"9Bee":function(We,se,B){"use strict";var Z=B("DYRE"),G=B("zeV3"),U=B("+L6B"),V=B("2/Rp"),W=B("k1fw"),M=B("9og8"),K=B("tJVT"),j=B("WmNS"),n=B.n(j),w=B("q1tI"),m=B.n(w),f=B("vg9a"),p=B("DlQD"),c=B.n(p),r=B("rUJ1");function d(X,L){var N=X.match(/^(\s+)(?:```)/);if(N===null)return L;var z=N[1];return L.split(`
`).map(function(te){var Q=te.match(/^\s+/);if(Q===null)return te;var Re=Object(K.a)(Q,1),ct=Re[0];return ct.length>=z.length?te.slice(z.length):te}).join(`
`)}var u=[],o=["<ul>"],s=new c.a.Renderer,a=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function R(){u.length=0,o=["<ul>"]}var O={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(X,L,N,z){if(L>=X.length||X[L].level<=N)return L;var te=X[L];z.push("<li><a href='#"+te.anchor+"'>"+te.text+"</a>"),L++;var Q=[];return L=S(X,L,te.level,Q),Q.length>0&&(z.push("<ul>"),Q.forEach(function(Re){z.push(Re)}),z.push("</ul>")),z.push("</li>"),L=S(X,L,N,z),L}function D(){return S(u,0,0,o),o.push("</ul>"),o.join("")}var I={heading:function(L){var N=a.exec(L);if(N)return{type:"heading",raw:N[0],depth:N[1].length,text:N[2]}},fences:function(L){var N=this.rules.block.fences.exec(L);if(N){var z=N[0],te=d(z,N[3]||""),Q=N[2]?N[2].trim():N[2];if(["latex","katex","math"].indexOf(Q)>=0){var Re=v(),ct=te;te=Re,h[Re]={type:"block",expression:ct}}return{type:"code",raw:z,lang:Q,text:te}}}},_=/(?:\${2})([^\n`]+?)(?:\${2})/gi,b=0,v=function(){return"__special_katext_id_".concat(b++,"__")},h={};function C(){return h}function x(){b=0,h={}}function g(X){return X=X.replace(_,function(L,N){var z=v();return h[z]={type:"inline",expression:N},z}),X}var P=s.listitem;s.listitem=function(X){return P(g(X))};var k=s.paragraph;s.paragraph=function(X){return k(g(X))};var y=s.tablecell;s.tablecell=function(X,L){return y(g(X),L)},s.code=function(X,L,N){var z=(L||"").match(/\S*/)[0];return z?["latex","katex","math"].indexOf(z)>=0?"<p class='editormd-tex'>".concat(X,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(L,'">').concat(N?X:Object(r.escape)(X,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(N?X:Object(r.escape)(X,!0))+"</code></pre>"},s.heading=function(X,L,N){var z=this.options.headerPrefix+N.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return u.push({anchor:z,level:L,text:X}),"<h"+L+' id="'+z+'">'+X+"</h"+L+">"},c.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),c.a.use({tokenizer:I,renderer:s});var A=c.a,F=B("SJMd"),T=B("ulZh"),Y=B.n(T),$=B("m3rI"),le=B("Oy/b"),de=B("p5ED"),Pe=B("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Se=function(X,L){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,z){N.__proto__=z}||function(N,z){for(var te in z)Object.prototype.hasOwnProperty.call(z,te)&&(N[te]=z[te])})(X,L)};function we(X,L){function N(){this.constructor=X}Se(X,L),X.prototype=L===null?Object.create(L):(N.prototype=L.prototype,new N)}function Fe(X,L,N,z){return new(N||(N=Promise))(function(te,Q){function Re(Pt){try{Ct(z.next(Pt))}catch(ht){Q(ht)}}function ct(Pt){try{Ct(z.throw(Pt))}catch(ht){Q(ht)}}function Ct(Pt){var ht;Pt.done?te(Pt.value):(ht=Pt.value,ht instanceof N?ht:new N(function(Vt){Vt(ht)})).then(Re,ct)}Ct((z=z.apply(X,L||[])).next())})}function Me(X,L){var N,z,te,Q,Re={label:0,sent:function(){if(1&te[0])throw te[1];return te[1]},trys:[],ops:[]};return Q={next:ct(0),throw:ct(1),return:ct(2)},typeof Symbol=="function"&&(Q[Symbol.iterator]=function(){return this}),Q;function ct(Ct){return function(Pt){return function(ht){if(N)throw new TypeError("Generator is already executing.");for(;Re;)try{if(N=1,z&&(te=2&ht[0]?z.return:ht[0]?z.throw||((te=z.return)&&te.call(z),0):z.next)&&!(te=te.call(z,ht[1])).done)return te;switch(z=0,te&&(ht=[2&ht[0],te.value]),ht[0]){case 0:case 1:te=ht;break;case 4:return Re.label++,{value:ht[1],done:!1};case 5:Re.label++,z=ht[1],ht=[0];continue;case 7:ht=Re.ops.pop(),Re.trys.pop();continue;default:if(!(te=Re.trys,(te=te.length>0&&te[te.length-1])||ht[0]!==6&&ht[0]!==2)){Re=0;continue}if(ht[0]===3&&(!te||ht[1]>te[0]&&ht[1]<te[3])){Re.label=ht[1];break}if(ht[0]===6&&Re.label<te[1]){Re.label=te[1],te=ht;break}if(te&&Re.label<te[2]){Re.label=te[2],Re.ops.push(ht);break}te[2]&&Re.ops.pop(),Re.trys.pop();continue}ht=L.call(X,Re)}catch(Vt){ht=[6,Vt],z=0}finally{N=te=0}if(5&ht[0])throw ht[1];return{value:ht[0]?ht[1]:void 0,done:!0}}([Ct,Pt])}}}function me(){for(var X=0,L=0,N=arguments.length;L<N;L++)X+=arguments[L].length;var z=Array(X),te=0;for(L=0;L<N;L++)for(var Q=arguments[L],Re=0,ct=Q.length;Re<ct;Re++,te++)z[te]=Q[Re];return z}var pe=function(){function X(){}return X.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},X.setAttributes=function(L,N){for(var z=0,te=N;z<te.length;z++){var Q=te[z],Re=Q[0],ct=Q[1];L.setAttribute(Re,ct)}},X.createRect=function(L,N,z){var te=document.createElementNS("http://www.w3.org/2000/svg","rect");return te.setAttribute("width",L.toString()),te.setAttribute("height",N.toString()),z&&X.setAttributes(te,z),te},X.createLine=function(L,N,z,te,Q){var Re=document.createElementNS("http://www.w3.org/2000/svg","line");return Re.setAttribute("x1",L.toString()),Re.setAttribute("y1",N.toString()),Re.setAttribute("x2",z.toString()),Re.setAttribute("y2",te.toString()),Q&&X.setAttributes(Re,Q),Re},X.createPolygon=function(L,N){var z=document.createElementNS("http://www.w3.org/2000/svg","polygon");return z.setAttribute("points",L),N&&X.setAttributes(z,N),z},X.createCircle=function(L,N){var z=document.createElementNS("http://www.w3.org/2000/svg","circle");return z.setAttribute("cx",(L/2).toString()),z.setAttribute("cy",(L/2).toString()),z.setAttribute("r",L.toString()),N&&X.setAttributes(z,N),z},X.createEllipse=function(L,N,z){var te=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return te.setAttribute("cx",(L/2).toString()),te.setAttribute("cy",(N/2).toString()),te.setAttribute("rx",(L/2).toString()),te.setAttribute("ry",(N/2).toString()),z&&X.setAttributes(te,z),te},X.createGroup=function(L){var N=document.createElementNS("http://www.w3.org/2000/svg","g");return L&&X.setAttributes(N,L),N},X.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},X.createMarker=function(L,N,z,te,Q,Re,ct){var Ct=document.createElementNS("http://www.w3.org/2000/svg","marker");return X.setAttributes(Ct,[["id",L],["orient",N],["markerWidth",z.toString()],["markerHeight",te.toString()],["refX",Q.toString()],["refY",Re.toString()]]),Ct.appendChild(ct),Ct},X.createText=function(L){var N=document.createElementNS("http://www.w3.org/2000/svg","text");return N.setAttribute("x","0"),N.setAttribute("y","0"),L&&X.setAttributes(N,L),N},X.createTSpan=function(L,N){var z=document.createElementNS("http://www.w3.org/2000/svg","tspan");return z.textContent=L,N&&X.setAttributes(z,N),z},X.createImage=function(L){var N=document.createElementNS("http://www.w3.org/2000/svg","image");return L&&X.setAttributes(N,L),N},X.createPoint=function(L,N){var z=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return z.x=L,z.y=N,z},X.createPath=function(L,N){var z=document.createElementNS("http://www.w3.org/2000/svg","path");return z.setAttribute("d",L),N&&X.setAttributes(z,N),z},X}(),ne=function(){function X(){}return X.addKey=function(L){X.key=L},Object.defineProperty(X,"isLicensed",{get:function(){return!!X.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(X.key)},enumerable:!1,configurable:!0}),X}(),Ee=function(){function X(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return X.prototype.rasterize=function(L,N,z){var te=this;return new Promise(function(Q){var Re=z!==void 0?z:document.createElement("canvas");L===null&&(te.markersOnly=!0,te.naturalSize=!1);var ct=document.createElementNS("http://www.w3.org/2000/svg","svg");ct.setAttribute("xmlns","http://www.w3.org/2000/svg"),ct.setAttribute("width",N.width.baseVal.valueAsString),ct.setAttribute("height",N.height.baseVal.valueAsString),ct.setAttribute("viewBox","0 0 "+N.viewBox.baseVal.width.toString()+" "+N.viewBox.baseVal.height.toString()),ct.innerHTML=N.innerHTML,te.naturalSize===!0?(ct.width.baseVal.value=L.naturalWidth,ct.height.baseVal.value=L.naturalHeight):te.width!==void 0&&te.height!==void 0&&(ct.width.baseVal.value=te.width,ct.height.baseVal.value=te.height),Re.width=ct.width.baseVal.value,Re.height=ct.height.baseVal.value;var Ct=ct.outerHTML,Pt=Re.getContext("2d");te.markersOnly!==!0&&Pt.drawImage(L,0,0,Re.width,Re.height);var ht=window.URL,Vt=new Image(Re.width,Re.height);Vt.setAttribute("crossOrigin","anonymous");var rn=new Blob([Ct],{type:"image/svg+xml"}),An=ht.createObjectURL(rn);Vt.onload=function(){Pt.drawImage(Vt,0,0),ht.revokeObjectURL(An);var Cn=Re.toDataURL(te.imageType,te.imageQuality);Q(Cn)},Vt.src=An})},X}(),ae=function(){},ke=function(){function X(L){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+L+"_"}return Object.defineProperty(X.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),X.prototype.addClass=function(L){return this.styleSheet===void 0&&this.addStyleSheet(),L.name=""+this.classNamePrefix+L.localName,this.classes.push(L),this.styleSheet.sheet.insertRule("."+L.name+" {"+L.style+"}",this.styleSheet.sheet.cssRules.length),L},X.prototype.addRule=function(L){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(L),this.styleSheet.sheet.insertRule(L.selector+" {"+L.style+"}",this.styleSheet.sheet.cssRules.length)},X.prototype.addStyleSheet=function(){var L;this.styleSheet=document.createElement("style"),((L=this.styleSheetRoot)!==null&&L!==void 0?L:document.head).appendChild(this.styleSheet),this.addRule(new je("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new je("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new je("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Oe("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Oe("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},X.prototype.removeStyleSheet=function(){var L;this.styleSheet&&(((L=this.styleSheetRoot)!==null&&L!==void 0?L:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},X}(),je=function(X,L){this.selector=X,this.style=L},Oe=function(X,L){this.localName=X,this.style=L},Ve=function(){function X(L,N,z,te,Q){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=L,this.displayMode=N,this.markerItems=z,this.uiStyleSettings=te,this.styles=Q,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return X.prototype.show=function(L){var N=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=L,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var z=document.createElement("div");z.className=this.toolbarBlockStyleClass.name,z.style.whiteSpace="nowrap",this.uiContainer.appendChild(z),this.addActionButton(z,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(z,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(z,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(z,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(z,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(z,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(z,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(z,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Q){var Re=document.createElement("div");Re.className=""+N.toolbarButtonStyleClass.name,Re.setAttribute("data-type-name",Q.typeName),Re.innerHTML=Q.icon,Re.addEventListener("click",function(){N.markerToolbarButtonClicked(Re,Q)}),N.buttons.push(Re),N.markerButtons.push(Re)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var te=document.createElement("div");te.className=this.toolbarBlockStyleClass.name,te.style.whiteSpace="nowrap",te.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(te),this.addActionButton(te,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(te,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},X.prototype.addButtonClickListener=function(L){this.buttonClickListeners.push(L)},X.prototype.removeButtonClickListener=function(L){this.buttonClickListeners.indexOf(L)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(L),1)},X.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},X.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var L=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var N=0;N<this.markerButtons.length;N++)N<L||N===L&&this.markerButtons.length-1===L?this.markerButtonBlock.appendChild(this.markerButtons[N]):(N===L&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[N]))}},X.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},X.prototype.resetButtonStyles=function(){var L=this;this.buttons.forEach(function(N){N.className=N.className.replace(L.uiStyleSettings.toolbarButtonStyleColorsClassName?L.uiStyleSettings.toolbarButtonStyleColorsClassName:L.toolbarButtonStyleColorsClass.name,"").trim(),N.className=N.className.replace(L.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?L.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:L.toolbarActiveButtonStyleColorsClass.name,"").trim(),N.className+=" "+(L.uiStyleSettings.toolbarButtonStyleColorsClassName?L.uiStyleSettings.toolbarButtonStyleColorsClassName:L.toolbarButtonStyleColorsClass.name)})},X.prototype.addActionButton=function(L,N,z){var te=this,Q=document.createElement("div");switch(Q.className=""+this.toolbarButtonStyleClass.name,Q.innerHTML=N,Q.setAttribute("data-action",z),Q.addEventListener("click",function(){te.actionToolbarButtonClicked(Q,z)}),z){case"select":Q.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Q.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Q.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Q.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Q.style.fill=this.uiStyleSettings.closeButtonColor}L.appendChild(Q),this.buttons.push(Q)},X.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Oe("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Oe("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Oe("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Oe("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Oe("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var L=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Oe("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*L)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*L)+`px;
padding: `+L+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Oe("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Oe("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new je("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new je("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},X.prototype.markerToolbarButtonClicked=function(L,N){this.setActiveButton(L),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(z){return z("marker",N)}),this.markerButtonOverflowBlock.style.display="none"},X.prototype.actionToolbarButtonClicked=function(L,N){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(z){return z("action",N)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},X.prototype.setActiveButton=function(L){this.resetButtonStyles(),L.className=L.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),L.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},X.prototype.setActiveMarkerButton=function(L){var N=this.markerButtons.find(function(z){return z.getAttribute("data-type-name")===L});N&&this.setActiveButton(N)},X.prototype.setCurrentMarker=function(L){var N=this;this.currentMarker=L,this.buttons.filter(function(z){return/delete|notes/.test(z.getAttribute("data-action"))}).forEach(function(z){N.currentMarker===void 0?(z.style.fillOpacity="0.4",z.style.pointerEvents="none"):(z.style.fillOpacity="1",z.style.pointerEvents="all")})},X}(),qe=function(){function X(L,N,z,te){this.panels=[],this.panelButtons=[],this.markerjsContainer=L,this.displayMode=N,this.uiStyleSettings=z,this.styles=te,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return X.prototype.addStyles=function(){var L;this.toolboxStyleClass=this.styles.addClass(new Oe("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Oe("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var N=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Oe("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Oe("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Oe("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Oe("toolbox-panel-row_colors",`
background-color: `+((L=this.uiStyleSettings.toolboxBackgroundColor)!==null&&L!==void 0?L:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Oe("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*N)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*N)+`px;
padding: `+N+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Oe("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Oe("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new je("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new je("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},X.prototype.show=function(L){var N;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=L,this.uiContainer.className=this.toolboxStyleClass.name+" "+((N=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&N!==void 0?N:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},X.prototype.setPanelButtons=function(L){var N,z,te=this;this.panels=L,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((N=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&N!==void 0?N:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Q){var Re;Q.uiStyleSettings=te.uiStyleSettings;var ct=document.createElement("div");ct.className=te.toolboxButtonStyleClass.name+" "+((Re=te.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Re!==void 0?Re:te.toolboxButtonStyleColorsClass.name),ct.innerHTML=Q.icon,ct.title=Q.title,ct.addEventListener("click",function(){te.panelButtonClick(Q)}),te.panelButtons.push(ct),te.buttonRow.appendChild(ct)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},X.prototype.panelButtonClick=function(L){var N=this,z=-1;if(L!==this.activePanel){z=this.panels.indexOf(L),this.panelRow.innerHTML="";var te=L.getUi();te.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(te),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=L}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){N.displayMode==="inline"?N.panelRow.style.display="none":N.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Q,Re){var ct,Ct;Q.className=N.toolboxButtonStyleClass.name+" "+(Re===z?""+((ct=N.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ct!==void 0?ct:N.toolboxActiveButtonStyleColorsClass.name):""+((Ct=N.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ct!==void 0?Ct:N.toolboxButtonStyleColorsClass.name))})},X}(),ue=function(X,L){this.title=X,this.icon=L},ve=function(X){function L(N,z,te,Q){var Re=X.call(this,N,Q||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Re.colors=[],Re.addTransparent=!1,Re.colorBoxes=[],Re.colors=z,Re.currentColor=te,Re.setCurrentColor=Re.setCurrentColor.bind(Re),Re.getColorBox=Re.getColorBox.bind(Re),Re}return we(L,X),L.prototype.getUi=function(){var N=this,z=document.createElement("div");return z.style.overflow="hidden",z.style.whiteSpace="nowrap",this.colors.forEach(function(te){var Q=N.getColorBox(te);z.appendChild(Q),N.colorBoxes.push(Q)}),z},L.prototype.getColorBox=function(N){var z=this,te=this.uiStyleSettings.toolbarHeight/4,Q=this.uiStyleSettings.toolbarHeight-te,Re=document.createElement("div");Re.style.display="inline-block",Re.style.boxSizing="content-box",Re.style.width=Q-2+"px",Re.style.height=Q-2+"px",Re.style.padding="1px",Re.style.marginRight="2px",Re.style.marginBottom="2px",Re.style.borderWidth="2px",Re.style.borderStyle="solid",Re.style.borderRadius=(Q+2)/2+"px",Re.style.borderColor=N===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){z.setCurrentColor(N,Re)});var ct=document.createElement("div");return ct.style.display="inline-block",ct.style.width=Q-2+"px",ct.style.height=Q-2+"px",ct.style.backgroundColor=N,ct.style.borderRadius=Q/2+"px",N==="transparent"&&(ct.style.fill=this.uiStyleSettings.toolboxAccentColor,ct.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),Re.appendChild(ct),Re},L.prototype.setCurrentColor=function(N,z){var te=this;this.currentColor=N,this.colorBoxes.forEach(function(Q){Q.style.borderColor=Q===z?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(N)},L}(ue),De=function(){function X(L,N,z){this._state="new",this._isSelected=!1,this._container=L,this._overlayContainer=N,this.globalSettings=z,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(X.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),X.prototype.ownsTarget=function(L){return!1},Object.defineProperty(X.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),X.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},X.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},X.prototype.pointerDown=function(L,N){},X.prototype.dblClick=function(L,N){},X.prototype.manipulate=function(L){},X.prototype.pointerUp=function(L){this.stateChanged()},X.prototype.dispose=function(){},X.prototype.addMarkerVisualToContainer=function(L){this.container.childNodes.length>0?this.container.insertBefore(L,this.container.childNodes[0]):this.container.appendChild(L)},X.prototype.getState=function(){return{typeName:X.typeName,state:this.state,notes:this.notes}},X.prototype.restoreState=function(L){this._state=L.state,this.notes=L.notes},X.prototype.scale=function(L,N){},X.prototype.colorChanged=function(L){this.onColorChanged&&this.onColorChanged(L),this.stateChanged()},X.prototype.fillColorChanged=function(L){this.onFillColorChanged&&this.onFillColorChanged(L),this.stateChanged()},X.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var L=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),L.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(L)&&this.onStateChanged(this)}},X.typeName="MarkerBase",X}(),Ne=function(){function X(){this.findGripByVisual=this.findGripByVisual.bind(this)}return X.prototype.findGripByVisual=function(L){return this.topLeft.ownsTarget(L)?this.topLeft:this.topCenter.ownsTarget(L)?this.topCenter:this.topRight.ownsTarget(L)?this.topRight:this.centerLeft.ownsTarget(L)?this.centerLeft:this.centerRight.ownsTarget(L)?this.centerRight:this.bottomLeft.ownsTarget(L)?this.bottomLeft:this.bottomCenter.ownsTarget(L)?this.bottomCenter:this.bottomRight.ownsTarget(L)?this.bottomRight:void 0},X}(),it=function(){function X(){this.GRIP_SIZE=10,this.visual=pe.createGroup(),this.visual.appendChild(pe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(pe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return X.prototype.ownsTarget=function(L){return L===this.visual||L===this.visual.childNodes[0]||L===this.visual.childNodes[1]},X}(),pt=function(){function X(){}return X.toITransformMatrix=function(L){return{a:L.a,b:L.b,c:L.c,d:L.d,e:L.e,f:L.f}},X.toSVGMatrix=function(L,N){return L.a=N.a,L.b=N.b,L.c=N.c,L.d=N.d,L.e=N.e,L.f=N.f,L},X}(),mt=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.left=0,Q.top=0,Q.width=0,Q.height=0,Q.defaultSize={x:50,y:20},Q.offsetX=0,Q.offsetY=0,Q.rotationAngle=0,Q.CB_DISTANCE=10,Q._suppressMarkerCreateEvent=!1,Q.container.transform.baseVal.appendItem(pe.createTransform()),Q.setupControlBox(),Q}return we(L,X),Object.defineProperty(L.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"visual",{get:function(){return this._visual},set:function(N){this._visual=N;var z=pe.createTransform();this._visual.transform.baseVal.appendItem(z)},enumerable:!1,configurable:!0}),L.prototype.ownsTarget=function(N){return!!X.prototype.ownsTarget.call(this,N)||!!(this.controlGrips.findGripByVisual(N)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(N))},L.prototype.pointerDown=function(N,z){X.prototype.pointerDown.call(this,N,z),this.state==="new"&&(this.left=N.x,this.top=N.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var te=this.unrotatePoint(N);if(this.manipulationStartX=te.x,this.manipulationStartY=te.y,this.offsetX=te.x-this.left,this.offsetY=te.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(z),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z)){this.activeGrip=this.rotatorGrip;var Q=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Q.x-this.width/2,this.top=Q.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Re=this.container.transform.baseVal.getItem(0);Re.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Re,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},L.prototype.pointerUp=function(N){var z=this.state;X.prototype.pointerUp.call(this,N),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(N),this._state="select",z==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},L.prototype.moveVisual=function(N){this.visual.style.transform="translate("+N.x+"px, "+N.y+"px)"},L.prototype.manipulate=function(N){var z=this.unrotatePoint(N);this.state==="creating"?this.resize(N):this.state==="move"?(this.left=this.manipulationStartLeft+(z.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(z.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(z):this.state==="rotate"&&this.rotate(N)},L.prototype.resize=function(N){var z=this.manipulationStartLeft,te=this.manipulationStartWidth,Q=this.manipulationStartTop,Re=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:z=this.manipulationStartLeft+N.x-this.manipulationStartX,te=this.manipulationStartWidth+this.manipulationStartLeft-z;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:te=this.manipulationStartWidth+N.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Q=this.manipulationStartTop+N.y-this.manipulationStartY,Re=this.manipulationStartHeight+this.manipulationStartTop-Q;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Re=this.manipulationStartHeight+N.y-this.manipulationStartY}te>=0?(this.left=z,this.width=te):(this.left=z+te,this.width=-te),Re>=0?(this.top=Q,this.height=Re):(this.top=Q+Re,this.height=-Re),this.setSize()},L.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},L.prototype.rotate=function(N){if(Math.abs(N.x-this.centerX)>.1){var z=Math.sign(N.x-this.centerX);this.rotationAngle=180*Math.atan((N.y-this.centerY)/(N.x-this.centerX))/Math.PI+90*z,this.applyRotation()}},L.prototype.applyRotation=function(){var N=this.container.transform.baseVal.getItem(0);N.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(N,0)},L.prototype.rotatePoint=function(N){if(this.rotationAngle===0)return N;var z=this.container.getCTM(),te=pe.createPoint(N.x,N.y);return{x:(te=te.matrixTransform(z)).x,y:te.y}},L.prototype.unrotatePoint=function(N){if(this.rotationAngle===0)return N;var z=this.container.getCTM();z=z.inverse();var te=pe.createPoint(N.x,N.y);return{x:(te=te.matrixTransform(z)).x,y:te.y}},L.prototype.select=function(){X.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},L.prototype.deselect=function(){X.prototype.deselect.call(this),this.controlBox.style.display="none"},L.prototype.setupControlBox=function(){this.controlBox=pe.createGroup();var N=pe.createTransform();N.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(N),this.container.appendChild(this.controlBox),this.controlRect=pe.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=pe.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Ne,this.addControlGrips(),this.controlBox.style.display="none"},L.prototype.adjustControlBox=function(){var N=this.controlBox.transform.baseVal.getItem(0);N.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(N,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},L.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},L.prototype.createGrip=function(){var N=new it;return N.visual.transform.baseVal.appendItem(pe.createTransform()),this.controlBox.appendChild(N.visual),N},L.prototype.positionGrips=function(){var N=this.controlGrips.topLeft.GRIP_SIZE,z=-N/2,te=z,Q=(this.width+this.CB_DISTANCE)/2-N/2,Re=(this.height+this.CB_DISTANCE)/2-N/2,ct=this.height+this.CB_DISTANCE-N/2,Ct=this.width+this.CB_DISTANCE-N/2;this.positionGrip(this.controlGrips.topLeft.visual,z,te),this.positionGrip(this.controlGrips.topCenter.visual,Q,te),this.positionGrip(this.controlGrips.topRight.visual,Ct,te),this.positionGrip(this.controlGrips.centerLeft.visual,z,Re),this.positionGrip(this.controlGrips.centerRight.visual,Ct,Re),this.positionGrip(this.controlGrips.bottomLeft.visual,z,ct),this.positionGrip(this.controlGrips.bottomCenter.visual,Q,ct),this.positionGrip(this.controlGrips.bottomRight.visual,Ct,ct),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Q,te-3*this.CB_DISTANCE)},L.prototype.positionGrip=function(N,z,te){var Q=N.transform.baseVal.getItem(0);Q.setTranslate(z,te),N.transform.baseVal.replaceItem(Q,0)},L.prototype.hideControlBox=function(){this.controlBox.style.display="none"},L.prototype.showControlBox=function(){this.controlBox.style.display=""},L.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:pt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:pt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},X.prototype.getState.call(this))},L.prototype.restoreState=function(N){X.prototype.restoreState.call(this,N);var z=N;this.left=z.left,this.top=z.top,this.width=z.width,this.height=z.height,this.rotationAngle=z.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(pt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,z.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(pt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,z.containerTransformMatrix))},L.prototype.scale=function(N,z){X.prototype.scale.call(this,N,z);var te=this.rotatePoint({x:this.left,y:this.top}),Q=this.unrotatePoint({x:te.x*N,y:te.y*z});this.left=Q.x,this.top=Q.y,this.width=this.width*N,this.height=this.height*z,this.adjustControlBox()},L}(De),dt=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.fillColor="transparent",Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.opacity=1,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setFillColor=Q.setFillColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.createVisual=Q.createVisual.bind(Q),Q}return we(L,X),L.prototype.ownsTarget=function(N){return!(!X.prototype.ownsTarget.call(this,N)&&N!==this.visual)},L.prototype.createVisual=function(){this.visual=pe.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},L.prototype.pointerDown=function(N,z){X.prototype.pointerDown.call(this,N,z),this.state==="new"&&(this.createVisual(),this.moveVisual(N),this._state="creating")},L.prototype.manipulate=function(N){X.prototype.manipulate.call(this,N)},L.prototype.resize=function(N){X.prototype.resize.call(this,N),this.setSize()},L.prototype.setSize=function(){X.prototype.setSize.call(this),pe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},L.prototype.pointerUp=function(N){X.prototype.pointerUp.call(this,N),this.setSize()},L.prototype.setStrokeColor=function(N){this.strokeColor=N,this.visual&&pe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(N),this.stateChanged()},L.prototype.setFillColor=function(N){this.fillColor=N,this.visual&&pe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},L.prototype.setStrokeWidth=function(N){this.strokeWidth=N,this.visual&&pe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},L.prototype.setStrokeDasharray=function(N){this.strokeDasharray=N,this.visual&&pe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},L.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},X.prototype.getState.call(this))},L.prototype.restoreState=function(N){var z=N;this.fillColor=z.fillColor,this.strokeColor=z.strokeColor,this.strokeWidth=z.strokeWidth,this.strokeDasharray=z.strokeDasharray,this.opacity=z.opacity,this.createVisual(),X.prototype.restoreState.call(this,N),this.setSize()},L.prototype.scale=function(N,z){X.prototype.scale.call(this,N,z),this.setSize()},L.title="Rectangle marker",L}(mt),Tt=function(X){function L(N,z,te,Q){var Re=X.call(this,N,Q||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Re.widths=[],Re.widthBoxes=[],Re.widths=z,Re.currentWidth=te,Re.setCurrentWidth=Re.setCurrentWidth.bind(Re),Re}return we(L,X),L.prototype.getUi=function(){var N=this,z=document.createElement("div");return z.style.display="flex",z.style.overflow="hidden",z.style.flexGrow="2",this.widths.forEach(function(te){var Q=document.createElement("div");Q.style.display="flex",Q.style.flexGrow="2",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.borderColor=te===N.currentWidth?N.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){N.setCurrentWidth(te,Q)}),z.appendChild(Q);var Re=document.createElement("div");Re.innerText=te.toString(),Re.style.marginRight="5px",Q.appendChild(Re);var ct=document.createElement("div");ct.style.minHeight="20px",ct.style.flexGrow="2",ct.style.display="flex",ct.style.alignItems="center";var Ct=document.createElement("hr");Ct.style.minWidth="20px",Ct.style.border="0px",Ct.style.borderTop=te+"px solid "+N.uiStyleSettings.toolboxColor,Ct.style.flexGrow="2",ct.appendChild(Ct),Q.appendChild(ct),N.widthBoxes.push(Q)}),z},L.prototype.setCurrentWidth=function(N,z){var te=this;this.currentWidth=N,this.widthBoxes.forEach(function(Q){Q.style.borderColor=Q===z?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},L}(ue),St=function(X){function L(N,z,te,Q){var Re=X.call(this,N,Q||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Re.styles=[],Re.styleBoxes=[],Re.styles=z,Re.currentStyle=te,Re.setCurrentStyle=Re.setCurrentStyle.bind(Re),Re}return we(L,X),L.prototype.getUi=function(){var N=this,z=document.createElement("div");return z.style.display="flex",z.style.overflow="hidden",z.style.flexGrow="2",this.styles.forEach(function(te){var Q=document.createElement("div");Q.style.display="flex",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.overflow="hidden",Q.style.maxWidth=100/N.styles.length-5+"%",Q.style.borderColor=te===N.currentStyle?N.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){N.setCurrentStyle(te,Q)}),z.appendChild(Q);var Re=document.createElement("div");Re.style.minHeight="20px",Re.style.flexGrow="2",Re.style.overflow="hidden";var ct=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+N.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(te!==""?'stroke-dasharray="'+te+'"':"")+` />
</svg>`;Re.innerHTML=ct,Q.appendChild(Re),N.styleBoxes.push(Q)}),z},L.prototype.setCurrentStyle=function(N,z){var te=this;this.currentStyle=N,this.styleBoxes.forEach(function(Q){Q.style.borderColor=Q===z?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},L}(ue),Ue=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.strokeColor=te.defaultColor,Q.strokeWidth=te.defaultStrokeWidth,Q.strokeDasharray=te.defaultStrokeDasharray,Q.strokePanel=new ve("Line color",te.defaultColorSet,te.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new Tt("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new St("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return we(L,X),Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var N=X.prototype.getState.call(this);return N.typeName=L.typeName,N},L.typeName="FrameMarker",L.title="Frame marker",L.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',L}(dt),Ie=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},tt=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.x1=0,Q.y1=0,Q.x2=0,Q.y2=0,Q.defaultLength=50,Q.manipulationStartX=0,Q.manipulationStartY=0,Q.manipulationStartX1=0,Q.manipulationStartY1=0,Q.manipulationStartX2=0,Q.manipulationStartY2=0,Q.setupControlBox(),Q}return we(L,X),L.prototype.ownsTarget=function(N){return!!X.prototype.ownsTarget.call(this,N)||!(!this.grip1.ownsTarget(N)&&!this.grip2.ownsTarget(N))},L.prototype.pointerDown=function(N,z){X.prototype.pointerDown.call(this,N,z),this.manipulationStartX=N.x,this.manipulationStartY=N.y,this.state==="new"&&(this.x1=N.x,this.y1=N.y,this.x2=N.x,this.y2=N.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(z)?this.activeGrip=this.grip1:this.grip2.ownsTarget(z)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},L.prototype.pointerUp=function(N){var z=this.state;X.prototype.pointerUp.call(this,N),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(N),this._state="select",z==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},L.prototype.adjustVisual=function(){},L.prototype.manipulate=function(N){this.state==="creating"?this.resize(N):this.state==="move"?(this.x1=this.manipulationStartX1+N.x-this.manipulationStartX,this.y1=this.manipulationStartY1+N.y-this.manipulationStartY,this.x2=this.manipulationStartX2+N.x-this.manipulationStartX,this.y2=this.manipulationStartY2+N.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(N)},L.prototype.resize=function(N){switch(this.activeGrip){case this.grip1:this.x1=N.x,this.y1=N.y;break;case this.grip2:case void 0:this.x2=N.x,this.y2=N.y}this.adjustVisual(),this.adjustControlBox()},L.prototype.select=function(){X.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},L.prototype.deselect=function(){X.prototype.deselect.call(this),this.controlBox.style.display="none"},L.prototype.setupControlBox=function(){this.controlBox=pe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},L.prototype.adjustControlBox=function(){this.positionGrips()},L.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},L.prototype.createGrip=function(){var N=new it;return N.visual.transform.baseVal.appendItem(pe.createTransform()),this.controlBox.appendChild(N.visual),N},L.prototype.positionGrips=function(){var N=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-N/2,this.y1-N/2),this.positionGrip(this.grip2.visual,this.x2-N/2,this.y2-N/2)},L.prototype.positionGrip=function(N,z,te){var Q=N.transform.baseVal.getItem(0);Q.setTranslate(z,te),N.transform.baseVal.replaceItem(Q,0)},L.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},X.prototype.getState.call(this))},L.prototype.restoreState=function(N){X.prototype.restoreState.call(this,N);var z=N;this.x1=z.x1,this.y1=z.y1,this.x2=z.x2,this.y2=z.y2},L.prototype.scale=function(N,z){X.prototype.scale.call(this,N,z),this.x1=this.x1*N,this.y1=this.y1*z,this.x2=this.x2*N,this.y2=this.y2*z,this.adjustVisual(),this.adjustControlBox()},L}(De),lt=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.strokeColor=te.defaultColor,Q.strokeWidth=te.defaultStrokeWidth,Q.strokeDasharray=te.defaultStrokeDasharray,Q.strokePanel=new ve("Line color",te.defaultColorSet,te.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new Tt("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new St("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return we(L,X),L.prototype.ownsTarget=function(N){return!(!X.prototype.ownsTarget.call(this,N)&&N!==this.visual&&N!==this.selectorLine&&N!==this.visibleLine)},L.prototype.createVisual=function(){this.visual=pe.createGroup(),this.selectorLine=pe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=pe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},L.prototype.pointerDown=function(N,z){X.prototype.pointerDown.call(this,N,z),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},L.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),pe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),pe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),pe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},L.prototype.setStrokeColor=function(N){this.strokeColor=N,this.adjustVisual(),this.colorChanged(N)},L.prototype.setStrokeWidth=function(N){this.strokeWidth=N,this.adjustVisual()},L.prototype.setStrokeDasharray=function(N){this.strokeDasharray=N,this.adjustVisual(),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var N=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},X.prototype.getState.call(this));return N.typeName=L.typeName,N},L.prototype.restoreState=function(N){X.prototype.restoreState.call(this,N);var z=N;this.strokeColor=z.strokeColor,this.strokeWidth=z.strokeWidth,this.strokeDasharray=z.strokeDasharray,this.createVisual(),this.adjustVisual()},L.typeName="LineMarker",L.title="Line marker",L.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',L}(tt),Ke=function(X){function L(N,z,te,Q){var Re=X.call(this,N,Q||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Re.fonts=[],Re.fontBoxes=[],Re.fonts=z,Re.currentFont=te,Re.setCurrentFont=Re.setCurrentFont.bind(Re),Re}return we(L,X),L.prototype.getUi=function(){var N=this,z=document.createElement("div");return z.style.overflow="hidden",z.style.flexGrow="2",this.fonts.forEach(function(te){var Q=document.createElement("div");Q.style.display="inline-block",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.overflow="hidden",Q.style.maxWidth=100/N.fonts.length-5+"%",Q.style.borderColor=te===N.currentFont?N.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){N.setCurrentFont(te,Q)}),z.appendChild(Q);var Re=document.createElement("div");Re.style.display="flex",Re.style.minHeight="20px",Re.style.flexGrow="2",Re.style.fontFamily=te,Re.style.overflow="hidden";var ct=document.createElement("div");ct.style.whiteSpace="nowrap",ct.style.overflow="hidden",ct.style.textOverflow="ellipsis",ct.innerHTML="The quick brown fox jumps over the lazy dog",Re.appendChild(ct),Q.appendChild(Re),N.fontBoxes.push(Q)}),z},L.prototype.setCurrentFont=function(N,z){var te=this;this.currentFont=N,this.fontBoxes.forEach(function(Q){Q.style.borderColor=Q===z?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},L}(ue),Xe=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.color="transparent",Q.padding=5,Q.DEFAULT_TEXT="your text here",Q.text=Q.DEFAULT_TEXT,Q.isMoved=!1,Q.color=te.defaultColor,Q.fontFamily=te.defaultFontFamily,Q.defaultSize={x:100,y:30},Q.setColor=Q.setColor.bind(Q),Q.setFont=Q.setFont.bind(Q),Q.renderText=Q.renderText.bind(Q),Q.sizeText=Q.sizeText.bind(Q),Q.textEditDivClicked=Q.textEditDivClicked.bind(Q),Q.showTextEditor=Q.showTextEditor.bind(Q),Q.setSize=Q.setSize.bind(Q),Q.positionTextEditor=Q.positionTextEditor.bind(Q),Q.colorPanel=new ve("Color",te.defaultColorSet,te.defaultColor),Q.colorPanel.onColorChanged=Q.setColor,Q.fontFamilyPanel=new Ke("Font",te.defaultFontFamilies,te.defaultFontFamily),Q.fontFamilyPanel.onFontChanged=Q.setFont,Q}return we(L,X),L.prototype.ownsTarget=function(N){if(X.prototype.ownsTarget.call(this,N)||N===this.visual||N===this.textElement||N===this.bgRectangle)return!0;var z=!1;return this.textElement.childNodes.forEach(function(te){te===N&&(z=!0)}),z},L.prototype.createVisual=function(){this.visual=pe.createGroup(),this.bgRectangle=pe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=pe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(pe.createTransform()),this.textElement.transform.baseVal.appendItem(pe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},L.prototype.pointerDown=function(N,z){X.prototype.pointerDown.call(this,N,z),this.isMoved=!1,this.pointerDownPoint=N,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(N),this._state="creating")},L.prototype.renderText=function(){var N=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(z){N.textElement.appendChild(pe.createTSpan(z.trim()===""?" ":z.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},L.prototype.getTextScale=function(){var N=this.textElement.getBBox(),z=1;if(N.width>0&&N.height>0){var te=(1*this.width-this.width*this.padding*2/100)/N.width,Q=(1*this.height-this.height*this.padding*2/100)/N.height;z=Math.min(te,Q)}return z},L.prototype.getTextPosition=function(N){var z=this.textElement.getBBox(),te=0,Q=0;return z.width>0&&z.height>0&&(te=(this.width-z.width*N)/2,Q=this.height/2-z.height*N/2),{x:te,y:Q}},L.prototype.sizeText=function(){var N=this.textElement.getBBox(),z=this.getTextScale(),te=this.getTextPosition(z);te.y-=N.y*z,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+te.x+"px, "+te.y+"px) scale("+z+", "+z+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(te.x,te.y),this.textElement.transform.baseVal.getItem(1).setScale(z,z))},L.prototype.manipulate=function(N){X.prototype.manipulate.call(this,N),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(N.x-this.pointerDownPoint.x)>5||Math.abs(N.y-this.pointerDownPoint.y)>5)},L.prototype.resize=function(N){X.prototype.resize.call(this,N),this.isMoved=!0,this.setSize(),this.sizeText()},L.prototype.setSize=function(){X.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(pe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),pe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},L.prototype.pointerUp=function(N){var z=this.state;z==="creating"&&(this._suppressMarkerCreateEvent=!0),X.prototype.pointerUp.call(this,N),this.setSize(),(z==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},L.prototype.showTextEditor=function(){var N=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(z){z.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var z=Number.parseFloat(N.textEditor.style.fontSize);N.textEditor.clientWidth>=Number.parseInt(N.textEditor.style.maxWidth)&&z>.9;)z-=.1,N.textEditor.style.fontSize=Math.max(z,.9)+"em"}),this.textEditor.addEventListener("keyup",function(z){z.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(z){if(z.clipboardData){var te=z.clipboardData.getData("text"),Q=window.getSelection();if(!Q.rangeCount)return!1;Q.deleteFromDocument(),Q.getRangeAt(0).insertNode(document.createTextNode(te)),z.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){N.textEditDivClicked(N.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},L.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var N=this.getTextScale(),z=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),te=this.textElement.getBBox(),Q={x:te.width*N,y:te.height*N};z.x-=Q.x/2,z.y-=Q.y/2,this.textEditor.style.top=z.y+"px",this.textEditor.style.left=z.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-z.x+"px",this.textEditor.style.fontSize=Math.max(16*N,12)+"px",this.textElement.style.display="none"}},L.prototype.textEditDivClicked=function(N){this.text=N.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},L.prototype.select=function(){X.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},L.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),X.prototype.deselect.call(this)},L.prototype.dblClick=function(N,z){X.prototype.dblClick.call(this,N,z),this.showTextEditor()},L.prototype.setColor=function(N){this.textElement&&pe.setAttributes(this.textElement,[["fill",N]]),this.color=N,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(N)},L.prototype.setFont=function(N){this.textElement&&pe.setAttributes(this.textElement,[["font-family",N]]),this.fontFamily=N,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},L.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},L.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var N=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},X.prototype.getState.call(this));return N.typeName=L.typeName,N},L.prototype.restoreState=function(N){var z=N;this.color=z.color,this.fontFamily=z.fontFamily,this.padding=z.padding,this.text=z.text,this.createVisual(),X.prototype.restoreState.call(this,N),this.setSize()},L.prototype.scale=function(N,z){X.prototype.scale.call(this,N,z),this.setSize(),this.sizeText(),this.positionTextEditor()},L.typeName="TextMarker",L.title="Text marker",L.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',L}(mt),Ce=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.color="transparent",Q.lineWidth=3,Q.drawing=!1,Q.pixelRatio=1,Q.color=te.defaultColor,Q.lineWidth=te.defaultStrokeWidth,Q.pixelRatio=te.freehandPixelRatio,Q.setColor=Q.setColor.bind(Q),Q.addCanvas=Q.addCanvas.bind(Q),Q.finishCreation=Q.finishCreation.bind(Q),Q.setLineWidth=Q.setLineWidth.bind(Q),Q.colorPanel=new ve("Color",te.defaultColorSet,te.defaultColor),Q.colorPanel.onColorChanged=Q.setColor,Q.lineWidthPanel=new Tt("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),Q.lineWidthPanel.onWidthChanged=Q.setLineWidth,Q}return we(L,X),L.prototype.ownsTarget=function(N){return!(!X.prototype.ownsTarget.call(this,N)&&N!==this.visual&&N!==this.drawingImage)},L.prototype.createVisual=function(){this.visual=pe.createGroup(),this.drawingImage=pe.createImage(),this.visual.appendChild(this.drawingImage);var N=pe.createTransform();this.visual.transform.baseVal.appendItem(N),this.addMarkerVisualToContainer(this.visual)},L.prototype.pointerDown=function(N,z){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(N.x,N.y),this.drawing=!0):X.prototype.pointerDown.call(this,N,z)},L.prototype.manipulate=function(N){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(N.x,N.y),this.canvasContext.stroke()):X.prototype.manipulate.call(this,N)},L.prototype.resize=function(N){X.prototype.resize.call(this,N),pe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),pe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},L.prototype.pointerUp=function(N){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):X.prototype.pointerUp.call(this,N)},L.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},L.prototype.select=function(){this.state==="creating"&&this.finishCreation(),X.prototype.select.call(this)},L.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),X.prototype.deselect.call(this)},L.prototype.finishCreation=function(){for(var N=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),z=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],te=z[0],Q=z[1],Re=z[2],ct=z[3],Ct=!1,Pt=0;Pt<this.canvasElement.height;Pt++)for(var ht=0;ht<this.canvasElement.width;ht++)N.data[Pt*this.canvasElement.width*4+4*ht+3]>0&&(Ct=!0,Pt<Q&&(Q=Pt),ht<te&&(te=ht),Pt>ct&&(ct=Pt),ht>Re&&(Re=ht));if(Ct){this.left=te/this.pixelRatio,this.top=Q/this.pixelRatio,this.width=(Re-te)/this.pixelRatio,this.height=(ct-Q)/this.pixelRatio;var Vt=document.createElement("canvas");Vt.width=Re-te,Vt.height=ct-Q,Vt.getContext("2d").putImageData(this.canvasContext.getImageData(te,Q,Re-te,ct-Q),0,0),this.drawingImgUrl=Vt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},L.prototype.setDrawingImage=function(){pe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),pe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},L.prototype.setColor=function(N){this.color=N,this.colorChanged(N)},L.prototype.setLineWidth=function(N){this.lineWidth=N},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var N=Object.assign({drawingImgUrl:this.drawingImgUrl},X.prototype.getState.call(this));return N.typeName=L.typeName,N},L.prototype.restoreState=function(N){this.createVisual(),X.prototype.restoreState.call(this,N),this.drawingImgUrl=N.drawingImgUrl,this.setDrawingImage()},L.prototype.scale=function(N,z){X.prototype.scale.call(this,N,z),this.setDrawingImage()},L.typeName="FreehandMarker",L.title="Freehand marker",L.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',L}(mt),ge=function(X){function L(N,z,te){var Q=X.call(this,N,te||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Q.typeBoxes=[],Q.currentType=z,Q.setCurrentType=Q.setCurrentType.bind(Q),Q}return we(L,X),L.prototype.getUi=function(){var N=this,z=document.createElement("div");z.style.display="flex",z.style.overflow="hidden",z.style.flexGrow="2";for(var te=function(ct){var Ct="both";switch(ct){case 0:Ct="both";break;case 1:Ct="start";break;case 2:Ct="end";break;case 3:Ct="none"}var Pt=document.createElement("div");if(Pt.style.display="flex",Pt.style.flexGrow="2",Pt.style.alignItems="center",Pt.style.justifyContent="space-between",Pt.style.padding="5px",Pt.style.borderWidth="2px",Pt.style.borderStyle="solid",Pt.style.borderColor=Ct===Q.currentType?Q.uiStyleSettings.toolboxAccentColor:"transparent",Pt.addEventListener("click",function(){N.setCurrentType(Ct,Pt)}),z.appendChild(Pt),Ct==="both"||Ct==="start"){var ht=document.createElement("div");ht.style.display="flex",ht.style.alignItems="center",ht.style.minHeight="20px",ht.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,ht.style.marginLeft="5px",Pt.appendChild(ht)}var Vt=document.createElement("div");Vt.style.display="flex",Vt.style.alignItems="center",Vt.style.minHeight="20px",Vt.style.flexGrow="2";var rn=document.createElement("hr");if(rn.style.minWidth="20px",rn.style.border="0px",rn.style.borderTop="3px solid "+(Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxColor:"#eeeeee"),rn.style.flexGrow="2",Vt.appendChild(rn),Pt.appendChild(Vt),Ct==="both"||Ct==="end"){var An=document.createElement("div");An.style.display="flex",An.style.alignItems="center",An.style.minHeight="20px",An.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,An.style.marginRight="5px",Pt.appendChild(An)}Q.typeBoxes.push(Pt)},Q=this,Re=0;Re<4;Re++)te(Re);return z},L.prototype.setCurrentType=function(N,z){var te=this;this.currentType=N,this.typeBoxes.forEach(function(Q){Q.style.borderColor=Q===z?te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},L}(ue),be=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.arrowType="end",Q.arrowBaseHeight=10,Q.arrowBaseWidth=10,Q.getArrowPoints=Q.getArrowPoints.bind(Q),Q.setArrowType=Q.setArrowType.bind(Q),Q.arrowTypePanel=new ge("Arrow type","end"),Q.arrowTypePanel.onArrowTypeChanged=Q.setArrowType,Q}return we(L,X),L.prototype.ownsTarget=function(N){return!(!X.prototype.ownsTarget.call(this,N)&&N!==this.arrow1&&N!==this.arrow2)},L.prototype.getArrowPoints=function(N,z){var te=this.arrowBaseWidth+2*this.strokeWidth,Q=this.arrowBaseHeight+2*this.strokeWidth;return N-te/2+","+(z+Q/2)+" "+N+","+(z-Q/2)+" "+(N+te/2)+","+(z+Q/2)},L.prototype.createTips=function(){this.arrow1=pe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(pe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=pe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(pe.createTransform()),this.visual.appendChild(this.arrow2)},L.prototype.pointerDown=function(N,z){X.prototype.pointerDown.call(this,N,z),this.state==="creating"&&this.createTips()},L.prototype.adjustVisual=function(){if(X.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",pe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),pe.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var N=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),z=this.arrow1.transform.baseVal.getItem(0);z.setRotate(N,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(z,0);var te=this.arrow2.transform.baseVal.getItem(0);te.setRotate(N+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(te,0)}},L.prototype.setArrowType=function(N){this.arrowType=N,this.adjustVisual(),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var N=Object.assign({arrowType:this.arrowType},X.prototype.getState.call(this));return N.typeName=L.typeName,N},L.prototype.restoreState=function(N){X.prototype.restoreState.call(this,N);var z=N;this.arrowType=z.arrowType,this.createTips(),this.adjustVisual()},L.typeName="ArrowMarker",L.title="Arrow marker",L.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',L}(lt),ie=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.fillColor=te.defaultFillColor,Q.strokeWidth=0,Q.fillPanel=new ve("Color",te.defaultColorSet,te.defaultFillColor),Q.fillPanel.onColorChanged=Q.setFillColor,Q}return we(L,X),Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var N=X.prototype.getState.call(this);return N.typeName=L.typeName,N},L.typeName="CoverMarker",L.title="Cover marker",L.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',L}(dt),oe=function(X){function L(N,z,te,Q){var Re=X.call(this,N,Q||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Re.opacities=[],Re.opacityBoxes=[],Re.opacities=z,Re.currentOpacity=te,Re.setCurrentOpacity=Re.setCurrentOpacity.bind(Re),Re}return we(L,X),L.prototype.getUi=function(){var N=this,z=document.createElement("div");return z.style.display="flex",z.style.overflow="hidden",z.style.flexGrow="2",z.style.justifyContent="space-between",this.opacities.forEach(function(te){var Q=document.createElement("div");Q.style.display="flex",Q.style.alignItems="center",Q.style.justifyContent="center",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.borderColor=te===N.currentOpacity?N.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){N.setCurrentOpacity(te,Q)}),z.appendChild(Q);var Re=document.createElement("div");Re.innerText=100*te+"%",Q.appendChild(Re),N.opacityBoxes.push(Q)}),z},L.prototype.setCurrentOpacity=function(N,z){var te=this;this.currentOpacity=N,this.opacityBoxes.forEach(function(Q){Q.style.borderColor=Q===z?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},L}(ue),fe=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.setOpacity=Q.setOpacity.bind(Q),Q.fillColor=te.defaultHighlightColor,Q.strokeWidth=0,Q.opacity=te.defaultHighlightOpacity,Q.fillPanel=new ve("Color",te.defaultColorSet,Q.fillColor),Q.fillPanel.onColorChanged=Q.setFillColor,Q.opacityPanel=new oe("Opacity",te.defaultOpacitySteps,Q.opacity),Q.opacityPanel.onOpacityChanged=Q.setOpacity,Q}return we(L,X),L.prototype.setOpacity=function(N){this.opacity=N,this.visual&&pe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var N=X.prototype.getState.call(this);return N.typeName=L.typeName,N},L.typeName="HighlightMarker",L.title="Highlight marker",L.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',L}(ie),ye='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Ae=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.bgColor="transparent",Q.tipPosition={x:0,y:0},Q.tipBase1Position={x:0,y:0},Q.tipBase2Position={x:0,y:0},Q.tipMoving=!1,Q.color=te.defaultStrokeColor,Q.bgColor=te.defaultFillColor,Q.fontFamily=te.defaultFontFamily,Q.defaultSize={x:100,y:30},Q.setBgColor=Q.setBgColor.bind(Q),Q.getTipPoints=Q.getTipPoints.bind(Q),Q.positionTip=Q.positionTip.bind(Q),Q.setTipPoints=Q.setTipPoints.bind(Q),Q.colorPanel=new ve("Text color",te.defaultColorSet,Q.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),Q.colorPanel.onColorChanged=Q.setColor,Q.bgColorPanel=new ve("Fill color",te.defaultColorSet,Q.bgColor,ye),Q.bgColorPanel.onColorChanged=Q.setBgColor,Q.fontFamilyPanel=new Ke("Font",te.defaultFontFamilies,te.defaultFontFamily),Q.fontFamilyPanel.onFontChanged=Q.setFont,Q.tipGrip=new it,Q.tipGrip.visual.transform.baseVal.appendItem(pe.createTransform()),Q.controlBox.appendChild(Q.tipGrip.visual),Q}return we(L,X),L.prototype.ownsTarget=function(N){return X.prototype.ownsTarget.call(this,N)||this.tipGrip.ownsTarget(N)||this.tip===N},L.prototype.createTip=function(){pe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=pe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},L.prototype.pointerDown=function(N,z){this.state==="new"&&X.prototype.pointerDown.call(this,N,z),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(z)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):X.prototype.pointerDown.call(this,N,z)},L.prototype.pointerUp=function(N){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,X.prototype.pointerUp.call(this,N);else{var z=this.state==="creating";X.prototype.pointerUp.call(this,N),this.setTipPoints(z),this.positionTip()}},L.prototype.manipulate=function(N){if(this.tipMoving){var z=this.unrotatePoint(N);this.tipPosition={x:z.x-this.manipulationStartLeft,y:z.y-this.manipulationStartTop},this.positionTip()}else X.prototype.manipulate.call(this,N)},L.prototype.setBgColor=function(N){this.bgRectangle&&this.tip&&(pe.setAttributes(this.bgRectangle,[["fill",N]]),pe.setAttributes(this.tip,[["fill",N]])),this.bgColor=N,this.fillColorChanged(N)},L.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},L.prototype.setTipPoints=function(N){N===void 0&&(N=!1);var z=Math.min(this.height/2,15),te=this.height/5;N&&(this.tipPosition={x:z+te/2,y:this.height+20});var Q=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Q<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(te=this.width/5,z=Math.min(this.width/2,15),this.tipBase1Position={x:z,y:0},this.tipBase2Position={x:z+te,y:0}):(this.tipBase1Position={x:0,y:z},this.tipBase2Position={x:0,y:z+te}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Q<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(te=this.width/5,z=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-z-te,y:0},this.tipBase2Position={x:this.width-z,y:0}):(this.tipBase1Position={x:this.width,y:z},this.tipBase2Position={x:this.width,y:z+te}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Q<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(te=this.width/5,z=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-z-te,y:this.height},this.tipBase2Position={x:this.width-z,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-z-te},this.tipBase2Position={x:this.width,y:this.height-z}):Q<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(te=this.width/5,z=Math.min(this.width/2,15),this.tipBase1Position={x:z,y:this.height},this.tipBase2Position={x:z+te,y:this.height}):(this.tipBase1Position={x:0,y:this.height-z},this.tipBase2Position={x:0,y:this.height-z-te})},L.prototype.resize=function(N){X.prototype.resize.call(this,N),this.positionTip()},L.prototype.positionTip=function(){pe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var N=this.tipGrip.visual.transform.baseVal.getItem(0);N.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(N,0)},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),L.prototype.select=function(){this.positionTip(),X.prototype.select.call(this)},L.prototype.getState=function(){var N=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},X.prototype.getState.call(this));return N.typeName=L.typeName,N},L.prototype.restoreState=function(N){var z=N;this.bgColor=z.bgColor,this.tipPosition=z.tipPosition,X.prototype.restoreState.call(this,N),this.createTip(),this.setTipPoints()},L.prototype.scale=function(N,z){X.prototype.scale.call(this,N,z),this.tipPosition={x:this.tipPosition.x*N,y:this.tipPosition.y*z},this.positionTip()},L.typeName="CalloutMarker",L.title="Callout marker",L.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',L}(Xe),Ge=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.fillColor="transparent",Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.opacity=1,Q.strokeColor=te.defaultColor,Q.strokeWidth=te.defaultStrokeWidth,Q.strokeDasharray=te.defaultStrokeDasharray,Q.fillColor=te.defaultFillColor,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setFillColor=Q.setFillColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.setOpacity=Q.setOpacity.bind(Q),Q.createVisual=Q.createVisual.bind(Q),Q.strokePanel=new ve("Line color",me(te.defaultColorSet,["transparent"]),te.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.fillPanel=new ve("Fill color",me(te.defaultColorSet,["transparent"]),Q.fillColor,ye),Q.fillPanel.onColorChanged=Q.setFillColor,Q.strokeWidthPanel=new Tt("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new St("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q.opacityPanel=new oe("Opacity",te.defaultOpacitySteps,Q.opacity),Q.opacityPanel.onOpacityChanged=Q.setOpacity,Q}return we(L,X),L.prototype.ownsTarget=function(N){return!(!X.prototype.ownsTarget.call(this,N)&&N!==this.visual)},L.prototype.createVisual=function(){this.visual=pe.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},L.prototype.pointerDown=function(N,z){X.prototype.pointerDown.call(this,N,z),this.state==="new"&&(this.createVisual(),this.moveVisual(N),this._state="creating")},L.prototype.manipulate=function(N){X.prototype.manipulate.call(this,N)},L.prototype.resize=function(N){X.prototype.resize.call(this,N),this.setSize()},L.prototype.setSize=function(){X.prototype.setSize.call(this),pe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},L.prototype.pointerUp=function(N){X.prototype.pointerUp.call(this,N),this.setSize()},L.prototype.setStrokeColor=function(N){this.strokeColor=N,this.visual&&pe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(N),this.stateChanged()},L.prototype.setFillColor=function(N){this.fillColor=N,this.visual&&pe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(N),this.stateChanged()},L.prototype.setStrokeWidth=function(N){this.strokeWidth=N,this.visual&&pe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},L.prototype.setStrokeDasharray=function(N){this.strokeDasharray=N,this.visual&&pe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},L.prototype.setOpacity=function(N){this.opacity=N,this.visual&&pe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var N=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},X.prototype.getState.call(this));return N.typeName=L.typeName,N},L.prototype.restoreState=function(N){var z=N;this.fillColor=z.fillColor,this.strokeColor=z.strokeColor,this.strokeWidth=z.strokeWidth,this.strokeDasharray=z.strokeDasharray,this.opacity=z.opacity,this.createVisual(),X.prototype.restoreState.call(this,N),this.setSize()},L.prototype.scale=function(N,z){X.prototype.scale.call(this,N,z),this.setSize()},L.typeName="EllipseMarker",L.title="Ellipse marker",L.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',L}(mt),ot=function(X){function L(N,z,te){return X.call(this,N,z,te)||this}return we(L,X),Object.defineProperty(L.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),L.prototype.ownsTarget=function(N){return!(!X.prototype.ownsTarget.call(this,N)&&N!==this.tip1&&N!==this.tip2)},L.prototype.createTips=function(){this.tip1=pe.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(pe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=pe.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(pe.createTransform()),this.visual.appendChild(this.tip2)},L.prototype.pointerDown=function(N,z){X.prototype.pointerDown.call(this,N,z),this.state==="creating"&&this.createTips()},L.prototype.adjustVisual=function(){if(X.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(pe.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),pe.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var N=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),z=this.tip1.transform.baseVal.getItem(0);z.setRotate(N,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(z,0);var te=this.tip2.transform.baseVal.getItem(0);te.setRotate(N+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(te,0)}},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var N=X.prototype.getState.call(this);return N.typeName=L.typeName,N},L.prototype.restoreState=function(N){X.prototype.restoreState.call(this,N),this.createTips(),this.adjustVisual()},L.typeName="MeasurementMarker",L.title="Measurement marker",L.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',L}(lt),wt=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.strokePanel.colors=te.defaultColorSet,Q.fillColor="transparent",Q}return we(L,X),Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var N=X.prototype.getState.call(this);return N.typeName=L.typeName,N},L.typeName="EllipseFrameMarker",L.title="Ellipse frame marker",L.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',L}(Ge),Dt=function(){function X(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(X.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),X.prototype.addUndoStep=function(L){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(L)||(this.undoStack.push(L),JSON.stringify(this.lastRedoStep)!==JSON.stringify(L)&&this.redoStack.splice(0,this.redoStack.length))},X.prototype.replaceLastUndoStep=function(L){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=L)},X.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},X.prototype.undo=function(){if(this.undoStack.length>1){var L=this.undoStack.pop();return L!==void 0&&this.redoStack.push(L),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},X.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},X}(),At=function(X){function L(N,z,te){var Q=X.call(this,N,z,te)||this;return Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.curveX=0,Q.curveY=0,Q.manipulationStartCurveX=0,Q.manipulationStartCurveY=0,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.positionGrips=Q.positionGrips.bind(Q),Q.addControlGrips=Q.addControlGrips.bind(Q),Q.adjustVisual=Q.adjustVisual.bind(Q),Q.setupControlBox=Q.setupControlBox.bind(Q),Q.resize=Q.resize.bind(Q),Q.strokeColor=te.defaultColor,Q.strokeWidth=te.defaultStrokeWidth,Q.strokeDasharray=te.defaultStrokeDasharray,Q.strokePanel=new ve("Line color",te.defaultColorSet,te.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new Tt("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new St("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return we(L,X),L.prototype.ownsTarget=function(N){return!(!X.prototype.ownsTarget.call(this,N)&&N!==this.visual&&N!==this.selectorCurve&&N!==this.visibleCurve&&!this.curveGrip.ownsTarget(N))},L.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},L.prototype.createVisual=function(){this.visual=pe.createGroup(),this.selectorCurve=pe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=pe.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},L.prototype.pointerDown=function(N,z){X.prototype.pointerDown.call(this,N,z),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=N.x,this.curveY=N.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(z)&&(this.activeGrip=this.curveGrip,this._state="resize")},L.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),pe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),pe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),pe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},L.prototype.setupControlBox=function(){X.prototype.setupControlBox.call(this),this.curveControlLine1=pe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=pe.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},L.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,X.prototype.addControlGrips.call(this)},L.prototype.positionGrips=function(){X.prototype.positionGrips.call(this);var N=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-N/2,this.curveY-N/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},L.prototype.manipulate=function(N){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+N.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+N.y-this.manipulationStartY),X.prototype.manipulate.call(this,N)},L.prototype.resize=function(N){this.activeGrip===this.curveGrip&&(this.curveX=N.x,this.curveY=N.y),X.prototype.resize.call(this,N),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},L.prototype.setStrokeColor=function(N){this.strokeColor=N,this.adjustVisual(),this.colorChanged(N)},L.prototype.setStrokeWidth=function(N){this.strokeWidth=N,this.adjustVisual()},L.prototype.setStrokeDasharray=function(N){this.strokeDasharray=N,this.adjustVisual()},L.prototype.scale=function(N,z){this.curveX=this.curveX*N,this.curveY=this.curveY*z,X.prototype.scale.call(this,N,z)},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var N=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},X.prototype.getState.call(this));return N.typeName=L.typeName,N},L.prototype.restoreState=function(N){X.prototype.restoreState.call(this,N);var z=N;this.strokeColor=z.strokeColor,this.strokeWidth=z.strokeWidth,this.strokeDasharray=z.strokeDasharray,this.curveX=z.curveX,this.curveY=z.curveY,this.createVisual(),this.adjustVisual()},L.typeName="CurveMarker",L.title="Curve marker",L.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',L}(tt),vt=function(){function X(L,N){N===void 0&&(N=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=L,this.cancelable=N}return Object.defineProperty(X.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),X.prototype.preventDefault=function(){this._defaultPrevented=!0},X}(),$e=function(X){function L(N,z,te){var Q=X.call(this,N,!1)||this;return Q.dataUrl=z,Q.state=te,Q}return we(L,X),L}(vt),et=function(X){function L(N,z,te){te===void 0&&(te=!1);var Q=X.call(this,N,te)||this;return Q.marker=z,Q}return we(L,X),L}(vt),Ye=function(){function X(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return X.prototype.addEventListener=function(L,N){this[L].push(N)},X.prototype.removeEventListener=function(L,N){var z=this[L].indexOf(N);z>-1&&this[L].splice(z,1)},X}(),ce=function(){function X(L){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ie,this._isOpen=!1,this.undoRedoManager=new Dt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Ye,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=X.instanceCounter++,this.styles=new ke(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=L,this.targetRoot=document.body,this.width=L.clientWidth,this.height=L.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(X.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ue,Ce,be,Xe,wt,Ge,fe,Ae,ot,ie,lt,At]},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ue,Ce,be,Xe,Ge,fe,Ae]},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ue,Ce,be,Xe,fe]},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(L){var N=this;this._availableMarkerTypes.splice(0),L.forEach(function(z){if(typeof z=="string"){var te=N.ALL_MARKER_TYPES.find(function(Q){return Q.typeName===z});te!==void 0&&N._availableMarkerTypes.push(te)}else N._availableMarkerTypes.push(z)})},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(L){this._zoomLevel=L,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),X.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ne.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},X.prototype.show=function(){var L=this;this.styles.styleSheetRoot===void 0&&ae.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ae.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(N){return N(new vt(L))})},X.prototype.render=function(){return Fe(this,void 0,void 0,function(){var L;return Me(this,function(N){switch(N.label){case 0:return this.setCurrentMarker(),(L=new Ee).naturalSize=this.renderAtNaturalSize,L.imageType=this.renderImageType,L.imageQuality=this.renderImageQuality,L.markersOnly=this.renderMarkersOnly,L.width=this.renderWidth,L.height=this.renderHeight,[4,L.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return N.sent(),[4,L.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,N.sent()]}})})},X.prototype.close=function(L){var N=this;if(L===void 0&&(L=!1),this.isOpen){var z=!1;L||this.eventListeners.beforeclose.forEach(function(te){var Q=new vt(N,!0);te(Q),Q.defaultPrevented&&(z=!0)}),z||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(te){return te(new vt(N))}),this.detachEvents(),this._isOpen=!1)}},X.prototype.addMarkersToToolbar=function(){for(var L,N=[],z=0;z<arguments.length;z++)N[z]=arguments[z];(L=this._availableMarkerTypes).push.apply(L,N)},X.prototype.addRenderEventListener=function(L){this.addEventListener("render",function(N){L(N.dataUrl,N.state)})},X.prototype.removeRenderEventListener=function(L){},X.prototype.addCloseEventListener=function(L){this.addEventListener("close",function(){L()})},X.prototype.removeCloseEventListener=function(L){},X.prototype.setupResizeObserver=function(){var L=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){L.resize(L.target.clientWidth,L.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return L.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},X.prototype.onPopupTargetResize=function(){var L=1*this.target.clientWidth/this.target.clientHeight,N=this.editorCanvas.clientWidth/L>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*L:this.editorCanvas.clientWidth,z=N<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/L;this.resize(N,z)},X.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},X.prototype.resize=function(L,N){this._isResizing=!0;var z=L/this.imageWidth,te=N/this.imageHeight;this.imageWidth=Math.round(L),this.imageHeight=Math.round(N),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(z,te),this._isResizing=!1},X.prototype.scaleMarkers=function(L,N){var z,te=this;this._currentMarker&&this._currentMarker instanceof Xe?this._currentMarker.scale(L,N):(z=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Q){Q!==te._currentMarker&&Q.scale(L,N)}),z!==void 0&&this.setCurrentMarker(z)},X.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},X.prototype.setTopLeft=function(){var L=this.editingTarget.getBoundingClientRect(),N=this.editorCanvas.getBoundingClientRect();this.left=L.left-N.left,this.top=L.top-N.top},X.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},X.prototype.addDefs=function(){for(var L,N=[],z=0;z<arguments.length;z++)N[z]=arguments[z];this.defs=pe.createDefs(),this.addDefsToImage(),(L=this.defs).append.apply(L,N)},X.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},X.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},X.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},X.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},X.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},X.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},X.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},X.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var L=document.createElement("a");L.href="https://markerjs.com/",L.target="_blank",L.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',L.title="Powered by marker.js",L.style.display="grid",L.style.alignItems="center",L.style.justifyItems="center",L.style.padding="3px",L.style.width="20px",L.style.height="20px",this.logoUI.appendChild(L),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},X.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},X.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},X.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},X.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var L=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=L+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Ve(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new qe(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},X.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},X.prototype.removeMarker=function(L){this.markerImage.removeChild(L.container),this.markers.indexOf(L)>-1&&this.markers.splice(this.markers.indexOf(L),1),L.dispose()},X.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},X.prototype.toolbarButtonClicked=function(L,N){if(L==="marker"&&N!==void 0)this.createNewMarker(N);else if(L==="action")switch(N){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},X.prototype.deleteSelectedMarker=function(){var L=this;if(this._currentMarker!==void 0){var N=!1;if(this.eventListeners.markerbeforedelete.forEach(function(te){var Q=new et(L,L._currentMarker,!0);te(Q),Q.defaultPrevented&&(N=!0)}),!N){var z=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(te){return te(new et(L,z))})}}},X.prototype.clear=function(){var L=this,N=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Re){var ct=new et(L,void 0,!0);Re(ct),ct.defaultPrevented&&(N=!0)}),!N)){this.setCurrentMarker();for(var z=function(Re){var ct=te.markers[Re];te.setCurrentMarker(te.markers[Re]),te._currentMarker.dispose(),te.markerImage.removeChild(te._currentMarker.container),te.markers.splice(te.markers.indexOf(te._currentMarker),1),te.eventListeners.markerdelete.forEach(function(Ct){return Ct(new et(L,ct))})},te=this,Q=this.markers.length-1;Q>=0;Q--)z(Q);this.addUndoStep()}},Object.defineProperty(X.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),X.prototype.showNotesEditor=function(){var L;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(L=this._currentMarker.notes)!==null&&L!==void 0?L:"",this.overlayContainer.appendChild(this.notesArea))},X.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},X.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},X.prototype.addUndoStep=function(){var L=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var N=this.getState(),z=this.undoRedoManager.getLastUndoStep();if(!z||z.width===N.width&&z.height===N.height){var te=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(N),te<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Q){return Q(new vt(L))})}else this.undoRedoManager.replaceLastUndoStep(N),this.eventListeners.statechange.forEach(function(Q){return Q(new vt(L))})}},X.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},X.prototype.undoStep=function(){var L=this,N=this.undoRedoManager.undo();N!==void 0&&(this.restoreState(N),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(z){return z(new vt(L))}))},X.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},X.prototype.redoStep=function(){var L=this,N=this.undoRedoManager.redo();N!==void 0&&(this.restoreState(N),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(z){return z(new vt(L))}))},X.prototype.stepZoom=function(){var L=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=L<this.zoomSteps.length-1?this.zoomSteps[L+1]:this.zoomSteps[0]},X.prototype.panTo=function(L){this.contentDiv.scrollBy({left:this.prevPanPoint.x-L.x,top:this.prevPanPoint.y-L.y}),this.prevPanPoint=L},X.prototype.startRenderAndClose=function(){return Fe(this,void 0,void 0,function(){var L,N,z=this;return Me(this,function(te){switch(te.label){case 0:return[4,this.render()];case 1:return L=te.sent(),N=this.getState(),this.eventListeners.render.forEach(function(Q){return Q(new $e(z,L,N))}),this.close(!0),[2]}})})},X.prototype.getState=function(L){L===!0&&this.setCurrentMarker();var N={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(z){return N.markers.push(z.getState())}),N},X.prototype.restoreState=function(L){var N=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);L.markers.forEach(function(z){var te=N._availableMarkerTypes.find(function(Re){return Re.typeName===z.typeName});if(te!==void 0){var Q=N.addNewMarker(te);Q.restoreState(z),N.markers.push(Q)}}),L.width&&L.height&&(L.width!==this.imageWidth||L.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/L.width,this.imageHeight/L.height),this.eventListeners.restorestate.forEach(function(z){return z(new vt(N))})},X.prototype.addNewMarker=function(L){var N=pe.createGroup();return this.markerImage.appendChild(N),new L(N,this.overlayContainer,this.settings)},X.prototype.createNewMarker=function(L){var N,z=this;(N=typeof L=="string"?this._availableMarkerTypes.find(function(te){return te.typeName===L}):L)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(N),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(N.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(te){return te(new et(z,z._currentMarker))}))},X.prototype.markerCreated=function(L){var N=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(L),this.setCurrentMarker(L),L instanceof Ce&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ce):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(z){return z(new et(N,N._currentMarker))})},X.prototype.colorChanged=function(L){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=L,this.settings.defaultStrokeColor=L)},X.prototype.fillColorChanged=function(L){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=L)},X.prototype.markerStateChanged=function(L){var N=this;this.eventListeners.markerchange.forEach(function(z){return z(new et(N,L))})},X.prototype.setCurrentMarker=function(L){var N=this;this._currentMarker!==L&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(z){return z(new et(N,N._currentMarker))})),this._currentMarker=L,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(z){return z(new et(N,N._currentMarker))}))},X.prototype.onPointerDown=function(L){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||L.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var N=this.markers.find(function(z){return z.ownsTarget(L.target)});N!==void 0?(this.setCurrentMarker(N),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(L.clientX,L.clientY),L.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:L.clientX,y:L.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(L.clientX,L.clientY))},X.prototype.onDblClick=function(L){if(this._isFocused||this.focus(),this.mode==="select"){var N=this.markers.find(function(z){return z.ownsTarget(L.target)});N!==void 0&&N!==this._currentMarker&&this.setCurrentMarker(N),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(L.clientX,L.clientY),L.target):this.setCurrentMarker()}},X.prototype.onPointerMove=function(L){this.touchPoints!==1&&L.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||L.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(L.clientX,L.clientY)):this.zoomLevel>1&&this.panTo({x:L.clientX,y:L.clientY}))},X.prototype.onPointerUp=function(L){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(L.clientX,L.clientY)),this.isDragging=!1,this.addUndoStep()},X.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},X.prototype.onKeyUp=function(L){this._currentMarker===void 0||this.notesArea!==void 0||L.key!=="Delete"&&L.key!=="Backspace"||this.deleteSelectedMarker()},X.prototype.clientToLocalCoordinates=function(L,N){var z=this.markerImage.getBoundingClientRect();return{x:(L-z.left)/this.zoomLevel,y:(N-z.top)/this.zoomLevel}},X.prototype.onWindowResize=function(){this.positionUI()},X.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var L=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=L+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},X.prototype.addLicenseKey=function(L){ne.addKey(L)},X.prototype.addEventListener=function(L,N){this.eventListeners.addEventListener(L,N)},X.prototype.removeEventListener=function(L,N){this.eventListeners.removeEventListener(L,N)},X.prototype.renderState=function(L){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(L),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(X.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),X.prototype.focus=function(){var L=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(N){return N(new vt(L))}))},X.prototype.blur=function(){var L=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(N){return N(new vt(L))}))},X.instanceCounter=0,X}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var xe=function(X,L){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,z){N.__proto__=z}||function(N,z){for(var te in z)Object.prototype.hasOwnProperty.call(z,te)&&(N[te]=z[te])})(X,L)};function at(X,L){if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");function N(){this.constructor=X}xe(X,L),X.prototype=L===null?Object.create(L):(N.prototype=L.prototype,new N)}function Je(X,L,N,z){return new(N||(N=Promise))(function(te,Q){function Re(Pt){try{Ct(z.next(Pt))}catch(ht){Q(ht)}}function ct(Pt){try{Ct(z.throw(Pt))}catch(ht){Q(ht)}}function Ct(Pt){var ht;Pt.done?te(Pt.value):(ht=Pt.value,ht instanceof N?ht:new N(function(Vt){Vt(ht)})).then(Re,ct)}Ct((z=z.apply(X,L||[])).next())})}function _t(X,L){var N,z,te,Q,Re={label:0,sent:function(){if(1&te[0])throw te[1];return te[1]},trys:[],ops:[]};return Q={next:ct(0),throw:ct(1),return:ct(2)},typeof Symbol=="function"&&(Q[Symbol.iterator]=function(){return this}),Q;function ct(Ct){return function(Pt){return function(ht){if(N)throw new TypeError("Generator is already executing.");for(;Re;)try{if(N=1,z&&(te=2&ht[0]?z.return:ht[0]?z.throw||((te=z.return)&&te.call(z),0):z.next)&&!(te=te.call(z,ht[1])).done)return te;switch(z=0,te&&(ht=[2&ht[0],te.value]),ht[0]){case 0:case 1:te=ht;break;case 4:return Re.label++,{value:ht[1],done:!1};case 5:Re.label++,z=ht[1],ht=[0];continue;case 7:ht=Re.ops.pop(),Re.trys.pop();continue;default:if(!(te=Re.trys,(te=te.length>0&&te[te.length-1])||ht[0]!==6&&ht[0]!==2)){Re=0;continue}if(ht[0]===3&&(!te||ht[1]>te[0]&&ht[1]<te[3])){Re.label=ht[1];break}if(ht[0]===6&&Re.label<te[1]){Re.label=te[1],te=ht;break}if(te&&Re.label<te[2]){Re.label=te[2],Re.ops.push(ht);break}te[2]&&Re.ops.pop(),Re.trys.pop();continue}ht=L.call(X,Re)}catch(Vt){ht=[6,Vt],z=0}finally{N=te=0}if(5&ht[0])throw ht[1];return{value:ht[0]?ht[1]:void 0,done:!0}}([Ct,Pt])}}}var yt=function(){function X(){}return X.addKey=function(L){X.key=L},Object.defineProperty(X,"isLicensed",{get:function(){return!!X.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(X.key)},enumerable:!1,configurable:!0}),X}(),Be=function(){function X(){}return X.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},X.setAttributes=function(L,N){for(var z=0,te=N;z<te.length;z++){var Q=te[z],Re=Q[0],ct=Q[1];L.setAttribute(Re,ct)}},X.createRect=function(L,N,z){var te=document.createElementNS("http://www.w3.org/2000/svg","rect");return te.setAttribute("width",L.toString()),te.setAttribute("height",N.toString()),z&&X.setAttributes(te,z),te},X.createLine=function(L,N,z,te,Q){var Re=document.createElementNS("http://www.w3.org/2000/svg","line");return Re.setAttribute("x1",L.toString()),Re.setAttribute("y1",N.toString()),Re.setAttribute("x2",z.toString()),Re.setAttribute("y2",te.toString()),Q&&X.setAttributes(Re,Q),Re},X.createPolygon=function(L,N){var z=document.createElementNS("http://www.w3.org/2000/svg","polygon");return z.setAttribute("points",L),N&&X.setAttributes(z,N),z},X.createCircle=function(L,N){var z=document.createElementNS("http://www.w3.org/2000/svg","circle");return z.setAttribute("cx",(L/2).toString()),z.setAttribute("cy",(L/2).toString()),z.setAttribute("r",L.toString()),N&&X.setAttributes(z,N),z},X.createEllipse=function(L,N,z){var te=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return te.setAttribute("cx",(L/2).toString()),te.setAttribute("cy",(N/2).toString()),te.setAttribute("rx",(L/2).toString()),te.setAttribute("ry",(N/2).toString()),z&&X.setAttributes(te,z),te},X.createGroup=function(L){var N=document.createElementNS("http://www.w3.org/2000/svg","g");return L&&X.setAttributes(N,L),N},X.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},X.createMarker=function(L,N,z,te,Q,Re,ct){var Ct=document.createElementNS("http://www.w3.org/2000/svg","marker");return X.setAttributes(Ct,[["id",L],["orient",N],["markerWidth",z.toString()],["markerHeight",te.toString()],["refX",Q.toString()],["refY",Re.toString()]]),Ct.appendChild(ct),Ct},X.createText=function(L){var N=document.createElementNS("http://www.w3.org/2000/svg","text");return N.setAttribute("x","0"),N.setAttribute("y","0"),L&&X.setAttributes(N,L),N},X.createTSpan=function(L,N){var z=document.createElementNS("http://www.w3.org/2000/svg","tspan");return z.textContent=L,N&&X.setAttributes(z,N),z},X.createImage=function(L){var N=document.createElementNS("http://www.w3.org/2000/svg","image");return L&&X.setAttributes(N,L),N},X.createPoint=function(L,N){var z=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return z.x=L,z.y=N,z},X.createPath=function(L,N){var z=document.createElementNS("http://www.w3.org/2000/svg","path");return z.setAttribute("d",L),N&&X.setAttributes(z,N),z},X.createElement=function(L,N){var z=document.createElementNS("http://www.w3.org/2000/svg",L);return N&&X.setAttributes(z,N),z},X.getHollowRectanglePath=function(L,N,z,te,Q,Re,ct,Ct){return"M"+L+","+N+"V"+(N+te)+"H"+(L+z)+"V"+N+"H"+Q+"V"+Re+"H"+(Q+ct)+"V"+(Re+Ct)+"H"+Q+"V"+N+"Z"},X}(),Ze=function(){function X(L){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+L+"_"}return Object.defineProperty(X.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),X.prototype.addClass=function(L){return this.styleSheet===void 0&&this.addStyleSheet(),L.name=""+this.classNamePrefix+L.localName,this.classes.push(L),this.styleSheet.sheet.insertRule("."+L.name+" {"+L.style+"}",this.styleSheet.sheet.cssRules.length),L},X.prototype.addRule=function(L){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(L),this.styleSheet.sheet.insertRule(L.selector+" {"+L.style+"}",this.styleSheet.sheet.cssRules.length)},X.prototype.addStyleSheet=function(){var L;this.styleSheet=document.createElement("style"),((L=this.styleSheetRoot)!==null&&L!==void 0?L:document.head).appendChild(this.styleSheet),this.addRule(new nt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new nt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new nt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ut("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ut("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},X.prototype.removeStyleSheet=function(){var L;this.styleSheet&&(((L=this.styleSheetRoot)!==null&&L!==void 0?L:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},X}(),nt=function(X,L){this.selector=X,this.style=L},ut=function(X,L){this.localName=X,this.style=L},Et=function(){function X(){this.blocks=[],this.display=""}return X.prototype.addButtonBlock=function(L){L.className=this.blockClassName,L.buttonClassName=this.buttonClassName,L.buttonColorsClassName=this.buttonColorsClassName,L.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(L)},X.prototype.addElementBlock=function(L){L.className===void 0&&(L.className=this.blockClassName),this.blocks.push(L)},X.prototype.getUI=function(){var L=document.createElement("div");return L.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,L.style.display=this.display,this.blocks.forEach(function(N){return L.appendChild(N.getUI())}),L},X}(),st=function(){function X(){}return X.prototype.getUI=function(){var L=document.createElement("div");if(L.className=this.className,this.minWidth!==void 0&&(L.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":L.style.justifyContent="flex-start";break;case"center":L.style.justifyContent="center";break;case"end":L.style.justifyContent="flex-end"}return L.style.whiteSpace="nowrap",L},X}(),Ut=function(X){function L(){var N=X!==null&&X.apply(this,arguments)||this;return N.buttons=[],N}return at(L,X),L.prototype.addButton=function(N){N.className=this.buttonClassName,N.colorsClassName=this.buttonColorsClassName,N.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(N)},L.prototype.getUI=function(){var N=X.prototype.getUI.call(this);return this.buttons.forEach(function(z){return N.appendChild(z.getUI())}),N},L}(st),Zt=function(){function X(L,N){this._isActive=!1,this._isHidden=!1,this._icon=L,this.title=N,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(X.prototype,"icon",{get:function(){return this._icon},set:function(L){this._icon=L,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isActive",{get:function(){return this._isActive},set:function(L){this._isActive=L,this.adjustClassName()},enumerable:!1,configurable:!0}),X.prototype.getUI=function(){var L=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return L.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},X.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},X.prototype.hide=function(){this._isHidden=!0},X}(),Rt=function(X){function L(){var N=X!==null&&X.apply(this,arguments)||this;return N.elements=[],N}return at(L,X),L.prototype.addElement=function(N){this.elements.push(N)},L.prototype.getUI=function(){var N=X.prototype.getUI.call(this);return this.elements.forEach(function(z){return N.appendChild(z)}),N},L}(st),qt=function(){function X(L,N){this.horizontal=L,this.vertical=N}return Object.defineProperty(X.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),X.prototype.getVerticalLength=function(L){return L/this.ratio},X.prototype.getHorizontalLength=function(L){return L*this.ratio},X}(),Qt=function(){function X(){}return X.getIcon=function(L,N){if(L>0&&N>0){var z=new qt(L,N),te=z.ratio>=1?20:z.getHorizontalLength(20),Q=z.ratio<1?20:z.getVerticalLength(20),Re=document.createElementNS("http://www.w3.org/2000/svg","svg");Re.setAttribute("xmlns","http://www.w3.org/2000/svg"),Re.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Re);var ct=Be.createDefs();Re.appendChild(ct);var Ct=Be.createElement("clipPath",[["id","text-bg-clip"]]);ct.appendChild(Ct);var Pt=Be.createPath(Be.getHollowRectanglePath((24-te)/2,(24-Q)/2,te,Q,(24-te)/2+2,(24-Q)/2+2,te-4,Q-4));Re.appendChild(Pt);var ht=Be.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);ht.appendChild(Be.createTSpan(L+":"+N)),Re.appendChild(ht);var Vt=ht.getBBox();Be.setAttributes(ht,[["x",((24-Vt.width)/2).toString()],["y",((24-Vt.height)/2-Vt.y).toString()]]);var rn=Be.createPath(Be.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Vt.width))/2,(24-Math.ceil(Vt.height))/2,Math.ceil(Vt.width),Math.ceil(Vt.height)));return Ct.appendChild(rn),Be.setAttributes(Pt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Re),Re.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},X}(),en=function(X){function L(N,z,te){var Q=X.call(this,N,z)||this;return Q.isDropdownOpen=!1,Q.onClick=Q.dropdownButtonClicked,Q.dropdownButtons=te,Q}return at(L,X),L.prototype.setupDropdown=function(){var N=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(z){z.className=N.className,z.colorsClassName=N.colorsClassName,N.dropdownBlock.appendChild(z.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},L.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},L.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},L.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},L.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},L.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},L}(Zt),Yt=function(){function X(L,N){this.GRIP_SIZE=10,this.color=L,this.fillColor=N,this.visual=Be.createGroup(),this.visual.appendChild(Be.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Be.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return X.prototype.ownsTarget=function(L){return L===this.visual||L===this.visual.childNodes[0]||L===this.visual.childNodes[1]},X.prototype.setCenter=function(L,N){this.visual.childNodes.forEach(function(z){return Be.setAttributes(z,[["cx",L.toString()],["cy",N.toString()]])})},X}(),cn=function(){function X(L,N,z,te){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=L,this.canvasHeight=N,this.margin=z,this.container=te,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(X.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(L){this._aspectRatio=L,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(L){this._isGridVisible=L,this.gridContainer&&Be.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(L){this._zoomFactor=L,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),X.prototype.open=function(){var L=this;this.cropShadeElement=Be.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Be.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var N=0;N<this.numberOfGridLines;N++)this.horizontalGridLines.push(Be.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Be.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(z){return L.gridContainer.appendChild(z)}),this.verticalGridLines.forEach(function(z){return L.gridContainer.appendChild(z)}),this.cropRectElement=Be.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Yt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Yt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Yt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Yt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},X.prototype.setCropRectangle=function(L){this.cropRect=L;var N=Object.assign({},this.cropRect);this.zoomFactor!==1&&(N.width=this.cropRect.width*this.zoomFactor,N.height=this.cropRect.height*this.zoomFactor,N.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-N.width/2,N.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-N.height/2),Be.setAttributes(this.cropRectElement,[["x",N.x.toString()],["y",N.y.toString()],["width",N.width.toString()],["height",N.height.toString()]]);var z=N.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(Q,Re){var ct=N.y+z*(Re+1);Be.setAttributes(Q,[["x1",""+N.x],["y1",""+ct],["x2",""+(N.x+N.width)],["y2",""+ct]])});var te=N.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(Q,Re){var ct=N.x+te*(Re+1);Be.setAttributes(Q,[["x1",""+ct],["y1",""+N.y],["x2",""+ct],["y2",""+(N.y+N.height)]])}),Be.setAttributes(this.cropShadeElement,[["d",Be.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,N.x,N.y,N.width,N.height)]]),this.topLeftGrip.setCenter(N.x,N.y),this.topRightGrip.setCenter(N.x+N.width,N.y),this.bottomLeftGrip.setCenter(N.x,N.y+N.height),this.bottomRightGrip.setCenter(N.x+N.width,N.y+N.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},X.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},X.prototype.clientToLocalCoordinates=function(L,N){var z=this.container.getBoundingClientRect();return{x:L-z.left+this.margin,y:N-z.top+this.margin}},X.prototype.onPointerDown=function(L){this.container.setPointerCapture(L.pointerId),this.previousPoint=this.clientToLocalCoordinates(L.clientX,L.clientY),this.cropRectElement===L.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(L.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(L.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(L.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(L.target)&&(this.activeGrip=this.bottomRightGrip)},X.prototype.onPointerMove=function(L){if(this.isMoving)this.move(this.clientToLocalCoordinates(L.clientX,L.clientY));else if(this.activeGrip){var N=this.clientToLocalCoordinates(L.clientX,L.clientY);this.resize(N)}L.preventDefault()},X.prototype.onPointerUp=function(L){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(L.pointerId)},X.prototype.move=function(L){var N=L.x-this.previousPoint.x,z=L.y-this.previousPoint.y;this.zoomFactor!==1&&(N=-N/this.zoomFactor,z=-z/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+N),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+z),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=L},X.prototype.resize=function(L){var N=Object.assign({},this.cropRect),z=L.x-this.previousPoint.x,te=L.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:N.x+z<this.margin&&(z=this.margin-N.x),N.x+=z,N.width=this.cropRect.x+this.cropRect.width-N.x;break;case this.bottomRightGrip:case this.topRightGrip:N.width+z>this.canvasWidth*this.zoomFactor&&(z=this.canvasWidth*this.zoomFactor-N.width),N.width+=z}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(N.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(z),N.height=this.aspectRatio.getVerticalLength(N.width)):(N.y+=te,N.height=this.cropRect.y+this.cropRect.height-N.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?N.height=this.aspectRatio.getVerticalLength(N.width):N.height+=te}N.width<10&&(N.x=this.cropRect.x,N.width=10),N.height<10&&(N.y=this.cropRect.y,N.height=10),this.previousPoint=L,N.x>=this.margin&&N.y>=this.margin&&N.x-this.margin+N.width<=this.canvasWidth&&N.y-this.margin+N.height<=this.canvasHeight&&(this.cropRect=N,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},X.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var L=this.cropRect.x+this.cropRect.width/2,N=this.cropRect.y+this.cropRect.height/2,z=this.aspectRatio.getHorizontalLength(this.cropRect.height),te=this.aspectRatio.getVerticalLength(this.cropRect.width);z/this.canvasWidth<te/this.canvasHeight?this.cropRect.width=z:this.cropRect.height=te,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=L-this.cropRect.width/2,this.cropRect.y=N-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},X.prototype.getRescaledRect=function(L,N,z,te,Q,Re){var ct=z/L,Ct=te/N;return{x:(Q.x-Re)*ct+Re,y:(Q.y-Re)*Ct+Re,width:Q.width*ct,height:Q.height*Ct}},X.prototype.scaleCanvas=function(L,N){var z=this.getRescaledRect(this.canvasWidth,this.canvasHeight,L,N,this.cropRect,this.margin);this.canvasWidth=L,this.canvasHeight=N,this.onCropChange&&this.onCropChange(z),this.setCropRectangle(z)},X}(),Sn=function(){function X(L){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=L,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(X.prototype,"angle",{get:function(){return this._angle},set:function(L){this._angle=L,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),X.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},X.prototype.onPointerDown=function(L){this.controlContainer.setPointerCapture(L.pointerId),this.isDragging=!0,this.previousPoint={x:L.clientX,y:L.clientY}},X.prototype.onPointerMove=function(L){this.isDragging&&(this.onAngleChange&&this.onAngleChange((L.clientX-this.previousPoint.x)/5),this.previousPoint.x=L.clientX)},X.prototype.onPointerUp=function(L){this.isDragging&&this.onAngleChange&&this.onAngleChange((L.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(L.pointerId)},X.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var L=this.angleLabelText.getBBox();Be.setAttributes(this.angleLabelElement,[["x",((this.width-L.width)/2).toString()],["y",(this.height/2).toString()]])}},X.prototype.positionScaleShape=function(){if(this.scaleShape){var L=this.scaleShape.transform.baseVal.getItem(0);L.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(L,0)}},X.prototype.getVisual=function(){var L=document.createElementNS("http://www.w3.org/2000/svg","svg");L.setAttribute("xmlns","http://www.w3.org/2000/svg"),L.setAttribute("width",this.width+"px"),L.setAttribute("height",this.height+"px"),L.setAttribute("viewBox","0 0 "+this.width+" "+this.height),L.style.flexShrink="0",document.body.appendChild(L);for(var N="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,z=1;z<=this.width/5+10;z++){var te=z%5==0?this.height/3:this.height/6;N+="h4v"+-te+"h1v"+te}N+="v1H0Z",this.scaleShape=Be.createPath(N);var Q=Be.createTransform();this.scaleShape.transform.baseVal.appendItem(Q),L.appendChild(this.scaleShape),this.angleLabelElement=Be.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Be.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Re=Be.createTSpan("");return Re.innerHTML="&deg;",this.angleLabelElement.appendChild(Re),L.appendChild(this.angleLabelElement),document.body.removeChild(L),L},X}(),kn=function(){function X(){this.naturalSize=!1,this.imageType="image/png"}return X.prototype.rasterize=function(L,N,z,te,Q,Re,ct){var Ct=this;return new Promise(function(Pt){var ht=document.createElement("canvas");ht.width=L.width.baseVal.value-2*te,ht.height=L.height.baseVal.value-2*te;var Vt=1,rn=1;Ct.naturalSize===!0?(Vt=N.naturalWidth/(L.width.baseVal.value-2*te)/Re,rn=N.naturalHeight/(L.height.baseVal.value-2*te)/ct,ht.width=N.naturalWidth/Re,ht.height=N.naturalHeight/ct):Ct.width!==void 0&&Ct.height!==void 0&&(Vt=Ct.width/z.width,rn=Ct.height/z.height,ht.width*=Vt,ht.height*=rn);var An=ht.getContext("2d");An.translate(ht.width/2,ht.height/2),An.rotate(Q*Math.PI/180),An.scale(Re,ct),An.translate(-ht.width/2,-ht.height/2),An.drawImage(N,0,0,ht.width,ht.height);var Cn=document.createElement("canvas");Cn.width=z.width*Vt,Cn.height=z.height*rn,Cn.getContext("2d").putImageData(An.getImageData((z.x-te)*Vt,(z.y-te)*rn,z.width*Vt,z.height*rn),0,0),Pt(Cn.toDataURL(Ct.imageType,Ct.imageQuality))})},X}(),gt=function(){function X(L){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=X.instanceCounter++,this.styles=new Ze(this.instanceNo),this.target=L,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(X.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(L){this._zoomToCropEnabled=L,L?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(L){this._isGridVisible=L,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"gridLines",{get:function(){return this._gridLines},set:function(L){this._gridLines=L,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(L){this._rotationAngle=L,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"aspectRatio",{get:function(){var L;return(L=this._aspectRatio)!==null&&L!==void 0?L:this.aspectRatios[0]},set:function(L){this._aspectRatio=L},enumerable:!1,configurable:!0}),X.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},X.prototype.show=function(){this.showUI(),this.open()},X.prototype.close=function(L){L===void 0&&(L=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),L||this.closeEventListeners.forEach(function(N){return N()}),this._isOpen=!1)},X.prototype.addRenderEventListener=function(L){this.renderEventListeners.push(L)},X.prototype.removeRenderEventListener=function(L){this.renderEventListeners.indexOf(L)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(L),1)},X.prototype.addCloseEventListener=function(L){this.closeEventListeners.push(L)},X.prototype.removeCloseEventListener=function(L){this.closeEventListeners.indexOf(L)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(L),1)},X.prototype.setupResizeObserver=function(){var L=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){L.resize(L.target.clientWidth,L.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},X.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var L=1*this.target.clientWidth/this.target.clientHeight,N=this.contentDiv.clientWidth/L>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*L:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,z=N+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/L;this.resize(N,z)}},X.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},X.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Be.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},X.prototype.resize=function(L,N){this.imageWidth=Math.round(L),this.imageHeight=Math.round(N),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},X.prototype.setEditingTarget=function(){var L=document.createElement("canvas");L.width=this.target.naturalWidth,L.height=this.target.naturalHeight,L.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var N=L.toDataURL();Be.setAttributes(this.editingTarget,[["href",N]]),this.setEditingTargetSize()},X.prototype.setTopLeft=function(){var L=this.target.getBoundingClientRect(),N=this.editorCanvas.getBoundingClientRect();this.left=L.left-N.left-this.CANVAS_MARGIN,this.top=L.top-N.top-this.CANVAS_MARGIN},X.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Be.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Be.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Be.createGroup(),this.editingTargetRotationScaleContainer=Be.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var L=Be.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(L);var N=Be.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(N),this.editingTargetContainer=Be.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},X.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},X.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Be.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new cn(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},X.prototype.zoomToCrop=function(){if(this.cropRect){var L=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,N=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=L+"px "+N+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-L+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-N+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},X.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},X.prototype.cropRectChanged=function(L){this.cropRect=L,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},X.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},X.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},X.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},X.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var L=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,N=this.target.offsetTop>L+this.CANVAS_MARGIN?this.target.offsetTop-(L+this.CANVAS_MARGIN):0;this.coverDiv.style.top=N+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},X.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},X.prototype.addTopToolbar=function(){var L=this;this.topToolbar=new Et,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var N=new Ut;N.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(N);var z=[];this.aspectRatios.forEach(function(rn){var An=new Zt(Qt.getIcon(rn.horizontal,rn.vertical),rn.horizontal===0&&rn.vertical===0?"FREE":rn.horizontal+":"+rn.vertical);An.onClick=function(){return L.ratioButtonClicked(rn)},z.push(An)}),this.aspectRatioButton=new en(Qt.getIcon(0,0),"Aspect ratio",z),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,N.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var te=new Zt('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");te.isActive=this.isGridVisible,te.onClick=function(){L.isGridVisible=!L.isGridVisible,te.isActive=L.isGridVisible},N.addButton(te);var Q=new Zt('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(Q.isActive=this.zoomToCropEnabled,Q.onClick=function(){L.zoomToCropEnabled=!L.zoomToCropEnabled,Q.isActive=L.zoomToCropEnabled},N.addButton(Q),!yt.isLicensed){var Re=new Rt;this.topToolbar.addElementBlock(Re);var ct=document.createElement("div");ct.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Ct=document.createElement("a");Ct.style.color="currentColor",Ct.href="https://markerjs.com/products/cropro",Ct.target="_blank",Ct.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',ct.appendChild(Ct),Re.addElement(ct)}var Pt=new Ut;Pt.minWidth=3*this.toolbarHeight+"px",Pt.contentAlign="end",this.topToolbar.addButtonBlock(Pt);var ht=new Zt('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");ht.onClick=this.startRenderAndClose,Pt.addButton(ht),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(ht.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Vt=new Zt('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");Vt.onClick=this.close,Pt.addButton(Vt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Vt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},X.prototype.addBottomToolbar=function(){var L=this;this.bottomToolbar=new Et,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var N=new Ut;N.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(N);var z=new Zt('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");z.onClick=this.rotateLeftButtonClicked,N.addButton(z);var te=new Zt('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");te.onClick=this.rotateRightButtonClicked,N.addButton(te);var Q=new Rt;Q.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(Q),this.straightener=new Sn("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Pt){L.rotateBy(Pt),L.straightener.angle=L.rotationAngle},Q.addElement(this.straightener.getUI());var Re=new Ut;Re.minWidth=2*this.toolbarHeight+"px",Re.contentAlign="end",this.bottomToolbar.addButtonBlock(Re);var ct=new Zt('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");ct.onClick=this.flipHorizontallyButtonClicked,Re.addButton(ct);var Ct=new Zt('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");Ct.onClick=this.flipVerticallyButtonClicked,Re.addButton(Ct)},X.prototype.ratioButtonClicked=function(L){this.aspectRatio=L,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},X.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Qt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},X.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new qt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},X.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},X.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},X.prototype.restoreState=function(L){if(L){var N=this.cropLayer.getRescaledRect(L.width,L.height,this.imageWidth,this.imageHeight,L.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(N),this.cropRectChanged(N),this.flippedHorizontally=L.flippedHorizontally,this.flippedVertically=L.flippedVertically,this.applyFlip(),this.rotationAngle=L.rotationAngle,this.applyRotation()}},X.prototype.clientToLocalCoordinates=function(L,N){var z=this.cropImage.getBoundingClientRect();return{x:L-z.left,y:N-z.top}},X.prototype.onWindowResize=function(){this.positionUI()},X.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var L=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=L+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},X.prototype.rotateLeftButtonClicked=function(){var L=this.rotationAngle-90;this.rotationAngle%90!=0&&(L+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(L)},X.prototype.rotateRightButtonClicked=function(){var L=this.rotationAngle+90;this.rotationAngle%90!=0&&(L-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(L)},X.prototype.rotateTo=function(L){L=(L=L>180?L-360:L)<=-180?L+360:L,this.rotationAngle=L,this.applyRotation()},X.prototype.rotateBy=function(L){this.rotateTo((this.rotationAngle+L)%360)},X.prototype.applyRotation=function(){var L=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var N=this.editingTargetRotationContainer.transform.baseVal.getItem(0);N.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(N,0);var z=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/z.width,this.imageHeight/z.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=L},X.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},X.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},X.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},X.prototype.startRenderAndClose=function(){return Je(this,void 0,void 0,function(){var L,N;return _t(this,function(z){switch(z.label){case 0:return[4,this.render()];case 1:return L=z.sent(),N=this.getState(),this.renderEventListeners.forEach(function(te){return te(L,N)}),this.close(!0),[2]}})})},X.prototype.render=function(){return Je(this,void 0,void 0,function(){var L;return _t(this,function(N){switch(N.label){case 0:return(L=new kn).naturalSize=this.renderAtNaturalSize,L.imageType=this.renderImageType,L.imageQuality=this.renderImageQuality,L.width=this.renderWidth,L.height=this.renderHeight,this.unzoomFromCrop(),Be.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,L.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return N.sent(),[4,L.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,N.sent()]}})})},X.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ut("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new ut("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ut("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var L=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ut("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*L)+`px;
height: `+(this.toolbarHeight-2*L)+`px;
padding: `+L+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ut("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ut("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new nt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new nt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new ut("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new ut("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new ut("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new ut("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*L)+`px;
padding: `+L+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new ut("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},X.instanceCounter=0,X}(),Wt=B("8hTe"),Jt=B.n(Wt),tn=/<pre[^>]*>/g;function nn(X){var L=document.createElement("div");return L.innerHTML=X,L.childNodes.length===0?"":L.childNodes[0].nodeValue}var pn=se.a=function(X){var L=X.value,N=L===void 0?"":L,z=X.edit,te=z===void 0?!1:z,Q=X.className,Re=X.showTextOnly,ct=X.showLines,Ct=X.replaces,Pt=X.zoomImg,ht=X.hasMask,Vt=X.style,rn=Vt===void 0?{}:Vt,An=X.stylesPrev,Cn=An===void 0?{}:An,En=String(N),Fn=Object(w.useRef)(),mr=Object(w.useRef)(),kr=Object(w.useState)(""),Kn=Object(K.a)(kr,2),or=Kn[0],Cr=Kn[1],Er=Object(w.useState)("office"),nr=Object(K.a)(Er,2),Kr=nr[0],Pr=nr[1],Gr=function(){var jt=new gt(mr.current);jt.displayMode="popup",jt.addRenderEventListener(function(){var Gn=Object(M.a)(n.a.mark(function mn(Te){var dn;return n.a.wrap(function(Qn){for(;;)switch(Qn.prev=Qn.next){case 0:return Fn.current.style.display="none",Qn.next=3,Object(Pe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Te}});case 3:dn=Qn.sent,dn!=null&&dn.id&&Ct(mr.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(dn==null?void 0:dn.id,"?type=").concat(dn.content_type));case 5:case"end":return Qn.stop()}},mn)}));return function(mn){return Gn.apply(this,arguments)}}()),jt.show()},zr=function(){var jt=new ce(mr.current);jt.settings.displayMode="popup",jt.addEventListener("render",function(){var Gn=Object(M.a)(n.a.mark(function mn(Te){var dn;return n.a.wrap(function(Qn){for(;;)switch(Qn.prev=Qn.next){case 0:if(Fn.current.style.display="none",!mr.current){Qn.next=6;break}return Qn.next=4,Object(Pe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Te.dataUrl}});case 4:dn=Qn.sent,dn!=null&&dn.id&&Ct(mr.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(dn==null?void 0:dn.id,"?type=").concat(dn.content_type));case 6:case"end":return Qn.stop()}},mn)}));return function(mn){return Gn.apply(this,arguments)}}()),jt.show(),window.markerArea=jt},Nr=Object(w.useMemo)(function(){Fn.current&&(Fn.current.style.zIndex=-1);try{var Ln=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,jt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Gn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;En=En.replace(Ln,"("+$.a.API_SERVER+"/api/attachments/").replace(jt,'"'+$.a.API_SERVER+"/api/attachments/").replace(Gn,'"'+$.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(Br){}var mn=A(En),Te=C();if(En.match(/\[TOC\]/)&&(mn=mn.replace("<p>[TOC]</p>",D()),R()),mn=mn.replace(/(__special_katext_id_\d+__)/g,function(Br,Qn){var gn=Te[Qn],Zr=gn.type,Or=gn.expression;return Object(le.renderToString)(nn(Or)||"",{displayMode:Zr==="block",throwOnError:!1,output:"html"})}),mn=mn.replace(/▁/g,"\u2581\u2581\u2581"),x(),Re){var dn=document.createElement("div");return dn.innerHTML=mn,dn.innerText}return setTimeout(function(){return Jr()},500),mn},[En]),$n=Object(w.useRef)();O.WebkitLineClamp=ct,ct&&(rn=Object(W.a)(Object(W.a)({},rn),O));function Ur(Ln){var jt=Ln.target;if(jt.tagName.toUpperCase()==="IMG"){if(Pt){var Gn=jt.getAttribute("src");Cr(Gn),Pr("image")}}else if(jt.tagName.toUpperCase()==="A"){var mn=jt.getAttribute("href");if(mn.indexOf("office")>-1)Ln.preventDefault(),Cr(mn),Pr("office");else if(mn.indexOf("application/pdf")>-1)Ln.preventDefault(),Cr(mn),Pr("pdf");else if(mn.indexOf("text/html")>-1)Ln.preventDefault(),Cr(mn),Pr("html");else if(mn.startsWith("#")){Ln.preventDefault();var Te=document.getElementById(mn.replace("#",""));Te&&Te.scrollIntoView(!0)}}}var Jr=function(){var jt,Gn=(jt=$n.current)===null||jt===void 0?void 0:jt.querySelectorAll("video");Gn==null||Gn.forEach(function(mn){if(mn.oncontextmenu=function(){return!1},mn.src.indexOf(".m3u8")>-1&&!mn.canPlayType("application/vnd.apple.mpegurl")){if(Y.a.isSupported()){var Te=new Y.a;Te.loadSource(mn.src),Te.attachMedia(mn)}}})};Object(w.useEffect)(function(){if($n.current&&Nr&&(Nr.match(tn)&&window.PR.prettyPrint()),$n.current)return $n.current.addEventListener("click",Ur),function(){$n.current.removeEventListener("click",Ur),x(),R()}},[Nr,$n.current,Ur]);var cr=function(jt){if(!te)return;jt.target.nodeName==="IMG"?(Fn.current.style.zIndex=1,Fn.current.style.display="flex",Fn.current.style.width=jt.target.clientWidth+"px",Fn.current.style.height=jt.target.clientHeight+"px",Fn.current.style.top=jt.target.offsetTop+"px",Fn.current.style.left=jt.target.offsetLeft+"px",mr.current.src=jt.target.getAttribute("src")):Fn.current.style.display="none"};return m.a.createElement("div",{style:{position:"relative"}},m.a.createElement("div",{ref:$n,style:Object(W.a)({},rn),className:"".concat(Q||""," markdown-body ").concat(Jt.a.mdBody),onMouseOver:cr,dangerouslySetInnerHTML:{__html:Nr}}),m.a.createElement("div",{ref:Fn,className:Jt.a.button},m.a.createElement(G.a,null,m.a.createElement(V.a,{onClick:function(){return Gr()}},"\u88C1\u526A"),m.a.createElement(V.a,{onClick:function(){return zr()}},"\u7F16\u8F91"))),m.a.createElement("img",{ref:mr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),m.a.createElement(de.a,{close:!0,data:or,type:or!=null&&or.length?Kr:"",style:Object(W.a)({},Cn),onClose:function(){return Cr("")}}))}},"9VGf":function(We,se,B){"use strict";B.d(se,"a",function(){return U});var Z=B("q1tI"),G=B.n(Z);function U(V,W){var M=Object(Z.useRef)();Object(Z.useEffect)(function(){M.current=V}),Object(Z.useEffect)(function(){function K(){M.current()}if(W!==null){var j=setInterval(K,W);return function(){return clearInterval(j)}}},[W])}},"A/g1":function(We,se){We.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjEtMDctMDJUMTk6Mzg6MjMrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmVkYzRhODM0LTVjNWQtNDQ1My04MDYzLWNkNzcwODQyODg5ZSIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjQ4MTE0OTVlLTVkMDctZTk0YS1iNWEwLWYxOWJmZmM0NGUyNyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmMwNjQyYzA1LTg5MzQtNDdlYy04MTFiLTlkYjdhZGNkYjFiMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YzA2NDJjMDUtODkzNC00N2VjLTgxMWItOWRiN2FkY2RiMWIwIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjM4OjIzKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZWRjNGE4MzQtNWM1ZC00NDUzLTgwNjMtY2Q3NzA4NDI4ODllIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5fJkpyAAAGoElEQVRogc2abWxbVxnH/8+59/rdTpx2GW3UNWJJV7Ylaxp3LUFsWgJDiI5R8bK2GppAmsgQLKQthS8IEJ9okibrREf3gX2Y1K2bxAoDtog60RBSVxKnWUO7kpSppXJZK2ja2HFi33vPw4cmpbN9r++1k8Lv2znnf577f+zje95Mhw4dQqUkwljpF7kuv0EdHkm1HklRr6TQq2tn5xcklwhIMnMSQJIJxykTiSce+1am0mer5XacqM7uDJjiqbAuWlvSygrBnmKyxcoI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"},BU3w:function(We,se,B){"use strict";B.d(se,"a",function(){return M});var Z=B("MNnm"),G="rc-util-key";function U(K){if(K.attachTo)return K.attachTo;var j=document.querySelector("head");return j||document.body}function V(K){var j,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Z.a)())return null;var w=document.createElement("style");if((j=n.csp)===null||j===void 0?void 0:j.nonce){var m;w.nonce=(m=n.csp)===null||m===void 0?void 0:m.nonce}w.innerHTML=K;var f=U(n),p=f.firstChild;return n.prepend&&f.prepend?f.prepend(w):n.prepend&&p?f.insertBefore(w,p):f.appendChild(w),w}var W=new Map;function M(K,j){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},w=U(n);if(!W.has(w)){var m=V("",n),f=m.parentNode;W.set(w,f),f.removeChild(m)}var p=Array.from(W.get(w).children).find(function(o){return o.tagName==="STYLE"&&o[G]===j});if(p){var c,r;if(((c=n.csp)===null||c===void 0?void 0:c.nonce)&&p.nonce!==((r=n.csp)===null||r===void 0?void 0:r.nonce)){var d;p.nonce=(d=n.csp)===null||d===void 0?void 0:d.nonce}return p.innerHTML!==K&&(p.innerHTML=K),p}var u=V(K,n);return u[G]=j,u}},Bd2K:function(We,se,B){(function(Z){Z(B("VrN/"),B("osHv"))})(function(Z){Z.defineOption("autoCloseTags",!1,function(n,w,m){if(m!=Z.Init&&m&&n.removeKeyMap("autoCloseTags"),!w)return;var f={name:"autoCloseTags"};(typeof w!="object"||w.whenClosing!==!1)&&(f["'/'"]=function(p){return M(p)}),(typeof w!="object"||w.whenOpening!==!1)&&(f["'>'"]=function(p){return V(p)}),n.addKeyMap(f)});var G=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],U=["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 V(n){if(n.getOption("disableInput"))return Z.Pass;for(var w=n.listSelections(),m=[],f=n.getOption("autoCloseTags"),p=0;p<w.length;p++){if(!w[p].empty())return Z.Pass;var c=w[p].head,r=n.getTokenAt(c),d=Z.innerMode(n.getMode(),r.state),u=d.state,o=d.mode.xmlCurrentTag&&d.mode.xmlCurrentTag(u),s=o&&o.name;if(!s)return Z.Pass;var a=d.mode.configuration=="html",R=typeof f=="object"&&f.dontCloseTags||a&&G,O=typeof f=="object"&&f.indentTags||a&&U;r.end>c.ch&&(s=s.slice(0,s.length-r.end+c.ch));var S=s.toLowerCase();if(!s||r.type=="string"&&(r.end!=c.ch||!/[\"\']/.test(r.string.charAt(r.string.length-1))||r.string.length==1)||r.type=="tag"&&o.close||r.string.indexOf("/")==c.ch-r.start-1||R&&K(R,S)>-1||j(n,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(u)||[],s,c,!0))return Z.Pass;var D=typeof f=="object"&&f.emptyTags;if(D&&K(D,s)>-1){m[p]={text:"/>",newPos:Z.Pos(c.line,c.ch+2)};continue}var I=O&&K(O,S)>-1;m[p]={indent:I,text:">"+(I?`
`:"")+"</"+s+">",newPos:I?Z.Pos(c.line+1,0):Z.Pos(c.line,c.ch+1)}}for(var _=typeof f=="object"&&f.dontIndentOnAutoClose,p=w.length-1;p>=0;p--){var b=m[p];n.replaceRange(b.text,w[p].head,w[p].anchor,"+insert");var v=n.listSelections().slice(0);v[p]={head:b.newPos,anchor:b.newPos},n.setSelections(v),!_&&b.indent&&(n.indentLine(b.newPos.line,null,!0),n.indentLine(b.newPos.line+1,null,!0))}}function W(n,w){for(var m=n.listSelections(),f=[],p=w?"/":"</",c=n.getOption("autoCloseTags"),r=typeof c=="object"&&c.dontIndentOnSlash,d=0;d<m.length;d++){if(!m[d].empty())return Z.Pass;var u=m[d].head,o=n.getTokenAt(u),s=Z.innerMode(n.getMode(),o.state),a=s.state;if(w&&(o.type=="string"||o.string.charAt(0)!="<"||o.start!=u.ch-1))return Z.Pass;var R,O=s.mode.name!="xml"&&n.getMode().name=="htmlmixed";if(O&&s.mode.name=="javascript")R=p+"script";else if(O&&s.mode.name=="css")R=p+"style";else{var S=s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(a);if(!S||S.length&&j(n,S,S[S.length-1],u))return Z.Pass;R=p+S[S.length-1]}n.getLine(u.line).charAt(o.end)!=">"&&(R+=">"),f[d]=R}if(n.replaceSelections(f),m=n.listSelections(),!r)for(var d=0;d<m.length;d++)(d==m.length-1||m[d].head.line<m[d+1].head.line)&&n.indentLine(m[d].head.line)}function M(n){return n.getOption("disableInput")?Z.Pass:W(n,!0)}Z.commands.closeTag=function(n){return W(n)};function K(n,w){if(n.indexOf)return n.indexOf(w);for(var m=0,f=n.length;m<f;++m)if(n[m]==w)return m;return-1}function j(n,w,m,f,p){if(!Z.scanForClosingTag)return!1;var c=Math.min(n.lastLine()+1,f.line+500),r=Z.scanForClosingTag(n,f,null,c);if(!r||r.tag!=m)return!1;for(var d=p?1:0,u=w.length-1;u>=0&&w[u]==m;u--)++d;f=r.to;for(var u=1;u<d;u++){var o=Z.scanForClosingTag(n,f,null,c);if(!o||o.tag!=m)return!1;f=o.to}return!0}})},BjJ7:function(We,se,B){"use strict";B.d(se,"d",function(){return G}),B.d(se,"c",function(){return U}),B.d(se,"e",function(){return V}),B.d(se,"b",function(){return W}),B.d(se,"a",function(){return K});var Z=B("m3rI");function G(j){var n=!0;if(j.length>0){for(var w=0;w<j.length;w++)if(j[w].compile_success==0||!j[w].compile_success){n=!1;break}}else n=!1;return n}function U(j){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",w=[],m=0;m<j.length;m++){var f=j[m],p=n?"".concat(n,"/").concat(f.name):"".concat(f.name);w.push({title:f.name,isLeaf:!(f.type==="tree"),key:p})}return w}function V(j,n,w){for(var m=0;m<j.length;m++){var f=j[m];if(f.key===n){f.children=w;break}f.children&&V(f.children,n,w)}return j}function W(j,n,w){var m;return function(){var f=this,p=arguments,c=function(){m=null,w||j.apply(f,p)},r=w&&!m;clearTimeout(m),m=setTimeout(c,n),r&&j.apply(f,p)}}var M=!0,K=Z.a.API_SERVER},BlwA:function(We,se,B){"use strict";var Z=B("9og8"),G=B("miYZ"),U=B("tsqr"),V=B("tJVT"),W=B("WmNS"),M=B.n(W),K=B("q1tI"),j=B.n(K),n=B("Ty5D"),w=B("ErOA"),m=B("m3rI"),f=B("DR4n"),p=B.n(f),c=function(u,o){for(var s=u.split(","),a=s[0].match(/:(.*?);/)[1],R=atob(s[1]),O=R.length,S=new Uint8Array(O);O--;)S[O]=R.charCodeAt(O);return new Blob([S],{type:a})},r=Object(K.forwardRef)(function(d,u){var o=d.time,s=d.number,a=d.supportCamera,R=d.take_photo,O=d.update,S=d.id,D=Object(K.useRef)(),I=Object(K.useRef)(),_=Object(n.i)(),b=Object(K.useState)([]),v=Object(V.a)(b,2),h=v[0],C=v[1],x=Object(K.useState)(0),g=Object(V.a)(x,2),P=g[0],k=g[1],y=Object(K.useState)(""),A=Object(V.a)(y,2),F=A[0],T=A[1],Y=Object(K.useState)(),$=Object(V.a)(Y,2),le=$[0],de=$[1],Pe=Object(K.useState)(0),Se=Object(V.a)(Pe,2),we=Se[0],Fe=Se[1];Object(K.useEffect)(function(){return pe(),function(){Ee(),Me()}},[]),Object(K.useEffect)(function(){P===2&&o&&s>0&&(me(),Fe(1))},[o]),Object(K.useEffect)(function(){if(we===0)return;if(we===2)clearInterval(le);else{var ke=0,je=setInterval(function(){h.includes(ke)&&ne(),ke++},1e3);de(je)}return function(){return clearInterval(le)}},[we]),Object(K.useImperativeHandle)(u,function(){return{handlePhoto:ne}});var Me=function(){Fe(2)},me=function(){var je=o/s,Oe=[];function Ve(qe,ue){return parseInt(Math.floor(Math.random()*(ue-qe+1))+qe)}new Array(s).fill(0).map(function(qe,ue){R?Oe.push(Ve(je*ue,je*(ue+1))):ue==0?Oe.push(0):Oe.push(Ve(je*ue,je*(ue+1)))}),h=Oe,C([].concat(Oe)),console.log(Oe)},pe=function(){navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(je){var Oe=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return Oe?new Promise(function(Ve,qe){Oe.call(navigator,je,Ve,qe)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),navigator.mediaDevices.getUserMedia({video:{width:640,height:480}}).then(function(je){a&&a(2),k(2),"srcObject"in D.current?D.current.srcObject=je:D.current.src=window.URL.createObjectURL(je),D.current.onloadedmetadata=function(Oe){D.current.play()},D.current.addEventListener("ended",function(){console.log("\u64AD\u653E\u7ED3\u675F"),Me(),U.b.error({content:"\u60A8\u5DF2\u7ECF\u5173\u95ED\u4E86\u6444\u50CF\u5934\uFF0C\u8BF7\u572810\u79D2\u949F\u5185\u6062\u590D\u6444\u50CF\u5934\uFF0C\u5426\u5219\u5C06\u63A8\u51FA\u8003\u8BD5",duration:10,key:9998})},!1)}).catch(function(je){k(1),a&&a(1),je.message==="Permission denied"||je.name==="NotAllowedError"?U.b.error("\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"):U.b.error("\u6444\u50CF\u5934\u83B7\u53D6\u5931\u8D25\uFF0C\u6216\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"),console.log("errname: "+je.name),console.log("err: "+je.message)})},ne=function(){try{I.current.width=D.current.videoWidth,I.current.height=D.current.videoHeight;var je=I.current.getContext("2d");je.drawImage(D.current,0,0,I.current.width,I.current.height),T(I.current.toDataURL("image/png")),ae(I.current.toDataURL("image/png"))}catch(Oe){}},Ee=function(){try{var je=D.current.srcObject,Oe=je.getTracks();Oe.forEach(function(Ve){Ve.stop()}),D.current.srcObject=null}catch(Ve){}},ae=function(){var ke=Object(Z.a)(M.a.mark(function je(Oe){var Ve,qe;return M.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:Ve=new FormData,Ve.append("file",c(Oe,"1")),Ve.append("1","123"),qe=new window.XMLHttpRequest,qe.withCredentials=!0,qe.addEventListener("load",function(De){var Ne=JSON.parse(De.target.responseText);Object(w.a)("/api/exercises/".concat(S,"/upload_photo.json"),{method:"post",body:{attachment_id:Ne.id}})},!1),qe.addEventListener("error",function(De){console.error(De)},!1),qe.open("POST","".concat(m.a.API_SERVER,"/api/attachments.json")),qe.send(Ve);case 9:case"end":return ve.stop()}},je)}));return function(Oe){return ke.apply(this,arguments)}}();return j.a.createElement(j.a.Fragment,null,P!==3&&j.a.createElement("aside",{className:p.a.video,id:"screenshot"},P===0&&j.a.createElement("span",null,"\u6B63\u5728\u5F00\u542F\u6444\u50CF\u5934..."),P===1&&j.a.createElement("span",null,"\u6444\u50CF\u5934\u5F00\u542F\u5931\u8D25"),P===2&&j.a.createElement("div",null,j.a.createElement("video",{width:"288",ref:D,autoPlay:!0}),j.a.createElement("canvas",{style:{display:"none"},ref:I}))))});se.a=r},"C+DQ":function(We,se,B){},"C/vA":function(We,se,B){"use strict";B.d(se,"a",function(){return Z});function Z(G){const U=this;let V=!1,W;return function(){return V||(V=!0,W=G.apply(U,arguments)),W}}},"Cg/j":function(We,se,B){"use strict";B.d(se,"b",function(){return Z}),B.d(se,"a",function(){return G}),B.d(se,"c",function(){return V}),B.d(se,"d",function(){return W});var Z;(function(M){M.serviceIds=new Map,M.DI_TARGET="$di$target",M.DI_DEPENDENCIES="$di$dependencies";function K(j){return j[M.DI_DEPENDENCIES]||[]}M.getServiceDependencies=K})(Z||(Z={}));const G=V("instantiationService");function U(M,K,j,n){K[Z.DI_TARGET]===K?K[Z.DI_DEPENDENCIES].push({id:M,index:j,optional:n}):(K[Z.DI_DEPENDENCIES]=[{id:M,index:j,optional:n}],K[Z.DI_TARGET]=K)}function V(M){if(Z.serviceIds.has(M))return Z.serviceIds.get(M);const K=function(j,n,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");U(K,j,w,!1)};return K.toString=()=>M,Z.serviceIds.set(M,K),K}function W(M){return function(K,j,n){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");U(M,K,n,!0)}}},D1Df:function(We,se,B){"use strict";function Z(g){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z=function(k){return typeof k}:Z=function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},Z(g)}function G(){return G=Object.assign||function(g){for(var P=1;P<arguments.length;P++){var k=arguments[P];for(var y in k)Object.prototype.hasOwnProperty.call(k,y)&&(g[y]=k[y])}return g},G.apply(this,arguments)}function U(g,P){var k=Object.keys(g);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(g);P&&(y=y.filter(function(A){return Object.getOwnPropertyDescriptor(g,A).enumerable})),k.push.apply(k,y)}return k}function V(g){for(var P=1;P<arguments.length;P++){var k=arguments[P]!=null?arguments[P]:{};P%2?U(k,!0).forEach(function(y){r(g,y,k[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(k)):U(k).forEach(function(y){Object.defineProperty(g,y,Object.getOwnPropertyDescriptor(k,y))})}return g}function W(g,P){if(g==null)return{};var k=M(g,P),y,A;if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(g);for(A=0;A<F.length;A++){if(y=F[A],P.indexOf(y)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(g,y))continue;k[y]=g[y]}}return k}function M(g,P){if(g==null)return{};var k={},y=Object.keys(g),A,F;for(F=0;F<y.length;F++){if(A=y[F],P.indexOf(A)>=0)continue;k[A]=g[A]}return k}function K(g,P){if(!(g instanceof P))throw new TypeError("Cannot call a class as a function")}function j(g,P){for(var k=0;k<P.length;k++){var y=P[k];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}function n(g,P,k){return P&&j(g.prototype,P),k&&j(g,k),g}function w(g,P){return P&&(Z(P)==="object"||typeof P=="function")?P:f(g)}function m(g){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(k){return k.__proto__||Object.getPrototypeOf(k)},m(g)}function f(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}function p(g,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(P&&P.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),P&&c(g,P)}function c(g,P){return c=Object.setPrototypeOf||function(y,A){return y.__proto__=A,y},c(g,P)}function r(g,P,k){return P in g?Object.defineProperty(g,P,{value:k,enumerable:!0,configurable:!0,writable:!0}):g[P]=k,g}var d=B("q1tI"),u=B("17x9"),o=B("H38U"),s=B("aRTE");function a(g){for(var P="",k=0;k<g.length;k++){var y=g.charCodeAt(k);y<128?P+=String.fromCharCode(y):y<2048?(P+=String.fromCharCode(192|y>>6),P+=String.fromCharCode(128|y&63)):y<55296||y>=57344?(P+=String.fromCharCode(224|y>>12),P+=String.fromCharCode(128|y>>6&63),P+=String.fromCharCode(128|y&63)):(k++,y=65536+((y&1023)<<10|g.charCodeAt(k)&1023),P+=String.fromCharCode(240|y>>18),P+=String.fromCharCode(128|y>>12&63),P+=String.fromCharCode(128|y>>6&63),P+=String.fromCharCode(128|y&63))}return P}var R={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},O={},S=4,D=.1;function I(g){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,k=[];return g.forEach(function(y,A){var F=null;y.forEach(function(T,Y){if(!T&&F!==null){k.push("M".concat(F+P," ").concat(A+P,"h").concat(Y-F,"v1H").concat(F+P,"z")),F=null;return}if(Y===y.length-1){if(!T)return;F===null?k.push("M".concat(Y+P,",").concat(A+P," h1v1H").concat(Y+P,"z")):k.push("M".concat(F+P,",").concat(A+P," h").concat(Y+1-F,"v1H").concat(F+P,"z"));return}T&&F===null&&(F=Y)})}),k.join("")}function _(g,P){return g.slice().map(function(k,y){return y<P.y||y>=P.y+P.h?k:k.map(function(A,F){return F<P.x||F>=P.x+P.w?A:!1})})}function b(g,P){var k=g.imageSettings,y=g.size,A=g.includeMargin;if(k==null)return null;var F=A?S:0,T=P.length+F*2,Y=Math.floor(y*D),$=T/y,le=(k.width||Y)*$,de=(k.height||Y)*$,Pe=k.x==null?P.length/2-le/2:k.x*$,Se=k.y==null?P.length/2-de/2:k.y*$,we=null;if(k.excavate){var Fe=Math.floor(Pe),Me=Math.floor(Se),me=Math.ceil(le+Pe-Fe),pe=Math.ceil(de+Se-Me);we={x:Fe,y:Me,w:me,h:pe}}return{x:Pe,y:Se,h:de,w:le,excavation:we}}var v=function(){try{new Path2D().addPath(new Path2D)}catch(g){return!1}return!0}(),h=function(g){p(P,g);function P(){var k,y;K(this,P);for(var A=arguments.length,F=new Array(A),T=0;T<A;T++)F[T]=arguments[T];return y=w(this,(k=m(P)).call.apply(k,[this].concat(F))),r(f(y),"_canvas",void 0),r(f(y),"_image",void 0),r(f(y),"state",{imgLoaded:!1}),r(f(y),"handleImageLoad",function(){y.setState({imgLoaded:!0})}),y}return n(P,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var y=this.props,A=y.value,F=y.size,T=y.level,Y=y.bgColor,$=y.fgColor,le=y.includeMargin,de=y.imageSettings,Pe=new o(-1,s[T]);if(Pe.addData(a(A)),Pe.make(),this._canvas!=null){var Se=this._canvas,we=Se.getContext("2d");if(!we)return;var Fe=Pe.modules;if(Fe===null)return;var Me=le?S:0,me=Fe.length+Me*2,pe=b(this.props,Fe);de!=null&&pe!=null&&(pe.excavation!=null&&(Fe=_(Fe,pe.excavation)));var ne=window.devicePixelRatio||1;Se.height=Se.width=F*ne;var Ee=F/me*ne;we.scale(Ee,Ee),we.fillStyle=Y,we.fillRect(0,0,me,me),we.fillStyle=$,v?we.fill(new Path2D(I(Fe,Me))):Fe.forEach(function(ae,ke){ae.forEach(function(je,Oe){je&&we.fillRect(Oe+Me,ke+Me,1,1)})}),this.state.imgLoaded&&this._image&&pe!=null&&we.drawImage(this._image,pe.x+Me,pe.y+Me,pe.w,pe.h)}}},{key:"render",value:function(){var y=this,A=this.props,F=A.value,T=A.size,Y=A.level,$=A.bgColor,le=A.fgColor,de=A.style,Pe=A.includeMargin,Se=A.imageSettings,we=W(A,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),Fe=V({height:T,width:T},de),Me=null,me=Se&&Se.src;return Se!=null&&me!=null&&(Me=d.createElement("img",{src:me,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(ne){return y._image=ne}})),d.createElement(d.Fragment,null,d.createElement("canvas",G({style:Fe,height:T,width:T,ref:function(ne){return y._canvas=ne}},we)),Me)}}]),P}(d.PureComponent);r(h,"defaultProps",R);var C=function(g){p(P,g);function P(){return K(this,P),w(this,m(P).apply(this,arguments))}return n(P,[{key:"render",value:function(){var y=this.props,A=y.value,F=y.size,T=y.level,Y=y.bgColor,$=y.fgColor,le=y.includeMargin,de=y.imageSettings,Pe=W(y,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),Se=new o(-1,s[T]);Se.addData(a(A)),Se.make();var we=Se.modules;if(we===null)return null;var Fe=le?S:0,Me=we.length+Fe*2,me=b(this.props,we),pe=null;de!=null&&me!=null&&(me.excavation!=null&&(we=_(we,me.excavation)),pe=d.createElement("image",{xlinkHref:de.src,height:me.h,width:me.w,x:me.x+Fe,y:me.y+Fe,preserveAspectRatio:"none"}));var ne=I(we,Fe);return d.createElement("svg",G({shapeRendering:"crispEdges",height:F,width:F,viewBox:"0 0 ".concat(Me," ").concat(Me)},Pe),d.createElement("path",{fill:Y,d:"M0,0 h".concat(Me,"v").concat(Me,"H0z")}),d.createElement("path",{fill:$,d:ne}),pe)}}]),P}(d.PureComponent);r(C,"defaultProps",R);var x=function(P){var k=P.renderAs,y=W(P,["renderAs"]),A=k==="svg"?C:h;return d.createElement(A,y)};x.defaultProps=V({renderAs:"canvas"},R),We.exports=x},DR4n:function(We,se,B){We.exports={flex_box_center:"flex_box_center___2zmmW",flex_space_between:"flex_space_between___3nCIw",flex_box_vertical_center:"flex_box_vertical_center___1PFij",flex_box_center_end:"flex_box_center_end___2FA05",flex_box_column:"flex_box_column___2k0kx",video:"video___1mYnG"}},DlQD:function(We,se,B){(function(Z,G){We.exports=G()})(this,function(){"use strict";function Z(Ce,ge){for(var be=0;be<ge.length;be++){var ie=ge[be];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(Ce,ie.key,ie)}}function G(Ce,ge,be){return ge&&Z(Ce.prototype,ge),be&&Z(Ce,be),Ce}function U(Ce,ge){if(!Ce)return;if(typeof Ce=="string")return V(Ce,ge);var be=Object.prototype.toString.call(Ce).slice(8,-1);if(be==="Object"&&Ce.constructor&&(be=Ce.constructor.name),be==="Map"||be==="Set")return Array.from(Ce);if(be==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(be))return V(Ce,ge)}function V(Ce,ge){(ge==null||ge>Ce.length)&&(ge=Ce.length);for(var be=0,ie=new Array(ge);be<ge;be++)ie[be]=Ce[be];return ie}function W(Ce,ge){var be;if(typeof Symbol=="undefined"||Ce[Symbol.iterator]==null){if(Array.isArray(Ce)||(be=U(Ce))||ge&&Ce&&typeof Ce.length=="number"){be&&(Ce=be);var ie=0;return function(){return ie>=Ce.length?{done:!0}:{done:!1,value:Ce[ie++]}}}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 be=Ce[Symbol.iterator](),be.next.bind(be)}function M(Ce,ge){return ge={exports:{}},Ce(ge,ge.exports),ge.exports}var K=M(function(Ce){function ge(){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 be(ie){Ce.exports.defaults=ie}Ce.exports={defaults:ge(),getDefaults:ge,changeDefaults:be}}),j=K.defaults,n=K.getDefaults,w=K.changeDefaults,m=/[&<>"']/,f=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},d=function(ge){return r[ge]};function u(Ce,ge){if(ge){if(m.test(Ce))return Ce.replace(f,d)}else if(p.test(Ce))return Ce.replace(c,d);return Ce}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(Ce){return Ce.replace(o,function(ge,be){return be=be.toLowerCase(),be==="colon"?":":be.charAt(0)==="#"?be.charAt(1)==="x"?String.fromCharCode(parseInt(be.substring(2),16)):String.fromCharCode(+be.substring(1)):""})}var a=/(^|[^\[])\^/g;function R(Ce,ge){Ce=Ce.source||Ce,ge=ge||"";var be={replace:function(oe,fe){return fe=fe.source||fe,fe=fe.replace(a,"$1"),Ce=Ce.replace(oe,fe),be},getRegex:function(){return new RegExp(Ce,ge)}};return be}var O=/[^\w:]/g,S=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(Ce,ge,be){if(Ce){var ie;try{ie=decodeURIComponent(s(be)).replace(O,"").toLowerCase()}catch(oe){return null}if(ie.indexOf("javascript:")===0||ie.indexOf("vbscript:")===0||ie.indexOf("data:")===0)return null}ge&&!S.test(be)&&(be=h(ge,be));try{be=encodeURI(be).replace(/%25/g,"%")}catch(oe){return null}return be}var I={},_=/^[^:]+:\/*[^/]*$/,b=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function h(Ce,ge){I[" "+Ce]||(_.test(Ce)?I[" "+Ce]=Ce+"/":I[" "+Ce]=P(Ce,"/",!0)),Ce=I[" "+Ce];var be=Ce.indexOf(":")===-1;return ge.substring(0,2)==="//"?be?ge:Ce.replace(b,"$1")+ge:ge.charAt(0)==="/"?be?ge:Ce.replace(v,"$1")+ge:Ce+ge}var C={exec:function(){}};function x(Ce){for(var ge=1,be,ie;ge<arguments.length;ge++){be=arguments[ge];for(ie in be)Object.prototype.hasOwnProperty.call(be,ie)&&(Ce[ie]=be[ie])}return Ce}function g(Ce,ge){var be=Ce.replace(/\|/g,function(fe,ye,Ae){for(var Ge=!1,ot=ye;--ot>=0&&Ae[ot]==="\\";)Ge=!Ge;return Ge?"|":" |"}),ie=be.split(/ \|/),oe=0;if(ie.length>ge)ie.splice(ge);else for(;ie.length<ge;)ie.push("");for(;oe<ie.length;oe++)ie[oe]=ie[oe].trim().replace(/\\\|/g,"|");return ie}function P(Ce,ge,be){var ie=Ce.length;if(ie===0)return"";for(var oe=0;oe<ie;){var fe=Ce.charAt(ie-oe-1);if(fe===ge&&!be)oe++;else if(fe!==ge&&be)oe++;else break}return Ce.substr(0,ie-oe)}function k(Ce,ge){if(Ce.indexOf(ge[1])===-1)return-1;for(var be=Ce.length,ie=0,oe=0;oe<be;oe++)if(Ce[oe]==="\\")oe++;else if(Ce[oe]===ge[0])ie++;else if(Ce[oe]===ge[1]&&(ie--,ie<0))return oe;return-1}function y(Ce){Ce&&Ce.sanitize&&!Ce.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 A={escape:u,unescape:s,edit:R,cleanUrl:D,resolveUrl:h,noopTest:C,merge:x,splitCells:g,rtrim:P,findClosingBracket:k,checkSanitizeDeprecation:y},F=K.defaults,T=A.rtrim,Y=A.splitCells,$=A.escape,le=A.findClosingBracket;function de(Ce,ge,be){var ie=ge.href,oe=ge.title?$(ge.title):null,fe=Ce[1].replace(/\\([\[\]])/g,"$1");return Ce[0].charAt(0)!=="!"?{type:"link",raw:be,href:ie,title:oe,text:fe}:{type:"image",raw:be,href:ie,title:oe,text:$(fe)}}function Pe(Ce,ge){var be=Ce.match(/^(\s+)(?:```)/);if(be===null)return ge;var ie=be[1];return ge.split(`
`).map(function(oe){var fe=oe.match(/^\s+/);if(fe===null)return oe;var ye=fe[0];return ye.length>=ie.length?oe.slice(ie.length):oe}).join(`
`)}var Se=function(){function Ce(be){this.options=be||F}var ge=Ce.prototype;return ge.space=function(ie){var oe=this.rules.block.newline.exec(ie);if(oe)return oe[0].length>1?{type:"space",raw:oe[0]}:{raw:`
`}},ge.code=function(ie,oe){var fe=this.rules.block.code.exec(ie);if(fe){var ye=oe[oe.length-1];if(ye&&ye.type==="paragraph")return{raw:fe[0],text:fe[0].trimRight()};var Ae=fe[0].replace(/^ {4}/gm,"");return{type:"code",raw:fe[0],codeBlockStyle:"indented",text:this.options.pedantic?Ae:T(Ae,`
`)}}},ge.fences=function(ie){var oe=this.rules.block.fences.exec(ie);if(oe){var fe=oe[0],ye=Pe(fe,oe[3]||"");return{type:"code",raw:fe,lang:oe[2]?oe[2].trim():oe[2],text:ye}}},ge.heading=function(ie){var oe=this.rules.block.heading.exec(ie);if(oe)return{type:"heading",raw:oe[0],depth:oe[1].length,text:oe[2]}},ge.nptable=function(ie){var oe=this.rules.block.nptable.exec(ie);if(oe){var fe={type:"table",header:Y(oe[1].replace(/^ *| *\| *$/g,"")),align:oe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:oe[3]?oe[3].replace(/\n$/,"").split(`
`):[],raw:oe[0]};if(fe.header.length===fe.align.length){var ye=fe.align.length,Ae;for(Ae=0;Ae<ye;Ae++)/^ *-+: *$/.test(fe.align[Ae])?fe.align[Ae]="right":/^ *:-+: *$/.test(fe.align[Ae])?fe.align[Ae]="center":/^ *:-+ *$/.test(fe.align[Ae])?fe.align[Ae]="left":fe.align[Ae]=null;for(ye=fe.cells.length,Ae=0;Ae<ye;Ae++)fe.cells[Ae]=Y(fe.cells[Ae],fe.header.length);return fe}}},ge.hr=function(ie){var oe=this.rules.block.hr.exec(ie);if(oe)return{type:"hr",raw:oe[0]}},ge.blockquote=function(ie){var oe=this.rules.block.blockquote.exec(ie);if(oe){var fe=oe[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:oe[0],text:fe}}},ge.list=function(ie){var oe=this.rules.block.list.exec(ie);if(oe){for(var fe=oe[0],ye=oe[2],Ae=ye.length>1,Ge=ye[ye.length-1]===")",ot={type:"list",raw:fe,ordered:Ae,start:Ae?+ye.slice(0,-1):"",loose:!1,items:[]},wt=oe[0].match(this.rules.block.item),Dt=!1,At,vt,$e,et,Ye,ce,xe,at=wt.length,Je=0;Je<at;Je++)At=wt[Je],fe=At,vt=At.length,At=At.replace(/^ *([*+-]|\d+[.)]) */,""),~At.indexOf(`
`)&&(vt-=At.length,At=this.options.pedantic?At.replace(/^ {1,4}/gm,""):At.replace(new RegExp("^ {1,"+vt+"}","gm"),"")),Je!==at-1&&($e=this.rules.block.bullet.exec(wt[Je+1])[0],(Ae?$e.length===1||!Ge&&$e[$e.length-1]===")":$e.length>1||this.options.smartLists&&$e!==ye)&&(et=wt.slice(Je+1).join(`
`),ot.raw=ot.raw.substring(0,ot.raw.length-et.length),Je=at-1)),Ye=Dt||/\n\n(?!\s*$)/.test(At),Je!==at-1&&(Dt=At.charAt(At.length-1)===`
`,Ye||(Ye=Dt)),Ye&&(ot.loose=!0),ce=/^\[[ xX]\] /.test(At),xe=void 0,ce&&(xe=At[1]!==" ",At=At.replace(/^\[[ xX]\] +/,"")),ot.items.push({type:"list_item",raw:fe,task:ce,checked:xe,loose:Ye,text:At});return ot}},ge.html=function(ie){var oe=this.rules.block.html.exec(ie);if(oe)return{type:this.options.sanitize?"paragraph":"html",raw:oe[0],pre:!this.options.sanitizer&&(oe[1]==="pre"||oe[1]==="script"||oe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(oe[0]):$(oe[0]):oe[0]}},ge.def=function(ie){var oe=this.rules.block.def.exec(ie);if(oe){oe[3]&&(oe[3]=oe[3].substring(1,oe[3].length-1));var fe=oe[1].toLowerCase().replace(/\s+/g," ");return{tag:fe,raw:oe[0],href:oe[2],title:oe[3]}}},ge.table=function(ie){var oe=this.rules.block.table.exec(ie);if(oe){var fe={type:"table",header:Y(oe[1].replace(/^ *| *\| *$/g,"")),align:oe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:oe[3]?oe[3].replace(/\n$/,"").split(`
`):[]};if(fe.header.length===fe.align.length){fe.raw=oe[0];var ye=fe.align.length,Ae;for(Ae=0;Ae<ye;Ae++)/^ *-+: *$/.test(fe.align[Ae])?fe.align[Ae]="right":/^ *:-+: *$/.test(fe.align[Ae])?fe.align[Ae]="center":/^ *:-+ *$/.test(fe.align[Ae])?fe.align[Ae]="left":fe.align[Ae]=null;for(ye=fe.cells.length,Ae=0;Ae<ye;Ae++)fe.cells[Ae]=Y(fe.cells[Ae].replace(/^ *\| *| *\| *$/g,""),fe.header.length);return fe}}},ge.lheading=function(ie){var oe=this.rules.block.lheading.exec(ie);if(oe)return{type:"heading",raw:oe[0],depth:oe[2].charAt(0)==="="?1:2,text:oe[1]}},ge.paragraph=function(ie){var oe=this.rules.block.paragraph.exec(ie);if(oe)return{type:"paragraph",raw:oe[0],text:oe[1].charAt(oe[1].length-1)===`
`?oe[1].slice(0,-1):oe[1]}},ge.text=function(ie,oe){var fe=this.rules.block.text.exec(ie);if(fe){var ye=oe[oe.length-1];return ye&&ye.type==="text"?{raw:fe[0],text:fe[0]}:{type:"text",raw:fe[0],text:fe[0]}}},ge.escape=function(ie){var oe=this.rules.inline.escape.exec(ie);if(oe)return{type:"escape",raw:oe[0],text:$(oe[1])}},ge.tag=function(ie,oe,fe){var ye=this.rules.inline.tag.exec(ie);if(ye)return!oe&&/^<a /i.test(ye[0])?oe=!0:oe&&/^<\/a>/i.test(ye[0])&&(oe=!1),!fe&&/^<(pre|code|kbd|script)(\s|>)/i.test(ye[0])?fe=!0:fe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ye[0])&&(fe=!1),{type:this.options.sanitize?"text":"html",raw:ye[0],inLink:oe,inRawBlock:fe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):$(ye[0]):ye[0]}},ge.link=function(ie){var oe=this.rules.inline.link.exec(ie);if(oe){var fe=le(oe[2],"()");if(fe>-1){var ye=oe[0].indexOf("!")===0?5:4,Ae=ye+oe[1].length+fe;oe[2]=oe[2].substring(0,fe),oe[0]=oe[0].substring(0,Ae).trim(),oe[3]=""}var Ge=oe[2],ot="";if(this.options.pedantic){var wt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ge);wt?(Ge=wt[1],ot=wt[3]):ot=""}else ot=oe[3]?oe[3].slice(1,-1):"";Ge=Ge.trim().replace(/^<([\s\S]*)>$/,"$1");var Dt=de(oe,{href:Ge&&Ge.replace(this.rules.inline._escapes,"$1"),title:ot&&ot.replace(this.rules.inline._escapes,"$1")},oe[0]);return Dt}},ge.reflink=function(ie,oe){var fe;if((fe=this.rules.inline.reflink.exec(ie))||(fe=this.rules.inline.nolink.exec(ie))){var ye=(fe[2]||fe[1]).replace(/\s+/g," ");if(ye=oe[ye.toLowerCase()],!ye||!ye.href){var Ae=fe[0].charAt(0);return{type:"text",raw:Ae,text:Ae}}var Ge=de(fe,ye,fe[0]);return Ge}},ge.strong=function(ie,oe,fe){fe===void 0&&(fe="");var ye=this.rules.inline.strong.start.exec(ie);if(ye&&(!ye[1]||ye[1]&&(fe===""||this.rules.inline.punctuation.exec(fe)))){oe=oe.slice(-1*ie.length);var Ae=ye[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ae.lastIndex=0;for(var Ge;(ye=Ae.exec(oe))!=null;)if(Ge=this.rules.inline.strong.middle.exec(oe.slice(0,ye.index+3)),Ge)return{type:"strong",raw:ie.slice(0,Ge[0].length),text:ie.slice(2,Ge[0].length-2)}}},ge.em=function(ie,oe,fe){fe===void 0&&(fe="");var ye=this.rules.inline.em.start.exec(ie);if(ye&&(!ye[1]||ye[1]&&(fe===""||this.rules.inline.punctuation.exec(fe)))){oe=oe.slice(-1*ie.length);var Ae=ye[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ae.lastIndex=0;for(var Ge;(ye=Ae.exec(oe))!=null;)if(Ge=this.rules.inline.em.middle.exec(oe.slice(0,ye.index+2)),Ge)return{type:"em",raw:ie.slice(0,Ge[0].length),text:ie.slice(1,Ge[0].length-1)}}},ge.codespan=function(ie){var oe=this.rules.inline.code.exec(ie);if(oe){var fe=oe[2].replace(/\n/g," "),ye=/[^ ]/.test(fe),Ae=fe.startsWith(" ")&&fe.endsWith(" ");return ye&&Ae&&(fe=fe.substring(1,fe.length-1)),fe=$(fe,!0),{type:"codespan",raw:oe[0],text:fe}}},ge.br=function(ie){var oe=this.rules.inline.br.exec(ie);if(oe)return{type:"br",raw:oe[0]}},ge.del=function(ie){var oe=this.rules.inline.del.exec(ie);if(oe)return{type:"del",raw:oe[0],text:oe[1]}},ge.autolink=function(ie,oe){var fe=this.rules.inline.autolink.exec(ie);if(fe){var ye,Ae;return fe[2]==="@"?(ye=$(this.options.mangle?oe(fe[1]):fe[1]),Ae="mailto:"+ye):(ye=$(fe[1]),Ae=ye),{type:"link",raw:fe[0],text:ye,href:Ae,tokens:[{type:"text",raw:ye,text:ye}]}}},ge.url=function(ie,oe){var fe;if(fe=this.rules.inline.url.exec(ie)){var ye,Ae;if(fe[2]==="@")ye=$(this.options.mangle?oe(fe[0]):fe[0]),Ae="mailto:"+ye;else{var Ge;do Ge=fe[0],fe[0]=this.rules.inline._backpedal.exec(fe[0])[0];while(Ge!==fe[0]);ye=$(fe[0]),fe[1]==="www."?Ae="http://"+ye:Ae=ye}return{type:"link",raw:fe[0],text:ye,href:Ae,tokens:[{type:"text",raw:ye,text:ye}]}}},ge.inlineText=function(ie,oe,fe){var ye=this.rules.inline.text.exec(ie);if(ye){var Ae;return oe?Ae=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):$(ye[0]):ye[0]:Ae=$(this.options.smartypants?fe(ye[0]):ye[0]),{type:"text",raw:ye[0],text:Ae}}},Ce}(),we=A.noopTest,Fe=A.edit,Me=A.merge,me={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:we,table:we,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};me._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,me._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,me.def=Fe(me.def).replace("label",me._label).replace("title",me._title).getRegex(),me.bullet=/(?:[*+-]|\d{1,9}[.)])/,me.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,me.item=Fe(me.item,"gm").replace(/bull/g,me.bullet).getRegex(),me.list=Fe(me.list).replace(/bull/g,me.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+me.def.source+")").getRegex(),me._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",me._comment=/<!--(?!-?>)[\s\S]*?-->/,me.html=Fe(me.html,"i").replace("comment",me._comment).replace("tag",me._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me.paragraph=Fe(me._paragraph).replace("hr",me.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",me._tag).getRegex(),me.blockquote=Fe(me.blockquote).replace("paragraph",me.paragraph).getRegex(),me.normal=Me({},me),me.gfm=Me({},me.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*|$)"}),me.gfm.nptable=Fe(me.gfm.nptable).replace("hr",me.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",me._tag).getRegex(),me.gfm.table=Fe(me.gfm.table).replace("hr",me.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",me._tag).getRegex(),me.pedantic=Me({},me.normal,{html:Fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",me._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:we,paragraph:Fe(me.normal._paragraph).replace("hr",me.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",me.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var pe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:we,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:we,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};pe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",pe.punctuation=Fe(pe.punctuation).replace(/punctuation/g,pe._punctuation).getRegex(),pe._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",pe._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",pe.em.start=Fe(pe.em.start).replace(/punctuation/g,pe._punctuation).getRegex(),pe.em.middle=Fe(pe.em.middle).replace(/punctuation/g,pe._punctuation).replace(/overlapSkip/g,pe._overlapSkip).getRegex(),pe.em.endAst=Fe(pe.em.endAst,"g").replace(/punctuation/g,pe._punctuation).getRegex(),pe.em.endUnd=Fe(pe.em.endUnd,"g").replace(/punctuation/g,pe._punctuation).getRegex(),pe.strong.start=Fe(pe.strong.start).replace(/punctuation/g,pe._punctuation).getRegex(),pe.strong.middle=Fe(pe.strong.middle).replace(/punctuation/g,pe._punctuation).replace(/blockSkip/g,pe._blockSkip).getRegex(),pe.strong.endAst=Fe(pe.strong.endAst,"g").replace(/punctuation/g,pe._punctuation).getRegex(),pe.strong.endUnd=Fe(pe.strong.endUnd,"g").replace(/punctuation/g,pe._punctuation).getRegex(),pe.blockSkip=Fe(pe._blockSkip,"g").getRegex(),pe.overlapSkip=Fe(pe._overlapSkip,"g").getRegex(),pe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,pe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,pe._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])?)+(?![-_])/,pe.autolink=Fe(pe.autolink).replace("scheme",pe._scheme).replace("email",pe._email).getRegex(),pe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,pe.tag=Fe(pe.tag).replace("comment",me._comment).replace("attribute",pe._attribute).getRegex(),pe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pe._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,pe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,pe.link=Fe(pe.link).replace("label",pe._label).replace("href",pe._href).replace("title",pe._title).getRegex(),pe.reflink=Fe(pe.reflink).replace("label",pe._label).getRegex(),pe.reflinkSearch=Fe(pe.reflinkSearch,"g").replace("reflink",pe.reflink).replace("nolink",pe.nolink).getRegex(),pe.normal=Me({},pe),pe.pedantic=Me({},pe.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:Fe(/^!?\[(label)\]\((.*?)\)/).replace("label",pe._label).getRegex(),reflink:Fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pe._label).getRegex()}),pe.gfm=Me({},pe.normal,{escape:Fe(pe.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),pe.gfm.url=Fe(pe.gfm.url,"i").replace("email",pe.gfm._extended_email).getRegex(),pe.breaks=Me({},pe.gfm,{br:Fe(pe.br).replace("{2,}","*").getRegex(),text:Fe(pe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ne={block:me,inline:pe},Ee=K.defaults,ae=ne.block,ke=ne.inline;function je(Ce){return Ce.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 Oe(Ce){var ge="",be,ie,oe=Ce.length;for(be=0;be<oe;be++)ie=Ce.charCodeAt(be),Math.random()>.5&&(ie="x"+ie.toString(16)),ge+="&#"+ie+";";return ge}var Ve=function(){function Ce(be){this.tokens=[],this.tokens.links=Object.create(null),this.options=be||Ee,this.options.tokenizer=this.options.tokenizer||new Se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ie={block:ae.normal,inline:ke.normal};this.options.pedantic?(ie.block=ae.pedantic,ie.inline=ke.pedantic):this.options.gfm&&(ie.block=ae.gfm,this.options.breaks?ie.inline=ke.breaks:ie.inline=ke.gfm),this.tokenizer.rules=ie}Ce.lex=function(ie,oe){var fe=new Ce(oe);return fe.lex(ie)};var ge=Ce.prototype;return ge.lex=function(ie){return ie=ie.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ie,this.tokens,!0),this.inline(this.tokens),this.tokens},ge.blockTokens=function(ie,oe,fe){oe===void 0&&(oe=[]),fe===void 0&&(fe=!0),ie=ie.replace(/^ +$/gm,"");for(var ye,Ae,Ge,ot;ie;){if(ye=this.tokenizer.space(ie)){ie=ie.substring(ye.raw.length),ye.type&&oe.push(ye);continue}if(ye=this.tokenizer.code(ie,oe)){ie=ie.substring(ye.raw.length),ye.type?oe.push(ye):(ot=oe[oe.length-1],ot.raw+=`
`+ye.raw,ot.text+=`
`+ye.text);continue}if(ye=this.tokenizer.fences(ie)){ie=ie.substring(ye.raw.length),oe.push(ye);continue}if(ye=this.tokenizer.heading(ie)){ie=ie.substring(ye.raw.length),oe.push(ye);continue}if(ye=this.tokenizer.nptable(ie)){ie=ie.substring(ye.raw.length),oe.push(ye);continue}if(ye=this.tokenizer.hr(ie)){ie=ie.substring(ye.raw.length),oe.push(ye);continue}if(ye=this.tokenizer.blockquote(ie)){ie=ie.substring(ye.raw.length),ye.tokens=this.blockTokens(ye.text,[],fe),oe.push(ye);continue}if(ye=this.tokenizer.list(ie)){for(ie=ie.substring(ye.raw.length),Ge=ye.items.length,Ae=0;Ae<Ge;Ae++)ye.items[Ae].tokens=this.blockTokens(ye.items[Ae].text,[],!1);oe.push(ye);continue}if(ye=this.tokenizer.html(ie)){ie=ie.substring(ye.raw.length),oe.push(ye);continue}if(fe&&(ye=this.tokenizer.def(ie))){ie=ie.substring(ye.raw.length),this.tokens.links[ye.tag]||(this.tokens.links[ye.tag]={href:ye.href,title:ye.title});continue}if(ye=this.tokenizer.table(ie)){ie=ie.substring(ye.raw.length),oe.push(ye);continue}if(ye=this.tokenizer.lheading(ie)){ie=ie.substring(ye.raw.length),oe.push(ye);continue}if(fe&&(ye=this.tokenizer.paragraph(ie))){ie=ie.substring(ye.raw.length),oe.push(ye);continue}if(ye=this.tokenizer.text(ie,oe)){ie=ie.substring(ye.raw.length),ye.type?oe.push(ye):(ot=oe[oe.length-1],ot.raw+=`
`+ye.raw,ot.text+=`
`+ye.text);continue}if(ie){var wt="Infinite loop on byte: "+ie.charCodeAt(0);if(this.options.silent){console.error(wt);break}else throw new Error(wt)}}return oe},ge.inline=function(ie){var oe,fe,ye,Ae,Ge,ot,wt=ie.length;for(oe=0;oe<wt;oe++){ot=ie[oe];switch(ot.type){case"paragraph":case"text":case"heading":{ot.tokens=[],this.inlineTokens(ot.text,ot.tokens);break}case"table":{for(ot.tokens={header:[],cells:[]},Ae=ot.header.length,fe=0;fe<Ae;fe++)ot.tokens.header[fe]=[],this.inlineTokens(ot.header[fe],ot.tokens.header[fe]);for(Ae=ot.cells.length,fe=0;fe<Ae;fe++)for(Ge=ot.cells[fe],ot.tokens.cells[fe]=[],ye=0;ye<Ge.length;ye++)ot.tokens.cells[fe][ye]=[],this.inlineTokens(Ge[ye],ot.tokens.cells[fe][ye]);break}case"blockquote":{this.inline(ot.tokens);break}case"list":{for(Ae=ot.items.length,fe=0;fe<Ae;fe++)this.inline(ot.items[fe].tokens);break}}}return ie},ge.inlineTokens=function(ie,oe,fe,ye,Ae){oe===void 0&&(oe=[]),fe===void 0&&(fe=!1),ye===void 0&&(ye=!1),Ae===void 0&&(Ae="");var Ge,ot=ie,wt;if(this.tokens.links){var Dt=Object.keys(this.tokens.links);if(Dt.length>0)for(;(wt=this.tokenizer.rules.inline.reflinkSearch.exec(ot))!=null;)Dt.includes(wt[0].slice(wt[0].lastIndexOf("[")+1,-1))&&(ot=ot.slice(0,wt.index)+"["+"a".repeat(wt[0].length-2)+"]"+ot.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(wt=this.tokenizer.rules.inline.blockSkip.exec(ot))!=null;)ot=ot.slice(0,wt.index)+"["+"a".repeat(wt[0].length-2)+"]"+ot.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ie;){if(Ge=this.tokenizer.escape(ie)){ie=ie.substring(Ge.raw.length),oe.push(Ge);continue}if(Ge=this.tokenizer.tag(ie,fe,ye)){ie=ie.substring(Ge.raw.length),fe=Ge.inLink,ye=Ge.inRawBlock,oe.push(Ge);continue}if(Ge=this.tokenizer.link(ie)){ie=ie.substring(Ge.raw.length),Ge.type==="link"&&(Ge.tokens=this.inlineTokens(Ge.text,[],!0,ye)),oe.push(Ge);continue}if(Ge=this.tokenizer.reflink(ie,this.tokens.links)){ie=ie.substring(Ge.raw.length),Ge.type==="link"&&(Ge.tokens=this.inlineTokens(Ge.text,[],!0,ye)),oe.push(Ge);continue}if(Ge=this.tokenizer.strong(ie,ot,Ae)){ie=ie.substring(Ge.raw.length),Ge.tokens=this.inlineTokens(Ge.text,[],fe,ye),oe.push(Ge);continue}if(Ge=this.tokenizer.em(ie,ot,Ae)){ie=ie.substring(Ge.raw.length),Ge.tokens=this.inlineTokens(Ge.text,[],fe,ye),oe.push(Ge);continue}if(Ge=this.tokenizer.codespan(ie)){ie=ie.substring(Ge.raw.length),oe.push(Ge);continue}if(Ge=this.tokenizer.br(ie)){ie=ie.substring(Ge.raw.length),oe.push(Ge);continue}if(Ge=this.tokenizer.del(ie)){ie=ie.substring(Ge.raw.length),Ge.tokens=this.inlineTokens(Ge.text,[],fe,ye),oe.push(Ge);continue}if(Ge=this.tokenizer.autolink(ie,Oe)){ie=ie.substring(Ge.raw.length),oe.push(Ge);continue}if(!fe&&(Ge=this.tokenizer.url(ie,Oe))){ie=ie.substring(Ge.raw.length),oe.push(Ge);continue}if(Ge=this.tokenizer.inlineText(ie,ye,je)){ie=ie.substring(Ge.raw.length),Ae=Ge.raw.slice(-1),oe.push(Ge);continue}if(ie){var At="Infinite loop on byte: "+ie.charCodeAt(0);if(this.options.silent){console.error(At);break}else throw new Error(At)}}return oe},G(Ce,null,[{key:"rules",get:function(){return{block:ae,inline:ke}}}]),Ce}(),qe=K.defaults,ue=A.cleanUrl,ve=A.escape,De=function(){function Ce(be){this.options=be||qe}var ge=Ce.prototype;return ge.code=function(ie,oe,fe){var ye=(oe||"").match(/\S*/)[0];if(this.options.highlight){var Ae=this.options.highlight(ie,ye);Ae!=null&&Ae!==ie&&(fe=!0,ie=Ae)}return ye?'<pre><code class="'+this.options.langPrefix+ve(ye,!0)+'">'+(fe?ie:ve(ie,!0))+`</code></pre>
`:"<pre><code>"+(fe?ie:ve(ie,!0))+`</code></pre>
`},ge.blockquote=function(ie){return`<blockquote>
`+ie+`</blockquote>
`},ge.html=function(ie){return ie},ge.heading=function(ie,oe,fe,ye){return this.options.headerIds?"<h"+oe+' id="'+this.options.headerPrefix+ye.slug(fe)+'">'+ie+"</h"+oe+`>
`:"<h"+oe+">"+ie+"</h"+oe+`>
`},ge.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},ge.list=function(ie,oe,fe){var ye=oe?"ol":"ul",Ae=oe&&fe!==1?' start="'+fe+'"':"";return"<"+ye+Ae+`>
`+ie+"</"+ye+`>
`},ge.listitem=function(ie){return"<li>"+ie+`</li>
`},ge.checkbox=function(ie){return"<input "+(ie?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ge.paragraph=function(ie){return"<p>"+ie+`</p>
`},ge.table=function(ie,oe){return oe&&(oe="<tbody>"+oe+"</tbody>"),`<table>
<thead>
`+ie+`</thead>
`+oe+`</table>
`},ge.tablerow=function(ie){return`<tr>
`+ie+`</tr>
`},ge.tablecell=function(ie,oe){var fe=oe.header?"th":"td",ye=oe.align?"<"+fe+' align="'+oe.align+'">':"<"+fe+">";return ye+ie+"</"+fe+`>
`},ge.strong=function(ie){return"<strong>"+ie+"</strong>"},ge.em=function(ie){return"<em>"+ie+"</em>"},ge.codespan=function(ie){return"<code>"+ie+"</code>"},ge.br=function(){return this.options.xhtml?"<br/>":"<br>"},ge.del=function(ie){return"<del>"+ie+"</del>"},ge.link=function(ie,oe,fe){if(ie=ue(this.options.sanitize,this.options.baseUrl,ie),ie===null)return fe;var ye='<a href="'+ve(ie)+'"';return oe&&(ye+=' title="'+oe+'"'),ye+=">"+fe+"</a>",ye},ge.image=function(ie,oe,fe){if(ie=ue(this.options.sanitize,this.options.baseUrl,ie),ie===null)return fe;var ye='<img src="'+ie+'" alt="'+fe+'"';return oe&&(ye+=' title="'+oe+'"'),ye+=this.options.xhtml?"/>":">",ye},ge.text=function(ie){return ie},Ce}(),Ne=function(){function Ce(){}var ge=Ce.prototype;return ge.strong=function(ie){return ie},ge.em=function(ie){return ie},ge.codespan=function(ie){return ie},ge.del=function(ie){return ie},ge.html=function(ie){return ie},ge.text=function(ie){return ie},ge.link=function(ie,oe,fe){return""+fe},ge.image=function(ie,oe,fe){return""+fe},ge.br=function(){return""},Ce}(),it=function(){function Ce(){this.seen={}}var ge=Ce.prototype;return ge.slug=function(ie){var oe=ie.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(oe)){var fe=oe;do this.seen[fe]++,oe=fe+"-"+this.seen[fe];while(this.seen.hasOwnProperty(oe))}return this.seen[oe]=0,oe},Ce}(),pt=K.defaults,mt=A.unescape,dt=function(){function Ce(be){this.options=be||pt,this.options.renderer=this.options.renderer||new De,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ne,this.slugger=new it}Ce.parse=function(ie,oe){var fe=new Ce(oe);return fe.parse(ie)};var ge=Ce.prototype;return ge.parse=function(ie,oe){oe===void 0&&(oe=!0);var fe="",ye,Ae,Ge,ot,wt,Dt,At,vt,$e,et,Ye,ce,xe,at,Je,_t,yt,Be,Ze=ie.length;for(ye=0;ye<Ze;ye++){et=ie[ye];switch(et.type){case"space":continue;case"hr":{fe+=this.renderer.hr();continue}case"heading":{fe+=this.renderer.heading(this.parseInline(et.tokens),et.depth,mt(this.parseInline(et.tokens,this.textRenderer)),this.slugger);continue}case"code":{fe+=this.renderer.code(et.text,et.lang,et.escaped);continue}case"table":{for(vt="",At="",ot=et.header.length,Ae=0;Ae<ot;Ae++)At+=this.renderer.tablecell(this.parseInline(et.tokens.header[Ae]),{header:!0,align:et.align[Ae]});for(vt+=this.renderer.tablerow(At),$e="",ot=et.cells.length,Ae=0;Ae<ot;Ae++){for(Dt=et.tokens.cells[Ae],At="",wt=Dt.length,Ge=0;Ge<wt;Ge++)At+=this.renderer.tablecell(this.parseInline(Dt[Ge]),{header:!1,align:et.align[Ge]});$e+=this.renderer.tablerow(At)}fe+=this.renderer.table(vt,$e);continue}case"blockquote":{$e=this.parse(et.tokens),fe+=this.renderer.blockquote($e);continue}case"list":{for(Ye=et.ordered,ce=et.start,xe=et.loose,ot=et.items.length,$e="",Ae=0;Ae<ot;Ae++)Je=et.items[Ae],_t=Je.checked,yt=Je.task,at="",Je.task&&(Be=this.renderer.checkbox(_t),xe?Je.tokens.length>0&&Je.tokens[0].type==="text"?(Je.tokens[0].text=Be+" "+Je.tokens[0].text,Je.tokens[0].tokens&&Je.tokens[0].tokens.length>0&&Je.tokens[0].tokens[0].type==="text"&&(Je.tokens[0].tokens[0].text=Be+" "+Je.tokens[0].tokens[0].text)):Je.tokens.unshift({type:"text",text:Be}):at+=Be),at+=this.parse(Je.tokens,xe),$e+=this.renderer.listitem(at,yt,_t);fe+=this.renderer.list($e,Ye,ce);continue}case"html":{fe+=this.renderer.html(et.text);continue}case"paragraph":{fe+=this.renderer.paragraph(this.parseInline(et.tokens));continue}case"text":{for($e=et.tokens?this.parseInline(et.tokens):et.text;ye+1<Ze&&ie[ye+1].type==="text";)et=ie[++ye],$e+=`
`+(et.tokens?this.parseInline(et.tokens):et.text);fe+=oe?this.renderer.paragraph($e):$e;continue}default:{var nt='Token with "'+et.type+'" type was not found.';if(this.options.silent){console.error(nt);return}else throw new Error(nt)}}}return fe},ge.parseInline=function(ie,oe){oe=oe||this.renderer;var fe="",ye,Ae,Ge=ie.length;for(ye=0;ye<Ge;ye++){Ae=ie[ye];switch(Ae.type){case"escape":{fe+=oe.text(Ae.text);break}case"html":{fe+=oe.html(Ae.text);break}case"link":{fe+=oe.link(Ae.href,Ae.title,this.parseInline(Ae.tokens,oe));break}case"image":{fe+=oe.image(Ae.href,Ae.title,Ae.text);break}case"strong":{fe+=oe.strong(this.parseInline(Ae.tokens,oe));break}case"em":{fe+=oe.em(this.parseInline(Ae.tokens,oe));break}case"codespan":{fe+=oe.codespan(Ae.text);break}case"br":{fe+=oe.br();break}case"del":{fe+=oe.del(this.parseInline(Ae.tokens,oe));break}case"text":{fe+=oe.text(Ae.text);break}default:{var ot='Token with "'+Ae.type+'" type was not found.';if(this.options.silent){console.error(ot);return}else throw new Error(ot)}}}return fe},Ce}(),Tt=A.merge,St=A.checkSanitizeDeprecation,Ue=A.escape,Ie=K.getDefaults,tt=K.changeDefaults,lt=K.defaults;function Ke(Ce,ge,be){if(typeof Ce=="undefined"||Ce===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ce!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ce)+", string expected");if(typeof ge=="function"&&(be=ge,ge=null),ge=Tt({},Ke.defaults,ge||{}),St(ge),be){var ie=ge.highlight,oe;try{oe=Ve.lex(Ce,ge)}catch(Ge){return be(Ge)}var fe=function(ot){var wt;if(!ot)try{wt=dt.parse(oe,ge)}catch(Dt){ot=Dt}return ge.highlight=ie,ot?be(ot):be(null,wt)};if(!ie||ie.length<3)return fe();if(delete ge.highlight,!oe.length)return fe();var ye=0;Ke.walkTokens(oe,function(Ge){Ge.type==="code"&&(ye++,setTimeout(function(){ie(Ge.text,Ge.lang,function(ot,wt){if(ot)return fe(ot);wt!=null&&wt!==Ge.text&&(Ge.text=wt,Ge.escaped=!0),ye--,ye===0&&fe()})},0))}),ye===0&&fe();return}try{var Ae=Ve.lex(Ce,ge);return ge.walkTokens&&Ke.walkTokens(Ae,ge.walkTokens),dt.parse(Ae,ge)}catch(Ge){if(Ge.message+=`
Please report this to https://github.com/markedjs/marked.`,ge.silent)return"<p>An error occurred:</p><pre>"+Ue(Ge.message+"",!0)+"</pre>";throw Ge}}Ke.options=Ke.setOptions=function(Ce){return Tt(Ke.defaults,Ce),tt(Ke.defaults),Ke},Ke.getDefaults=Ie,Ke.defaults=lt,Ke.use=function(Ce){var ge=Tt({},Ce);if(Ce.renderer&&function(){var ie=Ke.defaults.renderer||new De,oe=function(Ae){var Ge=ie[Ae];ie[Ae]=function(){for(var ot=arguments.length,wt=new Array(ot),Dt=0;Dt<ot;Dt++)wt[Dt]=arguments[Dt];var At=Ce.renderer[Ae].apply(ie,wt);return At===!1&&(At=Ge.apply(ie,wt)),At}};for(var fe in Ce.renderer)oe(fe);ge.renderer=ie}(),Ce.tokenizer&&function(){var ie=Ke.defaults.tokenizer||new Se,oe=function(Ae){var Ge=ie[Ae];ie[Ae]=function(){for(var ot=arguments.length,wt=new Array(ot),Dt=0;Dt<ot;Dt++)wt[Dt]=arguments[Dt];var At=Ce.tokenizer[Ae].apply(ie,wt);return At===!1&&(At=Ge.apply(ie,wt)),At}};for(var fe in Ce.tokenizer)oe(fe);ge.tokenizer=ie}(),Ce.walkTokens){var be=Ke.defaults.walkTokens;ge.walkTokens=function(ie){Ce.walkTokens(ie),be&&be(ie)}}Ke.setOptions(ge)},Ke.walkTokens=function(Ce,ge){for(var be=W(Ce),ie;!(ie=be()).done;){var oe=ie.value;ge(oe);switch(oe.type){case"table":{for(var fe=W(oe.tokens.header),ye;!(ye=fe()).done;){var Ae=ye.value;Ke.walkTokens(Ae,ge)}for(var Ge=W(oe.tokens.cells),ot;!(ot=Ge()).done;)for(var wt=ot.value,Dt=W(wt),At;!(At=Dt()).done;){var vt=At.value;Ke.walkTokens(vt,ge)}break}case"list":{Ke.walkTokens(oe.items,ge);break}default:oe.tokens&&Ke.walkTokens(oe.tokens,ge)}}},Ke.Parser=dt,Ke.parser=dt.parse,Ke.Renderer=De,Ke.TextRenderer=Ne,Ke.Lexer=Ve,Ke.lexer=Ve.lex,Ke.Tokenizer=Se,Ke.Slugger=it,Ke.parse=Ke;var Xe=Ke;return Xe})},E7E6:function(We,se){We.exports="data:image/png;base64,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"},ELLl:function(We,se,B){(function(Z){Z(B("VrN/"))})(function(Z){var G={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},U=Z.Pos;Z.defineOption("autoCloseBrackets",!1,function(r,d,u){u&&u!=Z.Init&&(r.removeKeyMap(W),r.state.closeBrackets=null),d&&(M(V(d,"pairs")),r.state.closeBrackets=d,r.addKeyMap(W))});function V(r,d){return d=="pairs"&&typeof r=="string"?r:typeof r=="object"&&r[d]!=null?r[d]:G[d]}var W={Backspace:n,Enter:w};function M(r){for(var d=0;d<r.length;d++){var u=r.charAt(d),o="'"+u+"'";W[o]||(W[o]=K(u))}}M(G.pairs+"`");function K(r){return function(d){return f(d,r)}}function j(r){var d=r.state.closeBrackets;if(!d||d.override)return d;var u=r.getModeAt(r.getCursor());return u.closeBrackets||d}function n(r){var d=j(r);if(!d||r.getOption("disableInput"))return Z.Pass;for(var u=V(d,"pairs"),o=r.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return Z.Pass;var a=p(r,o[s].head);if(!a||u.indexOf(a)%2!=0)return Z.Pass}for(var s=o.length-1;s>=0;s--){var R=o[s].head;r.replaceRange("",U(R.line,R.ch-1),U(R.line,R.ch+1),"+delete")}}function w(r){var d=j(r),u=d&&V(d,"explode");if(!u||r.getOption("disableInput"))return Z.Pass;for(var o=r.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return Z.Pass;var a=p(r,o[s].head);if(!a||u.indexOf(a)%2!=0)return Z.Pass}r.operation(function(){var R=r.lineSeparator()||`
`;r.replaceSelection(R+R,null),r.execCommand("goCharLeft"),o=r.listSelections();for(var O=0;O<o.length;O++){var S=o[O].head.line;r.indentLine(S,null,!0),r.indentLine(S+1,null,!0)}})}function m(r){var d=Z.cmpPos(r.anchor,r.head)>0;return{anchor:new U(r.anchor.line,r.anchor.ch+(d?-1:1)),head:new U(r.head.line,r.head.ch+(d?1:-1))}}function f(r,d){var u=j(r);if(!u||r.getOption("disableInput"))return Z.Pass;var o=V(u,"pairs"),s=o.indexOf(d);if(s==-1)return Z.Pass;for(var a=V(u,"closeBefore"),R=V(u,"triples"),O=o.charAt(s+1)==d,S=r.listSelections(),D=s%2==0,I,_=0;_<S.length;_++){var b=S[_],v=b.head,h,C=r.getRange(v,U(v.line,v.ch+1));if(D&&!b.empty())h="surround";else if((O||!D)&&C==d)O&&c(r,v)?h="both":R.indexOf(d)>=0&&r.getRange(v,U(v.line,v.ch+3))==d+d+d?h="skipThree":h="skip";else if(O&&v.ch>1&&R.indexOf(d)>=0&&r.getRange(U(v.line,v.ch-2),v)==d+d){if(v.ch>2&&/\bstring/.test(r.getTokenTypeAt(U(v.line,v.ch-2))))return Z.Pass;h="addFour"}else if(O){var x=v.ch==0?" ":r.getRange(U(v.line,v.ch-1),v);if(!Z.isWordChar(C)&&x!=d&&!Z.isWordChar(x))h="both";else return Z.Pass}else if(D&&(C.length===0||/\s/.test(C)||a.indexOf(C)>-1))h="both";else return Z.Pass;if(!I)I=h;else if(I!=h)return Z.Pass}var g=s%2?o.charAt(s-1):d,P=s%2?d:o.charAt(s+1);r.operation(function(){if(I=="skip")r.execCommand("goCharRight");else if(I=="skipThree")for(var k=0;k<3;k++)r.execCommand("goCharRight");else if(I=="surround"){for(var y=r.getSelections(),k=0;k<y.length;k++)y[k]=g+y[k]+P;r.replaceSelections(y,"around"),y=r.listSelections().slice();for(var k=0;k<y.length;k++)y[k]=m(y[k]);r.setSelections(y)}else I=="both"?(r.replaceSelection(g+P,null),r.triggerElectric(g+P),r.execCommand("goCharLeft")):I=="addFour"&&(r.replaceSelection(g+g+g+g,"before"),r.execCommand("goCharRight"))})}function p(r,d){var u=r.getRange(U(d.line,d.ch-1),U(d.line,d.ch+1));return u.length==2?u:null}function c(r,d){var u=r.getTokenAt(U(d.line,d.ch+1));return/\bstring/.test(u.type)&&u.start==d.ch&&(d.ch==0||!/\bstring/.test(r.getTokenTypeAt(d)))}})},FOrL:function(We,se,B){We.exports=B.p+"static/nodata.a6b3f948.png"},FPkq:function(We,se,B){We.exports=B.p+"static/qrCode.dd0fe9b2.png"},FWmy:function(We,se,B){"use strict";B.d(se,"a",function(){return Z});function Z(G,U){if(!G)throw new Error(U?`Assertion failed (${U})`:"Assertion Failed")}},GABl:function(We,se){We.exports="data:image/png;base64,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"},Gytx:function(We,se){We.exports=function(Z,G,U,V){var W=U?U.call(V,Z,G):void 0;if(W!==void 0)return!!W;if(Z===G)return!0;if(typeof Z!="object"||!Z||typeof G!="object"||!G)return!1;var M=Object.keys(Z),K=Object.keys(G);if(M.length!==K.length)return!1;for(var j=Object.prototype.hasOwnProperty.bind(G),n=0;n<M.length;n++){var w=M[n];if(!j(w))return!1;var m=Z[w],f=G[w];if(W=U?U.call(V,m,f,w):void 0,W===!1||W===void 0&&m!==f)return!1}return!0}},H38U:function(We,se,B){var Z=B("f4xo"),G=B("rcnY"),U=B("wU8J"),V=B("Iq15"),W=B("dWSS");function M(j,n){this.typeNumber=j,this.errorCorrectLevel=n,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var K=M.prototype;K.addData=function(j){var n=new Z(j);this.dataList.push(n),this.dataCache=null},K.isDark=function(j,n){if(j<0||this.moduleCount<=j||n<0||this.moduleCount<=n)throw new Error(j+","+n);return this.modules[j][n]},K.getModuleCount=function(){return this.moduleCount},K.make=function(){if(this.typeNumber<1){var j=1;for(j=1;j<40;j++){for(var n=G.getRSBlocks(j,this.errorCorrectLevel),w=new U,m=0,f=0;f<n.length;f++)m+=n[f].dataCount;for(var f=0;f<this.dataList.length;f++){var p=this.dataList[f];w.put(p.mode,4),w.put(p.getLength(),V.getLengthInBits(p.mode,j)),p.write(w)}if(w.getLengthInBits()<=m*8)break}this.typeNumber=j}this.makeImpl(!1,this.getBestMaskPattern())},K.makeImpl=function(j,n){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var w=0;w<this.moduleCount;w++){this.modules[w]=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++)this.modules[w][m]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(j,n),this.typeNumber>=7&&this.setupTypeNumber(j),this.dataCache==null&&(this.dataCache=M.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,n)},K.setupPositionProbePattern=function(j,n){for(var w=-1;w<=7;w++){if(j+w<=-1||this.moduleCount<=j+w)continue;for(var m=-1;m<=7;m++){if(n+m<=-1||this.moduleCount<=n+m)continue;0<=w&&w<=6&&(m==0||m==6)||0<=m&&m<=6&&(w==0||w==6)||2<=w&&w<=4&&2<=m&&m<=4?this.modules[j+w][n+m]=!0:this.modules[j+w][n+m]=!1}}},K.getBestMaskPattern=function(){for(var j=0,n=0,w=0;w<8;w++){this.makeImpl(!0,w);var m=V.getLostPoint(this);(w==0||j>m)&&(j=m,n=w)}return n},K.createMovieClip=function(j,n,w){var m=j.createEmptyMovieClip(n,w),f=1;this.make();for(var p=0;p<this.modules.length;p++)for(var c=p*f,r=0;r<this.modules[p].length;r++){var d=r*f,u=this.modules[p][r];u&&(m.beginFill(0,100),m.moveTo(d,c),m.lineTo(d+f,c),m.lineTo(d+f,c+f),m.lineTo(d,c+f),m.endFill())}return m},K.setupTimingPattern=function(){for(var j=8;j<this.moduleCount-8;j++){if(this.modules[j][6]!=null)continue;this.modules[j][6]=j%2==0}for(var n=8;n<this.moduleCount-8;n++){if(this.modules[6][n]!=null)continue;this.modules[6][n]=n%2==0}},K.setupPositionAdjustPattern=function(){for(var j=V.getPatternPosition(this.typeNumber),n=0;n<j.length;n++)for(var w=0;w<j.length;w++){var m=j[n],f=j[w];if(this.modules[m][f]!=null)continue;for(var p=-2;p<=2;p++)for(var c=-2;c<=2;c++)p==-2||p==2||c==-2||c==2||p==0&&c==0?this.modules[m+p][f+c]=!0:this.modules[m+p][f+c]=!1}},K.setupTypeNumber=function(j){for(var n=V.getBCHTypeNumber(this.typeNumber),w=0;w<18;w++){var m=!j&&(n>>w&1)==1;this.modules[Math.floor(w/3)][w%3+this.moduleCount-8-3]=m}for(var w=0;w<18;w++){var m=!j&&(n>>w&1)==1;this.modules[w%3+this.moduleCount-8-3][Math.floor(w/3)]=m}},K.setupTypeInfo=function(j,n){for(var w=this.errorCorrectLevel<<3|n,m=V.getBCHTypeInfo(w),f=0;f<15;f++){var p=!j&&(m>>f&1)==1;f<6?this.modules[f][8]=p:f<8?this.modules[f+1][8]=p:this.modules[this.moduleCount-15+f][8]=p}for(var f=0;f<15;f++){var p=!j&&(m>>f&1)==1;f<8?this.modules[8][this.moduleCount-f-1]=p:f<9?this.modules[8][15-f-1+1]=p:this.modules[8][15-f-1]=p}this.modules[this.moduleCount-8][8]=!j},K.mapData=function(j,n){for(var w=-1,m=this.moduleCount-1,f=7,p=0,c=this.moduleCount-1;c>0;c-=2)for(c==6&&c--;;){for(var r=0;r<2;r++)if(this.modules[m][c-r]==null){var d=!1;p<j.length&&(d=(j[p]>>>f&1)==1);var u=V.getMask(n,m,c-r);u&&(d=!d),this.modules[m][c-r]=d,f--,f==-1&&(p++,f=7)}if(m+=w,m<0||this.moduleCount<=m){m-=w,w=-w;break}}},M.PAD0=236,M.PAD1=17,M.createData=function(j,n,w){for(var m=G.getRSBlocks(j,n),f=new U,p=0;p<w.length;p++){var c=w[p];f.put(c.mode,4),f.put(c.getLength(),V.getLengthInBits(c.mode,j)),c.write(f)}for(var r=0,p=0;p<m.length;p++)r+=m[p].dataCount;if(f.getLengthInBits()>r*8)throw new Error("code length overflow. ("+f.getLengthInBits()+">"+r*8+")");for(f.getLengthInBits()+4<=r*8&&f.put(0,4);f.getLengthInBits()%8!=0;)f.putBit(!1);for(;!(f.getLengthInBits()>=r*8);){if(f.put(M.PAD0,8),f.getLengthInBits()>=r*8)break;f.put(M.PAD1,8)}return M.createBytes(f,m)},M.createBytes=function(j,n){for(var w=0,m=0,f=0,p=new Array(n.length),c=new Array(n.length),r=0;r<n.length;r++){var d=n[r].dataCount,u=n[r].totalCount-d;m=Math.max(m,d),f=Math.max(f,u),p[r]=new Array(d);for(var o=0;o<p[r].length;o++)p[r][o]=255&j.buffer[o+w];w+=d;var s=V.getErrorCorrectPolynomial(u),a=new W(p[r],s.getLength()-1),R=a.mod(s);c[r]=new Array(s.getLength()-1);for(var o=0;o<c[r].length;o++){var O=o+R.getLength()-c[r].length;c[r][o]=O>=0?R.get(O):0}}for(var S=0,o=0;o<n.length;o++)S+=n[o].totalCount;for(var D=new Array(S),I=0,o=0;o<m;o++)for(var r=0;r<n.length;r++)o<p[r].length&&(D[I++]=p[r][o]);for(var o=0;o<f;o++)for(var r=0;r<n.length;r++)o<c[r].length&&(D[I++]=c[r][o]);return D},We.exports=M},HmJG:function(We,se,B){},HpTS:function(We,se,B){We.exports=B.p+"static/small_program.f74069ec.png"},I8Z2:function(We,se,B){"use strict";B.d(se,"a",function(){return V}),B.d(se,"b",function(){return p}),B.d(se,"c",function(){return r});var Z=B("q1tI"),G=function(){var d=function(u,o){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var R in a)a.hasOwnProperty(R)&&(s[R]=a[R])},d(u,o)};return function(u,o){d(u,o);function s(){this.constructor=u}u.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}}(),U=Z.createContext(null),V=function(d){G(u,d);function u(){return d!==null&&d.apply(this,arguments)||this}return u.prototype.render=function(){return Z.createElement(U.Provider,{value:this.props.store},this.props.children)},u}(Z.Component),W=B("Gytx"),M=B.n(W),K=B("2mql"),j=B.n(K),n=function(){var d=function(u,o){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var R in a)a.hasOwnProperty(R)&&(s[R]=a[R])},d(u,o)};return function(u,o){d(u,o);function s(){this.constructor=u}u.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}}(),w=function(){return w=Object.assign||function(d){for(var u,o=1,s=arguments.length;o<s;o++){u=arguments[o];for(var a in u)Object.prototype.hasOwnProperty.call(u,a)&&(d[a]=u[a])}return d},w.apply(this,arguments)};function m(d){return d.displayName||d.name||"Component"}var f=function(){return{}};function p(d,u){u===void 0&&(u={});var o=!!d,s=d||f;return function(R){var O=function(D){n(I,D);function I(_,b){var v=D.call(this,_,b)||this;return v.unsubscribe=null,v.handleChange=function(){if(!v.unsubscribe)return;var h=s(v.store.getState(),v.props);v.setState({subscribed:h})},v.store=v.context,v.state={subscribed:s(v.store.getState(),_),store:v.store,props:_},v}return I.getDerivedStateFromProps=function(_,b){return d&&d.length===2&&_!==b.props?{subscribed:s(b.store.getState(),_),props:_}:{props:_}},I.prototype.componentDidMount=function(){this.trySubscribe()},I.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},I.prototype.shouldComponentUpdate=function(_,b){return!M()(this.props,_)||!M()(this.state.subscribed,b.subscribed)},I.prototype.trySubscribe=function(){o&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},I.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},I.prototype.render=function(){var _=w(w(w({},this.props),this.state.subscribed),{store:this.store});return Z.createElement(R,w({},_,{ref:this.props.miniStoreForwardedRef}))},I.displayName="Connect("+m(R)+")",I.contextType=U,I}(Z.Component);if(u.forwardRef){var S=Z.forwardRef(function(D,I){return Z.createElement(O,w({},D,{miniStoreForwardedRef:I}))});return j()(S,R)}return j()(O,R)}}var c=function(){return c=Object.assign||function(d){for(var u,o=1,s=arguments.length;o<s;o++){u=arguments[o];for(var a in u)Object.prototype.hasOwnProperty.call(u,a)&&(d[a]=u[a])}return d},c.apply(this,arguments)};function r(d){var u=d,o=[];function s(O){u=c(c({},u),O);for(var S=0;S<o.length;S++)o[S]()}function a(){return u}function R(O){return o.push(O),function(){var D=o.indexOf(O);o.splice(D,1)}}return{setState:s,getState:a,subscribe:R}}},IBYe:function(We,se,B){"use strict";function Z(G){return null}se.a=Z},Iq15:function(We,se,B){var Z=B("nVVt"),G=B("dWSS"),U=B("dQei"),V={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},W={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,G18:1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,G15_MASK:1<<14|1<<12|1<<10|1<<4|1<<1,getBCHTypeInfo:function(M){for(var K=M<<10;W.getBCHDigit(K)-W.getBCHDigit(W.G15)>=0;)K^=W.G15<<W.getBCHDigit(K)-W.getBCHDigit(W.G15);return(M<<10|K)^W.G15_MASK},getBCHTypeNumber:function(M){for(var K=M<<12;W.getBCHDigit(K)-W.getBCHDigit(W.G18)>=0;)K^=W.G18<<W.getBCHDigit(K)-W.getBCHDigit(W.G18);return M<<12|K},getBCHDigit:function(M){for(var K=0;M!=0;)K++,M>>>=1;return K},getPatternPosition:function(M){return W.PATTERN_POSITION_TABLE[M-1]},getMask:function(M,K,j){switch(M){case V.PATTERN000:return(K+j)%2==0;case V.PATTERN001:return K%2==0;case V.PATTERN010:return j%3==0;case V.PATTERN011:return(K+j)%3==0;case V.PATTERN100:return(Math.floor(K/2)+Math.floor(j/3))%2==0;case V.PATTERN101:return K*j%2+K*j%3==0;case V.PATTERN110:return(K*j%2+K*j%3)%2==0;case V.PATTERN111:return(K*j%3+(K+j)%2)%2==0;default:throw new Error("bad maskPattern:"+M)}},getErrorCorrectPolynomial:function(M){for(var K=new G([1],0),j=0;j<M;j++)K=K.multiply(new G([1,U.gexp(j)],0));return K},getLengthInBits:function(M,K){if(1<=K&&K<10)switch(M){case Z.MODE_NUMBER:return 10;case Z.MODE_ALPHA_NUM:return 9;case Z.MODE_8BIT_BYTE:return 8;case Z.MODE_KANJI:return 8;default:throw new Error("mode:"+M)}else if(K<27)switch(M){case Z.MODE_NUMBER:return 12;case Z.MODE_ALPHA_NUM:return 11;case Z.MODE_8BIT_BYTE:return 16;case Z.MODE_KANJI:return 10;default:throw new Error("mode:"+M)}else if(K<41)switch(M){case Z.MODE_NUMBER:return 14;case Z.MODE_ALPHA_NUM:return 13;case Z.MODE_8BIT_BYTE:return 16;case Z.MODE_KANJI:return 12;default:throw new Error("mode:"+M)}else throw new Error("type:"+K)},getLostPoint:function(M){for(var K=M.getModuleCount(),j=0,n=0;n<K;n++)for(var w=0;w<K;w++){for(var m=0,f=M.isDark(n,w),p=-1;p<=1;p++){if(n+p<0||K<=n+p)continue;for(var c=-1;c<=1;c++){if(w+c<0||K<=w+c)continue;if(p==0&&c==0)continue;f==M.isDark(n+p,w+c)&&m++}}m>5&&(j+=3+m-5)}for(var n=0;n<K-1;n++)for(var w=0;w<K-1;w++){var r=0;M.isDark(n,w)&&r++,M.isDark(n+1,w)&&r++,M.isDark(n,w+1)&&r++,M.isDark(n+1,w+1)&&r++,(r==0||r==4)&&(j+=3)}for(var n=0;n<K;n++)for(var w=0;w<K-6;w++)M.isDark(n,w)&&!M.isDark(n,w+1)&&M.isDark(n,w+2)&&M.isDark(n,w+3)&&M.isDark(n,w+4)&&!M.isDark(n,w+5)&&M.isDark(n,w+6)&&(j+=40);for(var w=0;w<K;w++)for(var n=0;n<K-6;n++)M.isDark(n,w)&&!M.isDark(n+1,w)&&M.isDark(n+2,w)&&M.isDark(n+3,w)&&M.isDark(n+4,w)&&!M.isDark(n+5,w)&&M.isDark(n+6,w)&&(j+=40);for(var d=0,w=0;w<K;w++)for(var n=0;n<K;n++)M.isDark(n,w)&&d++;var u=Math.abs(100*d/K/K-50)/5;return j+=u*10,j}};We.exports=W},J66h:function(We,se,B){(function(Z){var G,U;(function(V,W){We.exports=W(V)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Z!="undefined"?Z:this,function(V){"use strict";V=V||{};var W=V.Base64,M="2.6.4",K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",j=function(g){for(var P={},k=0,y=g.length;k<y;k++)P[g.charAt(k)]=k;return P}(K),n=String.fromCharCode,w=function(g){if(g.length<2){var P=g.charCodeAt(0);return P<128?g:P<2048?n(192|P>>>6)+n(128|P&63):n(224|P>>>12&15)+n(128|P>>>6&63)+n(128|P&63)}else{var P=65536+(g.charCodeAt(0)-55296)*1024+(g.charCodeAt(1)-56320);return n(240|P>>>18&7)+n(128|P>>>12&63)+n(128|P>>>6&63)+n(128|P&63)}},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,f=function(g){return g.replace(m,w)},p=function(g){var P=[0,2,1][g.length%3],k=g.charCodeAt(0)<<16|(g.length>1?g.charCodeAt(1):0)<<8|(g.length>2?g.charCodeAt(2):0),y=[K.charAt(k>>>18),K.charAt(k>>>12&63),P>=2?"=":K.charAt(k>>>6&63),P>=1?"=":K.charAt(k&63)];return y.join("")},c=V.btoa&&typeof V.btoa=="function"?function(g){return V.btoa(g)}:function(g){if(g.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return g.replace(/[\s\S]{1,3}/g,p)},r=function(g){return c(f(String(g)))},d=function(g){return g.replace(/[+\/]/g,function(P){return P=="+"?"-":"_"}).replace(/=/g,"")},u=function(g,P){return P?d(r(g)):r(g)},o=function(g){return u(g,!0)},s;V.Uint8Array&&(s=function(g,P){for(var k="",y=0,A=g.length;y<A;y+=3){var F=g[y],T=g[y+1],Y=g[y+2],$=F<<16|T<<8|Y;k+=K.charAt($>>>18)+K.charAt($>>>12&63)+(typeof T!="undefined"?K.charAt($>>>6&63):"=")+(typeof Y!="undefined"?K.charAt($&63):"=")}return P?d(k):k});var a=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,R=function(g){switch(g.length){case 4:var P=(7&g.charCodeAt(0))<<18|(63&g.charCodeAt(1))<<12|(63&g.charCodeAt(2))<<6|63&g.charCodeAt(3),k=P-65536;return n((k>>>10)+55296)+n((k&1023)+56320);case 3:return n((15&g.charCodeAt(0))<<12|(63&g.charCodeAt(1))<<6|63&g.charCodeAt(2));default:return n((31&g.charCodeAt(0))<<6|63&g.charCodeAt(1))}},O=function(g){return g.replace(a,R)},S=function(g){var P=g.length,k=P%4,y=(P>0?j[g.charAt(0)]<<18:0)|(P>1?j[g.charAt(1)]<<12:0)|(P>2?j[g.charAt(2)]<<6:0)|(P>3?j[g.charAt(3)]:0),A=[n(y>>>16),n(y>>>8&255),n(y&255)];return A.length-=[0,0,2,1][k],A.join("")},D=V.atob&&typeof V.atob=="function"?function(g){return V.atob(g)}:function(g){return g.replace(/\S{1,4}/g,S)},I=function(g){return D(String(g).replace(/[^A-Za-z0-9\+\/]/g,""))},_=function(g){return O(D(g))},b=function(g){return String(g).replace(/[-_]/g,function(P){return P=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},v=function(g){return _(b(g))},h;V.Uint8Array&&(h=function(g){return Uint8Array.from(I(b(g)),function(P){return P.charCodeAt(0)})});var C=function(){var g=V.Base64;return V.Base64=W,g};if(V.Base64={VERSION:M,atob:I,btoa:c,fromBase64:v,toBase64:u,utob:f,encode:u,encodeURI:o,btou:O,decode:v,noConflict:C,fromUint8Array:s,toUint8Array:h},typeof Object.defineProperty=="function"){var x=function(g){return{value:g,enumerable:!1,writable:!0,configurable:!0}};V.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",x(function(){return v(this)})),Object.defineProperty(String.prototype,"toBase64",x(function(g){return u(this,g)})),Object.defineProperty(String.prototype,"toBase64URI",x(function(){return u(this,!0)}))}}return V.Meteor&&(Base64=V.Base64),We.exports?We.exports.Base64=V.Base64:!(G=[],U=function(){return V.Base64}.apply(se,G),U!==void 0&&(We.exports=U)),{Base64:V.Base64}})}).call(this,B("IyRk"))},JWDV:function(We,se,B){We.exports=B.p+"static/charpter-white.5fa14f93.svg"},JYp7:function(We,se,B){"use strict";B.d(se,"a",function(){return Z});var Z;(function(G){function U(a){return a&&typeof a=="object"&&typeof a[Symbol.iterator]=="function"}G.is=U;const V=Object.freeze([]);function W(){return V}G.empty=W;function*M(a){yield a}G.single=M;function K(a){return a||V}G.from=K;function j(a){return!a||a[Symbol.iterator]().next().done===!0}G.isEmpty=j;function n(a){return a[Symbol.iterator]().next().value}G.first=n;function w(a,R){for(const O of a)if(R(O))return!0;return!1}G.some=w;function m(a,R){for(const O of a)if(R(O))return O;return}G.find=m;function*f(a,R){for(const O of a)R(O)&&(yield O)}G.filter=f;function*p(a,R){let O=0;for(const S of a)yield R(S,O++)}G.map=p;function*c(...a){for(const R of a)for(const O of R)yield O}G.concat=c;function*r(a){for(const R of a)for(const O of R)yield O}G.concatNested=r;function d(a,R,O){let S=O;for(const D of a)S=R(S,D);return S}G.reduce=d;function*u(a,R,O=a.length){for(R<0&&(R+=a.length),O<0?O+=a.length:O>a.length&&(O=a.length);R<O;R++)yield a[R]}G.slice=u;function o(a,R=Number.POSITIVE_INFINITY){const O=[];if(R===0)return[O,a];const S=a[Symbol.iterator]();for(let D=0;D<R;D++){const I=S.next();if(I.done)return[O,G.empty()];O.push(I.value)}return[O,{[Symbol.iterator](){return S}}]}G.consume=o;function s(a,R,O=(S,D)=>S===D){const S=a[Symbol.iterator](),D=R[Symbol.iterator]();for(;;){const I=S.next(),_=D.next();if(I.done!==_.done)return!1;if(I.done)return!0;if(!O(I.value,_.value))return!1}}G.equals=s})(Z||(Z={}))},JeFH:function(We,se){We.exports="data:image/png;base64,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"},Jq4h:function(We,se,B){We.exports=B.p+"static/qrcode.2267e4d5.png"},LdHM:function(We,se,B){"use strict";B.d(se,"b",function(){return a}),B.d(se,"a",function(){return O});var Z=B("1OyB"),G=B("vuIU"),U=B("Ji7U"),V=B("LK+K"),W=B("q1tI"),M=B("rePB"),K=B("Ff2n"),j=B("ODXe"),n=B("4IlW"),w=B("bX4T"),m=B("YrtM"),f=B("TSYQ"),p=B.n(f),c=B("+nKL"),r=B("8OUc"),d=function(Y,$){var le=Y.prefixCls,de=Y.id,Pe=Y.flattenOptions,Se=Y.childrenAsData,we=Y.values,Fe=Y.searchValue,Me=Y.multiple,me=Y.defaultActiveFirstOption,pe=Y.height,ne=Y.itemHeight,Ee=Y.notFoundContent,ae=Y.open,ke=Y.menuItemSelectedIcon,je=Y.virtual,Oe=Y.onSelect,Ve=Y.onToggleOpen,qe=Y.onActiveValue,ue=Y.onScroll,ve=Y.onMouseEnter,De="".concat(le,"-item"),Ne=Object(m.a)(function(){return Pe},[ae,Pe],function(Xe,Ce){return Ce[0]&&Xe[1]!==Ce[1]}),it=W.useRef(null),pt=function(Ce){Ce.preventDefault()},mt=function(Ce){it.current&&it.current.scrollTo({index:Ce})},dt=function(Ce){for(var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,be=Ne.length,ie=0;ie<be;ie+=1){var oe=(Ce+ie*ge+be)%be,fe=Ne[oe],ye=fe.group,Ae=fe.data;if(!ye&&!Ae.disabled)return oe}return-1},Tt=W.useState(function(){return dt(0)}),St=Object(j.a)(Tt,2),Ue=St[0],Ie=St[1],tt=function(Ce){Ie(Ce);var ge=Ne[Ce];if(!ge){qe(null,-1);return}qe(ge.data.value,Ce)};W.useEffect(function(){tt(me!==!1?dt(0):-1)},[Ne.length,Fe]),W.useEffect(function(){var Xe=setTimeout(function(){if(!Me&&ae&&we.size===1){var Ce=Array.from(we)[0],ge=Ne.findIndex(function(be){var ie=be.data;return ie.value===Ce});tt(ge),mt(ge)}});return function(){return clearTimeout(Xe)}},[ae]);var lt=function(Ce){Ce!==void 0&&Oe(Ce,{selected:!we.has(Ce)}),Me||Ve(!1)};if(W.useImperativeHandle($,function(){return{onKeyDown:function(Ce){var ge=Ce.which;switch(ge){case n.a.UP:case n.a.DOWN:{var be=0;if(ge===n.a.UP?be=-1:ge===n.a.DOWN&&(be=1),be!==0){var ie=dt(Ue+be,be);mt(ie),tt(ie)}break}case n.a.ENTER:{var oe=Ne[Ue];oe&&!oe.data.disabled?lt(oe.data.value):lt(void 0),ae&&Ce.preventDefault();break}case n.a.ESC:Ve(!1)}},onKeyUp:function(){},scrollTo:function(Ce){mt(Ce)}}}),Ne.length===0)return W.createElement("div",{role:"listbox",id:"".concat(de,"_list"),className:"".concat(De,"-empty"),onMouseDown:pt},Ee);function Ke(Xe){var Ce=Ne[Xe];if(!Ce)return null;var ge=Ce.data||{},be=ge.value,ie=ge.label,oe=ge.children,fe=Object(w.a)(ge,!0),ye=Se?oe:ie;return Ce?W.createElement("div",Object.assign({"aria-label":typeof ye=="string"?ye:null},fe,{key:Xe,role:"option",id:"".concat(de,"_list_").concat(Xe),"aria-selected":we.has(be)}),be):null}return W.createElement(W.Fragment,null,W.createElement("div",{role:"listbox",id:"".concat(de,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ke(Ue-1),Ke(Ue),Ke(Ue+1)),W.createElement(c.a,{itemKey:"key",ref:it,data:Ne,height:pe,itemHeight:ne,fullHeight:!1,onMouseDown:pt,onScroll:ue,virtual:je,onMouseEnter:ve},function(Xe,Ce){var ge,be=Xe.group,ie=Xe.groupOption,oe=Xe.data,fe=oe.label,ye=oe.key;if(be)return W.createElement("div",{className:p()(De,"".concat(De,"-group"))},fe!==void 0?fe:ye);var Ae=oe.disabled,Ge=oe.value,ot=oe.title,wt=oe.children,Dt=oe.style,At=oe.className,vt=Object(K.a)(oe,["disabled","value","title","children","style","className"]),$e=we.has(Ge),et="".concat(De,"-option"),Ye=p()(De,et,At,(ge={},Object(M.a)(ge,"".concat(et,"-grouped"),ie),Object(M.a)(ge,"".concat(et,"-active"),Ue===Ce&&!Ae),Object(M.a)(ge,"".concat(et,"-disabled"),Ae),Object(M.a)(ge,"".concat(et,"-selected"),$e),ge)),ce=Se?wt:fe,xe=!ke||typeof ke=="function"||$e;return W.createElement("div",Object.assign({},vt,{"aria-selected":$e,className:Ye,title:ot,onMouseMove:function(){if(Ue===Ce||Ae)return;tt(Ce)},onClick:function(){Ae||lt(Ge)},style:Dt}),W.createElement("div",{className:"".concat(et,"-content")},ce||Ge),W.isValidElement(ke)||$e,xe&&W.createElement(r.a,{className:"".concat(De,"-option-state"),customizeIcon:ke,customizeIconProps:{isSelected:$e}},$e?"\u2713":null))}))},u=W.forwardRef(d);u.displayName="OptionList";var o=u,s=function(){return null};s.isSelectOption=!0;var a=s,R=function(){return null};R.isSelectOptGroup=!0;var O=R,S=B("VTBJ"),D=B("Zm9Q");function I(T){var Y=T.key,$=T.props,le=$.children,de=$.value,Pe=Object(K.a)($,["children","value"]);return Object(S.a)({key:Y,value:de!==void 0?de:Y,children:le},Pe)}function _(T){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(D.a)(T).map(function($,le){if(!W.isValidElement($)||!$.type)return null;var de=$.type.isSelectOptGroup,Pe=$.key,Se=$.props,we=Se.children,Fe=Object(K.a)(Se,["children"]);return Y||!de?I($):Object(S.a)(Object(S.a)({key:"__RC_SELECT_GRP__".concat(Pe===null?le:Pe,"__"),label:Pe},Fe),{},{options:_(we)})}).filter(function($){return $})}var b=B("2Qr1"),v=B("qNPg"),h=B("U8pU"),C=B("Kwbf"),x=B("WKfj");function g(T){var Y=T.mode,$=T.options,le=T.children,de=T.backfill,Pe=T.allowClear,Se=T.placeholder,we=T.getInputElement,Fe=T.showSearch,Me=T.onSearch,me=T.defaultOpen,pe=T.autoFocus,ne=T.labelInValue,Ee=T.value,ae=T.inputValue,ke=T.optionLabelProp,je=Y==="multiple"||Y==="tags",Oe=Fe!==void 0?Fe:je||Y==="combobox",Ve=$||_(le);if(Object(C.a)(Y!=="tags"||Ve.every(function(De){return!De.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Y==="tags"||Y==="combobox"){var qe=Ve.some(function(De){return De.options?De.options.some(function(Ne){return typeof("value"in Ne?Ne.value:Ne.key)=="number"}):typeof("value"in De?De.value:De.key)=="number"});Object(C.a)(!qe,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)(Y!=="combobox"||!ke,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)(Y==="combobox"||!de,"`backfill` only works with `combobox` mode."),Object(C.a)(Y==="combobox"||!we,"`getInputElement` only work with `combobox` mode."),Object(C.b)(Y!=="combobox"||!we||!Pe||!Se,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Me&&!Oe&&Y!=="combobox"&&Y!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!me||pe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ee!=null){var ue=Object(x.d)(Ee);Object(C.a)(!ne||ue.every(function(De){return Object(h.a)(De)==="object"&&("key"in De||"value"in De)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!je||Array.isArray(Ee),"`value` should be array when `mode` is `multiple` or `tags`")}if(le){var ve=null;Object(D.a)(le).some(function(De){if(!W.isValidElement(De)||!De.type)return!1;var Ne=De.type;if(Ne.isSelectOption)return!1;if(Ne.isSelectOptGroup){var it=Object(D.a)(De.props.children).every(function(pt){return!W.isValidElement(pt)||!De.type||pt.type.isSelectOption?!0:(ve=pt.type,!1)});return!it}return ve=Ne,!0}),ve&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ve.displayName||ve.name||ve,"`.")),Object(C.a)(ae===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var P=g,k=Object(v.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:_,flattenOptions:b.d,getLabeledValue:b.e,filterOptions:b.b,isValueDisabled:b.g,findValueOption:b.c,warningProps:P,fillOptionsWithMissingValue:b.a}),y=function(T){Object(U.a)($,T);var Y=Object(V.a)($);function $(){var le;return Object(Z.a)(this,$),le=Y.apply(this,arguments),le.selectRef=W.createRef(),le.focus=function(){le.selectRef.current.focus()},le.blur=function(){le.selectRef.current.blur()},le}return Object(G.a)($,[{key:"render",value:function(){return W.createElement(k,Object.assign({ref:this.selectRef},this.props))}}]),$}(W.Component);y.Option=a,y.OptGroup=O;var A=y,F=se.c=A},M8RZ:function(We,se,B){"use strict";B.d(se,"a",function(){return n});var Z=B("fWQN"),G=B("mtLc"),U=B("yKVA"),V=B("879j"),W=B("q1tI"),M=B.n(W),K=B("i8i4"),j=B.n(K),n=function(w){Object(U.a)(f,w);var m=Object(V.a)(f);function f(p){var c;Object(Z.a)(this,f),c=m.call(this,p);var r=window.document;return c.node=r.createElement("div"),r.body.appendChild(c.node),c}return Object(G.a)(f,[{key:"render",value:function(){var c=this.props.children;return Object(K.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),f}(M.a.Component)},MI8n:function(We,se,B){"use strict";B.d(se,"c",function(){return W}),B.d(se,"b",function(){return n}),B.d(se,"e",function(){return w}),B.d(se,"a",function(){return m}),B.d(se,"d",function(){return f}),B.d(se,"f",function(){return p});var Z=B("/cxE"),G=B("pmY6"),U=B("24hK"),V=B("5Y4S"),W;(function(c){c.None=()=>G.a.None;function r(g){return(P,k=null,y)=>{let A=!1,F;return F=g(T=>A?void 0:(F?F.dispose():A=!0,P.call(k,T)),null,y),A&&F.dispose(),F}}c.once=r;function d(g,P){return O((k,y=null,A)=>g(F=>k.call(y,P(F)),null,A))}c.map=d;function u(g,P){return O((k,y=null,A)=>g(F=>{P(F),k.call(y,F)},null,A))}c.forEach=u;function o(g,P){return O((k,y=null,A)=>g(F=>P(F)&&k.call(y,F),null,A))}c.filter=o;function s(g){return g}c.signal=s;function a(...g){return(P,k=null,y)=>Object(G.e)(...g.map(A=>A(F=>P.call(k,F),null,y)))}c.any=a;function R(g,P,k){let y=k;return d(g,A=>(y=P(y,A),y))}c.reduce=R;function O(g){let P;const k=new n({onFirstListenerAdd(){P=g(k.fire,k)},onLastListenerRemove(){P.dispose()}});return k.event}function S(g,P,k=100,y=!1,A){let F,T,Y,$=0;const le=new n({leakWarningThreshold:A,onFirstListenerAdd(){F=g(de=>{$++,T=P(T,de),y&&!Y&&(le.fire(T),T=void 0),clearTimeout(Y),Y=setTimeout(()=>{const Pe=T;T=void 0,Y=void 0,(!y||$>1)&&le.fire(Pe),$=0},k)})},onLastListenerRemove(){F.dispose()}});return le.event}c.debounce=S;function D(g,P=(k,y)=>k===y){let k=!0,y;return o(g,A=>{const F=k||!P(A,y);return k=!1,y=A,F})}c.latch=D;function I(g,P){return[c.filter(g,P),c.filter(g,k=>!P(k))]}c.split=I;function _(g,P=!1,k=[]){let y=k.slice(),A=g(Y=>{y?y.push(Y):T.fire(Y)});const F=()=>{y&&y.forEach(Y=>T.fire(Y)),y=null},T=new n({onFirstListenerAdd(){A||(A=g(Y=>T.fire(Y)))},onFirstListenerDidAdd(){y&&(P?setTimeout(F):F())},onLastListenerRemove(){A&&A.dispose(),A=null}});return T.event}c.buffer=_;class b{constructor(g){this.event=g}map(g){return new b(d(this.event,g))}forEach(g){return new b(u(this.event,g))}filter(g){return new b(o(this.event,g))}reduce(g,P){return new b(R(this.event,g,P))}latch(){return new b(D(this.event))}debounce(g,P=100,k=!1,y){return new b(S(this.event,g,P,k,y))}on(g,P,k){return this.event(g,P,k)}once(g,P,k){return r(this.event)(g,P,k)}}function v(g){return new b(g)}c.chain=v;function h(g,P,k=y=>y){const y=(...Y)=>T.fire(k(...Y)),A=()=>g.on(P,y),F=()=>g.removeListener(P,y),T=new n({onFirstListenerAdd:A,onLastListenerRemove:F});return T.event}c.fromNodeEventEmitter=h;function C(g,P,k=y=>y){const y=(...Y)=>T.fire(k(...Y)),A=()=>g.addEventListener(P,y),F=()=>g.removeEventListener(P,y),T=new n({onFirstListenerAdd:A,onLastListenerRemove:F});return T.event}c.fromDOMEventEmitter=C;function x(g){return new Promise(P=>r(g)(P))}c.toPromise=x})(W||(W={}));class M{constructor(c){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${c}_${M._idPool++}`}start(c){this._stopWatch=new V.a(!0),this._listenerCount=c}stop(){if(this._stopWatch){const c=this._stopWatch.elapsed();this._elapsedOverall+=c,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${c.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}M._idPool=0;let K=-1;class j{constructor(c,r=Math.random().toString(18).slice(2,5)){this.customThreshold=c,this.name=r,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(c){let r=K;if(typeof this.customThreshold=="number"&&(r=this.customThreshold),r<=0||c<r)return;this._stacks||(this._stacks=new Map);const d=new Error().stack.split(`
`).slice(3).join(`
`),u=this._stacks.get(d)||0;if(this._stacks.set(d,u+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;let o,s=0;for(const[a,R]of this._stacks)(!o||s<R)&&(o=a,s=R);console.warn(`[${this.name}] potential listener LEAK detected, having ${c} listeners already. MOST frequent listener (${s}):`),console.warn(o)}return()=>{const o=this._stacks.get(d)||0;this._stacks.set(d,o-1)}}}class n{constructor(c){var r;this._disposed=!1,this._options=c,this._leakageMon=K>0?new j(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((r=this._options)===null||r===void 0?void 0:r._profName)?new M(this._options._profName):void 0}get event(){return this._event||(this._event=(c,r,d)=>{var u;this._listeners||(this._listeners=new U.a);const o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(r?[c,r]:c);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,c,r);const a=(u=this._leakageMon)===null||u===void 0?void 0:u.check(this._listeners.size),R=Object(G.i)(()=>{if(a&&a(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){const O=this._listeners&&!this._listeners.isEmpty();O||this._options.onLastListenerRemove(this)}});return d instanceof G.b?d.add(R):Array.isArray(d)&&d.push(R),R}),this._event}fire(c){var r,d;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new U.a);for(let u of this._listeners)this._deliveryQueue.push([u,c]);for((r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[u,o]=this._deliveryQueue.shift();try{typeof u=="function"?u.call(void 0,o):u[0].call(u[1],o)}catch(s){Object(Z.f)(s)}}(d=this._perfMon)===null||d===void 0||d.stop()}}dispose(){var c,r,d,u,o;this._disposed||(this._disposed=!0,(c=this._listeners)===null||c===void 0||c.clear(),(r=this._deliveryQueue)===null||r===void 0||r.clear(),(u=(d=this._options)===null||d===void 0?void 0:d.onLastListenerRemove)===null||u===void 0||u.call(d),(o=this._leakageMon)===null||o===void 0||o.dispose())}}class w extends n{constructor(c){super(c);this._isPaused=0,this._eventQueue=new U.a,this._mergeFn=c==null?void 0:c.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const c=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(c))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(c){this._listeners&&(this._isPaused!==0?this._eventQueue.push(c):super.fire(c))}}class m extends w{constructor(c){var r;super(c);this._delay=(r=c.delay)!==null&&r!==void 0?r:100}fire(c){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(c)}}class f{constructor(){this.buffers=[]}wrapEvent(c){return(r,d,u)=>c(o=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>r.call(d,o)):r.call(d,o)},void 0,u)}bufferEvents(c){const r=[];this.buffers.push(r);const d=c();return this.buffers.pop(),r.forEach(u=>u()),d}}class p{constructor(){this.listening=!1,this.inputEvent=W.None,this.inputEventListener=G.a.None,this.emitter=new n({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(c){this.inputEvent=c,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=c(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(We,se,B){"use strict";(function(Z,G){B.d(se,"b",function(){return d}),B.d(se,"i",function(){return a}),B.d(se,"f",function(){return R}),B.d(se,"d",function(){return O}),B.d(se,"g",function(){return S}),B.d(se,"h",function(){return D}),B.d(se,"c",function(){return I}),B.d(se,"k",function(){return _}),B.d(se,"j",function(){return b}),B.d(se,"a",function(){return v}),B.d(se,"e",function(){return x});var U;const V="en";let W=!1,M=!1,K=!1,j=!1,n=!1,w=!1,m=!1,f,p=V,c,r;const d=typeof self=="object"?self:typeof Z=="object"?Z:{};let u;typeof d.vscode!="undefined"&&typeof d.vscode.process!="undefined"?u=d.vscode.process:typeof G!="undefined"&&(u=G);const o=typeof((U=u==null?void 0:u.versions)===null||U===void 0?void 0:U.electron)=="string"&&u.type==="renderer";if(typeof navigator=="object"&&!o)r=navigator.userAgent,W=r.indexOf("Windows")>=0,M=r.indexOf("Macintosh")>=0,m=(r.indexOf("Macintosh")>=0||r.indexOf("iPad")>=0||r.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,K=r.indexOf("Linux")>=0,w=!0,f=navigator.language,p=f;else if(typeof u=="object"){W=u.platform==="win32",M=u.platform==="darwin",K=u.platform==="linux",j=K&&!!u.env.SNAP&&!!u.env.SNAP_REVISION,f=V,p=V;const g=u.env.VSCODE_NLS_CONFIG;if(g)try{const P=JSON.parse(g),k=P.availableLanguages["*"];f=P.locale,p=k||V,c=P._translationsConfigFile}catch(P){}n=!0}else console.error("Unable to resolve platform.");let s=0;M?s=1:W?s=3:K&&(s=2);const a=W,R=M,O=K,S=n,D=w,I=m,_=r,b=function(){if(d.setImmediate)return d.setImmediate.bind(d);if(typeof d.postMessage=="function"&&!d.importScripts){let k=[];d.addEventListener("message",A=>{if(A.data&&A.data.vscodeSetImmediateId)for(let F=0,T=k.length;F<T;F++){const Y=k[F];if(Y.id===A.data.vscodeSetImmediateId){k.splice(F,1),Y.callback();return}}});let y=0;return A=>{const F=++y;k.push({id:F,callback:A}),d.postMessage({vscodeSetImmediateId:F},"*")}}if(typeof(u==null?void 0:u.nextTick)=="function")return u.nextTick.bind(u);const P=Promise.resolve();return k=>P.then(k)}(),v=M||m?2:W?1:3;let h=!0,C=!1;function x(){if(!C){C=!0;const g=new Uint8Array(2);g[0]=1,g[1]=2;const P=new Uint16Array(g.buffer);h=P[0]===(2<<8)+1}return h}}).call(this,B("IyRk"),B("Q2Ig"))},MvOs:function(We,se,B){"use strict";B.r(se);var Z=B("/zsF"),G=B("PArb"),U=B("sPJy"),V=B("bE4q"),W=B("+L6B"),M=B("2/Rp"),K=B("14J3"),j=B("BMrR"),n=B("jCWc"),w=B("kPKH"),m=B("5Dmo"),f=B("3S7+"),p=B("sRBo"),c=B("kaz8"),r=B("T2oS"),d=B("W9HT"),u=B("7Kak"),o=B("9yH6"),s=B("MXD1"),a=B("CFYs"),R=B("miYZ"),O=B("tsqr"),S=B("k1fw"),D=B("9og8"),I=B("2qtc"),_=B("kLXV"),b=B("tJVT"),v=B("PpiC"),h=B("5NDa"),C=B("5rEg"),x=B("aHsQ"),g=B("sGsY"),P=B("WmNS"),k=B.n(P),y=B("q1tI"),A=B.n(y),F=B("Ty5D"),T=B("55Ip"),Y=B("9kvl"),$=B("D1Df"),le=B.n($),de=B("Icgb"),Pe=B("gUdW"),Se=B("xGfz"),we=B("jhfD"),Fe=B("Llu2"),Me=B("BlwA"),me=B("bPs0"),pe=B("wd/R"),ne=B.n(pe),Ee=B("V5fa"),ae=B.n(Ee),ke=B("1vsH"),je=B("s8TD"),Oe=B("xKgJ"),Ve=B("bntm"),qe=B("V0Rq"),ue=B("HBuW"),ve=B("9Bee"),De=B("Ot1p"),Ne=function(Be){var Ze,nt,ut,Et,st=Be.item,Ut=Be.answerData,Zt=Be.isEducation,Rt=Be.onBlur,qt=Rt===void 0?function(){}:Rt,Qt=Object(y.useRef)(""),en=Object(y.useState)(),Yt=Object(b.a)(en,2),cn=Yt[0],Sn=Yt[1],kn=Object(y.useState)(!1),gt=Object(b.a)(kn,2),Wt=gt[0],Jt=gt[1],tn=Object(y.useState)(Zt||!1),nn=Object(b.a)(tn,2),pn=nn[0],X=nn[1],L=Object(y.useRef)(),N=function(){clearInterval(L.current),L.current=setInterval(function(){Wt&&qt(Qt.current)},10*1e3)},z=function(Q){qt(Qt.current);var Re="\u786E\u5B9A\u79BB\u5F00\u6B64\u9875\u9762\u5417?\u6B64\u9875\u6570\u636E\u53EF\u80FD\u4F1A\u4E22\u5931";return(Q||window.event).returnValue=Re,Re};return Object(y.useEffect)(function(){console.log("isFocus:",Wt),Wt&&N()},[Wt]),Object(y.useEffect)(function(){Sn(st==null?void 0:st.a_flag)},[st==null?void 0:st.a_flag]),Object(y.useEffect)(function(){return function(){clearInterval(L.current)}},[]),A.a.createElement("div",null,(Ut==null||((Ze=Ut.exercise)===null||Ze===void 0)?void 0:Ze.user_exercise_status)===1?A.a.createElement("div",null,A.a.createElement("p",{className:"mt10 mb0"},"\u6211\u7684\u7B54\u6848\uFF1A"),A.a.createElement("div",{className:ae.a.simpleText},A.a.createElement(ve.a,{value:st==null||((nt=st.user_answer)===null||nt===void 0)?void 0:nt[0]}))):A.a.createElement("div",{className:st.user_score&&(st.user_score===st.question_score?"c-green":"c-red")},pn?A.a.createElement(De.a,{watch:!0,isFocus:!0,defaultValue:st==null||((ut=st.user_answer)===null||ut===void 0)?void 0:ut[0],id:st==null?void 0:st.question_id,onChange:function(Q){Qt.current=Q,Jt(!0)},onBlur:function(){qt(Qt.current),clearInterval(L.current),Jt(!1)}}):A.a.createElement("div",{onClick:function(){var Q;if(!st.repeat_answer&&(st==null||((Q=st.user_answer)===null||Q===void 0)?void 0:Q.length)>0&&!st.israp)return;X(!0)},className:ae.a.startAnswer},A.a.createElement("div",{className:"c-blue"},"\u70B9\u51FB\u5F00\u59CB\u4F5C\u7B54"))),Object(Oe.s)()&&(st==null?void 0:st.standard_answer)&&A.a.createElement("div",null,A.a.createElement("p",{className:"mt10 mb0"},"\u53C2\u8003\u7B54\u6848\uFF1A"),A.a.createElement("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5}},A.a.createElement(ve.a,{value:st==null||((Et=st.standard_answer)===null||Et===void 0)?void 0:Et[0]}))))},it=Ne,pt=B("OaEy"),mt=B("2fM7"),dt=function(Be){var Ze,nt,ut,Et,st=Be.item,Ut=Be.answerData,Zt=Be.isEducation,Rt=Be.onBlur,qt=Rt===void 0?function(){}:Rt,Qt=Object(y.useRef)(""),en=Object(y.useState)(),Yt=Object(b.a)(en,2),cn=Yt[0],Sn=Yt[1],kn=Object(y.useState)(!1),gt=Object(b.a)(kn,2),Wt=gt[0],Jt=gt[1],tn=Object(y.useState)(!1),nn=Object(b.a)(tn,2),pn=nn[0],X=nn[1],L=Object(y.useState)(Zt||!1),N=Object(b.a)(L,2),z=N[0],te=N[1],Q=Object(y.useState)(0),Re=Object(b.a)(Q,2),ct=Re[0],Ct=Re[1],Pt=Object(y.useRef)(st.kp_content||""),ht=Object(y.useRef)(st.kp_clazz),Vt=Object(y.useRef)(),rn=Object(y.useMemo)(function(){var Cn,En;return(Cn=Qt.current)===null||Cn===void 0||((En=Cn.replace(/[\n|\r|\t]/g,""))===null||En===void 0)?void 0:En.length},[Qt.current]),An=function(){clearInterval(Vt.current),Vt.current=setInterval(function(){pn&&qt(Qt.current,Pt.current,ht.current)},30*1e3)};return Object(y.useEffect)(function(){console.log("isFocus:",pn),An()},[pn]),Object(y.useEffect)(function(){Sn(st==null?void 0:st.a_flag)},[st==null?void 0:st.a_flag]),Object(y.useEffect)(function(){return function(){clearInterval(Vt.current)}},[]),A.a.createElement("div",null,(Ut==null||((Ze=Ut.exercise)===null||Ze===void 0)?void 0:Ze.user_exercise_status)===1?A.a.createElement("div",null,A.a.createElement("div",{className:"mt30"},A.a.createElement("strong",null,"\u4F5C\u6587\u9898\u76EE\uFF1A"),A.a.createElement("br",null),A.a.createElement(C.a,{disabled:!0,className:"mt10",value:Pt.current,onChange:function(En){Pt.current=En.target.value,Ct(ct+1)},onBlur:function(){qt(Qt.current,Pt.current,ht.current),X(!1)}})),A.a.createElement("div",{className:"mt30"},A.a.createElement("strong",null,"\u4F5C\u54C1\u7C7B\u578B\uFF1A"),A.a.createElement("br",null),A.a.createElement(mt.a,{disabled:!0,className:"mt10 w100",placeholder:"\u8BF7\u9009\u62E9\u4F5C\u54C1\u7C7B\u578B",value:ht.current,onChange:function(En){ht.current=En,Ct(ct+1)},onBlur:function(){qt(Qt.current,Pt.current,ht.current),X(!1)}},A.a.createElement(mt.a.Option,{key:1,value:"\u79D1\u666E"},"\u79D1\u666E"),A.a.createElement(mt.a.Option,{key:2,value:"\u79D1\u5E7B"},"\u79D1\u5E7B"))),A.a.createElement("p",{className:"mt10 mb0"},"\u4F5C\u54C1\u5185\u5BB9\uFF1A"),A.a.createElement("div",{className:ae.a.simpleText},A.a.createElement(ve.a,{value:st==null||((nt=st.user_answer)===null||nt===void 0)?void 0:nt[0]}))):A.a.createElement("div",null,A.a.createElement("div",{className:"mt30"},A.a.createElement("strong",null,"\u4F5C\u6587\u9898\u76EE\uFF1A"),A.a.createElement("br",null),A.a.createElement(C.a,{className:"mt10",maxLength:60,onBlur:function(){return qt(Qt.current,Pt.current,ht.current)},placeholder:"\u8BF7\u8F93\u5165\u4F5C\u6587\u9898\u76EE(\u6700\u591A60\u4E2A\u5B57)",value:Pt.current,onChange:function(En){Pt.current=En.target.value,Ct(ct+1)}})),A.a.createElement("div",{className:"mt30"},A.a.createElement("strong",null,"\u4F5C\u6587\u7C7B\u578B\uFF1A"),A.a.createElement("br",null),A.a.createElement(mt.a,{className:"mt10 w100",placeholder:"\u8BF7\u9009\u62E9\u4F5C\u54C1\u7C7B\u578B",value:ht.current,onChange:function(En){ht.current=En,qt(En.current,Pt.current,ht.current),Ct(ct+1)}},A.a.createElement(mt.a.Option,{key:1,value:"\u79D1\u666E"},"\u79D1\u666E"),A.a.createElement(mt.a.Option,{key:2,value:"\u79D1\u5E7B"},"\u79D1\u5E7B"))),A.a.createElement("div",{className:"mt30 mb20"},A.a.createElement("div",{className:st.user_score&&(st.user_score===st.question_score?"c-green":"c-red")},A.a.createElement("strong",null,"\u4F5C\u6587\u5185\u5BB9\uFF1A"),A.a.createElement("br",null),A.a.createElement("div",{className:"mt10 relative"},A.a.createElement("span",{className:"c-blue",style:{position:Wt?"fixed":"absolute",top:Wt?61:4,left:10,zIndex:106}},"\u5DF2\u8F93\u5165",rn,"\u5B57"),z?A.a.createElement(De.a,{className:ae.a.simpleMd,disablePaste:!0,hidetoolBar:Zt,height:Zt?"60vh":150,isFocus:!0,defaultValue:st==null||((ut=st.user_answer)===null||ut===void 0)?void 0:ut[0],id:st==null?void 0:st.question_id,onFullScreen:function(En){return Jt(En)},onChange:function(En){Qt.current=En,X(!0),Ct(ct+1)},onBlur:function(){qt(Qt.current,Pt.current,ht.current),X(!1)}}):A.a.createElement("div",{onClick:function(){return te(!0)},className:ae.a.startAnswer},A.a.createElement("div",{className:"c-blue"},"\u70B9\u51FB\u5F00\u59CB\u4F5C\u7B54")))))),Object(Oe.s)()&&(st==null?void 0:st.standard_answer)&&A.a.createElement("div",null,A.a.createElement("p",{className:"mt10 mb0"},"\u53C2\u8003\u7B54\u6848\uFF1A"),A.a.createElement("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5}},A.a.createElement(ve.a,{value:st==null||((Et=st.standard_answer)===null||Et===void 0)?void 0:Et[0]}))))},Tt=dt,St=B("g9YV"),Ue=B("wCAj"),Ie=B("5GOC"),tt=B("JsLm"),lt=B("ZW9T"),Ke=B("o5mm"),Xe=B.n(Ke),Ce=function(Be){var Ze,nt,ut,Et,st=Be.item,Ut=Be.answerData,Zt=Object(y.useState)([]),Rt=Object(b.a)(Zt,2),qt=Rt[0],Qt=Rt[1],en=Object(y.useState)([]),Yt=Object(b.a)(en,2),cn=Yt[0],Sn=Yt[1];Object(y.useEffect)(function(){var Jt;if(!(st!=null&&(Jt=st.shixun_details)!==null&&Jt!==void 0&&Jt.length))return;for(var tn=[],nn=[],pn=0;pn<(st==null||((X=st.shixun_details)===null||X===void 0)?void 0:X.length);pn++){for(var X,L,N,z=0;z<(st==null?void 0:st.shixun_details[pn].stage_list.length);z++){var te,Q,Re,ct,Ct=st==null?void 0:st.shixun_details[pn].stage_list[z];tn.push(Object(S.a)(Object(S.a)({},Ct),{operation:st==null||((te=st.shixun_details)===null||te===void 0||((Q=te[pn])===null||Q===void 0||((Re=Q.shixun_detail)===null||Re===void 0||((ct=Re[0])===null||ct===void 0))))?void 0:ct.game_identifier}))}if(st!=null&&(L=st.shixun_details)!==null&&L!==void 0&&(N=L[pn])!==null&&N!==void 0&&N.shixun_detail){var Pt,ht,Vt;nn.push(st==null||((Pt=st.shixun_details)===null||Pt===void 0||((ht=Pt[pn])===null||ht===void 0||((Vt=ht.shixun_detail)===null||Vt===void 0)))?void 0:Vt[0])}}Sn(nn),Qt(tn)},[st==null?void 0:st.shixun_details]);var kn=[{title:"\u5173\u5361",dataIndex:"position",key:"position",align:"center"},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",align:"center",render:function(tn){return A.a.createElement("span",{className:"overflowHidden1",style:{maxWidth:"400px"},title:tn&&tn.length>25?tn:""},tn)}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",key:"evaluate_count",align:"center",render:function(tn,nn){return A.a.createElement("span",null,nn.evaluate_count?nn.evaluate_count:A.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u5B8C\u6210\u65F6\u95F4",key:"endTime",dataIndex:"endTime",align:"center",render:function(tn,nn){var pn=!1;return nn.finished_time&&Ut!==null&&Ut!==void 0&&Ut.exercise&&Ut!==null&&Ut!==void 0&&Ut.exercise_answer_user&&((Ut==null?void 0:Ut.exercise.time)===-1?pn=ne()(Ut==null?void 0:Ut.exercise.end_time).isBefore(nn.finished_time):pn=ne()(Ut==null?void 0:Ut.exercise_answer_user.start_at).add(Ut==null?void 0:Ut.exercise.time,"m").isBefore(nn.finished_time)),A.a.createElement("span",null,nn.finished_time||A.a.createElement("span",{className:"c-grey-999"},"--"),A.a.createElement("span",{className:"c-orange-ff9 "},pn?"\uFF08\u5DF2\u8D85\u65F6\uFF09":""))}},{title:"\u8017\u65F6",dataIndex:"time_consuming",key:"time_consuming",align:"center",render:function(tn,nn){return A.a.createElement("span",null,nn.time_consuming||A.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",key:"view_answer",align:"center",render:function(tn,nn){return A.a.createElement("span",null,nn.view_answer?"\u5DF2\u67E5\u770B":"\u672A\u67E5\u770B")}},{title:"\u64CD\u4F5C",dataIndex:"operation",key:"operation",align:"center",render:function(tn,nn,pn){return tn?A.a.createElement(tt.a,{affix:!1,className:"mt10"},A.a.createElement(tt.a.Link,{href:"#challenge_".concat(st==null?void 0:st.question_id).concat(pn),title:A.a.createElement("span",{style:{color:"#0152d9"}},"\u67E5\u770B")})):A.a.createElement("span",{className:"c-grey-999"},"--")}}],gt=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(tn,nn){return A.a.createElement("span",null,nn.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(tn,nn){return A.a.createElement("span",null,nn.error_msg?nn.error_msg:"--")}}],Wt={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return A.a.createElement("div",{className:"mt15 mb15"},A.a.createElement("div",null,st==null||((Ze=st.shixun)===null||Ze===void 0)?void 0:Ze.map(function(Jt,tn){return A.a.createElement(j.a,{className:"font16",gutter:[0,20]},A.a.createElement(w.a,{flex:"1"},Jt.challenge_name," (",Jt.challenge_score,"\u5206)"),A.a.createElement(w.a,{flex:"100px",className:"tr"},!Jt.answer_status&&A.a.createElement("span",{className:"font12 tag-style-border border-orange c-orange "},"\u672A\u5B8C\u6210"),!!Jt.answer_status&&A.a.createElement("span",{className:"font12 tag-style-border border-green c-green "},"\u5DF2\u5B8C\u6210")))})),(Ut==null||((nt=Ut.exercise)===null||nt===void 0)?void 0:nt.student_commit_status)!==0||(Ut==null||((ut=Ut.exercise)===null||ut===void 0)?void 0:ut.user_exercise_status)!==0?A.a.createElement(A.a.Fragment,null,!!(qt!=null&&qt.length)&&A.a.createElement("div",null,A.a.createElement("p",{className:"font16 c-grey-666"},"\u9636\u6BB5\u6210\u7EE9"),A.a.createElement(Ue.a,{columns:kn,dataSource:qt,pagination:!1})),!!(cn!=null&&cn.length)&&A.a.createElement("div",null,A.a.createElement("p",{className:"font16 c-grey-666 mt10"},"\u5B9E\u8BAD\u8BE6\u60C5"),cn==null?void 0:cn.map(function(Jt,tn){return A.a.createElement("div",{id:"challenge_".concat(st==null?void 0:st.question_id).concat(tn),className:"mt5"},A.a.createElement("div",null,A.a.createElement("span",{className:"font16 mr15"}," ","\u7B2C",Jt.position,"\u5173"),A.a.createElement(T.a,{className:"current c-black font16",to:"/tasks/".concat(Jt.game_identifier)},Jt.name)),(Jt==null?void 0:Jt.st)===0&&Jt.passed_code&&A.a.createElement("aside",{className:Xe.a.shixunWrp},A.a.createElement("h2",null,"\u7B2C\u4E00\u6B21\u901A\u5173\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09",A.a.createElement("span",{className:"c-light-black"},Jt.path)),A.a.createElement(lt.b,{height:300,language:"python",theme:"default",value:Jt.passed_code,options:Wt})))}))):A.a.createElement(A.a.Fragment,null,Object(Oe.s)()&&A.a.createElement(ve.a,{className:"c-grey-999 mt20 mb20",value:st==null?void 0:st.question_title}),st==null||((Et=st.shixun)===null||Et===void 0)?void 0:Et.map(function(Jt,tn){return A.a.createElement("p",{className:"font16 c-grey-666 mb5",key:tn},A.a.createElement("span",{className:"mr20"},"\u7B2C",Jt==null?void 0:Jt.challenge_position,"\u5173 ",Jt==null?void 0:Jt.challenge_name),A.a.createElement("span",null,Jt==null?void 0:Jt.challenge_score,"\u5206"))})))},ge=Ce,be=B("J66h"),ie=function(Be){var Ze=Be.item,nt=Be.answerData,ut=Object(y.useState)([]),Et=Object(b.a)(ut,2),st=Et[0],Ut=Et[1];Object(y.useEffect)(function(){var qt;if((Ze==null||((qt=Ze.evaluate_codes)===null||qt===void 0)?void 0:qt.length)>0){var Qt;Ut(Ze==null||((Qt=Ze.evaluate_codes)===null||Qt===void 0)?void 0:Qt.map(function(en,Yt){return{key:Yt+1,error_msg:en!=null&&en.error_msg?be.Base64.decode(en==null?void 0:en.error_msg):""}}))}else Ut([{key:"--",error_msg:"--"}])},[Ze==null?void 0:Ze.evaluate_codes]);var Zt=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(Qt,en){return A.a.createElement("span",null,en.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(Qt,en){return A.a.createElement("span",null,en.error_msg?en.error_msg:"--")}}],Rt={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return A.a.createElement(A.a.Fragment,null,A.a.createElement("div",{className:"mt15 mb15"},A.a.createElement(ve.a,{value:Ze==null?void 0:Ze.description})),(Ze==null?void 0:Ze.passed_code)&&A.a.createElement("aside",{className:Xe.a.shixunWrp},A.a.createElement("h3",null,"\u7B2C\u4E00\u6B21\u8BC4\u6D4B\u901A\u8FC7\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09"),A.a.createElement(lt.b,{style:{border:"1px solid #ccc"},height:300,language:"python",theme:"vs-light",value:Ze!=null&&Ze.passed_code?be.Base64.decode(Ze==null?void 0:Ze.passed_code):"",options:Rt})))},oe=ie,fe=B("oBTY"),ye=C.a.TextArea,Ae=function(Be){var Ze,nt,ut=Be.item,Et=Be.answerData,st=Be.onBlur,Ut=st===void 0?function(){}:st,Zt=Object(y.useState)([]),Rt=Object(b.a)(Zt,2),qt=Rt[0],Qt=Rt[1],en=Object(y.useState)(!1),Yt=Object(b.a)(en,2),cn=Yt[0],Sn=Yt[1],kn=Object(y.useRef)(),gt=Object(y.useRef)(),Wt=Object(y.useRef)(),Jt=function(){clearInterval(kn.current),kn.current=setInterval(function(){var nn;gt.current>=0&&Ut((nn=Wt.current[gt.current])===null||nn===void 0?void 0:nn.answer_text,gt.current+1,Wt.current)},5*1e3)};return Object(y.useEffect)(function(){for(var tn=[],nn=function(L){var N,z=(ut==null||((N=ut.user_answer)===null||N===void 0)?void 0:N.find(function(te){return te.choice_id===L+1}))||{choice_id:L+1,answer_text:""};tn.push(Object(S.a)({},z))},pn=0;pn<(ut==null?void 0:ut.multi_count);pn++)nn(pn);Wt.current=tn,Qt(tn)},[ut==null?void 0:ut.user_answer]),Object(y.useEffect)(function(){return Jt(),function(){window.clearInterval(kn.current)}},[]),A.a.createElement("div",null,qt==null?void 0:qt.map(function(tn,nn){var pn,X;return A.a.createElement("div",{className:"mt10"},A.a.createElement("span",null,"\u6211\u7684\u7B54\u6848\uFF08\u586B\u7A7A",nn+1,"\uFF09:"),A.a.createElement("div",null,A.a.createElement(ye,{autoSize:!0,rows:4,disabled:!ut.repeat_answer&&(ut==null||((pn=ut.user_answer)===null||pn===void 0)?void 0:pn.length)>0&&!ut.israp||(Et==null||((X=Et.exercise)===null||X===void 0)?void 0:X.user_exercise_status)===1,value:tn==null?void 0:tn.answer_text,onFocus:function(){return gt.current=nn},onChange:function(N){qt[nn].answer_text=N.target.value,Qt(Object(fe.a)(qt))},onBlur:function(N){Ut(tn==null?void 0:tn.answer_text,nn+1,qt),gt.current=null},className:"overflow_hidden ".concat(ut.user_score&&(ut.user_score===ut.question_score?"c-green":"c-red"))})))}),!!(ut!=null&&(Ze=ut.standard_answer)!==null&&Ze!==void 0&&Ze.length)&&A.a.createElement("div",null,ut==null||((nt=ut.standard_answer)===null||nt===void 0)?void 0:nt.map(function(tn,nn){return A.a.createElement("div",null,A.a.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF1A\uFF08\u586B\u7A7A",nn+1,"\uFF09:"),A.a.createElement("div",null,A.a.createElement(ye,{autoSize:!0,disabled:!0,value:tn==null?void 0:tn.answer_text[0]})))})))},Ge=Ae,ot=B("lzim"),wt=C.a.TextArea,Dt=function(Be){var Ze=Be.data;return A.a.createElement("div",{className:"tc mt80"},A.a.createElement("img",{width:"486",src:ot.l})," ",A.a.createElement("br",null),Ze.status===-1&&A.a.createElement("div",{className:"c-grey-999 mt60"},"\u60A8\u7684IP\u4E0D\u5728\u8003\u8BD5\u5141\u8BB8\u7684\u8303\u56F4\u5185\uFF01"),Ze.status===-2&&A.a.createElement("div",{className:" c-grey-999 mt60"},"\u60A8\u5DF2\u7ED1\u5B9A\u5F53\u524D\u8003\u8BD5IP\u5730\u5740\uFF1A",A.a.createElement("span",{className:"c-red"},Ze.ip),"\u8BF7\u4F7F\u7528\u8BE5IP\u5730\u5740\u8FDB\u5165\u8003\u8BD5\u3002"),A.a.createElement(M.a,{className:"mt40 pl20 pr20",type:"primary"},A.a.createElement("a",{href:"/"},"\u56DE\u5230\u9996\u9875")))},At=Dt,vt=B("m3rI"),$e=B("LvDl"),et=g.a.Countdown,Ye=C.a.TextArea,ce=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],xe={0:"c-red-ee4",1:"c-green"},at=["\u5355\u9009\u9898","\u591A\u9009\u9898","\u5224\u65AD\u9898","\u586B\u7A7A\u9898","\u7B80\u7B54\u9898","\u5B9E\u8BAD\u9898","\u7F16\u7A0B\u9898"],Je=function(Be){var Ze,nt,ut,Et,st,Ut,Zt,Rt,qt,Qt,en,Yt,cn,Sn,kn,gt,Wt,Jt,tn,nn,pn,X,L,N,z,te,Q,Re,ct,Ct,Pt,ht,Vt,rn,An,Cn,En,Fn,mr,kr,Kn,or,Cr,Er,nr,Kr,Pr,Gr,zr=Be.globalSetting,Nr=Be.loading,$n=Be.user,Ur=Be.exercise,Jr=Be.dispatch,cr=Be.location,Ln=Object(v.a)(Be,["globalSetting","loading","user","exercise","dispatch","location"]),jt=Object(F.i)(),Gn=Object(y.useState)({}),mn=Object(b.a)(Gn,2),Te=mn[0],dn=mn[1],Br=Object(y.useState)({}),Qn=Object(b.a)(Br,2),gn=Qn[0],Zr=Qn[1],Or=Object(y.useState)({}),qr=Object(b.a)(Or,2),dr=qr[0],Fr=qr[1],oi=Object(y.useState)(!1),_r=Object(b.a)(oi,2),li=_r[0],jr=_r[1],xr=Object(y.useState)(!0),ui=Object(b.a)(xr,2),Gt=ui[0],on=ui[1],$t=Object(y.useState)(!1),hn=Object(b.a)($t,2),vn=hn[0],Nn=hn[1],yn=Object(y.useState)(!1),zn=Object(b.a)(yn,2),ar=zn[0],fn=zn[1],Rr=Object(y.useState)(),Dn=Object(b.a)(Rr,2),Vn=Dn[0],er=Dn[1],Tr=Object(y.useState)(0),ea=Object(b.a)(Tr,2),Pn=ea[0],On=ea[1],Rn=Object(y.useState)(""),gr=Object(b.a)(Rn,2),ci=gr[0],$r=gr[1],Ui=Object(y.useState)("none"),Bi=Object(b.a)(Ui,2),Ra=Bi[0],Fi=Bi[1],ds=Object(y.useState)(""),hs=Object(b.a)(ds,2),Ks=hs[0],fs=hs[1],ps=Object(y.useState)({status:0}),ms=Object(b.a)(ps,2),gi=ms[0],Vr=ms[1],ta=Object(y.useState)(!1),na=Object(b.a)(ta,2),gs=na[0],Yr=na[1],vi=Object(y.useState)(!1),ra=Object(b.a)(vi,2),vs=ra[0],Ia=ra[1],Gs=Object(y.useState)(window.document.domain==="kepukehuan.educoder.net"),Da=Object(b.a)(Gs,2),wr=Da[0],ji=Da[1],Xr=Object(y.useRef)(),ia=Object(y.useRef)(),Oi=Object(y.useRef)(),Wi=Object(y.useRef)(),ys=Object(y.useRef)(),Hi=Object(y.useMemo)(function(){return new WebSocket("ws://localhost:8082")},[]),bs=Object(y.useState)(0),La=Object(b.a)(bs,2),_n=La[0],yi=La[1],Es=Object(y.useState)(0),aa=Object(b.a)(Es,2),In=aa[0],bi=aa[1],Ma=Object(y.useState)(!1),Wr=Object(b.a)(Ma,2),_s=Wr[0],di=Wr[1],ka=Object(y.useState)(!1),Pa=Object(b.a)(ka,2),Ki=Pa[0],Na=Pa[1],zs=Object(y.useState)(),xs=Object(b.a)(zs,2),Ts=xs[0],ni=xs[1],Ri=Object(y.useState)(),Ei=Object(b.a)(Ri,2),sa=Ei[0],Ua=Ei[1];Object(y.useEffect)(function(){return document.body.setAttribute("data-custom","auto"),function(){document.body.removeAttribute("data-custom")}},[]),Object(y.useEffect)(function(){var kt;return document.body.scrollIntoView(),(kt=$n.userInfo)!==null&&kt!==void 0&&kt.user_id&&(Object(Oe.c)()?Zn():$n.userInfo.login&&xi()),window.addEventListener("message",oa),function(){window.removeEventListener("message",oa),cr.pathname.indexOf("/detail")>-1&&Object(Ve.b)()}},[jt.categoryId,$n.userInfo.login]),Object(y.useEffect)(function(){return wr&&Jr({type:"globalSetting/headerFooterToggle",payload:!1}),window.addEventListener("beforeunload",Ba),function(){clearTimeout(Oi.current),clearTimeout(Wi.current),window.removeEventListener("beforeunload",Ba)}},[]),Object(y.useEffect)(function(){var kt;Te!=null&&(kt=Te.question_status)!==null&&kt!==void 0&&kt.every(function(he){return!!he.ques_status&&gs&&(gn==null?void 0:gn.used_screen_num)<(gn==null?void 0:gn.screen_num)})&&setTimeout(function(){var he;(he=ia.current)===null||he===void 0||he.handlePhoto()},1300)},[Te]),Object(y.useEffect)(function(){var kt;if(clearTimeout(Oi.current),clearTimeout(Wi.current),Te!=null&&(kt=Te.exercise)!==null&&kt!==void 0&&kt.left_time&&Object(Oe.s)()){var he,rt;if((Te==null||((he=Te.exercise)===null||he===void 0)?void 0:he.left_time)>1800){var He;Wi.current=setTimeout(function(){_.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670930\u5206\u949F",icon:A.a.createElement(de.a,null),okText:"\u77E5\u9053\u4E86"})},((Te==null||((He=Te.exercise)===null||He===void 0)?void 0:He.left_time)-1800)*1e3)}if((Te==null||((rt=Te.exercise)===null||rt===void 0)?void 0:rt.left_time)>900){var Ot;Oi.current=setTimeout(function(){_.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670915\u5206\u949F",icon:A.a.createElement(de.a,null),okText:"\u77E5\u9053\u4E86"})},((Te==null||((Ot=Te.exercise)===null||Ot===void 0)?void 0:Ot.left_time)-900)*1e3)}}},[Te==null||((Ze=Te.exercise)===null||Ze===void 0)?void 0:Ze.left_time]);var Ba=function(){var he;(he=Ur.exerciseUserInfo)!==null&&he!==void 0&&he.screen_open&&window.navigator.sendBeacon("".concat(vt.a.API_SERVER,"/api/exercises/").concat(jt.categoryId,"/commit_screen_at.json"),{})},oa=function(he){he.data==="backExercise"&&_i()},_i=function(){Fi("none"),$r(""),Zn()},xi=function(){var kt=Object(D.a)(k.a.mark(function he(){var rt,He,Ot,bt,Nt,zt,Lt,sn,Ht,Mt,Tn;return k.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:return un.next=2,Jr({type:"exercise/getExerciseUserInfo",payload:Object(S.a)({},jt)});case 2:if(He=un.sent,Zr(Object(S.a)({},He.data)),!((He==null||((rt=He.data)===null||rt===void 0)?void 0:rt.ip_limit)!=="no")){un.next=11;break}if(!((He==null||((Ot=He.data)===null||Ot===void 0)?void 0:Ot.ip_limit)==="inner")){un.next=9;break}return un.next=8,Object(je.a)({ip_limit:He==null||((bt=He.data)===null||bt===void 0)?void 0:bt.ip_limit});case 8:zt=un.sent;case 9:return un.next=11,Object(ke.s)({exerciseId:jt.categoryId,ip:zt,errmsgHide:!0,ip_limit:He==null||((Nt=He.data)===null||Nt===void 0)?void 0:Nt.ip_limit}).catch(function(Mn){Vr(Mn)});case 11:if(!((He==null?void 0:He.status)==0)){un.next=18;break}if(!((He==null||((Lt=He.data)===null||Lt===void 0)?void 0:Lt.used_screen_num)>(He==null||((sn=He.data)===null||sn===void 0)?void 0:sn.screen_num)&&He!==null&&He!==void 0&&(Ht=He.data)!==null&&Ht!==void 0&&Ht.screen_open)){un.next=15;break}return ri(),un.abrupt("return",!1);case 15:Nn(He==null?void 0:He.data.check_camera),He!=null&&He.data.check_camera||fn(He==null||((Mt=He.data)===null||Mt===void 0)?void 0:Mt.screen_open),He!=null&&(Tn=He.data)!==null&&Tn!==void 0&&Tn.check_camera||Zn();case 18:case"end":return un.stop()}},he)}));return function(){return kt.apply(this,arguments)}}(),Zn=function(){var kt=Object(D.a)(k.a.mark(function he(){var rt,He,Ot,bt,Nt,zt,Lt,sn,Ht,Mt,Tn,Yn,un,Mn,xn,Hn,Un,Qr,za,Di,Va,Ya,Xa,Yi,ha,Xi,Qa,Qi,Ji,fa,pa,Zi,ma,Si,Ja,Li,vr,ga;return k.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(document.body.scrollIntoView(),jr(!0),Ot=(rt=$n.userInfo)===null||rt===void 0?void 0:rt.user_id,!Object(Oe.c)()){hr.next=11;break}return hr.next=6,Object(qe.G)({exerciseId:jt.categoryId,login:jt.login}).catch(function(){return jr(!1)});case 6:He=hr.sent,((bt=He)===null||bt===void 0?void 0:bt.exercise)&&(He.exercise.user_exercise_status=1),Ot=(Nt=He)===null||Nt===void 0||((zt=Nt.exercise_answer_user)===null||zt===void 0)?void 0:zt.user_id,hr.next=31;break;case 11:if(!(cr!=null&&(Lt=cr.query)!==null&&Lt!==void 0&&Lt.check)){hr.next=18;break}return hr.next=14,Object(qe.z)(Object(S.a)({},jt)).catch(function(){return jr(!1)});case 14:He=hr.sent,Ot=(Qr=He)===null||Qr===void 0||((za=Qr.exercise)===null||za===void 0)?void 0:za.user_id,hr.next=25;break;case 18:return hr.next=20,Object(qe.y)(Object(S.a)({},jt)).catch(function(){return jr(!1)});case 20:He=hr.sent,He.status===-1&&ei(),((Di=He)===null||Di===void 0?void 0:Di.exercise)&&(He.exercise.user_exercise_status=0),((Va=He)===null||Va===void 0?void 0:Va.exercise)&&(He.exercise.exercise_status=2),(Ya=He)===null||Ya===void 0||((Xa=Ya.exercise_question_types)===null||Xa===void 0)||Xa.map(function(Bn){if((Bn==null?void 0:Bn.question_type)<3){var wn;Bn==null||((wn=Bn.items)===null||wn===void 0)||wn.map(function(fr){fr.user_answer=fr.question_choices.filter(function(Sr){return Sr.user_answer_boolean}).map(function(Sr){return Sr.choice_id})})}});case 25:if(!(!((sn=He)!==null&&sn!==void 0&&(Ht=sn.exercise)!==null&&Ht!==void 0&&Ht.can_start)&&(Mt=He)!==null&&Mt!==void 0&&Mt.exercise)){hr.next=28;break}return window.location.href="/classrooms/".concat(jt.coursesId,"/exercise/").concat(jt.categoryId,"/users/").concat(jt.login,"/check"),hr.abrupt("return");case 28:if(((Tn=He.exercise)===null||Tn===void 0?void 0:Tn.commit_status)===0&&!ys.current)try{ys.current=!0,Hi.send(JSON.stringify({type:"toggleLockExit",data:!0})),Hi.send(JSON.stringify({type:"network-close",data:""}))}catch(Bn){}(Yn=He)!==null&&Yn!==void 0&&(un=Yn.exercise)!==null&&un!==void 0&&un.left_time&&setTimeout(function(){fs(ae.a.red)},(((Yi=He)===null||Yi===void 0||((ha=Yi.exercise)===null||ha===void 0)?void 0:ha.left_time)-300>0?((Xi=He)===null||Xi===void 0||((Qa=Xi.exercise)===null||Qa===void 0)?void 0:Qa.left_time)-300:0)*1e3),((Mn=He)===null||Mn===void 0||((xn=Mn.exercise)===null||xn===void 0)?void 0:xn.take_photo)>=((Hn=He)===null||Hn===void 0||((Un=Hn.exercise)===null||Un===void 0)?void 0:Un.photo_count);case 31:jr(!1),He&&(((Qi=He)!==null&&Qi!==void 0&&(Ji=Qi.exercise)!==null&&Ji!==void 0&&Ji.question_random||(fa=He)!==null&&fa!==void 0&&(pa=fa.exercise)!==null&&pa!==void 0&&pa.choice_random)&&(ga=1,He.exercise.question_random=(Li=He)===null||Li===void 0||((vr=Li.exercise_question_types)===null||vr===void 0)?void 0:vr.map(function(Bn){var wn,fr,Sr,ti;return(wn=He)!==null&&wn!==void 0&&(fr=wn.exercise)!==null&&fr!==void 0&&fr.choice_random&&((Bn.question_type===0||Bn.question_type===1)&&Bn.items.map(function(ai){return ai.question_choices=Object(ke.U)(ai.question_choices,Ot),ai}),Bn.question_type===7&&Bn.items.forEach(function(ai){ai.sub_exercise_questions.forEach(function(va){va.question_choices=Object(ke.U)(va.question_choices,Ot)})})),(Sr=He)!==null&&Sr!==void 0&&(ti=Sr.exercise)!==null&&ti!==void 0&&ti.question_random&&(Bn.items=Object(ke.U)(Bn.items,Ot)),Bn.items.map(function(ai){return ai.question_num=ga,ga++,ai}),Bn})),console.log("---",He),He.exercise_types=((Zi=He)===null||Zi===void 0?void 0:Zi.exercise_types)||((ma=He)===null||ma===void 0||((Si=ma.exercise_scores)===null||Si===void 0)?void 0:Si.exercise_types),He.question_status=He.question_status||hi(((Ja=He)===null||Ja===void 0?void 0:Ja.exercise_question_types)||[]),dn(He));case 33:case"end":return hr.stop()}},he)}));return function(){return kt.apply(this,arguments)}}(),hi=function(he){var rt=[];return he.forEach(function(He){rt=rt.concat(He.items)}),rt=rt.map(function(He){return{ques_status:He==null?void 0:He.ques_status,question_num:He==null?void 0:He.question_num,ques_id:He==null?void 0:He.question_id}}),rt};Object(y.useEffect)(function(){var kt,he,rt;((kt=Te.exercise)===null||kt===void 0?void 0:kt.left_time)===0&&ri(),((he=Te.exercise)===null||he===void 0?void 0:he.left_time)&&er(Date.now()+(Te==null||((rt=Te.exercise)===null||rt===void 0)?void 0:rt.left_time)*1e3)},[(nt=Te.exercise)===null||nt===void 0?void 0:nt.left_time]);var fi=function(){var he;(Te==null||((he=Te.exercise)===null||he===void 0)?void 0:he.exercise_status)===3?_.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:A.a.createElement("div",{className:"tc font16"},"\u622A\u6B62\u65F6\u95F4\u5DF2\u5230\uFF0C\u65E0\u6CD5\u6253\u56DE\u8BD5\u5377",A.a.createElement("br",null),"\u8BF7\u5728\u4FEE\u6539\u622A\u6B62\u65F6\u95F4\u540E\u518D\u64CD\u4F5C")}):_.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:A.a.createElement("div",{className:"tc font16"},"\u5B66\u751F\u5C06\u5F97\u5230\u4E00\u6B21\u91CD\u65B0\u7B54\u9898\u7684\u673A\u4F1A\uFF0C\u73B0\u6709\u7684\u7B54\u9898\u60C5\u51B5\u5C06\u88AB\u6E05\u7A7A",A.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u56DE\u9000TA\u7684\u8BD5\u5377\u7B54\u9898"),onOk:function(){var rt=Object(D.a)(k.a.mark(function Ot(){var bt,Nt;return k.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return Lt.next=2,Object(qe.S)({categoryId:jt.categoryId,user_ids:[Te==null||((bt=Te.exercise_answer_user)===null||bt===void 0)?void 0:bt.user_id]});case 2:Nt=Lt.sent,Nt&&(O.b.info(Nt==null?void 0:Nt.message),ei());case 4:case"end":return Lt.stop()}},Ot)}));function He(){return rt.apply(this,arguments)}return He}()})},ei=function(){window.location.href=Object(ke.r)()?"/":"/classrooms/".concat(jt.coursesId,"/exercise/").concat(jt.categoryId,"/detail")},Fa=function(){var kt=Object(D.a)(k.a.mark(function he(){var rt;return k.a.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:return Ot.next=2,Object(qe.l)(Object(S.a)({},jt));case 2:if(rt=Ot.sent,!(rt!=null&&rt.has_time)){Ot.next=10;break}return er(Date.now()+(rt==null?void 0:rt.left_time)*1e3),Te.exercise.left_time=rt==null?void 0:rt.left_time,dn(Object(S.a)({},Te)),Ot.abrupt("return",!0);case 10:return ws(),Ot.abrupt("return",!1);case 12:case"end":return Ot.stop()}},he)}));return function(){return kt.apply(this,arguments)}}(),ws=function(){var kt=Object(D.a)(k.a.mark(function he(){var rt,He;return k.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.next=2,Object(qe.Z)({categoryId:jt.categoryId,commit_method:2});case 2:rt=bt.sent,(rt==null?void 0:rt.status)===0&&(_.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:A.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",A.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){var Nt=Object(D.a)(k.a.mark(function Lt(){return k.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:ei();case 1:case"end":return Ht.stop()}},Lt)}));function zt(){return Nt.apply(this,arguments)}return zt}()}),O.b.info(rt==null?void 0:rt.message)),(rt==null?void 0:rt.status)===-3&&(He=parseInt(rt==null?void 0:rt.message),Te.exercise.left_time=He,dn(Object(S.a)({},Te)));case 5:case"end":return bt.stop()}},he)}));return function(){return kt.apply(this,arguments)}}(),Ti=function(){var kt=Object(D.a)(k.a.mark(function he(rt){var He;return k.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.next=2,Object(ue.E)({id:rt.shixun_identifier});case 2:He=bt.sent,He!=null&&He.game_identifier&&(clearTimeout(Oi.current),clearTimeout(Wi.current),$r("/tasks/".concat(He.game_identifier,"?type=exercises&exercisesId=").concat(jt.categoryId,"&coursesId=").concat(jt.coursesId,"&login=").concat(jt.login,"&questionId=").concat(rt.question_id,"&isFullScreen=").concat(Object(Ve.a)())),Fi("block")),(He==null?void 0:He.status)===-3?Object(ke.q)():(He==null?void 0:He.status)===2?Ss(He==null?void 0:He.message,rt.question_id):(He==null?void 0:He.status)===3&&ja(He==null?void 0:He.message);case 5:case"end":return bt.stop()}},he)}));return function(rt){return kt.apply(this,arguments)}}(),Ss=function kt(he,rt){var He;he=(He=he)!==null&&He!==void 0&&He.includes(".json")?he:"".concat(he,".json"),_.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:A.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var Ot=Object(D.a)(k.a.mark(function Nt(){var zt,Lt;return k.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,Object(qe.T)({url:he});case 2:if(zt=Ht.sent,zt){Ht.next=5;break}return Ht.abrupt("return");case 5:return O.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),Ht.next=8,Object(ue.E)({id:zt.shixun_identifier});case 8:if(Lt=Ht.sent,!(Lt!=null&&Lt.game_identifier)){Ht.next=12;break}return Ti({shixun_identifier:Lt==null?void 0:Lt.game_identifier,question_id:rt}),Ht.abrupt("return");case 12:(Lt==null?void 0:Lt.status)===2?kt(Lt==null?void 0:Lt.message,rt):(Lt==null?void 0:Lt.status)===3&&ja(Lt==null?void 0:Lt.message);case 13:case"end":return Ht.stop()}},Nt)}));function bt(){return Ot.apply(this,arguments)}return bt}()})},ja=function(he){_.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:A.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",he,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},la=function(he){he.redo?_.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:A.a.createElement("div",{className:"tc font16"},"\u60A8\u4E4B\u524D\u5DF2\u7ECF\u6311\u6218\u8FC7\u8BE5\u5B9E\u8BAD\uFF0C\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u9700\u8981\u91CD\u65B0\u6311\u6218"),onOk:function(){var rt=Object(D.a)(k.a.mark(function Ot(){var bt,Nt,zt,Lt;return k.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,Object(qe.T)({id:he.myshixun_identifier,url:he.url});case 2:bt=Ht.sent,bt&&(Nt=Object($e.cloneDeep)(Te==null?void 0:Te.exercise_question_types),zt=Nt==null?void 0:Nt.findIndex(function(Mt){return Mt.question_type===5}),Nt[zt].items.find(function(Mt){return Mt.question_id===he.question_id}).redo=!1,Nt[zt].items.find(function(Mt){return Mt.question_id===he.question_id}).shixun_identifier=bt.shixun_identifier,Te.exercise_question_types=Nt,dn(Te),Lt=Object(S.a)(Object(S.a)({},he),{},{shixun_identifier:bt.shixun_identifier}),Ti(Lt));case 4:case"end":return Ht.stop()}},Ot)}));function He(){return rt.apply(this,arguments)}return He}()}):Ti(he)},Vs=function(){var kt=Object(D.a)(k.a.mark(function he(rt){var He;return k.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(!rt.hack_identifier){bt.next=5;break}return bt.next=3,Object(qe.X)({id:rt.hack_identifier});case 3:He=bt.sent,(He==null?void 0:He.status)===0&&(clearTimeout(Oi.current),clearTimeout(Wi.current),$r("/myproblems/".concat(He.identifier,"?type=exercises&exercisesId=").concat(jt.categoryId,"&coursesId=").concat(jt.coursesId,"&login=").concat(jt.login,"&questionId=").concat(rt.question_id)),Fi("block"));case 5:case"end":return bt.stop()}},he)}));return function(rt){return kt.apply(this,arguments)}}(),pi=function(){var kt=Object(D.a)(k.a.mark(function he(rt,He,Ot,bt,Nt,zt){var Lt,sn,Ht,Mt,Tn;return k.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:if(Ia(!0),Ht={questionId:rt,exercise_choice_id:He,answer_text:Ot},!((gn==null?void 0:gn.ip_limit)==="inner"||gn.ip_bind)){un.next=6;break}return un.next=5,Object(je.a)({ip_limit:gn==null?void 0:gn.ip_limit});case 5:sn=un.sent;case 6:if(Nt&&(Ht.kp_content=Nt),Nt&&(Ht.kp_clazz=zt),rt){un.next=11;break}return console.error("handleSave no questionId params"),un.abrupt("return");case 11:return Ht.ip=sn,un.next=14,Object(qe.cb)(Ht);case 14:Mt=un.sent,Mt!=null&&(Lt=Mt.alert)!==null&&Lt!==void 0&&Lt.length&&(Mt==null||((Tn=Mt.alert)===null||Tn===void 0)||Tn.map(function(Mn){_.a.warn({title:"\u63D0\u793A",autoFocusButton:null,content:Mn})})),(Mt==null?void 0:Mt.status)===0?bt&&bt():(Mt==null?void 0:Mt.status)===-1?setTimeout(function(){ei()},1e3):(Mt==null?void 0:Mt.status)===-2?Vr(Mt):(Mt==null?void 0:Mt.status)===-3?(Mt.status=-1,Vr(Mt)):O.b.warn(Mt.message||"\u8BD5\u5377\u5DF2\u622A\u6B62\uFF0C\u5DF2\u81EA\u52A8\u4EA4\u5377"),Ia(!1);case 18:case"end":return un.stop()}},he)}));return function(rt,He,Ot,bt,Nt,zt){return kt.apply(this,arguments)}}(),As=function(){var kt=Object(D.a)(k.a.mark(function he(rt){var He,Ot;return k.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Nt.next=2,Fa();case 2:return Nt.next=4,Object(qe.d)({id:jt.categoryId});case 4:if(He=Nt.sent,He){Nt.next=7;break}return Nt.abrupt("return");case 7:He.question_undo!==0||He.oj_undo!==0?(Ot="",He.question_undo!==0&&He.oj_undo!==0?Ot="\u6709 ".concat(He.question_undo," \u9898\u672A\u5B8C\u6210\uFF0C\u5305\u542B ").concat(He.oj_undo," \u4E2A\u7F16\u7A0B\u9898"):He.question_undo!==0&&He.oj_undo===0?Ot="\u6709 ".concat(He.question_undo," \u9898\u672A\u5B8C\u6210"):He.question_undo===0&&He.oj_undo!==0&&(Ot="\u6709 ".concat(He.oj_undo," \u7F16\u7A0B\u9898\u672A\u5B8C\u6210")),_.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:rt?"\u77E5\u9053\u4E86":"\u786E\u8BA4\u4EA4\u5377",cancelText:"\u53D6\u6D88",content:A.a.createElement("div",{className:"tc font16"},Ot,A.a.createElement("br",null),rt?"\u5728".concat(ne()(He.end_time).format("YYYY-MM-DD HH:mm"),"\u4E4B\u524D\uFF0C\u5141\u8BB8\u4FEE\u6539\u7B54\u9898"):Vn?"\u4F60\u672C\u573A\u8003\u8BD5\u5269\u4F59\u65F6\u95F4\u8FD8\u6709".concat(Object(ke.bb)((Vn-new Date().getTime())/1e3)," \uFF0C\u786E\u8BA4\u63D0\u524D\u4EA4\u5377\u5417\uFF1F"):"\u63D0\u4EA4\u540E\u65E0\u6CD5\u518D\u4FEE\u6539\u7B54\u9898\uFF0C\u662F\u5426\u786E\u8BA4\u63D0\u4EA4\uFF1F"),onOk:function(){var zt=Object(D.a)(k.a.mark(function sn(){return k.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:rt?gn!=null&&gn.screen_open?O.b.success("\u4FDD\u5B58\u6210\u529F"):ei():ri();case 1:case"end":return Mt.stop()}},sn)}));function Lt(){return zt.apply(this,arguments)}return Lt}()})):_.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:rt?"\u77E5\u9053\u4E86":"\u786E\u8BA4\u4EA4\u5377",cancelText:"\u53D6\u6D88",content:A.a.createElement("div",{className:"tc font16"},rt?"\u5728".concat(ne()(He.end_time).format("YYYY-MM-DD HH:mm"),"\u4E4B\u524D\uFF0C\u5141\u8BB8\u4FEE\u6539\u7B54\u9898"):Vn?"\u4F60\u672C\u573A\u8003\u8BD5\u5269\u4F59\u65F6\u95F4\u8FD8\u6709".concat(Object(ke.bb)((Vn-new Date().getTime())/1e3)," \uFF0C\u786E\u8BA4\u63D0\u524D\u4EA4\u5377\u5417\uFF1F"):"\u63D0\u4EA4\u540E\u65E0\u6CD5\u518D\u4FEE\u6539\u7B54\u9898\uFF0C\u662F\u5426\u786E\u8BA4\u63D0\u4EA4\uFF1F"),onOk:function(){var zt=Object(D.a)(k.a.mark(function sn(){return k.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:rt?gn!=null&&gn.screen_open?O.b.success("\u4FDD\u5B58\u6210\u529F"):ei():ri();case 1:case"end":return Mt.stop()}},sn)}));function Lt(){return zt.apply(this,arguments)}return Lt}()});case 8:case"end":return Nt.stop()}},he)}));return function(rt){return kt.apply(this,arguments)}}(),Wa=function(he){return A.a.createElement("div",null,A.a.createElement(a.a,{strokeColor:{from:"#108ee9",to:"#87d068"},status:"active",percent:he}),A.a.createElement("div",{className:"c-grey-c tc mt10 mb20"},"\u6B63\u5728\u5224\u5206\u4E2D\u2026"))},Ha=function(){var he=0,rt=_.a.info({title:"\u4EA4\u5377\u4E2D",icon:null,className:"modal-footer-none",content:Wa(he)}),He=setInterval(function(){he<=100?(he+=2,rt.update({content:Wa(he)})):(rt.destroy(),clearInterval(He))},50)},ri=function(){var kt=Object(D.a)(k.a.mark(function he(){var rt;return k.a.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:return Ot.next=2,Object(qe.Z)({categoryId:jt.categoryId,commit_method:1});case 2:return rt=Ot.sent,Ot.next=5,Jr({type:"exercise/setActionTabs",payload:Object(S.a)({},{removeEventListenerExitScreen:!0})});case 5:if((rt==null?void 0:rt.status)===0){Ha(),O.b.success(rt==null?void 0:rt.message),Nn(!1);try{Hi.send(JSON.stringify({type:"toggleLockExit",data:!1})),Hi.send(JSON.stringify({type:"network-open",data:""}))}catch(bt){}setTimeout(function(){_.a.info({title:"\u4EA4\u5377\u6210\u529F\uFF01",okText:"\u786E\u5B9A",maskClosable:!1,keyboard:!1,onOk:function(){Object(Ve.b)(),ei()}})},3e3)}case 6:case"end":return Ot.stop()}},he)}));return function(){return kt.apply(this,arguments)}}(),ua=function(){var kt=Object(D.a)(k.a.mark(function he(rt,He,Ot,bt){return k.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:pi(He,rt,null,function(){Te.question_status.find(function(Lt){return Lt.ques_id===He}).ques_status=rt?1:0,bt.user_answer=[],bt.user_answer.push(rt),bt.repeat_answer||(bt.israp=!0),dn(Object(S.a)({},Te))});case 1:case"end":return zt.stop()}},he)}));return function(rt,He,Ot,bt){return kt.apply(this,arguments)}}(),Cs=function(){var kt=Object(D.a)(k.a.mark(function he(rt,He,Ot,bt,Nt){return k.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:pi(bt.question_id,rt,null,function(){var sn,Ht,Mt;bt.user_answer=[],bt.user_answer.push(rt);var Tn=Nt==null||((sn=Nt.sub_exercise_questions)===null||sn===void 0)?void 0:sn.filter(function(Yn){var un;return((un=Yn.user_answer)===null||un===void 0?void 0:un.length)===0});Te.question_status.find(function(Yn){return Yn.ques_id===He}).ques_status=(Tn==null?void 0:Tn.length)===(Nt==null||((Ht=Nt.sub_exercise_questions)===null||Ht===void 0)?void 0:Ht.length)?0:(Tn==null?void 0:Tn.length)>0&&(Tn==null?void 0:Tn.length)<(Nt==null||((Mt=Nt.sub_exercise_questions)===null||Mt===void 0)?void 0:Mt.length)?2:1,dn(Object(S.a)({},Te))});case 1:case"end":return Lt.stop()}},he)}));return function(rt,He,Ot,bt,Nt){return kt.apply(this,arguments)}}(),ca=function(he,rt,He){pi(rt,he,null,function(){He.user_answer=he,He.repeat_answer||(He.israp=!0),Te.question_status.find(function(Ot){return Ot.ques_id===rt}).ques_status=he!=null&&he.length?1:0,dn(Object(S.a)({},Te))})},Ys=function(he,rt,He,Ot,bt){if(!he.replaceAll(" ","")){O.b.warning("\u56DE\u7B54\u4E0D\u80FD\u4E3A\u7A7A\u6216\u8005\u7EAF\u7A7A\u683C");return}pi(He,rt,he,function(){Te.question_status.find(function(zt){return zt.ques_id===He}).ques_status=Ot.every(function(zt){return!!zt.answer_text})?1:Te.question_status.find(function(zt){return zt.ques_id===He}).ques_status=Ot.some(function(zt){return!!zt.answer_text})?2:0;var Nt={choice_id:rt,answer_text:he};bt.user_answer.filter(function(zt){return zt.choice_id!=rt})?bt.user_answer.splice(rt-1,1,Nt):bt.user_answer.push(Nt),bt.repeat_answer||(bt.israp=!0),dn(Object(S.a)({},Te))})},Xs=function(he,rt,He){if(!he.replaceAll(" ","")){O.b.warning("\u56DE\u7B54\u4E0D\u80FD\u4E3A\u7A7A\u6216\u8005\u7EAF\u7A7A\u683C");return}pi(rt,null,he,function(){Te.question_status.find(function(Ot){return Ot.ques_id===rt}).ques_status=he?1:0,He.user_answer=[],He.user_answer.push(he),He.repeat_answer||(He.israp=!0),dn(Object(S.a)({},Te))})},Os=function(he,rt){var He,Ot,bt,Nt,zt,Lt,sn;return A.a.createElement("div",null,A.a.createElement(d.a,{spinning:vs},A.a.createElement(o.a.Group,{disabled:(Te==null||((He=Te.exercise)===null||He===void 0)?void 0:He.user_exercise_status)===1,defaultValue:he==null||((Ot=he.user_answer)===null||Ot===void 0)?void 0:Ot[0],onChange:function(Mt){return ua(Mt.target.value,he==null?void 0:he.question_id,rt,he)},className:he.user_score&&"edu-radio-".concat(he.user_score===he.question_score?"green":"red")},he==null||((bt=he.question_choices)===null||bt===void 0)?void 0:bt.map(function(Ht,Mt){var Tn,Yn=he.question_type==2,un=Yn?"":"".concat(ce[Mt],".");return A.a.createElement("div",{className:ae.a.answerWrap,key:Mt},A.a.createElement(o.a,{disabled:!he.repeat_answer&&(he==null||((Tn=he.user_answer)===null||Tn===void 0)?void 0:Tn.length)>0&&!he.israp,value:Ht==null?void 0:Ht.choice_id},A.a.createElement("span",{className:"mr3"},un),A.a.createElement(ve.a,{style:{width:740},className:ae.a.renderHtml,value:Ht==null?void 0:Ht.choice_text})))}))),Object(Oe.s)()&&(Te==null||((Nt=Te.exercise)===null||Nt===void 0)?void 0:Nt.answer_open)&&((Te==null||((zt=Te.exercise)===null||zt===void 0)?void 0:zt.exercise_status)==3||(Te==null||((Lt=Te.exercise)===null||Lt===void 0)?void 0:Lt.user_exercise_status)==1)&&A.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A",he==null||((sn=he.question_choices)===null||sn===void 0)?void 0:sn.map(function(Ht,Mt){return Ht.standard_boolean?ce[Mt]:""}).join("")))},Ka=function(he,rt,He){var Ot;return A.a.createElement("div",null,he==null||((Ot=he.sub_exercise_questions)===null||Ot===void 0)?void 0:Ot.map(function(bt,Nt){var zt,Lt,sn,Ht,Mt,Tn,Yn;return A.a.createElement("div",null,A.a.createElement("div",{style:{marginTop:20,userSelect:"none",alignItems:"center"}},A.a.createElement("span",{style:{flexShrink:0,fontSize:"14px",color:"#999"}},He+1+"."+(Nt+1),"\uFF08\u5355\u9009\u9898 ",bt==null?void 0:bt.question_score,"\u5206\uFF09"),A.a.createElement("br",null),A.a.createElement(ve.a,{style:{marginLeft:27},value:bt==null?void 0:bt.question_title})),A.a.createElement(o.a.Group,{disabled:(Te==null||((zt=Te.exercise)===null||zt===void 0)?void 0:zt.user_exercise_status)===1,style:{marginLeft:27},defaultValue:bt==null||((Lt=bt.user_answer)===null||Lt===void 0)?void 0:Lt[0],onChange:function(Mn){return Cs(Mn.target.value,he==null?void 0:he.question_id,Nt,bt,he)},className:bt.user_score&&"edu-radio-".concat(bt.user_score===bt.question_score?"green":"red")},bt==null||((sn=bt.question_choices)===null||sn===void 0)?void 0:sn.map(function(un,Mn){var xn,Hn=bt.question_type==2,Un=Hn?"":"".concat(ce[Mn],".");return A.a.createElement("div",{className:ae.a.answerWrap,key:Mn},A.a.createElement(o.a,{disabled:!bt.repeat_answer&&(bt==null||((xn=bt.user_answer)===null||xn===void 0)?void 0:xn.length)>0,value:un==null?void 0:un.choice_id},A.a.createElement("span",{className:"mr3"},Un),A.a.createElement(ve.a,{style:{width:722},className:ae.a.renderHtml,value:un==null?void 0:un.choice_text})))})),Object(Oe.s)()&&(Te==null||((Ht=Te.exercise)===null||Ht===void 0)?void 0:Ht.answer_open)&&((Te==null||((Mt=Te.exercise)===null||Mt===void 0)?void 0:Mt.exercise_status)==3||(Te==null||((Tn=Te.exercise)===null||Tn===void 0)?void 0:Tn.user_exercise_status)==1)&&A.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A",bt==null||((Yn=bt.standard_answer)===null||Yn===void 0)?void 0:Yn.map(function(un,Mn){return A.a.createElement("span",null,ce[Number(un)-1])})))}))},Ga=function(he,rt){var He,Ot,bt,Nt,zt;return A.a.createElement("div",null,A.a.createElement(d.a,{spinning:vs},A.a.createElement(c.a.Group,{disabled:(Te==null||((He=Te.exercise)===null||He===void 0)?void 0:He.user_exercise_status)===1,defaultValue:he==null?void 0:he.user_answer,onChange:function(sn){return ca(sn,he==null?void 0:he.question_id,he)},className:he.user_score&&"edu-checkbox-".concat(he.user_score===he.question_score?"green":"red")},he==null||((Ot=he.question_choices)===null||Ot===void 0)?void 0:Ot.map(function(Lt,sn){var Ht,Mt="".concat(ce[sn],".");return A.a.createElement("div",{className:ae.a.answerWrap},A.a.createElement(c.a,{disabled:!he.repeat_answer&&(he==null||((Ht=he.user_answer)===null||Ht===void 0)?void 0:Ht.length)>0&&!he.israp,value:Lt==null?void 0:Lt.choice_id},A.a.createElement("span",{className:"mr3"},Mt),A.a.createElement(ve.a,{className:ae.a.renderHtml,value:Lt==null?void 0:Lt.choice_text})))}))),Object(Oe.s)()&&(Te==null||((bt=Te.exercise)===null||bt===void 0)?void 0:bt.answer_open)&&(Te==null||((Nt=Te.exercise)===null||Nt===void 0)?void 0:Nt.exercise_status)==3&&A.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A",he==null||((zt=he.question_choices)===null||zt===void 0)?void 0:zt.map(function(Lt,sn){return Lt.standard_boolean?ce[sn]:""}).join("")))},Ii=function(he,rt){return A.a.createElement(Ge,{item:he,answerData:Te,onBlur:function(Ot,bt,Nt){return Ys(Ot,bt,he==null?void 0:he.question_id,Nt,he)}})},Gi=function(he,rt){return wr?A.a.createElement(Tt,{item:he,answerData:Te,onBlur:function(Ot,bt,Nt){return pi(he==null?void 0:he.question_id,null,Ot,void 0,bt,Nt)},isEducation:wr}):A.a.createElement(it,{item:he,answerData:Te,onBlur:function(Ot){return Xs(Ot,he==null?void 0:he.question_id,he)},isEducation:wr})},Qs=function(he,rt){return A.a.createElement(ge,{item:he,answerData:Te})},da=function(he,rt){return A.a.createElement(oe,{item:he,answerData:Te})},ii=function(he,rt,He){var Ot,bt,Nt=Te==null||((Ot=Te.exercise_question_types)===null||Ot===void 0)?void 0:Ot.find(function(zt){return zt.question_type===rt});return A.a.createElement(A.a.Fragment,null,A.a.createElement("h1",{className:"font14 current",onClick:function(){dr[rt]=!dr[rt],Fr(Object(S.a)({},dr))}},!dr[rt]&&A.a.createElement(Pe.a,null),dr[rt]&&A.a.createElement(Se.a,null),A.a.createElement("span",{className:"ml5 c-grey-666"},he)),A.a.createElement("ul",{className:ae.a.answerSheet,key:rt},!dr[rt]&&(Nt==null||((bt=Nt.items)===null||bt===void 0)?void 0:bt.map(function(zt,Lt){if(zt.question_type===rt){var sn,Ht;return A.a.createElement("li",{onClick:function(){var Tn;if(!Ki&&(Te==null||((Tn=Te.exercise)===null||Tn===void 0)?void 0:Tn.user_exercise_status)===0&&Object(Oe.s)()){var Yn,un,Mn,xn;if(!((Yn=Te.exercise_question_types)!==null&&Yn!==void 0&&(un=Yn[_n])!==null&&un!==void 0&&(Mn=un.items)!==null&&Mn!==void 0&&(xn=Mn[In])!==null&&xn!==void 0&&xn.repeat_answer)){di(!0),ni(3),Ua({oneindex:He,twoindex:Lt});return}}yi(He),bi(Lt);var Hn="Anchor_".concat(rt,"_").concat(Lt),Un=document.getElementById(Hn);Un&&setTimeout(function(){return Un.scrollIntoView({block:"start",behavior:"smooth"})})},key:Lt,className:(Te==null||((sn=Te.question_status)===null||sn===void 0)?void 0:sn.some(function(Mt){return Mt.ques_id===zt.question_id&&(Mt==null?void 0:Mt.ques_status)===1}))&&ae.a.active},Lt+1,(Te==null||((Ht=Te.question_status)===null||Ht===void 0)?void 0:Ht.some(function(Mt){return Mt.ques_id===zt.question_id&&(Mt==null?void 0:Mt.ques_status)===2}))&&A.a.createElement("div",{style:{height:3,background:"#0152d9",position:"absolute",width:26,bottom:0}}))}}))))},zi=function(he,rt){var He,Ot,bt,Nt,zt,Lt,sn,Ht,Mt,Tn=(he==null?void 0:he.question_type)==5?he==null?void 0:he.shixun_name:he==null?void 0:he.question_title,Yn="",un=(he==null?void 0:he.question_type)===0||(he==null?void 0:he.question_type)===1;if(un){var Mn;he==null||((Mn=he.question_choices)===null||Mn===void 0)||Mn.forEach(function(xn,Hn){xn.standard_boolean&&(Yn=Yn+ce[Hn])})}return A.a.createElement("div",{className:ae.a.questionItem,id:"Anchor_".concat(he==null?void 0:he.question_type,"_").concat(rt)},A.a.createElement("div",{style:{display:"flex",marginTop:20,userSelect:"none"}},A.a.createElement("span",{style:{flexShrink:0},className:"font18"},rt+1,"."),A.a.createElement(ve.a,{value:he==null?void 0:he.question_title}),A.a.createElement("span",{style:{flexShrink:0},className:"font16"},"\uFF08",he==null?void 0:he.question_score,"\u5206\uFF09",(he==null?void 0:he.question_type)===7?"\u5171".concat(he==null||((He=he.sub_exercise_questions)===null||He===void 0)?void 0:He.length,"\u5C0F\u9898"):""," "),!(he!=null&&he.repeat_answer)&&A.a.createElement("span",{style:{color:"#FA6400 ",marginLeft:10,fontSize:16}},"\u6CE8\u610F\uFF1A\u8BE5\u9898\u4E0D\u5141\u8BB8\u91CD\u590D\u7B54\u9898"),!!(he!=null&&(Ot=he.schools)!==null&&Ot!==void 0&&Ot.length)&&A.a.createElement(f.a,{title:"\u8BE5\u5B9E\u8BAD\u9898\u9762\u5411\u6307\u5B9A\u5355\u4F4D\u5F00\u653E"},A.a.createElement("i",{className:"iconfont icon-zhidinggongkai1 line24 font18 c-orange"}))),(he==null?void 0:he.question_type)==0&&Os(he,he==null?void 0:he.question_type),(he==null?void 0:he.question_type)==2&&Os(he,he==null?void 0:he.question_type),(he==null?void 0:he.question_type)==1&&Ga(he,he==null?void 0:he.question_type),(he==null?void 0:he.question_type)==3&&Ii(he,he==null?void 0:he.question_type),(he==null?void 0:he.question_type)==4&&Gi(he,he==null?void 0:he.question_type),(he==null?void 0:he.question_type)==5&&Qs(he,he==null?void 0:he.question_type),(he==null?void 0:he.question_type)==6&&da(he,he==null?void 0:he.question_type),(he==null?void 0:he.question_type)==7&&Ka(he,he==null?void 0:he.question_type,rt),!!(he!=null&&(bt=he.answer_comments)!==null&&bt!==void 0&&bt.length)&&A.a.createElement("div",{className:"mt30"},he==null||((Nt=he.answer_comments)===null||Nt===void 0)?void 0:Nt.map(function(xn,Hn){var Un,Qr;return xn.comment?A.a.createElement("div",null,A.a.createElement(j.a,{align:"middle",gutter:[0,10]},A.a.createElement(w.a,{flex:"50px"},A.a.createElement("img",{src:vt.a.API_SERVER+"/images/"+((Un=xn.user)===null||Un===void 0?void 0:Un.image_url),width:"40",style:{borderRadius:40}})),A.a.createElement(w.a,{flex:"1"},(Qr=xn.user)===null||Qr===void 0?void 0:Qr.name,A.a.createElement("br",null),xn.updated_at)),A.a.createElement(j.a,{align:"middle",gutter:[0,10]},A.a.createElement(w.a,{flex:"50px"}),A.a.createElement(w.a,{flex:"1"},A.a.createElement(Ye,{autoSize:!0,value:xn.comment,disabled:!0})))):null})),A.a.createElement("div",{className:ae.a.itemType},A.a.createElement(j.a,null,A.a.createElement(w.a,{flex:"1"}),A.a.createElement(w.a,null,(he==null?void 0:he.question_type)<3&&(he==null?void 0:he.standard_answer_show)&&A.a.createElement("span",{className:"font16 ml20"},"\u6B63\u786E\u7B54\u6848\uFF1A",un?Yn:he==null?void 0:he.standard_answer_show),(Object(Oe.c)()||Object(Oe.s)()&&(Te==null||((zt=Te.exercise)===null||zt===void 0)?void 0:zt.user_exercise_status)>0&&(Te==null||((Lt=Te.exercise)===null||Lt===void 0)?void 0:Lt.open_score))&&A.a.createElement("span",{className:"font16 ml20"},(he==null?void 0:he.user_score)&&A.a.createElement("span",null,A.a.createElement("span",{className:xe[Number(he==null?void 0:he.answer_status)]||"c-orange-ff9"},he==null?void 0:he.user_score)," ","\u5206"),!(he!=null&&he.user_score)&&A.a.createElement("span",{className:"c-red"},"\u672A\u8BC4")),(he==null?void 0:he.question_type)==5&&(Te==null||((sn=Te.exercise)===null||sn===void 0)?void 0:sn.user_exercise_status)===0&&(he==null?void 0:he.answer_status)!=3&&A.a.createElement(M.a,{type:"primary",className:"font16 ml20",onClick:function(){return la(he)}},"\u8FDB\u5165\u7B54\u9898"),Object(Oe.s)()&&(Te==null||((Ht=Te.exercise)===null||Ht===void 0)?void 0:Ht.user_exercise_status)===0&&(he==null?void 0:he.question_type)==6&&A.a.createElement(M.a,{type:"primary",className:"font16 ml20",onClick:function(){return Vs(he)}},"\u8FDB\u5165\u7B54\u9898"))),(he==null?void 0:he.question_type)<=4&&((he==null?void 0:he.standard_answer_show)||(he==null||((Mt=he.standard_answer)===null||Mt===void 0)?void 0:Mt.length)>0)&&A.a.createElement(j.a,{style:{marginTop:14}},A.a.createElement("span",{className:"font16 ml20"},"\u89E3\u6790\uFF1A"),A.a.createElement(ve.a,{className:ae.a.renderHtml,value:he==null?void 0:he.analysis}))))},Rs=function(he,rt){return A.a.createElement(y.Fragment,null,he.question_type===0&&ii("\u5355\u9009\u9898",0,rt),he.question_type===1&&ii("\u591A\u9009\u9898",1,rt),he.question_type===2&&ii("\u5224\u65AD\u9898",2,rt),he.question_type===3&&ii("\u586B\u7A7A\u9898",3,rt),he.question_type===4&&ii("\u7B80\u7B54\u9898",4,rt),he.question_type===5&&ii("\u5B9E\u8BAD\u9898",5,rt),he.question_type===6&&ii("\u7F16\u7A0B\u9898",6,rt),he.question_type===7&&ii("\u7EC4\u5408\u9898",7,rt))},wi=function(he){var rt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],He=["","\u5341","\u767E","\u5343","\u4E07"];he=parseInt(he);var Ot=function(Lt){for(var sn=Lt.toString().split("").reverse(),Ht="",Mt=0;Mt<sn.length;Mt++)Ht=(Mt==0&&sn[Mt]==0||Mt>0&&sn[Mt]==0&&sn[Mt-1]==0?"":rt[sn[Mt]]+(sn[Mt]==0?He[0]:He[Mt]))+Ht;return Ht},bt=Math.floor(he/1e4),Nt=he%1e4;return Nt.toString().length<4&&(Nt="0"+Nt),bt?Ot(bt)+"\u4E07"+Ot(Nt):Ot(he)},Vi=function(){var he,rt,He,Ot,bt,Nt,zt,Lt,sn,Ht,Mt,Tn;return A.a.createElement(y.Fragment,{key:_n},A.a.createElement("div",{className:"pt20"},A.a.createElement("span",{className:"font16 c-light-primary"},wi(_n+1),"\u3001",Te==null||((he=Te.exercise_question_types)===null||he===void 0||((rt=he[_n])===null||rt===void 0))?void 0:rt.name),A.a.createElement("span",{className:"c-grey-999"},"\uFF08\u5171",Te==null||((He=Te.exercise_question_types)===null||He===void 0||((Ot=He[_n])===null||Ot===void 0))?void 0:Ot.count,"\u9898\uFF1B",(Te==null||((bt=Te.exercise_question_types)===null||bt===void 0||((Nt=bt[_n])===null||Nt===void 0))?void 0:Nt.question_type)===7?"\u5305\u542B".concat(Te==null||((zt=Te.exercise_question_types)===null||zt===void 0||((Lt=zt[_n])===null||Lt===void 0))?void 0:Lt.sub_questions_count,"\u5C0F\u9898"):""," ","\u5171",Te==null||((sn=Te.exercise_question_types)===null||sn===void 0||((Ht=sn[_n])===null||Ht===void 0))?void 0:Ht.score,"\u5206\uFF09")),A.a.createElement(y.Fragment,{key:In},zi(Te==null||((Mt=Te.exercise_question_types)===null||Mt===void 0||((Tn=Mt[_n].items)===null||Tn===void 0))?void 0:Tn[In],In)))};return A.a.createElement(d.a,{size:"large",spinning:li},ar&&(Te==null||((ut=Te.exercise)===null||ut===void 0)?void 0:ut.user_exercise_status)===0&&A.a.createElement(me.a,{exerciseUserInfo:Ur.exerciseUserInfo,iframe:Xr,socket:Hi}),A.a.createElement("iframe",{style:{display:Ra},id:"iframeShixuns",className:ae.a.iframe,src:ci,ref:Xr,frameBorder:"0"}),A.a.createElement("section",{className:"edu-container ".concat(wr&&ae.a.wrpAnswer)},A.a.createElement("section",{className:"animated fadeIn ".concat(wr&&ae.a.eduTitle)},A.a.createElement("aside",{className:"mt10"},Object(ke.r)()&&A.a.createElement(V.a,{separator:">"},A.a.createElement(V.a.Item,null,A.a.createElement(T.a,{to:"/"},"\u8BD5\u5377")),A.a.createElement(V.a.Item,null,(Et=$n.userInfo)===null||Et===void 0?void 0:Et.real_name)),!Object(ke.r)()&&zr.showHeaderFooter&&A.a.createElement(V.a,{separator:">"},A.a.createElement(V.a.Item,null,A.a.createElement(T.a,{to:"/classrooms/".concat(jt.coursesId,"/exercise")},(st=$n.userInfo)===null||st===void 0||((Ut=st.course)===null||Ut===void 0)?void 0:Ut.course_name)),A.a.createElement(V.a.Item,null,A.a.createElement(T.a,{to:"/classrooms/".concat(jt.coursesId,"/exercise")},"\u8BD5\u5377")),A.a.createElement(V.a.Item,null,A.a.createElement(T.a,{to:"/classrooms/".concat(jt.coursesId,"/exercise/").concat(jt.categoryId,"/detail")},"\u8BD5\u5377\u8BE6\u60C5")),A.a.createElement(V.a.Item,null,(Zt=$n.userInfo)===null||Zt===void 0?void 0:Zt.real_name))),A.a.createElement("aside",{className:[ae.a.title,"mt10"].join(" ")},A.a.createElement(j.a,{style:{width:"100%",flexFlow:"nowrap"},align:"middle"},A.a.createElement(w.a,{style:{flex:"1"}},A.a.createElement("div",{className:ae.a.title},(zr==null?void 0:zr.showHeaderFooter)&&A.a.createElement(T.a,{to:Object(ke.r)()?"/":"/classrooms/".concat(jt.coursesId,"/exercise/").concat(jt.categoryId,"/detail")},A.a.createElement(we.a,{className:"font16 c-black"})),Object(ke.A)(Te==null||((Rt=Te.exercise)===null||Rt===void 0)?void 0:Rt.exercise_status),A.a.createElement("strong",{className:"font24 ml5"},Te==null||((qt=Te.exercise)===null||qt===void 0)?void 0:qt.exercise_name))),A.a.createElement(w.a,{style:{display:"flex"}},Object(Oe.c)()&&A.a.createElement(M.a,{type:"primary",onClick:fi},"\u6253\u56DE\u91CD\u505A"),A.a.createElement(w.a,null,((Te==null||((Qt=Te.exercise)===null||Qt===void 0)?void 0:Qt.commit_status)==2||(Te==null||((en=Te.exercise)===null||en===void 0)?void 0:en.commit_status)==1)&&Object(Oe.c)()&&!Object(ke.r)()&&A.a.createElement(M.a,{className:"ml10",type:"primary",onClick:function(){return Y.d.push("/classrooms/".concat(jt.coursesId,"/exercise/").concat(jt.categoryId,"/export/").concat(jt.login))}},A.a.createElement(Fe.a,null),"\u5BFC\u51FA")),!(Object(Oe.c)()||Object(Oe.s)()&&(Te==null||((Yt=Te.exercise)===null||Yt===void 0)?void 0:Yt.user_exercise_status)==1)&&!!(Te!=null&&(cn=Te.exercise)!==null&&cn!==void 0&&cn.left_time)&&A.a.createElement("aside",{className:"".concat(ae.a.countDown," ").concat(Ks)},A.a.createElement("div",null,"\u5269\u4F59\u65F6\u95F4:",A.a.createElement(et,{value:Vn,onFinish:Fa})),A.a.createElement(M.a,{className:"ml10",type:"primary",onClick:Fa,ghost:!0},A.a.createElement("span",{className:"iconfont icon-shuaxin2 mr5"}),"\u5237\u65B0")),Object(Oe.s)()&&(Te==null||((Sn=Te.exercise)===null||Sn===void 0)?void 0:Sn.user_exercise_status)===0&&A.a.createElement("aside",{className:wr?ae.a.eduSubmit:""},A.a.createElement(M.a,{style:{width:"60px",height:"28px",marginLeft:10},type:"primary",onClick:function(){return As(!1)}},"\u4EA4\u5377")))))),gi.status===0&&A.a.createElement(j.a,{className:"".concat(wr?"mt70":"mt10"," ").concat(ae.a.answerWrp)},A.a.createElement(w.a,{flex:Gt?"316px":"16px",className:wr?"mb100":""},A.a.createElement("section",{style:{position:"sticky",top:0,zIndex:1}},!wr&&vn&&A.a.createElement(Me.a,{id:jt.categoryId,number:(Te==null||((kn=Te.exercise)===null||kn===void 0)?void 0:kn.photo_count)-(Te==null||((gt=Te.exercise)===null||gt===void 0)?void 0:gt.take_photo),take_photo:Te==null||((Wt=Te.exercise)===null||Wt===void 0)?void 0:Wt.take_photo,ref:ia,time:(Jt=Te.exercise)===null||Jt===void 0?void 0:Jt.left_time,update:Zn,supportCamera:function(he){he===2?(Zn(),Yr(!0),fn(gn==null?void 0:gn.screen_open)):he===1&&setTimeout(function(){return Ln.history.push("/")},3e3)}}),A.a.createElement("div",{className:"relative",style:{minHeight:236}},wr&&A.a.createElement("section",null,vn&&A.a.createElement("div",{className:ae.a.eduVideo},A.a.createElement(Me.a,{id:jt.categoryId,number:(Te==null||((tn=Te.exercise)===null||tn===void 0)?void 0:tn.photo_count)-(Te==null||((nn=Te.exercise)===null||nn===void 0)?void 0:nn.take_photo),take_photo:Te==null||((pn=Te.exercise)===null||pn===void 0)?void 0:pn.take_photo,ref:ia,time:(X=Te.exercise)===null||X===void 0?void 0:X.left_time,update:Zn,supportCamera:function(he){he===2?(Zn(),Yr(!0),fn(gn==null?void 0:gn.screen_open)):he===1&&setTimeout(function(){return Ln.history.push("/")},3e3)}})),Gt&&A.a.createElement(j.a,{className:ae.a.eduUsername,style:{background:"#fff",padding:"16px 20px"}},A.a.createElement(w.a,null,"\u59D3\u540D\uFF1A",(Te==null||((L=Te.exercise)===null||L===void 0)?void 0:L.user_name)||"- -"),A.a.createElement(w.a,null,A.a.createElement(G.a,{style:{margin:"0 25px"},type:"vertical"})),A.a.createElement(w.a,null,"\u5B66\u53F7\uFF1A",(Te==null||((N=Te.exercise)===null||N===void 0)?void 0:N.student_id)||"- -")),A.a.createElement("div",{className:ae.a.eduTip},A.a.createElement("div",{className:"c-grey-666 tc"},"\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u5982\u9047\u95EE\u9898\uFF0C\u8BF7\u62E8\u6253\u4EE5\u4E0B\u7535\u8BDD"),A.a.createElement("div",{className:"font16 tc blod"},"010-62781166"),A.a.createElement("div",{className:"font16 tc blod"},"010-62799826"),A.a.createElement("div",{className:"font16 tc blod"},"18910624893"),A.a.createElement("div",{className:"font16 tc blod"},"13366506792")),Object(Oe.s)()&&A.a.createElement(j.a,{className:ae.a.eduQrcode,align:"middle"},A.a.createElement(w.a,null,A.a.createElement(le.a,{value:"https://".concat(document.domain,"/live-push.html?id=").concat(jt.categoryId,"&login=").concat(jt.login,"&cookie=").concat(Object(ke.F)("_educoder_session"))})),A.a.createElement(w.a,{className:"ml15"},"\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B",A.a.createElement("br",null),"\u5F00\u542F\u624B\u673A\u89C6\u9891\u5F55\u5236"))),!wr&&A.a.createElement("section",null,Gt&&A.a.createElement(w.a,{flex:"1",style:{background:"#fff",height:"90px",marginBottom:"10px",padding:"16px 20px"}},A.a.createElement("p",null,"\u59D3\u540D\uFF1A",(Te==null||((z=Te.exercise)===null||z===void 0)?void 0:z.user_name)||"- -"),A.a.createElement("p",null,"\u5B66\u53F7\uFF1A",(Te==null||((te=Te.exercise)===null||te===void 0)?void 0:te.student_id)||"- -")),Object(Oe.s)()&&((Q=Te.exercise)===null||Q===void 0?void 0:Q.user_exercise_status)===0&&((Re=Te.exercise)===null||Re===void 0?void 0:Re.open_phone_video_recording)&&A.a.createElement(j.a,{className:ae.a.eduQrcode,style:{marginTop:10},align:"middle"},A.a.createElement(w.a,null,A.a.createElement(le.a,{value:"https://".concat(document.domain,"/live-push.html?id=").concat(jt.categoryId,"&login=").concat(jt.login,"&cookie=").concat(Object(ke.F)("_educoder_session"))})),A.a.createElement(w.a,{className:"ml15"},"\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B",A.a.createElement("br",null),"\u5F00\u542F\u624B\u673A\u89C6\u9891\u5F55\u5236")),(Te==null||((ct=Te.exercise)===null||ct===void 0||((Ct=ct.exercise_description)===null||Ct===void 0))?void 0:Ct.length)>0&&Gt&&A.a.createElement(w.a,{flex:"1",style:{background:"#fff",marginBottom:"10px",padding:"16px 20px"}},A.a.createElement("p",{style:{fontWeight:500}},"\u8003\u8BD5\u987B\u77E5"),A.a.createElement("p",null,Te==null||((Pt=Te.exercise)===null||Pt===void 0)?void 0:Pt.exercise_description)),Gt&&A.a.createElement("aside",{className:"bg-white p16 mt10"},A.a.createElement(j.a,null,A.a.createElement(w.a,{span:8},A.a.createElement("span",{className:"font16 blod"},"\u7B54\u9898\u5361")),A.a.createElement(w.a,{span:16},Object(Oe.s)()&&A.a.createElement("div",{className:"tr",style:{display:"flex",alignItems:"center",justifyContent:"end"}},A.a.createElement("span",{className:ae.a.answerYes}),"\u5DF2\u7B54",A.a.createElement("span",{style:{width:13,height:13,display:"flex",flexDirection:"column-reverse"},className:"".concat(ae.a.answerNo," ml10")},A.a.createElement("div",{style:{height:"10%",background:"#0152d9"}})),"\u90E8\u5206\u7B54\u9898",A.a.createElement("span",{className:"".concat(ae.a.answerNo," ml10")}),"\u672A\u7B54"))),A.a.createElement("aside",{className:ae.a.answerInfo},A.a.createElement(j.a,null,Object(Oe.s)()&&A.a.createElement(A.a.Fragment,null,A.a.createElement(w.a,{span:12},"\u7B54\u9898\u8FDB\u5EA6"),A.a.createElement(w.a,{span:12,className:"tr c-blue"},Te==null||((ht=Te.question_status)===null||ht===void 0||((Vt=ht.filter(function(kt){return!!kt.ques_status}))===null||Vt===void 0))?void 0:Vt.length," ","/ ",Te==null||((rn=Te.exercise_types)===null||rn===void 0)?void 0:rn.q_counts),A.a.createElement(w.a,{span:24},A.a.createElement(a.a,{trailColor:"#c3ced2",percent:(Te==null||((An=Te.question_status)===null||An===void 0||((Cn=An.filter(function(kt){return!!kt.ques_status}))===null||Cn===void 0))?void 0:Cn.length)/(Te==null||((En=Te.exercise_types)===null||En===void 0)?void 0:En.q_counts)*100,showInfo:!1}))),A.a.createElement(w.a,null,A.a.createElement("span",{className:"c-grey-333"},"\u5171"," ",A.a.createElement("span",{className:"c-blue-4ca"},(Te==null||((Fn=Te.exercise_types)===null||Fn===void 0)?void 0:Fn.q_counts)||(Te==null||((mr=Te.exercise_scores)===null||mr===void 0||((kr=mr.exercise_types)===null||kr===void 0))?void 0:kr.q_counts))," ","\u9898\uFF1A"),A.a.createElement("span",{className:"c-grey-333"},"\u6EE1\u5206"," ",A.a.createElement("span",{className:"c-blue-4ca"},(Te==null||((Kn=Te.exercise_types)===null||Kn===void 0)?void 0:Kn.q_scores)||(Te==null||((or=Te.exercise_scores)===null||or===void 0||((Cr=or.exercise_types)===null||Cr===void 0))?void 0:Cr.q_scores))," ","\u5206")))),A.a.createElement(j.a,null,A.a.createElement(w.a,{flex:"1"},A.a.createElement("aside",{className:ae.a.cardList},Te==null||((Er=Te.exercise_question_types)===null||Er===void 0)?void 0:Er.map(function(kt,he){return A.a.createElement(y.Fragment,{key:kt.question_type},Rs(kt,he))}))))),A.a.createElement("div",{className:ae.a.fold,onClick:function(){return on(!Gt)}},Gt&&A.a.createElement("span",{className:"icon-zuojiantou iconfont c-grey-c"}),!Gt&&A.a.createElement("span",{className:"icon-youjiantou iconfont c-grey-c"})))))),A.a.createElement(w.a,{flex:"1"},A.a.createElement("section",{style:{minHeight:400,position:"relative"},className:[ae.a.bg,"pl30","pb30","mb50","ml20"].join(" ")},A.a.createElement("div",{style:{maxHeight:600,overflow:"hidden auto",paddingRight:30}},Vi()),A.a.createElement("div",{style:{marginTop:60,textAlign:"center",paddingRight:30}},(_n!=0||In!=0)&&A.a.createElement(M.a,{className:"".concat(ae.a.submitButton," mr10"),type:"default",onClick:function(){var he;if(!Ki&&(Te==null||((he=Te.exercise)===null||he===void 0)?void 0:he.user_exercise_status)===0&&Object(Oe.s)()){var rt,He,Ot,bt;if(!((rt=Te.exercise_question_types)!==null&&rt!==void 0&&(He=rt[_n])!==null&&He!==void 0&&(Ot=He.items)!==null&&Ot!==void 0&&(bt=Ot[In])!==null&&bt!==void 0&&bt.repeat_answer)){di(!0),ni(1);return}}Te.exercise_question_types[_n].items[In].israp=!1,dn(Object(S.a)({},Te)),In===0?(_n-=1,In=Te.exercise_question_types[_n].items.length-1):In-=1,yi(_n),bi(In)}},"\u4E0A\u4E00\u9898"),!(_n===(Te==null||((nr=Te.exercise_question_types)===null||nr===void 0)?void 0:nr.length)-1&&In===(Te==null||((Kr=Te.exercise_question_types)===null||Kr===void 0||((Pr=Kr[_n])===null||Pr===void 0||((Gr=Pr.items)===null||Gr===void 0)))?void 0:Gr.length)-1)&&A.a.createElement(M.a,{className:ae.a.submitButton,type:"primary",onClick:function(){var he;if(!Ki&&(Te==null||((he=Te.exercise)===null||he===void 0)?void 0:he.user_exercise_status)===0&&Object(Oe.s)()){var rt,He,Ot,bt;if(!((rt=Te.exercise_question_types)!==null&&rt!==void 0&&(He=rt[_n])!==null&&He!==void 0&&(Ot=He.items)!==null&&Ot!==void 0&&(bt=Ot[In])!==null&&bt!==void 0&&bt.repeat_answer)){di(!0),ni(2);return}}Te.exercise_question_types[_n].items[In].israp=!1,dn(Object(S.a)({},Te)),Te.exercise_question_types[_n].items.length-1===In?(_n=_n+1,In=0):In=In+1,yi(_n),bi(In)}},"\u4E0B\u4E00\u9898"))))),gi.status!==0&&A.a.createElement(At,{data:gi}),A.a.createElement(_.a,{title:"\u6CE8\u610F",visible:_s,onCancel:function(){return di(!1)},footer:!1},A.a.createElement("div",null,A.a.createElement("p",{style:{marginBottom:0}},"\u79BB\u5F00\u8BE5\u9898\u540E\u4E0D\u5141\u8BB8\u518D\u6B21\u4FEE\u6539\u7B54\u6848\uFF0C\u786E\u8BA4\u79BB\u5F00\u5417\uFF1F"),A.a.createElement("div",{style:{marginTop:60,display:"flex",justifyContent:"space-between"}},A.a.createElement(c.a,{checked:Ki,onChange:function(he){Na(he.target.checked)}},"\u4E0B\u6B21\u4E0D\u518D\u663E\u793A"),A.a.createElement("div",null,A.a.createElement(M.a,{onClick:function(){Te.exercise_question_types[_n].items[In].israp?(Te.exercise_question_types[_n].items[In].israp=!0,dn(Object(S.a)({},Te))):Te.exercise_question_types[_n].items[In].israp===""&&(Te.exercise_question_types[_n].items[In].israp=!0,dn(Object(S.a)({},Te))),di(!1)}},"\u6211\u518D\u60F3\u60F3"),A.a.createElement(M.a,{onClick:function(){Te.exercise_question_types[_n].items[In].israp=!1,dn(Object(S.a)({},Te)),Ts===1?(In===0?(_n-=1,In=Te.exercise_question_types[_n].items.length-1):In-=1,yi(_n),bi(In)):Ts===2?(Te.exercise_question_types[_n].items.length-1===In?(_n=_n+1,In=0):In=In+1,yi(_n),bi(In)):(yi(sa.oneindex),bi(sa.twoindex)),di(!1)},type:"primary",style:{marginLeft:30}},"\u786E\u8BA4")))))))},_t=se.default=Object(Y.a)(function(yt){var Be=yt.loading,Ze=yt.user,nt=yt.exercise,ut=yt.globalSetting;return{globalSetting:ut,user:Ze,exercise:nt,loading:Be.effects}})(Je)},N0LK:function(We,se,B){"use strict";B.d(se,"C",function(){return Z}),B.d(se,"v",function(){return U}),B.d(se,"s",function(){return V}),B.d(se,"t",function(){return W}),B.d(se,"U",function(){return M}),B.d(se,"J",function(){return K}),B.d(se,"O",function(){return j}),B.d(se,"p",function(){return n}),B.d(se,"T",function(){return w}),B.d(se,"q",function(){return m}),B.d(se,"N",function(){return f}),B.d(se,"M",function(){return p}),B.d(se,"Q",function(){return c}),B.d(se,"u",function(){return r}),B.d(se,"x",function(){return d}),B.d(se,"I",function(){return u}),B.d(se,"f",function(){return o}),B.d(se,"h",function(){return s}),B.d(se,"g",function(){return a}),B.d(se,"i",function(){return R}),B.d(se,"G",function(){return O}),B.d(se,"H",function(){return S}),B.d(se,"r",function(){return D}),B.d(se,"R",function(){return I}),B.d(se,"d",function(){return _}),B.d(se,"e",function(){return b}),B.d(se,"E",function(){return v}),B.d(se,"F",function(){return h}),B.d(se,"j",function(){return C}),B.d(se,"z",function(){return x}),B.d(se,"K",function(){return P}),B.d(se,"L",function(){return k}),B.d(se,"m",function(){return A}),B.d(se,"k",function(){return T}),B.d(se,"A",function(){return $}),B.d(se,"a",function(){return le}),B.d(se,"n",function(){return de}),B.d(se,"l",function(){return Pe}),B.d(se,"D",function(){return Se}),B.d(se,"B",function(){return we}),B.d(se,"b",function(){return Fe}),B.d(se,"S",function(){return Me}),B.d(se,"o",function(){return me}),B.d(se,"P",function(){return pe}),B.d(se,"w",function(){return ne}),B.d(se,"c",function(){return Ee}),B.d(se,"y",function(){return je});function Z(ue){return!ue||typeof ue!="string"?!0:ue.trim().length===0}const G=/{(\d+)}/g;function U(ue,...ve){return ve.length===0?ue:ue.replace(G,function(De,Ne){const it=parseInt(Ne,10);return isNaN(it)||it<0||it>=ve.length?De:ve[it]})}function V(ue){return ue.replace(/[<>&]/g,function(ve){switch(ve){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return ve}})}function W(ue){return ue.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function M(ue,ve=" "){const De=K(ue,ve);return j(De,ve)}function K(ue,ve){if(!ue||!ve)return ue;const De=ve.length;if(De===0||ue.length===0)return ue;let Ne=0;for(;ue.indexOf(ve,Ne)===Ne;)Ne=Ne+De;return ue.substring(Ne)}function j(ue,ve){if(!ue||!ve)return ue;const De=ve.length,Ne=ue.length;if(De===0||Ne===0)return ue;let it=Ne,pt=-1;for(;!(pt=ue.lastIndexOf(ve,it-1),pt===-1||pt+De!==it);){if(pt===0)return"";it=pt}return ue.substring(0,it)}function n(ue){return ue.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function w(ue){return ue.replace(/\*/g,"")}function m(ue,ve,De={}){if(!ue)throw new Error("Cannot create regex from empty string");ve||(ue=W(ue)),De.wholeWord&&(/\B/.test(ue.charAt(0))||(ue="\\b"+ue),/\B/.test(ue.charAt(ue.length-1))||(ue=ue+"\\b"));let Ne="";return De.global&&(Ne+="g"),De.matchCase||(Ne+="i"),De.multiline&&(Ne+="m"),De.unicode&&(Ne+="u"),new RegExp(ue,Ne)}function f(ue){if(ue.source==="^"||ue.source==="^$"||ue.source==="$"||ue.source==="^\\s*$")return!1;const ve=ue.exec("");return!!(ve&&ue.lastIndex===0)}function p(ue){return(ue.global?"g":"")+(ue.ignoreCase?"i":"")+(ue.multiline?"m":"")+(ue.unicode?"u":"")}function c(ue){return ue.split(/\r\n|\r|\n/)}function r(ue){for(let ve=0,De=ue.length;ve<De;ve++){const Ne=ue.charCodeAt(ve);if(Ne!==32&&Ne!==9)return ve}return-1}function d(ue,ve=0,De=ue.length){for(let Ne=ve;Ne<De;Ne++){const it=ue.charCodeAt(Ne);if(it!==32&&it!==9)return ue.substring(ve,Ne)}return ue.substring(ve,De)}function u(ue,ve=ue.length-1){for(let De=ve;De>=0;De--){const Ne=ue.charCodeAt(De);if(Ne!==32&&Ne!==9)return De}return-1}function o(ue,ve){return ue<ve?-1:ue>ve?1:0}function s(ue,ve,De=0,Ne=ue.length,it=0,pt=ve.length){for(;De<Ne&&it<pt;De++,it++){let Tt=ue.charCodeAt(De),St=ve.charCodeAt(it);if(Tt<St)return-1;if(Tt>St)return 1}const mt=Ne-De,dt=pt-it;return mt<dt?-1:mt>dt?1:0}function a(ue,ve){return R(ue,ve,0,ue.length,0,ve.length)}function R(ue,ve,De=0,Ne=ue.length,it=0,pt=ve.length){for(;De<Ne&&it<pt;De++,it++){let Tt=ue.charCodeAt(De),St=ve.charCodeAt(it);if(Tt===St)continue;if(Tt>=128||St>=128)return s(ue.toLowerCase(),ve.toLowerCase(),De,Ne,it,pt);O(Tt)&&(Tt-=32),O(St)&&(St-=32);const Ue=Tt-St;if(Ue===0)continue;return Ue}const mt=Ne-De,dt=pt-it;return mt<dt?-1:mt>dt?1:0}function O(ue){return ue>=97&&ue<=122}function S(ue){return ue>=65&&ue<=90}function D(ue,ve){return ue.length===ve.length&&R(ue,ve)===0}function I(ue,ve){const De=ve.length;return ve.length>ue.length?!1:R(ue,ve,0,De)===0}function _(ue,ve){let De,Ne=Math.min(ue.length,ve.length);for(De=0;De<Ne;De++)if(ue.charCodeAt(De)!==ve.charCodeAt(De))return De;return Ne}function b(ue,ve){let De,Ne=Math.min(ue.length,ve.length);const it=ue.length-1,pt=ve.length-1;for(De=0;De<Ne;De++)if(ue.charCodeAt(it-De)!==ve.charCodeAt(pt-De))return De;return Ne}function v(ue){return 55296<=ue&&ue<=56319}function h(ue){return 56320<=ue&&ue<=57343}function C(ue,ve){return(ue-55296<<10)+(ve-56320)+65536}function x(ue,ve,De){const Ne=ue.charCodeAt(De);if(v(Ne)&&De+1<ve){const it=ue.charCodeAt(De+1);if(h(it))return C(Ne,it)}return Ne}function g(ue,ve){const De=ue.charCodeAt(ve-1);if(h(De)&&ve>1){const Ne=ue.charCodeAt(ve-2);if(v(Ne))return C(Ne,De)}return De}function P(ue,ve){const De=ae.getInstance(),Ne=ve,it=ue.length,pt=x(ue,it,ve);ve+=pt>=65536?2:1;let mt=De.getGraphemeBreakType(pt);for(;ve<it;){const dt=x(ue,it,ve),Tt=De.getGraphemeBreakType(dt);if(Ee(mt,Tt))break;ve+=dt>=65536?2:1,mt=Tt}return ve-Ne}function k(ue,ve){const De=ae.getInstance(),Ne=ve,it=g(ue,ve);ve-=it>=65536?2:1;let pt=De.getGraphemeBreakType(it);for(;ve>0;){const mt=g(ue,ve),dt=De.getGraphemeBreakType(mt);if(Ee(dt,pt))break;ve-=mt>=65536?2:1,pt=dt}return Ne-ve}const y=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function A(ue){return y.test(ue)}const F=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function T(ue){return F.test(ue)}const Y=/^[\t\n\r\x20-\x7E]*$/;function $(ue){return Y.test(ue)}const le=/[\u2028\u2029]/;function de(ue){return le.test(ue)}function Pe(ue){for(let ve=0,De=ue.length;ve<De;ve++)if(Se(ue.charCodeAt(ve)))return!0;return!1}function Se(ue){return ue=+ue,ue>=11904&&ue<=55215||ue>=63744&&ue<=64255||ue>=65281&&ue<=65374}function we(ue){return ue>=127462&&ue<=127487||ue===8986||ue===8987||ue===9200||ue===9203||ue>=9728&&ue<=10175||ue===11088||ue===11093||ue>=127744&&ue<=128591||ue>=128640&&ue<=128764||ue>=128992&&ue<=129003||ue>=129280&&ue<=129535||ue>=129648&&ue<=129750}const Fe=String.fromCharCode(65279);function Me(ue){return!!(ue&&ue.length>0&&ue.charCodeAt(0)===65279)}function me(ue,ve=!1){return ue?(ve&&(ue=ue.replace(/\\./g,"")),ue.toLowerCase()!==ue):!1}function pe(ue){const ve=90-65+1;return ue=ue%(2*ve),ue<ve?String.fromCharCode(97+ue):String.fromCharCode(65+ue-ve)}function ne(ue){const ve=ae.getInstance();return ve.getGraphemeBreakType(ue)}function Ee(ue,ve){return ue===0?ve!==5&&ve!==7:ue===2&&ve===3?!1:ue===4||ue===2||ue===3||(ve===4||ve===2||ve===3)?!0:ue===8&&(ve===8||ve===9||ve===11||ve===12)||((ue===11||ue===9)&&(ve===9||ve===10)||((ue===12||ue===10)&&ve===10||(ve===5||ve===13||(ve===7||(ue===1||ue===13&&ve===14)))))?!1:!(ue===6&&ve===6)}class ae{constructor(){this._data=ke()}static getInstance(){return ae._INSTANCE||(ae._INSTANCE=new ae),ae._INSTANCE}getGraphemeBreakType(ue){if(ue<32)return ue===10?3:ue===13?2:4;if(ue<127)return 0;const ve=this._data,De=ve.length/3;let Ne=1;for(;Ne<=De;)if(ue<ve[3*Ne])Ne=2*Ne;else if(ue>ve[3*Ne+1])Ne=2*Ne+1;else return ve[3*Ne+2];return 0}}ae._INSTANCE=null;function ke(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function je(ue,ve){if(ue===0)return 0;const De=Oe(ue,ve);if(De!==void 0)return De;const Ne=g(ve,ue);return ue-=Ve(Ne),ue}function Oe(ue,ve){let De=g(ve,ue);for(ue-=Ve(De);qe(De)||De===65039||De===8419;){if(ue===0)return;De=g(ve,ue),ue-=Ve(De)}if(!we(De))return;if(ue>=0){const Ne=g(ve,ue);Ne===8205&&(ue-=Ve(Ne))}return ue}function Ve(ue){return ue>=65536?2:1}function qe(ue){return 127995<=ue&&ue<=127999}},Nmxd:function(We,se){We.exports="data:image/png;base64,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"},NvD2:function(We,se,B){"use strict";B.d(se,"a",function(){return M});var Z=B("Kwbf");function G(K,j){var n=new Set;return K.forEach(function(w){j.has(w)||n.add(w)}),n}function U(K){var j=K||{},n=j.disabled,w=j.disableCheckbox,m=j.checkable;return!!(n||w)||m===!1}function V(K,j,n,w){for(var m=new Set(K),f=new Set,p=0;p<=n;p+=1){var c=j.get(p)||new Set;c.forEach(function(o){var s=o.key,a=o.node,R=o.children,O=R===void 0?[]:R;m.has(s)&&!w(a)&&O.filter(function(S){return!w(S.node)}).forEach(function(S){m.add(S.key)})})}for(var r=new Set,d=n;d>=0;d-=1){var u=j.get(d)||new Set;u.forEach(function(o){var s=o.parent,a=o.node;if(w(a)||!o.parent||r.has(o.parent.key))return;if(w(o.parent.node)){r.add(s.key);return}var R=!0,O=!1;(s.children||[]).filter(function(S){return!w(S.node)}).forEach(function(S){var D=S.key,I=m.has(D);R&&!I&&(R=!1),!O&&(I||f.has(D))&&(O=!0)}),R&&m.add(s.key),O&&f.add(s.key),r.add(s.key)})}return{checkedKeys:Array.from(m),halfCheckedKeys:Array.from(G(f,m))}}function W(K,j,n,w,m){for(var f=new Set(K),p=new Set(j),c=0;c<=w;c+=1){var r=n.get(c)||new Set;r.forEach(function(s){var a=s.key,R=s.node,O=s.children,S=O===void 0?[]:O;!f.has(a)&&!p.has(a)&&!m(R)&&S.filter(function(D){return!m(D.node)}).forEach(function(D){f.delete(D.key)})})}p=new Set;for(var d=new Set,u=w;u>=0;u-=1){var o=n.get(u)||new Set;o.forEach(function(s){var a=s.parent,R=s.node;if(m(R)||!s.parent||d.has(s.parent.key))return;if(m(s.parent.node)){d.add(a.key);return}var O=!0,S=!1;(a.children||[]).filter(function(D){return!m(D.node)}).forEach(function(D){var I=D.key,_=f.has(I);O&&!_&&(O=!1),!S&&(_||p.has(I))&&(S=!0)}),O||f.delete(a.key),S&&p.add(a.key),d.add(a.key)})}return{checkedKeys:Array.from(f),halfCheckedKeys:Array.from(G(p,f))}}function M(K,j,n,w){var m=[],f;w?f=w:f=U;var p=new Set(K.filter(function(u){var o=!!n[u];return o||m.push(u),o})),c=new Map,r=0;Object.keys(n).forEach(function(u){var o=n[u],s=o.level,a=c.get(s);a||(a=new Set,c.set(s,a)),a.add(o),r=Math.max(r,s)}),Object(Z.a)(!m.length,"Tree missing follow keys: ".concat(m.slice(0,100).map(function(u){return"'".concat(u,"'")}).join(", ")));var d;return j===!0?d=V(p,c,r,f):d=W(p,j.halfCheckedKeys,c,r,f),d}},OLES:function(We,se,B){"use strict";var Z=B("U8pU"),G=B("VTBJ"),U=B("Ff2n"),V=B("q1tI"),W=B("uciX"),M=B("7ixt"),K=function(p){var c=p.overlay,r=p.prefixCls,d=p.id,u=p.overlayInnerStyle;return V.createElement("div",{className:"".concat(r,"-inner"),id:d,role:"tooltip",style:u},typeof c=="function"?c():c)},j=K,n=function(p,c){var r=p.overlayClassName,d=p.trigger,u=d===void 0?["hover"]:d,o=p.mouseEnterDelay,s=o===void 0?0:o,a=p.mouseLeaveDelay,R=a===void 0?.1:a,O=p.overlayStyle,S=p.prefixCls,D=S===void 0?"rc-tooltip":S,I=p.children,_=p.onVisibleChange,b=p.afterVisibleChange,v=p.transitionName,h=p.animation,C=p.placement,x=C===void 0?"right":C,g=p.align,P=g===void 0?{}:g,k=p.destroyTooltipOnHide,y=k===void 0?!1:k,A=p.defaultVisible,F=p.getTooltipContainer,T=p.overlayInnerStyle,Y=Object(U.a)(p,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),$=Object(V.useRef)(null);Object(V.useImperativeHandle)(c,function(){return $.current});var le=Object(G.a)({},Y);"visible"in p&&(le.popupVisible=p.visible);var de=function(){var Me=p.arrowContent,me=Me===void 0?null:Me,pe=p.overlay,ne=p.id;return[V.createElement("div",{className:"".concat(D,"-arrow"),key:"arrow"},me),V.createElement(j,{key:"content",prefixCls:D,id:ne,overlay:pe,overlayInnerStyle:T})]},Pe=!1,Se=!1;if(typeof y=="boolean")Pe=y;else if(y&&Object(Z.a)(y)==="object"){var we=y.keepParent;Pe=we===!0,Se=we===!1}return V.createElement(W.a,Object.assign({popupClassName:r,prefixCls:D,popup:de,action:u,builtinPlacements:M.a,popupPlacement:x,ref:$,popupAlign:P,getPopupContainer:F,onPopupVisibleChange:_,afterPopupVisibleChange:b,popupTransitionName:v,popupAnimation:h,defaultPopupVisible:A,destroyPopupOnHide:Pe,autoDestroy:Se,mouseLeaveDelay:R,popupStyle:O,mouseEnterDelay:s},le),I)},w=Object(V.forwardRef)(n),m=se.a=w},OZM5:function(We,se,B){"use strict";B.d(se,"b",function(){return w}),B.d(se,"a",function(){return m}),B.d(se,"k",function(){return f}),B.d(se,"h",function(){return p}),B.d(se,"i",function(){return c}),B.d(se,"g",function(){return r}),B.d(se,"c",function(){return d}),B.d(se,"d",function(){return u}),B.d(se,"j",function(){return a}),B.d(se,"e",function(){return R}),B.d(se,"f",function(){return O});var Z=B("KQm4"),G=B("U8pU"),U=B("Ff2n"),V=B("q1tI"),W=B.n(V),M=B("Kwbf"),K=B("WaYH"),j=.25,n=2;function w(S,D){var I=S.slice(),_=I.indexOf(D);return _>=0&&I.splice(_,1),I}function m(S,D){var I=S.slice();return I.indexOf(D)===-1&&I.push(D),I}function f(S){return S.split("-")}function p(S,D){return"".concat(S,"-").concat(D)}function c(S){return S&&S.type&&S.type.isTreeNode}function r(S,D){var I=[S],_=D[S];function b(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];v.forEach(function(h){var C=h.key,x=h.children;I.push(C),b(x)})}return b(_.children),I}function d(S,D){var I=S.clientY,_=D.selectHandle.getBoundingClientRect(),b=_.top,v=_.bottom,h=_.height,C=Math.max(h*j,n);return I<=b+C?-1:I>=v-C?1:0}function u(S,D){if(!S)return;var I=D.multiple;return I?S.slice():S.length?[S[0]]:S}var o=function(D){return D};function s(S,D){if(!S)return[];var I=D||{},_=I.processProps,b=_===void 0?o:_,v=Array.isArray(S)?S:[S];return v.map(function(h){var C=h.children,x=Object(U.a)(h,["children"]),g=s(C,D);return W.a.createElement(K.a,Object.assign({},b(x)),g)})}function a(S){if(!S)return null;var D;if(Array.isArray(S))D={checkedKeys:S,halfCheckedKeys:void 0};else if(Object(G.a)(S)==="object")D={checkedKeys:S.checked||void 0,halfCheckedKeys:S.halfChecked||void 0};else return Object(M.a)(!1,"`checkedKeys` is not an array or an object"),null;return D}function R(S,D){var I=new Set;function _(b){if(I.has(b))return;var v=D[b];if(!v)return;I.add(b);var h=v.parent,C=v.node;if(C.disabled)return;h&&_(h.key)}return(S||[]).forEach(function(b){_(b)}),Object(Z.a)(I)}function O(S){var D={};return Object.keys(S).forEach(function(I){(I.startsWith("data-")||I.startsWith("aria-"))&&(D[I]=S[I])}),D}},Ohmc:function(We,se,B){We.exports=B.p+"static/certificate.fc32dc1b.jpg"},Ot1p:function(We,se,B){"use strict";var Z=B("2qtc"),G=B("kLXV"),U=B("rAM+"),V=B("miYZ"),W=B("tsqr"),M=B("9og8"),K=B("tJVT"),j=B("jrin"),n=B("WmNS"),w=B.n(n),m=B("q1tI"),f=B.n(m),p=B("VrN/"),c=B.n(p),r=B("bdgK"),d=B("p77/"),u=B("Bd2K"),o=B("ELLl"),s=B("19Vz"),a=B("lZu9"),R=B("+NIl"),O=B("kSUc"),S=B("9Bee"),D=function(Ae){var Ge=Ae.value,ot=Ge===void 0?"":Ge,wt=Ae.className,Dt=Ae.showTextOnly,At=Ae.showLines,vt=Ae.style,$e=vt===void 0?{}:vt,et=Object(m.useMemo)(function(){return""},[ot]);return f.a.createElement(f.a.Fragment,null,f.a.createElement("div",{dangerouslySetInnerHTML:{__html:et}}))},I=B("0Owb"),_=B("dejd"),b=B("C+DQ"),v=B("1vsH"),h=B("m3rI"),C=[{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 x(Ae){var Ge=Ae.onActionCallback,ot=Ae.title,wt=Ae.icon,Dt=Ae.actionName,At=Ae.className,vt=At===void 0?"":At,$e=Ae.children;function et(){Ge(Dt)}return f.a.createElement("a",{title:ot,className:vt,onClick:et},f.a.createElement("i",{className:"md-iconfont ".concat(wt)}),$e)}var g=function(Ae){var Ge=Ae.watch,ot=Ae.showNullButton,wt=Ae.onActionCallback,Dt=Ae.fullScreen,At=Ae.insertTemp,vt=Ae.hidetoolBar,$e=Ae.uuid,et=Ae.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(v.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(v.F)("_educoder_session"),"&key=").concat($e,"&api=").concat(encodeURIComponent(h.a.PROXY_SERVER)));var Ye=[].concat(C,[{title:"".concat(Ge?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ge?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return f.a.createElement("ul",{className:"markdown-toolbar-container"},!vt&&Ye.map(function(ce,xe){return f.a.createElement("li",{key:xe},ce.actionName?f.a.createElement(x,Object(I.a)({},ce,{onActionCallback:wt})):f.a.createElement("span",{className:"v-line"}))}),ot?f.a.createElement("li",null,f.a.createElement(x,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:wt},f.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,At&&f.a.createElement("li",null,f.a.createElement(x,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(At),onActionCallback:wt},f.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),f.a.createElement("li",{className:"btn-full-screen"},f.a.createElement(x,{icon:"".concat(Dt?"icon-shrink":"icon-enlarge"),title:Dt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:wt})))},P=B("M8RZ"),k=B("+L6B"),y=B("2/Rp"),A=B("y8nQ"),F=B("Vl3Y"),T=B("5NDa"),Y=B("5rEg"),$={labelCol:{span:4},wrapperCol:{span:20}},le=function(Ae){var Ge=Ae.callback,ot=Ae.onCancel;function wt(Dt){Ge(Dt)}return f.a.createElement(F.a,Object(I.a)({},$,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:wt}),f.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},f.a.createElement(Y.a,null)),f.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},f.a.createElement(Y.a,null)),f.a.createElement("div",{className:"flex-container flex-end"},f.a.createElement(y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(y.a,{type:"ghost",onClick:ot},"\u53D6\u6D88")))},de=B("7ahc"),Pe=B("HmJG"),Se=B("BjJ7"),we=F.a.useForm,Fe={width:280,marginRight:10},Me={labelCol:{span:5},wrapperCol:{span:19}},me=function(Ae){var Ge=Ae.callback,ot=Ae.onCancel,wt=we(),Dt=Object(K.a)(wt,1),At=Dt[0];function vt(Ye){Ge(Ye)}function $e(Ye,ce){if(Ye.status===-1){W.b.error(Ye.message);return}At.setFieldsValue({src:"/api/attachments/".concat(Ye.id),type:ce.type})}function et(Ye){var ce=Ye.target.files[0];ne(ce,$e)}return f.a.createElement(F.a,Object(I.a)({form:At},Me,{className:"upload-image-panel",onFinish:vt}),f.a.createElement(F.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},f.a.createElement("div",{className:"flex-container"},f.a.createElement(F.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},f.a.createElement(Y.a,{style:Fe})),f.a.createElement(pe,{onFileChange:et}))),f.a.createElement(F.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},f.a.createElement(Y.a,{style:{width:264}})),f.a.createElement(F.a.Item,{style:{textAlign:"right"}},f.a.createElement(y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(y.a,{type:"ghost",onClick:ot},"\u53D6\u6D88")))};function pe(Ae){var Ge=Ae.onFileChange;return f.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",f.a.createElement("input",{type:"file",onChange:Ge}))}function ne(Ae,Ge){if(!Ae)throw new String("\u6CA1\u6709\u6587\u4EF6");var ot=new FormData;ot.append("editormd-image-file",Ae),ot.append("file_param_name","editormd-image-file"),ot.append("byxhr","true");var wt=new window.XMLHttpRequest;wt.withCredentials=!0,wt.addEventListener("load",function(Dt){Ge(JSON.parse(Dt.target.responseText),Ae)},!1),wt.addEventListener("error",function(Dt){console.error(Dt)},!1),wt.open("POST","".concat(Se.a,"/api/attachments.json")),wt.send(ot)}var Ee=B("giR+"),ae=B("fyUT"),ke=B("7Kak"),je=B("9yH6"),Oe=je.a.Group,Ve={margin:"0 8px"},qe=function(Ae){var Ge=Ae.callback,ot=Ae.onCancel;function wt(Dt){Ge(Dt)}return f.a.createElement(F.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:wt},f.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},f.a.createElement("span",{style:Ve},"\u5355\u5143\u683C\u6570\uFF1A"),f.a.createElement("span",{style:Ve},"\u884C\u6570"),f.a.createElement(F.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},f.a.createElement(ae.a,null)),f.a.createElement("span",{style:Ve},"\u5217\u6570"),f.a.createElement(F.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},f.a.createElement(ae.a,null))),f.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},f.a.createElement("span",{style:Ve},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),f.a.createElement(F.a.Item,{name:"align"},f.a.createElement(Oe,null,f.a.createElement(je.a,{value:"default"},f.a.createElement("i",{className:"fa fa-align-justify"})),f.a.createElement(je.a,{value:"left"},f.a.createElement("i",{className:"fa fa-align-left"})),f.a.createElement(je.a,{value:"center"},f.a.createElement("i",{className:"fa fa-align-center"})),f.a.createElement(je.a,{value:"right"},f.a.createElement("i",{className:"fa fa-align-right"}))))),f.a.createElement("div",{className:"flex-container flex-end"},f.a.createElement(y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(y.a,{type:"ghost",onClick:ot},"\u53D6\u6D88")))},ue=B("ErOA"),ve=B("7Cbv"),De="link",Ne="upload-image",it="code-block",pt="add-table",mt="------------",dt={default:mt,left:":".concat(mt),center:":".concat(mt,":"),right:"".concat(mt,":")},Tt=B("9VGf"),St,Ue;function Ie(){}var tt=0,lt=1e4,Ke="\u2581",Xe=`
**\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 Ce(Ae){return/^\d+$/.test(Ae)?"".concat(Ae,"px"):Ae}var ge=navigator.platform.toUpperCase().indexOf("MAC")>=0,be=ge?"Cmd":"Ctrl",ie=["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"],oe=(St={},Object(j.a)(St,be+"-B","bold"),Object(j.a)(St,be+"-I","italic"),St),fe=(Ue={},Object(j.a)(Ue,De,"\u6DFB\u52A0\u94FE\u63A5"),Object(j.a)(Ue,it,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(j.a)(Ue,Ne,"\u6DFB\u52A0\u6587\u4EF6"),Object(j.a)(Ue,pt,"\u6DFB\u52A0\u8868\u683C"),Ue),ye=se.a=function(Ae){var Ge=Ae.defaultValue,ot=Ge===void 0?"":Ge,wt=Ae.onChange,Dt=Ae.width,At=Dt===void 0?"100%":Dt,vt=Ae.height,$e=vt===void 0?400:vt,et=Ae.miniToolbar,Ye=et===void 0?!1:et,ce=Ae.isFocus,xe=ce===void 0?!1:ce,at=Ae.watch,Je=Ae.insertTemp,_t=Ae.mode,yt=_t===void 0?"markdown":_t,Be=Ae.id,Ze=Be===void 0?"markdown-editor-id":Be,nt=Ae.showResizeBar,ut=nt===void 0?!1:nt,Et=Ae.noStorage,st=Et===void 0?!1:Et,Ut=Ae.showNullButton,Zt=Ut===void 0?!1:Ut,Rt=Ae.hidetoolBar,qt=Rt===void 0?!1:Rt,Qt=Ae.fullScreen,en=Qt===void 0?!1:Qt,Yt=Ae.onBlur,cn=Ae.onCMBeforeChange,Sn=Ae.onFullScreen,kn=Ae.className,gt=kn===void 0?"":kn,Wt=Ae.disablePaste,Jt=Wt===void 0?!1:Wt,tn=Ae.placeholder,nn=tn===void 0?"":tn,pn=Ae.values,X=pn===void 0?"":pn,L=Object(m.useState)(null),N=Object(K.a)(L,2),z=N[0],te=N[1],Q=Object(m.useState)(ot),Re=Object(K.a)(Q,2),ct=Re[0],Ct=Re[1],Pt=Object(m.useState)(at),ht=Object(K.a)(Pt,2),Vt=ht[0],rn=ht[1],An=Object(m.useState)(en),Cn=Object(K.a)(An,2),En=Cn[0],Fn=Cn[1],mr=Object(m.useState)(""),kr=Object(K.a)(mr,2),Kn=kr[0],or=kr[1],Cr=Object(m.useState)(0),Er=Object(K.a)(Cr,2),nr=Er[0],Kr=Er[1],Pr=Object(m.useState)($e),Gr=Object(K.a)(Pr,2),zr=Gr[0],Nr=Gr[1],$n=Object(m.useState)(!1),Ur=Object(K.a)($n,2),Jr=Ur[0],cr=Ur[1],Ln=Object(m.useRef)(Object(ve.a)()),jt=Object(m.useRef)(!1),Gn=Object(m.useRef)(),mn=Object(m.useRef)(),Te=Object(m.useRef)(),dn=Object(m.useRef)(),Br=Object(m.useRef)(),Qn=function(){var Gt=Object(M.a)(w.a.mark(function on(){var $t,hn;return w.a.wrap(function(Nn){for(;;)switch(Nn.prev=Nn.next){case 0:return Nn.next=2,Object(ue.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Ln.current}});case 2:hn=Nn.sent,hn!=null&&($t=hn.attachments)!==null&&$t!==void 0&&$t.length&&(console.log("cm:",z,mn),hn.attachments.map(function(yn){yn.content_type.indexOf("image")>-1?z.replaceSelection("![,](/api/attachments/".concat(yn.id,"?type=").concat(yn.content_type,")")):yn.content_type.indexOf("video")>-1?z.replaceSelection('<video width="100%" controls src="'.concat(h.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):yn.content_type.indexOf("pdf")>-1?z.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(yn.content_type,'&disposition=inline" target="_blank">').concat(yn.name,"</a>")):z.replaceSelection("[".concat(yn.name,"](").concat(h.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(yn.content_type,")"))}));case 4:case"end":return Nn.stop()}},on)}));return function(){return Gt.apply(this,arguments)}}();Object(m.useEffect)(function(){Ct(X),z==null||z.setValue(X)},[X]),Object(m.useEffect)(function(){Sn==null||Sn(En)},[En]),Object(m.useEffect)(function(){if(mn.current){var Gt=c.a.fromTextArea(mn.current,{mode:yt,lineNumbers:!Ye,lineWrapping:!0,value:ot,autoCloseTags:!0,autoCloseBrackets:!0});xe&&Gt.focus();function on($t,hn){if(Jt){hn.preventDefault();return}var vn=hn.clipboardData;if(vn){var Nn=vn.types.toString(),yn=vn.items;if(Nn==="Files"||vn.types.indexOf("Files")>-1){if(hn.preventDefault(),yt=="stex")return;try{var zn,ar=yn[1];((zn=yn[0])===null||zn===void 0?void 0:zn.kind)==="file"&&(ar=yn[0]);var fn=ar.getAsFile(),Rr=fn.name.split(".").pop();ne(fn,function(Dn){if(Dn.id){var Vn,er,Tr;(fn==null||((Vn=fn.type)===null||Vn===void 0)?void 0:Vn.indexOf("image"))>-1?Gt.replaceSelection("![,](/api/attachments/".concat(Dn.id,"?type=").concat(Dn.content_type,")")):(fn==null||((er=fn.type)===null||er===void 0)?void 0:er.indexOf("video"))>-1?Gt.replaceSelection('<video width="100%" controls src="'.concat(h.a.API_SERVER,"/api/attachments/").concat(Dn.id,'"></video>')):(fn==null||((Tr=fn.type)===null||Tr===void 0)?void 0:Tr.indexOf("pdf"))>-1?Gt.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(Dn.id,"?type=").concat(fn.type,'&disposition=inline" target="_blank">').concat(fn.name,"</a>")):ie.includes(Rr)?Gt.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(Dn.id,'?type=office&disposition=inline" target="_blank">').concat(fn.name,"</a>")):Gt.replaceSelection("[".concat(fn.name,"](").concat(h.a.API_SERVER,"/api/attachments/").concat(Dn.id,"?type=").concat(Dn.content_type,")"))}else(Dn==null?void 0:Dn.status)===401&&(document.location.href="/user/login")})}catch(Dn){W.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Gt.on("paste",on),Gt.on("dragleave",function($t,hn){Te.current.classList.remove("mouse-hover-md")}),Gt.on("dragover",function($t,hn){Te.current.classList.add("mouse-hover-md")}),Gt.on("drop",function($t,hn){Te.current.classList.add("mouse-hover-md");var vn;if(vn=hn.dataTransfer.files,vn.length>0){hn.preventDefault(),hn.stopPropagation();for(var Nn=function(ar){var fn=vn[ar],Rr=fn.name.split(".").pop();ne(fn,function(Dn){if(Dn.id){var Vn,er,Tr;(fn==null||((Vn=fn.type)===null||Vn===void 0)?void 0:Vn.indexOf("image"))>-1?Gt.replaceSelection("![,](/api/attachments/".concat(Dn.id,"?type=").concat(Dn.content_type,")")):(fn==null||((er=fn.type)===null||er===void 0)?void 0:er.indexOf("video"))>-1?Gt.replaceSelection('<video width="100%" controls src="'.concat(h.a.API_SERVER,"/api/attachments/").concat(Dn.id,'"></video>')):(fn==null||((Tr=fn.type)===null||Tr===void 0)?void 0:Tr.indexOf("pdf"))>-1?Gt.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(Dn.id,"?type=").concat(fn.type,'&disposition=inline" target="_blank">').concat(fn.name,"</a>")):ie.includes(Rr)?Gt.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(Dn.id,'?type=office&disposition=inline" target="_blank">').concat(fn.name,"</a>")):Gt.replaceSelection("[".concat(fn.name,"](").concat(h.a.API_SERVER,"/api/attachments/").concat(Dn.id,"?type=").concat(Dn.content_type,")"))}else(Dn==null?void 0:Dn.status)===401&&(document.location.href="/user/login")})},yn=0;yn<vn.length;yn++)Nn(yn)}}),te(Gt),function(){Gt.off("paste",on)}}},[]);var gn=Object(m.useCallback)(function(){if(Te.current)try{}catch(Gt){console.log(Gt,"---- to set md editor body height")}},[zr,Te,En]);Object(m.useEffect)(function(){function Gt(){var $t=new r.default(function(hn){var vn=Object(U.a)(hn),Nn;try{for(vn.s();!(Nn=vn.n()).done;){var yn=Nn.value;(yn.target.offsetHeight>0||yn.target.offsetWidth>0)&&(gn(),z.setSize("100%","100%"),z.refresh())}}catch(zn){vn.e(zn)}finally{vn.f()}});return $t.observe(mn.current.parentElement),$t}if(z){var on=Gt();return function(){on.unobserve(mn.current.parentElement)}}},[z,gn]),Object(m.useEffect)(function(){if(z){for(var Gt=[],on=function(){var yn=hn[$t];vn=Object(K.a)(yn,2);var zn=vn[0],ar=vn[1],fn=Object(j.a)({},zn,function(){Zr(ar)});Gt.push(fn),z.addKeyMap(fn)},$t=0,hn=Object.entries(oe);$t<hn.length;$t++){var vn;on()}return Gn.current=setInterval(function(){jt.current&&Qn()},4e3),function(){clearInterval(Gn.current);var Nn=Object(U.a)(Gt),yn;try{for(Nn.s();!(yn=Nn.n()).done;){var zn=yn.value;z.removeKeyMap(zn)}}catch(ar){Nn.e(ar)}finally{Nn.f()}}}},[z]),Object(m.useEffect)(function(){en!==En&&Fn(en)},[en]),Object(Tt.a)(function(){if(!st&&nr>0){var Gt=new Date().getTime(),on=window.sessionStorage.getItem(Ze);Gt>=nr+lt&&(!on||on!==ct)&&(window.sessionStorage.setItem(Ze,ct),cr(!0))}},lt),Object(m.useEffect)(function(){rn(at)},[z,at]),Object(m.useEffect)(function(){z&&(xe&&z.focus())},[z,xe]),Object(m.useEffect)(function(){if(Vt&&z){var Gt=z.getScrollerElement();function on($t){var hn=$t.target;if(Br.current){var vn=hn.scrollTop/hn.scrollHeight;Br.current.scrollTop=Br.current.scrollHeight*vn}}return Gt.addEventListener("scroll",on),function(){Gt.removeEventListener("scroll",on)}}},[z,Vt]),Object(m.useEffect)(function(){if(z&&cn){function Gt(on,$t){cn(on,$t)}return z.on("beforeChange",Gt),function(){z.off("beforeChange",Gt)}}},[z,cn]),Object(m.useEffect)(function(){if(z&&Yt){function Gt(){Yt(z.getValue())}return z.on("blur",Gt),function(){z.off("blur",Gt)}}},[z,Yt]),Object(m.useEffect)(function(){if(z){function Gt(on){var $t=on.getValue();Ct($t),Kr(new Date().getTime()),on.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),wt&&wt($t)}return z.on("change",Gt),function(){z.off("change",Gt)}}},[z,wt]),Object(m.useEffect)(function(){z&&(ot==null?(z.setValue(""),Ct("")):ot!==z.getValue()&&(z.setValue(ot),Ct(ot),z.setCursor(z.lineCount(),0)))},[z,ot]);var Zr=Object(m.useCallback)(function(Gt){var on=z.getCursor(),$t=z.getSelection(),hn=$t.split(`
`);switch(Gt){case"bold":return z.replaceSelection("**"+$t+"**"),$t===""&&z.setCursor(on.line,on.ch+2),z.focus();case"italic":return z.replaceSelection("*"+$t+"*"),$t===""&&z.setCursor(on.line,on.ch+1),z.focus();case"code":return z.replaceSelection("`"+$t+"`"),$t===""&&z.setCursor(on.line,on.ch+1),z.focus();case"inline-latex":return z.replaceSelection("`$$"+$t+"$$`"),$t===""&&z.setCursor(on.line,on.ch+3),z.focus();case"latex":return z.replaceSelection("```latex\n"+$t+"\n```"),z.setCursor(on.line+1,$t.length+1),z.focus();case"line-break":return z.replaceSelection(`<br/>
`),z.focus();case"list-ul":return $t===""?z.replaceSelection("- "+$t):z.replaceSelection(hn.map(function(vn){return vn===""?"":"- ".concat(vn)}).join(`
`)),z.focus();case"list-ol":return $t===""?z.replaceSelection("1. "+$t):z.replaceSelection(hn.map(function(vn,Nn){return vn===""?"":"".concat(Nn+1,". ").concat(vn)}).join(`
`)),z.focus();case"add-null-ch":return $t===""&&z.setCursor(on.line,on.ch+1),z.replaceSelection(Ke),z.focus();case"inster-template-1":return $t===""&&z.setCursor(on.line,on.ch),z.replaceSelection(Xe),z.focus();case"eraser":return z.setValue(""),z.focus();case"trigger-watch":return rn(!Vt),z.focus();case"trigger-full-screen":return Fn(!En),z.focus();case De:or(De);return;case it:or(it);return;case Ne:or(Ne);return;case pt:or(pt);return;default:throw new Error}},[z,Vt,En]),Or=Object(m.useCallback)(function(Gt){or("");switch(Kn){case De:var on=Gt.title,$t=Gt.link;return z.replaceSelection("[".concat(on,"](").concat($t,")")),z.focus();case it:var hn=Gt.language,vn=Gt.content;return z.replaceSelection(["```"+hn,vn,"```"].join(`
`)),z.focus();case Ne:var Nn=Gt.src,yn=Gt.alt;return yn?z.replaceSelection("![ ".concat(yn," ]( ").concat(Nn,' "').concat(yn,'" )')):z.replaceSelection("![,](".concat(Nn,")")),z.focus();case pt:for(var zn=Gt.row,ar=Gt.col,fn=Gt.align,Rr=`
`,Dn=0;Dn<zn;Dn++){for(var Vn=[],er=[],Tr=0;Tr<ar;Tr++)Dn===1&&er.push(dt[fn]),Vn.push(" ");Dn===1&&(Rr+="| ".concat(er.join(" | "),` |
`)),Rr+="| ".concat(Vn.join(ar===1?"":" | "),` |
`)}return z.replaceSelection(Rr+`
`),z.focus();default:throw new Error}},[z,Kn]),qr=Object(m.useMemo)(function(){switch(Kn){case De:return f.a.createElement(le,{callback:Or,onCancel:dr});case it:return f.a.createElement(de.b,{callback:Or,onCancel:dr});case Ne:return f.a.createElement(me,{callback:Or,onCancel:dr});case pt:return f.a.createElement(qe,{callback:Or,onCancel:dr});default:return null}},[Kn]);function dr(){or("")}Object(m.useEffect)(function(){if(dn.current){var Gt=dn.current,on=!1,$t=0;function hn(yn){on=!0,$t=yn.pageY}function vn(){on=!1}function Nn(yn){if(on){var zn=yn.pageY-$t;zn<0&&(zn=0),zn>300&&(zn=300);var ar=$e+zn+"px";Nr(ar)}}return Gt.addEventListener("mousedown",hn),document.addEventListener("mousemove",Nn),document.addEventListener("mouseup",vn),function(){Gt.removeEventListener("mousedown",hn),document.removeEventListener("mousemove",Nn),document.removeEventListener("mouseup",vn)}}},[z,dn]),Object(m.useEffect)(function(){Nr($e)},[$e]);var Fr=Ce(At),oi=Ce(zr),_r={width:Fr,height:oi},li=Object(m.useMemo)(function(){if(nr){var Gt=new Date(nr),on=Gt.getHours(),$t=Gt.getMinutes(),hn=Gt.getSeconds();return on=on<10?"0"+on:on,$t=$t<10?"0"+$t:$t,hn=hn<10?"0"+hn:hn,"".concat(on,":").concat($t,":").concat(hn)}return 0},[nr]);function jr(){window.sessionStorage.removeItem(Ze),cr(!1),Kr(0)}function xr(){cr(!1),Kr(0),z.setValue(window.sessionStorage.getItem(Ze))}function ui(Gt,on){var $t=z.getValue();$t=$t.replace(Gt,on),Ct($t),z==null||z.setValue($t)}return f.a.createElement(m.Fragment,null,f.a.createElement("div",{className:"markdown-editor-wrapper",ref:Te},f.a.createElement("div",{className:"markdown-editor-container ".concat(gt," ").concat(Vt?"on-preview":""," ").concat(Ye?"mini":""," ").concat(En?"full-screen":""),style:_r},f.a.createElement(g,{insertTemp:Je,watch:Vt,fullScreen:En,showNullButton:Zt,onActionCallback:Zr,hidetoolBar:qt,uuid:Ln.current,setOpenPhones:function(){jt.current=!0}}),f.a.createElement("div",{className:"markdown-editor-body"},f.a.createElement("div",{className:"codemirror-container"},f.a.createElement("textarea",{ref:mn,placeholder:nn})),Vt?f.a.createElement("div",{ref:Br,className:"preview-container"},yt==="stex"&&f.a.createElement(D,{value:ct}),yt!=="stex"&&f.a.createElement(S.a,{edit:!0,value:ct,replaces:ui})):null))),ut?f.a.createElement("a",{ref:dn,className:"editor-resize"}):null,f.a.createElement(P.a,null,fe[Kn]?f.a.createElement(G.a,{centered:!0,title:fe[Kn],visible:!0,onCancel:dr,footer:null,className:"markdown-popup-form"},qr):null))}},RMFE:function(We,se){We.exports="data:image/png;base64,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"},"SA+Z":function(We,se,B){var Z=B("wTVA"),G=B("EbDI"),U=B("ZhPi"),V=B("wkBT");function W(M){return Z(M)||G(M)||U(M)||V()}We.exports=W,We.exports.__esModule=!0,We.exports.default=We.exports},SJMd:function(We,se){/**
* @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 B,Z,G,U=!1,V,W;window.PR_SHOULD_USE_CONTINUATION=!0;var M,K;(function(){var j=window,n=["break,continue,do,else,for,if,return,while"],w=[n,"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"],m=[w,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],f=[m,"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"],p=[m,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[m,"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"],r="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",d=[m,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],u="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",o=[n,"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"],s=[n,"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"],a=[n,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[f,c,p,d,u,o,s,a],O=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,S="str",D="kwd",I="com",_="typ",b="lit",v="pun",h="pln",C="tag",x="dec",g="src",P="atn",k="atv",y="nocode",A="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function F(Oe){for(var Ve=0,qe=!1,ue=!1,ve=0,De=Oe.length;ve<De;++ve){var Ne=Oe[ve];if(Ne.ignoreCase)ue=!0;else if(/[a-z]/i.test(Ne.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){qe=!0,ue=!1;break}}var it={b:8,t:9,n:10,v:11,f:12,r:13};function pt(Ue){var Ie=Ue.charCodeAt(0);if(Ie!==92)return Ie;var tt=Ue.charAt(1);return Ie=it[tt],Ie||("0"<=tt&&tt<="7"?parseInt(Ue.substring(1),8):tt==="u"||tt==="x"?parseInt(Ue.substring(2),16):Ue.charCodeAt(1))}function mt(Ue){if(Ue<32)return(Ue<16?"\\x0":"\\x")+Ue.toString(16);var Ie=String.fromCharCode(Ue);return Ie==="\\"||Ie==="-"||Ie==="]"||Ie==="^"?"\\"+Ie:Ie}function dt(Ue){var Ie=Ue.substring(1,Ue.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")),tt=[],lt=Ie[0]==="^",Ke=["["];lt&&Ke.push("^");for(var Xe=lt?1:0,Ce=Ie.length;Xe<Ce;++Xe){var ge=Ie[Xe];if(/\\[bdsw]/i.test(ge))Ke.push(ge);else{var be=pt(ge),ie;Xe+2<Ce&&Ie[Xe+1]==="-"?(ie=pt(Ie[Xe+2]),Xe+=2):ie=be,tt.push([be,ie]),ie<65||be>122||(ie<65||be>90||tt.push([Math.max(65,be)|32,Math.min(ie,90)|32]),ie<97||be>122||tt.push([Math.max(97,be)&~32,Math.min(ie,122)&~32]))}}tt.sort(function(Ae,Ge){return Ae[0]-Ge[0]||Ge[1]-Ae[1]});for(var oe=[],fe=[],Xe=0;Xe<tt.length;++Xe){var ye=tt[Xe];ye[0]<=fe[1]+1?fe[1]=Math.max(fe[1],ye[1]):oe.push(fe=ye)}for(var Xe=0;Xe<oe.length;++Xe){var ye=oe[Xe];Ke.push(mt(ye[0])),ye[1]>ye[0]&&(ye[1]+1>ye[0]&&Ke.push("-"),Ke.push(mt(ye[1])))}return Ke.push("]"),Ke.join("")}function Tt(Ue){for(var Ie=Ue.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")),tt=Ie.length,lt=[],Ke=0,Xe=0;Ke<tt;++Ke){var Ce=Ie[Ke];if(Ce==="(")++Xe;else if(Ce.charAt(0)==="\\"){var ge=+Ce.substring(1);ge&&(ge<=Xe?lt[ge]=-1:Ie[Ke]=mt(ge))}}for(var Ke=1;Ke<lt.length;++Ke)lt[Ke]===-1&&(lt[Ke]=++Ve);for(var Ke=0,Xe=0;Ke<tt;++Ke){var Ce=Ie[Ke];if(Ce==="(")++Xe,lt[Xe]||(Ie[Ke]="(?:");else if(Ce.charAt(0)==="\\"){var ge=+Ce.substring(1);ge&&ge<=Xe&&(Ie[Ke]="\\"+lt[ge])}}for(var Ke=0;Ke<tt;++Ke)Ie[Ke]==="^"&&Ie[Ke+1]!=="^"&&(Ie[Ke]="");if(Ue.ignoreCase&&qe)for(var Ke=0;Ke<tt;++Ke){var Ce=Ie[Ke],be=Ce.charAt(0);Ce.length>=2&&be==="["?Ie[Ke]=dt(Ce):be!=="\\"&&(Ie[Ke]=Ce.replace(/[a-zA-Z]/g,function(fe){var ye=fe.charCodeAt(0);return"["+String.fromCharCode(ye&~32,ye|32)+"]"}))}return Ie.join("")}for(var St=[],ve=0,De=Oe.length;ve<De;++ve){var Ne=Oe[ve];if(Ne.global||Ne.multiline)throw new Error(""+Ne);St.push("(?:"+Tt(Ne)+")")}return new RegExp(St.join("|"),ue?"gi":"g")}function T(Oe,Ve){var qe=/(?:^|\s)nocode(?:\s|$)/,ue=[],ve=0,De=[],Ne=0;function it(pt){var mt=pt.nodeType;if(mt==1){if(qe.test(pt.className))return;for(var dt=pt.firstChild;dt;dt=dt.nextSibling)it(dt);var Tt=pt.nodeName.toLowerCase();(Tt==="br"||Tt==="li")&&(ue[Ne]=`
`,De[Ne<<1]=ve++,De[Ne++<<1|1]=pt)}else if(mt==3||mt==4){var St=pt.nodeValue;St.length&&(Ve?St=St.replace(/\r\n?/g,`
`):St=St.replace(/[ \t\r\n]+/g," "),ue[Ne]=St,De[Ne<<1]=ve,ve+=St.length,De[Ne++<<1|1]=pt)}}return it(Oe),{sourceCode:ue.join("").replace(/\n$/,""),spans:De}}function Y(Oe,Ve,qe,ue,ve){if(!qe)return;var De={sourceNode:Oe,pre:1,langExtension:null,numberLines:null,sourceCode:qe,spans:null,basePos:Ve,decorations:null};ue(De),ve.push.apply(ve,De.decorations)}var $=/\S/;function le(Oe){for(var Ve=void 0,qe=Oe.firstChild;qe;qe=qe.nextSibling){var ue=qe.nodeType;Ve=ue===1?Ve?Oe:qe:ue===3&&$.test(qe.nodeValue)?Oe:Ve}return Ve===Oe?void 0:Ve}function de(Oe,Ve){var qe={},ue;(function(){for(var Ne=Oe.concat(Ve),it=[],pt={},mt=0,dt=Ne.length;mt<dt;++mt){var Tt=Ne[mt],St=Tt[3];if(St)for(var Ue=St.length;--Ue>=0;)qe[St.charAt(Ue)]=Tt;var Ie=Tt[1],tt=""+Ie;pt.hasOwnProperty(tt)||(it.push(Ie),pt[tt]=null)}it.push(/[\0-\uffff]/),ue=F(it)})();var ve=Ve.length,De=function(Ne){for(var it=Ne.sourceCode,pt=Ne.basePos,mt=Ne.sourceNode,dt=[pt,h],Tt=0,St=it.match(ue)||[],Ue={},Ie=0,tt=St.length;Ie<tt;++Ie){var lt=St[Ie],Ke=Ue[lt],Xe=void 0,Ce;if(typeof Ke=="string")Ce=!1;else{var ge=qe[lt.charAt(0)];if(ge)Xe=lt.match(ge[1]),Ke=ge[0];else{for(var be=0;be<ve;++be)if(ge=Ve[be],Xe=lt.match(ge[1]),Xe){Ke=ge[0];break}Xe||(Ke=h)}Ce=Ke.length>=5&&Ke.substring(0,5)==="lang-",Ce&&!(Xe&&typeof Xe[1]=="string")&&(Ce=!1,Ke=g),Ce||(Ue[lt]=Ke)}var ie=Tt;if(Tt+=lt.length,!Ce)dt.push(pt+ie,Ke);else{var oe=Xe[1],fe=lt.indexOf(oe),ye=fe+oe.length;Xe[2]&&(ye=lt.length-Xe[2].length,fe=ye-oe.length);var Ae=Ke.substring(5);Y(mt,pt+ie,lt.substring(0,fe),De,dt),Y(mt,pt+ie+fe,oe,pe(Ae,oe),dt),Y(mt,pt+ie+ye,lt.substring(ye),De,dt)}}Ne.decorations=dt};return De}function Pe(Oe){var Ve=[],qe=[];Oe.tripleQuotedStrings?Ve.push([S,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Oe.multiLineStrings?Ve.push([S,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ve.push([S,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Oe.verbatimStrings&&qe.push([S,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ue=Oe.hashComments;ue&&(Oe.cStyleComments?(ue>1?Ve.push([I,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ve.push([I,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),qe.push([S,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ve.push([I,/^#[^\r\n]*/,null,"#"])),Oe.cStyleComments&&(qe.push([I,/^\/\/[^\r\n]*/,null]),qe.push([I,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ve=Oe.regexLiterals;if(ve){var De=ve>1?"":`
\r`,Ne=De?".":"[\\S\\s]",it="/(?=[^/*"+De+"])(?:[^/\\x5B\\x5C"+De+"]|\\x5C"+Ne+"|\\x5B(?:[^\\x5C\\x5D"+De+"]|\\x5C"+Ne+")*(?:\\x5D|$))+/";qe.push(["lang-regex",RegExp("^"+A+"("+it+")")])}var pt=Oe.types;pt&&qe.push([_,pt]);var mt=(""+Oe.keywords).replace(/^ | $/g,"");mt.length&&qe.push([D,new RegExp("^(?:"+mt.replace(/[\s,]+/g,"|")+")\\b"),null]),Ve.push([h,/^\s+/,null,` \r
\xA0`]);var dt="^.[^\\s\\w.$@'\"`/\\\\]*";return Oe.regexLiterals&&(dt+="(?!s*/)"),qe.push([b,/^@[a-z_$][a-z_$@0-9]*/i,null],[_,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[h,/^[a-z_$][a-z_$@0-9]*/i,null],[b,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[h,/^\\[\s\S]?/,null],[v,new RegExp(dt),null]),de(Ve,qe)}var Se=Pe({keywords:R,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function we(Oe,Ve,qe){for(var ue=/(?:^|\s)nocode(?:\s|$)/,ve=/\r\n?|\n/,De=Oe.ownerDocument,Ne=De.createElement("li");Oe.firstChild;)Ne.appendChild(Oe.firstChild);var it=[Ne];function pt(Ie){var tt=Ie.nodeType;if(tt==1&&!ue.test(Ie.className))if(Ie.nodeName==="br")mt(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var lt=Ie.firstChild;lt;lt=lt.nextSibling)pt(lt);else if((tt==3||tt==4)&&qe){var Ke=Ie.nodeValue,Xe=Ke.match(ve);if(Xe){var Ce=Ke.substring(0,Xe.index);Ie.nodeValue=Ce;var ge=Ke.substring(Xe.index+Xe[0].length);if(ge){var be=Ie.parentNode;be.insertBefore(De.createTextNode(ge),Ie.nextSibling)}mt(Ie),Ce||Ie.parentNode.removeChild(Ie)}}}function mt(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function tt(Xe,Ce){var ge=Ce?Xe.cloneNode(!1):Xe,be=Xe.parentNode;if(be){var ie=tt(be,1),oe=Xe.nextSibling;ie.appendChild(ge);for(var fe=oe;fe;fe=oe)oe=fe.nextSibling,ie.appendChild(fe)}return ge}for(var lt=tt(Ie.nextSibling,0),Ke;(Ke=lt.parentNode)&&Ke.nodeType===1;)lt=Ke;it.push(lt)}for(var dt=0;dt<it.length;++dt)pt(it[dt]);Ve===(Ve|0)&&it[0].setAttribute("value",Ve);var Tt=De.createElement("ol");Tt.className="linenums";for(var St=Math.max(0,Ve-1|0)||0,dt=0,Ue=it.length;dt<Ue;++dt)Ne=it[dt],Ne.className="L"+(dt+St)%10,Ne.firstChild||Ne.appendChild(De.createTextNode("\xA0")),Tt.appendChild(Ne);Oe.appendChild(Tt)}function Fe(Oe){var Ve=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ve=Ve&&+Ve[1]<=8;var qe=/\n/g,ue=Oe.sourceCode,ve=ue.length,De=0,Ne=Oe.spans,it=Ne.length,pt=0,mt=Oe.decorations,dt=mt.length,Tt=0;mt[dt]=ve;var St,Ue;for(Ue=St=0;Ue<dt;)mt[Ue]!==mt[Ue+2]?(mt[St++]=mt[Ue++],mt[St++]=mt[Ue++]):Ue+=2;for(dt=St,Ue=St=0;Ue<dt;){for(var Ie=mt[Ue],tt=mt[Ue+1],lt=Ue+2;lt+2<=dt&&mt[lt+1]===tt;)lt+=2;mt[St++]=Ie,mt[St++]=tt,Ue=lt}dt=mt.length=St;var Ke=Oe.sourceNode,Xe="";Ke&&(Xe=Ke.style.display,Ke.style.display="none");try{for(var Ce=null;pt<it;){var ge=Ne[pt],be=Ne[pt+2]||ve,ie=mt[Tt+2]||ve,lt=Math.min(be,ie),oe=Ne[pt+1],fe;if(oe.nodeType!==1&&(fe=ue.substring(De,lt))){Ve&&(fe=fe.replace(qe,"\r")),oe.nodeValue=fe;var ye=oe.ownerDocument,Ae=ye.createElement("span");Ae.className=mt[Tt+1];var Ge=oe.parentNode;Ge.replaceChild(Ae,oe),Ae.appendChild(oe),De<be&&(Ne[pt+1]=oe=ye.createTextNode(ue.substring(lt,be)),Ge.insertBefore(oe,Ae.nextSibling))}De=lt,De>=be&&(pt+=2),De>=ie&&(Tt+=2)}}finally{Ke&&(Ke.style.display=Xe)}}var Me={};function me(Oe,Ve){for(var qe=Ve.length;--qe>=0;){var ue=Ve[qe];Me.hasOwnProperty(ue)?j.console&&console.warn("cannot override language handler %s",ue):Me[ue]=Oe}}function pe(Oe,Ve){return Oe&&Me.hasOwnProperty(Oe)||(Oe=/^\s*</.test(Ve)?"default-markup":"default-code"),Me[Oe]}me(Se,["default-code"]),me(de([],[[h,/^[^<?]+/],[x,/^<!\w[^>]*(?:>|$)/],[I,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[v,/^(?:<[%?]|[%?]>)/],["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"]),me(de([[h,/^[\s]+/,null,` \r
`],[k,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[C,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[v,/^[=<>\/]+/],["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"]),me(de([],[[k,/^[\s\S]+/]]),["uq.val"]),me(Pe({keywords:f,hashComments:!0,cStyleComments:!0,types:O}),["c","cc","cpp","cxx","cyc","m"]),me(Pe({keywords:"null,true,false"}),["json"]),me(Pe({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:O}),["cs"]),me(Pe({keywords:p,cStyleComments:!0}),["java"]),me(Pe({keywords:a,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),me(Pe({keywords:o,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),me(Pe({keywords:u,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),me(Pe({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),me(Pe({keywords:d,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),me(Pe({keywords:r,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),me(de([],[[S,/^[\s\S]+/]]),["regex"]);function ne(Oe){var Ve=Oe.langExtension;try{var qe=T(Oe.sourceNode,Oe.pre),ue=qe.sourceCode;Oe.sourceCode=ue,Oe.spans=qe.spans,Oe.basePos=0,pe(Ve,ue)(Oe),Fe(Oe)}catch(ve){j.console&&console.log(ve&&ve.stack||ve)}}function Ee(Oe,Ve,qe){var ue=qe||!1,ve=Ve||null,De=document.createElement("div");De.innerHTML="<pre>"+Oe+"</pre>",De=De.firstChild,ue&&we(De,ue,!0);var Ne={langExtension:ve,numberLines:ue,sourceNode:De,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ne(Ne),De.innerHTML}function ae(Oe,Ve){var qe=Ve||document.body,ue=qe.ownerDocument||document;function ve(ge){return qe.getElementsByTagName(ge)}for(var De=[ve("pre"),ve("code"),ve("xmp")],Ne=[],it=0;it<De.length;++it)for(var pt=0,mt=De[it].length;pt<mt;++pt)Ne.push(De[it][pt]);De=null;var dt=Date;dt.now||(dt={now:function(){return+new Date}});var Tt=0,St=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ue=/\bprettyprint\b/,Ie=/\bprettyprinted\b/,tt=/pre|xmp/i,lt=/^code$/i,Ke=/^(?:pre|code|xmp)$/i,Xe={};function Ce(){for(var ge=j.PR_SHOULD_USE_CONTINUATION?dt.now()+250:Infinity;Tt<Ne.length&&dt.now()<ge;Tt++){for(var be=Ne[Tt],ie=Xe,oe=be;oe=oe.previousSibling;){var fe=oe.nodeType,ye=(fe===7||fe===8)&&oe.nodeValue;if(ye?!/^\??prettify\b/.test(ye):fe!==3||/\S/.test(oe.nodeValue))break;if(ye){ie={},ye.replace(/\b(\w+)=([\w:.%+-]+)/g,function(at,Je,_t){ie[Je]=_t});break}}var Ae=be.className;if((ie!==Xe||Ue.test(Ae))&&!Ie.test(Ae)){for(var Ge=!1,ot=be.parentNode;ot;ot=ot.parentNode){var wt=ot.tagName;if(Ke.test(wt)&&ot.className&&Ue.test(ot.className)){Ge=!0;break}}if(!Ge){be.className+=" prettyprinted";var Dt=ie.lang;if(!Dt){Dt=Ae.match(St);var At;!Dt&&(At=le(be))&&lt.test(At.tagName)&&(Dt=At.className.match(St)),Dt&&(Dt=Dt[1])}var vt;if(tt.test(be.tagName))vt=1;else{var $e=be.currentStyle,et=ue.defaultView,Ye=$e?$e.whiteSpace:et&&et.getComputedStyle?et.getComputedStyle(be,null).getPropertyValue("white-space"):0;vt=Ye&&Ye.substring(0,3)==="pre"}var ce=ie.linenums;(ce=ce==="true"||+ce)||(ce=Ae.match(/\blinenums\b(?::(\d+))?/),ce=ce?ce[1]&&ce[1].length?+ce[1]:!0:!1),ce&&we(be,ce,vt);var xe={langExtension:Dt,sourceNode:be,numberLines:ce,pre:vt,sourceCode:null,basePos:null,spans:null,decorations:null};ne(xe)}}}Tt<Ne.length?j.setTimeout(Ce,250):typeof Oe=="function"&&Oe()}Ce()}var ke=j.PR={createSimpleLexer:de,registerLangHandler:me,sourceDecorator:Pe,PR_ATTRIB_NAME:P,PR_ATTRIB_VALUE:k,PR_COMMENT:I,PR_DECLARATION:x,PR_KEYWORD:D,PR_LITERAL:b,PR_NOCODE:y,PR_PLAIN:h,PR_PUNCTUATION:v,PR_SOURCE:g,PR_STRING:S,PR_TAG:C,PR_TYPE:_,prettyPrintOne:U?j.prettyPrintOne=Ee:M=Ee,prettyPrint:K=U?j.prettyPrint=ae:K=ae},je=j.define;typeof je=="function"&&je.amd&&je("google-code-prettify",[],function(){return ke})})()},SMhR:function(We,se){We.exports="data:image/png;base64,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"},T8No:function(We,se,B){"use strict";B.d(se,"a",function(){return K}),B.d(se,"e",function(){return j}),B.d(se,"c",function(){return v}),B.d(se,"b",function(){return h}),B.d(se,"d",function(){return C}),B.d(se,"f",function(){return P});var Z=B("MNsG"),G=B("N0LK"),U=B("Cg/j");let V=Z.k||"";const W=new Map;W.set("false",!1),W.set("true",!0),W.set("isMac",Z.f),W.set("isLinux",Z.d),W.set("isWindows",Z.i),W.set("isWeb",Z.h),W.set("isMacNative",Z.f&&!Z.h),W.set("isEdge",V.indexOf("Edg/")>=0),W.set("isFirefox",V.indexOf("Firefox")>=0),W.set("isChrome",V.indexOf("Chrome")>=0),W.set("isSafari",V.indexOf("Safari")>=0);const M=Object.prototype.hasOwnProperty;class K{static has(y){return f.create(y)}static equals(y,A){return p.create(y,A)}static regex(y,A){return S.create(y,A)}static not(y){return u.create(y)}static and(...y){return _.create(y,null)}static or(...y){return b.create(y,null,!0)}static deserialize(y,A=!1){return y?this._deserializeOrExpression(y,A):void 0}static _deserializeOrExpression(y,A){let F=y.split("||");return b.create(F.map(T=>this._deserializeAndExpression(T,A)),null,!0)}static _deserializeAndExpression(y,A){let F=y.split("&&");return _.create(F.map(T=>this._deserializeOne(T,A)),null)}static _deserializeOne(y,A){if(y=y.trim(),y.indexOf("!=")>=0){let F=y.split("!=");return d.create(F[0].trim(),this._deserializeValue(F[1],A))}if(y.indexOf("==")>=0){let F=y.split("==");return p.create(F[0].trim(),this._deserializeValue(F[1],A))}if(y.indexOf("=~")>=0){let F=y.split("=~");return S.create(F[0].trim(),this._deserializeRegexValue(F[1],A))}if(y.indexOf(" in ")>=0){let F=y.split(" in ");return c.create(F[0].trim(),F[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(y)){const F=y.split(">=");return a.create(F[0].trim(),F[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(y)){const F=y.split(">");return s.create(F[0].trim(),F[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(y)){const F=y.split("<=");return O.create(F[0].trim(),F[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(y)){const F=y.split("<");return R.create(F[0].trim(),F[1].trim())}return/^\!\s*/.test(y)?u.create(y.substr(1).trim()):f.create(y)}static _deserializeValue(y,A){if(y=y.trim(),y==="true")return!0;if(y==="false")return!1;let F=/^'([^']*)'$/.exec(y);return F?F[1].trim():y}static _deserializeRegexValue(y,A){if(Object(G.C)(y)){if(A)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let F=y.indexOf("/"),T=y.lastIndexOf("/");if(F===T||F<0){if(A)throw new Error(`bad regexp-value '${y}', missing /-enclosure`);return console.warn(`bad regexp-value '${y}', missing /-enclosure`),null}let Y=y.slice(F+1,T),$=y[T+1]==="i"?"i":"";try{return new RegExp(Y,$)}catch(le){if(A)throw new Error(`bad regexp-value '${y}', parse error: ${le}`);return console.warn(`bad regexp-value '${y}', parse error: ${le}`),null}}}function j(y,A){const F=y?y.substituteConstants():void 0,T=A?A.substituteConstants():void 0;return!F&&!T?!0:!F||!T?!1:F.equals(T)}function n(y,A){return y.cmp(A)}class w{constructor(){this.type=0}cmp(y){return this.type-y.type}equals(y){return y.type===this.type}substituteConstants(){return this}evaluate(y){return!1}serialize(){return"false"}keys(){return[]}negate(){return m.INSTANCE}}w.INSTANCE=new w;class m{constructor(){this.type=1}cmp(y){return this.type-y.type}equals(y){return y.type===this.type}substituteConstants(){return this}evaluate(y){return!0}serialize(){return"true"}keys(){return[]}negate(){return w.INSTANCE}}m.INSTANCE=new m;class f{constructor(y,A){this.key=y,this.negated=A,this.type=2}static create(y,A=null){const F=W.get(y);return typeof F=="boolean"?F?m.INSTANCE:w.INSTANCE:new f(y,A)}cmp(y){return y.type!==this.type?this.type-y.type:x(this.key,y.key)}equals(y){return y.type===this.type?this.key===y.key:!1}substituteConstants(){const y=W.get(this.key);return typeof y=="boolean"?y?m.INSTANCE:w.INSTANCE:this}evaluate(y){return!!y.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this)),this.negated}}class p{constructor(y,A,F){this.key=y,this.value=A,this.negated=F,this.type=4}static create(y,A,F=null){if(typeof A=="boolean")return A?f.create(y,F):u.create(y,F);const T=W.get(y);if(typeof T=="boolean"){const Y=T?"true":"false";return A===Y?m.INSTANCE:w.INSTANCE}return new p(y,A,F)}cmp(y){return y.type!==this.type?this.type-y.type:g(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){const y=W.get(this.key);if(typeof y=="boolean"){const A=y?"true":"false";return this.value===A?m.INSTANCE:w.INSTANCE}return this}evaluate(y){return y.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=d.create(this.key,this.value,this)),this.negated}}class c{constructor(y,A){this.key=y,this.valueKey=A,this.type=10,this.negated=null}static create(y,A){return new c(y,A)}cmp(y){return y.type!==this.type?this.type-y.type:g(this.key,this.valueKey,y.key,y.valueKey)}equals(y){return y.type===this.type?this.key===y.key&&this.valueKey===y.valueKey:!1}substituteConstants(){return this}evaluate(y){const A=y.getValue(this.valueKey),F=y.getValue(this.key);return Array.isArray(A)?A.indexOf(F)>=0:typeof F=="string"&&typeof A=="object"&&A!==null?M.call(A,F):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=r.create(this)),this.negated}}class r{constructor(y){this._actual=y,this.type=11}static create(y){return new r(y)}cmp(y){return y.type!==this.type?this.type-y.type:this._actual.cmp(y._actual)}equals(y){return y.type===this.type?this._actual.equals(y._actual):!1}substituteConstants(){return this}evaluate(y){return!this._actual.evaluate(y)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class d{constructor(y,A,F){this.key=y,this.value=A,this.negated=F,this.type=5}static create(y,A,F=null){if(typeof A=="boolean")return A?u.create(y,F):f.create(y,F);const T=W.get(y);if(typeof T=="boolean"){const Y=T?"true":"false";return A===Y?w.INSTANCE:m.INSTANCE}return new d(y,A,F)}cmp(y){return y.type!==this.type?this.type-y.type:g(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){const y=W.get(this.key);if(typeof y=="boolean"){const A=y?"true":"false";return this.value===A?w.INSTANCE:m.INSTANCE}return this}evaluate(y){return y.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}class u{constructor(y,A){this.key=y,this.negated=A,this.type=3}static create(y,A=null){const F=W.get(y);return typeof F=="boolean"?F?w.INSTANCE:m.INSTANCE:new u(y,A)}cmp(y){return y.type!==this.type?this.type-y.type:x(this.key,y.key)}equals(y){return y.type===this.type?this.key===y.key:!1}substituteConstants(){const y=W.get(this.key);return typeof y=="boolean"?y?w.INSTANCE:m.INSTANCE:this}evaluate(y){return!y.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this)),this.negated}}function o(y,A){if(typeof y=="string"){const F=parseFloat(y);isNaN(F)||(y=F)}return typeof y=="string"||typeof y=="number"?A(y):w.INSTANCE}class s{constructor(y,A,F){this.key=y,this.value=A,this.negated=F,this.type=12}static create(y,A,F=null){return o(A,T=>new s(y,T,F))}cmp(y){return y.type!==this.type?this.type-y.type:g(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class a{constructor(y,A,F){this.key=y,this.value=A,this.negated=F,this.type=13}static create(y,A,F=null){return o(A,T=>new a(y,T,F))}cmp(y){return y.type!==this.type?this.type-y.type:g(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class R{constructor(y,A,F){this.key=y,this.value=A,this.negated=F,this.type=14}static create(y,A,F=null){return o(A,T=>new R(y,T,F))}cmp(y){return y.type!==this.type?this.type-y.type:g(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}class O{constructor(y,A,F){this.key=y,this.value=A,this.negated=F,this.type=15}static create(y,A,F=null){return o(A,T=>new O(y,T,F))}cmp(y){return y.type!==this.type?this.type-y.type:g(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}class S{constructor(y,A){this.key=y,this.regexp=A,this.type=7,this.negated=null}static create(y,A){return new S(y,A)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.key<y.key)return-1;if(this.key>y.key)return 1;const A=this.regexp?this.regexp.source:"",F=y.regexp?y.regexp.source:"";return A<F?-1:A>F?1:0}equals(y){if(y.type===this.type){const A=this.regexp?this.regexp.source:"",F=y.regexp?y.regexp.source:"";return this.key===y.key&&A===F}return!1}substituteConstants(){return this}evaluate(y){let A=y.getValue(this.key);return this.regexp?this.regexp.test(A):!1}serialize(){const y=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${y}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this)),this.negated}}class D{constructor(y){this._actual=y,this.type=8}static create(y){return new D(y)}cmp(y){return y.type!==this.type?this.type-y.type:this._actual.cmp(y._actual)}equals(y){return y.type===this.type?this._actual.equals(y._actual):!1}substituteConstants(){return this}evaluate(y){return!this._actual.evaluate(y)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function I(y){let A=null;for(let F=0,T=y.length;F<T;F++){const Y=y[F].substituteConstants();if(y[F]!==Y&&A===null){A=[];for(let $=0;$<F;$++)A[$]=y[$]}A!==null&&(A[F]=Y)}return A===null?y:A}class _{constructor(y,A){this.expr=y,this.negated=A,this.type=6}static create(y,A){return _._normalizeArr(y,A)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.expr.length<y.expr.length)return-1;if(this.expr.length>y.expr.length)return 1;for(let A=0,F=this.expr.length;A<F;A++){const T=n(this.expr[A],y.expr[A]);if(T!==0)return T}return 0}equals(y){if(y.type===this.type){if(this.expr.length!==y.expr.length)return!1;for(let A=0,F=this.expr.length;A<F;A++)if(!this.expr[A].equals(y.expr[A]))return!1;return!0}return!1}substituteConstants(){const y=I(this.expr);return y===this.expr?this:_.create(y,this.negated)}evaluate(y){for(let A=0,F=this.expr.length;A<F;A++)if(!this.expr[A].evaluate(y))return!1;return!0}static _normalizeArr(y,A){const F=[];let T=!1;for(const Y of y){if(!Y)continue;if(Y.type===1){T=!0;continue}if(Y.type===0)return w.INSTANCE;if(Y.type===6){F.push(...Y.expr);continue}F.push(Y)}if(F.length===0&&T)return m.INSTANCE;if(F.length===0)return;if(F.length===1)return F[0];F.sort(n);for(let Y=1;Y<F.length;Y++)F[Y-1].equals(F[Y])&&(F.splice(Y,1),Y--);if(F.length===1)return F[0];for(;F.length>1;){const Y=F[F.length-1];if(Y.type!==9)break;F.pop();const $=F.pop(),le=F.length===0,de=b.create(Y.expr.map(Pe=>_.create([Pe,$],null)),null,le);de&&(F.push(de),F.sort(n))}return F.length===1?F[0]:new _(F,A)}serialize(){return this.expr.map(y=>y.serialize()).join(" && ")}keys(){const y=[];for(let A of this.expr)y.push(...A.keys());return y}negate(){if(!this.negated){const y=[];for(let A of this.expr)y.push(A.negate());this.negated=b.create(y,this,!0)}return this.negated}}class b{constructor(y,A){this.expr=y,this.negated=A,this.type=9}static create(y,A,F){return b._normalizeArr(y,A,F)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.expr.length<y.expr.length)return-1;if(this.expr.length>y.expr.length)return 1;for(let A=0,F=this.expr.length;A<F;A++){const T=n(this.expr[A],y.expr[A]);if(T!==0)return T}return 0}equals(y){if(y.type===this.type){if(this.expr.length!==y.expr.length)return!1;for(let A=0,F=this.expr.length;A<F;A++)if(!this.expr[A].equals(y.expr[A]))return!1;return!0}return!1}substituteConstants(){const y=I(this.expr);return y===this.expr?this:b.create(y,this.negated,!1)}evaluate(y){for(let A=0,F=this.expr.length;A<F;A++)if(this.expr[A].evaluate(y))return!0;return!1}static _normalizeArr(y,A,F){let T=[],Y=!1;if(y){for(let $=0,le=y.length;$<le;$++){const de=y[$];if(!de)continue;if(de.type===0){Y=!0;continue}if(de.type===1)return m.INSTANCE;if(de.type===9){T=T.concat(de.expr);continue}T.push(de)}if(T.length===0&&Y)return w.INSTANCE;T.sort(n)}if(T.length===0)return;if(T.length===1)return T[0];for(let $=1;$<T.length;$++)T[$-1].equals(T[$])&&(T.splice($,1),$--);if(T.length===1)return T[0];if(F){for(let $=0;$<T.length;$++)for(let le=$+1;le<T.length;le++)P(T[$],T[le])&&(T.splice(le,1),le--);if(T.length===1)return T[0]}return new b(T,A)}serialize(){return this.expr.map(y=>y.serialize()).join(" || ")}keys(){const y=[];for(let A of this.expr)y.push(...A.keys());return y}negate(){if(!this.negated){let y=[];for(let A of this.expr)y.push(A.negate());for(;y.length>1;){const A=y.shift(),F=y.shift(),T=[];for(const $ of k(A))for(const le of k(F))T.push(_.create([$,le],null));const Y=y.length===0;y.unshift(b.create(T,null,Y))}this.negated=y[0]}return this.negated}}class v extends f{constructor(y,A,F){super(y,null);this._defaultValue=A,typeof F=="object"?v._info.push(Object.assign(Object.assign({},F),{key:y})):F!==!0&&v._info.push({key:y,description:F,type:A!=null?typeof A:void 0})}static all(){return v._info.values()}bindTo(y){return y.createKey(this.key,this._defaultValue)}getValue(y){return y.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(y){return p.create(this.key,y)}}v._info=[];const h=Object(U.c)("contextKeyService"),C="setContext";function x(y,A){return y<A?-1:y>A?1:0}function g(y,A,F,T){return y<F?-1:y>F?1:A<T?-1:A>T?1:0}function P(y,A){if(A.type===6&&y.type!==9&&y.type!==6){for(const Y of A.expr)if(y.equals(Y))return!0}const F=y.negate(),T=k(F).concat(k(A));T.sort(n);for(let Y=0;Y<T.length;Y++){const $=T[Y],le=$.negate();for(let de=Y+1;de<T.length;de++){const Pe=T[de];if(le.equals(Pe))return!0}}return!1}function k(y){return y.type===9?y.expr:[y]}},TGq3:function(We,se,B){We.exports=B.p+"static/lockclose.365036e8.svg"},TXwP:function(We,se,B){var Z,G;(function(){var U;(function(){"use strict";var W=[,,function(n){function w(p){this.__parent=p,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=[]}w.prototype.clone_empty=function(){var p=new w(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},w.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},w.prototype.has_match=function(p){for(var c=this.__items.length-1;c>=0;c--)if(this.__items[c].match(p))return!0;return!1},w.prototype.set_indent=function(p,c){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},w.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)},w.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},w.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},w.prototype.is_empty=function(){return this.__items.length===0},w.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},w.prototype.push=function(p){this.__items.push(p);var c=p.lastIndexOf(`
`);c!==-1?this.__character_count=p.length-c:this.__character_count+=p.length},w.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},w.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},w.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},w.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},w.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function m(p,c){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),c=c||"",p.indent_level>0&&(c=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}m.prototype.get_indent_size=function(p,c){var r=this.__base_string_length;return c=c||0,p<0&&(r=0),r+=p*this.__indent_size,r+=c,r},m.prototype.get_indent_string=function(p,c){var r=this.__base_string;return c=c||0,p<0&&(p=0,r=""),c+=p*this.__indent_size,this.__ensure_cache(c),r+=this.__cache[c],r},m.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},m.prototype.__add_column=function(){var p=this.__cache.length,c=0,r="";this.__indent_size&&p>=this.__indent_size&&(c=Math.floor(p/this.__indent_size),p-=c*this.__indent_size,r=new Array(c+1).join(this.__indent_string)),p&&(r+=new Array(p+1).join(" ")),this.__cache.push(r)};function f(p,c){this.__indent_cache=new m(p,c),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new w(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(p,c){return this.__indent_cache.get_indent_string(p,c)},f.prototype.get_indent_size=function(p,c){return this.__indent_cache.get_indent_size(p,c)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(p){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===`
`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join(`
`);return p!==`
`&&(r=r.replace(/[\n]/g,p)),r},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(p,c){return p=p||0,c=c||0,this.next_line.set_indent(p,c),this.__lines.length>1?(this.current_line.set_indent(p,c),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(p){for(var c=0;c<p.newlines;c++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(p.whitespace_before),this.current_line.push(p.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},f.prototype.add_token=function(p){this.__add_space_before_token(),this.current_line.push(p),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},f.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(" "))},f.prototype.remove_indent=function(p){for(var c=this.__lines.length;p<c;)this.__lines[p]._remove_indent(),p++;this.current_line._remove_wrap_indent()},f.prototype.trim=function(p){for(p=p===void 0?!1:p,this.current_line.trim();p&&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},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(p,c){for(var r=this.__lines.length-2;r>=0;){var d=this.__lines[r];if(d.is_empty())break;if(d.item(0).indexOf(p)!==0&&d.item(-1)!==c){this.__lines.splice(r+1,0,new w(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},n.exports.Output=f},,,,function(n){function w(p,c){this.raw_options=m(p,c),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"])}w.prototype._get_array=function(p,c){var r=this.raw_options[p],d=c||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(d=r.concat()):typeof r=="string"&&(d=r.split(/[^a-zA-Z0-9_\/\-]+/)),d},w.prototype._get_boolean=function(p,c){var r=this.raw_options[p],d=r===void 0?!!c:!!r;return d},w.prototype._get_characters=function(p,c){var r=this.raw_options[p],d=c||"";return typeof r=="string"&&(d=r.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),d},w.prototype._get_number=function(p,c){var r=this.raw_options[p];c=parseInt(c,10),isNaN(c)&&(c=0);var d=parseInt(r,10);return isNaN(d)&&(d=c),d},w.prototype._get_selection=function(p,c,r){var d=this._get_selection_list(p,c,r);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+p+`' can only be one of the following values:
`+c+`
You passed in: '`+this.raw_options[p]+"'");return d[0]},w.prototype._get_selection_list=function(p,c,r){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(r=r||[c[0]],!this._is_valid_selection(r,c))throw new Error("Invalid Default Value!");var d=this._get_array(p,r);if(!this._is_valid_selection(d,c))throw new Error("Invalid Option Value: The option '"+p+`' can contain only the following values:
`+c+`
You passed in: '`+this.raw_options[p]+"'");return d},w.prototype._is_valid_selection=function(p,c){return p.length&&c.length&&!p.some(function(r){return c.indexOf(r)===-1})};function m(p,c){var r={};p=f(p);var d;for(d in p)d!==c&&(r[d]=p[d]);if(c&&p[c])for(d in p[c])r[d]=p[c][d];return r}function f(p){var c={},r;for(r in p){var d=r.replace(/-/g,"_");c[d]=p[r]}return c}n.exports.Options=w,n.exports.normalizeOpts=f,n.exports.mergeOpts=m},,function(n){var w=RegExp.prototype.hasOwnProperty("sticky");function m(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}m.prototype.restart=function(){this.__position=0},m.prototype.back=function(){this.__position>0&&(this.__position-=1)},m.prototype.hasNext=function(){return this.__position<this.__input_length},m.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__input.charAt(this.__position),this.__position+=1),f},m.prototype.peek=function(f){var p=null;return f=f||0,f+=this.__position,f>=0&&f<this.__input_length&&(p=this.__input.charAt(f)),p},m.prototype.__match=function(f,p){f.lastIndex=p;var c=f.exec(this.__input);return c&&!(w&&f.sticky)&&(c.index!==p&&(c=null)),c},m.prototype.test=function(f,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(f,p):!1},m.prototype.testChar=function(f,p){var c=this.peek(p);return f.lastIndex=0,c!==null&&f.test(c)},m.prototype.match=function(f){var p=this.__match(f,this.__position);return p?this.__position+=p[0].length:p=null,p},m.prototype.read=function(f,p,c){var r="",d;return f&&(d=this.match(f),d&&(r+=d[0])),p&&(d||!f)&&(r+=this.readUntil(p,c)),r},m.prototype.readUntil=function(f,p){var c="",r=this.__position;f.lastIndex=this.__position;var d=f.exec(this.__input);return d?(r=d.index,p&&(r+=d[0].length)):r=this.__input_length,c=this.__input.substring(this.__position,r),this.__position=r,c},m.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)},m.prototype.get_regexp=function(f,p){var c=null,r="g";return p&&w&&(r="y"),typeof f=="string"&&f!==""?c=new RegExp(f,r):f&&(c=new RegExp(f.source,r)),c},m.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},m.prototype.peekUntilAfter=function(f){var p=this.__position,c=this.readUntilAfter(f);return this.__position=p,c},m.prototype.lookBack=function(f){var p=this.__position-1;return p>=f.length&&this.__input.substring(p-f.length,p).toLowerCase()===f},n.exports.InputScanner=m},,,,,function(n){function w(m,f){m=typeof m=="string"?m:m.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(m+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(m+/\sbeautify\signore:end\s/.source+f,"g")}w.prototype.get_directives=function(m){if(!m.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(m);p;)f[p[1]]=p[2],p=this.__directive_pattern.exec(m);return f},w.prototype.readIgnored=function(m){return m.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=w},,function(n,w,m){var f=m(16).Beautifier,p=m(17).Options;function c(r,d){var u=new f(r,d);return u.beautify()}n.exports=c,n.exports.defaultOptions=function(){return new p}},function(n,w,m){var f=m(17).Options,p=m(2).Output,c=m(8).InputScanner,r=m(13).Directives,d=new r(/\/\*/,/\*\//),u=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,s=/\s/,a=/(?:\s|\n)+/g,R=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,O=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function S(D,I){this._source_text=D||"",this._options=new f(I),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"]}S.prototype.eatString=function(D){var I="";for(this._ch=this._input.next();this._ch;){if(I+=this._ch,this._ch==="\\")I+=this._input.next();else if(D.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return I},S.prototype.eatWhitespace=function(D){for(var I=s.test(this._input.peek()),_=0;s.test(this._input.peek());)this._ch=this._input.next(),D&&this._ch===`
`&&((_===0||_<this._options.max_preserve_newlines)&&(_++,this._output.add_new_line(!0)));return I},S.prototype.foundNestedPseudoClass=function(){for(var D=0,I=1,_=this._input.peek(I);_;){if(_==="{")return!0;if(_==="(")D+=1;else if(_===")"){if(D===0)return!1;D-=1}else if(_===";"||_==="}")return!1;I++,_=this._input.peek(I)}return!1},S.prototype.print_string=function(D){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(D)},S.prototype.preserveSingleSpace=function(D){D&&(this._output.space_before_token=!0)},S.prototype.indent=function(){this._indentLevel++},S.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},S.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var D=this._source_text,I=this._options.eol;I==="auto"&&(I=`
`,D&&u.test(D||"")&&(I=D.match(u)[0])),D=D.replace(o,`
`);var _=D.match(/^[\t ]*/)[0];this._output=new p(this._options,_),this._input=new c(D),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var b=0,v=!1,h=!1,C=!1,x=!1,g=!1,P=!1,k=this._ch,y=!1,A,F,T;A=this._input.read(a),F=A!=="",T=k,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),k=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var Y=this._input.read(R),$=d.get_directives(Y);$&&$.ignore==="start"&&(Y+=d.readIgnored(this._input)),this.print_string(Y),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(O)),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 le=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);le.match(/[ :]$/)&&(le=this.eatString(": ").replace(/\s$/,""),this.print_string(le),this._output.space_before_token=!0),le=le.replace(/\s$/,""),le==="extend"?x=!0:le==="import"&&(g=!0),le in this.NESTED_AT_RULE?(this._nestedLevel+=1,le in this.CONDITIONAL_GROUP_RULE&&(C=!0)):!v&&b===0&&le.indexOf(":")!==-1&&(h=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(F),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")h&&(h=!1,this.outdent()),C?(C=!1,v=this._indentLevel>=this._nestedLevel):v=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&v&&(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)):(T==="("?this._output.space_before_token=!1:T!==","&&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(),T==="{"&&this._output.trim(!0),g=!1,x=!1,h&&(this.outdent(),h=!1),this.print_string(this._ch),v=!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 de=0;de<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;de++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[de])){y=!0;break}(v||C)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!x&&b===0?(this.print_string(":"),h||(h=!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 Pe=T==='"'||T==="'";this.preserveSingleSpace(Pe||F),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")y=!1,b===0?(h&&(this.outdent(),h=!1),x=!1,g=!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(),b++,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(")")),b&&(b--,this.outdent()));else{var Se=!1;this._input.lookBack("with")&&(Se=!0),this.preserveSingleSpace(F||Se),this.print_string(this._ch),h&&T==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),P=!0):(this.eatWhitespace(),b++,this.indent())}else if(this._ch===")")b&&(b--,this.outdent()),P&&this._input.peek()===";"&&this._options.selector_separator_newline&&(P=!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&&(!h||P)&&b===0&&!g&&!x?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!h&&b===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&&s.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("="),s.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 we=T==='"'||T==="'";this.preserveSingleSpace(we||F),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&y&&this._output.add_new_line()}var Fe=this._output.get_code(I);return Fe},n.exports.Beautifier=S},function(n,w,m){var f=m(6).Options;function p(c){f.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var r=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||r;var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var u=0;u<d.length;u++)d[u]!=="expand"?this.brace_style="collapse":this.brace_style=d[u]}p.prototype=new f,n.exports.Options=p}],M={};function K(n){var w=M[n];if(w!==void 0)return w.exports;var m=M[n]={exports:{}};return W[n](m,m.exports,K),m.exports}var j=K(15);U=j})();var V=U;!(Z=[],G=function(){return{css_beautify:V}}.apply(se,Z),G!==void 0&&(We.exports=G))})()},V5fa:function(We,se,B){We.exports={flex_box_center:"flex_box_center___1_S53",flex_space_between:"flex_space_between___1jn1m",flex_box_vertical_center:"flex_box_vertical_center___3ENQs",flex_box_center_end:"flex_box_center_end___1RjJf",flex_box_column:"flex_box_column___3-6wq",bg:"bg___3wGkV",answerWrp:"answerWrp___1GI6r",title:"title___1QMPU",questionIcons:"questionIcons___2kqHA",green:"green___3sUty",orange:"orange___1IwUK",greenTip:"greenTip___2LD-4",redTip:"redTip___Ua25P",orangeTip:"orangeTip___1P_qu",pollDesc:"pollDesc___12pG2",answered:"answered___12rTH",unanswer:"unanswer___2WW2x",anchor:"anchor___K9-2U",answerFlag:"answerFlag___3jqRB",flagActive:"flagActive___38hkf",flagHalf:"flagHalf___1rgyT",answerStudentFlag:"answerStudentFlag___2zRLo",answerStudentActive:"answerStudentActive___2T-mu",questionItem:"questionItem___LqD7i",itemType:"itemType___1pbUF",itemFlag:"itemFlag___3xnGm",answerWrap:"answerWrap___13WPD",answerSubjective:"answerSubjective___BuIEZ",otherInput:"otherInput___3j4KI",submitButton:"submitButton___3lR03",randomFlag:"randomFlag___HVH41",answerTrue:"answerTrue___3EG1E",answerFalse:"answerFalse___zj_y6",answerHalf:"answerHalf___27vGH",renderHtml:"renderHtml___1U3SR",simpleText:"simpleText___1ljHF",answerYes:"answerYes___nDZ92",answerNo:"answerNo___1DhaR",answerInfo:"answerInfo___150u3",answerSheet:"answerSheet___1m3xL",active:"active___I4C3w",countDown:"countDown___1gxag",red:"red___1J5W8",fold:"fold___1XoX9",cardList:"cardList___vfXeA",iframe:"iframe___3x_Cy",eduTip:"eduTip___384XZ",eduQrcode:"eduQrcode___26eCP",eduVideo:"eduVideo___2-PAX",eduUsername:"eduUsername___1ctLk",startAnswer:"startAnswer___2XcIR",eduSubmit:"eduSubmit___2k1g8",eduTitle:"eduTitle___1o443",wrpAnswer:"wrpAnswer___2zPBL",simpleMd:"simpleMd___G5mJD"}},Vhoy:function(We,se,B){"use strict";B.d(se,"d",function(){return V}),B.d(se,"e",function(){return W}),B.d(se,"c",function(){return M}),B.d(se,"b",function(){return K}),B.d(se,"a",function(){return j});var Z=B("MI8n");class G{constructor(){this._icons=new Map,this._onDidRegister=new Z.b}add(n){const w=this._icons.get(n.id);w?n.description?w.description=n.description:console.error(`Duplicate registration of codicon ${n.id}`):(this._icons.set(n.id,n),this._onDidRegister.fire(n))}get(n){return this._icons.get(n)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const U=new G,V=U;function W(n,w){return new K(n,w)}function M(n){return n?n.replace(/\$\((.*?)\)/g,(w,m)=>` ${m} `).trim():""}class K{constructor(n,w,m){this.id=n,this.definition=w,this.description=m,U.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var j;(function(n){n.iconNameSegment="[A-Za-z0-9]+",n.iconNameExpression="[A-Za-z0-9\\-]+",n.iconModifierExpression="~[A-Za-z]+";const w=new RegExp(`^(${n.iconNameExpression})(${n.iconModifierExpression})?$`);function m(c){if(c instanceof K)return["codicon","codicon-"+c.id];const r=w.exec(c.id);if(!r)return m(K.error);let[,d,u]=r;const o=["codicon","codicon-"+d];return u&&o.push("codicon-modifier-"+u.substr(1)),o}n.asClassNameArray=m;function f(c){return m(c).join(" ")}n.asClassName=f;function p(c){return"."+m(c).join(".")}n.asCSSSelector=p})(j||(j={})),function(n){n.add=new n("add",{fontCharacter:"\\ea60"}),n.plus=new n("plus",n.add.definition),n.gistNew=new n("gist-new",n.add.definition),n.repoCreate=new n("repo-create",n.add.definition),n.lightbulb=new n("lightbulb",{fontCharacter:"\\ea61"}),n.lightBulb=new n("light-bulb",{fontCharacter:"\\ea61"}),n.repo=new n("repo",{fontCharacter:"\\ea62"}),n.repoDelete=new n("repo-delete",{fontCharacter:"\\ea62"}),n.gistFork=new n("gist-fork",{fontCharacter:"\\ea63"}),n.repoForked=new n("repo-forked",{fontCharacter:"\\ea63"}),n.gitPullRequest=new n("git-pull-request",{fontCharacter:"\\ea64"}),n.gitPullRequestAbandoned=new n("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),n.recordKeys=new n("record-keys",{fontCharacter:"\\ea65"}),n.keyboard=new n("keyboard",{fontCharacter:"\\ea65"}),n.tag=new n("tag",{fontCharacter:"\\ea66"}),n.tagAdd=new n("tag-add",{fontCharacter:"\\ea66"}),n.tagRemove=new n("tag-remove",{fontCharacter:"\\ea66"}),n.person=new n("person",{fontCharacter:"\\ea67"}),n.personFollow=new n("person-follow",{fontCharacter:"\\ea67"}),n.personOutline=new n("person-outline",{fontCharacter:"\\ea67"}),n.personFilled=new n("person-filled",{fontCharacter:"\\ea67"}),n.gitBranch=new n("git-branch",{fontCharacter:"\\ea68"}),n.gitBranchCreate=new n("git-branch-create",{fontCharacter:"\\ea68"}),n.gitBranchDelete=new n("git-branch-delete",{fontCharacter:"\\ea68"}),n.sourceControl=new n("source-control",{fontCharacter:"\\ea68"}),n.mirror=new n("mirror",{fontCharacter:"\\ea69"}),n.mirrorPublic=new n("mirror-public",{fontCharacter:"\\ea69"}),n.star=new n("star",{fontCharacter:"\\ea6a"}),n.starAdd=new n("star-add",{fontCharacter:"\\ea6a"}),n.starDelete=new n("star-delete",{fontCharacter:"\\ea6a"}),n.starEmpty=new n("star-empty",{fontCharacter:"\\ea6a"}),n.comment=new n("comment",{fontCharacter:"\\ea6b"}),n.commentAdd=new n("comment-add",{fontCharacter:"\\ea6b"}),n.alert=new n("alert",{fontCharacter:"\\ea6c"}),n.warning=new n("warning",{fontCharacter:"\\ea6c"}),n.search=new n("search",{fontCharacter:"\\ea6d"}),n.searchSave=new n("search-save",{fontCharacter:"\\ea6d"}),n.logOut=new n("log-out",{fontCharacter:"\\ea6e"}),n.signOut=new n("sign-out",{fontCharacter:"\\ea6e"}),n.logIn=new n("log-in",{fontCharacter:"\\ea6f"}),n.signIn=new n("sign-in",{fontCharacter:"\\ea6f"}),n.eye=new n("eye",{fontCharacter:"\\ea70"}),n.eyeUnwatch=new n("eye-unwatch",{fontCharacter:"\\ea70"}),n.eyeWatch=new n("eye-watch",{fontCharacter:"\\ea70"}),n.circleFilled=new n("circle-filled",{fontCharacter:"\\ea71"}),n.primitiveDot=new n("primitive-dot",{fontCharacter:"\\ea71"}),n.closeDirty=new n("close-dirty",{fontCharacter:"\\ea71"}),n.debugBreakpoint=new n("debug-breakpoint",{fontCharacter:"\\ea71"}),n.debugBreakpointDisabled=new n("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),n.debugHint=new n("debug-hint",{fontCharacter:"\\ea71"}),n.primitiveSquare=new n("primitive-square",{fontCharacter:"\\ea72"}),n.edit=new n("edit",{fontCharacter:"\\ea73"}),n.pencil=new n("pencil",{fontCharacter:"\\ea73"}),n.info=new n("info",{fontCharacter:"\\ea74"}),n.issueOpened=new n("issue-opened",{fontCharacter:"\\ea74"}),n.gistPrivate=new n("gist-private",{fontCharacter:"\\ea75"}),n.gitForkPrivate=new n("git-fork-private",{fontCharacter:"\\ea75"}),n.lock=new n("lock",{fontCharacter:"\\ea75"}),n.mirrorPrivate=new n("mirror-private",{fontCharacter:"\\ea75"}),n.close=new n("close",{fontCharacter:"\\ea76"}),n.removeClose=new n("remove-close",{fontCharacter:"\\ea76"}),n.x=new n("x",{fontCharacter:"\\ea76"}),n.repoSync=new n("repo-sync",{fontCharacter:"\\ea77"}),n.sync=new n("sync",{fontCharacter:"\\ea77"}),n.clone=new n("clone",{fontCharacter:"\\ea78"}),n.desktopDownload=new n("desktop-download",{fontCharacter:"\\ea78"}),n.beaker=new n("beaker",{fontCharacter:"\\ea79"}),n.microscope=new n("microscope",{fontCharacter:"\\ea79"}),n.vm=new n("vm",{fontCharacter:"\\ea7a"}),n.deviceDesktop=new n("device-desktop",{fontCharacter:"\\ea7a"}),n.file=new n("file",{fontCharacter:"\\ea7b"}),n.fileText=new n("file-text",{fontCharacter:"\\ea7b"}),n.more=new n("more",{fontCharacter:"\\ea7c"}),n.ellipsis=new n("ellipsis",{fontCharacter:"\\ea7c"}),n.kebabHorizontal=new n("kebab-horizontal",{fontCharacter:"\\ea7c"}),n.mailReply=new n("mail-reply",{fontCharacter:"\\ea7d"}),n.reply=new n("reply",{fontCharacter:"\\ea7d"}),n.organization=new n("organization",{fontCharacter:"\\ea7e"}),n.organizationFilled=new n("organization-filled",{fontCharacter:"\\ea7e"}),n.organizationOutline=new n("organization-outline",{fontCharacter:"\\ea7e"}),n.newFile=new n("new-file",{fontCharacter:"\\ea7f"}),n.fileAdd=new n("file-add",{fontCharacter:"\\ea7f"}),n.newFolder=new n("new-folder",{fontCharacter:"\\ea80"}),n.fileDirectoryCreate=new n("file-directory-create",{fontCharacter:"\\ea80"}),n.trash=new n("trash",{fontCharacter:"\\ea81"}),n.trashcan=new n("trashcan",{fontCharacter:"\\ea81"}),n.history=new n("history",{fontCharacter:"\\ea82"}),n.clock=new n("clock",{fontCharacter:"\\ea82"}),n.folder=new n("folder",{fontCharacter:"\\ea83"}),n.fileDirectory=new n("file-directory",{fontCharacter:"\\ea83"}),n.symbolFolder=new n("symbol-folder",{fontCharacter:"\\ea83"}),n.logoGithub=new n("logo-github",{fontCharacter:"\\ea84"}),n.markGithub=new n("mark-github",{fontCharacter:"\\ea84"}),n.github=new n("github",{fontCharacter:"\\ea84"}),n.terminal=new n("terminal",{fontCharacter:"\\ea85"}),n.console=new n("console",{fontCharacter:"\\ea85"}),n.repl=new n("repl",{fontCharacter:"\\ea85"}),n.zap=new n("zap",{fontCharacter:"\\ea86"}),n.symbolEvent=new n("symbol-event",{fontCharacter:"\\ea86"}),n.error=new n("error",{fontCharacter:"\\ea87"}),n.stop=new n("stop",{fontCharacter:"\\ea87"}),n.variable=new n("variable",{fontCharacter:"\\ea88"}),n.symbolVariable=new n("symbol-variable",{fontCharacter:"\\ea88"}),n.array=new n("array",{fontCharacter:"\\ea8a"}),n.symbolArray=new n("symbol-array",{fontCharacter:"\\ea8a"}),n.symbolModule=new n("symbol-module",{fontCharacter:"\\ea8b"}),n.symbolPackage=new n("symbol-package",{fontCharacter:"\\ea8b"}),n.symbolNamespace=new n("symbol-namespace",{fontCharacter:"\\ea8b"}),n.symbolObject=new n("symbol-object",{fontCharacter:"\\ea8b"}),n.symbolMethod=new n("symbol-method",{fontCharacter:"\\ea8c"}),n.symbolFunction=new n("symbol-function",{fontCharacter:"\\ea8c"}),n.symbolConstructor=new n("symbol-constructor",{fontCharacter:"\\ea8c"}),n.symbolBoolean=new n("symbol-boolean",{fontCharacter:"\\ea8f"}),n.symbolNull=new n("symbol-null",{fontCharacter:"\\ea8f"}),n.symbolNumeric=new n("symbol-numeric",{fontCharacter:"\\ea90"}),n.symbolNumber=new n("symbol-number",{fontCharacter:"\\ea90"}),n.symbolStructure=new n("symbol-structure",{fontCharacter:"\\ea91"}),n.symbolStruct=new n("symbol-struct",{fontCharacter:"\\ea91"}),n.symbolParameter=new n("symbol-parameter",{fontCharacter:"\\ea92"}),n.symbolTypeParameter=new n("symbol-type-parameter",{fontCharacter:"\\ea92"}),n.symbolKey=new n("symbol-key",{fontCharacter:"\\ea93"}),n.symbolText=new n("symbol-text",{fontCharacter:"\\ea93"}),n.symbolReference=new n("symbol-reference",{fontCharacter:"\\ea94"}),n.goToFile=new n("go-to-file",{fontCharacter:"\\ea94"}),n.symbolEnum=new n("symbol-enum",{fontCharacter:"\\ea95"}),n.symbolValue=new n("symbol-value",{fontCharacter:"\\ea95"}),n.symbolRuler=new n("symbol-ruler",{fontCharacter:"\\ea96"}),n.symbolUnit=new n("symbol-unit",{fontCharacter:"\\ea96"}),n.activateBreakpoints=new n("activate-breakpoints",{fontCharacter:"\\ea97"}),n.archive=new n("archive",{fontCharacter:"\\ea98"}),n.arrowBoth=new n("arrow-both",{fontCharacter:"\\ea99"}),n.arrowDown=new n("arrow-down",{fontCharacter:"\\ea9a"}),n.arrowLeft=new n("arrow-left",{fontCharacter:"\\ea9b"}),n.arrowRight=new n("arrow-right",{fontCharacter:"\\ea9c"}),n.arrowSmallDown=new n("arrow-small-down",{fontCharacter:"\\ea9d"}),n.arrowSmallLeft=new n("arrow-small-left",{fontCharacter:"\\ea9e"}),n.arrowSmallRight=new n("arrow-small-right",{fontCharacter:"\\ea9f"}),n.arrowSmallUp=new n("arrow-small-up",{fontCharacter:"\\eaa0"}),n.arrowUp=new n("arrow-up",{fontCharacter:"\\eaa1"}),n.bell=new n("bell",{fontCharacter:"\\eaa2"}),n.bold=new n("bold",{fontCharacter:"\\eaa3"}),n.book=new n("book",{fontCharacter:"\\eaa4"}),n.bookmark=new n("bookmark",{fontCharacter:"\\eaa5"}),n.debugBreakpointConditionalUnverified=new n("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),n.debugBreakpointConditional=new n("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),n.debugBreakpointConditionalDisabled=new n("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),n.debugBreakpointDataUnverified=new n("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),n.debugBreakpointData=new n("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),n.debugBreakpointDataDisabled=new n("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),n.debugBreakpointLogUnverified=new n("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),n.debugBreakpointLog=new n("debug-breakpoint-log",{fontCharacter:"\\eaab"}),n.debugBreakpointLogDisabled=new n("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),n.briefcase=new n("briefcase",{fontCharacter:"\\eaac"}),n.broadcast=new n("broadcast",{fontCharacter:"\\eaad"}),n.browser=new n("browser",{fontCharacter:"\\eaae"}),n.bug=new n("bug",{fontCharacter:"\\eaaf"}),n.calendar=new n("calendar",{fontCharacter:"\\eab0"}),n.caseSensitive=new n("case-sensitive",{fontCharacter:"\\eab1"}),n.check=new n("check",{fontCharacter:"\\eab2"}),n.checklist=new n("checklist",{fontCharacter:"\\eab3"}),n.chevronDown=new n("chevron-down",{fontCharacter:"\\eab4"}),n.dropDownButton=new n("drop-down-button",n.chevronDown.definition),n.chevronLeft=new n("chevron-left",{fontCharacter:"\\eab5"}),n.chevronRight=new n("chevron-right",{fontCharacter:"\\eab6"}),n.chevronUp=new n("chevron-up",{fontCharacter:"\\eab7"}),n.chromeClose=new n("chrome-close",{fontCharacter:"\\eab8"}),n.chromeMaximize=new n("chrome-maximize",{fontCharacter:"\\eab9"}),n.chromeMinimize=new n("chrome-minimize",{fontCharacter:"\\eaba"}),n.chromeRestore=new n("chrome-restore",{fontCharacter:"\\eabb"}),n.circleOutline=new n("circle-outline",{fontCharacter:"\\eabc"}),n.debugBreakpointUnverified=new n("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),n.circleSlash=new n("circle-slash",{fontCharacter:"\\eabd"}),n.circuitBoard=new n("circuit-board",{fontCharacter:"\\eabe"}),n.clearAll=new n("clear-all",{fontCharacter:"\\eabf"}),n.clippy=new n("clippy",{fontCharacter:"\\eac0"}),n.closeAll=new n("close-all",{fontCharacter:"\\eac1"}),n.cloudDownload=new n("cloud-download",{fontCharacter:"\\eac2"}),n.cloudUpload=new n("cloud-upload",{fontCharacter:"\\eac3"}),n.code=new n("code",{fontCharacter:"\\eac4"}),n.collapseAll=new n("collapse-all",{fontCharacter:"\\eac5"}),n.colorMode=new n("color-mode",{fontCharacter:"\\eac6"}),n.commentDiscussion=new n("comment-discussion",{fontCharacter:"\\eac7"}),n.compareChanges=new n("compare-changes",{fontCharacter:"\\eafd"}),n.creditCard=new n("credit-card",{fontCharacter:"\\eac9"}),n.dash=new n("dash",{fontCharacter:"\\eacc"}),n.dashboard=new n("dashboard",{fontCharacter:"\\eacd"}),n.database=new n("database",{fontCharacter:"\\eace"}),n.debugContinue=new n("debug-continue",{fontCharacter:"\\eacf"}),n.debugDisconnect=new n("debug-disconnect",{fontCharacter:"\\ead0"}),n.debugPause=new n("debug-pause",{fontCharacter:"\\ead1"}),n.debugRestart=new n("debug-restart",{fontCharacter:"\\ead2"}),n.debugStart=new n("debug-start",{fontCharacter:"\\ead3"}),n.debugStepInto=new n("debug-step-into",{fontCharacter:"\\ead4"}),n.debugStepOut=new n("debug-step-out",{fontCharacter:"\\ead5"}),n.debugStepOver=new n("debug-step-over",{fontCharacter:"\\ead6"}),n.debugStop=new n("debug-stop",{fontCharacter:"\\ead7"}),n.debug=new n("debug",{fontCharacter:"\\ead8"}),n.deviceCameraVideo=new n("device-camera-video",{fontCharacter:"\\ead9"}),n.deviceCamera=new n("device-camera",{fontCharacter:"\\eada"}),n.deviceMobile=new n("device-mobile",{fontCharacter:"\\eadb"}),n.diffAdded=new n("diff-added",{fontCharacter:"\\eadc"}),n.diffIgnored=new n("diff-ignored",{fontCharacter:"\\eadd"}),n.diffModified=new n("diff-modified",{fontCharacter:"\\eade"}),n.diffRemoved=new n("diff-removed",{fontCharacter:"\\eadf"}),n.diffRenamed=new n("diff-renamed",{fontCharacter:"\\eae0"}),n.diff=new n("diff",{fontCharacter:"\\eae1"}),n.discard=new n("discard",{fontCharacter:"\\eae2"}),n.editorLayout=new n("editor-layout",{fontCharacter:"\\eae3"}),n.emptyWindow=new n("empty-window",{fontCharacter:"\\eae4"}),n.exclude=new n("exclude",{fontCharacter:"\\eae5"}),n.extensions=new n("extensions",{fontCharacter:"\\eae6"}),n.eyeClosed=new n("eye-closed",{fontCharacter:"\\eae7"}),n.fileBinary=new n("file-binary",{fontCharacter:"\\eae8"}),n.fileCode=new n("file-code",{fontCharacter:"\\eae9"}),n.fileMedia=new n("file-media",{fontCharacter:"\\eaea"}),n.filePdf=new n("file-pdf",{fontCharacter:"\\eaeb"}),n.fileSubmodule=new n("file-submodule",{fontCharacter:"\\eaec"}),n.fileSymlinkDirectory=new n("file-symlink-directory",{fontCharacter:"\\eaed"}),n.fileSymlinkFile=new n("file-symlink-file",{fontCharacter:"\\eaee"}),n.fileZip=new n("file-zip",{fontCharacter:"\\eaef"}),n.files=new n("files",{fontCharacter:"\\eaf0"}),n.filter=new n("filter",{fontCharacter:"\\eaf1"}),n.flame=new n("flame",{fontCharacter:"\\eaf2"}),n.foldDown=new n("fold-down",{fontCharacter:"\\eaf3"}),n.foldUp=new n("fold-up",{fontCharacter:"\\eaf4"}),n.fold=new n("fold",{fontCharacter:"\\eaf5"}),n.folderActive=new n("folder-active",{fontCharacter:"\\eaf6"}),n.folderOpened=new n("folder-opened",{fontCharacter:"\\eaf7"}),n.gear=new n("gear",{fontCharacter:"\\eaf8"}),n.gift=new n("gift",{fontCharacter:"\\eaf9"}),n.gistSecret=new n("gist-secret",{fontCharacter:"\\eafa"}),n.gist=new n("gist",{fontCharacter:"\\eafb"}),n.gitCommit=new n("git-commit",{fontCharacter:"\\eafc"}),n.gitCompare=new n("git-compare",{fontCharacter:"\\eafd"}),n.gitMerge=new n("git-merge",{fontCharacter:"\\eafe"}),n.githubAction=new n("github-action",{fontCharacter:"\\eaff"}),n.githubAlt=new n("github-alt",{fontCharacter:"\\eb00"}),n.globe=new n("globe",{fontCharacter:"\\eb01"}),n.grabber=new n("grabber",{fontCharacter:"\\eb02"}),n.graph=new n("graph",{fontCharacter:"\\eb03"}),n.gripper=new n("gripper",{fontCharacter:"\\eb04"}),n.heart=new n("heart",{fontCharacter:"\\eb05"}),n.home=new n("home",{fontCharacter:"\\eb06"}),n.horizontalRule=new n("horizontal-rule",{fontCharacter:"\\eb07"}),n.hubot=new n("hubot",{fontCharacter:"\\eb08"}),n.inbox=new n("inbox",{fontCharacter:"\\eb09"}),n.issueClosed=new n("issue-closed",{fontCharacter:"\\eba4"}),n.issueReopened=new n("issue-reopened",{fontCharacter:"\\eb0b"}),n.issues=new n("issues",{fontCharacter:"\\eb0c"}),n.italic=new n("italic",{fontCharacter:"\\eb0d"}),n.jersey=new n("jersey",{fontCharacter:"\\eb0e"}),n.json=new n("json",{fontCharacter:"\\eb0f"}),n.kebabVertical=new n("kebab-vertical",{fontCharacter:"\\eb10"}),n.key=new n("key",{fontCharacter:"\\eb11"}),n.law=new n("law",{fontCharacter:"\\eb12"}),n.lightbulbAutofix=new n("lightbulb-autofix",{fontCharacter:"\\eb13"}),n.linkExternal=new n("link-external",{fontCharacter:"\\eb14"}),n.link=new n("link",{fontCharacter:"\\eb15"}),n.listOrdered=new n("list-ordered",{fontCharacter:"\\eb16"}),n.listUnordered=new n("list-unordered",{fontCharacter:"\\eb17"}),n.liveShare=new n("live-share",{fontCharacter:"\\eb18"}),n.loading=new n("loading",{fontCharacter:"\\eb19"}),n.location=new n("location",{fontCharacter:"\\eb1a"}),n.mailRead=new n("mail-read",{fontCharacter:"\\eb1b"}),n.mail=new n("mail",{fontCharacter:"\\eb1c"}),n.markdown=new n("markdown",{fontCharacter:"\\eb1d"}),n.megaphone=new n("megaphone",{fontCharacter:"\\eb1e"}),n.mention=new n("mention",{fontCharacter:"\\eb1f"}),n.milestone=new n("milestone",{fontCharacter:"\\eb20"}),n.mortarBoard=new n("mortar-board",{fontCharacter:"\\eb21"}),n.move=new n("move",{fontCharacter:"\\eb22"}),n.multipleWindows=new n("multiple-windows",{fontCharacter:"\\eb23"}),n.mute=new n("mute",{fontCharacter:"\\eb24"}),n.noNewline=new n("no-newline",{fontCharacter:"\\eb25"}),n.note=new n("note",{fontCharacter:"\\eb26"}),n.octoface=new n("octoface",{fontCharacter:"\\eb27"}),n.openPreview=new n("open-preview",{fontCharacter:"\\eb28"}),n.package_=new n("package",{fontCharacter:"\\eb29"}),n.paintcan=new n("paintcan",{fontCharacter:"\\eb2a"}),n.pin=new n("pin",{fontCharacter:"\\eb2b"}),n.play=new n("play",{fontCharacter:"\\eb2c"}),n.run=new n("run",{fontCharacter:"\\eb2c"}),n.plug=new n("plug",{fontCharacter:"\\eb2d"}),n.preserveCase=new n("preserve-case",{fontCharacter:"\\eb2e"}),n.preview=new n("preview",{fontCharacter:"\\eb2f"}),n.project=new n("project",{fontCharacter:"\\eb30"}),n.pulse=new n("pulse",{fontCharacter:"\\eb31"}),n.question=new n("question",{fontCharacter:"\\eb32"}),n.quote=new n("quote",{fontCharacter:"\\eb33"}),n.radioTower=new n("radio-tower",{fontCharacter:"\\eb34"}),n.reactions=new n("reactions",{fontCharacter:"\\eb35"}),n.references=new n("references",{fontCharacter:"\\eb36"}),n.refresh=new n("refresh",{fontCharacter:"\\eb37"}),n.regex=new n("regex",{fontCharacter:"\\eb38"}),n.remoteExplorer=new n("remote-explorer",{fontCharacter:"\\eb39"}),n.remote=new n("remote",{fontCharacter:"\\eb3a"}),n.remove=new n("remove",{fontCharacter:"\\eb3b"}),n.replaceAll=new n("replace-all",{fontCharacter:"\\eb3c"}),n.replace=new n("replace",{fontCharacter:"\\eb3d"}),n.repoClone=new n("repo-clone",{fontCharacter:"\\eb3e"}),n.repoForcePush=new n("repo-force-push",{fontCharacter:"\\eb3f"}),n.repoPull=new n("repo-pull",{fontCharacter:"\\eb40"}),n.repoPush=new n("repo-push",{fontCharacter:"\\eb41"}),n.report=new n("report",{fontCharacter:"\\eb42"}),n.requestChanges=new n("request-changes",{fontCharacter:"\\eb43"}),n.rocket=new n("rocket",{fontCharacter:"\\eb44"}),n.rootFolderOpened=new n("root-folder-opened",{fontCharacter:"\\eb45"}),n.rootFolder=new n("root-folder",{fontCharacter:"\\eb46"}),n.rss=new n("rss",{fontCharacter:"\\eb47"}),n.ruby=new n("ruby",{fontCharacter:"\\eb48"}),n.saveAll=new n("save-all",{fontCharacter:"\\eb49"}),n.saveAs=new n("save-as",{fontCharacter:"\\eb4a"}),n.save=new n("save",{fontCharacter:"\\eb4b"}),n.screenFull=new n("screen-full",{fontCharacter:"\\eb4c"}),n.screenNormal=new n("screen-normal",{fontCharacter:"\\eb4d"}),n.searchStop=new n("search-stop",{fontCharacter:"\\eb4e"}),n.server=new n("server",{fontCharacter:"\\eb50"}),n.settingsGear=new n("settings-gear",{fontCharacter:"\\eb51"}),n.settings=new n("settings",{fontCharacter:"\\eb52"}),n.shield=new n("shield",{fontCharacter:"\\eb53"}),n.smiley=new n("smiley",{fontCharacter:"\\eb54"}),n.sortPrecedence=new n("sort-precedence",{fontCharacter:"\\eb55"}),n.splitHorizontal=new n("split-horizontal",{fontCharacter:"\\eb56"}),n.splitVertical=new n("split-vertical",{fontCharacter:"\\eb57"}),n.squirrel=new n("squirrel",{fontCharacter:"\\eb58"}),n.starFull=new n("star-full",{fontCharacter:"\\eb59"}),n.starHalf=new n("star-half",{fontCharacter:"\\eb5a"}),n.symbolClass=new n("symbol-class",{fontCharacter:"\\eb5b"}),n.symbolColor=new n("symbol-color",{fontCharacter:"\\eb5c"}),n.symbolConstant=new n("symbol-constant",{fontCharacter:"\\eb5d"}),n.symbolEnumMember=new n("symbol-enum-member",{fontCharacter:"\\eb5e"}),n.symbolField=new n("symbol-field",{fontCharacter:"\\eb5f"}),n.symbolFile=new n("symbol-file",{fontCharacter:"\\eb60"}),n.symbolInterface=new n("symbol-interface",{fontCharacter:"\\eb61"}),n.symbolKeyword=new n("symbol-keyword",{fontCharacter:"\\eb62"}),n.symbolMisc=new n("symbol-misc",{fontCharacter:"\\eb63"}),n.symbolOperator=new n("symbol-operator",{fontCharacter:"\\eb64"}),n.symbolProperty=new n("symbol-property",{fontCharacter:"\\eb65"}),n.wrench=new n("wrench",{fontCharacter:"\\eb65"}),n.wrenchSubaction=new n("wrench-subaction",{fontCharacter:"\\eb65"}),n.symbolSnippet=new n("symbol-snippet",{fontCharacter:"\\eb66"}),n.tasklist=new n("tasklist",{fontCharacter:"\\eb67"}),n.telescope=new n("telescope",{fontCharacter:"\\eb68"}),n.textSize=new n("text-size",{fontCharacter:"\\eb69"}),n.threeBars=new n("three-bars",{fontCharacter:"\\eb6a"}),n.thumbsdown=new n("thumbsdown",{fontCharacter:"\\eb6b"}),n.thumbsup=new n("thumbsup",{fontCharacter:"\\eb6c"}),n.tools=new n("tools",{fontCharacter:"\\eb6d"}),n.triangleDown=new n("triangle-down",{fontCharacter:"\\eb6e"}),n.triangleLeft=new n("triangle-left",{fontCharacter:"\\eb6f"}),n.triangleRight=new n("triangle-right",{fontCharacter:"\\eb70"}),n.triangleUp=new n("triangle-up",{fontCharacter:"\\eb71"}),n.twitter=new n("twitter",{fontCharacter:"\\eb72"}),n.unfold=new n("unfold",{fontCharacter:"\\eb73"}),n.unlock=new n("unlock",{fontCharacter:"\\eb74"}),n.unmute=new n("unmute",{fontCharacter:"\\eb75"}),n.unverified=new n("unverified",{fontCharacter:"\\eb76"}),n.verified=new n("verified",{fontCharacter:"\\eb77"}),n.versions=new n("versions",{fontCharacter:"\\eb78"}),n.vmActive=new n("vm-active",{fontCharacter:"\\eb79"}),n.vmOutline=new n("vm-outline",{fontCharacter:"\\eb7a"}),n.vmRunning=new n("vm-running",{fontCharacter:"\\eb7b"}),n.watch=new n("watch",{fontCharacter:"\\eb7c"}),n.whitespace=new n("whitespace",{fontCharacter:"\\eb7d"}),n.wholeWord=new n("whole-word",{fontCharacter:"\\eb7e"}),n.window=new n("window",{fontCharacter:"\\eb7f"}),n.wordWrap=new n("word-wrap",{fontCharacter:"\\eb80"}),n.zoomIn=new n("zoom-in",{fontCharacter:"\\eb81"}),n.zoomOut=new n("zoom-out",{fontCharacter:"\\eb82"}),n.listFilter=new n("list-filter",{fontCharacter:"\\eb83"}),n.listFlat=new n("list-flat",{fontCharacter:"\\eb84"}),n.listSelection=new n("list-selection",{fontCharacter:"\\eb85"}),n.selection=new n("selection",{fontCharacter:"\\eb85"}),n.listTree=new n("list-tree",{fontCharacter:"\\eb86"}),n.debugBreakpointFunctionUnverified=new n("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),n.debugBreakpointFunction=new n("debug-breakpoint-function",{fontCharacter:"\\eb88"}),n.debugBreakpointFunctionDisabled=new n("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),n.debugStackframeActive=new n("debug-stackframe-active",{fontCharacter:"\\eb89"}),n.debugStackframeDot=new n("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),n.debugStackframe=new n("debug-stackframe",{fontCharacter:"\\eb8b"}),n.debugStackframeFocused=new n("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),n.debugBreakpointUnsupported=new n("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),n.symbolString=new n("symbol-string",{fontCharacter:"\\eb8d"}),n.debugReverseContinue=new n("debug-reverse-continue",{fontCharacter:"\\eb8e"}),n.debugStepBack=new n("debug-step-back",{fontCharacter:"\\eb8f"}),n.debugRestartFrame=new n("debug-restart-frame",{fontCharacter:"\\eb90"}),n.callIncoming=new n("call-incoming",{fontCharacter:"\\eb92"}),n.callOutgoing=new n("call-outgoing",{fontCharacter:"\\eb93"}),n.menu=new n("menu",{fontCharacter:"\\eb94"}),n.expandAll=new n("expand-all",{fontCharacter:"\\eb95"}),n.feedback=new n("feedback",{fontCharacter:"\\eb96"}),n.groupByRefType=new n("group-by-ref-type",{fontCharacter:"\\eb97"}),n.ungroupByRefType=new n("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),n.account=new n("account",{fontCharacter:"\\eb99"}),n.bellDot=new n("bell-dot",{fontCharacter:"\\eb9a"}),n.debugConsole=new n("debug-console",{fontCharacter:"\\eb9b"}),n.library=new n("library",{fontCharacter:"\\eb9c"}),n.output=new n("output",{fontCharacter:"\\eb9d"}),n.runAll=new n("run-all",{fontCharacter:"\\eb9e"}),n.syncIgnored=new n("sync-ignored",{fontCharacter:"\\eb9f"}),n.pinned=new n("pinned",{fontCharacter:"\\eba0"}),n.githubInverted=new n("github-inverted",{fontCharacter:"\\eba1"}),n.debugAlt=new n("debug-alt",{fontCharacter:"\\eb91"}),n.serverProcess=new n("server-process",{fontCharacter:"\\eba2"}),n.serverEnvironment=new n("server-environment",{fontCharacter:"\\eba3"}),n.pass=new n("pass",{fontCharacter:"\\eba4"}),n.stopCircle=new n("stop-circle",{fontCharacter:"\\eba5"}),n.playCircle=new n("play-circle",{fontCharacter:"\\eba6"}),n.record=new n("record",{fontCharacter:"\\eba7"}),n.debugAltSmall=new n("debug-alt-small",{fontCharacter:"\\eba8"}),n.vmConnect=new n("vm-connect",{fontCharacter:"\\eba9"}),n.cloud=new n("cloud",{fontCharacter:"\\ebaa"}),n.merge=new n("merge",{fontCharacter:"\\ebab"}),n.exportIcon=new n("export",{fontCharacter:"\\ebac"}),n.graphLeft=new n("graph-left",{fontCharacter:"\\ebad"}),n.magnet=new n("magnet",{fontCharacter:"\\ebae"}),n.notebook=new n("notebook",{fontCharacter:"\\ebaf"}),n.redo=new n("redo",{fontCharacter:"\\ebb0"}),n.checkAll=new n("check-all",{fontCharacter:"\\ebb1"}),n.pinnedDirty=new n("pinned-dirty",{fontCharacter:"\\ebb2"}),n.passFilled=new n("pass-filled",{fontCharacter:"\\ebb3"}),n.circleLargeFilled=new n("circle-large-filled",{fontCharacter:"\\ebb4"}),n.circleLargeOutline=new n("circle-large-outline",{fontCharacter:"\\ebb5"}),n.combine=new n("combine",{fontCharacter:"\\ebb6"}),n.gather=new n("gather",{fontCharacter:"\\ebb6"}),n.table=new n("table",{fontCharacter:"\\ebb7"}),n.variableGroup=new n("variable-group",{fontCharacter:"\\ebb8"}),n.typeHierarchy=new n("type-hierarchy",{fontCharacter:"\\ebb9"}),n.typeHierarchySub=new n("type-hierarchy-sub",{fontCharacter:"\\ebba"}),n.typeHierarchySuper=new n("type-hierarchy-super",{fontCharacter:"\\ebbb"}),n.gitPullRequestCreate=new n("git-pull-request-create",{fontCharacter:"\\ebbc"}),n.runAbove=new n("run-above",{fontCharacter:"\\ebbd"}),n.runBelow=new n("run-below",{fontCharacter:"\\ebbe"}),n.notebookTemplate=new n("notebook-template",{fontCharacter:"\\ebbf"}),n.debugRerun=new n("debug-rerun",{fontCharacter:"\\ebc0"}),n.workspaceTrusted=new n("workspace-trusted",{fontCharacter:"\\ebc1"}),n.workspaceUntrusted=new n("workspace-untrusted",{fontCharacter:"\\ebc2"}),n.workspaceUnspecified=new n("workspace-unspecified",{fontCharacter:"\\ebc3"}),n.terminalCmd=new n("terminal-cmd",{fontCharacter:"\\ebc4"}),n.terminalDebian=new n("terminal-debian",{fontCharacter:"\\ebc5"}),n.terminalLinux=new n("terminal-linux",{fontCharacter:"\\ebc6"}),n.terminalPowershell=new n("terminal-powershell",{fontCharacter:"\\ebc7"}),n.terminalTmux=new n("terminal-tmux",{fontCharacter:"\\ebc8"}),n.terminalUbuntu=new n("terminal-ubuntu",{fontCharacter:"\\ebc9"}),n.terminalBash=new n("terminal-bash",{fontCharacter:"\\ebca"}),n.arrowSwap=new n("arrow-swap",{fontCharacter:"\\ebcb"}),n.copy=new n("copy",{fontCharacter:"\\ebcc"}),n.personAdd=new n("person-add",{fontCharacter:"\\ebcd"}),n.filterFilled=new n("filter-filled",{fontCharacter:"\\ebce"}),n.wand=new n("wand",{fontCharacter:"\\ebcf"}),n.debugLineByLine=new n("debug-line-by-line",{fontCharacter:"\\ebd0"}),n.inspect=new n("inspect",{fontCharacter:"\\ebd1"}),n.layers=new n("layers",{fontCharacter:"\\ebd2"}),n.layersDot=new n("layers-dot",{fontCharacter:"\\ebd3"}),n.layersActive=new n("layers-active",{fontCharacter:"\\ebd4"}),n.compass=new n("compass",{fontCharacter:"\\ebd5"}),n.compassDot=new n("compass-dot",{fontCharacter:"\\ebd6"}),n.compassActive=new n("compass-active",{fontCharacter:"\\ebd7"}),n.azure=new n("azure",{fontCharacter:"\\ebd8"}),n.issueDraft=new n("issue-draft",{fontCharacter:"\\ebd9"}),n.gitPullRequestClosed=new n("git-pull-request-closed",{fontCharacter:"\\ebda"}),n.gitPullRequestDraft=new n("git-pull-request-draft",{fontCharacter:"\\ebdb"}),n.debugAll=new n("debug-all",{fontCharacter:"\\ebdc"}),n.debugCoverage=new n("debug-coverage",{fontCharacter:"\\ebdd"}),n.runErrors=new n("run-errors",{fontCharacter:"\\ebde"}),n.folderLibrary=new n("folder-library",{fontCharacter:"\\ebdf"}),n.debugContinueSmall=new n("debug-continue-small",{fontCharacter:"\\ebe0"}),n.beakerStop=new n("beaker-stop",{fontCharacter:"\\ebe1"}),n.graphLine=new n("graph-line",{fontCharacter:"\\ebe2"}),n.graphScatter=new n("graph-scatter",{fontCharacter:"\\ebe3"}),n.pieChart=new n("pie-chart",{fontCharacter:"\\ebe4"}),n.bracket=new n("bracket",n.json.definition),n.bracketDot=new n("bracket-dot",{fontCharacter:"\\ebe5"}),n.bracketError=new n("bracket-error",{fontCharacter:"\\ebe6"}),n.lockSmall=new n("lock-small",{fontCharacter:"\\ebe7"}),n.azureDevops=new n("azure-devops",{fontCharacter:"\\ebe8"}),n.verifiedFilled=new n("verified-filled",{fontCharacter:"\\ebe9"})}(K||(K={}))},"VrN/":function(We,se,B){(function(Z,G){We.exports=G()})(this,function(){"use strict";var Z=navigator.userAgent,G=navigator.platform,U=/gecko\/\d/i.test(Z),V=/MSIE \d/.test(Z),W=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Z),M=/Edge\/(\d+)/.exec(Z),K=V||W||M,j=K&&(V?document.documentMode||6:+(M||W)[1]),n=!M&&/WebKit\//.test(Z),w=n&&/Qt\/\d+\.\d+/.test(Z),m=!M&&/Chrome\//.test(Z),f=/Opera\//.test(Z),p=/Apple Computer/.test(navigator.vendor),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Z),r=/PhantomJS/.test(Z),d=!M&&/AppleWebKit/.test(Z)&&/Mobile\/\w+/.test(Z),u=/Android/.test(Z),o=d||u||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Z),s=d||/Mac/.test(G),a=/\bCrOS\b/.test(Z),R=/win/i.test(G),O=f&&Z.match(/Version\/(\d*\.\d*)/);O&&(O=Number(O[1])),O&&O>=15&&(f=!1,n=!0);var S=s&&(w||f&&(O==null||O<12.11)),D=U||K&&j>=9;function I(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _=function(e,t){var l=e.className,i=I(t).exec(l);if(i){var E=l.slice(i.index+i[0].length);e.className=l.slice(0,i.index)+(E?i[1]+E:"")}};function b(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function v(e,t){return b(e).appendChild(t)}function h(e,t,l,i){var E=document.createElement(e);if(l&&(E.className=l),i&&(E.style.cssText=i),typeof t=="string")E.appendChild(document.createTextNode(t));else if(t)for(var H=0;H<t.length;++H)E.appendChild(t[H]);return E}function C(e,t,l,i){var E=h(e,t,l,i);return E.setAttribute("role","presentation"),E}var x;document.createRange?x=function(e,t,l,i){var E=document.createRange();return E.setEnd(i||e,l),E.setStart(e,t),E}:x=function(e,t,l){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(E){return i}return i.collapse(!0),i.moveEnd("character",l),i.moveStart("character",t),i};function g(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function P(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function k(e,t){var l=e.className;I(t).test(l)||(e.className+=(l?" ":"")+t)}function y(e,t){for(var l=e.split(" "),i=0;i<l.length;i++)l[i]&&!I(l[i]).test(t)&&(t+=" "+l[i]);return t}var A=function(e){e.select()};d?A=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:K&&(A=function(e){try{e.select()}catch(t){}});function F(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function T(e,t,l){t||(t={});for(var i in e)e.hasOwnProperty(i)&&(l!==!1||!t.hasOwnProperty(i))&&(t[i]=e[i]);return t}function Y(e,t,l,i,E){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var H=i||0,J=E||0;;){var q=e.indexOf(" ",H);if(q<0||q>=t)return J+(t-H);J+=q-H,J+=l-J%l,H=q+1}}var $=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};$.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},$.prototype.set=function(e,t){this.f=t;var l=+new Date+e;(!this.id||l<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=l)};function le(e,t){for(var l=0;l<e.length;++l)if(e[l]==t)return l;return-1}var de=50,Pe={toString:function(){return"CodeMirror.Pass"}},Se={scroll:!1},we={origin:"*mouse"},Fe={origin:"+move"};function Me(e,t,l){for(var i=0,E=0;;){var H=e.indexOf(" ",i);H==-1&&(H=e.length);var J=H-i;if(H==e.length||E+J>=t)return i+Math.min(J,t-E);if(E+=H-i,E+=l-E%l,i=H+1,E>=t)return i}}var me=[""];function pe(e){for(;me.length<=e;)me.push(ne(me)+" ");return me[e]}function ne(e){return e[e.length-1]}function Ee(e,t){for(var l=[],i=0;i<e.length;i++)l[i]=t(e[i],i);return l}function ae(e,t,l){for(var i=0,E=l(t);i<e.length&&l(e[i])<=E;)i++;e.splice(i,0,t)}function ke(){}function je(e,t){var l;return Object.create?l=Object.create(e):(ke.prototype=e,l=new ke),t&&T(t,l),l}var Oe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ve(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Oe.test(e))}function qe(e,t){return t?t.source.indexOf("\\w")>-1&&Ve(e)?!0:t.test(e):Ve(e)}function ue(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ve=/[\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 De(e){return e.charCodeAt(0)>=768&&ve.test(e)}function Ne(e,t,l){for(;(l<0?t>0:t<e.length)&&De(e.charAt(t));)t+=l;return t}function it(e,t,l){for(var i=t>l?-1:1;;){if(t==l)return t;var E=(t+l)/2,H=i<0?Math.ceil(E):Math.floor(E);if(H==t)return e(H)?t:l;e(H)?l=H:t=H+i}}function pt(e,t,l,i){if(!e)return i(t,l,"ltr",0);for(var E=!1,H=0;H<e.length;++H){var J=e[H];(J.from<l&&J.to>t||t==l&&J.to==t)&&(i(Math.max(J.from,t),Math.min(J.to,l),J.level==1?"rtl":"ltr",H),E=!0)}E||i(t,l,"ltr")}var mt=null;function dt(e,t,l){var i;mt=null;for(var E=0;E<e.length;++E){var H=e[E];if(H.from<t&&H.to>t)return E;H.to==t&&(H.from!=H.to&&l=="before"?i=E:mt=E),H.from==t&&(H.from!=H.to&&l!="before"?i=E:mt=E)}return i!=null?i:mt}var Tt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function l(re){return re<=247?e.charAt(re):1424<=re&&re<=1524?"R":1536<=re&&re<=1785?t.charAt(re-1536):1774<=re&&re<=2220?"r":8192<=re&&re<=8203?"w":re==8204?"b":"L"}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,H=/[LRr]/,J=/[Lb1n]/,q=/[1n]/;function ee(re,_e,Le){this.level=re,this.from=_e,this.to=Le}return function(re,_e){var Le=_e=="ltr"?"L":"R";if(re.length==0||_e=="ltr"&&!i.test(re))return!1;for(var Qe=re.length,ze=[],ft=0;ft<Qe;++ft)ze.push(l(re.charCodeAt(ft)));for(var xt=0,It=Le;xt<Qe;++xt){var Bt=ze[xt];Bt=="m"?ze[xt]=It:It=Bt}for(var Kt=0,Ft=Le;Kt<Qe;++Kt){var Xt=ze[Kt];Xt=="1"&&Ft=="r"?ze[Kt]="n":H.test(Xt)&&(Ft=Xt,Xt=="r"&&(ze[Kt]="R"))}for(var ln=1,an=ze[0];ln<Qe-1;++ln){var bn=ze[ln];bn=="+"&&an=="1"&&ze[ln+1]=="1"?ze[ln]="1":bn==","&&an==ze[ln+1]&&(an=="1"||an=="n")&&(ze[ln]=an),an=bn}for(var Wn=0;Wn<Qe;++Wn){var lr=ze[Wn];if(lr==",")ze[Wn]="N";else if(lr=="%"){var Jn=void 0;for(Jn=Wn+1;Jn<Qe&&ze[Jn]=="%";++Jn);for(var Hr=Wn&&ze[Wn-1]=="!"||Jn<Qe&&ze[Jn]=="1"?"1":"N",Dr=Wn;Dr<Jn;++Dr)ze[Dr]=Hr;Wn=Jn-1}}for(var rr=0,Lr=Le;rr<Qe;++rr){var pr=ze[rr];Lr=="L"&&pr=="1"?ze[rr]="L":H.test(pr)&&(Lr=pr)}for(var sr=0;sr<Qe;++sr)if(E.test(ze[sr])){var ir=void 0;for(ir=sr+1;ir<Qe&&E.test(ze[ir]);++ir);for(var qn=(sr?ze[sr-1]:Le)=="L",Mr=(ir<Qe?ze[ir]:Le)=="L",Ca=qn==Mr?qn?"L":"R":Le,Ni=sr;Ni<ir;++Ni)ze[Ni]=Ca;sr=ir-1}for(var br=[],mi,ur=0;ur<Qe;)if(J.test(ze[ur])){var co=ur;for(++ur;ur<Qe&&J.test(ze[ur]);++ur);br.push(new ee(0,co,ur))}else{var Ci=ur,qi=br.length,$i=_e=="rtl"?1:0;for(++ur;ur<Qe&&ze[ur]!="L";++ur);for(var Ar=Ci;Ar<ur;)if(q.test(ze[Ar])){Ci<Ar&&(br.splice(qi,0,new ee(1,Ci,Ar)),qi+=$i);var Oa=Ar;for(++Ar;Ar<ur&&q.test(ze[Ar]);++Ar);br.splice(qi,0,new ee(2,Oa,Ar)),qi+=$i,Ci=Ar}else++Ar;Ci<ur&&br.splice(qi,0,new ee(1,Ci,ur))}return _e=="ltr"&&(br[0].level==1&&(mi=re.match(/^\s+/))&&(br[0].from=mi[0].length,br.unshift(new ee(0,0,mi[0].length))),ne(br).level==1&&(mi=re.match(/\s+$/))&&(ne(br).to-=mi[0].length,br.push(new ee(0,Qe-mi[0].length,Qe)))),_e=="rtl"?br.reverse():br}}();function St(e,t){var l=e.order;return l==null&&(l=e.order=Tt(e.text,t)),l}var Ue=[],Ie=function(e,t,l){if(e.addEventListener)e.addEventListener(t,l,!1);else if(e.attachEvent)e.attachEvent("on"+t,l);else{var i=e._handlers||(e._handlers={});i[t]=(i[t]||Ue).concat(l)}};function tt(e,t){return e._handlers&&e._handlers[t]||Ue}function lt(e,t,l){if(e.removeEventListener)e.removeEventListener(t,l,!1);else if(e.detachEvent)e.detachEvent("on"+t,l);else{var i=e._handlers,E=i&&i[t];if(E){var H=le(E,l);H>-1&&(i[t]=E.slice(0,H).concat(E.slice(H+1)))}}}function Ke(e,t){var l=tt(e,t);if(!l.length)return;for(var i=Array.prototype.slice.call(arguments,2),E=0;E<l.length;++E)l[E].apply(null,i)}function Xe(e,t,l){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ke(e,l||t.type,e,t),fe(t)||t.codemirrorIgnore}function Ce(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var l=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),i=0;i<t.length;++i)le(l,t[i])==-1&&l.push(t[i])}function ge(e,t){return tt(e,t).length>0}function be(e){e.prototype.on=function(t,l){Ie(this,t,l)},e.prototype.off=function(t,l){lt(this,t,l)}}function ie(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function oe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function fe(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ye(e){ie(e),oe(e)}function Ae(e){return e.target||e.srcElement}function Ge(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),s&&e.ctrlKey&&t==1&&(t=3),t}var ot=function(){if(K&&j<9)return!1;var e=h("div");return"draggable"in e||"dragDrop"in e}(),wt;function Dt(e){if(wt==null){var t=h("span","\u200B");v(e,h("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(wt=t.offsetWidth<=1&&t.offsetHeight>2&&!(K&&j<8))}var l=wt?h("span","\u200B"):h("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return l.setAttribute("cm-text",""),l}var At;function vt(e){if(At!=null)return At;var t=v(e,document.createTextNode("A\u062EA")),l=x(t,0,1).getBoundingClientRect(),i=x(t,1,2).getBoundingClientRect();return b(e),!l||l.left==l.right?!1:At=i.right-l.right<3}var $e=`
b`.split(/\n/).length!=3?function(e){for(var t=0,l=[],i=e.length;t<=i;){var E=e.indexOf(`
`,t);E==-1&&(E=e.length);var H=e.slice(t,e.charAt(E-1)=="\r"?E-1:E),J=H.indexOf("\r");J!=-1?(l.push(H.slice(0,J)),t+=J+1):(l.push(H),t=E+1)}return l}:function(e){return e.split(/\r\n?|\n/)},et=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(l){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ye=function(){var e=h("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),ce=null;function xe(e){if(ce!=null)return ce;var t=v(e,h("span","x")),l=t.getBoundingClientRect(),i=x(t,0,1).getBoundingClientRect();return ce=Math.abs(l.left-i.left)>1}var at={},Je={};function _t(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),at[e]=t}function yt(e,t){Je[e]=t}function Be(e){if(typeof e=="string"&&Je.hasOwnProperty(e))e=Je[e];else if(e&&typeof e.name=="string"&&Je.hasOwnProperty(e.name)){var t=Je[e.name];typeof t=="string"&&(t={name:t}),e=je(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Be("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Be("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Ze(e,t){t=Be(t);var l=at[t.name];if(!l)return Ze(e,"text/plain");var i=l(e,t);if(nt.hasOwnProperty(t.name)){var E=nt[t.name];for(var H in E){if(!E.hasOwnProperty(H))continue;i.hasOwnProperty(H)&&(i["_"+H]=i[H]),i[H]=E[H]}}if(i.name=t.name,t.helperType&&(i.helperType=t.helperType),t.modeProps)for(var J in t.modeProps)i[J]=t.modeProps[J];return i}var nt={};function ut(e,t){var l=nt.hasOwnProperty(e)?nt[e]:nt[e]={};T(t,l)}function Et(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var l={};for(var i in t){var E=t[i];E instanceof Array&&(E=E.concat([])),l[i]=E}return l}function st(e,t){for(var l;e.innerMode&&!(l=e.innerMode(t),!l||l.mode==e);)t=l.state,e=l.mode;return l||{mode:e,state:t}}function Ut(e,t,l){return e.startState?e.startState(t,l):!0}var Zt=function(e,t,l){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=l};Zt.prototype.eol=function(){return this.pos>=this.string.length},Zt.prototype.sol=function(){return this.pos==this.lineStart},Zt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Zt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Zt.prototype.eat=function(e){var t=this.string.charAt(this.pos),l;if(typeof e=="string"?l=t==e:l=t&&(e.test?e.test(t):e(t)),l)return++this.pos,t},Zt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Zt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Zt.prototype.skipToEnd=function(){this.pos=this.string.length},Zt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Zt.prototype.backUp=function(e){this.pos-=e},Zt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Y(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Y(this.string,this.lineStart,this.tabSize):0)},Zt.prototype.indentation=function(){return Y(this.string,null,this.tabSize)-(this.lineStart?Y(this.string,this.lineStart,this.tabSize):0)},Zt.prototype.match=function(e,t,l){if(typeof e=="string"){var i=function(J){return l?J.toLowerCase():J},E=this.string.substr(this.pos,e.length);if(i(E)==i(e))return t!==!1&&(this.pos+=e.length),!0}else{var H=this.string.slice(this.pos).match(e);return H&&H.index>0?null:(H&&t!==!1&&(this.pos+=H[0].length),H)}},Zt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Zt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Zt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Zt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Rt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var l=e;!l.lines;)for(var i=0;;++i){var E=l.children[i],H=E.chunkSize();if(t<H){l=E;break}t-=H}return l.lines[t]}function qt(e,t,l){var i=[],E=t.line;return e.iter(t.line,l.line+1,function(H){var J=H.text;E==l.line&&(J=J.slice(0,l.ch)),E==t.line&&(J=J.slice(t.ch)),i.push(J),++E}),i}function Qt(e,t,l){var i=[];return e.iter(t,l,function(E){i.push(E.text)}),i}function en(e,t){var l=t-e.height;if(l)for(var i=e;i;i=i.parent)i.height+=l}function Yt(e){if(e.parent==null)return null;for(var t=e.parent,l=le(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var E=0;!(i.children[E]==t);++E)l+=i.children[E].chunkSize();return l+t.first}function cn(e,t){var l=e.first;e:do{for(var i=0;i<e.children.length;++i){var E=e.children[i],H=E.height;if(t<H){e=E;continue e}t-=H,l+=E.chunkSize()}return l}while(!e.lines);for(var J=0;J<e.lines.length;++J){var q=e.lines[J],ee=q.height;if(t<ee)break;t-=ee}return l+J}function Sn(e,t){return t>=e.first&&t<e.first+e.size}function kn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function gt(e,t,l){if(l===void 0&&(l=null),!(this instanceof gt))return new gt(e,t,l);this.line=e,this.ch=t,this.sticky=l}function Wt(e,t){return e.line-t.line||e.ch-t.ch}function Jt(e,t){return e.sticky==t.sticky&&Wt(e,t)==0}function tn(e){return gt(e.line,e.ch)}function nn(e,t){return Wt(e,t)<0?t:e}function pn(e,t){return Wt(e,t)<0?e:t}function X(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function L(e,t){if(t.line<e.first)return gt(e.first,0);var l=e.first+e.size-1;return t.line>l?gt(l,Rt(e,l).text.length):N(t,Rt(e,t.line).text.length)}function N(e,t){var l=e.ch;return l==null||l>t?gt(e.line,t):l<0?gt(e.line,0):e}function z(e,t){for(var l=[],i=0;i<t.length;i++)l[i]=L(e,t[i]);return l}var te=function(e,t){this.state=e,this.lookAhead=t},Q=function(e,t,l,i){this.state=t,this.doc=e,this.line=l,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};Q.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Q.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Q.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Q.fromSaved=function(e,t,l){return t instanceof te?new Q(e,Et(e.mode,t.state),l,t.lookAhead):new Q(e,Et(e.mode,t),l)},Q.prototype.save=function(e){var t=e!==!1?Et(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new te(t,this.maxLookAhead):t};function Re(e,t,l,i){var E=[e.state.modeGen],H={};En(e,t.text,e.doc.mode,l,function(re,_e){return E.push(re,_e)},H,i);for(var J=l.state,q=function(re){l.baseTokens=E;var _e=e.state.overlays[re],Le=1,Qe=0;l.state=!0,En(e,t.text,_e.mode,l,function(ze,ft){for(var xt=Le;Qe<ze;){var It=E[Le];It>ze&&E.splice(Le,1,ze,E[Le+1],It),Le+=2,Qe=Math.min(ze,It)}if(!ft)return;if(_e.opaque)E.splice(xt,Le-xt,ze,"overlay "+ft),Le=xt+2;else for(;xt<Le;xt+=2){var Bt=E[xt+1];E[xt+1]=(Bt?Bt+" ":"")+"overlay "+ft}},H),l.state=J,l.baseTokens=null,l.baseTokenPos=1},ee=0;ee<e.state.overlays.length;++ee)q(ee);return{styles:E,classes:H.bgClass||H.textClass?H:null}}function ct(e,t,l){if(!t.styles||t.styles[0]!=e.state.modeGen){var i=Ct(e,Yt(t)),E=t.text.length>e.options.maxHighlightLength&&Et(e.doc.mode,i.state),H=Re(e,t,i);E&&(i.state=E),t.stateAfter=i.save(!E),t.styles=H.styles,H.classes?t.styleClasses=H.classes:t.styleClasses&&(t.styleClasses=null),l===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ct(e,t,l){var i=e.doc,E=e.display;if(!i.mode.startState)return new Q(i,!0,t);var H=Fn(e,t,l),J=H>i.first&&Rt(i,H-1).stateAfter,q=J?Q.fromSaved(i,J,H):new Q(i,Ut(i.mode),H);return i.iter(H,t,function(ee){Pt(e,ee.text,q);var re=q.line;ee.stateAfter=re==t-1||re%5==0||re>=E.viewFrom&&re<E.viewTo?q.save():null,q.nextLine()}),l&&(i.modeFrontier=q.line),q}function Pt(e,t,l,i){var E=e.doc.mode,H=new Zt(t,e.options.tabSize,l);for(H.start=H.pos=i||0,t==""&&ht(E,l.state);!H.eol();)Vt(E,H,l.state),H.start=H.pos}function ht(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var l=st(e,t);if(l.mode.blankLine)return l.mode.blankLine(l.state)}function Vt(e,t,l,i){for(var E=0;E<10;E++){i&&(i[0]=st(e,l).mode);var H=e.token(t,l);if(t.pos>t.start)return H}throw new Error("Mode "+e.name+" failed to advance stream.")}var rn=function(e,t,l){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=l};function An(e,t,l,i){var E=e.doc,H=E.mode,J;t=L(E,t);var q=Rt(E,t.line),ee=Ct(e,t.line,l),re=new Zt(q.text,e.options.tabSize,ee),_e;for(i&&(_e=[]);(i||re.pos<t.ch)&&!re.eol();)re.start=re.pos,J=Vt(H,re,ee.state),i&&_e.push(new rn(re,J,Et(E.mode,ee.state)));return i?_e:new rn(re,J,ee.state)}function Cn(e,t){if(e)for(;;){var l=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!l)break;e=e.slice(0,l.index)+e.slice(l.index+l[0].length);var i=l[1]?"bgClass":"textClass";t[i]==null?t[i]=l[2]:new RegExp("(?:^|\\s)"+l[2]+"(?:$|\\s)").test(t[i])||(t[i]+=" "+l[2])}return e}function En(e,t,l,i,E,H,J){var q=l.flattenSpans;q==null&&(q=e.options.flattenSpans);var ee=0,re=null,_e=new Zt(t,e.options.tabSize,i),Le,Qe=e.options.addModeClass&&[null];for(t==""&&Cn(ht(l,i.state),H);!_e.eol();){if(_e.pos>e.options.maxHighlightLength?(q=!1,J&&Pt(e,t,i,_e.pos),_e.pos=t.length,Le=null):Le=Cn(Vt(l,_e,i.state,Qe),H),Qe){var ze=Qe[0].name;ze&&(Le="m-"+(Le?ze+" "+Le:ze))}if(!q||re!=Le){for(;ee<_e.start;)ee=Math.min(_e.start,ee+5e3),E(ee,re);re=Le}_e.start=_e.pos}for(;ee<_e.pos;){var ft=Math.min(_e.pos,ee+5e3);E(ft,re),ee=ft}}function Fn(e,t,l){for(var i,E,H=e.doc,J=l?-1:t-(e.doc.mode.innerMode?1e3:100),q=t;q>J;--q){if(q<=H.first)return H.first;var ee=Rt(H,q-1),re=ee.stateAfter;if(re&&(!l||q+(re instanceof te?re.lookAhead:0)<=H.modeFrontier))return q;var _e=Y(ee.text,null,e.options.tabSize);(E==null||i>_e)&&(E=q-1,i=_e)}return E}function mr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var l=e.first,i=t-1;i>l;i--){var E=Rt(e,i).stateAfter;if(E&&(!(E instanceof te)||i+E.lookAhead<t)){l=i+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,l)}var kr=!1,Kn=!1;function or(){kr=!0}function Cr(){Kn=!0}function Er(e,t,l){this.marker=e,this.from=t,this.to=l}function nr(e,t){if(e)for(var l=0;l<e.length;++l){var i=e[l];if(i.marker==t)return i}}function Kr(e,t){for(var l,i=0;i<e.length;++i)e[i]!=t&&(l||(l=[])).push(e[i]);return l}function Pr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Gr(e,t,l){var i;if(e)for(var E=0;E<e.length;++E){var H=e[E],J=H.marker,q=H.from==null||(J.inclusiveLeft?H.from<=t:H.from<t);if(q||H.from==t&&J.type=="bookmark"&&(!l||!H.marker.insertLeft)){var ee=H.to==null||(J.inclusiveRight?H.to>=t:H.to>t);(i||(i=[])).push(new Er(J,H.from,ee?null:H.to))}}return i}function zr(e,t,l){var i;if(e)for(var E=0;E<e.length;++E){var H=e[E],J=H.marker,q=H.to==null||(J.inclusiveRight?H.to>=t:H.to>t);if(q||H.from==t&&J.type=="bookmark"&&(!l||H.marker.insertLeft)){var ee=H.from==null||(J.inclusiveLeft?H.from<=t:H.from<t);(i||(i=[])).push(new Er(J,ee?null:H.from-t,H.to==null?null:H.to-t))}}return i}function Nr(e,t){if(t.full)return null;var l=Sn(e,t.from.line)&&Rt(e,t.from.line).markedSpans,i=Sn(e,t.to.line)&&Rt(e,t.to.line).markedSpans;if(!l&&!i)return null;var E=t.from.ch,H=t.to.ch,J=Wt(t.from,t.to)==0,q=Gr(l,E,J),ee=zr(i,H,J),re=t.text.length==1,_e=ne(t.text).length+(re?E:0);if(q)for(var Le=0;Le<q.length;++Le){var Qe=q[Le];if(Qe.to==null){var ze=nr(ee,Qe.marker);ze?re&&(Qe.to=ze.to==null?null:ze.to+_e):Qe.to=E}}if(ee)for(var ft=0;ft<ee.length;++ft){var xt=ee[ft];if(xt.to!=null&&(xt.to+=_e),xt.from==null){var It=nr(q,xt.marker);It||(xt.from=_e,re&&(q||(q=[])).push(xt))}else xt.from+=_e,re&&(q||(q=[])).push(xt)}q&&(q=$n(q)),ee&&ee!=q&&(ee=$n(ee));var Bt=[q];if(!re){var Kt=t.text.length-2,Ft;if(Kt>0&&q)for(var Xt=0;Xt<q.length;++Xt)q[Xt].to==null&&(Ft||(Ft=[])).push(new Er(q[Xt].marker,null,null));for(var ln=0;ln<Kt;++ln)Bt.push(Ft);Bt.push(ee)}return Bt}function $n(e){for(var t=0;t<e.length;++t){var l=e[t];l.from!=null&&l.from==l.to&&l.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Ur(e,t,l){var i=null;if(e.iter(t.line,l.line+1,function(ze){if(ze.markedSpans)for(var ft=0;ft<ze.markedSpans.length;++ft){var xt=ze.markedSpans[ft].marker;xt.readOnly&&(!i||le(i,xt)==-1)&&(i||(i=[])).push(xt)}}),!i)return null;for(var E=[{from:t,to:l}],H=0;H<i.length;++H)for(var J=i[H],q=J.find(0),ee=0;ee<E.length;++ee){var re=E[ee];if(Wt(re.to,q.from)<0||Wt(re.from,q.to)>0)continue;var _e=[ee,1],Le=Wt(re.from,q.from),Qe=Wt(re.to,q.to);(Le<0||!J.inclusiveLeft&&!Le)&&_e.push({from:re.from,to:q.from}),(Qe>0||!J.inclusiveRight&&!Qe)&&_e.push({from:q.to,to:re.to}),E.splice.apply(E,_e),ee+=_e.length-3}return E}function Jr(e){var t=e.markedSpans;if(!t)return;for(var l=0;l<t.length;++l)t[l].marker.detachLine(e);e.markedSpans=null}function cr(e,t){if(!t)return;for(var l=0;l<t.length;++l)t[l].marker.attachLine(e);e.markedSpans=t}function Ln(e){return e.inclusiveLeft?-1:0}function jt(e){return e.inclusiveRight?1:0}function Gn(e,t){var l=e.lines.length-t.lines.length;if(l!=0)return l;var i=e.find(),E=t.find(),H=Wt(i.from,E.from)||Ln(e)-Ln(t);if(H)return-H;var J=Wt(i.to,E.to)||jt(e)-jt(t);return J||t.id-e.id}function mn(e,t){var l=Kn&&e.markedSpans,i;if(l)for(var E=void 0,H=0;H<l.length;++H)E=l[H],E.marker.collapsed&&(t?E.from:E.to)==null&&(!i||Gn(i,E.marker)<0)&&(i=E.marker);return i}function Te(e){return mn(e,!0)}function dn(e){return mn(e,!1)}function Br(e,t){var l=Kn&&e.markedSpans,i;if(l)for(var E=0;E<l.length;++E){var H=l[E];H.marker.collapsed&&(H.from==null||H.from<t)&&(H.to==null||H.to>t)&&(!i||Gn(i,H.marker)<0)&&(i=H.marker)}return i}function Qn(e,t,l,i,E){var H=Rt(e,t),J=Kn&&H.markedSpans;if(J)for(var q=0;q<J.length;++q){var ee=J[q];if(!ee.marker.collapsed)continue;var re=ee.marker.find(0),_e=Wt(re.from,l)||Ln(ee.marker)-Ln(E),Le=Wt(re.to,i)||jt(ee.marker)-jt(E);if(_e>=0&&Le<=0||_e<=0&&Le>=0)continue;if(_e<=0&&(ee.marker.inclusiveRight&&E.inclusiveLeft?Wt(re.to,l)>=0:Wt(re.to,l)>0)||_e>=0&&(ee.marker.inclusiveRight&&E.inclusiveLeft?Wt(re.from,i)<=0:Wt(re.from,i)<0))return!0}}function gn(e){for(var t;t=Te(e);)e=t.find(-1,!0).line;return e}function Zr(e){for(var t;t=dn(e);)e=t.find(1,!0).line;return e}function Or(e){for(var t,l;t=dn(e);)e=t.find(1,!0).line,(l||(l=[])).push(e);return l}function qr(e,t){var l=Rt(e,t),i=gn(l);return l==i?t:Yt(i)}function dr(e,t){if(t>e.lastLine())return t;var l=Rt(e,t),i;if(!Fr(e,l))return t;for(;i=dn(l);)l=i.find(1,!0).line;return Yt(l)+1}function Fr(e,t){var l=Kn&&t.markedSpans;if(l)for(var i=void 0,E=0;E<l.length;++E){if(i=l[E],!i.marker.collapsed)continue;if(i.from==null)return!0;if(i.marker.widgetNode)continue;if(i.from==0&&i.marker.inclusiveLeft&&oi(e,t,i))return!0}}function oi(e,t,l){if(l.to==null){var i=l.marker.find(1,!0);return oi(e,i.line,nr(i.line.markedSpans,l.marker))}if(l.marker.inclusiveRight&&l.to==t.text.length)return!0;for(var E=void 0,H=0;H<t.markedSpans.length;++H)if(E=t.markedSpans[H],E.marker.collapsed&&!E.marker.widgetNode&&E.from==l.to&&(E.to==null||E.to!=l.from)&&(E.marker.inclusiveLeft||l.marker.inclusiveRight)&&oi(e,t,E))return!0}function _r(e){e=gn(e);for(var t=0,l=e.parent,i=0;i<l.lines.length;++i){var E=l.lines[i];if(E==e)break;t+=E.height}for(var H=l.parent;H;l=H,H=l.parent)for(var J=0;J<H.children.length;++J){var q=H.children[J];if(q==l)break;t+=q.height}return t}function li(e){if(e.height==0)return 0;for(var t=e.text.length,l,i=e;l=Te(i);){var E=l.find(0,!0);i=E.from.line,t+=E.from.ch-E.to.ch}for(i=e;l=dn(i);){var H=l.find(0,!0);t-=i.text.length-H.from.ch,i=H.to.line,t+=i.text.length-H.to.ch}return t}function jr(e){var t=e.display,l=e.doc;t.maxLine=Rt(l,l.first),t.maxLineLength=li(t.maxLine),t.maxLineChanged=!0,l.iter(function(i){var E=li(i);E>t.maxLineLength&&(t.maxLineLength=E,t.maxLine=i)})}var xr=function(e,t,l){this.text=e,cr(this,t),this.height=l?l(this):1};xr.prototype.lineNo=function(){return Yt(this)},be(xr);function ui(e,t,l,i){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Jr(e),cr(e,l);var E=i?i(e):1;E!=e.height&&en(e,E)}function Gt(e){e.parent=null,Jr(e)}var on={},$t={};function hn(e,t){if(!e||/^\s*$/.test(e))return null;var l=t.addModeClass?$t:on;return l[e]||(l[e]=e.replace(/\S+/g,"cm-$&"))}function vn(e,t){var l=C("span",null,null,n?"padding-right: .1px":null),i={pre:C("pre",[l],"CodeMirror-line"),content:l,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var E=0;E<=(t.rest?t.rest.length:0);E++){var H=E?t.rest[E-1]:t.line,J=void 0;i.pos=0,i.addToken=yn,vt(e.display.measure)&&(J=St(H,e.doc.direction))&&(i.addToken=ar(i.addToken,J)),i.map=[];var q=t!=e.display.externalMeasured&&Yt(H);Rr(H,i,ct(e,H,q)),H.styleClasses&&(H.styleClasses.bgClass&&(i.bgClass=y(H.styleClasses.bgClass,i.bgClass||"")),H.styleClasses.textClass&&(i.textClass=y(H.styleClasses.textClass,i.textClass||""))),i.map.length==0&&i.map.push(0,0,i.content.appendChild(Dt(e.display.measure))),E==0?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(n){var ee=i.content.lastChild;(/\bcm-tab\b/.test(ee.className)||ee.querySelector&&ee.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return Ke(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=y(i.pre.className,i.textClass||"")),i}function Nn(e){var t=h("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function yn(e,t,l,i,E,H,J){if(!t)return;var q=e.splitSpaces?zn(t,e.trailingSpace):t,ee=e.cm.state.specialChars,re=!1,_e;if(!ee.test(t))e.col+=t.length,_e=document.createTextNode(q),e.map.push(e.pos,e.pos+t.length,_e),K&&j<9&&(re=!0),e.pos+=t.length;else{_e=document.createDocumentFragment();for(var Le=0;;){ee.lastIndex=Le;var Qe=ee.exec(t),ze=Qe?Qe.index-Le:t.length-Le;if(ze){var ft=document.createTextNode(q.slice(Le,Le+ze));K&&j<9?_e.appendChild(h("span",[ft])):_e.appendChild(ft),e.map.push(e.pos,e.pos+ze,ft),e.col+=ze,e.pos+=ze}if(!Qe)break;Le+=ze+1;var xt=void 0;if(Qe[0]==" "){var It=e.cm.options.tabSize,Bt=It-e.col%It;xt=_e.appendChild(h("span",pe(Bt),"cm-tab")),xt.setAttribute("role","presentation"),xt.setAttribute("cm-text"," "),e.col+=Bt}else Qe[0]=="\r"||Qe[0]==`
`?(xt=_e.appendChild(h("span",Qe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),xt.setAttribute("cm-text",Qe[0]),e.col+=1):(xt=e.cm.options.specialCharPlaceholder(Qe[0]),xt.setAttribute("cm-text",Qe[0]),K&&j<9?_e.appendChild(h("span",[xt])):_e.appendChild(xt),e.col+=1);e.map.push(e.pos,e.pos+1,xt),e.pos++}}if(e.trailingSpace=q.charCodeAt(t.length-1)==32,l||i||E||re||H||J){var Kt=l||"";i&&(Kt+=i),E&&(Kt+=E);var Ft=h("span",[_e],Kt,H);if(J)for(var Xt in J)J.hasOwnProperty(Xt)&&Xt!="style"&&Xt!="class"&&Ft.setAttribute(Xt,J[Xt]);return e.content.appendChild(Ft)}e.content.appendChild(_e)}function zn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var l=t,i="",E=0;E<e.length;E++){var H=e.charAt(E);H==" "&&l&&(E==e.length-1||e.charCodeAt(E+1)==32)&&(H="\xA0"),i+=H,l=H==" "}return i}function ar(e,t){return function(l,i,E,H,J,q,ee){E=E?E+" cm-force-border":"cm-force-border";for(var re=l.pos,_e=re+i.length;;){for(var Le=void 0,Qe=0;Qe<t.length&&!(Le=t[Qe],Le.to>re&&Le.from<=re);Qe++);if(Le.to>=_e)return e(l,i,E,H,J,q,ee);e(l,i.slice(0,Le.to-re),E,H,null,q,ee),H=null,i=i.slice(Le.to-re),re=Le.to}}}function fn(e,t,l,i){var E=!i&&l.widgetNode;E&&e.map.push(e.pos,e.pos+t,E),!i&&e.cm.display.input.needsContentAttribute&&(E||(E=e.content.appendChild(document.createElement("span"))),E.setAttribute("cm-marker",l.id)),E&&(e.cm.display.input.setUneditable(E),e.content.appendChild(E)),e.pos+=t,e.trailingSpace=!1}function Rr(e,t,l){var i=e.markedSpans,E=e.text,H=0;if(!i){for(var J=1;J<l.length;J+=2)t.addToken(t,E.slice(H,H=l[J]),hn(l[J+1],t.cm.options));return}for(var q=E.length,ee=0,re=1,_e="",Le,Qe,ze=0,ft,xt,It,Bt,Kt;;){if(ze==ee){ft=xt=It=Qe="",Kt=null,Bt=null,ze=Infinity;for(var Ft=[],Xt=void 0,ln=0;ln<i.length;++ln){var an=i[ln],bn=an.marker;if(bn.type=="bookmark"&&an.from==ee&&bn.widgetNode)Ft.push(bn);else if(an.from<=ee&&(an.to==null||an.to>ee||bn.collapsed&&an.to==ee&&an.from==ee)){if(an.to!=null&&an.to!=ee&&ze>an.to&&(ze=an.to,xt=""),bn.className&&(ft+=" "+bn.className),bn.css&&(Qe=(Qe?Qe+";":"")+bn.css),bn.startStyle&&an.from==ee&&(It+=" "+bn.startStyle),bn.endStyle&&an.to==ze&&(Xt||(Xt=[])).push(bn.endStyle,an.to),bn.title&&((Kt||(Kt={})).title=bn.title),bn.attributes)for(var Wn in bn.attributes)(Kt||(Kt={}))[Wn]=bn.attributes[Wn];bn.collapsed&&(!Bt||Gn(Bt.marker,bn)<0)&&(Bt=an)}else an.from>ee&&ze>an.from&&(ze=an.from)}if(Xt)for(var lr=0;lr<Xt.length;lr+=2)Xt[lr+1]==ze&&(xt+=" "+Xt[lr]);if(!Bt||Bt.from==ee)for(var Jn=0;Jn<Ft.length;++Jn)fn(t,0,Ft[Jn]);if(Bt&&(Bt.from||0)==ee){if(fn(t,(Bt.to==null?q+1:Bt.to)-ee,Bt.marker,Bt.from==null),Bt.to==null)return;Bt.to==ee&&(Bt=!1)}}if(ee>=q)break;for(var Hr=Math.min(q,ze);;){if(_e){var Dr=ee+_e.length;if(!Bt){var rr=Dr>Hr?_e.slice(0,Hr-ee):_e;t.addToken(t,rr,Le?Le+ft:ft,It,ee+rr.length==ze?xt:"",Qe,Kt)}if(Dr>=Hr){_e=_e.slice(Hr-ee),ee=Hr;break}ee=Dr,It=""}_e=E.slice(H,H=l[re++]),Le=hn(l[re++],t.cm.options)}}}function Dn(e,t,l){this.line=t,this.rest=Or(t),this.size=this.rest?Yt(ne(this.rest))-l+1:1,this.node=this.text=null,this.hidden=Fr(e,t)}function Vn(e,t,l){for(var i=[],E,H=t;H<l;H=E){var J=new Dn(e.doc,Rt(e.doc,H),H);E=H+J.size,i.push(J)}return i}var er=null;function Tr(e){er?er.ops.push(e):e.ownsGroup=er={ops:[e],delayedCallbacks:[]}}function ea(e){var t=e.delayedCallbacks,l=0;do{for(;l<t.length;l++)t[l].call(null);for(var i=0;i<e.ops.length;i++){var E=e.ops[i];if(E.cursorActivityHandlers)for(;E.cursorActivityCalled<E.cursorActivityHandlers.length;)E.cursorActivityHandlers[E.cursorActivityCalled++].call(null,E.cm)}}while(l<t.length)}function Pn(e,t){var l=e.ownsGroup;if(!l)return;try{ea(l)}finally{er=null,t(l)}}var On=null;function Rn(e,t){var l=tt(e,t);if(!l.length)return;var i=Array.prototype.slice.call(arguments,2),E;er?E=er.delayedCallbacks:On?E=On:(E=On=[],setTimeout(gr,0));for(var H=function(q){E.push(function(){return l[q].apply(null,i)})},J=0;J<l.length;++J)H(J)}function gr(){var e=On;On=null;for(var t=0;t<e.length;++t)e[t]()}function ci(e,t,l,i){for(var E=0;E<t.changes.length;E++){var H=t.changes[E];H=="text"?Ra(e,t):H=="gutter"?ds(e,t,l,i):H=="class"?Fi(e,t):H=="widget"&&hs(e,t,i)}t.changes=null}function $r(e){return e.node==e.text&&(e.node=h("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),K&&j<8&&(e.node.style.zIndex=2)),e.node}function Ui(e,t){var l=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(l&&(l+=" CodeMirror-linebackground"),t.background)l?t.background.className=l:(t.background.parentNode.removeChild(t.background),t.background=null);else if(l){var i=$r(t);t.background=i.insertBefore(h("div",null,l),i.firstChild),e.display.input.setUneditable(t.background)}}function Bi(e,t){var l=e.display.externalMeasured;return l&&l.line==t.line?(e.display.externalMeasured=null,t.measure=l.measure,l.built):vn(e,t)}function Ra(e,t){var l=t.text.className,i=Bi(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,Fi(e,t)):l&&(t.text.className=l)}function Fi(e,t){Ui(e,t),t.line.wrapClass?$r(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var l=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=l||""}function ds(e,t,l,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var E=$r(t);t.gutterBackground=h("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),E.insertBefore(t.gutterBackground,t.text)}var H=t.line.gutterMarkers;if(e.options.lineNumbers||H){var J=$r(t),q=t.gutter=h("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(q),J.insertBefore(q,t.text),t.line.gutterClass&&(q.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!H||!H["CodeMirror-linenumbers"])&&(t.lineNumber=q.appendChild(h("div",kn(e.options,l),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),H)for(var ee=0;ee<e.display.gutterSpecs.length;++ee){var re=e.display.gutterSpecs[ee].className,_e=H.hasOwnProperty(re)&&H[re];_e&&q.appendChild(h("div",[_e],"CodeMirror-gutter-elt","left: "+i.gutterLeft[re]+"px; width: "+i.gutterWidth[re]+"px"))}}}function hs(e,t,l){t.alignable&&(t.alignable=null);for(var i=I("CodeMirror-linewidget"),E=t.node.firstChild,H=void 0;E;E=H)H=E.nextSibling,i.test(E.className)&&t.node.removeChild(E);fs(e,t,l)}function Ks(e,t,l,i){var E=Bi(e,t);return t.text=t.node=E.pre,E.bgClass&&(t.bgClass=E.bgClass),E.textClass&&(t.textClass=E.textClass),Fi(e,t),ds(e,t,l,i),fs(e,t,i),t.node}function fs(e,t,l){if(ps(e,t.line,t,l,!0),t.rest)for(var i=0;i<t.rest.length;i++)ps(e,t.rest[i],t,l,!1)}function ps(e,t,l,i,E){if(!t.widgets)return;for(var H=$r(l),J=0,q=t.widgets;J<q.length;++J){var ee=q[J],re=h("div",[ee.node],"CodeMirror-linewidget"+(ee.className?" "+ee.className:""));ee.handleMouseEvents||re.setAttribute("cm-ignore-events","true"),ms(ee,re,l,i),e.display.input.setUneditable(re),E&&ee.above?H.insertBefore(re,l.gutter||l.text):H.appendChild(re),Rn(ee,"redraw")}}function ms(e,t,l,i){if(e.noHScroll){(l.alignable||(l.alignable=[])).push(t);var E=i.wrapperWidth;t.style.left=i.fixedPos+"px",e.coverGutter||(E-=i.gutterTotalWidth,t.style.paddingLeft=i.gutterTotalWidth+"px"),t.style.width=E+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-i.gutterTotalWidth+"px"))}function gi(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!g(document.body,e.node)){var l="position: relative;";e.coverGutter&&(l+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(l+="width: "+t.display.wrapper.clientWidth+"px;"),v(t.display.measure,h("div",[e.node],null,l))}return e.height=e.node.parentNode.offsetHeight}function Vr(e,t){for(var l=Ae(t);l!=e.wrapper;l=l.parentNode)if(!l||l.nodeType==1&&l.getAttribute("cm-ignore-events")=="true"||l.parentNode==e.sizer&&l!=e.mover)return!0}function ta(e){return e.lineSpace.offsetTop}function na(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function gs(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=v(e.measure,h("pre","x","CodeMirror-line-like")),l=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(l.paddingLeft),right:parseInt(l.paddingRight)};return!isNaN(i.left)&&!isNaN(i.right)&&(e.cachedPaddingH=i),i}function Yr(e){return de-e.display.nativeBarWidth}function vi(e){return e.display.scroller.clientWidth-Yr(e)-e.display.barWidth}function ra(e){return e.display.scroller.clientHeight-Yr(e)-e.display.barHeight}function vs(e,t,l){var i=e.options.lineWrapping,E=i&&vi(e);if(!t.measure.heights||i&&t.measure.width!=E){var H=t.measure.heights=[];if(i){t.measure.width=E;for(var J=t.text.firstChild.getClientRects(),q=0;q<J.length-1;q++){var ee=J[q],re=J[q+1];Math.abs(ee.bottom-re.bottom)>2&&H.push((ee.bottom+re.top)/2-l.top)}}H.push(l.bottom-l.top)}}function Ia(e,t,l){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var i=0;i<e.rest.length;i++)if(e.rest[i]==t)return{map:e.measure.maps[i],cache:e.measure.caches[i]};for(var E=0;E<e.rest.length;E++)if(Yt(e.rest[E])>l)return{map:e.measure.maps[E],cache:e.measure.caches[E],before:!0}}function Gs(e,t){t=gn(t);var l=Yt(t),i=e.display.externalMeasured=new Dn(e.doc,t,l);i.lineN=l;var E=i.built=vn(e,i);return i.text=E.pre,v(e.display.lineMeasure,E.pre),i}function Da(e,t,l,i){return Xr(e,ji(e,t),l,i)}function wr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[xi(e,t)];var l=e.display.externalMeasured;if(l&&t>=l.lineN&&t<l.lineN+l.size)return l}function ji(e,t){var l=Yt(t),i=wr(e,l);i&&!i.text?i=null:i&&i.changes&&(ci(e,i,l,sa(e)),e.curOp.forceUpdate=!0),i||(i=Gs(e,t));var E=Ia(i,t,l);return{line:t,view:i,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Xr(e,t,l,i,E){t.before&&(l=-1);var H=l+(i||""),J;return t.cache.hasOwnProperty(H)?J=t.cache[H]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(vs(e,t.view,t.rect),t.hasHeights=!0),J=ys(e,t,l,i),J.bogus||(t.cache[H]=J)),{left:J.left,right:J.right,top:E?J.rtop:J.top,bottom:E?J.rbottom:J.bottom}}var ia={left:0,right:0,top:0,bottom:0};function Oi(e,t,l){for(var i,E,H,J,q,ee,re=0;re<e.length;re+=3)if(q=e[re],ee=e[re+1],t<q?(E=0,H=1,J="left"):t<ee?(E=t-q,H=E+1):(re==e.length-3||t==ee&&e[re+3]>t)&&(H=ee-q,E=H-1,t>=ee&&(J="right")),E!=null){if(i=e[re+2],q==ee&&l==(i.insertLeft?"left":"right")&&(J=l),l=="left"&&E==0)for(;re&&e[re-2]==e[re-3]&&e[re-1].insertLeft;)i=e[(re-=3)+2],J="left";if(l=="right"&&E==ee-q)for(;re<e.length-3&&e[re+3]==e[re+4]&&!e[re+5].insertLeft;)i=e[(re+=3)+2],J="right";break}return{node:i,start:E,end:H,collapse:J,coverStart:q,coverEnd:ee}}function Wi(e,t){var l=ia;if(t=="left")for(var i=0;i<e.length&&!((l=e[i]).left!=l.right);i++);else for(var E=e.length-1;E>=0&&!((l=e[E]).left!=l.right);E--);return l}function ys(e,t,l,i){var E=Oi(t.map,l,i),H=E.node,J=E.start,q=E.end,ee=E.collapse,re;if(H.nodeType==3){for(var _e=0;_e<4;_e++){for(;J&&De(t.line.text.charAt(E.coverStart+J));)--J;for(;E.coverStart+q<E.coverEnd&&De(t.line.text.charAt(E.coverStart+q));)++q;if(K&&j<9&&J==0&&q==E.coverEnd-E.coverStart?re=H.parentNode.getBoundingClientRect():re=Wi(x(H,J,q).getClientRects(),i),re.left||re.right||J==0)break;q=J,J=J-1,ee="right"}K&&j<11&&(re=Hi(e.display.measure,re))}else{J>0&&(ee=i="right");var Le;e.options.lineWrapping&&(Le=H.getClientRects()).length>1?re=Le[i=="right"?Le.length-1:0]:re=H.getBoundingClientRect()}if(K&&j<9&&!J&&(!re||!re.left&&!re.right)){var Qe=H.parentNode.getClientRects()[0];Qe?re={left:Qe.left,right:Qe.left+Ei(e.display),top:Qe.top,bottom:Qe.bottom}:re=ia}for(var ze=re.top-t.rect.top,ft=re.bottom-t.rect.top,xt=(ze+ft)/2,It=t.view.measure.heights,Bt=0;Bt<It.length-1&&!(xt<It[Bt]);Bt++);var Kt=Bt?It[Bt-1]:0,Ft=It[Bt],Xt={left:(ee=="right"?re.right:re.left)-t.rect.left,right:(ee=="left"?re.left:re.right)-t.rect.left,top:Kt,bottom:Ft};return!re.left&&!re.right&&(Xt.bogus=!0),e.options.singleCursorHeightPerLine||(Xt.rtop=ze,Xt.rbottom=ft),Xt}function Hi(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!xe(e))return t;var l=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*l,right:t.right*l,top:t.top*i,bottom:t.bottom*i}}function bs(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function La(e){e.display.externalMeasure=null,b(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)bs(e.display.view[t])}function _n(e){La(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function yi(){return m&&u?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Es(){return m&&u?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function aa(e){var t=0;if(e.widgets)for(var l=0;l<e.widgets.length;++l)e.widgets[l].above&&(t+=gi(e.widgets[l]));return t}function In(e,t,l,i,E){if(!E){var H=aa(t);l.top+=H,l.bottom+=H}if(i=="line")return l;i||(i="local");var J=_r(t);if(i=="local"?J+=ta(e.display):J-=e.display.viewOffset,i=="page"||i=="window"){var q=e.display.lineSpace.getBoundingClientRect();J+=q.top+(i=="window"?0:Es());var ee=q.left+(i=="window"?0:yi());l.left+=ee,l.right+=ee}return l.top+=J,l.bottom+=J,l}function bi(e,t,l){if(l=="div")return t;var i=t.left,E=t.top;if(l=="page")i-=yi(),E-=Es();else if(l=="local"||!l){var H=e.display.sizer.getBoundingClientRect();i+=H.left,E+=H.top}var J=e.display.lineSpace.getBoundingClientRect();return{left:i-J.left,top:E-J.top}}function Ma(e,t,l,i,E){return i||(i=Rt(e.doc,t.line)),In(e,i,Da(e,i,t.ch,E),l)}function Wr(e,t,l,i,E,H){i=i||Rt(e.doc,t.line),E||(E=ji(e,i));function J(ft,xt){var It=Xr(e,E,ft,xt?"right":"left",H);return xt?It.left=It.right:It.right=It.left,In(e,i,It,l)}var q=St(i,e.doc.direction),ee=t.ch,re=t.sticky;if(ee>=i.text.length?(ee=i.text.length,re="before"):ee<=0&&(ee=0,re="after"),!q)return J(re=="before"?ee-1:ee,re=="before");function _e(ft,xt,It){var Bt=q[xt],Kt=Bt.level==1;return J(It?ft-1:ft,Kt!=It)}var Le=dt(q,ee,re),Qe=mt,ze=_e(ee,Le,re=="before");return Qe!=null&&(ze.other=_e(ee,Qe,re!="before")),ze}function _s(e,t){var l=0;t=L(e.doc,t),e.options.lineWrapping||(l=Ei(e.display)*t.ch);var i=Rt(e.doc,t.line),E=_r(i)+ta(e.display);return{left:l,right:l,top:E,bottom:E+i.height}}function di(e,t,l,i,E){var H=gt(e,t,l);return H.xRel=E,i&&(H.outside=i),H}function ka(e,t,l){var i=e.doc;if(l+=e.display.viewOffset,l<0)return di(i.first,0,null,-1,-1);var E=cn(i,l),H=i.first+i.size-1;if(E>H)return di(i.first+i.size-1,Rt(i,H).text.length,null,1,1);t<0&&(t=0);for(var J=Rt(i,E);;){var q=zs(e,J,E,t,l),ee=Br(J,q.ch+(q.xRel>0||q.outside>0?1:0));if(!ee)return q;var re=ee.find(1);if(re.line==E)return re;J=Rt(i,E=re.line)}}function Pa(e,t,l,i){i-=aa(t);var E=t.text.length,H=it(function(J){return Xr(e,l,J-1).bottom<=i},E,0);return E=it(function(J){return Xr(e,l,J).top>i},H,E),{begin:H,end:E}}function Ki(e,t,l,i){l||(l=ji(e,t));var E=In(e,t,Xr(e,l,i),"line").top;return Pa(e,t,l,E)}function Na(e,t,l,i){return e.bottom<=l?!1:e.top>l?!0:(i?e.left:e.right)>t}function zs(e,t,l,i,E){E-=_r(t);var H=ji(e,t),J=aa(t),q=0,ee=t.text.length,re=!0,_e=St(t,e.doc.direction);if(_e){var Le=(e.options.lineWrapping?Ts:xs)(e,t,l,H,_e,i,E);re=Le.level!=1,q=re?Le.from:Le.to-1,ee=re?Le.to:Le.from-1}var Qe=null,ze=null,ft=it(function(ln){var an=Xr(e,H,ln);return an.top+=J,an.bottom+=J,Na(an,i,E,!1)?(an.top<=E&&an.left<=i&&(Qe=ln,ze=an),!0):!1},q,ee),xt,It,Bt=!1;if(ze){var Kt=i-ze.left<ze.right-i,Ft=Kt==re;ft=Qe+(Ft?0:1),It=Ft?"after":"before",xt=Kt?ze.left:ze.right}else{!re&&(ft==ee||ft==q)&&ft++,It=ft==0?"after":ft==t.text.length?"before":Xr(e,H,ft-(re?1:0)).bottom+J<=E==re?"after":"before";var Xt=Wr(e,gt(l,ft,It),"line",t,H);xt=Xt.left,Bt=E<Xt.top?-1:E>=Xt.bottom?1:0}return ft=Ne(t.text,ft,1),di(l,ft,It,Bt,i-xt)}function xs(e,t,l,i,E,H,J){var q=it(function(Le){var Qe=E[Le],ze=Qe.level!=1;return Na(Wr(e,gt(l,ze?Qe.to:Qe.from,ze?"before":"after"),"line",t,i),H,J,!0)},0,E.length-1),ee=E[q];if(q>0){var re=ee.level!=1,_e=Wr(e,gt(l,re?ee.from:ee.to,re?"after":"before"),"line",t,i);Na(_e,H,J,!0)&&_e.top>J&&(ee=E[q-1])}return ee}function Ts(e,t,l,i,E,H,J){var q=Pa(e,t,i,J),ee=q.begin,re=q.end;/\s/.test(t.text.charAt(re-1))&&re--;for(var _e=null,Le=null,Qe=0;Qe<E.length;Qe++){var ze=E[Qe];if(ze.from>=re||ze.to<=ee)continue;var ft=ze.level!=1,xt=Xr(e,i,ft?Math.min(re,ze.to)-1:Math.max(ee,ze.from)).right,It=xt<H?H-xt+1e9:xt-H;(!_e||Le>It)&&(_e=ze,Le=It)}return _e||(_e=E[E.length-1]),_e.from<ee&&(_e={from:ee,to:_e.to,level:_e.level}),_e.to>re&&(_e={from:_e.from,to:re,level:_e.level}),_e}var ni;function Ri(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ni==null){ni=h("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ni.appendChild(document.createTextNode("x")),ni.appendChild(h("br"));ni.appendChild(document.createTextNode("x"))}v(e.measure,ni);var l=ni.offsetHeight/50;return l>3&&(e.cachedTextHeight=l),b(e.measure),l||1}function Ei(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=h("span","xxxxxxxxxx"),l=h("pre",[t],"CodeMirror-line-like");v(e.measure,l);var i=t.getBoundingClientRect(),E=(i.right-i.left)/10;return E>2&&(e.cachedCharWidth=E),E||10}function sa(e){for(var t=e.display,l={},i={},E=t.gutters.clientLeft,H=t.gutters.firstChild,J=0;H;H=H.nextSibling,++J){var q=e.display.gutterSpecs[J].className;l[q]=H.offsetLeft+H.clientLeft+E,i[q]=H.clientWidth}return{fixedPos:Ua(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:l,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function Ua(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ba(e){var t=Ri(e.display),l=e.options.lineWrapping,i=l&&Math.max(5,e.display.scroller.clientWidth/Ei(e.display)-3);return function(E){if(Fr(e.doc,E))return 0;var H=0;if(E.widgets)for(var J=0;J<E.widgets.length;J++)E.widgets[J].height&&(H+=E.widgets[J].height);return l?H+(Math.ceil(E.text.length/i)||1)*t:H+t}}function oa(e){var t=e.doc,l=Ba(e);t.iter(function(i){var E=l(i);E!=i.height&&en(i,E)})}function _i(e,t,l,i){var E=e.display;if(!l&&Ae(t).getAttribute("cm-not-content")=="true")return null;var H,J,q=E.lineSpace.getBoundingClientRect();try{H=t.clientX-q.left,J=t.clientY-q.top}catch(Le){return null}var ee=ka(e,H,J),re;if(i&&ee.xRel>0&&(re=Rt(e.doc,ee.line).text).length==ee.ch){var _e=Y(re,re.length,e.options.tabSize)-re.length;ee=gt(ee.line,Math.max(0,Math.round((H-gs(e.display).left)/Ei(e.display))-_e))}return ee}function xi(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var l=e.display.view,i=0;i<l.length;i++)if(t-=l[i].size,t<0)return i}function Zn(e,t,l,i){t==null&&(t=e.doc.first),l==null&&(l=e.doc.first+e.doc.size),i||(i=0);var E=e.display;if(i&&l<E.viewTo&&(E.updateLineNumbers==null||E.updateLineNumbers>t)&&(E.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=E.viewTo)Kn&&qr(e.doc,t)<E.viewTo&&fi(e);else if(l<=E.viewFrom)Kn&&dr(e.doc,l+i)>E.viewFrom?fi(e):(E.viewFrom+=i,E.viewTo+=i);else if(t<=E.viewFrom&&l>=E.viewTo)fi(e);else if(t<=E.viewFrom){var H=ei(e,l,l+i,1);H?(E.view=E.view.slice(H.index),E.viewFrom=H.lineN,E.viewTo+=i):fi(e)}else if(l>=E.viewTo){var J=ei(e,t,t,-1);J?(E.view=E.view.slice(0,J.index),E.viewTo=J.lineN):fi(e)}else{var q=ei(e,t,t,-1),ee=ei(e,l,l+i,1);q&&ee?(E.view=E.view.slice(0,q.index).concat(Vn(e,q.lineN,ee.lineN)).concat(E.view.slice(ee.index)),E.viewTo+=i):fi(e)}var re=E.externalMeasured;re&&(l<re.lineN?re.lineN+=i:t<re.lineN+re.size&&(E.externalMeasured=null))}function hi(e,t,l){e.curOp.viewChanged=!0;var i=e.display,E=e.display.externalMeasured;if(E&&t>=E.lineN&&t<E.lineN+E.size&&(i.externalMeasured=null),t<i.viewFrom||t>=i.viewTo)return;var H=i.view[xi(e,t)];if(H.node==null)return;var J=H.changes||(H.changes=[]);le(J,l)==-1&&J.push(l)}function fi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ei(e,t,l,i){var E=xi(e,t),H,J=e.display.view;if(!Kn||l==e.doc.first+e.doc.size)return{index:E,lineN:l};for(var q=e.display.viewFrom,ee=0;ee<E;ee++)q+=J[ee].size;if(q!=t){if(i>0){if(E==J.length-1)return null;H=q+J[E].size-t,E++}else H=q-t;t+=H,l+=H}for(;qr(e.doc,l)!=l;){if(E==(i<0?0:J.length-1))return null;l+=i*J[E-(i<0?1:0)].size,E+=i}return{index:E,lineN:l}}function Fa(e,t,l){var i=e.display,E=i.view;E.length==0||t>=i.viewTo||l<=i.viewFrom?(i.view=Vn(e,t,l),i.viewFrom=t):(i.viewFrom>t?i.view=Vn(e,t,i.viewFrom).concat(i.view):i.viewFrom<t&&(i.view=i.view.slice(xi(e,t))),i.viewFrom=t,i.viewTo<l?i.view=i.view.concat(Vn(e,i.viewTo,l)):i.viewTo>l&&(i.view=i.view.slice(0,xi(e,l)))),i.viewTo=l}function ws(e){for(var t=e.display.view,l=0,i=0;i<t.length;i++){var E=t[i];!E.hidden&&(!E.node||E.changes)&&++l}return l}function Ti(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ss(e,t){t===void 0&&(t=!0);for(var l=e.doc,i={},E=i.cursors=document.createDocumentFragment(),H=i.selection=document.createDocumentFragment(),J=0;J<l.sel.ranges.length;J++){if(!t&&J==l.sel.primIndex)continue;var q=l.sel.ranges[J];if(q.from().line>=e.display.viewTo||q.to().line<e.display.viewFrom)continue;var ee=q.empty();(ee||e.options.showCursorWhenSelecting)&&ja(e,q.head,E),ee||Vs(e,q,H)}return i}function ja(e,t,l){var i=Wr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),E=l.appendChild(h("div","\xA0","CodeMirror-cursor"));if(E.style.left=i.left+"px",E.style.top=i.top+"px",E.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var H=l.appendChild(h("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));H.style.display="",H.style.left=i.other.left+"px",H.style.top=i.other.top+"px",H.style.height=(i.other.bottom-i.other.top)*.85+"px"}}function la(e,t){return e.top-t.top||e.left-t.left}function Vs(e,t,l){var i=e.display,E=e.doc,H=document.createDocumentFragment(),J=gs(e.display),q=J.left,ee=Math.max(i.sizerWidth,vi(e)-i.sizer.offsetLeft)-J.right,re=E.direction=="ltr";function _e(Ft,Xt,ln,an){Xt<0&&(Xt=0),Xt=Math.round(Xt),an=Math.round(an),H.appendChild(h("div",null,"CodeMirror-selected","position: absolute; left: "+Ft+`px;
top: `+Xt+"px; width: "+(ln==null?ee-Ft:ln)+`px;
height: `+(an-Xt)+"px"))}function Le(Ft,Xt,ln){var an=Rt(E,Ft),bn=an.text.length,Wn,lr;function Jn(rr,Lr){return Ma(e,gt(Ft,rr),"div",an,Lr)}function Hr(rr,Lr,pr){var sr=Ki(e,an,null,rr),ir=Lr=="ltr"==(pr=="after")?"left":"right",qn=pr=="after"?sr.begin:sr.end-(/\s/.test(an.text.charAt(sr.end-1))?2:1);return Jn(qn,ir)[ir]}var Dr=St(an,E.direction);return pt(Dr,Xt||0,ln==null?bn:ln,function(rr,Lr,pr,sr){var ir=pr=="ltr",qn=Jn(rr,ir?"left":"right"),Mr=Jn(Lr-1,ir?"right":"left"),Ca=Xt==null&&rr==0,Ni=ln==null&&Lr==bn,br=sr==0,mi=!Dr||sr==Dr.length-1;if(Mr.top-qn.top<=3){var ur=(re?Ca:Ni)&&br,co=(re?Ni:Ca)&&mi,Ci=ur?q:(ir?qn:Mr).left,qi=co?ee:(ir?Mr:qn).right;_e(Ci,qn.top,qi-Ci,qn.bottom)}else{var $i,Ar,Oa,ho;ir?($i=re&&Ca&&br?q:qn.left,Ar=re?ee:Hr(rr,pr,"before"),Oa=re?q:Hr(Lr,pr,"after"),ho=re&&Ni&&mi?ee:Mr.right):($i=re?Hr(rr,pr,"before"):q,Ar=!re&&Ca&&br?ee:qn.right,Oa=!re&&Ni&&mi?q:Mr.left,ho=re?Hr(Lr,pr,"after"):ee),_e($i,qn.top,Ar-$i,qn.bottom),qn.bottom<Mr.top&&_e(q,qn.bottom,null,Mr.top),_e(Oa,Mr.top,ho-Oa,Mr.bottom)}(!Wn||la(qn,Wn)<0)&&(Wn=qn),la(Mr,Wn)<0&&(Wn=Mr),(!lr||la(qn,lr)<0)&&(lr=qn),la(Mr,lr)<0&&(lr=Mr)}),{start:Wn,end:lr}}var Qe=t.from(),ze=t.to();if(Qe.line==ze.line)Le(Qe.line,Qe.ch,ze.ch);else{var ft=Rt(E,Qe.line),xt=Rt(E,ze.line),It=gn(ft)==gn(xt),Bt=Le(Qe.line,Qe.ch,It?ft.text.length+1:null).end,Kt=Le(ze.line,It?0:null,ze.ch).start;It&&(Bt.top<Kt.top-2?(_e(Bt.right,Bt.top,null,Bt.bottom),_e(q,Kt.top,Kt.left,Kt.bottom)):_e(Bt.right,Bt.top,Kt.left-Bt.right,Bt.bottom)),Bt.bottom<Kt.top&&_e(q,Bt.bottom,null,Kt.top)}l.appendChild(H)}function pi(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var l=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||ri(e),t.cursorDiv.style.visibility=(l=!l)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function As(e){e.state.focused||(e.display.input.focus(),Ha(e))}function Wa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ri(e))},100)}function Ha(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ke(e,"focus",e,t),e.state.focused=!0,k(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),n&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),pi(e)}function ri(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ke(e,"blur",e,t),e.state.focused=!1,_(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ua(e){for(var t=e.display,l=t.lineDiv.offsetTop,i=0;i<t.view.length;i++){var E=t.view[i],H=e.options.lineWrapping,J=void 0,q=0;if(E.hidden)continue;if(K&&j<8){var ee=E.node.offsetTop+E.node.offsetHeight;J=ee-l,l=ee}else{var re=E.node.getBoundingClientRect();J=re.bottom-re.top,!H&&E.text.firstChild&&(q=E.text.firstChild.getBoundingClientRect().right-re.left-1)}var _e=E.line.height-J;if((_e>.005||_e<-.005)&&(en(E.line,J),Cs(E.line),E.rest))for(var Le=0;Le<E.rest.length;Le++)Cs(E.rest[Le]);if(q>e.display.sizerWidth){var Qe=Math.ceil(q/Ei(e.display));Qe>e.display.maxLineLength&&(e.display.maxLineLength=Qe,e.display.maxLine=E.line,e.display.maxLineChanged=!0)}}}function Cs(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var l=e.widgets[t],i=l.node.parentNode;i&&(l.height=i.offsetHeight)}}function ca(e,t,l){var i=l&&l.top!=null?Math.max(0,l.top):e.scroller.scrollTop;i=Math.floor(i-ta(e));var E=l&&l.bottom!=null?l.bottom:i+e.wrapper.clientHeight,H=cn(t,i),J=cn(t,E);if(l&&l.ensure){var q=l.ensure.from.line,ee=l.ensure.to.line;q<H?(H=q,J=cn(t,_r(Rt(t,q))+e.wrapper.clientHeight)):Math.min(ee,t.lastLine())>=J&&(H=cn(t,_r(Rt(t,ee))-e.wrapper.clientHeight),J=ee)}return{from:H,to:Math.max(J,H+1)}}function Ys(e,t){if(Xe(e,"scrollCursorIntoView"))return;var l=e.display,i=l.sizer.getBoundingClientRect(),E=null;if(t.top+i.top<0?E=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(E=!1),E!=null&&!r){var H=h("div","\u200B",null,`position: absolute;
top: `+(t.top-l.viewOffset-ta(e.display))+`px;
height: `+(t.bottom-t.top+Yr(e)+l.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(H),H.scrollIntoView(E),e.display.lineSpace.removeChild(H)}}function Xs(e,t,l,i){i==null&&(i=0);var E;!e.options.lineWrapping&&t==l&&(t=t.ch?gt(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,l=t.sticky=="before"?gt(t.line,t.ch+1,"before"):t);for(var H=0;H<5;H++){var J=!1,q=Wr(e,t),ee=!l||l==t?q:Wr(e,l);E={left:Math.min(q.left,ee.left),top:Math.min(q.top,ee.top)-i,right:Math.max(q.left,ee.left),bottom:Math.max(q.bottom,ee.bottom)+i};var re=Ka(e,E),_e=e.doc.scrollTop,Le=e.doc.scrollLeft;if(re.scrollTop!=null&&(zi(e,re.scrollTop),Math.abs(e.doc.scrollTop-_e)>1&&(J=!0)),re.scrollLeft!=null&&(wi(e,re.scrollLeft),Math.abs(e.doc.scrollLeft-Le)>1&&(J=!0)),!J)break}return E}function Os(e,t){var l=Ka(e,t);l.scrollTop!=null&&zi(e,l.scrollTop),l.scrollLeft!=null&&wi(e,l.scrollLeft)}function Ka(e,t){var l=e.display,i=Ri(e.display);t.top<0&&(t.top=0);var E=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:l.scroller.scrollTop,H=ra(e),J={};t.bottom-t.top>H&&(t.bottom=t.top+H);var q=e.doc.height+na(l),ee=t.top<i,re=t.bottom>q-i;if(t.top<E)J.scrollTop=ee?0:t.top;else if(t.bottom>E+H){var _e=Math.min(t.top,(re?q:t.bottom)-H);_e!=E&&(J.scrollTop=_e)}var Le=e.options.fixedGutter?0:l.gutters.offsetWidth,Qe=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:l.scroller.scrollLeft-Le,ze=vi(e)-l.gutters.offsetWidth,ft=t.right-t.left>ze;return ft&&(t.right=t.left+ze),t.left<10?J.scrollLeft=0:t.left<Qe?J.scrollLeft=Math.max(0,t.left+Le-(ft?0:10)):t.right>ze+Qe-3&&(J.scrollLeft=t.right+(ft?0:10)-ze),J}function Ga(e,t){if(t==null)return;da(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Ii(e){da(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Gi(e,t,l){(t!=null||l!=null)&&da(e),t!=null&&(e.curOp.scrollLeft=t),l!=null&&(e.curOp.scrollTop=l)}function Qs(e,t){da(e),e.curOp.scrollToPos=t}function da(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var l=_s(e,t.from),i=_s(e,t.to);ii(e,l,i,t.margin)}}function ii(e,t,l,i){var E=Ka(e,{left:Math.min(t.left,l.left),top:Math.min(t.top,l.top)-i,right:Math.max(t.right,l.right),bottom:Math.max(t.bottom,l.bottom)+i});Gi(e,E.scrollLeft,E.scrollTop)}function zi(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;U||Xi(e,{top:t}),Rs(e,t,!0),U&&Xi(e),Qr(e,100)}function Rs(e,t,l){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!l)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function wi(e,t,l,i){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(l?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!i)return;e.doc.scrollLeft=t,fa(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function Vi(e){var t=e.display,l=t.gutters.offsetWidth,i=Math.round(e.doc.height+na(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?l:0,docHeight:i,scrollHeight:i+Yr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:l}}var kt=function(e,t,l){this.cm=l;var i=this.vert=h("div",[h("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=h("div",[h("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=E.tabIndex=-1,e(i),e(E),Ie(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Ie(E,"scroll",function(){E.clientWidth&&t(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,K&&j<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};kt.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,l=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(l){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var E=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=l?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var H=e.viewWidth-e.barLeft-(l?i:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+H)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(i==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:l?i:0,bottom:t?i:0}},kt.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},kt.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},kt.prototype.zeroWidthHack=function(){var e=s&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $,this.disableVert=new $},kt.prototype.enableZeroWidthBar=function(e,t,l){e.style.pointerEvents="auto";function i(){var E=e.getBoundingClientRect(),H=l=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);H!=e?e.style.pointerEvents="none":t.set(1e3,i)}t.set(1e3,i)},kt.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var he=function(){};he.prototype.update=function(){return{bottom:0,right:0}},he.prototype.setScrollLeft=function(){},he.prototype.setScrollTop=function(){},he.prototype.clear=function(){};function rt(e,t){t||(t=Vi(e));var l=e.display.barWidth,i=e.display.barHeight;He(e,t);for(var E=0;E<4&&l!=e.display.barWidth||i!=e.display.barHeight;E++)l!=e.display.barWidth&&e.options.lineWrapping&&ua(e),He(e,Vi(e)),l=e.display.barWidth,i=e.display.barHeight}function He(e,t){var l=e.display,i=l.scrollbars.update(t);l.sizer.style.paddingRight=(l.barWidth=i.right)+"px",l.sizer.style.paddingBottom=(l.barHeight=i.bottom)+"px",l.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(l.scrollbarFiller.style.display="block",l.scrollbarFiller.style.height=i.bottom+"px",l.scrollbarFiller.style.width=i.right+"px"):l.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(l.gutterFiller.style.display="block",l.gutterFiller.style.height=i.bottom+"px",l.gutterFiller.style.width=t.gutterWidth+"px"):l.gutterFiller.style.display=""}var Ot={native:kt,null:he};function bt(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ot[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ie(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,l){l=="horizontal"?wi(e,t):zi(e,t)},e),e.display.scrollbars.addClass&&k(e.display.wrapper,e.display.scrollbars.addClass)}var Nt=0;function zt(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:++Nt},Tr(e.curOp)}function Lt(e){var t=e.curOp;t&&Pn(t,function(l){for(var i=0;i<l.ops.length;i++)l.ops[i].cm.curOp=null;sn(l)})}function sn(e){for(var t=e.ops,l=0;l<t.length;l++)Ht(t[l]);for(var i=0;i<t.length;i++)Mt(t[i]);for(var E=0;E<t.length;E++)Tn(t[E]);for(var H=0;H<t.length;H++)Yn(t[H]);for(var J=0;J<t.length;J++)un(t[J])}function Ht(e){var t=e.cm,l=t.display;Va(t),e.updateMaxLine&&jr(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<l.viewFrom||e.scrollToPos.to.line>=l.viewTo)||l.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Di(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Mt(e){e.updatedDisplay=e.mustUpdate&&Yi(e.cm,e.update)}function Tn(e){var t=e.cm,l=t.display;e.updatedDisplay&&ua(t),e.barMeasure=Vi(t),l.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Da(t,l.maxLine,l.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(l.scroller.clientWidth,l.sizer.offsetLeft+e.adjustWidthTo+Yr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,l.sizer.offsetLeft+e.adjustWidthTo-vi(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=l.input.prepareSelection())}function Yn(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&wi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var l=e.focus&&e.focus==P();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,l),(e.updatedDisplay||e.startHeight!=t.doc.height)&&rt(t,e.barMeasure),e.updatedDisplay&&Ji(t,e.barMeasure),e.selectionChanged&&pi(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),l&&As(e.cm)}function un(e){var t=e.cm,l=t.display,i=t.doc;if(e.updatedDisplay&&ha(t,e.update),l.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(l.wheelStartX=l.wheelStartY=null),e.scrollTop!=null&&Rs(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&wi(t,e.scrollLeft,!0,!0),e.scrollToPos){var E=Xs(t,L(i,e.scrollToPos.from),L(i,e.scrollToPos.to),e.scrollToPos.margin);Ys(t,E)}var H=e.maybeHiddenMarkers,J=e.maybeUnhiddenMarkers;if(H)for(var q=0;q<H.length;++q)H[q].lines.length||Ke(H[q],"hide");if(J)for(var ee=0;ee<J.length;++ee)J[ee].lines.length&&Ke(J[ee],"unhide");l.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ke(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Mn(e,t){if(e.curOp)return t();zt(e);try{return t()}finally{Lt(e)}}function xn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);zt(e);try{return t.apply(e,arguments)}finally{Lt(e)}}}function Hn(e){return function(){if(this.curOp)return e.apply(this,arguments);zt(this);try{return e.apply(this,arguments)}finally{Lt(this)}}}function Un(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);zt(t);try{return e.apply(this,arguments)}finally{Lt(t)}}}function Qr(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,F(za,e))}function za(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var l=+new Date+e.options.workTime,i=Ct(e,t.highlightFrontier),E=[];t.iter(i.line,Math.min(t.first+t.size,e.display.viewTo+500),function(H){if(i.line>=e.display.viewFrom){var J=H.styles,q=H.text.length>e.options.maxHighlightLength?Et(t.mode,i.state):null,ee=Re(e,H,i,!0);q&&(i.state=q),H.styles=ee.styles;var re=H.styleClasses,_e=ee.classes;_e?H.styleClasses=_e:re&&(H.styleClasses=null);for(var Le=!J||J.length!=H.styles.length||re!=_e&&(!re||!_e||re.bgClass!=_e.bgClass||re.textClass!=_e.textClass),Qe=0;!Le&&Qe<J.length;++Qe)Le=J[Qe]!=H.styles[Qe];Le&&E.push(i.line),H.stateAfter=i.save(),i.nextLine()}else H.text.length<=e.options.maxHighlightLength&&Pt(e,H.text,i),H.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>l)return Qr(e,e.options.workDelay),!0}),t.highlightFrontier=i.line,t.modeFrontier=Math.max(t.modeFrontier,i.line),E.length&&Mn(e,function(){for(var H=0;H<E.length;H++)hi(e,E[H],"text")})}var Di=function(e,t,l){var i=e.display;this.viewport=t,this.visible=ca(i,e.doc,t),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=vi(e),this.force=l,this.dims=sa(e),this.events=[]};Di.prototype.signal=function(e,t){ge(e,t)&&this.events.push(arguments)},Di.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ke.apply(null,this.events[e])};function Va(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Yr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Yr(e)+"px",t.scrollbarsClipped=!0)}function Ya(e){if(e.hasFocus())return null;var t=P();if(!t||!g(e.display.lineDiv,t))return null;var l={activeElt:t};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&g(e.display.lineDiv,i.anchorNode)&&(l.anchorNode=i.anchorNode,l.anchorOffset=i.anchorOffset,l.focusNode=i.focusNode,l.focusOffset=i.focusOffset)}return l}function Xa(e){if(!e||!e.activeElt||e.activeElt==P())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&g(document.body,e.anchorNode)&&g(document.body,e.focusNode)){var t=window.getSelection(),l=document.createRange();l.setEnd(e.anchorNode,e.anchorOffset),l.collapse(!1),t.removeAllRanges(),t.addRange(l),t.extend(e.focusNode,e.focusOffset)}}function Yi(e,t){var l=e.display,i=e.doc;if(t.editorIsHidden)return fi(e),!1;if(!t.force&&t.visible.from>=l.viewFrom&&t.visible.to<=l.viewTo&&(l.updateLineNumbers==null||l.updateLineNumbers>=l.viewTo)&&l.renderedView==l.view&&ws(e)==0)return!1;pa(e)&&(fi(e),t.dims=sa(e));var E=i.first+i.size,H=Math.max(t.visible.from-e.options.viewportMargin,i.first),J=Math.min(E,t.visible.to+e.options.viewportMargin);l.viewFrom<H&&H-l.viewFrom<20&&(H=Math.max(i.first,l.viewFrom)),l.viewTo>J&&l.viewTo-J<20&&(J=Math.min(E,l.viewTo)),Kn&&(H=qr(e.doc,H),J=dr(e.doc,J));var q=H!=l.viewFrom||J!=l.viewTo||l.lastWrapHeight!=t.wrapperHeight||l.lastWrapWidth!=t.wrapperWidth;Fa(e,H,J),l.viewOffset=_r(Rt(e.doc,l.viewFrom)),e.display.mover.style.top=l.viewOffset+"px";var ee=ws(e);if(!q&&ee==0&&!t.force&&l.renderedView==l.view&&(l.updateLineNumbers==null||l.updateLineNumbers>=l.viewTo))return!1;var re=Ya(e);return ee>4&&(l.lineDiv.style.display="none"),Qa(e,l.updateLineNumbers,t.dims),ee>4&&(l.lineDiv.style.display=""),l.renderedView=l.view,Xa(re),b(l.cursorDiv),b(l.selectionDiv),l.gutters.style.height=l.sizer.style.minHeight=0,q&&(l.lastWrapHeight=t.wrapperHeight,l.lastWrapWidth=t.wrapperWidth,Qr(e,400)),l.updateLineNumbers=null,!0}function ha(e,t){for(var l=t.viewport,i=!0;;i=!1){if(!i||!e.options.lineWrapping||t.oldDisplayWidth==vi(e)){if(l&&l.top!=null&&(l={top:Math.min(e.doc.height+na(e.display)-ra(e),l.top)}),t.visible=ca(e.display,e.doc,l),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else i&&(t.visible=ca(e.display,e.doc,l));if(!Yi(e,t))break;ua(e);var E=Vi(e);Ti(e),rt(e,E),Ji(e,E),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Xi(e,t){var l=new Di(e,t);if(Yi(e,l)){ua(e),ha(e,l);var i=Vi(e);Ti(e),rt(e,i),Ji(e,i),l.finish()}}function Qa(e,t,l){var i=e.display,E=e.options.lineNumbers,H=i.lineDiv,J=H.firstChild;function q(ft){var xt=ft.nextSibling;return n&&s&&e.display.currentWheelTarget==ft?ft.style.display="none":ft.parentNode.removeChild(ft),xt}for(var ee=i.view,re=i.viewFrom,_e=0;_e<ee.length;_e++){var Le=ee[_e];if(!Le.hidden)if(!Le.node||Le.node.parentNode!=H){var Qe=Ks(e,Le,re,l);H.insertBefore(Qe,J)}else{for(;J!=Le.node;)J=q(J);var ze=E&&t!=null&&t<=re&&Le.lineNumber;Le.changes&&(le(Le.changes,"gutter")>-1&&(ze=!1),ci(e,Le,re,l)),ze&&(b(Le.lineNumber),Le.lineNumber.appendChild(document.createTextNode(kn(e.options,re)))),J=Le.node.nextSibling}re+=Le.size}for(;J;)J=q(J)}function Qi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ji(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Yr(e)+"px"}function fa(e){var t=e.display,l=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var i=Ua(t)-t.scroller.scrollLeft+e.doc.scrollLeft,E=t.gutters.offsetWidth,H=i+"px",J=0;J<l.length;J++)if(!l[J].hidden){e.options.fixedGutter&&(l[J].gutter&&(l[J].gutter.style.left=H),l[J].gutterBackground&&(l[J].gutterBackground.style.left=H));var q=l[J].alignable;if(q)for(var ee=0;ee<q.length;ee++)q[ee].style.left=H}e.options.fixedGutter&&(t.gutters.style.left=i+E+"px")}function pa(e){if(!e.options.lineNumbers)return!1;var t=e.doc,l=kn(e.options,t.first+t.size-1),i=e.display;if(l.length!=i.lineNumChars){var E=i.measure.appendChild(h("div",[h("div",l)],"CodeMirror-linenumber CodeMirror-gutter-elt")),H=E.firstChild.offsetWidth,J=E.offsetWidth-H;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(H,i.lineGutter.offsetWidth-J)+1,i.lineNumWidth=i.lineNumInnerWidth+J,i.lineNumChars=i.lineNumInnerWidth?l.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Qi(e.display),!0}return!1}function Zi(e,t){for(var l=[],i=!1,E=0;E<e.length;E++){var H=e[E],J=null;if(typeof H!="string"&&(J=H.style,H=H.className),H=="CodeMirror-linenumbers")if(t)i=!0;else continue;l.push({className:H,style:J})}return t&&!i&&l.push({className:"CodeMirror-linenumbers",style:null}),l}function ma(e){var t=e.gutters,l=e.gutterSpecs;b(t),e.lineGutter=null;for(var i=0;i<l.length;++i){var E=l[i],H=E.className,J=E.style,q=t.appendChild(h("div",null,"CodeMirror-gutter "+H));J&&(q.style.cssText=J),H=="CodeMirror-linenumbers"&&(e.lineGutter=q,q.style.width=(e.lineNumWidth||1)+"px")}t.style.display=l.length?"":"none",Qi(e)}function Si(e){ma(e.display),Zn(e),fa(e)}function Ja(e,t,l,i){var E=this;this.input=l,E.scrollbarFiller=h("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=h("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=C("div",null,"CodeMirror-code"),E.selectionDiv=h("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=h("div",null,"CodeMirror-cursors"),E.measure=h("div",null,"CodeMirror-measure"),E.lineMeasure=h("div",null,"CodeMirror-measure"),E.lineSpace=C("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var H=C("div",[E.lineSpace],"CodeMirror-lines");E.mover=h("div",[H],null,"position: relative"),E.sizer=h("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=h("div",null,null,"position: absolute; height: "+de+"px; width: 1px;"),E.gutters=h("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=h("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=h("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),K&&j<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!n&&!(U&&o)&&(E.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(E.wrapper):e(E.wrapper)),E.viewFrom=E.viewTo=t.first,E.reportedViewFrom=E.reportedViewTo=t.first,E.view=[],E.renderedView=null,E.externalMeasured=null,E.viewOffset=0,E.lastWrapHeight=E.lastWrapWidth=0,E.updateLineNumbers=null,E.nativeBarWidth=E.barHeight=E.barWidth=0,E.scrollbarsClipped=!1,E.lineNumWidth=E.lineNumInnerWidth=E.lineNumChars=null,E.alignWidgets=!1,E.cachedCharWidth=E.cachedTextHeight=E.cachedPaddingH=null,E.maxLine=null,E.maxLineLength=0,E.maxLineChanged=!1,E.wheelDX=E.wheelDY=E.wheelStartX=E.wheelStartY=null,E.shift=!1,E.selForContextMenu=null,E.activeTouch=null,E.gutterSpecs=Zi(i.gutters,i.lineNumbers),ma(E),l.init(E)}var Li=0,vr=null;K?vr=-.53:U?vr=15:m?vr=-.7:p&&(vr=-1/3);function ga(e){var t=e.wheelDeltaX,l=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),l==null&&e.detail&&e.axis==e.VERTICAL_AXIS?l=e.detail:l==null&&(l=e.wheelDelta),{x:t,y:l}}function fo(e){var t=ga(e);return t.x*=vr,t.y*=vr,t}function hr(e,t){var l=ga(t),i=l.x,E=l.y,H=e.display,J=H.scroller,q=J.scrollWidth>J.clientWidth,ee=J.scrollHeight>J.clientHeight;if(!(i&&q||E&&ee))return;if(E&&s&&n){e:for(var re=t.target,_e=H.view;re!=J;re=re.parentNode)for(var Le=0;Le<_e.length;Le++)if(_e[Le].node==re){e.display.currentWheelTarget=re;break e}}if(i&&!U&&!f&&vr!=null){E&&ee&&zi(e,Math.max(0,J.scrollTop+E*vr)),wi(e,Math.max(0,J.scrollLeft+i*vr)),(!E||E&&ee)&&ie(t),H.wheelStartX=null;return}if(E&&vr!=null){var Qe=E*vr,ze=e.doc.scrollTop,ft=ze+H.wrapper.clientHeight;Qe<0?ze=Math.max(0,ze+Qe-50):ft=Math.min(e.doc.height,ft+Qe+50),Xi(e,{top:ze,bottom:ft})}Li<20&&(H.wheelStartX==null?(H.wheelStartX=J.scrollLeft,H.wheelStartY=J.scrollTop,H.wheelDX=i,H.wheelDY=E,setTimeout(function(){if(H.wheelStartX==null)return;var xt=J.scrollLeft-H.wheelStartX,It=J.scrollTop-H.wheelStartY,Bt=It&&H.wheelDY&&It/H.wheelDY||xt&&H.wheelDX&&xt/H.wheelDX;if(H.wheelStartX=H.wheelStartY=null,!Bt)return;vr=(vr*Li+Bt)/(Li+1),++Li},200)):(H.wheelDX+=i,H.wheelDY+=E))}var Bn=function(e,t){this.ranges=e,this.primIndex=t};Bn.prototype.primary=function(){return this.ranges[this.primIndex]},Bn.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var l=this.ranges[t],i=e.ranges[t];if(!Jt(l.anchor,i.anchor)||!Jt(l.head,i.head))return!1}return!0},Bn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new wn(tn(this.ranges[t].anchor),tn(this.ranges[t].head));return new Bn(e,this.primIndex)},Bn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Bn.prototype.contains=function(e,t){t||(t=e);for(var l=0;l<this.ranges.length;l++){var i=this.ranges[l];if(Wt(t,i.from())>=0&&Wt(e,i.to())<=0)return l}return-1};var wn=function(e,t){this.anchor=e,this.head=t};wn.prototype.from=function(){return pn(this.anchor,this.head)},wn.prototype.to=function(){return nn(this.anchor,this.head)},wn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function fr(e,t,l){var i=e&&e.options.selectionsMayTouch,E=t[l];t.sort(function(Qe,ze){return Wt(Qe.from(),ze.from())}),l=le(t,E);for(var H=1;H<t.length;H++){var J=t[H],q=t[H-1],ee=Wt(q.to(),J.from());if(i&&!J.empty()?ee>0:ee>=0){var re=pn(q.from(),J.from()),_e=nn(q.to(),J.to()),Le=q.empty()?J.from()==J.head:q.from()==q.head;H<=l&&--l,t.splice(--H,2,new wn(Le?_e:re,Le?re:_e))}}return new Bn(t,l)}function Sr(e,t){return new Bn([new wn(e,t||e)],0)}function ti(e){return e.text?gt(e.from.line+e.text.length-1,ne(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ai(e,t){if(Wt(e,t.from)<0)return e;if(Wt(e,t.to)<=0)return ti(t);var l=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=ti(t).ch-t.to.ch),gt(l,i)}function va(e,t){for(var l=[],i=0;i<e.sel.ranges.length;i++){var E=e.sel.ranges[i];l.push(new wn(ai(E.anchor,t),ai(E.head,t)))}return fr(e.cm,l,e.sel.primIndex)}function po(e,t,l){return e.line==t.line?gt(l.line,e.ch-t.ch+l.ch):gt(l.line+(e.line-t.line),e.ch)}function hl(e,t,l){for(var i=[],E=gt(e.first,0),H=E,J=0;J<t.length;J++){var q=t[J],ee=po(q.from,E,H),re=po(ti(q),E,H);if(E=q.to,H=re,l=="around"){var _e=e.sel.ranges[J],Le=Wt(_e.head,_e.anchor)<0;i[J]=new wn(Le?re:ee,Le?ee:re)}else i[J]=new wn(ee,ee)}return new Bn(i,e.sel.primIndex)}function Js(e){e.doc.mode=Ze(e.options,e.doc.modeOption),Za(e)}function Za(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Qr(e,100),e.state.modeGen++,e.curOp&&Zn(e)}function mo(e,t){return t.from.ch==0&&t.to.ch==0&&ne(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Zs(e,t,l,i){function E(Kt){return l?l[Kt]:null}function H(Kt,Ft,Xt){ui(Kt,Ft,Xt,i),Rn(Kt,"change",Kt,t)}function J(Kt,Ft){for(var Xt=[],ln=Kt;ln<Ft;++ln)Xt.push(new xr(re[ln],E(ln),i));return Xt}var q=t.from,ee=t.to,re=t.text,_e=Rt(e,q.line),Le=Rt(e,ee.line),Qe=ne(re),ze=E(re.length-1),ft=ee.line-q.line;if(t.full)e.insert(0,J(0,re.length)),e.remove(re.length,e.size-re.length);else if(mo(e,t)){var xt=J(0,re.length-1);H(Le,Le.text,ze),ft&&e.remove(q.line,ft),xt.length&&e.insert(q.line,xt)}else if(_e==Le)if(re.length==1)H(_e,_e.text.slice(0,q.ch)+Qe+_e.text.slice(ee.ch),ze);else{var It=J(1,re.length-1);It.push(new xr(Qe+_e.text.slice(ee.ch),ze,i)),H(_e,_e.text.slice(0,q.ch)+re[0],E(0)),e.insert(q.line+1,It)}else if(re.length==1)H(_e,_e.text.slice(0,q.ch)+re[0]+Le.text.slice(ee.ch),E(0)),e.remove(q.line+1,ft);else{H(_e,_e.text.slice(0,q.ch)+re[0],E(0)),H(Le,Qe+Le.text.slice(ee.ch),ze);var Bt=J(1,re.length-1);ft>1&&e.remove(q.line+1,ft-1),e.insert(q.line+1,Bt)}Rn(e,"change",e,t)}function Mi(e,t,l){function i(E,H,J){if(E.linked)for(var q=0;q<E.linked.length;++q){var ee=E.linked[q];if(ee.doc==H)continue;var re=J&&ee.sharedHist;if(l&&!re)continue;t(ee.doc,re),i(ee.doc,E,re)}}i(e,null,!0)}function go(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,oa(e),Js(e),vo(e),e.options.lineWrapping||jr(e),e.options.mode=t.modeOption,Zn(e)}function vo(e){(e.doc.direction=="rtl"?k:_)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){Mn(e,function(){vo(e),Zn(e)})}function Is(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 qs(e,t){var l={from:tn(t.from),to:ti(t),text:qt(e,t.from,t.to)};return Eo(e,l,t.from.line,t.to.line+1),Mi(e,function(i){return Eo(i,l,t.from.line,t.to.line+1)},!0),l}function yo(e){for(;e.length;){var t=ne(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return yo(e.done),ne(e.done);if(e.done.length&&!ne(e.done).ranges)return ne(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ne(e.done)}function bo(e,t,l,i){var E=e.history;E.undone.length=0;var H=+new Date,J,q;if((E.lastOp==i||E.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&E.lastModTime>H-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(J=pl(E,E.lastOp==i)))q=ne(J.changes),Wt(t.from,t.to)==0&&Wt(t.from,q.to)==0?q.to=ti(t):J.changes.push(qs(e,t));else{var ee=ne(E.done);for((!ee||!ee.ranges)&&Ds(e.sel,E.done),J={changes:[qs(e,t)],generation:E.generation},E.done.push(J);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(l),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=H,E.lastOp=E.lastSelOp=i,E.lastOrigin=E.lastSelOrigin=t.origin,q||Ke(e,"historyAdded")}function ml(e,t,l,i){var E=t.charAt(0);return E=="*"||E=="+"&&l.ranges.length==i.ranges.length&&l.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,l,i){var E=e.history,H=i&&i.origin;l==E.lastSelOp||H&&E.lastSelOrigin==H&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==H||ml(e,H,ne(E.done),t))?E.done[E.done.length-1]=t:Ds(t,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=H,E.lastSelOp=l,i&&i.clearRedo!==!1&&yo(E.undone)}function Ds(e,t){var l=ne(t);l&&l.ranges&&l.equals(e)||t.push(e)}function Eo(e,t,l,i){var E=t["spans_"+e.id],H=0;e.iter(Math.max(e.first,l),Math.min(e.first+e.size,i),function(J){J.markedSpans&&((E||(E=t["spans_"+e.id]={}))[H]=J.markedSpans),++H})}function vl(e){if(!e)return null;for(var t,l=0;l<e.length;++l)e[l].marker.explicitlyCleared?t||(t=e.slice(0,l)):t&&t.push(e[l]);return t?t.length?t:null:e}function yl(e,t){var l=t["spans_"+e.id];if(!l)return null;for(var i=[],E=0;E<t.text.length;++E)i.push(vl(l[E]));return i}function _o(e,t){var l=yl(e,t),i=Nr(e,t);if(!l)return i;if(!i)return l;for(var E=0;E<l.length;++E){var H=l[E],J=i[E];if(H&&J){e:for(var q=0;q<J.length;++q){for(var ee=J[q],re=0;re<H.length;++re)if(H[re].marker==ee.marker)continue e;H.push(ee)}}else J&&(l[E]=J)}return l}function ya(e,t,l){for(var i=[],E=0;E<e.length;++E){var H=e[E];if(H.ranges){i.push(l?Bn.prototype.deepCopy.call(H):H);continue}var J=H.changes,q=[];i.push({changes:q});for(var ee=0;ee<J.length;++ee){var re=J[ee],_e=void 0;if(q.push({from:re.from,to:re.to,text:re.text}),t)for(var Le in re)(_e=Le.match(/^spans_(\d+)$/))&&(le(t,Number(_e[1]))>-1&&(ne(q)[Le]=re[Le],delete re[Le]))}}return i}function $s(e,t,l,i){if(i){var E=e.anchor;if(l){var H=Wt(t,E)<0;H!=Wt(l,E)<0?(E=t,t=l):H!=Wt(t,l)<0&&(t=l)}return new wn(E,t)}else return new wn(l||t,t)}function Ls(e,t,l,i,E){E==null&&(E=e.cm&&(e.cm.display.shift||e.extend)),yr(e,new Bn([$s(e.sel.primary(),t,l,E)],0),i)}function xo(e,t,l){for(var i=[],E=e.cm&&(e.cm.display.shift||e.extend),H=0;H<e.sel.ranges.length;H++)i[H]=$s(e.sel.ranges[H],t[H],null,E);var J=fr(e.cm,i,e.sel.primIndex);yr(e,J,l)}function eo(e,t,l,i){var E=e.sel.ranges.slice(0);E[t]=l,yr(e,fr(e.cm,E,e.sel.primIndex),i)}function To(e,t,l,i){yr(e,Sr(t,l),i)}function bl(e,t,l){var i={ranges:t.ranges,update:function(E){this.ranges=[];for(var H=0;H<E.length;H++)this.ranges[H]=new wn(L(e,E[H].anchor),L(e,E[H].head))},origin:l&&l.origin};return Ke(e,"beforeSelectionChange",e,i),e.cm&&Ke(e.cm,"beforeSelectionChange",e.cm,i),i.ranges!=t.ranges?fr(e.cm,i.ranges,i.ranges.length-1):t}function wo(e,t,l){var i=e.history.done,E=ne(i);E&&E.ranges?(i[i.length-1]=t,Ms(e,t,l)):yr(e,t,l)}function yr(e,t,l){Ms(e,t,l),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,l)}function Ms(e,t,l){(ge(e,"beforeSelectionChange")||e.cm&&ge(e.cm,"beforeSelectionChange"))&&(t=bl(e,t,l));var i=l&&l.bias||(Wt(t.primary().head,e.sel.primary().head)<0?-1:1);So(e,Co(e,t,i,!0)),!(l&&l.scroll===!1)&&e.cm&&Ii(e.cm)}function So(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ce(e.cm)),Rn(e,"cursorActivity",e)}function Ao(e){So(e,Co(e,e.sel,null,!1))}function Co(e,t,l,i){for(var E,H=0;H<t.ranges.length;H++){var J=t.ranges[H],q=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[H],ee=ks(e,J.anchor,q&&q.anchor,l,i),re=ks(e,J.head,q&&q.head,l,i);(E||ee!=J.anchor||re!=J.head)&&(E||(E=t.ranges.slice(0,H)),E[H]=new wn(ee,re))}return E?fr(e.cm,E,t.primIndex):t}function ba(e,t,l,i,E){var H=Rt(e,t.line);if(H.markedSpans)for(var J=0;J<H.markedSpans.length;++J){var q=H.markedSpans[J],ee=q.marker,re="selectLeft"in ee?!ee.selectLeft:ee.inclusiveLeft,_e="selectRight"in ee?!ee.selectRight:ee.inclusiveRight;if((q.from==null||(re?q.from<=t.ch:q.from<t.ch))&&(q.to==null||(_e?q.to>=t.ch:q.to>t.ch))){if(E&&(Ke(ee,"beforeCursorEnter"),ee.explicitlyCleared))if(H.markedSpans){--J;continue}else break;if(!ee.atomic)continue;if(l){var Le=ee.find(i<0?1:-1),Qe=void 0;if((i<0?_e:re)&&(Le=Oo(e,Le,-i,Le&&Le.line==t.line?H:null)),Le&&Le.line==t.line&&(Qe=Wt(Le,l))&&(i<0?Qe<0:Qe>0))return ba(e,Le,t,i,E)}var ze=ee.find(i<0?-1:1);return(i<0?re:_e)&&(ze=Oo(e,ze,i,ze.line==t.line?H:null)),ze?ba(e,ze,t,i,E):null}}return t}function ks(e,t,l,i,E){var H=i||1,J=ba(e,t,l,H,E)||!E&&ba(e,t,l,H,!0)||ba(e,t,l,-H,E)||!E&&ba(e,t,l,-H,!0);return J||(e.cantEdit=!0,gt(e.first,0))}function Oo(e,t,l,i){return l<0&&t.ch==0?t.line>e.first?L(e,gt(t.line-1)):null:l>0&&t.ch==(i||Rt(e,t.line)).text.length?t.line<e.first+e.size-1?gt(t.line+1,0):null:new gt(t.line,t.ch+l)}function Ro(e){e.setSelection(gt(e.firstLine(),0),gt(e.lastLine()),Se)}function Io(e,t,l){var i={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return i.canceled=!0}};return l&&(i.update=function(E,H,J,q){E&&(i.from=L(e,E)),H&&(i.to=L(e,H)),J&&(i.text=J),q!==void 0&&(i.origin=q)}),Ke(e,"beforeChange",e,i),e.cm&&Ke(e.cm,"beforeChange",e.cm,i),i.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function Ea(e,t,l){if(e.cm){if(!e.cm.curOp)return xn(e.cm,Ea)(e,t,l);if(e.cm.state.suppressEdits)return}if((ge(e,"beforeChange")||e.cm&&ge(e.cm,"beforeChange"))&&(t=Io(e,t,!0),!t))return;var i=kr&&!l&&Ur(e,t.from,t.to);if(i)for(var E=i.length-1;E>=0;--E)Do(e,{from:i[E].from,to:i[E].to,text:E?[""]:t.text,origin:t.origin});else Do(e,t)}function Do(e,t){if(t.text.length==1&&t.text[0]==""&&Wt(t.from,t.to)==0)return;var l=va(e,t);bo(e,t,l,e.cm?e.cm.curOp.id:NaN),qa(e,t,l,Nr(e,t));var i=[];Mi(e,function(E,H){!H&&le(i,E.history)==-1&&(Po(E.history,t),i.push(E.history)),qa(E,t,null,Nr(E,t))})}function Ps(e,t,l){var i=e.cm&&e.cm.state.suppressEdits;if(i&&!l)return;for(var E=e.history,H,J=e.sel,q=t=="undo"?E.done:E.undone,ee=t=="undo"?E.undone:E.done,re=0;re<q.length&&!(H=q[re],l?H.ranges&&!H.equals(e.sel):!H.ranges);re++);if(re==q.length)return;for(E.lastOrigin=E.lastSelOrigin=null;;)if(H=q.pop(),H.ranges){if(Ds(H,ee),l&&!H.equals(e.sel)){yr(e,H,{clearRedo:!1});return}J=H}else if(i){q.push(H);return}else break;var _e=[];Ds(J,ee),ee.push({changes:_e,generation:E.generation}),E.generation=H.generation||++E.maxGeneration;for(var Le=ge(e,"beforeChange")||e.cm&&ge(e.cm,"beforeChange"),Qe=function(xt){var It=H.changes[xt];if(It.origin=t,Le&&!Io(e,It,!1))return q.length=0,{};_e.push(qs(e,It));var Bt=xt?va(e,It):ne(q);qa(e,It,Bt,_o(e,It)),!xt&&e.cm&&e.cm.scrollIntoView({from:It.from,to:ti(It)});var Kt=[];Mi(e,function(Ft,Xt){!Xt&&le(Kt,Ft.history)==-1&&(Po(Ft.history,It),Kt.push(Ft.history)),qa(Ft,It,null,_o(Ft,It))})},ze=H.changes.length-1;ze>=0;--ze){var ft=Qe(ze);if(ft)return ft.v}}function Lo(e,t){if(t==0)return;if(e.first+=t,e.sel=new Bn(Ee(e.sel.ranges,function(E){return new wn(gt(E.anchor.line+t,E.anchor.ch),gt(E.head.line+t,E.head.ch))}),e.sel.primIndex),e.cm){Zn(e.cm,e.first,e.first-t,t);for(var l=e.cm.display,i=l.viewFrom;i<l.viewTo;i++)hi(e.cm,i,"gutter")}}function qa(e,t,l,i){if(e.cm&&!e.cm.curOp)return xn(e.cm,qa)(e,t,l,i);if(t.to.line<e.first){Lo(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var E=t.text.length-1-(e.first-t.from.line);Lo(e,E),t={from:gt(e.first,0),to:gt(t.to.line+E,t.to.ch),text:[ne(t.text)],origin:t.origin}}var H=e.lastLine();t.to.line>H&&(t={from:t.from,to:gt(H,Rt(e,H).text.length),text:[t.text[0]],origin:t.origin}),t.removed=qt(e,t.from,t.to),l||(l=va(e,t)),e.cm?El(e.cm,t,i):Zs(e,t,i),Ms(e,l,Se),e.cantEdit&&ks(e,gt(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,l){var i=e.doc,E=e.display,H=t.from,J=t.to,q=!1,ee=H.line;e.options.lineWrapping||(ee=Yt(gn(Rt(i,H.line))),i.iter(ee,J.line+1,function(ze){if(ze==E.maxLine)return q=!0,!0})),i.sel.contains(t.from,t.to)>-1&&Ce(e),Zs(i,t,l,Ba(e)),e.options.lineWrapping||(i.iter(ee,H.line+t.text.length,function(ze){var ft=li(ze);ft>E.maxLineLength&&(E.maxLine=ze,E.maxLineLength=ft,E.maxLineChanged=!0,q=!1)}),q&&(e.curOp.updateMaxLine=!0)),mr(i,H.line),Qr(e,400);var re=t.text.length-(J.line-H.line)-1;t.full?Zn(e):H.line==J.line&&t.text.length==1&&!mo(e.doc,t)?hi(e,H.line,"text"):Zn(e,H.line,J.line+1,re);var _e=ge(e,"changes"),Le=ge(e,"change");if(Le||_e){var Qe={from:H,to:J,text:t.text,removed:t.removed,origin:t.origin};Le&&Rn(e,"change",e,Qe),_e&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Qe)}e.display.selForContextMenu=null}function _a(e,t,l,i,E){var H;i||(i=l),Wt(i,l)<0&&(H=[i,l],l=H[0],i=H[1]),typeof t=="string"&&(t=e.splitLines(t)),Ea(e,{from:l,to:i,text:t,origin:E})}function Mo(e,t,l,i){l<e.line?e.line+=i:t<e.line&&(e.line=t,e.ch=0)}function ko(e,t,l,i){for(var E=0;E<e.length;++E){var H=e[E],J=!0;if(H.ranges){H.copied||(H=e[E]=H.deepCopy(),H.copied=!0);for(var q=0;q<H.ranges.length;q++)Mo(H.ranges[q].anchor,t,l,i),Mo(H.ranges[q].head,t,l,i);continue}for(var ee=0;ee<H.changes.length;++ee){var re=H.changes[ee];if(l<re.from.line)re.from=gt(re.from.line+i,re.from.ch),re.to=gt(re.to.line+i,re.to.ch);else if(t<=re.to.line){J=!1;break}}J||(e.splice(0,E+1),E=0)}}function Po(e,t){var l=t.from.line,i=t.to.line,E=t.text.length-(i-l)-1;ko(e.done,l,i,E),ko(e.undone,l,i,E)}function $a(e,t,l,i){var E=t,H=t;return typeof t=="number"?H=Rt(e,X(e,t)):E=Yt(t),E==null?null:(i(H,E)&&e.cm&&hi(e.cm,E,l),H)}function es(e){this.lines=e,this.parent=null;for(var t=0,l=0;l<e.length;++l)e[l].parent=this,t+=e[l].height;this.height=t}es.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var l=e,i=e+t;l<i;++l){var E=this.lines[l];this.height-=E.height,Gt(E),Rn(E,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,l){this.height+=l,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=this},iterN:function(e,t,l){for(var i=e+t;e<i;++e)if(l(this.lines[e]))return!0}};function ts(e){this.children=e;for(var t=0,l=0,i=0;i<e.length;++i){var E=e[i];t+=E.chunkSize(),l+=E.height,E.parent=this}this.size=t,this.height=l,this.parent=null}ts.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var l=0;l<this.children.length;++l){var i=this.children[l],E=i.chunkSize();if(e<E){var H=Math.min(t,E-e),J=i.height;if(i.removeInner(e,H),this.height-=J-i.height,E==H&&(this.children.splice(l--,1),i.parent=null),(t-=H)==0)break;e=0}else e-=E}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof es))){var q=[];this.collapse(q),this.children=[new es(q)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,l){this.size+=t.length,this.height+=l;for(var i=0;i<this.children.length;++i){var E=this.children[i],H=E.chunkSize();if(e<=H){if(E.insertInner(e,t,l),E.lines&&E.lines.length>50){for(var J=E.lines.length%25+25,q=J;q<E.lines.length;){var ee=new es(E.lines.slice(q,q+=25));E.height-=ee.height,this.children.splice(++i,0,ee),ee.parent=this}E.lines=E.lines.slice(0,J),this.maybeSpill()}break}e-=H}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),l=new ts(t);if(e.parent){e.size-=l.size,e.height-=l.height;var E=le(e.parent.children,e);e.parent.children.splice(E+1,0,l)}else{var i=new ts(e.children);i.parent=e,e.children=[i,l],e=i}l.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,l){for(var i=0;i<this.children.length;++i){var E=this.children[i],H=E.chunkSize();if(e<H){var J=Math.min(t,H-e);if(E.iterN(e,J,l))return!0;if((t-=J)==0)break;e=0}else e-=H}}};var ns=function(e,t,l){if(l)for(var i in l)l.hasOwnProperty(i)&&(this[i]=l[i]);this.doc=e,this.node=t};ns.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,l=this.line,i=Yt(l);if(i==null||!t)return;for(var E=0;E<t.length;++E)t[E]==this&&t.splice(E--,1);t.length||(l.widgets=null);var H=gi(this);en(l,Math.max(0,l.height-H)),e&&(Mn(e,function(){No(e,l,-H),hi(e,i,"widget")}),Rn(e,"lineWidgetCleared",e,this,i))},ns.prototype.changed=function(){var e=this,t=this.height,l=this.doc.cm,i=this.line;this.height=null;var E=gi(this)-t;if(!E)return;Fr(this.doc,i)||en(i,i.height+E),l&&Mn(l,function(){l.curOp.forceUpdate=!0,No(l,i,E),Rn(l,"lineWidgetChanged",l,e,Yt(i))})},be(ns);function No(e,t,l){_r(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ga(e,l)}function _l(e,t,l,i){var E=new ns(e,l,i),H=e.cm;return H&&E.noHScroll&&(H.display.alignWidgets=!0),$a(e,t,"widget",function(J){var q=J.widgets||(J.widgets=[]);if(E.insertAt==null?q.push(E):q.splice(Math.min(q.length-1,Math.max(0,E.insertAt)),0,E),E.line=J,H&&!Fr(e,J)){var ee=_r(J)<e.scrollTop;en(J,J.height+gi(E)),ee&&Ga(H,E.height),H.curOp.forceUpdate=!0}return!0}),H&&Rn(H,"lineWidgetAdded",H,E,typeof t=="number"?t:Yt(t)),E}var Uo=0,ki=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Uo};ki.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&zt(e),ge(this,"clear")){var l=this.find();l&&Rn(this,"clear",l.from,l.to)}for(var i=null,E=null,H=0;H<this.lines.length;++H){var J=this.lines[H],q=nr(J.markedSpans,this);e&&!this.collapsed?hi(e,Yt(J),"text"):e&&(q.to!=null&&(E=Yt(J)),q.from!=null&&(i=Yt(J))),J.markedSpans=Kr(J.markedSpans,q),q.from==null&&this.collapsed&&!Fr(this.doc,J)&&e&&en(J,Ri(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ee=0;ee<this.lines.length;++ee){var re=gn(this.lines[ee]),_e=li(re);_e>e.display.maxLineLength&&(e.display.maxLine=re,e.display.maxLineLength=_e,e.display.maxLineChanged=!0)}i!=null&&e&&this.collapsed&&Zn(e,i,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ao(e.doc)),e&&Rn(e,"markerCleared",e,this,i,E),t&&Lt(e),this.parent&&this.parent.clear()},ki.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var l,i,E=0;E<this.lines.length;++E){var H=this.lines[E],J=nr(H.markedSpans,this);if(J.from!=null&&(l=gt(t?H:Yt(H),J.from),e==-1))return l;if(J.to!=null&&(i=gt(t?H:Yt(H),J.to),e==1))return i}return l&&{from:l,to:i}},ki.prototype.changed=function(){var e=this,t=this.find(-1,!0),l=this,i=this.doc.cm;if(!t||!i)return;Mn(i,function(){var E=t.line,H=Yt(t.line),J=wr(i,H);if(J&&(bs(J),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!Fr(l.doc,E)&&l.height!=null){var q=l.height;l.height=null;var ee=gi(l)-q;ee&&en(E,E.height+ee)}Rn(i,"markerChanged",i,e)})},ki.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||le(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ki.prototype.detachLine=function(e){if(this.lines.splice(le(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},be(ki);function xa(e,t,l,i,E){if(i&&i.shared)return xl(e,t,l,i,E);if(e.cm&&!e.cm.curOp)return xn(e.cm,xa)(e,t,l,i,E);var H=new ki(e,E),J=Wt(t,l);if(i&&T(i,H,!1),J>0||J==0&&H.clearWhenEmpty!==!1)return H;if(H.replacedWith&&(H.collapsed=!0,H.widgetNode=C("span",[H.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||H.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(H.widgetNode.insertLeft=!0)),H.collapsed){if(Qn(e,t.line,t,l,H)||t.line!=l.line&&Qn(e,l.line,t,l,H))throw new Error("Inserting collapsed marker partially overlapping an existing one");Cr()}H.addToHistory&&bo(e,{from:t,to:l,origin:"markText"},e.sel,NaN);var q=t.line,ee=e.cm,re;if(e.iter(q,l.line+1,function(Le){ee&&H.collapsed&&!ee.options.lineWrapping&&gn(Le)==ee.display.maxLine&&(re=!0),H.collapsed&&q!=t.line&&en(Le,0),Pr(Le,new Er(H,q==t.line?t.ch:null,q==l.line?l.ch:null)),++q}),H.collapsed&&e.iter(t.line,l.line+1,function(Le){Fr(e,Le)&&en(Le,0)}),H.clearOnEnter&&Ie(H,"beforeCursorEnter",function(){return H.clear()}),H.readOnly&&(or(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),H.collapsed&&(H.id=++Uo,H.atomic=!0),ee){if(re&&(ee.curOp.updateMaxLine=!0),H.collapsed)Zn(ee,t.line,l.line+1);else if(H.className||H.startStyle||H.endStyle||H.css||H.attributes||H.title)for(var _e=t.line;_e<=l.line;_e++)hi(ee,_e,"text");H.atomic&&Ao(ee.doc),Rn(ee,"markerAdded",ee,H)}return H}var rs=function(e,t){this.markers=e,this.primary=t;for(var l=0;l<e.length;++l)e[l].parent=this};rs.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Rn(this,"clear")},rs.prototype.find=function(e,t){return this.primary.find(e,t)},be(rs);function xl(e,t,l,i,E){i=T(i),i.shared=!1;var H=[xa(e,t,l,i,E)],J=H[0],q=i.widgetNode;return Mi(e,function(ee){q&&(i.widgetNode=q.cloneNode(!0)),H.push(xa(ee,L(ee,t),L(ee,l),i,E));for(var re=0;re<ee.linked.length;++re)if(ee.linked[re].isParent)return;J=ne(H)}),new rs(H,J)}function Bo(e){return e.findMarks(gt(e.first,0),e.clipPos(gt(e.lastLine())),function(t){return t.parent})}function Tl(e,t){for(var l=0;l<t.length;l++){var i=t[l],E=i.find(),H=e.clipPos(E.from),J=e.clipPos(E.to);if(Wt(H,J)){var q=xa(e,H,J,i.primary,i.primary.type);i.markers.push(q),q.parent=i}}}function wl(e){for(var t=function(i){var E=e[i],H=[E.primary.doc];Mi(E.primary.doc,function(ee){return H.push(ee)});for(var J=0;J<E.markers.length;J++){var q=E.markers[J];le(H,q.doc)==-1&&(q.parent=null,E.markers.splice(J--,1))}},l=0;l<e.length;l++)t(l)}var Sl=0,Ir=function(e,t,l,i,E){if(!(this instanceof Ir))return new Ir(e,t,l,i,E);l==null&&(l=0),ts.call(this,[new es([new xr("",null)])]),this.first=l,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=l;var H=gt(l,0);this.sel=Sr(H),this.history=new Is(null),this.id=++Sl,this.modeOption=t,this.lineSep=i,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Zs(this,{from:H,to:H,text:e}),yr(this,Sr(H),Se)};Ir.prototype=je(ts.prototype,{constructor:Ir,iter:function(e,t,l){l?this.iterN(e-this.first,t-e,l):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var l=0,i=0;i<t.length;++i)l+=t[i].height;this.insertInner(e-this.first,t,l)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Qt(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Un(function(e){var t=gt(this.first,0),l=this.first+this.size-1;Ea(this,{from:t,to:gt(l,Rt(this,l).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Gi(this.cm,0,0),yr(this,Sr(t),Se)}),replaceRange:function(e,t,l,i){t=L(this,t),l=l?L(this,l):t,_a(this,e,t,l,i)},getRange:function(e,t,l){var i=qt(this,L(this,e),L(this,t));return l===!1?i:i.join(l||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Sn(this,e))return Rt(this,e)},getLineNumber:function(e){return Yt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Rt(this,e)),gn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return L(this,e)},getCursor:function(e){var t=this.sel.primary(),l;return e==null||e=="head"?l=t.head:e=="anchor"?l=t.anchor:e=="end"||e=="to"||e===!1?l=t.to():l=t.from(),l},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Un(function(e,t,l){To(this,L(this,typeof e=="number"?gt(e,t||0):e),null,l)}),setSelection:Un(function(e,t,l){To(this,L(this,e),L(this,t||e),l)}),extendSelection:Un(function(e,t,l){Ls(this,L(this,e),t&&L(this,t),l)}),extendSelections:Un(function(e,t){xo(this,z(this,e),t)}),extendSelectionsBy:Un(function(e,t){var l=Ee(this.sel.ranges,e);xo(this,z(this,l),t)}),setSelections:Un(function(e,t,l){if(!e.length)return;for(var i=[],E=0;E<e.length;E++)i[E]=new wn(L(this,e[E].anchor),L(this,e[E].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),yr(this,fr(this.cm,i,t),l)}),addSelection:Un(function(e,t,l){var i=this.sel.ranges.slice(0);i.push(new wn(L(this,e),L(this,t||e))),yr(this,fr(this.cm,i,i.length-1),l)}),getSelection:function(e){for(var t=this.sel.ranges,l,i=0;i<t.length;i++){var E=qt(this,t[i].from(),t[i].to());l=l?l.concat(E):E}return e===!1?l:l.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],l=this.sel.ranges,i=0;i<l.length;i++){var E=qt(this,l[i].from(),l[i].to());e!==!1&&(E=E.join(e||this.lineSeparator())),t[i]=E}return t},replaceSelection:function(e,t,l){for(var i=[],E=0;E<this.sel.ranges.length;E++)i[E]=e;this.replaceSelections(i,t,l||"+input")},replaceSelections:Un(function(e,t,l){for(var i=[],E=this.sel,H=0;H<E.ranges.length;H++){var J=E.ranges[H];i[H]={from:J.from(),to:J.to(),text:this.splitLines(e[H]),origin:l}}for(var q=t&&t!="end"&&hl(this,i,t),ee=i.length-1;ee>=0;ee--)Ea(this,i[ee]);q?wo(this,q):this.cm&&Ii(this.cm)}),undo:Un(function(){Ps(this,"undo")}),redo:Un(function(){Ps(this,"redo")}),undoSelection:Un(function(){Ps(this,"undo",!0)}),redoSelection:Un(function(){Ps(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,l=0,i=0;i<e.done.length;i++)e.done[i].ranges||++t;for(var E=0;E<e.undone.length;E++)e.undone[E].ranges||++l;return{undo:t,redo:l}},clearHistory:function(){var e=this;this.history=new Is(this.history.maxGeneration),Mi(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:ya(this.history.done),undone:ya(this.history.undone)}},setHistory:function(e){var t=this.history=new Is(this.history.maxGeneration);t.done=ya(e.done.slice(0),null,!0),t.undone=ya(e.undone.slice(0),null,!0)},setGutterMarker:Un(function(e,t,l){return $a(this,e,"gutter",function(i){var E=i.gutterMarkers||(i.gutterMarkers={});return E[t]=l,!l&&ue(E)&&(i.gutterMarkers=null),!0})}),clearGutter:Un(function(e){var t=this;this.iter(function(l){l.gutterMarkers&&l.gutterMarkers[e]&&$a(t,l,"gutter",function(){return l.gutterMarkers[e]=null,ue(l.gutterMarkers)&&(l.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Sn(this,e))return null;if(t=e,e=Rt(this,e),!e)return null}else if(t=Yt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Un(function(e,t,l){return $a(this,e,t=="gutter"?"gutter":"class",function(i){var E=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!i[E])i[E]=l;else{if(I(l).test(i[E]))return!1;i[E]+=" "+l}return!0})}),removeLineClass:Un(function(e,t,l){return $a(this,e,t=="gutter"?"gutter":"class",function(i){var E=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",H=i[E];if(H)if(l==null)i[E]=null;else{var J=H.match(I(l));if(!J)return!1;var q=J.index+J[0].length;i[E]=H.slice(0,J.index)+(!J.index||q==H.length?"":" ")+H.slice(q)||null}else return!1;return!0})}),addLineWidget:Un(function(e,t,l){return _l(this,e,t,l)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,l){return xa(this,L(this,e),L(this,t),l,l&&l.type||"range")},setBookmark:function(e,t){var l={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=L(this,e),xa(this,e,e,l,"bookmark")},findMarksAt:function(e){e=L(this,e);var t=[],l=Rt(this,e.line).markedSpans;if(l)for(var i=0;i<l.length;++i){var E=l[i];(E.from==null||E.from<=e.ch)&&(E.to==null||E.to>=e.ch)&&t.push(E.marker.parent||E.marker)}return t},findMarks:function(e,t,l){e=L(this,e),t=L(this,t);var i=[],E=e.line;return this.iter(e.line,t.line+1,function(H){var J=H.markedSpans;if(J)for(var q=0;q<J.length;q++){var ee=J[q];!(ee.to!=null&&E==e.line&&e.ch>=ee.to||ee.from==null&&E!=e.line||ee.from!=null&&E==t.line&&ee.from>=t.ch)&&(!l||l(ee.marker))&&i.push(ee.marker.parent||ee.marker)}++E}),i},getAllMarks:function(){var e=[];return this.iter(function(t){var l=t.markedSpans;if(l)for(var i=0;i<l.length;++i)l[i].from!=null&&e.push(l[i].marker)}),e},posFromIndex:function(e){var t,l=this.first,i=this.lineSeparator().length;return this.iter(function(E){var H=E.text.length+i;if(H>e)return t=e,!0;e-=H,++l}),L(this,gt(l,t))},indexFromPos:function(e){e=L(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var l=this.lineSeparator().length;return this.iter(this.first,e.line,function(i){t+=i.text.length+l}),t},copy:function(e){var t=new Ir(Qt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,l=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<l&&(l=e.to);var i=new Ir(Qt(this,t,l),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:e.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(i,Bo(this)),i},unlinkDoc:function(e){if(e instanceof Xn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var l=this.linked[t];if(l.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),wl(Bo(this));break}if(e.history==this.history){var i=[e.id];Mi(e,function(E){return i.push(E.id)},!0),e.history=new Is(null),e.history.done=ya(this.history.done,i),e.history.undone=ya(this.history.undone,i)}},iterLinkedDocs:function(e){Mi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):$e(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Un(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fl(this.cm)})}),Ir.prototype.eachLine=Ir.prototype.iter;var Fo=0;function Al(e){var t=this;if(jo(t),Xe(t,e)||Vr(t.display,e))return;ie(e),K&&(Fo=+new Date);var l=_i(t,e,!0),i=e.dataTransfer.files;if(!l||t.isReadOnly())return;if(i&&i.length&&window.FileReader&&window.File)for(var E=i.length,H=Array(E),J=0,q=function(){++J==E&&xn(t,function(){l=L(t.doc,l);var ze={from:l,to:l,text:t.doc.splitLines(H.filter(function(ft){return ft!=null}).join(t.doc.lineSeparator())),origin:"paste"};Ea(t.doc,ze),wo(t.doc,Sr(L(t.doc,l),L(t.doc,ti(ze))))})()},ee=function(ze,ft){if(t.options.allowDropFileTypes&&le(t.options.allowDropFileTypes,ze.type)==-1){q();return}var xt=new FileReader;xt.onerror=function(){return q()},xt.onload=function(){var It=xt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(It)){q();return}H[ft]=It,q()},xt.readAsText(ze)},re=0;re<i.length;re++)ee(i[re],re);else{if(t.state.draggingText&&t.doc.sel.contains(l)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var _e=e.dataTransfer.getData("Text");if(_e){var Le;if(t.state.draggingText&&!t.state.draggingText.copy&&(Le=t.listSelections()),Ms(t.doc,Sr(l,l)),Le)for(var Qe=0;Qe<Le.length;++Qe)_a(t.doc,"",Le[Qe].anchor,Le[Qe].head,"drag");t.replaceSelection(_e,"around","paste"),t.display.input.focus()}}catch(ze){}}}function Cl(e,t){if(K&&(!e.state.draggingText||+new Date-Fo<100)){ye(t);return}if(Xe(e,t)||Vr(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p){var l=h("img",null,null,"position: fixed; left: 0; top: 0;");l.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(l.width=l.height=1,e.display.wrapper.appendChild(l),l._top=l.offsetTop),t.dataTransfer.setDragImage(l,0,0),f&&l.parentNode.removeChild(l)}}function Ol(e,t){var l=_i(e,t);if(!l)return;var i=document.createDocumentFragment();ja(e,l,i),e.display.dragCursor||(e.display.dragCursor=h("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),v(e.display.dragCursor,i)}function jo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Wo(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),l=[],i=0;i<t.length;i++){var E=t[i].CodeMirror;E&&l.push(E)}l.length&&l[0].operation(function(){for(var H=0;H<l.length;H++)e(l[H])})}var Ho=!1;function Rl(){if(Ho)return;Il(),Ho=!0}function Il(){var e;Ie(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Wo(Dl)},100))}),Ie(window,"blur",function(){return Wo(ri)})}function Dl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Pi={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"},is=0;is<10;is++)Pi[is+48]=Pi[is+96]=String(is);for(var Ns=65;Ns<=90;Ns++)Pi[Ns]=String.fromCharCode(Ns);for(var as=1;as<=12;as++)Pi[as+111]=Pi[as+63235]="F"+as;var Ai={};Ai.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"},Ai.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"},Ai.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"},Ai.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"]},Ai.default=s?Ai.macDefault:Ai.pcDefault;function Ll(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var l,i,E,H,J=0;J<t.length-1;J++){var q=t[J];if(/^(cmd|meta|m)$/i.test(q))H=!0;else if(/^a(lt)?$/i.test(q))l=!0;else if(/^(c|ctrl|control)$/i.test(q))i=!0;else if(/^s(hift)?$/i.test(q))E=!0;else throw new Error("Unrecognized modifier name: "+q)}return l&&(e="Alt-"+e),i&&(e="Ctrl-"+e),H&&(e="Cmd-"+e),E&&(e="Shift-"+e),e}function Ml(e){var t={};for(var l in e)if(e.hasOwnProperty(l)){var i=e[l];if(/^(name|fallthrough|(de|at)tach)$/.test(l))continue;if(i=="..."){delete e[l];continue}for(var E=Ee(l.split(" "),Ll),H=0;H<E.length;H++){var J=void 0,q=void 0;H==E.length-1?(q=E.join(" "),J=i):(q=E.slice(0,H+1).join(" "),J="...");var ee=t[q];if(!ee)t[q]=J;else if(ee!=J)throw new Error("Inconsistent bindings for "+q)}delete e[l]}for(var re in t)e[re]=t[re];return e}function Ta(e,t,l,i){t=Us(t);var E=t.call?t.call(e,i):t[e];if(E===!1)return"nothing";if(E==="...")return"multi";if(E!=null&&l(E))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ta(e,t.fallthrough,l,i);for(var H=0;H<t.fallthrough.length;H++){var J=Ta(e,t.fallthrough[H],l,i);if(J)return J}}}function Ko(e){var t=typeof e=="string"?e:Pi[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Go(e,t,l){var i=e;return t.altKey&&i!="Alt"&&(e="Alt-"+e),(S?t.metaKey:t.ctrlKey)&&i!="Ctrl"&&(e="Ctrl-"+e),(S?t.ctrlKey:t.metaKey)&&i!="Mod"&&(e="Cmd-"+e),!l&&t.shiftKey&&i!="Shift"&&(e="Shift-"+e),e}function zo(e,t){if(f&&e.keyCode==34&&e.char)return!1;var l=Pi[e.keyCode];return l==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(l=e.code),Go(l,e,t))}function Us(e){return typeof e=="string"?Ai[e]:e}function wa(e,t){for(var l=e.doc.sel.ranges,i=[],E=0;E<l.length;E++){for(var H=t(l[E]);i.length&&Wt(H.from,ne(i).to)<=0;){var J=i.pop();if(Wt(J.from,H.from)<0){H.from=J.from;break}}i.push(H)}Mn(e,function(){for(var q=i.length-1;q>=0;q--)_a(e.doc,"",i[q].from,i[q].to,"+delete");Ii(e)})}function to(e,t,l){var i=Ne(e.text,t+l,l);return i<0||i>e.text.length?null:i}function no(e,t,l){var i=to(e,t.ch,l);return i==null?null:new gt(t.line,i,l<0?"after":"before")}function ro(e,t,l,i,E){if(e){t.doc.direction=="rtl"&&(E=-E);var H=St(l,t.doc.direction);if(H){var J=E<0?ne(H):H[0],q=E<0==(J.level==1),ee=q?"after":"before",re;if(J.level>0||t.doc.direction=="rtl"){var _e=ji(t,l);re=E<0?l.text.length-1:0;var Le=Xr(t,_e,re).top;re=it(function(Qe){return Xr(t,_e,Qe).top==Le},E<0==(J.level==1)?J.from:J.to-1,re),ee=="before"&&(re=to(l,re,1))}else re=E<0?J.to:J.from;return new gt(i,re,ee)}}return new gt(i,E<0?l.text.length:0,E<0?"before":"after")}function kl(e,t,l,i){var E=St(t,e.doc.direction);if(!E)return no(t,l,i);l.ch>=t.text.length?(l.ch=t.text.length,l.sticky="before"):l.ch<=0&&(l.ch=0,l.sticky="after");var H=dt(E,l.ch,l.sticky),J=E[H];if(e.doc.direction=="ltr"&&J.level%2==0&&(i>0?J.to>l.ch:J.from<l.ch))return no(t,l,i);var q=function(Bt,Kt){return to(t,Bt instanceof gt?Bt.ch:Bt,Kt)},ee,re=function(Bt){return e.options.lineWrapping?(ee=ee||ji(e,t),Ki(e,t,ee,Bt)):{begin:0,end:t.text.length}},_e=re(l.sticky=="before"?q(l,-1):l.ch);if(e.doc.direction=="rtl"||J.level==1){var Le=J.level==1==i<0,Qe=q(l,Le?1:-1);if(Qe!=null&&(Le?Qe<=J.to&&Qe<=_e.end:Qe>=J.from&&Qe>=_e.begin)){var ze=Le?"before":"after";return new gt(l.line,Qe,ze)}}var ft=function(Bt,Kt,Ft){for(var Xt=function(Wn,lr){return lr?new gt(l.line,q(Wn,1),"before"):new gt(l.line,Wn,"after")};Bt>=0&&Bt<E.length;Bt+=Kt){var ln=E[Bt],an=Kt>0==(ln.level!=1),bn=an?Ft.begin:q(Ft.end,-1);if(ln.from<=bn&&bn<ln.to)return Xt(bn,an);if(bn=an?ln.from:q(ln.to,-1),Ft.begin<=bn&&bn<Ft.end)return Xt(bn,an)}},xt=ft(H+i,i,_e);if(xt)return xt;var It=i>0?_e.end:q(_e.begin,-1);return It!=null&&!(i>0&&It==t.text.length)&&(xt=ft(i>0?0:E.length-1,i,re(It)),xt)?xt:null}var ss={selectAll:Ro,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Se)},killLine:function(e){return wa(e,function(t){if(t.empty()){var l=Rt(e.doc,t.head.line).text.length;return t.head.ch==l&&t.head.line<e.lastLine()?{from:t.head,to:gt(t.head.line+1,0)}:{from:t.head,to:gt(t.head.line,l)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return wa(e,function(t){return{from:gt(t.from().line,0),to:L(e.doc,gt(t.to().line+1,0))}})},delLineLeft:function(e){return wa(e,function(t){return{from:gt(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return wa(e,function(t){var l=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:l},"div");return{from:i,to:t.from()}})},delWrappedLineRight:function(e){return wa(e,function(t){var l=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:l},"div");return{from:t.from(),to:i}})},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(gt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(gt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Vo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Yo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Pl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var l=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:l},"div")},Fe)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var l=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:l},"div")},Fe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var l=e.cursorCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:l},"div");return i.ch<e.getLine(i.line).search(/\S/)?Yo(e,t.head):i},Fe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],l=e.listSelections(),i=e.options.tabSize,E=0;E<l.length;E++){var H=l[E].from(),J=Y(e.getLine(H.line),H.ch,i);t.push(pe(i-J%i))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Mn(e,function(){for(var t=e.listSelections(),l=[],i=0;i<t.length;i++){if(!t[i].empty())continue;var E=t[i].head,H=Rt(e.doc,E.line).text;if(H){if(E.ch==H.length&&(E=new gt(E.line,E.ch-1)),E.ch>0)E=new gt(E.line,E.ch+1),e.replaceRange(H.charAt(E.ch-1)+H.charAt(E.ch-2),gt(E.line,E.ch-2),E,"+transpose");else if(E.line>e.doc.first){var J=Rt(e.doc,E.line-1).text;J&&(E=new gt(E.line,1),e.replaceRange(H.charAt(0)+e.doc.lineSeparator()+J.charAt(J.length-1),gt(E.line-1,J.length-1),E,"+transpose"))}}l.push(new wn(E,E))}e.setSelections(l)})},newlineAndIndent:function(e){return Mn(e,function(){for(var t=e.listSelections(),l=t.length-1;l>=0;l--)e.replaceRange(e.doc.lineSeparator(),t[l].anchor,t[l].head,"+input");t=e.listSelections();for(var i=0;i<t.length;i++)e.indentLine(t[i].from().line,null,!0);Ii(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vo(e,t){var l=Rt(e.doc,t),i=gn(l);return i!=l&&(t=Yt(i)),ro(!0,e,i,t,1)}function Pl(e,t){var l=Rt(e.doc,t),i=Zr(l);return i!=l&&(t=Yt(i)),ro(!0,e,l,t,-1)}function Yo(e,t){var l=Vo(e,t.line),i=Rt(e.doc,l.line),E=St(i,e.doc.direction);if(!E||E[0].level==0){var H=Math.max(l.ch,i.text.search(/\S/)),J=t.line==l.line&&t.ch<=H&&t.ch;return gt(l.line,J?0:H,l.sticky)}return l}function Bs(e,t,l){if(typeof t=="string"&&(t=ss[t],!t))return!1;e.display.input.ensurePolled();var i=e.display.shift,E=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l&&(e.display.shift=!1),E=t(e)!=Pe}finally{e.display.shift=i,e.state.suppressEdits=!1}return E}function Nl(e,t,l){for(var i=0;i<e.state.keyMaps.length;i++){var E=Ta(t,e.state.keyMaps[i],l,e);if(E)return E}return e.options.extraKeys&&Ta(t,e.options.extraKeys,l,e)||Ta(t,e.options.keyMap,l,e)}var Ul=new $;function os(e,t,l,i){var E=e.state.keySeq;if(E){if(Ko(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ul.set(50,function(){e.state.keySeq==E&&(e.state.keySeq=null,e.display.input.reset())}),Xo(e,E+" "+t,l,i))return!0}return Xo(e,t,l,i)}function Xo(e,t,l,i){var E=Nl(e,t,i);return E=="multi"&&(e.state.keySeq=t),E=="handled"&&Rn(e,"keyHandled",e,t,l),(E=="handled"||E=="multi")&&(ie(l),pi(e)),!!E}function Qo(e,t){var l=zo(t,!0);return l?t.shiftKey&&!e.state.keySeq?os(e,"Shift-"+l,t,function(i){return Bs(e,i,!0)})||os(e,l,t,function(i){if(typeof i=="string"?/^go[A-Z]/.test(i):i.motion)return Bs(e,i)}):os(e,l,t,function(i){return Bs(e,i)}):!1}function Bl(e,t,l){return os(e,"'"+l+"'",t,function(i){return Bs(e,i,!0)})}var io=null;function Jo(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=P(),Xe(t,e))return;K&&j<11&&e.keyCode==27&&(e.returnValue=!1);var l=e.keyCode;t.display.shift=l==16||e.shiftKey;var i=Qo(t,e);f&&(io=i?l:null,!i&&l==88&&!Ye&&(s?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),U&&!s&&!i&&l==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),l==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;k(t,"CodeMirror-crosshair");function l(i){(i.keyCode==18||!i.altKey)&&(_(t,"CodeMirror-crosshair"),lt(document,"keyup",l),lt(document,"mouseover",l))}Ie(document,"keyup",l),Ie(document,"mouseover",l)}function Zo(e){e.keyCode==16&&(this.doc.sel.shift=!1),Xe(this,e)}function qo(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Vr(t.display,e)||Xe(t,e)||e.ctrlKey&&!e.altKey||s&&e.metaKey)return;var l=e.keyCode,i=e.charCode;if(f&&l==io){io=null,ie(e);return}if(f&&(!e.which||e.which<10)&&Qo(t,e))return;var E=String.fromCharCode(i==null?l:i);if(E=="\b")return;if(Bl(t,e,E))return;t.display.input.onKeyPress(e)}var jl=400,ao=function(e,t,l){this.time=e,this.pos=t,this.button=l};ao.prototype.compare=function(e,t,l){return this.time+jl>e&&Wt(t,this.pos)==0&&l==this.button};var ls,us;function Wl(e,t){var l=+new Date;return us&&us.compare(l,e,t)?(ls=us=null,"triple"):ls&&ls.compare(l,e,t)?(us=new ao(l,e,t),ls=null,"double"):(ls=new ao(l,e,t),us=null,"single")}function $o(e){var t=this,l=t.display;if(Xe(t,e)||l.activeTouch&&l.input.supportsTouch())return;if(l.input.ensurePolled(),l.shift=e.shiftKey,Vr(l,e)){n||(l.scroller.draggable=!1,setTimeout(function(){return l.scroller.draggable=!0},100));return}if(so(t,e))return;var i=_i(t,e),E=Ge(e),H=i?Wl(i,E):"single";if(window.focus(),E==1&&t.state.selectingText&&t.state.selectingText(e),i&&Hl(t,E,i,H,e))return;E==1?i?Gl(t,i,H,e):Ae(e)==l.scroller&&ie(e):E==2?(i&&Ls(t.doc,i),setTimeout(function(){return l.input.focus()},20)):E==3&&(D?t.display.input.onContextMenu(e):Wa(t))}function Hl(e,t,l,i,E){var H="Click";return i=="double"?H="Double"+H:i=="triple"&&(H="Triple"+H),H=(t==1?"Left":t==2?"Middle":"Right")+H,os(e,Go(H,E),E,function(J){if(typeof J=="string"&&(J=ss[J]),!J)return!1;var q=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),q=J(e,l)!=Pe}finally{e.state.suppressEdits=!1}return q})}function Kl(e,t,l){var i=e.getOption("configureMouse"),E=i?i(e,t,l):{};if(E.unit==null){var H=a?l.shiftKey&&l.metaKey:l.altKey;E.unit=H?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(E.extend==null||e.doc.extend)&&(E.extend=e.doc.extend||l.shiftKey),E.addNew==null&&(E.addNew=s?l.metaKey:l.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(s?l.altKey:l.ctrlKey)),E}function Gl(e,t,l,i){K?setTimeout(F(As,e),0):e.curOp.focus=P();var E=Kl(e,l,i),H=e.doc.sel,J;e.options.dragDrop&&ot&&!e.isReadOnly()&&l=="single"&&(J=H.contains(t))>-1&&(Wt((J=H.ranges[J]).from(),t)<0||t.xRel>0)&&(Wt(J.to(),t)>0||t.xRel<0)?zl(e,i,t,E):Vl(e,i,t,E)}function zl(e,t,l,i){var E=e.display,H=!1,J=xn(e,function(re){n&&(E.scroller.draggable=!1),e.state.draggingText=!1,lt(E.wrapper.ownerDocument,"mouseup",J),lt(E.wrapper.ownerDocument,"mousemove",q),lt(E.scroller,"dragstart",ee),lt(E.scroller,"drop",J),H||(ie(re),i.addNew||Ls(e.doc,l,null,null,i.extend),n&&!p||K&&j==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),q=function(re){H=H||Math.abs(t.clientX-re.clientX)+Math.abs(t.clientY-re.clientY)>=10},ee=function(){return H=!0};n&&(E.scroller.draggable=!0),e.state.draggingText=J,J.copy=!i.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),Ie(E.wrapper.ownerDocument,"mouseup",J),Ie(E.wrapper.ownerDocument,"mousemove",q),Ie(E.scroller,"dragstart",ee),Ie(E.scroller,"drop",J),Wa(e),setTimeout(function(){return E.input.focus()},20)}function el(e,t,l){if(l=="char")return new wn(t,t);if(l=="word")return e.findWordAt(t);if(l=="line")return new wn(gt(t.line,0),L(e.doc,gt(t.line+1,0)));var i=l(e,t);return new wn(i.from,i.to)}function Vl(e,t,l,i){var E=e.display,H=e.doc;ie(t);var J,q,ee=H.sel,re=ee.ranges;if(i.addNew&&!i.extend?(q=H.sel.contains(l),q>-1?J=re[q]:J=new wn(l,l)):(J=H.sel.primary(),q=H.sel.primIndex),i.unit=="rectangle")i.addNew||(J=new wn(l,l)),l=_i(e,t,!0,!0),q=-1;else{var _e=el(e,l,i.unit);i.extend?J=$s(J,_e.anchor,_e.head,i.extend):J=_e}i.addNew?q==-1?(q=re.length,yr(H,fr(e,re.concat([J]),q),{scroll:!1,origin:"*mouse"})):re.length>1&&re[q].empty()&&i.unit=="char"&&!i.extend?(yr(H,fr(e,re.slice(0,q).concat(re.slice(q+1)),0),{scroll:!1,origin:"*mouse"}),ee=H.sel):eo(H,q,J,we):(q=0,yr(H,new Bn([J],0),we),ee=H.sel);var Le=l;function Qe(Ft){if(Wt(Le,Ft)==0)return;if(Le=Ft,i.unit=="rectangle"){for(var Xt=[],ln=e.options.tabSize,an=Y(Rt(H,l.line).text,l.ch,ln),bn=Y(Rt(H,Ft.line).text,Ft.ch,ln),Wn=Math.min(an,bn),lr=Math.max(an,bn),Jn=Math.min(l.line,Ft.line),Hr=Math.min(e.lastLine(),Math.max(l.line,Ft.line));Jn<=Hr;Jn++){var Dr=Rt(H,Jn).text,rr=Me(Dr,Wn,ln);Wn==lr?Xt.push(new wn(gt(Jn,rr),gt(Jn,rr))):Dr.length>rr&&Xt.push(new wn(gt(Jn,rr),gt(Jn,Me(Dr,lr,ln))))}Xt.length||Xt.push(new wn(l,l)),yr(H,fr(e,ee.ranges.slice(0,q).concat(Xt),q),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Ft)}else{var Lr=J,pr=el(e,Ft,i.unit),sr=Lr.anchor,ir;Wt(pr.anchor,sr)>0?(ir=pr.head,sr=pn(Lr.from(),pr.anchor)):(ir=pr.anchor,sr=nn(Lr.to(),pr.head));var qn=ee.ranges.slice(0);qn[q]=Yl(e,new wn(L(H,sr),ir)),yr(H,fr(e,qn,q),we)}}var ze=E.wrapper.getBoundingClientRect(),ft=0;function xt(Ft){var Xt=++ft,ln=_i(e,Ft,!0,i.unit=="rectangle");if(!ln)return;if(Wt(ln,Le)!=0){e.curOp.focus=P(),Qe(ln);var an=ca(E,H);(ln.line>=an.to||ln.line<an.from)&&setTimeout(xn(e,function(){ft==Xt&&xt(Ft)}),150)}else{var bn=Ft.clientY<ze.top?-20:Ft.clientY>ze.bottom?20:0;bn&&setTimeout(xn(e,function(){if(ft!=Xt)return;E.scroller.scrollTop+=bn,xt(Ft)}),50)}}function It(Ft){e.state.selectingText=!1,ft=Infinity,Ft&&(ie(Ft),E.input.focus()),lt(E.wrapper.ownerDocument,"mousemove",Bt),lt(E.wrapper.ownerDocument,"mouseup",Kt),H.history.lastSelOrigin=null}var Bt=xn(e,function(Ft){Ft.buttons===0||!Ge(Ft)?It(Ft):xt(Ft)}),Kt=xn(e,It);e.state.selectingText=Kt,Ie(E.wrapper.ownerDocument,"mousemove",Bt),Ie(E.wrapper.ownerDocument,"mouseup",Kt)}function Yl(e,t){var l=t.anchor,i=t.head,E=Rt(e.doc,l.line);if(Wt(l,i)==0&&l.sticky==i.sticky)return t;var H=St(E);if(!H)return t;var J=dt(H,l.ch,l.sticky),q=H[J];if(q.from!=l.ch&&q.to!=l.ch)return t;var ee=J+(q.from==l.ch==(q.level!=1)?0:1);if(ee==0||ee==H.length)return t;var re;if(i.line!=l.line)re=(i.line-l.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var _e=dt(H,i.ch,i.sticky),Le=_e-J||(i.ch-l.ch)*(q.level==1?-1:1);_e==ee-1||_e==ee?re=Le<0:re=Le>0}var Qe=H[ee+(re?-1:0)],ze=re==(Qe.level==1),ft=ze?Qe.from:Qe.to,xt=ze?"after":"before";return l.ch==ft&&l.sticky==xt?t:new wn(new gt(l.line,ft,xt),i)}function tl(e,t,l,i){var E,H;if(t.touches)E=t.touches[0].clientX,H=t.touches[0].clientY;else try{E=t.clientX,H=t.clientY}catch(Qe){return!1}if(E>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&ie(t);var J=e.display,q=J.lineDiv.getBoundingClientRect();if(H>q.bottom||!ge(e,l))return fe(t);H-=q.top-J.viewOffset;for(var ee=0;ee<e.display.gutterSpecs.length;++ee){var re=J.gutters.childNodes[ee];if(re&&re.getBoundingClientRect().right>=E){var _e=cn(e.doc,H),Le=e.display.gutterSpecs[ee];return Ke(e,l,e,_e,Le.className,t),fe(t)}}}function so(e,t){return tl(e,t,"gutterClick",!0)}function nl(e,t){if(Vr(e.display,t)||Xl(e,t))return;if(Xe(e,t,"contextmenu"))return;D||e.display.input.onContextMenu(t)}function Xl(e,t){return ge(e,"gutterContextMenu")?tl(e,t,"gutterContextMenu",!1):!1}function rl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),_n(e)}var Sa={toString:function(){return"CodeMirror.Init"}},il={},Fs={};function Ql(e){var t=e.optionHandlers;function l(i,E,H,J){e.defaults[i]=E,H&&(t[i]=J?function(q,ee,re){re!=Sa&&H(q,ee,re)}:H)}e.defineOption=l,e.Init=Sa,l("value","",function(i,E){return i.setValue(E)},!0),l("mode",null,function(i,E){i.doc.modeOption=E,Js(i)},!0),l("indentUnit",2,Js,!0),l("indentWithTabs",!1),l("smartIndent",!0),l("tabSize",4,function(i){Za(i),_n(i),Zn(i)},!0),l("lineSeparator",null,function(i,E){if(i.doc.lineSep=E,!E)return;var H=[],J=i.doc.first;i.doc.iter(function(ee){for(var re=0;;){var _e=ee.text.indexOf(E,re);if(_e==-1)break;re=_e+E.length,H.push(gt(J,_e))}J++});for(var q=H.length-1;q>=0;q--)_a(i.doc,E,H[q],gt(H[q].line,H[q].ch+E.length))}),l("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(i,E,H){i.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),H!=Sa&&i.refresh()}),l("specialCharPlaceholder",Nn,function(i){return i.refresh()},!0),l("electricChars",!0),l("inputStyle",o?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),l("spellcheck",!1,function(i,E){return i.getInputField().spellcheck=E},!0),l("autocorrect",!1,function(i,E){return i.getInputField().autocorrect=E},!0),l("autocapitalize",!1,function(i,E){return i.getInputField().autocapitalize=E},!0),l("rtlMoveVisually",!R),l("wholeLineUpdateBefore",!0),l("theme","default",function(i){rl(i),Si(i)},!0),l("keyMap","default",function(i,E,H){var J=Us(E),q=H!=Sa&&Us(H);q&&q.detach&&q.detach(i,J),J.attach&&J.attach(i,q||null)}),l("extraKeys",null),l("configureMouse",null),l("lineWrapping",!1,Zl,!0),l("gutters",[],function(i,E){i.display.gutterSpecs=Zi(E,i.options.lineNumbers),Si(i)},!0),l("fixedGutter",!0,function(i,E){i.display.gutters.style.left=E?Ua(i.display)+"px":"0",i.refresh()},!0),l("coverGutterNextToScrollbar",!1,function(i){return rt(i)},!0),l("scrollbarStyle","native",function(i){bt(i),rt(i),i.display.scrollbars.setScrollTop(i.doc.scrollTop),i.display.scrollbars.setScrollLeft(i.doc.scrollLeft)},!0),l("lineNumbers",!1,function(i,E){i.display.gutterSpecs=Zi(i.options.gutters,E),Si(i)},!0),l("firstLineNumber",1,Si,!0),l("lineNumberFormatter",function(i){return i},Si,!0),l("showCursorWhenSelecting",!1,Ti,!0),l("resetSelectionOnContextMenu",!0),l("lineWiseCopyCut",!0),l("pasteLinesPerSelection",!0),l("selectionsMayTouch",!1),l("readOnly",!1,function(i,E){E=="nocursor"&&(ri(i),i.display.input.blur()),i.display.input.readOnlyChanged(E)}),l("screenReaderLabel",null,function(i,E){E=E===""?null:E,i.display.input.screenReaderLabelChanged(E)}),l("disableInput",!1,function(i,E){E||i.display.input.reset()},!0),l("dragDrop",!0,Jl),l("allowDropFileTypes",null),l("cursorBlinkRate",530),l("cursorScrollMargin",0),l("cursorHeight",1,Ti,!0),l("singleCursorHeightPerLine",!0,Ti,!0),l("workTime",100),l("workDelay",100),l("flattenSpans",!0,Za,!0),l("addModeClass",!1,Za,!0),l("pollInterval",100),l("undoDepth",200,function(i,E){return i.doc.history.undoDepth=E}),l("historyEventDelay",1250),l("viewportMargin",10,function(i){return i.refresh()},!0),l("maxHighlightLength",1e4,Za,!0),l("moveInputWithCursor",!0,function(i,E){E||i.display.input.resetPosition()}),l("tabindex",null,function(i,E){return i.display.input.getField().tabIndex=E||""}),l("autofocus",null),l("direction","ltr",function(i,E){return i.doc.setDirection(E)},!0),l("phrases",null)}function Jl(e,t,l){var i=l&&l!=Sa;if(!t!=!i){var E=e.display.dragFunctions,H=t?Ie:lt;H(e.display.scroller,"dragstart",E.start),H(e.display.scroller,"dragenter",E.enter),H(e.display.scroller,"dragover",E.over),H(e.display.scroller,"dragleave",E.leave),H(e.display.scroller,"drop",E.drop)}}function Zl(e){e.options.lineWrapping?(k(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(_(e.display.wrapper,"CodeMirror-wrap"),jr(e)),oa(e),Zn(e),_n(e),setTimeout(function(){return rt(e)},100)}function Xn(e,t){var l=this;if(!(this instanceof Xn))return new Xn(e,t);this.options=t=t?T(t):{},T(il,t,!1);var i=t.value;typeof i=="string"?i=new Ir(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var E=new Xn.inputStyles[t.inputStyle](this),H=this.display=new Ja(e,i,E,t);H.wrapper.CodeMirror=this,rl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),bt(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 $,keySeq:null,specialChars:null},t.autofocus&&!o&&H.input.focus(),K&&j<11&&setTimeout(function(){return l.display.input.reset(!0)},20),ql(this),Rl(),zt(this),this.curOp.forceUpdate=!0,go(this,i),t.autofocus&&!o||this.hasFocus()?setTimeout(function(){l.hasFocus()&&!l.state.focused&&Ha(l)},20):ri(this);for(var J in Fs)Fs.hasOwnProperty(J)&&Fs[J](this,t[J],Sa);pa(this),t.finishInit&&t.finishInit(this);for(var q=0;q<oo.length;++q)oo[q](this);Lt(this),n&&t.lineWrapping&&getComputedStyle(H.lineDiv).textRendering=="optimizelegibility"&&(H.lineDiv.style.textRendering="auto")}Xn.defaults=il,Xn.optionHandlers=Fs;function ql(e){var t=e.display;Ie(t.scroller,"mousedown",xn(e,$o)),K&&j<11?Ie(t.scroller,"dblclick",xn(e,function(ee){if(Xe(e,ee))return;var re=_i(e,ee);if(!re||so(e,ee)||Vr(e.display,ee))return;ie(ee);var _e=e.findWordAt(re);Ls(e.doc,_e.anchor,_e.head)})):Ie(t.scroller,"dblclick",function(ee){return Xe(e,ee)||ie(ee)}),Ie(t.scroller,"contextmenu",function(ee){return nl(e,ee)}),Ie(t.input.getField(),"contextmenu",function(ee){t.scroller.contains(ee.target)||nl(e,ee)});var l,i={end:0};function E(){t.activeTouch&&(l=setTimeout(function(){return t.activeTouch=null},1e3),i=t.activeTouch,i.end=+new Date)}function H(ee){if(ee.touches.length!=1)return!1;var re=ee.touches[0];return re.radiusX<=1&&re.radiusY<=1}function J(ee,re){if(re.left==null)return!0;var _e=re.left-ee.left,Le=re.top-ee.top;return _e*_e+Le*Le>20*20}Ie(t.scroller,"touchstart",function(ee){if(!Xe(e,ee)&&!H(ee)&&!so(e,ee)){t.input.ensurePolled(),clearTimeout(l);var re=+new Date;t.activeTouch={start:re,moved:!1,prev:re-i.end<=300?i:null},ee.touches.length==1&&(t.activeTouch.left=ee.touches[0].pageX,t.activeTouch.top=ee.touches[0].pageY)}}),Ie(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ie(t.scroller,"touchend",function(ee){var re=t.activeTouch;if(re&&!Vr(t,ee)&&re.left!=null&&!re.moved&&new Date-re.start<300){var _e=e.coordsChar(t.activeTouch,"page"),Le;!re.prev||J(re,re.prev)?Le=new wn(_e,_e):!re.prev.prev||J(re,re.prev.prev)?Le=e.findWordAt(_e):Le=new wn(gt(_e.line,0),L(e.doc,gt(_e.line+1,0))),e.setSelection(Le.anchor,Le.head),e.focus(),ie(ee)}E()}),Ie(t.scroller,"touchcancel",E),Ie(t.scroller,"scroll",function(){t.scroller.clientHeight&&(zi(e,t.scroller.scrollTop),wi(e,t.scroller.scrollLeft,!0),Ke(e,"scroll",e))}),Ie(t.scroller,"mousewheel",function(ee){return hr(e,ee)}),Ie(t.scroller,"DOMMouseScroll",function(ee){return hr(e,ee)}),Ie(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(ee){Xe(e,ee)||ye(ee)},over:function(ee){Xe(e,ee)||(Ol(e,ee),ye(ee))},start:function(ee){return Cl(e,ee)},drop:xn(e,Al),leave:function(ee){Xe(e,ee)||jo(e)}};var q=t.input.getField();Ie(q,"keyup",function(ee){return Zo.call(e,ee)}),Ie(q,"keydown",xn(e,Jo)),Ie(q,"keypress",xn(e,qo)),Ie(q,"focus",function(ee){return Ha(e,ee)}),Ie(q,"blur",function(ee){return ri(e,ee)})}var oo=[];Xn.defineInitHook=function(e){return oo.push(e)};function cs(e,t,l,i){var E=e.doc,H;l==null&&(l="add"),l=="smart"&&(E.mode.indent?H=Ct(e,t).state:l="prev");var J=e.options.tabSize,q=Rt(E,t),ee=Y(q.text,null,J);q.stateAfter&&(q.stateAfter=null);var re=q.text.match(/^\s*/)[0],_e;if(!i&&!/\S/.test(q.text))_e=0,l="not";else if(l=="smart"&&(_e=E.mode.indent(H,q.text.slice(re.length),q.text),_e==Pe||_e>150)){if(!i)return;l="prev"}l=="prev"?t>E.first?_e=Y(Rt(E,t-1).text,null,J):_e=0:l=="add"?_e=ee+e.options.indentUnit:l=="subtract"?_e=ee-e.options.indentUnit:typeof l=="number"&&(_e=ee+l),_e=Math.max(0,_e);var Le="",Qe=0;if(e.options.indentWithTabs)for(var ze=Math.floor(_e/J);ze;--ze)Qe+=J,Le+=" ";if(Qe<_e&&(Le+=pe(_e-Qe)),Le!=re)return _a(E,Le,gt(t,0),gt(t,re.length),"+input"),q.stateAfter=null,!0;for(var ft=0;ft<E.sel.ranges.length;ft++){var xt=E.sel.ranges[ft];if(xt.head.line==t&&xt.head.ch<re.length){var It=gt(t,re.length);eo(E,ft,new wn(It,It));break}}}var si=null;function js(e){si=e}function lo(e,t,l,i,E){var H=e.doc;e.display.shift=!1,i||(i=H.sel);var J=+new Date-200,q=E=="paste"||e.state.pasteIncoming>J,ee=$e(t),re=null;if(q&&i.ranges.length>1)if(si&&si.text.join(`
`)==t){if(i.ranges.length%si.text.length==0){re=[];for(var _e=0;_e<si.text.length;_e++)re.push(H.splitLines(si.text[_e]))}}else ee.length==i.ranges.length&&e.options.pasteLinesPerSelection&&(re=Ee(ee,function(Bt){return[Bt]}));for(var Le=e.curOp.updateInput,Qe=i.ranges.length-1;Qe>=0;Qe--){var ze=i.ranges[Qe],ft=ze.from(),xt=ze.to();ze.empty()&&(l&&l>0?ft=gt(ft.line,ft.ch-l):e.state.overwrite&&!q?xt=gt(xt.line,Math.min(Rt(H,xt.line).text.length,xt.ch+ne(ee).length)):q&&si&&si.lineWise&&si.text.join(`
`)==ee.join(`
`)&&(ft=xt=gt(ft.line,0)));var It={from:ft,to:xt,text:re?re[Qe%re.length]:ee,origin:E||(q?"paste":e.state.cutIncoming>J?"cut":"+input")};Ea(e.doc,It),Rn(e,"inputRead",e,It)}t&&!q&&sl(e,t),Ii(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Le),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function al(e,t){var l=e.clipboardData&&e.clipboardData.getData("Text");if(l)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Mn(t,function(){return lo(t,l,0,null,"paste")}),!0}function sl(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var l=e.doc.sel,i=l.ranges.length-1;i>=0;i--){var E=l.ranges[i];if(E.head.ch>100||i&&l.ranges[i-1].head.line==E.head.line)continue;var H=e.getModeAt(E.head),J=!1;if(H.electricChars){for(var q=0;q<H.electricChars.length;q++)if(t.indexOf(H.electricChars.charAt(q))>-1){J=cs(e,E.head.line,"smart");break}}else H.electricInput&&(H.electricInput.test(Rt(e.doc,E.head.line).text.slice(0,E.head.ch))&&(J=cs(e,E.head.line,"smart")));J&&Rn(e,"electricInput",e,E.head.line)}}function ol(e){for(var t=[],l=[],i=0;i<e.doc.sel.ranges.length;i++){var E=e.doc.sel.ranges[i].head.line,H={anchor:gt(E,0),head:gt(E+1,0)};l.push(H),t.push(e.getRange(H.anchor,H.head))}return{text:t,ranges:l}}function ll(e,t,l,i){e.setAttribute("autocorrect",l?"":"off"),e.setAttribute("autocapitalize",i?"":"off"),e.setAttribute("spellcheck",!!t)}function ul(){var e=h("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=h("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return n?e.style.width="1000px":e.setAttribute("wrap","off"),d&&(e.style.border="1px solid black"),ll(e),t}function $l(e){var t=e.optionHandlers,l=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(i,E){var H=this.options,J=H[i];if(H[i]==E&&i!="mode")return;H[i]=E,t.hasOwnProperty(i)&&xn(this,t[i])(this,E,J),Ke(this,"optionChange",this,i)},getOption:function(i){return this.options[i]},getDoc:function(){return this.doc},addKeyMap:function(i,E){this.state.keyMaps[E?"push":"unshift"](Us(i))},removeKeyMap:function(i){for(var E=this.state.keyMaps,H=0;H<E.length;++H)if(E[H]==i||E[H].name==i)return E.splice(H,1),!0},addOverlay:Hn(function(i,E){var H=i.token?i:e.getMode(this.options,i);if(H.startState)throw new Error("Overlays may not be stateful.");ae(this.state.overlays,{mode:H,modeSpec:i,opaque:E&&E.opaque,priority:E&&E.priority||0},function(J){return J.priority}),this.state.modeGen++,Zn(this)}),removeOverlay:Hn(function(i){for(var E=this.state.overlays,H=0;H<E.length;++H){var J=E[H].modeSpec;if(J==i||typeof i=="string"&&J.name==i){E.splice(H,1),this.state.modeGen++,Zn(this);return}}}),indentLine:Hn(function(i,E,H){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Sn(this.doc,i)&&cs(this,i,E,H)}),indentSelection:Hn(function(i){for(var E=this.doc.sel.ranges,H=-1,J=0;J<E.length;J++){var q=E[J];if(q.empty())q.head.line>H&&(cs(this,q.head.line,i,!0),H=q.head.line,J==this.doc.sel.primIndex&&Ii(this));else{var ee=q.from(),re=q.to(),_e=Math.max(H,ee.line);H=Math.min(this.lastLine(),re.line-(re.ch?0:1))+1;for(var Le=_e;Le<H;++Le)cs(this,Le,i);var Qe=this.doc.sel.ranges;ee.ch==0&&E.length==Qe.length&&Qe[J].from().ch>0&&eo(this.doc,J,new wn(ee,Qe[J].to()),Se)}}}),getTokenAt:function(i,E){return An(this,i,E)},getLineTokens:function(i,E){return An(this,gt(i),E,!0)},getTokenTypeAt:function(i){i=L(this.doc,i);var E=ct(this,Rt(this.doc,i.line)),H=0,J=(E.length-1)/2,q=i.ch,ee;if(q==0)ee=E[2];else for(;;){var re=H+J>>1;if((re?E[re*2-1]:0)>=q)J=re;else if(E[re*2+1]<q)H=re+1;else{ee=E[re*2+2];break}}var _e=ee?ee.indexOf("overlay "):-1;return _e<0?ee:_e==0?null:ee.slice(0,_e-1)},getModeAt:function(i){var E=this.doc.mode;return E.innerMode?e.innerMode(E,this.getTokenAt(i).state).mode:E},getHelper:function(i,E){return this.getHelpers(i,E)[0]},getHelpers:function(i,E){var H=[];if(!l.hasOwnProperty(E))return H;var J=l[E],q=this.getModeAt(i);if(typeof q[E]=="string")J[q[E]]&&H.push(J[q[E]]);else if(q[E])for(var ee=0;ee<q[E].length;ee++){var re=J[q[E][ee]];re&&H.push(re)}else q.helperType&&J[q.helperType]?H.push(J[q.helperType]):J[q.name]&&H.push(J[q.name]);for(var _e=0;_e<J._global.length;_e++){var Le=J._global[_e];Le.pred(q,this)&&le(H,Le.val)==-1&&H.push(Le.val)}return H},getStateAfter:function(i,E){var H=this.doc;return i=X(H,i==null?H.first+H.size-1:i),Ct(this,i+1,E).state},cursorCoords:function(i,E){var H,J=this.doc.sel.primary();return i==null?H=J.head:typeof i=="object"?H=L(this.doc,i):H=i?J.from():J.to(),Wr(this,H,E||"page")},charCoords:function(i,E){return Ma(this,L(this.doc,i),E||"page")},coordsChar:function(i,E){return i=bi(this,i,E||"page"),ka(this,i.left,i.top)},lineAtHeight:function(i,E){return i=bi(this,{top:i,left:0},E||"page").top,cn(this.doc,i+this.display.viewOffset)},heightAtLine:function(i,E,H){var J=!1,q;if(typeof i=="number"){var ee=this.doc.first+this.doc.size-1;i<this.doc.first?i=this.doc.first:i>ee&&(i=ee,J=!0),q=Rt(this.doc,i)}else q=i;return In(this,q,{top:0,left:0},E||"page",H||J).top+(J?this.doc.height-_r(q):0)},defaultTextHeight:function(){return Ri(this.display)},defaultCharWidth:function(){return Ei(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(i,E,H,J,q){var ee=this.display;i=Wr(this,L(this.doc,i));var re=i.bottom,_e=i.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ee.sizer.appendChild(E),J=="over")re=i.top;else if(J=="above"||J=="near"){var Le=Math.max(ee.wrapper.clientHeight,this.doc.height),Qe=Math.max(ee.sizer.clientWidth,ee.lineSpace.clientWidth);(J=="above"||i.bottom+E.offsetHeight>Le)&&i.top>E.offsetHeight?re=i.top-E.offsetHeight:i.bottom+E.offsetHeight<=Le&&(re=i.bottom),_e+E.offsetWidth>Qe&&(_e=Qe-E.offsetWidth)}E.style.top=re+"px",E.style.left=E.style.right="",q=="right"?(_e=ee.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(q=="left"?_e=0:q=="middle"&&(_e=(ee.sizer.clientWidth-E.offsetWidth)/2),E.style.left=_e+"px"),H&&Os(this,{left:_e,top:re,right:_e+E.offsetWidth,bottom:re+E.offsetHeight})},triggerOnKeyDown:Hn(Jo),triggerOnKeyPress:Hn(qo),triggerOnKeyUp:Zo,triggerOnMouseDown:Hn($o),execCommand:function(i){if(ss.hasOwnProperty(i))return ss[i].call(null,this)},triggerElectric:Hn(function(i){sl(this,i)}),findPosH:function(i,E,H,J){var q=1;E<0&&(q=-1,E=-E);for(var ee=L(this.doc,i),re=0;re<E&&!(ee=uo(this.doc,ee,q,H,J),ee.hitSide);++re);return ee},moveH:Hn(function(i,E){var H=this;this.extendSelectionsBy(function(J){return H.display.shift||H.doc.extend||J.empty()?uo(H.doc,J.head,i,E,H.options.rtlMoveVisually):i<0?J.from():J.to()},Fe)}),deleteH:Hn(function(i,E){var H=this.doc.sel,J=this.doc;H.somethingSelected()?J.replaceSelection("",null,"+delete"):wa(this,function(q){var ee=uo(J,q.head,i,E,!1);return i<0?{from:ee,to:q.head}:{from:q.head,to:ee}})}),findPosV:function(i,E,H,J){var q=1,ee=J;E<0&&(q=-1,E=-E);for(var re=L(this.doc,i),_e=0;_e<E;++_e){var Le=Wr(this,re,"div");if(ee==null?ee=Le.left:Le.left=ee,re=cl(this,Le,q,H),re.hitSide)break}return re},moveV:Hn(function(i,E){var H=this,J=this.doc,q=[],ee=!this.display.shift&&!J.extend&&J.sel.somethingSelected();if(J.extendSelectionsBy(function(_e){if(ee)return i<0?_e.from():_e.to();var Le=Wr(H,_e.head,"div");_e.goalColumn!=null&&(Le.left=_e.goalColumn),q.push(Le.left);var Qe=cl(H,Le,i,E);return E=="page"&&_e==J.sel.primary()&&Ga(H,Ma(H,Qe,"div").top-Le.top),Qe},Fe),q.length)for(var re=0;re<J.sel.ranges.length;re++)J.sel.ranges[re].goalColumn=q[re]}),findWordAt:function(i){var E=this.doc,H=Rt(E,i.line).text,J=i.ch,q=i.ch;if(H){var ee=this.getHelper(i,"wordChars");(i.sticky=="before"||q==H.length)&&J?--J:++q;for(var re=H.charAt(J),_e=qe(re,ee)?function(Le){return qe(Le,ee)}:/\s/.test(re)?function(Le){return/\s/.test(Le)}:function(Le){return!/\s/.test(Le)&&!qe(Le)};J>0&&_e(H.charAt(J-1));)--J;for(;q<H.length&&_e(H.charAt(q));)++q}return new wn(gt(i.line,J),gt(i.line,q))},toggleOverwrite:function(i){if(i!=null&&i==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?k(this.display.cursorDiv,"CodeMirror-overwrite"):_(this.display.cursorDiv,"CodeMirror-overwrite"),Ke(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==P()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Hn(function(i,E){Gi(this,i,E)}),getScrollInfo:function(){var i=this.display.scroller;return{left:i.scrollLeft,top:i.scrollTop,height:i.scrollHeight-Yr(this)-this.display.barHeight,width:i.scrollWidth-Yr(this)-this.display.barWidth,clientHeight:ra(this),clientWidth:vi(this)}},scrollIntoView:Hn(function(i,E){i==null?(i={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof i=="number"?i={from:gt(i,0),to:null}:i.from==null&&(i={from:i,to:null}),i.to||(i.to=i.from),i.margin=E||0,i.from.line!=null?Qs(this,i):ii(this,i.from,i.to,i.margin)}),setSize:Hn(function(i,E){var H=this,J=function(ee){return typeof ee=="number"||/^\d+$/.test(String(ee))?ee+"px":ee};i!=null&&(this.display.wrapper.style.width=J(i)),E!=null&&(this.display.wrapper.style.height=J(E)),this.options.lineWrapping&&La(this);var q=this.display.viewFrom;this.doc.iter(q,this.display.viewTo,function(ee){if(ee.widgets){for(var re=0;re<ee.widgets.length;re++)if(ee.widgets[re].noHScroll){hi(H,q,"widget");break}}++q}),this.curOp.forceUpdate=!0,Ke(this,"refresh",this)}),operation:function(i){return Mn(this,i)},startOperation:function(){return zt(this)},endOperation:function(){return Lt(this)},refresh:Hn(function(){var i=this.display.cachedTextHeight;Zn(this),this.curOp.forceUpdate=!0,_n(this),Gi(this,this.doc.scrollLeft,this.doc.scrollTop),Qi(this.display),(i==null||Math.abs(i-Ri(this.display))>.5||this.options.lineWrapping)&&oa(this),Ke(this,"refresh",this)}),swapDoc:Hn(function(i){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),go(this,i),_n(this),this.display.input.reset(),Gi(this,i.scrollLeft,i.scrollTop),this.curOp.forceScroll=!0,Rn(this,"swapDoc",this,E),E}),phrase:function(i){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,i)?E[i]:i},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}},be(e),e.registerHelper=function(i,E,H){l.hasOwnProperty(i)||(l[i]=e[i]={_global:[]}),l[i][E]=H},e.registerGlobalHelper=function(i,E,H,J){e.registerHelper(i,E,J),l[i]._global.push({pred:H,val:J})}}function uo(e,t,l,i,E){var H=t,J=l,q=Rt(e,t.line),ee=E&&e.direction=="rtl"?-l:l;function re(){var Kt=t.line+ee;return Kt<e.first||Kt>=e.first+e.size?!1:(t=new gt(Kt,t.ch,t.sticky),q=Rt(e,Kt))}function _e(Kt){var Ft;if(i=="codepoint"){var Xt=q.text.charCodeAt(t.ch+(i>0?0:-1));isNaN(Xt)?Ft=null:Ft=new gt(t.line,Math.max(0,Math.min(q.text.length,t.ch+l*(Xt>=55296&&Xt<56320?2:1))),-l)}else E?Ft=kl(e.cm,q,t,l):Ft=no(q,t,l);if(Ft==null)if(!Kt&&re())t=ro(E,e.cm,q,t.line,ee);else return!1;else t=Ft;return!0}if(i=="char"||i=="codepoint")_e();else if(i=="column")_e(!0);else if(i=="word"||i=="group")for(var Le=null,Qe=i=="group",ze=e.cm&&e.cm.getHelper(t,"wordChars"),ft=!0;!(l<0&&!_e(!ft));ft=!1){var xt=q.text.charAt(t.ch)||`
`,It=qe(xt,ze)?"w":Qe&&xt==`
`?"n":!Qe||/\s/.test(xt)?null:"p";if(Qe&&!ft&&!It&&(It="s"),Le&&Le!=It){l<0&&(l=1,_e(),t.sticky="after");break}if(It&&(Le=It),l>0&&!_e(!ft))break}var Bt=ks(e,t,H,J,!0);return Jt(H,Bt)&&(Bt.hitSide=!0),Bt}function cl(e,t,l,i){var E=e.doc,H=t.left,J;if(i=="page"){var q=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ee=Math.max(q-.5*Ri(e.display),3);J=(l>0?t.bottom:t.top)+l*ee}else i=="line"&&(J=l>0?t.bottom+3:t.top-3);for(var re;!(re=ka(e,H,J),!re.outside);){if(l<0?J<=0:J>=E.height){re.hitSide=!0;break}J+=l*5}return re}var jn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};jn.prototype.init=function(e){var t=this,l=this,i=l.cm,E=l.div=e.lineDiv;ll(E,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize);function H(q){for(var ee=q.target;ee;ee=ee.parentNode){if(ee==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ee.className))break}return!1}Ie(E,"paste",function(q){if(!H(q)||Xe(i,q)||al(q,i))return;j<=11&&setTimeout(xn(i,function(){return t.updateFromDOM()}),20)}),Ie(E,"compositionstart",function(q){t.composing={data:q.data,done:!1}}),Ie(E,"compositionupdate",function(q){t.composing||(t.composing={data:q.data,done:!1})}),Ie(E,"compositionend",function(q){t.composing&&(q.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ie(E,"touchstart",function(){return l.forceCompositionEnd()}),Ie(E,"input",function(){t.composing||t.readFromDOMSoon()});function J(q){if(!H(q)||Xe(i,q))return;if(i.somethingSelected())js({lineWise:!1,text:i.getSelections()}),q.type=="cut"&&i.replaceSelection("",null,"cut");else if(i.options.lineWiseCopyCut){var ee=ol(i);js({lineWise:!0,text:ee.text}),q.type=="cut"&&i.operation(function(){i.setSelections(ee.ranges,0,Se),i.replaceSelection("",null,"cut")})}else return;if(q.clipboardData){q.clipboardData.clearData();var re=si.text.join(`
`);if(q.clipboardData.setData("Text",re),q.clipboardData.getData("Text")==re){q.preventDefault();return}}var _e=ul(),Le=_e.firstChild;i.display.lineSpace.insertBefore(_e,i.display.lineSpace.firstChild),Le.value=si.text.join(`
`);var Qe=document.activeElement;A(Le),setTimeout(function(){i.display.lineSpace.removeChild(_e),Qe.focus(),Qe==E&&l.showPrimarySelection()},50)}Ie(E,"copy",J),Ie(E,"cut",J)},jn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},jn.prototype.prepareSelection=function(){var e=Ss(this.cm,!1);return e.focus=document.activeElement==this.div,e},jn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},jn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},jn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,l=t.doc.sel.primary(),i=l.from(),E=l.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||E.line<t.display.viewFrom){e.removeAllRanges();return}var H=Ws(t,e.anchorNode,e.anchorOffset),J=Ws(t,e.focusNode,e.focusOffset);if(H&&!H.bad&&J&&!J.bad&&Wt(pn(H,J),i)==0&&Wt(nn(H,J),E)==0)return;var q=t.display.view,ee=i.line>=t.display.viewFrom&&dl(t,i)||{node:q[0].measure.map[2],offset:0},re=E.line<t.display.viewTo&&dl(t,E);if(!re){var _e=q[q.length-1].measure,Le=_e.maps?_e.maps[_e.maps.length-1]:_e.map;re={node:Le[Le.length-1],offset:Le[Le.length-2]-Le[Le.length-3]}}if(!ee||!re){e.removeAllRanges();return}var Qe=e.rangeCount&&e.getRangeAt(0),ze;try{ze=x(ee.node,ee.offset,re.offset,re.node)}catch(ft){}ze&&(!U&&t.state.focused?(e.collapse(ee.node,ee.offset),ze.collapsed||(e.removeAllRanges(),e.addRange(ze))):(e.removeAllRanges(),e.addRange(ze)),Qe&&e.anchorNode==null?e.addRange(Qe):U&&this.startGracePeriod()),this.rememberSelection()},jn.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)},jn.prototype.showMultipleSelections=function(e){v(this.cm.display.cursorDiv,e.cursors),v(this.cm.display.selectionDiv,e.selection)},jn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},jn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return g(this.div,t)},jn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},jn.prototype.blur=function(){this.div.blur()},jn.prototype.getField=function(){return this.div},jn.prototype.supportsTouch=function(){return!0},jn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Mn(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},jn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},jn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(u&&m&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var l=Ws(t,e.anchorNode,e.anchorOffset),i=Ws(t,e.focusNode,e.focusOffset);l&&i&&Mn(t,function(){yr(t.doc,Sr(l,i),Se),(l.bad||i.bad)&&(t.curOp.selectionChanged=!0)})},jn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,l=e.doc.sel.primary(),i=l.from(),E=l.to();if(i.ch==0&&i.line>e.firstLine()&&(i=gt(i.line-1,Rt(e.doc,i.line-1).length)),E.ch==Rt(e.doc,E.line).text.length&&E.line<e.lastLine()&&(E=gt(E.line+1,0)),i.line<t.viewFrom||E.line>t.viewTo-1)return!1;var H,J,q;i.line==t.viewFrom||(H=xi(e,i.line))==0?(J=Yt(t.view[0].line),q=t.view[0].node):(J=Yt(t.view[H].line),q=t.view[H-1].node.nextSibling);var ee=xi(e,E.line),re,_e;if(ee==t.view.length-1?(re=t.viewTo-1,_e=t.lineDiv.lastChild):(re=Yt(t.view[ee+1].line)-1,_e=t.view[ee+1].node.previousSibling),!q)return!1;for(var Le=e.doc.splitLines(tu(e,q,_e,J,re)),Qe=qt(e.doc,gt(J,0),gt(re,Rt(e.doc,re).text.length));Le.length>1&&Qe.length>1;)if(ne(Le)==ne(Qe))Le.pop(),Qe.pop(),re--;else if(Le[0]==Qe[0])Le.shift(),Qe.shift(),J++;else break;for(var ze=0,ft=0,xt=Le[0],It=Qe[0],Bt=Math.min(xt.length,It.length);ze<Bt&&xt.charCodeAt(ze)==It.charCodeAt(ze);)++ze;for(var Kt=ne(Le),Ft=ne(Qe),Xt=Math.min(Kt.length-(Le.length==1?ze:0),Ft.length-(Qe.length==1?ze:0));ft<Xt&&Kt.charCodeAt(Kt.length-ft-1)==Ft.charCodeAt(Ft.length-ft-1);)++ft;if(Le.length==1&&Qe.length==1&&J==i.line)for(;ze&&ze>i.ch&&Kt.charCodeAt(Kt.length-ft-1)==Ft.charCodeAt(Ft.length-ft-1);)ze--,ft++;Le[Le.length-1]=Kt.slice(0,Kt.length-ft).replace(/^\u200b+/,""),Le[0]=Le[0].slice(ze).replace(/\u200b+$/,"");var ln=gt(J,ze),an=gt(re,Qe.length?ne(Qe).length-ft:0);if(Le.length>1||Le[0]||Wt(ln,an))return _a(e.doc,Le,ln,an,"+input"),!0},jn.prototype.ensurePolled=function(){this.forceCompositionEnd()},jn.prototype.reset=function(){this.forceCompositionEnd()},jn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},jn.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)},jn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Mn(this.cm,function(){return Zn(e.cm)})},jn.prototype.setUneditable=function(e){e.contentEditable="false"},jn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||xn(this.cm,lo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},jn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},jn.prototype.onContextMenu=function(){},jn.prototype.resetPosition=function(){},jn.prototype.needsContentAttribute=!0;function dl(e,t){var l=wr(e,t.line);if(!l||l.hidden)return null;var i=Rt(e.doc,t.line),E=Ia(l,i,t.line),H=St(i,e.doc.direction),J="left";if(H){var q=dt(H,t.ch);J=q%2?"right":"left"}var ee=Oi(E.map,t.ch,J);return ee.offset=ee.collapse=="right"?ee.end:ee.start,ee}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Aa(e,t){return t&&(e.bad=!0),e}function tu(e,t,l,i,E){var H="",J=!1,q=e.doc.lineSeparator(),ee=!1;function re(ze){return function(ft){return ft.id==ze}}function _e(){J&&(H+=q,ee&&(H+=q),J=ee=!1)}function Le(ze){ze&&(_e(),H+=ze)}function Qe(ze){if(ze.nodeType==1){var ft=ze.getAttribute("cm-text");if(ft){Le(ft);return}var xt=ze.getAttribute("cm-marker"),It;if(xt){var Bt=e.findMarks(gt(i,0),gt(E+1,0),re(+xt));Bt.length&&(It=Bt[0].find(0))&&Le(qt(e.doc,It.from,It.to).join(q));return}if(ze.getAttribute("contenteditable")=="false")return;var Kt=/^(pre|div|p|li|table|br)$/i.test(ze.nodeName);if(!/^br$/i.test(ze.nodeName)&&ze.textContent.length==0)return;Kt&&_e();for(var Ft=0;Ft<ze.childNodes.length;Ft++)Qe(ze.childNodes[Ft]);/^(pre|p)$/i.test(ze.nodeName)&&(ee=!0),Kt&&(J=!0)}else ze.nodeType==3&&Le(ze.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Qe(t),t==l);)t=t.nextSibling,ee=!1;return H}function Ws(e,t,l){var i;if(t==e.display.lineDiv){if(i=e.display.lineDiv.childNodes[l],!i)return Aa(e.clipPos(gt(e.display.viewTo-1)),!0);t=null,l=0}else for(i=t;;i=i.parentNode){if(!i||i==e.display.lineDiv)return null;if(i.parentNode&&i.parentNode==e.display.lineDiv)break}for(var E=0;E<e.display.view.length;E++){var H=e.display.view[E];if(H.node==i)return nu(H,t,l)}}function nu(e,t,l){var i=e.text.firstChild,E=!1;if(!t||!g(i,t))return Aa(gt(Yt(e.line),0),!0);if(t==i&&(E=!0,t=i.childNodes[l],l=0,!t)){var H=e.rest?ne(e.rest):e.line;return Aa(gt(Yt(H),H.text.length),E)}var J=t.nodeType==3?t:null,q=t;for(!J&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(J=t.firstChild,l&&(l=J.nodeValue.length));q.parentNode!=i;)q=q.parentNode;var ee=e.measure,re=ee.maps;function _e(It,Bt,Kt){for(var Ft=-1;Ft<(re?re.length:0);Ft++)for(var Xt=Ft<0?ee.map:re[Ft],ln=0;ln<Xt.length;ln+=3){var an=Xt[ln+2];if(an==It||an==Bt){var bn=Yt(Ft<0?e.line:e.rest[Ft]),Wn=Xt[ln]+Kt;return(Kt<0||an!=It)&&(Wn=Xt[ln+(Kt?1:0)]),gt(bn,Wn)}}}var Le=_e(J,q,l);if(Le)return Aa(Le,E);for(var Qe=q.nextSibling,ze=J?J.nodeValue.length-l:0;Qe;Qe=Qe.nextSibling){if(Le=_e(Qe,Qe.firstChild,0),Le)return Aa(gt(Le.line,Le.ch-ze),E);ze+=Qe.textContent.length}for(var ft=q.previousSibling,xt=l;ft;ft=ft.previousSibling){if(Le=_e(ft,ft.firstChild,-1),Le)return Aa(gt(Le.line,Le.ch+xt),E);xt+=ft.textContent.length}}var tr=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new $,this.hasSelection=!1,this.composing=null};tr.prototype.init=function(e){var t=this,l=this,i=this.cm;this.createField(e);var E=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),d&&(E.style.width="0px"),Ie(E,"input",function(){K&&j>=9&&t.hasSelection&&(t.hasSelection=null),l.poll()}),Ie(E,"paste",function(J){if(Xe(i,J)||al(J,i))return;i.state.pasteIncoming=+new Date,l.fastPoll()});function H(J){if(Xe(i,J))return;if(i.somethingSelected())js({lineWise:!1,text:i.getSelections()});else if(i.options.lineWiseCopyCut){var q=ol(i);js({lineWise:!0,text:q.text}),J.type=="cut"?i.setSelections(q.ranges,null,Se):(l.prevInput="",E.value=q.text.join(`
`),A(E))}else return;J.type=="cut"&&(i.state.cutIncoming=+new Date)}Ie(E,"cut",H),Ie(E,"copy",H),Ie(e.scroller,"paste",function(J){if(Vr(e,J)||Xe(i,J))return;if(!E.dispatchEvent){i.state.pasteIncoming=+new Date,l.focus();return}var q=new Event("paste");q.clipboardData=J.clipboardData,E.dispatchEvent(q)}),Ie(e.lineSpace,"selectstart",function(J){Vr(e,J)||ie(J)}),Ie(E,"compositionstart",function(){var J=i.getCursor("from");l.composing&&l.composing.range.clear(),l.composing={start:J,range:i.markText(J,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(E,"compositionend",function(){l.composing&&(l.poll(),l.composing.range.clear(),l.composing=null)})},tr.prototype.createField=function(e){this.wrapper=ul(),this.textarea=this.wrapper.firstChild},tr.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},tr.prototype.prepareSelection=function(){var e=this.cm,t=e.display,l=e.doc,i=Ss(e);if(e.options.moveInputWithCursor){var E=Wr(e,l.sel.primary().head,"div"),H=t.wrapper.getBoundingClientRect(),J=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,E.top+J.top-H.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,E.left+J.left-H.left))}return i},tr.prototype.showSelection=function(e){var t=this.cm,l=t.display;v(l.cursorDiv,e.cursors),v(l.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},tr.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var l=t.getSelection();this.textarea.value=l,t.state.focused&&A(this.textarea),K&&j>=9&&(this.hasSelection=l)}else e||(this.prevInput=this.textarea.value="",K&&j>=9&&(this.hasSelection=null))},tr.prototype.getField=function(){return this.textarea},tr.prototype.supportsTouch=function(){return!1},tr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!o||P()!=this.textarea))try{this.textarea.focus()}catch(e){}},tr.prototype.blur=function(){this.textarea.blur()},tr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},tr.prototype.receivedFocus=function(){this.slowPoll()},tr.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()})},tr.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function l(){var i=t.poll();!i&&!e?(e=!0,t.polling.set(60,l)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,l)},tr.prototype.poll=function(){var e=this,t=this.cm,l=this.textarea,i=this.prevInput;if(this.contextMenuPending||!t.state.focused||et(l)&&!i&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var E=l.value;if(E==i&&!t.somethingSelected())return!1;if(K&&j>=9&&this.hasSelection===E||s&&/[\uf700-\uf7ff]/.test(E))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var H=E.charCodeAt(0);if(H==8203&&!i&&(i="\u200B"),H==8666)return this.reset(),this.cm.execCommand("undo")}for(var J=0,q=Math.min(i.length,E.length);J<q&&i.charCodeAt(J)==E.charCodeAt(J);)++J;return Mn(t,function(){lo(t,E.slice(J),i.length-J,null,e.composing?"*compose":null),E.length>1e3||E.indexOf(`
`)>-1?l.value=e.prevInput="":e.prevInput=E,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},tr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},tr.prototype.onKeyPress=function(){K&&j>=9&&(this.hasSelection=null),this.fastPoll()},tr.prototype.onContextMenu=function(e){var t=this,l=t.cm,i=l.display,E=t.textarea;t.contextMenuPending&&t.contextMenuPending();var H=_i(l,e),J=i.scroller.scrollTop;if(!H||f)return;var q=l.options.resetSelectionOnContextMenu;q&&l.doc.sel.contains(H)==-1&&xn(l,yr)(l.doc,Sr(H),Se);var ee=E.style.cssText,re=t.wrapper.style.cssText,_e=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-_e.top-5)+"px; left: "+(e.clientX-_e.left-5)+`px;
z-index: 1000; background: `+(K?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Le;n&&(Le=window.scrollY),i.input.focus(),n&&window.scrollTo(null,Le),i.input.reset(),l.somethingSelected()||(E.value=t.prevInput=" "),t.contextMenuPending=ze,i.selForContextMenu=l.doc.sel,clearTimeout(i.detectingSelectAll);function Qe(){if(E.selectionStart!=null){var xt=l.somethingSelected(),It="\u200B"+(xt?E.value:"");E.value="\u21DA",E.value=It,t.prevInput=xt?"":"\u200B",E.selectionStart=1,E.selectionEnd=It.length,i.selForContextMenu=l.doc.sel}}function ze(){if(t.contextMenuPending!=ze)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=re,E.style.cssText=ee,K&&j<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=J),E.selectionStart!=null){(!K||K&&j<9)&&Qe();var xt=0,It=function(){i.selForContextMenu==l.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&t.prevInput=="\u200B"?xn(l,Ro)(l):xt++<10?i.detectingSelectAll=setTimeout(It,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(It,200)}}if(K&&j>=9&&Qe(),D){ye(e);var ft=function(){lt(window,"mouseup",ft),setTimeout(ze,20)};Ie(window,"mouseup",ft)}else setTimeout(ze,50)},tr.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},tr.prototype.setUneditable=function(){},tr.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?T(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var l=P();t.autofocus=l==e||e.getAttribute("autofocus")!=null&&l==document.body}function i(){e.value=q.getValue()}var E;if(e.form&&(Ie(e.form,"submit",i),!t.leaveSubmitMethodAlone)){var H=e.form;E=H.submit;try{var J=H.submit=function(){i(),H.submit=E,H.submit(),H.submit=J}}catch(ee){}}t.finishInit=function(ee){ee.save=i,ee.getTextArea=function(){return e},ee.toTextArea=function(){ee.toTextArea=isNaN,i(),e.parentNode.removeChild(ee.getWrapperElement()),e.style.display="",e.form&&(lt(e.form,"submit",i),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=E))}},e.style.display="none";var q=Xn(function(ee){return e.parentNode.insertBefore(ee,e.nextSibling)},t);return q}function iu(e){e.off=lt,e.on=Ie,e.wheelEventPixels=fo,e.Doc=Ir,e.splitLines=$e,e.countColumn=Y,e.findColumn=Me,e.isWordChar=Ve,e.Pass=Pe,e.signal=Ke,e.Line=xr,e.changeEnd=ti,e.scrollbarModel=Ot,e.Pos=gt,e.cmpPos=Wt,e.modes=at,e.mimeModes=Je,e.resolveMode=Be,e.getMode=Ze,e.modeExtensions=nt,e.extendMode=ut,e.copyState=Et,e.startState=Ut,e.innerMode=st,e.commands=ss,e.keyMap=Ai,e.keyName=zo,e.isModifierKey=Ko,e.lookupKey=Ta,e.normalizeKeyMap=Ml,e.StringStream=Zt,e.SharedTextMarker=rs,e.TextMarker=ki,e.LineWidget=ns,e.e_preventDefault=ie,e.e_stopPropagation=oe,e.e_stop=ye,e.addClass=k,e.contains=g,e.rmClass=_,e.keyNames=Pi}Ql(Xn),$l(Xn);var au="iter insert remove copy getEditor constructor".split(" ");for(var Hs in Ir.prototype)Ir.prototype.hasOwnProperty(Hs)&&le(au,Hs)<0&&(Xn.prototype[Hs]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ir.prototype[Hs]));return be(Ir),Xn.inputStyles={textarea:tr,contenteditable:jn},Xn.defineMode=function(e){!Xn.defaults.mode&&e!="null"&&(Xn.defaults.mode=e),_t.apply(this,arguments)},Xn.defineMIME=yt,Xn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Xn.defineMIME("text/plain","null"),Xn.defineExtension=function(e,t){Xn.prototype[e]=t},Xn.defineDocExtension=function(e,t){Ir.prototype[e]=t},Xn.fromTextArea=ru,iu(Xn),Xn.version="5.58.2",Xn})},W6BS:function(We,se){We.exports="data:image/png;base64,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"},WaYH:function(We,se,B){"use strict";var Z=B("rePB"),G=B("Ff2n"),U=B("VTBJ"),V=B("1OyB"),W=B("vuIU"),M=B("JX7q"),K=B("Ji7U"),j=B("LK+K"),n=B("q1tI"),w=B("TSYQ"),m=B.n(w),f=B("sboe"),p=B("OZM5"),c=function(D){var I=D.prefixCls,_=D.level,b=D.isStart,v=D.isEnd;if(!_)return null;for(var h="".concat(I,"-indent-unit"),C=[],x=0;x<_;x+=1){var g;C.push(n.createElement("span",{key:x,className:m()(h,(g={},Object(Z.a)(g,"".concat(h,"-start"),b[x+1]),Object(Z.a)(g,"".concat(h,"-end"),v[x+1]),Object(Z.a)(g,"".concat(h,"-end-first-level"),!x&&v[0]),g))}))}return n.createElement("span",{"aria-hidden":"true",className:"".concat(I,"-indent")},C)},r=c,d=B("815F"),u="open",o="close",s="---",a=function(S){Object(K.a)(I,S);var D=Object(j.a)(I);function I(){var _;return Object(V.a)(this,I),_=D.apply(this,arguments),_.state={dragNodeHighlight:!1},_.onSelectorClick=function(b){var v=_.props.context.onNodeClick;v(b,Object(d.b)(_.props)),_.isSelectable()?_.onSelect(b):_.onCheck(b)},_.onSelectorDoubleClick=function(b){var v=_.props.context.onNodeDoubleClick;v(b,Object(d.b)(_.props))},_.onSelect=function(b){if(_.isDisabled())return;var v=_.props.context.onNodeSelect;b.preventDefault(),v(b,Object(d.b)(_.props))},_.onCheck=function(b){if(_.isDisabled())return;var v=_.props,h=v.disableCheckbox,C=v.checked,x=_.props.context.onNodeCheck;if(!_.isCheckable()||h)return;b.preventDefault();var g=!C;x(b,Object(d.b)(_.props),g)},_.onMouseEnter=function(b){var v=_.props.context.onNodeMouseEnter;v(b,Object(d.b)(_.props))},_.onMouseLeave=function(b){var v=_.props.context.onNodeMouseLeave;v(b,Object(d.b)(_.props))},_.onContextMenu=function(b){var v=_.props.context.onNodeContextMenu;v(b,Object(d.b)(_.props))},_.onDragStart=function(b){var v=_.props.context.onNodeDragStart;b.stopPropagation(),_.setState({dragNodeHighlight:!0}),v(b,Object(M.a)(_));try{b.dataTransfer.setData("text/plain","")}catch(h){}},_.onDragEnter=function(b){var v=_.props.context.onNodeDragEnter;b.preventDefault(),b.stopPropagation(),v(b,Object(M.a)(_))},_.onDragOver=function(b){var v=_.props.context.onNodeDragOver;b.preventDefault(),b.stopPropagation(),v(b,Object(M.a)(_))},_.onDragLeave=function(b){var v=_.props.context.onNodeDragLeave;b.stopPropagation(),v(b,Object(M.a)(_))},_.onDragEnd=function(b){var v=_.props.context.onNodeDragEnd;b.stopPropagation(),_.setState({dragNodeHighlight:!1}),v(b,Object(M.a)(_))},_.onDrop=function(b){var v=_.props.context.onNodeDrop;b.preventDefault(),b.stopPropagation(),_.setState({dragNodeHighlight:!1}),v(b,Object(M.a)(_))},_.onExpand=function(b){var v=_.props.context.onNodeExpand;v(b,Object(d.b)(_.props))},_.setSelectHandle=function(b){_.selectHandle=b},_.getNodeState=function(){var b=_.props.expanded;return _.isLeaf()?null:b?u:o},_.hasChildren=function(){var b=_.props.eventKey,v=_.props.context.keyEntities,h=v[b]||{},C=h.children;return!!(C||[]).length},_.isLeaf=function(){var b=_.props,v=b.isLeaf,h=b.loaded,C=_.props.context.loadData,x=_.hasChildren();return v===!1?!1:v||!C&&!x||C&&h&&!x},_.isDisabled=function(){var b=_.props.disabled,v=_.props.context.disabled;return!!(v||b)},_.isCheckable=function(){var b=_.props.checkable,v=_.props.context.checkable;return!v||b===!1?!1:v},_.syncLoadData=function(b){var v=b.expanded,h=b.loading,C=b.loaded,x=_.props.context,g=x.loadData,P=x.onNodeLoad;if(h)return;g&&v&&!_.isLeaf()&&(!_.hasChildren()&&!C&&P(Object(d.b)(_.props)))},_.renderSwitcher=function(){var b=_.props,v=b.expanded,h=b.switcherIcon,C=_.props.context,x=C.prefixCls,g=C.switcherIcon,P=h||g;if(_.isLeaf())return n.createElement("span",{className:m()("".concat(x,"-switcher"),"".concat(x,"-switcher-noop"))},typeof P=="function"?P(Object(U.a)(Object(U.a)({},_.props),{},{isLeaf:!0})):P);var k=m()("".concat(x,"-switcher"),"".concat(x,"-switcher_").concat(v?u:o));return n.createElement("span",{onClick:_.onExpand,className:k},typeof P=="function"?P(Object(U.a)(Object(U.a)({},_.props),{},{isLeaf:!1})):P)},_.renderCheckbox=function(){var b=_.props,v=b.checked,h=b.halfChecked,C=b.disableCheckbox,x=_.props.context.prefixCls,g=_.isDisabled(),P=_.isCheckable();if(!P)return null;var k=typeof P!="boolean"?P:null;return n.createElement("span",{className:m()("".concat(x,"-checkbox"),v&&"".concat(x,"-checkbox-checked"),!v&&h&&"".concat(x,"-checkbox-indeterminate"),(g||C)&&"".concat(x,"-checkbox-disabled")),onClick:_.onCheck},k)},_.renderIcon=function(){var b=_.props.loading,v=_.props.context.prefixCls;return n.createElement("span",{className:m()("".concat(v,"-iconEle"),"".concat(v,"-icon__").concat(_.getNodeState()||"docu"),b&&"".concat(v,"-icon_loading"))})},_.renderSelector=function(){var b=_.state.dragNodeHighlight,v=_.props,h=v.title,C=v.selected,x=v.icon,g=v.loading,P=v.data,k=_.props.context,y=k.prefixCls,A=k.showIcon,F=k.icon,T=k.draggable,Y=k.loadData,$=k.titleRender,le=_.isDisabled(),de="".concat(y,"-node-content-wrapper"),Pe;if(A){var Se=x||F;Pe=Se?n.createElement("span",{className:m()("".concat(y,"-iconEle"),"".concat(y,"-icon__customize"))},typeof Se=="function"?Se(_.props):Se):_.renderIcon()}else Y&&g&&(Pe=_.renderIcon());var we;typeof h=="function"?we=h(P):$?we=$(P):we=h;var Fe=n.createElement("span",{className:"".concat(y,"-title")},we);return n.createElement("span",{ref:_.setSelectHandle,title:typeof h=="string"?h:"",className:m()("".concat(de),"".concat(de,"-").concat(_.getNodeState()||"normal"),!le&&(C||b)&&"".concat(y,"-node-selected"),!le&&T&&"draggable"),draggable:!le&&T||void 0,"aria-grabbed":!le&&T||void 0,onMouseEnter:_.onMouseEnter,onMouseLeave:_.onMouseLeave,onContextMenu:_.onContextMenu,onClick:_.onSelectorClick,onDoubleClick:_.onSelectorDoubleClick,onDragStart:T?_.onDragStart:void 0},Pe,Fe)},_}return Object(W.a)(I,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var b=this.props.selectable,v=this.props.context.selectable;return typeof b=="boolean"?b:v}},{key:"render",value:function(){var b,v=this.props,h=v.eventKey,C=v.className,x=v.style,g=v.dragOver,P=v.dragOverGapTop,k=v.dragOverGapBottom,y=v.isLeaf,A=v.isStart,F=v.isEnd,T=v.expanded,Y=v.selected,$=v.checked,le=v.halfChecked,de=v.loading,Pe=v.domRef,Se=v.active,we=v.onMouseMove,Fe=Object(G.a)(v,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Me=this.props.context,me=Me.prefixCls,pe=Me.filterTreeNode,ne=Me.draggable,Ee=Me.keyEntities,ae=this.isDisabled(),ke=Object(p.f)(Fe),je=Ee[h]||{},Oe=je.level,Ve=F[F.length-1];return n.createElement("div",Object.assign({ref:Pe,className:m()(C,"".concat(me,"-treenode"),(b={},Object(Z.a)(b,"".concat(me,"-treenode-disabled"),ae),Object(Z.a)(b,"".concat(me,"-treenode-switcher-").concat(T?"open":"close"),!y),Object(Z.a)(b,"".concat(me,"-treenode-checkbox-checked"),$),Object(Z.a)(b,"".concat(me,"-treenode-checkbox-indeterminate"),le),Object(Z.a)(b,"".concat(me,"-treenode-selected"),Y),Object(Z.a)(b,"".concat(me,"-treenode-loading"),de),Object(Z.a)(b,"".concat(me,"-treenode-active"),Se),Object(Z.a)(b,"".concat(me,"-treenode-leaf-last"),Ve),Object(Z.a)(b,"drag-over",!ae&&g),Object(Z.a)(b,"drag-over-gap-top",!ae&&P),Object(Z.a)(b,"drag-over-gap-bottom",!ae&&k),Object(Z.a)(b,"filter-node",pe&&pe(Object(d.b)(this.props))),b)),style:x,onDragEnter:ne?this.onDragEnter:void 0,onDragOver:ne?this.onDragOver:void 0,onDragLeave:ne?this.onDragLeave:void 0,onDrop:ne?this.onDrop:void 0,onDragEnd:ne?this.onDragEnd:void 0,onMouseMove:we},ke),n.createElement(r,{prefixCls:me,level:Oe,isStart:A,isEnd:F}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),I}(n.Component),R=function(D){return n.createElement(f.a.Consumer,null,function(I){return n.createElement(a,Object.assign({},D,{context:I}))})};R.displayName="TreeNode",R.defaultProps={title:s},R.isTreeNode=1;var O=se.a=R},Xsq0:function(We,se,B){We.exports=B.p+"static/mainbanner.0a951716.jpg"},Y1PL:function(We,se,B){"use strict";B.r(se),B.d(se,"ResizableTextArea",function(){return le});var Z=B("wx14"),G=B("1OyB"),U=B("vuIU"),V=B("Ji7U"),W=B("LK+K"),M=B("q1tI"),K=B("VTBJ"),j=B("rePB"),n=B("Zm9Q"),w=B("Kwbf"),m=B("c+Xe"),f=B("m+aA"),p=B("bdgK"),c=new Map;function r(Se){Se.forEach(function(we){var Fe,Me=we.target;(Fe=c.get(Me))===null||Fe===void 0||Fe.forEach(function(me){return me(Me)})})}var d=new p.default(r),u=null,o=null;function s(Se,we){c.has(Se)||(c.set(Se,new Set),d.observe(Se)),c.get(Se).add(we)}function a(Se,we){c.has(Se)&&(c.get(Se).delete(we),c.get(Se).size||(d.unobserve(Se),c.delete(Se)))}var R=function(Se){Object(V.a)(Fe,Se);var we=Object(W.a)(Fe);function Fe(){return Object(G.a)(this,Fe),we.apply(this,arguments)}return Object(U.a)(Fe,[{key:"render",value:function(){return this.props.children}}]),Fe}(M.Component),O=M.createContext(null);function S(Se){var we=Se.children,Fe=Se.onBatchResize,Me=M.useRef(0),me=M.useRef([]),pe=M.useContext(O),ne=M.useCallback(function(Ee,ae,ke){Me.current+=1;var je=Me.current;me.current.push({size:Ee,element:ae,data:ke}),Promise.resolve().then(function(){je===Me.current&&(Fe==null||Fe(me.current),me.current=[])}),pe==null||pe(Ee,ae,ke)},[Fe,pe]);return M.createElement(O.Provider,{value:ne},we)}function D(Se){var we=Se.children,Fe=Se.disabled,Me=M.useRef(null),me=M.useRef(null),pe=M.useContext(O),ne=M.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Ee=M.isValidElement(we)&&Object(m.c)(we),ae=Ee?we.ref:null,ke=M.useMemo(function(){return Object(m.a)(ae,Me)},[ae,Me]),je=M.useRef(Se);je.current=Se;var Oe=M.useCallback(function(Ve){var qe=je.current,ue=qe.onResize,ve=qe.data,De=Ve.getBoundingClientRect(),Ne=De.width,it=De.height,pt=Ve.offsetWidth,mt=Ve.offsetHeight,dt=Math.floor(Ne),Tt=Math.floor(it);if(ne.current.width!==dt||ne.current.height!==Tt||ne.current.offsetWidth!==pt||ne.current.offsetHeight!==mt){var St={width:dt,height:Tt,offsetWidth:pt,offsetHeight:mt};ne.current=St;var Ue=pt===Math.round(Ne)?Ne:pt,Ie=mt===Math.round(it)?it:mt,tt=Object(K.a)(Object(K.a)({},St),{},{offsetWidth:Ue,offsetHeight:Ie});pe==null||pe(tt,Ve,ve),ue&&Promise.resolve().then(function(){ue(tt,Ve)})}},[]);return M.useEffect(function(){var Ve=Object(f.a)(Me.current)||Object(f.a)(me.current);return Ve&&!Fe&&s(Ve,Oe),function(){return a(Ve,Oe)}},[Me.current,Fe]),M.createElement(R,{ref:me},Ee?M.cloneElement(we,{ref:ke}):we)}var I="rc-observer-key";function _(Se){var we=Se.children,Fe=Object(n.a)(we);return Fe.map(function(Me,me){var pe=(Me==null?void 0:Me.key)||"".concat(I,"-").concat(me);return M.createElement(D,Object(Z.a)({},Se,{key:pe}),Me)})}_.Collection=S;var b=_,v=B("bT9E"),h=B("TSYQ"),C=B.n(h),x=`
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
`,g=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],P={},k;function y(Se){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=Se.getAttribute("id")||Se.getAttribute("data-reactid")||Se.getAttribute("name");if(we&&P[Fe])return P[Fe];var Me=window.getComputedStyle(Se),me=Me.getPropertyValue("box-sizing")||Me.getPropertyValue("-moz-box-sizing")||Me.getPropertyValue("-webkit-box-sizing"),pe=parseFloat(Me.getPropertyValue("padding-bottom"))+parseFloat(Me.getPropertyValue("padding-top")),ne=parseFloat(Me.getPropertyValue("border-bottom-width"))+parseFloat(Me.getPropertyValue("border-top-width")),Ee=g.map(function(ke){return"".concat(ke,":").concat(Me.getPropertyValue(ke))}).join(";"),ae={sizingStyle:Ee,paddingSize:pe,borderSize:ne,boxSizing:me};return we&&Fe&&(P[Fe]=ae),ae}function A(Se){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;k||(k=document.createElement("textarea"),k.setAttribute("tab-index","-1"),k.setAttribute("aria-hidden","true"),document.body.appendChild(k)),Se.getAttribute("wrap")?k.setAttribute("wrap",Se.getAttribute("wrap")):k.removeAttribute("wrap");var me=y(Se,we),pe=me.paddingSize,ne=me.borderSize,Ee=me.boxSizing,ae=me.sizingStyle;k.setAttribute("style","".concat(ae,";").concat(x)),k.value=Se.value||Se.placeholder||"";var ke=Number.MIN_SAFE_INTEGER,je=Number.MAX_SAFE_INTEGER,Oe=k.scrollHeight,Ve;if(Ee==="border-box"?Oe+=ne:Ee==="content-box"&&(Oe-=pe),Fe!==null||Me!==null){k.value=" ";var qe=k.scrollHeight-pe;Fe!==null&&(ke=qe*Fe,Ee==="border-box"&&(ke=ke+pe+ne),Oe=Math.max(ke,Oe)),Me!==null&&(je=qe*Me,Ee==="border-box"&&(je=je+pe+ne),Ve=Oe>je?"":"hidden",Oe=Math.min(je,Oe))}return{height:Oe,minHeight:ke,maxHeight:je,overflowY:Ve,resize:"none"}}var F=B("Gytx"),T=B.n(F),Y;(function(Se){Se[Se.NONE=0]="NONE",Se[Se.RESIZING=1]="RESIZING",Se[Se.RESIZED=2]="RESIZED"})(Y||(Y={}));var $=function(Se){Object(V.a)(Fe,Se);var we=Object(W.a)(Fe);function Fe(Me){var me;return Object(G.a)(this,Fe),me=we.call(this,Me),me.nextFrameActionId=void 0,me.resizeFrameId=void 0,me.textArea=void 0,me.saveTextArea=function(pe){me.textArea=pe},me.handleResize=function(pe){var ne=me.state.resizeStatus,Ee=me.props,ae=Ee.autoSize,ke=Ee.onResize;if(ne!==Y.NONE)return;typeof ke=="function"&&ke(pe),ae&&me.resizeOnNextFrame()},me.resizeOnNextFrame=function(){cancelAnimationFrame(me.nextFrameActionId),me.nextFrameActionId=requestAnimationFrame(me.resizeTextarea)},me.resizeTextarea=function(){var pe=me.props.autoSize;if(!pe||!me.textArea)return;var ne=pe.minRows,Ee=pe.maxRows,ae=A(me.textArea,!1,ne,Ee);me.setState({textareaStyles:ae,resizeStatus:Y.RESIZING},function(){cancelAnimationFrame(me.resizeFrameId),me.resizeFrameId=requestAnimationFrame(function(){me.setState({resizeStatus:Y.RESIZED},function(){me.resizeFrameId=requestAnimationFrame(function(){me.setState({resizeStatus:Y.NONE}),me.fixFirefoxAutoScroll()})})})})},me.renderTextArea=function(){var pe=me.props,ne=pe.prefixCls,Ee=ne===void 0?"rc-textarea":ne,ae=pe.autoSize,ke=pe.onResize,je=pe.className,Oe=pe.disabled,Ve=me.state,qe=Ve.textareaStyles,ue=Ve.resizeStatus,ve=Object(v.a)(me.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),De=C()(Ee,je,Object(j.a)({},"".concat(Ee,"-disabled"),Oe));"value"in ve&&(ve.value=ve.value||"");var Ne=Object(K.a)(Object(K.a)(Object(K.a)({},me.props.style),qe),ue===Y.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return M.createElement(b,{onResize:me.handleResize,disabled:!(ae||ke)},M.createElement("textarea",Object(Z.a)({},ve,{className:De,style:Ne,ref:me.saveTextArea})))},me.state={textareaStyles:{},resizeStatus:Y.NONE},me}return Object(U.a)(Fe,[{key:"componentDidUpdate",value:function(me){(me.value!==this.props.value||!T()(me.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 me=this.textArea.selectionStart,pe=this.textArea.selectionEnd;this.textArea.setSelectionRange(me,pe)}}catch(ne){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Fe}(M.Component),le=$,de=function(Se){Object(V.a)(Fe,Se);var we=Object(W.a)(Fe);function Fe(Me){var me;Object(G.a)(this,Fe),me=we.call(this,Me),me.resizableTextArea=void 0,me.focus=function(){me.resizableTextArea.textArea.focus()},me.saveTextArea=function(ne){me.resizableTextArea=ne},me.handleChange=function(ne){var Ee=me.props.onChange;me.setValue(ne.target.value,function(){me.resizableTextArea.resizeTextarea()}),Ee&&Ee(ne)},me.handleKeyDown=function(ne){var Ee=me.props,ae=Ee.onPressEnter,ke=Ee.onKeyDown;ne.keyCode===13&&ae&&ae(ne),ke&&ke(ne)};var pe=typeof Me.value=="undefined"||Me.value===null?Me.defaultValue:Me.value;return me.state={value:pe},me}return Object(U.a)(Fe,[{key:"setValue",value:function(me,pe){"value"in this.props||this.setState({value:me},pe)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return M.createElement(le,Object(Z.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(me){return"value"in me?{value:me.value}:null}}]),Fe}(M.Component),Pe=se.default=de},ZW9T:function(We,se,B){"use strict";B.d(se,"a",function(){return F});var Z=B("k1fw"),G=B("oBTY"),U=B("miYZ"),V=B("tsqr"),W=B("rAM+"),M=B("tJVT"),K=B("PpiC"),j=B("q1tI"),n=B.n(j),w=B("bdgK"),m=B("9og8"),f=B("WmNS"),p=B.n(f),c={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"]},r={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"]},d={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","friend","gcnew","generic","goto","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:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $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 <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},u={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(`
`)}]},o=B("5VLF"),s=B.n(o),a={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"]}},R=function(Y,$){return $.map(function(le){return{label:le,kind:Y.languages.CompletionItemKind.Keyword,insertText:le}})},O=function(Y){return Object.keys(a.tables).map(function($){return{label:$,kind:Y.languages.CompletionItemKind.Variable,insertText:$}})},S=function(Y,$){var le=a.tables[Y];return le?le.map(function(de){return{label:de,kind:$.languages.CompletionItemKind.Field,insertText:de}}):[]};function D(T,Y,$,le,de){var Pe=Y.getWordUntilPosition($),Se={startLineNumber:$.lineNumber,endLineNumber:$.lineNumber,startColumn:Pe.startColumn,endColumn:Pe.endColumn},we=le.map(function(Fe){return{label:Fe,kind:T.languages.CompletionItemKind.Keyword,insertText:Fe,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}});return de.map(function(Fe){we.push(Object(Z.a)(Object(Z.a)({},Fe),{},{range:Se}))}),we}var I=function(T){a.languages.map(function(de){return T.languages.registerDocumentFormattingEditProvider(de,{provideDocumentFormattingEdits:function(Se,we,Fe){return Object(m.a)(p.a.mark(function Me(){var me;return p.a.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return me=s()(Se.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}),ne.abrupt("return",[{range:Se.getFullModelRange(),text:me}]);case 2:case"end":return ne.stop()}},Me)}))()}}),de});var Y=d.quickKey.map(function(de){return{label:de.label,kind:T.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),$=u.quickKey.map(function(de){return{label:de.label,kind:T.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),le=r.quickKey.map(function(de){return{label:de.label,kind:T.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet}});T.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Pe,Se){var we=Pe.getWordUntilPosition(Se),Fe={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn},Me=Pe.getLineContent(Se.lineNumber).substring(we.startColumn-2,we.endColumn);return{suggestions:[].concat(Object(G.a)(d.keywords.map(function(me){return{label:me,kind:T.languages.CompletionItemKind.Function,documentation:me,insertText:me,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Fe}})),Object(G.a)(d.quickKey.map(function(me){return{label:me.label,kind:T.languages.CompletionItemKind.Function,documentation:me.content,insertText:Me.startsWith("#")?me.content.replace(/#/,""):me.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Fe}})))}}}),T.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Pe,Se){var we=Pe.getWordUntilPosition(Se),Fe={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn};return{suggestions:Object(G.a)(c.keywords.map(function(Me){return{label:Me,kind:T.languages.CompletionItemKind.Function,documentation:Me,insertText:Me,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Fe}}))}}}),T.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Pe,Se){var we=Pe.getWordUntilPosition(Se),Fe={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn},Me=Pe.getLineContent(Se.lineNumber).substring(we.startColumn-2,we.endColumn);return{suggestions:[].concat(Object(G.a)(r.keywords.map(function(me){return{label:me,kind:T.languages.CompletionItemKind.Function,documentation:me,insertText:me,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Fe}})),Object(G.a)(r.quickKey.map(function(me){return{label:me.label,kind:T.languages.CompletionItemKind.Function,documentation:me.content,insertText:Me.startsWith("#")?me.content.replace(/#/,""):me.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Fe}})))}}}),T.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Pe,Se){var we=Pe.getWordUntilPosition(Se),Fe={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn},Me=Pe.getLineContent(Se.lineNumber).substring(we.startColumn-2,we.endColumn);return{suggestions:[].concat(Object(G.a)(u.keywords.map(function(me){return{label:me,kind:T.languages.CompletionItemKind.Function,documentation:me,insertText:me,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Fe}})),Object(G.a)(u.quickKey.map(function(me){return{label:me.label,kind:T.languages.CompletionItemKind.Function,documentation:me.content,insertText:Me.startsWith("#")?me.content.replace(/#/,""):me.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Fe}})))}}})},_="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",b=B("fjLI"),v=B("LvDl"),h=B("+ua5");function C(T){return/^\d+$/.test(T)?"".concat(T,"px"):T}function x(){}var g=!1,P={"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 k(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Y=T;if(Array.isArray(T)){for(var $=0;$<T.length;$++){var le=P[T[$]];if(le)return le}return Y[0]}return P[Y]||Y}var y=null,A=se.b=function(T){var Y=T.width,$=Y===void 0?"100%":Y,le=T.height,de=le===void 0?"100%":le,Pe=T.value,Se=T.language,we=Se===void 0?"javascript":Se,Fe=T.style,Me=Fe===void 0?{}:Fe,me=T.options,pe=me===void 0?{}:me,ne=T.overrideServices,Ee=ne===void 0?{}:ne,ae=T.theme,ke=ae===void 0?"vs-dark":ae,je=T.onEditBlur,Oe=T.onSave,Ve=T.autoHeight,qe=Ve===void 0?!1:Ve,ue=T.forbidCopy,ve=ue===void 0?!1:ue,De=T.onChange,Ne=De===void 0?x:De,it=T.editorDidMount,pt=it===void 0?x:it,mt=T.onFocus,dt=mt===void 0?x:mt,Tt=T.filename,St=Tt===void 0?"educoder.txt":Tt,Ue=T.errorLine,Ie=T.errorContent,tt=Ie===void 0?"":Ie,lt=Object(K.a)(T,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ke=Object(j.useRef)(),Xe=Object(j.useRef)({}),Ce=Object(j.useRef)(),ge=Object(j.useRef)(),be=Object(j.useRef)(!1),ie=Object(j.useRef)(),oe=Object(j.useState)(!1),fe=Object(M.a)(oe,2),ye=fe[0],Ae=fe[1];function Ge(){var nt;return Ke.current&&(nt=new w.default(function(ut){var Et=Object(W.a)(ut),st;try{for(Et.s();!(st=Et.n()).done;){var Ut=st.value;(Ut.target.offsetHeight>0||Ut.target.offsetWidth>0)&&Xe.current.instance.layout()}}catch(Zt){Et.e(Zt)}finally{Et.f()}}),nt.observe(Ke.current)),nt}function ot(){V.b.warn(decodeURIComponent(_))}var wt=function(){var ut=Xe.current.instance;if(Pe!=null&&ut&&ye){var Et=ut.getModel();Et&&Pe!==Et.getValue()&&(g=!0,Et.setValue(Pe),ut.layout(),g=!1)}};Object(j.useEffect)(function(){ge.current&&clearTimeout(ge.current),ge.current=setTimeout(function(){wt()},500)},[Pe,ye,Xe.current]),Object(j.useEffect)(function(){if(Ue&&Xe.current&&Xe.current.instance){var nt=Xe.current.instance;nt.changeViewZones(function(Et){var st=document.createElement("div");st.style.padding="10px 20px",st.style.width="calc(100% - 20px)",st.className="my-error-line-wrp",st.innerHTML=tt,Et.addZone({afterLineNumber:Ue||11,heightInLines:3,domNode:st})});var ut={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}};nt.addOverlayWidget(ut),nt.revealPositionInCenter({lineNumber:20,column:1})}},[Ue,Xe.current,ye]);function Dt(){var nt=Xe.current.instance;if(nt){var ut=nt.getSelection(),Et=Xe.current.pastePos||{},st=new y.Range(Et.startLineNumber||ut.endLineNumber,Et.startColumn||ut.endColumn,Et.endLineNumber||ut.endLineNumber,Et.endColumn||ut.endColumn);setTimeout(function(){nt.executeEdits("",[{range:st,text:""}])},300)}}function At(nt){(window.navigator.platform.match("Mac")?nt.metaKey:nt.ctrlKey)&&nt.keyCode==83&&(nt.preventDefault(),Oe())}var vt=function(){if(qe&&Xe.current.instance){var ut=Xe.current.instance.getContentHeight();Be(ut<de?de:ut)}else Be(de)};function $e(nt){var ut=document.createEvent("MouseEvents");ut.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),nt.dispatchEvent(ut)}function et(nt,ut){var Et=window.URL||window.webkitURL||window,st=new Blob([ut]),Ut=document.createElementNS("http://www.w3.org/1999/xhtml","a");Ut.href=Et.createObjectURL(st),Ut.download=nt,$e(Ut)}Object(j.useEffect)(function(){vt()},[vt]),Object(j.useEffect)(function(){Ke.current&&!ye&&Promise.all([B.e(15),B.e(27)]).then(B.t.bind(null,"M/lh",7)).then(function(nt){try{y=nt,Xe.current.instance=y.editor.create(Ke.current,{value:Pe,language:k(we),theme:ke,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Ee);var ut=Xe.current.instance,Et=b.d._menuItems,st=Object(G.a)(Et).find(function(Qt){return Qt[0]._debugName=="EditorContext"}),Ut=st[1],Zt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Rt=function(en,Yt){var cn=en._first;do{var Sn,kn,gt=Yt.includes((Sn=cn.element)===null||Sn===void 0||((kn=Sn.command)===null||kn===void 0)?void 0:kn.id);gt&&en._remove(cn)}while(cn=cn.next)};if(pt(ut,y),setTimeout(function(){vt(),Xe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){et(St||"educoder.txt",ut.getValue())}}),ut.getDomNode().addEventListener("input",function(){Ce.current.autoFormat&&ut.getAction("editor.action.formatDocument").run()})},500),Xe.current.subscription=ut.onDidChangeModelContent(function(Qt){be.current?clearTimeout(ie.current):(vt(),Ne(ut.getValue(),Qt)),ie.current=setTimeout(function(){be.current=!1},500)}),window.Monaco||I(y,k(we)),ve&&(Rt(Ut,Zt),Ke.current.classList.add("noCopyPaste"),ut.onKeyDown(function(Qt){var en=Qt.keyCode,Yt=Qt.ctrlKey,cn=Qt.metaKey;(en===33||en===52)&&(cn||Yt)&&(ot(),Qt.preventDefault())})),window.Monaco=y,je&&ut.onDidBlurEditorWidget(function(){je(ut.getValue())}),dt&&ut.onDidFocusEditorText(function(){dt(ut.getValue())}),ve){ut.addCommand(y.KeyMod.CtrlCmd|y.KeyCode.KEY_V,function(){return ot(),null}),ut.onDidPaste(function(Qt){Xe.current.pastePos=Qt});try{window.addEventListener("paste",Dt)}catch(Qt){}}var qt=Ge();return Ae(!0),function(){var Qt=Xe.current.instance;Qt.dispose();var en=Qt.getModel();en&&en.dispose(),Xe.current.subscription&&Xe.current.subscription.dispose(),ve&&window.removeEventListener("paste",Dt),qt.unobserve(Ke.current)}}catch(Qt){}})},[]),Object(j.useEffect)(function(){var nt=Xe.current.instance;if(nt&&ye)return document.addEventListener("keydown",At,!1),function(){document.removeEventListener("keydown",At)}},[Oe,ye]),Object(j.useEffect)(function(){var nt=Xe.current.instance;if(nt&&ye){var ut=k(we);y.editor.setModelLanguage(nt.getModel(),ut),console.log("language:",we,nt.getModel(),ut)}},[we,ye]),Object(j.useEffect)(function(){var nt=Xe.current.instance;nt&&ye&&y.editor.setTheme(ke)},[ke,ye]),Object(j.useEffect)(function(){var nt=Xe.current.instance;Ce.current=pe,nt&&ye&&(nt.updateOptions(Object(Z.a)({},pe)),setTimeout(function(){nt.getModel().updateOptions(Object(Z.a)({},pe))},200))},[JSON.stringify(pe),ye]),Object(j.useEffect)(function(){var nt=Xe.current.instance;nt&&ye&&nt.layout()},[$,de,ye]);var Ye=Object(j.useState)(C($)),ce=Object(M.a)(Ye,2),xe=ce[0],at=ce[1],Je=Object(j.useState)(C(de)),_t=Object(M.a)(Je,2),yt=_t[0],Be=_t[1],Ze=Object(Z.a)(Object(Z.a)({},Me),{},{width:xe,height:yt});return n.a.createElement("div",{className:"my-monaco-editor",ref:Ke,style:Ze})};function F(T){var Y=T.width,$=Y===void 0?"100%":Y,le=T.height,de=le===void 0?"100%":le,Pe=T.original,Se=T.modified,we=T.language,Fe=T.options,Me=Fe===void 0?{}:Fe,me=Object(j.useRef)(),pe=Object(j.useState)(null),ne=Object(M.a)(pe,2),Ee=ne[0],ae=ne[1];function ke(qe){var ue;return me.current&&(ue=new w.default(function(ve){var De=Object(W.a)(ve),Ne;try{for(De.s();!(Ne=De.n()).done;){var it=Ne.value;(it.target.offsetHeight>0||it.target.offsetWidth>0)&&qe.layout()}}catch(pt){De.e(pt)}finally{De.f()}}),ue.observe(me.current)),ue}Object(j.useEffect)(function(){me.current&&Promise.all([B.e(15),B.e(27)]).then(B.t.bind(null,"M/lh",7)).then(function(qe){y=qe;var ue=y.editor.createDiffEditor(me.current,Object(Z.a)(Object(Z.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},Me),{},{wordWrap:!0}));ae(ue);var ve=ke(ue);return function(){ue.dispose();var De=ue.getModel();De&&De.dispose(),ve.unobserve(me.current)}})},[]),Object(j.useEffect)(function(){Ee&&Ee.setModel({original:y.editor.createModel(Pe,we),modified:y.editor.createModel(Se,we)})},[Pe,Se,we,Ee]);var je=C($),Oe=C(de),Ve={width:je,height:Oe};return n.a.createElement("div",{className:"my-diff-editor",ref:me,style:Ve})}},ZpRC:function(We,se,B){"use strict";function Z(m){return typeof m=="object"&&m!=null&&m.nodeType===1}function G(m,f){return(!f||m!=="hidden")&&m!=="visible"&&m!=="clip"}function U(m,f){if(m.clientHeight<m.scrollHeight||m.clientWidth<m.scrollWidth){var p=getComputedStyle(m,null);return G(p.overflowY,f)||G(p.overflowX,f)||function(c){var r=function(d){if(!d.ownerDocument||!d.ownerDocument.defaultView)return null;try{return d.ownerDocument.defaultView.frameElement}catch(u){return null}}(c);return!!r&&(r.clientHeight<c.scrollHeight||r.clientWidth<c.scrollWidth)}(m)}return!1}function V(m,f,p,c,r,d,u,o){return d<m&&u>f||d>m&&u<f?0:d<=m&&o<=p||u>=f&&o>=p?d-m-c:u>f&&o<p||d<m&&o>p?u-f+r:0}var W=function(m,f){var p=window,c=f.scrollMode,r=f.block,d=f.inline,u=f.boundary,o=f.skipOverflowHiddenElements,s=typeof u=="function"?u:function(qe){return qe!==u};if(!Z(m))throw new TypeError("Invalid target");for(var a=document.scrollingElement||document.documentElement,R=[],O=m;Z(O)&&s(O);){if((O=O.parentElement)===a){R.push(O);break}O!=null&&O===document.body&&U(O)&&!U(document.documentElement)||O!=null&&U(O,o)&&R.push(O)}for(var S=p.visualViewport?p.visualViewport.width:innerWidth,D=p.visualViewport?p.visualViewport.height:innerHeight,I=window.scrollX||pageXOffset,_=window.scrollY||pageYOffset,b=m.getBoundingClientRect(),v=b.height,h=b.width,C=b.top,x=b.right,g=b.bottom,P=b.left,k=r==="start"||r==="nearest"?C:r==="end"?g:C+v/2,y=d==="center"?P+h/2:d==="end"?x:P,A=[],F=0;F<R.length;F++){var T=R[F],Y=T.getBoundingClientRect(),$=Y.height,le=Y.width,de=Y.top,Pe=Y.right,Se=Y.bottom,we=Y.left;if(c==="if-needed"&&C>=0&&P>=0&&g<=D&&x<=S&&C>=de&&g<=Se&&P>=we&&x<=Pe)return A;var Fe=getComputedStyle(T),Me=parseInt(Fe.borderLeftWidth,10),me=parseInt(Fe.borderTopWidth,10),pe=parseInt(Fe.borderRightWidth,10),ne=parseInt(Fe.borderBottomWidth,10),Ee=0,ae=0,ke="offsetWidth"in T?T.offsetWidth-T.clientWidth-Me-pe:0,je="offsetHeight"in T?T.offsetHeight-T.clientHeight-me-ne:0;if(a===T)Ee=r==="start"?k:r==="end"?k-D:r==="nearest"?V(_,_+D,D,me,ne,_+k,_+k+v,v):k-D/2,ae=d==="start"?y:d==="center"?y-S/2:d==="end"?y-S:V(I,I+S,S,Me,pe,I+y,I+y+h,h),Ee=Math.max(0,Ee+_),ae=Math.max(0,ae+I);else{Ee=r==="start"?k-de-me:r==="end"?k-Se+ne+je:r==="nearest"?V(de,Se,$,me,ne+je,k,k+v,v):k-(de+$/2)+je/2,ae=d==="start"?y-we-Me:d==="center"?y-(we+le/2)+ke/2:d==="end"?y-Pe+pe+ke:V(we,Pe,le,Me,pe+ke,y,y+h,h);var Oe=T.scrollLeft,Ve=T.scrollTop;k+=Ve-(Ee=Math.max(0,Math.min(Ve+Ee,T.scrollHeight-$+je))),y+=Oe-(ae=Math.max(0,Math.min(Oe+ae,T.scrollWidth-le+ke)))}A.push({el:T,top:Ee,left:ae})}return A};function M(m){return m===Object(m)&&Object.keys(m).length!==0}function K(m,f){f===void 0&&(f="auto");var p="scrollBehavior"in document.body.style;m.forEach(function(c){var r=c.el,d=c.top,u=c.left;r.scroll&&p?r.scroll({top:d,left:u,behavior:f}):(r.scrollTop=d,r.scrollLeft=u)})}function j(m){return m===!1?{block:"end",inline:"nearest"}:M(m)?m:{block:"start",inline:"nearest"}}function n(m,f){var p=!m.ownerDocument.documentElement.contains(m);if(M(f)&&typeof f.behavior=="function")return f.behavior(p?[]:W(m,f));if(p)return;var c=j(f);return K(W(m,c),c.behavior)}var w=se.a=n},Zss7:function(We,se,B){var Z;(function(G){var U=/^\s+/,V=/\s+$/,W=0,M=G.round,K=G.min,j=G.max,n=G.random;function w(ne,Ee){if(ne=ne||"",Ee=Ee||{},ne instanceof w)return ne;if(!(this instanceof w))return new w(ne,Ee);var ae=m(ne);this._originalInput=ne,this._r=ae.r,this._g=ae.g,this._b=ae.b,this._a=ae.a,this._roundA=M(100*this._a)/100,this._format=Ee.format||ae.format,this._gradientType=Ee.gradientType,this._r<1&&(this._r=M(this._r)),this._g<1&&(this._g=M(this._g)),this._b<1&&(this._b=M(this._b)),this._ok=ae.ok,this._tc_id=W++}w.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var ne=this.toRgb();return(ne.r*299+ne.g*587+ne.b*114)/1e3},getLuminance:function(){var ne=this.toRgb(),Ee,ae,ke,je,Oe,Ve;return Ee=ne.r/255,ae=ne.g/255,ke=ne.b/255,Ee<=.03928?je=Ee/12.92:je=G.pow((Ee+.055)/1.055,2.4),ae<=.03928?Oe=ae/12.92:Oe=G.pow((ae+.055)/1.055,2.4),ke<=.03928?Ve=ke/12.92:Ve=G.pow((ke+.055)/1.055,2.4),.2126*je+.7152*Oe+.0722*Ve},setAlpha:function(ne){return this._a=A(ne),this._roundA=M(100*this._a)/100,this},toHsv:function(){var ne=r(this._r,this._g,this._b);return{h:ne.h*360,s:ne.s,v:ne.v,a:this._a}},toHsvString:function(){var ne=r(this._r,this._g,this._b),Ee=M(ne.h*360),ae=M(ne.s*100),ke=M(ne.v*100);return this._a==1?"hsv("+Ee+", "+ae+"%, "+ke+"%)":"hsva("+Ee+", "+ae+"%, "+ke+"%, "+this._roundA+")"},toHsl:function(){var ne=p(this._r,this._g,this._b);return{h:ne.h*360,s:ne.s,l:ne.l,a:this._a}},toHslString:function(){var ne=p(this._r,this._g,this._b),Ee=M(ne.h*360),ae=M(ne.s*100),ke=M(ne.l*100);return this._a==1?"hsl("+Ee+", "+ae+"%, "+ke+"%)":"hsla("+Ee+", "+ae+"%, "+ke+"%, "+this._roundA+")"},toHex:function(ne){return u(this._r,this._g,this._b,ne)},toHexString:function(ne){return"#"+this.toHex(ne)},toHex8:function(ne){return o(this._r,this._g,this._b,this._a,ne)},toHex8String:function(ne){return"#"+this.toHex8(ne)},toRgb:function(){return{r:M(this._r),g:M(this._g),b:M(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+M(this._r)+", "+M(this._g)+", "+M(this._b)+")":"rgba("+M(this._r)+", "+M(this._g)+", "+M(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:M(F(this._r,255)*100)+"%",g:M(F(this._g,255)*100)+"%",b:M(F(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+M(F(this._r,255)*100)+"%, "+M(F(this._g,255)*100)+"%, "+M(F(this._b,255)*100)+"%)":"rgba("+M(F(this._r,255)*100)+"%, "+M(F(this._g,255)*100)+"%, "+M(F(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:k[u(this._r,this._g,this._b,!0)]||!1},toFilter:function(ne){var Ee="#"+s(this._r,this._g,this._b,this._a),ae=Ee,ke=this._gradientType?"GradientType = 1, ":"";if(ne){var je=w(ne);ae="#"+s(je._r,je._g,je._b,je._a)}return"progid:DXImageTransform.Microsoft.gradient("+ke+"startColorstr="+Ee+",endColorstr="+ae+")"},toString:function(ne){var Ee=!!ne;ne=ne||this._format;var ae=!1,ke=this._a<1&&this._a>=0,je=!Ee&&ke&&(ne==="hex"||ne==="hex6"||ne==="hex3"||ne==="hex4"||ne==="hex8"||ne==="name");return je?ne==="name"&&this._a===0?this.toName():this.toRgbString():(ne==="rgb"&&(ae=this.toRgbString()),ne==="prgb"&&(ae=this.toPercentageRgbString()),(ne==="hex"||ne==="hex6")&&(ae=this.toHexString()),ne==="hex3"&&(ae=this.toHexString(!0)),ne==="hex4"&&(ae=this.toHex8String(!0)),ne==="hex8"&&(ae=this.toHex8String()),ne==="name"&&(ae=this.toName()),ne==="hsl"&&(ae=this.toHslString()),ne==="hsv"&&(ae=this.toHsvString()),ae||this.toHexString())},clone:function(){return w(this.toString())},_applyModification:function(ne,Ee){var ae=ne.apply(null,[this].concat([].slice.call(Ee)));return this._r=ae._r,this._g=ae._g,this._b=ae._b,this.setAlpha(ae._a),this},lighten:function(){return this._applyModification(S,arguments)},brighten:function(){return this._applyModification(D,arguments)},darken:function(){return this._applyModification(I,arguments)},desaturate:function(){return this._applyModification(a,arguments)},saturate:function(){return this._applyModification(R,arguments)},greyscale:function(){return this._applyModification(O,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(ne,Ee){return ne.apply(null,[this].concat([].slice.call(Ee)))},analogous:function(){return this._applyCombination(x,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(g,arguments)},splitcomplement:function(){return this._applyCombination(C,arguments)},triad:function(){return this._applyCombination(v,arguments)},tetrad:function(){return this._applyCombination(h,arguments)}},w.fromRatio=function(ne,Ee){if(typeof ne=="object"){var ae={};for(var ke in ne)ne.hasOwnProperty(ke)&&(ke==="a"?ae[ke]=ne[ke]:ae[ke]=Pe(ne[ke]));ne=ae}return w(ne,Ee)};function m(ne){var Ee={r:0,g:0,b:0},ae=1,ke=null,je=null,Oe=null,Ve=!1,qe=!1;return typeof ne=="string"&&(ne=me(ne)),typeof ne=="object"&&(Me(ne.r)&&Me(ne.g)&&Me(ne.b)?(Ee=f(ne.r,ne.g,ne.b),Ve=!0,qe=String(ne.r).substr(-1)==="%"?"prgb":"rgb"):Me(ne.h)&&Me(ne.s)&&Me(ne.v)?(ke=Pe(ne.s),je=Pe(ne.v),Ee=d(ne.h,ke,je),Ve=!0,qe="hsv"):Me(ne.h)&&Me(ne.s)&&Me(ne.l)&&(ke=Pe(ne.s),Oe=Pe(ne.l),Ee=c(ne.h,ke,Oe),Ve=!0,qe="hsl"),ne.hasOwnProperty("a")&&(ae=ne.a)),ae=A(ae),{ok:Ve,format:ne.format||qe,r:K(255,j(Ee.r,0)),g:K(255,j(Ee.g,0)),b:K(255,j(Ee.b,0)),a:ae}}function f(ne,Ee,ae){return{r:F(ne,255)*255,g:F(Ee,255)*255,b:F(ae,255)*255}}function p(ne,Ee,ae){ne=F(ne,255),Ee=F(Ee,255),ae=F(ae,255);var ke=j(ne,Ee,ae),je=K(ne,Ee,ae),Oe,Ve,qe=(ke+je)/2;if(ke==je)Oe=Ve=0;else{var ue=ke-je;Ve=qe>.5?ue/(2-ke-je):ue/(ke+je);switch(ke){case ne:Oe=(Ee-ae)/ue+(Ee<ae?6:0);break;case Ee:Oe=(ae-ne)/ue+2;break;case ae:Oe=(ne-Ee)/ue+4;break}Oe/=6}return{h:Oe,s:Ve,l:qe}}function c(ne,Ee,ae){var ke,je,Oe;ne=F(ne,360),Ee=F(Ee,100),ae=F(ae,100);function Ve(ve,De,Ne){return Ne<0&&(Ne+=1),Ne>1&&(Ne-=1),Ne<1/6?ve+(De-ve)*6*Ne:Ne<1/2?De:Ne<2/3?ve+(De-ve)*(2/3-Ne)*6:ve}if(Ee===0)ke=je=Oe=ae;else{var qe=ae<.5?ae*(1+Ee):ae+Ee-ae*Ee,ue=2*ae-qe;ke=Ve(ue,qe,ne+1/3),je=Ve(ue,qe,ne),Oe=Ve(ue,qe,ne-1/3)}return{r:ke*255,g:je*255,b:Oe*255}}function r(ne,Ee,ae){ne=F(ne,255),Ee=F(Ee,255),ae=F(ae,255);var ke=j(ne,Ee,ae),je=K(ne,Ee,ae),Oe,Ve,qe=ke,ue=ke-je;if(Ve=ke===0?0:ue/ke,ke==je)Oe=0;else{switch(ke){case ne:Oe=(Ee-ae)/ue+(Ee<ae?6:0);break;case Ee:Oe=(ae-ne)/ue+2;break;case ae:Oe=(ne-Ee)/ue+4;break}Oe/=6}return{h:Oe,s:Ve,v:qe}}function d(ne,Ee,ae){ne=F(ne,360)*6,Ee=F(Ee,100),ae=F(ae,100);var ke=G.floor(ne),je=ne-ke,Oe=ae*(1-Ee),Ve=ae*(1-je*Ee),qe=ae*(1-(1-je)*Ee),ue=ke%6,ve=[ae,Ve,Oe,Oe,qe,ae][ue],De=[qe,ae,ae,Ve,Oe,Oe][ue],Ne=[Oe,Oe,qe,ae,ae,Ve][ue];return{r:ve*255,g:De*255,b:Ne*255}}function u(ne,Ee,ae,ke){var je=[de(M(ne).toString(16)),de(M(Ee).toString(16)),de(M(ae).toString(16))];return ke&&je[0].charAt(0)==je[0].charAt(1)&&je[1].charAt(0)==je[1].charAt(1)&&je[2].charAt(0)==je[2].charAt(1)?je[0].charAt(0)+je[1].charAt(0)+je[2].charAt(0):je.join("")}function o(ne,Ee,ae,ke,je){var Oe=[de(M(ne).toString(16)),de(M(Ee).toString(16)),de(M(ae).toString(16)),de(Se(ke))];return je&&Oe[0].charAt(0)==Oe[0].charAt(1)&&Oe[1].charAt(0)==Oe[1].charAt(1)&&Oe[2].charAt(0)==Oe[2].charAt(1)&&Oe[3].charAt(0)==Oe[3].charAt(1)?Oe[0].charAt(0)+Oe[1].charAt(0)+Oe[2].charAt(0)+Oe[3].charAt(0):Oe.join("")}function s(ne,Ee,ae,ke){var je=[de(Se(ke)),de(M(ne).toString(16)),de(M(Ee).toString(16)),de(M(ae).toString(16))];return je.join("")}w.equals=function(ne,Ee){return!ne||!Ee?!1:w(ne).toRgbString()==w(Ee).toRgbString()},w.random=function(){return w.fromRatio({r:n(),g:n(),b:n()})};function a(ne,Ee){Ee=Ee===0?0:Ee||10;var ae=w(ne).toHsl();return ae.s-=Ee/100,ae.s=T(ae.s),w(ae)}function R(ne,Ee){Ee=Ee===0?0:Ee||10;var ae=w(ne).toHsl();return ae.s+=Ee/100,ae.s=T(ae.s),w(ae)}function O(ne){return w(ne).desaturate(100)}function S(ne,Ee){Ee=Ee===0?0:Ee||10;var ae=w(ne).toHsl();return ae.l+=Ee/100,ae.l=T(ae.l),w(ae)}function D(ne,Ee){Ee=Ee===0?0:Ee||10;var ae=w(ne).toRgb();return ae.r=j(0,K(255,ae.r-M(255*-(Ee/100)))),ae.g=j(0,K(255,ae.g-M(255*-(Ee/100)))),ae.b=j(0,K(255,ae.b-M(255*-(Ee/100)))),w(ae)}function I(ne,Ee){Ee=Ee===0?0:Ee||10;var ae=w(ne).toHsl();return ae.l-=Ee/100,ae.l=T(ae.l),w(ae)}function _(ne,Ee){var ae=w(ne).toHsl(),ke=(ae.h+Ee)%360;return ae.h=ke<0?360+ke:ke,w(ae)}function b(ne){var Ee=w(ne).toHsl();return Ee.h=(Ee.h+180)%360,w(Ee)}function v(ne){var Ee=w(ne).toHsl(),ae=Ee.h;return[w(ne),w({h:(ae+120)%360,s:Ee.s,l:Ee.l}),w({h:(ae+240)%360,s:Ee.s,l:Ee.l})]}function h(ne){var Ee=w(ne).toHsl(),ae=Ee.h;return[w(ne),w({h:(ae+90)%360,s:Ee.s,l:Ee.l}),w({h:(ae+180)%360,s:Ee.s,l:Ee.l}),w({h:(ae+270)%360,s:Ee.s,l:Ee.l})]}function C(ne){var Ee=w(ne).toHsl(),ae=Ee.h;return[w(ne),w({h:(ae+72)%360,s:Ee.s,l:Ee.l}),w({h:(ae+216)%360,s:Ee.s,l:Ee.l})]}function x(ne,Ee,ae){Ee=Ee||6,ae=ae||30;var ke=w(ne).toHsl(),je=360/ae,Oe=[w(ne)];for(ke.h=(ke.h-(je*Ee>>1)+720)%360;--Ee;)ke.h=(ke.h+je)%360,Oe.push(w(ke));return Oe}function g(ne,Ee){Ee=Ee||6;for(var ae=w(ne).toHsv(),ke=ae.h,je=ae.s,Oe=ae.v,Ve=[],qe=1/Ee;Ee--;)Ve.push(w({h:ke,s:je,v:Oe})),Oe=(Oe+qe)%1;return Ve}w.mix=function(ne,Ee,ae){ae=ae===0?0:ae||50;var ke=w(ne).toRgb(),je=w(Ee).toRgb(),Oe=ae/100,Ve={r:(je.r-ke.r)*Oe+ke.r,g:(je.g-ke.g)*Oe+ke.g,b:(je.b-ke.b)*Oe+ke.b,a:(je.a-ke.a)*Oe+ke.a};return w(Ve)},w.readability=function(ne,Ee){var ae=w(ne),ke=w(Ee);return(G.max(ae.getLuminance(),ke.getLuminance())+.05)/(G.min(ae.getLuminance(),ke.getLuminance())+.05)},w.isReadable=function(ne,Ee,ae){var ke=w.readability(ne,Ee),je,Oe;Oe=!1,je=pe(ae);switch(je.level+je.size){case"AAsmall":case"AAAlarge":Oe=ke>=4.5;break;case"AAlarge":Oe=ke>=3;break;case"AAAsmall":Oe=ke>=7;break}return Oe},w.mostReadable=function(ne,Ee,ae){var ke=null,je=0,Oe,Ve,qe,ue;ae=ae||{},Ve=ae.includeFallbackColors,qe=ae.level,ue=ae.size;for(var ve=0;ve<Ee.length;ve++)Oe=w.readability(ne,Ee[ve]),Oe>je&&(je=Oe,ke=w(Ee[ve]));return w.isReadable(ne,ke,{level:qe,size:ue})||!Ve?ke:(ae.includeFallbackColors=!1,w.mostReadable(ne,["#fff","#000"],ae))};var P=w.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=w.hexNames=y(P);function y(ne){var Ee={};for(var ae in ne)ne.hasOwnProperty(ae)&&(Ee[ne[ae]]=ae);return Ee}function A(ne){return ne=parseFloat(ne),(isNaN(ne)||ne<0||ne>1)&&(ne=1),ne}function F(ne,Ee){$(ne)&&(ne="100%");var ae=le(ne);return ne=K(Ee,j(0,parseFloat(ne))),ae&&(ne=parseInt(ne*Ee,10)/100),G.abs(ne-Ee)<1e-6?1:ne%Ee/parseFloat(Ee)}function T(ne){return K(1,j(0,ne))}function Y(ne){return parseInt(ne,16)}function $(ne){return typeof ne=="string"&&ne.indexOf(".")!=-1&&parseFloat(ne)===1}function le(ne){return typeof ne=="string"&&ne.indexOf("%")!=-1}function de(ne){return ne.length==1?"0"+ne:""+ne}function Pe(ne){return ne<=1&&(ne=ne*100+"%"),ne}function Se(ne){return G.round(parseFloat(ne)*255).toString(16)}function we(ne){return Y(ne)/255}var Fe=function(){var ne="[-\\+]?\\d+%?",Ee="[-\\+]?\\d*\\.\\d+%?",ae="(?:"+Ee+")|(?:"+ne+")",ke="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?",je="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?";return{CSS_UNIT:new RegExp(ae),rgb:new RegExp("rgb"+ke),rgba:new RegExp("rgba"+je),hsl:new RegExp("hsl"+ke),hsla:new RegExp("hsla"+je),hsv:new RegExp("hsv"+ke),hsva:new RegExp("hsva"+je),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Me(ne){return!!Fe.CSS_UNIT.exec(ne)}function me(ne){ne=ne.replace(U,"").replace(V,"").toLowerCase();var Ee=!1;if(P[ne])ne=P[ne],Ee=!0;else if(ne=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ae;return(ae=Fe.rgb.exec(ne))?{r:ae[1],g:ae[2],b:ae[3]}:(ae=Fe.rgba.exec(ne))?{r:ae[1],g:ae[2],b:ae[3],a:ae[4]}:(ae=Fe.hsl.exec(ne))?{h:ae[1],s:ae[2],l:ae[3]}:(ae=Fe.hsla.exec(ne))?{h:ae[1],s:ae[2],l:ae[3],a:ae[4]}:(ae=Fe.hsv.exec(ne))?{h:ae[1],s:ae[2],v:ae[3]}:(ae=Fe.hsva.exec(ne))?{h:ae[1],s:ae[2],v:ae[3],a:ae[4]}:(ae=Fe.hex8.exec(ne))?{r:Y(ae[1]),g:Y(ae[2]),b:Y(ae[3]),a:we(ae[4]),format:Ee?"name":"hex8"}:(ae=Fe.hex6.exec(ne))?{r:Y(ae[1]),g:Y(ae[2]),b:Y(ae[3]),format:Ee?"name":"hex"}:(ae=Fe.hex4.exec(ne))?{r:Y(ae[1]+""+ae[1]),g:Y(ae[2]+""+ae[2]),b:Y(ae[3]+""+ae[3]),a:we(ae[4]+""+ae[4]),format:Ee?"name":"hex8"}:(ae=Fe.hex3.exec(ne))?{r:Y(ae[1]+""+ae[1]),g:Y(ae[2]+""+ae[2]),b:Y(ae[3]+""+ae[3]),format:Ee?"name":"hex"}:!1}function pe(ne){var Ee,ae;return ne=ne||{level:"AA",size:"small"},Ee=(ne.level||"AA").toUpperCase(),ae=(ne.size||"small").toLowerCase(),Ee!=="AA"&&Ee!=="AAA"&&(Ee="AA"),ae!=="small"&&ae!=="large"&&(ae="small"),{level:Ee,size:ae}}We.exports?We.exports=w:!(Z=function(){return w}.call(se,B,se,We),Z!==void 0&&(We.exports=Z))})(Math)},aRTE:function(We,se){We.exports={L:1,M:0,Q:3,H:2}},bPs0:function(We,se,B){"use strict";B.d(se,"b",function(){return a});var Z=B("k1fw"),G=B("9og8"),U=B("2qtc"),V=B("kLXV"),W=B("tJVT"),M=B("PpiC"),K=B("aHsQ"),j=B("sGsY"),n=B("WmNS"),w=B.n(n),m=B("q1tI"),f=B.n(m),p=B("bntm"),c=B("V0Rq"),r=B("wd/R"),d=B.n(r),u=B("Ty5D"),o=B("9kvl"),s=j.a.Countdown,a=["fullscreenchange","msfullscreenchange","webkitfullscreenchange","mozfullscreenchange"],R=function(S){var D=S.globalSetting,I=S.loading,_=S.user,b=S.exercise,v=S.socket,h=S.dispatch,C=Object(M.a)(S,["globalSetting","loading","user","exercise","socket","dispatch"]),x=Object(m.useState)({}),g=Object(W.a)(x,2),P=g[0],k=g[1],y=V.a.useModal(),A=Object(W.a)(y,2),F=A[0],T=A[1],Y=Object(m.useRef)(),$=Object(m.useRef)(null),le=Object(m.useRef)(null),de=Object(m.useState)(!0),Pe=Object(W.a)(de,2),Se=Pe[0],we=Pe[1],Fe=Object(u.h)().query,Me=Object(u.i)();Object(m.useEffect)(function(){var ue,ve,De,Ne,it;if(clearTimeout($.current),document.addEventListener(Object(p.c)(),qe,!1),window.addEventListener("blur",Oe,!1),(ue=b.exerciseUserInfo)!==null&&ue!==void 0&&ue.screen_open&&Object(p.a)()&&(h({type:"globalSetting/headerFooterToggle",payload:!1}),we(!1)),(ve=b.exerciseUserInfo)!==null&&ve!==void 0&&ve.screen_at&&d()().diff(d()((De=b.exerciseUserInfo)===null||De===void 0?void 0:De.screen_at),"seconds")>0)me();else if((Ne=b.exerciseUserInfo)!==null&&Ne!==void 0&&Ne.screen_open&&!Object(p.a)()){var pt=document.domain==="kepukehuan.educoder.net"?30:b.exerciseUserInfo.screen_sec+10+1;Y.current=V.a.info({icon:null,content:f.a.createElement("div",{className:"tc font16"},"\u672C\u573A\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u5207\u5C4F\u9650\u5236\uFF0C",f.a.createElement("br",null),"\u5207\u6362\u9875\u9762"," ",b.exerciseUserInfo.screen_num-b.exerciseUserInfo.used_screen_num," ","\u6B21\u540E\u5C06\u8FDB\u884C\u5F3A\u5236\u4EA4\u5377\uFF0C",f.a.createElement("br",null),"\u8BF7\u52FF\u5207\u5C4F\u53CA\u5237\u65B0\u9875\u9762"),okText:f.a.createElement("span",null,"\u5F00\u59CB\u8003\u8BD5\uFF08",f.a.createElement("span",{style:{display:"inline-block"}},f.a.createElement(s,{onFinish:function(){var dt;me(),(dt=Y.current)===null||dt===void 0||dt.destroy()},valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+pt*1e3})),"S\uFF09"),onOk:function(){var dt;(dt=Y.current)===null||dt===void 0||dt.destroy(),we(!1),Object(p.d)(document.body),document.getElementById("root").addEventListener("click",pe,!1)}})}return(it=b.exerciseUserInfo)!==null&&it!==void 0&&it.screen_open&&!Object(p.a)()||document.getElementById("root").addEventListener("click",pe,!1),function(){document.getElementById("root").removeEventListener("click",pe,!1),document.removeEventListener(Object(p.c)(),qe,!1),window.removeEventListener("blur",Oe,!1),clearTimeout($.current)}},[]),Object(m.useEffect)(function(){setTimeout(function(){b.actionTabs.removeEventListenerExitScreen&&(clearTimeout($.current),document.getElementById("root").removeEventListener("click",pe,!1),document.removeEventListener(Object(p.c)(),qe,!1))},500),ne()},[b.actionTabs]),Object(m.useEffect)(function(){setTimeout(function(){b.exerciseUserInfo.used_screen_num>b.exerciseUserInfo.screen_num?ke():!Se},500)},[b.exerciseUserInfo]);var me=function(){var ue=Object(G.a)(w.a.mark(function ve(){var De;return w.a.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return it.next=2,Ve();case 2:De=it.sent,setTimeout(function(){var pt,mt;(pt=Y.current)===null||pt===void 0||pt.destroy(),Y.current=V.a.info({okText:f.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:f.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",f.a.createElement("span",{className:"c-red"},De.used_screen_num),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",f.a.createElement("span",{className:"c-red"},(mt=b.exerciseUserInfo)===null||mt===void 0?void 0:mt.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377"),onOk:function(){var dt=Object(G.a)(w.a.mark(function St(){return w.a.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:Object(p.d)(document.body);case 1:case"end":return Ie.stop()}},St)}));function Tt(){return dt.apply(this,arguments)}return Tt}()})},1e3);case 4:case"end":return it.stop()}},ve)}));return function(){return ue.apply(this,arguments)}}(),pe=function(ve){!Object(p.a)()&&ve.target.nodeName!=="A"&&ve.target.nodeName!=="BUTTON"&&ve.target.innerHTML!=="\u786E \u5B9A"&&(Object(p.d)(document.body),console.log("documentClick.full"))},ne=function(){var ue=Object(G.a)(w.a.mark(function ve(){return w.a.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.abrupt("return",new Promise(function(){var it=Object(G.a)(w.a.mark(function pt(mt){var dt;return w.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:return St.next=2,h({type:"exercise/getExerciseUserInfo",payload:Object(Z.a)({},Me)});case 2:return dt=St.sent,mt(dt==null?void 0:dt.data),St.abrupt("return",dt==null?void 0:dt.data);case 5:case"end":return St.stop()}},pt)}));return function(pt){return it.apply(this,arguments)}}()));case 1:case"end":return Ne.stop()}},ve)}));return function(){return ue.apply(this,arguments)}}(),Ee=function(){var ue=Object(G.a)(w.a.mark(function ve(De){var Ne,it,pt;return w.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:(Ne=Y.current)===null||Ne===void 0||((it=Ne.destroyAll)===null||it===void 0)||it.call(Ne),Y.current=V.a.info({maskClosable:!1,keyboard:!1,okText:f.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5\uFF08",f.a.createElement("span",{style:{display:"inline-block"}},f.a.createElement(s,{onFinish:Ve,valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+(b.exerciseUserInfo.screen_sec+1)*1e3})),"S\uFF09"),content:f.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",f.a.createElement("span",{className:"c-red"},De),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",f.a.createElement("span",{className:"c-red"},(pt=b.exerciseUserInfo)===null||pt===void 0?void 0:pt.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377,",f.a.createElement("span",{className:"c-red"},b.exerciseUserInfo.screen_sec),"\u79D2\u5185\u56DE\u5230",f.a.createElement("br",null),f.a.createElement("span",{style:{marginLeft:38}},"\u8003\u8BD5\u4E0D\u8BA1\u5207\u5C4F\u6B21\u6570\u3002")),onOk:function(){var Tt=Object(G.a)(w.a.mark(function Ue(){return w.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:clearTimeout(le.current),Object(p.d)(document.body),Y.current.destroy();case 3:case"end":return tt.stop()}},Ue)}));function St(){return Tt.apply(this,arguments)}return St}()}),le.current=setTimeout(function(){var Tt;Y.current.update({okText:f.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:f.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",f.a.createElement("span",{className:"c-red"},De+1),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",f.a.createElement("span",{className:"c-red"},(Tt=b.exerciseUserInfo)===null||Tt===void 0?void 0:Tt.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377")})},(b.exerciseUserInfo.screen_sec+1)*1e3);case 3:case"end":return dt.stop()}},ve)}));return function(De){return ue.apply(this,arguments)}}(),ae=function(){location.href="/classrooms/".concat(Me.coursesId,"/exercise/").concat(Me.categoryId,"/detail")},ke=function(){var ue=Object(G.a)(w.a.mark(function ve(){var De,Ne,it;return w.a.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:return(De=Y.current)===null||De===void 0||((Ne=De.destroyAll)===null||Ne===void 0)||Ne.call(De),mt.next=3,Object(c.Z)({categoryId:Me.categoryId,commit_method:1});case 3:if(it=mt.sent,it){try{v.send(JSON.stringify({type:"toggleLockExit",data:!1})),v.send(JSON.stringify({type:"network-open",data:""}))}catch(dt){}je()}case 5:case"end":return mt.stop()}},ve)}));return function(){return ue.apply(this,arguments)}}(),je=function(){var ve,De;document.removeEventListener(Object(p.c)(),qe,!1),Object(p.b)(),(ve=Y.current)===null||ve===void 0||((De=ve.destroyAll)===null||De===void 0)||De.call(ve);try{v.send(JSON.stringify({type:"toggleLockExit",data:!1})),v.send(JSON.stringify({type:"network-open",data:""}))}catch(Ne){}F.info({content:f.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",f.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){ae()}})},Oe=function(ve){Object(p.a)()&&document.getElementById("iframeShixuns").style.display=="none"&&Object(p.b)()},Ve=function(){var ue=Object(G.a)(w.a.mark(function ve(){return w.a.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.abrupt("return",new Promise(function(){var it=Object(G.a)(w.a.mark(function pt(mt){var dt,Tt,St;return w.a.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(!((dt=b.exerciseUserInfo)!==null&&dt!==void 0&&dt.screen_at)){Ie.next=3;break}return Ie.next=3,Object(c.h)(Object(Z.a)(Object(Z.a)({},Me),{},{reset:!0}));case 3:return Ie.next=5,Object(c.R)({id:Me.categoryId});case 5:if(Tt=Ie.sent,!(Tt!=null&&Tt.is_commit)){Ie.next=9;break}return je(),Ie.abrupt("return");case 9:return Ie.next=11,ne();case 11:St=Ie.sent,mt(St);case 13:case"end":return Ie.stop()}},pt)}));return function(pt){return it.apply(this,arguments)}}()));case 1:case"end":return Ne.stop()}},ve)}));return function(){return ue.apply(this,arguments)}}(),qe=function(){var ue=Object(G.a)(w.a.mark(function ve(){var De,Ne,it,pt;return w.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:if(De=!1,console.log("fullscreen change"),!Object(p.a)()){dt.next=7;break}(Ne=b.exerciseUserInfo)!==null&&Ne!==void 0&&Ne.screen_at&&Object(c.h)(Object(Z.a)(Object(Z.a)({},Me),{},{reset:!0})),clearTimeout($.current),dt.next=17;break;case 7:return De=!0,dt.next=10,Object(c.h)(Object(Z.a)({},Me));case 10:return dt.next=12,ne();case 12:it=dt.sent,Ee(it.used_screen_num),pt=setTimeout(Object(G.a)(w.a.mark(function Tt(){return w.a.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:case"end":return Ue.stop()}},Tt)})),b.exerciseUserInfo.screen_sec*1e3),window.frames.length!=parent.frames.length&&window.parent.postMessage("backExercise","*"),$.current=pt;case 17:h({type:"globalSetting/headerFooterToggle",payload:De});case 18:case"end":return dt.stop()}},ve)}));return function(){return ue.apply(this,arguments)}}();return f.a.createElement("div",null,T)};se.a=Object(o.a)(function(O){var S=O.loading,D=O.user,I=O.exercise,_=O.globalSetting;return{globalSetting:_,user:D,exercise:I,loading:S.effects}})(R)},bT9E:function(We,se,B){"use strict";B.d(se,"a",function(){return G});var Z=B("VTBJ");function G(U,V){var W=Object(Z.a)({},U);return Array.isArray(V)&&V.forEach(function(M){delete W[M]}),W}},biw7:function(We,se,B){"use strict";var Z=B("q1tI"),G=B.n(Z),U=Z.createContext(null);se.a=U},c5Ni:function(We,se,B){},cRFk:function(We,se,B){We.exports=B.p+"static/RepositoryNoneData.828085a8.png"},csWT:function(We,se,B){We.exports=B.p+"static/choose.4ad1045f.svg"},dQei:function(We,se){for(var B={glog:function(G){if(G<1)throw new Error("glog("+G+")");return B.LOG_TABLE[G]},gexp:function(G){for(;G<0;)G+=255;for(;G>=256;)G-=255;return B.EXP_TABLE[G]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},Z=0;Z<8;Z++)B.EXP_TABLE[Z]=1<<Z;for(var Z=8;Z<256;Z++)B.EXP_TABLE[Z]=B.EXP_TABLE[Z-4]^B.EXP_TABLE[Z-5]^B.EXP_TABLE[Z-6]^B.EXP_TABLE[Z-8];for(var Z=0;Z<255;Z++)B.LOG_TABLE[B.EXP_TABLE[Z]]=Z;We.exports=B},dWSS:function(We,se,B){var Z=B("dQei");function G(U,V){if(U.length==null)throw new Error(U.length+"/"+V);for(var W=0;W<U.length&&U[W]==0;)W++;this.num=new Array(U.length-W+V);for(var M=0;M<U.length-W;M++)this.num[M]=U[M+W]}G.prototype={get:function(U){return this.num[U]},getLength:function(){return this.num.length},multiply:function(U){for(var V=new Array(this.getLength()+U.getLength()-1),W=0;W<this.getLength();W++)for(var M=0;M<U.getLength();M++)V[W+M]^=Z.gexp(Z.glog(this.get(W))+Z.glog(U.get(M)));return new G(V,0)},mod:function(U){if(this.getLength()-U.getLength()<0)return this;for(var V=Z.glog(this.get(0))-Z.glog(U.get(0)),W=new Array(this.getLength()),M=0;M<this.getLength();M++)W[M]=this.get(M);for(var M=0;M<U.getLength();M++)W[M]^=Z.gexp(Z.glog(U.get(M))+V);return new G(W,0).mod(U)}},We.exports=G},dejd:function(We,se,B){},djh8:function(We,se,B){We.exports=B.p+"static/qrCode.d852fdfc.png"},dmUQ:function(We,se,B){"use strict";var Z=B("Ff2n"),G=B("rePB"),U=B("1OyB"),V=B("vuIU"),W=B("Ji7U"),M=B("md7G"),K=B("foSv"),j=B("q1tI"),n=B.n(j),w=B("TSYQ"),m=B.n(w),f=B("4IlW");function p(v,h){var C=Object.keys(v);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(v);h&&(x=x.filter(function(g){return Object.getOwnPropertyDescriptor(v,g).enumerable})),C.push.apply(C,x)}return C}function c(v){for(var h=1;h<arguments.length;h++){var C=arguments[h]!=null?arguments[h]:{};h%2?p(Object(C),!0).forEach(function(x){Object(G.a)(v,x,C[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(C)):p(Object(C)).forEach(function(x){Object.defineProperty(v,x,Object.getOwnPropertyDescriptor(C,x))})}return v}function r(v){var h=d();return function(){var x=Object(K.a)(v),g;if(h){var P=Object(K.a)(this).constructor;g=Reflect.construct(x,arguments,P)}else g=x.apply(this,arguments);return Object(M.a)(this,g)}}function d(){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(v){return!1}}function u(){}function o(v){v.preventDefault()}var s=function(h){return h.replace(/[^\w.-]+/g,"")},a=200,R=600,O=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,S=function(h){return h!=null},D=function(h,C){return C===h||typeof C=="number"&&typeof h=="number"&&isNaN(C)&&isNaN(h)},I=function(v){Object(W.a)(C,v);var h=r(C);function C(x){var g;Object(U.a)(this,C),g=h.call(this,x),g.onKeyDown=function(y){var A=g.props,F=A.onKeyDown,T=A.onPressEnter;if(y.keyCode===f.a.UP){var Y=g.getRatio(y);g.up(y,Y,null),g.stop()}else if(y.keyCode===f.a.DOWN){var $=g.getRatio(y);g.down(y,$,null),g.stop()}else y.keyCode===f.a.ENTER&&T&&T(y);if(g.recordCursorPosition(),g.lastKeyCode=y.keyCode,F){for(var le=arguments.length,de=new Array(le>1?le-1:0),Pe=1;Pe<le;Pe++)de[Pe-1]=arguments[Pe];F.apply(void 0,[y].concat(de))}},g.onKeyUp=function(y){var A=g.props.onKeyUp;if(g.stop(),g.recordCursorPosition(),A){for(var F=arguments.length,T=new Array(F>1?F-1:0),Y=1;Y<F;Y++)T[Y-1]=arguments[Y];A.apply(void 0,[y].concat(T))}},g.onChange=function(y){var A=g.props.onChange;g.state.focused&&(g.inputting=!0),g.rawInput=g.props.parser(g.getValueFromEvent(y)),g.setState({inputValue:g.rawInput}),A(g.toNumber(g.rawInput))},g.onMouseUp=function(){var y=g.props.onMouseUp;g.recordCursorPosition(),y&&y.apply(void 0,arguments)},g.onFocus=function(){var y;g.setState({focused:!0}),(y=g.props).onFocus.apply(y,arguments)},g.onBlur=function(){var y=g.props.onBlur;g.inputting=!1,g.setState({focused:!1});var A=g.getCurrentValidValue(g.state.inputValue),F=g.setValue(A,u);if(y){var T=g.input.value,Y=g.getInputDisplayValue({focus:!1,value:F});g.input.value=Y&&Number(Y),y.apply(void 0,arguments),g.input.value=T}},g.getRatio=function(y){var A=1;return y.metaKey||y.ctrlKey?A=.1:y.shiftKey&&(A=10),A},g.getFullNum=function(y){return isNaN(y)?y:/e/i.test(String(y))?Number(y).toFixed(18).replace(/\.?0+$/,""):y},g.getPrecision=function(y){if(S(g.props.precision))return g.props.precision;var A=String(y);if(A.indexOf("e-")>=0)return parseInt(A.slice(A.indexOf("e-")+2),10);var F=0;return A.indexOf(".")>=0&&(F=A.length-A.indexOf(".")-1),F},g.getInputDisplayValue=function(y){var A=y||g.state,F=A.focused,T=A.inputValue,Y=A.value,$;F?$=T:$=g.toPrecisionAsStep(Y),$==null&&($="");var le=g.formatWrapper($);return S(g.props.decimalSeparator)&&(le=le.toString().replace(".",g.props.decimalSeparator)),le},g.recordCursorPosition=function(){try{g.cursorStart=g.input.selectionStart,g.cursorEnd=g.input.selectionEnd,g.currentValue=g.input.value,g.cursorBefore=g.input.value.substring(0,g.cursorStart),g.cursorAfter=g.input.value.substring(g.cursorEnd)}catch(y){}},g.restoreByAfter=function(y){if(y===void 0)return!1;var A=g.input.value,F=A.lastIndexOf(y);if(F===-1)return!1;var T=g.cursorBefore.length;return g.lastKeyCode===f.a.DELETE&&g.cursorBefore.charAt(T-1)===y[0]?(g.fixCaret(T,T),!0):F+y.length===A.length?(g.fixCaret(F,F),!0):!1},g.partRestoreByAfter=function(y){return y===void 0?!1:Array.prototype.some.call(y,function(A,F){var T=y.substring(F);return g.restoreByAfter(T)})},g.isNotCompleteNumber=function(y){return isNaN(y)||y===""||y===null||y&&y.toString().indexOf(".")===y.toString().length-1},g.stop=function(){g.autoStepTimer&&clearTimeout(g.autoStepTimer)},g.down=function(y,A,F){g.pressingUpOrDown=!0,g.step("down",y,A,F)},g.up=function(y,A,F){g.pressingUpOrDown=!0,g.step("up",y,A,F)},g.saveInput=function(y){g.input=y};var P=x.value;P===void 0&&(P=x.defaultValue),g.state={focused:x.autoFocus};var k=g.getValidValue(g.toNumber(P));return g.state=c(c({},g.state),{},{inputValue:g.toPrecisionAsStep(k),value:k}),g}return Object(V.a)(C,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(g){var P=this.props,k=P.value,y=P.onChange,A=P.max,F=P.min,T=this.state.focused;if(g){if(!D(g.value,k)||!D(g.max,A)||!D(g.min,F)){var Y=T?k:this.getValidValue(k),$;this.pressingUpOrDown?$=Y:this.inputting?$=this.rawInput:$=this.toPrecisionAsStep(Y),this.setState({value:Y,inputValue:$})}var le="value"in this.props?k:this.state.value;"max"in this.props&&g.max!==A&&typeof le=="number"&&le>A&&y&&y(A),"min"in this.props&&g.min!==F&&typeof le=="number"&&le<F&&y&&y(F)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var de=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===f.a.BACKSPACE?de=this.cursorStart-1:this.lastKeyCode===f.a.DELETE&&(de=this.cursorStart):de=this.input.value.length,this.fixCaret(de,de)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case f.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case f.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Pe){}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(g){var P=g;return P===""?P="":this.isNotCompleteNumber(parseFloat(P))?P=this.state.value:P=this.getValidValue(P),this.toNumber(P)}},{key:"getValueFromEvent",value:function(g){var P=g.target.value.trim().replace(/。/g,".");return S(this.props.decimalSeparator)&&(P=P.replace(this.props.decimalSeparator,".")),P}},{key:"getValidValue",value:function(g){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,y=parseFloat(g);return isNaN(y)?g:(y<P&&(y=P),y>k&&(y=k),y)}},{key:"setValue",value:function(g,P){var k=this.props.precision,y=this.isNotCompleteNumber(parseFloat(g))?null:parseFloat(g),A=this.state.value,F=A===void 0?null:A,T=this.state.inputValue,Y=T===void 0?null:T,$=typeof y=="number"?y.toFixed(k):"".concat(y),le=y!==F||$!=="".concat(Y);return"value"in this.props?(Y=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:Y},P)):this.setState({value:y,inputValue:this.toPrecisionAsStep(g)},P),le&&this.props.onChange(y),y}},{key:"getMaxPrecision",value:function(g){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,k=this.props,y=k.precision,A=k.step;if(S(y))return y;var F=this.getPrecision(P),T=this.getPrecision(A),Y=this.getPrecision(g);return g?Math.max(Y,F+T):F+T}},{key:"getPrecisionFactor",value:function(g){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,k=this.getMaxPrecision(g,P);return Math.pow(10,k)}},{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(g){return this.props.formatter?this.props.formatter(g):g}},{key:"toPrecisionAsStep",value:function(g){if(this.isNotCompleteNumber(g)||g==="")return g;var P=Math.abs(this.getMaxPrecision(g));return isNaN(P)?g.toString():Number(g).toFixed(P)}},{key:"toNumber",value:function(g){var P=this.props.precision,k=this.state.focused,y=g&&g.length>16&&k;return this.isNotCompleteNumber(g)||y?g:S(P)?Math.round(g*Math.pow(10,P))/Math.pow(10,P):Number(g)}},{key:"upStep",value:function(g,P){var k=this.props.step,y=this.getPrecisionFactor(g,P),A=Math.abs(this.getMaxPrecision(g,P)),F=((y*g+y*k*P)/y).toFixed(A);return this.toNumber(F)}},{key:"downStep",value:function(g,P){var k=this.props.step,y=this.getPrecisionFactor(g,P),A=Math.abs(this.getMaxPrecision(g,P)),F=((y*g-y*k*P)/y).toFixed(A);return this.toNumber(F)}},{key:"step",value:function(g,P){var k=this,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,A=arguments.length>3?arguments[3]:void 0;this.stop(),P&&(P.persist(),P.preventDefault());var F=this.props;if(F.disabled)return;var T=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(T))return;var Y=this["".concat(g,"Step")](T,y),$=Y>F.max||Y<F.min;if(Y>F.max?Y=F.max:Y<F.min&&(Y=F.min),this.setValue(Y,null),this.setState({focused:!0},function(){k.pressingUpOrDown=!1}),$)return;this.autoStepTimer=setTimeout(function(){k[g](P,y,!0)},A?a:R)}},{key:"fixCaret",value:function(g,P){if(g===void 0||P===void 0||!this.input||!this.input.value)return;try{var k=this.input.selectionStart,y=this.input.selectionEnd;(g!==k||P!==y)&&this.input.setSelectionRange(g,P)}catch(A){}}},{key:"render",value:function(){var g,P=this.props,k=P.prefixCls,y=P.disabled,A=P.readOnly,F=P.useTouch,T=P.autoComplete,Y=P.upHandler,$=P.downHandler,le=P.className,de=P.max,Pe=P.min,Se=P.style,we=P.title,Fe=P.onMouseEnter,Me=P.onMouseLeave,me=P.onMouseOver,pe=P.onMouseOut,ne=P.required,Ee=P.onClick,ae=P.tabIndex,ke=P.type,je=P.placeholder,Oe=P.id,Ve=P.inputMode,qe=P.pattern,ue=P.step,ve=P.maxLength,De=P.autoFocus,Ne=P.name,it=P.onPaste,pt=P.onInput,mt=Object(Z.a)(P,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),dt=this.state,Tt=dt.value,St=dt.focused,Ue=m()(k,(g={},Object(G.a)(g,le,!!le),Object(G.a)(g,"".concat(k,"-disabled"),y),Object(G.a)(g,"".concat(k,"-focused"),St),g)),Ie={};Object.keys(mt).forEach(function(ye){(ye.substr(0,5)==="data-"||ye.substr(0,5)==="aria-"||ye==="role")&&(Ie[ye]=mt[ye])});var tt=!A&&!y,lt=this.getInputDisplayValue(null),Ke=(Tt||Tt===0)&&(isNaN(Tt)||Number(Tt)>=de),Xe=(Tt||Tt===0)&&(isNaN(Tt)||Number(Tt)<=Pe),Ce=Ke||y||A,ge=Xe||y||A,be=m()("".concat(k,"-handler"),"".concat(k,"-handler-up"),Object(G.a)({},"".concat(k,"-handler-up-disabled"),Ce)),ie=m()("".concat(k,"-handler"),"".concat(k,"-handler-down"),Object(G.a)({},"".concat(k,"-handler-down-disabled"),ge)),oe=F?{onTouchStart:Ce?u:this.up,onTouchEnd:this.stop}:{onMouseDown:Ce?u:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},fe=F?{onTouchStart:ge?u:this.down,onTouchEnd:this.stop}:{onMouseDown:ge?u:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return n.a.createElement("div",{className:Ue,style:Se,title:we,onMouseEnter:Fe,onMouseLeave:Me,onMouseOver:me,onMouseOut:pe,onFocus:function(){return null},onBlur:function(){return null}},n.a.createElement("div",{className:"".concat(k,"-handler-wrap")},n.a.createElement("span",Object.assign({unselectable:"on"},oe,{role:"button","aria-label":"Increase Value","aria-disabled":Ce,className:be}),Y||n.a.createElement("span",{unselectable:"on",className:"".concat(k,"-handler-up-inner"),onClick:o})),n.a.createElement("span",Object.assign({unselectable:"on"},fe,{role:"button","aria-label":"Decrease Value","aria-disabled":ge,className:ie}),$||n.a.createElement("span",{unselectable:"on",className:"".concat(k,"-handler-down-inner"),onClick:o}))),n.a.createElement("div",{className:"".concat(k,"-input-wrap")},n.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Pe,"aria-valuemax":de,"aria-valuenow":Tt,required:ne,type:ke,placeholder:je,onPaste:it,onClick:Ee,onMouseUp:this.onMouseUp,className:"".concat(k,"-input"),tabIndex:ae,autoComplete:T,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:tt?this.onKeyDown:u,onKeyUp:tt?this.onKeyUp:u,autoFocus:De,maxLength:ve,readOnly:A,disabled:y,max:de,min:Pe,step:ue,name:Ne,title:we,id:Oe,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(lt),pattern:qe,inputMode:Ve,onInput:pt},Ie))))}}]),C}(n.a.Component);I.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:O,min:-O,step:1,style:{},onChange:u,onKeyDown:u,onPressEnter:u,onFocus:u,onBlur:u,parser:s,required:!1,autoComplete:"off"};var _=I,b=se.a=_},f4xo:function(We,se,B){var Z=B("nVVt");function G(U){this.mode=Z.MODE_8BIT_BYTE,this.data=U}G.prototype={getLength:function(U){return this.data.length},write:function(U){for(var V=0;V<this.data.length;V++)U.put(this.data.charCodeAt(V),8)}},We.exports=G},fjLI:function(We,se,B){"use strict";B.d(se,"f",function(){return p}),B.d(se,"b",function(){return c}),B.d(se,"a",function(){return r}),B.d(se,"d",function(){return d}),B.d(se,"e",function(){return u}),B.d(se,"c",function(){return o});var Z=B("8HAY"),G=B("Vhoy"),U=B("MI8n"),V=B("JYp7"),W=B("pmY6"),M=B("24hK"),K=B("nnTU"),j=B("T8No"),n=B("Cg/j"),w=B("t9D7"),m=function(s,a,R,O){var S=arguments.length,D=S<3?a:O===null?O=Object.getOwnPropertyDescriptor(a,R):O,I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(s,a,R,O);else for(var _=s.length-1;_>=0;_--)(I=s[_])&&(D=(S<3?I(D):S>3?I(a,R,D):I(a,R))||D);return S>3&&D&&Object.defineProperty(a,R,D),D},f=function(s,a){return function(R,O){a(R,O,s)}};function p(s){return s.command!==void 0}class c{constructor(s){this.id=c._idPool++,this._debugName=s}}c._idPool=0,c.CommandPalette=new c("CommandPalette"),c.EditorContext=new c("EditorContext"),c.SimpleEditorContext=new c("SimpleEditorContext"),c.EditorContextCopy=new c("EditorContextCopy"),c.EditorContextPeek=new c("EditorContextPeek"),c.MenubarEditMenu=new c("MenubarEditMenu"),c.MenubarCopy=new c("MenubarCopy"),c.MenubarGoMenu=new c("MenubarGoMenu"),c.MenubarSelectionMenu=new c("MenubarSelectionMenu"),c.InlineCompletionsActions=new c("InlineCompletionsActions");const r=Object(n.c)("menuService"),d=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new U.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:s=>s===c.CommandPalette}}addCommand(s){return this.addCommands(V.a.single(s))}addCommands(s){for(const a of s)this._commands.set(a.id,a);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(W.i)(()=>{let a=!1;for(const R of s)a=this._commands.delete(R.id)||a;a&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(s){return this._commands.get(s)}getCommands(){const s=new Map;return this._commands.forEach((a,R)=>s.set(R,a)),s}appendMenuItem(s,a){return this.appendMenuItems(V.a.single({id:s,item:a}))}appendMenuItems(s){const a=new Set,R=new M.a;for(const{id:O,item:S}of s){let D=this._menuItems.get(O);D||(D=new M.a,this._menuItems.set(O,D)),R.push(D.push(S)),a.add(O)}return this._onDidChangeMenu.fire(a),Object(W.i)(()=>{if(R.size>0){for(let O of R)O();this._onDidChangeMenu.fire(a),R.clear()}})}getMenuItems(s){let a;return this._menuItems.has(s)?a=[...this._menuItems.get(s)]:a=[],s===c.CommandPalette&&this._appendImplicitItems(a),a}_appendImplicitItems(s){const a=new Set;for(const R of s)p(R)&&(a.add(R.command.id),R.alt&&a.add(R.alt.id));this._commands.forEach((R,O)=>{a.has(O)||s.push({command:R})})}};class u extends Z.e{constructor(s,a,R,O){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu");this.item=s,this._menuService=a,this._contextKeyService=R,this._options=O}get actions(){const s=[],a=this._menuService.createMenu(this.item.submenu,this._contextKeyService),R=a.getActions(this._options);a.dispose();for(const[,O]of R)O.length>0&&(s.push(...O),s.push(new Z.d));return s.length&&s.pop(),s}}let o=class s{constructor(a,R,O,S,D){var I,_;if(this._commandService=D,this.id=a.id,this.label=(O==null?void 0:O.renderShortTitle)&&a.shortTitle?typeof a.shortTitle=="string"?a.shortTitle:a.shortTitle.value:typeof a.title=="string"?a.title:a.title.value,this.tooltip=(_=typeof a.tooltip=="string"?a.tooltip:(I=a.tooltip)===null||I===void 0?void 0:I.value)!==null&&_!==void 0?_:"",this.enabled=!a.precondition||S.contextMatchesRules(a.precondition),this.checked=void 0,a.toggled){const b=a.toggled.condition?a.toggled:{condition:a.toggled};this.checked=S.contextMatchesRules(b.condition),this.checked&&b.tooltip&&(this.tooltip=typeof b.tooltip=="string"?b.tooltip:b.tooltip.value),b.title&&(this.label=typeof b.title=="string"?b.title:b.title.value)}this.item=a,this.alt=R?new s(R,void 0,O,S,D):void 0,this._options=O,w.d.isThemeIcon(a.icon)&&(this.class=G.a.asClassName(a.icon))}dispose(){}run(...a){var R,O;let S=[];return((R=this._options)===null||R===void 0?void 0:R.arg)&&(S=[...S,this._options.arg]),((O=this._options)===null||O===void 0?void 0:O.shouldForwardArgs)&&(S=[...S,...a]),this._commandService.executeCommand(this.id,...S)}};o=m([f(3,j.b),f(4,K.b)],o)},fyJ8:function(We,se,B){"use strict";var Z=B("rePB"),G=B("VTBJ"),U=B("Ff2n"),V=B("U8pU"),W=B("q1tI"),M=B.n(W),K=B("TSYQ"),j=B.n(K),n=B("c+Xe"),w=B("sR1s");function m(d){return d&&Object(V.a)(d)==="object"&&!Array.isArray(d)&&!W.isValidElement(d)}function f(d){return typeof d=="string"?!0:Object(n.c)(d)}function p(d,u){var o,s=d.prefixCls,a=d.className,R=d.record,O=d.index,S=d.dataIndex,D=d.render,I=d.children,_=d.component,b=_===void 0?"td":_,v=d.colSpan,h=d.rowSpan,C=d.fixLeft,x=d.fixRight,g=d.firstFixLeft,P=d.lastFixLeft,k=d.firstFixRight,y=d.lastFixRight,A=d.appendNode,F=d.additionalProps,T=F===void 0?{}:F,Y=d.ellipsis,$=d.align,le=d.rowType,de=d.isSticky,Pe="".concat(s,"-cell"),Se,we;if(I)we=I;else{var Fe=Object(w.b)(R,S);if(we=Fe,D){var Me=D(Fe,R,O);m(Me)?(we=Me.children,Se=Me.props):we=Me}}Object(V.a)(we)==="object"&&!Array.isArray(we)&&!W.isValidElement(we)&&(we=null),Y&&(P||k)&&(we=W.createElement("span",{className:"".concat(Pe,"-content")},we));var me=Se||{},pe=me.colSpan,ne=me.rowSpan,Ee=me.style,ae=me.className,ke=Object(U.a)(me,["colSpan","rowSpan","style","className"]),je=pe!==void 0?pe:v,Oe=ne!==void 0?ne:h;if(je===0||Oe===0)return null;var Ve={},qe=typeof C=="number",ue=typeof x=="number";qe&&(Ve.position="sticky",Ve.left=C),ue&&(Ve.position="sticky",Ve.right=x);var ve={};$&&(ve.textAlign=$);var De,Ne=Y===!0?{showTitle:!0}:Y;Ne&&(Ne.showTitle||le==="header")&&(typeof we=="string"||typeof we=="number"?De=we.toString():W.isValidElement(we)&&typeof we.props.children=="string"&&(De=we.props.children));var it=Object(G.a)(Object(G.a)(Object(G.a)({title:De},ke),T),{},{colSpan:je&&je!==1?je:null,rowSpan:Oe&&Oe!==1?Oe:null,className:j()(Pe,a,(o={},Object(Z.a)(o,"".concat(Pe,"-fix-left"),qe),Object(Z.a)(o,"".concat(Pe,"-fix-left-first"),g),Object(Z.a)(o,"".concat(Pe,"-fix-left-last"),P),Object(Z.a)(o,"".concat(Pe,"-fix-right"),ue),Object(Z.a)(o,"".concat(Pe,"-fix-right-first"),k),Object(Z.a)(o,"".concat(Pe,"-fix-right-last"),y),Object(Z.a)(o,"".concat(Pe,"-ellipsis"),Y),Object(Z.a)(o,"".concat(Pe,"-with-append"),A),Object(Z.a)(o,"".concat(Pe,"-fix-sticky"),(qe||ue)&&de),o),T.className,ae),style:Object(G.a)(Object(G.a)(Object(G.a)(Object(G.a)({},T.style),ve),Ve),Ee),ref:f(b)?u:null});return W.createElement(b,Object.assign({},it),A,we)}var c=W.forwardRef(p);c.displayName="Cell";var r=W.memo(c,function(d,u){return u.shouldCellUpdate?!u.shouldCellUpdate(u.record,d.record):!1});se.a=r},h78n:function(We,se,B){"use strict";B.d(se,"a",function(){return g});var Z=B("q1tI"),G=B.n(Z),U=B("TSYQ"),V=B.n(U),W={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},M=function(y){var A=y.map(function(){return Object(Z.useRef)()}),F=Object(Z.useRef)();return Object(Z.useEffect)(function(){var T=Date.now(),Y=!1;Object.keys(A).forEach(function($){var le=A[$].current;if(!le)return;Y=!0;var de=le.style;de.transitionDuration=".3s, .3s, .3s, .06s",F.current&&T-F.current<100&&(de.transitionDuration="0s, 0s")}),Y&&(F.current=Date.now())}),[A]};function K(){return K=Object.assign||function(k){for(var y=1;y<arguments.length;y++){var A=arguments[y];for(var F in A)Object.prototype.hasOwnProperty.call(A,F)&&(k[F]=A[F])}return k},K.apply(this,arguments)}function j(k,y){return p(k)||f(k,y)||w(k,y)||n()}function n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(k,y){if(!k)return;if(typeof k=="string")return m(k,y);var A=Object.prototype.toString.call(k).slice(8,-1);if(A==="Object"&&k.constructor&&(A=k.constructor.name),A==="Map"||A==="Set")return Array.from(k);if(A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return m(k,y)}function m(k,y){(y==null||y>k.length)&&(y=k.length);for(var A=0,F=new Array(y);A<y;A++)F[A]=k[A];return F}function f(k,y){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(k)))return;var A=[],F=!0,T=!1,Y=void 0;try{for(var $=k[Symbol.iterator](),le;!(F=(le=$.next()).done)&&!(A.push(le.value),y&&A.length===y);F=!0);}catch(de){T=!0,Y=de}finally{try{!F&&$.return!=null&&$.return()}finally{if(T)throw Y}}return A}function p(k){if(Array.isArray(k))return k}function c(k,y){if(k==null)return{};var A=r(k,y),F,T;if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(k);for(T=0;T<Y.length;T++){if(F=Y[T],y.indexOf(F)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(k,F))continue;A[F]=k[F]}}return A}function r(k,y){if(k==null)return{};var A={},F=Object.keys(k),T,Y;for(Y=0;Y<F.length;Y++){if(T=F[Y],y.indexOf(T)>=0)continue;A[T]=k[T]}return A}var d=function(y){var A=y.className,F=y.percent,T=y.prefixCls,Y=y.strokeColor,$=y.strokeLinecap,le=y.strokeWidth,de=y.style,Pe=y.trailColor,Se=y.trailWidth,we=y.transition,Fe=c(y,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Fe.gapPosition;var Me=Array.isArray(F)?F:[F],me=Array.isArray(Y)?Y:[Y],pe=M(Me),ne=j(pe,1),Ee=ne[0],ae=le/2,ke=100-le/2,je="M ".concat($==="round"?ae:0,",").concat(ae,`
L `).concat($==="round"?ke:100,",").concat(ae),Oe="0 0 100 ".concat(le),Ve=0;return G.a.createElement("svg",K({className:V()("".concat(T,"-line"),A),viewBox:Oe,preserveAspectRatio:"none",style:de},Fe),G.a.createElement("path",{className:"".concat(T,"-line-trail"),d:je,strokeLinecap:$,stroke:Pe,strokeWidth:Se||le,fillOpacity:"0"}),Me.map(function(qe,ue){var ve={strokeDasharray:"".concat(qe,"px, 100px"),strokeDashoffset:"-".concat(Ve,"px"),transition:we||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},De=me[ue]||me[me.length-1];return Ve+=qe,G.a.createElement("path",{key:ue,className:"".concat(T,"-line-path"),d:je,strokeLinecap:$,stroke:De,strokeWidth:le,fillOpacity:"0",ref:Ee[ue],style:ve})}))};d.defaultProps=W;var u=d;function o(){return o=Object.assign||function(k){for(var y=1;y<arguments.length;y++){var A=arguments[y];for(var F in A)Object.prototype.hasOwnProperty.call(A,F)&&(k[F]=A[F])}return k},o.apply(this,arguments)}function s(k,y){return D(k)||S(k,y)||R(k,y)||a()}function a(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R(k,y){if(!k)return;if(typeof k=="string")return O(k,y);var A=Object.prototype.toString.call(k).slice(8,-1);if(A==="Object"&&k.constructor&&(A=k.constructor.name),A==="Map"||A==="Set")return Array.from(k);if(A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return O(k,y)}function O(k,y){(y==null||y>k.length)&&(y=k.length);for(var A=0,F=new Array(y);A<y;A++)F[A]=k[A];return F}function S(k,y){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(k)))return;var A=[],F=!0,T=!1,Y=void 0;try{for(var $=k[Symbol.iterator](),le;!(F=(le=$.next()).done)&&!(A.push(le.value),y&&A.length===y);F=!0);}catch(de){T=!0,Y=de}finally{try{!F&&$.return!=null&&$.return()}finally{if(T)throw Y}}return A}function D(k){if(Array.isArray(k))return k}function I(k,y){if(k==null)return{};var A=_(k,y),F,T;if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(k);for(T=0;T<Y.length;T++){if(F=Y[T],y.indexOf(F)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(k,F))continue;A[F]=k[F]}}return A}function _(k,y){if(k==null)return{};var A={},F=Object.keys(k),T,Y;for(Y=0;Y<F.length;Y++){if(T=F[Y],y.indexOf(T)>=0)continue;A[T]=k[T]}return A}var b=0;function v(k){return+k.replace("%","")}function h(k){return Array.isArray(k)?k:[k]}function C(k,y,A,F){var T=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,Y=arguments.length>5?arguments[5]:void 0,$=50-F/2,le=0,de=-$,Pe=0,Se=-2*$;switch(Y){case"left":le=-$,de=0,Pe=2*$,Se=0;break;case"right":le=$,de=0,Pe=-2*$,Se=0;break;case"bottom":de=$,Se=2*$;break;default:}var we="M 50,50 m ".concat(le,",").concat(de,`
a `).concat($,",").concat($," 0 1 1 ").concat(Pe,",").concat(-Se,`
a `).concat($,",").concat($," 0 1 1 ").concat(-Pe,",").concat(Se),Fe=Math.PI*2*$,Me={stroke:A,strokeDasharray:"".concat(y/100*(Fe-T),"px ").concat(Fe,"px"),strokeDashoffset:"-".concat(T/2+k/100*(Fe-T),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:we,pathStyle:Me}}var x=function(y){var A=y.prefixCls,F=y.strokeWidth,T=y.trailWidth,Y=y.gapDegree,$=y.gapPosition,le=y.trailColor,de=y.strokeLinecap,Pe=y.style,Se=y.className,we=y.strokeColor,Fe=y.percent,Me=I(y,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),me=Object(Z.useMemo)(function(){return b+=1,b},[]),pe=C(0,100,le,F,Y,$),ne=pe.pathString,Ee=pe.pathStyle,ae=h(Fe),ke=h(we),je=ke.find(function(ve){return Object.prototype.toString.call(ve)==="[object Object]"}),Oe=M(ae),Ve=s(Oe,1),qe=Ve[0],ue=function(){var De=0;return ae.map(function(Ne,it){var pt=ke[it]||ke[ke.length-1],mt=Object.prototype.toString.call(pt)==="[object Object]"?"url(#".concat(A,"-gradient-").concat(me,")"):"",dt=C(De,Ne,pt,F,Y,$);return De+=Ne,G.a.createElement("path",{key:it,className:"".concat(A,"-circle-path"),d:dt.pathString,stroke:mt,strokeLinecap:de,strokeWidth:F,opacity:Ne===0?0:1,fillOpacity:"0",style:dt.pathStyle,ref:qe[it]})})};return G.a.createElement("svg",o({className:V()("".concat(A,"-circle"),Se),viewBox:"0 0 100 100",style:Pe},Me),je&&G.a.createElement("defs",null,G.a.createElement("linearGradient",{id:"".concat(A,"-gradient-").concat(me),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(je).sort(function(ve,De){return v(ve)-v(De)}).map(function(ve,De){return G.a.createElement("stop",{key:De,offset:ve,stopColor:je[ve]})}))),G.a.createElement("path",{className:"".concat(A,"-circle-trail"),d:ne,stroke:le,strokeLinecap:de,strokeWidth:T||F,fillOpacity:"0",style:Ee}),ue().reverse())};x.defaultProps=W;var g=x,P={Line:u,Circle:g}},hW8S:function(We,se,B){"use strict";B.d(se,"a",function(){return V}),B.d(se,"c",function(){return W}),B.d(se,"b",function(){return M});var Z=B("VTBJ"),G=B("Ff2n"),U=B("Kwbf"),V="RC_TABLE_INTERNAL_COL_DEFINE";function W(K){var j=K.expandable,n=Object(G.a)(K,["expandable"]);return"expandable"in K?Object(Z.a)(Object(Z.a)({},n),j):n}function M(K){return Object.keys(K).reduce(function(j,n){return(n.substr(0,5)==="data-"||n.substr(0,5)==="aria-")&&(j[n]=K[n]),j},{})}},ic2d:function(We,se,B){"use strict";B.d(se,"a",function(){return V});var Z=B("FWmy"),G=B("746U");class U{constructor(){this.data=new Map}add(W,M){Z.a(G.l(W)),Z.a(G.k(M)),Z.a(!this.data.has(W),"There is already an extension with this id"),this.data.set(W,M)}as(W){return this.data.get(W)||null}}const V=new U},ji0R:function(We,se,B){We.exports=B.p+"static/douyu.3e6df9ee.jpg"},kPWJ:function(We,se,B){We.exports=B.p+"static/question.cb52bef9.gif"},kPYp:function(We,se){We.exports="data:image/png;base64,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"},kSUc:function(We,se,B){},l2Kq:function(We,se,B){We.exports=B.p+"static/match_ad.24dc22fd.jpg"},lZu9:function(We,se,B){(function(Z){Z(B("VrN/"),B("1eCo"),B("8EBN"))})(function(Z){"use strict";Z.defineMode("markdown",function(G,U){var V=Z.getMode(G,"text/html"),W=V.name=="null";function M(F){if(Z.findModeByName){var T=Z.findModeByName(F);T&&(F=T.mime||T.mimes[0])}var Y=Z.getMode(G,F);return Y.name=="null"?null:Y}U.highlightFormatting===void 0&&(U.highlightFormatting=!1),U.maxBlockquoteDepth===void 0&&(U.maxBlockquoteDepth=0),U.taskLists===void 0&&(U.taskLists=!1),U.strikethrough===void 0&&(U.strikethrough=!1),U.emoji===void 0&&(U.emoji=!1),U.fencedCodeBlockHighlighting===void 0&&(U.fencedCodeBlockHighlighting=!0),U.fencedCodeBlockDefaultMode===void 0&&(U.fencedCodeBlockDefaultMode="text/plain"),U.xml===void 0&&(U.xml=!0),U.tokenTypeOverrides===void 0&&(U.tokenTypeOverrides={});var K={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 j in K)K.hasOwnProperty(j)&&U.tokenTypeOverrides[j]&&(K[j]=U.tokenTypeOverrides[j]);var n=/^([*\-_])(?:\s*\1){2,}\s*$/,w=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,m=/^\[(x| )\](?=\s)/i,f=U.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,c=/^[^#!\[\]*_\\<>` "'(~:]+/,r=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,d=/^\s*\[[^\]]+?\]:.*$/,u=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,o=" ";function s(F,T,Y){return T.f=T.inline=Y,Y(F,T)}function a(F,T,Y){return T.f=T.block=Y,Y(F,T)}function R(F){return!F||!/\S/.test(F.string)}function O(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==D){var T=W;if(!T){var Y=Z.innerMode(V,F.htmlState);T=Y.mode.name=="xml"&&Y.state.tagStart===null&&!Y.state.context&&Y.state.tokenize.isInText}T&&(F.f=v,F.block=S,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function S(F,T){var Y=F.column()===T.indentation,$=R(T.prevLine.stream),le=T.indentedCode,de=T.prevLine.hr,Pe=T.list!==!1,Se=(T.listStack[T.listStack.length-1]||0)+3;T.indentedCode=!1;var we=T.indentation;if(T.indentationDiff===null&&(T.indentationDiff=T.indentation,Pe)){for(T.list=null;we<T.listStack[T.listStack.length-1];)T.listStack.pop(),T.listStack.length?T.indentation=T.listStack[T.listStack.length-1]:T.list=!1;T.list!==!1&&(T.indentationDiff=we-T.listStack[T.listStack.length-1])}var Fe=!$&&!de&&!T.prevLine.header&&(!Pe||!le)&&!T.prevLine.fencedCodeEnd,Me=(T.list===!1||de||$)&&T.indentation<=Se&&F.match(n),me=null;if(T.indentationDiff>=4&&(le||T.prevLine.fencedCodeEnd||T.prevLine.header||$))return F.skipToEnd(),T.indentedCode=!0,K.code;if(F.eatSpace())return null;if(Y&&T.indentation<=Se&&(me=F.match(f))&&me[1].length<=6)return T.quote=0,T.header=me[1].length,T.thisLine.header=!0,U.highlightFormatting&&(T.formatting="header"),T.f=T.inline,_(T);if(T.indentation<=Se&&F.eat(">"))return T.quote=Y?1:T.quote+1,U.highlightFormatting&&(T.formatting="quote"),F.eatSpace(),_(T);if(!Me&&!T.setext&&Y&&T.indentation<=Se&&(me=F.match(w))){var pe=me[1]?"ol":"ul";return T.indentation=we+F.current().length,T.list=!0,T.quote=0,T.listStack.push(T.indentation),T.em=!1,T.strong=!1,T.code=!1,T.strikethrough=!1,U.taskLists&&F.match(m,!1)&&(T.taskList=!0),T.f=T.inline,U.highlightFormatting&&(T.formatting=["list","list-"+pe]),_(T)}else{if(Y&&T.indentation<=Se&&(me=F.match(r,!0)))return T.quote=0,T.fencedEndRE=new RegExp(me[1]+"+ *$"),T.localMode=U.fencedCodeBlockHighlighting&&M(me[2]||U.fencedCodeBlockDefaultMode),T.localMode&&(T.localState=Z.startState(T.localMode)),T.f=T.block=I,U.highlightFormatting&&(T.formatting="code-block"),T.code=-1,_(T);if(T.setext||(!Fe||!Pe)&&!T.quote&&T.list===!1&&!T.code&&!Me&&!d.test(F.string)&&(me=F.lookAhead(1))&&(me=me.match(p)))return T.setext?(T.header=T.setext,T.setext=0,F.skipToEnd(),U.highlightFormatting&&(T.formatting="header")):(T.header=me[0].charAt(0)=="="?1:2,T.setext=T.header),T.thisLine.header=!0,T.f=T.inline,_(T);if(Me)return F.skipToEnd(),T.hr=!0,T.thisLine.hr=!0,K.hr;if(F.peek()==="[")return s(F,T,P)}return s(F,T,T.inline)}function D(F,T){var Y=V.token(F,T.htmlState);if(!W){var $=Z.innerMode(V,T.htmlState);($.mode.name=="xml"&&$.state.tagStart===null&&!$.state.context&&$.state.tokenize.isInText||T.md_inside&&F.current().indexOf(">")>-1)&&(T.f=v,T.block=S,T.htmlState=null)}return Y}function I(F,T){var Y=T.listStack[T.listStack.length-1]||0,$=T.indentation<Y,le=Y+3;if(T.fencedEndRE&&T.indentation<=le&&($||F.match(T.fencedEndRE))){U.highlightFormatting&&(T.formatting="code-block");var de;return $||(de=_(T)),T.localMode=T.localState=null,T.block=S,T.f=v,T.fencedEndRE=null,T.code=0,T.thisLine.fencedCodeEnd=!0,$?a(F,T,T.block):de}else return T.localMode?T.localMode.token(F,T.localState):(F.skipToEnd(),K.code)}function _(F){var T=[];if(F.formatting){T.push(K.formatting),typeof F.formatting=="string"&&(F.formatting=[F.formatting]);for(var Y=0;Y<F.formatting.length;Y++)T.push(K.formatting+"-"+F.formatting[Y]),F.formatting[Y]==="header"&&T.push(K.formatting+"-"+F.formatting[Y]+"-"+F.header),F.formatting[Y]==="quote"&&(!U.maxBlockquoteDepth||U.maxBlockquoteDepth>=F.quote?T.push(K.formatting+"-"+F.formatting[Y]+"-"+F.quote):T.push("error"))}if(F.taskOpen)return T.push("meta"),T.length?T.join(" "):null;if(F.taskClosed)return T.push("property"),T.length?T.join(" "):null;if(F.linkHref?T.push(K.linkHref,"url"):(F.strong&&T.push(K.strong),F.em&&T.push(K.em),F.strikethrough&&T.push(K.strikethrough),F.emoji&&T.push(K.emoji),F.linkText&&T.push(K.linkText),F.code&&T.push(K.code),F.image&&T.push(K.image),F.imageAltText&&T.push(K.imageAltText,"link"),F.imageMarker&&T.push(K.imageMarker)),F.header&&T.push(K.header,K.header+"-"+F.header),F.quote&&(T.push(K.quote),!U.maxBlockquoteDepth||U.maxBlockquoteDepth>=F.quote?T.push(K.quote+"-"+F.quote):T.push(K.quote+"-"+U.maxBlockquoteDepth)),F.list!==!1){var $=(F.listStack.length-1)%3;$?$===1?T.push(K.list2):T.push(K.list3):T.push(K.list1)}return F.trailingSpaceNewLine?T.push("trailing-space-new-line"):F.trailingSpace&&T.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),T.length?T.join(" "):null}function b(F,T){return F.match(c,!0)?_(T):void 0}function v(F,T){var Y=T.text(F,T);if(typeof Y!="undefined")return Y;if(T.list)return T.list=null,_(T);if(T.taskList){var $=F.match(m,!0)[1]===" ";return $?T.taskOpen=!0:T.taskClosed=!0,U.highlightFormatting&&(T.formatting="task"),T.taskList=!1,_(T)}if(T.taskOpen=!1,T.taskClosed=!1,T.header&&F.match(/^#+$/,!0))return U.highlightFormatting&&(T.formatting="header"),_(T);var le=F.next();if(T.linkTitle){T.linkTitle=!1;var de=le;le==="("&&(de=")"),de=(de+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Pe="^\\s*(?:[^"+de+"\\\\]+|\\\\\\\\|\\\\.)"+de;if(F.match(new RegExp(Pe),!0))return K.linkHref}if(le==="`"){var Se=T.formatting;U.highlightFormatting&&(T.formatting="code"),F.eatWhile("`");var we=F.current().length;if(T.code==0&&(!T.quote||we==1))return T.code=we,_(T);if(we==T.code){var Fe=_(T);return T.code=0,Fe}else return T.formatting=Se,_(T)}else if(T.code)return _(T);if(le==="\\"&&(F.next(),U.highlightFormatting)){var Me=_(T),me=K.formatting+"-escape";return Me?Me+" "+me:me}if(le==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return T.imageMarker=!0,T.image=!0,U.highlightFormatting&&(T.formatting="image"),_(T);if(le==="["&&T.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return T.imageMarker=!1,T.imageAltText=!0,U.highlightFormatting&&(T.formatting="image"),_(T);if(le==="]"&&T.imageAltText){U.highlightFormatting&&(T.formatting="image");var Me=_(T);return T.imageAltText=!1,T.image=!1,T.inline=T.f=C,Me}if(le==="["&&!T.image)return T.linkText&&F.match(/^.*?\]/)||(T.linkText=!0,U.highlightFormatting&&(T.formatting="link")),_(T);if(le==="]"&&T.linkText){U.highlightFormatting&&(T.formatting="link");var Me=_(T);return T.linkText=!1,T.inline=T.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?C:v,Me}if(le==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=h,U.highlightFormatting&&(T.formatting="link");var Me=_(T);return Me?Me+=" ":Me="",Me+K.linkInline}if(le==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=h,U.highlightFormatting&&(T.formatting="link");var Me=_(T);return Me?Me+=" ":Me="",Me+K.linkEmail}if(U.xml&&le==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var pe=F.string.indexOf(">",F.pos);if(pe!=-1){var ne=F.string.substring(F.start,pe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ne)&&(T.md_inside=!0)}return F.backUp(1),T.htmlState=Z.startState(V),a(F,T,D)}if(U.xml&&le==="<"&&F.match(/^\/\w*?>/))return T.md_inside=!1,"tag";if(le==="*"||le==="_"){for(var Ee=1,ae=F.pos==1?" ":F.string.charAt(F.pos-2);Ee<3&&F.eat(le);)Ee++;var ke=F.peek()||" ",je=!/\s/.test(ke)&&(!u.test(ke)||/\s/.test(ae)||u.test(ae)),Oe=!/\s/.test(ae)&&(!u.test(ae)||/\s/.test(ke)||u.test(ke)),Ve=null,qe=null;if(Ee%2&&(!T.em&&je&&(le==="*"||!Oe||u.test(ae))?Ve=!0:T.em==le&&Oe&&(le==="*"||!je||u.test(ke))&&(Ve=!1)),Ee>1&&(!T.strong&&je&&(le==="*"||!Oe||u.test(ae))?qe=!0:T.strong==le&&Oe&&(le==="*"||!je||u.test(ke))&&(qe=!1)),qe!=null||Ve!=null){U.highlightFormatting&&(T.formatting=Ve==null?"strong":qe==null?"em":"strong em"),Ve===!0&&(T.em=le),qe===!0&&(T.strong=le);var Fe=_(T);return Ve===!1&&(T.em=!1),qe===!1&&(T.strong=!1),Fe}}else if(le===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return _(T);F.backUp(1)}if(U.strikethrough){if(le==="~"&&F.eatWhile(le)){if(T.strikethrough){U.highlightFormatting&&(T.formatting="strikethrough");var Fe=_(T);return T.strikethrough=!1,Fe}else if(F.match(/^[^\s]/,!1))return T.strikethrough=!0,U.highlightFormatting&&(T.formatting="strikethrough"),_(T)}else if(le===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return _(T);F.backUp(2)}}if(U.emoji&&le===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){T.emoji=!0,U.highlightFormatting&&(T.formatting="emoji");var ue=_(T);return T.emoji=!1,ue}return le===" "&&(F.match(/^ +$/,!1)?T.trailingSpace++:T.trailingSpace&&(T.trailingSpaceNewLine=!0)),_(T)}function h(F,T){var Y=F.next();if(Y===">"){T.f=T.inline=v,U.highlightFormatting&&(T.formatting="link");var $=_(T);return $?$+=" ":$="",$+K.linkInline}return F.match(/^[^>]+/,!0),K.linkInline}function C(F,T){if(F.eatSpace())return null;var Y=F.next();return Y==="("||Y==="["?(T.f=T.inline=g(Y==="("?")":"]"),U.highlightFormatting&&(T.formatting="link-string"),T.linkHref=!0,_(T)):"error"}var x={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function g(F){return function(T,Y){var $=T.next();if($===F){Y.f=Y.inline=v,U.highlightFormatting&&(Y.formatting="link-string");var le=_(Y);return Y.linkHref=!1,le}return T.match(x[F]),Y.linkHref=!0,_(Y)}}function P(F,T){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(T.f=k,F.next(),U.highlightFormatting&&(T.formatting="link"),T.linkText=!0,_(T)):s(F,T,v)}function k(F,T){if(F.match(/^\]:/,!0)){T.f=T.inline=y,U.highlightFormatting&&(T.formatting="link");var Y=_(T);return T.linkText=!1,Y}return F.match(/^([^\]\\]|\\.)+/,!0),K.linkText}function y(F,T){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?T.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),T.f=T.inline=v,K.linkHref+" url")}var A={startState:function(){return{f:S,prevLine:{stream:null},thisLine:{stream:null},block:S,htmlState:null,indentation:0,inline:v,text:b,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&&Z.copyState(V,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?Z.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,T){if(T.formatting=!1,F!=T.thisLine.stream){if(T.header=0,T.hr=!1,F.match(/^\s*$/,!0))return O(T),null;if(T.prevLine=T.thisLine,T.thisLine={stream:F},T.taskList=!1,T.trailingSpace=0,T.trailingSpaceNewLine=!1,!T.localState&&(T.f=T.block,T.f!=D)){var Y=F.match(/^\s*/,!0)[0].replace(/\t/g,o).length;if(T.indentation=Y,T.indentationDiff=null,Y>0)return null}}return T.f(F,T)},innerMode:function(F){return F.block==D?{state:F.htmlState,mode:V}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:A}},indent:function(F,T,Y){return F.block==D&&V.indent?V.indent(F.htmlState,T,Y):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,T,Y):Z.Pass},blankLine:O,getType:_,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return A},"xml"),Z.defineMIME("text/markdown","markdown"),Z.defineMIME("text/x-markdown","markdown")})},lzim:function(We,se,B){"use strict";var Z=B("E7E6"),G=B.n(Z);B.d(se,"w",function(){return G.a});var U=B("/GNS"),V=B.n(U);B.d(se,"v",function(){return V.a});var W=B("FOrL"),M=B.n(W);B.d(se,"q",function(){return M.a});var K=B("HpTS"),j=B.n(K);B.d(se,"x",function(){return j.a});var n=B("tWlo"),w=B.n(n);B.d(se,"a",function(){return w.a});var m=B("7ZXX"),f=B.n(m);B.d(se,"l",function(){return f.a});var p=B("GABl"),c=B.n(p);B.d(se,"e",function(){return c.a});var r=B("onxn"),d=B.n(r);B.d(se,"n",function(){return d.a});var u=B("nKGa"),o=B.n(u);B.d(se,"m",function(){return o.a});var s=B("4qgm"),a=B.n(s);B.d(se,"z",function(){return a.a});var R=B("JeFH"),O=B.n(R);B.d(se,"b",function(){return O.a});var S=B("ji0R"),D=B.n(S);B.d(se,"i",function(){return D.a});var I=B("W6BS"),_=B.n(I);B.d(se,"A",function(){return _.a});var b=B("kPYp"),v=B.n(b);B.d(se,"B",function(){return v.a});var h=B("nukY"),C=B.n(h),x=B("4u4S"),g=B.n(x),P=B("yslc"),k=B.n(P),y=B("l2Kq"),A=B.n(y),F=B("RMFE"),T=B.n(F);B.d(se,"o",function(){return T.a});var Y=B("TGq3"),$=B.n(Y),le=B("SMhR"),de=B.n(le);B.d(se,"y",function(){return de.a});var Pe=B("8/bI"),Se=B.n(Pe);B.d(se,"j",function(){return Se.a});var we=B("JWDV"),Fe=B.n(we),Me=B("Xsq0"),me=B.n(Me);B.d(se,"p",function(){return me.a});var pe=B("Ohmc"),ne=B.n(pe);B.d(se,"c",function(){return ne.a});var Ee=B("csWT"),ae=B.n(Ee);B.d(se,"d",function(){return ae.a});var ke=B("7v3h"),je=B.n(ke);B.d(se,"k",function(){return je.a});var Oe=B("cRFk"),Ve=B.n(Oe);B.d(se,"u",function(){return Ve.a});var qe=B("kPWJ"),ue=B.n(qe);B.d(se,"t",function(){return ue.a});var ve=B("qgvg"),De=B.n(ve);B.d(se,"r",function(){return De.a});var Ne=B("FPkq"),it=B.n(Ne);B.d(se,"s",function(){return it.a});var pt=B("A/g1"),mt=B.n(pt);B.d(se,"f",function(){return mt.a});var dt=B("Nmxd"),Tt=B.n(dt);B.d(se,"g",function(){return Tt.a});var St=B("5D2P"),Ue=B.n(St);B.d(se,"h",function(){return Ue.a});var Ie=B("djh8"),tt=B.n(Ie),lt=B("Jq4h"),Ke=B.n(lt)},n6Qo:function(We,se,B){"use strict";B.d(se,"a",function(){return j});var Z=B("q1tI"),G=B("biw7"),U=B("fyJ8");function V(n){var w=n.className,m=n.index,f=n.children,p=n.colSpan,c=n.rowSpan,r=Z.useContext(G.a),d=r.prefixCls,u=r.fixedInfoList,o=u[m];return Z.createElement(U.a,Object.assign({className:w,index:m,component:"td",prefixCls:d,record:null,dataIndex:null,render:function(){return{children:f,props:{colSpan:p,rowSpan:c}}}},o))}function W(n){return Z.createElement("tr",Object.assign({},n))}function M(n){var w=n.children,m=Z.useContext(G.a),f=m.prefixCls;return Z.createElement("tfoot",{className:"".concat(f,"-summary")},w)}var K=se.b=M,j={Cell:V,Row:W}},nEHx:function(We,se,B){"use strict";B.d(se,"a",function(){return Z});var Z;(function(G){G.DARK="dark",G.LIGHT="light",G.HIGH_CONTRAST="hc"})(Z||(Z={}))},nKGa:function(We,se,B){We.exports=B.p+"static/export_exercise-template.f7655c19.png"},nVVt:function(We,se){We.exports={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3}},nnTU:function(We,se,B){"use strict";B.d(se,"b",function(){return K}),B.d(se,"a",function(){return j});var Z=B("MI8n"),G=B("JYp7"),U=B("pmY6"),V=B("24hK"),W=B("746U"),M=B("Cg/j");const K=Object(M.c)("commandService"),j=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Z.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(n,w){if(!n)throw new Error("invalid command");if(typeof n=="string"){if(!w)throw new Error("invalid command");return this.registerCommand({id:n,handler:w})}if(n.description){const r=[];for(let u of n.description.args)r.push(u.constraint);const d=n.handler;n.handler=function(u,...o){return Object(W.o)(o,r),d(u,...o)}}const{id:m}=n;let f=this._commands.get(m);f||(f=new V.a,this._commands.set(m,f));let p=f.unshift(n),c=Object(U.i)(()=>{p();const r=this._commands.get(m);(r==null?void 0:r.isEmpty())&&this._commands.delete(m)});return this._onDidRegisterCommand.fire(m),c}registerCommandAlias(n,w){return j.registerCommand(n,(m,...f)=>m.get(K).executeCommand(w,...f))}getCommand(n){const w=this._commands.get(n);return!w||w.isEmpty()?void 0:G.a.first(w)}getCommands(){const n=new Map;for(const w of this._commands.keys()){const m=this.getCommand(w);m&&n.set(w,m)}return n}};j.registerCommand("noop",()=>{})},nukY:function(We,se){We.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAMkklEQVR4Xu2dWWwcSRnHv7Yd577v+74vkgWEQCAEy6IVWuCB62GVICFIYkcsvMC+LW8LL7BIiTiEhCweInjgPrRCC2KBJTBVYzm24yRO4ty3kziJj9ie+tC/d9oaT2b67ume7irJsjdbVf19X/266quvjjaEEG8w8yukk7ZAii1gMHODEOK3RPRSivXUqmXcAgb07+jomDk2NvYPZn4u4/bQ6qfUAiboSEKI5cz8XyJanVJdtVoZtsAE6EXYdzPzv4hoToZtolVPoQUmgV6E/QVm/hMRNaVQX61SRi3wDOiwg5Tya0qpn2TUJlrtFFqgIujFnv27zPztFOqsVcqgBaqCzsyGlPJXzPy5DNpFq5wyC1QFHXr29fVN6+/v/zszfyBlemt1MmYBW9Bhi3w+v7hQKJwkog0Zs41WN0UWcAS96K9vI6J3mHl+inTXqmTIAq5Ahz1yudxHDcN4k5mbM2QfrWpKLOAa9CLsB4ioLSW6azUyZAFPoBdh/w4RvZYhG2lVU2ABz6AXYf8FEb2cAv21ChmxgC/Qu7q6moeHh/9KRB/JiJ20mnVuAV+gQ+fu7u4FQ0ND/yGiLXVuAy1+BizgG/Ri2HEjEZ1k5kUZsJVWsY4tEAh06N3e3v7B8fHxt4hoWh3bIRbRm5qaaHx83NOzDcMg/DCz+RNlamhoMKtXSkX5mJrUHRh0SCml/CIzn8D+mJpInYKHNDY20p49e2hoaIguX75MIyMjrrRatWoVLVu2jJ48eUJnzpxxVcZPpunTp9POnTvNot3d3TQ8POynmsSUCQ1MIcSrzPx6YjSrIMiSJUvM3jCK9PTpU3r48KHrqhcvXkxr166lQqFAp06dMn+7SRp0N1Z6Nk+orS6E+Bkzf8WfKNGX2rdvH6EnjSINDAxQb2+v66p37NhBM2bMoNu3b9PVq1ddl9OguzbVpIyhgs7MTUKIvxDR8/7EibbU1q1byfI7w3pSc3MzTZkyhbyADsABOnzsrq4uwmhgJYw406ZVn+4sXbqUFi1aZLo8fX19VdUYHR2dNEqsWbOG5sxxf0ISckydOtWsH/J5mQ88ePCArl+/HpaJQ6knVNAhkRBiLjP/m4jedfBSntatW2eC5wV0QAc3CkBcuHBhkoWslyCo2S5dukT37t2bqGbTpk00b968oNW6Ko/n4vlJSqGDDuXy+fza4tbeZUlSNgpZvIKOSMvu3btNF+rs2bP0+PHjmoA+e/Zsc+RxmzBSwU1CunbtGmGEcJswAgwODrrNXpN8kYBehP29SincFTOjJprE9BCvoK9evZrgfgBwgG4lRDkA4/37923dhJUrV5qjAUA6d+5cVa0REvTibpRXpKMuHoDK5XKfMQzj17gNzEOxSLMi2oFGBCj9/f2Bn+UFdPSSu3btMiM/PT09pp9tpS1btpg+NEC/ePFiVbn0ZNRfk0XWo1viSCm/oZT6gT/xwi+1ceNGmj9/vum/huFHegHdylv+bPTkmCijF8bk1M5NCAo63Be87E4JLhZGDqQ7d+64WtiCXl5cHCcZwvz/kYMOYXO53DEiag1TcL91xQU6IilYgLFgHhsbM1VA775t2zaaOXMm3bp1y/SH7VJQ0MOa7FaSsdKcw287hV2uJqAzc6OU8nfM/KmwFfBaXxygoxcFzAjXwWXCD/4G/HBnADu2AnR2dpohQfw33KtKCf79woULzZXKauFF9KrVthaUgo4Frmp+PCbLVjjy0aNHtgtaGCGRMg86jNDV1TVreHj4bSLa5xXOMPPHBfrevXtt1cA2gLt375p58BIgMuM3YVTA6FAplYLe0dFB1shSntftZBTrEvv379eglxown8+vKBQKuMj03bhVDMkCHT1ntUb2IhZ6a/R+TnF0PBe9J0Jv2NeC3wsWLJiIoGByaiUNupcWcJe3Jq5LGex7C4XCP4lotjsRw81lgR5ureQIeqUec/v27aabgs1Z5XHnICu4drsNdY8edsvb1CelfEkp9fsaPnLiURboiGNbrkIYcmB0KF/8sasXkGMC6nWvS1BZNehBLeihvJTy+0qpb3ooElrWsH10P4JhQomFI7gwp0+frul+71LQ8aJX6/0RXsSkFwnrDXb75qEPkp6MltAgpXxZKYXD1bGkuEFHL46YOVwWgIF95aUJ/jn8d4AGWb0mLDjZjVQ6vOjVoj7ySymfU0rhQwOxnUaKE3RMXOGyIKRoRUbwN8J41g8gx8QU/46DGV6TUyweMlg9cKW6EfLE5i+EKCEDkvU3wpF2B0TwgpXuxPQqe5T5azYZ7ejoWDI6Oiri/nRMXKADGjwbPTr8eUADuK2tsFYj49/Pnz8/CfQbN244Roiw2one2gl0O5gwiuBFxG/E6LHjEQn77NevX2/G0vESej3+FyXAbuuuCehCCGybe4uZP+xWsKjyRQ06lvkBK8KNpYsxGzZsMMOJ5Qk+MtwX5Ec5q0cs7dGxkOTUU1rbcP2CDlcK+22wHQFbIxAFKj1Kh7g6dMCEG5vJgmwYi6pt7eqtFeg/YubDcShY/swoQUc8HaeYkDDJLN20hYkdXgIAi3/HyiZ+A5xKE8Jago5QJiCGy2KNKJUWjHD0DyMHZMao4/b4XxLaPXLQpZRfVUr9NAnKQoYoQS9d6ClfdbRO77s9UV8r0OGmbN682XSpADDcFMhYbWUULgxeWvjqyOs00iSl3SMFHVdhFAoFfEggMTfwRgn63LlzTWgwrEspfbWxdXgbk0ZrMhqV6zJr1izT98YLCvcJLon1ItptAbBsCF/9ypUr5tbipKfIQC8u96O1E3XKKErQcQ0FdhfCLcEVEW4TelW8JHAdMEHFSincgqhAh4sFOXEEEC9WJVfEDnSUwXFAa7sv3B3s1QljS4Vbm3nNFwnovb29UwcGBt5m5vd7FSjq/NbQiyEXPWWYCfFxTOawwGJ3cBm9NVwFREkANv4uvYYDL0kUoOMZmBDjlJIVOqw2eXWzqQsvCoCHj4/e/ebNm+be9SROVCMBXQjxc2b+cpgQhVXX8uXLzYZGQiMDyqCHBQCFtUEL9QLy0tNL6EFxiAFA46fS2U1MTHFYGr0jRoRSHx2ugdPEzwpVVgIXgANKjDhWOBNgIrpS7S4aN6BDV7ysGCWtemFLAI9DGEkCPnTQhRBfZ+YfhgVm2PWgQRA2C7Jpyk4mDN84JVQKJsAu36aLfPCL4TYAtvKXLcwFoxUrVhB+kAAfXhwsWNm5Gm5BR52wJerHQpQ1MiH2j5+kpFBBx+dfiAjXSSf6q9PwhzHkli/WBGkUAARocRlRpevbcPDCOnQBwJ1GkVLQnfaaQG7499CnUo8OEPFyA2zI5+aEvhfQLbuhDEKQSNjekMoeHVdcKKVEPd2sC5cCvW3Qa+qsfeZhNmzY4UXo6WWy6Ad0C3jY1cnVCtKp+CkbSo8uhJhRvLToPX6E0GUqW8Dy5d0ACrjQcwMwt7F6O7sHuakrie0ZCui5XO4EEX0piQpqmbQFYIHAoOdyuW8R0fe0ObUFkmyBQKBLKT/JzH9O0gVFSTa2li0+C/gGXUq5iZn/p78mHV/j6Se7t4Av0ItXV5zMyo257s2pcybVAp5Bx+dbpJS4T/GzSVVKy6UtUG4Bz6BLKV9TSuHr0TppC9SNBTyBXrwd9zf6o1x1075a0KIFXIMupdyulMItW7FcPKRbTFsgiAVcgd7e3j6vUCggwrI5yMN0WW2BuCzgCDpi5EKIPxLRi3EJqZ+rLRDUAo6gCyFeZ+ZXgz5Il9cWiNMCtqBLKb+glPplnALqZ2sLhGGBqqDn8/m9Sql30v6xrTCMqOtIvgUqgt7T07NwcHAQe8vXJV8FLaG2gLMFngEdX3+WUr7JzB9zLq5zaAvUhwWeAV0I8QYzv1If4msptQXcWWAS6Llc7gARtbkrqnNpC9SPBSZAb29vf9/4+Dg+phXblc71YzYtab1ZwAS9s7Nz6cjICK50ju0jWvVmOC1vfVnAKF7pjPsRP1RfomtptQXcWwB7y3+slDrkvojOqS1QfxZw3AJQfyppibNkgWPHjrGDvsowjMMa9CxRkUJdHUAfNwzjQGtr6wkNegobP0sq2YD+1DCMz7e2tv4B9tCgZ4mKFOpaBfTBxsbGTx85cuRvlsoa9BQ2fpZUqgD6w4aGhhdbWlpwS8VE0qBniYoU6loKumEYdxobG184fPhwR7mqGvQUNn6WVCoB/VpDQ8PzLS0tZyvpr0HPEhUp1LUI+gUi+vjRo0cvV1NRg57Cxs+SSsePH+9qamr6xKFDh27a6a1BzxIVKdS1ra1t4cGDB/udVPs/YIoD4AHLutsAAAAASUVORK5CYII="},o5mm:function(We,se,B){We.exports={flex_box_center:"flex_box_center___yMfGk",flex_space_between:"flex_space_between___3T4Rr",flex_box_vertical_center:"flex_box_vertical_center___2K9ch",flex_box_center_end:"flex_box_center_end___1GgKp",flex_box_column:"flex_box_column___2DSuN",shixunWrp:"shixunWrp___2_2ep"}},onxn:function(We,se){We.exports="data:image/png;base64,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"},osHv:function(We,se,B){(function(Z){Z(B("VrN/"))})(function(Z){"use strict";var G=Z.Pos;function U(u,o){return u.line-o.line||u.ch-o.ch}var V="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",W=V+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",M=new RegExp("<(/?)(["+V+"]["+W+"]*)","g");function K(u,o,s,a){this.line=o,this.ch=s,this.cm=u,this.text=u.getLine(o),this.min=a?Math.max(a.from,u.firstLine()):u.firstLine(),this.max=a?Math.min(a.to-1,u.lastLine()):u.lastLine()}function j(u,o){var s=u.cm.getTokenTypeAt(G(u.line,o));return s&&/\btag\b/.test(s)}function n(u){return u.line>=u.max?void 0:(u.ch=0,u.text=u.cm.getLine(++u.line),!0)}function w(u){return u.line<=u.min?void 0:(u.text=u.cm.getLine(--u.line),u.ch=u.text.length,!0)}function m(u){for(;;){var o=u.text.indexOf(">",u.ch);if(o==-1){if(n(u))continue;return}if(!j(u,o+1)){u.ch=o+1;continue}var s=u.text.lastIndexOf("/",o),a=s>-1&&!/\S/.test(u.text.slice(s+1,o));return u.ch=o+1,a?"selfClose":"regular"}}function f(u){for(;;){var o=u.ch?u.text.lastIndexOf("<",u.ch-1):-1;if(o==-1){if(w(u))continue;return}if(!j(u,o+1)){u.ch=o;continue}M.lastIndex=o,u.ch=o;var s=M.exec(u.text);if(s&&s.index==o)return s}}function p(u){for(;;){M.lastIndex=u.ch;var o=M.exec(u.text);if(!o){if(n(u))continue;return}if(!j(u,o.index+1)){u.ch=o.index+1;continue}return u.ch=o.index+o[0].length,o}}function c(u){for(;;){var o=u.ch?u.text.lastIndexOf(">",u.ch-1):-1;if(o==-1){if(w(u))continue;return}if(!j(u,o+1)){u.ch=o;continue}var s=u.text.lastIndexOf("/",o),a=s>-1&&!/\S/.test(u.text.slice(s+1,o));return u.ch=o+1,a?"selfClose":"regular"}}function r(u,o){for(var s=[];;){var a=p(u),R,O=u.line,S=u.ch-(a?a[0].length:0);if(!a||!(R=m(u)))return;if(R=="selfClose")continue;if(a[1]){for(var D=s.length-1;D>=0;--D)if(s[D]==a[2]){s.length=D;break}if(D<0&&(!o||o==a[2]))return{tag:a[2],from:G(O,S),to:G(u.line,u.ch)}}else s.push(a[2])}}function d(u,o){for(var s=[];;){var a=c(u);if(!a)return;if(a=="selfClose"){f(u);continue}var R=u.line,O=u.ch,S=f(u);if(!S)return;if(S[1])s.push(S[2]);else{for(var D=s.length-1;D>=0;--D)if(s[D]==S[2]){s.length=D;break}if(D<0&&(!o||o==S[2]))return{tag:S[2],from:G(u.line,u.ch),to:G(R,O)}}}}Z.registerHelper("fold","xml",function(u,o){for(var s=new K(u,o.line,0);;){var a=p(s);if(!a||s.line!=o.line)return;var R=m(s);if(!R)return;if(!a[1]&&R!="selfClose"){var O=G(s.line,s.ch),S=r(s,a[2]);return S&&U(S.from,O)>0?{from:O,to:S.from}:null}}}),Z.findMatchingTag=function(u,o,s){var a=new K(u,o.line,o.ch,s);if(a.text.indexOf(">")==-1&&a.text.indexOf("<")==-1)return;var R=m(a),O=R&&G(a.line,a.ch),S=R&&f(a);if(!R||!S||U(a,o)>0)return;var D={from:G(a.line,a.ch),to:O,tag:S[2]};return R=="selfClose"?{open:D,close:null,at:"open"}:S[1]?{open:d(a,S[2]),close:D,at:"close"}:(a=new K(u,O.line,O.ch,s),{open:D,close:r(a,S[2]),at:"open"})},Z.findEnclosingTag=function(u,o,s,a){for(var R=new K(u,o.line,o.ch,s);;){var O=d(R,a);if(!O)break;var S=new K(u,o.line,o.ch,s),D=r(S,O.tag);if(D)return{open:O,close:D}}},Z.scanForClosingTag=function(u,o,s,a){var R=new K(u,o.line,o.ch,a?{from:0,to:a}:null);return r(R,s)}})},p5ED:function(We,se,B){"use strict";var Z=B("+L6B"),G=B("2/Rp"),U=B("5Dmo"),V=B("3S7+"),W=B("k1fw"),M=B("tJVT"),K=B("q1tI"),j=B.n(K),n=B("vHTk"),w=B.n(n),m=B("yEEn"),f=B("ZW9T"),p=B("1vsH");se.a=function(c){var r=c.name,d=c.data,u=c.theme,o=c.type,s=c.filename,a=c.monacoEditor,R=c.className,O=c.style,S=c.close,D=c.onClose,I=c.hasMask,_=Object(K.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),b=Object(M.a)(_,2),v=b[0],h=b[1],C=Object(K.useState)(""),x=Object(M.a)(C,2),g=x[0],P=x[1],k,y=1024*1024,A=10*y,F=Object(K.useRef)();o==="office"&&(k=Object(p.T)(d).filesize,k>A&&(o="other")),s&&(a.filename=s),Object(K.useEffect)(function(){var $,le,de=($=document.cookie)===null||$===void 0||((le=$.replace(/\s/g,""))===null||le===void 0)?void 0:le.split(";");de==null||de.map(function(Pe){var Se=Pe.split("=");Se[0]==="_educoder_session"&&P(Se[1])})},[]);var T=function(){if(d.startsWith("http")||d.startsWith("/")){Y();return}Object(p.z)(s||"educoder",d,s)},Y=function(){Object(p.x)(s||r,d)};return console.log("data:",d,"fileanme:",s," name:",r),j.a.createElement("div",{style:Object(W.a)({},O||{}),className:"".concat(I&&w.a.bgBlack," ").concat(o?w.a.wrp:"hide")},S&&j.a.createElement("div",{className:w.a.close,ref:F},j.a.createElement(V.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return F.current}},j.a.createElement("span",{onClick:Y},j.a.createElement("i",{className:"icon-quxiaozhiding"}))),j.a.createElement(V.a,{title:"\u5173\u95ED",getPopupContainer:function(){return F.current}},j.a.createElement("span",{className:"",onClick:D},j.a.createElement("i",{className:"icon-guanbi1"})))),j.a.createElement("div",{className:"".concat(w.a[R]," ").concat(R," ").concat(w.a.monaco," ").concat(o==="txt"?"show":"hide")},o==="txt"&&j.a.createElement(f.b,a)),o==="audio"&&j.a.createElement("audio",{src:"".concat(d!=null&&d.startsWith("/")||(d==null?void 0:d.indexOf("https://"))>-1?d:"data:audio/mp3;base64,").concat(d),autoPlay:!0}),o==="video"&&j.a.createElement(j.a.Fragment,null,d!=null&&d.startsWith("/")?j.a.createElement("video",{controls:!0,src:"".concat(d),autoPlay:!0}):j.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(d),autoPlay:!0})),o==="html"&&j.a.createElement("iframe",{src:d+"&disposition=inline"}),o==="pdf"&&j.a.createElement("embed",{className:w.a.embed,src:d}),o==="image"&&j.a.createElement(j.a.Fragment,null,j.a.createElement("img",{src:"".concat(d!=null&&d.startsWith("/")||(d==null?void 0:d.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(d)})),o==="other"&&j.a.createElement("div",null,j.a.createElement(G.a,{type:"primary",size:"large",onClick:T},j.a.createElement(m.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(o==="download"||o==="office")&&j.a.createElement(G.a,{type:"primary",size:"large",onClick:T},j.a.createElement(m.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(We,se,B){},pmY6:function(We,se,B){"use strict";B.d(se,"h",function(){return w}),B.d(se,"g",function(){return f}),B.d(se,"f",function(){return p}),B.d(se,"e",function(){return c}),B.d(se,"i",function(){return r}),B.d(se,"b",function(){return d}),B.d(se,"a",function(){return u}),B.d(se,"d",function(){return o}),B.d(se,"c",function(){return s});var Z=B("C/vA"),G=B("JYp7");const U=!1;let V=null;function W(a){V=a}if(U){const a="__is_disposable_tracked__";W(new class{trackDisposable(R){const O=new Error("Potentially leaked disposable").stack;setTimeout(()=>{R[a]||console.log(O)},3e3)}setParent(R,O){if(R&&R!==u.None)try{R[a]=!0}catch(S){}}markAsDisposed(R){if(R&&R!==u.None)try{R[a]=!0}catch(O){}}markAsSingleton(R){}})}function M(a){return V==null||V.trackDisposable(a),a}function K(a){V==null||V.markAsDisposed(a)}function j(a,R){V==null||V.setParent(a,R)}function n(a,R){if(!V)return;for(const O of a)V.setParent(O,R)}function w(a){return V==null||V.markAsSingleton(a),a}class m extends Error{constructor(a){super(`Encountered errors while disposing of store. Errors: [${a.join(", ")}]`);this.errors=a}}function f(a){return typeof a.dispose=="function"&&a.dispose.length===0}function p(a){if(G.a.is(a)){let R=[];for(const O of a)if(O)try{O.dispose()}catch(S){R.push(S)}if(R.length===1)throw R[0];if(R.length>1)throw new m(R);return Array.isArray(a)?[]:a}else if(a)return a.dispose(),a}function c(...a){const R=r(()=>p(a));return n(a,R),R}function r(a){const R=M({dispose:Object(Z.a)(()=>{K(R),a()})});return R}class d{constructor(){this._toDispose=new Set,this._isDisposed=!1,M(this)}dispose(){if(this._isDisposed)return;K(this),this._isDisposed=!0,this.clear()}clear(){try{p(this._toDispose.values())}finally{this._toDispose.clear()}}add(a){if(!a)return a;if(a===this)throw new Error("Cannot register a disposable on itself!");return j(a,this),this._isDisposed?d.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(a),a}}d.DISABLE_DISPOSED_WARNING=!1;class u{constructor(){this._store=new d,M(this),j(this._store,this)}dispose(){K(this),this._store.dispose()}_register(a){if(a===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(a)}}u.None=Object.freeze({dispose(){}});class o{constructor(){this._isDisposed=!1,M(this)}get value(){return this._isDisposed?void 0:this._value}set value(a){var R;if(this._isDisposed||a===this._value)return;(R=this._value)===null||R===void 0||R.dispose(),a&&j(a,this),this._value=a}clear(){this.value=void 0}dispose(){var a;this._isDisposed=!0,K(this),(a=this._value)===null||a===void 0||a.dispose(),this._value=void 0}clearAndLeak(){const a=this._value;return this._value=void 0,a&&j(a,null),a}}class s{constructor(a){this.object=a}dispose(){}}},psGv:function(We,se,B){var Z,G;(function(){var U;(function(){"use strict";var K=[,,function(m){function f(r){this.__parent=r,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=[]}f.prototype.clone_empty=function(){var r=new f(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},f.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},f.prototype.has_match=function(r){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(r))return!0;return!1},f.prototype.set_indent=function(r,d){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},f.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)},f.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},f.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},f.prototype.is_empty=function(){return this.__items.length===0},f.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},f.prototype.push=function(r){this.__items.push(r);var d=r.lastIndexOf(`
`);d!==-1?this.__character_count=r.length-d:this.__character_count+=r.length},f.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},f.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},f.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},f.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},f.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function p(r,d){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),d=d||"",r.indent_level>0&&(d=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}p.prototype.get_indent_size=function(r,d){var u=this.__base_string_length;return d=d||0,r<0&&(u=0),u+=r*this.__indent_size,u+=d,u},p.prototype.get_indent_string=function(r,d){var u=this.__base_string;return d=d||0,r<0&&(r=0,u=""),d+=r*this.__indent_size,this.__ensure_cache(d),u+=this.__cache[d],u},p.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},p.prototype.__add_column=function(){var r=this.__cache.length,d=0,u="";this.__indent_size&&r>=this.__indent_size&&(d=Math.floor(r/this.__indent_size),r-=d*this.__indent_size,u=new Array(d+1).join(this.__indent_string)),r&&(u+=new Array(r+1).join(" ")),this.__cache.push(u)};function c(r,d){this.__indent_cache=new p(r,d),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new f(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(r,d){return this.__indent_cache.get_indent_string(r,d)},c.prototype.get_indent_size=function(r,d){return this.__indent_cache.get_indent_size(r,d)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(r){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===`
`&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var u=this.__lines.join(`
`);return r!==`
`&&(u=u.replace(/[\n]/g,r)),u},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(r,d){return r=r||0,d=d||0,this.next_line.set_indent(r,d),this.__lines.length>1?(this.current_line.set_indent(r,d),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(r){for(var d=0;d<r.newlines;d++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(r.whitespace_before),this.current_line.push(r.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(r){this.__add_space_before_token(),this.current_line.push(r),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},c.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(" "))},c.prototype.remove_indent=function(r){for(var d=this.__lines.length;r<d;)this.__lines[r]._remove_indent(),r++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(r){for(r=r===void 0?!1:r,this.current_line.trim();r&&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},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(r,d){for(var u=this.__lines.length-2;u>=0;){var o=this.__lines[u];if(o.is_empty())break;if(o.item(0).indexOf(r)!==0&&o.item(-1)!==d){this.__lines.splice(u+1,0,new f(this)),this.previous_line=this.__lines[this.__lines.length-2];break}u--}},m.exports.Output=c},function(m){function f(p,c,r,d){this.type=p,this.text=c,this.comments_before=null,this.newlines=r||0,this.whitespace_before=d||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}m.exports.Token=f},,,function(m){function f(r,d){this.raw_options=p(r,d),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"])}f.prototype._get_array=function(r,d){var u=this.raw_options[r],o=d||[];return typeof u=="object"?u!==null&&typeof u.concat=="function"&&(o=u.concat()):typeof u=="string"&&(o=u.split(/[^a-zA-Z0-9_\/\-]+/)),o},f.prototype._get_boolean=function(r,d){var u=this.raw_options[r],o=u===void 0?!!d:!!u;return o},f.prototype._get_characters=function(r,d){var u=this.raw_options[r],o=d||"";return typeof u=="string"&&(o=u.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),o},f.prototype._get_number=function(r,d){var u=this.raw_options[r];d=parseInt(d,10),isNaN(d)&&(d=0);var o=parseInt(u,10);return isNaN(o)&&(o=d),o},f.prototype._get_selection=function(r,d,u){var o=this._get_selection_list(r,d,u);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
`+d+`
You passed in: '`+this.raw_options[r]+"'");return o[0]},f.prototype._get_selection_list=function(r,d,u){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(u=u||[d[0]],!this._is_valid_selection(u,d))throw new Error("Invalid Default Value!");var o=this._get_array(r,u);if(!this._is_valid_selection(o,d))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
`+d+`
You passed in: '`+this.raw_options[r]+"'");return o},f.prototype._is_valid_selection=function(r,d){return r.length&&d.length&&!r.some(function(u){return d.indexOf(u)===-1})};function p(r,d){var u={};r=c(r);var o;for(o in r)o!==d&&(u[o]=r[o]);if(d&&r[d])for(o in r[d])u[o]=r[d][o];return u}function c(r){var d={},u;for(u in r){var o=u.replace(/-/g,"_");d[o]=r[u]}return d}m.exports.Options=f,m.exports.normalizeOpts=c,m.exports.mergeOpts=p},,function(m){var f=RegExp.prototype.hasOwnProperty("sticky");function p(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}p.prototype.restart=function(){this.__position=0},p.prototype.back=function(){this.__position>0&&(this.__position-=1)},p.prototype.hasNext=function(){return this.__position<this.__input_length},p.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},p.prototype.peek=function(c){var r=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(r=this.__input.charAt(c)),r},p.prototype.__match=function(c,r){c.lastIndex=r;var d=c.exec(this.__input);return d&&!(f&&c.sticky)&&(d.index!==r&&(d=null)),d},p.prototype.test=function(c,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(c,r):!1},p.prototype.testChar=function(c,r){var d=this.peek(r);return c.lastIndex=0,d!==null&&c.test(d)},p.prototype.match=function(c){var r=this.__match(c,this.__position);return r?this.__position+=r[0].length:r=null,r},p.prototype.read=function(c,r,d){var u="",o;return c&&(o=this.match(c),o&&(u+=o[0])),r&&(o||!c)&&(u+=this.readUntil(r,d)),u},p.prototype.readUntil=function(c,r){var d="",u=this.__position;c.lastIndex=this.__position;var o=c.exec(this.__input);return o?(u=o.index,r&&(u+=o[0].length)):u=this.__input_length,d=this.__input.substring(this.__position,u),this.__position=u,d},p.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},p.prototype.get_regexp=function(c,r){var d=null,u="g";return r&&f&&(u="y"),typeof c=="string"&&c!==""?d=new RegExp(c,u):c&&(d=new RegExp(c.source,u)),d},p.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},p.prototype.peekUntilAfter=function(c){var r=this.__position,d=this.readUntilAfter(c);return this.__position=r,d},p.prototype.lookBack=function(c){var r=this.__position-1;return r>=c.length&&this.__input.substring(r-c.length,r).toLowerCase()===c},m.exports.InputScanner=p},function(m,f,p){var c=p(8).InputScanner,r=p(3).Token,d=p(10).TokenStream,u=p(11).WhitespacePattern,o={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(a,R){this._input=new c(a),this._options=R||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new u(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var a,R=new r(o.START,""),O=null,S=[],D=new d;R.type!==o.EOF;){for(a=this._get_next_token(R,O);this._is_comment(a);)D.add(a),a=this._get_next_token(R,O);D.isEmpty()||(a.comments_before=D,D=new d),a.parent=O,this._is_opening(a)?(S.push(O),O=a):O&&this._is_closing(a,O)&&(a.opened=O,O.closed=a,O=S.pop(),a.parent=O),a.previous=R,R.next=a,this.__tokens.add(a),R=a}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(a,R){this._readWhitespace();var O=this._input.read(/.+/g);return O?this._create_token(o.RAW,O):this._create_token(o.EOF,"")},s.prototype._is_comment=function(a){return!1},s.prototype._is_opening=function(a){return!1},s.prototype._is_closing=function(a,R){return!1},s.prototype._create_token=function(a,R){var O=new r(a,R,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return O},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},m.exports.Tokenizer=s,m.exports.TOKEN=o},function(m){function f(p){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=p}f.prototype.restart=function(){this.__position=0},f.prototype.isEmpty=function(){return this.__tokens_length===0},f.prototype.hasNext=function(){return this.__position<this.__tokens_length},f.prototype.next=function(){var p=null;return this.hasNext()&&(p=this.__tokens[this.__position],this.__position+=1),p},f.prototype.peek=function(p){var c=null;return p=p||0,p+=this.__position,p>=0&&p<this.__tokens_length&&(c=this.__tokens[p]),c},f.prototype.add=function(p){this.__parent_token&&(p.parent=this.__parent_token),this.__tokens.push(p),this.__tokens_length+=1},m.exports.TokenStream=f},function(m,f,p){var c=p(12).Pattern;function r(d,u){c.call(this,d,u),u?this._line_regexp=this._input.get_regexp(u._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}r.prototype=new c,r.prototype.__set_whitespace_patterns=function(d,u){d+="\\t ",u+="\\n\\r",this._match_pattern=this._input.get_regexp("["+d+u+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+u+"]")},r.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var d=this._input.read(this._match_pattern);if(d===" ")this.whitespace_before_token=" ";else if(d){var u=this.__split(this._newline_regexp,d);this.newline_count=u.length-1,this.whitespace_before_token=u[this.newline_count]}return d},r.prototype.matching=function(d,u){var o=this._create();return o.__set_whitespace_patterns(d,u),o._update(),o},r.prototype._create=function(){return new r(this._input,this)},r.prototype.__split=function(d,u){d.lastIndex=0;for(var o=0,s=[],a=d.exec(u);a;)s.push(u.substring(o,a.index)),o=a.index+a[0].length,a=d.exec(u);return o<u.length?s.push(u.substring(o,u.length)):s.push(""),s},m.exports.WhitespacePattern=r},function(m){function f(p,c){this._input=p,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,c&&(this._starting_pattern=this._input.get_regexp(c._starting_pattern,!0),this._match_pattern=this._input.get_regexp(c._match_pattern,!0),this._until_pattern=this._input.get_regexp(c._until_pattern),this._until_after=c._until_after)}f.prototype.read=function(){var p=this._input.read(this._starting_pattern);return(!this._starting_pattern||p)&&(p+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),p},f.prototype.read_match=function(){return this._input.match(this._match_pattern)},f.prototype.until_after=function(p){var c=this._create();return c._until_after=!0,c._until_pattern=this._input.get_regexp(p),c._update(),c},f.prototype.until=function(p){var c=this._create();return c._until_after=!1,c._until_pattern=this._input.get_regexp(p),c._update(),c},f.prototype.starting_with=function(p){var c=this._create();return c._starting_pattern=this._input.get_regexp(p,!0),c._update(),c},f.prototype.matching=function(p){var c=this._create();return c._match_pattern=this._input.get_regexp(p,!0),c._update(),c},f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){},m.exports.Pattern=f},function(m){function f(p,c){p=typeof p=="string"?p:p.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(p+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(p+/\sbeautify\signore:end\s/.source+c,"g")}f.prototype.get_directives=function(p){if(!p.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(p);r;)c[r[1]]=r[2],r=this.__directive_pattern.exec(p);return c},f.prototype.readIgnored=function(p){return p.readUntilAfter(this.__directives_end_ignore_pattern)},m.exports.Directives=f},function(m,f,p){var c=p(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function d(u,o){c.call(this,u,o),this.__template_pattern=null,this._disabled=Object.assign({},r),this._excluded=Object.assign({},r),o&&(this.__template_pattern=this._input.get_regexp(o.__template_pattern),this._excluded=Object.assign(this._excluded,o._excluded),this._disabled=Object.assign(this._disabled,o._disabled));var s=new c(u);this.__patterns={handlebars_comment:s.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:s.starting_with(/{{{/).until_after(/}}}/),handlebars:s.starting_with(/{{/).until_after(/}}/),php:s.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}d.prototype=new c,d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){this.__set_templated_pattern()},d.prototype.disable=function(u){var o=this._create();return o._disabled[u]=!0,o._update(),o},d.prototype.read_options=function(u){var o=this._create();for(var s in r)o._disabled[s]=u.templating.indexOf(s)===-1;return o._update(),o},d.prototype.exclude=function(u){var o=this._create();return o._excluded[u]=!0,o._update(),o},d.prototype.read=function(){var u="";this._match_pattern?u=this._input.read(this._starting_pattern):u=this._input.read(this._starting_pattern,this.__template_pattern);for(var o=this._read_template();o;)this._match_pattern?o+=this._input.read(this._match_pattern):o+=this._input.readUntil(this.__template_pattern),u+=o,o=this._read_template();return this._until_after&&(u+=this._input.readUntilAfter(this._until_pattern)),u},d.prototype.__set_templated_pattern=function(){var u=[];this._disabled.php||u.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||u.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||u.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(u.push(this.__patterns.django._starting_pattern.source),u.push(this.__patterns.django_value._starting_pattern.source),u.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||u.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&u.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+u.join("|")+")")},d.prototype._read_template=function(){var u="",o=this._input.peek();if(o==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(u=u||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(u=u||this.__patterns.erb.read())}else o==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(u=u||this.__patterns.handlebars_comment.read(),u=u||this.__patterns.handlebars_unescaped.read(),u=u||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(u=u||this.__patterns.django_value.read()),this._excluded.django||(u=u||this.__patterns.django_comment.read(),u=u||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(u=u||this.__patterns.smarty_comment.read(),u=u||this.__patterns.smarty_literal.read(),u=u||this.__patterns.smarty.read()));return u},m.exports.TemplatablePattern=d},,,,function(m,f,p){var c=p(19).Beautifier,r=p(20).Options;function d(u,o,s,a){var R=new c(u,o,s,a);return R.beautify()}m.exports=d,m.exports.defaultOptions=function(){return new r}},function(m,f,p){var c=p(20).Options,r=p(2).Output,d=p(21).Tokenizer,u=p(21).TOKEN,o=/\r\n|[\r\n]/,s=/\r\n|[\r\n]/g,a=function(C,x){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=C.max_preserve_newlines,this.preserve_newlines=C.preserve_newlines,this._output=new r(C,x)};a.prototype.current_line_has_match=function(C){return this._output.current_line.has_match(C)},a.prototype.set_space_before_token=function(C,x){this._output.space_before_token=C,this._output.non_breaking_space=x},a.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},a.prototype.add_raw_token=function(C){this._output.add_raw_token(C)},a.prototype.print_preserved_newlines=function(C){var x=0;C.type!==u.TEXT&&C.previous.type!==u.TEXT&&(x=C.newlines?1:0),this.preserve_newlines&&(x=C.newlines<this.max_preserve_newlines+1?C.newlines:this.max_preserve_newlines+1);for(var g=0;g<x;g++)this.print_newline(g>0);return x!==0},a.prototype.traverse_whitespace=function(C){return C.whitespace_before||C.newlines?(this.print_preserved_newlines(C)||(this._output.space_before_token=!0),!0):!1},a.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},a.prototype.print_newline=function(C){this._output.add_new_line(C)},a.prototype.print_token=function(C){C.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(C.text))},a.prototype.indent=function(){this.indent_level++},a.prototype.get_full_indent=function(C){return C=this.indent_level+(C||0),C<1?"":this._output.get_indent_string(C)};var R=function(C){for(var x=null,g=C.next;g.type!==u.EOF&&C.closed!==g;){if(g.type===u.ATTRIBUTE&&g.text==="type"){g.next&&g.next.type===u.EQUALS&&g.next.next&&g.next.next.type===u.VALUE&&(x=g.next.next.text);break}g=g.next}return x},O=function(C,x){var g=null,P=null;return x.closed?(C==="script"?g="text/javascript":C==="style"&&(g="text/css"),g=R(x)||g,g.search("text/css")>-1?P="css":g.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?P="javascript":g.search(/(text|application|dojo)\/(x-)?(html)/)>-1?P="html":g.search(/test\/null/)>-1&&(P="null"),P):null};function S(C,x){return x.indexOf(C)!==-1}function D(C,x,g){this.parent=C||null,this.tag=x?x.tag_name:"",this.indent_level=g||0,this.parser_token=x||null}function I(C){this._printer=C,this._current_frame=null}I.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},I.prototype.record_tag=function(C){var x=new D(this._current_frame,C,this._printer.indent_level);this._current_frame=x},I.prototype._try_pop_frame=function(C){var x=null;return C&&(x=C.parser_token,this._printer.indent_level=C.indent_level,this._current_frame=C.parent),x},I.prototype._get_frame=function(C,x){for(var g=this._current_frame;g&&!(C.indexOf(g.tag)!==-1);){if(x&&x.indexOf(g.tag)!==-1){g=null;break}g=g.parent}return g},I.prototype.try_pop=function(C,x){var g=this._get_frame([C],x);return this._try_pop_frame(g)},I.prototype.indent_to_tag=function(C){var x=this._get_frame(C);x&&(this._printer.indent_level=x.indent_level)};function _(C,x,g,P){this._source_text=C||"",x=x||{},this._js_beautify=g,this._css_beautify=P,this._tag_stack=null;var k=new c(x,"html");this._options=k,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 C=this._source_text,x=this._options.eol;this._options.eol==="auto"&&(x=`
`,C&&o.test(C)&&(x=C.match(o)[0])),C=C.replace(s,`
`);var g=C.match(/^[\t ]*/)[0],P={text:"",type:""},k=new b,y=new a(this._options,g),A=new d(C,this._options).tokenize();this._tag_stack=new I(y);for(var F=null,T=A.next();T.type!==u.EOF;)T.type===u.TAG_OPEN||T.type===u.COMMENT?(F=this._handle_tag_open(y,T,k,P),k=F):T.type===u.ATTRIBUTE||T.type===u.EQUALS||T.type===u.VALUE||T.type===u.TEXT&&!k.tag_complete?F=this._handle_inside_tag(y,T,k,A):T.type===u.TAG_CLOSE?F=this._handle_tag_close(y,T,k):T.type===u.TEXT?F=this._handle_text(y,T,k):y.add_raw_token(T),P=F,T=A.next();var Y=y._output.get_code(x);return Y},_.prototype._handle_tag_close=function(C,x,g){var P={text:x.text,type:x.type};return C.alignment_size=0,g.tag_complete=!0,C.set_space_before_token(x.newlines||x.whitespace_before!=="",!0),g.is_unformatted?C.add_raw_token(x):(g.tag_start_char==="<"&&(C.set_space_before_token(x.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&g.has_wrapped_attrs&&C.print_newline(!1)),C.print_token(x)),g.indent_content&&!(g.is_unformatted||g.is_content_unformatted)&&(C.indent(),g.indent_content=!1),!g.is_inline_element&&!(g.is_unformatted||g.is_content_unformatted)&&C.set_wrap_point(),P},_.prototype._handle_inside_tag=function(C,x,g,P){var k=g.has_wrapped_attrs,y={text:x.text,type:x.type};if(C.set_space_before_token(x.newlines||x.whitespace_before!=="",!0),g.is_unformatted)C.add_raw_token(x);else if(g.tag_start_char==="{"&&x.type===u.TEXT)C.print_preserved_newlines(x)?(x.newlines=0,C.add_raw_token(x)):C.print_token(x);else{if(x.type===u.ATTRIBUTE?(C.set_space_before_token(!0),g.attr_count+=1):(x.type===u.EQUALS||x.type===u.VALUE&&x.previous.type===u.EQUALS)&&C.set_space_before_token(!1),x.type===u.ATTRIBUTE&&g.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(C.traverse_whitespace(x),k=k||x.newlines!==0),this._is_wrap_attributes_force)){var A=g.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&g.attr_count===1){var F=!0,T=0,Y;do{if(Y=P.peek(T),Y.type===u.ATTRIBUTE){F=!1;break}T+=1}while(T<4&&Y.type!==u.EOF&&Y.type!==u.TAG_CLOSE);A=!F}A&&(C.print_newline(!1),k=!0)}C.print_token(x),k=k||C.previous_token_wrapped(),g.has_wrapped_attrs=k}return y},_.prototype._handle_text=function(C,x,g){var P={text:x.text,type:"TK_CONTENT"};return g.custom_beautifier_name?this._print_custom_beatifier_text(C,x,g):g.is_unformatted||g.is_content_unformatted?C.add_raw_token(x):(C.traverse_whitespace(x),C.print_token(x)),P},_.prototype._print_custom_beatifier_text=function(C,x,g){var P=this;if(x.text!==""){var k=x.text,y,A=1,F="",T="";g.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?y=this._js_beautify:g.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?y=this._css_beautify:g.custom_beautifier_name==="html"&&(y=function(Se,we){var Fe=new _(Se,we,P._js_beautify,P._css_beautify);return Fe.beautify()}),this._options.indent_scripts==="keep"?A=0:this._options.indent_scripts==="separate"&&(A=-C.indent_level);var Y=C.get_full_indent(A);if(k=k.replace(/\n[ \t]*$/,""),g.custom_beautifier_name!=="html"&&k[0]==="<"&&k.match(/^(<!--|<!\[CDATA\[)/)){var $=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(k);if(!$){C.add_raw_token(x);return}F=Y+$[1]+`
`,k=$[4],$[5]&&(T=Y+$[5]),k=k.replace(/\n[ \t]*$/,""),($[2]||$[3].indexOf(`
`)!==-1)&&($=$[3].match(/[ \t]+$/),$&&(x.whitespace_before=$[0]))}if(k)if(y){var le=function(){this.eol=`
`};le.prototype=this._options.raw_options;var de=new le;k=y(Y+k,de)}else{var Pe=x.whitespace_before;Pe&&(k=k.replace(new RegExp(`
(`+Pe+")?","g"),`
`)),k=Y+k.replace(/\n/g,`
`+Y)}F&&(k?k=F+k+`
`+T:k=F+T),C.print_newline(!1),k&&(x.text=k,x.whitespace_before="",x.newlines=0,C.add_raw_token(x),C.print_newline(!0))}},_.prototype._handle_tag_open=function(C,x,g,P){var k=this._get_tag_open_token(x);return(g.is_unformatted||g.is_content_unformatted)&&!g.is_empty_element&&x.type===u.TAG_OPEN&&x.text.indexOf("</")===0?(C.add_raw_token(x),k.start_tag_token=this._tag_stack.try_pop(k.tag_name)):(C.traverse_whitespace(x),this._set_tag_position(C,x,k,g,P),k.is_inline_element||C.set_wrap_point(),C.print_token(x)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(k.alignment_size=x.text.length+1),!k.tag_complete&&!k.is_unformatted&&(C.alignment_size=k.alignment_size),k};var b=function(C,x){if(this.parent=C||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="",!x)this.tag_complete=!0;else{var g;this.tag_start_char=x.text[0],this.text=x.text,this.tag_start_char==="<"?(g=x.text.match(/^<([^\s>]*)/),this.tag_check=g?g[1]:""):(g=x.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=g?g[1]:"",(x.text.startsWith("{{#>")||x.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&x.next!==null?this.tag_check=x.next.text.split(" ")[0]:this.tag_check=x.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),x.type===u.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||x.closed&&x.closed.text==="/>";var P=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(P=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(P)))}};_.prototype._get_tag_open_token=function(C){var x=new b(this._tag_stack.get_parser_token(),C);return x.alignment_size=this._options.wrap_attributes_indent_size,x.is_end_tag=x.is_end_tag||S(x.tag_check,this._options.void_elements),x.is_empty_element=x.tag_complete||x.is_start_tag&&x.is_end_tag,x.is_unformatted=!x.tag_complete&&S(x.tag_check,this._options.unformatted),x.is_content_unformatted=!x.is_empty_element&&S(x.tag_check,this._options.content_unformatted),x.is_inline_element=S(x.tag_name,this._options.inline)||x.tag_name.includes("-")||x.tag_start_char==="{",x},_.prototype._set_tag_position=function(C,x,g,P,k){if(g.is_empty_element||(g.is_end_tag?g.start_tag_token=this._tag_stack.try_pop(g.tag_name):(this._do_optional_end_element(g)&&(g.is_inline_element||C.print_newline(!1)),this._tag_stack.record_tag(g),(g.tag_name==="script"||g.tag_name==="style")&&!(g.is_unformatted||g.is_content_unformatted)&&(g.custom_beautifier_name=O(g.tag_check,x)))),S(g.tag_check,this._options.extra_liners)&&(C.print_newline(!1),C._output.just_added_blankline()||C.print_newline(!0)),g.is_empty_element){if(g.tag_start_char==="{"&&g.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),g.indent_content=!0;var y=C.current_line_has_match(/{{#if/);y||C.print_newline(!1)}g.tag_name==="!--"&&k.type===u.TAG_CLOSE&&P.is_end_tag&&g.text.indexOf(`
`)===-1||(g.is_inline_element||g.is_unformatted||C.print_newline(!1),this._calcluate_parent_multiline(C,g))}else if(g.is_end_tag){var A=!1;A=g.start_tag_token&&g.start_tag_token.multiline_content,A=A||!g.is_inline_element&&!(P.is_inline_element||P.is_unformatted)&&!(k.type===u.TAG_CLOSE&&g.start_tag_token===P)&&k.type!=="TK_CONTENT",(g.is_content_unformatted||g.is_unformatted)&&(A=!1),A&&C.print_newline(!1)}else g.indent_content=!g.custom_beautifier_name,g.tag_start_char==="<"&&(g.tag_name==="html"?g.indent_content=this._options.indent_inner_html:g.tag_name==="head"?g.indent_content=this._options.indent_head_inner_html:g.tag_name==="body"&&(g.indent_content=this._options.indent_body_inner_html)),!(g.is_inline_element||g.is_unformatted)&&(k.type!=="TK_CONTENT"||g.is_content_unformatted)&&C.print_newline(!1),this._calcluate_parent_multiline(C,g)},_.prototype._calcluate_parent_multiline=function(C,x){x.parent&&C._output.just_added_newline()&&!((x.is_inline_element||x.is_unformatted)&&x.parent.is_inline_element)&&(x.parent.multiline_content=!0)};var v=["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"],h=["a","audio","del","ins","map","noscript","video"];_.prototype._do_optional_end_element=function(C){var x=null;if(C.is_empty_element||!C.is_start_tag||!C.parent)return;if(C.tag_name==="body")x=x||this._tag_stack.try_pop("head");else if(C.tag_name==="li")x=x||this._tag_stack.try_pop("li",["ol","ul"]);else if(C.tag_name==="dd"||C.tag_name==="dt")x=x||this._tag_stack.try_pop("dt",["dl"]),x=x||this._tag_stack.try_pop("dd",["dl"]);else if(C.parent.tag_name==="p"&&v.indexOf(C.tag_name)!==-1){var g=C.parent.parent;(!g||h.indexOf(g.tag_name)===-1)&&(x=x||this._tag_stack.try_pop("p"))}else C.tag_name==="rp"||C.tag_name==="rt"?(x=x||this._tag_stack.try_pop("rt",["ruby","rtc"]),x=x||this._tag_stack.try_pop("rp",["ruby","rtc"])):C.tag_name==="optgroup"?x=x||this._tag_stack.try_pop("optgroup",["select"]):C.tag_name==="option"?x=x||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):C.tag_name==="colgroup"?x=x||this._tag_stack.try_pop("caption",["table"]):C.tag_name==="thead"?(x=x||this._tag_stack.try_pop("caption",["table"]),x=x||this._tag_stack.try_pop("colgroup",["table"])):C.tag_name==="tbody"||C.tag_name==="tfoot"?(x=x||this._tag_stack.try_pop("caption",["table"]),x=x||this._tag_stack.try_pop("colgroup",["table"]),x=x||this._tag_stack.try_pop("thead",["table"]),x=x||this._tag_stack.try_pop("tbody",["table"])):C.tag_name==="tr"?(x=x||this._tag_stack.try_pop("caption",["table"]),x=x||this._tag_stack.try_pop("colgroup",["table"]),x=x||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(C.tag_name==="th"||C.tag_name==="td")&&(x=x||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),x=x||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return C.parent=this._tag_stack.get_parser_token(),x},m.exports.Beautifier=_},function(m,f,p){var c=p(6).Options;function r(d){c.call(this,d,"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"])}r.prototype=new c,m.exports.Options=r},function(m,f,p){var c=p(9).Tokenizer,r=p(9).TOKEN,d=p(13).Directives,u=p(14).TemplatablePattern,o=p(12).Pattern,s={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:r.START,RAW:r.RAW,EOF:r.EOF},a=new d(/<\!--/,/-->/),R=function(O,S){c.call(this,O,S),this._current_tag_name="";var D=new u(this._input).read_options(this._options),I=new o(this._input);if(this.__patterns={word:D.until(/[\n\r\t <]/),single_quote:D.until_after(/'/),double_quote:D.until_after(/"/),attribute:D.until(/[\n\r\t =>]|\/>/),element_name:D.until(/[\n\r\t >\/]/),handlebars_comment:I.starting_with(/{{!--/).until_after(/--}}/),handlebars:I.starting_with(/{{/).until_after(/}}/),handlebars_open:I.until(/[\n\r\t }]/),handlebars_raw_close:I.until(/}}/),comment:I.starting_with(/<!--/).until_after(/-->/),cdata:I.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:I.starting_with(/<!\[/).until_after(/]>/),processing:I.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=I.matching(_).until_after(_)}};R.prototype=new c,R.prototype._is_comment=function(O){return!1},R.prototype._is_opening=function(O){return O.type===s.TAG_OPEN},R.prototype._is_closing=function(O,S){return O.type===s.TAG_CLOSE&&S&&((O.text===">"||O.text==="/>")&&S.text[0]==="<"||O.text==="}}"&&S.text[0]==="{"&&S.text[1]==="{")},R.prototype._reset=function(){this._current_tag_name=""},R.prototype._get_next_token=function(O,S){var D=null;this._readWhitespace();var I=this._input.peek();return I===null?this._create_token(s.EOF,""):(D=D||this._read_open_handlebars(I,S),D=D||this._read_attribute(I,O,S),D=D||this._read_close(I,S),D=D||this._read_raw_content(I,O,S),D=D||this._read_content_word(I),D=D||this._read_comment_or_cdata(I),D=D||this._read_processing(I),D=D||this._read_open(I,S),D=D||this._create_token(s.UNKNOWN,this._input.next()),D)},R.prototype._read_comment_or_cdata=function(O){var S=null,D=null,I=null;if(O==="<"){var _=this._input.peek(1);_==="!"&&(D=this.__patterns.comment.read(),D?(I=a.get_directives(D),I&&I.ignore==="start"&&(D+=a.readIgnored(this._input))):D=this.__patterns.cdata.read()),D&&(S=this._create_token(s.COMMENT,D),S.directives=I)}return S},R.prototype._read_processing=function(O){var S=null,D=null,I=null;if(O==="<"){var _=this._input.peek(1);(_==="!"||_==="?")&&(D=this.__patterns.conditional_comment.read(),D=D||this.__patterns.processing.read()),D&&(S=this._create_token(s.COMMENT,D),S.directives=I)}return S},R.prototype._read_open=function(O,S){var D=null,I=null;return S||O==="<"&&(D=this._input.next(),this._input.peek()==="/"&&(D+=this._input.next()),D+=this.__patterns.element_name.read(),I=this._create_token(s.TAG_OPEN,D)),I},R.prototype._read_open_handlebars=function(O,S){var D=null,I=null;return S||this._options.indent_handlebars&&O==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(D=this.__patterns.handlebars_comment.read(),D=D||this.__patterns.handlebars.read(),I=this._create_token(s.COMMENT,D)):(D=this.__patterns.handlebars_open.read(),I=this._create_token(s.TAG_OPEN,D))),I},R.prototype._read_close=function(O,S){var D=null,I=null;return S&&(S.text[0]==="<"&&(O===">"||O==="/"&&this._input.peek(1)===">")?(D=this._input.next(),O==="/"&&(D+=this._input.next()),I=this._create_token(s.TAG_CLOSE,D)):S.text[0]==="{"&&O==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),I=this._create_token(s.TAG_CLOSE,"}}"))),I},R.prototype._read_attribute=function(O,S,D){var I=null,_="";if(D&&D.text[0]==="<")if(O==="=")I=this._create_token(s.EQUALS,this._input.next());else if(O==='"'||O==="'"){var b=this._input.next();O==='"'?b+=this.__patterns.double_quote.read():b+=this.__patterns.single_quote.read(),I=this._create_token(s.VALUE,b)}else _=this.__patterns.attribute.read(),_&&(S.type===s.EQUALS?I=this._create_token(s.VALUE,_):I=this._create_token(s.ATTRIBUTE,_));return I},R.prototype._is_content_unformatted=function(O){return this._options.void_elements.indexOf(O)===-1&&(this._options.content_unformatted.indexOf(O)!==-1||this._options.unformatted.indexOf(O)!==-1)},R.prototype._read_raw_content=function(O,S,D){var I="";if(D&&D.text[0]==="{")I=this.__patterns.handlebars_raw_close.read();else if(S.type===s.TAG_CLOSE&&S.opened.text[0]==="<"&&S.text[0]!=="/"){var _=S.opened.text.substr(1).toLowerCase();if(_==="script"||_==="style"){var b=this._read_comment_or_cdata(O);if(b)return b.type=s.TEXT,b;I=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(_)&&(I=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig")))}return I?this._create_token(s.TEXT,I):null},R.prototype._read_content_word=function(O){var S="";if(this._options.unformatted_content_delimiter&&(O===this._options.unformatted_content_delimiter[0]&&(S=this.__patterns.unformatted_content_delimiter.read())),S||(S=this.__patterns.word.read()),S)return this._create_token(s.TEXT,S)},m.exports.Tokenizer=R,m.exports.TOKEN=s}],j={};function n(m){var f=j[m];if(f!==void 0)return f.exports;var p=j[m]={exports:{}};return K[m](p,p.exports,n),p.exports}var w=n(18);U=w})();var V=U;if(!0)!(Z=[B,B("6UM0"),B("TXwP")],G=function(K){var j=B("6UM0"),n=B("TXwP");return{html_beautify:function(w,m){return V(w,m,j.js_beautify,n.css_beautify)}}}.apply(se,Z),G!==void 0&&(We.exports=G));else var W,M})()},qgvg:function(We,se){We.exports="data:image/gif;base64,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"},"rAM+":function(We,se,B){"use strict";B.d(se,"a",function(){return G});var Z=B("Qw5x");function G(U,V){var W;if(typeof Symbol=="undefined"||U[Symbol.iterator]==null){if(Array.isArray(U)||(W=Object(Z.a)(U))||V&&U&&typeof U.length=="number"){W&&(U=W);var M=0,K=function(){};return{s:K,n:function(){return M>=U.length?{done:!0}:{done:!1,value:U[M++]}},e:function(f){throw f},f:K}}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 j=!0,n=!1,w;return{s:function(){W=U[Symbol.iterator]()},n:function(){var f=W.next();return j=f.done,f},e:function(f){n=!0,w=f},f:function(){try{!j&&W.return!=null&&W.return()}finally{if(n)throw w}}}}},rUJ1:function(We,se){const B=/[&<>"']/,Z=/[&<>"']/g,G=/[<>"']|&(?!#?\w+;)/,U=/[<>"']|&(?!#?\w+;)/g,V={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},W=I=>V[I];function M(I,_){if(_){if(B.test(I))return I.replace(Z,W)}else if(G.test(I))return I.replace(U,W);return I}const K=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function j(I){return I.replace(K,(_,b)=>(b=b.toLowerCase(),b==="colon"?":":b.charAt(0)==="#"?b.charAt(1)==="x"?String.fromCharCode(parseInt(b.substring(2),16)):String.fromCharCode(+b.substring(1)):""))}const n=/(^|[^\[])\^/g;function w(I,_){I=I.source||I,_=_||"";const b={replace:(v,h)=>(h=h.source||h,h=h.replace(n,"$1"),I=I.replace(v,h),b),getRegex:()=>new RegExp(I,_)};return b}const m=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(I,_,b){if(I){let v;try{v=decodeURIComponent(j(b)).replace(m,"").toLowerCase()}catch(h){return null}if(v.indexOf("javascript:")===0||v.indexOf("vbscript:")===0||v.indexOf("data:")===0)return null}_&&!f.test(b)&&(b=o(_,b));try{b=encodeURI(b).replace(/%25/g,"%")}catch(v){return null}return b}const c={},r=/^[^:]+:\/*[^/]*$/,d=/^([^:]+:)[\s\S]*$/,u=/^([^:]+:\/*[^/]*)[\s\S]*$/;function o(I,_){c[" "+I]||(r.test(I)?c[" "+I]=I+"/":c[" "+I]=O(I,"/",!0)),I=c[" "+I];const b=I.indexOf(":")===-1;return _.substring(0,2)==="//"?b?_:I.replace(d,"$1")+_:_.charAt(0)==="/"?b?_:I.replace(u,"$1")+_:I+_}const s={exec:function(){}};function a(I){let _=1,b,v;for(;_<arguments.length;_++){b=arguments[_];for(v in b)Object.prototype.hasOwnProperty.call(b,v)&&(I[v]=b[v])}return I}function R(I,_){const b=I.replace(/\|/g,(C,x,g)=>{let P=!1,k=x;for(;--k>=0&&g[k]==="\\";)P=!P;return P?"|":" |"}),v=b.split(/ \|/);let h=0;if(v.length>_)v.splice(_);else for(;v.length<_;)v.push("");for(;h<v.length;h++)v[h]=v[h].trim().replace(/\\\|/g,"|");return v}function O(I,_,b){const v=I.length;if(v===0)return"";let h=0;for(;h<v;){const C=I.charAt(v-h-1);if(C===_&&!b)h++;else if(C!==_&&b)h++;else break}return I.substr(0,v-h)}function S(I,_){if(I.indexOf(_[1])===-1)return-1;const b=I.length;let v=0,h=0;for(;h<b;h++)if(I[h]==="\\")h++;else if(I[h]===_[0])v++;else if(I[h]===_[1]&&(v--,v<0))return h;return-1}function D(I){I&&I.sanitize&&!I.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}We.exports={escape:M,unescape:j,edit:w,cleanUrl:p,resolveUrl:o,noopTest:s,merge:a,splitCells:R,rtrim:O,findClosingBracket:S,checkSanitizeDeprecation:D}},rcnY:function(We,se,B){var Z=B("aRTE");function G(U,V){this.totalCount=U,this.dataCount=V}G.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],G.getRSBlocks=function(U,V){var W=G.getRsBlockTable(U,V);if(W==null)throw new Error("bad rs block @ typeNumber:"+U+"/errorCorrectLevel:"+V);for(var M=W.length/3,K=new Array,j=0;j<M;j++)for(var n=W[j*3+0],w=W[j*3+1],m=W[j*3+2],f=0;f<n;f++)K.push(new G(w,m));return K},G.getRsBlockTable=function(U,V){switch(V){case Z.L:return G.RS_BLOCK_TABLE[(U-1)*4+0];case Z.M:return G.RS_BLOCK_TABLE[(U-1)*4+1];case Z.Q:return G.RS_BLOCK_TABLE[(U-1)*4+2];case Z.H:return G.RS_BLOCK_TABLE[(U-1)*4+3];default:return}},We.exports=G},sR1s:function(We,se,B){"use strict";B.d(se,"b",function(){return V}),B.d(se,"a",function(){return W}),B.d(se,"c",function(){return M}),B.d(se,"d",function(){return K});var Z=B("U8pU"),G="RC_TABLE_KEY";function U(j){return j==null?[]:Array.isArray(j)?j:[j]}function V(j,n){if(!n&&typeof n!="number")return j;for(var w=U(n),m=j,f=0;f<w.length;f+=1){if(!m)return null;var p=w[f];m=m[p]}return m}function W(j){var n=[],w={};return j.forEach(function(m){for(var f=m||{},p=f.key,c=f.dataIndex,r=p||U(c).join("-")||G;w[r];)r="".concat(r,"_next");w[r]=!0,n.push(r)}),n}function M(){var j={};function n(p,c){c&&Object.keys(c).forEach(function(r){var d=c[r];d&&Object(Z.a)(d)==="object"?(p[r]=p[r]||{},n(p[r],d)):p[r]=d})}for(var w=arguments.length,m=new Array(w),f=0;f<w;f++)m[f]=arguments[f];return m.forEach(function(p){n(j,p)}),j}function K(j){return j!=null}},sboe:function(We,se,B){"use strict";B.d(se,"a",function(){return U});var Z=B("q1tI"),G=B.n(Z),U=Z.createContext(null)},t23M:function(We,se,B){"use strict";var Z=B("VTBJ"),G=B("1OyB"),U=B("vuIU"),V=B("Ji7U"),W=B("LK+K"),M=B("q1tI"),K=B.n(M),j=B("m+aA"),n=B("Zm9Q"),w=B("Kwbf"),m=B("c+Xe"),f=B("bdgK"),p="rc-observer-key",c=function(r){Object(V.a)(u,r);var d=Object(W.a)(u);function u(){var o;return Object(G.a)(this,u),o=d.apply(this,arguments),o.resizeObserver=null,o.childNode=null,o.currentElement=null,o.state={width:0,height:0,offsetHeight:0,offsetWidth:0},o.onResize=function(s){var a=o.props.onResize,R=s[0].target,O=R.getBoundingClientRect(),S=O.width,D=O.height,I=R.offsetWidth,_=R.offsetHeight,b=Math.floor(S),v=Math.floor(D);if(o.state.width!==b||o.state.height!==v||o.state.offsetWidth!==I||o.state.offsetHeight!==_){var h={width:b,height:v,offsetWidth:I,offsetHeight:_};o.setState(h),a&&Promise.resolve().then(function(){a(Object(Z.a)(Object(Z.a)({},h),{},{offsetWidth:I,offsetHeight:_}))})}},o.setChildNode=function(s){o.childNode=s},o}return Object(U.a)(u,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var s=this.props.disabled;if(s){this.destroyObserver();return}var a=Object(j.a)(this.childNode||this),R=a!==this.currentElement;R&&(this.destroyObserver(),this.currentElement=a),!this.resizeObserver&&a&&(this.resizeObserver=new f.default(this.onResize),this.resizeObserver.observe(a))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var s=this.props.children,a=Object(n.a)(s);if(a.length>1)Object(w.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(a.length===0)return Object(w.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var R=a[0];if(M.isValidElement(R)&&Object(m.c)(R)){var O=R.ref;a[0]=M.cloneElement(R,{ref:Object(m.a)(O,this.setChildNode)})}return a.length===1?a[0]:a.map(function(S,D){return!M.isValidElement(S)||"key"in S&&S.key!==null?S:M.cloneElement(S,{key:"".concat(p,"-").concat(D)})})}}]),u}(M.Component);c.displayName="ResizeObserver",se.a=c},t9D7:function(We,se,B){"use strict";B.d(se,"b",function(){return K}),B.d(se,"g",function(){return n}),B.d(se,"d",function(){return w}),B.d(se,"e",function(){return m}),B.d(se,"a",function(){return f}),B.d(se,"f",function(){return r}),B.d(se,"c",function(){return d});var Z=B("Vhoy"),G=B("MI8n"),U=B("pmY6"),V=B("Cg/j"),W=B("ic2d"),M=B("nEHx");const K=Object(V.c)("themeService");var j;(function(u){function o(s){return s&&typeof s=="object"&&typeof s.id=="string"}u.isThemeColor=o})(j||(j={}));function n(u){return{id:u}}var w;(function(u){function o(D){return D&&typeof D=="object"&&typeof D.id=="string"&&(typeof D.color=="undefined"||j.isThemeColor(D.color))}u.isThemeIcon=o;const s=new RegExp(`^\\$\\((${Z.a.iconNameExpression}(?:${Z.a.iconModifierExpression})?)\\)$`);function a(D){const I=s.exec(D);if(!I)return;let[,_]=I;return{id:_}}u.fromString=a;function R(D,I){let _=D.id;const b=_.lastIndexOf("~");return b!==-1&&(_=_.substring(0,b)),I&&(_=`${_}~${I}`),{id:_}}u.modify=R;function O(D,I){var _,b;return D.id===I.id&&((_=D.color)===null||_===void 0?void 0:_.id)===((b=I.color)===null||b===void 0?void 0:b.id)}u.isEqual=O;function S(D,I){return{id:D.id,color:I?n(I):void 0}}u.asThemeIcon=S,u.asClassNameArray=Z.a.asClassNameArray,u.asClassName=Z.a.asClassName,u.asCSSSelector=Z.a.asCSSSelector})(w||(w={}));function m(u){switch(u){case M.a.DARK:return"vs-dark";case M.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const f={ThemingContribution:"base.contributions.theming"};class p{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new G.b}onColorThemeChange(u){return this.themingParticipants.push(u),this.onThemingParticipantAddedEmitter.fire(u),Object(U.i)(()=>{const o=this.themingParticipants.indexOf(u);this.themingParticipants.splice(o,1)})}getThemingParticipants(){return this.themingParticipants}}let c=new p;W.a.add(f.ThemingContribution,c);function r(u){return c.onColorThemeChange(u)}class d extends U.a{constructor(u){super();this.themeService=u,this.theme=u.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(o=>this.onThemeChange(o)))}onThemeChange(u){this.theme=u,this.updateStyles()}updateStyles(){}}},tWlo:function(We,se){We.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkVCNENBMTM0OENGMTExRTk4NzNCRkMxMzdBMjc5MEY5IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkVCNENBMTM1OENGMTExRTk4NzNCRkMxMzdBMjc5MEY5Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RUI0Q0ExMzI4Q0YxMTFFOTg3M0JGQzEzN0EyNzkwRjkiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RUI0Q0ExMzM4Q0YxMTFFOTg3M0JGQzEzN0EyNzkwRjkiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7p3KzkAAAFvElEQVR42sRae0ybVRQ/peVRaFce8pwgj1Je5TFsEHGbMAkzmqiJyba4hYh/LJlxiRr9Z0aNGv8xvhKTGckM2zKWmGEgU7MsPnCZIrKBjMcKY9BCBMqjjEcLtFDwHPZVC12h934f8yS/P6Dfud/5nXvvueec+8neOPEuSCAxiDJEMSITkYKIRoQJv9sREwgTogfRjGhEjIt9sUKEbhSiEvEC4mGEbJNngxGRiAzEk8L/VhGtiPOIswgrjxEBHDrxiE8Qg4hPEYYtjPclMkGXxhhCfIFI2E4CNFtvIm4hXvdYHlJIKOIVRK/wjkCpCaQjWhAfIVSwfaIS3kHvypaKwLOI64hdcP+kAPEn4jmxBI4ivkXsgPsvNBt1gg1cBI4hvkLI4f8TuWDDMdYw+owQFdh3Y6gSCnL1oNOmQnxcHAQHB8HCwiLMzM7C8KgFjD23oN9khtXVVZZhyZZhxEV/CGQhalk9r1AoYO9jxfBokQGCgoK8SBHi42LBsCsfJq1TcOnHn+F2v4llJsimIoRx3Q8le0o9/6bwdRmRxGJ8ZEQ4vHjkEORkZYBcLvdrlvL0OeBwOuDv4RF/X0Ne2Y34GrHiaw+8ishnMT4tNRmOVlVCTPQDzKfY/vJ9kJWpY1Ej217ztYnpFHyH6UjGJXH4wPOgVIZw7VAi8XRFOSjkTKv1bc8T25PACdZDan95mV9LZjNRq1Wg02lZw+tbGwnQ/L/EMooyJASSkxIliZUp7ONUCTb/S+AI2cTqOZlMJgmBcI2GVUUp2LyOAJMwxvHN04EAnqQYDrsJUDFSyKrtdC5JRmDR4eBRoxokgQjs48nn5+fnJSNgt3ONRTaXEYFHeLSXlpd5Peclk1Yrr6ohQKhhuWR6ekYSAiOWMV7VDCKg5Z0/uwTLaNnlAssYd22fTgRieTRz9dmQlpIsmgCdwuWle3nVY4mAmkczLCxUsk0cEaHhVVUH8GqOT0xKRmB6ZpZX1UkE5ng0zeYhsNntkhBgqAs2yhwR4AoBrpUVaO/oEm38nelp6B/gJnCHCNzm1f79jxaWgsRLbDY7XKj/Dlb405I+ItDDqz2/sACnTp9DEqNc+qfO1MLwyKiYCewNEPov3EK+G59k39BOp3Nt+YiUViLQKNjBH8sV7EXNivhslgb4xb2J28SMtMSRmbrwBBYpZPOI+xw4J2aka23tzB4VETrdct6zoCECC7wjjWIy1tbewZT//9R4RYzxZOtZTwK0C2vEjHjT2Ov3sx2d3TA7ZxPzuhrB5nVdiQ8pNPPvKP+XkEjjbYKtXm0VOpHe5x01KDDI72dFtmI+EGz1IkDyOeIvnlETH/T/digqKoLXeLLts3UNgY0REXGQZpmpqtCmrjV1/ZWcrEzIzEhnTtwQhwQb/5vNDc1dkinak4gDsMUFSEhwMJQ9vhueqihnWhYBMhnokYRGowGLZRwcW9fWLsGxTV6HqA8F6sMfR5z0qiDUKsjQpoEuPQ1SsSILVPDd1FJTrDA/Fwry9NDX1w9dxh7MSs2+ytTjcI+7gc0IkHwpMD+JnpbnZGdCXk4WPJSUKFlHzj0bGTrtGqhZNjJqgQHzIHRjWMbzhd7/MqLaZxqzxfjVFU+UjhcZCs+gp7f9nowcszMhfg17SoptSKDyym9N9cbePt8O2GrQ5pbrDRMTkwbe6MQpN6hfFRUVWa+Qb+7je23ideLAtPdGZ/cUZpw1iTsTFtFLJcBwEc2RIryHqELvW2q/qQPT4JA4AmupL5aP/Saza8A0eDU2Jvr0DrWaNkEe3L32kULmhXV+cHHR8cOvV5tcDd9f8qvm9ouAW2Zm5yhpm5uwWi9HRoRXq1UqC9zt08cDe391VUiJPyaPo+F1zddaZy80XFyLRv52v2ViPrehiJSvz6Z7rthQpZI+t6E+K91yuj+3UXnkL+7PbYxCFdiIKfgYdTcohHZ23QTnEntd8Y8AAwCTubpzlq2wWAAAAABJRU5ErkJggg=="},ulZh:function(We,se,B){typeof window!="undefined"&&function(G,U){We.exports=U()}(this,function(){return function(Z){var G={};function U(V){if(G[V])return G[V].exports;var W=G[V]={i:V,l:!1,exports:{}};return Z[V].call(W.exports,W,W.exports,U),W.l=!0,W.exports}return U.m=Z,U.c=G,U.d=function(V,W,M){U.o(V,W)||Object.defineProperty(V,W,{enumerable:!0,get:M})},U.r=function(V){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(V,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(V,"__esModule",{value:!0})},U.t=function(V,W){if(W&1&&(V=U(V)),W&8)return V;if(W&4&&typeof V=="object"&&V&&V.__esModule)return V;var M=Object.create(null);if(U.r(M),Object.defineProperty(M,"default",{enumerable:!0,value:V}),W&2&&typeof V!="string")for(var K in V)U.d(M,K,function(j){return V[j]}.bind(null,K));return M},U.n=function(V){var W=V&&V.__esModule?function(){return V.default}:function(){return V};return U.d(W,"a",W),W},U.o=function(V,W){return Object.prototype.hasOwnProperty.call(V,W)},U.p="/dist/",U(U.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(Z,G,U){"use strict";var V=Object.prototype.hasOwnProperty,W="~";function M(){}Object.create&&(M.prototype=Object.create(null),new M().__proto__||(W=!1));function K(m,f,p){this.fn=m,this.context=f,this.once=p||!1}function j(m,f,p,c,r){if(typeof p!="function")throw new TypeError("The listener must be a function");var d=new K(p,c||m,r),u=W?W+f:f;return m._events[u]?m._events[u].fn?m._events[u]=[m._events[u],d]:m._events[u].push(d):(m._events[u]=d,m._eventsCount++),m}function n(m,f){--m._eventsCount===0?m._events=new M:delete m._events[f]}function w(){this._events=new M,this._eventsCount=0}w.prototype.eventNames=function(){var f=[],p,c;if(this._eventsCount===0)return f;for(c in p=this._events)V.call(p,c)&&f.push(W?c.slice(1):c);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},w.prototype.listeners=function(f){var p=W?W+f:f,c=this._events[p];if(!c)return[];if(c.fn)return[c.fn];for(var r=0,d=c.length,u=new Array(d);r<d;r++)u[r]=c[r].fn;return u},w.prototype.listenerCount=function(f){var p=W?W+f:f,c=this._events[p];return c?c.fn?1:c.length:0},w.prototype.emit=function(f,p,c,r,d,u){var o=W?W+f:f;if(!this._events[o])return!1;var s=this._events[o],a=arguments.length,R,O;if(s.fn){s.once&&this.removeListener(f,s.fn,void 0,!0);switch(a){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,p),!0;case 3:return s.fn.call(s.context,p,c),!0;case 4:return s.fn.call(s.context,p,c,r),!0;case 5:return s.fn.call(s.context,p,c,r,d),!0;case 6:return s.fn.call(s.context,p,c,r,d,u),!0}for(O=1,R=new Array(a-1);O<a;O++)R[O-1]=arguments[O];s.fn.apply(s.context,R)}else{var S=s.length,D;for(O=0;O<S;O++){s[O].once&&this.removeListener(f,s[O].fn,void 0,!0);switch(a){case 1:s[O].fn.call(s[O].context);break;case 2:s[O].fn.call(s[O].context,p);break;case 3:s[O].fn.call(s[O].context,p,c);break;case 4:s[O].fn.call(s[O].context,p,c,r);break;default:if(!R)for(D=1,R=new Array(a-1);D<a;D++)R[D-1]=arguments[D];s[O].fn.apply(s[O].context,R)}}}return!0},w.prototype.on=function(f,p,c){return j(this,f,p,c,!1)},w.prototype.once=function(f,p,c){return j(this,f,p,c,!0)},w.prototype.removeListener=function(f,p,c,r){var d=W?W+f:f;if(!this._events[d])return this;if(!p)return n(this,d),this;var u=this._events[d];if(u.fn)u.fn===p&&(!r||u.once)&&(!c||u.context===c)&&n(this,d);else{for(var o=0,s=[],a=u.length;o<a;o++)(u[o].fn!==p||r&&!u[o].once||c&&u[o].context!==c)&&s.push(u[o]);s.length?this._events[d]=s.length===1?s[0]:s:n(this,d)}return this},w.prototype.removeAllListeners=function(f){var p;return f?(p=W?W+f:f,this._events[p]&&n(this,p)):(this._events=new M,this._eventsCount=0),this},w.prototype.off=w.prototype.removeListener,w.prototype.addListener=w.prototype.on,w.prefixed=W,w.EventEmitter=w,Z.exports=w},"./node_modules/url-toolkit/src/url-toolkit.js":function(Z,G,U){(function(V){var W=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,M=/^([^\/?#]*)([^]*)$/,K=/(?:\/|^)\.(?=\/)/g,j=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,n={buildAbsoluteURL:function(w,m,f){if(f=f||{},w=w.trim(),m=m.trim(),!m){if(!f.alwaysNormalize)return w;var p=n.parseURL(w);if(!p)throw new Error("Error trying to parse base URL.");return p.path=n.normalizePath(p.path),n.buildURLFromParts(p)}var c=n.parseURL(m);if(!c)throw new Error("Error trying to parse relative URL.");if(c.scheme)return f.alwaysNormalize?(c.path=n.normalizePath(c.path),n.buildURLFromParts(c)):m;var r=n.parseURL(w);if(!r)throw new Error("Error trying to parse base URL.");if(!r.netLoc&&r.path&&r.path[0]!=="/"){var d=M.exec(r.path);r.netLoc=d[1],r.path=d[2]}r.netLoc&&!r.path&&(r.path="/");var u={scheme:r.scheme,netLoc:c.netLoc,path:null,params:c.params,query:c.query,fragment:c.fragment};if(!c.netLoc&&(u.netLoc=r.netLoc,c.path[0]!=="/"))if(!c.path)u.path=r.path,c.params||(u.params=r.params,c.query||(u.query=r.query));else{var o=r.path,s=o.substring(0,o.lastIndexOf("/")+1)+c.path;u.path=n.normalizePath(s)}return u.path===null&&(u.path=f.alwaysNormalize?n.normalizePath(c.path):c.path),n.buildURLFromParts(u)},parseURL:function(w){var m=W.exec(w);return m?{scheme:m[1]||"",netLoc:m[2]||"",path:m[3]||"",params:m[4]||"",query:m[5]||"",fragment:m[6]||""}:null},normalizePath:function(w){for(w=w.split("").reverse().join("").replace(K,"");w.length!==(w=w.replace(j,"")).length;);return w.split("").reverse().join("")},buildURLFromParts:function(w){return w.scheme+w.netLoc+w.path+w.params+w.query+w.fragment}};Z.exports=n})(this)},"./node_modules/webworkify-webpack/index.js":function(Z,G,U){function V(f){var p={};function c(d){if(p[d])return p[d].exports;var u=p[d]={i:d,l:!1,exports:{}};return f[d].call(u.exports,u,u.exports,c),u.l=!0,u.exports}c.m=f,c.c=p,c.i=function(d){return d},c.d=function(d,u,o){c.o(d,u)||Object.defineProperty(d,u,{configurable:!1,enumerable:!0,get:o})},c.r=function(d){Object.defineProperty(d,"__esModule",{value:!0})},c.n=function(d){var u=d&&d.__esModule?function(){return d.default}:function(){return d};return c.d(u,"a",u),u},c.o=function(d,u){return Object.prototype.hasOwnProperty.call(d,u)},c.p="/",c.oe=function(d){throw console.error(d),d};var r=c(c.s=ENTRY_MODULE);return r.default||r}var W="[\\.|\\-|\\+|\\w|/|@]+",M="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+W+").*?\\)";function K(f){return(f+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function j(f){return!isNaN(1*f)}function n(f,p,c){var r={};r[c]=[];var d=p.toString(),u=d.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!u)return r;for(var o=u[1],s=new RegExp("(\\\\n|\\W)"+K(o)+M,"g"),a;a=s.exec(d);){if(a[3]==="dll-reference")continue;r[c].push(a[3])}for(s=new RegExp("\\("+K(o)+'\\("(dll-reference\\s('+W+'))"\\)\\)'+M,"g");a=s.exec(d);)f[a[2]]||(r[c].push(a[1]),f[a[2]]=U(a[1]).m),r[a[2]]=r[a[2]]||[],r[a[2]].push(a[4]);for(var R=Object.keys(r),O=0;O<R.length;O++)for(var S=0;S<r[R[O]].length;S++)j(r[R[O]][S])&&(r[R[O]][S]=1*r[R[O]][S]);return r}function w(f){var p=Object.keys(f);return p.reduce(function(c,r){return c||f[r].length>0},!1)}function m(f,p){for(var c={main:[p]},r={main:[]},d={main:{}};w(c);)for(var u=Object.keys(c),o=0;o<u.length;o++){var s=u[o],a=c[s],R=a.pop();if(d[s]=d[s]||{},d[s][R]||!f[s][R])continue;d[s][R]=!0,r[s]=r[s]||[],r[s].push(R);for(var O=n(f,f[s][R],s),S=Object.keys(O),D=0;D<S.length;D++)c[S[D]]=c[S[D]]||[],c[S[D]]=c[S[D]].concat(O[S[D]])}return r}Z.exports=function(f,p){p=p||{};var c={main:U.m},r=p.all?{main:Object.keys(c.main)}:m(c,f),d="";Object.keys(r).filter(function(R){return R!=="main"}).forEach(function(R){for(var O=0;r[R][O];)O++;r[R].push(O),c[R][O]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",d=d+"var "+R+" = ("+V.toString().replace("ENTRY_MODULE",JSON.stringify(O))+")({"+r[R].map(function(S){return""+JSON.stringify(S)+": "+c[R][S].toString()}).join(",")+`});
`}),d=d+"new (("+V.toString().replace("ENTRY_MODULE",JSON.stringify(f))+")({"+r.main.map(function(R){return""+JSON.stringify(R)+": "+c.main[R].toString()}).join(",")+"}))(self);";var u=new window.Blob([d],{type:"text/javascript"});if(p.bare)return u;var o=window.URL||window.webkitURL||window.mozURL||window.msURL,s=o.createObjectURL(u),a=new window.Worker(s);return a.objectURL=s,a}},"./src/config.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"hlsDefaultConfig",function(){return D}),U.d(G,"mergeConfig",function(){return _}),U.d(G,"enableStreamingMode",function(){return b});var V=U("./src/controller/abr-controller.ts"),W=U("./src/controller/audio-stream-controller.ts"),M=U("./src/controller/audio-track-controller.ts"),K=U("./src/controller/subtitle-stream-controller.ts"),j=U("./src/controller/subtitle-track-controller.ts"),n=U("./src/controller/buffer-controller.ts"),w=U("./src/controller/timeline-controller.ts"),m=U("./src/controller/cap-level-controller.ts"),f=U("./src/controller/fps-controller.ts"),p=U("./src/controller/eme-controller.ts"),c=U("./src/controller/cmcd-controller.ts"),r=U("./src/utils/xhr-loader.ts"),d=U("./src/utils/fetch-loader.ts"),u=U("./src/utils/cues.ts"),o=U("./src/utils/mediakeys-helper.ts"),s=U("./src/utils/logger.ts");function a(){return a=Object.assign||function(v){for(var h=1;h<arguments.length;h++){var C=arguments[h];for(var x in C)Object.prototype.hasOwnProperty.call(C,x)&&(v[x]=C[x])}return v},a.apply(this,arguments)}function R(v,h){var C=Object.keys(v);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(v);h&&(x=x.filter(function(g){return Object.getOwnPropertyDescriptor(v,g).enumerable})),C.push.apply(C,x)}return C}function O(v){for(var h=1;h<arguments.length;h++){var C=arguments[h]!=null?arguments[h]:{};h%2?R(Object(C),!0).forEach(function(x){S(v,x,C[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(C)):R(Object(C)).forEach(function(x){Object.defineProperty(v,x,Object.getOwnPropertyDescriptor(C,x))})}return v}function S(v,h,C){return h in v?Object.defineProperty(v,h,{value:C,enumerable:!0,configurable:!0,writable:!0}):v[h]=C,v}var D=O(O({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:r.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:V.default,bufferController:n.default,capLevelController:m.default,fpsController:f.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:o.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},I()),{},{subtitleStreamController:K.SubtitleStreamController,subtitleTrackController:j.default,timelineController:w.TimelineController,audioStreamController:W.default,audioTrackController:M.default,emeController:p.default,cmcdController:c.default});function I(){return{cueHandler:u.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function _(v,h){if((h.liveSyncDurationCount||h.liveMaxLatencyDurationCount)&&(h.liveSyncDuration||h.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(h.liveMaxLatencyDurationCount!==void 0&&(h.liveSyncDurationCount===void 0||h.liveMaxLatencyDurationCount<=h.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(h.liveMaxLatencyDuration!==void 0&&(h.liveSyncDuration===void 0||h.liveMaxLatencyDuration<=h.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return a({},v,h)}function b(v){var h=v.loader;if(h!==d.default&&h!==r.default)s.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),v.progressive=!1;else{var C=Object(d.fetchSupported)();C&&(v.loader=d.default,v.progressive=!0,v.enableSoftwareAES=!0,s.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/polyfills/number.ts"),W=U("./src/utils/ewma-bandwidth-estimator.ts"),M=U("./src/events.ts"),K=U("./src/utils/buffer-helper.ts"),j=U("./src/errors.ts"),n=U("./src/types/loader.ts"),w=U("./src/utils/logger.ts");function m(c,r){for(var d=0;d<r.length;d++){var u=r[d];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(c,u.key,u)}}function f(c,r,d){return r&&m(c.prototype,r),d&&m(c,d),c}var p=function(){function c(d){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=d;var u=d.config;this.bwEstimator=new W.default(u.abrEwmaSlowVoD,u.abrEwmaFastVoD,u.abrEwmaDefaultEstimate),this.registerListeners()}var r=c.prototype;return r.registerListeners=function(){var u=this.hls;u.on(M.Events.FRAG_LOADING,this.onFragLoading,this),u.on(M.Events.FRAG_LOADED,this.onFragLoaded,this),u.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.on(M.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var u=this.hls;u.off(M.Events.FRAG_LOADING,this.onFragLoading,this),u.off(M.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.off(M.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},r.onFragLoading=function(u,o){var s=o.frag;if(s.type===n.PlaylistLevelType.MAIN&&!this.timer){var a;this.fragCurrent=s,this.partCurrent=(a=o.part)!=null?a:null,this.timer=self.setInterval(this.onCheck,100)}},r.onLevelLoaded=function(u,o){var s=this.hls.config;o.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)},r._abandonRulesCheck=function(){var u=this.fragCurrent,o=this.partCurrent,s=this.hls,a=s.autoLevelEnabled,R=s.config,O=s.media;if(!u||!O)return;var S=o?o.stats:u.stats,D=o?o.duration:u.duration;if(S.aborted){w.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!a||O.paused||!O.playbackRate||!O.readyState)return;var I=performance.now()-S.loading.start,_=Math.abs(O.playbackRate);if(I<=500*D/_)return;var b=s.levels,v=s.minAutoLevel,h=b[u.level],C=S.total||Math.max(S.loaded,Math.round(D*h.maxBitrate/8)),x=Math.max(1,S.bwEstimate?S.bwEstimate/8:S.loaded*1e3/I),g=(C-S.loaded)/x,P=O.currentTime,k=(K.BufferHelper.bufferInfo(O,P,R.maxBufferHole).end-P)/_;if(k>=2*D/_||g<=k)return;var y=Number.POSITIVE_INFINITY,A;for(A=u.level-1;A>v;A--){var F=b[A].maxBitrate;if(y=D*F/(8*.8*x),y<k)break}if(y>=g)return;var T=this.bwEstimator.getEstimate();w.logger.warn("Fragment "+u.sn+(o?" part "+o.index:"")+" of level "+u.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+A+`
Current BW estimate: `+(Object(V.isFiniteNumber)(T)?(T/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+g.toFixed(3)+` s
Estimated load time for the next fragment: `+y.toFixed(3)+` s
Time to underbuffer: `+k.toFixed(3)+" s"),s.nextLoadLevel=A,this.bwEstimator.sample(I,S.loaded),this.clearTimer(),u.loader&&(this.fragCurrent=this.partCurrent=null,u.loader.abort()),s.trigger(M.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:u,part:o,stats:S})},r.onFragLoaded=function(u,o){var s=o.frag,a=o.part;if(s.type===n.PlaylistLevelType.MAIN&&Object(V.isFiniteNumber)(s.sn)){var R=a?a.stats:s.stats,O=a?a.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var S=this.hls.levels[s.level],D=(S.loaded?S.loaded.bytes:0)+R.loaded,I=(S.loaded?S.loaded.duration:0)+O;S.loaded={bytes:D,duration:I},S.realBitrate=Math.round(8*D/I)}if(s.bitrateTest){var _={stats:R,frag:s,part:a,id:s.type};this.onFragBuffered(M.Events.FRAG_BUFFERED,_),s.bitrateTest=!1}}},r.onFragBuffered=function(u,o){var s=o.frag,a=o.part,R=a?a.stats:s.stats;if(R.aborted)return;if(s.type!==n.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var O=R.parsing.end-R.loading.start;this.bwEstimator.sample(O,R.loaded),R.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=O/1e3:this.bitrateTestDelay=0},r.onError=function(u,o){switch(o.details){case j.ErrorDetails.FRAG_LOAD_ERROR:case j.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},r.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},r.getNextABRAutoLevel=function(){var u=this.fragCurrent,o=this.partCurrent,s=this.hls,a=s.maxAutoLevel,R=s.config,O=s.minAutoLevel,S=s.media,D=o?o.duration:u?u.duration:0,I=S?S.currentTime:0,_=S&&S.playbackRate!==0?Math.abs(S.playbackRate):1,b=this.bwEstimator?this.bwEstimator.getEstimate():R.abrEwmaDefaultEstimate,v=(K.BufferHelper.bufferInfo(S,I,R.maxBufferHole).end-I)/_,h=this.findBestLevel(b,O,a,v,R.abrBandWidthFactor,R.abrBandWidthUpFactor);if(h>=0)return h;w.logger.trace((v?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var C=D?Math.min(D,R.maxStarvationDelay):R.maxStarvationDelay,x=R.abrBandWidthFactor,g=R.abrBandWidthUpFactor;if(!v){var P=this.bitrateTestDelay;if(P){var k=D?Math.min(D,R.maxLoadingDelay):R.maxLoadingDelay;C=k-P,w.logger.trace("bitrate test took "+Math.round(1e3*P)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*C)+" ms"),x=g=1}}return h=this.findBestLevel(b,O,a,v+C,x,g),Math.max(h,0)},r.findBestLevel=function(u,o,s,a,R,O){for(var S,D=this.fragCurrent,I=this.partCurrent,_=this.lastLoadedFragLevel,b=this.hls.levels,v=b[_],h=!!(v!=null&&(S=v.details)!==null&&S!==void 0&&S.live),C=v==null?void 0:v.codecSet,x=I?I.duration:D?D.duration:0,g=s;g>=o;g--){var P=b[g];if(!P||C&&P.codecSet!==C)continue;var k=P.details,y=(I?k==null?void 0:k.partTarget:k==null?void 0:k.averagetargetduration)||x,A=void 0;g<=_?A=R*u:A=O*u;var F=b[g].maxBitrate,T=F*y/A;if(w.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(A)+"/"+F+"/"+y+"/"+a+"/"+T),A>F&&(!T||h&&!this.bitrateTestDelay||T<a))return g}return-1},f(c,[{key:"nextAutoLevel",get:function(){var u=this._nextAutoLevel,o=this.bwEstimator;if(u!==-1&&(!o||!o.canEstimate()))return u;var s=this.getNextABRAutoLevel();return u!==-1&&(s=Math.min(u,s)),s},set:function(u){this._nextAutoLevel=u}}]),c}();G.default=p},"./src/controller/audio-stream-controller.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/polyfills/number.ts"),W=U("./src/controller/base-stream-controller.ts"),M=U("./src/events.ts"),K=U("./src/utils/buffer-helper.ts"),j=U("./src/controller/fragment-tracker.ts"),n=U("./src/types/level.ts"),w=U("./src/types/loader.ts"),m=U("./src/loader/fragment.ts"),f=U("./src/demux/chunk-cache.ts"),p=U("./src/demux/transmuxer-interface.ts"),c=U("./src/types/transmuxer.ts"),r=U("./src/controller/fragment-finders.ts"),d=U("./src/utils/discontinuities.ts"),u=U("./src/errors.ts"),o=U("./src/utils/logger.ts");function s(){return s=Object.assign||function(D){for(var I=1;I<arguments.length;I++){var _=arguments[I];for(var b in _)Object.prototype.hasOwnProperty.call(_,b)&&(D[b]=_[b])}return D},s.apply(this,arguments)}function a(D,I){D.prototype=Object.create(I.prototype),D.prototype.constructor=D,R(D,I)}function R(D,I){return R=Object.setPrototypeOf||function(b,v){return b.__proto__=v,b},R(D,I)}var O=100,S=function(D){a(I,D);function I(b,v){var h;return h=D.call(this,b,v,"[audio-stream-controller]")||this,h.videoBuffer=null,h.videoTrackCC=-1,h.waitingVideoCC=-1,h.audioSwitch=!1,h.trackId=-1,h.waitingData=null,h.mainDetails=null,h.bufferFlushed=!1,h._registerListeners(),h}var _=I.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._registerListeners=function(){var v=this.hls;v.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),v.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.on(M.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),v.on(M.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),v.on(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),v.on(M.Events.ERROR,this.onError,this),v.on(M.Events.BUFFER_RESET,this.onBufferReset,this),v.on(M.Events.BUFFER_CREATED,this.onBufferCreated,this),v.on(M.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),v.on(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),v.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_._unregisterListeners=function(){var v=this.hls;v.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),v.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.off(M.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),v.off(M.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),v.off(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),v.off(M.Events.ERROR,this.onError,this),v.off(M.Events.BUFFER_RESET,this.onBufferReset,this),v.off(M.Events.BUFFER_CREATED,this.onBufferCreated,this),v.off(M.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),v.off(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),v.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_.onInitPtsFound=function(v,h){var C=h.frag,x=h.id,g=h.initPTS;if(x==="main"){var P=C.cc;this.initPTS[C.cc]=g,this.log("InitPTS for cc: "+P+" found from main: "+g),this.videoTrackCC=P,this.state===W.State.WAITING_INIT_PTS&&this.tick()}},_.startLoad=function(v){if(!this.levels){this.startPosition=v,this.state=W.State.STOPPED;return}var h=this.lastCurrentTime;this.stopLoad(),this.setInterval(O),this.fragLoadError=0,h>0&&v===-1?(this.log("Override startPosition with lastCurrentTime @"+h.toFixed(3)),this.state=W.State.IDLE):(this.loadedmetadata=!1,this.state=W.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=v,this.tick()},_.doTick=function(){switch(this.state){case W.State.IDLE:this.doTickIdle();break;case W.State.WAITING_TRACK:{var v,h=this.levels,C=this.trackId,x=h==null||((v=h[C])===null||v===void 0)?void 0:v.details;if(x){if(this.waitForCdnTuneIn(x))break;this.state=W.State.WAITING_INIT_PTS}break}case W.State.FRAG_LOADING_WAITING_RETRY:{var g,P=performance.now(),k=this.retryDate;(!k||P>=k||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=W.State.IDLE);break}case W.State.WAITING_INIT_PTS:{var y=this.waitingData;if(y){var A=y.frag,F=y.part,T=y.cache,Y=y.complete;if(this.initPTS[A.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=W.State.FRAG_LOADING;var $=T.flush(),le={frag:A,part:F,payload:$,networkDetails:null};this._handleFragmentLoadProgress(le),Y&&D.prototype._handleFragmentLoadComplete.call(this,le)}else if(this.videoTrackCC!==this.waitingVideoCC)o.logger.log("Waiting fragment cc ("+A.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var de=this.getLoadPosition(),Pe=K.BufferHelper.bufferInfo(this.mediaBuffer,de,this.config.maxBufferHole),Se=Object(r.fragmentWithinToleranceTest)(Pe.end,this.config.maxFragLookUpTolerance,A);Se<0&&(o.logger.log("Waiting fragment cc ("+A.cc+") @ "+A.start+" cancelled because another fragment at "+Pe.end+" is needed"),this.clearWaitingFragment())}}else this.state=W.State.IDLE}}this.onTickEnd()},_.clearWaitingFragment=function(){var v=this.waitingData;v&&(this.fragmentTracker.removeFragment(v.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=W.State.IDLE)},_.onTickEnd=function(){var v=this.media;if(!v||!v.readyState)return;var h=this.mediaBuffer?this.mediaBuffer:v,C=h.buffered;!this.loadedmetadata&&C.length&&(this.loadedmetadata=!0),this.lastCurrentTime=v.currentTime},_.doTickIdle=function(){var v,h,C=this.hls,x=this.levels,g=this.media,P=this.trackId,k=C.config;if(!x||!x[P])return;if(!g&&(this.startFragRequested||!k.startFragPrefetch))return;var y=x[P],A=y.details;if(!A||A.live&&this.levelLastLoaded!==P||this.waitForCdnTuneIn(A)){this.state=W.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,m.ElementaryStreamTypes.AUDIO,w.PlaylistLevelType.AUDIO));var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,w.PlaylistLevelType.AUDIO);if(F===null)return;var T=F.len,Y=this.getMaxBufferLength(),$=this.audioSwitch;if(T>=Y&&!$)return;if(!$&&this._streamEnded(F,A)){C.trigger(M.Events.BUFFER_EOS,{type:"audio"}),this.state=W.State.ENDED;return}var le=A.fragments,de=le[0].start,Pe=F.end;if($){var Se=this.getLoadPosition();Pe=Se,A.PTSKnown&&Se<de&&((F.end>de||F.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),g.currentTime=de+.05))}var we=this.getNextFragment(Pe,A);if(!we){this.bufferFlushed=!0;return}((v=we.decryptdata)===null||v===void 0?void 0:v.keyFormat)==="identity"&&!((h=we.decryptdata)!==null&&h!==void 0&&h.key)?this.loadKey(we,A):this.loadFragment(we,A,Pe)},_.getMaxBufferLength=function(){var v=D.prototype.getMaxBufferLength.call(this),h=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,w.PlaylistLevelType.MAIN);return h===null?v:Math.max(v,h.len)},_.onMediaDetaching=function(){this.videoBuffer=null,D.prototype.onMediaDetaching.call(this)},_.onAudioTracksUpdated=function(v,h){var C=h.audioTracks;this.resetTransmuxer(),this.levels=C.map(function(x){return new n.Level(x)})},_.onAudioTrackSwitching=function(v,h){var C=!!h.url;this.trackId=h.id;var x=this.fragCurrent;x!=null&&x.loader&&x.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),C?this.setInterval(O):this.resetTransmuxer(),C?(this.audioSwitch=!0,this.state=W.State.IDLE):this.state=W.State.STOPPED,this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},_.onLevelLoaded=function(v,h){this.mainDetails=h.details},_.onAudioTrackLoaded=function(v,h){var C,x=this.levels,g=h.details,P=h.id;if(!x){this.warn("Audio tracks were reset while loading level "+P);return}this.log("Track "+P+" loaded ["+g.startSN+","+g.endSN+"],duration:"+g.totalduration);var k=x[P],y=0;if(g.live||(C=k.details)!==null&&C!==void 0&&C.live){var A=this.mainDetails;if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed||!A)return;!k.details&&g.hasProgramDateTime&&A.hasProgramDateTime?(Object(d.alignMediaPlaylistByPDT)(g,A),y=g.fragments[0].start):y=this.alignPlaylists(g,k.details)}k.details=g,this.levelLastLoaded=P,!this.startFragRequested&&(this.mainDetails||!g.live)&&this.setStartPosition(k.details,y),this.state===W.State.WAITING_TRACK&&!this.waitForCdnTuneIn(g)&&(this.state=W.State.IDLE),this.tick()},_._handleFragmentLoadProgress=function(v){var h,C=v.frag,x=v.part,g=v.payload,P=this.config,k=this.trackId,y=this.levels;if(!y){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+C.sn+" of level "+C.level+" will not be buffered");return}var A=y[k];console.assert(A,"Audio track is defined on fragment load progress");var F=A.details;console.assert(F,"Audio track details are defined on fragment load progress");var T=P.defaultAudioCodec||A.audioCodec||"mp4a.40.2",Y=this.transmuxer;Y||(Y=this.transmuxer=new p.default(this.hls,w.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var $=this.initPTS[C.cc],le=(h=C.initSegment)===null||h===void 0?void 0:h.data;if($!==void 0){var de=!1,Pe=x?x.index:-1,Se=Pe!==-1,we=new c.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,g.byteLength,Pe,Se);Y.push(g,le,T,"",C,x,F.totalduration,de,we,$)}else{o.logger.log("Unknown video PTS for cc "+C.cc+", waiting for video PTS before demuxing audio frag "+C.sn+" of ["+F.startSN+" ,"+F.endSN+"],track "+k);var Fe=this.waitingData=this.waitingData||{frag:C,part:x,cache:new f.default,complete:!1},Me=Fe.cache;Me.push(new Uint8Array(g)),this.waitingVideoCC=this.videoTrackCC,this.state=W.State.WAITING_INIT_PTS}},_._handleFragmentLoadComplete=function(v){if(this.waitingData){this.waitingData.complete=!0;return}D.prototype._handleFragmentLoadComplete.call(this,v)},_.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},_.onBufferCreated=function(v,h){var C=h.tracks.audio;C&&(this.mediaBuffer=C.buffer),h.tracks.video&&(this.videoBuffer=h.tracks.video.buffer)},_.onFragBuffered=function(v,h){var C=h.frag,x=h.part;if(C.type!==w.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(C)){this.warn("Fragment "+C.sn+(x?" p: "+x.index:"")+" of level "+C.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}C.sn!=="initSegment"&&(this.fragPrevious=C,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(C,x)},_.onError=function(v,h){switch(h.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(w.PlaylistLevelType.AUDIO,h);break;case u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==W.State.ERROR&&this.state!==W.State.STOPPED&&(this.state=h.fatal?W.State.ERROR:W.State.IDLE,this.warn(h.details+" while loading frag, switching to "+this.state+" state"));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(h.parent==="audio"&&(this.state===W.State.PARSING||this.state===W.State.PARSED)){var C=!0,x=this.getFwdBufferInfo(this.mediaBuffer,w.PlaylistLevelType.AUDIO);x&&x.len>.5&&(C=!this.reduceMaxBufferLength(x.len)),C&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},_.onBufferFlushed=function(v,h){var C=h.type;C===m.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},_._handleTransmuxComplete=function(v){var h,C="audio",x=this.hls,g=v.remuxResult,P=v.chunkMeta,k=this.getCurrentContext(P);if(!k){this.warn("The loading context changed while buffering fragment "+P.sn+" of level "+P.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(P.level);return}var y=k.frag,A=k.part,F=g.audio,T=g.text,Y=g.id3,$=g.initSegment;if(this.fragContextChanged(y))return;if(this.state=W.State.PARSING,this.audioSwitch&&F&&this.completeAudioSwitch(),$!=null&&$.tracks&&(this._bufferInitSegment($.tracks,y,P),x.trigger(M.Events.FRAG_PARSING_INIT_SEGMENT,{frag:y,id:C,tracks:$.tracks})),F){var le=F.startPTS,de=F.endPTS,Pe=F.startDTS,Se=F.endDTS;A&&(A.elementaryStreams[m.ElementaryStreamTypes.AUDIO]={startPTS:le,endPTS:de,startDTS:Pe,endDTS:Se}),y.setElementaryStreamInfo(m.ElementaryStreamTypes.AUDIO,le,de,Pe,Se),this.bufferFragmentData(F,y,A,P)}if(Y!=null&&(h=Y.samples)!==null&&h!==void 0&&h.length){var we=s({frag:y,id:C},Y);x.trigger(M.Events.FRAG_PARSING_METADATA,we)}if(T){var Fe=s({frag:y,id:C},T);x.trigger(M.Events.FRAG_PARSING_USERDATA,Fe)}},_._bufferInitSegment=function(v,h,C){if(this.state!==W.State.PARSING)return;v.video&&delete v.video;var x=v.audio;if(!x)return;x.levelCodec=x.codec,x.id="audio",this.log("Init audio buffer, container:"+x.container+", codecs[parsed]=["+x.codec+"]"),this.hls.trigger(M.Events.BUFFER_CODECS,v);var g=x.initSegment;if(g!=null&&g.byteLength){var P={type:"audio",frag:h,part:null,chunkMeta:C,parent:h.type,data:g};this.hls.trigger(M.Events.BUFFER_APPENDING,P)}this.tick()},_.loadFragment=function(v,h,C){var x=this.fragmentTracker.getState(v);this.fragCurrent=v,(this.audioSwitch||x===j.FragmentState.NOT_LOADED||x===j.FragmentState.PARTIAL)&&(v.sn==="initSegment"?this._loadInitSegment(v):h.live&&!Object(V.isFiniteNumber)(this.initPTS[v.cc])?(this.log("Waiting for video PTS in continuity counter "+v.cc+" of live stream before loading audio fragment "+v.sn+" of level "+this.trackId),this.state=W.State.WAITING_INIT_PTS):(this.startFragRequested=!0,D.prototype.loadFragment.call(this,v,h,C)))},_.completeAudioSwitch=function(){var v=this.hls,h=this.media,C=this.trackId;h&&(this.log("Switching audio track : flushing all audio"),D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,v.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:C})},I}(W.default);G.default=S},"./src/controller/audio-track-controller.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/events.ts"),W=U("./src/errors.ts"),M=U("./src/controller/base-playlist-controller.ts"),K=U("./src/types/loader.ts");function j(p,c){for(var r=0;r<c.length;r++){var d=c[r];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(p,d.key,d)}}function n(p,c,r){return c&&j(p.prototype,c),r&&j(p,r),p}function w(p,c){p.prototype=Object.create(c.prototype),p.prototype.constructor=p,m(p,c)}function m(p,c){return m=Object.setPrototypeOf||function(d,u){return d.__proto__=u,d},m(p,c)}var f=function(p){w(c,p);function c(d){var u;return u=p.call(this,d,"[audio-track-controller]")||this,u.tracks=[],u.groupId=null,u.tracksInGroup=[],u.trackId=-1,u.trackName="",u.selectDefaultTrack=!0,u.registerListeners(),u}var r=c.prototype;return r.registerListeners=function(){var u=this.hls;u.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.on(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.on(V.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var u=this.hls;u.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.off(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.off(V.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,p.prototype.destroy.call(this)},r.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},r.onManifestParsed=function(u,o){this.tracks=o.audioTracks||[]},r.onAudioTrackLoaded=function(u,o){var s=o.id,a=o.details,R=this.tracksInGroup[s];if(!R){this.warn("Invalid audio track id "+s);return}var O=R.details;R.details=o.details,this.log("audioTrack "+s+" loaded ["+a.startSN+"-"+a.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,o,O))},r.onLevelLoading=function(u,o){this.switchLevel(o.level)},r.onLevelSwitching=function(u,o){this.switchLevel(o.level)},r.switchLevel=function(u){var o=this.hls.levels[u];if(!(o!=null&&o.audioGroupIds))return;var s=o.audioGroupIds[o.urlId];if(this.groupId!==s){this.groupId=s;var a=this.tracks.filter(function(O){return!s||O.groupId===s});this.selectDefaultTrack&&!a.some(function(O){return O.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=a;var R={audioTracks:a};this.log("Updating audio tracks, "+a.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(V.Events.AUDIO_TRACKS_UPDATED,R),this.selectInitialTrack()}},r.onError=function(u,o){if(p.prototype.onError.call(this,u,o),o.fatal||!o.context)return;o.context.type===K.PlaylistContextType.AUDIO_TRACK&&o.context.id===this.trackId&&o.context.groupId===this.groupId&&this.retryLoadingOrFail(o)},r.setAudioTrack=function(u){var o=this.tracksInGroup;if(u<0||u>=o.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var s=o[this.trackId];this.log("Now switching to audio-track index "+u);var a=o[u],R=a.id,O=a.groupId,S=O===void 0?"":O,D=a.name,I=a.type,_=a.url;if(this.trackId=u,this.trackName=D,this.selectDefaultTrack=!1,this.hls.trigger(V.Events.AUDIO_TRACK_SWITCHING,{id:R,groupId:S,name:D,type:I,url:_}),a.details&&!a.details.live)return;var b=this.switchParams(a.url,s==null?void 0:s.details);this.loadPlaylist(b)},r.selectInitialTrack=function(){var u=this.tracksInGroup;console.assert(u.length,"Initial audio track should be selected when tracks are known");var o=this.trackName,s=this.findTrackId(o)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},r.findTrackId=function(u){for(var o=this.tracksInGroup,s=0;s<o.length;s++){var a=o[s];if((!this.selectDefaultTrack||a.default)&&(!u||u===a.name))return a.id}return-1},r.loadPlaylist=function(u){var o=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(o)){var s=o.id,a=o.groupId,R=o.url;if(u)try{R=u.addDirectives(R)}catch(O){this.warn("Could not construct new URL with HLS Delivery Directives: "+O)}this.log("loading audio-track playlist for id: "+s),this.clearTimer(),this.hls.trigger(V.Events.AUDIO_TRACK_LOADING,{url:R,id:s,groupId:a,deliveryDirectives:u||null})}},n(c,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(u){this.selectDefaultTrack=!1,this.setAudioTrack(u)}}]),c}(M.default);G.default=f},"./src/controller/base-playlist-controller.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return n});var V=U("./src/polyfills/number.ts"),W=U("./src/types/level.ts"),M=U("./src/controller/level-helper.ts"),K=U("./src/utils/logger.ts"),j=U("./src/errors.ts"),n=function(){function w(f,p){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=K.logger.log.bind(K.logger,p+":"),this.warn=K.logger.warn.bind(K.logger,p+":"),this.hls=f}var m=w.prototype;return m.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},m.onError=function(p,c){c.fatal&&c.type===j.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},m.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},m.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},m.stopLoad=function(){this.canLoad=!1,this.clearTimer()},m.switchParams=function(p,c){var r=c==null?void 0:c.renditionReports;if(r)for(var d=0;d<r.length;d++){var u=r[d],o=""+u.URI;if(o===p.substr(-o.length)){var s=parseInt(u["LAST-MSN"]),a=parseInt(u["LAST-PART"]);if(c&&this.hls.config.lowLatencyMode){var R=Math.min(c.age-c.partTarget,c.targetduration);a!==void 0&&R>c.partTarget&&(a+=1)}if(Object(V.isFiniteNumber)(s))return new W.HlsUrlParameters(s,Object(V.isFiniteNumber)(a)?a:void 0,W.HlsSkip.No)}}},m.loadPlaylist=function(p){},m.shouldLoadTrack=function(p){return this.canLoad&&p&&!!p.url&&(!p.details||p.details.live)},m.playlistLoaded=function(p,c,r){var d=this,u=c.details,o=c.stats,s=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(u.advancedDateTime=Date.now()-s,u.live||r!=null&&r.live){if(u.reloaded(r),r&&this.log("live playlist "+p+" "+(u.advanced?"REFRESHED "+u.lastPartSn+"-"+u.lastPartIndex:"MISSED")),r&&u.fragments.length>0&&Object(M.mergeDetails)(r,u),!this.canLoad||!u.live)return;var a,R=void 0,O=void 0;if(u.canBlockReload&&u.endSN&&u.advanced){var S=this.hls.config.lowLatencyMode,D=u.lastPartSn,I=u.endSN,_=u.lastPartIndex,b=_!==-1,v=D===I,h=S?0:_;b?(R=v?I+1:D,O=v?h:_+1):R=I+1;var C=u.age,x=C+u.ageHeader,g=Math.min(x-u.partTarget,u.targetduration*1.5);if(g>0){if(r&&g>r.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+r.tuneInGoal+" to: "+g+" with playlist age: "+u.age),g=0;else{var P=Math.floor(g/u.targetduration);if(R+=P,O!==void 0){var k=Math.round(g%u.targetduration/u.partTarget);O+=k}this.log("CDN Tune-in age: "+u.ageHeader+"s last advanced "+C.toFixed(2)+"s goal: "+g+" skip sn "+P+" to part "+O)}u.tuneInGoal=g}if(a=this.getDeliveryDirectives(u,c.deliveryDirectives,R,O),S||!v){this.loadPlaylist(a);return}}else a=this.getDeliveryDirectives(u,c.deliveryDirectives,R,O);var y=Object(M.computeReloadInterval)(u,o);R!==void 0&&u.canBlockReload&&(y-=u.partTarget||1),this.log("reload live playlist "+p+" in "+Math.round(y)+" ms"),this.timer=self.setTimeout(function(){return d.loadPlaylist(a)},y)}else this.clearTimer()},m.getDeliveryDirectives=function(p,c,r,d){var u=Object(W.getSkipValue)(p,r);return c!=null&&c.skip&&p.deltaUpdateFailed&&(r=c.msn,d=c.part,u=W.HlsSkip.No),new W.HlsUrlParameters(r,d,u)},m.retryLoadingOrFail=function(p){var c=this,r=this.hls.config,d=this.retryCount<r.levelLoadingMaxRetry;if(d){var u;if(this.retryCount++,p.details.indexOf("LoadTimeOut")>-1&&(u=p.context)!==null&&u!==void 0&&u.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+p.details+'"'),this.loadPlaylist();else{var o=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},o),this.warn("retry playlist loading #"+this.retryCount+" in "+o+' ms after "'+p.details+'"')}}else this.warn('cannot recover from error "'+p.details+'"'),this.clearTimer(),p.fatal=!0;return d},w}()},"./src/controller/base-stream-controller.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"State",function(){return I}),U.d(G,"default",function(){return _});var V=U("./src/polyfills/number.ts"),W=U("./src/task-loop.ts"),M=U("./src/controller/fragment-tracker.ts"),K=U("./src/utils/buffer-helper.ts"),j=U("./src/utils/logger.ts"),n=U("./src/events.ts"),w=U("./src/errors.ts"),m=U("./src/types/transmuxer.ts"),f=U("./src/utils/mp4-tools.ts"),p=U("./src/utils/discontinuities.ts"),c=U("./src/controller/fragment-finders.ts"),r=U("./src/controller/level-helper.ts"),d=U("./src/loader/fragment-loader.ts"),u=U("./src/crypt/decrypter.ts"),o=U("./src/utils/time-ranges.ts"),s=U("./src/types/loader.ts");function a(b,v){for(var h=0;h<v.length;h++){var C=v[h];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(b,C.key,C)}}function R(b,v,h){return v&&a(b.prototype,v),h&&a(b,h),b}function O(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function S(b,v){b.prototype=Object.create(v.prototype),b.prototype.constructor=b,D(b,v)}function D(b,v){return D=Object.setPrototypeOf||function(C,x){return C.__proto__=x,C},D(b,v)}var I={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(b){S(v,b);function v(C,x,g){var P;return P=b.call(this)||this,P.hls=void 0,P.fragPrevious=null,P.fragCurrent=null,P.fragmentTracker=void 0,P.transmuxer=null,P._state=I.STOPPED,P.media=void 0,P.mediaBuffer=void 0,P.config=void 0,P.bitrateTest=!1,P.lastCurrentTime=0,P.nextLoadPosition=0,P.startPosition=0,P.loadedmetadata=!1,P.fragLoadError=0,P.retryDate=0,P.levels=null,P.fragmentLoader=void 0,P.levelLastLoaded=null,P.startFragRequested=!1,P.decrypter=void 0,P.initPTS=[],P.onvseeking=null,P.onvended=null,P.logPrefix="",P.log=void 0,P.warn=void 0,P.logPrefix=g,P.log=j.logger.log.bind(j.logger,g+":"),P.warn=j.logger.warn.bind(j.logger,g+":"),P.hls=C,P.fragmentLoader=new d.default(C.config),P.fragmentTracker=x,P.config=C.config,P.decrypter=new u.default(C,C.config),C.on(n.Events.KEY_LOADED,P.onKeyLoaded,O(P)),P}var h=v.prototype;return h.doTick=function(){this.onTickEnd()},h.onTickEnd=function(){},h.startLoad=function(x){},h.stopLoad=function(){this.fragmentLoader.abort();var x=this.fragCurrent;x&&this.fragmentTracker.removeFragment(x),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=I.STOPPED},h._streamEnded=function(x,g){var P=this.fragCurrent,k=this.fragmentTracker;if(!g.live&&P&&P.sn===g.endSN&&!x.nextStart){var y=k.getState(P);return y===M.FragmentState.PARTIAL||y===M.FragmentState.OK}return!1},h.onMediaAttached=function(x,g){var P=this.media=this.mediaBuffer=g.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),P.addEventListener("seeking",this.onvseeking),P.addEventListener("ended",this.onvended);var k=this.config;this.levels&&k.autoStartLoad&&this.state===I.STOPPED&&this.startLoad(k.startPosition)},h.onMediaDetaching=function(){var x=this.media;x!=null&&x.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),x&&(x.removeEventListener("seeking",this.onvseeking),x.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},h.onMediaSeeking=function(){var x=this.config,g=this.fragCurrent,P=this.media,k=this.mediaBuffer,y=this.state,A=P?P.currentTime:0,F=K.BufferHelper.bufferInfo(k||P,A,x.maxBufferHole);if(this.log("media seeking to "+(Object(V.isFiniteNumber)(A)?A.toFixed(3):A)+", state: "+y),y===I.ENDED)this.resetLoadingState();else if(g&&!F.len){var T=x.maxFragLookUpTolerance,Y=g.start-T,$=g.start+g.duration+T,le=A>$;(A<Y||le)&&(le&&g.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),g.loader.abort()),this.resetLoadingState())}P&&(this.lastCurrentTime=A),!this.loadedmetadata&&!F.len&&(this.nextLoadPosition=this.startPosition=A),this.tickImmediate()},h.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},h.onKeyLoaded=function(x,g){if(this.state!==I.KEY_LOADING||g.frag!==this.fragCurrent||!this.levels)return;this.state=I.IDLE;var P=this.levels[g.frag.level].details;P&&this.loadFragment(g.frag,P,g.frag.start)},h.onHandlerDestroying=function(){this.stopLoad(),b.prototype.onHandlerDestroying.call(this)},h.onHandlerDestroyed=function(){this.state=I.STOPPED,this.hls.off(n.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,b.prototype.onHandlerDestroyed.call(this)},h.loadKey=function(x,g){this.log("Loading key for "+x.sn+" of ["+g.startSN+"-"+g.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+x.level),this.state=I.KEY_LOADING,this.fragCurrent=x,this.hls.trigger(n.Events.KEY_LOADING,{frag:x})},h.loadFragment=function(x,g,P){this._loadFragForPlayback(x,g,P)},h._loadFragForPlayback=function(x,g,P){var k=this,y=function(F){if(k.fragContextChanged(x)){k.warn("Fragment "+x.sn+(F.part?" p: "+F.part.index:"")+" of level "+x.level+" was dropped during download."),k.fragmentTracker.removeFragment(x);return}x.stats.chunkCount++,k._handleFragmentLoadProgress(F)};this._doFragLoad(x,g,P,y).then(function(A){if(!A)return;k.fragLoadError=0;var F=k.state;if(k.fragContextChanged(x)){(F===I.FRAG_LOADING||F===I.BACKTRACKING||!k.fragCurrent&&F===I.PARSING)&&(k.fragmentTracker.removeFragment(x),k.state=I.IDLE);return}if("payload"in A&&(k.log("Loaded fragment "+x.sn+" of level "+x.level),k.hls.trigger(n.Events.FRAG_LOADED,A),k.state===I.BACKTRACKING)){k.fragmentTracker.backtrack(x,A),k.resetFragmentLoading(x);return}k._handleFragmentLoadComplete(A)}).catch(function(A){k.warn(A),k.resetFragmentLoading(x)})},h.flushMainBuffer=function(x,g,P){if(P===void 0&&(P=null),!(x-g))return;var k={startOffset:x,endOffset:g,type:P};this.fragLoadError=0,this.hls.trigger(n.Events.BUFFER_FLUSHING,k)},h._loadInitSegment=function(x){var g=this;this._doFragLoad(x).then(function(P){if(!P||g.fragContextChanged(x)||!g.levels)throw new Error("init load aborted");return P}).then(function(P){var k=g.hls,y=P.payload,A=x.decryptdata;if(y&&y.byteLength>0&&A&&A.key&&A.iv&&A.method==="AES-128"){var F=self.performance.now();return g.decrypter.webCryptoDecrypt(new Uint8Array(y),A.key.buffer,A.iv.buffer).then(function(T){var Y=self.performance.now();return k.trigger(n.Events.FRAG_DECRYPTED,{frag:x,payload:T,stats:{tstart:F,tdecrypt:Y}}),P.payload=T,P})}return P}).then(function(P){var k=g.fragCurrent,y=g.hls,A=g.levels;if(!A)throw new Error("init load aborted, missing levels");var F=A[x.level].details;console.assert(F,"Level details are defined when init segment is loaded");var T=x.stats;g.state=I.IDLE,g.fragLoadError=0,x.data=new Uint8Array(P.payload),T.parsing.start=T.buffering.start=self.performance.now(),T.parsing.end=T.buffering.end=self.performance.now(),P.frag===k&&y.trigger(n.Events.FRAG_BUFFERED,{stats:T,frag:k,part:null,id:x.type}),g.tick()}).catch(function(P){g.warn(P),g.resetFragmentLoading(x)})},h.fragContextChanged=function(x){var g=this.fragCurrent;return!x||!g||x.level!==g.level||x.sn!==g.sn||x.urlId!==g.urlId},h.fragBufferedComplete=function(x,g){var P=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+x.type+" sn: "+x.sn+(g?" part: "+g.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+x.level+" "+o.default.toString(K.BufferHelper.getBuffered(P))),this.state=I.IDLE,this.tick()},h._handleFragmentLoadComplete=function(x){var g=this.transmuxer;if(!g)return;var P=x.frag,k=x.part,y=x.partsLoaded,A=!y||y.length===0||y.some(function(T){return!T}),F=new m.ChunkMetadata(P.level,P.sn,P.stats.chunkCount+1,0,k?k.index:-1,!A);g.flush(F)},h._handleFragmentLoadProgress=function(x){},h._doFragLoad=function(x,g,P,k){var y=this;if(P===void 0&&(P=null),!this.levels)throw new Error("frag load aborted, missing levels");if(P=Math.max(x.start,P||0),this.config.lowLatencyMode&&g){var A=g.partList;if(A&&k){P>x.end&&g.fragmentHint&&(x=g.fragmentHint);var F=this.getNextPart(A,x,P);if(F>-1){var T=A[F];return this.log("Loading part sn: "+x.sn+" p: "+T.index+" cc: "+x.cc+" of playlist ["+g.startSN+"-"+g.endSN+"] parts [0-"+F+"-"+(A.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+x.level+", target: "+parseFloat(P.toFixed(3))),this.nextLoadPosition=T.start+T.duration,this.state=I.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:x,part:A[F],targetBufferTime:P}),this.doFragPartsLoad(x,A,F,k).catch(function(Y){return y.handleFragLoadError(Y)})}else if(!x.url||this.loadedEndOfParts(A,P))return Promise.resolve(null)}}return this.log("Loading fragment "+x.sn+" cc: "+x.cc+" "+(g?"of ["+g.startSN+"-"+g.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+x.level+", target: "+parseFloat(P.toFixed(3))),Object(V.isFiniteNumber)(x.sn)&&!this.bitrateTest&&(this.nextLoadPosition=x.start+x.duration),this.state=I.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:x,targetBufferTime:P}),this.fragmentLoader.load(x,k).catch(function(Y){return y.handleFragLoadError(Y)})},h.doFragPartsLoad=function(x,g,P,k){var y=this;return new Promise(function(A,F){var T=[],Y=function $(le){var de=g[le];y.fragmentLoader.loadPart(x,de,k).then(function(Pe){T[de.index]=Pe;var Se=Pe.part;y.hls.trigger(n.Events.FRAG_LOADED,Pe);var we=g[le+1];if(we&&we.fragment===x)$(le+1);else return A({frag:x,part:Se,partsLoaded:T})}).catch(F)};Y(P)})},h.handleFragLoadError=function(x){var g=x.data;return g&&g.details===w.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(g.frag,g.part):this.hls.trigger(n.Events.ERROR,g),null},h._handleTransmuxerFlush=function(x){var g=this.getCurrentContext(x);if(!g||this.state!==I.PARSING){this.fragCurrent||(this.state=I.IDLE);return}var P=g.frag,k=g.part,y=g.level,A=self.performance.now();P.stats.parsing.end=A,k&&(k.stats.parsing.end=A),this.updateLevelTiming(P,k,y,x.partial)},h.getCurrentContext=function(x){var g=this.levels,P=x.level,k=x.sn,y=x.part;if(!g||!g[P])return this.warn("Levels object was unset while buffering fragment "+k+" of level "+P+". The current chunk will not be buffered."),null;var A=g[P],F=y>-1?Object(r.getPartWith)(A,k,y):null,T=F?F.fragment:Object(r.getFragmentWithSN)(A,k,this.fragCurrent);return T?{frag:T,part:F,level:A}:null},h.bufferFragmentData=function(x,g,P,k){if(!x||this.state!==I.PARSING)return;var y=x.data1,A=x.data2,F=y;if(y&&A&&(F=Object(f.appendUint8Array)(y,A)),!F||!F.length)return;var T={type:x.type,frag:g,part:P,chunkMeta:k,parent:g.type,data:F};this.hls.trigger(n.Events.BUFFER_APPENDING,T),x.dropped&&x.independent&&!P&&this.flushBufferGap(g)},h.flushBufferGap=function(x){var g=this.media;if(!g)return;if(!K.BufferHelper.isBuffered(g,g.currentTime)){this.flushMainBuffer(0,x.start);return}var P=g.currentTime,k=K.BufferHelper.bufferInfo(g,P,0),y=x.duration,A=Math.min(this.config.maxFragLookUpTolerance*2,y*.25),F=Math.max(Math.min(x.start-A,k.end-A),P+A);x.start-F>A&&this.flushMainBuffer(F,x.start)},h.getFwdBufferInfo=function(x,g){var P=this.config,k=this.getLoadPosition();if(!Object(V.isFiniteNumber)(k))return null;var y=K.BufferHelper.bufferInfo(x,k,P.maxBufferHole);if(y.len===0&&y.nextStart!==void 0){var A=this.fragmentTracker.getBufferedFrag(k,g);if(A&&y.nextStart<A.end)return K.BufferHelper.bufferInfo(x,k,Math.max(y.nextStart,P.maxBufferHole))}return y},h.getMaxBufferLength=function(x){var g=this.config,P;return x?P=Math.max(8*g.maxBufferSize/x,g.maxBufferLength):P=g.maxBufferLength,Math.min(P,g.maxMaxBufferLength)},h.reduceMaxBufferLength=function(x){var g=this.config,P=x||g.maxBufferLength;return g.maxMaxBufferLength>=P?(g.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+g.maxMaxBufferLength+"s"),!0):!1},h.getNextFragment=function(x,g){var P,k,y=g.fragments,A=y.length;if(!A)return null;var F=this.config,T=y[0].start,Y;if(g.live){var $=F.initialLiveManifestSize;if(A<$)return this.warn("Not enough fragments to start playback (have: "+A+", need: "+$+")"),null;!g.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(Y=this.getInitialLiveFragment(g,y),this.startPosition=Y?this.hls.liveSyncPosition||Y.start:x)}else x<=T&&(Y=y[0]);if(!Y){var le=F.lowLatencyMode?g.partEnd:g.fragmentEnd;Y=this.getFragmentAtPosition(x,le,g)}return(P=Y)!==null&&P!==void 0&&P.initSegment&&!((k=Y)!==null&&k!==void 0&&k.initSegment.data)&&!this.bitrateTest&&(Y=Y.initSegment),Y},h.getNextPart=function(x,g,P){for(var k=-1,y=!1,A=!0,F=0,T=x.length;F<T;F++){var Y=x[F];if(A=A&&!Y.independent,k>-1&&P<Y.start)break;var $=Y.loaded;!$&&(y||Y.independent||A)&&Y.fragment===g&&(k=F),y=$}return k},h.loadedEndOfParts=function(x,g){var P=x[x.length-1];return P&&g>P.start&&P.loaded},h.getInitialLiveFragment=function(x,g){var P=this.fragPrevious,k=null;if(P){if(x.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+P.programDateTime),k=Object(c.findFragmentByPDT)(g,P.endProgramDateTime,this.config.maxFragLookUpTolerance)),!k){var y=P.sn+1;if(y>=x.startSN&&y<=x.endSN){var A=g[y-x.startSN];P.cc===A.cc&&(k=A,this.log("Live playlist, switching playlist, load frag with next SN: "+k.sn))}k||(k=Object(c.findFragWithCC)(g,P.cc),k&&this.log("Live playlist, switching playlist, load frag with same CC: "+k.sn))}}else{var F=this.hls.liveSyncPosition;F!==null&&(k=this.getFragmentAtPosition(F,this.bitrateTest?x.fragmentEnd:x.edge,x))}return k},h.getFragmentAtPosition=function(x,g,P){var k=this.config,y=this.fragPrevious,A=P.fragments,F=P.endSN,T=P.fragmentHint,Y=k.maxFragLookUpTolerance,$=!!(k.lowLatencyMode&&P.partList&&T);$&&T&&!this.bitrateTest&&(A=A.concat(T),F=T.sn);var le;if(x<g){var de=x>g-Y?0:Y;le=Object(c.findFragmentByPTS)(y,A,x,de)}else le=A[A.length-1];if(le){var Pe=le.sn-P.startSN,Se=y&&le.level===y.level,we=A[Pe+1],Fe=this.fragmentTracker.getState(le);if(Fe===M.FragmentState.BACKTRACKED){le=null;for(var Me=Pe;A[Me]&&this.fragmentTracker.getState(A[Me])===M.FragmentState.BACKTRACKED;)y?le=A[Me--]:le=A[--Me];le||(le=we)}else y&&le.sn===y.sn&&!$&&(Se&&(le.sn<F&&this.fragmentTracker.getState(we)!==M.FragmentState.OK?(this.log("SN "+le.sn+" just loaded, load next one: "+we.sn),le=we):le=null))}return le},h.synchronizeToLiveEdge=function(x){var g=this.config,P=this.media;if(!P)return;var k=this.hls.liveSyncPosition,y=P.currentTime,A=x.fragments[0].start,F=x.edge,T=y>=A-g.maxFragLookUpTolerance&&y<=F;if(k!==null&&P.duration>k&&(y<k||!T)){var Y=g.liveMaxLatencyDuration!==void 0?g.liveMaxLatencyDuration:g.liveMaxLatencyDurationCount*x.targetduration;(!T&&P.readyState<4||y<F-Y)&&(this.loadedmetadata||(this.nextLoadPosition=k),P.readyState&&(this.warn("Playback: "+y.toFixed(3)+" is located too far from the end of live sliding playlist: "+F+", reset currentTime to : "+k.toFixed(3)),P.currentTime=k))}},h.alignPlaylists=function(x,g){var P=this.levels,k=this.levelLastLoaded,y=this.fragPrevious,A=k!==null?P[k]:null,F=x.fragments.length;if(!F)return this.warn("No fragments in live playlist"),0;var T=x.fragments[0].start,Y=!g,$=x.alignedSliding&&Object(V.isFiniteNumber)(T);if(Y||!$&&!T){Object(p.alignStream)(y,A,x);var le=x.fragments[0].start;return this.log("Live playlist sliding: "+le.toFixed(2)+" start-sn: "+(g?g.startSN:"na")+"->"+x.startSN+" prev-sn: "+(y?y.sn:"na")+" fragments: "+F),le}return T},h.waitForCdnTuneIn=function(x){var g=3;return x.live&&x.canBlockReload&&x.tuneInGoal>Math.max(x.partHoldBack,x.partTarget*g)},h.setStartPosition=function(x,g){var P=this.startPosition;if(P<g&&(P=-1),P===-1||this.lastCurrentTime===-1){var k=x.startTimeOffset;Object(V.isFiniteNumber)(k)?(P=g+k,k<0&&(P+=x.totalduration),P=Math.min(Math.max(g,P),g+x.totalduration),this.log("Start time offset "+k+" found in playlist, adjust startPosition to "+P),this.startPosition=P):x.live?P=this.hls.liveSyncPosition||g:this.startPosition=P=0,this.lastCurrentTime=P}this.nextLoadPosition=P},h.getLoadPosition=function(){var x=this.media,g=0;return this.loadedmetadata&&x?g=x.currentTime:this.nextLoadPosition&&(g=this.nextLoadPosition),g},h.handleFragLoadAborted=function(x,g){this.transmuxer&&x.sn!=="initSegment"&&x.stats.aborted&&(this.warn("Fragment "+x.sn+(g?" part"+g.index:"")+" of level "+x.level+" was aborted"),this.resetFragmentLoading(x))},h.resetFragmentLoading=function(x){(!this.fragCurrent||!this.fragContextChanged(x))&&(this.state=I.IDLE)},h.onFragmentOrKeyLoadError=function(x,g){if(g.fatal)return;var P=g.frag;if(!P||P.type!==x)return;var k=this.fragCurrent;console.assert(k&&P.sn===k.sn&&P.level===k.level&&P.urlId===k.urlId,"Frag load error must match current frag to retry");var y=this.config;if(this.fragLoadError+1<=y.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(P.level))return;var A=Math.min(Math.pow(2,this.fragLoadError)*y.fragLoadingRetryDelay,y.fragLoadingMaxRetryTimeout);this.warn("Fragment "+P.sn+" of "+x+" "+P.level+" failed to load, retrying in "+A+"ms"),this.retryDate=self.performance.now()+A,this.fragLoadError++,this.state=I.FRAG_LOADING_WAITING_RETRY}else g.levelRetry?(x===s.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=I.IDLE):(j.logger.error(g.details+" reaches max retry, redispatch as fatal ..."),g.fatal=!0,this.hls.stopLoad(),this.state=I.ERROR)},h.afterBufferFlushed=function(x,g,P){if(!x)return;var k=K.BufferHelper.getBuffered(x);this.fragmentTracker.detectEvictedFragments(g,k,P),this.state===I.ENDED&&this.resetLoadingState()},h.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=I.IDLE},h.resetLiveStartWhenNotLoaded=function(x){if(!this.loadedmetadata){this.startFragRequested=!1;var g=this.levels?this.levels[x].details:null;if(g!=null&&g.live)return this.startPosition=-1,this.setStartPosition(g,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},h.updateLevelTiming=function(x,g,P,k){var y=this,A=P.details;console.assert(!!A,"level.details must be defined");var F=Object.keys(x.elementaryStreams).reduce(function(T,Y){var $=x.elementaryStreams[Y];if($){var le=$.endPTS-$.startPTS;if(le<=0)return y.warn("Could not parse fragment "+x.sn+" "+Y+" duration reliably ("+le+") resetting transmuxer to fallback to playlist timing"),y.resetTransmuxer(),T||!1;var de=k?0:Object(r.updateFragPTSDTS)(A,x,$.startPTS,$.endPTS,$.startDTS,$.endDTS);return y.hls.trigger(n.Events.LEVEL_PTS_UPDATED,{details:A,level:P,drift:de,type:Y,frag:x,start:$.startPTS,end:$.endPTS}),!0}return T},!1);F?(this.state=I.PARSED,this.hls.trigger(n.Events.FRAG_PARSED,{frag:x,part:g})):this.resetLoadingState()},h.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},R(v,[{key:"state",get:function(){return this._state},set:function(x){var g=this._state;g!==x&&(this._state=x,this.log(g+"->"+x))}}]),v}(W.default)},"./src/controller/buffer-controller.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return c});var V=U("./src/polyfills/number.ts"),W=U("./src/events.ts"),M=U("./src/utils/logger.ts"),K=U("./src/errors.ts"),j=U("./src/utils/buffer-helper.ts"),n=U("./src/utils/mediasource-helper.ts"),w=U("./src/loader/fragment.ts"),m=U("./src/controller/buffer-operation-queue.ts"),f=Object(n.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function r(u){var o=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var s=o.hls,a=o.media,R=o.mediaSource;M.logger.log("[buffer-controller]: Media source opened"),a&&(o.updateMediaElementDuration(),s.trigger(W.Events.MEDIA_ATTACHED,{media:a})),R&&R.removeEventListener("sourceopen",o._onMediaSourceOpen),o.checkPendingTracks()},this._onMediaSourceClose=function(){M.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){M.logger.log("[buffer-controller]: Media source ended")},this.hls=u,this._initSourceBuffer(),this.registerListeners()}var d=r.prototype;return d.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},d.destroy=function(){this.unregisterListeners(),this.details=null},d.registerListeners=function(){var o=this.hls;o.on(W.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(W.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(W.Events.BUFFER_RESET,this.onBufferReset,this),o.on(W.Events.BUFFER_APPENDING,this.onBufferAppending,this),o.on(W.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.on(W.Events.BUFFER_EOS,this.onBufferEos,this),o.on(W.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),o.on(W.Events.LEVEL_UPDATED,this.onLevelUpdated,this),o.on(W.Events.FRAG_PARSED,this.onFragParsed,this),o.on(W.Events.FRAG_CHANGED,this.onFragChanged,this)},d.unregisterListeners=function(){var o=this.hls;o.off(W.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.off(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(W.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(W.Events.BUFFER_RESET,this.onBufferReset,this),o.off(W.Events.BUFFER_APPENDING,this.onBufferAppending,this),o.off(W.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.off(W.Events.BUFFER_EOS,this.onBufferEos,this),o.off(W.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),o.off(W.Events.LEVEL_UPDATED,this.onLevelUpdated,this),o.off(W.Events.FRAG_PARSED,this.onFragParsed,this),o.off(W.Events.FRAG_CHANGED,this.onFragChanged,this)},d._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new m.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},d.onManifestParsed=function(o,s){var a=2;(s.audio&&!s.video||!s.altAudio)&&(a=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=a,this.details=null,M.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},d.onMediaAttaching=function(o,s){var a=this.media=s.media;if(a&&f){var R=this.mediaSource=new f;R.addEventListener("sourceopen",this._onMediaSourceOpen),R.addEventListener("sourceended",this._onMediaSourceEnded),R.addEventListener("sourceclose",this._onMediaSourceClose),a.src=self.URL.createObjectURL(R),this._objectUrl=a.src}},d.onMediaDetaching=function(){var o=this.media,s=this.mediaSource,a=this._objectUrl;if(s){if(M.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(R){M.logger.warn("[buffer-controller]: onMediaDetaching: "+R.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),o&&(a&&self.URL.revokeObjectURL(a),o.src===a?(o.removeAttribute("src"),o.load()):M.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(W.Events.MEDIA_DETACHED,void 0)},d.onBufferReset=function(){var o=this;this.getSourceBufferTypes().forEach(function(s){var a=o.sourceBuffer[s];try{a&&(o.removeBufferListeners(s),o.mediaSource&&o.mediaSource.removeSourceBuffer(a),o.sourceBuffer[s]=void 0)}catch(R){M.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",R)}}),this._initSourceBuffer()},d.onBufferCodecs=function(o,s){var a=this,R=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(O){if(R){var S=a.tracks[O];if(S&&typeof S.buffer.changeType=="function"){var D=s[O],I=D.codec,_=D.levelCodec,b=D.container,v=(S.levelCodec||S.codec).replace(p,"$1"),h=(_||I).replace(p,"$1");if(v!==h){var C=b+";codecs="+(_||I);a.appendChangeType(O,C)}}}else a.pendingTracks[O]=s[O]}),R)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},d.appendChangeType=function(o,s){var a=this,R=this.operationQueue,O={execute:function(){var D=a.sourceBuffer[o];D&&(M.logger.log("[buffer-controller]: changing "+o+" sourceBuffer type to "+s),D.changeType(s)),R.shiftAndExecuteNext(o)},onStart:function(){},onComplete:function(){},onError:function(D){M.logger.warn("[buffer-controller]: Failed to change "+o+" SourceBuffer type",D)}};R.append(O,o)},d.onBufferAppending=function(o,s){var a=this,R=this.hls,O=this.operationQueue,S=this.tracks,D=s.data,I=s.type,_=s.frag,b=s.part,v=s.chunkMeta,h=v.buffering[I],C=self.performance.now();h.start=C;var x=_.stats.buffering,g=b?b.stats.buffering:null;x.start===0&&(x.start=C),g&&g.start===0&&(g.start=C);var P=S.audio,k=I==="audio"&&v.id===1&&(P==null?void 0:P.container)==="audio/mpeg",y={execute:function(){if(h.executeStart=self.performance.now(),k){var F=a.sourceBuffer[I];if(F){var T=_.start-F.timestampOffset;Math.abs(T)>=.1&&(M.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+_.start+" (delta: "+T+") sn: "+_.sn+")"),F.timestampOffset=_.start)}}a.appendExecutor(D,I)},onStart:function(){},onComplete:function(){var F=self.performance.now();h.executeEnd=h.end=F,x.first===0&&(x.first=F),g&&g.first===0&&(g.first=F);var T=a.sourceBuffer,Y={};for(var $ in T)Y[$]=j.BufferHelper.getBuffered(T[$]);a.appendError=0,a.hls.trigger(W.Events.BUFFER_APPENDED,{type:I,frag:_,part:b,chunkMeta:v,parent:_.type,timeRanges:Y})},onError:function(F){M.logger.error("[buffer-controller]: Error encountered while trying to append to the "+I+" SourceBuffer",F);var T={type:K.ErrorTypes.MEDIA_ERROR,parent:_.type,details:K.ErrorDetails.BUFFER_APPEND_ERROR,err:F,fatal:!1};F.code===DOMException.QUOTA_EXCEEDED_ERR?T.details=K.ErrorDetails.BUFFER_FULL_ERROR:(a.appendError++,T.details=K.ErrorDetails.BUFFER_APPEND_ERROR,a.appendError>R.config.appendErrorMaxRetry&&(M.logger.error("[buffer-controller]: Failed "+R.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),T.fatal=!0)),R.trigger(W.Events.ERROR,T)}};O.append(y,I)},d.onBufferFlushing=function(o,s){var a=this,R=this.operationQueue,O=function(D){return{execute:a.removeExecutor.bind(a,D,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){a.hls.trigger(W.Events.BUFFER_FLUSHED,{type:D})},onError:function(_){M.logger.warn("[buffer-controller]: Failed to remove from "+D+" SourceBuffer",_)}}};s.type?R.append(O(s.type),s.type):this.getSourceBufferTypes().forEach(function(S){R.append(O(S),S)})},d.onFragParsed=function(o,s){var a=this,R=s.frag,O=s.part,S=[],D=O?O.elementaryStreams:R.elementaryStreams;D[w.ElementaryStreamTypes.AUDIOVIDEO]?S.push("audiovideo"):(D[w.ElementaryStreamTypes.AUDIO]&&S.push("audio"),D[w.ElementaryStreamTypes.VIDEO]&&S.push("video"));var I=function(){var b=self.performance.now();R.stats.buffering.end=b,O&&(O.stats.buffering.end=b);var v=O?O.stats:R.stats;a.hls.trigger(W.Events.FRAG_BUFFERED,{frag:R,part:O,stats:v,id:R.type})};S.length===0&&M.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+R.type+" level: "+R.level+" sn: "+R.sn),this.blockBuffers(I,S)},d.onFragChanged=function(o,s){this.flushBackBuffer()},d.onBufferEos=function(o,s){var a=this,R=this.getSourceBufferTypes().reduce(function(O,S){var D=a.sourceBuffer[S];return(!s.type||s.type===S)&&(D&&!D.ended&&(D.ended=!0,M.logger.log("[buffer-controller]: "+S+" sourceBuffer now EOS"))),O&&!!(!D||D.ended)},!0);R&&this.blockBuffers(function(){var O=a.mediaSource;if(!O||O.readyState!=="open")return;O.endOfStream()})},d.onLevelUpdated=function(o,s){var a=s.details;if(!a.fragments.length)return;this.details=a,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},d.flushBackBuffer=function(){var o=this.hls,s=this.details,a=this.media,R=this.sourceBuffer;if(!a||s===null)return;var O=this.getSourceBufferTypes();if(!O.length)return;var S=s.live&&o.config.liveBackBufferLength!==null?o.config.liveBackBufferLength:o.config.backBufferLength;if(!Object(V.isFiniteNumber)(S)||S<0)return;var D=a.currentTime,I=s.levelTargetDuration,_=Math.max(S,I),b=Math.floor(D/I)*I-_;O.forEach(function(v){var h=R[v];if(h){var C=j.BufferHelper.getBuffered(h);C.length>0&&b>C.start(0)&&(o.trigger(W.Events.BACK_BUFFER_REACHED,{bufferEnd:b}),s.live&&o.trigger(W.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:b}),o.trigger(W.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:b,type:v}))}})},d.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var o=this.details,s=this.hls,a=this.media,R=this.mediaSource,O=o.fragments[0].start+o.totalduration,S=a.duration,D=Object(V.isFiniteNumber)(R.duration)?R.duration:0;o.live&&s.config.liveDurationInfinity?(M.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),R.duration=Infinity,this.updateSeekableRange(o)):(O>D&&O>S||!Object(V.isFiniteNumber)(S))&&(M.logger.log("[buffer-controller]: Updating Media Source duration to "+O.toFixed(3)),R.duration=O)},d.updateSeekableRange=function(o){var s=this.mediaSource,a=o.fragments,R=a.length;if(R&&o.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var O=Math.max(0,a[0].start),S=Math.max(O,O+o.totalduration);s.setLiveSeekableRange(O,S)}},d.checkPendingTracks=function(){var o=this.bufferCodecEventsExpected,s=this.operationQueue,a=this.pendingTracks,R=Object.keys(a).length;if(R&&!o||R===2){this.createSourceBuffers(a),this.pendingTracks={};var O=this.getSourceBufferTypes();if(O.length===0){this.hls.trigger(W.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}O.forEach(function(S){s.executeNext(S)})}},d.createSourceBuffers=function(o){var s=this.sourceBuffer,a=this.mediaSource;if(!a)throw Error("createSourceBuffers called when mediaSource was null");var R=0;for(var O in o)if(!s[O]){var S=o[O];if(!S)throw Error("source buffer exists for track "+O+", however track does not");var D=S.levelCodec||S.codec,I=S.container+";codecs="+D;M.logger.log("[buffer-controller]: creating sourceBuffer("+I+")");try{var _=s[O]=a.addSourceBuffer(I),b=O;this.addBufferListener(b,"updatestart",this._onSBUpdateStart),this.addBufferListener(b,"updateend",this._onSBUpdateEnd),this.addBufferListener(b,"error",this._onSBUpdateError),this.tracks[O]={buffer:_,codec:D,container:S.container,levelCodec:S.levelCodec,id:S.id},R++}catch(v){M.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+v.message),this.hls.trigger(W.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:v,mimeType:I})}}R&&this.hls.trigger(W.Events.BUFFER_CREATED,{tracks:this.tracks})},d._onSBUpdateStart=function(o){var s=this.operationQueue,a=s.current(o);a.onStart()},d._onSBUpdateEnd=function(o){var s=this.operationQueue,a=s.current(o);a.onComplete(),s.shiftAndExecuteNext(o)},d._onSBUpdateError=function(o,s){M.logger.error("[buffer-controller]: "+o+" SourceBuffer error",s),this.hls.trigger(W.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var a=this.operationQueue.current(o);a&&a.onError(s)},d.removeExecutor=function(o,s,a){var R=this.media,O=this.mediaSource,S=this.operationQueue,D=this.sourceBuffer,I=D[o];if(!R||!O||!I){M.logger.warn("[buffer-controller]: Attempting to remove from the "+o+" SourceBuffer, but it does not exist"),S.shiftAndExecuteNext(o);return}var _=Object(V.isFiniteNumber)(R.duration)?R.duration:Infinity,b=Object(V.isFiniteNumber)(O.duration)?O.duration:Infinity,v=Math.max(0,s),h=Math.min(a,_,b);h>v?(M.logger.log("[buffer-controller]: Removing ["+v+","+h+"] from the "+o+" SourceBuffer"),console.assert(!I.updating,o+" sourceBuffer must not be updating"),I.remove(v,h)):S.shiftAndExecuteNext(o)},d.appendExecutor=function(o,s){var a=this.operationQueue,R=this.sourceBuffer,O=R[s];if(!O){M.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),a.shiftAndExecuteNext(s);return}O.ended=!1,console.assert(!O.updating,s+" sourceBuffer must not be updating"),O.appendBuffer(o)},d.blockBuffers=function(o,s){var a=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){M.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(o);return}var R=this.operationQueue,O=s.map(function(S){return R.appendBlocker(S)});Promise.all(O).then(function(){o(),s.forEach(function(S){var D=a.sourceBuffer[S];(!D||!D.updating)&&R.shiftAndExecuteNext(S)})})},d.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},d.addBufferListener=function(o,s,a){var R=this.sourceBuffer[o];if(!R)return;var O=a.bind(this,o);this.listeners[o].push({event:s,listener:O}),R.addEventListener(s,O)},d.removeBufferListeners=function(o){var s=this.sourceBuffer[o];if(!s)return;this.listeners[o].forEach(function(a){s.removeEventListener(a.event,a.listener)})},r}()},"./src/controller/buffer-operation-queue.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return W});var V=U("./src/utils/logger.ts"),W=function(){function M(j){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=j}var K=M.prototype;return K.append=function(n,w){var m=this.queues[w];m.push(n),m.length===1&&this.buffers[w]&&this.executeNext(w)},K.insertAbort=function(n,w){var m=this.queues[w];m.unshift(n),this.executeNext(w)},K.appendBlocker=function(n){var w,m=new Promise(function(p){w=p}),f={execute:w,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(f,n),m},K.executeNext=function(n){var w=this.buffers,m=this.queues,f=w[n],p=m[n];if(p.length){var c=p[0];try{c.execute()}catch(r){V.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(r),(!f||!f.updating)&&(p.shift(),this.executeNext(n))}}},K.shiftAndExecuteNext=function(n){this.queues[n].shift(),this.executeNext(n)},K.current=function(n){return this.queues[n][0]},M}()},"./src/controller/cap-level-controller.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/events.ts");function W(j,n){for(var w=0;w<n.length;w++){var m=n[w];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(j,m.key,m)}}function M(j,n,w){return n&&W(j.prototype,n),w&&W(j,w),j}var K=function(){function j(w){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=w,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var n=j.prototype;return n.setStreamController=function(m){this.streamController=m},n.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},n.registerListeners=function(){var m=this.hls;m.on(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),m.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),m.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),m.on(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),m.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},n.unregisterListener=function(){var m=this.hls;m.off(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),m.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),m.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),m.off(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),m.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},n.onFpsDropLevelCapping=function(m,f){j.isLevelAllowed(f.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(f.droppedLevel)},n.onMediaAttaching=function(m,f){this.media=f.media instanceof HTMLVideoElement?f.media:null},n.onManifestParsed=function(m,f){var p=this.hls;this.restrictedLevels=[],this.firstLevel=f.firstLevel,p.config.capLevelToPlayerSize&&f.video&&this.startCapping()},n.onBufferCodecs=function(m,f){var p=this.hls;p.config.capLevelToPlayerSize&&f.video&&this.startCapping()},n.onMediaDetaching=function(){this.stopCapping()},n.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var m=this.hls.levels;if(m.length){var f=this.hls;f.autoLevelCapping=this.getMaxLevel(m.length-1),f.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=f.autoLevelCapping}}},n.getMaxLevel=function(m){var f=this,p=this.hls.levels;if(!p.length)return-1;var c=p.filter(function(r,d){return j.isLevelAllowed(d,f.restrictedLevels)&&d<=m});return this.clientRect=null,j.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},n.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()},n.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},n.getDimensions=function(){if(this.clientRect)return this.clientRect;var m=this.media,f={width:0,height:0};if(m){var p=m.getBoundingClientRect();f.width=p.width,f.height=p.height,!f.width&&!f.height&&(f.width=p.right-p.left||m.width||0,f.height=p.bottom-p.top||m.height||0)}return this.clientRect=f,f},j.isLevelAllowed=function(m,f){return f===void 0&&(f=[]),f.indexOf(m)===-1},j.getMaxLevelByMediaSize=function(m,f,p){if(!m||!m.length)return-1;for(var c=function(s,a){return a?s.width!==a.width||s.height!==a.height:!0},r=m.length-1,d=0;d<m.length;d+=1){var u=m[d];if((u.width>=f||u.height>=p)&&c(u,m[d+1])){r=d;break}}return r},M(j,[{key:"mediaWidth",get:function(){return this.getDimensions().width*j.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*j.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var m=1;try{m=self.devicePixelRatio}catch(f){}return m}}]),j}();G.default=K},"./src/controller/cmcd-controller.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return c});var V=U("./src/events.ts"),W=U("./src/types/cmcd.ts"),M=U("./src/utils/buffer-helper.ts"),K=U("./src/utils/logger.ts");function j(r,d){for(var u=0;u<d.length;u++){var o=d[u];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,o.key,o)}}function n(r,d,u){return d&&j(r.prototype,d),u&&j(r,u),r}function w(r,d){var u=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(u)return(u=u.call(r)).next.bind(u);if(Array.isArray(r)||(u=m(r))||d&&r&&typeof r.length=="number"){u&&(r=u);var o=0;return function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(r,d){if(!r)return;if(typeof r=="string")return f(r,d);var u=Object.prototype.toString.call(r).slice(8,-1);if(u==="Object"&&r.constructor&&(u=r.constructor.name),u==="Map"||u==="Set")return Array.from(r);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return f(r,d)}function f(r,d){(d==null||d>r.length)&&(d=r.length);for(var u=0,o=new Array(d);u<d;u++)o[u]=r[u];return o}function p(){return p=Object.assign||function(r){for(var d=1;d<arguments.length;d++){var u=arguments[d];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},p.apply(this,arguments)}var c=function(){function r(u){var o=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){o.initialized&&(o.starved=!0),o.buffering=!0},this.onPlaying=function(){o.initialized||(o.initialized=!0),o.buffering=!1},this.applyPlaylistData=function(R){try{o.apply(R,{ot:W.CMCDObjectType.MANIFEST,su:!o.initialized})}catch(O){K.logger.warn("Could not generate manifest CMCD data.",O)}},this.applyFragmentData=function(R){try{var O=R.frag,S=o.hls.levels[O.level],D=o.getObjectType(O),I={d:O.duration*1e3,ot:D};(D===W.CMCDObjectType.VIDEO||D===W.CMCDObjectType.AUDIO||D==W.CMCDObjectType.MUXED)&&(I.br=S.bitrate/1e3,I.tb=o.getTopBandwidth(D),I.bl=o.getBufferLength(D)),o.apply(R,I)}catch(_){K.logger.warn("Could not generate segment CMCD data.",_)}},this.hls=u;var s=this.config=u.config,a=s.cmcd;a!=null&&(s.pLoader=this.createPlaylistLoader(),s.fLoader=this.createFragmentLoader(),this.sid=a.sessionId||r.uuid(),this.cid=a.contentId,this.useHeaders=a.useHeaders===!0,this.registerListeners())}var d=r.prototype;return d.registerListeners=function(){var o=this.hls;o.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),o.on(V.Events.BUFFER_CREATED,this.onBufferCreated,this)},d.unregisterListeners=function(){var o=this.hls;o.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),o.off(V.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},d.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},d.onMediaAttached=function(o,s){this.media=s.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},d.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},d.onBufferCreated=function(o,s){var a,R;this.audioBuffer=(a=s.tracks.audio)===null||a===void 0?void 0:a.buffer,this.videoBuffer=(R=s.tracks.video)===null||R===void 0?void 0:R.buffer},d.createData=function(){var o;return{v:W.CMCDVersion,sf:W.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(o=this.media)===null||o===void 0?void 0:o.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},d.apply=function(o,s){s===void 0&&(s={}),p(s,this.createData());var a=s.ot===W.CMCDObjectType.INIT||s.ot===W.CMCDObjectType.VIDEO||s.ot===W.CMCDObjectType.MUXED;if(this.starved&&a&&(s.bs=!0,s.su=!0,this.starved=!1),s.su==null&&(s.su=this.buffering),this.useHeaders){var R=r.toHeaders(s);if(!Object.keys(R).length)return;o.headers||(o.headers={}),p(o.headers,R)}else{var O=r.toQuery(s);if(!O)return;o.url=r.appendQueryToUri(o.url,O)}},d.getObjectType=function(o){var s=o.type;return s==="subtitle"?W.CMCDObjectType.TIMED_TEXT:o.sn==="initSegment"?W.CMCDObjectType.INIT:s==="audio"?W.CMCDObjectType.AUDIO:s==="main"?this.hls.audioTracks.length?W.CMCDObjectType.VIDEO:W.CMCDObjectType.MUXED:void 0},d.getTopBandwidth=function(o){for(var s=0,a=o===W.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,R=w(a),O;!(O=R()).done;){var S=O.value;S.bitrate>s&&(s=S.bitrate)}return s>0?s:NaN},d.getBufferLength=function(o){var s=this.hls.media,a=o===W.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!a||!s)return NaN;var R=M.BufferHelper.bufferInfo(a,s.currentTime,this.config.maxBufferHole);return R.len*1e3},d.createPlaylistLoader=function(){var o=this.config.pLoader,s=this.applyPlaylistData,a=o||this.config.loader;return function(){function R(S){this.loader=void 0,this.loader=new a(S)}var O=R.prototype;return O.destroy=function(){this.loader.destroy()},O.abort=function(){this.loader.abort()},O.load=function(D,I,_){s(D),this.loader.load(D,I,_)},n(R,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),R}()},d.createFragmentLoader=function(){var o=this.config.fLoader,s=this.applyFragmentData,a=o||this.config.loader;return function(){function R(S){this.loader=void 0,this.loader=new a(S)}var O=R.prototype;return O.destroy=function(){this.loader.destroy()},O.abort=function(){this.loader.abort()},O.load=function(D,I,_){s(D),this.loader.load(D,I,_)},n(R,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),R}()},r.uuid=function(){var o=URL.createObjectURL(new Blob),s=o.toString();return URL.revokeObjectURL(o),s.substr(s.lastIndexOf("/")+1)},r.serialize=function(o){for(var s=[],a=function(k){return!Number.isNaN(k)&&k!=null&&k!==""&&k!==!1},R=function(k){return Math.round(k)},O=function(k){return R(k/100)*100},S=function(k){return encodeURIComponent(k)},D={br:R,d:R,bl:O,dl:O,mtp:O,nor:S,rtp:O,tb:R},I=Object.keys(o||{}).sort(),_=w(I),b;!(b=_()).done;){var v=b.value,h=o[v];if(!a(h))continue;if(v==="v"&&h===1)continue;if(v=="pr"&&h===1)continue;var C=D[v];C&&(h=C(h));var x=typeof h,g=void 0;v==="ot"||v==="sf"||v==="st"?g=v+"="+h:x==="boolean"?g=v:x==="number"?g=v+"="+h:g=v+"="+JSON.stringify(h),s.push(g)}return s.join(",")},r.toHeaders=function(o){for(var s=Object.keys(o),a={},R=["Object","Request","Session","Status"],O=[{},{},{},{}],S={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},D=0,I=s;D<I.length;D++){var _=I[D],b=S[_]!=null?S[_]:1;O[b][_]=o[_]}for(var v=0;v<O.length;v++){var h=r.serialize(O[v]);h&&(a["CMCD-"+R[v]]=h)}return a},r.toQuery=function(o){return"CMCD="+encodeURIComponent(r.serialize(o))},r.appendQueryToUri=function(o,s){if(!s)return o;var a=o.includes("?")?"&":"?";return""+o+a+s},r}()},"./src/controller/eme-controller.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/events.ts"),W=U("./src/errors.ts"),M=U("./src/utils/logger.ts"),K=U("./src/utils/mediakeys-helper.ts");function j(c,r){for(var d=0;d<r.length;d++){var u=r[d];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(c,u.key,u)}}function n(c,r,d){return r&&j(c.prototype,r),d&&j(c,d),c}var w=3,m=function(r,d,u){var o={audioCapabilities:[],videoCapabilities:[]};return r.forEach(function(s){o.audioCapabilities.push({contentType:'audio/mp4; codecs="'+s+'"',robustness:u.audioRobustness||""})}),d.forEach(function(s){o.videoCapabilities.push({contentType:'video/mp4; codecs="'+s+'"',robustness:u.videoRobustness||""})}),[o]},f=function(r,d,u,o){switch(r){case K.KeySystems.WIDEVINE:return m(d,u,o);default:throw new Error("Unknown key-system: "+r)}},p=function(){function c(d){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=d,this._config=d.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 r=c.prototype;return r.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},r._registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},r._unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},r.getLicenseServerUrl=function(u){switch(u){case K.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+u+'"')},r._attemptKeySystemAccess=function(u,o,s){var a=this,R=f(u,o,s,this._drmSystemOptions);M.logger.log("Requesting encrypted media key-system access");var O=this.requestMediaKeySystemAccess(u,R);this.mediaKeysPromise=O.then(function(S){return a._onMediaKeySystemAccessObtained(u,S)}),O.catch(function(S){M.logger.error('Failed to obtain key-system "'+u+'" access:',S)})},r._onMediaKeySystemAccessObtained=function(u,o){var s=this;M.logger.log('Access for key-system "'+u+'" obtained');var a={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:o,mediaKeySystemDomain:u};this._mediaKeysList.push(a);var R=Promise.resolve().then(function(){return o.createMediaKeys()}).then(function(O){return a.mediaKeys=O,M.logger.log('Media-keys created for key-system "'+u+'"'),s._onMediaKeysCreated(),O});return R.catch(function(O){M.logger.error("Failed to create media-keys:",O)}),R},r._onMediaKeysCreated=function(){var u=this;this._mediaKeysList.forEach(function(o){o.mediaKeysSession||(o.mediaKeysSession=o.mediaKeys.createSession(),u._onNewMediaKeySession(o.mediaKeysSession))})},r._onNewMediaKeySession=function(u){var o=this;M.logger.log("New key-system session "+u.sessionId),u.addEventListener("message",function(s){o._onKeySessionMessage(u,s.message)},!1)},r._onKeySessionMessage=function(u,o){M.logger.log("Got EME message event, creating license request"),this._requestLicense(o,function(s){M.logger.log("Received license data (length: "+(s&&s.byteLength)+"), updating key-session"),u.update(s)})},r.onMediaEncrypted=function(u){var o=this;if(M.logger.log('Media is encrypted using "'+u.initDataType+'" init data type'),!this.mediaKeysPromise){M.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var s=function(R){if(!o._media)return;o._attemptSetMediaKeys(R),o._generateRequestWithPreferredKeySession(u.initDataType,u.initData)};this.mediaKeysPromise.then(s).catch(s)},r._attemptSetMediaKeys=function(u){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var o=this._mediaKeysList[0];if(!o||!o.mediaKeys){M.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}M.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(o.mediaKeys),this._hasSetMediaKeys=!0}},r._generateRequestWithPreferredKeySession=function(u,o){var s=this,a=this._mediaKeysList[0];if(!a){M.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(a.mediaKeysSessionInitialized){M.logger.warn("Key-Session already initialized but requested again");return}var R=a.mediaKeysSession;if(!R){M.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!o){M.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}M.logger.log('Generating key-session request for "'+u+'" init data type'),a.mediaKeysSessionInitialized=!0,R.generateRequest(u,o).then(function(){M.logger.debug("Key-session generation succeeded")}).catch(function(O){M.logger.error("Error generating key-session request:",O),s.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},r._createLicenseXhr=function(u,o,s){var a=new XMLHttpRequest;a.responseType="arraybuffer",a.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,a,u,o,s);var R=this._licenseXhrSetup;if(R)try{R.call(this.hls,a,u),R=void 0}catch(O){M.logger.error(O)}try{a.readyState||a.open("POST",u,!0),R&&R.call(this.hls,a,u)}catch(O){throw new Error("issue setting up KeySystem license XHR "+O)}return a},r._onLicenseRequestReadyStageChange=function(u,o,s,a){switch(u.readyState){case 4:if(u.status===200){this._requestLicenseFailureCount=0,M.logger.log("License request succeeded");var R=u.response,O=this._licenseResponseCallback;if(O)try{R=O.call(this.hls,u,o)}catch(D){M.logger.error(D)}a(R)}else{if(M.logger.error("License Request XHR failed ("+o+"). Status: "+u.status+" ("+u.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>w){this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var S=w-this._requestLicenseFailureCount+1;M.logger.warn("Retrying license request, "+S+" attempts left"),this._requestLicense(s,a)}break}},r._generateLicenseRequestChallenge=function(u,o){switch(u.mediaKeySystemDomain){case K.KeySystems.WIDEVINE:return o}throw new Error("unsupported key-system: "+u.mediaKeySystemDomain)},r._requestLicense=function(u,o){M.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){M.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var a=this.getLicenseServerUrl(s.mediaKeySystemDomain),R=this._createLicenseXhr(a,u,o);M.logger.log("Sending license request to URL: "+a);var O=this._generateLicenseRequestChallenge(s,u);R.send(O)}catch(S){M.logger.error("Failure requesting DRM license: "+S),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},r.onMediaAttached=function(u,o){if(!this._emeEnabled)return;var s=o.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},r.onMediaDetached=function(){var u=this._media,o=this._mediaKeysList;if(!u)return;u.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(o.map(function(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return u.setMediaKeys(null)}).catch(function(){})},r.onManifestParsed=function(u,o){if(!this._emeEnabled)return;var s=o.levels.map(function(R){return R.audioCodec}).filter(function(R){return!!R}),a=o.levels.map(function(R){return R.videoCodec}).filter(function(R){return!!R});this._attemptKeySystemAccess(K.KeySystems.WIDEVINE,s,a)},n(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();G.default=p},"./src/controller/fps-controller.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/events.ts"),W=U("./src/utils/logger.ts"),M=function(){function K(n){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=n,this.registerListeners()}var j=K.prototype;return j.setStreamController=function(w){this.streamController=w},j.registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},j.unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching)},j.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},j.onMediaAttaching=function(w,m){var f=this.hls.config;if(f.capLevelOnFPSDrop){var p=m.media instanceof self.HTMLVideoElement?m.media:null;this.media=p,p&&typeof p.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),f.fpsDroppedMonitoringPeriod)}},j.checkFPS=function(w,m,f){var p=performance.now();if(m){if(this.lastTime){var c=p-this.lastTime,r=f-this.lastDroppedFrames,d=m-this.lastDecodedFrames,u=1e3*r/c,o=this.hls;if(o.trigger(V.Events.FPS_DROP,{currentDropped:r,currentDecoded:d,totalDroppedFrames:f}),u>0&&r>o.config.fpsDroppedMonitoringThreshold*d){var s=o.currentLevel;W.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(o.autoLevelCapping===-1||o.autoLevelCapping>=s)&&(s=s-1,o.trigger(V.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:o.currentLevel}),o.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=p,this.lastDroppedFrames=f,this.lastDecodedFrames=m}},j.checkFPSInterval=function(){var w=this.media;if(w)if(this.isVideoPlaybackQualityAvailable){var m=w.getVideoPlaybackQuality();this.checkFPS(w,m.totalVideoFrames,m.droppedVideoFrames)}else this.checkFPS(w,w.webkitDecodedFrameCount,w.webkitDroppedFrameCount)},K}();G.default=M},"./src/controller/fragment-finders.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"findFragmentByPDT",function(){return M}),U.d(G,"findFragmentByPTS",function(){return K}),U.d(G,"fragmentWithinToleranceTest",function(){return j}),U.d(G,"pdtWithinToleranceTest",function(){return n}),U.d(G,"findFragWithCC",function(){return w});var V=U("./src/polyfills/number.ts"),W=U("./src/utils/binary-search.ts");function M(m,f,p){if(f===null||!Array.isArray(m)||!m.length||!Object(V.isFiniteNumber)(f))return null;var c=m[0].programDateTime;if(f<(c||0))return null;var r=m[m.length-1].endProgramDateTime;if(f>=(r||0))return null;p=p||0;for(var d=0;d<m.length;++d){var u=m[d];if(n(f,p,u))return u}return null}function K(m,f,p,c){p===void 0&&(p=0),c===void 0&&(c=0);var r=null;if(m?r=f[m.sn-f[0].sn+1]||null:p===0&&f[0].start===0&&(r=f[0]),r&&j(p,c,r)===0)return r;var d=W.default.search(f,j.bind(null,p,c));return d||r}function j(m,f,p){m===void 0&&(m=0),f===void 0&&(f=0);var c=Math.min(f,p.duration+(p.deltaPTS?p.deltaPTS:0));return p.start+p.duration-c<=m?1:p.start-c>m&&p.start?-1:0}function n(m,f,p){var c=Math.min(f,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,r=p.endProgramDateTime||0;return r-c>m}function w(m,f){return W.default.search(m,function(p){return p.cc<f?1:p.cc>f?-1:0})}},"./src/controller/fragment-tracker.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"FragmentState",function(){return M}),U.d(G,"FragmentTracker",function(){return K});var V=U("./src/events.ts"),W=U("./src/types/loader.ts"),M;(function(w){w.NOT_LOADED="NOT_LOADED",w.BACKTRACKED="BACKTRACKED",w.APPENDING="APPENDING",w.PARTIAL="PARTIAL",w.OK="OK"})(M||(M={}));var K=function(){function w(f){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=f,this._registerListeners()}var m=w.prototype;return m._registerListeners=function(){var p=this.hls;p.on(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(V.Events.FRAG_LOADED,this.onFragLoaded,this)},m._unregisterListeners=function(){var p=this.hls;p.off(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(V.Events.FRAG_LOADED,this.onFragLoaded,this)},m.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},m.getAppendedFrag=function(p,c){if(c===W.PlaylistLevelType.MAIN){var r=this.activeFragment,d=this.activeParts;if(!r)return null;if(d)for(var u=d.length;u--;){var o=d[u],s=o?o.end:r.appendedPTS;if(o.start<=p&&s!==void 0&&p<=s)return u>9&&(this.activeParts=d.slice(u-9)),o}else if(r.start<=p&&r.appendedPTS!==void 0&&p<=r.appendedPTS)return r}return this.getBufferedFrag(p,c)},m.getBufferedFrag=function(p,c){for(var r=this.fragments,d=Object.keys(r),u=d.length;u--;){var o=r[d[u]];if((o==null?void 0:o.body.type)===c&&o.buffered){var s=o.body;if(s.start<=p&&p<=s.end)return s}}return null},m.detectEvictedFragments=function(p,c,r){var d=this;Object.keys(this.fragments).forEach(function(u){var o=d.fragments[u];if(!o)return;if(!o.buffered){o.body.type===r&&d.removeFragment(o.body);return}var s=o.range[p];if(!s)return;s.time.some(function(a){var R=!d.isTimeBuffered(a.startPTS,a.endPTS,c);return R&&d.removeFragment(o.body),R})})},m.detectPartialFragments=function(p){var c=this,r=this.timeRanges,d=p.frag,u=p.part;if(!r||d.sn==="initSegment")return;var o=n(d),s=this.fragments[o];if(!s)return;Object.keys(r).forEach(function(a){var R=d.elementaryStreams[a];if(!R)return;var O=r[a],S=u!==null||R.partial===!0;s.range[a]=c.getBufferedTimes(d,u,S,O)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},m.fragBuffered=function(p){var c=n(p),r=this.fragments[c];r&&(r.backtrack=r.loaded=null,r.buffered=!0)},m.getBufferedTimes=function(p,c,r,d){for(var u={time:[],partial:r},o=c?c.start:p.start,s=c?c.end:p.end,a=p.minEndPTS||s,R=p.maxStartPTS||o,O=0;O<d.length;O++){var S=d.start(O)-this.bufferPadding,D=d.end(O)+this.bufferPadding;if(R>=S&&a<=D){u.time.push({startPTS:Math.max(o,d.start(O)),endPTS:Math.min(s,d.end(O))});break}else if(o<D&&s>S)u.partial=!0,u.time.push({startPTS:Math.max(o,d.start(O)),endPTS:Math.min(s,d.end(O))});else if(s<=S)break}return u},m.getPartialFragment=function(p){var c=null,r,d,u,o=0,s=this.bufferPadding,a=this.fragments;return Object.keys(a).forEach(function(R){var O=a[R];if(!O)return;j(O)&&(d=O.body.start-s,u=O.body.end+s,p>=d&&p<=u&&(r=Math.min(p-d,u-p),o<=r&&(c=O.body,o=r)))}),c},m.getState=function(p){var c=n(p),r=this.fragments[c];return r?r.buffered?j(r)?M.PARTIAL:M.OK:r.backtrack?M.BACKTRACKED:M.APPENDING:M.NOT_LOADED},m.backtrack=function(p,c){var r=n(p),d=this.fragments[r];if(!d||d.backtrack)return null;var u=d.backtrack=c||d.loaded;return d.loaded=null,u},m.getBacktrackData=function(p){var c=n(p),r=this.fragments[c];if(r){var d,u=r.backtrack;if(u!=null&&(d=u.payload)!==null&&d!==void 0&&d.byteLength)return u;this.removeFragment(p)}return null},m.isTimeBuffered=function(p,c,r){for(var d,u,o=0;o<r.length;o++){if(d=r.start(o)-this.bufferPadding,u=r.end(o)+this.bufferPadding,p>=d&&c<=u)return!0;if(c<=d)return!1}return!1},m.onFragLoaded=function(p,c){var r=c.frag,d=c.part;if(r.sn==="initSegment"||r.bitrateTest||d)return;var u=n(r);this.fragments[u]={body:r,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},m.onBufferAppended=function(p,c){var r=this,d=c.frag,u=c.part,o=c.timeRanges;if(d.type===W.PlaylistLevelType.MAIN)if(this.activeFragment=d,u){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(u)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach(function(a){var R=o[a];if(r.detectEvictedFragments(a,R),!u)for(var O=0;O<R.length;O++)d.appendedPTS=Math.max(R.end(O),d.appendedPTS||0)})},m.onFragBuffered=function(p,c){this.detectPartialFragments(c)},m.hasFragment=function(p){var c=n(p);return!!this.fragments[c]},m.removeFragmentsInRange=function(p,c,r){var d=this;Object.keys(this.fragments).forEach(function(u){var o=d.fragments[u];if(!o)return;if(o.buffered){var s=o.body;s.type===r&&s.start<c&&s.end>p&&d.removeFragment(s)}})},m.removeFragment=function(p){var c=n(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),delete this.fragments[c]},m.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},w}();function j(w){var m,f;return w.buffered&&(((m=w.range.video)===null||m===void 0?void 0:m.partial)||((f=w.range.audio)===null||f===void 0?void 0:f.partial))}function n(w){return w.type+"_"+w.level+"_"+w.urlId+"_"+w.sn}},"./src/controller/gap-controller.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"STALL_MINIMUM_DURATION_MS",function(){return j}),U.d(G,"MAX_START_GAP_JUMP",function(){return n}),U.d(G,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return w}),U.d(G,"SKIP_BUFFER_RANGE_START",function(){return m}),U.d(G,"default",function(){return f});var V=U("./src/utils/buffer-helper.ts"),W=U("./src/errors.ts"),M=U("./src/events.ts"),K=U("./src/utils/logger.ts"),j=250,n=2,w=.1,m=.05,f=function(){function p(r,d,u,o){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=r,this.media=d,this.fragmentTracker=u,this.hls=o}var c=p.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(d){var u=this.config,o=this.media,s=this.stalled,a=o.currentTime,R=o.seeking,O=this.seeking&&!R,S=!this.seeking&&R;if(this.seeking=R,a!==d){if(this.moved=!0,s!==null){if(this.stallReported){var D=self.performance.now()-s;K.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(D)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((S||O)&&(this.stalled=null),o.paused||o.ended||o.playbackRate===0||!V.BufferHelper.getBuffered(o).length)return;var I=V.BufferHelper.bufferInfo(o,a,0),_=I.len>0,b=I.nextStart||0;if(!_&&!b)return;if(R){var v=I.len>n,h=!b||b-a>n&&!this.fragmentTracker.getPartialFragment(a);if(v||h)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var C,x=Math.max(b,I.start||0)-a,g=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,P=g==null||((C=g.details)===null||C===void 0)?void 0:C.live,k=P?g.details.targetduration*2:n;if(x>0&&x<=k){this._trySkipBufferHole(null);return}}var y=self.performance.now();if(s===null){this.stalled=y;return}var A=y-s;!R&&A>=j&&this._reportStall(I.len);var F=V.BufferHelper.bufferInfo(o,a,u.maxBufferHole);this._tryFixBufferStall(F,A)},c._tryFixBufferStall=function(d,u){var o=this.config,s=this.fragmentTracker,a=this.media,R=a.currentTime,O=s.getPartialFragment(R);if(O){var S=this._trySkipBufferHole(O);if(S)return}d.len>o.maxBufferHole&&u>o.highBufferWatchdogPeriod*1e3&&(K.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(d){var u=this.hls,o=this.media,s=this.stallReported;s||(this.stallReported=!0,K.logger.warn("Playback stalling at @"+o.currentTime+" due to low buffer (buffer="+d+")"),u.trigger(M.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:d}))},c._trySkipBufferHole=function(d){for(var u=this.config,o=this.hls,s=this.media,a=s.currentTime,R=0,O=V.BufferHelper.getBuffered(s),S=0;S<O.length;S++){var D=O.start(S);if(a+u.maxBufferHole>=R&&a<D){var I=Math.max(D+m,s.currentTime+w);return K.logger.warn("skipping hole, adjusting currentTime from "+a+" to "+I),this.moved=!0,this.stalled=null,s.currentTime=I,d&&o.trigger(M.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+a+" to "+I,frag:d}),I}R=O.end(S)}return 0},c._tryNudgeBuffer=function(){var d=this.config,u=this.hls,o=this.media,s=o.currentTime,a=(this.nudgeRetry||0)+1;if(this.nudgeRetry=a,a<d.nudgeMaxRetry){var R=s+a*d.nudgeOffset;K.logger.warn("Nudging 'currentTime' from "+s+" to "+R),o.currentTime=R,u.trigger(M.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else K.logger.error("Playhead still not moving while enough data buffered @"+s+" after "+d.nudgeMaxRetry+" nudges"),u.trigger(M.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},p}()},"./src/controller/id3-track-controller.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/events.ts"),W=U("./src/utils/texttrack-utils.ts"),M=U("./src/demux/id3.ts"),K=.25,j=function(){function n(m){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=m,this._registerListeners()}var w=n.prototype;return w.destroy=function(){this._unregisterListeners()},w._registerListeners=function(){var f=this.hls;f.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.on(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),f.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},w._unregisterListeners=function(){var f=this.hls;f.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.off(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),f.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},w.onMediaAttached=function(f,p){this.media=p.media},w.onMediaDetaching=function(){if(!this.id3Track)return;Object(W.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},w.getID3Track=function(f){if(!this.media)return;for(var p=0;p<f.length;p++){var c=f[p];if(c.kind==="metadata"&&c.label==="id3")return Object(W.sendAddTrackEvent)(c,this.media),c}return this.media.addTextTrack("metadata","id3")},w.onFragParsingMetadata=function(f,p){if(!this.media)return;var c=p.frag,r=p.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var d=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,u=0;u<r.length;u++){var o=M.getID3Frames(r[u].data);if(o){var s=r[u].pts,a=u<r.length-1?r[u+1].pts:c.end,R=a-s;R<=0&&(a=s+K);for(var O=0;O<o.length;O++){var S=o[O];if(!M.isTimeStampFrame(S)){var D=new d(s,a,"");D.value=S,this.id3Track.addCue(D)}}}}},w.onBufferFlushing=function(f,p){var c=p.startOffset,r=p.endOffset,d=p.type;if(!d||d==="audio"){var u=this.id3Track;u&&Object(W.removeCuesInRange)(u,c,r)}},n}();G.default=j},"./src/controller/latency-controller.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return n});var V=U("./src/errors.ts"),W=U("./src/events.ts"),M=U("./src/utils/logger.ts");function K(w,m){for(var f=0;f<m.length;f++){var p=m[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(w,p.key,p)}}function j(w,m,f){return m&&K(w.prototype,m),f&&K(w,f),w}var n=function(){function w(f){var p=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 p.timeupdate()},this.hls=f,this.config=f.config,this.registerListeners()}var m=w.prototype;return m.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},m.registerListeners=function(){this.hls.on(W.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(W.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(W.Events.ERROR,this.onError,this)},m.unregisterListeners=function(){this.hls.off(W.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(W.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(W.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(W.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(W.Events.ERROR,this.onError)},m.onMediaAttached=function(p,c){this.media=c.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},m.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},m.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},m.onLevelUpdated=function(p,c){var r=c.details;this.levelDetails=r,r.advanced&&this.timeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},m.onError=function(p,c){if(c.details!==V.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,M.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},m.timeupdate=function(){var p=this.media,c=this.levelDetails;if(!p||!c)return;this.currentTime=p.currentTime;var r=this.computeLatency();if(r===null)return;this._latency=r;var d=this.config,u=d.lowLatencyMode,o=d.maxLiveSyncPlaybackRate;if(!u||o===1)return;var s=this.targetLatency;if(s===null)return;var a=r-s,R=Math.min(this.maxLatency,s+c.targetduration),O=a<R;if(c.live&&O&&a>.05&&this.forwardBufferLength>1){var S=Math.min(2,Math.max(1,o)),D=Math.round(2/(1+Math.exp(-.75*a-this.edgeStalled))*20)/20;p.playbackRate=Math.min(S,Math.max(1,D))}else p.playbackRate!==1&&p.playbackRate!==0&&(p.playbackRate=1)},m.estimateLiveEdge=function(){var p=this.levelDetails;return p===null?null:p.edge+p.age},m.computeLatency=function(){var p=this.estimateLiveEdge();return p===null?null:p-this.currentTime},j(w,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var p=this.config,c=this.levelDetails;return p.liveMaxLatencyDuration!==void 0?p.liveMaxLatencyDuration:c?p.liveMaxLatencyDurationCount*c.targetduration:0}},{key:"targetLatency",get:function(){var p=this.levelDetails;if(p===null)return null;var c=p.holdBack,r=p.partHoldBack,d=p.targetduration,u=this.config,o=u.liveSyncDuration,s=u.liveSyncDurationCount,a=u.lowLatencyMode,R=this.hls.userConfig,O=a&&r||c;(R.liveSyncDuration||R.liveSyncDurationCount||O===0)&&(O=o!==void 0?o:s*d);var S=d,D=1;return O+Math.min(this.stallCount*D,S)}},{key:"liveSyncPosition",get:function(){var p=this.estimateLiveEdge(),c=this.targetLatency,r=this.levelDetails;if(p===null||c===null||r===null)return null;var d=r.edge,u=p-c-this.edgeStalled,o=d-r.totalduration,s=d-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(o,u),s)}},{key:"drift",get:function(){var p=this.levelDetails;return p===null?1:p.drift}},{key:"edgeStalled",get:function(){var p=this.levelDetails;if(p===null)return 0;var c=(this.config.lowLatencyMode&&p.partTarget||p.targetduration)*3;return Math.max(p.age-c,0)}},{key:"forwardBufferLength",get:function(){var p=this.media,c=this.levelDetails;if(!p||!c)return 0;var r=p.buffered.length;return r?p.buffered.end(r-1):c.edge-this.currentTime}}]),w}()},"./src/controller/level-controller.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return u});var V=U("./src/types/level.ts"),W=U("./src/events.ts"),M=U("./src/errors.ts"),K=U("./src/utils/codecs.ts"),j=U("./src/controller/level-helper.ts"),n=U("./src/controller/base-playlist-controller.ts"),w=U("./src/types/loader.ts");function m(){return m=Object.assign||function(o){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var R in a)Object.prototype.hasOwnProperty.call(a,R)&&(o[R]=a[R])}return o},m.apply(this,arguments)}function f(o,s){for(var a=0;a<s.length;a++){var R=s[a];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(o,R.key,R)}}function p(o,s,a){return s&&f(o.prototype,s),a&&f(o,a),o}function c(o,s){o.prototype=Object.create(s.prototype),o.prototype.constructor=o,r(o,s)}function r(o,s){return r=Object.setPrototypeOf||function(R,O){return R.__proto__=O,R},r(o,s)}var d=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),u=function(o){c(s,o);function s(R){var O;return O=o.call(this,R,"[level-controller]")||this,O._levels=[],O._firstLevel=-1,O._startLevel=void 0,O.currentLevelIndex=-1,O.manualLevelIndex=-1,O.onParsedComplete=void 0,O._registerListeners(),O}var a=s.prototype;return a._registerListeners=function(){var O=this.hls;O.on(W.Events.MANIFEST_LOADED,this.onManifestLoaded,this),O.on(W.Events.LEVEL_LOADED,this.onLevelLoaded,this),O.on(W.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),O.on(W.Events.FRAG_LOADED,this.onFragLoaded,this),O.on(W.Events.ERROR,this.onError,this)},a._unregisterListeners=function(){var O=this.hls;O.off(W.Events.MANIFEST_LOADED,this.onManifestLoaded,this),O.off(W.Events.LEVEL_LOADED,this.onLevelLoaded,this),O.off(W.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),O.off(W.Events.FRAG_LOADED,this.onFragLoaded,this),O.off(W.Events.ERROR,this.onError,this)},a.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,o.prototype.destroy.call(this)},a.startLoad=function(){var O=this._levels;O.forEach(function(S){S.loadError=0}),o.prototype.startLoad.call(this)},a.onManifestLoaded=function(O,S){var D=[],I=[],_=[],b,v={},h,C=!1,x=!1,g=!1;if(S.levels.forEach(function(A){var F=A.attrs;C=C||!!(A.width&&A.height),x=x||!!A.videoCodec,g=g||!!A.audioCodec,d&&A.audioCodec&&A.audioCodec.indexOf("mp4a.40.34")!==-1&&(A.audioCodec=void 0);var T=A.bitrate+"-"+A.attrs.RESOLUTION+"-"+A.attrs.CODECS;h=v[T],h?h.url.push(A.url):(h=new V.Level(A),v[T]=h,D.push(h)),F&&(F.AUDIO&&Object(j.addGroupId)(h,"audio",F.AUDIO),F.SUBTITLES&&Object(j.addGroupId)(h,"text",F.SUBTITLES))}),(C||x)&&g&&(D=D.filter(function(A){var F=A.videoCodec,T=A.width,Y=A.height;return!!F||!!(T&&Y)})),D=D.filter(function(A){var F=A.audioCodec,T=A.videoCodec;return(!F||Object(K.isCodecSupportedInMp4)(F,"audio"))&&(!T||Object(K.isCodecSupportedInMp4)(T,"video"))}),S.audioTracks&&(I=S.audioTracks.filter(function(A){return!A.audioCodec||Object(K.isCodecSupportedInMp4)(A.audioCodec,"audio")}),Object(j.assignTrackIdsByGroup)(I)),S.subtitles&&(_=S.subtitles,Object(j.assignTrackIdsByGroup)(_)),D.length>0){b=D[0].bitrate,D.sort(function(A,F){return A.bitrate-F.bitrate}),this._levels=D;for(var P=0;P<D.length;P++)if(D[P].bitrate===b){this._firstLevel=P,this.log("manifest loaded, "+D.length+" level(s) found, first bitrate: "+b);break}var k=g&&!x,y={levels:D,audioTracks:I,subtitleTracks:_,firstLevel:this._firstLevel,stats:S.stats,audio:g,video:x,altAudio:!k&&I.some(function(A){return!!A.url})};this.hls.trigger(W.Events.MANIFEST_PARSED,y),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(W.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:S.url,reason:"no level with compatible codecs found in manifest"})},a.onError=function(O,S){if(o.prototype.onError.call(this,O,S),S.fatal)return;var D=S.context,I=this._levels[this.currentLevelIndex];if(D&&(D.type===w.PlaylistContextType.AUDIO_TRACK&&I.audioGroupIds&&D.groupId===I.audioGroupIds[I.urlId]||D.type===w.PlaylistContextType.SUBTITLE_TRACK&&I.textGroupIds&&D.groupId===I.textGroupIds[I.urlId])){this.redundantFailover(this.currentLevelIndex);return}var _=!1,b=!0,v;switch(S.details){case M.ErrorDetails.FRAG_LOAD_ERROR:case M.ErrorDetails.FRAG_LOAD_TIMEOUT:case M.ErrorDetails.KEY_LOAD_ERROR:case M.ErrorDetails.KEY_LOAD_TIMEOUT:if(S.frag){var h=this._levels[S.frag.level];h?(h.fragmentError++,h.fragmentError>this.hls.config.fragLoadingMaxRetry&&(v=S.frag.level)):v=S.frag.level}break;case M.ErrorDetails.LEVEL_LOAD_ERROR:case M.ErrorDetails.LEVEL_LOAD_TIMEOUT:D&&(D.deliveryDirectives&&(b=!1),v=D.level),_=!0;break;case M.ErrorDetails.REMUX_ALLOC_ERROR:v=S.level,_=!0;break}v!==void 0&&this.recoverLevel(S,v,_,b)},a.recoverLevel=function(O,S,D,I){var _=O.details,b=this._levels[S];if(b.loadError++,D){var v=this.retryLoadingOrFail(O);if(v)O.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(I){var h=b.url.length;if(h>1&&b.loadError<h)O.levelRetry=!0,this.redundantFailover(S);else if(this.manualLevelIndex===-1){var C=S===0?this._levels.length-1:S-1;this.currentLevelIndex!==C&&this._levels[C].loadError===0&&(this.warn(_+": switch to "+C),O.levelRetry=!0,this.hls.nextAutoLevel=C)}}},a.redundantFailover=function(O){var S=this._levels[O],D=S.url.length;if(D>1){var I=(S.urlId+1)%D;this.warn("Switching to redundant URL-id "+I),this._levels.forEach(function(_){_.urlId=I}),this.level=O}},a.onFragLoaded=function(O,S){var D=S.frag;if(D!==void 0&&D.type===w.PlaylistLevelType.MAIN){var I=this._levels[D.level];I!==void 0&&(I.fragmentError=0,I.loadError=0)}},a.onLevelLoaded=function(O,S){var D,I=S.level,_=S.details,b=this._levels[I];if(!b){var v;this.warn("Invalid level index "+I),(v=S.deliveryDirectives)!==null&&v!==void 0&&v.skip&&(_.deltaUpdateFailed=!0);return}I===this.currentLevelIndex?(b.fragmentError===0&&(b.loadError=0,this.retryCount=0),this.playlistLoaded(I,S,b.details)):(D=S.deliveryDirectives)!==null&&D!==void 0&&D.skip&&(_.deltaUpdateFailed=!0)},a.onAudioTrackSwitched=function(O,S){var D=this.hls.levels[this.currentLevelIndex];if(!D)return;if(D.audioGroupIds){for(var I=-1,_=this.hls.audioTracks[S.id].groupId,b=0;b<D.audioGroupIds.length;b++)if(D.audioGroupIds[b]===_){I=b;break}I!==D.urlId&&(D.urlId=I,this.startLoad())}},a.loadPlaylist=function(O){var S=this.currentLevelIndex,D=this._levels[S];if(this.canLoad&&D&&D.url.length>0){var I=D.urlId,_=D.url[I];if(O)try{_=O.addDirectives(_)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("Attempt loading level index "+S+(O?" at sn "+O.msn+" part "+O.part:"")+" with URL-id "+I+" "+_),this.clearTimer(),this.hls.trigger(W.Events.LEVEL_LOADING,{url:_,level:S,id:I,deliveryDirectives:O||null})}},a.removeLevel=function(O,S){var D=function(b,v){return v!==S},I=this._levels.filter(function(_,b){return b!==O?!0:_.url.length>1&&S!==void 0?(_.url=_.url.filter(D),_.audioGroupIds&&(_.audioGroupIds=_.audioGroupIds.filter(D)),_.textGroupIds&&(_.textGroupIds=_.textGroupIds.filter(D)),_.urlId=0,!0):!1}).map(function(_,b){var v=_.details;return v!=null&&v.fragments&&v.fragments.forEach(function(h){h.level=b}),_});this._levels=I,this.hls.trigger(W.Events.LEVELS_UPDATED,{levels:I})},p(s,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(O){var S,D=this._levels;if(D.length===0)return;if(this.currentLevelIndex===O&&(S=D[O])!==null&&S!==void 0&&S.details)return;if(O<0||O>=D.length){var I=O<0;if(this.hls.trigger(W.Events.ERROR,{type:M.ErrorTypes.OTHER_ERROR,details:M.ErrorDetails.LEVEL_SWITCH_ERROR,level:O,fatal:I,reason:"invalid level idx"}),I)return;O=Math.min(O,D.length-1)}this.clearTimer();var _=this.currentLevelIndex,b=D[_],v=D[O];this.log("switching to level "+O+" from "+_),this.currentLevelIndex=O;var h=m({},v,{level:O,maxBitrate:v.maxBitrate,uri:v.uri,urlId:v.urlId});delete h._urlId,this.hls.trigger(W.Events.LEVEL_SWITCHING,h);var C=v.details;if(!C||C.live){var x=this.switchParams(v.uri,b==null?void 0:b.details);this.loadPlaylist(x)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(O){this.manualLevelIndex=O,this._startLevel===void 0&&(this._startLevel=O),O!==-1&&(this.level=O)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(O){this._firstLevel=O}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var O=this.hls.config.startLevel;return O!==void 0?O:this._firstLevel}else return this._startLevel},set:function(O){this._startLevel=O}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(O){this.level=O,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=O)}}]),s}(n.default)},"./src/controller/level-helper.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"addGroupId",function(){return M}),U.d(G,"assignTrackIdsByGroup",function(){return K}),U.d(G,"updatePTS",function(){return j}),U.d(G,"updateFragPTSDTS",function(){return w}),U.d(G,"mergeDetails",function(){return m}),U.d(G,"mapPartIntersection",function(){return f}),U.d(G,"mapFragmentIntersection",function(){return p}),U.d(G,"adjustSliding",function(){return c}),U.d(G,"addSliding",function(){return r}),U.d(G,"computeReloadInterval",function(){return d}),U.d(G,"getFragmentWithSN",function(){return u}),U.d(G,"getPartWith",function(){return o});var V=U("./src/polyfills/number.ts"),W=U("./src/utils/logger.ts");function M(s,a,R){switch(a){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(R);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(R);break}}function K(s){var a={};s.forEach(function(R){var O=R.groupId||"";R.id=a[O]=a[O]||0,a[O]++})}function j(s,a,R){var O=s[a],S=s[R];n(O,S)}function n(s,a){var R=a.startPTS;if(Object(V.isFiniteNumber)(R)){var O=0,S;a.sn>s.sn?(O=R-s.start,S=s):(O=s.start-R,S=a),S.duration!==O&&(S.duration=O)}else if(a.sn>s.sn){var D=s.cc===a.cc;D&&s.minEndPTS?a.start=s.start+(s.minEndPTS-s.start):a.start=s.start+s.duration}else a.start=Math.max(s.start-a.duration,0)}function w(s,a,R,O,S,D){var I=O-R;I<=0&&(W.logger.warn("Fragment should have a positive duration",a),O=R+a.duration,D=S+a.duration);var _=R,b=O,v=a.startPTS,h=a.endPTS;if(Object(V.isFiniteNumber)(v)){var C=Math.abs(v-R);Object(V.isFiniteNumber)(a.deltaPTS)?a.deltaPTS=Math.max(C,a.deltaPTS):a.deltaPTS=C,_=Math.max(R,v),R=Math.min(R,v),S=Math.min(S,a.startDTS),b=Math.min(O,h),O=Math.max(O,h),D=Math.max(D,a.endDTS)}a.duration=O-R;var x=R-a.start;a.appendedPTS=O,a.start=a.startPTS=R,a.maxStartPTS=_,a.startDTS=S,a.endPTS=O,a.minEndPTS=b,a.endDTS=D;var g=a.sn;if(!s||g<s.startSN||g>s.endSN)return 0;var P,k=g-s.startSN,y=s.fragments;for(y[k]=a,P=k;P>0;P--)n(y[P],y[P-1]);for(P=k;P<y.length-1;P++)n(y[P],y[P+1]);return s.fragmentHint&&n(y[y.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,x}function m(s,a){for(var R=null,O=s.fragments,S=O.length-1;S>=0;S--){var D=O[S].initSegment;if(D){R=D;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var I=0,_;if(p(s,a,function(P,k){P.relurl&&(I=P.cc-k.cc),Object(V.isFiniteNumber)(P.startPTS)&&Object(V.isFiniteNumber)(P.endPTS)&&(k.start=k.startPTS=P.startPTS,k.startDTS=P.startDTS,k.appendedPTS=P.appendedPTS,k.maxStartPTS=P.maxStartPTS,k.endPTS=P.endPTS,k.endDTS=P.endDTS,k.minEndPTS=P.minEndPTS,k.duration=P.endPTS-P.startPTS,k.duration&&(_=k),a.PTSKnown=a.alignedSliding=!0),k.elementaryStreams=P.elementaryStreams,k.loader=P.loader,k.stats=P.stats,k.urlId=P.urlId,P.initSegment&&(k.initSegment=P.initSegment,R=P.initSegment)}),R){var b=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;b.forEach(function(P){var k;(!P.initSegment||P.initSegment.relurl===((k=R)===null||k===void 0?void 0:k.relurl))&&(P.initSegment=R)})}if(a.skippedSegments&&(a.deltaUpdateFailed=a.fragments.some(function(P){return!P}),a.deltaUpdateFailed)){W.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var v=a.skippedSegments;v--;)a.fragments.shift();a.startSN=a.fragments[0].sn,a.startCC=a.fragments[0].cc}var h=a.fragments;if(I){W.logger.warn("discontinuity sliding from playlist, take drift into account");for(var C=0;C<h.length;C++)h[C].cc+=I}a.skippedSegments&&(a.startCC=a.fragments[0].cc),f(s.partList,a.partList,function(P,k){k.elementaryStreams=P.elementaryStreams,k.stats=P.stats}),_?w(a,_,_.startPTS,_.endPTS,_.startDTS,_.endDTS):c(s,a),h.length&&(a.totalduration=a.edge-h[0].start),a.driftStartTime=s.driftStartTime,a.driftStart=s.driftStart;var x=a.advancedDateTime;if(a.advanced&&x){var g=a.edge;a.driftStart||(a.driftStartTime=x,a.driftStart=g),a.driftEndTime=x,a.driftEnd=g}else a.driftEndTime=s.driftEndTime,a.driftEnd=s.driftEnd,a.advancedDateTime=s.advancedDateTime}function f(s,a,R){if(s&&a)for(var O=0,S=0,D=s.length;S<=D;S++){var I=s[S],_=a[S+O];I&&_&&I.index===_.index&&I.fragment.sn===_.fragment.sn?R(I,_):O--}}function p(s,a,R){for(var O=a.skippedSegments,S=Math.max(s.startSN,a.startSN)-a.startSN,D=(s.fragmentHint?1:0)+(O?a.endSN:Math.min(s.endSN,a.endSN))-a.startSN,I=a.startSN-s.startSN,_=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments,b=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,v=S;v<=D;v++){var h=b[I+v],C=_[v];O&&!C&&v<O&&(C=a.fragments[v]=h),h&&C&&R(h,C)}}function c(s,a){var R=a.startSN+a.skippedSegments-s.startSN,O=s.fragments;if(R<0||R>=O.length)return;r(a,O[R].start)}function r(s,a){if(a){for(var R=s.fragments,O=s.skippedSegments;O<R.length;O++)R[O].start+=a;s.fragmentHint&&(s.fragmentHint.start+=a)}}function d(s,a){var R=1e3*s.levelTargetDuration,O=R/2,S=s.age,D=S>0&&S<R*3,I=a.loading.end-a.loading.start,_,b=s.availabilityDelay;if(s.updated===!1)if(D){var v=333*s.misses;_=Math.max(Math.min(O,I*2),v),s.availabilityDelay=(s.availabilityDelay||0)+_}else _=O;else D?(b=Math.min(b||R/2,S),s.availabilityDelay=b,_=b+R-S):_=R-I;return Math.round(_)}function u(s,a,R){if(!s||!s.details)return null;var O=s.details,S=O.fragments[a-O.startSN];return S||(S=O.fragmentHint,S&&S.sn===a?S:a<O.startSN&&R&&R.sn===a?R:null)}function o(s,a,R){if(!s||!s.details)return null;var O=s.details.partList;if(O)for(var S=O.length;S--;){var D=O[S];if(D.index===R&&D.fragment.sn===a)return D}return null}},"./src/controller/stream-controller.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return O});var V=U("./src/polyfills/number.ts"),W=U("./src/controller/base-stream-controller.ts"),M=U("./src/is-supported.ts"),K=U("./src/events.ts"),j=U("./src/utils/buffer-helper.ts"),n=U("./src/controller/fragment-tracker.ts"),w=U("./src/types/loader.ts"),m=U("./src/loader/fragment.ts"),f=U("./src/demux/transmuxer-interface.ts"),p=U("./src/types/transmuxer.ts"),c=U("./src/controller/gap-controller.ts"),r=U("./src/errors.ts"),d=U("./src/utils/logger.ts");function u(S,D){for(var I=0;I<D.length;I++){var _=D[I];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(S,_.key,_)}}function o(S,D,I){return D&&u(S.prototype,D),I&&u(S,I),S}function s(S,D){S.prototype=Object.create(D.prototype),S.prototype.constructor=S,a(S,D)}function a(S,D){return a=Object.setPrototypeOf||function(_,b){return _.__proto__=b,_},a(S,D)}var R=100,O=function(S){s(D,S);function D(_,b){var v;return v=S.call(this,_,b,"[stream-controller]")||this,v.audioCodecSwap=!1,v.gapController=null,v.level=-1,v._forceStartLoad=!1,v.altAudio=!1,v.audioOnly=!1,v.fragPlaying=null,v.onvplaying=null,v.onvseeked=null,v.fragLastKbps=0,v.stalled=!1,v.couldBacktrack=!1,v.audioCodecSwitch=!1,v.videoBuffer=null,v._registerListeners(),v}var I=D.prototype;return I._registerListeners=function(){var b=this.hls;b.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.on(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.on(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.on(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.on(K.Events.LEVEL_LOADING,this.onLevelLoading,this),b.on(K.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(K.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),b.on(K.Events.ERROR,this.onError,this),b.on(K.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.on(K.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(K.Events.BUFFER_CREATED,this.onBufferCreated,this),b.on(K.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.on(K.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),b.on(K.Events.FRAG_BUFFERED,this.onFragBuffered,this)},I._unregisterListeners=function(){var b=this.hls;b.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.off(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.off(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.off(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.off(K.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(K.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),b.off(K.Events.ERROR,this.onError,this),b.off(K.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.off(K.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(K.Events.BUFFER_CREATED,this.onBufferCreated,this),b.off(K.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.off(K.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),b.off(K.Events.FRAG_BUFFERED,this.onFragBuffered,this)},I.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},I.startLoad=function(b){if(this.levels){var v=this.lastCurrentTime,h=this.hls;if(this.stopLoad(),this.setInterval(R),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var C=h.startLevel;C===-1&&(h.config.testBandwidth?(C=0,this.bitrateTest=!0):C=h.nextAutoLevel),this.level=h.nextLoadLevel=C,this.loadedmetadata=!1}v>0&&b===-1&&(this.log("Override startPosition with lastCurrentTime @"+v.toFixed(3)),b=v),this.state=W.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=b,this.tick()}else this._forceStartLoad=!0,this.state=W.State.STOPPED},I.stopLoad=function(){this._forceStartLoad=!1,S.prototype.stopLoad.call(this)},I.doTick=function(){switch(this.state){case W.State.IDLE:this.doTickIdle();break;case W.State.WAITING_LEVEL:{var b,v=this.levels,h=this.level,C=v==null||((b=v[h])===null||b===void 0)?void 0:b.details;if(C&&(!C.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(C))break;this.state=W.State.IDLE;break}break}case W.State.FRAG_LOADING_WAITING_RETRY:{var x,g=self.performance.now(),P=this.retryDate;(!P||g>=P||(x=this.media)!==null&&x!==void 0&&x.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=W.State.IDLE)}break;default:break}this.onTickEnd()},I.onTickEnd=function(){S.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},I.doTickIdle=function(){var b,v,h=this.hls,C=this.levelLastLoaded,x=this.levels,g=this.media,P=h.config,k=h.nextLoadLevel;if(C===null||!g&&(this.startFragRequested||!P.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!x||!x[k])return;var y=x[k];this.level=h.nextLoadLevel=k;var A=y.details;if(!A||this.state===W.State.WAITING_LEVEL||A.live&&this.levelLastLoaded!==k){this.state=W.State.WAITING_LEVEL;return}var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:g,w.PlaylistLevelType.MAIN);if(F===null)return;var T=F.len,Y=this.getMaxBufferLength(y.maxBitrate);if(T>=Y)return;if(this._streamEnded(F,A)){var $={};this.altAudio&&($.type="video"),this.hls.trigger(K.Events.BUFFER_EOS,$),this.state=W.State.ENDED;return}var le=F.end,de=this.getNextFragment(le,A);if(this.couldBacktrack&&!this.fragPrevious&&de&&de.sn!=="initSegment"){var Pe=de.sn-A.startSN;Pe>1&&(de=A.fragments[Pe-1],this.fragmentTracker.removeFragment(de))}if(de&&this.fragmentTracker.getState(de)===n.FragmentState.OK&&this.nextLoadPosition>le){var Se=this.audioOnly&&!this.altAudio?m.ElementaryStreamTypes.AUDIO:m.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(g,Se,w.PlaylistLevelType.MAIN),de=this.getNextFragment(this.nextLoadPosition,A)}if(!de)return;de.initSegment&&!de.initSegment.data&&!this.bitrateTest&&(de=de.initSegment),((b=de.decryptdata)===null||b===void 0?void 0:b.keyFormat)==="identity"&&!((v=de.decryptdata)!==null&&v!==void 0&&v.key)?this.loadKey(de,A):this.loadFragment(de,A,le)},I.loadFragment=function(b,v,h){var C,x=this.fragmentTracker.getState(b);if(this.fragCurrent=b,x===n.FragmentState.BACKTRACKED){var g=this.fragmentTracker.getBacktrackData(b);if(g){this._handleFragmentLoadProgress(g),this._handleFragmentLoadComplete(g);return}else x=n.FragmentState.NOT_LOADED}x===n.FragmentState.NOT_LOADED||x===n.FragmentState.PARTIAL?b.sn==="initSegment"?this._loadInitSegment(b):this.bitrateTest?(b.bitrateTest=!0,this.log("Fragment "+b.sn+" of level "+b.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(b)):(this.startFragRequested=!0,S.prototype.loadFragment.call(this,b,v,h)):x===n.FragmentState.APPENDING?this.reduceMaxBufferLength(b.duration)&&this.fragmentTracker.removeFragment(b):((C=this.media)===null||C===void 0?void 0:C.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},I.getAppendedFrag=function(b){var v=this.fragmentTracker.getAppendedFrag(b,w.PlaylistLevelType.MAIN);return v&&"fragment"in v?v.fragment:v},I.getBufferedFrag=function(b){return this.fragmentTracker.getBufferedFrag(b,w.PlaylistLevelType.MAIN)},I.followingBufferedFrag=function(b){return b?this.getBufferedFrag(b.end+.5):null},I.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},I.nextLevelSwitch=function(){var b=this.levels,v=this.media;if(v!=null&&v.readyState){var h,C=this.getAppendedFrag(v.currentTime);if(C&&C.start>1&&this.flushMainBuffer(0,C.start-1),!v.paused&&b){var x=this.hls.nextLoadLevel,g=b[x],P=this.fragLastKbps;P&&this.fragCurrent?h=this.fragCurrent.duration*g.maxBitrate/(1e3*P)+1:h=0}else h=0;var k=this.getBufferedFrag(v.currentTime+h);if(k){var y=this.followingBufferedFrag(k);if(y){this.abortCurrentFrag();var A=y.maxStartPTS?y.maxStartPTS:y.start,F=y.duration,T=Math.max(k.end,A+Math.min(Math.max(F-this.config.maxFragLookUpTolerance,F*.5),F*.75));this.flushMainBuffer(T,Number.POSITIVE_INFINITY)}}}},I.abortCurrentFrag=function(){var b=this.fragCurrent;this.fragCurrent=null,b!=null&&b.loader&&b.loader.abort(),this.state===W.State.KEY_LOADING&&(this.state=W.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},I.flushMainBuffer=function(b,v){S.prototype.flushMainBuffer.call(this,b,v,this.altAudio?"video":null)},I.onMediaAttached=function(b,v){S.prototype.onMediaAttached.call(this,b,v);var h=v.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),h.addEventListener("playing",this.onvplaying),h.addEventListener("seeked",this.onvseeked),this.gapController=new c.default(this.config,h,this.fragmentTracker,this.hls)},I.onMediaDetaching=function(){var b=this.media;b&&(b.removeEventListener("playing",this.onvplaying),b.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),S.prototype.onMediaDetaching.call(this)},I.onMediaPlaying=function(){this.tick()},I.onMediaSeeked=function(){var b=this.media,v=b?b.currentTime:null;Object(V.isFiniteNumber)(v)&&this.log("Media seeked to "+v.toFixed(3)),this.tick()},I.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(K.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},I.onManifestParsed=function(b,v){var h=!1,C=!1,x;v.levels.forEach(function(g){x=g.audioCodec,x&&(x.indexOf("mp4a.40.2")!==-1&&(h=!0),x.indexOf("mp4a.40.5")!==-1&&(C=!0))}),this.audioCodecSwitch=h&&C&&!Object(M.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=v.levels,this.startFragRequested=!1},I.onLevelLoading=function(b,v){var h=this.levels;if(!h||this.state!==W.State.IDLE)return;var C=h[v.level];(!C.details||C.details.live&&this.levelLastLoaded!==v.level||this.waitForCdnTuneIn(C.details))&&(this.state=W.State.WAITING_LEVEL)},I.onLevelLoaded=function(b,v){var h,C=this.levels,x=v.level,g=v.details,P=g.totalduration;if(!C){this.warn("Levels were reset while loading level "+x);return}this.log("Level "+x+" loaded ["+g.startSN+","+g.endSN+"], cc ["+g.startCC+", "+g.endCC+"] duration:"+P);var k=this.fragCurrent;k&&(this.state===W.State.FRAG_LOADING||this.state===W.State.FRAG_LOADING_WAITING_RETRY)&&(k.level!==v.level&&k.loader&&(this.state=W.State.IDLE,k.loader.abort()));var y=C[x],A=0;if(g.live||(h=y.details)!==null&&h!==void 0&&h.live){if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed)return;A=this.alignPlaylists(g,y.details)}if(y.details=g,this.levelLastLoaded=x,this.hls.trigger(K.Events.LEVEL_UPDATED,{details:g,level:x}),this.state===W.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(g))return;this.state=W.State.IDLE}this.startFragRequested?g.live&&this.synchronizeToLiveEdge(g):this.setStartPosition(g,A),this.tick()},I._handleFragmentLoadProgress=function(b){var v,h=b.frag,C=b.part,x=b.payload,g=this.levels;if(!g){this.warn("Levels were reset while fragment load was in progress. Fragment "+h.sn+" of level "+h.level+" will not be buffered");return}var P=g[h.level],k=P.details;if(!k){this.warn("Dropping fragment "+h.sn+" of level "+h.level+" after level details were reset");return}var y=P.videoCodec,A=k.PTSKnown||!k.live,F=(v=h.initSegment)===null||v===void 0?void 0:v.data,T=this._getAudioCodec(P),Y=this.transmuxer=this.transmuxer||new f.default(this.hls,w.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),$=C?C.index:-1,le=$!==-1,de=new p.ChunkMetadata(h.level,h.sn,h.stats.chunkCount,x.byteLength,$,le),Pe=this.initPTS[h.cc];Y.push(x,F,T,y,h,C,k.totalduration,A,de,Pe)},I.onAudioTrackSwitching=function(b,v){var h=this.altAudio,C=!!v.url,x=v.id;if(!C){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var g=this.fragCurrent;g!=null&&g.loader&&(this.log("Switching to main audio track, cancel main fragment load"),g.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var P=this.hls;h&&P.trigger(K.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),P.trigger(K.Events.AUDIO_TRACK_SWITCHED,{id:x})}},I.onAudioTrackSwitched=function(b,v){var h=v.id,C=!!this.hls.audioTracks[h].url;if(C){var x=this.videoBuffer;x&&this.mediaBuffer!==x&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=x)}this.altAudio=C,this.tick()},I.onBufferCreated=function(b,v){var h=v.tracks,C,x,g=!1;for(var P in h){var k=h[P];if(k.id==="main"){if(x=P,C=k,P==="video"){var y=h[P];y&&(this.videoBuffer=y.buffer)}}else g=!0}g&&C?(this.log("Alternate track found, use "+x+".buffered to schedule main fragment loading"),this.mediaBuffer=C.buffer):this.mediaBuffer=this.media},I.onFragBuffered=function(b,v){var h=v.frag,C=v.part;if(h&&h.type!==w.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(h)){this.warn("Fragment "+h.sn+(C?" p: "+C.index:"")+" of level "+h.level+" finished buffering, but was aborted. state: "+this.state),this.state===W.State.PARSED&&(this.state=W.State.IDLE);return}var x=C?C.stats:h.stats;this.fragLastKbps=Math.round(8*x.total/(x.buffering.end-x.loading.first)),h.sn!=="initSegment"&&(this.fragPrevious=h),this.fragBufferedComplete(h,C)},I.onError=function(b,v){switch(v.details){case r.ErrorDetails.FRAG_LOAD_ERROR:case r.ErrorDetails.FRAG_LOAD_TIMEOUT:case r.ErrorDetails.KEY_LOAD_ERROR:case r.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(w.PlaylistLevelType.MAIN,v);break;case r.ErrorDetails.LEVEL_LOAD_ERROR:case r.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==W.State.ERROR&&(v.fatal?(this.warn(""+v.details),this.state=W.State.ERROR):!v.levelRetry&&this.state===W.State.WAITING_LEVEL&&(this.state=W.State.IDLE));break;case r.ErrorDetails.BUFFER_FULL_ERROR:if(v.parent==="main"&&(this.state===W.State.PARSING||this.state===W.State.PARSED)){var h=!0,C=this.getFwdBufferInfo(this.media,w.PlaylistLevelType.MAIN);C&&C.len>.5&&(h=!this.reduceMaxBufferLength(C.len)),h&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},I.checkBuffer=function(){var b=this.media,v=this.gapController;if(!b||!v||!b.readyState)return;var h=j.BufferHelper.getBuffered(b);!this.loadedmetadata&&h.length?(this.loadedmetadata=!0,this.seekToStartPos()):v.poll(this.lastCurrentTime),this.lastCurrentTime=b.currentTime},I.onFragLoadEmergencyAborted=function(){this.state=W.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},I.onBufferFlushed=function(b,v){var h=v.type;if(h!==m.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var C=(h===m.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(C,h,w.PlaylistLevelType.MAIN)}},I.onLevelsUpdated=function(b,v){this.levels=v.levels},I.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},I.seekToStartPos=function(){var b=this.media,v=b.currentTime,h=this.startPosition;if(h>=0&&v<h){if(b.seeking){d.logger.log("could not seek to "+h+", already seeking at "+v);return}var C=j.BufferHelper.getBuffered(b),x=C.length?C.start(0):0,g=x-h;g>0&&(g<this.config.maxBufferHole||g<this.config.maxFragLookUpTolerance)&&(d.logger.log("adjusting start position by "+g+" to match buffer start"),h+=g,this.startPosition=h),this.log("seek to target start position "+h+" from current time "+v),b.currentTime=h}},I._getAudioCodec=function(b){var v=this.config.defaultAudioCodec||b.audioCodec;return this.audioCodecSwap&&v&&(this.log("Swapping audio codec"),v.indexOf("mp4a.40.5")!==-1?v="mp4a.40.2":v="mp4a.40.5"),v},I._loadBitrateTestFrag=function(b){var v=this;this._doFragLoad(b).then(function(h){var C=v.hls;if(!h||C.nextLoadLevel||v.fragContextChanged(b))return;v.fragLoadError=0,v.state=W.State.IDLE,v.startFragRequested=!1,v.bitrateTest=!1;var x=b.stats;x.parsing.start=x.parsing.end=x.buffering.start=x.buffering.end=self.performance.now(),C.trigger(K.Events.FRAG_LOADED,h)})},I._handleTransmuxComplete=function(b){var v,h="main",C=this.hls,x=b.remuxResult,g=b.chunkMeta,P=this.getCurrentContext(g);if(!P){this.warn("The loading context changed while buffering fragment "+g.sn+" of level "+g.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(g.level);return}var k=P.frag,y=P.part,A=P.level,F=x.video,T=x.text,Y=x.id3,$=x.initSegment,le=this.altAudio?void 0:x.audio;if(this.fragContextChanged(k))return;if(this.state=W.State.PARSING,$){$.tracks&&(this._bufferInitSegment(A,$.tracks,k,g),C.trigger(K.Events.FRAG_PARSING_INIT_SEGMENT,{frag:k,id:h,tracks:$.tracks}));var de=$.initPTS,Pe=$.timescale;Object(V.isFiniteNumber)(de)&&(this.initPTS[k.cc]=de,C.trigger(K.Events.INIT_PTS_FOUND,{frag:k,id:h,initPTS:de,timescale:Pe}))}if(F&&x.independent!==!1){if(A.details){var Se=F.startPTS,we=F.endPTS,Fe=F.startDTS,Me=F.endDTS;if(y)y.elementaryStreams[F.type]={startPTS:Se,endPTS:we,startDTS:Fe,endDTS:Me};else if(F.firstKeyFrame&&F.independent&&(this.couldBacktrack=!0),F.dropped&&F.independent){var me=this.getLoadPosition()+this.config.maxBufferHole;if(me<Se){this.backtrack(k);return}k.setElementaryStreamInfo(F.type,k.start,we,k.start,Me,!0)}k.setElementaryStreamInfo(F.type,Se,we,Fe,Me),this.bufferFragmentData(F,k,y,g)}}else if(x.independent===!1){this.backtrack(k);return}if(le){var pe=le.startPTS,ne=le.endPTS,Ee=le.startDTS,ae=le.endDTS;y&&(y.elementaryStreams[m.ElementaryStreamTypes.AUDIO]={startPTS:pe,endPTS:ne,startDTS:Ee,endDTS:ae}),k.setElementaryStreamInfo(m.ElementaryStreamTypes.AUDIO,pe,ne,Ee,ae),this.bufferFragmentData(le,k,y,g)}if(Y!=null&&(v=Y.samples)!==null&&v!==void 0&&v.length){var ke={frag:k,id:h,samples:Y.samples};C.trigger(K.Events.FRAG_PARSING_METADATA,ke)}if(T){var je={frag:k,id:h,samples:T.samples};C.trigger(K.Events.FRAG_PARSING_USERDATA,je)}},I._bufferInitSegment=function(b,v,h,C){var x=this;if(this.state!==W.State.PARSING)return;this.audioOnly=!!v.audio&&!v.video,this.altAudio&&!this.audioOnly&&delete v.audio;var g=v.audio,P=v.video,k=v.audiovideo;if(g){var y=b.audioCodec,A=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(y&&(y.indexOf("mp4a.40.5")!==-1?y="mp4a.40.2":y="mp4a.40.5"),g.metadata.channelCount!==1&&A.indexOf("firefox")===-1&&(y="mp4a.40.5")),A.indexOf("android")!==-1&&g.container!=="audio/mpeg"&&(y="mp4a.40.2",this.log("Android: force audio codec to "+y)),b.audioCodec&&b.audioCodec!==y&&this.log('Swapping manifest audio codec "'+b.audioCodec+'" for "'+y+'"'),g.levelCodec=y,g.id="main",this.log("Init audio buffer, container:"+g.container+", codecs[selected/level/parsed]=["+(y||"")+"/"+(b.audioCodec||"")+"/"+g.codec+"]")}P&&(P.levelCodec=b.videoCodec,P.id="main",this.log("Init video buffer, container:"+P.container+", codecs[level/parsed]=["+(b.videoCodec||"")+"/"+P.codec+"]")),k&&this.log("Init audiovideo buffer, container:"+k.container+", codecs[level/parsed]=["+(b.attrs.CODECS||"")+"/"+k.codec+"]"),this.hls.trigger(K.Events.BUFFER_CODECS,v),Object.keys(v).forEach(function(F){var T=v[F],Y=T.initSegment;Y!=null&&Y.byteLength&&x.hls.trigger(K.Events.BUFFER_APPENDING,{type:F,data:Y,frag:h,part:null,chunkMeta:C,parent:h.type})}),this.tick()},I.backtrack=function(b){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(b);var v=this.fragmentTracker.backtrack(b);this.fragPrevious=null,this.nextLoadPosition=b.start,v?this.resetFragmentLoading(b):this.state=W.State.BACKTRACKING},I.checkFragmentChanged=function(){var b=this.media,v=null;if(b&&b.readyState>1&&b.seeking===!1){var h=b.currentTime;if(j.BufferHelper.isBuffered(b,h)?v=this.getAppendedFrag(h):j.BufferHelper.isBuffered(b,h+.1)&&(v=this.getAppendedFrag(h+.1)),v){var C=this.fragPlaying,x=v.level;(!C||v.sn!==C.sn||C.level!==x||v.urlId!==C.urlId)&&(this.hls.trigger(K.Events.FRAG_CHANGED,{frag:v}),(!C||C.level!==x)&&this.hls.trigger(K.Events.LEVEL_SWITCHED,{level:x}),this.fragPlaying=v)}}},o(D,[{key:"nextLevel",get:function(){var b=this.nextBufferedFrag;return b?b.level:-1}},{key:"currentLevel",get:function(){var b=this.media;if(b){var v=this.getAppendedFrag(b.currentTime);if(v)return v.level}return-1}},{key:"nextBufferedFrag",get:function(){var b=this.media;if(b){var v=this.getAppendedFrag(b.currentTime);return this.followingBufferedFrag(v)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),D}(W.default)},"./src/controller/subtitle-stream-controller.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"SubtitleStreamController",function(){return s});var V=U("./src/events.ts"),W=U("./src/utils/logger.ts"),M=U("./src/utils/buffer-helper.ts"),K=U("./src/controller/fragment-finders.ts"),j=U("./src/utils/discontinuities.ts"),n=U("./src/controller/level-helper.ts"),w=U("./src/controller/fragment-tracker.ts"),m=U("./src/controller/base-stream-controller.ts"),f=U("./src/types/loader.ts"),p=U("./src/types/level.ts");function c(a,R){for(var O=0;O<R.length;O++){var S=R[O];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(a,S.key,S)}}function r(a,R,O){return R&&c(a.prototype,R),O&&c(a,O),a}function d(a,R){a.prototype=Object.create(R.prototype),a.prototype.constructor=a,u(a,R)}function u(a,R){return u=Object.setPrototypeOf||function(S,D){return S.__proto__=D,S},u(a,R)}var o=500,s=function(a){d(R,a);function R(S,D){var I;return I=a.call(this,S,D,"[subtitle-stream-controller]")||this,I.levels=[],I.currentTrackId=-1,I.tracksBuffered=[],I.mainDetails=null,I._registerListeners(),I}var O=R.prototype;return O.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},O._registerListeners=function(){var D=this.hls;D.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),D.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),D.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),D.on(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.on(V.Events.ERROR,this.onError,this),D.on(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),D.on(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),D.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),D.on(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),D.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},O._unregisterListeners=function(){var D=this.hls;D.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),D.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),D.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),D.off(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.off(V.Events.ERROR,this.onError,this),D.off(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),D.off(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),D.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),D.off(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),D.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},O.startLoad=function(){this.stopLoad(),this.state=m.State.IDLE,this.setInterval(o),this.tick()},O.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},O.onLevelLoaded=function(D,I){this.mainDetails=I.details},O.onSubtitleFragProcessed=function(D,I){var _=I.frag,b=I.success;if(this.fragPrevious=_,this.state=m.State.IDLE,!b)return;var v=this.tracksBuffered[this.currentTrackId];if(!v)return;for(var h,C=_.start,x=0;x<v.length;x++)if(C>=v[x].start&&C<=v[x].end){h=v[x];break}var g=_.start+_.duration;h?h.end=g:(h={start:C,end:g},v.push(h)),this.fragmentTracker.fragBuffered(_)},O.onBufferFlushing=function(D,I){var _=I.startOffset,b=I.endOffset;if(_===0&&b!==Number.POSITIVE_INFINITY){var v=this.currentTrackId,h=this.levels;if(!h.length||!h[v]||!h[v].details)return;var C=h[v].details,x=C.targetduration,g=b-x;if(g<=0)return;I.endOffsetSubtitles=Math.max(0,g),this.tracksBuffered.forEach(function(P){for(var k=0;k<P.length;){if(P[k].end<=g){P.shift();continue}else if(P[k].start<g)P[k].start=g;else break;k++}}),this.fragmentTracker.removeFragmentsInRange(_,g,f.PlaylistLevelType.SUBTITLE)}},O.onError=function(D,I){var _,b=I.frag;if(!b||b.type!==f.PlaylistLevelType.SUBTITLE)return;(_=this.fragCurrent)!==null&&_!==void 0&&_.loader&&this.fragCurrent.loader.abort(),this.state=m.State.IDLE},O.onSubtitleTracksUpdated=function(D,I){var _=this,b=I.subtitleTracks;this.tracksBuffered=[],this.levels=b.map(function(v){return new p.Level(v)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(v){_.tracksBuffered[v.id]=[]}),this.mediaBuffer=null},O.onSubtitleTrackSwitch=function(D,I){if(this.currentTrackId=I.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(o)},O.onSubtitleTrackLoaded=function(D,I){var _,b=I.details,v=I.id,h=this.currentTrackId,C=this.levels;if(!C.length)return;var x=C[h];if(v>=C.length||v!==h||!x)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,b.live||(_=x.details)!==null&&_!==void 0&&_.live){var g=this.mainDetails;if(b.deltaUpdateFailed||!g)return;var P=g.fragments[0];if(!x.details)b.hasProgramDateTime&&g.hasProgramDateTime?Object(j.alignMediaPlaylistByPDT)(b,g):P&&Object(n.addSliding)(b,P.start);else{var k=this.alignPlaylists(b,x.details);k===0&&P&&Object(n.addSliding)(b,P.start)}}if(x.details=b,this.levelLastLoaded=v,this.tick(),b.live&&!this.fragCurrent&&this.media&&this.state===m.State.IDLE){var y=Object(K.findFragmentByPTS)(null,b.fragments,this.media.currentTime,0);y||(this.warn("Subtitle playlist not aligned with playback"),x.details=void 0)}},O._handleFragmentLoadComplete=function(D){var I=D.frag,_=D.payload,b=I.decryptdata,v=this.hls;if(this.fragContextChanged(I))return;if(_&&_.byteLength>0&&b&&b.key&&b.iv&&b.method==="AES-128"){var h=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(_),b.key.buffer,b.iv.buffer).then(function(C){var x=performance.now();v.trigger(V.Events.FRAG_DECRYPTED,{frag:I,payload:C,stats:{tstart:h,tdecrypt:x}})})}},O.doTick=function(){if(!this.media){this.state=m.State.IDLE;return}if(this.state===m.State.IDLE){var D,I=this.currentTrackId,_=this.levels;if(!_.length||!_[I]||!_[I].details)return;var b=_[I].details,v=b.targetduration,h=this.config,C=this.media,x=M.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,C.currentTime-v,h.maxBufferHole),g=x.end,P=x.len,k=this.getMaxBufferLength()+v;if(P>k)return;console.assert(b,"Subtitle track details are defined on idle subtitle stream controller tick");var y=b.fragments,A=y.length,F=b.edge,T,Y=this.fragPrevious;if(g<F){var $=h.maxFragLookUpTolerance;Y&&b.hasProgramDateTime&&(T=Object(K.findFragmentByPDT)(y,Y.endProgramDateTime,$)),T||(T=Object(K.findFragmentByPTS)(Y,y,g,$),!T&&Y&&Y.start<y[0].start&&(T=y[0]))}else T=y[A-1];(D=T)!==null&&D!==void 0&&D.encrypted?(W.logger.log("Loading key for "+T.sn),this.state=m.State.KEY_LOADING,this.hls.trigger(V.Events.KEY_LOADING,{frag:T})):T&&this.fragmentTracker.getState(T)===w.FragmentState.NOT_LOADED&&this.loadFragment(T,b,g)}},O.loadFragment=function(D,I,_){this.fragCurrent=D,a.prototype.loadFragment.call(this,D,I,_)},r(R,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),R}(m.default)},"./src/controller/subtitle-track-controller.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/events.ts"),W=U("./src/utils/texttrack-utils.ts"),M=U("./src/controller/base-playlist-controller.ts"),K=U("./src/types/loader.ts");function j(c,r){for(var d=0;d<r.length;d++){var u=r[d];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(c,u.key,u)}}function n(c,r,d){return r&&j(c.prototype,r),d&&j(c,d),c}function w(c,r){c.prototype=Object.create(r.prototype),c.prototype.constructor=c,m(c,r)}function m(c,r){return m=Object.setPrototypeOf||function(u,o){return u.__proto__=o,u},m(c,r)}var f=function(c){w(r,c);function r(u){var o;return o=c.call(this,u,"[subtitle-track-controller]")||this,o.media=null,o.tracks=[],o.groupId=null,o.tracksInGroup=[],o.trackId=-1,o.selectDefaultTrack=!0,o.queuedDefaultTrack=-1,o.trackChangeListener=function(){return o.onTextTracksChanged()},o.asyncPollTrackChange=function(){return o.pollTrackChange(0)},o.useTextTrackPolling=!1,o.subtitlePollingInterval=-1,o.subtitleDisplay=!0,o.registerListeners(),o}var d=r.prototype;return d.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,c.prototype.destroy.call(this)},d.registerListeners=function(){var o=this.hls;o.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),o.on(V.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var o=this.hls;o.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),o.off(V.Events.ERROR,this.onError,this)},d.onMediaAttached=function(o,s){if(this.media=s.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)},d.pollTrackChange=function(o){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,o)},d.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var o=p(this.media.textTracks);o.forEach(function(s){Object(W.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},d.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},d.onManifestParsed=function(o,s){this.tracks=s.subtitleTracks},d.onSubtitleTrackLoaded=function(o,s){var a=s.id,R=s.details,O=this.trackId,S=this.tracksInGroup[O];if(!S){this.warn("Invalid subtitle track id "+a);return}var D=S.details;S.details=s.details,this.log("subtitle track "+a+" loaded ["+R.startSN+"-"+R.endSN+"]"),a===this.trackId&&(this.retryCount=0,this.playlistLoaded(a,s,D))},d.onLevelLoading=function(o,s){this.switchLevel(s.level)},d.onLevelSwitching=function(o,s){this.switchLevel(s.level)},d.switchLevel=function(o){var s=this.hls.levels[o];if(!(s!=null&&s.textGroupIds))return;var a=s.textGroupIds[s.urlId];if(this.groupId!==a){var R=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,O=this.tracks.filter(function(I){return!a||I.groupId===a});this.tracksInGroup=O;var S=this.findTrackId(R==null?void 0:R.name)||this.findTrackId();this.groupId=a;var D={subtitleTracks:O};this.log("Updating subtitle tracks, "+O.length+' track(s) found in "'+a+'" group-id'),this.hls.trigger(V.Events.SUBTITLE_TRACKS_UPDATED,D),S!==-1&&this.setSubtitleTrack(S,R)}},d.findTrackId=function(o){for(var s=this.tracksInGroup,a=0;a<s.length;a++){var R=s[a];if((!this.selectDefaultTrack||R.default)&&(!o||o===R.name))return R.id}return-1},d.onError=function(o,s){if(c.prototype.onError.call(this,o,s),s.fatal||!s.context)return;s.context.type===K.PlaylistContextType.SUBTITLE_TRACK&&s.context.id===this.trackId&&s.context.groupId===this.groupId&&this.retryLoadingOrFail(s)},d.loadPlaylist=function(o){var s=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(s)){var a=s.id,R=s.groupId,O=s.url;if(o)try{O=o.addDirectives(O)}catch(S){this.warn("Could not construct new URL with HLS Delivery Directives: "+S)}this.log("Loading subtitle playlist for id "+a),this.hls.trigger(V.Events.SUBTITLE_TRACK_LOADING,{url:O,id:a,groupId:R,deliveryDirectives:o||null})}},d.toggleTrackModes=function(o){var s=this,a=this.media,R=this.subtitleDisplay,O=this.trackId;if(!a)return;var S=p(a.textTracks),D=S.filter(function(b){return b.groupId===s.groupId});if(o===-1)[].slice.call(S).forEach(function(b){b.mode="disabled"});else{var I=D[O];I&&(I.mode="disabled")}var _=D[o];_&&(_.mode=R?"showing":"hidden")},d.setSubtitleTrack=function(o,s){var a,R=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=o;return}if(this.trackId!==o&&this.toggleTrackModes(o),this.trackId===o&&(o===-1||(a=R[o])!==null&&a!==void 0&&a.details)||o<-1||o>=R.length)return;this.clearTimer();var O=R[o];if(this.log("Switching to subtitle track "+o),this.trackId=o,O){var S=O.id,D=O.groupId,I=D===void 0?"":D,_=O.name,b=O.type,v=O.url;this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:S,groupId:I,name:_,type:b,url:v});var h=this.switchParams(O.url,s==null?void 0:s.details);this.loadPlaylist(h)}else this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:o})},d.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var o=-1,s=p(this.media.textTracks),a=0;a<s.length;a++)if(s[a].mode==="hidden")o=a;else if(s[a].mode==="showing"){o=a;break}this.subtitleTrack!==o&&(this.subtitleTrack=o)},n(r,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(o){this.selectDefaultTrack=!1;var s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(o,s)}}]),r}(M.default);function p(c){for(var r=[],d=0;d<c.length;d++){var u=c[d];u.kind==="subtitles"&&u.label&&r.push(c[d])}return r}G.default=f},"./src/controller/timeline-controller.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"TimelineController",function(){return p});var V=U("./src/polyfills/number.ts"),W=U("./src/events.ts"),M=U("./src/utils/cea-608-parser.ts"),K=U("./src/utils/output-filter.ts"),j=U("./src/utils/webvtt-parser.ts"),n=U("./src/utils/texttrack-utils.ts"),w=U("./src/utils/imsc1-ttml-parser.ts"),m=U("./src/types/loader.ts"),f=U("./src/utils/logger.ts"),p=function(){function u(s){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=d(),this.captionsProperties=void 0,this.hls=s,this.config=s.config,this.Cues=s.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 a=new K.default(this,"textTrack1"),R=new K.default(this,"textTrack2"),O=new K.default(this,"textTrack3"),S=new K.default(this,"textTrack4");this.cea608Parser1=new M.default(1,a,R),this.cea608Parser2=new M.default(3,O,S)}s.on(W.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(W.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(W.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.on(W.Events.FRAG_LOADING,this.onFragLoading,this),s.on(W.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(W.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.on(W.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.on(W.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.on(W.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.on(W.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var o=u.prototype;return o.destroy=function(){var a=this.hls;a.off(W.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(W.Events.MANIFEST_LOADED,this.onManifestLoaded,this),a.off(W.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),a.off(W.Events.FRAG_LOADING,this.onFragLoading,this),a.off(W.Events.FRAG_LOADED,this.onFragLoaded,this),a.off(W.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),a.off(W.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),a.off(W.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.off(W.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),a.off(W.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},o.addCues=function(a,R,O,S,D){for(var I=!1,_=D.length;_--;){var b=D[_],v=r(b[0],b[1],R,O);if(v>=0&&(b[0]=Math.min(b[0],R),b[1]=Math.max(b[1],O),I=!0,v/(O-R)>.5))return}if(I||D.push([R,O]),this.config.renderTextTracksNatively){var h=this.captionsTracks[a];this.Cues.newCue(h,R,O,S)}else{var C=this.Cues.newCue(null,R,O,S);this.hls.trigger(W.Events.CUES_PARSED,{type:"captions",cues:C,track:a})}},o.onInitPtsFound=function(a,R){var O=this,S=R.frag,D=R.id,I=R.initPTS,_=R.timescale,b=this.unparsedVttFrags;D==="main"&&(this.initPTS[S.cc]=I,this.timescale[S.cc]=_),b.length&&(this.unparsedVttFrags=[],b.forEach(function(v){O.onFragLoaded(W.Events.FRAG_LOADED,v)}))},o.getExistingTrack=function(a){var R=this.media;if(R)for(var O=0;O<R.textTracks.length;O++){var S=R.textTracks[O];if(S[a])return S}return null},o.createCaptionsTrack=function(a){this.config.renderTextTracksNatively?this.createNativeTrack(a):this.createNonNativeTrack(a)},o.createNativeTrack=function(a){if(this.captionsTracks[a])return;var R=this.captionsProperties,O=this.captionsTracks,S=this.media,D=R[a],I=D.label,_=D.languageCode,b=this.getExistingTrack(a);if(b)O[a]=b,Object(n.clearCurrentCues)(O[a]),Object(n.sendAddTrackEvent)(O[a],S);else{var v=this.createTextTrack("captions",I,_);v&&(v[a]=!0,O[a]=v)}},o.createNonNativeTrack=function(a){if(this.nonNativeCaptionsTracks[a])return;var R=this.captionsProperties[a];if(!R)return;var O=R.label,S={_id:a,label:O,kind:"captions",default:R.media?!!R.media.default:!1,closedCaptions:R.media};this.nonNativeCaptionsTracks[a]=S,this.hls.trigger(W.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[S]})},o.createTextTrack=function(a,R,O){var S=this.media;return S?S.addTextTrack(a,R,O):void 0},o.onMediaAttaching=function(a,R){this.media=R.media,this._cleanTracks()},o.onMediaDetaching=function(){var a=this.captionsTracks;Object.keys(a).forEach(function(R){Object(n.clearCurrentCues)(a[R]),delete a[R]}),this.nonNativeCaptionsTracks={}},o.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=d(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},o._cleanTracks=function(){var a=this.media;if(!a)return;var R=a.textTracks;if(R)for(var O=0;O<R.length;O++)Object(n.clearCurrentCues)(R[O])},o.onSubtitleTracksUpdated=function(a,R){var O=this;this.textTracks=[];var S=R.subtitleTracks||[],D=S.some(function(v){return v.textCodec===w.IMSC1_CODEC});if(this.config.enableWebVTT||D&&this.config.enableIMSC1){var I=this.tracks&&S&&this.tracks.length===S.length;if(this.tracks=S||[],this.config.renderTextTracksNatively){var _=this.media?this.media.textTracks:[];this.tracks.forEach(function(v,h){var C;if(h<_.length){for(var x=null,g=0;g<_.length;g++)if(c(_[g],v)){x=_[g];break}x&&(C=x)}C?Object(n.clearCurrentCues)(C):(C=O.createTextTrack("subtitles",v.name,v.lang),C&&(C.mode="disabled")),C&&(C.groupId=v.groupId,O.textTracks.push(C))})}else if(!I&&this.tracks&&this.tracks.length){var b=this.tracks.map(function(v){return{label:v.name,kind:v.type.toLowerCase(),default:v.default,subtitleTrack:v}});this.hls.trigger(W.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:b})}}},o.onManifestLoaded=function(a,R){var O=this;this.config.enableCEA708Captions&&R.captions&&R.captions.forEach(function(S){var D=/(?:CC|SERVICE)([1-4])/.exec(S.instreamId);if(!D)return;var I="textTrack"+D[1],_=O.captionsProperties[I];if(!_)return;_.label=S.name,S.lang&&(_.languageCode=S.lang),_.media=S})},o.onFragLoading=function(a,R){var O=this.cea608Parser1,S=this.cea608Parser2,D=this.lastSn,I=this.lastPartIndex;if(!this.enabled||!(O&&S))return;if(R.frag.type===m.PlaylistLevelType.MAIN){var _,b,v=R.frag.sn,h=(_=R==null||((b=R.part)===null||b===void 0)?void 0:b.index)!=null?_:-1;v===D+1||v===D&&h===I+1||(O.reset(),S.reset()),this.lastSn=v,this.lastPartIndex=h}},o.onFragLoaded=function(a,R){var O=R.frag,S=R.payload,D=this.initPTS,I=this.unparsedVttFrags;if(O.type===m.PlaylistLevelType.SUBTITLE)if(S.byteLength){if(!Object(V.isFiniteNumber)(D[O.cc])){I.push(R),D.length&&this.hls.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:O,error:new Error("Missing initial subtitle PTS")});return}var _=O.decryptdata;if(_==null||_.key==null||_.method!=="AES-128"){var b=this.tracks[O.level],v=this.vttCCs;v[O.cc]||(v[O.cc]={start:O.start,prevCC:this.prevCC,new:!0},this.prevCC=O.cc),b&&b.textCodec===w.IMSC1_CODEC?this._parseIMSC1(O,S):this._parseVTTs(O,S,v)}}else this.hls.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:O,error:new Error("Empty subtitle payload")})},o._parseIMSC1=function(a,R){var O=this,S=this.hls;Object(w.parseIMSC1)(R,this.initPTS[a.cc],this.timescale[a.cc],function(D){O._appendCues(D,a.level),S.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:a})},function(D){f.logger.log("Failed to parse IMSC1: "+D),S.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:a,error:D})})},o._parseVTTs=function(a,R,O){var S=this,D=this.hls;Object(j.parseWebVTT)(R,this.initPTS[a.cc],this.timescale[a.cc],O,a.cc,a.start,function(I){S._appendCues(I,a.level),D.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:a})},function(I){S._fallbackToIMSC1(a,R),f.logger.log("Failed to parse VTT cue: "+I),D.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:a,error:I})})},o._fallbackToIMSC1=function(a,R){var O=this,S=this.tracks[a.level];S.textCodec||Object(w.parseIMSC1)(R,this.initPTS[a.cc],this.timescale[a.cc],function(){S.textCodec=w.IMSC1_CODEC,O._parseIMSC1(a,R)},function(){S.textCodec="wvtt"})},o._appendCues=function(a,R){var O=this.hls;if(this.config.renderTextTracksNatively){var S=this.textTracks[R];if(S.mode==="disabled")return;a.forEach(function(_){return Object(n.addCueToTrack)(S,_)})}else{var D=this.tracks[R],I=D.default?"default":"subtitles"+R;O.trigger(W.Events.CUES_PARSED,{type:"subtitles",cues:a,track:I})}},o.onFragDecrypted=function(a,R){var O=R.frag;if(O.type===m.PlaylistLevelType.SUBTITLE){if(!Object(V.isFiniteNumber)(this.initPTS[O.cc])){this.unparsedVttFrags.push(R);return}this.onFragLoaded(W.Events.FRAG_LOADED,R)}},o.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},o.onFragParsingUserdata=function(a,R){var O=this.cea608Parser1,S=this.cea608Parser2;if(!this.enabled||!(O&&S))return;for(var D=0;D<R.samples.length;D++){var I=R.samples[D].bytes;if(I){var _=this.extractCea608Data(I);O.addData(R.samples[D].pts,_[0]),S.addData(R.samples[D].pts,_[1])}}},o.onBufferFlushing=function(a,R){var O=R.startOffset,S=R.endOffset,D=R.endOffsetSubtitles,I=R.type,_=this.media;if(!_||_.currentTime<S)return;if(!I||I==="video"){var b=this.captionsTracks;Object.keys(b).forEach(function(h){return Object(n.removeCuesInRange)(b[h],O,S)})}if(this.config.renderTextTracksNatively&&(O===0&&D!==void 0)){var v=this.textTracks;Object.keys(v).forEach(function(h){return Object(n.removeCuesInRange)(v[h],O,D)})}},o.extractCea608Data=function(a){for(var R=a[0]&31,O=2,S=[[],[]],D=0;D<R;D++){var I=a[O++],_=127&a[O++],b=127&a[O++],v=(4&I)!==0,h=3&I;if(_===0&&b===0)continue;v&&((h===0||h===1)&&(S[h].push(_),S[h].push(b)))}return S},u}();function c(u,o){return u&&u.label===o.name&&!(u.textTrack1||u.textTrack2)}function r(u,o,s,a){return Math.min(o,a)-Math.max(u,s)}function d(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return V});var V=function(){function W(K,j){this.subtle=void 0,this.aesIV=void 0,this.subtle=K,this.aesIV=j}var M=W.prototype;return M.decrypt=function(j,n){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},n,j)},W}()},"./src/crypt/aes-decryptor.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"removePadding",function(){return W}),U.d(G,"default",function(){return M});var V=U("./src/utils/typed-array.ts");function W(K){var j=K.byteLength,n=j&&new DataView(K.buffer).getUint8(j-1);return n?Object(V.sliceUint8)(K,0,j-n):K}var M=function(){function K(){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 j=K.prototype;return j.uint8ArrayToUint32Array_=function(w){for(var m=new DataView(w),f=new Uint32Array(4),p=0;p<4;p++)f[p]=m.getUint32(p*4);return f},j.initTable=function(){var w=this.sBox,m=this.invSBox,f=this.subMix,p=f[0],c=f[1],r=f[2],d=f[3],u=this.invSubMix,o=u[0],s=u[1],a=u[2],R=u[3],O=new Uint32Array(256),S=0,D=0,I=0;for(I=0;I<256;I++)I<128?O[I]=I<<1:O[I]=I<<1^283;for(I=0;I<256;I++){var _=D^D<<1^D<<2^D<<3^D<<4;_=_>>>8^_&255^99,w[S]=_,m[_]=S;var b=O[S],v=O[b],h=O[v],C=O[_]*257^_*16843008;p[S]=C<<24|C>>>8,c[S]=C<<16|C>>>16,r[S]=C<<8|C>>>24,d[S]=C,C=h*16843009^v*65537^b*257^S*16843008,o[_]=C<<24|C>>>8,s[_]=C<<16|C>>>16,a[_]=C<<8|C>>>24,R[_]=C,S?(S=b^O[O[O[h^b]]],D^=O[O[D]]):S=D=1}},j.expandKey=function(w){for(var m=this.uint8ArrayToUint32Array_(w),f=!0,p=0;p<m.length&&f;)f=m[p]===this.key[p],p++;if(f)return;this.key=m;var c=this.keySize=m.length;if(c!==4&&c!==6&&c!==8)throw new Error("Invalid aes key size="+c);var r=this.ksRows=(c+6+1)*4,d,u,o=this.keySchedule=new Uint32Array(r),s=this.invKeySchedule=new Uint32Array(r),a=this.sBox,R=this.rcon,O=this.invSubMix,S=O[0],D=O[1],I=O[2],_=O[3],b,v;for(d=0;d<r;d++){if(d<c){b=o[d]=m[d];continue}v=b,d%c===0?(v=v<<8|v>>>24,v=a[v>>>24]<<24|a[v>>>16&255]<<16|a[v>>>8&255]<<8|a[v&255],v^=R[d/c|0]<<24):c>6&&d%c===4&&(v=a[v>>>24]<<24|a[v>>>16&255]<<16|a[v>>>8&255]<<8|a[v&255]),o[d]=b=(o[d-c]^v)>>>0}for(u=0;u<r;u++)d=r-u,u&3?v=o[d]:v=o[d-4],u<4||d<=4?s[u]=v:s[u]=S[a[v>>>24]]^D[a[v>>>16&255]]^I[a[v>>>8&255]]^_[a[v&255]],s[u]=s[u]>>>0},j.networkToHostOrderSwap=function(w){return w<<24|(w&65280)<<8|(w&16711680)>>8|w>>>24},j.decrypt=function(w,m,f){for(var p=this.keySize+6,c=this.invKeySchedule,r=this.invSBox,d=this.invSubMix,u=d[0],o=d[1],s=d[2],a=d[3],R=this.uint8ArrayToUint32Array_(f),O=R[0],S=R[1],D=R[2],I=R[3],_=new Int32Array(w),b=new Int32Array(_.length),v,h,C,x,g,P,k,y,A,F,T,Y,$,le,de=this.networkToHostOrderSwap;m<_.length;){for(A=de(_[m]),F=de(_[m+1]),T=de(_[m+2]),Y=de(_[m+3]),g=A^c[0],P=Y^c[1],k=T^c[2],y=F^c[3],$=4,le=1;le<p;le++)v=u[g>>>24]^o[P>>16&255]^s[k>>8&255]^a[y&255]^c[$],h=u[P>>>24]^o[k>>16&255]^s[y>>8&255]^a[g&255]^c[$+1],C=u[k>>>24]^o[y>>16&255]^s[g>>8&255]^a[P&255]^c[$+2],x=u[y>>>24]^o[g>>16&255]^s[P>>8&255]^a[k&255]^c[$+3],g=v,P=h,k=C,y=x,$=$+4;v=r[g>>>24]<<24^r[P>>16&255]<<16^r[k>>8&255]<<8^r[y&255]^c[$],h=r[P>>>24]<<24^r[k>>16&255]<<16^r[y>>8&255]<<8^r[g&255]^c[$+1],C=r[k>>>24]<<24^r[y>>16&255]<<16^r[g>>8&255]<<8^r[P&255]^c[$+2],x=r[y>>>24]<<24^r[g>>16&255]<<16^r[P>>8&255]<<8^r[k&255]^c[$+3],b[m]=de(v^O),b[m+1]=de(x^S),b[m+2]=de(C^D),b[m+3]=de(h^I),O=A,S=F,D=T,I=Y,m=m+4}return b.buffer},K}()},"./src/crypt/decrypter.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return m});var V=U("./src/crypt/aes-crypto.ts"),W=U("./src/crypt/fast-aes-key.ts"),M=U("./src/crypt/aes-decryptor.ts"),K=U("./src/utils/logger.ts"),j=U("./src/utils/mp4-tools.ts"),n=U("./src/utils/typed-array.ts"),w=16,m=function(){function f(c,r,d){var u=d===void 0?{}:d,o=u.removePKCS7Padding,s=o===void 0?!0:o;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=c,this.config=r,this.removePKCS7Padding=s,s)try{var a=self.crypto;a&&(this.subtle=a.subtle||a.webkitSubtle)}catch(R){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var p=f.prototype;return p.destroy=function(){this.observer=null},p.isSync=function(){return this.config.enableSoftwareAES},p.flush=function(){var r=this.currentResult;if(!r){this.reset();return}var d=new Uint8Array(r);return this.reset(),this.removePKCS7Padding?Object(M.removePadding)(d):d},p.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},p.decrypt=function(r,d,u,o){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(r),d,u);var s=this.flush();s&&o(s.buffer)}else this.webCryptoDecrypt(new Uint8Array(r),d,u).then(o)},p.softwareDecrypt=function(r,d,u){var o=this.currentIV,s=this.currentResult,a=this.remainderData;this.logOnce("JS AES decrypt"),a&&(r=Object(j.appendUint8Array)(a,r),this.remainderData=null);var R=this.getValidChunk(r);if(!R.length)return null;o&&(u=o);var O=this.softwareDecrypter;O||(O=this.softwareDecrypter=new M.default),O.expandKey(d);var S=s;return this.currentResult=O.decrypt(R.buffer,0,u),this.currentIV=Object(n.sliceUint8)(R,-16).buffer,S||null},p.webCryptoDecrypt=function(r,d,u){var o=this,s=this.subtle;return(this.key!==d||!this.fastAesKey)&&(this.key=d,this.fastAesKey=new W.default(s,d)),this.fastAesKey.expandKey().then(function(a){if(!s)return Promise.reject(new Error("web crypto not initialized"));var R=new V.default(s,u);return R.decrypt(r.buffer,a)}).catch(function(a){return o.onWebCryptoError(a,r,d,u)})},p.onWebCryptoError=function(r,d,u,o){return K.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",r),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(d,u,o)},p.getValidChunk=function(r){var d=r,u=r.length-r.length%w;return u!==r.length&&(d=Object(n.sliceUint8)(r,0,u),this.remainderData=Object(n.sliceUint8)(r,u)),d},p.logOnce=function(r){if(!this.logEnabled)return;K.logger.log("[decrypter.ts]: "+r),this.logEnabled=!1},f}()},"./src/crypt/fast-aes-key.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return V});var V=function(){function W(K,j){this.subtle=void 0,this.key=void 0,this.subtle=K,this.key=j}var M=W.prototype;return M.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},W}()},"./src/demux/aacdemuxer.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/demux/base-audio-demuxer.ts"),W=U("./src/demux/adts.ts"),M=U("./src/utils/logger.ts"),K=U("./src/demux/id3.ts");function j(m,f){m.prototype=Object.create(f.prototype),m.prototype.constructor=m,n(m,f)}function n(m,f){return n=Object.setPrototypeOf||function(c,r){return c.__proto__=r,c},n(m,f)}var w=function(m){j(f,m);function f(c,r){var d;return d=m.call(this)||this,d.observer=void 0,d.config=void 0,d.observer=c,d.config=r,d}var p=f.prototype;return p.resetInitSegment=function(r,d,u){m.prototype.resetInitSegment.call(this,r,d,u),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:r,duration:u,inputTimeScale:9e4,dropped:0}},f.probe=function(r){if(!r)return!1;for(var d=K.getID3Data(r,0)||[],u=d.length,o=r.length;u<o;u++)if(W.probe(r,u))return M.logger.log("ADTS sync word found !"),!0;return!1},p.canParse=function(r,d){return W.canParse(r,d)},p.appendFrame=function(r,d,u){W.initTrackConfig(r,this.observer,d,u,r.manifestCodec);var o=W.appendFrame(r,d,u,this.initPTS,this.frameIndex);if(o&&o.missing===0)return o},f}(V.default);w.minProbeByteLength=9,G.default=w},"./src/demux/adts.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"getAudioConfig",function(){return K}),U.d(G,"isHeaderPattern",function(){return j}),U.d(G,"getHeaderLength",function(){return n}),U.d(G,"getFullFrameLength",function(){return w}),U.d(G,"canGetFrameLength",function(){return m}),U.d(G,"isHeader",function(){return f}),U.d(G,"canParse",function(){return p}),U.d(G,"probe",function(){return c}),U.d(G,"initTrackConfig",function(){return r}),U.d(G,"getFrameDuration",function(){return d}),U.d(G,"parseFrameHeader",function(){return u}),U.d(G,"appendFrame",function(){return o});var V=U("./src/utils/logger.ts"),W=U("./src/errors.ts"),M=U("./src/events.ts");function K(s,a,R,O){var S,D,I,_,b=navigator.userAgent.toLowerCase(),v=O,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];S=((a[R+2]&192)>>>6)+1;var C=(a[R+2]&60)>>>2;if(C>h.length-1){s.trigger(M.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+C});return}return I=(a[R+2]&1)<<2,I|=(a[R+3]&192)>>>6,V.logger.log("manifest codec:"+O+", ADTS type:"+S+", samplingIndex:"+C),/firefox/i.test(b)?C>=6?(S=5,_=new Array(4),D=C-3):(S=2,_=new Array(2),D=C):b.indexOf("android")!==-1?(S=2,_=new Array(2),D=C):(S=5,_=new Array(4),O&&(O.indexOf("mp4a.40.29")!==-1||O.indexOf("mp4a.40.5")!==-1)||!O&&C>=6?D=C-3:((O&&O.indexOf("mp4a.40.2")!==-1&&(C>=6&&I===1||/vivaldi/i.test(b))||!O&&I===1)&&(S=2,_=new Array(2)),D=C)),_[0]=S<<3,_[0]|=(C&14)>>1,_[1]|=(C&1)<<7,_[1]|=I<<3,S===5&&(_[1]|=(D&14)>>1,_[2]=(D&1)<<7,_[2]|=2<<2,_[3]=0),{config:_,samplerate:h[C],channelCount:I,codec:"mp4a.40."+S,manifestCodec:v}}function j(s,a){return s[a]===255&&(s[a+1]&246)===240}function n(s,a){return s[a+1]&1?7:9}function w(s,a){return(s[a+3]&3)<<11|s[a+4]<<3|(s[a+5]&224)>>>5}function m(s,a){return a+5<s.length}function f(s,a){return a+1<s.length&&j(s,a)}function p(s,a){return m(s,a)&&j(s,a)&&w(s,a)<=s.length-a}function c(s,a){if(f(s,a)){var R=n(s,a);if(a+R>=s.length)return!1;var O=w(s,a);if(O<=R)return!1;var S=a+O;return S===s.length||f(s,S)}return!1}function r(s,a,R,O,S){if(!s.samplerate){var D=K(a,R,O,S);if(!D)return;s.config=D.config,s.samplerate=D.samplerate,s.channelCount=D.channelCount,s.codec=D.codec,s.manifestCodec=D.manifestCodec,V.logger.log("parsed codec:"+s.codec+", rate:"+D.samplerate+", channels:"+D.channelCount)}}function d(s){return 1024*9e4/s}function u(s,a,R,O,S){var D=n(s,a),I=w(s,a);if(I-=D,I>0){var _=R+O*S;return{headerLength:D,frameLength:I,stamp:_}}}function o(s,a,R,O,S){var D=d(s.samplerate),I=u(a,R,O,S,D);if(I){var _=I.frameLength,b=I.headerLength,v=I.stamp,h=b+_,C=Math.max(0,R+h-a.length),x;C?(x=new Uint8Array(h-b),x.set(a.subarray(R+b,a.length),0)):x=a.subarray(R+b,R+h);var g={unit:x,pts:v};return C||s.samples.push(g),{sample:g,length:h,missing:C}}}},"./src/demux/base-audio-demuxer.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"initPTSFn",function(){return w});var V=U("./src/polyfills/number.ts"),W=U("./src/demux/id3.ts"),M=U("./src/demux/dummy-demuxed-track.ts"),K=U("./src/utils/mp4-tools.ts"),j=U("./src/utils/typed-array.ts"),n=function(){function m(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var f=m.prototype;return f.resetInitSegment=function(c,r,d){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},f.resetTimeStamp=function(){},f.resetContiguity=function(){},f.canParse=function(c,r){return!1},f.appendFrame=function(c,r,d){},f.demux=function(c,r){this.cachedData&&(c=Object(K.appendUint8Array)(this.cachedData,c),this.cachedData=null);var d=W.getID3Data(c,0),u=d?d.length:0,o,s,a=this._audioTrack,R=this._id3Track,O=d?W.getTimeStamp(d):void 0,S=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=w(O,r)),d&&d.length>0&&R.samples.push({pts:this.initPTS,dts:this.initPTS,data:d}),s=this.initPTS;u<S;){if(this.canParse(c,u)){var D=this.appendFrame(a,c,u);D?(this.frameIndex++,s=D.sample.pts,u+=D.length,o=u):u=S}else W.canParse(c,u)?(d=W.getID3Data(c,u),R.samples.push({pts:s,dts:s,data:d}),u+=d.length,o=u):u++;if(u===S&&o!==S){var I=Object(j.sliceUint8)(c,o);this.cachedData?this.cachedData=Object(K.appendUint8Array)(this.cachedData,I):this.cachedData=I}}return{audioTrack:a,avcTrack:Object(M.dummyTrack)(),id3Track:R,textTrack:Object(M.dummyTrack)()}},f.demuxSampleAes=function(c,r,d){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},f.flush=function(c){var r=this.cachedData;return r&&(this.cachedData=null,this.demux(r,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(M.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(M.dummyTrack)()}},f.destroy=function(){},m}(),w=function(f,p){return Object(V.isFiniteNumber)(f)?f*90:p*9e4};G.default=n},"./src/demux/chunk-cache.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return V});var V=function(){function M(){this.chunks=[],this.dataLength=0}var K=M.prototype;return K.push=function(n){this.chunks.push(n),this.dataLength+=n.length},K.flush=function(){var n=this.chunks,w=this.dataLength,m;if(n.length)n.length===1?m=n[0]:m=W(n,w);else return new Uint8Array(0);return this.reset(),m},K.reset=function(){this.chunks.length=0,this.dataLength=0},M}();function W(M,K){for(var j=new Uint8Array(K),n=0,w=0;w<M.length;w++){var m=M[w];j.set(m,n),n+=m.length}return j}},"./src/demux/dummy-demuxed-track.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"dummyTrack",function(){return V});function V(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/utils/logger.ts"),W=function(){function M(j){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=j,this.bytesAvailable=j.byteLength,this.word=0,this.bitsAvailable=0}var K=M.prototype;return K.loadWord=function(){var n=this.data,w=this.bytesAvailable,m=n.byteLength-w,f=new Uint8Array(4),p=Math.min(4,w);if(p===0)throw new Error("no bytes available");f.set(n.subarray(m,m+p)),this.word=new DataView(f.buffer).getUint32(0),this.bitsAvailable=p*8,this.bytesAvailable-=p},K.skipBits=function(n){var w;this.bitsAvailable>n?(this.word<<=n,this.bitsAvailable-=n):(n-=this.bitsAvailable,w=n>>3,n-=w>>3,this.bytesAvailable-=w,this.loadWord(),this.word<<=n,this.bitsAvailable-=n)},K.readBits=function(n){var w=Math.min(this.bitsAvailable,n),m=this.word>>>32-w;return n>32&&V.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=w,this.bitsAvailable>0?this.word<<=w:this.bytesAvailable>0&&this.loadWord(),w=n-w,w>0&&this.bitsAvailable?m<<w|this.readBits(w):m},K.skipLZ=function(){var n;for(n=0;n<this.bitsAvailable;++n)if((this.word&2147483648>>>n)!==0)return this.word<<=n,this.bitsAvailable-=n,n;return this.loadWord(),n+this.skipLZ()},K.skipUEG=function(){this.skipBits(1+this.skipLZ())},K.skipEG=function(){this.skipBits(1+this.skipLZ())},K.readUEG=function(){var n=this.skipLZ();return this.readBits(n+1)-1},K.readEG=function(){var n=this.readUEG();return 1&n?1+n>>>1:-1*(n>>>1)},K.readBoolean=function(){return this.readBits(1)===1},K.readUByte=function(){return this.readBits(8)},K.readUShort=function(){return this.readBits(16)},K.readUInt=function(){return this.readBits(32)},K.skipScalingList=function(n){for(var w=8,m=8,f,p=0;p<n;p++)m!==0&&(f=this.readEG(),m=(w+f+256)%256),w=m===0?w:m},K.readSPS=function(){var n=0,w=0,m=0,f=0,p,c,r,d=this.readUByte.bind(this),u=this.readBits.bind(this),o=this.readUEG.bind(this),s=this.readBoolean.bind(this),a=this.skipBits.bind(this),R=this.skipEG.bind(this),O=this.skipUEG.bind(this),S=this.skipScalingList.bind(this);d();var D=d();if(u(5),a(3),d(),O(),D===100||D===110||D===122||D===244||D===44||D===83||D===86||D===118||D===128){var I=o();if(I===3&&a(1),O(),O(),a(1),s())for(c=I!==3?8:12,r=0;r<c;r++)s()&&(r<6?S(16):S(64))}O();var _=o();if(_===0)o();else if(_===1)for(a(1),R(),R(),p=o(),r=0;r<p;r++)R();O(),a(1);var b=o(),v=o(),h=u(1);h===0&&a(1),a(1),s()&&(n=o(),w=o(),m=o(),f=o());var C=[1,1];if(s()&&s()){var x=d();switch(x){case 1:C=[1,1];break;case 2:C=[12,11];break;case 3:C=[10,11];break;case 4:C=[16,11];break;case 5:C=[40,33];break;case 6:C=[24,11];break;case 7:C=[20,11];break;case 8:C=[32,11];break;case 9:C=[80,33];break;case 10:C=[18,11];break;case 11:C=[15,11];break;case 12:C=[64,33];break;case 13:C=[160,99];break;case 14:C=[4,3];break;case 15:C=[3,2];break;case 16:C=[2,1];break;case 255:{C=[d()<<8|d(),d()<<8|d()];break}}}return{width:Math.ceil((b+1)*16-n*2-w*2),height:(2-h)*(v+1)*16-(h?2:4)*(m+f),pixelRatio:C}},K.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},M}();G.default=W},"./src/demux/id3.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"isHeader",function(){return V}),U.d(G,"isFooter",function(){return W}),U.d(G,"getID3Data",function(){return M}),U.d(G,"canParse",function(){return j}),U.d(G,"getTimeStamp",function(){return n}),U.d(G,"isTimeStampFrame",function(){return w}),U.d(G,"getID3Frames",function(){return f}),U.d(G,"decodeFrame",function(){return p}),U.d(G,"utf8ArrayToStr",function(){return o}),U.d(G,"testables",function(){return s});var V=function(S,D){return D+10<=S.length&&(S[D]===73&&S[D+1]===68&&S[D+2]===51&&(S[D+3]<255&&S[D+4]<255&&(S[D+6]<128&&S[D+7]<128&&S[D+8]<128&&S[D+9]<128)))},W=function(S,D){return D+10<=S.length&&(S[D]===51&&S[D+1]===68&&S[D+2]===73&&(S[D+3]<255&&S[D+4]<255&&(S[D+6]<128&&S[D+7]<128&&S[D+8]<128&&S[D+9]<128)))},M=function(S,D){for(var I=D,_=0;V(S,D);){_+=10;var b=K(S,D+6);_+=b,W(S,D+10)&&(_+=10),D+=_}return _>0?S.subarray(I,I+_):void 0},K=function(S,D){var I=0;return I=(S[D]&127)<<21,I|=(S[D+1]&127)<<14,I|=(S[D+2]&127)<<7,I|=S[D+3]&127,I},j=function(S,D){return V(S,D)&&K(S,D+6)+10<=S.length-D},n=function(S){for(var D=f(S),I=0;I<D.length;I++){var _=D[I];if(w(_))return u(_)}return},w=function(S){return S&&S.key==="PRIV"&&S.info==="com.apple.streaming.transportStreamTimestamp"},m=function(S){var D=String.fromCharCode(S[0],S[1],S[2],S[3]),I=K(S,4),_=10;return{type:D,size:I,data:S.subarray(_,_+I)}},f=function(S){for(var D=0,I=[];V(S,D);){var _=K(S,D+6);D+=10;for(var b=D+_;D+8<b;){var v=m(S.subarray(D)),h=p(v);h&&I.push(h),D+=v.size+10}W(S,D)&&(D+=10)}return I},p=function(S){return S.type==="PRIV"?c(S):S.type[0]==="W"?d(S):r(S)},c=function(S){if(S.size<2)return;var D=o(S.data,!0),I=new Uint8Array(S.data.subarray(D.length+1));return{key:S.type,info:D,data:I.buffer}},r=function(S){if(S.size<2)return;if(S.type==="TXXX"){var D=1,I=o(S.data.subarray(D),!0);D+=I.length+1;var _=o(S.data.subarray(D));return{key:S.type,info:I,data:_}}var b=o(S.data.subarray(1));return{key:S.type,data:b}},d=function(S){if(S.type==="WXXX"){if(S.size<2)return;var D=1,I=o(S.data.subarray(D),!0);D+=I.length+1;var _=o(S.data.subarray(D));return{key:S.type,info:I,data:_}}var b=o(S.data);return{key:S.type,data:b}},u=function(S){if(S.data.byteLength===8){var D=new Uint8Array(S.data),I=D[3]&1,_=(D[4]<<23)+(D[5]<<15)+(D[6]<<7)+D[7];return _/=45,I&&(_+=4772185884e-2),Math.round(_)}return},o=function(S,D){D===void 0&&(D=!1);var I=R();if(I){var _=I.decode(S);if(D){var b=_.indexOf("\0");return b!==-1?_.substring(0,b):_}return _.replace(/\0/g,"")}for(var v=S.length,h,C,x,g="",P=0;P<v;){if(h=S[P++],h===0&&D)return g;if(h===0||h===3)continue;switch(h>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:g+=String.fromCharCode(h);break;case 12:case 13:C=S[P++],g+=String.fromCharCode((h&31)<<6|C&63);break;case 14:C=S[P++],x=S[P++],g+=String.fromCharCode((h&15)<<12|(C&63)<<6|(x&63)<<0);break;default:}}return g},s={decodeTextFrame:r},a;function R(){return!a&&typeof self.TextDecoder!="undefined"&&(a=new self.TextDecoder("utf-8")),a}},"./src/demux/mp3demuxer.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/demux/base-audio-demuxer.ts"),W=U("./src/demux/id3.ts"),M=U("./src/utils/logger.ts"),K=U("./src/demux/mpegaudio.ts");function j(m,f){m.prototype=Object.create(f.prototype),m.prototype.constructor=m,n(m,f)}function n(m,f){return n=Object.setPrototypeOf||function(c,r){return c.__proto__=r,c},n(m,f)}var w=function(m){j(f,m);function f(){return m.apply(this,arguments)||this}var p=f.prototype;return p.resetInitSegment=function(r,d,u){m.prototype.resetInitSegment.call(this,r,d,u),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:r,duration:u,inputTimeScale:9e4,dropped:0}},f.probe=function(r){if(!r)return!1;for(var d=W.getID3Data(r,0)||[],u=d.length,o=r.length;u<o;u++)if(K.probe(r,u))return M.logger.log("MPEG Audio sync word found !"),!0;return!1},p.canParse=function(r,d){return K.canParse(r,d)},p.appendFrame=function(r,d,u){return this.initPTS===null?void 0:K.appendFrame(r,d,u,this.initPTS,this.frameIndex)},f}(V.default);w.minProbeByteLength=4,G.default=w},"./src/demux/mp4demuxer.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/utils/mp4-tools.ts"),W=U("./src/demux/dummy-demuxed-track.ts"),M=function(){function K(n,w){this.remainderData=null,this.config=void 0,this.config=w}var j=K.prototype;return j.resetTimeStamp=function(){},j.resetInitSegment=function(){},j.resetContiguity=function(){},K.probe=function(w){return Object(V.findBox)({data:w,start:0,end:Math.min(w.length,16384)},["moof"]).length>0},j.demux=function(w){var m=w,f=Object(W.dummyTrack)();if(this.config.progressive){this.remainderData&&(m=Object(V.appendUint8Array)(this.remainderData,w));var p=Object(V.segmentValidRange)(m);this.remainderData=p.remainder,f.samples=p.valid||new Uint8Array}else f.samples=m;return{audioTrack:Object(W.dummyTrack)(),avcTrack:f,id3Track:Object(W.dummyTrack)(),textTrack:Object(W.dummyTrack)()}},j.flush=function(){var w=Object(W.dummyTrack)();return w.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(W.dummyTrack)(),avcTrack:w,id3Track:Object(W.dummyTrack)(),textTrack:Object(W.dummyTrack)()}},j.demuxSampleAes=function(w,m,f){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},j.destroy=function(){},K}();M.minProbeByteLength=1024,G.default=M},"./src/demux/mpegaudio.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"appendFrame",function(){return n}),U.d(G,"parseHeader",function(){return w}),U.d(G,"isHeaderPattern",function(){return m}),U.d(G,"isHeader",function(){return f}),U.d(G,"canParse",function(){return p}),U.d(G,"probe",function(){return c});var V=null,W=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],M=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],K=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],j=[0,1,1,4];function n(r,d,u,o,s){if(u+24>d.length)return;var a=w(d,u);if(a&&u+a.frameLength<=d.length){var R=a.samplesPerFrame*9e4/a.sampleRate,O=o+s*R,S={unit:d.subarray(u,u+a.frameLength),pts:O,dts:O};return r.config=[],r.channelCount=a.channelCount,r.samplerate=a.sampleRate,r.samples.push(S),{sample:S,length:a.frameLength,missing:0}}}function w(r,d){var u=r[d+1]>>3&3,o=r[d+1]>>1&3,s=r[d+2]>>4&15,a=r[d+2]>>2&3;if(u!==1&&s!==0&&s!==15&&a!==3){var R=r[d+2]>>1&1,O=r[d+3]>>6,S=u===3?3-o:o===3?3:4,D=W[S*14+s-1]*1e3,I=u===3?0:u===2?1:2,_=M[I*3+a],b=O===3?1:2,v=K[u][o],h=j[o],C=v*8*h,x=Math.floor(v*D/_+R)*h;if(V===null){var g=navigator.userAgent||"",P=g.match(/Chrome\/(\d+)/i);V=P?parseInt(P[1]):0}var k=!!V&&V<=87;return k&&o===2&&D>=224e3&&O===0&&(r[d+3]=r[d+3]|128),{sampleRate:_,channelCount:b,frameLength:x,samplesPerFrame:C}}}function m(r,d){return r[d]===255&&(r[d+1]&224)===224&&(r[d+1]&6)!==0}function f(r,d){return d+1<r.length&&m(r,d)}function p(r,d){var u=4;return m(r,d)&&u<=r.length-d}function c(r,d){if(d+1<r.length&&m(r,d)){var u=4,o=w(r,d),s=u;o!=null&&o.frameLength&&(s=o.frameLength);var a=d+s;return a===r.length||f(r,a)}return!1}},"./src/demux/sample-aes.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/crypt/decrypter.ts"),W=U("./src/demux/tsdemuxer.ts"),M=function(){function K(n,w,m){this.keyData=void 0,this.decrypter=void 0,this.keyData=m,this.decrypter=new V.default(n,w,{removePKCS7Padding:!1})}var j=K.prototype;return j.decryptBuffer=function(w,m){this.decrypter.decrypt(w,this.keyData.key.buffer,this.keyData.iv.buffer,m)},j.decryptAacSample=function(w,m,f,p){var c=w[m].unit,r=c.subarray(16,c.length-c.length%16),d=r.buffer.slice(r.byteOffset,r.byteOffset+r.length),u=this;this.decryptBuffer(d,function(o){var s=new Uint8Array(o);c.set(s,16),p||u.decryptAacSamples(w,m+1,f)})},j.decryptAacSamples=function(w,m,f){for(;;m++){if(m>=w.length){f();return}if(w[m].unit.length<32)continue;var p=this.decrypter.isSync();if(this.decryptAacSample(w,m,f,p),!p)return}},j.getAvcEncryptedData=function(w){for(var m=Math.floor((w.length-48)/160)*16+16,f=new Int8Array(m),p=0,c=32;c<=w.length-16;c+=160,p+=16)f.set(w.subarray(c,c+16),p);return f},j.getAvcDecryptedUnit=function(w,m){for(var f=new Uint8Array(m),p=0,c=32;c<=w.length-16;c+=160,p+=16)w.set(f.subarray(p,p+16),c);return w},j.decryptAvcSample=function(w,m,f,p,c,r){var d=Object(W.discardEPB)(c.data),u=this.getAvcEncryptedData(d),o=this;this.decryptBuffer(u.buffer,function(s){c.data=o.getAvcDecryptedUnit(d,s),r||o.decryptAvcSamples(w,m,f+1,p)})},j.decryptAvcSamples=function(w,m,f,p){if(w instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;m++,f=0){if(m>=w.length){p();return}for(var c=w[m].units;!(f>=c.length);f++){var r=c[f];if(r.data.length<=48||r.type!==1&&r.type!==5)continue;var d=this.decrypter.isSync();if(this.decryptAvcSample(w,m,f,p,r,d),!d)return}}},K}();G.default=M},"./src/demux/transmuxer-interface.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return c});var V=U("./node_modules/webworkify-webpack/index.js"),W=U.n(V),M=U("./src/events.ts"),K=U("./src/demux/transmuxer.ts"),j=U("./src/utils/logger.ts"),n=U("./src/errors.ts"),w=U("./src/utils/mediasource-helper.ts"),m=U("./node_modules/eventemitter3/index.js"),f=U.n(m),p=Object(w.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function r(u,o,s,a){var R=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=u,this.id=o,this.onTransmuxComplete=s,this.onFlush=a;var O=u.config,S=function(v,h){h=h||{},h.frag=R.frag,h.id=R.id,u.trigger(v,h)};this.observer=new m.EventEmitter,this.observer.on(M.Events.FRAG_DECRYPTED,S),this.observer.on(M.Events.ERROR,S);var D={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},I=navigator.vendor;if(O.enableWorker&&typeof Worker!="undefined"){j.logger.log("demuxing in webworker");var _;try{_=this.worker=V("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),_.addEventListener("message",this.onwmsg),_.onerror=function(b){u.trigger(M.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(b.message+" ("+b.filename+":"+b.lineno+")")})},_.postMessage({cmd:"init",typeSupported:D,vendor:I,id:o,config:JSON.stringify(O)})}catch(b){j.logger.warn("Error in worker:",b),j.logger.error("Error while initializing DemuxerWorker, fallback to inline"),_&&self.URL.revokeObjectURL(_.objectURL),this.transmuxer=new K.default(this.observer,D,O,I,o),this.worker=null}}else this.transmuxer=new K.default(this.observer,D,O,I,o)}var d=r.prototype;return d.destroy=function(){var o=this.worker;if(o)o.removeEventListener("message",this.onwmsg),o.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var a=this.observer;a&&a.removeAllListeners(),this.observer=null},d.push=function(o,s,a,R,O,S,D,I,_,b){var v=this;_.transmuxing.start=self.performance.now();var h=this.transmuxer,C=this.worker,x=S?S.start:O.start,g=O.decryptdata,P=this.frag,k=!(P&&O.cc===P.cc),y=!(P&&_.level===P.level),A=P?_.sn-P.sn:-1,F=this.part?_.part-this.part.index:1,T=!y&&(A===1||A===0&&F===1),Y=self.performance.now();(y||A||O.stats.parsing.start===0)&&(O.stats.parsing.start=Y),S&&(F||!T)&&(S.stats.parsing.start=Y);var $=new K.TransmuxState(k,T,I,y,x);if(!T||k){j.logger.log("[transmuxer-interface, "+O.type+"]: Starting new transmux session for sn: "+_.sn+" p: "+_.part+" level: "+_.level+" id: "+_.id+`
discontinuity: `+k+`
trackSwitch: `+y+`
contiguous: `+T+`
accurateTimeOffset: `+I+`
timeOffset: `+x);var le=new K.TransmuxConfig(a,R,s,D,b);this.configureTransmuxer(le)}if(this.frag=O,this.part=S,C)C.postMessage({cmd:"demux",data:o,decryptdata:g,chunkMeta:_,state:$},o instanceof ArrayBuffer?[o]:[]);else if(h){var de=h.push(o,g,_,$);Object(K.isPromise)(de)?de.then(function(Pe){v.handleTransmuxComplete(Pe)}):this.handleTransmuxComplete(de)}},d.flush=function(o){var s=this;o.transmuxing.start=self.performance.now();var a=this.transmuxer,R=this.worker;if(R)R.postMessage({cmd:"flush",chunkMeta:o});else if(a){var O=a.flush(o);Object(K.isPromise)(O)?O.then(function(S){s.handleFlushResult(S,o)}):this.handleFlushResult(O,o)}},d.handleFlushResult=function(o,s){var a=this;o.forEach(function(R){a.handleTransmuxComplete(R)}),this.onFlush(s)},d.onWorkerMessage=function(o){var s=o.data,a=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,a.trigger(s.event,s.data);break}}},d.configureTransmuxer=function(o){var s=this.worker,a=this.transmuxer;s?s.postMessage({cmd:"configure",config:o}):a&&a.configure(o)},d.handleTransmuxComplete=function(o){o.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(o)},r}()},"./src/demux/transmuxer-worker.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return n});var V=U("./src/demux/transmuxer.ts"),W=U("./src/events.ts"),M=U("./src/utils/logger.ts"),K=U("./node_modules/eventemitter3/index.js"),j=U.n(K);function n(c){var r=new K.EventEmitter,d=function(o,s){c.postMessage({event:o,data:s})};r.on(W.Events.FRAG_DECRYPTED,d),r.on(W.Events.ERROR,d),c.addEventListener("message",function(u){var o=u.data;switch(o.cmd){case"init":{var s=JSON.parse(o.config);c.transmuxer=new V.default(r,o.typeSupported,s,o.vendor,o.id),Object(M.enableLogs)(s.debug),d("init",null);break}case"configure":{c.transmuxer.configure(o.config);break}case"demux":{var a=c.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(V.isPromise)(a)?a.then(function(S){w(c,S)}):w(c,a);break}case"flush":{var R=o.chunkMeta,O=c.transmuxer.flush(R);Object(V.isPromise)(O)?O.then(function(S){f(c,S,R)}):f(c,O,R);break}default:break}})}function w(c,r){if(p(r.remuxResult))return;var d=[],u=r.remuxResult,o=u.audio,s=u.video;o&&m(d,o),s&&m(d,s),c.postMessage({event:"transmuxComplete",data:r},d)}function m(c,r){r.data1&&c.push(r.data1.buffer),r.data2&&c.push(r.data2.buffer)}function f(c,r,d){r.forEach(function(u){w(c,u)}),c.postMessage({event:"flush",data:d})}function p(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return s}),U.d(G,"isPromise",function(){return O}),U.d(G,"TransmuxConfig",function(){return S}),U.d(G,"TransmuxState",function(){return D});var V=U("./src/events.ts"),W=U("./src/errors.ts"),M=U("./src/crypt/decrypter.ts"),K=U("./src/demux/aacdemuxer.ts"),j=U("./src/demux/mp4demuxer.ts"),n=U("./src/demux/tsdemuxer.ts"),w=U("./src/demux/mp3demuxer.ts"),m=U("./src/remux/mp4-remuxer.ts"),f=U("./src/remux/passthrough-remuxer.ts"),p=U("./src/demux/chunk-cache.ts"),c=U("./src/utils/mp4-tools.ts"),r=U("./src/utils/logger.ts"),d;try{d=self.performance.now.bind(self.performance)}catch(I){r.logger.debug("Unable to use Performance API on this environment"),d=self.Date.now}var u=[{demux:n.default,remux:m.default},{demux:j.default,remux:f.default},{demux:K.default,remux:m.default},{demux:w.default,remux:m.default}],o=1024;u.forEach(function(I){var _=I.demux;o=Math.max(o,_.minProbeByteLength)});var s=function(){function I(b,v,h,C,x){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 p.default,this.observer=b,this.typeSupported=v,this.config=h,this.vendor=C,this.id=x}var _=I.prototype;return _.configure=function(v){this.transmuxConfig=v,this.decrypter&&this.decrypter.reset()},_.push=function(v,h,C,x){var g=this,P=C.transmuxing;P.executeStart=d();var k=new Uint8Array(v),y=this.cache,A=this.config,F=this.currentTransmuxState,T=this.transmuxConfig;x&&(this.currentTransmuxState=x);var Y=a(k,h);if(Y&&Y.method==="AES-128"){var $=this.getDecrypter();if(A.enableSoftwareAES){var le=$.softwareDecrypt(k,Y.key.buffer,Y.iv.buffer);if(!le)return P.executeEnd=d(),R(C);k=new Uint8Array(le)}else return this.decryptionPromise=$.webCryptoDecrypt(k,Y.key.buffer,Y.iv.buffer).then(function(Ve){var qe=g.push(Ve,null,C);return g.decryptionPromise=null,qe}),this.decryptionPromise}var de=x||F,Pe=de.contiguous,Se=de.discontinuity,we=de.trackSwitch,Fe=de.accurateTimeOffset,Me=de.timeOffset,me=T.audioCodec,pe=T.videoCodec,ne=T.defaultInitPts,Ee=T.duration,ae=T.initSegmentData;if((Se||we)&&this.resetInitSegment(ae,me,pe,Ee),Se&&this.resetInitialTimestamp(ne),Pe||this.resetContiguity(),this.needsProbing(k,Se,we)){if(y.dataLength){var ke=y.flush();k=Object(c.appendUint8Array)(ke,k)}this.configureTransmuxer(k,T)}var je=this.transmux(k,Y,Me,Fe,C),Oe=this.currentTransmuxState;return Oe.contiguous=!0,Oe.discontinuity=!1,Oe.trackSwitch=!1,P.executeEnd=d(),je},_.flush=function(v){var h=this,C=v.transmuxing;C.executeStart=d();var x=this.decrypter,g=this.cache,P=this.currentTransmuxState,k=this.decryptionPromise;if(k)return k.then(function(){return h.flush(v)});var y=[],A=P.timeOffset;if(x){var F=x.flush();F&&y.push(this.push(F,null,v))}var T=g.dataLength;g.reset();var Y=this.demuxer,$=this.remuxer;if(!Y||!$)return T>=o&&this.observer.emit(V.Events.ERROR,V.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),C.executeEnd=d(),[R(v)];var le=Y.flush(A);return O(le)?le.then(function(de){return h.flushRemux(y,de,v),y}):(this.flushRemux(y,le,v),y)},_.flushRemux=function(v,h,C){var x=h.audioTrack,g=h.avcTrack,P=h.id3Track,k=h.textTrack,y=this.currentTransmuxState,A=y.accurateTimeOffset,F=y.timeOffset;r.logger.log("[transmuxer.ts]: Flushed fragment "+C.sn+(C.part>-1?" p: "+C.part:"")+" of level "+C.level);var T=this.remuxer.remux(x,g,P,k,F,A,!0,this.id);v.push({remuxResult:T,chunkMeta:C}),C.transmuxing.executeEnd=d()},_.resetInitialTimestamp=function(v){var h=this.demuxer,C=this.remuxer;if(!h||!C)return;h.resetTimeStamp(v),C.resetTimeStamp(v)},_.resetContiguity=function(){var v=this.demuxer,h=this.remuxer;if(!v||!h)return;v.resetContiguity(),h.resetNextTimestamp()},_.resetInitSegment=function(v,h,C,x){var g=this.demuxer,P=this.remuxer;if(!g||!P)return;g.resetInitSegment(h,C,x),P.resetInitSegment(v,h,C)},_.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},_.transmux=function(v,h,C,x,g){var P;return h&&h.method==="SAMPLE-AES"?P=this.transmuxSampleAes(v,h,C,x,g):P=this.transmuxUnencrypted(v,C,x,g),P},_.transmuxUnencrypted=function(v,h,C,x){var g=this.demuxer.demux(v,h,!1,!this.config.progressive),P=g.audioTrack,k=g.avcTrack,y=g.id3Track,A=g.textTrack,F=this.remuxer.remux(P,k,y,A,h,C,!1,this.id);return{remuxResult:F,chunkMeta:x}},_.transmuxSampleAes=function(v,h,C,x,g){var P=this;return this.demuxer.demuxSampleAes(v,h,C).then(function(k){var y=P.remuxer.remux(k.audioTrack,k.avcTrack,k.id3Track,k.textTrack,C,x,!1,P.id);return{remuxResult:y,chunkMeta:g}})},_.configureTransmuxer=function(v,h){for(var C=this.config,x=this.observer,g=this.typeSupported,P=this.vendor,k=h.audioCodec,y=h.defaultInitPts,A=h.duration,F=h.initSegmentData,T=h.videoCodec,Y,$=0,le=u.length;$<le;$++)if(u[$].demux.probe(v)){Y=u[$];break}Y||(r.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),Y={demux:j.default,remux:f.default});var de=this.demuxer,Pe=this.remuxer,Se=Y.remux,we=Y.demux;(!Pe||!(Pe instanceof Se))&&(this.remuxer=new Se(x,C,g,P)),(!de||!(de instanceof we))&&(this.demuxer=new we(x,C,g),this.probe=we.probe),this.resetInitSegment(F,k,T,A),this.resetInitialTimestamp(y)},_.needsProbing=function(v,h,C){return!this.demuxer||!this.remuxer||h||C},_.getDecrypter=function(){var v=this.decrypter;return v||(v=this.decrypter=new M.default(this.observer,this.config)),v},I}();function a(I,_){var b=null;return I.byteLength>0&&_!=null&&_.key!=null&&_.iv!==null&&_.method!=null&&(b=_),b}var R=function(_){return{remuxResult:{},chunkMeta:_}};function O(I){return"then"in I&&I.then instanceof Function}var S=function(_,b,v,h,C){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=_,this.videoCodec=b,this.initSegmentData=v,this.duration=h,this.defaultInitPts=C},D=function(_,b,v,h,C){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=_,this.contiguous=b,this.accurateTimeOffset=v,this.trackSwitch=h,this.timeOffset=C}},"./src/demux/tsdemuxer.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"discardEPB",function(){return R});var V=U("./src/demux/adts.ts"),W=U("./src/demux/mpegaudio.ts"),M=U("./src/demux/exp-golomb.ts"),K=U("./src/demux/id3.ts"),j=U("./src/demux/sample-aes.ts"),n=U("./src/events.ts"),w=U("./src/utils/mp4-tools.ts"),m=U("./src/utils/logger.ts"),f=U("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},c=function(){function O(D,I,_){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=D,this.config=I,this.typeSupported=_}O.probe=function(I){var _=O.syncOffset(I);return _<0?!1:(_&&m.logger.warn("MPEG2-TS detected but first sync word found @ offset "+_+", junk ahead ?"),!0)},O.syncOffset=function(I){for(var _=Math.min(1e3,I.length-3*188),b=0;b<_;){if(I[b]===71&&I[b+188]===71&&I[b+2*188]===71)return b;b++}return-1},O.createTrack=function(I,_){return{container:I==="video"||I==="audio"?"video/mp2t":void 0,type:I,id:p[I],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:I==="audio"?_:void 0}};var S=O.prototype;return S.resetInitSegment=function(I,_,b){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=O.createTrack("video",b),this._audioTrack=O.createTrack("audio",b),this._id3Track=O.createTrack("id3",b),this._txtTrack=O.createTrack("text",b),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=I,this.videoCodec=_,this._duration=b},S.resetTimeStamp=function(){},S.resetContiguity=function(){var I=this._audioTrack,_=this._avcTrack,b=this._id3Track;I&&(I.pesData=null),_&&(_.pesData=null),b&&(b.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},S.demux=function(I,_,b,v){b===void 0&&(b=!1),v===void 0&&(v=!1),b||(this.sampleAes=null);var h,C=this._avcTrack,x=this._audioTrack,g=this._id3Track,P=C.pid,k=C.pesData,y=x.pid,A=g.pid,F=x.pesData,T=g.pesData,Y=!1,$=this.pmtParsed,le=this._pmtId,de=I.length;if(this.remainderData&&(I=Object(w.appendUint8Array)(this.remainderData,I),de=I.length,this.remainderData=null),de<188&&!v)return this.remainderData=I,{audioTrack:x,avcTrack:C,id3Track:g,textTrack:this._txtTrack};var Pe=Math.max(0,O.syncOffset(I));de-=(de+Pe)%188,de<I.byteLength&&!v&&(this.remainderData=new Uint8Array(I.buffer,de,I.buffer.byteLength-de));for(var Se=Pe;Se<de;Se+=188)if(I[Se]===71){var we=!!(I[Se+1]&64),Fe=((I[Se+1]&31)<<8)+I[Se+2],Me=(I[Se+3]&48)>>4,me=void 0;if(Me>1){if(me=Se+5+I[Se+4],me===Se+188)continue}else me=Se+4;switch(Fe){case P:we&&(k&&(h=o(k))&&this.parseAVCPES(h,!1),k={data:[],size:0}),k&&(k.data.push(I.subarray(me,Se+188)),k.size+=Se+188-me);break;case y:we&&(F&&(h=o(F))&&(x.isAAC?this.parseAACPES(h):this.parseMPEGPES(h)),F={data:[],size:0}),F&&(F.data.push(I.subarray(me,Se+188)),F.size+=Se+188-me);break;case A:we&&(T&&(h=o(T))&&this.parseID3PES(h),T={data:[],size:0}),T&&(T.data.push(I.subarray(me,Se+188)),T.size+=Se+188-me);break;case 0:we&&(me+=I[me]+1),le=this._pmtId=d(I,me);break;case le:{we&&(me+=I[me]+1);var pe=u(I,me,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,b);P=pe.avc,P>0&&(C.pid=P),y=pe.audio,y>0&&(x.pid=y,x.isAAC=pe.isAAC),A=pe.id3,A>0&&(g.pid=A),Y&&!$&&(m.logger.log("reparse from beginning"),Y=!1,Se=Pe-188),$=this.pmtParsed=!0;break}case 17:case 8191:break;default:Y=!0;break}}else this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});C.pesData=k,x.pesData=F,g.pesData=T;var ne={audioTrack:x,avcTrack:C,id3Track:g,textTrack:this._txtTrack};return v&&this.extractRemainingSamples(ne),ne},S.flush=function(){var I=this.remainderData;this.remainderData=null;var _;return I?_=this.demux(I,-1,!1,!0):_={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(_),this.sampleAes?this.decrypt(_,this.sampleAes):_},S.extractRemainingSamples=function(I){var _=I.audioTrack,b=I.avcTrack,v=I.id3Track,h=b.pesData,C=_.pesData,x=v.pesData,g;h&&(g=o(h))?(this.parseAVCPES(g,!0),b.pesData=null):b.pesData=h,C&&(g=o(C))?(_.isAAC?this.parseAACPES(g):this.parseMPEGPES(g),_.pesData=null):(C!=null&&C.size&&m.logger.log("last AAC PES packet truncated,might overlap between fragments"),_.pesData=C),x&&(g=o(x))?(this.parseID3PES(g),v.pesData=null):v.pesData=x},S.demuxSampleAes=function(I,_,b){var v=this.demux(I,b,!0,!this.config.progressive),h=this.sampleAes=new j.default(this.observer,this.config,_);return this.decrypt(v,h)},S.decrypt=function(I,_){return new Promise(function(b){var v=I.audioTrack,h=I.avcTrack;v.samples&&v.isAAC?_.decryptAacSamples(v.samples,0,function(){h.samples?_.decryptAvcSamples(h.samples,0,0,function(){b(I)}):b(I)}):h.samples&&_.decryptAvcSamples(h.samples,0,0,function(){b(I)})})},S.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},S.parseAVCPES=function(I,_){var b=this,v=this._avcTrack,h=this.parseAVCNALu(I.data),C=!1,x=this.avcSample,g,P=!1;I.data=null,x&&h.length&&!v.audFound&&(s(x,v),x=this.avcSample=r(!1,I.pts,I.dts,"")),h.forEach(function(k){switch(k.type){case 1:{g=!0,x||(x=b.avcSample=r(!0,I.pts,I.dts,"")),C&&(x.debug+="NDR "),x.frame=!0;var y=k.data;if(P&&y.length>4){var A=new M.default(y).readSliceType();(A===2||A===4||A===7||A===9)&&(x.key=!0)}break}case 5:g=!0,x||(x=b.avcSample=r(!0,I.pts,I.dts,"")),C&&(x.debug+="IDR "),x.key=!0,x.frame=!0;break;case 6:{g=!0,C&&x&&(x.debug+="SEI ");var F=new M.default(R(k.data));F.readUByte();for(var T=0,Y=0,$=!1,le=0;!$&&F.bytesAvailable>1;){T=0;do le=F.readUByte(),T+=le;while(le===255);Y=0;do le=F.readUByte(),Y+=le;while(le===255);if(T===4&&F.bytesAvailable!==0){$=!0;var de=F.readUByte();if(de===181){var Pe=F.readUShort();if(Pe===49){var Se=F.readUInt();if(Se===1195456820){var we=F.readUByte();if(we===3){for(var Fe=F.readUByte(),Me=F.readUByte(),me=31&Fe,pe=[Fe,Me],ne=0;ne<me;ne++)pe.push(F.readUByte()),pe.push(F.readUByte()),pe.push(F.readUByte());a(b._txtTrack.samples,{type:3,pts:I.pts,bytes:pe})}}}}}else if(T===5&&F.bytesAvailable!==0){if($=!0,Y>16){for(var Ee=[],ae=0;ae<16;ae++)Ee.push(F.readUByte().toString(16)),(ae===3||ae===5||ae===7||ae===9)&&Ee.push("-");for(var ke=Y-16,je=new Uint8Array(ke),Oe=0;Oe<ke;Oe++)je[Oe]=F.readUByte();a(b._txtTrack.samples,{pts:I.pts,payloadType:T,uuid:Ee.join(""),userData:Object(K.utf8ArrayToStr)(je),userDataBytes:je})}}else if(Y<F.bytesAvailable)for(var Ve=0;Ve<Y;Ve++)F.readUByte()}break}case 7:if(g=!0,P=!0,C&&x&&(x.debug+="SPS "),!v.sps){var qe=new M.default(k.data),ue=qe.readSPS();v.width=ue.width,v.height=ue.height,v.pixelRatio=ue.pixelRatio,v.sps=[k.data],v.duration=b._duration;for(var ve=k.data.subarray(1,4),De="avc1.",Ne=0;Ne<3;Ne++){var it=ve[Ne].toString(16);it.length<2&&(it="0"+it),De+=it}v.codec=De}break;case 8:g=!0,C&&x&&(x.debug+="PPS "),v.pps||(v.pps=[k.data]);break;case 9:g=!1,v.audFound=!0,x&&s(x,v),x=b.avcSample=r(!1,I.pts,I.dts,C?"AUD ":"");break;case 12:g=!1;break;default:g=!1,x&&(x.debug+="unknown NAL "+k.type+" ");break}if(x&&g){var pt=x.units;pt.push(k)}}),_&&x&&(s(x,v),this.avcSample=null)},S.getLastNalUnit=function(){var I,_=this.avcSample,b;if(!_||_.units.length===0){var v=this._avcTrack.samples;_=v[v.length-1]}if((I=_)!==null&&I!==void 0&&I.units){var h=_.units;b=h[h.length-1]}return b},S.parseAVCNALu=function(I){var _=I.byteLength,b=this._avcTrack,v=b.naluState||0,h=v,C=[],x=0,g,P,k,y=-1,A=0;for(v===-1&&(y=0,A=I[0]&31,v=0,x=1);x<_;){if(g=I[x++],!v){v=g?0:1;continue}if(v===1){v=g?0:2;continue}if(!g)v=3;else if(g===1){if(y>=0){var F={data:I.subarray(y,x-v-1),type:A};C.push(F)}else{var T=this.getLastNalUnit();if(T&&(h&&x<=4-h&&(T.state&&(T.data=T.data.subarray(0,T.data.byteLength-h))),P=x-v-1,P>0)){var Y=new Uint8Array(T.data.byteLength+P);Y.set(T.data,0),Y.set(I.subarray(0,P),T.data.byteLength),T.data=Y,T.state=0}}x<_?(k=I[x]&31,y=x,A=k,v=0):v=-1}else v=0}if(y>=0&&v>=0){var $={data:I.subarray(y,_),type:A,state:v};C.push($)}if(C.length===0){var le=this.getLastNalUnit();if(le){var de=new Uint8Array(le.data.byteLength+I.byteLength);de.set(le.data,0),de.set(I,le.data.byteLength),le.data=de}}return b.naluState=v,C},S.parseAACPES=function(I){var _=0,b=this._audioTrack,v=this.aacOverFlow,h=I.data;if(v){this.aacOverFlow=null;var C=v.sample.unit.byteLength,x=Math.min(v.missing,C),g=C-x;v.sample.unit.set(h.subarray(0,x),g),b.samples.push(v.sample),_=v.missing}var P,k;for(P=_,k=h.length;P<k-1&&!V.isHeader(h,P);P++);if(P!==_){var y,A;if(P<k-1?(y="AAC PES did not start with ADTS header,offset:"+P,A=!1):(y="no ADTS header found in AAC PES",A=!0),m.logger.warn("parsing error:"+y),this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:A,reason:y}),A)return}V.initTrackConfig(b,this.observer,h,P,this.audioCodec);var F;if(I.pts!==void 0)F=I.pts;else if(v){var T=V.getFrameDuration(b.samplerate);F=v.sample.pts+T}else{m.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var Y=0;P<k;)if(V.isHeader(h,P)){if(P+5<k){var $=V.appendFrame(b,h,P,F,Y);if($)if($.missing)this.aacOverFlow=$;else{P+=$.length,Y++;continue}}break}else P++},S.parseMPEGPES=function(I){var _=I.data,b=_.length,v=0,h=0,C=I.pts;if(C===void 0){m.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;h<b;)if(W.isHeader(_,h)){var x=W.appendFrame(this._audioTrack,_,h,C,v);if(x)h+=x.length,v++;else break}else h++},S.parseID3PES=function(I){if(I.pts===void 0){m.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(I)},O}();c.minProbeByteLength=188;function r(O,S,D,I){return{key:O,frame:!1,pts:S,dts:D,units:[],debug:I,length:0}}function d(O,S){return(O[S+10]&31)<<8|O[S+11]}function u(O,S,D,I){var _={audio:-1,avc:-1,id3:-1,isAAC:!0},b=(O[S+1]&15)<<8|O[S+2],v=S+3+b-4,h=(O[S+10]&15)<<8|O[S+11];for(S+=12+h;S<v;){var C=(O[S+1]&31)<<8|O[S+2];switch(O[S]){case 207:if(!I){m.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:_.audio===-1&&(_.audio=C);break;case 21:_.id3===-1&&(_.id3=C);break;case 219:if(!I){m.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:_.avc===-1&&(_.avc=C);break;case 3:case 4:D?_.audio===-1&&(_.audio=C,_.isAAC=!1):m.logger.log("MPEG audio found, not supported in this browser");break;case 36:m.logger.warn("Unsupported HEVC stream type found");break;default:break}S+=((O[S+3]&15)<<8|O[S+4])+5}return _}function o(O){var S=0,D,I,_,b,v,h=O.data;if(!O||O.size===0)return null;for(;h[0].length<19&&h.length>1;){var C=new Uint8Array(h[0].length+h[1].length);C.set(h[0]),C.set(h[1],h[0].length),h[0]=C,h.splice(1,1)}D=h[0];var x=(D[0]<<16)+(D[1]<<8)+D[2];if(x===1){if(I=(D[4]<<8)+D[5],I&&I>O.size-6)return null;var g=D[7];g&192&&(b=(D[9]&14)*536870912+(D[10]&255)*4194304+(D[11]&254)*16384+(D[12]&255)*128+(D[13]&254)/2,g&64?(v=(D[14]&14)*536870912+(D[15]&255)*4194304+(D[16]&254)*16384+(D[17]&255)*128+(D[18]&254)/2,b-v>60*9e4&&(m.logger.warn(Math.round((b-v)/9e4)+"s delta between PTS and DTS, align them"),b=v)):v=b),_=D[8];var P=_+9;if(O.size<=P)return null;O.size-=P;for(var k=new Uint8Array(O.size),y=0,A=h.length;y<A;y++){D=h[y];var F=D.byteLength;if(P)if(P>F){P-=F;continue}else D=D.subarray(P),F-=P,P=0;k.set(D,S),S+=F}return I&&(I-=_+3),{data:k,pts:b,dts:v,len:I}}return null}function s(O,S){if(O.units.length&&O.frame){if(O.pts===void 0){var D=S.samples,I=D.length;if(I){var _=D[I-1];O.pts=_.pts,O.dts=_.dts}else{S.dropped++;return}}S.samples.push(O)}O.debug.length&&m.logger.log(O.pts+"/"+O.dts+":"+O.debug)}function a(O,S){var D=O.length;if(D>0){if(S.pts>=O[D-1].pts)O.push(S);else for(var I=D-1;I>=0;I--)if(S.pts<O[I].pts){O.splice(I,0,S);break}}else O.push(S)}function R(O){for(var S=O.byteLength,D=[],I=1;I<S-2;)O[I]===0&&O[I+1]===0&&O[I+2]===3?(D.push(I+2),I+=2):I++;if(D.length===0)return O;var _=S-D.length,b=new Uint8Array(_),v=0;for(I=0;I<_;v++,I++)v===D[0]&&(v++,D.shift()),b[I]=O[v];return b}G.default=c},"./src/errors.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"ErrorTypes",function(){return V}),U.d(G,"ErrorDetails",function(){return W});var V;(function(M){M.NETWORK_ERROR="networkError",M.MEDIA_ERROR="mediaError",M.KEY_SYSTEM_ERROR="keySystemError",M.MUX_ERROR="muxError",M.OTHER_ERROR="otherError"})(V||(V={}));var W;(function(M){M.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",M.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",M.KEY_SYSTEM_NO_SESSION="keySystemNoSession",M.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",M.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",M.MANIFEST_LOAD_ERROR="manifestLoadError",M.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",M.MANIFEST_PARSING_ERROR="manifestParsingError",M.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",M.LEVEL_EMPTY_ERROR="levelEmptyError",M.LEVEL_LOAD_ERROR="levelLoadError",M.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",M.LEVEL_SWITCH_ERROR="levelSwitchError",M.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",M.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",M.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",M.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",M.FRAG_LOAD_ERROR="fragLoadError",M.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",M.FRAG_DECRYPT_ERROR="fragDecryptError",M.FRAG_PARSING_ERROR="fragParsingError",M.REMUX_ALLOC_ERROR="remuxAllocError",M.KEY_LOAD_ERROR="keyLoadError",M.KEY_LOAD_TIMEOUT="keyLoadTimeOut",M.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",M.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",M.BUFFER_APPEND_ERROR="bufferAppendError",M.BUFFER_APPENDING_ERROR="bufferAppendingError",M.BUFFER_STALLED_ERROR="bufferStalledError",M.BUFFER_FULL_ERROR="bufferFullError",M.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",M.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",M.INTERNAL_EXCEPTION="internalException",M.INTERNAL_ABORTED="aborted",M.UNKNOWN="unknown"})(W||(W={}))},"./src/events.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"Events",function(){return V});var V;(function(W){W.MEDIA_ATTACHING="hlsMediaAttaching",W.MEDIA_ATTACHED="hlsMediaAttached",W.MEDIA_DETACHING="hlsMediaDetaching",W.MEDIA_DETACHED="hlsMediaDetached",W.BUFFER_RESET="hlsBufferReset",W.BUFFER_CODECS="hlsBufferCodecs",W.BUFFER_CREATED="hlsBufferCreated",W.BUFFER_APPENDING="hlsBufferAppending",W.BUFFER_APPENDED="hlsBufferAppended",W.BUFFER_EOS="hlsBufferEos",W.BUFFER_FLUSHING="hlsBufferFlushing",W.BUFFER_FLUSHED="hlsBufferFlushed",W.MANIFEST_LOADING="hlsManifestLoading",W.MANIFEST_LOADED="hlsManifestLoaded",W.MANIFEST_PARSED="hlsManifestParsed",W.LEVEL_SWITCHING="hlsLevelSwitching",W.LEVEL_SWITCHED="hlsLevelSwitched",W.LEVEL_LOADING="hlsLevelLoading",W.LEVEL_LOADED="hlsLevelLoaded",W.LEVEL_UPDATED="hlsLevelUpdated",W.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",W.LEVELS_UPDATED="hlsLevelsUpdated",W.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",W.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",W.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",W.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",W.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",W.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",W.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",W.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",W.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",W.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",W.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",W.CUES_PARSED="hlsCuesParsed",W.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",W.INIT_PTS_FOUND="hlsInitPtsFound",W.FRAG_LOADING="hlsFragLoading",W.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",W.FRAG_LOADED="hlsFragLoaded",W.FRAG_DECRYPTED="hlsFragDecrypted",W.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",W.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",W.FRAG_PARSING_METADATA="hlsFragParsingMetadata",W.FRAG_PARSED="hlsFragParsed",W.FRAG_BUFFERED="hlsFragBuffered",W.FRAG_CHANGED="hlsFragChanged",W.FPS_DROP="hlsFpsDrop",W.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",W.ERROR="hlsError",W.DESTROYING="hlsDestroying",W.KEY_LOADING="hlsKeyLoading",W.KEY_LOADED="hlsKeyLoaded",W.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",W.BACK_BUFFER_REACHED="hlsBackBufferReached"})(V||(V={}))},"./src/hls.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return O});var V=U("./node_modules/url-toolkit/src/url-toolkit.js"),W=U.n(V),M=U("./src/loader/playlist-loader.ts"),K=U("./src/loader/key-loader.ts"),j=U("./src/controller/id3-track-controller.ts"),n=U("./src/controller/latency-controller.ts"),w=U("./src/controller/level-controller.ts"),m=U("./src/controller/fragment-tracker.ts"),f=U("./src/controller/stream-controller.ts"),p=U("./src/is-supported.ts"),c=U("./src/utils/logger.ts"),r=U("./src/config.ts"),d=U("./node_modules/eventemitter3/index.js"),u=U.n(d),o=U("./src/events.ts"),s=U("./src/errors.ts");function a(S,D){for(var I=0;I<D.length;I++){var _=D[I];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(S,_.key,_)}}function R(S,D,I){return D&&a(S.prototype,D),I&&a(S,I),S}var O=function(){S.isSupported=function(){return Object(p.isSupported)()};function S(I){I===void 0&&(I={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new d.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(r.mergeConfig)(S.DefaultConfig,I);this.userConfig=I,Object(c.enableLogs)(_.debug),this._autoLevelCapping=-1,_.progressive&&Object(r.enableStreamingMode)(_);var b=_.abrController,v=_.bufferController,h=_.capLevelController,C=_.fpsController,x=this.abrController=new b(this),g=this.bufferController=new v(this),P=this.capLevelController=new h(this),k=new C(this),y=new M.default(this),A=new K.default(this),F=new j.default(this),T=this.levelController=new w.default(this),Y=new m.FragmentTracker(this),$=this.streamController=new f.default(this,Y);P.setStreamController($),k.setStreamController($);var le=[T,$];this.networkControllers=le;var de=[y,A,x,g,P,k,F,Y];this.audioTrackController=this.createController(_.audioTrackController,null,le),this.createController(_.audioStreamController,Y,le),this.subtitleTrackController=this.createController(_.subtitleTrackController,null,le),this.createController(_.subtitleStreamController,Y,le),this.createController(_.timelineController,null,de),this.emeController=this.createController(_.emeController,null,de),this.cmcdController=this.createController(_.cmcdController,null,de),this.latencyController=this.createController(n.default,null,de),this.coreComponents=de}var D=S.prototype;return D.createController=function(_,b,v){if(_){var h=b?new _(this,b):new _(this);return v&&v.push(h),h}return null},D.on=function(_,b,v){v===void 0&&(v=this),this._emitter.on(_,b,v)},D.once=function(_,b,v){v===void 0&&(v=this),this._emitter.once(_,b,v)},D.removeAllListeners=function(_){this._emitter.removeAllListeners(_)},D.off=function(_,b,v,h){v===void 0&&(v=this),this._emitter.off(_,b,v,h)},D.listeners=function(_){return this._emitter.listeners(_)},D.emit=function(_,b,v){return this._emitter.emit(_,b,v)},D.trigger=function(_,b){if(this.config.debug)return this.emit(_,_,b);try{return this.emit(_,_,b)}catch(v){c.logger.error("An internal error happened while handling event "+_+'. Error message: "'+v.message+'". Here is a stacktrace:',v),this.trigger(o.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:_,error:v})}return!1},D.listenerCount=function(_){return this._emitter.listenerCount(_)},D.destroy=function(){c.logger.log("destroy"),this.trigger(o.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(_){return _.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(_){return _.destroy()}),this.coreComponents.length=0},D.attachMedia=function(_){c.logger.log("attachMedia"),this._media=_,this.trigger(o.Events.MEDIA_ATTACHING,{media:_})},D.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(o.Events.MEDIA_DETACHING,void 0),this._media=null},D.loadSource=function(_){this.stopLoad();var b=this.media,v=this.url,h=this.url=V.buildAbsoluteURL(self.location.href,_,{alwaysNormalize:!0});c.logger.log("loadSource:"+h),b&&v&&v!==h&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(b)),this.trigger(o.Events.MANIFEST_LOADING,{url:_})},D.startLoad=function(_){_===void 0&&(_=-1),c.logger.log("startLoad("+_+")"),this.networkControllers.forEach(function(b){b.startLoad(_)})},D.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach(function(_){_.stopLoad()})},D.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},D.recoverMediaError=function(){c.logger.log("recoverMediaError");var _=this._media;this.detachMedia(),_&&this.attachMedia(_)},D.removeLevel=function(_,b){b===void 0&&(b=0),this.levelController.removeLevel(_,b)},R(S,[{key:"levels",get:function(){var _=this.levelController.levels;return _||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(_){c.logger.log("set currentLevel:"+_),this.loadLevel=_,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(_){c.logger.log("set nextLevel:"+_),this.levelController.manualLevel=_,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(_){c.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(_){c.logger.log("set firstLevel:"+_),this.levelController.firstLevel=_}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(_){c.logger.log("set startLevel:"+_),_!==-1&&(_=Math.max(_,this.minAutoLevel)),this.levelController.startLevel=_}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(_){var b=!!_;b!==this.config.capLevelToPlayerSize&&(b?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=b)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(_){this._autoLevelCapping!==_&&(c.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,b=this.config.minAutoBitrate;if(!_)return 0;for(var v=_.length,h=0;h<v;h++)if(_[h].maxBitrate>b)return h;return 0}},{key:"maxAutoLevel",get:function(){var _=this.levels,b=this.autoLevelCapping,v;return b===-1&&_&&_.length?v=_.length-1:v=b,v}},{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 b=this.audioTrackController;b&&(b.audioTrack=_)}},{key:"subtitleTracks",get:function(){var _=this.subtitleTrackController;return _?_.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var _=this.subtitleTrackController;return _?_.subtitleTrack:-1},set:function(_){var b=this.subtitleTrackController;b&&(b.subtitleTrack=_)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var _=this.subtitleTrackController;return _?_.subtitleDisplay:!1},set:function(_){var b=this.subtitleTrackController;b&&(b.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 o.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return S.defaultConfig?S.defaultConfig:r.hlsDefaultConfig},set:function(_){S.defaultConfig=_}}]),S}();O.defaultConfig=void 0},"./src/is-supported.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"isSupported",function(){return M}),U.d(G,"changeTypeSupported",function(){return K});var V=U("./src/utils/mediasource-helper.ts");function W(){return self.SourceBuffer||self.WebKitSourceBuffer}function M(){var j=Object(V.getMediaSource)();if(!j)return!1;var n=W(),w=j&&typeof j.isTypeSupported=="function"&&j.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),m=!n||n.prototype&&typeof n.prototype.appendBuffer=="function"&&typeof n.prototype.remove=="function";return!!w&&!!m}function K(){var j,n=W();return typeof(n==null||((j=n.prototype)===null||j===void 0)?void 0:j.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return c}),U.d(G,"LoadError",function(){return d});var V=U("./src/polyfills/number.ts"),W=U("./src/errors.ts");function M(u,o){u.prototype=Object.create(o.prototype),u.prototype.constructor=u,m(u,o)}function K(u){var o=typeof Map=="function"?new Map:void 0;return K=function(a){if(a===null||!w(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof o!="undefined"){if(o.has(a))return o.get(a);o.set(a,R)}function R(){return j(a,arguments,f(this).constructor)}return R.prototype=Object.create(a.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),m(R,a)},K(u)}function j(u,o,s){return n()?j=Reflect.construct:j=function(R,O,S){var D=[null];D.push.apply(D,O);var I=Function.bind.apply(R,D),_=new I;return S&&m(_,S.prototype),_},j.apply(null,arguments)}function n(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(u){return!1}}function w(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function m(u,o){return m=Object.setPrototypeOf||function(a,R){return a.__proto__=R,a},m(u,o)}function f(u){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},f(u)}var p=Math.pow(2,17),c=function(){function u(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var o=u.prototype;return o.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},o.abort=function(){this.loader&&this.loader.abort()},o.load=function(a,R){var O=this,S=a.url;if(!S)return Promise.reject(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,networkDetails:null},"Fragment does not have a "+(S?"part list":"url")));this.abort();var D=this.config,I=D.fLoader,_=D.loader;return new Promise(function(b,v){O.loader&&O.loader.destroy();var h=O.loader=a.loader=I?new I(D):new _(D),C=r(a),x={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:p};a.stats=h.stats,h.load(C,x,{onSuccess:function(P,k,y,A){O.resetLoader(a,h),b({frag:a,part:null,payload:P.data,networkDetails:A})},onError:function(P,k,y){O.resetLoader(a,h),v(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,response:P,networkDetails:y}))},onAbort:function(P,k,y){O.resetLoader(a,h),v(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,networkDetails:y}))},onTimeout:function(P,k,y){O.resetLoader(a,h),v(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,networkDetails:y}))},onProgress:function(P,k,y,A){R&&R({frag:a,part:null,payload:y,networkDetails:A})}})})},o.loadPart=function(a,R,O){var S=this;this.abort();var D=this.config,I=D.fLoader,_=D.loader;return new Promise(function(b,v){S.loader&&S.loader.destroy();var h=S.loader=a.loader=I?new I(D):new _(D),C=r(a,R),x={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:p};R.stats=h.stats,h.load(C,x,{onSuccess:function(P,k,y,A){S.resetLoader(a,h),S.updateStatsFromPart(a,R);var F={frag:a,part:R,payload:P.data,networkDetails:A};O(F),b(F)},onError:function(P,k,y){S.resetLoader(a,h),v(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,part:R,response:P,networkDetails:y}))},onAbort:function(P,k,y){a.stats.aborted=R.stats.aborted,S.resetLoader(a,h),v(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,part:R,networkDetails:y}))},onTimeout:function(P,k,y){S.resetLoader(a,h),v(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,part:R,networkDetails:y}))}})})},o.updateStatsFromPart=function(a,R){var O=a.stats,S=R.stats,D=S.total;if(O.loaded+=S.loaded,D){var I=Math.round(a.duration/R.duration),_=Math.min(Math.round(O.loaded/D),I),b=I-_,v=b*Math.round(O.loaded/_);O.total=O.loaded+v}else O.total=Math.max(O.loaded,O.total);var h=O.loading,C=S.loading;h.start?h.first+=C.first-C.start:(h.start=C.start,h.first=C.first),h.end=C.end},o.resetLoader=function(a,R){a.loader=null,this.loader===R&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),R.destroy()},u}();function r(u,o){o===void 0&&(o=null);var s=o||u,a={frag:u,part:o,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},R=s.byteRangeStartOffset,O=s.byteRangeEndOffset;return Object(V.isFiniteNumber)(R)&&Object(V.isFiniteNumber)(O)&&(a.rangeStart=R,a.rangeEnd=O),a}var d=function(u){M(o,u);function o(s){for(var a,R=arguments.length,O=new Array(R>1?R-1:0),S=1;S<R;S++)O[S-1]=arguments[S];return a=u.call.apply(u,[this].concat(O))||this,a.data=void 0,a.data=s,a}return o}(K(Error))},"./src/loader/fragment.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"ElementaryStreamTypes",function(){return c}),U.d(G,"BaseSegment",function(){return r}),U.d(G,"Fragment",function(){return d}),U.d(G,"Part",function(){return u});var V=U("./src/polyfills/number.ts"),W=U("./node_modules/url-toolkit/src/url-toolkit.js"),M=U.n(W),K=U("./src/utils/logger.ts"),j=U("./src/loader/level-key.ts"),n=U("./src/loader/load-stats.ts");function w(o,s){o.prototype=Object.create(s.prototype),o.prototype.constructor=o,m(o,s)}function m(o,s){return m=Object.setPrototypeOf||function(R,O){return R.__proto__=O,R},m(o,s)}function f(o,s){for(var a=0;a<s.length;a++){var R=s[a];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(o,R.key,R)}}function p(o,s,a){return s&&f(o.prototype,s),a&&f(o,a),o}var c;(function(o){o.AUDIO="audio",o.VIDEO="video",o.AUDIOVIDEO="audiovideo"})(c||(c={}));var r=function(){function o(a){var R;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(R={},R[c.AUDIO]=null,R[c.VIDEO]=null,R[c.AUDIOVIDEO]=null,R),this.baseurl=a}var s=o.prototype;return s.setByteRange=function(R,O){var S=R.split("@",2),D=[];S.length===1?D[0]=O?O.byteRangeEndOffset:0:D[0]=parseInt(S[1]),D[1]=parseInt(S[0])+D[0],this._byteRange=D},p(o,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(W.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(R){this._url=R}}]),o}(),d=function(o){w(s,o);function s(R,O){var S;return S=o.call(this,O)||this,S._decryptdata=null,S.rawProgramDateTime=null,S.programDateTime=null,S.tagList=[],S.duration=0,S.sn=0,S.levelkey=void 0,S.type=void 0,S.loader=null,S.level=-1,S.cc=0,S.startPTS=void 0,S.endPTS=void 0,S.appendedPTS=void 0,S.startDTS=void 0,S.endDTS=void 0,S.start=0,S.deltaPTS=void 0,S.maxStartPTS=void 0,S.minEndPTS=void 0,S.stats=new n.LoadStats,S.urlId=0,S.data=void 0,S.bitrateTest=!1,S.title=null,S.initSegment=null,S.type=R,S}var a=s.prototype;return a.createInitializationVector=function(O){for(var S=new Uint8Array(16),D=12;D<16;D++)S[D]=O>>8*(15-D)&255;return S},a.setDecryptDataFromLevelKey=function(O,S){var D=O;return(O==null?void 0:O.method)==="AES-128"&&O.uri&&!O.iv&&(D=j.LevelKey.fromURI(O.uri),D.method=O.method,D.iv=this.createInitializationVector(S),D.keyFormat="identity"),D},a.setElementaryStreamInfo=function(O,S,D,I,_,b){b===void 0&&(b=!1);var v=this.elementaryStreams,h=v[O];if(!h){v[O]={startPTS:S,endPTS:D,startDTS:I,endDTS:_,partial:b};return}h.startPTS=Math.min(h.startPTS,S),h.endPTS=Math.max(h.endPTS,D),h.startDTS=Math.min(h.startDTS,I),h.endDTS=Math.max(h.endDTS,_)},a.clearElementaryStreamInfo=function(){var O=this.elementaryStreams;O[c.AUDIO]=null,O[c.VIDEO]=null,O[c.AUDIOVIDEO]=null},p(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var O=this.sn;typeof O!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&K.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),O=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,O)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(V.isFiniteNumber)(this.programDateTime))return null;var O=Object(V.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+O*1e3}},{key:"encrypted",get:function(){var O;return!!((O=this.decryptdata)!==null&&O!==void 0&&O.keyFormat&&this.decryptdata.uri)}}]),s}(r),u=function(o){w(s,o);function s(a,R,O,S,D){var I;I=o.call(this,O)||this,I.fragOffset=0,I.duration=0,I.gap=!1,I.independent=!1,I.relurl=void 0,I.fragment=void 0,I.index=void 0,I.stats=new n.LoadStats,I.duration=a.decimalFloatingPoint("DURATION"),I.gap=a.bool("GAP"),I.independent=a.bool("INDEPENDENT"),I.relurl=a.enumeratedString("URI"),I.fragment=R,I.index=S;var _=a.enumeratedString("BYTERANGE");return _&&I.setByteRange(_,D),D&&(I.fragOffset=D.fragOffset+D.duration),I}return p(s,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var R=this.elementaryStreams;return!!(R.audio||R.video||R.audiovideo)}}]),s}(r)},"./src/loader/key-loader.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return K});var V=U("./src/events.ts"),W=U("./src/errors.ts"),M=U("./src/utils/logger.ts"),K=function(){function j(w){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=w,this._registerListeners()}var n=j.prototype;return n._registerListeners=function(){this.hls.on(V.Events.KEY_LOADING,this.onKeyLoading,this)},n._unregisterListeners=function(){this.hls.off(V.Events.KEY_LOADING,this.onKeyLoading)},n.destroy=function(){this._unregisterListeners();for(var m in this.loaders){var f=this.loaders[m];f&&f.destroy()}this.loaders={}},n.onKeyLoading=function(m,f){var p=f.frag,c=p.type,r=this.loaders[c];if(!p.decryptdata){M.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var d=p.decryptdata.uri;if(d!==this.decrypturl||this.decryptkey===null){var u=this.hls.config;if(r&&(M.logger.warn("abort previous key loader for type:"+c),r.abort()),!d){M.logger.warn("key uri is falsy");return}var o=u.loader,s=p.loader=this.loaders[c]=new o(u);this.decrypturl=d,this.decryptkey=null;var a={url:d,frag:p,responseType:"arraybuffer"},R={timeout:u.fragLoadingTimeOut,maxRetry:0,retryDelay:u.fragLoadingRetryDelay,maxRetryDelay:u.fragLoadingMaxRetryTimeout,highWaterMark:0},O={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(a,R,O)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(V.Events.KEY_LOADED,{frag:p}))},n.loadsuccess=function(m,f,p){var c=p.frag;if(!c.decryptdata){M.logger.error("after key load, decryptdata unset");return}this.decryptkey=c.decryptdata.key=new Uint8Array(m.data),c.loader=null,delete this.loaders[c.type],this.hls.trigger(V.Events.KEY_LOADED,{frag:c})},n.loaderror=function(m,f){var p=f.frag,c=p.loader;c&&c.abort(),delete this.loaders[p.type],this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:m})},n.loadtimeout=function(m,f){var p=f.frag,c=p.loader;c&&c.abort(),delete this.loaders[p.type],this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},j}()},"./src/loader/level-details.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"LevelDetails",function(){return j});var V=U("./src/polyfills/number.ts");function W(n,w){for(var m=0;m<w.length;m++){var f=w[m];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function M(n,w,m){return w&&W(n.prototype,w),m&&W(n,m),n}var K=10,j=function(){function n(m){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=m}var w=n.prototype;return w.reloaded=function(f){if(!f){this.advanced=!0,this.updated=!0;return}var p=this.lastPartSn-f.lastPartSn,c=this.lastPartIndex-f.lastPartIndex;this.updated=this.endSN!==f.endSN||!!c||!!p,this.advanced=this.endSN>f.endSN||p>0||p===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(f.misses*.6):this.misses=f.misses+1,this.availabilityDelay=f.availabilityDelay},M(n,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(V.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||K}},{key:"drift",get:function(){var f=this.driftEndTime-this.driftStartTime;if(f>0){var p=this.driftEnd-this.driftStart;return p*1e3/f}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var f;return(f=this.fragments)!==null&&f!==void 0&&f.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 f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),n}()},"./src/loader/level-key.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"LevelKey",function(){return j});var V=U("./node_modules/url-toolkit/src/url-toolkit.js"),W=U.n(V);function M(n,w){for(var m=0;m<w.length;m++){var f=w[m];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function K(n,w,m){return w&&M(n.prototype,w),m&&M(n,m),n}var j=function(){n.fromURL=function(m,f){return new n(m,f)},n.fromURI=function(m){return new n(m)};function n(w,m){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,m?this._uri=Object(V.buildAbsoluteURL)(w,m,{alwaysNormalize:!0}):this._uri=w}return K(n,[{key:"uri",get:function(){return this._uri}}]),n}()},"./src/loader/load-stats.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"LoadStats",function(){return V});var V=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(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return s});var V=U("./src/polyfills/number.ts"),W=U("./node_modules/url-toolkit/src/url-toolkit.js"),M=U.n(W),K=U("./src/loader/fragment.ts"),j=U("./src/loader/level-details.ts"),n=U("./src/loader/level-key.ts"),w=U("./src/utils/attr-list.ts"),m=U("./src/utils/logger.ts"),f=U("./src/utils/codecs.ts"),p=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,c=/#EXT-X-MEDIA:(.*)/g,r=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),d=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),u=/\.(mp4|m4s|m4v|m4a)$/i;function o(D){var I,_;return u.test((I=(_=W.parseURL(D))===null||_===void 0?void 0:_.path)!=null?I:"")}var s=function(){function D(){}return D.findGroup=function(_,b){for(var v=0;v<_.length;v++){var h=_[v];if(h.id===b)return h}},D.convertAVC1ToAVCOTI=function(_){var b=_.split(".");if(b.length>2){var v=b.shift()+".";return v+=parseInt(b.shift()).toString(16),v+=("000"+parseInt(b.shift()).toString(16)).substr(-4),v}return _},D.resolve=function(_,b){return W.buildAbsoluteURL(b,_,{alwaysNormalize:!0})},D.parseMasterPlaylist=function(_,b){var v=[],h={},C=!1;p.lastIndex=0;for(var x;(x=p.exec(_))!=null;)if(x[1]){var g=new w.AttrList(x[1]),P={attrs:g,bitrate:g.decimalInteger("AVERAGE-BANDWIDTH")||g.decimalInteger("BANDWIDTH"),name:g.NAME,url:D.resolve(x[2],b)},k=g.decimalResolution("RESOLUTION");k&&(P.width=k.width,P.height=k.height),a((g.CODECS||"").split(/[ ,]+/).filter(function(A){return A}),P),P.videoCodec&&P.videoCodec.indexOf("avc1")!==-1&&(P.videoCodec=D.convertAVC1ToAVCOTI(P.videoCodec)),v.push(P)}else if(x[3]){var y=new w.AttrList(x[3]);y["DATA-ID"]&&(C=!0,h[y["DATA-ID"]]=y)}return{levels:v,sessionData:C?h:null}},D.parseMasterPlaylistMedia=function(_,b,v,h){h===void 0&&(h=[]);var C,x=[],g=0;for(c.lastIndex=0;(C=c.exec(_))!==null;){var P=new w.AttrList(C[1]);if(P.TYPE===v){var k={attrs:P,bitrate:0,id:g++,groupId:P["GROUP-ID"],instreamId:P["INSTREAM-ID"],name:P.NAME||P.LANGUAGE||"",type:v,default:P.bool("DEFAULT"),autoselect:P.bool("AUTOSELECT"),forced:P.bool("FORCED"),lang:P.LANGUAGE,url:P.URI?D.resolve(P.URI,b):""};if(h.length){var y=D.findGroup(h,k.groupId)||h[0];R(k,y,"audioCodec"),R(k,y,"textCodec")}x.push(k)}}return x},D.parseLevelPlaylist=function(_,b,v,h,C){var x=new j.LevelDetails(b),g=x.fragments,P=null,k=0,y=0,A=0,F=0,T=null,Y=new K.Fragment(h,b),$,le,de,Pe=-1,Se=!1;for(r.lastIndex=0,x.m3u8=_;($=r.exec(_))!==null;){Se&&(Se=!1,Y=new K.Fragment(h,b),Y.start=A,Y.sn=k,Y.cc=F,Y.level=v,P&&(Y.initSegment=P,Y.rawProgramDateTime=P.rawProgramDateTime));var we=$[1];if(we){Y.duration=parseFloat(we);var Fe=(" "+$[2]).slice(1);Y.title=Fe||null,Y.tagList.push(Fe?["INF",we,Fe]:["INF",we])}else if($[3])Object(V.isFiniteNumber)(Y.duration)&&(Y.start=A,de&&(Y.levelkey=de),Y.sn=k,Y.level=v,Y.cc=F,Y.urlId=C,g.push(Y),Y.relurl=(" "+$[3]).slice(1),S(Y,T),T=Y,A+=Y.duration,k++,y=0,Se=!0);else if($[4]){var Me=(" "+$[4]).slice(1);T?Y.setByteRange(Me,T):Y.setByteRange(Me)}else if($[5])Y.rawProgramDateTime=(" "+$[5]).slice(1),Y.tagList.push(["PROGRAM-DATE-TIME",Y.rawProgramDateTime]),Pe===-1&&(Pe=g.length);else{if($=$[0].match(d),!$){m.logger.warn("No matches on slow regex match for level playlist!");continue}for(le=1;le<$.length&&!(typeof $[le]!="undefined");le++);var me=(" "+$[le]).slice(1),pe=(" "+$[le+1]).slice(1),ne=$[le+2]?(" "+$[le+2]).slice(1):"";switch(me){case"PLAYLIST-TYPE":x.type=pe.toUpperCase();break;case"MEDIA-SEQUENCE":k=x.startSN=parseInt(pe);break;case"SKIP":{var Ee=new w.AttrList(pe),ae=Ee.decimalInteger("SKIPPED-SEGMENTS");if(Object(V.isFiniteNumber)(ae)){x.skippedSegments=ae;for(var ke=ae;ke--;)g.unshift(null);k+=ae}var je=Ee.enumeratedString("RECENTLY-REMOVED-DATERANGES");je&&(x.recentlyRemovedDateranges=je.split(" "));break}case"TARGETDURATION":x.targetduration=parseFloat(pe);break;case"VERSION":x.version=parseInt(pe);break;case"EXTM3U":break;case"ENDLIST":x.live=!1;break;case"#":(pe||ne)&&Y.tagList.push(ne?[pe,ne]:[pe]);break;case"DIS":F++;case"GAP":Y.tagList.push([me]);break;case"BITRATE":Y.tagList.push([me,pe]);break;case"DISCONTINUITY-SEQ":F=parseInt(pe);break;case"KEY":{var Oe,Ve=new w.AttrList(pe),qe=Ve.enumeratedString("METHOD"),ue=Ve.URI,ve=Ve.hexadecimalInteger("IV"),De=Ve.enumeratedString("KEYFORMATVERSIONS"),Ne=Ve.enumeratedString("KEYID"),it=(Oe=Ve.enumeratedString("KEYFORMAT"))!=null?Oe:"identity",pt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(pt.indexOf(it)>-1){m.logger.warn("Keyformat "+it+" is not supported from the manifest");continue}else if(it!=="identity")continue;qe&&(de=n.LevelKey.fromURL(b,ue),ue&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(qe)>=0&&(de.method=qe,de.keyFormat=it,Ne&&(de.keyID=Ne),De&&(de.keyFormatVersions=De),de.iv=ve));break}case"START":{var mt=new w.AttrList(pe),dt=mt.decimalFloatingPoint("TIME-OFFSET");Object(V.isFiniteNumber)(dt)&&(x.startTimeOffset=dt);break}case"MAP":{var Tt=new w.AttrList(pe);Y.relurl=Tt.URI,Tt.BYTERANGE&&Y.setByteRange(Tt.BYTERANGE),Y.level=v,Y.sn="initSegment",de&&(Y.levelkey=de),Y.initSegment=null,P=Y,Se=!0;break}case"SERVER-CONTROL":{var St=new w.AttrList(pe);x.canBlockReload=St.bool("CAN-BLOCK-RELOAD"),x.canSkipUntil=St.optionalFloat("CAN-SKIP-UNTIL",0),x.canSkipDateRanges=x.canSkipUntil>0&&St.bool("CAN-SKIP-DATERANGES"),x.partHoldBack=St.optionalFloat("PART-HOLD-BACK",0),x.holdBack=St.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ue=new w.AttrList(pe);x.partTarget=Ue.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=x.partList;Ie||(Ie=x.partList=[]);var tt=y>0?Ie[Ie.length-1]:void 0,lt=y++,Ke=new K.Part(new w.AttrList(pe),Y,b,lt,tt);Ie.push(Ke),Y.duration+=Ke.duration;break}case"PRELOAD-HINT":{var Xe=new w.AttrList(pe);x.preloadHint=Xe;break}case"RENDITION-REPORT":{var Ce=new w.AttrList(pe);x.renditionReports=x.renditionReports||[],x.renditionReports.push(Ce);break}default:m.logger.warn("line parsed but not handled: "+$);break}}}T&&!T.relurl?(g.pop(),A-=T.duration,x.partList&&(x.fragmentHint=T)):x.partList&&(S(Y,T),Y.cc=F,x.fragmentHint=Y);var ge=g.length,be=g[0],ie=g[ge-1];if(A+=x.skippedSegments*x.targetduration,A>0&&ge&&ie){x.averagetargetduration=A/ge;var oe=ie.sn;x.endSN=oe!=="initSegment"?oe:0,be&&(x.startCC=be.cc,be.initSegment||x.fragments.every(function(fe){return fe.relurl&&o(fe.relurl)})&&(m.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),Y=new K.Fragment(h,b),Y.relurl=ie.relurl,Y.level=v,Y.sn="initSegment",be.initSegment=Y,x.needSidxRanges=!0))}else x.endSN=0,x.startCC=0;return x.fragmentHint&&(A+=x.fragmentHint.duration),x.totalduration=A,x.endCC=F,Pe>0&&O(g,Pe),x},D}();function a(D,I){["video","audio","text"].forEach(function(_){var b=D.filter(function(h){return Object(f.isCodecType)(h,_)});if(b.length){var v=b.filter(function(h){return h.lastIndexOf("avc1",0)===0||h.lastIndexOf("mp4a",0)===0});I[_+"Codec"]=v.length>0?v[0]:b[0],D=D.filter(function(h){return b.indexOf(h)===-1})}}),I.unknownCodecs=D}function R(D,I,_){var b=I[_];b&&(D[_]=b)}function O(D,I){for(var _=D[I],b=I;b--;){var v=D[b];if(!v)return;v.programDateTime=_.programDateTime-v.duration*1e3,_=v}}function S(D,I){D.rawProgramDateTime?D.programDateTime=Date.parse(D.rawProgramDateTime):I!=null&&I.programDateTime&&(D.programDateTime=I.endProgramDateTime),Object(V.isFiniteNumber)(D.programDateTime)||(D.programDateTime=null,D.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/polyfills/number.ts"),W=U("./src/events.ts"),M=U("./src/errors.ts"),K=U("./src/utils/logger.ts"),j=U("./src/utils/mp4-tools.ts"),n=U("./src/loader/m3u8-parser.ts"),w=U("./src/types/loader.ts"),m=U("./src/utils/attr-list.ts");function f(r){var d=r.type;switch(d){case w.PlaylistContextType.AUDIO_TRACK:return w.PlaylistLevelType.AUDIO;case w.PlaylistContextType.SUBTITLE_TRACK:return w.PlaylistLevelType.SUBTITLE;default:return w.PlaylistLevelType.MAIN}}function p(r,d){var u=r.url;return(u===void 0||u.indexOf("data:")===0)&&(u=d.url),u}var c=function(){function r(u){this.hls=void 0,this.loaders=Object.create(null),this.hls=u,this.registerListeners()}var d=r.prototype;return d.registerListeners=function(){var o=this.hls;o.on(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(W.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(W.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.on(W.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.unregisterListeners=function(){var o=this.hls;o.off(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(W.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(W.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.off(W.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.createInternalLoader=function(o){var s=this.hls.config,a=s.pLoader,R=s.loader,O=a||R,S=new O(s);return o.loader=S,this.loaders[o.type]=S,S},d.getInternalLoader=function(o){return this.loaders[o.type]},d.resetInternalLoader=function(o){this.loaders[o]&&delete this.loaders[o]},d.destroyInternalLoaders=function(){for(var o in this.loaders){var s=this.loaders[o];s&&s.destroy(),this.resetInternalLoader(o)}},d.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},d.onManifestLoading=function(o,s){var a=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:w.PlaylistContextType.MANIFEST,url:a,deliveryDirectives:null})},d.onLevelLoading=function(o,s){var a=s.id,R=s.level,O=s.url,S=s.deliveryDirectives;this.load({id:a,groupId:null,level:R,responseType:"text",type:w.PlaylistContextType.LEVEL,url:O,deliveryDirectives:S})},d.onAudioTrackLoading=function(o,s){var a=s.id,R=s.groupId,O=s.url,S=s.deliveryDirectives;this.load({id:a,groupId:R,level:null,responseType:"text",type:w.PlaylistContextType.AUDIO_TRACK,url:O,deliveryDirectives:S})},d.onSubtitleTrackLoading=function(o,s){var a=s.id,R=s.groupId,O=s.url,S=s.deliveryDirectives;this.load({id:a,groupId:R,level:null,responseType:"text",type:w.PlaylistContextType.SUBTITLE_TRACK,url:O,deliveryDirectives:S})},d.load=function(o){var s,a=this.hls.config,R=this.getInternalLoader(o);if(R){var O=R.context;if(O&&O.url===o.url){K.logger.trace("[playlist-loader]: playlist request ongoing");return}K.logger.log("[playlist-loader]: aborting previous loader for type: "+o.type),R.abort()}var S,D,I,_;switch(o.type){case w.PlaylistContextType.MANIFEST:S=a.manifestLoadingMaxRetry,D=a.manifestLoadingTimeOut,I=a.manifestLoadingRetryDelay,_=a.manifestLoadingMaxRetryTimeout;break;case w.PlaylistContextType.LEVEL:case w.PlaylistContextType.AUDIO_TRACK:case w.PlaylistContextType.SUBTITLE_TRACK:S=0,D=a.levelLoadingTimeOut;break;default:S=a.levelLoadingMaxRetry,D=a.levelLoadingTimeOut,I=a.levelLoadingRetryDelay,_=a.levelLoadingMaxRetryTimeout;break}if(R=this.createInternalLoader(o),(s=o.deliveryDirectives)!==null&&s!==void 0&&s.part){var b;if(o.type===w.PlaylistContextType.LEVEL&&o.level!==null?b=this.hls.levels[o.level].details:o.type===w.PlaylistContextType.AUDIO_TRACK&&o.id!==null?b=this.hls.audioTracks[o.id].details:o.type===w.PlaylistContextType.SUBTITLE_TRACK&&o.id!==null&&(b=this.hls.subtitleTracks[o.id].details),b){var v=b.partTarget,h=b.targetduration;v&&h&&(D=Math.min(Math.max(v*3,h*.8)*1e3,D))}}var C={timeout:D,maxRetry:S,retryDelay:I,maxRetryDelay:_,highWaterMark:0},x={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};R.load(o,C,x)},d.loadsuccess=function(o,s,a,R){if(R===void 0&&(R=null),a.isSidxRequest){this.handleSidxRequest(o,a),this.handlePlaylistLoaded(o,s,a,R);return}this.resetInternalLoader(a.type);var O=o.data;if(O.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(o,a,"no EXTM3U delimiter",R);return}s.parsing.start=performance.now(),O.indexOf("#EXTINF:")>0||O.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(o,s,a,R):this.handleMasterPlaylist(o,s,a,R)},d.loaderror=function(o,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!1,o)},d.loadtimeout=function(o,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!0)},d.handleMasterPlaylist=function(o,s,a,R){var O=this.hls,S=o.data,D=p(o,a),I=n.default.parseMasterPlaylist(S,D),_=I.levels,b=I.sessionData;if(!_.length){this.handleManifestParsingError(o,a,"no level found in manifest",R);return}var v=_.map(function(k){return{id:k.attrs.AUDIO,audioCodec:k.audioCodec}}),h=_.map(function(k){return{id:k.attrs.SUBTITLES,textCodec:k.textCodec}}),C=n.default.parseMasterPlaylistMedia(S,D,"AUDIO",v),x=n.default.parseMasterPlaylistMedia(S,D,"SUBTITLES",h),g=n.default.parseMasterPlaylistMedia(S,D,"CLOSED-CAPTIONS");if(C.length){var P=C.some(function(k){return!k.url});!P&&_[0].audioCodec&&!_[0].attrs.AUDIO&&(K.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),C.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new m.AttrList({}),bitrate:0,url:""}))}O.trigger(W.Events.MANIFEST_LOADED,{levels:_,audioTracks:C,subtitles:x,captions:g,url:D,stats:s,networkDetails:R,sessionData:b})},d.handleTrackOrLevelPlaylist=function(o,s,a,R){var O=this.hls,S=a.id,D=a.level,I=a.type,_=p(o,a),b=Object(V.isFiniteNumber)(S)?S:0,v=Object(V.isFiniteNumber)(D)?D:b,h=f(a),C=n.default.parseLevelPlaylist(o.data,_,v,h,b);if(!C.fragments.length){O.trigger(W.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:_,reason:"no fragments found in level",level:typeof a.level=="number"?a.level:void 0});return}if(I===w.PlaylistContextType.MANIFEST){var x={attrs:new m.AttrList({}),bitrate:0,details:C,name:"",url:_};O.trigger(W.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:_,stats:s,networkDetails:R,sessionData:null})}if(s.parsing.end=performance.now(),C.needSidxRanges){var g,P=(g=C.fragments[0].initSegment)===null||g===void 0?void 0:g.url;this.load({url:P,isSidxRequest:!0,type:I,level:D,levelDetails:C,id:S,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}a.levelDetails=C,this.handlePlaylistLoaded(o,s,a,R)},d.handleSidxRequest=function(o,s){var a=Object(j.parseSegmentIndex)(new Uint8Array(o.data));if(!a)return;var R=a.references,O=s.levelDetails;R.forEach(function(S,D){var I=S.info,_=O.fragments[D];_.byteRange.length===0&&_.setByteRange(String(1+I.end-I.start)+"@"+String(I.start)),_.initSegment&&_.initSegment.setByteRange(String(a.moovEndOffset)+"@0")})},d.handleManifestParsingError=function(o,s,a,R){this.hls.trigger(W.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===w.PlaylistContextType.MANIFEST,url:o.url,reason:a,response:o,context:s,networkDetails:R})},d.handleNetworkError=function(o,s,a,R){a===void 0&&(a=!1),K.logger.warn("[playlist-loader]: A network "+(a?"timeout":"error")+" occurred while loading "+o.type+" level: "+o.level+" id: "+o.id+' group-id: "'+o.groupId+'"');var O=M.ErrorDetails.UNKNOWN,S=!1,D=this.getInternalLoader(o);switch(o.type){case w.PlaylistContextType.MANIFEST:O=a?M.ErrorDetails.MANIFEST_LOAD_TIMEOUT:M.ErrorDetails.MANIFEST_LOAD_ERROR,S=!0;break;case w.PlaylistContextType.LEVEL:O=a?M.ErrorDetails.LEVEL_LOAD_TIMEOUT:M.ErrorDetails.LEVEL_LOAD_ERROR,S=!1;break;case w.PlaylistContextType.AUDIO_TRACK:O=a?M.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:M.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,S=!1;break;case w.PlaylistContextType.SUBTITLE_TRACK:O=a?M.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:M.ErrorDetails.SUBTITLE_LOAD_ERROR,S=!1;break}D&&this.resetInternalLoader(o.type);var I={type:M.ErrorTypes.NETWORK_ERROR,details:O,fatal:S,url:o.url,loader:D,context:o,networkDetails:s};R&&(I.response=R),this.hls.trigger(W.Events.ERROR,I)},d.handlePlaylistLoaded=function(o,s,a,R){var O=a.type,S=a.level,D=a.id,I=a.groupId,_=a.loader,b=a.levelDetails,v=a.deliveryDirectives;if(!(b!=null&&b.targetduration)){this.handleManifestParsingError(o,a,"invalid target duration",R);return}if(!_)return;b.live&&(_.getCacheAge&&(b.ageHeader=_.getCacheAge()||0),(!_.getCacheAge||isNaN(b.ageHeader))&&(b.ageHeader=0));switch(O){case w.PlaylistContextType.MANIFEST:case w.PlaylistContextType.LEVEL:this.hls.trigger(W.Events.LEVEL_LOADED,{details:b,level:S||0,id:D||0,stats:s,networkDetails:R,deliveryDirectives:v});break;case w.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(W.Events.AUDIO_TRACK_LOADED,{details:b,id:D||0,groupId:I||"",stats:s,networkDetails:R,deliveryDirectives:v});break;case w.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(W.Events.SUBTITLE_TRACK_LOADED,{details:b,id:D||0,groupId:I||"",stats:s,networkDetails:R,deliveryDirectives:v});break}},r}();G.default=c},"./src/polyfills/number.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"isFiniteNumber",function(){return V}),U.d(G,"MAX_SAFE_INTEGER",function(){return W});var V=Number.isFinite||function(M){return typeof M=="number"&&isFinite(M)},W=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(Z,G,U){"use strict";U.r(G);var V=function(){function W(){}return W.getSilentFrame=function(K,j){switch(K){case"mp4a.40.2":if(j===1)return new Uint8Array([0,200,0,128,35,128]);if(j===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(j===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(j===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(j===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(j===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(j===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(j===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(j===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},W}();G.default=V},"./src/remux/mp4-generator.ts":function(Z,G,U){"use strict";U.r(G);var V=Math.pow(2,32)-1,W=function(){function M(){}return M.init=function(){M.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var j;for(j in M.types)M.types.hasOwnProperty(j)&&(M.types[j]=[j.charCodeAt(0),j.charCodeAt(1),j.charCodeAt(2),j.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),w=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);M.HDLR_TYPES={video:n,audio:w};var m=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),f=new Uint8Array([0,0,0,0,0,0,0,0]);M.STTS=M.STSC=M.STCO=f,M.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),M.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),M.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),r=new Uint8Array([0,0,0,1]);M.FTYP=M.box(M.types.ftyp,p,r,p,c),M.DINF=M.box(M.types.dinf,M.box(M.types.dref,m))},M.box=function(j){for(var n=8,w=arguments.length,m=new Array(w>1?w-1:0),f=1;f<w;f++)m[f-1]=arguments[f];for(var p=m.length,c=p;p--;)n+=m[p].byteLength;var r=new Uint8Array(n);for(r[0]=n>>24&255,r[1]=n>>16&255,r[2]=n>>8&255,r[3]=n&255,r.set(j,4),p=0,n=8;p<c;p++)r.set(m[p],n),n+=m[p].byteLength;return r},M.hdlr=function(j){return M.box(M.types.hdlr,M.HDLR_TYPES[j])},M.mdat=function(j){return M.box(M.types.mdat,j)},M.mdhd=function(j,n){n*=j;var w=Math.floor(n/(V+1)),m=Math.floor(n%(V+1));return M.box(M.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,j>>24&255,j>>16&255,j>>8&255,j&255,w>>24,w>>16&255,w>>8&255,w&255,m>>24,m>>16&255,m>>8&255,m&255,85,196,0,0]))},M.mdia=function(j){return M.box(M.types.mdia,M.mdhd(j.timescale,j.duration),M.hdlr(j.type),M.minf(j))},M.mfhd=function(j){return M.box(M.types.mfhd,new Uint8Array([0,0,0,0,j>>24,j>>16&255,j>>8&255,j&255]))},M.minf=function(j){return j.type==="audio"?M.box(M.types.minf,M.box(M.types.smhd,M.SMHD),M.DINF,M.stbl(j)):M.box(M.types.minf,M.box(M.types.vmhd,M.VMHD),M.DINF,M.stbl(j))},M.moof=function(j,n,w){return M.box(M.types.moof,M.mfhd(j),M.traf(w,n))},M.moov=function(j){for(var n=j.length,w=[];n--;)w[n]=M.trak(j[n]);return M.box.apply(null,[M.types.moov,M.mvhd(j[0].timescale,j[0].duration)].concat(w).concat(M.mvex(j)))},M.mvex=function(j){for(var n=j.length,w=[];n--;)w[n]=M.trex(j[n]);return M.box.apply(null,[M.types.mvex].concat(w))},M.mvhd=function(j,n){n*=j;var w=Math.floor(n/(V+1)),m=Math.floor(n%(V+1)),f=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,j>>24&255,j>>16&255,j>>8&255,j&255,w>>24,w>>16&255,w>>8&255,w&255,m>>24,m>>16&255,m>>8&255,m&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return M.box(M.types.mvhd,f)},M.sdtp=function(j){var n=j.samples||[],w=new Uint8Array(4+n.length),m,f;for(m=0;m<n.length;m++)f=n[m].flags,w[m+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return M.box(M.types.sdtp,w)},M.stbl=function(j){return M.box(M.types.stbl,M.stsd(j),M.box(M.types.stts,M.STTS),M.box(M.types.stsc,M.STSC),M.box(M.types.stsz,M.STSZ),M.box(M.types.stco,M.STCO))},M.avc1=function(j){var n=[],w=[],m,f,p;for(m=0;m<j.sps.length;m++)f=j.sps[m],p=f.byteLength,n.push(p>>>8&255),n.push(p&255),n=n.concat(Array.prototype.slice.call(f));for(m=0;m<j.pps.length;m++)f=j.pps[m],p=f.byteLength,w.push(p>>>8&255),w.push(p&255),w=w.concat(Array.prototype.slice.call(f));var c=M.box(M.types.avcC,new Uint8Array([1,n[3],n[4],n[5],252|3,224|j.sps.length].concat(n).concat([j.pps.length]).concat(w))),r=j.width,d=j.height,u=j.pixelRatio[0],o=j.pixelRatio[1];return M.box(M.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,r>>8&255,r&255,d>>8&255,d&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,M.box(M.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),M.box(M.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,u&255,o>>24,o>>16&255,o>>8&255,o&255])))},M.esds=function(j){var n=j.config.length;return new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(j.config).concat([6,1,2]))},M.mp4a=function(j){var n=j.samplerate;return M.box(M.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,j.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]),M.box(M.types.esds,M.esds(j)))},M.mp3=function(j){var n=j.samplerate;return M.box(M.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,j.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]))},M.stsd=function(j){return j.type==="audio"?!j.isAAC&&j.codec==="mp3"?M.box(M.types.stsd,M.STSD,M.mp3(j)):M.box(M.types.stsd,M.STSD,M.mp4a(j)):M.box(M.types.stsd,M.STSD,M.avc1(j))},M.tkhd=function(j){var n=j.id,w=j.duration*j.timescale,m=j.width,f=j.height,p=Math.floor(w/(V+1)),c=Math.floor(w%(V+1));return M.box(M.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,n&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,c>>24,c>>16&255,c>>8&255,c&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,m>>8&255,m&255,0,0,f>>8&255,f&255,0,0]))},M.traf=function(j,n){var w=M.sdtp(j),m=j.id,f=Math.floor(n/(V+1)),p=Math.floor(n%(V+1));return M.box(M.types.traf,M.box(M.types.tfhd,new Uint8Array([0,0,0,0,m>>24,m>>16&255,m>>8&255,m&255])),M.box(M.types.tfdt,new Uint8Array([1,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,p>>24,p>>16&255,p>>8&255,p&255])),M.trun(j,w.length+16+20+8+16+8+8),w)},M.trak=function(j){return j.duration=j.duration||4294967295,M.box(M.types.trak,M.tkhd(j),M.mdia(j))},M.trex=function(j){var n=j.id;return M.box(M.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},M.trun=function(j,n){var w=j.samples||[],m=w.length,f=12+16*m,p=new Uint8Array(f),c,r,d,u,o,s;for(n+=8+f,p.set([0,0,15,1,m>>>24&255,m>>>16&255,m>>>8&255,m&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255],0),c=0;c<m;c++)r=w[c],d=r.duration,u=r.size,o=r.flags,s=r.cts,p.set([d>>>24&255,d>>>16&255,d>>>8&255,d&255,u>>>24&255,u>>>16&255,u>>>8&255,u&255,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,o.degradPrio&240<<8,o.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*c);return M.box(M.types.trun,p)},M.initSegment=function(j){M.types||M.init();var n=M.moov(j),w=new Uint8Array(M.FTYP.byteLength+n.byteLength);return w.set(M.FTYP),w.set(n,M.FTYP.byteLength),w},M}();W.types=void 0,W.HDLR_TYPES=void 0,W.STTS=void 0,W.STSC=void 0,W.STCO=void 0,W.STSZ=void 0,W.VMHD=void 0,W.SMHD=void 0,W.STSD=void 0,W.FTYP=void 0,W.DINF=void 0,G.default=W},"./src/remux/mp4-remuxer.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return s}),U.d(G,"normalizePts",function(){return a});var V=U("./src/polyfills/number.ts"),W=U("./src/remux/aac-helper.ts"),M=U("./src/remux/mp4-generator.ts"),K=U("./src/events.ts"),j=U("./src/errors.ts"),n=U("./src/utils/logger.ts"),w=U("./src/types/loader.ts"),m=U("./src/utils/timescale-conversion.ts");function f(){return f=Object.assign||function(D){for(var I=1;I<arguments.length;I++){var _=arguments[I];for(var b in _)Object.prototype.hasOwnProperty.call(_,b)&&(D[b]=_[b])}return D},f.apply(this,arguments)}var p=10*1e3,c=1024,r=1152,d=null,u=null,o=!1,s=function(){function D(_,b,v,h){if(h===void 0&&(h=""),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=b,this.typeSupported=v,this.ISGenerated=!1,d===null){var C=navigator.userAgent||"",x=C.match(/Chrome\/(\d+)/i);d=x?parseInt(x[1]):0}if(u===null){var g=navigator.userAgent.match(/Safari\/(\d+)/i);u=g?parseInt(g[1]):0}o=!!d&&d<75||!!u&&u<600}var I=D.prototype;return I.destroy=function(){},I.resetTimeStamp=function(b){n.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=b},I.resetNextTimestamp=function(){n.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},I.resetInitSegment=function(){n.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},I.getVideoStartPts=function(b){var v=!1,h=b.reduce(function(C,x){var g=x.pts-C;return g<-4294967296?(v=!0,a(C,x.pts)):g>0?C:x.pts},b[0].pts);return v&&n.logger.debug("PTS rollover detected"),h},I.remux=function(b,v,h,C,x,g,P,k){var y,A,F,T,Y,$,le=x,de=x,Pe=b.pid>-1,Se=v.pid>-1,we=v.samples.length,Fe=b.samples.length>0,Me=we>1,me=(!Pe||Fe)&&(!Se||Me)||this.ISGenerated||P;if(me){this.ISGenerated||(F=this.generateIS(b,v,x));var pe=this.isVideoContiguous,ne=-1;if(Me&&(ne=R(v.samples),!pe&&this.config.forceKeyFrameOnDiscontinuity))if($=!0,ne>0){n.logger.warn("[mp4-remuxer]: Dropped "+ne+" out of "+we+" video samples due to a missing keyframe");var Ee=this.getVideoStartPts(v.samples);v.samples=v.samples.slice(ne),v.dropped+=ne,de+=(v.samples[0].pts-Ee)/(v.timescale||9e4)}else ne===-1&&(n.logger.warn("[mp4-remuxer]: No keyframe found out of "+we+" video samples"),$=!1);if(this.ISGenerated){if(Fe&&Me){var ae=this.getVideoStartPts(v.samples),ke=a(b.samples[0].pts,ae)-ae,je=ke/v.inputTimeScale;le+=Math.max(0,je),de+=Math.max(0,-je)}if(Fe){if(b.samplerate||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),F=this.generateIS(b,v,x)),A=this.remuxAudio(b,le,this.isAudioContiguous,g,Se||Me||k===w.PlaylistLevelType.AUDIO?de:void 0),Me){var Oe=A?A.endPTS-A.startPTS:0;v.inputTimeScale||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),F=this.generateIS(b,v,x)),y=this.remuxVideo(v,de,pe,Oe)}}else Me&&(y=this.remuxVideo(v,de,pe,0));y&&(y.firstKeyFrame=ne,y.independent=ne!==-1)}}return this.ISGenerated&&(h.samples.length&&(Y=this.remuxID3(h,x)),C.samples.length&&(T=this.remuxText(C,x))),{audio:A,video:y,initSegment:F,independent:$,text:T,id3:Y}},I.generateIS=function(b,v,h){var C=b.samples,x=v.samples,g=this.typeSupported,P={},k=!Object(V.isFiniteNumber)(this._initPTS),y="audio/mp4",A,F,T;if(k&&(A=F=Infinity),b.config&&C.length&&(b.timescale=b.samplerate,b.isAAC||(g.mpeg?(y="audio/mpeg",b.codec=""):g.mp3&&(b.codec="mp3")),P.audio={id:"audio",container:y,codec:b.codec,initSegment:!b.isAAC&&g.mpeg?new Uint8Array(0):M.default.initSegment([b]),metadata:{channelCount:b.channelCount}},k&&(T=b.inputTimeScale,A=F=C[0].pts-Math.round(T*h))),v.sps&&v.pps&&x.length&&(v.timescale=v.inputTimeScale,P.video={id:"main",container:"video/mp4",codec:v.codec,initSegment:M.default.initSegment([v]),metadata:{width:v.width,height:v.height}},k)){T=v.inputTimeScale;var Y=this.getVideoStartPts(x),$=Math.round(T*h);F=Math.min(F,a(x[0].dts,Y)-$),A=Math.min(A,Y-$)}if(Object.keys(P).length)return this.ISGenerated=!0,k&&(this._initPTS=A,this._initDTS=F),{tracks:P,initPTS:A,timescale:T}},I.remuxVideo=function(b,v,h,C){var x=b.inputTimeScale,g=b.samples,P=[],k=g.length,y=this._initPTS,A=this.nextAvcDts,F=8,T,Y,$,le=Number.POSITIVE_INFINITY,de=Number.NEGATIVE_INFINITY,Pe=0,Se=!1;if(!h||A===null){var we=v*x,Fe=g[0].pts-a(g[0].dts,g[0].pts);A=we-Fe}for(var Me=0;Me<k;Me++){var me=g[Me];if(me.pts=a(me.pts-y,A),me.dts=a(me.dts-y,A),me.dts>me.pts){var pe=9e4*.2;Pe=Math.max(Math.min(Pe,me.pts-me.dts),-1*pe)}me.dts<g[Me>0?Me-1:Me].dts&&(Se=!0)}Se&&g.sort(function(vt,$e){var et=vt.dts-$e.dts,Ye=vt.pts-$e.pts;return et||Ye}),Y=g[0].dts,$=g[g.length-1].dts;var ne=Math.round(($-Y)/(k-1));if(Pe<0){if(Pe<ne*-2){n.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(m.toMsFromMpegTsClock)(-ne,!0)+" ms");for(var Ee=Pe,ae=0;ae<k;ae++)g[ae].dts=Ee=Math.max(Ee,g[ae].pts-ne),g[ae].pts=Math.max(Ee,g[ae].pts)}else{n.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(m.toMsFromMpegTsClock)(Pe,!0)+" ms to overcome this issue");for(var ke=0;ke<k;ke++)g[ke].dts=g[ke].dts+Pe}Y=g[0].dts}if(h){var je=Y-A,Oe=je>ne,Ve=je<-1;if(Oe||Ve){Oe?n.logger.warn("AVC: "+Object(m.toMsFromMpegTsClock)(je,!0)+" ms ("+je+"dts) hole between fragments detected, filling it"):n.logger.warn("AVC: "+Object(m.toMsFromMpegTsClock)(-je,!0)+" ms ("+je+"dts) overlapping between fragments detected"),Y=A;var qe=g[0].pts-je;g[0].dts=Y,g[0].pts=qe,n.logger.log("Video: First PTS/DTS adjusted: "+Object(m.toMsFromMpegTsClock)(qe,!0)+"/"+Object(m.toMsFromMpegTsClock)(Y,!0)+", delta: "+Object(m.toMsFromMpegTsClock)(je,!0)+" ms")}}o&&(Y=Math.max(0,Y));for(var ue=0,ve=0,De=0;De<k;De++){for(var Ne=g[De],it=Ne.units,pt=it.length,mt=0,dt=0;dt<pt;dt++)mt+=it[dt].data.length;ve+=mt,ue+=pt,Ne.length=mt,Ne.dts=Math.max(Ne.dts,Y),Ne.pts=Math.max(Ne.pts,Ne.dts,0),le=Math.min(Ne.pts,le),de=Math.max(Ne.pts,de)}$=g[k-1].dts;var Tt=ve+4*ue+8,St;try{St=new Uint8Array(Tt)}catch(vt){this.observer.emit(K.Events.ERROR,K.Events.ERROR,{type:j.ErrorTypes.MUX_ERROR,details:j.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Tt,reason:"fail allocating video mdat "+Tt});return}var Ue=new DataView(St.buffer);Ue.setUint32(0,Tt),St.set(M.default.types.mdat,4);for(var Ie=0;Ie<k;Ie++){for(var tt=g[Ie],lt=tt.units,Ke=0,Xe=0,Ce=lt.length;Xe<Ce;Xe++){var ge=lt[Xe],be=ge.data,ie=ge.data.byteLength;Ue.setUint32(F,ie),F+=4,St.set(be,F),F+=ie,Ke+=4+ie}if(Ie<k-1)T=g[Ie+1].dts-tt.dts;else{var oe=this.config,fe=tt.dts-g[Ie>0?Ie-1:Ie].dts;if(oe.stretchShortVideoTrack&&this.nextAudioPts!==null){var ye=Math.floor(oe.maxBufferHole*x),Ae=(C?le+C*x:this.nextAudioPts)-tt.pts;Ae>ye?(T=Ae-fe,T<0&&(T=fe),n.logger.log("[mp4-remuxer]: It is approximately "+Ae/90+" ms to the next segment; using duration "+T/90+" ms for the last video frame.")):T=fe}else T=fe}var Ge=Math.round(tt.pts-tt.dts);P.push(new O(tt.key,T,Ke,Ge))}if(P.length&&d&&d<70){var ot=P[0].flags;ot.dependsOn=2,ot.isNonSync=0}console.assert(T!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=A=$+T,this.isVideoContiguous=!0;var wt=M.default.moof(b.sequenceNumber++,Y,f({},b,{samples:P})),Dt="video",At={data1:wt,data2:St,startPTS:le/x,endPTS:(de+T)/x,startDTS:Y/x,endDTS:A/x,type:Dt,hasAudio:!1,hasVideo:!0,nb:P.length,dropped:b.dropped};return b.samples=[],b.dropped=0,console.assert(St.length,"MDAT length must not be zero"),At},I.remuxAudio=function(b,v,h,C,x){var g=b.inputTimeScale,P=b.samplerate?b.samplerate:g,k=g/P,y=b.isAAC?c:r,A=y*k,F=this._initPTS,T=!b.isAAC&&this.typeSupported.mpeg,Y=[],$=b.samples,le=T?0:8,de=this.nextAudioPts||-1,Pe=v*g;if(this.isAudioContiguous=h=h||$.length&&de>0&&(C&&Math.abs(Pe-de)<9e3||Math.abs(a($[0].pts-F,Pe)-de)<20*A),$.forEach(function(be){be.pts=a(be.pts-F,Pe)}),!h||de<0){if($=$.filter(function(be){return be.pts>=0}),!$.length)return;x===0?de=0:C?de=Math.max(0,Pe):de=$[0].pts}if(b.isAAC)for(var Se=x!==void 0,we=this.config.maxAudioFramesDrift,Fe=0,Me=de;Fe<$.length;Fe++){var me=$[Fe],pe=me.pts,ne=pe-Me,Ee=Math.abs(1e3*ne/g);if(ne<=-we*A&&Se)Fe===0&&(n.logger.warn("Audio frame @ "+(pe/g).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*ne/g)+" ms."),this.nextAudioPts=de=Me=pe);else if(ne>=we*A&&Ee<p&&Se){var ae=Math.round(ne/A);Me=pe-ae*A,Me<0&&(ae--,Me+=A),Fe===0&&(this.nextAudioPts=de=Me),n.logger.warn("[mp4-remuxer]: Injecting "+ae+" audio frame @ "+(Me/g).toFixed(3)+"s due to "+Math.round(1e3*ne/g)+" ms gap.");for(var ke=0;ke<ae;ke++){var je=Math.max(Me,0),Oe=W.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);Oe||(n.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Oe=me.unit.subarray()),$.splice(Fe,0,{unit:Oe,pts:je}),Me+=A,Fe++}}me.pts=Me,Me+=A}for(var Ve=null,qe=null,ue,ve=0,De=$.length;De--;)ve+=$[De].unit.byteLength;for(var Ne=0,it=$.length;Ne<it;Ne++){var pt=$[Ne],mt=pt.unit,dt=pt.pts;if(qe!==null){var Tt=Y[Ne-1];Tt.duration=Math.round((dt-qe)/k)}else if(h&&b.isAAC&&(dt=de),Ve=dt,ve>0){ve+=le;try{ue=new Uint8Array(ve)}catch(be){this.observer.emit(K.Events.ERROR,K.Events.ERROR,{type:j.ErrorTypes.MUX_ERROR,details:j.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ve,reason:"fail allocating audio mdat "+ve});return}if(!T){var St=new DataView(ue.buffer);St.setUint32(0,ve),ue.set(M.default.types.mdat,4)}}else return;ue.set(mt,le);var Ue=mt.byteLength;le+=Ue,Y.push(new O(!0,y,Ue,0)),qe=dt}var Ie=Y.length;if(!Ie)return;var tt=Y[Y.length-1];this.nextAudioPts=de=qe+k*tt.duration;var lt=T?new Uint8Array(0):M.default.moof(b.sequenceNumber++,Ve/k,f({},b,{samples:Y}));b.samples=[];var Ke=Ve/g,Xe=de/g,Ce="audio",ge={data1:lt,data2:ue,startPTS:Ke,endPTS:Xe,startDTS:Ke,endDTS:Xe,type:Ce,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert(ue.length,"MDAT length must not be zero"),ge},I.remuxEmptyAudio=function(b,v,h,C){var x=b.inputTimeScale,g=b.samplerate?b.samplerate:x,P=x/g,k=this.nextAudioPts,y=(k!==null?k:C.startDTS*x)+this._initDTS,A=C.endDTS*x+this._initDTS,F=P*c,T=Math.ceil((A-y)/F),Y=W.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);if(n.logger.warn("[mp4-remuxer]: remux empty Audio"),!Y){n.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var $=[],le=0;le<T;le++){var de=y+le*F;$.push({unit:Y,pts:de,dts:de})}return b.samples=$,this.remuxAudio(b,v,h,!1)},I.remuxID3=function(b,v){var h=b.samples.length;if(!h)return;for(var C=b.inputTimeScale,x=this._initPTS,g=this._initDTS,P=0;P<h;P++){var k=b.samples[P];k.pts=a(k.pts-x,v*C)/C,k.dts=a(k.dts-g,v*C)/C}var y=b.samples;return b.samples=[],{samples:y}},I.remuxText=function(b,v){var h=b.samples.length;if(!h)return;for(var C=b.inputTimeScale,x=this._initPTS,g=0;g<h;g++){var P=b.samples[g];P.pts=a(P.pts-x,v*C)/C}b.samples.sort(function(y,A){return y.pts-A.pts});var k=b.samples;return b.samples=[],{samples:k}},D}();function a(D,I){var _;if(I===null)return D;for(I<D?_=-8589934592:_=8589934592;Math.abs(D-I)>4294967296;)D+=_;return D}function R(D){for(var I=0;I<D.length;I++)if(D[I].key)return I;return-1}var O=function(I,_,b,v){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=_,this.size=b,this.cts=v,this.flags=new S(I)},S=function(I){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=I?2:1,this.isNonSync=I?0:1}},"./src/remux/passthrough-remuxer.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/polyfills/number.ts"),W=U("./src/utils/mp4-tools.ts"),M=U("./src/loader/fragment.ts"),K=U("./src/utils/logger.ts"),j=function(){function m(){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 f=m.prototype;return f.destroy=function(){},f.resetTimeStamp=function(c){this.initPTS=c,this.lastEndDTS=null},f.resetNextTimestamp=function(){this.lastEndDTS=null},f.resetInitSegment=function(c,r,d){this.audioCodec=r,this.videoCodec=d,this.generateInitSegment(c),this.emitInitSegment=!0},f.generateInitSegment=function(c){var r=this.audioCodec,d=this.videoCodec;if(!c||!c.byteLength){this.initTracks=void 0,this.initData=void 0;return}var u=this.initData=Object(W.parseInitSegment)(c);r||(r=w(u.audio,M.ElementaryStreamTypes.AUDIO)),d||(d=w(u.video,M.ElementaryStreamTypes.VIDEO));var o={};u.audio&&u.video?o.audiovideo={container:"video/mp4",codec:r+","+d,initSegment:c,id:"main"}:u.audio?o.audio={container:"audio/mp4",codec:r,initSegment:c,id:"audio"}:u.video?o.video={container:"video/mp4",codec:d,initSegment:c,id:"main"}:K.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=o},f.remux=function(c,r,d,u,o){var s=this.initPTS,a=this.lastEndDTS,R={audio:void 0,video:void 0,text:u,id3:d,initSegment:void 0};Object(V.isFiniteNumber)(a)||(a=this.lastEndDTS=o||0);var O=r.samples;if(!O||!O.length)return R;var S={initPTS:void 0,timescale:1},D=this.initData;if((!D||!D.length)&&(this.generateInitSegment(O),D=this.initData),!D||!D.length)return K.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),R;this.emitInitSegment&&(S.tracks=this.initTracks,this.emitInitSegment=!1),Object(V.isFiniteNumber)(s)||(this.initPTS=S.initPTS=s=n(D,O,a));var I=Object(W.getDuration)(O,D),_=a,b=I+_;Object(W.offsetStartDTS)(D,O,s),I>0?this.lastEndDTS=b:(K.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var v=!!D.audio,h=!!D.video,C="";v&&(C+="audio"),h&&(C+="video");var x={data1:O,startPTS:_,startDTS:_,endPTS:b,endDTS:b,type:C,hasAudio:v,hasVideo:h,nb:1,dropped:0};return R.audio=x.type==="audio"?x:void 0,R.video=x.type!=="audio"?x:void 0,R.text=u,R.id3=d,R.initSegment=S,R},m}(),n=function(f,p,c){return Object(W.getStartDTS)(f,p)-c};function w(m,f){var p=m==null?void 0:m.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||f===M.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}G.default=j},"./src/task-loop.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return V});var V=function(){function W(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var M=W.prototype;return M.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},M.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},M.onHandlerDestroyed=function(){},M.hasInterval=function(){return!!this._tickInterval},M.hasNextTick=function(){return!!this._tickTimer},M.setInterval=function(j){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,j),!0)},M.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},M.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},M.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},M.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},M.doTick=function(){},W}()},"./src/types/cmcd.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"CMCDVersion",function(){return V}),U.d(G,"CMCDObjectType",function(){return W}),U.d(G,"CMCDStreamingFormat",function(){return M}),U.d(G,"CMCDStreamType",function(){return K});var V=1,W;(function(j){j.MANIFEST="m",j.AUDIO="a",j.VIDEO="v",j.MUXED="av",j.INIT="i",j.CAPTION="c",j.TIMED_TEXT="tt",j.KEY="k",j.OTHER="o"})(W||(W={}));var M;(function(j){j.DASH="d",j.HLS="h",j.SMOOTH="s",j.OTHER="o"})(M||(M={}));var K;(function(j){j.VOD="v",j.LIVE="l"})(K||(K={}))},"./src/types/level.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"HlsSkip",function(){return M}),U.d(G,"getSkipValue",function(){return K}),U.d(G,"HlsUrlParameters",function(){return j}),U.d(G,"Level",function(){return n});function V(w,m){for(var f=0;f<m.length;f++){var p=m[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(w,p.key,p)}}function W(w,m,f){return m&&V(w.prototype,m),f&&V(w,f),w}var M;(function(w){w.No="",w.Yes="YES",w.v2="v2"})(M||(M={}));function K(w,m){var f=w.canSkipUntil,p=w.canSkipDateRanges,c=w.endSN,r=m!==void 0?m-c:0;return f&&r<f?p?M.v2:M.Yes:M.No}var j=function(){function w(f,p,c){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=f,this.part=p,this.skip=c}var m=w.prototype;return m.addDirectives=function(p){var c=new self.URL(p);return this.msn!==void 0&&c.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&c.searchParams.set("_HLS_part",this.part.toString()),this.skip&&c.searchParams.set("_HLS_skip",this.skip),c.toString()},w}(),n=function(){function w(m){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=[m.url],this.attrs=m.attrs,this.bitrate=m.bitrate,m.details&&(this.details=m.details),this.id=m.id||0,this.name=m.name,this.width=m.width||0,this.height=m.height||0,this.audioCodec=m.audioCodec,this.videoCodec=m.videoCodec,this.unknownCodecs=m.unknownCodecs,this.codecSet=[m.videoCodec,m.audioCodec].filter(function(f){return f}).join(",").replace(/\.[^.,]+/g,"")}return W(w,[{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(f){var p=f%this.url.length;this._urlId!==p&&(this.details=void 0,this._urlId=p)}}]),w}()},"./src/types/loader.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"PlaylistContextType",function(){return V}),U.d(G,"PlaylistLevelType",function(){return W});var V;(function(M){M.MANIFEST="manifest",M.LEVEL="level",M.AUDIO_TRACK="audioTrack",M.SUBTITLE_TRACK="subtitleTrack"})(V||(V={}));var W;(function(M){M.MAIN="main",M.AUDIO="audio",M.SUBTITLE="subtitle"})(W||(W={}))},"./src/types/transmuxer.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"ChunkMetadata",function(){return V});var V=function(K,j,n,w,m,f){w===void 0&&(w=0),m===void 0&&(m=-1),f===void 0&&(f=!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=W(),this.buffering={audio:W(),video:W(),audiovideo:W()},this.level=K,this.sn=j,this.id=n,this.size=w,this.part=m,this.partial=f};function W(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"AttrList",function(){return M});var V=/^(\d+)x(\d+)$/,W=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,M=function(){function K(n){typeof n=="string"&&(n=K.parseAttrList(n));for(var w in n)n.hasOwnProperty(w)&&(this[w]=n[w])}var j=K.prototype;return j.decimalInteger=function(w){var m=parseInt(this[w],10);return m>Number.MAX_SAFE_INTEGER?Infinity:m},j.hexadecimalInteger=function(w){if(this[w]){var m=(this[w]||"0x").slice(2);m=(m.length&1?"0":"")+m;for(var f=new Uint8Array(m.length/2),p=0;p<m.length/2;p++)f[p]=parseInt(m.slice(p*2,p*2+2),16);return f}else return null},j.hexadecimalIntegerAsNumber=function(w){var m=parseInt(this[w],16);return m>Number.MAX_SAFE_INTEGER?Infinity:m},j.decimalFloatingPoint=function(w){return parseFloat(this[w])},j.optionalFloat=function(w,m){var f=this[w];return f?parseFloat(f):m},j.enumeratedString=function(w){return this[w]},j.bool=function(w){return this[w]==="YES"},j.decimalResolution=function(w){var m=V.exec(this[w]);return m===null?void 0:{width:parseInt(m[1],10),height:parseInt(m[2],10)}},K.parseAttrList=function(w){var m,f={},p='"';for(W.lastIndex=0;(m=W.exec(w))!==null;){var c=m[2];c.indexOf(p)===0&&c.lastIndexOf(p)===c.length-1&&(c=c.slice(1,-1)),f[m[1]]=c}return f},K}()},"./src/utils/binary-search.ts":function(Z,G,U){"use strict";U.r(G);var V={search:function(M,K){for(var j=0,n=M.length-1,w=null,m=null;j<=n;){w=(j+n)/2|0,m=M[w];var f=K(m);if(f>0)j=w+1;else if(f<0)n=w-1;else return m}return null}};G.default=V},"./src/utils/buffer-helper.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"BufferHelper",function(){return M});var V=U("./src/utils/logger.ts"),W={length:0,start:function(){return 0},end:function(){return 0}},M=function(){function K(){}return K.isBuffered=function(n,w){try{if(n){for(var m=K.getBuffered(n),f=0;f<m.length;f++)if(w>=m.start(f)&&w<=m.end(f))return!0}}catch(p){}return!1},K.bufferInfo=function(n,w,m){try{if(n){var f=K.getBuffered(n),p=[],c;for(c=0;c<f.length;c++)p.push({start:f.start(c),end:f.end(c)});return this.bufferedInfo(p,w,m)}}catch(r){}return{len:0,start:w,end:w,nextStart:void 0}},K.bufferedInfo=function(n,w,m){w=Math.max(0,w),n.sort(function(S,D){var I=S.start-D.start;return I||D.end-S.end});var f=[];if(m)for(var p=0;p<n.length;p++){var c=f.length;if(c){var r=f[c-1].end;n[p].start-r<m?n[p].end>r&&(f[c-1].end=n[p].end):f.push(n[p])}else f.push(n[p])}else f=n;for(var d=0,u,o=w,s=w,a=0;a<f.length;a++){var R=f[a].start,O=f[a].end;if(w+m>=R&&w<O)o=R,s=O,d=s-w;else if(w+m<R){u=R;break}}return{len:d,start:o||0,end:s||0,nextStart:u}},K.getBuffered=function(n){try{return n.buffered}catch(w){return V.logger.log("failed to get media.buffered",w),W}},K}()},"./src/utils/cea-608-parser.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"Row",function(){return s}),U.d(G,"CaptionScreen",function(){return a});var V=U("./src/utils/logger.ts"),W={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},M=function(b){var v=b;return W.hasOwnProperty(b)&&(v=W[b]),String.fromCharCode(v)},K=15,j=100,n={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},w={17:2,18:4,21:6,22:8,23:10,19:13,20:15},m={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},f={25:2,26:4,29:6,30:8,31:10,27:13,28:15},p=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c;(function(_){_[_.ERROR=0]="ERROR",_[_.TEXT=1]="TEXT",_[_.WARNING=2]="WARNING",_[_.INFO=2]="INFO",_[_.DEBUG=3]="DEBUG",_[_.DATA=3]="DATA"})(c||(c={}));var r=function(){function _(){this.time=null,this.verboseLevel=c.ERROR}var b=_.prototype;return b.log=function(h,C){this.verboseLevel>=h&&V.logger.log(this.time+" ["+h+"] "+C)},_}(),d=function(b){for(var v=[],h=0;h<b.length;h++)v.push(b[h].toString(16));return v},u=function(){function _(v,h,C,x,g){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=v||"white",this.underline=h||!1,this.italics=C||!1,this.background=x||"black",this.flash=g||!1}var b=_.prototype;return b.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},b.setStyles=function(h){for(var C=["foreground","underline","italics","background","flash"],x=0;x<C.length;x++){var g=C[x];h.hasOwnProperty(g)&&(this[g]=h[g])}},b.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},b.equals=function(h){return this.foreground===h.foreground&&this.underline===h.underline&&this.italics===h.italics&&this.background===h.background&&this.flash===h.flash},b.copy=function(h){this.foreground=h.foreground,this.underline=h.underline,this.italics=h.italics,this.background=h.background,this.flash=h.flash},b.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},_}(),o=function(){function _(v,h,C,x,g,P){this.uchar=void 0,this.penState=void 0,this.uchar=v||" ",this.penState=new u(h,C,x,g,P)}var b=_.prototype;return b.reset=function(){this.uchar=" ",this.penState.reset()},b.setChar=function(h,C){this.uchar=h,this.penState.copy(C)},b.setPenState=function(h){this.penState.copy(h)},b.equals=function(h){return this.uchar===h.uchar&&this.penState.equals(h.penState)},b.copy=function(h){this.uchar=h.uchar,this.penState.copy(h.penState)},b.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},_}(),s=function(){function _(v){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var h=0;h<j;h++)this.chars.push(new o);this.logger=v,this.pos=0,this.currPenState=new u}var b=_.prototype;return b.equals=function(h){for(var C=!0,x=0;x<j;x++)if(!this.chars[x].equals(h.chars[x])){C=!1;break}return C},b.copy=function(h){for(var C=0;C<j;C++)this.chars[C].copy(h.chars[C])},b.isEmpty=function(){for(var h=!0,C=0;C<j;C++)if(!this.chars[C].isEmpty()){h=!1;break}return h},b.setCursor=function(h){this.pos!==h&&(this.pos=h),this.pos<0?(this.logger.log(c.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>j&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=j)},b.moveCursor=function(h){var C=this.pos+h;if(h>1)for(var x=this.pos+1;x<C+1;x++)this.chars[x].setPenState(this.currPenState);this.setCursor(C)},b.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},b.insertChar=function(h){h>=144&&this.backSpace();var C=M(h);if(this.pos>=j){this.logger.log(c.ERROR,"Cannot insert "+h.toString(16)+" ("+C+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(C,this.currPenState),this.moveCursor(1)},b.clearFromPos=function(h){var C;for(C=h;C<j;C++)this.chars[C].reset()},b.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},b.clearToEndOfRow=function(){this.clearFromPos(this.pos)},b.getTextString=function(){for(var h=[],C=!0,x=0;x<j;x++){var g=this.chars[x].uchar;g!==" "&&(C=!1),h.push(g)}return C?"":h.join("")},b.setPenStyles=function(h){this.currPenState.setStyles(h);var C=this.chars[this.pos];C.setPenState(this.currPenState)},_}(),a=function(){function _(v){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var h=0;h<K;h++)this.rows.push(new s(v));this.logger=v,this.currRow=K-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var b=_.prototype;return b.reset=function(){for(var h=0;h<K;h++)this.rows[h].clear();this.currRow=K-1},b.equals=function(h){for(var C=!0,x=0;x<K;x++)if(!this.rows[x].equals(h.rows[x])){C=!1;break}return C},b.copy=function(h){for(var C=0;C<K;C++)this.rows[C].copy(h.rows[C])},b.isEmpty=function(){for(var h=!0,C=0;C<K;C++)if(!this.rows[C].isEmpty()){h=!1;break}return h},b.backSpace=function(){var h=this.rows[this.currRow];h.backSpace()},b.clearToEndOfRow=function(){var h=this.rows[this.currRow];h.clearToEndOfRow()},b.insertChar=function(h){var C=this.rows[this.currRow];C.insertChar(h)},b.setPen=function(h){var C=this.rows[this.currRow];C.setPenStyles(h)},b.moveCursor=function(h){var C=this.rows[this.currRow];C.moveCursor(h)},b.setCursor=function(h){this.logger.log(c.INFO,"setCursor: "+h);var C=this.rows[this.currRow];C.setCursor(h)},b.setPAC=function(h){this.logger.log(c.INFO,"pacData = "+JSON.stringify(h));var C=h.row-1;if(this.nrRollUpRows&&C<this.nrRollUpRows-1&&(C=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==C){for(var x=0;x<K;x++)this.rows[x].clear();var g=this.currRow+1-this.nrRollUpRows,P=this.lastOutputScreen;if(P){var k=P.rows[g].cueStartTime,y=this.logger.time;if(k&&y!==null&&k<y)for(var A=0;A<this.nrRollUpRows;A++)this.rows[C-this.nrRollUpRows+A+1].copy(P.rows[g+A])}}this.currRow=C;var F=this.rows[this.currRow];if(h.indent!==null){var T=h.indent,Y=Math.max(T-1,0);F.setCursor(h.indent),h.color=F.chars[Y].penState.foreground}var $={foreground:h.color,underline:h.underline,italics:h.italics,background:"black",flash:!1};this.setPen($)},b.setBkgData=function(h){this.logger.log(c.INFO,"bkgData = "+JSON.stringify(h)),this.backSpace(),this.setPen(h),this.insertChar(32)},b.setRollUpRows=function(h){this.nrRollUpRows=h},b.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(c.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(c.TEXT,this.getDisplayText());var h=this.currRow+1-this.nrRollUpRows,C=this.rows.splice(h,1)[0];C.clear(),this.rows.splice(this.currRow,0,C),this.logger.log(c.INFO,"Rolling up")},b.getDisplayText=function(h){h=h||!1;for(var C=[],x="",g=-1,P=0;P<K;P++){var k=this.rows[P].getTextString();k&&(g=P+1,h?C.push("Row "+g+": '"+k+"'"):C.push(k.trim()))}return C.length>0&&(h?x="["+C.join(" | ")+"]":x=C.join(`
`)),x},b.getTextAndFormat=function(){return this.rows},_}(),R=function(){function _(v,h,C){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=v,this.outputFilter=h,this.mode=null,this.verbose=0,this.displayedMemory=new a(C),this.nonDisplayedMemory=new a(C),this.lastOutputScreen=new a(C),this.currRollUpRow=this.displayedMemory.rows[K-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=C}var b=_.prototype;return b.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[K-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},b.getHandler=function(){return this.outputFilter},b.setHandler=function(h){this.outputFilter=h},b.setPAC=function(h){this.writeScreen.setPAC(h)},b.setBkgData=function(h){this.writeScreen.setBkgData(h)},b.setMode=function(h){if(h===this.mode)return;this.mode=h,this.logger.log(c.INFO,"MODE="+h),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=h},b.insertChars=function(h){for(var C=0;C<h.length;C++)this.writeScreen.insertChar(h[C]);var x=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(c.INFO,x+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(c.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},b.ccRCL=function(){this.logger.log(c.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},b.ccBS=function(){if(this.logger.log(c.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},b.ccAOF=function(){},b.ccAON=function(){},b.ccDER=function(){this.logger.log(c.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},b.ccRU=function(h){this.logger.log(c.INFO,"RU("+h+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(h)},b.ccFON=function(){this.logger.log(c.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},b.ccRDC=function(){this.logger.log(c.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},b.ccTR=function(){this.logger.log(c.INFO,"TR"),this.setMode("MODE_TEXT")},b.ccRTD=function(){this.logger.log(c.INFO,"RTD"),this.setMode("MODE_TEXT")},b.ccEDM=function(){this.logger.log(c.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},b.ccCR=function(){this.logger.log(c.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},b.ccENM=function(){this.logger.log(c.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},b.ccEOC=function(){if(this.logger.log(c.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var h=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=h,this.writeScreen=this.nonDisplayedMemory,this.logger.log(c.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},b.ccTO=function(h){this.logger.log(c.INFO,"TO("+h+") - Tab Offset"),this.writeScreen.moveCursor(h)},b.ccMIDROW=function(h){var C={flash:!1};if(C.underline=h%2===1,C.italics=h>=46,C.italics)C.foreground="white";else{var x=Math.floor(h/2)-16,g=["white","green","blue","cyan","red","yellow","magenta"];C.foreground=g[x]}this.logger.log(c.INFO,"MIDROW: "+JSON.stringify(C)),this.writeScreen.setPen(C)},b.outputDataUpdate=function(h){h===void 0&&(h=!1);var C=this.logger.time;if(C===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=C:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,C,this.lastOutputScreen),h&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:C),this.lastOutputScreen.copy(this.displayedMemory))},b.cueSplitAtTime=function(h){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,h,this.displayedMemory),this.cueStartTime=h))},_}(),O=function(){function _(v,h,C){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var x=new r;this.channels=[null,new R(v,h,x),new R(v+1,C,x)],this.cmdHistory=I(),this.logger=x}var b=_.prototype;return b.getHandler=function(h){return this.channels[h].getHandler()},b.setHandler=function(h,C){this.channels[h].setHandler(C)},b.addData=function(h,C){var x,g,P,k=!1;this.logger.time=h;for(var y=0;y<C.length;y+=2){if(g=C[y]&127,P=C[y+1]&127,g===0&&P===0)continue;if(this.logger.log(c.DATA,"["+d([C[y],C[y+1]])+"] -> ("+d([g,P])+")"),x=this.parseCmd(g,P),x||(x=this.parseMidrow(g,P)),x||(x=this.parsePAC(g,P)),x||(x=this.parseBackgroundAttributes(g,P)),!x&&(k=this.parseChars(g,P),k)){var A=this.currentChannel;if(A&&A>0){var F=this.channels[A];F.insertChars(k)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!x&&!k&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+d([g,P])+" orig: "+d([C[y],C[y+1]]))}},b.parseCmd=function(h,C){var x=this.cmdHistory,g=(h===20||h===28||h===21||h===29)&&C>=32&&C<=47,P=(h===23||h===31)&&C>=33&&C<=35;if(!(g||P))return!1;if(D(h,C,x))return S(null,null,x),this.logger.log(c.DEBUG,"Repeated command ("+d([h,C])+") is dropped"),!0;var k=h===20||h===21||h===23?1:2,y=this.channels[k];return h===20||h===21||h===28||h===29?C===32?y.ccRCL():C===33?y.ccBS():C===34?y.ccAOF():C===35?y.ccAON():C===36?y.ccDER():C===37?y.ccRU(2):C===38?y.ccRU(3):C===39?y.ccRU(4):C===40?y.ccFON():C===41?y.ccRDC():C===42?y.ccTR():C===43?y.ccRTD():C===44?y.ccEDM():C===45?y.ccCR():C===46?y.ccENM():C===47&&y.ccEOC():y.ccTO(C-32),S(h,C,x),this.currentChannel=k,!0},b.parseMidrow=function(h,C){var x=0;if((h===17||h===25)&&C>=32&&C<=47){if(h===17?x=1:x=2,x!==this.currentChannel)return this.logger.log(c.ERROR,"Mismatch channel in midrow parsing"),!1;var g=this.channels[x];return g?(g.ccMIDROW(C),this.logger.log(c.DEBUG,"MIDROW ("+d([h,C])+")"),!0):!1}return!1},b.parsePAC=function(h,C){var x,g=this.cmdHistory,P=(h>=17&&h<=23||h>=25&&h<=31)&&C>=64&&C<=127,k=(h===16||h===24)&&C>=64&&C<=95;if(!(P||k))return!1;if(D(h,C,g))return S(null,null,g),!0;var y=h<=23?1:2;C>=64&&C<=95?x=y===1?n[h]:m[h]:x=y===1?w[h]:f[h];var A=this.channels[y];return A?(A.setPAC(this.interpretPAC(x,C)),S(h,C,g),this.currentChannel=y,!0):!1},b.interpretPAC=function(h,C){var x,g={color:null,italics:!1,indent:null,underline:!1,row:h};return C>95?x=C-96:x=C-64,g.underline=(x&1)===1,x<=13?g.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(x/2)]:x<=15?(g.italics=!0,g.color="white"):g.indent=Math.floor((x-16)/2)*4,g},b.parseChars=function(h,C){var x,g=null,P=null;if(h>=25?(x=2,P=h-8):(x=1,P=h),P>=17&&P<=19){var k;P===17?k=C+80:P===18?k=C+112:k=C+144,this.logger.log(c.INFO,"Special char '"+M(k)+"' in channel "+x),g=[k]}else h>=32&&h<=127&&(g=C===0?[h]:[h,C]);if(g){var y=d(g);this.logger.log(c.DEBUG,"Char codes = "+y.join(",")),S(h,C,this.cmdHistory)}return g},b.parseBackgroundAttributes=function(h,C){var x=(h===16||h===24)&&C>=32&&C<=47,g=(h===23||h===31)&&C>=45&&C<=47;if(!(x||g))return!1;var P,k={};h===16||h===24?(P=Math.floor((C-32)/2),k.background=p[P],C%2===1&&(k.background=k.background+"_semi")):C===45?k.background="transparent":(k.foreground="black",C===47&&(k.underline=!0));var y=h<=23?1:2,A=this.channels[y];return A.setBkgData(k),S(h,C,this.cmdHistory),!0},b.reset=function(){for(var h=0;h<Object.keys(this.channels).length;h++){var C=this.channels[h];C&&C.reset()}this.cmdHistory=I()},b.cueSplitAtTime=function(h){for(var C=0;C<this.channels.length;C++){var x=this.channels[C];x&&x.cueSplitAtTime(h)}},_}();function S(_,b,v){v.a=_,v.b=b}function D(_,b,v){return v.a===_&&v.b===b}function I(){return{a:null,b:null}}G.default=O},"./src/utils/codecs.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"isCodecType",function(){return W}),U.d(G,"isCodecSupportedInMp4",function(){return M});var V={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 W(K,j){var n=V[j];return!!n&&n[K.slice(0,4)]===!0}function M(K,j){return MediaSource.isTypeSupported((j||"video")+'/mp4;codecs="'+K+'"')}},"./src/utils/cues.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/utils/vttparser.ts"),W=U("./src/utils/webvtt-parser.ts"),M=U("./src/utils/texttrack-utils.ts"),K=/\s/,j={newCue:function(w,m,f,p){for(var c=[],r,d,u,o,s,a=self.VTTCue||self.TextTrackCue,R=0;R<p.rows.length;R++)if(r=p.rows[R],u=!0,o=0,s="",!r.isEmpty()){for(var O=0;O<r.chars.length;O++)K.test(r.chars[O].uchar)&&u?o++:(s+=r.chars[O].uchar,u=!1);r.cueStartTime=m,m===f&&(f+=1e-4),o>=16?o--:o++;var S=Object(V.fixLineBreaks)(s.trim()),D=Object(W.generateCueId)(m,f,S);(!w||!w.cues||!w.cues.getCueById(D))&&(d=new a(m,f,S),d.id=D,d.line=R+1,d.align="left",d.position=10+Math.min(80,Math.floor(o*8/32)*10),c.push(d))}return w&&c.length&&(c.sort(function(I,_){return I.line==="auto"||_.line==="auto"?0:I.line>8&&_.line>8?_.line-I.line:I.line-_.line}),c.forEach(function(I){return Object(M.addCueToTrack)(w,I)})),c}};G.default=j},"./src/utils/discontinuities.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"findFirstFragWithCC",function(){return K}),U.d(G,"shouldAlignOnDiscontinuities",function(){return j}),U.d(G,"findDiscontinuousReferenceFrag",function(){return n}),U.d(G,"adjustSlidingStart",function(){return m}),U.d(G,"alignStream",function(){return f}),U.d(G,"alignPDT",function(){return c}),U.d(G,"alignFragmentByPDTDelta",function(){return r}),U.d(G,"alignMediaPlaylistByPDT",function(){return d});var V=U("./src/polyfills/number.ts"),W=U("./src/utils/logger.ts"),M=U("./src/controller/level-helper.ts");function K(u,o){for(var s=null,a=0,R=u.length;a<R;a++){var O=u[a];if(O&&O.cc===o){s=O;break}}return s}function j(u,o,s){return!!(o.details&&(s.endCC>s.startCC||u&&u.cc<s.startCC))}function n(u,o){var s=u.fragments,a=o.fragments;if(!a.length||!s.length){W.logger.log("No fragments to align");return}var R=K(s,a[0].cc);if(!R||R&&!R.startPTS){W.logger.log("No frag in previous level to align on");return}return R}function w(u,o){if(u){var s=u.start+o;u.start=u.startPTS=s,u.endPTS=s+u.duration}}function m(u,o){for(var s=o.fragments,a=0,R=s.length;a<R;a++)w(s[a],u);o.fragmentHint&&w(o.fragmentHint,u),o.alignedSliding=!0}function f(u,o,s){if(!o)return;p(u,s,o),!s.alignedSliding&&o.details&&c(s,o.details),!s.alignedSliding&&o.details&&!s.skippedSegments&&Object(M.adjustSliding)(o.details,s)}function p(u,o,s){if(j(u,s,o)){var a=n(s.details,o);a&&Object(V.isFiniteNumber)(a.start)&&(W.logger.log("Adjusting PTS using last level due to CC increase within current level "+o.url),m(a.start,o))}}function c(u,o){if(!o.fragments.length||!u.hasProgramDateTime||!o.hasProgramDateTime)return;var s=o.fragments[0].programDateTime,a=u.fragments[0].programDateTime,R=(a-s)/1e3+o.fragments[0].start;R&&Object(V.isFiniteNumber)(R)&&(W.logger.log("Adjusting PTS using programDateTime delta "+(a-s)+"ms, sliding:"+R.toFixed(3)+" "+u.url+" "),m(R,u))}function r(u,o){var s=u.programDateTime;if(!s)return;var a=(s-o)/1e3;u.start=u.startPTS=a,u.endPTS=a+u.duration}function d(u,o){if(!o.fragments.length||!u.hasProgramDateTime||!o.hasProgramDateTime)return;var s=o.fragments[0].programDateTime,a=o.fragments[0].start,R=s-a*1e3;u.fragments.forEach(function(O){r(O,R)}),u.fragmentHint&&r(u.fragmentHint,R),u.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/utils/ewma.ts"),W=function(){function M(j,n,w){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=w,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new V.default(j),this.fast_=new V.default(n)}var K=M.prototype;return K.update=function(n,w){var m=this.slow_,f=this.fast_;this.slow_.halfLife!==n&&(this.slow_=new V.default(n,m.getEstimate(),m.getTotalWeight())),this.fast_.halfLife!==w&&(this.fast_=new V.default(w,f.getEstimate(),f.getTotalWeight()))},K.sample=function(n,w){n=Math.max(n,this.minDelayMs_);var m=8*w,f=n/1e3,p=m/f;this.fast_.sample(f,p),this.slow_.sample(f,p)},K.canEstimate=function(){var n=this.fast_;return n&&n.getTotalWeight()>=this.minWeight_},K.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},K.destroy=function(){},M}();G.default=W},"./src/utils/ewma.ts":function(Z,G,U){"use strict";U.r(G);var V=function(){function W(K,j,n){j===void 0&&(j=0),n===void 0&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=K,this.alpha_=K?Math.exp(Math.log(.5)/K):0,this.estimate_=j,this.totalWeight_=n}var M=W.prototype;return M.sample=function(j,n){var w=Math.pow(this.alpha_,j);this.estimate_=n*(1-w)+w*this.estimate_,this.totalWeight_+=j},M.getTotalWeight=function(){return this.totalWeight_},M.getEstimate=function(){if(this.alpha_){var j=1-Math.pow(this.alpha_,this.totalWeight_);if(j)return this.estimate_/j}return this.estimate_},W}();G.default=V},"./src/utils/fetch-loader.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"fetchSupported",function(){return r});var V=U("./src/polyfills/number.ts"),W=U("./src/loader/load-stats.ts"),M=U("./src/demux/chunk-cache.ts");function K(a,R){a.prototype=Object.create(R.prototype),a.prototype.constructor=a,f(a,R)}function j(a){var R=typeof Map=="function"?new Map:void 0;return j=function(S){if(S===null||!m(S))return S;if(typeof S!="function")throw new TypeError("Super expression must either be null or a function");if(typeof R!="undefined"){if(R.has(S))return R.get(S);R.set(S,D)}function D(){return n(S,arguments,p(this).constructor)}return D.prototype=Object.create(S.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),f(D,S)},j(a)}function n(a,R,O){return w()?n=Reflect.construct:n=function(D,I,_){var b=[null];b.push.apply(b,I);var v=Function.bind.apply(D,b),h=new v;return _&&f(h,_.prototype),h},n.apply(null,arguments)}function w(){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 m(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function f(a,R){return f=Object.setPrototypeOf||function(S,D){return S.__proto__=D,S},f(a,R)}function p(a){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},p(a)}function c(){return c=Object.assign||function(a){for(var R=1;R<arguments.length;R++){var O=arguments[R];for(var S in O)Object.prototype.hasOwnProperty.call(O,S)&&(a[S]=O[S])}return a},c.apply(this,arguments)}function r(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}var d=function(){function a(O){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=O.fetchSetup||o,this.controller=new self.AbortController,this.stats=new W.LoadStats}var R=a.prototype;return R.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},R.abortInternal=function(){var S=this.response;(!S||!S.ok)&&(this.stats.aborted=!0,this.controller.abort())},R.abort=function(){var S;this.abortInternal(),(S=this.callbacks)!==null&&S!==void 0&&S.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},R.load=function(S,D,I){var _=this,b=this.stats;if(b.loading.start)throw new Error("Loader can only be used once.");b.loading.start=self.performance.now();var v=u(S,this.controller.signal),h=I.onProgress,C=S.responseType==="arraybuffer",x=C?"byteLength":"length";this.context=S,this.config=D,this.callbacks=I,this.request=this.fetchSetup(S,v),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){_.abortInternal(),I.onTimeout(b,S,_.response)},D.timeout),self.fetch(this.request).then(function(g){if(_.response=_.loader=g,!g.ok){var P=g.status,k=g.statusText;throw new s(k||"fetch, bad network response",P,g)}return b.loading.first=Math.max(self.performance.now(),b.loading.start),b.total=parseInt(g.headers.get("Content-Length")||"0"),h&&Object(V.isFiniteNumber)(D.highWaterMark)?_.loadProgressively(g,b,S,D.highWaterMark,h):C?g.arrayBuffer():g.text()}).then(function(g){var P=_.response;self.clearTimeout(_.requestTimeout),b.loading.end=Math.max(self.performance.now(),b.loading.first),b.loaded=b.total=g[x];var k={url:P.url,data:g};h&&!Object(V.isFiniteNumber)(D.highWaterMark)&&h(b,S,g,P),I.onSuccess(k,b,S,P)}).catch(function(g){if(self.clearTimeout(_.requestTimeout),b.aborted)return;var P=g.code||0;I.onError({code:P,text:g.message},S,g.details)})},R.getCacheAge=function(){var S=null;if(this.response){var D=this.response.headers.get("age");S=D?parseFloat(D):null}return S},R.loadProgressively=function(S,D,I,_,b){_===void 0&&(_=0);var v=new M.default,h=S.body.getReader(),C=function x(){return h.read().then(function(g){if(g.done)return v.dataLength&&b(D,I,v.flush(),S),Promise.resolve(new ArrayBuffer(0));var P=g.value,k=P.length;return D.loaded+=k,k<_||v.dataLength?(v.push(P),v.dataLength>=_&&b(D,I,v.flush(),S)):b(D,I,P,S),x()}).catch(function(){return Promise.reject()})};return C()},a}();function u(a,R){var O={method:"GET",mode:"cors",credentials:"same-origin",signal:R,headers:new self.Headers(c({},a.headers))};return a.rangeEnd&&O.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),O}function o(a,R){return new self.Request(a.url,R)}var s=function(a){K(R,a);function R(O,S,D){var I;return I=a.call(this,O)||this,I.code=void 0,I.details=void 0,I.code=S,I.details=D,I}return R}(j(Error));G.default=d},"./src/utils/imsc1-ttml-parser.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"IMSC1_CODEC",function(){return m}),U.d(G,"parseIMSC1",function(){return r});var V=U("./src/utils/mp4-tools.ts"),W=U("./src/utils/vttparser.ts"),M=U("./src/utils/vttcue.ts"),K=U("./src/demux/id3.ts"),j=U("./src/utils/timescale-conversion.ts"),n=U("./src/utils/webvtt-parser.ts");function w(){return w=Object.assign||function(_){for(var b=1;b<arguments.length;b++){var v=arguments[b];for(var h in v)Object.prototype.hasOwnProperty.call(v,h)&&(_[h]=v[h])}return _},w.apply(this,arguments)}var m="stpp.ttml.im1t",f=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,p=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,c={left:"start",center:"center",right:"end",start:"start",end:"end"};function r(_,b,v,h,C){var x=Object(V.findBox)(new Uint8Array(_),["mdat"]);if(x.length===0){C(new Error("Could not parse IMSC1 mdat"));return}var g=x[0],P=Object(K.utf8ArrayToStr)(new Uint8Array(_,g.start,g.end-g.start)),k=Object(j.toTimescaleFromScale)(b,1,v);try{h(d(P,k))}catch(y){C(y)}}function d(_,b){var v=new DOMParser,h=v.parseFromString(_,"text/xml"),C=h.getElementsByTagName("tt")[0];if(!C)throw new Error("Invalid ttml");var x={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},g=Object.keys(x).reduce(function(F,T){return F[T]=C.getAttribute("ttp:"+T)||x[T],F},{}),P=C.getAttribute("xml:space")!=="preserve",k=o(u(C,"styling","style")),y=o(u(C,"layout","region")),A=u(C,"body","[begin]");return[].map.call(A,function(F){var T=s(F,P);if(!T||!F.hasAttribute("begin"))return null;var Y=S(F.getAttribute("begin"),g),$=S(F.getAttribute("dur"),g),le=S(F.getAttribute("end"),g);if(Y===null)throw O(F);if(le===null){if($===null)throw O(F);le=Y+$}var de=new M.default(Y-b,le-b,T);de.id=Object(n.generateCueId)(de.startTime,de.endTime,de.text);var Pe=y[F.getAttribute("region")],Se=k[F.getAttribute("style")];de.position=10,de.size=80;var we=a(Pe,Se),Fe=we.textAlign;if(Fe){var Me=c[Fe];Me&&(de.lineAlign=Me),de.align=Fe}return w(de,we),de}).filter(function(F){return F!==null})}function u(_,b,v){var h=_.getElementsByTagName(b)[0];return h?[].slice.call(h.querySelectorAll(v)):[]}function o(_){return _.reduce(function(b,v){var h=v.getAttribute("xml:id");return h&&(b[h]=v),b},{})}function s(_,b){return[].slice.call(_.childNodes).reduce(function(v,h,C){var x;return h.nodeName==="br"&&C?v+`
`:(x=h.childNodes)!==null&&x!==void 0&&x.length?s(h,b):b?v+h.textContent.trim().replace(/\s+/g," "):v+h.textContent},"")}function a(_,b){var v="http://www.w3.org/ns/ttml#styling",h=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return h.reduce(function(C,x){var g=R(b,v,x)||R(_,v,x);return g&&(C[x]=g),C},{})}function R(_,b,v){return _.hasAttributeNS(b,v)?_.getAttributeNS(b,v):null}function O(_){return new Error("Could not parse ttml timestamp "+_)}function S(_,b){if(!_)return null;var v=Object(W.parseTimeStamp)(_);return v===null&&(f.test(_)?v=D(_,b):p.test(_)&&(v=I(_,b))),v}function D(_,b){var v=f.exec(_),h=(v[4]|0)+(v[5]|0)/b.subFrameRate;return(v[1]|0)*3600+(v[2]|0)*60+(v[3]|0)+h/b.frameRate}function I(_,b){var v=p.exec(_),h=Number(v[1]),C=v[2];switch(C){case"h":return h*3600;case"m":return h*60;case"ms":return h*1e3;case"f":return h/b.frameRate;case"t":return h/b.tickRate}return h}},"./src/utils/logger.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"enableLogs",function(){return n}),U.d(G,"logger",function(){return w});var V=function(){},W={trace:V,debug:V,log:V,warn:V,info:V,error:V},M=W;function K(m){var f=self.console[m];return f?f.bind(self.console,"["+m+"] >"):V}function j(m){for(var f=arguments.length,p=new Array(f>1?f-1:0),c=1;c<f;c++)p[c-1]=arguments[c];p.forEach(function(r){M[r]=m[r]?m[r].bind(m):K(r)})}function n(m){if(self.console&&m===!0||typeof m=="object"){j(m,"debug","log","info","warn","error");try{M.log()}catch(f){M=W}}else M=W}var w=M},"./src/utils/mediakeys-helper.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"KeySystems",function(){return V}),U.d(G,"requestMediaKeySystemAccess",function(){return W});var V;(function(M){M.WIDEVINE="com.widevine.alpha",M.PLAYREADY="com.microsoft.playready"})(V||(V={}));var W=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"getMediaSource",function(){return V});function V(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"bin2str",function(){return j}),U.d(G,"readUint16",function(){return n}),U.d(G,"readUint32",function(){return w}),U.d(G,"writeUint32",function(){return m}),U.d(G,"findBox",function(){return f}),U.d(G,"parseSegmentIndex",function(){return p}),U.d(G,"parseInitSegment",function(){return c}),U.d(G,"getStartDTS",function(){return r}),U.d(G,"getDuration",function(){return d}),U.d(G,"computeRawDurationFromSamples",function(){return u}),U.d(G,"offsetStartDTS",function(){return o}),U.d(G,"segmentValidRange",function(){return s}),U.d(G,"appendUint8Array",function(){return a});var V=U("./src/utils/typed-array.ts"),W=U("./src/loader/fragment.ts"),M=Math.pow(2,32)-1,K=[].push;function j(R){return String.fromCharCode.apply(null,R)}function n(R,O){"data"in R&&(O+=R.start,R=R.data);var S=R[O]<<8|R[O+1];return S<0?65536+S:S}function w(R,O){"data"in R&&(O+=R.start,R=R.data);var S=R[O]<<24|R[O+1]<<16|R[O+2]<<8|R[O+3];return S<0?4294967296+S:S}function m(R,O,S){"data"in R&&(O+=R.start,R=R.data),R[O]=S>>24,R[O+1]=S>>16&255,R[O+2]=S>>8&255,R[O+3]=S&255}function f(R,O){var S=[];if(!O.length)return S;var D,I,_;"data"in R?(D=R.data,I=R.start,_=R.end):(D=R,I=0,_=D.byteLength);for(var b=I;b<_;){var v=w(D,b),h=j(D.subarray(b+4,b+8)),C=v>1?b+v:_;if(h===O[0])if(O.length===1)S.push({data:D,start:b+8,end:C});else{var x=f({data:D,start:b+8,end:C},O.slice(1));x.length&&K.apply(S,x)}b=C}return S}function p(R){var O=f(R,["moov"]),S=O[0],D=S?S.end:null,I=f(R,["sidx"]);if(!I||!I[0])return null;var _=[],b=I[0],v=b.data[0],h=v===0?8:16,C=w(b,h);h+=4;var x=0,g=0;v===0?h+=8:h+=16,h+=2;var P=b.end+g,k=n(b,h);h+=2;for(var y=0;y<k;y++){var A=h,F=w(b,A);A+=4;var T=F&2147483647,Y=(F&2147483648)>>>31;if(Y===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var $=w(b,A);A+=4,_.push({referenceSize:T,subsegmentDuration:$,info:{duration:$/C,start:P,end:P+T-1}}),P+=T,A+=4,h=A}return{earliestPresentationTime:x,timescale:C,version:v,referencesCount:k,references:_,moovEndOffset:D}}function c(R){for(var O=[],S=f(R,["moov","trak"]),D=0;D<S.length;D++){var I=S[D],_=f(I,["tkhd"])[0];if(_){var b=_.data[_.start],v=b===0?12:20,h=w(_,v),C=f(I,["mdia","mdhd"])[0];if(C){b=C.data[C.start],v=b===0?12:20;var x=w(C,v),g=f(I,["mdia","hdlr"])[0];if(g){var P=j(g.data.subarray(g.start+8,g.start+12)),k={soun:W.ElementaryStreamTypes.AUDIO,vide:W.ElementaryStreamTypes.VIDEO}[P];if(k){var y=f(I,["mdia","minf","stbl","stsd"])[0],A=void 0;y&&(A=j(y.data.subarray(y.start+12,y.start+16))),O[h]={timescale:x,type:k},O[k]={timescale:x,id:h,codec:A}}}}}}var F=f(R,["moov","mvex","trex"]);return F.forEach(function(T){var Y=w(T,4),$=O[Y];$&&($.default={duration:w(T,12),flags:w(T,20)})}),O}function r(R,O){return f(O,["moof","traf"]).reduce(function(S,D){var I=f(D,["tfdt"])[0],_=I.data[I.start],b=f(D,["tfhd"]).reduce(function(v,h){var C=w(h,4),x=R[C];if(x){var g=w(I,4);_===1&&(g*=Math.pow(2,32),g+=w(I,8));var P=x.timescale||9e4,k=g/P;if(isFinite(k)&&(v===null||k<v))return k}return v},null);return b!==null&&isFinite(b)&&(S===null||b<S)?b:S},null)||0}function d(R,O){for(var S=0,D=0,I=0,_=f(R,["moof","traf"]),b=0;b<_.length;b++){var v=_[b],h=f(v,["tfhd"])[0],C=w(h,4),x=O[C];if(!x)continue;var g=x.default,P=w(h,0)|(g==null?void 0:g.flags),k=g==null?void 0:g.duration;P&8&&(P&2?k=w(h,12):k=w(h,8));for(var y=x.timescale||9e4,A=f(v,["trun"]),F=0;F<A.length;F++){if(k){var T=w(A[F],4);S=k*T}else S=u(A[F]);x.type===W.ElementaryStreamTypes.VIDEO?D+=S/y:x.type===W.ElementaryStreamTypes.AUDIO&&(I+=S/y)}}if(D===0&&I===0){var Y=p(R);if(Y!=null&&Y.references)return Y.references.reduce(function($,le){return $+le.info.duration||0},0)}return D||I}function u(R){var O=w(R,0),S=8;O&1&&(S+=4),O&4&&(S+=4);for(var D=0,I=w(R,4),_=0;_<I;_++){if(O&256){var b=w(R,S);D+=b,S+=4}O&512&&(S+=4),O&1024&&(S+=4),O&2048&&(S+=4)}return D}function o(R,O,S){f(O,["moof","traf"]).forEach(function(D){f(D,["tfhd"]).forEach(function(I){var _=w(I,4),b=R[_];if(!b)return;var v=b.timescale||9e4;f(D,["tfdt"]).forEach(function(h){var C=h.data[h.start],x=w(h,4);if(C===0)m(h,4,x-S*v);else{x*=Math.pow(2,32),x+=w(h,8),x-=S*v,x=Math.max(x,0);var g=Math.floor(x/(M+1)),P=Math.floor(x%(M+1));m(h,4,g),m(h,8,P)}})})})}function s(R){var O={valid:null,remainder:null},S=f(R,["moof"]);if(S){if(S.length<2)return O.remainder=R,O}else return O;var D=S[S.length-1];return O.valid=Object(V.sliceUint8)(R,0,D.start-8),O.remainder=Object(V.sliceUint8)(R,D.start-8),O}function a(R,O){var S=new Uint8Array(R.length+O.length);return S.set(R),S.set(O,R.length),S}},"./src/utils/output-filter.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"default",function(){return V});var V=function(){function W(K,j){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=K,this.trackName=j}var M=W.prototype;return M.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},M.newCue=function(j,n,w){(this.startTime===null||this.startTime>j)&&(this.startTime=j),this.endTime=n,this.screen=w,this.timelineController.createCaptionsTrack(this.trackName)},M.reset=function(){this.cueRanges=[]},W}()},"./src/utils/texttrack-utils.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"sendAddTrackEvent",function(){return W}),U.d(G,"addCueToTrack",function(){return M}),U.d(G,"clearCurrentCues",function(){return K}),U.d(G,"removeCuesInRange",function(){return j}),U.d(G,"getCuesInRange",function(){return w});var V=U("./src/utils/logger.ts");function W(m,f){var p;try{p=new Event("addtrack")}catch(c){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=m,f.dispatchEvent(p)}function M(m,f){var p=m.mode;if(p==="disabled"&&(m.mode="hidden"),m.cues&&!m.cues.getCueById(f.id))try{if(m.addCue(f),!m.cues.getCueById(f.id))throw new Error("addCue is failed for: "+f)}catch(r){V.logger.debug("[texttrack-utils]: "+r);var c=new self.TextTrackCue(f.startTime,f.endTime,f.text);c.id=f.id,m.addCue(c)}p==="disabled"&&(m.mode=p)}function K(m){var f=m.mode;if(f==="disabled"&&(m.mode="hidden"),m.cues)for(var p=m.cues.length;p--;)m.removeCue(m.cues[p]);f==="disabled"&&(m.mode=f)}function j(m,f,p){var c=m.mode;if(c==="disabled"&&(m.mode="hidden"),m.cues&&m.cues.length>0)for(var r=w(m.cues,f,p),d=0;d<r.length;d++)m.removeCue(r[d]);c==="disabled"&&(m.mode=c)}function n(m,f){if(f<m[0].startTime)return 0;var p=m.length-1;if(f>m[p].endTime)return-1;for(var c=0,r=p;c<=r;){var d=Math.floor((r+c)/2);if(f<m[d].startTime)r=d-1;else if(f>m[d].startTime&&c<p)c=d+1;else return d}return m[c].startTime-f<f-m[r].startTime?c:r}function w(m,f,p){var c=[],r=n(m,f);if(r>-1)for(var d=r,u=m.length;d<u;d++){var o=m[d];if(o.startTime>=f&&o.endTime<=p)c.push(o);else if(o.startTime>p)return c}return c}},"./src/utils/time-ranges.ts":function(Z,G,U){"use strict";U.r(G);var V={toString:function(M){for(var K="",j=M.length,n=0;n<j;n++)K+="["+M.start(n).toFixed(3)+","+M.end(n).toFixed(3)+"]";return K}};G.default=V},"./src/utils/timescale-conversion.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"toTimescaleFromBase",function(){return W}),U.d(G,"toTimescaleFromScale",function(){return M}),U.d(G,"toMsFromMpegTsClock",function(){return K}),U.d(G,"toMpegTsClockFromTimescale",function(){return j});var V=9e4;function W(n,w,m,f){m===void 0&&(m=1),f===void 0&&(f=!1);var p=n*w*m;return f?Math.round(p):p}function M(n,w,m,f){return m===void 0&&(m=1),f===void 0&&(f=!1),W(n,w,1/m,f)}function K(n,w){return w===void 0&&(w=!1),W(n,1e3,1/V,w)}function j(n,w){return w===void 0&&(w=1),W(n,V,1/w)}},"./src/utils/typed-array.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"sliceUint8",function(){return V});function V(W,M,K){return Uint8Array.prototype.slice?W.slice(M,K):new Uint8Array(Array.prototype.slice.call(W,M,K))}},"./src/utils/vttcue.ts":function(Z,G,U){"use strict";U.r(G),G.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var V=["","lr","rl"],W=["start","middle","end","left","right"];function M(m,f){if(typeof f!="string")return!1;if(!Array.isArray(m))return!1;var p=f.toLowerCase();return~m.indexOf(p)?p:!1}function K(m){return M(V,m)}function j(m){return M(W,m)}function n(m){for(var f=arguments.length,p=new Array(f>1?f-1:0),c=1;c<f;c++)p[c-1]=arguments[c];for(var r=1;r<arguments.length;r++){var d=arguments[r];for(var u in d)m[u]=d[u]}return m}function w(m,f,p){var c=this,r={enumerable:!0};c.hasBeenReset=!1;var d="",u=!1,o=m,s=f,a=p,R=null,O="",S=!0,D="auto",I="start",_=50,b="middle",v=50,h="middle";Object.defineProperty(c,"id",n({},r,{get:function(){return d},set:function(x){d=""+x}})),Object.defineProperty(c,"pauseOnExit",n({},r,{get:function(){return u},set:function(x){u=!!x}})),Object.defineProperty(c,"startTime",n({},r,{get:function(){return o},set:function(x){if(typeof x!="number")throw new TypeError("Start time must be set to a number.");o=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",n({},r,{get:function(){return s},set:function(x){if(typeof x!="number")throw new TypeError("End time must be set to a number.");s=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",n({},r,{get:function(){return a},set:function(x){a=""+x,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",n({},r,{get:function(){return R},set:function(x){R=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",n({},r,{get:function(){return O},set:function(x){var g=K(x);if(g===!1)throw new SyntaxError("An invalid or illegal string was specified.");O=g,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",n({},r,{get:function(){return S},set:function(x){S=!!x,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",n({},r,{get:function(){return D},set:function(x){if(typeof x!="number"&&x!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");D=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",n({},r,{get:function(){return I},set:function(x){var g=j(x);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");I=g,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",n({},r,{get:function(){return _},set:function(x){if(x<0||x>100)throw new Error("Position must be between 0 and 100.");_=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",n({},r,{get:function(){return b},set:function(x){var g=j(x);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");b=g,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",n({},r,{get:function(){return v},set:function(x){if(x<0||x>100)throw new Error("Size must be between 0 and 100.");v=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",n({},r,{get:function(){return h},set:function(x){var g=j(x);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");h=g,this.hasBeenReset=!0}})),c.displayState=void 0}return w.prototype.getCueAsHTML=function(){var m=self.WebVTT;return m.convertCueToDOMTree(self,this.text)},w}()},"./src/utils/vttparser.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"parseTimeStamp",function(){return M}),U.d(G,"fixLineBreaks",function(){return f}),U.d(G,"VTTParser",function(){return p});var V=U("./src/utils/vttcue.ts"),W=function(){function c(){}var r=c.prototype;return r.decode=function(u,o){if(!u)return"";if(typeof u!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(u))},c}();function M(c){function r(u,o,s,a){return(u|0)*3600+(o|0)*60+(s|0)+parseFloat(a||0)}var d=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return d?parseFloat(d[2])>59?r(d[2],d[3],0,d[4]):r(d[1],d[2],d[3],d[4]):null}var K=function(){function c(){this.values=Object.create(null)}var r=c.prototype;return r.set=function(u,o){!this.get(u)&&o!==""&&(this.values[u]=o)},r.get=function(u,o,s){return s?this.has(u)?this.values[u]:o[s]:this.has(u)?this.values[u]:o},r.has=function(u){return u in this.values},r.alt=function(u,o,s){for(var a=0;a<s.length;++a)if(o===s[a]){this.set(u,o);break}},r.integer=function(u,o){/^-?\d+$/.test(o)&&this.set(u,parseInt(o,10))},r.percent=function(u,o){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(o)){var s=parseFloat(o);if(s>=0&&s<=100)return this.set(u,s),!0}return!1},c}();function j(c,r,d,u){var o=u?c.split(u):[c];for(var s in o){if(typeof o[s]!="string")continue;var a=o[s].split(d);if(a.length!==2)continue;var R=a[0],O=a[1];r(R,O)}}var n=new V.default(0,0,""),w=n.align==="middle"?"middle":"center";function m(c,r,d){var u=c;function o(){var R=M(c);if(R===null)throw new Error("Malformed timestamp: "+u);return c=c.replace(/^[^\sa-zA-Z-]+/,""),R}function s(R,O){var S=new K;j(R,function(_,b){var v;switch(_){case"region":for(var h=d.length-1;h>=0;h--)if(d[h].id===b){S.set(_,d[h].region);break}break;case"vertical":S.alt(_,b,["rl","lr"]);break;case"line":v=b.split(","),S.integer(_,v[0]),S.percent(_,v[0])&&S.set("snapToLines",!1),S.alt(_,v[0],["auto"]),v.length===2&&S.alt("lineAlign",v[1],["start",w,"end"]);break;case"position":v=b.split(","),S.percent(_,v[0]),v.length===2&&S.alt("positionAlign",v[1],["start",w,"end","line-left","line-right","auto"]);break;case"size":S.percent(_,b);break;case"align":S.alt(_,b,["start",w,"end","left","right"]);break}},/:/,/\s/),O.region=S.get("region",null),O.vertical=S.get("vertical","");var D=S.get("line","auto");D==="auto"&&n.line===-1&&(D=-1),O.line=D,O.lineAlign=S.get("lineAlign","start"),O.snapToLines=S.get("snapToLines",!0),O.size=S.get("size",100),O.align=S.get("align",w);var I=S.get("position","auto");I==="auto"&&n.position===50&&(I=O.align==="start"||O.align==="left"?0:O.align==="end"||O.align==="right"?100:50),O.position=I}function a(){c=c.replace(/^\s+/,"")}if(a(),r.startTime=o(),a(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+u);c=c.substr(3),a(),r.endTime=o(),a(),s(c,r)}function f(c){return c.replace(/<br(?: \/)?>/gi,`
`)}var p=function(){function c(){this.state="INITIAL",this.buffer="",this.decoder=new W,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var r=c.prototype;return r.parse=function(u){var o=this;u&&(o.buffer+=o.decoder.decode(u,{stream:!0}));function s(){var I=o.buffer,_=0;for(I=f(I);_<I.length&&I[_]!=="\r"&&I[_]!==`
`;)++_;var b=I.substr(0,_);return I[_]==="\r"&&++_,I[_]===`
`&&++_,o.buffer=I.substr(_),b}function a(I){j(I,function(_,b){},/:/)}try{var R="";if(o.state==="INITIAL"){if(!/\r\n|\n/.test(o.buffer))return this;R=s();var O=R.match(/^()?WEBVTT([ \t].*)?$/);if(!O||!O[0])throw new Error("Malformed WebVTT signature.");o.state="HEADER"}for(var S=!1;o.buffer;){if(!/\r\n|\n/.test(o.buffer))return this;S?S=!1:R=s();switch(o.state){case"HEADER":/:/.test(R)?a(R):R||(o.state="ID");continue;case"NOTE":R||(o.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(R)){o.state="NOTE";break}if(!R)continue;if(o.cue=new V.default(0,0,""),o.state="CUE",R.indexOf("-->")===-1){o.cue.id=R;continue}case"CUE":if(!o.cue){o.state="BADCUE";continue}try{m(R,o.cue,o.regionList)}catch(I){o.cue=null,o.state="BADCUE";continue}o.state="CUETEXT";continue;case"CUETEXT":{var D=R.indexOf("-->")!==-1;if(!R||D&&(S=!0)){o.oncue&&o.cue&&o.oncue(o.cue),o.cue=null,o.state="ID";continue}if(o.cue===null)continue;o.cue.text&&(o.cue.text+=`
`),o.cue.text+=R}continue;case"BADCUE":R||(o.state="ID")}}}catch(I){o.state==="CUETEXT"&&o.cue&&o.oncue&&o.oncue(o.cue),o.cue=null,o.state=o.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},r.flush=function(){var u=this;try{if((u.cue||u.state==="HEADER")&&(u.buffer+=`
`,u.parse()),u.state==="INITIAL"||u.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(o){u.onparsingerror&&u.onparsingerror(o)}return u.onflush&&u.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(Z,G,U){"use strict";U.r(G),U.d(G,"generateCueId",function(){return p}),U.d(G,"parseWebVTT",function(){return r});var V=U("./src/polyfills/number.ts"),W=U("./src/utils/vttparser.ts"),M=U("./src/demux/id3.ts"),K=U("./src/utils/timescale-conversion.ts"),j=U("./src/remux/mp4-remuxer.ts"),n=/\r\n|\n\r|\n|\r/g,w=function(u,o,s){return s===void 0&&(s=0),u.substr(s,o.length)===o},m=function(u){var o=parseInt(u.substr(-3)),s=parseInt(u.substr(-6,2)),a=parseInt(u.substr(-9,2)),R=u.length>9?parseInt(u.substr(0,u.indexOf(":"))):0;if(!Object(V.isFiniteNumber)(o)||!Object(V.isFiniteNumber)(s)||!Object(V.isFiniteNumber)(a)||!Object(V.isFiniteNumber)(R))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+u);return o+=1e3*s,o+=60*1e3*a,o+=60*60*1e3*R,o},f=function(u){for(var o=5381,s=u.length;s;)o=o*33^u.charCodeAt(--s);return(o>>>0).toString()};function p(d,u,o){return f(d.toString())+f(u.toString())+f(o)}var c=function(u,o,s){var a=u[o],R=u[a.prevCC];if(!R||!R.new&&a.new){u.ccOffset=u.presentationOffset=a.start,a.new=!1;return}for(;(O=R)!==null&&O!==void 0&&O.new;){var O;u.ccOffset+=a.start-R.start,a.new=!1,a=R,R=u[a.prevCC]}u.presentationOffset=s};function r(d,u,o,s,a,R,O,S){var D=new W.VTTParser,I=Object(M.utf8ArrayToStr)(new Uint8Array(d)).trim().replace(n,`
`).split(`
`),_=[],b=Object(K.toMpegTsClockFromTimescale)(u,o),v="00:00.000",h=0,C=0,x,g=!0,P=!1;D.oncue=function(k){var y=s[a],A=s.ccOffset,F=(h-b)/9e4;if(y!=null&&y.new&&(C!==void 0?A=s.ccOffset=y.start:c(s,a,F)),F&&(A=F-s.presentationOffset),P){var T=k.endTime-k.startTime,Y=Object(j.normalizePts)((k.startTime+A-C)*9e4,R*9e4)/9e4;k.startTime=Y,k.endTime=Y+T}var $=k.text.trim();k.text=decodeURIComponent(encodeURIComponent($)),k.id||(k.id=p(k.startTime,k.endTime,$)),k.endTime>0&&_.push(k)},D.onparsingerror=function(k){x=k},D.onflush=function(){if(x){S(x);return}O(_)},I.forEach(function(k){if(g)if(w(k,"X-TIMESTAMP-MAP=")){g=!1,P=!0,k.substr(16).split(",").forEach(function(y){w(y,"LOCAL:")?v=y.substr(6):w(y,"MPEGTS:")&&(h=parseInt(y.substr(7)))});try{C=m(v)/1e3}catch(y){P=!1,x=y}return}else k===""&&(g=!1);D.parse(k+`
`)}),D.flush()}},"./src/utils/xhr-loader.ts":function(Z,G,U){"use strict";U.r(G);var V=U("./src/utils/logger.ts"),W=U("./src/loader/load-stats.ts"),M=/^age:\s*[\d.]+\s*$/m,K=function(){function j(w){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=w?w.xhrSetup:null,this.stats=new W.LoadStats,this.retryDelay=0}var n=j.prototype;return n.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},n.abortInternal=function(){var m=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),m&&(m.onreadystatechange=null,m.onprogress=null,m.readyState!==4&&(this.stats.aborted=!0,m.abort()))},n.abort=function(){var m;this.abortInternal(),(m=this.callbacks)!==null&&m!==void 0&&m.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},n.load=function(m,f,p){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=m,this.config=f,this.callbacks=p,this.retryDelay=f.retryDelay,this.loadInternal()},n.loadInternal=function(){var m=this.config,f=this.context;if(!m)return;var p=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var r=this.xhrSetup;try{if(r)try{r(p,f.url)}catch(o){p.open("GET",f.url,!0),r(p,f.url)}p.readyState||p.open("GET",f.url,!0);var d=this.context.headers;if(d)for(var u in d)p.setRequestHeader(u,d[u])}catch(o){this.callbacks.onError({code:p.status,text:o.message},f,p);return}f.rangeEnd&&p.setRequestHeader("Range","bytes="+f.rangeStart+"-"+(f.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=f.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),m.timeout),p.send()},n.readystatechange=function(){var m=this.context,f=this.loader,p=this.stats;if(!m||!f)return;var c=f.readyState,r=this.config;if(p.aborted)return;if(c>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),c===4){f.onreadystatechange=null,f.onprogress=null;var d=f.status;if(d>=200&&d<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var u,o;if(m.responseType==="arraybuffer"?(u=f.response,o=u.byteLength):(u=f.responseText,o=u.length),p.loaded=p.total=o,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(p,m,u,f),!this.callbacks)return;var a={url:f.responseURL,data:u};this.callbacks.onSuccess(a,p,m,f)}else p.retry>=r.maxRetry||d>=400&&d<499?(V.logger.error(d+" while loading "+m.url),this.callbacks.onError({code:d,text:f.statusText},m,f)):(V.logger.warn(d+" while loading "+m.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,r.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout)},n.loadtimeout=function(){V.logger.warn("timeout while loading "+this.context.url);var m=this.callbacks;m&&(this.abortInternal(),m.onTimeout(this.stats,this.context,this.loader))},n.loadprogress=function(m){var f=this.stats;f.loaded=m.loaded,m.lengthComputable&&(f.total=m.total)},n.getCacheAge=function(){var m=null;if(this.loader&&M.test(this.loader.getAllResponseHeaders())){var f=this.loader.getResponseHeader("age");m=f?parseFloat(f):null}return m},j}();G.default=K}}).default})},vHTk:function(We,se,B){We.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(We,se,B){"use strict";B.d(se,"a",function(){return mt});var Z=B("rePB"),G=B("VTBJ"),U=B("KQm4"),V=B("U8pU"),W=B("ODXe"),M=B("q1tI"),K=B("TSYQ"),j=B.n(K),n=B("Gytx"),w=B.n(n),m=B("Kwbf"),f=B("t23M"),p=B("qx4F"),c=B("6eGT"),r=B("IBYe"),d=B("Ff2n"),u=B("c+Xe"),o=B("fyJ8"),s=B("biw7");function a(Ue,Ie,tt,lt,Ke){var Xe=tt[Ue]||{},Ce=tt[Ie]||{},ge,be;Xe.fixed==="left"?ge=lt.left[Ue]:Ce.fixed==="right"&&(be=lt.right[Ie]);var ie=!1,oe=!1,fe=!1,ye=!1,Ae=tt[Ie+1],Ge=tt[Ue-1];if(Ke==="rtl"){if(ge!==void 0){var ot=Ge&&Ge.fixed==="left";ye=!ot}else if(be!==void 0){var wt=Ae&&Ae.fixed==="right";fe=!wt}}else if(ge!==void 0){var Dt=Ae&&Ae.fixed==="left";ie=!Dt}else if(be!==void 0){var At=Ge&&Ge.fixed==="right";oe=!At}return{fixLeft:ge,fixRight:be,lastFixLeft:ie,firstFixRight:oe,lastFixRight:fe,firstFixLeft:ye,isSticky:lt.isSticky}}var R=B("sR1s");function O(Ue){var Ie=Ue.cells,tt=Ue.stickyOffsets,lt=Ue.flattenColumns,Ke=Ue.rowComponent,Xe=Ue.cellComponent,Ce=Ue.onHeaderRow,ge=Ue.index,be=M.useContext(s.a),ie=be.prefixCls,oe=be.direction,fe;Ce&&(fe=Ce(Ie.map(function(Ae){return Ae.column}),ge));var ye=Object(R.a)(Ie.map(function(Ae){return Ae.column}));return M.createElement(Ke,Object.assign({},fe),Ie.map(function(Ae,Ge){var ot=Ae.column,wt=a(Ae.colStart,Ae.colEnd,lt,tt,oe),Dt;return ot&&ot.onHeaderCell&&(Dt=Ae.column.onHeaderCell(ot)),M.createElement(o.a,Object.assign({},Ae,{ellipsis:ot.ellipsis,align:ot.align,component:Xe,prefixCls:ie,key:ye[Ge]},wt,{additionalProps:Dt,rowType:"header"}))}))}O.displayName="HeaderRow";var S=O;function D(Ue){var Ie=[];function tt(Ce,ge){var be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[be]=Ie[be]||[];var ie=ge,oe=Ce.filter(Boolean).map(function(fe){var ye={key:fe.key,className:fe.className||"",children:fe.title,column:fe,colStart:ie},Ae=1,Ge=fe.children;return Ge&&Ge.length>0&&(Ae=tt(Ge,ie,be+1).reduce(function(ot,wt){return ot+wt},0),ye.hasSubColumns=!0),"colSpan"in fe&&(Ae=fe.colSpan),"rowSpan"in fe&&(ye.rowSpan=fe.rowSpan),ye.colSpan=Ae,ye.colEnd=ye.colStart+Ae-1,Ie[be].push(ye),ie+=Ae,Ae});return oe}tt(Ue,0);for(var lt=Ie.length,Ke=function(ge){Ie[ge].forEach(function(be){!("rowSpan"in be)&&!be.hasSubColumns&&(be.rowSpan=lt-ge)})},Xe=0;Xe<lt;Xe+=1)Ke(Xe);return Ie}function I(Ue){var Ie=Ue.stickyOffsets,tt=Ue.columns,lt=Ue.flattenColumns,Ke=Ue.onHeaderRow,Xe=M.useContext(s.a),Ce=Xe.prefixCls,ge=Xe.getComponent,be=M.useMemo(function(){return D(tt)},[tt]),ie=ge(["header","wrapper"],"thead"),oe=ge(["header","row"],"tr"),fe=ge(["header","cell"],"th");return M.createElement(ie,{className:"".concat(Ce,"-thead")},be.map(function(ye,Ae){var Ge=M.createElement(S,{key:Ae,flattenColumns:lt,cells:ye,stickyOffsets:Ie,rowComponent:oe,cellComponent:fe,onHeaderRow:Ke,index:Ae});return Ge}))}var _=I,b=B("hW8S");function v(Ue){for(var Ie=Ue.colWidths,tt=Ue.columns,lt=Ue.columCount,Ke=[],Xe=lt||tt.length,Ce=!1,ge=Xe-1;ge>=0;ge-=1){var be=Ie[ge],ie=tt&&tt[ge],oe=ie&&ie[b.a];(be||oe||Ce)&&(Ke.unshift(M.createElement("col",Object.assign({key:ge,style:{width:be,minWidth:be}},oe))),Ce=!0)}return M.createElement("colgroup",null,Ke)}var h=v;function C(Ue,Ie){return Object(M.useMemo)(function(){for(var tt=[],lt=0;lt<Ie;lt+=1){var Ke=Ue[lt];if(Ke!==void 0)tt[lt]=Ke;else return null}return tt},[Ue.join("_"),Ie])}var x=M.forwardRef(function(Ue,Ie){var tt=Ue.noData,lt=Ue.columns,Ke=Ue.flattenColumns,Xe=Ue.colWidths,Ce=Ue.columCount,ge=Ue.stickyOffsets,be=Ue.direction,ie=Ue.fixHeader,oe=Ue.offsetHeader,fe=Ue.stickyClassName,ye=Ue.onScroll,Ae=Object(d.a)(Ue,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Ge=M.useContext(s.a),ot=Ge.prefixCls,wt=Ge.scrollbarSize,Dt=Ge.isSticky,At=Dt&&!ie?0:wt,vt=M.useRef(null),$e=M.useCallback(function(_t){Object(u.b)(Ie,_t),Object(u.b)(vt,_t)},[]);M.useEffect(function(){var _t;function yt(Be){var Ze=Be.currentTarget,nt=Be.deltaX;nt&&(ye({currentTarget:Ze,scrollLeft:Ze.scrollLeft+nt}),Be.preventDefault())}return(_t=vt.current)===null||_t===void 0||_t.addEventListener("wheel",yt),function(){var Be;(Be=vt.current)===null||Be===void 0||Be.removeEventListener("wheel",yt)}},[]);var et=Ke[Ke.length-1],Ye={fixed:et?et.fixed:null,onHeaderCell:function(){return{className:"".concat(ot,"-cell-scrollbar")}}},ce=Object(M.useMemo)(function(){return At?[].concat(Object(U.a)(lt),[Ye]):lt},[At,lt]),xe=Object(M.useMemo)(function(){return At?[].concat(Object(U.a)(Ke),[Ye]):Ke},[At,Ke]),at=Object(M.useMemo)(function(){var _t=ge.right,yt=ge.left;return Object(G.a)(Object(G.a)({},ge),{},{left:be==="rtl"?[].concat(Object(U.a)(yt.map(function(Be){return Be+At})),[0]):yt,right:be==="rtl"?_t:[].concat(Object(U.a)(_t.map(function(Be){return Be+At})),[0]),isSticky:Dt})},[At,ge,Dt]),Je=C(Xe,Ce);return M.createElement("div",{style:Object(G.a)({overflow:"hidden"},Dt?{top:oe}:{}),ref:$e,className:j()("".concat(ot,"-header"),Object(Z.a)({},fe,!!fe))},M.createElement("table",{style:{tableLayout:"fixed",visibility:tt||Je?null:"hidden"}},M.createElement(h,{colWidths:Je?[].concat(Object(U.a)(Je),[At]):[],columCount:Ce+1,columns:xe}),M.createElement(_,Object.assign({},Ae,{stickyOffsets:at,columns:ce,flattenColumns:xe}))))});x.displayName="FixedHeader";var g=x,P=M.createContext(null),k=P;function y(Ue){var Ie=Ue.prefixCls,tt=Ue.children,lt=Ue.component,Ke=Ue.cellComponent,Xe=Ue.fixHeader,Ce=Ue.fixColumn,ge=Ue.horizonScroll,be=Ue.className,ie=Ue.expanded,oe=Ue.componentWidth,fe=Ue.colSpan,ye=M.useContext(s.a),Ae=ye.scrollbarSize;return M.useMemo(function(){var Ge=tt;return Ce&&(Ge=M.createElement("div",{style:{width:oe-(Xe?Ae:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ie,"-expanded-row-fixed")},Ge)),M.createElement(lt,{className:be,style:{display:ie?null:"none"}},M.createElement(o.a,{component:Ke,prefixCls:Ie,colSpan:fe},Ge))},[tt,lt,Xe,ge,be,ie,oe,fe,Ae])}var A=y;function F(Ue){var Ie=Ue.className,tt=Ue.style,lt=Ue.record,Ke=Ue.index,Xe=Ue.rowKey,Ce=Ue.getRowKey,ge=Ue.rowExpandable,be=Ue.expandedKeys,ie=Ue.onRow,oe=Ue.indent,fe=oe===void 0?0:oe,ye=Ue.rowComponent,Ae=Ue.cellComponent,Ge=Ue.childrenColumnName,ot=M.useContext(s.a),wt=ot.prefixCls,Dt=ot.fixedInfoList,At=M.useContext(k),vt=At.fixHeader,$e=At.fixColumn,et=At.horizonScroll,Ye=At.componentWidth,ce=At.flattenColumns,xe=At.expandableType,at=At.expandRowByClick,Je=At.onTriggerExpand,_t=At.rowClassName,yt=At.expandedRowClassName,Be=At.indentSize,Ze=At.expandIcon,nt=At.expandedRowRender,ut=At.expandIconColumnIndex,Et=M.useState(!1),st=Object(W.a)(Et,2),Ut=st[0],Zt=st[1],Rt=be&&be.has(Ue.recordKey);M.useEffect(function(){Rt&&Zt(!0)},[Rt]);var qt=xe==="row"&&(!ge||ge(lt)),Qt=xe==="nest",en=Ge&&lt&&lt[Ge],Yt=qt||Qt,cn;ie&&(cn=ie(lt,Ke));var Sn=function(L){if(at&&Yt&&Je(lt,L),cn&&cn.onClick){for(var N,z=arguments.length,te=new Array(z>1?z-1:0),Q=1;Q<z;Q++)te[Q-1]=arguments[Q];(N=cn).onClick.apply(N,[L].concat(te))}},kn;typeof _t=="string"?kn=_t:typeof _t=="function"&&(kn=_t(lt,Ke,fe));var gt=Object(R.a)(ce),Wt=M.createElement(ye,Object.assign({},cn,{"data-row-key":Xe,className:j()(Ie,"".concat(wt,"-row"),"".concat(wt,"-row-level-").concat(fe),kn,cn&&cn.className),style:Object(G.a)(Object(G.a)({},tt),cn?cn.style:null),onClick:Sn}),ce.map(function(X,L){var N=X.render,z=X.dataIndex,te=X.className,Q=gt[L],Re=Dt[L],ct;L===(ut||0)&&Qt&&(ct=M.createElement(M.Fragment,null,M.createElement("span",{style:{paddingLeft:"".concat(Be*fe,"px")},className:"".concat(wt,"-row-indent indent-level-").concat(fe)}),Ze({prefixCls:wt,expanded:Rt,expandable:en,record:lt,onExpand:Je})));var Ct;return X.onCell&&(Ct=X.onCell(lt,Ke)),M.createElement(o.a,Object.assign({className:te,ellipsis:X.ellipsis,align:X.align,component:Ae,prefixCls:wt,key:Q,record:lt,index:Ke,dataIndex:z,render:N,shouldCellUpdate:X.shouldCellUpdate},Re,{appendNode:ct,additionalProps:Ct}))})),Jt;if(qt&&(Ut||Rt)){var tn=nt(lt,Ke,fe+1,Rt),nn=yt&&yt(lt,Ke,fe);Jt=M.createElement(A,{expanded:Rt,className:j()("".concat(wt,"-expanded-row"),"".concat(wt,"-expanded-row-level-").concat(fe+1),nn),prefixCls:wt,fixHeader:vt,fixColumn:$e,horizonScroll:et,component:ye,componentWidth:Ye,cellComponent:Ae,colSpan:ce.length},tn)}var pn;return en&&Rt&&(pn=(lt[Ge]||[]).map(function(X,L){var N=Ce(X,L);return M.createElement(F,Object.assign({},Ue,{key:N,rowKey:N,record:X,recordKey:N,index:L,indent:fe+1}))})),M.createElement(M.Fragment,null,Wt,Jt,pn)}F.displayName="BodyRow";var T=F,Y=M.createContext(null),$=Y;function le(Ue){var Ie=Ue.columnKey,tt=Ue.onColumnResize,lt=M.useRef();return M.useEffect(function(){lt.current&&tt(Ie,lt.current.offsetWidth)},[]),M.createElement(f.a,{onResize:function(Xe){var Ce=Xe.offsetWidth;tt(Ie,Ce)}},M.createElement("td",{ref:lt,style:{padding:0,border:0,height:0}},M.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function de(Ue){var Ie=Ue.data,tt=Ue.getRowKey,lt=Ue.measureColumnWidth,Ke=Ue.expandedKeys,Xe=Ue.onRow,Ce=Ue.rowExpandable,ge=Ue.emptyNode,be=Ue.childrenColumnName,ie=M.useContext($),oe=ie.onColumnResize,fe=M.useContext(s.a),ye=fe.prefixCls,Ae=fe.getComponent,Ge=M.useContext(k),ot=Ge.fixHeader,wt=Ge.horizonScroll,Dt=Ge.flattenColumns,At=Ge.componentWidth;return M.useMemo(function(){var vt=Ae(["body","wrapper"],"tbody"),$e=Ae(["body","row"],"tr"),et=Ae(["body","cell"],"td"),Ye;Ie.length?Ye=Ie.map(function(xe,at){var Je=tt(xe,at);return M.createElement(T,{key:Je,rowKey:Je,record:xe,recordKey:Je,index:at,rowComponent:$e,cellComponent:et,expandedKeys:Ke,onRow:Xe,getRowKey:tt,rowExpandable:Ce,childrenColumnName:be})}):Ye=M.createElement(A,{expanded:!0,className:"".concat(ye,"-placeholder"),prefixCls:ye,fixHeader:ot,fixColumn:wt,horizonScroll:wt,component:$e,componentWidth:At,cellComponent:et,colSpan:Dt.length},ge);var ce=Object(R.a)(Dt);return M.createElement(vt,{className:"".concat(ye,"-tbody")},lt&&M.createElement("tr",{"aria-hidden":"true",className:"".concat(ye,"-measure-row"),style:{height:0}},ce.map(function(xe){return M.createElement(le,{key:xe,columnKey:xe,onColumnResize:oe})})),Ye)},[Ie,ye,Xe,lt,Ke,tt,Ae,At,ge,Dt])}var Pe=M.memo(de);Pe.displayName="Body";var Se=Pe,we=B("wRmb"),Fe=B("xEkU"),Me=B.n(Fe);function me(Ue){var Ie=Object(M.useRef)(Ue),tt=Object(M.useState)({}),lt=Object(W.a)(tt,2),Ke=lt[1],Xe=Object(M.useRef)(null),Ce=Object(M.useRef)([]);function ge(be){Xe.current===null&&(Ce.current=[],Xe.current=Me()(function(){Ce.current.forEach(function(ie){Ie.current=ie(Ie.current)}),Xe.current=null,Ke({})})),Ce.current.push(be)}return Object(M.useEffect)(function(){return function(){Me.a.cancel(Xe.current)}},[]),[Ie.current,ge]}function pe(Ue){var Ie=Object(M.useRef)(Ue),tt=Object(M.useRef)(null);function lt(){window.clearTimeout(tt.current)}function Ke(Ce){Ie.current=Ce,lt(),tt.current=window.setTimeout(function(){Ie.current=null,tt.current=null},100)}function Xe(){return Ie.current}return Object(M.useEffect)(function(){return lt},[]),[Ke,Xe]}function ne(Ue,Ie,tt){var lt=Object(M.useMemo)(function(){for(var Ke=[],Xe=[],Ce=0,ge=0,be=0;be<Ie;be+=1)if(tt==="rtl"){Xe[be]=ge,ge+=Ue[be]||0;var ie=Ie-be-1;Ke[ie]=Ce,Ce+=Ue[ie]||0}else{Ke[be]=Ce,Ce+=Ue[be]||0;var oe=Ie-be-1;Xe[oe]=ge,ge+=Ue[oe]||0}return{left:Ke,right:Xe}},[Ue,Ie,tt]);return lt}var Ee=ne;function ae(Ue){var Ie=Ue.className,tt=Ue.children;return M.createElement("div",{className:Ie},tt)}var ke=ae,je=B("n6Qo");function Oe(Ue){var Ie,tt=Ue.prefixCls,lt=Ue.record,Ke=Ue.onExpand,Xe=Ue.expanded,Ce=Ue.expandable,ge="".concat(tt,"-row-expand-icon");if(!Ce)return M.createElement("span",{className:j()(ge,"".concat(tt,"-row-spaced"))});var be=function(oe){Ke(lt,oe),oe.stopPropagation()};return M.createElement("span",{className:j()(ge,(Ie={},Object(Z.a)(Ie,"".concat(tt,"-row-expanded"),Xe),Object(Z.a)(Ie,"".concat(tt,"-row-collapsed"),!Xe),Ie)),onClick:be})}function Ve(Ue,Ie,tt){var lt=[];function Ke(Xe){(Xe||[]).forEach(function(Ce,ge){lt.push(Ie(Ce,ge)),Ke(Ce[tt])})}return Ke(Ue),lt}var qe=B("zT1h"),ue=B("y0+3"),ve=function(Ie,tt){var lt,Ke,Xe=Ie.scrollBodyRef,Ce=Ie.onScroll,ge=Ie.offsetScroll,be=M.useContext(s.a),ie=be.prefixCls,oe=((lt=Xe.current)===null||lt===void 0?void 0:lt.scrollWidth)||0,fe=((Ke=Xe.current)===null||Ke===void 0?void 0:Ke.clientWidth)||0,ye=oe&&fe*(fe/oe),Ae=M.useRef(),Ge=me({scrollLeft:0,isHiddenScrollBar:!1}),ot=Object(W.a)(Ge,2),wt=ot[0],Dt=ot[1],At=M.useRef({delta:0,x:0}),vt=M.useState(!1),$e=Object(W.a)(vt,2),et=$e[0],Ye=$e[1],ce=function(){Ye(!1)},xe=function(Be){Be.persist(),At.current.delta=Be.pageX-wt.scrollLeft,At.current.x=0,Ye(!0),Be.preventDefault()},at=function(Be){var Ze,nt=Be||((Ze=window)===null||Ze===void 0?void 0:Ze.event),ut=nt.buttons;if(!et||ut===0){et&&Ye(!1);return}var Et=At.current.x+Be.pageX-At.current.x-At.current.delta;Et<=0&&(Et=0),Et+ye>=fe&&(Et=fe-ye),Ce({scrollLeft:Et/fe*(oe+2)}),At.current.x=Be.pageX},Je=function(){var Be=Object(ue.b)(Xe.current).top,Ze=Be+Xe.current.offsetHeight,nt=document.documentElement.scrollTop+window.innerHeight;Ze-Object(p.a)()<=nt||Be>=nt-ge?Dt(function(ut){return Object(G.a)(Object(G.a)({},ut),{},{isHiddenScrollBar:!0})}):Dt(function(ut){return Object(G.a)(Object(G.a)({},ut),{},{isHiddenScrollBar:!1})})},_t=function(Be){Dt(function(Ze){return Object(G.a)(Object(G.a)({},Ze),{},{scrollLeft:Be/oe*fe||0})})};return M.useImperativeHandle(tt,function(){return{setScrollLeft:_t}}),M.useEffect(function(){var yt=Object(qe.a)(document.body,"mouseup",ce,!1),Be=Object(qe.a)(document.body,"mousemove",at,!1);return Je(),function(){yt.remove(),Be.remove()}},[ye,et]),M.useEffect(function(){var yt=Object(qe.a)(window,"scroll",Je,!1),Be=Object(qe.a)(window,"resize",Je,!1);return function(){yt.remove(),Be.remove()}},[]),M.useEffect(function(){wt.isHiddenScrollBar||Dt(function(yt){var Be,Ze;return Object(G.a)(Object(G.a)({},yt),{},{scrollLeft:Xe.current.scrollLeft/((Be=Xe.current)===null||Be===void 0?void 0:Be.scrollWidth)*((Ze=Xe.current)===null||Ze===void 0?void 0:Ze.clientWidth)})})},[wt.isHiddenScrollBar]),oe<=fe||!ye||wt.isHiddenScrollBar?null:M.createElement("div",{style:{height:Object(p.a)(),width:fe,bottom:ge},className:"".concat(ie,"-sticky-scroll")},M.createElement("div",{onMouseDown:xe,ref:Ae,className:j()("".concat(ie,"-sticky-scroll-bar"),Object(Z.a)({},"".concat(ie,"-sticky-scroll-bar-active"),et)),style:{width:"".concat(ye,"px"),transform:"translate3d(".concat(wt.scrollLeft,"px, 0, 0)")}}))},De=M.forwardRef(ve);function Ne(Ue,Ie){return M.useMemo(function(){var tt=!!Ue;return{isSticky:tt,stickyClassName:tt?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(V.a)(Ue)==="object"&&Ue.offsetHeader||0,offsetScroll:Object(V.a)(Ue)==="object"&&Ue.offsetScroll||0}},[Ue,Ie])}var it=[],pt={},mt="rc-table-internal-hook",dt=M.memo(function(Ue){var Ie=Ue.children;return Ie},function(Ue,Ie){return w()(Ue.props,Ie.props)?Ue.pingLeft!==Ie.pingLeft||Ue.pingRight!==Ie.pingRight:!1});function Tt(Ue){var Ie,tt=Ue.prefixCls,lt=Ue.className,Ke=Ue.rowClassName,Xe=Ue.style,Ce=Ue.data,ge=Ue.rowKey,be=Ue.scroll,ie=Ue.tableLayout,oe=Ue.direction,fe=Ue.title,ye=Ue.footer,Ae=Ue.summary,Ge=Ue.id,ot=Ue.showHeader,wt=Ue.components,Dt=Ue.emptyText,At=Ue.onRow,vt=Ue.onHeaderRow,$e=Ue.internalHooks,et=Ue.transformColumns,Ye=Ue.internalRefs,ce=Ue.sticky,xe=Ce||it,at=!!xe.length,Je=M.useState(0),_t=Object(W.a)(Je,2),yt=_t[0],Be=_t[1];M.useEffect(function(){Be(Object(p.a)())});var Ze=M.useMemo(function(){return Object(R.c)(wt,{})},[wt]),nt=M.useCallback(function(Pn,On){return Object(R.b)(Ze,Pn)||On},[Ze]),ut=M.useMemo(function(){return typeof ge=="function"?ge:function(Pn){var On=Pn&&Pn[ge];return On}},[ge]),Et=Object(b.c)(Ue),st=Et.expandIcon,Ut=Et.expandedRowKeys,Zt=Et.defaultExpandedRowKeys,Rt=Et.defaultExpandAllRows,qt=Et.expandedRowRender,Qt=Et.onExpand,en=Et.onExpandedRowsChange,Yt=Et.expandRowByClick,cn=Et.rowExpandable,Sn=Et.expandIconColumnIndex,kn=Et.expandedRowClassName,gt=Et.childrenColumnName,Wt=Et.indentSize,Jt=st||Oe,tn=gt||"children",nn=M.useMemo(function(){return qt?"row":Ue.expandable&&$e===mt&&Ue.expandable.__PARENT_RENDER_ICON__||xe.some(function(Pn){return Pn&&Object(V.a)(Pn)==="object"&&Pn[tn]})?"nest":!1},[!!qt,xe]),pn=M.useState(function(){return Zt||(Rt?Ve(xe,ut,tn):[])}),X=Object(W.a)(pn,2),L=X[0],N=X[1],z=M.useMemo(function(){return new Set(Ut||L||[])},[Ut,L]),te=M.useCallback(function(Pn){var On=ut(Pn,xe.indexOf(Pn)),Rn,gr=z.has(On);gr?(z.delete(On),Rn=Object(U.a)(z)):Rn=[].concat(Object(U.a)(z),[On]),N(Rn),Qt&&Qt(!gr,Pn),en&&en(Rn)},[ut,z,xe,Qt,en]),Q=M.useState(0),Re=Object(W.a)(Q,2),ct=Re[0],Ct=Re[1],Pt=Object(we.b)(Object(G.a)(Object(G.a)(Object(G.a)({},Ue),Et),{},{expandable:!!qt,expandedKeys:z,getRowKey:ut,onTriggerExpand:te,expandIcon:Jt,expandIconColumnIndex:Sn,direction:oe}),$e===mt?et:null),ht=Object(W.a)(Pt,2),Vt=ht[0],rn=ht[1],An=M.useMemo(function(){return{columns:Vt,flattenColumns:rn}},[Vt,rn]),Cn=M.useRef(),En=M.useRef(),Fn=M.useRef(),mr=M.useState(!1),kr=Object(W.a)(mr,2),Kn=kr[0],or=kr[1],Cr=M.useState(!1),Er=Object(W.a)(Cr,2),nr=Er[0],Kr=Er[1],Pr=me(new Map),Gr=Object(W.a)(Pr,2),zr=Gr[0],Nr=Gr[1],$n=Object(R.a)(rn),Ur=$n.map(function(Pn){return zr.get(Pn)}),Jr=M.useMemo(function(){return Ur},[Ur.join("_")]),cr=Ee(Jr,rn.length,oe),Ln=be&&Object(R.d)(be.y),jt=be&&Object(R.d)(be.x),Gn=jt&&rn.some(function(Pn){var On=Pn.fixed;return On}),mn=M.useRef(),Te=Ne(ce,tt),dn=Te.isSticky,Br=Te.offsetHeader,Qn=Te.offsetScroll,gn=Te.stickyClassName,Zr,Or,qr;Ln&&(Or={overflowY:"scroll",maxHeight:be.y}),jt&&(Zr={overflowX:"auto"},Ln||(Or={overflowY:"hidden"}),qr={width:be.x===!0?"auto":be.x,minWidth:"100%"});var dr=M.useCallback(function(Pn,On){Nr(function(Rn){var gr=new Map(Rn);return gr.set(Pn,On),gr})},[]),Fr=pe(null),oi=Object(W.a)(Fr,2),_r=oi[0],li=oi[1];function jr(Pn,On){if(!On)return;typeof On=="function"?On(Pn):On.scrollLeft!==Pn&&(On.scrollLeft=Pn)}var xr=function(On){var Rn=On.currentTarget,gr=On.scrollLeft,ci=typeof gr=="number"?gr:Rn.scrollLeft,$r=Rn||pt;if(!li()||li()===$r){var Ui;_r($r),jr(ci,En.current),jr(ci,Fn.current),jr(ci,(Ui=mn.current)===null||Ui===void 0?void 0:Ui.setScrollLeft)}if(Rn){var Bi=Rn.scrollWidth,Ra=Rn.clientWidth;or(ci>0),Kr(ci<Bi-Ra)}},ui=function(){Fn.current&&xr({currentTarget:Fn.current})},Gt=function(On){var Rn=On.width;ui(),Ct(Cn.current?Cn.current.offsetWidth:Rn)};M.useEffect(function(){return ui},[]),M.useEffect(function(){jt&&ui()},[jt]),M.useEffect(function(){$e===mt&&Ye&&(Ye.body.current=Fn.current)});var on=nt(["table"],"table"),$t=M.useMemo(function(){return ie||(Gn?be.x==="max-content"?"auto":"fixed":Ln||rn.some(function(Pn){var On=Pn.ellipsis;return On})?"fixed":"auto")},[Ln,Gn,rn,ie]),hn,vn={colWidths:Jr,columCount:rn.length,stickyOffsets:cr,onHeaderRow:vt,fixHeader:Ln},Nn=M.useMemo(function(){return at?null:typeof Dt=="function"?Dt():Dt},[at,Dt]),yn=M.createElement(Se,{data:xe,measureColumnWidth:Ln||jt||dn,expandedKeys:z,rowExpandable:cn,getRowKey:ut,onRow:At,emptyNode:Nn,childrenColumnName:tn}),zn=M.createElement(h,{colWidths:rn.map(function(Pn){var On=Pn.width;return On}),columns:rn}),ar=Ae&&M.createElement(je.b,null,Ae(xe)),fn=nt(["body"]);if(Ln||dn){var Rr;typeof fn=="function"?(Rr=fn(xe,{scrollbarSize:yt,ref:Fn,onScroll:xr}),vn.colWidths=rn.map(function(Pn,On){var Rn=Pn.width,gr=On===Vt.length-1?Rn-yt:Rn;return typeof gr=="number"&&!Number.isNaN(gr)?gr:(Object(m.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Rr=M.createElement("div",{style:Object(G.a)(Object(G.a)({},Zr),Or),onScroll:xr,ref:Fn,className:j()("".concat(tt,"-body"))},M.createElement(on,{style:Object(G.a)(Object(G.a)({},qr),{},{tableLayout:$t})},zn,yn,ar),dn&&M.createElement(De,{ref:mn,offsetScroll:Qn,scrollBodyRef:Fn,onScroll:xr})),hn=M.createElement(M.Fragment,null,ot!==!1&&M.createElement(g,Object.assign({noData:!xe.length},vn,An,{direction:oe,offsetHeader:Br,stickyClassName:gn,ref:En,onScroll:xr})),Rr)}else hn=M.createElement("div",{style:Object(G.a)(Object(G.a)({},Zr),Or),className:j()("".concat(tt,"-content")),onScroll:xr,ref:Fn},M.createElement(on,{style:Object(G.a)(Object(G.a)({},qr),{},{tableLayout:$t})},zn,ot!==!1&&M.createElement(_,Object.assign({},vn,An)),yn,ar));var Dn=Object(b.b)(Ue),Vn=M.createElement("div",Object.assign({className:j()(tt,lt,(Ie={},Object(Z.a)(Ie,"".concat(tt,"-rtl"),oe==="rtl"),Object(Z.a)(Ie,"".concat(tt,"-ping-left"),Kn),Object(Z.a)(Ie,"".concat(tt,"-ping-right"),nr),Object(Z.a)(Ie,"".concat(tt,"-layout-fixed"),ie==="fixed"),Object(Z.a)(Ie,"".concat(tt,"-fixed-header"),Ln),Object(Z.a)(Ie,"".concat(tt,"-fixed-column"),Gn),Object(Z.a)(Ie,"".concat(tt,"-scroll-horizontal"),jt),Object(Z.a)(Ie,"".concat(tt,"-has-fix-left"),rn[0]&&rn[0].fixed),Object(Z.a)(Ie,"".concat(tt,"-has-fix-right"),rn[rn.length-1]&&rn[rn.length-1].fixed==="right"),Ie)),style:Xe,id:Ge,ref:Cn},Dn),M.createElement(dt,{pingLeft:Kn,pingRight:nr,props:Object(G.a)(Object(G.a)({},Ue),{},{stickyOffsets:cr,mergedExpandedKeys:z})},fe&&M.createElement(ke,{className:"".concat(tt,"-title")},fe(xe)),M.createElement("div",{className:"".concat(tt,"-container")},hn),ye&&M.createElement(ke,{className:"".concat(tt,"-footer")},ye(xe))));jt&&(Vn=M.createElement(f.a,{onResize:Gt},Vn));var er=M.useMemo(function(){return{prefixCls:tt,getComponent:nt,scrollbarSize:yt,direction:oe,fixedInfoList:rn.map(function(Pn,On){return a(On,On,rn,cr,oe)}),isSticky:dn}},[tt,nt,yt,oe,rn,cr,oe,dn]),Tr=M.useMemo(function(){return Object(G.a)(Object(G.a)({},An),{},{tableLayout:$t,rowClassName:Ke,expandedRowClassName:kn,componentWidth:ct,fixHeader:Ln,fixColumn:Gn,horizonScroll:jt,expandIcon:Jt,expandableType:nn,expandRowByClick:Yt,expandedRowRender:qt,onTriggerExpand:te,expandIconColumnIndex:Sn,indentSize:Wt})},[An,$t,Ke,kn,ct,Ln,Gn,jt,Jt,nn,Yt,qt,te,Sn,Wt]),ea=M.useMemo(function(){return{onColumnResize:dr}},[dr]);return M.createElement(s.a.Provider,{value:er},M.createElement(k.Provider,{value:Tr},M.createElement($.Provider,{value:ea},Vn)))}Tt.Column=r.a,Tt.ColumnGroup=c.a,Tt.Summary=je.a,Tt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var St=se.b=Tt},wRmb:function(We,se,B){"use strict";B.d(se,"a",function(){return w});var Z=B("rePB"),G=B("KQm4"),U=B("VTBJ"),V=B("Ff2n"),W=B("q1tI"),M=B.n(W),K=B("Kwbf"),j=B("Zm9Q"),n=B("hW8S");function w(r){return Object(j.a)(r).filter(function(d){return W.isValidElement(d)}).map(function(d){var u=d.key,o=d.props,s=o.children,a=Object(V.a)(o,["children"]),R=Object(U.a)({key:u},a);return s&&(R.children=w(s)),R})}function m(r){return r.reduce(function(d,u){var o=u.fixed,s=o===!0?"left":o,a=u.children;return a&&a.length>0?[].concat(Object(G.a)(d),Object(G.a)(m(a).map(function(R){return Object(U.a)({fixed:s},R)}))):[].concat(Object(G.a)(d),[Object(U.a)(Object(U.a)({},u),{},{fixed:s})])},[])}function f(r){for(var d=!0,u=0;u<r.length;u+=1){var o=r[u];if(d&&o.fixed!=="left")d=!1;else if(!d&&o.fixed==="left"){Object(K.a)(!1,"Index ".concat(u-1," of `columns` missing `fixed='left'` prop."));break}}for(var s=!0,a=r.length-1;a>=0;a-=1){var R=r[a];if(s&&R.fixed!=="right")s=!1;else if(!s&&R.fixed==="right"){Object(K.a)(!1,"Index ".concat(a+1," of `columns` missing `fixed='right'` prop."));break}}}function p(r){return r.map(function(d){var u=d.fixed,o=Object(V.a)(d,["fixed"]),s=u;return u==="left"?s="right":u==="right"&&(s="left"),Object(U.a)({fixed:s},o)})}function c(r,d){var u=r.prefixCls,o=r.columns,s=r.children,a=r.expandable,R=r.expandedKeys,O=r.getRowKey,S=r.onTriggerExpand,D=r.expandIcon,I=r.rowExpandable,_=r.expandIconColumnIndex,b=r.direction,v=r.expandRowByClick,h=W.useMemo(function(){return o||w(s)},[o,s]),C=W.useMemo(function(){if(a){var P,k=_||0,y=h[k],A=(P={},Object(Z.a)(P,n.a,{className:"".concat(u,"-expand-icon-col")}),Object(Z.a)(P,"title",""),Object(Z.a)(P,"fixed",y?y.fixed:null),Object(Z.a)(P,"className","".concat(u,"-row-expand-icon-cell")),Object(Z.a)(P,"render",function(Y,$,le){var de=O($,le),Pe=R.has(de),Se=I?I($):!0,we=D({prefixCls:u,expanded:Pe,expandable:Se,record:$,onExpand:S});return v?W.createElement("span",{onClick:function(Me){return Me.stopPropagation()}},we):we}),P),F=h.slice();return k>=0&&F.splice(k,0,A),F}return h},[a,h,O,R,D,b]),x=W.useMemo(function(){var P=C;return d&&(P=d(P)),P.length||(P=[{render:function(){return null}}]),P},[d,C,b]),g=W.useMemo(function(){return b==="rtl"?p(m(x)):m(x)},[x,b]);return[x,g]}se.b=c},wU8J:function(We,se){function B(){this.buffer=new Array,this.length=0}B.prototype={get:function(Z){var G=Math.floor(Z/8);return(this.buffer[G]>>>7-Z%8&1)==1},put:function(Z,G){for(var U=0;U<G;U++)this.putBit((Z>>>G-U-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(Z){var G=Math.floor(this.length/8);this.buffer.length<=G&&this.buffer.push(0),Z&&(this.buffer[G]|=128>>>this.length%8),this.length++}},We.exports=B},"y0+3":function(We,se,B){"use strict";B.d(se,"a",function(){return m}),B.d(se,"b",function(){return p});var Z=/margin|padding|width|height|max|min|offset/,G={left:!0,top:!0},U={cssFloat:1,styleFloat:1,float:1};function V(c){return c.nodeType===1?c.ownerDocument.defaultView.getComputedStyle(c,null):{}}function W(c,r,d){if(r=r.toLowerCase(),d==="auto"){if(r==="height")return c.offsetHeight;if(r==="width")return c.offsetWidth}return r in G||(G[r]=Z.test(r)),G[r]?parseFloat(d)||0:d}function M(c,r){var d=arguments.length,u=V(c);return r=U[r]?"cssFloat"in c.style?"cssFloat":"styleFloat":r,d===1?u:W(c,r,u[r]||c.style[r])}function K(c,r,d){var u=arguments.length;if(r=U[r]?"cssFloat"in c.style?"cssFloat":"styleFloat":r,u===3)return typeof d=="number"&&Z.test(r)&&(d="".concat(d,"px")),c.style[r]=d,d;for(var o in r)r.hasOwnProperty(o)&&K(c,o,r[o]);return V(c)}function j(c){return c===document.body?document.documentElement.clientWidth:c.offsetWidth}function n(c){return c===document.body?window.innerHeight||document.documentElement.clientHeight:c.offsetHeight}function w(){var c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:c,height:r}}function m(){var c=document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight;return{width:c,height:r}}function f(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function p(c){var r=c.getBoundingClientRect(),d=document.documentElement;return{left:r.left+(window.pageXOffset||d.scrollLeft)-(d.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||d.scrollTop)-(d.clientTop||document.body.clientTop||0)}}},yslc:function(We,se){We.exports="data:image/png;base64,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"}}]);