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([[64,3,5,6,7,8,9,10],{"+NIl":function(Be,he,B){(function(Z){Z(B("VrN/"))})(function(Z){"use strict";Z.defineMode("stex",function(z,N){"use strict";function Y(c,s){c.cmdState.push(s)}function W(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function D(c){var s=c.cmdState.pop();s&&s.closeBracket()}function G(c){for(var s=c.cmdState,d=s.length-1;d>=0;d--){var u=s[d];if(u.name=="DEFAULT")continue;return u}return{styleIdentifier:function(){return null}}}function j(c,s,d){return function(){this.name=c,this.bracketNo=0,this.style=s,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 T(c,s){c.f=s}function v(c,s){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,Y(s,d),T(s,p),d.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return T(s,function(a,i){return f(a,i,"\\]")}),"keyword";if(c.match("\\("))return T(s,function(a,i){return f(a,i,"\\)")}),"keyword";if(c.match("$$"))return T(s,function(a,i){return f(a,i,"$$")}),"keyword";if(c.match("$"))return T(s,function(a,i){return f(a,i,"$")}),"keyword";var l=c.next();if(l=="%")return c.skipToEnd(),"comment";if(l=="}"||l=="]"){if(d=W(s),d)d.closeBracket(l),T(s,p);else return"error";return"bracket"}else return l=="{"||l=="["?(d=n.DEFAULT,d=new d,Y(s,d),"bracket"):/\d/.test(l)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),d=G(s),d.name=="begin"&&(d.argument=c.current()),d.styleIdentifier())}function f(c,s,d){if(c.eatSpace())return null;if(d&&c.match(d))return T(s,v),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var u=c.next();return u=="{"||u=="}"||u=="["||u=="]"||u=="("||u==")"?"bracket":u=="%"?(c.skipToEnd(),"comment"):"error"}function p(c,s){var d=c.peek(),u;return d=="{"||d=="["?(u=W(s),u.openBracket(d),c.eat(d),T(s,v),"bracket"):/[ \t\r]/.test(d)?(c.eat(d),null):(T(s,v),D(s),v(c,s))}return{startState:function(){var c=N.inMathMode?function(s,d){return f(s,d)}:v;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,s){return s.f(c,s)},blankLine:function(c){c.f=v,c.cmdState.length=0},lineComment:"%"}}),Z.defineMIME("text/x-stex","stex"),Z.defineMIME("text/x-latex","stex")})},"+ua5":function(Be,he,B){},"/GNS":function(Be,he,B){Be.exports=B.p+"static/search1.c4136dd4.png"},"/cxE":function(Be,he,B){"use strict";B.d(he,"f",function(){return N}),B.d(he,"g",function(){return Y}),B.d(he,"h",function(){return W}),B.d(he,"e",function(){return G}),B.d(he,"b",function(){return j}),B.d(he,"c",function(){return n}),B.d(he,"d",function(){return T}),B.d(he,"a",function(){return v});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 z=new Z;function N(f){G(f)||z.onUnexpectedError(f);return}function Y(f){G(f)||z.onUnexpectedExternalError(f);return}function W(f){if(f instanceof Error){let{name:p,message:c}=f;const s=f.stacktrace||f.stack;return{$isError:!0,name:p,message:c,stack:s}}return f}const D="Canceled";function G(f){return f instanceof Error&&f.name===D&&f.message===D}function j(){const f=new Error(D);return f.name=f.message,f}function n(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}function T(f){return f?new Error(`Illegal state: ${f}`):new Error("Illegal state")}class v extends Error{constructor(f){super("NotSupported");f&&(this.message=f)}}},"19Vz":function(Be,he,B){(function(Z){Z(B("VrN/"))})(function(Z){Z.defineOption("placeholder","",function(j,n,T){var v=T&&T!=Z.Init;if(n&&!v)j.on("blur",W),j.on("change",D),j.on("swapDoc",D),Z.on(j.getInputField(),"compositionupdate",j.state.placeholderCompose=function(){Y(j)}),D(j);else if(!n&&v){j.off("blur",W),j.off("change",D),j.off("swapDoc",D),Z.off(j.getInputField(),"compositionupdate",j.state.placeholderCompose),z(j);var f=j.getWrapperElement();f.className=f.className.replace(" CodeMirror-empty","")}n&&!j.hasFocus()&&W(j)});function z(j){j.state.placeholder&&(j.state.placeholder.parentNode.removeChild(j.state.placeholder),j.state.placeholder=null)}function N(j){z(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 T=j.getOption("placeholder");typeof T=="string"&&(T=document.createTextNode(T)),n.appendChild(T),j.display.lineSpace.insertBefore(n,j.display.lineSpace.firstChild)}function Y(j){setTimeout(function(){var n=!1,T=j.getInputField();T.nodeName=="TEXTAREA"?n=!T.value:j.lineCount()==1&&(n=!/[^\u200b]/.test(T.querySelector(".CodeMirror-line").textContent)),n?N(j):z(j)},20)}function W(j){G(j)&&N(j)}function D(j){var n=j.getWrapperElement(),T=G(j);n.className=n.className.replace(" CodeMirror-empty","")+(T?" CodeMirror-empty":""),T?N(j):z(j)}function G(j){return j.lineCount()===1&&j.getLine(0)===""}})},"1eCo":function(Be,he,B){(function(Z){Z(B("VrN/"))})(function(Z){"use strict";var z={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},N={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Z.defineMode("xml",function(Y,W){var D=Y.indentUnit,G={},j=W.htmlMode?z:N;for(var n in j)G[n]=j[n];for(var n in W)G[n]=W[n];var T,v;function f(h,C){function x(k){return C.tokenize=k,k(h,C)}var m=h.next();if(m=="<")return h.eat("!")?h.eat("[")?h.match("CDATA[")?x(s("atom","]]>")):null:h.match("--")?x(s("comment","-->")):h.match("DOCTYPE",!0,!0)?(h.eatWhile(/[\w\._\-]/),x(d(1))):null:h.eat("?")?(h.eatWhile(/[\w\._\-]/),C.tokenize=s("meta","?>"),"meta"):(T=h.eat("/")?"closeTag":"openTag",C.tokenize=p,"tag bracket");if(m=="&"){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,T=x==">"?"endTag":"selfcloseTag","tag bracket";if(x=="=")return T="equals",null;if(x=="<"){C.tokenize=f,C.state=i,C.tagName=C.tagStart=null;var m=C.tokenize(h,C);return m?m+" 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,m){for(;!x.eol();)if(x.next()==h){m.tokenize=p;break}return"string"};return C.isInAttribute=!0,C}function s(h,C){return function(x,m){for(;!x.eol();){if(x.match(C)){m.tokenize=f;break}x.next()}return h}}function d(h){return function(C,x){for(var m;(m=C.next())!=null;){if(m=="<")return x.tokenize=d(h+1),x.tokenize(C,x);if(m==">")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,(G.doNotIndent.hasOwnProperty(C)||h.context&&h.context.noIndent)&&(this.noIndent=!0)}function l(h){h.context&&(h.context=h.context.prev)}function a(h,C){for(var x;;){if(!h.context)return;if(x=h.context.tagName,!G.contextGrabbers.hasOwnProperty(x)||!G.contextGrabbers[x].hasOwnProperty(C))return;l(h)}}function i(h,C,x){return h=="openTag"?(x.tagStart=C.column(),R):h=="closeTag"?O:i}function R(h,C,x){return h=="word"?(x.tagName=C.current(),v="tag",L):G.allowMissingTagName&&h=="endTag"?(v="tag bracket",L(h,C,x)):(v="error",R)}function O(h,C,x){if(h=="word"){var m=C.current();return x.context&&x.context.tagName!=m&&G.implicitlyClosed.hasOwnProperty(x.context.tagName)&&l(x),x.context&&x.context.tagName==m||G.matchClosing===!1?(v="tag",w):(v="tag error",M)}else return G.allowMissingTagName&&h=="endTag"?(v="tag bracket",w(h,C,x)):(v="error",M)}function w(h,C,x){return h!="endTag"?(v="error",w):(l(x),i)}function M(h,C,x){return v="error",w(h,C,x)}function L(h,C,x){if(h=="word")return v="attribute",_;if(h=="endTag"||h=="selfcloseTag"){var m=x.tagName,P=x.tagStart;return x.tagName=x.tagStart=null,h=="selfcloseTag"||G.autoSelfClosers.hasOwnProperty(m)?a(x,m):(a(x,m),x.context=new u(x,m,P==x.indented)),i}return v="error",L}function _(h,C,x){return h=="equals"?b:(G.allowMissing||(v="error"),L(h,C,x))}function b(h,C,x){return h=="string"?g:h=="word"&&G.allowUnquoted?(v="string",L):(v="error",L(h,C,x))}function g(h,C,x){return h=="string"?g:L(h,C,x)}return{startState:function(h){var C={tokenize:f,state:i,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;T=null;var x=C.tokenize(h,C);return(x||T)&&x!="comment"&&(v=null,C.state=C.state(T||x,h,C),v&&(x=v=="error"?x+" error":v)),x},indent:function(h,C,x){var m=h.context;if(h.tokenize.isInAttribute)return h.tagStart==h.indented?h.stringStartCol+1:h.indented+D;if(m&&m.noIndent)return Z.Pass;if(h.tokenize!=p&&h.tokenize!=f)return x?x.match(/^(\s*)/)[0].length:0;if(h.tagName)return G.multilineTagIndentPastTag!==!1?h.tagStart+h.tagName.length+2:h.tagStart+D*(G.multilineTagIndentFactor||1);if(G.alignCDATA&&/<!\[CDATA\[/.test(C))return 0;var P=C&&/^<(\/)?([\w_:\.-]*)/.exec(C);if(P&&P[1])for(;m;)if(m.tagName==P[2]){m=m.prev;break}else if(G.implicitlyClosed.hasOwnProperty(m.tagName))m=m.prev;else break;else if(P)for(;m;){var k=G.contextGrabbers[m.tagName];if(k&&k.hasOwnProperty(P[2]))m=m.prev;else break}for(;m&&m.prev&&!m.startOfLine;)m=m.prev;return m?m.indent+D:h.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:G.htmlMode?"html":"xml",helperType:G.htmlMode?"html":"xml",skipAttribute:function(h){h.state==b&&(h.state=L)},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(Be,he,B){"use strict";B.d(he,"d",function(){return Xe}),B.d(he,"b",function(){return _e}),B.d(he,"c",function(){return Ye}),B.d(he,"a",function(){return Et});var Z=B("VTBJ"),z=B("1OyB"),N=B("vuIU"),Y=B("JX7q"),W=B("Ji7U"),D=B("LK+K"),G=B("q1tI"),j=B("I8Z2"),n=B("BGR+"),T=B("wx14"),v=B("rePB"),f=B("4IlW"),p=B("2GS6"),c=B("Gytx"),s=B.n(c),d=B("TSYQ"),u=B.n(d),l=B("U8pU"),a=B("ODXe"),i=/iPhone/i,R=/iPod/i,O=/iPad/i,w=/\bAndroid(?:.+)Mobile\b/i,M=/Android/i,L=/\bAndroid(?:.+)SD4930UR\b/i,_=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,b=/Windows Phone/i,g=/\bWindows(?:.+)ARM\b/i,h=/BlackBerry/i,C=/BB10/i,x=/Opera Mini/i,m=/\b(CriOS|Chrome)(?:.+)Mobile/i,P=/Mobile(?:.+)Firefox\b/i;function k(ft,ze){return ft.test(ze)}function y(ft){var ze=ft||(typeof navigator!="undefined"?navigator.userAgent:""),Qe=ze.split("[FBAN");if(typeof Qe[1]!="undefined"){var He=Qe,me=Object(a.a)(He,1);ze=me[0]}if(Qe=ze.split("Twitter"),typeof Qe[1]!="undefined"){var we=Qe,qe=Object(a.a)(we,1);ze=qe[0]}var Ge={apple:{phone:k(i,ze)&&!k(b,ze),ipod:k(R,ze),tablet:!k(i,ze)&&k(O,ze)&&!k(b,ze),device:(k(i,ze)||k(R,ze)||k(O,ze))&&!k(b,ze)},amazon:{phone:k(L,ze),tablet:!k(L,ze)&&k(_,ze),device:k(L,ze)||k(_,ze)},android:{phone:!k(b,ze)&&k(L,ze)||!k(b,ze)&&k(w,ze),tablet:!k(b,ze)&&!k(L,ze)&&!k(w,ze)&&(k(_,ze)||k(M,ze)),device:!k(b,ze)&&(k(L,ze)||k(_,ze)||k(w,ze)||k(M,ze))||k(/\bokhttp\b/i,ze)},windows:{phone:k(b,ze),tablet:k(g,ze),device:k(b,ze)||k(g,ze)},other:{blackberry:k(h,ze),blackberry10:k(C,ze),opera:k(x,ze),firefox:k(P,ze),chrome:k(m,ze),device:k(h,ze)||k(C,ze)||k(x,ze)||k(P,ze)||k(m,ze)},any:null,phone:null,tablet:null};return Ge.any=Ge.apple.device||Ge.android.device||Ge.windows.device||Ge.other.device,Ge.phone=Ge.apple.phone||Ge.android.phone||Ge.windows.phone,Ge.tablet=Ge.apple.tablet||Ge.android.tablet||Ge.windows.tablet,Ge}var S=Object(Z.a)(Object(Z.a)({},y()),{},{isMobile:y}),F=S;function A(){}function X(ft,ze,Qe){var He=ze||"";return ft.key||"".concat(He,"item_").concat(Qe)}function ne(ft){return"".concat(ft,"-menu-")}function fe(ft,ze){var Qe=-1;G.Children.forEach(ft,function(He){Qe+=1,He&&He.type&&He.type.isMenuItemGroup?G.Children.forEach(He.props.children,function(me){Qe+=1,ze(me,Qe)}):ze(He,Qe)})}function ye(ft,ze,Qe){if(!ft||Qe.find)return;G.Children.forEach(ft,function(He){if(He){var me=He.type;if(!me||!(me.isSubMenu||me.isMenuItem||me.isMenuItemGroup))return;ze.indexOf(He.key)!==-1?Qe.find=!0:He.props.children&&ye(He.props.children,ze,Qe)}})}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"],xe=function(ze){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,He=ze&&typeof ze.getBoundingClientRect=="function"&&ze.getBoundingClientRect().width;if(He){if(Qe){var me=getComputedStyle(ze),we=me.marginLeft,qe=me.marginRight;He+=+we.replace("px","")+ +qe.replace("px","")}He=+He.toFixed(6)}return He||0},Ie=function(ze,Qe,He){ze&&Object(l.a)(ze.style)==="object"&&(ze.style[Qe]=He)},Me=function(){return F.any},ke=B("KQm4"),Ee=B("Ff2n"),J=B("i8i4"),I=B("bdgK"),U=B("uciX"),K=B("8XRh"),q={adjustX:1,adjustY:1},V={topLeft:{points:["bl","tl"],overflow:q,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:q,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:q,offset:[4,0]}},ue={topLeft:{points:["bl","tl"],overflow:q,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:q,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:q,offset:[4,0]}},Ae=V,Ue=0,ce={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ge=function(ze,Qe,He){var me=ne(Qe),we=ze.getState();ze.setState({defaultActiveFirst:Object(Z.a)(Object(Z.a)({},we.defaultActiveFirst),{},Object(v.a)({},me,He))})},Te=function(ft){Object(W.a)(Qe,ft);var ze=Object(D.a)(Qe);function Qe(He){var me;Object(z.a)(this,Qe),me=ze.call(this,He),me.onDestroy=function(je){me.props.onDestroy(je)},me.onKeyDown=function(je){var Ve=je.keyCode,$e=me.menuInstance,it=me.props,ut=it.isOpen,et=it.store;if(Ve===f.a.ENTER)return me.onTitleClick(je),ge(et,me.props.eventKey,!0),!0;if(Ve===f.a.RIGHT)return ut?$e.onKeyDown(je):(me.triggerOpenChange(!0),ge(et,me.props.eventKey,!0)),!0;if(Ve===f.a.LEFT){var Dt;if(ut)Dt=$e.onKeyDown(je);else return;return Dt||(me.triggerOpenChange(!1),Dt=!0),Dt}return ut&&(Ve===f.a.UP||Ve===f.a.DOWN)?$e.onKeyDown(je):void 0},me.onOpenChange=function(je){me.props.onOpenChange(je)},me.onPopupVisibleChange=function(je){me.triggerOpenChange(je,je?"mouseenter":"mouseleave")},me.onMouseEnter=function(je){var Ve=me.props,$e=Ve.eventKey,it=Ve.onMouseEnter,ut=Ve.store;ge(ut,me.props.eventKey,!1),it({key:$e,domEvent:je})},me.onMouseLeave=function(je){var Ve=me.props,$e=Ve.parentMenu,it=Ve.eventKey,ut=Ve.onMouseLeave;$e.subMenuInstance=Object(Y.a)(me),ut({key:it,domEvent:je})},me.onTitleMouseEnter=function(je){var Ve=me.props,$e=Ve.eventKey,it=Ve.onItemHover,ut=Ve.onTitleMouseEnter;it({key:$e,hover:!0}),ut({key:$e,domEvent:je})},me.onTitleMouseLeave=function(je){var Ve=me.props,$e=Ve.parentMenu,it=Ve.eventKey,ut=Ve.onItemHover,et=Ve.onTitleMouseLeave;$e.subMenuInstance=Object(Y.a)(me),ut({key:it,hover:!1}),et({key:it,domEvent:je})},me.onTitleClick=function(je){var Ve=Object(Y.a)(me),$e=Ve.props;if($e.onTitleClick({key:$e.eventKey,domEvent:je}),$e.triggerSubMenuAction==="hover")return;me.triggerOpenChange(!$e.isOpen,"click"),ge($e.store,me.props.eventKey,!1)},me.onSubMenuClick=function(je){typeof me.props.onClick=="function"&&me.props.onClick(me.addKeyPath(je))},me.onSelect=function(je){me.props.onSelect(je)},me.onDeselect=function(je){me.props.onDeselect(je)},me.getPrefixCls=function(){return"".concat(me.props.rootPrefixCls,"-submenu")},me.getActiveClassName=function(){return"".concat(me.getPrefixCls(),"-active")},me.getDisabledClassName=function(){return"".concat(me.getPrefixCls(),"-disabled")},me.getSelectedClassName=function(){return"".concat(me.getPrefixCls(),"-selected")},me.getOpenClassName=function(){return"".concat(me.props.rootPrefixCls,"-submenu-open")},me.saveMenuInstance=function(je){me.menuInstance=je},me.addKeyPath=function(je){return Object(Z.a)(Object(Z.a)({},je),{},{keyPath:(je.keyPath||[]).concat(me.props.eventKey)})},me.triggerOpenChange=function(je,Ve){var $e=me.props.eventKey,it=function(){me.onOpenChange({key:$e,item:Object(Y.a)(me),trigger:Ve,open:je})};Ve==="mouseenter"?me.mouseenterTimeout=setTimeout(function(){it()},0):it()},me.isChildrenSelected=function(){var je={find:!1};return ye(me.props.children,me.props.selectedKeys,je),je.find},me.isOpen=function(){return me.props.openKeys.indexOf(me.props.eventKey)!==-1},me.adjustWidth=function(){if(!me.subMenuTitle||!me.menuInstance)return;var je=J.findDOMNode(me.menuInstance);if(je.offsetWidth>=me.subMenuTitle.offsetWidth)return;je.style.minWidth="".concat(me.subMenuTitle.offsetWidth,"px")},me.saveSubMenuTitle=function(je){me.subMenuTitle=je},me.getBaseProps=function(){var je=Object(Y.a)(me),Ve=je.props;return{mode:Ve.mode==="horizontal"?"vertical":Ve.mode,visible:me.props.isOpen,level:Ve.level+1,inlineIndent:Ve.inlineIndent,focusable:!1,onClick:me.onSubMenuClick,onSelect:me.onSelect,onDeselect:me.onDeselect,onDestroy:me.onDestroy,selectedKeys:Ve.selectedKeys,eventKey:"".concat(Ve.eventKey,"-menu-"),openKeys:Ve.openKeys,motion:Ve.motion,onOpenChange:me.onOpenChange,subMenuOpenDelay:Ve.subMenuOpenDelay,parentMenu:Object(Y.a)(me),subMenuCloseDelay:Ve.subMenuCloseDelay,forceSubMenuRender:Ve.forceSubMenuRender,triggerSubMenuAction:Ve.triggerSubMenuAction,builtinPlacements:Ve.builtinPlacements,defaultActiveFirst:Ve.store.getState().defaultActiveFirst[ne(Ve.eventKey)],multiple:Ve.multiple,prefixCls:Ve.rootPrefixCls,id:me.internalMenuId,manualRef:me.saveMenuInstance,itemIcon:Ve.itemIcon,expandIcon:Ve.expandIcon,direction:Ve.direction}},me.getMotion=function(je,Ve){var $e=Object(Y.a)(me),it=$e.haveRendered,ut=me.props,et=ut.motion,Dt=ut.rootPrefixCls,Xt=Object(Z.a)(Object(Z.a)({},et),{},{leavedClassName:"".concat(Dt,"-hidden"),removeOnLeave:!1,motionAppear:it||!Ve||je!=="inline"});return Xt};var we=He.store,qe=He.eventKey,Ge=we.getState(),pt=Ge.defaultActiveFirst;me.isRootMenu=!1;var dt=!1;return pt&&(dt=pt[qe]),ge(we,qe,dt),me}return Object(N.a)(Qe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var me=this,we=this.props,qe=we.mode,Ge=we.parentMenu,pt=we.manualRef;if(pt&&pt(this),qe!=="horizontal"||!Ge.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return me.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var me=this.props,we=me.onDestroy,qe=me.eventKey;we&&we(qe),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(me){var we=this,qe=this.getBaseProps(),Ge=this.getMotion(qe.mode,qe.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||qe.visible||qe.forceSubMenuRender,!this.haveOpened)return G.createElement("div",null);var pt=qe.direction;return G.createElement(K.default,Object.assign({visible:qe.visible},Ge),function(dt){var je=dt.className,Ve=dt.style,$e=u()("".concat(qe.prefixCls,"-sub"),je,Object(v.a)({},"".concat(qe.prefixCls,"-rtl"),pt==="rtl"));return G.createElement(te,Object.assign({},qe,{id:we.internalMenuId,className:$e,style:Ve}),me)})}},{key:"render",value:function(){var me,we=Object(Z.a)({},this.props),qe=we.isOpen,Ge=this.getPrefixCls(),pt=we.mode==="inline",dt=u()(Ge,"".concat(Ge,"-").concat(we.mode),(me={},Object(v.a)(me,we.className,!!we.className),Object(v.a)(me,this.getOpenClassName(),qe),Object(v.a)(me,this.getActiveClassName(),we.active||qe&&!pt),Object(v.a)(me,this.getDisabledClassName(),we.disabled),Object(v.a)(me,this.getSelectedClassName(),this.isChildrenSelected()),me));this.internalMenuId||(we.eventKey?this.internalMenuId="".concat(we.eventKey,"$Menu"):(Ue+=1,this.internalMenuId="$__$".concat(Ue,"$Menu")));var je={},Ve={},$e={};we.disabled||(je={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ve={onClick:this.onTitleClick},$e={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var it={},ut=we.direction;pt&&(ut==="rtl"?it.paddingRight=we.inlineIndent*we.level:it.paddingLeft=we.inlineIndent*we.level);var et={};this.props.isOpen&&(et={"aria-owns":this.internalMenuId});var Dt=null;we.mode!=="horizontal"&&(Dt=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Dt=G.createElement(this.props.expandIcon,Object(Z.a)({},this.props))));var Xt=G.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:it,className:"".concat(Ge,"-title"),role:"button"},$e,Ve,{"aria-expanded":qe},et,{"aria-haspopup":"true",title:typeof we.title=="string"?we.title:void 0}),we.title,Dt||G.createElement("i",{className:"".concat(Ge,"-arrow")})),gt=this.renderChildren(we.children),Ct=we.parentMenu.isRootMenu?we.parentMenu.props.getPopupContainer:function(Vt){return Vt.parentNode},Mt=ce[we.mode],St=we.popupOffset?{offset:we.popupOffset}:{},kt=we.mode==="inline"?"":we.popupClassName;kt+=ut==="rtl"?" ".concat(Ge,"-rtl"):"";var Wt=we.disabled,dn=we.triggerSubMenuAction,$t=we.subMenuOpenDelay,ot=we.forceSubMenuRender,Pt=we.subMenuCloseDelay,Ht=we.builtinPlacements;Pe.forEach(function(Vt){return delete we[Vt]}),delete we.onClick;var zt=ut==="rtl"?Object.assign({},ue,Ht):Object.assign({},V,Ht);return delete we.direction,G.createElement("li",Object.assign({},we,je,{className:dt,role:"menuitem"}),pt&&Xt,pt&&gt,!pt&&G.createElement(U.a,{prefixCls:Ge,popupClassName:u()("".concat(Ge,"-popup"),kt),getPopupContainer:Ct,builtinPlacements:zt,popupPlacement:Mt,popupVisible:qe,popupAlign:St,popup:gt,action:Wt?[]:[dn],mouseEnterDelay:$t,mouseLeaveDelay:Pt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:ot},Xt))}}]),Qe}(G.Component);Te.defaultProps={onMouseEnter:A,onMouseLeave:A,onTitleMouseEnter:A,onTitleMouseLeave:A,onTitleClick:A,manualRef:A,mode:"vertical",title:""};var Oe=Object(j.b)(function(ft,ze){var Qe=ft.openKeys,He=ft.activeKey,me=ft.selectedKeys,we=ze.eventKey,qe=ze.subMenuKey;return{isOpen:Qe.indexOf(we)>-1,active:He[qe]===we,selectedKeys:me}})(Te);Oe.isSubMenu=!0;var Xe=Oe,rt="menuitem-overflowed",st=.5,nt=function(ft){Object(W.a)(Qe,ft);var ze=Object(D.a)(Qe);function Qe(){var He;return Object(z.a)(this,Qe),He=ze.apply(this,arguments),He.resizeObserver=null,He.mutationObserver=null,He.originalTotalWidth=0,He.overflowedItems=[],He.menuItemSizes=[],He.cancelFrameId=null,He.state={lastVisibleIndex:void 0},He.getMenuItemNodes=function(){var me=He.props.prefixCls,we=J.findDOMNode(Object(Y.a)(He));return we?[].slice.call(we.children).filter(function(qe){return qe.className.split(" ").indexOf("".concat(me,"-overflowed-submenu"))<0}):[]},He.getOverflowedSubMenuItem=function(me,we,qe){var Ge=He.props,pt=Ge.overflowedIndicator,dt=Ge.level,je=Ge.mode,Ve=Ge.prefixCls,$e=Ge.theme;if(dt!==1||je!=="horizontal")return null;var it=He.props.children[0],ut=it.props,et=ut.children,Dt=ut.title,Xt=ut.style,gt=Object(Ee.a)(ut,["children","title","style"]),Ct=Object(Z.a)({},Xt),Mt="".concat(me,"-overflowed-indicator"),St="".concat(me,"-overflowed-indicator");we.length===0&&qe!==!0?Ct=Object(Z.a)(Object(Z.a)({},Ct),{},{display:"none"}):qe&&(Ct=Object(Z.a)(Object(Z.a)({},Ct),{},{visibility:"hidden",position:"absolute"}),Mt="".concat(Mt,"-placeholder"),St="".concat(St,"-placeholder"));var kt=$e?"".concat(Ve,"-").concat($e):"",Wt={};return Pe.forEach(function(dn){gt[dn]!==void 0&&(Wt[dn]=gt[dn])}),G.createElement(Xe,Object.assign({title:pt,className:"".concat(Ve,"-overflowed-submenu"),popupClassName:kt},Wt,{key:Mt,eventKey:St,disabled:!1,style:Ct}),we)},He.setChildrenWidthAndResize=function(){if(He.props.mode!=="horizontal")return;var me=J.findDOMNode(Object(Y.a)(He));if(!me)return;var we=me.children;if(!we||we.length===0)return;var qe=me.children[we.length-1];Ie(qe,"display","inline-block");var Ge=He.getMenuItemNodes(),pt=Ge.filter(function(dt){return dt.className.split(" ").indexOf(rt)>=0});pt.forEach(function(dt){Ie(dt,"display","inline-block")}),He.menuItemSizes=Ge.map(function(dt){return xe(dt,!0)}),pt.forEach(function(dt){Ie(dt,"display","none")}),He.overflowedIndicatorWidth=xe(me.children[me.children.length-1],!0),He.originalTotalWidth=He.menuItemSizes.reduce(function(dt,je){return dt+je},0),He.handleResize(),Ie(qe,"display","none")},He.handleResize=function(){if(He.props.mode!=="horizontal")return;var me=J.findDOMNode(Object(Y.a)(He));if(!me)return;var we=xe(me);He.overflowedItems=[];var qe=0,Ge;He.originalTotalWidth>we+st&&(Ge=-1,He.menuItemSizes.forEach(function(pt){qe+=pt,qe+He.overflowedIndicatorWidth<=we&&(Ge+=1)})),He.setState({lastVisibleIndex:Ge})},He}return Object(N.a)(Qe,[{key:"componentDidMount",value:function(){var me=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var we=J.findDOMNode(this);if(!we)return;this.resizeObserver=new I.default(function(qe){qe.forEach(function(){var Ge=me.cancelFrameId;cancelAnimationFrame(Ge),me.cancelFrameId=requestAnimationFrame(me.setChildrenWidthAndResize)})}),[].slice.call(we.children).concat(we).forEach(function(qe){me.resizeObserver.observe(qe)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){me.resizeObserver.disconnect(),[].slice.call(we.children).concat(we).forEach(function(qe){me.resizeObserver.observe(qe)}),me.setChildrenWidthAndResize()}),this.mutationObserver.observe(we,{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(me){var we=this,qe=this.state.lastVisibleIndex;return(me||[]).reduce(function(Ge,pt,dt){var je=pt;if(we.props.mode==="horizontal"){var Ve=we.getOverflowedSubMenuItem(pt.props.eventKey,[]);qe!==void 0&&we.props.className.indexOf("".concat(we.props.prefixCls,"-root"))!==-1&&(dt>qe&&(je=G.cloneElement(pt,{style:{display:"none"},eventKey:"".concat(pt.props.eventKey,"-hidden"),className:"".concat(rt)})),dt===qe+1&&(we.overflowedItems=me.slice(qe+1).map(function(it){return G.cloneElement(it,{key:it.props.eventKey,mode:"vertical-left"})}),Ve=we.getOverflowedSubMenuItem(pt.props.eventKey,we.overflowedItems)));var $e=[].concat(Object(ke.a)(Ge),[Ve,je]);return dt===me.length-1&&$e.push(we.getOverflowedSubMenuItem(pt.props.eventKey,[],!0)),$e}return[].concat(Object(ke.a)(Ge),[je])},[])}},{key:"render",value:function(){var me=this.props,we=me.visible,qe=me.prefixCls,Ge=me.overflowedIndicator,pt=me.mode,dt=me.level,je=me.tag,Ve=me.children,$e=me.theme,it=Object(Ee.a)(me,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),ut=je;return G.createElement(ut,Object.assign({},it),this.renderChildren(Ve))}}]),Qe}(G.Component);nt.defaultProps={tag:"div",className:""};var bt=nt;function yt(ft){return ft.length?ft.every(function(ze){return!!ze.props.disabled}):!0}function Ne(ft,ze,Qe){var He=ft.getState();ft.setState({activeKey:Object(Z.a)(Object(Z.a)({},He.activeKey),{},Object(v.a)({},ze,Qe))})}function Re(ft){return ft.eventKey||"0-menu-"}function Je(ft,ze){var Qe=ze,He=ft.children,me=ft.eventKey;if(Qe){var we;if(fe(He,function(qe,Ge){qe&&qe.props&&!qe.props.disabled&&Qe===X(qe,me,Ge)&&(we=!0)}),we)return Qe}return Qe=null,ft.defaultActiveFirst&&fe(He,function(qe,Ge){!Qe&&qe&&!qe.props.disabled&&(Qe=X(qe,me,Ge))}),Qe}function tt(ft){if(ft){var ze=this.instanceArray.indexOf(ft);ze!==-1?this.instanceArray[ze]=ft:this.instanceArray.push(ft)}}var le=function(ft){Object(W.a)(Qe,ft);var ze=Object(D.a)(Qe);function Qe(He){var me;return Object(z.a)(this,Qe),me=ze.call(this,He),me.onKeyDown=function(we,qe){var Ge=we.keyCode,pt;if(me.getFlatInstanceArray().forEach(function(je){je&&je.props.active&&je.onKeyDown&&(pt=je.onKeyDown(we))}),pt)return 1;var dt=null;return(Ge===f.a.UP||Ge===f.a.DOWN)&&(dt=me.step(Ge===f.a.UP?-1:1)),dt?(we.preventDefault(),Ne(me.props.store,Re(me.props),dt.props.eventKey),typeof qe=="function"&&qe(dt),1):void 0},me.onItemHover=function(we){var qe=we.key,Ge=we.hover;Ne(me.props.store,Re(me.props),Ge?qe:null)},me.onDeselect=function(we){me.props.onDeselect(we)},me.onSelect=function(we){me.props.onSelect(we)},me.onClick=function(we){me.props.onClick(we)},me.onOpenChange=function(we){me.props.onOpenChange(we)},me.onDestroy=function(we){me.props.onDestroy(we)},me.getFlatInstanceArray=function(){return me.instanceArray},me.step=function(we){var qe=me.getFlatInstanceArray(),Ge=me.props.store.getState().activeKey[Re(me.props)],pt=qe.length;if(!pt)return null;we<0&&(qe=qe.concat().reverse());var dt=-1;if(qe.every(function(it,ut){return it&&it.props.eventKey===Ge?(dt=ut,!1):!0}),!me.props.defaultActiveFirst&&dt!==-1&&yt(qe.slice(dt,pt-1)))return;var je=(dt+1)%pt,Ve=je;do{var $e=qe[Ve];if(!$e||$e.props.disabled)Ve=(Ve+1)%pt;else return $e}while(Ve!==je);return null},me.renderCommonMenuItem=function(we,qe,Ge){var pt=me.props.store.getState(),dt=Object(Y.a)(me),je=dt.props,Ve=X(we,je.eventKey,qe),$e=we.props;if(!$e||typeof we.type=="string")return we;var it=Ve===pt.activeKey,ut=Object(Z.a)(Object(Z.a)({mode:$e.mode||je.mode,level:je.level,inlineIndent:je.inlineIndent,renderMenuItem:me.renderMenuItem,rootPrefixCls:je.prefixCls,index:qe,parentMenu:je.parentMenu,manualRef:$e.disabled?void 0:Object(p.a)(we.ref,tt.bind(Object(Y.a)(me))),eventKey:Ve,active:!$e.disabled&&it,multiple:je.multiple,onClick:function(Dt){($e.onClick||A)(Dt),me.onClick(Dt)},onItemHover:me.onItemHover,motion:je.motion,subMenuOpenDelay:je.subMenuOpenDelay,subMenuCloseDelay:je.subMenuCloseDelay,forceSubMenuRender:je.forceSubMenuRender,onOpenChange:me.onOpenChange,onDeselect:me.onDeselect,onSelect:me.onSelect,builtinPlacements:je.builtinPlacements,itemIcon:$e.itemIcon||me.props.itemIcon,expandIcon:$e.expandIcon||me.props.expandIcon},Ge),{},{direction:je.direction});return(je.mode==="inline"||Me())&&(ut.triggerSubMenuAction="click"),G.cloneElement(we,ut)},me.renderMenuItem=function(we,qe,Ge){if(!we)return null;var pt=me.props.store.getState(),dt={openKeys:pt.openKeys,selectedKeys:pt.selectedKeys,triggerSubMenuAction:me.props.triggerSubMenuAction,subMenuKey:Ge};return me.renderCommonMenuItem(we,qe,dt)},He.store.setState({activeKey:Object(Z.a)(Object(Z.a)({},He.store.getState().activeKey),{},Object(v.a)({},He.eventKey,Je(He,He.activeKey)))}),me.instanceArray=[],me}return Object(N.a)(Qe,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(me){return this.props.visible||me.visible||this.props.className!==me.className||!s()(this.props.style,me.style)}},{key:"componentDidUpdate",value:function(me){var we=this.props,qe="activeKey"in we?we.activeKey:we.store.getState().activeKey[Re(we)],Ge=Je(we,qe);if(Ge!==qe)Ne(we.store,Re(we),Ge);else if("activeKey"in me){var pt=Je(me,me.activeKey);Ge!==pt&&Ne(we.store,Re(we),Ge)}}},{key:"render",value:function(){var me=this,we=Object(T.a)({},this.props);this.instanceArray=[];var qe=u()(we.prefixCls,we.className,"".concat(we.prefixCls,"-").concat(we.mode)),Ge={className:qe,role:we.role||"menu"};we.id&&(Ge.id=we.id),we.focusable&&(Ge.tabIndex=0,Ge.onKeyDown=this.onKeyDown);var pt=we.prefixCls,dt=we.eventKey,je=we.visible,Ve=we.level,$e=we.mode,it=we.overflowedIndicator,ut=we.theme;return Pe.forEach(function(et){return delete we[et]}),delete we.onClick,G.createElement(bt,Object.assign({},we,{prefixCls:pt,mode:$e,tag:"ul",level:Ve,theme:ut,visible:je,overflowedIndicator:it},Ge),G.Children.map(we.children,function(et,Dt){return me.renderMenuItem(et,Dt,dt||"0-menu-")}))}}]),Qe}(G.Component);le.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:A};var $=Object(j.b)()(le),te=$,ae=B("Kwbf");function de(ft,ze,Qe){var He=ft.prefixCls,me=ft.motion,we=ft.defaultMotions,qe=we===void 0?{}:we,Ge=ft.openAnimation,pt=ft.openTransitionName,dt=ze.switchingModeFromInline;if(me)return me;if(Object(l.a)(Ge)==="object"&&Ge)Object(ae.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Ge=="string")return{motionName:"".concat(He,"-open-").concat(Ge)};if(pt)return{motionName:pt};var je=qe[Qe];return je||(dt?null:qe.other)}var ie=function(ft){Object(W.a)(Qe,ft);var ze=Object(D.a)(Qe);function Qe(He){var me;Object(z.a)(this,Qe),me=ze.call(this,He),me.inlineOpenKeys=[],me.onSelect=function(Ge){var pt=Object(Y.a)(me),dt=pt.props;if(dt.selectable){var je=me.store.getState(),Ve=je.selectedKeys,$e=Ge.key;dt.multiple?Ve=Ve.concat([$e]):Ve=[$e],"selectedKeys"in dt||me.store.setState({selectedKeys:Ve}),dt.onSelect(Object(Z.a)(Object(Z.a)({},Ge),{},{selectedKeys:Ve}))}},me.onClick=function(Ge){var pt=me.getRealMenuMode(),dt=Object(Y.a)(me),je=dt.store,Ve=dt.props.onOpenChange;pt!=="inline"&&!("openKeys"in me.props)&&(je.setState({openKeys:[]}),Ve([])),me.props.onClick(Ge)},me.onKeyDown=function(Ge,pt){me.innerMenu.getWrappedInstance().onKeyDown(Ge,pt)},me.onOpenChange=function(Ge){var pt=Object(Y.a)(me),dt=pt.props,je=me.store.getState().openKeys.concat(),Ve=!1,$e=function(ut){var et=!1;if(ut.open)et=je.indexOf(ut.key)===-1,et&&je.push(ut.key);else{var Dt=je.indexOf(ut.key);et=Dt!==-1,et&&je.splice(Dt,1)}Ve=Ve||et};Array.isArray(Ge)?Ge.forEach($e):$e(Ge),Ve&&("openKeys"in me.props||me.store.setState({openKeys:je}),dt.onOpenChange(je))},me.onDeselect=function(Ge){var pt=Object(Y.a)(me),dt=pt.props;if(dt.selectable){var je=me.store.getState().selectedKeys.concat(),Ve=Ge.key,$e=je.indexOf(Ve);$e!==-1&&je.splice($e,1),"selectedKeys"in dt||me.store.setState({selectedKeys:je}),dt.onDeselect(Object(Z.a)(Object(Z.a)({},Ge),{},{selectedKeys:je}))}},me.onMouseEnter=function(Ge){me.restoreModeVerticalFromInline();var pt=me.props.onMouseEnter;pt&&pt(Ge)},me.onTransitionEnd=function(Ge){var pt=Ge.propertyName==="width"&&Ge.target===Ge.currentTarget,dt=Ge.target.className,je=Object.prototype.toString.call(dt)==="[object SVGAnimatedString]"?dt.animVal:dt,Ve=Ge.propertyName==="font-size"&&je.indexOf("anticon")>=0;(pt||Ve)&&me.restoreModeVerticalFromInline()},me.setInnerMenu=function(Ge){me.innerMenu=Ge},me.isRootMenu=!0;var we=He.defaultSelectedKeys,qe=He.defaultOpenKeys;return"selectedKeys"in He&&(we=He.selectedKeys||[]),"openKeys"in He&&(qe=He.openKeys||[]),me.store=Object(j.c)({selectedKeys:we,openKeys:qe,activeKey:{"0-menu-":Je(He,He.activeKey)}}),me.state={switchingModeFromInline:!1},me}return Object(N.a)(Qe,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(me){this.updateOpentKeysWhenSwitchMode(me),this.updateMiniStore();var we=this.props,qe=we.siderCollapsed,Ge=we.inlineCollapsed,pt=we.onOpenChange;(!me.inlineCollapsed&&Ge||!me.siderCollapsed&&qe)&&pt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(me){var we=this.props,qe=this.store,Ge=this.inlineOpenKeys,pt=qe.getState(),dt={};me.mode==="inline"&&we.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in we||((we.inlineCollapsed&&!me.inlineCollapsed||we.siderCollapsed&&!me.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=pt.openKeys.concat(),dt.openKeys=[]),(!we.inlineCollapsed&&me.inlineCollapsed||!we.siderCollapsed&&me.siderCollapsed)&&(dt.openKeys=Ge,this.inlineOpenKeys=[])),Object.keys(dt).length&&qe.setState(dt)}},{key:"updateMenuDisplay",value:function(){var me=this.props.collapsedWidth,we=this.store,qe=this.prevOpenKeys,Ge=this.getInlineCollapsed()&&(me===0||me==="0"||me==="0px");Ge?(this.prevOpenKeys=we.getState().openKeys.concat(),this.store.setState({openKeys:[]})):qe&&(this.store.setState({openKeys:qe}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var me=this.props.mode,we=this.state.switchingModeFromInline,qe=this.getInlineCollapsed();return we&&qe?"inline":qe?"vertical":me}},{key:"getInlineCollapsed",value:function(){var me=this.props,we=me.inlineCollapsed,qe=me.siderCollapsed;return qe!==void 0?qe:we}},{key:"restoreModeVerticalFromInline",value:function(){var me=this.state.switchingModeFromInline;me&&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 me=Object(Z.a)({},Object(n.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),we=this.getRealMenuMode();return me.className+=" ".concat(me.prefixCls,"-root"),me.direction==="rtl"&&(me.className+=" ".concat(me.prefixCls,"-rtl")),me=Object(Z.a)(Object(Z.a)({},me),{},{mode:we,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:de(this.props,this.state,we)}),delete me.openAnimation,delete me.openTransitionName,G.createElement(j.a,{store:this.store},G.createElement(te,Object.assign({},me,{ref:this.setInnerMenu}),this.props.children))}}]),Qe}(G.Component);ie.defaultProps={selectable:!0,onClick:A,onSelect:A,onOpenChange:A,onDeselect:A,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:G.createElement("span",null,"\xB7\xB7\xB7")};var se=ie,pe=function(ft){Object(W.a)(Qe,ft);var ze=Object(D.a)(Qe);function Qe(){var He;return Object(z.a)(this,Qe),He=ze.apply(this,arguments),He.onKeyDown=function(me){var we=me.keyCode;return we===f.a.ENTER?(He.onClick(me),!0):void 0},He.onMouseLeave=function(me){var we=He.props,qe=we.eventKey,Ge=we.onItemHover,pt=we.onMouseLeave;Ge({key:qe,hover:!1}),pt({key:qe,domEvent:me})},He.onMouseEnter=function(me){var we=He.props,qe=we.eventKey,Ge=we.onItemHover,pt=we.onMouseEnter;Ge({key:qe,hover:!0}),pt({key:qe,domEvent:me})},He.onClick=function(me){var we=He.props,qe=we.eventKey,Ge=we.multiple,pt=we.onClick,dt=we.onSelect,je=we.onDeselect,Ve=we.isSelected,$e={key:qe,keyPath:[qe],item:Object(Y.a)(He),domEvent:me};pt($e),Ge?Ve?je($e):dt($e):Ve||dt($e)},He.saveNode=function(me){He.node=me},He}return Object(N.a)(Qe,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var me=this.props;me.onDestroy&&me.onDestroy(me.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 me,we=Object(Z.a)({},this.props),qe=u()(this.getPrefixCls(),we.className,(me={},Object(v.a)(me,this.getActiveClassName(),!we.disabled&&we.active),Object(v.a)(me,this.getSelectedClassName(),we.isSelected),Object(v.a)(me,this.getDisabledClassName(),we.disabled),me)),Ge=Object(Z.a)(Object(Z.a)({},we.attribute),{},{title:typeof we.title=="string"?we.title:void 0,className:qe,role:we.role||"menuitem","aria-disabled":we.disabled});we.role==="option"?Ge=Object(Z.a)(Object(Z.a)({},Ge),{},{role:"option","aria-selected":we.isSelected}):(we.role===null||we.role==="none")&&(Ge.role="none");var pt={onClick:we.disabled?null:this.onClick,onMouseLeave:we.disabled?null:this.onMouseLeave,onMouseEnter:we.disabled?null:this.onMouseEnter},dt=Object(Z.a)({},we.style);we.mode==="inline"&&(we.direction==="rtl"?dt.paddingRight=we.inlineIndent*we.level:dt.paddingLeft=we.inlineIndent*we.level),Pe.forEach(function(Ve){return delete we[Ve]}),delete we.direction;var je=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(je=G.createElement(this.props.itemIcon,this.props)),G.createElement("li",Object.assign({},Object(n.default)(we,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Ge,pt,{style:dt,ref:this.saveNode}),we.children,je)}}]),Qe}(G.Component);pe.isMenuItem=!0,pe.defaultProps={onSelect:A,onMouseEnter:A,onMouseLeave:A,manualRef:A};var be=Object(j.b)(function(ft,ze){var Qe=ft.activeKey,He=ft.selectedKeys,me=ze.eventKey,we=ze.subMenuKey;return{active:Qe[we]===me,isSelected:He.indexOf(me)!==-1}})(pe),_e=be,Le=function(ft){Object(W.a)(Qe,ft);var ze=Object(D.a)(Qe);function Qe(){var He;return Object(z.a)(this,Qe),He=ze.apply(this,arguments),He.renderInnerMenuItem=function(me){var we=He.props,qe=we.renderMenuItem,Ge=we.index;return qe(me,Ge,He.props.subMenuKey)},He}return Object(N.a)(Qe,[{key:"render",value:function(){var me=Object(T.a)({},this.props),we=me.className,qe=we===void 0?"":we,Ge=me.rootPrefixCls,pt="".concat(Ge,"-item-group-title"),dt="".concat(Ge,"-item-group-list"),je=me.title,Ve=me.children;return Pe.forEach(function($e){return delete me[$e]}),delete me.onClick,delete me.direction,G.createElement("li",Object.assign({},me,{className:"".concat(qe," ").concat(Ge,"-item-group")}),G.createElement("div",{className:pt,title:typeof je=="string"?je:void 0},je),G.createElement("ul",{className:dt},G.Children.map(Ve,this.renderInnerMenuItem)))}}]),Qe}(G.Component);Le.isMenuItemGroup=!0,Le.defaultProps={disabled:!0};var Ye=Le,lt=function(ze){var Qe=ze.className,He=ze.rootPrefixCls,me=ze.style;return G.createElement("li",{className:"".concat(Qe," ").concat(He,"-item-divider"),style:me})};lt.defaultProps={disabled:!0,className:"",style:{}};var Et=lt,vt=he.e=se},"24hK":function(Be,he,B){"use strict";B.d(he,"a",function(){return z});class Z{constructor(N){this.element=N,this.next=Z.Undefined,this.prev=Z.Undefined}}Z.Undefined=new Z(void 0);class z{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 N=this._first;for(;N!==Z.Undefined;){const Y=N.next;N.prev=Z.Undefined,N.next=Z.Undefined,N=Y}this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}unshift(N){return this._insert(N,!1)}push(N){return this._insert(N,!0)}_insert(N,Y){const W=new Z(N);if(this._first===Z.Undefined)this._first=W,this._last=W;else if(Y){const G=this._last;this._last=W,W.prev=G,G.next=W}else{const G=this._first;this._first=W,W.next=G,G.prev=W}this._size+=1;let D=!1;return()=>{D||(D=!0,this._remove(W))}}shift(){if(this._first===Z.Undefined)return;{const N=this._first.element;return this._remove(this._first),N}}pop(){if(this._last===Z.Undefined)return;{const N=this._last.element;return this._remove(this._last),N}}_remove(N){if(N.prev!==Z.Undefined&&N.next!==Z.Undefined){const Y=N.prev;Y.next=N.next,N.next.prev=Y}else N.prev===Z.Undefined&&N.next===Z.Undefined?(this._first=Z.Undefined,this._last=Z.Undefined):N.next===Z.Undefined?(this._last=this._last.prev,this._last.next=Z.Undefined):N.prev===Z.Undefined&&(this._first=this._first.next,this._first.prev=Z.Undefined);this._size-=1}*[Symbol.iterator](){let N=this._first;for(;N!==Z.Undefined;)yield N.element,N=N.next}}},"3/fG":function(Be,he,B){"use strict";B.d(he,"a",function(){return z});function Z(N,Y){let W;return Y.length===0?W=N:W=N.replace(/\{(\d+)\}/g,function(D,G){const j=G[0];return typeof Y[j]!="undefined"?Y[j]:D}),W}function z(N,Y,...W){return Z(Y,W)}},"4qgm":function(Be,he){Be.exports="data:image/png;base64,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"},"4u4S":function(Be,he){Be.exports="data:image/png;base64,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"},"55Ip":function(Be,he,B){"use strict";B.d(he,"a",function(){return a});var Z=B("Ty5D"),z=B("dI71"),N=B("q1tI"),Y=B.n(N),W=B("YS25"),D=B("17x9"),G=B.n(D),j=B("wx14"),n=B("zLVn"),T=B("9R94"),v=function(b){Object(z.a)(g,b);function g(){for(var C,x=arguments.length,m=new Array(x),P=0;P<x;P++)m[P]=arguments[P];return C=b.call.apply(b,[this].concat(m))||this,C.history=Object(W.a)(C.props),C}var h=g.prototype;return h.render=function(){return Y.a.createElement(Z.c,{history:this.history,children:this.props.children})},g}(Y.a.Component),f=function(b){Object(z.a)(g,b);function g(){for(var C,x=arguments.length,m=new Array(x),P=0;P<x;P++)m[P]=arguments[P];return C=b.call.apply(b,[this].concat(m))||this,C.history=Object(W.b)(C.props),C}var h=g.prototype;return h.render=function(){return Y.a.createElement(Z.c,{history:this.history,children:this.props.children})},g}(Y.a.Component),p=function(g,h){return typeof g=="function"?g(h):g},c=function(g,h){return typeof g=="string"?Object(W.c)(g,null,null,h):g},s=function(g){return g},d=Y.a.forwardRef;typeof d=="undefined"&&(d=s);function u(b){return!!(b.metaKey||b.altKey||b.ctrlKey||b.shiftKey)}var l=d(function(b,g){var h=b.innerRef,C=b.navigate,x=b.onClick,m=Object(n.a)(b,["innerRef","navigate","onClick"]),P=m.target,k=Object(j.a)({},m,{onClick:function(S){try{x&&x(S)}catch(F){throw S.preventDefault(),F}!S.defaultPrevented&&S.button===0&&(!P||P==="_self")&&!u(S)&&(S.preventDefault(),C())}});return s!==d?k.ref=g||h:k.ref=h,Y.a.createElement("a",k)}),a=d(function(b,g){var h=b.component,C=h===void 0?l:h,x=b.replace,m=b.to,P=b.innerRef,k=Object(n.a)(b,["component","replace","to","innerRef"]);return Y.a.createElement(Z.e.Consumer,null,function(y){y||Object(T.a)(!1);var S=y.history,F=c(p(m,y.location),y.location),A=F?S.createHref(F):"",X=Object(j.a)({},k,{href:A,navigate:function(){var fe=p(m,y.location),ye=x?S.replace:S.push;ye(fe)}});return s!==d?X.ref=g||P:X.innerRef=P,Y.a.createElement(C,X)})});if(!1)var i,R;var O=function(g){return g},w=Y.a.forwardRef;typeof w=="undefined"&&(w=O);function M(){for(var b=arguments.length,g=new Array(b),h=0;h<b;h++)g[h]=arguments[h];return g.filter(function(C){return C}).join(" ")}var L=w(function(b,g){var h=b["aria-current"],C=h===void 0?"page":h,x=b.activeClassName,m=x===void 0?"active":x,P=b.activeStyle,k=b.className,y=b.exact,S=b.isActive,F=b.location,A=b.sensitive,X=b.strict,ne=b.style,fe=b.to,ye=b.innerRef,Pe=Object(n.a)(b,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return Y.a.createElement(Z.e.Consumer,null,function(xe){xe||Object(T.a)(!1);var Ie=F||xe.location,Me=c(p(fe,Ie),Ie),ke=Me.pathname,Ee=ke&&ke.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),J=Ee?Object(Z.f)(Ie.pathname,{path:Ee,exact:y,sensitive:A,strict:X}):null,I=!!(S?S(J,Ie):J),U=I?M(k,m):k,K=I?Object(j.a)({},ne,{},P):ne,q=Object(j.a)({"aria-current":I&&C||null,className:U,style:K,to:Me},Pe);return O!==w?q.ref=g||ye:q.innerRef=ye,Y.a.createElement(a,q)})});if(!1)var _},"5D2P":function(Be,he){Be.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(Be,he,B){"use strict";var Z,z;function N(Y,W,D){var G=function(j,n){return Y.js_beautify(j,n)};return G.js=Y.js_beautify,G.css=W.css_beautify,G.html=D.html_beautify,G.js_beautify=Y.js_beautify,G.css_beautify=W.css_beautify,G.html_beautify=D.html_beautify,G}!(Z=[B("6UM0"),B("TXwP"),B("psGv")],z=function(Y,W,D){return N(Y,W,D)}.apply(he,Z),z!==void 0&&(Be.exports=z))},"5Y4S":function(Be,he,B){"use strict";B.d(he,"a",function(){return N});var Z=B("MNsG");const z=Z.b.performance&&typeof Z.b.performance.now=="function";class N{constructor(Y){this._highResolution=z&&Y,this._startTime=this._now(),this._stopTime=-1}static create(Y=!0){return new N(Y)}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(Be,he,B){"use strict";B.d(he,"a",function(){return w});var Z=B("wx14"),z=B("rePB"),N=B("VTBJ"),Y=B("1OyB"),W=B("vuIU"),D=B("Ji7U"),G=B("LK+K"),j=B("q1tI"),n=B.n(j),T=B("TSYQ"),v=B.n(T),f=function(L){var _,b="".concat(L.rootPrefixCls,"-item"),g=v()(b,"".concat(b,"-").concat(L.page),(_={},Object(z.a)(_,"".concat(b,"-active"),L.active),Object(z.a)(_,L.className,!!L.className),Object(z.a)(_,"".concat(b,"-disabled"),!L.page),_)),h=function(){L.onClick(L.page)},C=function(m){L.onKeyPress(m,L.onClick,L.page)};return n.a.createElement("li",{title:L.showTitle?L.page:null,className:g,onClick:h,onKeyPress:C,tabIndex:"0"},L.itemRender(L.page,"page",n.a.createElement("a",{rel:"nofollow"},L.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},s=function(M){Object(D.a)(_,M);var L=Object(G.a)(_);function _(){var b;Object(Y.a)(this,_);for(var g=arguments.length,h=new Array(g),C=0;C<g;C++)h[C]=arguments[C];return b=L.call.apply(L,[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 m=b.props,P=m.goButton,k=m.quickGo,y=m.rootPrefixCls,S=b.state.goInputText;if(P||S==="")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 m=b.state.goInputText;if(m==="")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 g=this.state,h=g.goInputText,C=g.current;return!h||isNaN(h)?C:Number(h)}},{key:"getPageSizeOptions",value:function(){var g=this.props,h=g.pageSize,C=g.pageSizeOptions;return C.some(function(x){return x.toString()===h.toString()})?C:C.concat([h.toString()]).sort(function(x,m){var P=isNaN(Number(x))?0:Number(x),k=isNaN(Number(m))?0:Number(m);return P-k})}},{key:"render",value:function(){var g=this,h=this.props,C=h.pageSize,x=h.locale,m=h.rootPrefixCls,P=h.changeSize,k=h.quickGo,y=h.goButton,S=h.selectComponentClass,F=h.buildOptionText,A=h.selectPrefixCls,X=h.disabled,ne=this.state.goInputText,fe="".concat(m,"-options"),ye=S,Pe=null,xe=null,Ie=null;if(!P&&!k)return null;var Me=this.getPageSizeOptions();if(P&&ye){var ke=Me.map(function(Ee,J){return n.a.createElement(ye.Option,{key:J,value:Ee.toString()},(F||g.buildOptionText)(Ee))});Pe=n.a.createElement(ye,{disabled:X,prefixCls:A,showSearch:!1,className:"".concat(fe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||Me[0]).toString(),onChange:this.changeSize,getPopupContainer:function(J){return J.parentNode}},ke)}return k&&(y&&(Ie=typeof y=="boolean"?n.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:X,className:"".concat(fe,"-quick-jumper-button")},x.jump_to_confirm):n.a.createElement("span",{onClick:this.go,onKeyUp:this.go},y)),xe=n.a.createElement("div",{className:"".concat(fe,"-quick-jumper")},x.jump_to,n.a.createElement("input",{disabled:X,type:"text",value:ne,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),x.page,Ie)),n.a.createElement("li",{className:"".concat(fe)},Pe,xe)}}]),_}(n.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var d=s,u=B("N2Kk");function l(){}function a(M){return typeof M=="number"&&isFinite(M)&&Math.floor(M)===M}function i(M,L,_){return _}function R(M,L,_){var b=typeof M=="undefined"?L.pageSize:M;return Math.floor((_.total-1)/b)+1}var O=function(M){Object(D.a)(_,M);var L=Object(G.a)(_);function _(b){var g;Object(Y.a)(this,_),g=L.call(this,b),g.getJumpPrevPage=function(){return Math.max(1,g.state.current-(g.props.showLessItems?3:5))},g.getJumpNextPage=function(){return Math.min(R(void 0,g.state,g.props),g.state.current+(g.props.showLessItems?3:5))},g.getItemIcon=function(P,k){var y=g.props.prefixCls,S=P||n.a.createElement("button",{type:"button","aria-label":k,className:"".concat(y,"-item-link")});return typeof P=="function"&&(S=n.a.createElement(P,Object(N.a)({},g.props))),S},g.savePaginationNode=function(P){g.paginationNode=P},g.isValid=function(P){return a(P)&&P!==g.state.current},g.shouldDisplayQuickJumper=function(){var P=g.props,k=P.showQuickJumper,y=P.pageSize,S=P.total;return S<=y?!1:k},g.handleKeyDown=function(P){(P.keyCode===c.ARROW_UP||P.keyCode===c.ARROW_DOWN)&&P.preventDefault()},g.handleKeyUp=function(P){var k=g.getValidValue(P),y=g.state.currentInputValue;k!==y&&g.setState({currentInputValue:k}),P.keyCode===c.ENTER?g.handleChange(k):P.keyCode===c.ARROW_UP?g.handleChange(k-1):P.keyCode===c.ARROW_DOWN&&g.handleChange(k+1)},g.changePageSize=function(P){var k=g.state.current,y=R(P,g.state,g.props);k=k>y?y:k,y===0&&(k=g.state.current),typeof P=="number"&&("pageSize"in g.props||g.setState({pageSize:P}),"current"in g.props||g.setState({current:k,currentInputValue:k})),g.props.onShowSizeChange(k,P),"onChange"in g.props&&g.props.onChange&&g.props.onChange(k,P)},g.handleChange=function(P){var k=g.props.disabled,y=P;if(g.isValid(y)&&!k){var S=R(void 0,g.state,g.props);y>S?y=S:y<1&&(y=1),"current"in g.props||g.setState({current:y,currentInputValue:y});var F=g.state.pageSize;return g.props.onChange(y,F),y}return g.state.current},g.prev=function(){g.hasPrev()&&g.handleChange(g.state.current-1)},g.next=function(){g.hasNext()&&g.handleChange(g.state.current+1)},g.jumpPrev=function(){g.handleChange(g.getJumpPrevPage())},g.jumpNext=function(){g.handleChange(g.getJumpNextPage())},g.hasPrev=function(){return g.state.current>1},g.hasNext=function(){return g.state.current<R(void 0,g.state,g.props)},g.runIfEnter=function(P,k){if(P.key==="Enter"||P.charCode===13){for(var y=arguments.length,S=new Array(y>2?y-2:0),F=2;F<y;F++)S[F-2]=arguments[F];k.apply(void 0,S)}},g.runIfEnterPrev=function(P){g.runIfEnter(P,g.prev)},g.runIfEnterNext=function(P){g.runIfEnter(P,g.next)},g.runIfEnterJumpPrev=function(P){g.runIfEnter(P,g.jumpPrev)},g.runIfEnterJumpNext=function(P){g.runIfEnter(P,g.jumpNext)},g.handleGoTO=function(P){(P.keyCode===c.ENTER||P.type==="click")&&g.handleChange(g.state.currentInputValue)};var h=b.onChange!==l,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 m=b.defaultPageSize;return"pageSize"in b&&(m=b.pageSize),x=Math.min(x,R(m,void 0,b)),g.state={current:x,currentInputValue:x,pageSize:m},g}return Object(W.a)(_,[{key:"componentDidUpdate",value:function(g,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(g){var h=g.target.value,C=R(void 0,this.state,this.props),x=this.state.currentInputValue,m;return h===""?m=h:isNaN(Number(h))?m=x:h>=C?m=C:m=Number(h),m}},{key:"getShowSizeChanger",value:function(){var g=this.props,h=g.showSizeChanger,C=g.total,x=g.totalBoundaryShowSizeChanger;return typeof h!="undefined"?h:C>x}},{key:"renderPrev",value:function(g){var h=this.props,C=h.prevIcon,x=h.itemRender,m=x(g,"prev",this.getItemIcon(C,"prev page")),P=!this.hasPrev();return Object(j.isValidElement)(m)?Object(j.cloneElement)(m,{disabled:P}):m}},{key:"renderNext",value:function(g){var h=this.props,C=h.nextIcon,x=h.itemRender,m=x(g,"next",this.getItemIcon(C,"next page")),P=!this.hasNext();return Object(j.isValidElement)(m)?Object(j.cloneElement)(m,{disabled:P}):m}},{key:"render",value:function(){var g=this,h=this.props,C=h.prefixCls,x=h.className,m=h.style,P=h.disabled,k=h.hideOnSinglePage,y=h.total,S=h.locale,F=h.showQuickJumper,A=h.showLessItems,X=h.showTitle,ne=h.showTotal,fe=h.simple,ye=h.itemRender,Pe=h.showPrevNextJumpers,xe=h.jumpPrevIcon,Ie=h.jumpNextIcon,Me=h.selectComponentClass,ke=h.selectPrefixCls,Ee=h.pageSizeOptions,J=this.state,I=J.current,U=J.pageSize,K=J.currentInputValue;if(k===!0&&y<=U)return null;var q=R(void 0,this.state,this.props),V=[],ue=null,Ae=null,Ue=null,ce=null,ge=null,Te=F&&F.goButton,Oe=A?1:2,Xe=I-1>0?I-1:0,rt=I+1<q?I+1:q,st=Object.keys(this.props).reduce(function(ie,se){return(se.substr(0,5)==="data-"||se.substr(0,5)==="aria-"||se==="role")&&(ie[se]=g.props[se]),ie},{});if(fe)return Te&&(typeof Te=="boolean"?ge=n.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},S.jump_to_confirm):ge=n.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Te),ge=n.a.createElement("li",{title:X?"".concat(S.jump_to).concat(I,"/").concat(q):null,className:"".concat(C,"-simple-pager")},ge)),n.a.createElement("ul",Object(Z.a)({className:v()(C,"".concat(C,"-simple"),Object(z.a)({},"".concat(C,"-disabled"),P),x),style:m,ref:this.savePaginationNode},st),n.a.createElement("li",{title:X?S.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:v()("".concat(C,"-prev"),Object(z.a)({},"".concat(C,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Xe)),n.a.createElement("li",{title:X?"".concat(I,"/").concat(q):null,className:"".concat(C,"-simple-pager")},n.a.createElement("input",{type:"text",value:K,disabled:P,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),n.a.createElement("span",{className:"".concat(C,"-slash")},"/"),q),n.a.createElement("li",{title:X?S.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:v()("".concat(C,"-next"),Object(z.a)({},"".concat(C,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(rt)),ge);if(q<=3+Oe*2){var nt={locale:S,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:X,itemRender:ye};q||V.push(n.a.createElement(p,Object(Z.a)({},nt,{key:"noPager",page:q,className:"".concat(C,"-disabled")})));for(var bt=1;bt<=q;bt+=1){var yt=I===bt;V.push(n.a.createElement(p,Object(Z.a)({},nt,{key:bt,page:bt,active:yt})))}}else{var Ne=A?S.prev_3:S.prev_5,Re=A?S.next_3:S.next_5;Pe&&(ue=n.a.createElement("li",{title:X?Ne:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:v()("".concat(C,"-jump-prev"),Object(z.a)({},"".concat(C,"-jump-prev-custom-icon"),!!xe))},ye(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(xe,"prev page"))),Ae=n.a.createElement("li",{title:X?Re:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:v()("".concat(C,"-jump-next"),Object(z.a)({},"".concat(C,"-jump-next-custom-icon"),!!Ie))},ye(this.getJumpNextPage(),"jump-next",this.getItemIcon(Ie,"next page")))),ce=n.a.createElement(p,{locale:S,last:!0,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:q,page:q,active:!1,showTitle:X,itemRender:ye}),Ue=n.a.createElement(p,{locale:S,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:X,itemRender:ye});var Je=Math.max(1,I-Oe),tt=Math.min(I+Oe,q);I-1<=Oe&&(tt=1+Oe*2),q-I<=Oe&&(Je=q-Oe*2);for(var le=Je;le<=tt;le+=1){var $=I===le;V.push(n.a.createElement(p,{locale:S,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:le,page:le,active:$,showTitle:X,itemRender:ye}))}I-1>=Oe*2&&I!==1+2&&(V[0]=Object(j.cloneElement)(V[0],{className:"".concat(C,"-item-after-jump-prev")}),V.unshift(ue)),q-I>=Oe*2&&I!==q-2&&(V[V.length-1]=Object(j.cloneElement)(V[V.length-1],{className:"".concat(C,"-item-before-jump-next")}),V.push(Ae)),Je!==1&&V.unshift(Ue),tt!==q&&V.push(ce)}var te=null;ne&&(te=n.a.createElement("li",{className:"".concat(C,"-total-text")},ne(y,[y===0?0:(I-1)*U+1,I*U>y?y:I*U])));var ae=!this.hasPrev()||!q,de=!this.hasNext()||!q;return n.a.createElement("ul",Object(Z.a)({className:v()(C,x,Object(z.a)({},"".concat(C,"-disabled"),P)),style:m,unselectable:"unselectable",ref:this.savePaginationNode},st),te,n.a.createElement("li",{title:X?S.prev_page:null,onClick:this.prev,tabIndex:ae?null:0,onKeyPress:this.runIfEnterPrev,className:v()("".concat(C,"-prev"),Object(z.a)({},"".concat(C,"-disabled"),ae)),"aria-disabled":ae},this.renderPrev(Xe)),V,n.a.createElement("li",{title:X?S.next_page:null,onClick:this.next,tabIndex:de?null:0,onKeyPress:this.runIfEnterNext,className:v()("".concat(C,"-next"),Object(z.a)({},"".concat(C,"-disabled"),de)),"aria-disabled":de},this.renderNext(rt)),n.a.createElement(d,{disabled:P,locale:S,rootPrefixCls:C,selectComponentClass:Me,selectPrefixCls:ke,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:I,pageSize:U,pageSizeOptions:Ee,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Te}))}}],[{key:"getDerivedStateFromProps",value:function(g,h){var C={};if("current"in g&&(C.current=g.current,g.current!==h.current&&(C.currentInputValue=C.current)),"pageSize"in g&&g.pageSize!==h.pageSize){var x=h.current,m=R(g.pageSize,h,g);x=x>m?m:x,"current"in g||(C.current=x,C.currentInputValue=x),C.pageSize=g.pageSize}return C}}]),_}(n.a.Component);O.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:l,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:l,locale:u.a,style:{},itemRender:i,totalBoundaryShowSizeChanger:50};var w=O},"6RRn":function(Be,he,B){"use strict";var Z=B("wCXF"),z=B("n6Qo");B.d(he,"b",function(){return z.a});var N=B("IBYe"),Y=B("6eGT"),W=B("hW8S");B.d(he,"a",function(){return W.a}),he.c=Z.b},"6UM0":function(Be,he,B){var Z,z;(function(){var N;(function(){"use strict";var W=[function(n,T,v){var f=v(1).Beautifier,p=v(5).Options;function c(s,d){var u=new f(s,d);return u.beautify()}n.exports=c,n.exports.defaultOptions=function(){return new p}},function(n,T,v){var f=v(2).Output,p=v(3).Token,c=v(4),s=v(5).Options,d=v(7).Tokenizer,u=v(7).line_starters,l=v(7).positionable_operators,a=v(7).TOKEN;function i(A,X){return X.indexOf(A)!==-1}function R(A){return A.replace(/^\s+/g,"")}function O(A){for(var X={},ne=0;ne<A.length;ne++)X[A[ne].replace(/-/g,"_")]=A[ne];return X}function w(A,X){return A&&A.type===a.RESERVED&&A.text===X}function M(A,X){return A&&A.type===a.RESERVED&&i(A.text,X)}var L=["case","return","do","if","throw","else","await","break","continue","async"],_=["before-newline","after-newline","preserve-newline"],b=O(_),g=[b.before_newline,b.preserve_newline],h={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function C(A,X){if(X.multiline_frame||X.mode===h.ForInitializer||X.mode===h.Conditional)return;A.remove_indent(X.start_line_index)}function x(A){A=A.replace(c.allLineBreaks,`
`);for(var X=[],ne=A.indexOf(`
`);ne!==-1;)X.push(A.substring(0,ne)),A=A.substring(ne+1),ne=A.indexOf(`
`);return A.length&&X.push(A),X}function m(A){return A===h.ArrayLiteral}function P(A){return i(A,[h.Expression,h.ForInitializer,h.Conditional])}function k(A,X){for(var ne=0;ne<A.length;ne++){var fe=A[ne].trim();if(fe.charAt(0)!==X)return!1}return!0}function y(A,X){for(var ne=0,fe=A.length,ye;ne<fe;ne++)if(ye=A[ne],ye&&ye.indexOf(X)!==0)return!1;return!0}function S(A,X){X=X||{},this._source_text=A||"",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 s(X)}S.prototype.create_flags=function(A,X){var ne=0;A&&(ne=A.indentation_level,!this._output.just_added_newline()&&A.line_indent_level>ne&&(ne=A.line_indent_level));var fe={mode:X,parent:A,last_token:A?A.last_token:new p(a.START_BLOCK,""),last_word:A?A.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:ne,alignment:0,line_indent_level:A?A.line_indent_level:ne,start_line_index:this._output.get_line_number(),ternary_depth:0};return fe},S.prototype._reset=function(A){var X=A.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new f(this._options,X),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(h.BlockStatement);var ne=new d(A,this._options);return this._tokens=ne.tokenize(),A},S.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var A,X=this._reset(this._source_text),ne=this._options.eol;this._options.eol==="auto"&&(ne=`
`,X&&c.lineBreak.test(X||"")&&(ne=X.match(c.lineBreak)[0]));for(var fe=this._tokens.next();fe;)this.handle_token(fe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=fe,fe=this._tokens.next();return A=this._output.get_code(ne),A},S.prototype.handle_token=function(A,X){A.type===a.START_EXPR?this.handle_start_expr(A):A.type===a.END_EXPR?this.handle_end_expr(A):A.type===a.START_BLOCK?this.handle_start_block(A):A.type===a.END_BLOCK?this.handle_end_block(A):A.type===a.WORD?this.handle_word(A):A.type===a.RESERVED?this.handle_word(A):A.type===a.SEMICOLON?this.handle_semicolon(A):A.type===a.STRING?this.handle_string(A):A.type===a.EQUALS?this.handle_equals(A):A.type===a.OPERATOR?this.handle_operator(A):A.type===a.COMMA?this.handle_comma(A):A.type===a.BLOCK_COMMENT?this.handle_block_comment(A,X):A.type===a.COMMENT?this.handle_comment(A,X):A.type===a.DOT?this.handle_dot(A):A.type===a.EOF?this.handle_eof(A):A.type===a.UNKNOWN?this.handle_unknown(A,X):this.handle_unknown(A,X)},S.prototype.handle_whitespace_and_comments=function(A,X){var ne=A.newlines,fe=this._options.keep_array_indentation&&m(this._flags.mode);if(A.comments_before)for(var ye=A.comments_before.next();ye;)this.handle_whitespace_and_comments(ye,X),this.handle_token(ye,X),ye=A.comments_before.next();if(fe)for(var Pe=0;Pe<ne;Pe+=1)this.print_newline(Pe>0,X);else if(this._options.max_preserve_newlines&&ne>this._options.max_preserve_newlines&&(ne=this._options.max_preserve_newlines),this._options.preserve_newlines&&ne>1){this.print_newline(!1,X);for(var xe=1;xe<ne;xe+=1)this.print_newline(!0,X)}};var F=["async","break","continue","return","throw","yield"];S.prototype.allow_wrap_or_preserved_newline=function(A,X){if(X=X===void 0?!1:X,this._output.just_added_newline())return;var ne=this._options.preserve_newlines&&A.newlines||X,fe=i(this._flags.last_token.text,l)||i(A.text,l);if(fe){var ye=i(this._flags.last_token.text,l)&&i(this._options.operator_position,g)||i(A.text,l);ne=ne&&ye}if(ne)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(M(this._flags.last_token,F))return;this._output.set_wrap_point()}},S.prototype.print_newline=function(A,X){if(!X&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var ne=this._tokens.peek();this._flags.mode===h.Statement&&!(this._flags.if_block&&w(ne,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(A)&&(this._flags.multiline_frame=!0)},S.prototype.print_token_line_indentation=function(A){this._output.just_added_newline()&&(this._options.keep_array_indentation&&A.newlines&&(A.text==="["||m(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(A.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))},S.prototype.print_token=function(A){if(this._output.raw){this._output.add_raw_token(A);return}if(this._options.comma_first&&A.previous&&A.previous.type===a.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var X=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(X),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(A),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(A),this._output.non_breaking_space=!0,this._output.add_token(A.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},S.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},S.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))},S.prototype.set_mode=function(A){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,A),this._flags=this.create_flags(this._previous_flags,A),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},S.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))},S.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||M(this._flags.last_token,["get","set"]))},S.prototype.start_of_statement=function(A){var X=!1;return X=X||M(this._flags.last_token,["var","let","const"])&&A.type===a.WORD,X=X||w(this._flags.last_token,"do"),X=X||!(this._flags.parent.mode===h.ObjectLiteral&&this._flags.mode===h.Statement)&&M(this._flags.last_token,F)&&!A.newlines,X=X||w(this._flags.last_token,"else")&&!(w(A,"if")&&!A.comments_before),X=X||this._flags.last_token.type===a.END_EXPR&&(this._previous_flags.mode===h.ForInitializer||this._previous_flags.mode===h.Conditional),X=X||this._flags.last_token.type===a.WORD&&this._flags.mode===h.BlockStatement&&!this._flags.in_case&&!(A.text==="--"||A.text==="++")&&this._last_last_text!=="function"&&A.type!==a.WORD&&A.type!==a.RESERVED,X=X||this._flags.mode===h.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||M(this._flags.last_token,["get","set"])),X?(this.set_mode(h.Statement),this.indent(),this.handle_whitespace_and_comments(A,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A,M(A,["do","for","if","while"])),!0):!1},S.prototype.handle_start_expr=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A);var X=h.Expression;if(A.text==="["){if(this._flags.last_token.type===a.WORD||this._flags.last_token.text===")"){M(this._flags.last_token,u)&&(this._output.space_before_token=!0),this.print_token(A),this.set_mode(X),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}X=h.ArrayLiteral,m(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())),i(this._flags.last_token.type,[a.START_EXPR,a.END_EXPR,a.WORD,a.OPERATOR,a.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===a.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,X=h.ForInitializer):i(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,X=h.Conditional):i(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&A.whitespace_before===""?this._output.space_before_token=!1:(i(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===a.EQUALS||this._flags.last_token.type===a.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A);else if(this._flags.last_token.type===a.WORD){this._output.space_before_token=!1;var ne=this._tokens.peek(-3);if(this._options.space_after_named_function&&ne){var fe=this._tokens.peek(-4);M(ne,["async","function"])||ne.text==="*"&&M(fe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===h.ObjectLiteral?(ne.text==="{"||ne.text===","||ne.text==="*"&&(fe.text==="{"||fe.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(A);(this._flags.last_token.type===a.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(i(this._last_last_text,["function","yield"])||this._flags.mode===h.ObjectLiteral&&i(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===a.START_BLOCK?this.print_newline():(this._flags.last_token.type===a.END_EXPR||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===a.COMMA)&&this.allow_wrap_or_preserved_newline(A,A.newlines),this.print_token(A),this.set_mode(X),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},S.prototype.handle_end_expr=function(A){for(;this._flags.mode===h.Statement;)this.restore_mode();this.handle_whitespace_and_comments(A),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(A,A.text==="]"&&m(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===a.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(A),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)},S.prototype.handle_start_block=function(A){this.handle_whitespace_and_comments(A);var X=this._tokens.peek(),ne=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===a.END_EXPR?(this.set_mode(h.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(h.BlockStatement):ne&&(i(ne.text,[":",","])&&i(X.type,[a.STRING,a.WORD,a.RESERVED])||i(X.text,["get","set","..."])&&i(ne.type,[a.WORD,a.RESERVED]))?i(this._last_last_text,["class","interface"])&&!i(ne.text,[":",","])?this.set_mode(h.BlockStatement):this.set_mode(h.ObjectLiteral):this._flags.last_token.type===a.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(h.BlockStatement):i(this._flags.last_token.type,[a.EQUALS,a.START_EXPR,a.COMMA,a.OPERATOR])||M(this._flags.last_token,["return","throw","import","default"])?this.set_mode(h.ObjectLiteral):this.set_mode(h.BlockStatement),this._flags.last_token&&(M(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var fe=!X.comments_before&&X.text==="}",ye=fe&&this._flags.last_word==="function"&&this._flags.last_token.type===a.END_EXPR;if(this._options.brace_preserve_inline){var Pe=0,xe=null;this._flags.inline_frame=!0;do if(Pe+=1,xe=this._tokens.peek(Pe-1),xe.newlines){this._flags.inline_frame=!1;break}while(xe.type!==a.EOF&&!(xe.type===a.END_BLOCK&&xe.opened===A))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&A.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==a.OPERATOR&&(ye||this._flags.last_token.type===a.EQUALS||M(this._flags.last_token,L)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(m(this._previous_flags.mode)&&(this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.COMMA)&&((this._flags.last_token.type===a.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(A),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==a.OPERATOR&&this._flags.last_token.type!==a.START_EXPR&&(this._flags.last_token.type===a.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(A),this.indent(),!fe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},S.prototype.handle_end_block=function(A){for(this.handle_whitespace_and_comments(A);this._flags.mode===h.Statement;)this.restore_mode();var X=this._flags.last_token.type===a.START_BLOCK;this._flags.inline_frame&&!X?this._output.space_before_token=!0:this._options.brace_style==="expand"?X||this.print_newline():X||(m(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(A)},S.prototype.handle_word=function(A){if(A.type===a.RESERVED){if(i(A.text,["set","get"])&&this._flags.mode!==h.ObjectLiteral)A.type=a.WORD;else if(A.text==="import"&&i(this._tokens.peek().text,["(","."]))A.type=a.WORD;else if(i(A.text,["as","from"])&&!this._flags.import_block)A.type=a.WORD;else if(this._flags.mode===h.ObjectLiteral){var X=this._tokens.peek();X.text===":"&&(A.type=a.WORD)}}if(this.start_of_statement(A)?M(this._flags.last_token,["var","let","const"])&&A.type===a.WORD&&(this._flags.declaration_statement=!0):A.newlines&&!P(this._flags.mode)&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==a.EQUALS&&(this._options.preserve_newlines||!M(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(A),this.print_newline()):this.handle_whitespace_and_comments(A),this._flags.do_block&&!this._flags.do_while)if(w(A,"while")){this._output.space_before_token=!0,this.print_token(A),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&&w(A,"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&&M(A,["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(A),this._flags.in_case=!0;return}if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A)),w(A,"function")){(i(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(i(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===a.OPERATOR))&&(!this._output.just_added_blankline()&&!A.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD?M(this._flags.last_token,["get","set","new","export"])||M(this._flags.last_token,F)?this._output.space_before_token=!0:w(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===a.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(P(this._flags.mode)||m(this._flags.mode))||this.print_newline(),this.print_token(A),this._flags.last_word=A.text;return}var ne="NONE";if(this._flags.last_token.type===a.END_BLOCK?this._previous_flags.inline_frame?ne="SPACE":M(A,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&A.newlines?ne="NEWLINE":(ne="SPACE",this._output.space_before_token=!0):ne="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&this._flags.mode===h.BlockStatement?ne="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&P(this._flags.mode)?ne="SPACE":this._flags.last_token.type===a.STRING?ne="NEWLINE":this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.last_token.text==="*"&&(i(this._last_last_text,["function","yield"])||this._flags.mode===h.ObjectLiteral&&i(this._last_last_text,["{",","]))?ne="SPACE":this._flags.last_token.type===a.START_BLOCK?this._flags.inline_frame?ne="SPACE":ne="NEWLINE":this._flags.last_token.type===a.END_EXPR&&(this._output.space_before_token=!0,ne="NEWLINE"),M(A,u)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ne="SPACE":ne="NEWLINE"),M(A,["else","catch","finally"]))if((!(this._flags.last_token.type===a.END_BLOCK&&this._previous_flags.mode===h.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&A.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var fe=this._output.current_line;fe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ne==="NEWLINE"?M(this._flags.last_token,L)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&M(A,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==a.END_EXPR?(this._flags.last_token.type!==a.START_EXPR||!M(A,["var","let","const"]))&&this._flags.last_token.text!==":"&&(w(A,"if")&&w(A.previous,"else")?this._output.space_before_token=!0:this.print_newline()):M(A,u)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&m(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ne==="SPACE"&&(this._output.space_before_token=!0);A.previous&&(A.previous.type===a.WORD||A.previous.type===a.RESERVED)&&(this._output.space_before_token=!0),this.print_token(A),this._flags.last_word=A.text,A.type===a.RESERVED&&(A.text==="do"?this._flags.do_block=!0:A.text==="if"?this._flags.if_block=!0:A.text==="import"?this._flags.import_block=!0:this._flags.import_block&&w(A,"from")&&(this._flags.import_block=!1))},S.prototype.handle_semicolon=function(A){this.start_of_statement(A)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(A);for(var X=this._tokens.peek();this._flags.mode===h.Statement&&!(this._flags.if_block&&w(X,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(A)},S.prototype.handle_string=function(A){A.text.startsWith("`")&&A.newlines===0&&A.whitespace_before===""&&(A.previous.text===")"||this._flags.last_token.type===a.WORD)||(this.start_of_statement(A)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(A),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A):A.text.startsWith("`")&&this._flags.last_token.type===a.END_EXPR&&(A.previous.text==="]"||A.previous.text===")")&&A.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(A)},S.prototype.handle_equals=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(A),this._output.space_before_token=!0},S.prototype.handle_comma=function(A){this.handle_whitespace_and_comments(A,!0),this.print_token(A),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(A)):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(A)},S.prototype.handle_operator=function(A){var X=A.text==="*"&&(M(this._flags.last_token,["function","yield"])||i(this._flags.last_token.type,[a.START_BLOCK,a.COMMA,a.END_BLOCK,a.SEMICOLON])),ne=i(A.text,["-","+"])&&(i(this._flags.last_token.type,[a.START_BLOCK,a.START_EXPR,a.EQUALS,a.OPERATOR])||i(this._flags.last_token.text,u)||this._flags.last_token.text===",");if(!this.start_of_statement(A)){var fe=!X;this.handle_whitespace_and_comments(A,fe)}if(A.text==="*"&&this._flags.last_token.type===a.DOT){this.print_token(A);return}if(A.text==="::"){this.print_token(A);return}if(this._flags.last_token.type===a.OPERATOR&&i(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(A),A.text===":"&&this._flags.in_case){this.print_token(A),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==a.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 ye=!0,Pe=!0,xe=!1;if(A.text===":"?this._flags.ternary_depth===0?ye=!1:(this._flags.ternary_depth-=1,xe=!0):A.text==="?"&&(this._flags.ternary_depth+=1),!ne&&!X&&this._options.preserve_newlines&&i(A.text,l)){var Ie=A.text===":",Me=Ie&&xe,ke=Ie&&!xe;switch(this._options.operator_position){case b.before_newline:this._output.space_before_token=!ke,this.print_token(A),(!Ie||Me)&&this.allow_wrap_or_preserved_newline(A),this._output.space_before_token=!0;return;case b.after_newline:this._output.space_before_token=!0,!Ie||Me?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(A):this._output.space_before_token=!1,this.print_token(A),this._output.space_before_token=!0;return;case b.preserve_newline:ke||this.allow_wrap_or_preserved_newline(A),ye=!(this._output.just_added_newline()||ke),this._output.space_before_token=ye,this.print_token(A),this._output.space_before_token=!0;return}}if(X){this.allow_wrap_or_preserved_newline(A),ye=!1;var Ee=this._tokens.peek();Pe=Ee&&i(Ee.type,[a.WORD,a.RESERVED])}else if(A.text==="...")this.allow_wrap_or_preserved_newline(A),ye=this._flags.last_token.type===a.START_BLOCK,Pe=!1;else if(i(A.text,["--","++","!","~"])||ne){if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR)&&this.allow_wrap_or_preserved_newline(A),ye=!1,Pe=!1,A.newlines&&(A.text==="--"||A.text==="++"||A.text==="~")){var J=M(this._flags.last_token,L)&&A.newlines;J&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(J,!0)}this._flags.last_token.text===";"&&P(this._flags.mode)&&(ye=!0),this._flags.last_token.type===a.RESERVED?ye=!0:this._flags.last_token.type===a.END_EXPR?ye=!(this._flags.last_token.text==="]"&&(A.text==="--"||A.text==="++")):this._flags.last_token.type===a.OPERATOR&&(ye=i(A.text,["--","-","++","+"])&&i(this._flags.last_token.text,["--","-","++","+"]),i(A.text,["+","-"])&&i(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||ye,this.print_token(A),this._output.space_before_token=Pe},S.prototype.handle_block_comment=function(A,X){if(this._output.raw){this._output.add_raw_token(A),A.directives&&A.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(A.directives){this.print_newline(!1,X),this.print_token(A),A.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!c.newline.test(A.text)&&!A.newlines){this._output.space_before_token=!0,this.print_token(A),this._output.space_before_token=!0;return}else this.print_block_commment(A,X)},S.prototype.print_block_commment=function(A,X){var ne=x(A.text),fe,ye=!1,Pe=!1,xe=A.whitespace_before,Ie=xe.length;if(this.print_newline(!1,X),this.print_token_line_indentation(A),this._output.add_token(ne[0]),this.print_newline(!1,X),ne.length>1){for(ne=ne.slice(1),ye=k(ne,"*"),Pe=y(ne,xe),ye&&(this._flags.alignment=1),fe=0;fe<ne.length;fe++)ye?(this.print_token_line_indentation(A),this._output.add_token(R(ne[fe]))):Pe&&ne[fe]?(this.print_token_line_indentation(A),this._output.add_token(ne[fe].substring(Ie))):(this._output.current_line.set_indent(-1),this._output.add_token(ne[fe])),this.print_newline(!1,X);this._flags.alignment=0}},S.prototype.handle_comment=function(A,X){A.newlines?this.print_newline(!1,X):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(A),this.print_newline(!1,X)},S.prototype.handle_dot=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),M(this._flags.last_token,L)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(A,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(A)},S.prototype.handle_unknown=function(A,X){this.print_token(A),A.text[A.text.length-1]===`
`&&this.print_newline(!1,X)},S.prototype.handle_eof=function(A){for(;this._flags.mode===h.Statement;)this.restore_mode();this.handle_whitespace_and_comments(A)},n.exports.Beautifier=S},function(n){function T(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=[]}T.prototype.clone_empty=function(){var p=new T(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},T.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},T.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},T.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))},T.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)},T.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},T.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},T.prototype.is_empty=function(){return this.__items.length===0},T.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},T.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},T.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},T.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},T.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},T.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},T.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 v(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}v.prototype.get_indent_size=function(p,c){var s=this.__base_string_length;return c=c||0,p<0&&(s=0),s+=p*this.__indent_size,s+=c,s},v.prototype.get_indent_string=function(p,c){var s=this.__base_string;return c=c||0,p<0&&(p=0,s=""),c+=p*this.__indent_size,this.__ensure_cache(c),s+=this.__cache[c],s},v.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var p=this.__cache.length,c=0,s="";this.__indent_size&&p>=this.__indent_size&&(c=Math.floor(p/this.__indent_size),p-=c*this.__indent_size,s=new Array(c+1).join(this.__indent_string)),p&&(s+=new Array(p+1).join(" ")),this.__cache.push(s)};function f(p,c){this.__indent_cache=new v(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 T(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 s=this.__lines.join(`
`);return p!==`
`&&(s=s.replace(/[\n]/g,p)),s},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 s=this.__lines.length-2;s>=0;){var d=this.__lines[s];if(d.is_empty())break;if(d.item(0).indexOf(p)!==0&&d.item(-1)!==c){this.__lines.splice(s+1,0,new T(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},n.exports.Output=f},function(n){function T(v,f,p,c){this.type=v,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=T},function(n,T){var v="\\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",s="(?:\\\\u[0-9a-fA-F]{4}|["+v+p+"])",d="(?:\\\\u[0-9a-fA-F]{4}|["+f+p+c+"])*";T.identifier=new RegExp(s+d,"g"),T.identifierStart=new RegExp(s),T.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+f+p+c+"])+");var u=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;T.newline=/[\n\r\u2028\u2029]/,T.lineBreak=new RegExp(`\r
|`+T.newline.source),T.allLineBreaks=new RegExp(T.lineBreak.source,"g")},function(n,T,v){var f=v(6).Options,p=["before-newline","after-newline","preserve-newline"];function c(s){f.call(this,s,"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 l=0;l<u.length;l++)u[l]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=u[l];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 T(p,c){this.raw_options=v(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"])}T.prototype._get_array=function(p,c){var s=this.raw_options[p],d=c||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(d=s.concat()):typeof s=="string"&&(d=s.split(/[^a-zA-Z0-9_\/\-]+/)),d},T.prototype._get_boolean=function(p,c){var s=this.raw_options[p],d=s===void 0?!!c:!!s;return d},T.prototype._get_characters=function(p,c){var s=this.raw_options[p],d=c||"";return typeof s=="string"&&(d=s.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),d},T.prototype._get_number=function(p,c){var s=this.raw_options[p];c=parseInt(c,10),isNaN(c)&&(c=0);var d=parseInt(s,10);return isNaN(d)&&(d=c),d},T.prototype._get_selection=function(p,c,s){var d=this._get_selection_list(p,c,s);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]},T.prototype._get_selection_list=function(p,c,s){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[c[0]],!this._is_valid_selection(s,c))throw new Error("Invalid Default Value!");var d=this._get_array(p,s);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},T.prototype._is_valid_selection=function(p,c){return p.length&&c.length&&!p.some(function(s){return c.indexOf(s)===-1})};function v(p,c){var s={};p=f(p);var d;for(d in p)d!==c&&(s[d]=p[d]);if(c&&p[c])for(d in p[c])s[d]=p[c][d];return s}function f(p){var c={},s;for(s in p){var d=s.replace(/-/g,"_");c[d]=p[s]}return c}n.exports.Options=T,n.exports.normalizeOpts=f,n.exports.mergeOpts=v},function(n,T,v){var f=v(8).InputScanner,p=v(9).Tokenizer,c=v(9).TOKEN,s=v(13).Directives,d=v(4),u=v(12).Pattern,l=v(14).TemplatablePattern;function a(k,y){return y.indexOf(k)!==-1}var i={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 s(/\/\*/,/\*\//),O=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,w=/[0-9]/,M=/[^\d\.]/,L=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),_=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";_=_.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),_="\\?\\.(?!\\d) "+_,_=_.replace(/ /g,"|");var b=new RegExp(_),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),h=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),C=new RegExp("^(?:"+h.join("|")+")$"),x,m=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 S=new u(this._input),F=new l(this._input).read_options(this._options);this.__patterns={template:F,identifier:F.starting_with(d.identifier).matching(d.identifierMatch),number:S.matching(O),punct:S.matching(b),comment:S.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:S.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:S.matching(/<!--/),html_comment_end:S.matching(/-->/),include:S.starting_with(/#include/).until_after(d.lineBreak),shebang:S.starting_with(/#!/).until_after(d.lineBreak),xml:S.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(/[`}\\]/)}};m.prototype=new p,m.prototype._is_comment=function(k){return k.type===i.COMMENT||k.type===i.BLOCK_COMMENT||k.type===i.UNKNOWN},m.prototype._is_opening=function(k){return k.type===i.START_BLOCK||k.type===i.START_EXPR},m.prototype._is_closing=function(k,y){return(k.type===i.END_BLOCK||k.type===i.END_EXPR)&&y&&(k.text==="]"&&y.text==="["||k.text===")"&&y.text==="("||k.text==="}"&&y.text==="{")},m.prototype._reset=function(){x=!1},m.prototype._get_next_token=function(k,y){var S=null;this._readWhitespace();var F=this._input.peek();return F===null?this._create_token(i.EOF,""):(S=S||this._read_non_javascript(F),S=S||this._read_string(F),S=S||this._read_word(k),S=S||this._read_singles(F),S=S||this._read_comment(F),S=S||this._read_regexp(F,k),S=S||this._read_xml(F,k),S=S||this._read_punctuation(),S=S||this._create_token(i.UNKNOWN,this._input.next()),S)},m.prototype._read_word=function(k){var y;if(y=this.__patterns.identifier.read(),y!=="")return y=y.replace(d.allLineBreaks,`
`),!(k.type===i.DOT||k.type===i.RESERVED&&(k.text==="set"||k.text==="get"))&&C.test(y)?(y==="in"||y==="of")&&(k.type===i.WORD||k.type===i.STRING)?this._create_token(i.OPERATOR,y):this._create_token(i.RESERVED,y):this._create_token(i.WORD,y);if(y=this.__patterns.number.read(),y!=="")return this._create_token(i.WORD,y)},m.prototype._read_singles=function(k){var y=null;return k==="("||k==="["?y=this._create_token(i.START_EXPR,k):k===")"||k==="]"?y=this._create_token(i.END_EXPR,k):k==="{"?y=this._create_token(i.START_BLOCK,k):k==="}"?y=this._create_token(i.END_BLOCK,k):k===";"?y=this._create_token(i.SEMICOLON,k):k==="."&&M.test(this._input.peek(1))?y=this._create_token(i.DOT,k):k===","&&(y=this._create_token(i.COMMA,k)),y&&this._input.next(),y},m.prototype._read_punctuation=function(){var k=this.__patterns.punct.read();if(k!=="")return k==="="?this._create_token(i.EQUALS,k):k==="?."?this._create_token(i.DOT,k):this._create_token(i.OPERATOR,k)},m.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(i.UNKNOWN,y.trim()+`
`);if(y=this.__patterns.include.read(),y)return this._create_token(i.UNKNOWN,y.trim()+`
`);k=this._input.next();var S="#";if(this._input.hasNext()&&this._input.testChar(w)){do k=this._input.next(),S+=k;while(this._input.hasNext()&&k!=="#"&&k!=="=");return k==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(S+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(S+="{}",this._input.next(),this._input.next())),this._create_token(i.WORD,S)}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(i.COMMENT,y)}}else if(x&&k==="-"&&(y=this.__patterns.html_comment_end.read(),y))return x=!1,this._create_token(i.COMMENT,y);return null},m.prototype._read_comment=function(k){var y=null;if(k==="/"){var S="";if(this._input.peek(1)==="*"){S=this.__patterns.block_comment.read();var F=R.get_directives(S);F&&F.ignore==="start"&&(S+=R.readIgnored(this._input)),S=S.replace(d.allLineBreaks,`
`),y=this._create_token(i.BLOCK_COMMENT,S),y.directives=F}else this._input.peek(1)==="/"&&(S=this.__patterns.comment.read(),y=this._create_token(i.COMMENT,S))}return y},m.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(i.STRING,y)}return null},m.prototype._allow_regexp_or_xml=function(k){return k.type===i.RESERVED&&a(k.text,["return","case","throw","else","do","typeof","yield"])||k.type===i.END_EXPR&&k.text===")"&&k.opened.previous.type===i.RESERVED&&a(k.opened.previous.text,["if","while","for"])||a(k.type,[i.COMMENT,i.START_EXPR,i.START_BLOCK,i.START,i.END_BLOCK,i.OPERATOR,i.EQUALS,i.EOF,i.SEMICOLON,i.COMMA])},m.prototype._read_regexp=function(k,y){if(k==="/"&&this._allow_regexp_or_xml(y)){for(var S=this._input.next(),F=!1,A=!1;this._input.hasNext()&&(F||A||this._input.peek()!==k)&&!this._input.testChar(d.newline);)S+=this._input.peek(),F?F=!1:(F=this._input.peek()==="\\",this._input.peek()==="["?A=!0:this._input.peek()==="]"&&(A=!1)),this._input.next();return this._input.peek()===k&&(S+=this._input.next(),S+=this._input.read(d.identifier)),this._create_token(i.STRING,S)}return null},m.prototype._read_xml=function(k,y){if(this._options.e4x&&k==="<"&&this._allow_regexp_or_xml(y)){var S="",F=this.__patterns.xml.read_match();if(F){for(var A=F[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),X=A.indexOf("{")===0,ne=0;F;){var fe=!!F[1],ye=F[2],Pe=!!F[F.length-1]||ye.slice(0,8)==="![CDATA[";if(!Pe&&(ye===A||X&&ye.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(fe?--ne:++ne),S+=F[0],ne<=0)break;F=this.__patterns.xml.read_match()}return F||(S+=this._input.match(/[\s\S]*/g)[0]),S=S.replace(d.allLineBreaks,`
`),this._create_token(i.STRING,S)}}return null};function P(k){for(var y="",S=0,F=new f(k),A=null;F.hasNext();)if(A=F.match(/([\s]|[^\\]|\\\\)+/g),A&&(y+=A[0]),F.peek()==="\\"){if(F.next(),F.peek()==="x")A=F.match(/x([0-9A-Fa-f]{2})/g);else if(F.peek()==="u")A=F.match(/u([0-9A-Fa-f]{4})/g);else{y+="\\",F.hasNext()&&(y+=F.next());continue}if(!A)return k;if(S=parseInt(A[1],16),S>126&&S<=255&&A[0].indexOf("x")===0)return k;if(S>=0&&S<32){y+="\\"+A[0];continue}else S===34||S===39||S===92?y+="\\"+String.fromCharCode(S):y+=String.fromCharCode(S)}return y}m.prototype._read_string_recursive=function(k,y,S){var F,A;k==="'"?A=this.__patterns.single_quote:k==='"'?A=this.__patterns.double_quote:k==="`"?A=this.__patterns.template_text:k==="}"&&(A=this.__patterns.template_expression);for(var X=A.read(),ne="";this._input.hasNext();){if(ne=this._input.next(),ne===k||!y&&d.newline.test(ne)){this._input.back();break}else ne==="\\"&&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(),ne+=this._input.next()):S&&(S==="${"&&ne==="$"&&this._input.peek()==="{"&&(ne+=this._input.next()),S===ne&&(k==="`"?ne+=this._read_string_recursive("}",y,"`"):ne+=this._read_string_recursive("`",y,"${"),this._input.hasNext()&&(ne+=this._input.next())));ne+=A.read(),X+=ne}return X},n.exports.Tokenizer=m,n.exports.TOKEN=i,n.exports.positionable_operators=L.slice(),n.exports.line_starters=g.slice()},function(n){var T=RegExp.prototype.hasOwnProperty("sticky");function v(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position<this.__input_length},v.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__input.charAt(this.__position),this.__position+=1),f},v.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},v.prototype.__match=function(f,p){f.lastIndex=p;var c=f.exec(this.__input);return c&&!(T&&f.sticky)&&(c.index!==p&&(c=null)),c},v.prototype.test=function(f,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(f,p):!1},v.prototype.testChar=function(f,p){var c=this.peek(p);return f.lastIndex=0,c!==null&&f.test(c)},v.prototype.match=function(f){var p=this.__match(f,this.__position);return p?this.__position+=p[0].length:p=null,p},v.prototype.read=function(f,p,c){var s="",d;return f&&(d=this.match(f),d&&(s+=d[0])),p&&(d||!f)&&(s+=this.readUntil(p,c)),s},v.prototype.readUntil=function(f,p){var c="",s=this.__position;f.lastIndex=this.__position;var d=f.exec(this.__input);return d?(s=d.index,p&&(s+=d[0].length)):s=this.__input_length,c=this.__input.substring(this.__position,s),this.__position=s,c},v.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)},v.prototype.get_regexp=function(f,p){var c=null,s="g";return p&&T&&(s="y"),typeof f=="string"&&f!==""?c=new RegExp(f,s):f&&(c=new RegExp(f.source,s)),c},v.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},v.prototype.peekUntilAfter=function(f){var p=this.__position,c=this.readUntilAfter(f);return this.__position=p,c},v.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=v},function(n,T,v){var f=v(8).InputScanner,p=v(3).Token,c=v(10).TokenStream,s=v(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},u=function(l,a){this._input=new f(l),this._options=a||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};u.prototype.tokenize=function(){this._input.restart(),this.__tokens=new c,this._reset();for(var l,a=new p(d.START,""),i=null,R=[],O=new c;a.type!==d.EOF;){for(l=this._get_next_token(a,i);this._is_comment(l);)O.add(l),l=this._get_next_token(a,i);O.isEmpty()||(l.comments_before=O,O=new c),l.parent=i,this._is_opening(l)?(R.push(i),i=l):i&&this._is_closing(l,i)&&(l.opened=i,i.closed=l,i=R.pop(),l.parent=i),l.previous=a,a.next=l,this.__tokens.add(l),a=l}return this.__tokens},u.prototype._is_first_token=function(){return this.__tokens.isEmpty()},u.prototype._reset=function(){},u.prototype._get_next_token=function(l,a){this._readWhitespace();var i=this._input.read(/.+/g);return i?this._create_token(d.RAW,i):this._create_token(d.EOF,"")},u.prototype._is_comment=function(l){return!1},u.prototype._is_opening=function(l){return!1},u.prototype._is_closing=function(l,a){return!1},u.prototype._create_token=function(l,a){var i=new p(l,a,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return i},u.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=u,n.exports.TOKEN=d},function(n){function T(v){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=v}T.prototype.restart=function(){this.__position=0},T.prototype.isEmpty=function(){return this.__tokens_length===0},T.prototype.hasNext=function(){return this.__position<this.__tokens_length},T.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__tokens[this.__position],this.__position+=1),v},T.prototype.peek=function(v){var f=null;return v=v||0,v+=this.__position,v>=0&&v<this.__tokens_length&&(f=this.__tokens[v]),f},T.prototype.add=function(v){this.__parent_token&&(v.parent=this.__parent_token),this.__tokens.push(v),this.__tokens_length+=1},n.exports.TokenStream=T},function(n,T,v){var f=v(12).Pattern;function p(c,s){f.call(this,c,s),s?this._line_regexp=this._input.get_regexp(s._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,s){c+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+c+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},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 s=this.__split(this._newline_regexp,c);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return c},p.prototype.matching=function(c,s){var d=this._create();return d.__set_whitespace_patterns(c,s),d._update(),d},p.prototype._create=function(){return new p(this._input,this)},p.prototype.__split=function(c,s){c.lastIndex=0;for(var d=0,u=[],l=c.exec(s);l;)u.push(s.substring(d,l.index)),d=l.index+l[0].length,l=c.exec(s);return d<s.length?u.push(s.substring(d,s.length)):u.push(""),u},n.exports.WhitespacePattern=p},function(n){function T(v,f){this._input=v,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)}T.prototype.read=function(){var v=this._input.read(this._starting_pattern);return(!this._starting_pattern||v)&&(v+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),v},T.prototype.read_match=function(){return this._input.match(this._match_pattern)},T.prototype.until_after=function(v){var f=this._create();return f._until_after=!0,f._until_pattern=this._input.get_regexp(v),f._update(),f},T.prototype.until=function(v){var f=this._create();return f._until_after=!1,f._until_pattern=this._input.get_regexp(v),f._update(),f},T.prototype.starting_with=function(v){var f=this._create();return f._starting_pattern=this._input.get_regexp(v,!0),f._update(),f},T.prototype.matching=function(v){var f=this._create();return f._match_pattern=this._input.get_regexp(v,!0),f._update(),f},T.prototype._create=function(){return new T(this._input,this)},T.prototype._update=function(){},n.exports.Pattern=T},function(n){function T(v,f){v=typeof v=="string"?v:v.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(v+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(v+/\sbeautify\signore:end\s/.source+f,"g")}T.prototype.get_directives=function(v){if(!v.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(v);p;)f[p[1]]=p[2],p=this.__directive_pattern.exec(v);return f},T.prototype.readIgnored=function(v){return v.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=T},function(n,T,v){var f=v(12).Pattern,p={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function c(s,d){f.call(this,s,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(s);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(s){var d=this._create();return d._disabled[s]=!0,d._update(),d},c.prototype.read_options=function(s){var d=this._create();for(var u in p)d._disabled[u]=s.templating.indexOf(u)===-1;return d._update(),d},c.prototype.exclude=function(s){var d=this._create();return d._excluded[s]=!0,d._update(),d},c.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=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),s+=d,d=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},c.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},c.prototype._read_template=function(){var s="",d=this._input.peek();if(d==="<"){var u=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&u==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&u==="%"&&(s=s||this.__patterns.erb.read())}else d==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},n.exports.TemplatablePattern=c}],D={};function G(n){var T=D[n];if(T!==void 0)return T.exports;var v=D[n]={exports:{}};return W[n](v,v.exports,G),v.exports}var j=G(0);N=j})();var Y=N;!(Z=[],z=function(){return{js_beautify:Y}}.apply(he,Z),z!==void 0&&(Be.exports=z))})()},"6eGT":function(Be,he,B){"use strict";function Z(z){return null}he.a=Z},"746U":function(Be,he,B){"use strict";B.d(he,"f",function(){return Z}),B.d(he,"l",function(){return z}),B.d(he,"k",function(){return N}),B.d(he,"j",function(){return Y}),B.d(he,"g",function(){return W}),B.d(he,"m",function(){return D}),B.d(he,"h",function(){return G}),B.d(he,"n",function(){return j}),B.d(he,"c",function(){return n}),B.d(he,"a",function(){return T}),B.d(he,"i",function(){return v}),B.d(he,"o",function(){return f}),B.d(he,"e",function(){return s}),B.d(he,"d",function(){return d}),B.d(he,"p",function(){return u}),B.d(he,"b",function(){return l});function Z(a){return Array.isArray(a)}function z(a){return typeof a=="string"}function N(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)&&!(a instanceof RegExp)&&!(a instanceof Date)}function Y(a){return typeof a=="number"&&!isNaN(a)}function W(a){return a===!0||a===!1}function D(a){return typeof a=="undefined"}function G(a){return!j(a)}function j(a){return D(a)||a===null}function n(a,i){if(!a)throw new Error(i?`Unexpected type, expected '${i}'`:"Unexpected type")}function T(a){if(j(a))throw new Error("Assertion Failed: argument is undefined or null");return a}function v(a){return typeof a=="function"}function f(a,i){const R=Math.min(a.length,i.length);for(let O=0;O<R;O++)p(a[O],i[O])}function p(a,i){if(z(i)){if(typeof a!==i)throw new Error(`argument does not match constraint: typeof ${i}`)}else if(v(i)){try{if(a instanceof i)return}catch(R){}if(!j(a)&&a.constructor===i)return;if(i.length===1&&i.call(void 0,a)===!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(a){let i=[],R=Object.getPrototypeOf(a);for(;Object.prototype!==R;)i=i.concat(Object.getOwnPropertyNames(R)),R=Object.getPrototypeOf(R);return i}function s(a){const i=[];for(const R of c(a))typeof a[R]=="function"&&i.push(R);return i}function d(a,i){const R=w=>function(){const M=Array.prototype.slice.call(arguments,0);return i(w,M)};let O={};for(const w of a)O[w]=R(w);return O}function u(a){return a===null?void 0:a}function l(a,i="Unreachable"){throw new Error(i)}},"7Cbv":function(Be,he,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),z=new Uint8Array(16);function N(){if(!Z)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(z)}var Y=/^(?:[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"&&Y.test(p)}for(var D=W,G=[],j=0;j<256;++j)G.push((j+256).toString(16).substr(1));function n(p){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=(G[p[c+0]]+G[p[c+1]]+G[p[c+2]]+G[p[c+3]]+"-"+G[p[c+4]]+G[p[c+5]]+"-"+G[p[c+6]]+G[p[c+7]]+"-"+G[p[c+8]]+G[p[c+9]]+"-"+G[p[c+10]]+G[p[c+11]]+G[p[c+12]]+G[p[c+13]]+G[p[c+14]]+G[p[c+15]]).toLowerCase();if(!D(s))throw TypeError("Stringified UUID is invalid");return s}var T=n;function v(p,c,s){p=p||{};var d=p.random||(p.rng||N)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,c){s=s||0;for(var u=0;u<16;++u)c[s+u]=d[u];return c}return T(d)}var f=he.a=v},"7ZXX":function(Be,he,B){Be.exports=B.p+"static/err.6e7c5817.png"},"7ahc":function(Be,he,B){"use strict";B.d(he,"a",function(){return R});var Z=B("k1fw"),z=B("0Owb"),N=B("+L6B"),Y=B("2/Rp"),W=B("y8nQ"),D=B("Vl3Y"),G=B("tJVT"),j=B("OaEy"),n=B("2fM7"),T=B("q1tI"),v=B.n(T),f=B("VrN/"),p=B.n(f),c=B("p77/"),s=B.n(c),d=B("c5Ni"),u=B.n(d),l=n.a.Option,a={labelCol:{span:4},wrapperCol:{span:20}},i={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"]};he.b=function(O){var w=O.callback,M=O.onCancel,L=Object(T.useState)("python"),_=Object(G.a)(L,2),b=_[0],g=_[1];function h(x){g(i[x][1])}function C(x){w(x)}return v.a.createElement(D.a,Object(z.a)({},a,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:C}),v.a.createElement(D.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},v.a.createElement(n.a,{onChange:h},Object.keys(i).map(function(x){return v.a.createElement(l,{key:x,value:x},i[x][0])}))),v.a.createElement(D.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},v.a.createElement(R,{mode:b})),v.a.createElement("div",{className:"flex-container flex-end"},v.a.createElement(Y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),v.a.createElement(Y.a,{type:"ghost",onClick:M},"\u53D6\u6D88")))};function R(O){var w=O.value,M=O.onChange,L=O.mode,_=O.options,b=_===void 0?{}:_,g=Object(T.useRef)(),h=Object(T.useState)(),C=Object(G.a)(h,2),x=C[0],m=C[1];return Object(T.useEffect)(function(){if(x){function P(k){var y=k.getValue();M&&M(y)}return x.on("change",P),function(){x.off("change",P)}}},[x,M]),Object(T.useEffect)(function(){x&&x.setOption("mode",L)},[x,L]),Object(T.useEffect)(function(){x&&((w!==x.getValue()||w==="")&&setTimeout(function(){x.setValue(w||" ")},300))},[x,w]),Object(T.useEffect)(function(){if(g.current&&!x){var P=p.a.fromTextArea(g.current,Object(Z.a)({mode:L,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},b));m(P)}},[g.current,x]),v.a.createElement("div",{className:"my-codemirror-container"},v.a.createElement("textarea",{ref:g}))}},"7ixt":function(Be,he,B){"use strict";B.d(he,"a",function(){return N});var Z={adjustX:1,adjustY:1},z=[0,0],N={left:{points:["cr","cl"],overflow:Z,offset:[-4,0],targetOffset:z},right:{points:["cl","cr"],overflow:Z,offset:[4,0],targetOffset:z},top:{points:["bc","tc"],overflow:Z,offset:[0,-4],targetOffset:z},bottom:{points:["tc","bc"],overflow:Z,offset:[0,4],targetOffset:z},topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-4],targetOffset:z},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0],targetOffset:z},topRight:{points:["br","tr"],overflow:Z,offset:[0,-4],targetOffset:z},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0],targetOffset:z},bottomRight:{points:["tr","br"],overflow:Z,offset:[0,4],targetOffset:z},rightBottom:{points:["bl","br"],overflow:Z,offset:[4,0],targetOffset:z},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,4],targetOffset:z},leftBottom:{points:["br","bl"],overflow:Z,offset:[-4,0],targetOffset:z}},Y=N},"7v3h":function(Be,he,B){Be.exports=B.p+"static/empty2.dd73f390.png"},"8/bI":function(Be,he,B){Be.exports=B.p+"static/empty.8918e228.png"},"815F":function(Be,he,B){"use strict";B.d(he,"e",function(){return G}),B.d(he,"c",function(){return n}),B.d(he,"d",function(){return T}),B.d(he,"a",function(){return f}),B.d(he,"f",function(){return p}),B.d(he,"b",function(){return c});var Z=B("KQm4"),z=B("VTBJ"),N=B("Ff2n"),Y=B("Zm9Q"),W=B("Kwbf"),D=B("OZM5");function G(s,d){return s!=null?s:d}function j(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=new Map;function u(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(l||[]).forEach(function(i){var R=i.key,O=i.children;Object(W.a)(R!=null,"Tree node must have a certain key: [".concat(a).concat(R,"]"));var w=String(R);Object(W.a)(!d.has(w)||R===null||R===void 0,"Same 'key' exist in the Tree: ".concat(w)),d.set(w,!0),u(O,"".concat(a).concat(w," > "))})}u(s)}function n(s){function d(u){var l=Object(Y.a)(u);return l.map(function(a){if(!Object(D.i)(a))return Object(W.a)(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var i=a.key,R=a.props,O=R.children,w=Object(N.a)(R,["children"]),M=Object(z.a)({key:i},w),L=d(O);return L.length&&(M.children=L),M}).filter(function(a){return a})}return d(s)}function T(){var s=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),l=[];function a(i){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return i.map(function(O,w){var M=Object(D.h)(R?R.pos:"0",w),L=G(O.key,M),_=Object(z.a)(Object(z.a)({},O),{},{parent:R,pos:M,children:null,data:O,isStart:[].concat(Object(Z.a)(R?R.isStart:[]),[w===0]),isEnd:[].concat(Object(Z.a)(R?R.isEnd:[]),[w===i.length-1])});return l.push(_),d===!0||u.has(L)?_.children=a(O.children||[],_):_.children=[],_})}return a(s),l}function v(s,d,u){var l;u?typeof u=="string"?l=function(R){return R[u]}:typeof u=="function"&&(l=function(R){return u(R)}):l=function(R,O){return G(R.key,O)};function a(i,R,O){var w=i?i.children:s,M=i?Object(D.h)(O.pos,R):"0";if(i){var L=l(i,M),_={node:i,index:R,pos:M,key:L,parentPos:O.node?O.pos:null,level:O.level+1};d(_)}w&&w.forEach(function(b,g){a(b,g,{node:i,pos:M,level:O?O.level+1:-1})})}a(null)}function f(s){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=d.initWrapper,l=d.processEntity,a=d.onProcessFinished,i=arguments.length>2?arguments[2]:void 0,R={},O={},w={posEntities:R,keyEntities:O};return u&&(w=u(w)||w),v(s,function(M){var L=M.node,_=M.index,b=M.pos,g=M.key,h=M.parentPos,C=M.level,x={node:L,index:_,key:g,pos:b,level:C},m=G(g,b);R[b]=x,O[m]=x,x.parent=R[h],x.parent&&(x.parent.children=x.parent.children||[],x.parent.children.push(x)),l&&l(x,w)},i),a&&a(w),w}function p(s,d){var u=d.expandedKeys,l=d.selectedKeys,a=d.loadedKeys,i=d.loadingKeys,R=d.checkedKeys,O=d.halfCheckedKeys,w=d.dragOverNodeKey,M=d.dropPosition,L=d.keyEntities,_=L[s],b={eventKey:s,expanded:u.indexOf(s)!==-1,selected:l.indexOf(s)!==-1,loaded:a.indexOf(s)!==-1,loading:i.indexOf(s)!==-1,checked:R.indexOf(s)!==-1,halfChecked:O.indexOf(s)!==-1,pos:String(_?_.pos:""),dragOver:w===s&&M===0,dragOverGapTop:w===s&&M===-1,dragOverGapBottom:w===s&&M===1};return b}function c(s){var d=s.data,u=s.expanded,l=s.selected,a=s.checked,i=s.loaded,R=s.loading,O=s.halfChecked,w=s.dragOver,M=s.dragOverGapTop,L=s.dragOverGapBottom,_=s.pos,b=s.active,g=Object(z.a)(Object(z.a)({},d),{},{expanded:u,selected:l,checked:a,loaded:i,loading:R,halfChecked:O,dragOver:w,dragOverGapTop:M,dragOverGapBottom:L,pos:_,active:b});return"props"in g||Object.defineProperty(g,"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`."),s}}),g}},"8EBN":function(Be,he,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 z=0;z<Z.modeInfo.length;z++){var N=Z.modeInfo[z];N.mimes&&(N.mime=N.mimes[0])}Z.findModeByMIME=function(Y){Y=Y.toLowerCase();for(var W=0;W<Z.modeInfo.length;W++){var D=Z.modeInfo[W];if(D.mime==Y)return D;if(D.mimes){for(var G=0;G<D.mimes.length;G++)if(D.mimes[G]==Y)return D}}if(/\+xml$/.test(Y))return Z.findModeByMIME("application/xml");if(/\+json$/.test(Y))return Z.findModeByMIME("application/json")},Z.findModeByExtension=function(Y){Y=Y.toLowerCase();for(var W=0;W<Z.modeInfo.length;W++){var D=Z.modeInfo[W];if(D.ext){for(var G=0;G<D.ext.length;G++)if(D.ext[G]==Y)return D}}},Z.findModeByFileName=function(Y){for(var W=0;W<Z.modeInfo.length;W++){var D=Z.modeInfo[W];if(D.file&&D.file.test(Y))return D}var G=Y.lastIndexOf("."),j=G>-1&&Y.substring(G+1,Y.length);if(j)return Z.findModeByExtension(j)},Z.findModeByName=function(Y){Y=Y.toLowerCase();for(var W=0;W<Z.modeInfo.length;W++){var D=Z.modeInfo[W];if(D.name.toLowerCase()==Y)return D;if(D.alias){for(var G=0;G<D.alias.length;G++)if(D.alias[G].toLowerCase()==Y)return D}}}})},"8HAY":function(Be,he,B){"use strict";B.d(he,"a",function(){return W}),B.d(he,"b",function(){return D}),B.d(he,"d",function(){return G}),B.d(he,"e",function(){return j}),B.d(he,"c",function(){return n});var Z=B("MI8n"),z=B("pmY6"),N=B("3/fG"),Y=function(T,v,f,p){function c(s){return s instanceof f?s:new f(function(d){d(s)})}return new(f||(f=Promise))(function(s,d){function u(i){try{a(p.next(i))}catch(R){d(R)}}function l(i){try{a(p.throw(i))}catch(R){d(R)}}function a(i){i.done?s(i.value):c(i.value).then(u,l)}a((p=p.apply(T,v||[])).next())})};class W extends z.a{constructor(T,v="",f="",p=!0,c){super();this._onDidChange=this._register(new Z.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=T,this._label=v,this._cssClass=f,this._enabled=p,this._actionCallback=c}get id(){return this._id}get label(){return this._label}set label(T){this._setLabel(T)}_setLabel(T){this._label!==T&&(this._label=T,this._onDidChange.fire({label:T}))}get tooltip(){return this._tooltip||""}set tooltip(T){this._setTooltip(T)}_setTooltip(T){this._tooltip!==T&&(this._tooltip=T,this._onDidChange.fire({tooltip:T}))}get class(){return this._cssClass}set class(T){this._setClass(T)}_setClass(T){this._cssClass!==T&&(this._cssClass=T,this._onDidChange.fire({class:T}))}get enabled(){return this._enabled}set enabled(T){this._setEnabled(T)}_setEnabled(T){this._enabled!==T&&(this._enabled=T,this._onDidChange.fire({enabled:T}))}get checked(){return this._checked}set checked(T){this._setChecked(T)}_setChecked(T){this._checked!==T&&(this._checked=T,this._onDidChange.fire({checked:T}))}run(T,v){return Y(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(T))})}}class D extends z.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(T,v){return Y(this,void 0,void 0,function*(){if(!T.enabled)return;this._onBeforeRun.fire({action:T});let f;try{yield this.runAction(T,v)}catch(p){f=p}this._onDidRun.fire({action:T,error:f})})}runAction(T,v){return Y(this,void 0,void 0,function*(){yield T.run(v)})}}class G extends W{constructor(T){super(G.ID,T,T?"separator text":"separator");this.checked=!1,this.enabled=!1}}G.ID="vs.actions.separator";class j{constructor(T,v,f,p){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=T,this.label=v,this.class=p,this._actions=f}get actions(){return this._actions}dispose(){}run(){return Y(this,void 0,void 0,function*(){})}}class n extends W{constructor(){super(n.ID,N.a("submenu.empty","(empty)"),void 0,!1)}}n.ID="vs.actions.empty"},"8hTe":function(Be,he,B){Be.exports={button:"button___1wy9m"}},"9Bee":function(Be,he,B){"use strict";var Z=B("DYRE"),z=B("zeV3"),N=B("+L6B"),Y=B("2/Rp"),W=B("k1fw"),D=B("9og8"),G=B("tJVT"),j=B("WmNS"),n=B.n(j),T=B("q1tI"),v=B.n(T),f=B("vg9a"),p=B("DlQD"),c=B.n(p),s=B("rUJ1");function d(le,$){var te=le.match(/^(\s+)(?:```)/);if(te===null)return $;var ae=te[1];return $.split(`
`).map(function(de){var ie=de.match(/^\s+/);if(ie===null)return de;var se=Object(G.a)(ie,1),pe=se[0];return pe.length>=ae.length?de.slice(ae.length):de}).join(`
`)}var u=[],l=["<ul>"],a=new c.a.Renderer,i=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function R(){u.length=0,l=["<ul>"]}var O={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(le,$,te,ae){if($>=le.length||le[$].level<=te)return $;var de=le[$];ae.push("<li><a href='#"+de.anchor+"'>"+de.text+"</a>"),$++;var ie=[];return $=w(le,$,de.level,ie),ie.length>0&&(ae.push("<ul>"),ie.forEach(function(se){ae.push(se)}),ae.push("</ul>")),ae.push("</li>"),$=w(le,$,te,ae),$}function M(){return w(u,0,0,l),l.push("</ul>"),l.join("")}var L={heading:function($){var te=i.exec($);if(te)return{type:"heading",raw:te[0],depth:te[1].length,text:te[2]}},fences:function($){var te=this.rules.block.fences.exec($);if(te){var ae=te[0],de=d(ae,te[3]||""),ie=te[2]?te[2].trim():te[2];if(["latex","katex","math"].indexOf(ie)>=0){var se=g(),pe=de;de=se,h[se]={type:"block",expression:pe}}return{type:"code",raw:ae,lang:ie,text:de}}}},_=/(?:\${2})([^\n`]+?)(?:\${2})/gi,b=0,g=function(){return"__special_katext_id_".concat(b++,"__")},h={};function C(){return h}function x(){b=0,h={}}function m(le){return le=le.replace(_,function($,te){var ae=g();return h[ae]={type:"inline",expression:te},ae}),le}var P=a.listitem;a.listitem=function(le){return P(m(le))};var k=a.paragraph;a.paragraph=function(le){return k(m(le))};var y=a.tablecell;a.tablecell=function(le,$){return y(m(le),$)},a.code=function(le,$,te){var ae=($||"").match(/\S*/)[0];return ae?["latex","katex","math"].indexOf(ae)>=0?"<p class='editormd-tex'>".concat(le,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat($,'">').concat(te?le:Object(s.escape)(le,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(te?le:Object(s.escape)(le,!0))+"</code></pre>"},a.heading=function(le,$,te){var ae=this.options.headerPrefix+te.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return u.push({anchor:ae,level:$,text:le}),"<h"+$+' id="'+ae+'">'+le+"</h"+$+">"},c.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),c.a.use({tokenizer:L,renderer:a});var S=c.a,F=B("SJMd"),A=B("ulZh"),X=B.n(A),ne=B("m3rI"),fe=B("Oy/b"),ye=B("p5ED"),Pe=B("ErOA"),xe=B("STEk");/* **********************************
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 Ie=function(le,$){return(Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(te,ae){te.__proto__=ae}||function(te,ae){for(var de in ae)Object.prototype.hasOwnProperty.call(ae,de)&&(te[de]=ae[de])})(le,$)};function Me(le,$){if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");function te(){this.constructor=le}Ie(le,$),le.prototype=$===null?Object.create($):(te.prototype=$.prototype,new te)}function ke(le,$,te,ae){return new(te||(te=Promise))(function(de,ie){function se(_e){try{be(ae.next(_e))}catch(Le){ie(Le)}}function pe(_e){try{be(ae.throw(_e))}catch(Le){ie(Le)}}function be(_e){var Le;_e.done?de(_e.value):(Le=_e.value,Le instanceof te?Le:new te(function(Ye){Ye(Le)})).then(se,pe)}be((ae=ae.apply(le,$||[])).next())})}function Ee(le,$){var te,ae,de,ie,se={label:0,sent:function(){if(1&de[0])throw de[1];return de[1]},trys:[],ops:[]};return ie={next:pe(0),throw:pe(1),return:pe(2)},typeof Symbol=="function"&&(ie[Symbol.iterator]=function(){return this}),ie;function pe(be){return function(_e){return function(Le){if(te)throw new TypeError("Generator is already executing.");for(;se;)try{if(te=1,ae&&(de=2&Le[0]?ae.return:Le[0]?ae.throw||((de=ae.return)&&de.call(ae),0):ae.next)&&!(de=de.call(ae,Le[1])).done)return de;switch(ae=0,de&&(Le=[2&Le[0],de.value]),Le[0]){case 0:case 1:de=Le;break;case 4:return se.label++,{value:Le[1],done:!1};case 5:se.label++,ae=Le[1],Le=[0];continue;case 7:Le=se.ops.pop(),se.trys.pop();continue;default:if(!(de=se.trys,(de=de.length>0&&de[de.length-1])||Le[0]!==6&&Le[0]!==2)){se=0;continue}if(Le[0]===3&&(!de||Le[1]>de[0]&&Le[1]<de[3])){se.label=Le[1];break}if(Le[0]===6&&se.label<de[1]){se.label=de[1],de=Le;break}if(de&&se.label<de[2]){se.label=de[2],se.ops.push(Le);break}de[2]&&se.ops.pop(),se.trys.pop();continue}Le=$.call(le,se)}catch(Ye){Le=[6,Ye],ae=0}finally{te=de=0}if(5&Le[0])throw Le[1];return{value:Le[0]?Le[1]:void 0,done:!0}}([be,_e])}}}var J=function(){function le(){}return le.addKey=function($){le.key=$},Object.defineProperty(le,"isLicensed",{get:function(){return!!le.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(le.key)},enumerable:!1,configurable:!0}),le}(),I=function(){function le(){}return le.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},le.setAttributes=function($,te){for(var ae=0,de=te;ae<de.length;ae++){var ie=de[ae],se=ie[0],pe=ie[1];$.setAttribute(se,pe)}},le.createRect=function($,te,ae){var de=document.createElementNS("http://www.w3.org/2000/svg","rect");return de.setAttribute("width",$.toString()),de.setAttribute("height",te.toString()),ae&&le.setAttributes(de,ae),de},le.createLine=function($,te,ae,de,ie){var se=document.createElementNS("http://www.w3.org/2000/svg","line");return se.setAttribute("x1",$.toString()),se.setAttribute("y1",te.toString()),se.setAttribute("x2",ae.toString()),se.setAttribute("y2",de.toString()),ie&&le.setAttributes(se,ie),se},le.createPolygon=function($,te){var ae=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ae.setAttribute("points",$),te&&le.setAttributes(ae,te),ae},le.createCircle=function($,te){var ae=document.createElementNS("http://www.w3.org/2000/svg","circle");return ae.setAttribute("cx",($/2).toString()),ae.setAttribute("cy",($/2).toString()),ae.setAttribute("r",$.toString()),te&&le.setAttributes(ae,te),ae},le.createEllipse=function($,te,ae){var de=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return de.setAttribute("cx",($/2).toString()),de.setAttribute("cy",(te/2).toString()),de.setAttribute("rx",($/2).toString()),de.setAttribute("ry",(te/2).toString()),ae&&le.setAttributes(de,ae),de},le.createGroup=function($){var te=document.createElementNS("http://www.w3.org/2000/svg","g");return $&&le.setAttributes(te,$),te},le.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},le.createMarker=function($,te,ae,de,ie,se,pe){var be=document.createElementNS("http://www.w3.org/2000/svg","marker");return le.setAttributes(be,[["id",$],["orient",te],["markerWidth",ae.toString()],["markerHeight",de.toString()],["refX",ie.toString()],["refY",se.toString()]]),be.appendChild(pe),be},le.createText=function($){var te=document.createElementNS("http://www.w3.org/2000/svg","text");return te.setAttribute("x","0"),te.setAttribute("y","0"),$&&le.setAttributes(te,$),te},le.createTSpan=function($,te){var ae=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ae.textContent=$,te&&le.setAttributes(ae,te),ae},le.createImage=function($){var te=document.createElementNS("http://www.w3.org/2000/svg","image");return $&&le.setAttributes(te,$),te},le.createPoint=function($,te){var ae=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ae.x=$,ae.y=te,ae},le.createPath=function($,te){var ae=document.createElementNS("http://www.w3.org/2000/svg","path");return ae.setAttribute("d",$),te&&le.setAttributes(ae,te),ae},le.createElement=function($,te){var ae=document.createElementNS("http://www.w3.org/2000/svg",$);return te&&le.setAttributes(ae,te),ae},le.getHollowRectanglePath=function($,te,ae,de,ie,se,pe,be){return"M"+$+","+te+"V"+(te+de)+"H"+($+ae)+"V"+te+"H"+ie+"V"+se+"H"+(ie+pe)+"V"+(se+be)+"H"+ie+"V"+te+"Z"},le}(),U=function(){function le($){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+$+"_"}return Object.defineProperty(le.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(le.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(le.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),le.prototype.addClass=function($){return this.styleSheet===void 0&&this.addStyleSheet(),$.name=""+this.classNamePrefix+$.localName,this.classes.push($),this.styleSheet.sheet.insertRule("."+$.name+" {"+$.style+"}",this.styleSheet.sheet.cssRules.length),$},le.prototype.addRule=function($){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push($),this.styleSheet.sheet.insertRule($.selector+" {"+$.style+"}",this.styleSheet.sheet.cssRules.length)},le.prototype.addStyleSheet=function(){var $;this.styleSheet=document.createElement("style"),(($=this.styleSheetRoot)!==null&&$!==void 0?$:document.head).appendChild(this.styleSheet),this.addRule(new K("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new K("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new K("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new q("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new q("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},le.prototype.removeStyleSheet=function(){var $;this.styleSheet&&((($=this.styleSheetRoot)!==null&&$!==void 0?$:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},le}(),K=function(le,$){this.selector=le,this.style=$},q=function(le,$){this.localName=le,this.style=$},V=function(){function le(){this.blocks=[],this.display=""}return le.prototype.addButtonBlock=function($){$.className=this.blockClassName,$.buttonClassName=this.buttonClassName,$.buttonColorsClassName=this.buttonColorsClassName,$.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push($)},le.prototype.addElementBlock=function($){$.className===void 0&&($.className=this.blockClassName),this.blocks.push($)},le.prototype.getUI=function(){var $=document.createElement("div");return $.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,$.style.display=this.display,this.blocks.forEach(function(te){return $.appendChild(te.getUI())}),$},le}(),ue=function(){function le(){}return le.prototype.getUI=function(){var $=document.createElement("div");if($.className=this.className,this.minWidth!==void 0&&($.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":$.style.justifyContent="flex-start";break;case"center":$.style.justifyContent="center";break;case"end":$.style.justifyContent="flex-end"}return $.style.whiteSpace="nowrap",$},le}(),Ae=function(le){function $(){var te=le!==null&&le.apply(this,arguments)||this;return te.buttons=[],te}return Me($,le),$.prototype.addButton=function(te){te.className=this.buttonClassName,te.colorsClassName=this.buttonColorsClassName,te.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(te)},$.prototype.getUI=function(){var te=le.prototype.getUI.call(this);return this.buttons.forEach(function(ae){return te.appendChild(ae.getUI())}),te},$}(ue),Ue=function(){function le($,te){this._isActive=!1,this._isHidden=!1,this._icon=$,this.title=te,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(le.prototype,"icon",{get:function(){return this._icon},set:function($){this._icon=$,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isActive",{get:function(){return this._isActive},set:function($){this._isActive=$,this.adjustClassName()},enumerable:!1,configurable:!0}),le.prototype.getUI=function(){var $=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 $.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},le.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,"")))},le.prototype.hide=function(){this._isHidden=!0},le}(),ce=function(le){function $(){var te=le!==null&&le.apply(this,arguments)||this;return te.elements=[],te}return Me($,le),$.prototype.addElement=function(te){this.elements.push(te)},$.prototype.getUI=function(){var te=le.prototype.getUI.call(this);return this.elements.forEach(function(ae){return te.appendChild(ae)}),te},$}(ue),ge=function(){function le($,te){this.horizontal=$,this.vertical=te}return Object.defineProperty(le.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),le.prototype.getVerticalLength=function($){return $/this.ratio},le.prototype.getHorizontalLength=function($){return $*this.ratio},le}(),Te=function(){function le(){}return le.getIcon=function($,te){if($>0&&te>0){var ae=new ge($,te),de=ae.ratio>=1?20:ae.getHorizontalLength(20),ie=ae.ratio<1?20:ae.getVerticalLength(20),se=document.createElementNS("http://www.w3.org/2000/svg","svg");se.setAttribute("xmlns","http://www.w3.org/2000/svg"),se.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(se);var pe=I.createDefs();se.appendChild(pe);var be=I.createElement("clipPath",[["id","text-bg-clip"]]);pe.appendChild(be);var _e=I.createPath(I.getHollowRectanglePath((24-de)/2,(24-ie)/2,de,ie,(24-de)/2+2,(24-ie)/2+2,de-4,ie-4));se.appendChild(_e);var Le=I.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Le.appendChild(I.createTSpan($+":"+te)),se.appendChild(Le);var Ye=Le.getBBox();I.setAttributes(Le,[["x",((24-Ye.width)/2).toString()],["y",((24-Ye.height)/2-Ye.y).toString()]]);var lt=I.createPath(I.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Ye.width))/2,(24-Math.ceil(Ye.height))/2,Math.ceil(Ye.width),Math.ceil(Ye.height)));return be.appendChild(lt),I.setAttributes(_e,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(se),se.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>'},le}(),Oe=function(le){function $(te,ae,de){var ie=le.call(this,te,ae)||this;return ie.isDropdownOpen=!1,ie.onClick=ie.dropdownButtonClicked,ie.dropdownButtons=de,ie}return Me($,le),$.prototype.setupDropdown=function(){var te=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ae){ae.className=te.className,ae.colorsClassName=te.colorsClassName,te.dropdownBlock.appendChild(ae.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},$.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},$.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},$.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},$.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},$.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},$}(Ue),Xe=function(){function le($,te){this.GRIP_SIZE=10,this.color=$,this.fillColor=te,this.visual=I.createGroup(),this.visual.appendChild(I.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(I.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return le.prototype.ownsTarget=function($){return $===this.visual||$===this.visual.childNodes[0]||$===this.visual.childNodes[1]},le.prototype.setCenter=function($,te){this.visual.childNodes.forEach(function(ae){return I.setAttributes(ae,[["cx",$.toString()],["cy",te.toString()]])})},le}(),rt=function(){function le($,te,ae,de){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=$,this.canvasHeight=te,this.margin=ae,this.container=de,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(le.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function($){this._aspectRatio=$,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function($){this._isGridVisible=$,this.gridContainer&&I.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function($){this._zoomFactor=$,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),le.prototype.open=function(){var $=this;this.cropShadeElement=I.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=I.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var te=0;te<this.numberOfGridLines;te++)this.horizontalGridLines.push(I.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(I.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ae){return $.gridContainer.appendChild(ae)}),this.verticalGridLines.forEach(function(ae){return $.gridContainer.appendChild(ae)}),this.cropRectElement=I.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Xe(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Xe(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Xe(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Xe(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},le.prototype.setCropRectangle=function($){this.cropRect=$;var te=Object.assign({},this.cropRect);this.zoomFactor!==1&&(te.width=this.cropRect.width*this.zoomFactor,te.height=this.cropRect.height*this.zoomFactor,te.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-te.width/2,te.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-te.height/2),I.setAttributes(this.cropRectElement,[["x",te.x.toString()],["y",te.y.toString()],["width",te.width.toString()],["height",te.height.toString()]]);var ae=te.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ie,se){var pe=te.y+ae*(se+1);I.setAttributes(ie,[["x1",""+te.x],["y1",""+pe],["x2",""+(te.x+te.width)],["y2",""+pe]])});var de=te.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ie,se){var pe=te.x+de*(se+1);I.setAttributes(ie,[["x1",""+pe],["y1",""+te.y],["x2",""+pe],["y2",""+(te.y+te.height)]])}),I.setAttributes(this.cropShadeElement,[["d",I.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,te.x,te.y,te.width,te.height)]]),this.topLeftGrip.setCenter(te.x,te.y),this.topRightGrip.setCenter(te.x+te.width,te.y),this.bottomLeftGrip.setCenter(te.x,te.y+te.height),this.bottomRightGrip.setCenter(te.x+te.width,te.y+te.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},le.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)},le.prototype.clientToLocalCoordinates=function($,te){var ae=this.container.getBoundingClientRect();return{x:$-ae.left+this.margin,y:te-ae.top+this.margin}},le.prototype.onPointerDown=function($){this.container.setPointerCapture($.pointerId),this.previousPoint=this.clientToLocalCoordinates($.clientX,$.clientY),this.cropRectElement===$.target?this.isMoving=!0:this.topLeftGrip.ownsTarget($.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget($.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget($.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget($.target)&&(this.activeGrip=this.bottomRightGrip)},le.prototype.onPointerMove=function($){if(this.isMoving)this.move(this.clientToLocalCoordinates($.clientX,$.clientY));else if(this.activeGrip){var te=this.clientToLocalCoordinates($.clientX,$.clientY);this.resize(te)}$.preventDefault()},le.prototype.onPointerUp=function($){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture($.pointerId)},le.prototype.move=function($){var te=$.x-this.previousPoint.x,ae=$.y-this.previousPoint.y;this.zoomFactor!==1&&(te=-te/this.zoomFactor,ae=-ae/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+te),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ae),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=$},le.prototype.resize=function($){var te=Object.assign({},this.cropRect),ae=$.x-this.previousPoint.x,de=$.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:te.x+ae<this.margin&&(ae=this.margin-te.x),te.x+=ae,te.width=this.cropRect.x+this.cropRect.width-te.x;break;case this.bottomRightGrip:case this.topRightGrip:te.width+ae>this.canvasWidth*this.zoomFactor&&(ae=this.canvasWidth*this.zoomFactor-te.width),te.width+=ae}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(te.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ae),te.height=this.aspectRatio.getVerticalLength(te.width)):(te.y+=de,te.height=this.cropRect.y+this.cropRect.height-te.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?te.height=this.aspectRatio.getVerticalLength(te.width):te.height+=de}te.width<10&&(te.x=this.cropRect.x,te.width=10),te.height<10&&(te.y=this.cropRect.y,te.height=10),this.previousPoint=$,te.x>=this.margin&&te.y>=this.margin&&te.x-this.margin+te.width<=this.canvasWidth&&te.y-this.margin+te.height<=this.canvasHeight&&(this.cropRect=te,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},le.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var $=this.cropRect.x+this.cropRect.width/2,te=this.cropRect.y+this.cropRect.height/2,ae=this.aspectRatio.getHorizontalLength(this.cropRect.height),de=this.aspectRatio.getVerticalLength(this.cropRect.width);ae/this.canvasWidth<de/this.canvasHeight?this.cropRect.width=ae:this.cropRect.height=de,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=$-this.cropRect.width/2,this.cropRect.y=te-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)}},le.prototype.getRescaledRect=function($,te,ae,de,ie,se){var pe=ae/$,be=de/te;return{x:(ie.x-se)*pe+se,y:(ie.y-se)*be+se,width:ie.width*pe,height:ie.height*be}},le.prototype.scaleCanvas=function($,te){var ae=this.getRescaledRect(this.canvasWidth,this.canvasHeight,$,te,this.cropRect,this.margin);this.canvasWidth=$,this.canvasHeight=te,this.onCropChange&&this.onCropChange(ae),this.setCropRectangle(ae)},le}(),st=function(){function le($){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=$,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(le.prototype,"angle",{get:function(){return this._angle},set:function($){this._angle=$,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),le.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},le.prototype.onPointerDown=function($){this.controlContainer.setPointerCapture($.pointerId),this.isDragging=!0,this.previousPoint={x:$.clientX,y:$.clientY}},le.prototype.onPointerMove=function($){this.isDragging&&(this.onAngleChange&&this.onAngleChange(($.clientX-this.previousPoint.x)/5),this.previousPoint.x=$.clientX)},le.prototype.onPointerUp=function($){this.isDragging&&this.onAngleChange&&this.onAngleChange(($.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture($.pointerId)},le.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var $=this.angleLabelText.getBBox();I.setAttributes(this.angleLabelElement,[["x",((this.width-$.width)/2).toString()],["y",(this.height/2).toString()]])}},le.prototype.positionScaleShape=function(){if(this.scaleShape){var $=this.scaleShape.transform.baseVal.getItem(0);$.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem($,0)}},le.prototype.getVisual=function(){var $=document.createElementNS("http://www.w3.org/2000/svg","svg");$.setAttribute("xmlns","http://www.w3.org/2000/svg"),$.setAttribute("width",this.width+"px"),$.setAttribute("height",this.height+"px"),$.setAttribute("viewBox","0 0 "+this.width+" "+this.height),$.style.flexShrink="0",document.body.appendChild($);for(var te="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ae=1;ae<=this.width/5+10;ae++){var de=ae%5==0?this.height/3:this.height/6;te+="h4v"+-de+"h1v"+de}te+="v1H0Z",this.scaleShape=I.createPath(te);var ie=I.createTransform();this.scaleShape.transform.baseVal.appendItem(ie),$.appendChild(this.scaleShape),this.angleLabelElement=I.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=I.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var se=I.createTSpan("");return se.innerHTML="&deg;",this.angleLabelElement.appendChild(se),$.appendChild(this.angleLabelElement),document.body.removeChild($),$},le}(),nt=function(){function le(){this.naturalSize=!1,this.imageType="image/png"}return le.prototype.rasterize=function($,te,ae,de,ie,se,pe){var be=this;return new Promise(function(_e){var Le=document.createElement("canvas");Le.width=$.width.baseVal.value-2*de,Le.height=$.height.baseVal.value-2*de;var Ye=1,lt=1;be.naturalSize===!0?(Ye=te.naturalWidth/($.width.baseVal.value-2*de)/se,lt=te.naturalHeight/($.height.baseVal.value-2*de)/pe,Le.width=te.naturalWidth/se,Le.height=te.naturalHeight/pe):be.width!==void 0&&be.height!==void 0&&(Ye=be.width/ae.width,lt=be.height/ae.height,Le.width*=Ye,Le.height*=lt);var Et=Le.getContext("2d");Et.translate(Le.width/2,Le.height/2),Et.rotate(ie*Math.PI/180),Et.scale(se,pe),Et.translate(-Le.width/2,-Le.height/2),Et.drawImage(te,0,0,Le.width,Le.height);var vt=document.createElement("canvas");vt.width=ae.width*Ye,vt.height=ae.height*lt,vt.getContext("2d").putImageData(Et.getImageData((ae.x-de)*Ye,(ae.y-de)*lt,ae.width*Ye,ae.height*lt),0,0),_e(vt.toDataURL(be.imageType,be.imageQuality))})},le}(),bt=function(){function le($){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=le.instanceCounter++,this.styles=new U(this.instanceNo),this.target=$,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(le.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function($){this._zoomToCropEnabled=$,$?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function($){this._isGridVisible=$,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"gridLines",{get:function(){return this._gridLines},set:function($){this._gridLines=$,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function($){this._rotationAngle=$,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"aspectRatio",{get:function(){var $;return($=this._aspectRatio)!==null&&$!==void 0?$:this.aspectRatios[0]},set:function($){this._aspectRatio=$},enumerable:!1,configurable:!0}),le.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},le.prototype.show=function(){this.showUI(),this.open()},le.prototype.close=function($){$===void 0&&($=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),$||this.closeEventListeners.forEach(function(te){return te()}),this._isOpen=!1)},le.prototype.addRenderEventListener=function($){this.renderEventListeners.push($)},le.prototype.removeRenderEventListener=function($){this.renderEventListeners.indexOf($)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf($),1)},le.prototype.addCloseEventListener=function($){this.closeEventListeners.push($)},le.prototype.removeCloseEventListener=function($){this.closeEventListeners.indexOf($)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf($),1)},le.prototype.setupResizeObserver=function(){var $=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){$.resize($.target.clientWidth,$.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))},le.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var $=1*this.target.clientWidth/this.target.clientHeight,te=this.contentDiv.clientWidth/$>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*$:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ae=te+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/$;this.resize(te,ae)}},le.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},le.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",I.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},le.prototype.resize=function($,te){this.imageWidth=Math.round($),this.imageHeight=Math.round(te),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()},le.prototype.setEditingTarget=function(){var $=document.createElement("canvas");$.width=this.target.naturalWidth,$.height=this.target.naturalHeight,$.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var te=$.toDataURL();I.setAttributes(this.editingTarget,[["href",te]]),this.setEditingTargetSize()},le.prototype.setTopLeft=function(){var $=this.target.getBoundingClientRect(),te=this.editorCanvas.getBoundingClientRect();this.left=$.left-te.left-this.CANVAS_MARGIN,this.top=$.top-te.top-this.CANVAS_MARGIN},le.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=I.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=I.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=I.createGroup(),this.editingTargetRotationScaleContainer=I.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var $=I.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem($);var te=I.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(te),this.editingTargetContainer=I.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)},le.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},le.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=I.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new rt(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()},le.prototype.zoomToCrop=function(){if(this.cropRect){var $=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,te=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=$+"px "+te+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-$+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-te+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},le.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)},le.prototype.cropRectChanged=function($){this.cropRect=$,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},le.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},le.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"},le.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},le.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 $=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,te=this.target.offsetTop>$+this.CANVAS_MARGIN?this.target.offsetTop-($+this.CANVAS_MARGIN):0;this.coverDiv.style.top=te+"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},le.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},le.prototype.addTopToolbar=function(){var $=this;this.topToolbar=new V,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 te=new Ae;te.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(te);var ae=[];this.aspectRatios.forEach(function(lt){var Et=new Ue(Te.getIcon(lt.horizontal,lt.vertical),lt.horizontal===0&&lt.vertical===0?"FREE":lt.horizontal+":"+lt.vertical);Et.onClick=function(){return $.ratioButtonClicked(lt)},ae.push(Et)}),this.aspectRatioButton=new Oe(Te.getIcon(0,0),"Aspect ratio",ae),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,te.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var de=new Ue('<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");de.isActive=this.isGridVisible,de.onClick=function(){$.isGridVisible=!$.isGridVisible,de.isActive=$.isGridVisible},te.addButton(de);var ie=new Ue('<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(ie.isActive=this.zoomToCropEnabled,ie.onClick=function(){$.zoomToCropEnabled=!$.zoomToCropEnabled,ie.isActive=$.zoomToCropEnabled},te.addButton(ie),!J.isLicensed){var se=new ce;this.topToolbar.addElementBlock(se);var pe=document.createElement("div");pe.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var be=document.createElement("a");be.style.color="currentColor",be.href="https://markerjs.com/products/cropro",be.target="_blank",be.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>',pe.appendChild(be),se.addElement(pe)}var _e=new Ae;_e.minWidth=3*this.toolbarHeight+"px",_e.contentAlign="end",this.topToolbar.addButtonBlock(_e);var Le=new Ue('<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");Le.onClick=this.startRenderAndClose,_e.addButton(Le),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Le.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Ye=new Ue('<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");Ye.onClick=this.close,_e.addButton(Ye),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Ye.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},le.prototype.addBottomToolbar=function(){var $=this;this.bottomToolbar=new V,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 te=new Ae;te.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(te);var ae=new Ue('<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");ae.onClick=this.rotateLeftButtonClicked,te.addButton(ae);var de=new Ue('<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");de.onClick=this.rotateRightButtonClicked,te.addButton(de);var ie=new ce;ie.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ie),this.straightener=new st("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(_e){$.rotateBy(_e),$.straightener.angle=$.rotationAngle},ie.addElement(this.straightener.getUI());var se=new Ae;se.minWidth=2*this.toolbarHeight+"px",se.contentAlign="end",this.bottomToolbar.addButtonBlock(se);var pe=new Ue('<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");pe.onClick=this.flipHorizontallyButtonClicked,se.addButton(pe);var be=new Ue('<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");be.onClick=this.flipVerticallyButtonClicked,se.addButton(be)},le.prototype.ratioButtonClicked=function($){this.aspectRatio=$,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},le.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Te.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},le.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new ge(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},le.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},le.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},le.prototype.restoreState=function($){if($){var te=this.cropLayer.getRescaledRect($.width,$.height,this.imageWidth,this.imageHeight,$.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(te),this.cropRectChanged(te),this.flippedHorizontally=$.flippedHorizontally,this.flippedVertically=$.flippedVertically,this.applyFlip(),this.rotationAngle=$.rotationAngle,this.applyRotation()}},le.prototype.clientToLocalCoordinates=function($,te){var ae=this.cropImage.getBoundingClientRect();return{x:$-ae.left,y:te-ae.top}},le.prototype.onWindowResize=function(){this.positionUI()},le.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var $=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=$+"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()},le.prototype.rotateLeftButtonClicked=function(){var $=this.rotationAngle-90;this.rotationAngle%90!=0&&($+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo($)},le.prototype.rotateRightButtonClicked=function(){var $=this.rotationAngle+90;this.rotationAngle%90!=0&&($-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo($)},le.prototype.rotateTo=function($){$=($=$>180?$-360:$)<=-180?$+360:$,this.rotationAngle=$,this.applyRotation()},le.prototype.rotateBy=function($){this.rotateTo((this.rotationAngle+$)%360)},le.prototype.applyRotation=function(){var $=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var te=this.editingTargetRotationContainer.transform.baseVal.getItem(0);te.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(te,0);var ae=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ae.width,this.imageHeight/ae.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=$},le.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},le.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},le.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},le.prototype.startRenderAndClose=function(){return ke(this,void 0,void 0,function(){var $,te;return Ee(this,function(ae){switch(ae.label){case 0:return[4,this.render()];case 1:return $=ae.sent(),te=this.getState(),this.renderEventListeners.forEach(function(de){return de($,te)}),this.close(!0),[2]}})})},le.prototype.render=function(){return ke(this,void 0,void 0,function(){var $;return Ee(this,function(te){switch(te.label){case 0:return($=new nt).naturalSize=this.renderAtNaturalSize,$.imageType=this.renderImageType,$.imageQuality=this.renderImageQuality,$.width=this.renderWidth,$.height=this.renderHeight,this.unzoomFromCrop(),I.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,$.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 te.sent(),[4,$.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,te.sent()]}})})},le.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new q("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 q("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new q("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var $=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new q("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*$)+`px;
height: `+(this.toolbarHeight-2*$)+`px;
padding: `+$+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new q("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new q("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new K("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new K("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new q("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 q("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new q("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 q("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*$)+`px;
padding: `+$+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new q("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},le.instanceCounter=0,le}(),yt=B("8hTe"),Ne=B.n(yt),Re=/<pre[^>]*>/g;function Je(le){var $=document.createElement("div");return $.innerHTML=le,$.childNodes.length===0?"":$.childNodes[0].nodeValue}var tt=he.a=function(le){var $=le.value,te=$===void 0?"":$,ae=le.edit,de=ae===void 0?!1:ae,ie=le.className,se=le.showTextOnly,pe=le.showLines,be=le.replaces,_e=le.zoomImg,Le=le.hasMask,Ye=le.style,lt=Ye===void 0?{}:Ye,Et=le.stylesPrev,vt=Et===void 0?{}:Et,ft=String(te),ze=Object(T.useRef)(),Qe=Object(T.useRef)(),He=Object(T.useState)(""),me=Object(G.a)(He,2),we=me[0],qe=me[1],Ge=Object(T.useState)("office"),pt=Object(G.a)(Ge,2),dt=pt[0],je=pt[1],Ve=function(){var Ct=new bt(Qe.current);Ct.displayMode="popup",Ct.addRenderEventListener(function(){var Mt=Object(D.a)(n.a.mark(function St(kt){var Wt;return n.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return ze.current.style.display="none",$t.next=3,Object(Pe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:kt}});case 3:Wt=$t.sent,Wt!=null&&Wt.id&&be(Qe.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Wt==null?void 0:Wt.id,"?type=").concat(Wt.content_type));case 5:case"end":return $t.stop()}},St)}));return function(St){return Mt.apply(this,arguments)}}()),Ct.show()},$e=function(){var Ct=new xe.a(Qe.current);Ct.settings.displayMode="popup",Ct.addEventListener("render",function(){var Mt=Object(D.a)(n.a.mark(function St(kt){var Wt;return n.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:if(ze.current.style.display="none",!Qe.current){$t.next=6;break}return $t.next=4,Object(Pe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:kt.dataUrl}});case 4:Wt=$t.sent,Wt!=null&&Wt.id&&be(Qe.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Wt==null?void 0:Wt.id,"?type=").concat(Wt.content_type));case 6:case"end":return $t.stop()}},St)}));return function(St){return Mt.apply(this,arguments)}}()),Ct.show(),window.markerArea=Ct},it=Object(T.useMemo)(function(){ze.current&&(ze.current.style.zIndex=-1);try{var gt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ct=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Mt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ft=ft.replace(gt,"("+ne.a.API_SERVER+"/api/attachments/").replace(Ct,'"'+ne.a.API_SERVER+"/api/attachments/").replace(Mt,'"'+ne.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(dn){}var St=S(ft),kt=C();if(ft.match(/\[TOC\]/)&&(St=St.replace("<p>[TOC]</p>",M()),R()),St=St.replace(/(__special_katext_id_\d+__)/g,function(dn,$t){var ot=kt[$t],Pt=ot.type,Ht=ot.expression;return Object(fe.renderToString)(Je(Ht)||"",{displayMode:Pt==="block",throwOnError:!1,output:"html"})}),St=St.replace(/▁/g,"\u2581\u2581\u2581"),x(),se){var Wt=document.createElement("div");return Wt.innerHTML=St,Wt.innerText}return setTimeout(function(){return Dt()},500),St},[ft]),ut=Object(T.useRef)();O.WebkitLineClamp=pe,pe&&(lt=Object(W.a)(Object(W.a)({},lt),O));function et(gt){var Ct=gt.target;if(Ct.tagName.toUpperCase()==="IMG"){if(_e){var Mt=Ct.getAttribute("src");qe(Mt),je("image")}}else if(Ct.tagName.toUpperCase()==="A"){var St=Ct.getAttribute("href");if(St.indexOf("office")>-1)gt.preventDefault(),qe(St),je("office");else if(St.indexOf("application/pdf")>-1)gt.preventDefault(),qe(St),je("pdf");else if(St.indexOf("text/html")>-1)gt.preventDefault(),qe(St),je("html");else if(St.startsWith("#")){gt.preventDefault();var kt=document.getElementById(St.replace("#",""));kt&&kt.scrollIntoView(!0)}}}var Dt=function(){var Ct,Mt=(Ct=ut.current)===null||Ct===void 0?void 0:Ct.querySelectorAll("video");Mt==null||Mt.forEach(function(St){if(St.oncontextmenu=function(){return!1},St.src.indexOf(".m3u8")>-1&&!St.canPlayType("application/vnd.apple.mpegurl")){if(X.a.isSupported()){var kt=new X.a;kt.loadSource(St.src),kt.attachMedia(St)}}})};Object(T.useEffect)(function(){if(ut.current&&it&&(it.match(Re)&&window.PR.prettyPrint()),ut.current)return ut.current.addEventListener("click",et),function(){ut.current.removeEventListener("click",et),x(),R()}},[it,ut.current,et]);var Xt=function(Ct){if(!de)return;Ct.target.nodeName==="IMG"?(ze.current.style.zIndex=1,ze.current.style.display="flex",ze.current.style.width=Ct.target.clientWidth+"px",ze.current.style.height=Ct.target.clientHeight+"px",ze.current.style.top=Ct.target.offsetTop+"px",ze.current.style.left=Ct.target.offsetLeft+"px",Qe.current.src=Ct.target.getAttribute("src")):ze.current.style.display="none"};return v.a.createElement("div",{style:{position:"relative"}},v.a.createElement("div",{ref:ut,style:Object(W.a)({},lt),className:"".concat(ie||""," markdown-body ").concat(Ne.a.mdBody),onMouseOver:Xt,dangerouslySetInnerHTML:{__html:it}}),v.a.createElement("div",{ref:ze,className:Ne.a.button},v.a.createElement(z.a,null,v.a.createElement(Y.a,{onClick:function(){return Ve()}},"\u88C1\u526A"),v.a.createElement(Y.a,{onClick:function(){return $e()}},"\u7F16\u8F91"))),v.a.createElement("img",{ref:Qe,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),v.a.createElement(ye.a,{close:!0,data:we,type:we!=null&&we.length?dt:"",style:Object(W.a)({},vt),onClose:function(){return qe("")}}))}},"9VGf":function(Be,he,B){"use strict";B.d(he,"a",function(){return N});var Z=B("q1tI"),z=B.n(Z);function N(Y,W){var D=Object(Z.useRef)();Object(Z.useEffect)(function(){D.current=Y}),Object(Z.useEffect)(function(){function G(){D.current()}if(W!==null){var j=setInterval(G,W);return function(){return clearInterval(j)}}},[W])}},"A/g1":function(Be,he){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjEtMDctMDJUMTk6Mzg6MjMrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmVkYzRhODM0LTVjNWQtNDQ1My04MDYzLWNkNzcwODQyODg5ZSIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjQ4MTE0OTVlLTVkMDctZTk0YS1iNWEwLWYxOWJmZmM0NGUyNyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmMwNjQyYzA1LTg5MzQtNDdlYy04MTFiLTlkYjdhZGNkYjFiMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YzA2NDJjMDUtODkzNC00N2VjLTgxMWItOWRiN2FkY2RiMWIwIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjM4OjIzKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZWRjNGE4MzQtNWM1ZC00NDUzLTgwNjMtY2Q3NzA4NDI4ODllIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5fJkpyAAAGoElEQVRogc2abWxbVxnH/8+59/rdTpx2GW3UNWJJV7Ylaxp3LUFsWgJDiI5R8bK2GppAmsgQLKQthS8IEJ9okibrREf3gX2Y1K2bxAoDtog60RBSVxKnWUO7kpSppXJZK2ja2HFi33vPw4cmpbN9r++1k8Lv2znnf577f+zje95Mhw4dQqUkwljpF7kuv0EdHkm1HklRr6TQq2tn5xcklwhIMnMSQJIJxykTiSce+1am0mer5XacqM7uDJjiqbAuWlvSygrBnmKyxcoIA+tBBAAgAAikjNZ47zCIh8E8mOjYO1aOD3L7DYzXZJurs8qhuzLqFsH22hcbUs6CMudAol8Ic2Dkkb0fuvEj3IinwvobjTOeRP1safOuIPIA/AMpxbsb4z3fc9PVUQLvRY37L/vMDxtT2peCBpU97BywlkD9sXjvbzcfG7jTSYeSCZyK6l9tTCkn75xXHAVcChh4zCDzLy1DfQ+U0tomcDaSO9A8rb0WWN5P3QK+SzCPx471bLdTWSYwFdZfXz/j+e7SG3MHE73SGu+19FE0gTNV+o8aU9pXls+Waw7E4r2fL9ZQkMB4jd5xd1r96fJ7cgeDX944vL8hv74ggdUZccRrLsw4/1fQCpLyYH7tRxKYCutv1M4rK26fKdd8Nn+euJnAySp9w+o5dettt+QSItHV+nb/qsXyzddj1KAXlnmSsuIMgV8v1sCgHxdWcj002QXgh8BCAqdq9B33T2tbltOlBWcEia+NtO86nd/QOtR3EGyxXmHZHXun78jow7tPCgAI6NixpGsbZ1ibj/d2gvkZy55EHpbcDiz8BkK62LRsNotjaX5TvK8NzH0lI5j0aQAQ4z69pjarfGwZTFphab55sCdogntAFCgZhfgLn3xtv19oPnTexuFjaR4ANJV6CWhzGEvNrpQPiYBOt+vVaWu+Nd7bCaDTTUCS9LDwSNQuiT17bM3fGPd4zn1YWSc8kqJO5e9H9P6LAeNvLp9ia755sCcoiftAKLqptoOI6oRXUsiJ+FxIf/MTM9quNRl1/XhN7p7zQWPUQTdb88CNcQ9GWXMQA3XCb5JWSngxYJxtSGtfXCxvuOqZrJ9VN53wpcMfhIxhs8jSb0aT2VLmyxn3edQ52hOnNf5dsfrN86H0x9Nqu8KgqbBxdF5hCdwwfyFkPmFnflO8rw3AL8qy/V9YzCmsl1I1pNTdp6N6t52mMaVu85mkTEb0ly6EzCeaprXfWGmbB3uCTHgOLk9FCqGkmhWcBlBjJ9MkUX1K3TcRzV5qmvYesdOum9G+Weqxmop+Zo65dFsAEydFTvC0E3HQIHVNWnvpvRVGRYu+G+Oenq4kxiIk+ZLIKbjitEO1Lvyr0/SHieD8qtLqQhbG/Qvl9C2OSIqMWvwHasUdWSW6Umojbh/VPNgTlOCCLWElsOB3hO7BL6XLHfCqOaXuYsA466aPR6XnAZQ8qHKB4fWJP4kNV7SrV3ymqwNVAFiTUe85HzLedaKNxfd/h4FvuPdoA9Hvj7ftmhMAkFbZyaxaQH1a3XwurL9tp4kN7fsUQz5fTnxbGH8GFt7DcwpecTuMFmlIaZ+bjOgvF2u7d/gnIWZR+Q1KPowcIIaAhQSarqmH/xE0TpQbb92M9uT7kdz+/HqfDB0EcF/ZRi1ggYFER/cYcMtMOO3jzlmVjXKDrkt5uv9are9ZLJ8L6UcJ+HplVotygVRlYLFwM4GWf2njl/ymq1fqrSgM3J1Sfz5Rnd15ulp/tiGtPV6h0aIwaCDxUPc/F8sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},BU3w:function(Be,he,B){"use strict";B.d(he,"a",function(){return D});var Z=B("MNnm"),z="rc-util-key";function N(G){if(G.attachTo)return G.attachTo;var j=document.querySelector("head");return j||document.body}function Y(G){var j,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Z.a)())return null;var T=document.createElement("style");if((j=n.csp)===null||j===void 0?void 0:j.nonce){var v;T.nonce=(v=n.csp)===null||v===void 0?void 0:v.nonce}T.innerHTML=G;var f=N(n),p=f.firstChild;return n.prepend&&f.prepend?f.prepend(T):n.prepend&&p?f.insertBefore(T,p):f.appendChild(T),T}var W=new Map;function D(G,j){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},T=N(n);if(!W.has(T)){var v=Y("",n),f=v.parentNode;W.set(T,f),f.removeChild(v)}var p=Array.from(W.get(T).children).find(function(l){return l.tagName==="STYLE"&&l[z]===j});if(p){var c,s;if(((c=n.csp)===null||c===void 0?void 0:c.nonce)&&p.nonce!==((s=n.csp)===null||s===void 0?void 0:s.nonce)){var d;p.nonce=(d=n.csp)===null||d===void 0?void 0:d.nonce}return p.innerHTML!==G&&(p.innerHTML=G),p}var u=Y(G,n);return u[z]=j,u}},Bd2K:function(Be,he,B){(function(Z){Z(B("VrN/"),B("osHv"))})(function(Z){Z.defineOption("autoCloseTags",!1,function(n,T,v){if(v!=Z.Init&&v&&n.removeKeyMap("autoCloseTags"),!T)return;var f={name:"autoCloseTags"};(typeof T!="object"||T.whenClosing!==!1)&&(f["'/'"]=function(p){return D(p)}),(typeof T!="object"||T.whenOpening!==!1)&&(f["'>'"]=function(p){return Y(p)}),n.addKeyMap(f)});var z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],N=["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 Y(n){if(n.getOption("disableInput"))return Z.Pass;for(var T=n.listSelections(),v=[],f=n.getOption("autoCloseTags"),p=0;p<T.length;p++){if(!T[p].empty())return Z.Pass;var c=T[p].head,s=n.getTokenAt(c),d=Z.innerMode(n.getMode(),s.state),u=d.state,l=d.mode.xmlCurrentTag&&d.mode.xmlCurrentTag(u),a=l&&l.name;if(!a)return Z.Pass;var i=d.mode.configuration=="html",R=typeof f=="object"&&f.dontCloseTags||i&&z,O=typeof f=="object"&&f.indentTags||i&&N;s.end>c.ch&&(a=a.slice(0,a.length-s.end+c.ch));var w=a.toLowerCase();if(!a||s.type=="string"&&(s.end!=c.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&l.close||s.string.indexOf("/")==c.ch-s.start-1||R&&G(R,w)>-1||j(n,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(u)||[],a,c,!0))return Z.Pass;var M=typeof f=="object"&&f.emptyTags;if(M&&G(M,a)>-1){v[p]={text:"/>",newPos:Z.Pos(c.line,c.ch+2)};continue}var L=O&&G(O,w)>-1;v[p]={indent:L,text:">"+(L?`
`:"")+"</"+a+">",newPos:L?Z.Pos(c.line+1,0):Z.Pos(c.line,c.ch+1)}}for(var _=typeof f=="object"&&f.dontIndentOnAutoClose,p=T.length-1;p>=0;p--){var b=v[p];n.replaceRange(b.text,T[p].head,T[p].anchor,"+insert");var g=n.listSelections().slice(0);g[p]={head:b.newPos,anchor:b.newPos},n.setSelections(g),!_&&b.indent&&(n.indentLine(b.newPos.line,null,!0),n.indentLine(b.newPos.line+1,null,!0))}}function W(n,T){for(var v=n.listSelections(),f=[],p=T?"/":"</",c=n.getOption("autoCloseTags"),s=typeof c=="object"&&c.dontIndentOnSlash,d=0;d<v.length;d++){if(!v[d].empty())return Z.Pass;var u=v[d].head,l=n.getTokenAt(u),a=Z.innerMode(n.getMode(),l.state),i=a.state;if(T&&(l.type=="string"||l.string.charAt(0)!="<"||l.start!=u.ch-1))return Z.Pass;var R,O=a.mode.name!="xml"&&n.getMode().name=="htmlmixed";if(O&&a.mode.name=="javascript")R=p+"script";else if(O&&a.mode.name=="css")R=p+"style";else{var w=a.mode.xmlCurrentContext&&a.mode.xmlCurrentContext(i);if(!w||w.length&&j(n,w,w[w.length-1],u))return Z.Pass;R=p+w[w.length-1]}n.getLine(u.line).charAt(l.end)!=">"&&(R+=">"),f[d]=R}if(n.replaceSelections(f),v=n.listSelections(),!s)for(var d=0;d<v.length;d++)(d==v.length-1||v[d].head.line<v[d+1].head.line)&&n.indentLine(v[d].head.line)}function D(n){return n.getOption("disableInput")?Z.Pass:W(n,!0)}Z.commands.closeTag=function(n){return W(n)};function G(n,T){if(n.indexOf)return n.indexOf(T);for(var v=0,f=n.length;v<f;++v)if(n[v]==T)return v;return-1}function j(n,T,v,f,p){if(!Z.scanForClosingTag)return!1;var c=Math.min(n.lastLine()+1,f.line+500),s=Z.scanForClosingTag(n,f,null,c);if(!s||s.tag!=v)return!1;for(var d=p?1:0,u=T.length-1;u>=0&&T[u]==v;u--)++d;f=s.to;for(var u=1;u<d;u++){var l=Z.scanForClosingTag(n,f,null,c);if(!l||l.tag!=v)return!1;f=l.to}return!0}})},BjJ7:function(Be,he,B){"use strict";B.d(he,"d",function(){return z}),B.d(he,"c",function(){return N}),B.d(he,"e",function(){return Y}),B.d(he,"b",function(){return W}),B.d(he,"a",function(){return G});var Z=B("m3rI");function z(j){var n=!0;if(j.length>0){for(var T=0;T<j.length;T++)if(j[T].compile_success==0||!j[T].compile_success){n=!1;break}}else n=!1;return n}function N(j){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",T=[],v=0;v<j.length;v++){var f=j[v],p=n?"".concat(n,"/").concat(f.name):"".concat(f.name);T.push({title:f.name,isLeaf:!(f.type==="tree"),key:p})}return T}function Y(j,n,T){for(var v=0;v<j.length;v++){var f=j[v];if(f.key===n){f.children=T;break}f.children&&Y(f.children,n,T)}return j}function W(j,n,T){var v;return function(){var f=this,p=arguments,c=function(){v=null,T||j.apply(f,p)},s=T&&!v;clearTimeout(v),v=setTimeout(c,n),s&&j.apply(f,p)}}var D=!0,G=Z.a.API_SERVER},BlwA:function(Be,he,B){"use strict";var Z=B("9og8"),z=B("miYZ"),N=B("tsqr"),Y=B("tJVT"),W=B("WmNS"),D=B.n(W),G=B("q1tI"),j=B.n(G),n=B("Ty5D"),T=B("ErOA"),v=B("m3rI"),f=B("DR4n"),p=B.n(f),c=function(u,l){for(var a=u.split(","),i=a[0].match(/:(.*?);/)[1],R=atob(a[1]),O=R.length,w=new Uint8Array(O);O--;)w[O]=R.charCodeAt(O);return new Blob([w],{type:i})},s=Object(G.forwardRef)(function(d,u){var l=d.time,a=d.number,i=d.supportCamera,R=d.take_photo,O=d.update,w=d.id,M=Object(G.useRef)(),L=Object(G.useRef)(),_=Object(n.i)(),b=Object(G.useState)([]),g=Object(Y.a)(b,2),h=g[0],C=g[1],x=Object(G.useState)(0),m=Object(Y.a)(x,2),P=m[0],k=m[1],y=Object(G.useState)(""),S=Object(Y.a)(y,2),F=S[0],A=S[1],X=Object(G.useState)(),ne=Object(Y.a)(X,2),fe=ne[0],ye=ne[1],Pe=Object(G.useState)(0),xe=Object(Y.a)(Pe,2),Ie=xe[0],Me=xe[1];Object(G.useEffect)(function(){return J(),function(){U(),ke()}},[]),Object(G.useEffect)(function(){P===2&&l&&a>0&&(Ee(),Me(1))},[l]),Object(G.useEffect)(function(){if(Ie===0)return;if(Ie===2)clearInterval(fe);else{var q=0,V=setInterval(function(){h.includes(q)&&I(),q++},1e3);ye(V)}return function(){return clearInterval(fe)}},[Ie]),Object(G.useImperativeHandle)(u,function(){return{handlePhoto:I}});var ke=function(){Me(2)},Ee=function(){var V=l/a,ue=[];function Ae(Ue,ce){return parseInt(Math.floor(Math.random()*(ce-Ue+1))+Ue)}new Array(a).fill(0).map(function(Ue,ce){R?ue.push(Ae(V*ce,V*(ce+1))):ce==0?ue.push(0):ue.push(Ae(V*ce,V*(ce+1)))}),h=ue,C([].concat(ue)),console.log(ue)},J=function(){navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(V){var ue=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return ue?new Promise(function(Ae,Ue){ue.call(navigator,V,Ae,Ue)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),navigator.mediaDevices.getUserMedia({video:{width:640,height:480}}).then(function(V){i&&i(2),k(2),"srcObject"in M.current?M.current.srcObject=V:M.current.src=window.URL.createObjectURL(V),M.current.onloadedmetadata=function(ue){M.current.play()},M.current.addEventListener("ended",function(){console.log("\u64AD\u653E\u7ED3\u675F"),ke(),N.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(V){k(1),i&&i(1),V.message==="Permission denied"||V.name==="NotAllowedError"?N.b.error("\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"):N.b.error("\u6444\u50CF\u5934\u83B7\u53D6\u5931\u8D25\uFF0C\u6216\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"),console.log("errname: "+V.name),console.log("err: "+V.message)})},I=function(){try{L.current.width=M.current.videoWidth,L.current.height=M.current.videoHeight;var V=L.current.getContext("2d");V.drawImage(M.current,0,0,L.current.width,L.current.height),A(L.current.toDataURL("image/png")),K(L.current.toDataURL("image/png"))}catch(ue){}},U=function(){try{var V=M.current.srcObject,ue=V.getTracks();ue.forEach(function(Ae){Ae.stop()}),M.current.srcObject=null}catch(Ae){}},K=function(){var q=Object(Z.a)(D.a.mark(function V(ue){var Ae,Ue;return D.a.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:Ae=new FormData,Ae.append("file",c(ue,"1")),Ae.append("1","123"),Ue=new window.XMLHttpRequest,Ue.withCredentials=!0,Ue.addEventListener("load",function(Te){var Oe=JSON.parse(Te.target.responseText);Object(T.a)("/api/exercises/".concat(w,"/upload_photo.json"),{method:"post",body:{attachment_id:Oe.id}})},!1),Ue.addEventListener("error",function(Te){console.error(Te)},!1),Ue.open("POST","".concat(v.a.API_SERVER,"/api/attachments.json")),Ue.send(Ae);case 9:case"end":return ge.stop()}},V)}));return function(ue){return q.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:M,autoPlay:!0}),j.a.createElement("canvas",{style:{display:"none"},ref:L}))))});he.a=s},"C+DQ":function(Be,he,B){},"C/vA":function(Be,he,B){"use strict";B.d(he,"a",function(){return Z});function Z(z){const N=this;let Y=!1,W;return function(){return Y||(Y=!0,W=z.apply(N,arguments)),W}}},"Cg/j":function(Be,he,B){"use strict";B.d(he,"b",function(){return Z}),B.d(he,"a",function(){return z}),B.d(he,"c",function(){return Y}),B.d(he,"d",function(){return W});var Z;(function(D){D.serviceIds=new Map,D.DI_TARGET="$di$target",D.DI_DEPENDENCIES="$di$dependencies";function G(j){return j[D.DI_DEPENDENCIES]||[]}D.getServiceDependencies=G})(Z||(Z={}));const z=Y("instantiationService");function N(D,G,j,n){G[Z.DI_TARGET]===G?G[Z.DI_DEPENDENCIES].push({id:D,index:j,optional:n}):(G[Z.DI_DEPENDENCIES]=[{id:D,index:j,optional:n}],G[Z.DI_TARGET]=G)}function Y(D){if(Z.serviceIds.has(D))return Z.serviceIds.get(D);const G=function(j,n,T){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");N(G,j,T,!1)};return G.toString=()=>D,Z.serviceIds.set(D,G),G}function W(D){return function(G,j,n){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");N(D,G,n,!0)}}},D1Df:function(Be,he,B){"use strict";function Z(m){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(m)}function z(){return z=Object.assign||function(m){for(var P=1;P<arguments.length;P++){var k=arguments[P];for(var y in k)Object.prototype.hasOwnProperty.call(k,y)&&(m[y]=k[y])}return m},z.apply(this,arguments)}function N(m,P){var k=Object.keys(m);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(m);P&&(y=y.filter(function(S){return Object.getOwnPropertyDescriptor(m,S).enumerable})),k.push.apply(k,y)}return k}function Y(m){for(var P=1;P<arguments.length;P++){var k=arguments[P]!=null?arguments[P]:{};P%2?N(k,!0).forEach(function(y){s(m,y,k[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(k)):N(k).forEach(function(y){Object.defineProperty(m,y,Object.getOwnPropertyDescriptor(k,y))})}return m}function W(m,P){if(m==null)return{};var k=D(m,P),y,S;if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(m);for(S=0;S<F.length;S++){if(y=F[S],P.indexOf(y)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(m,y))continue;k[y]=m[y]}}return k}function D(m,P){if(m==null)return{};var k={},y=Object.keys(m),S,F;for(F=0;F<y.length;F++){if(S=y[F],P.indexOf(S)>=0)continue;k[S]=m[S]}return k}function G(m,P){if(!(m instanceof P))throw new TypeError("Cannot call a class as a function")}function j(m,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(m,y.key,y)}}function n(m,P,k){return P&&j(m.prototype,P),k&&j(m,k),m}function T(m,P){return P&&(Z(P)==="object"||typeof P=="function")?P:f(m)}function v(m){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(k){return k.__proto__||Object.getPrototypeOf(k)},v(m)}function f(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function p(m,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(P&&P.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),P&&c(m,P)}function c(m,P){return c=Object.setPrototypeOf||function(y,S){return y.__proto__=S,y},c(m,P)}function s(m,P,k){return P in m?Object.defineProperty(m,P,{value:k,enumerable:!0,configurable:!0,writable:!0}):m[P]=k,m}var d=B("q1tI"),u=B("17x9"),l=B("H38U"),a=B("aRTE");function i(m){for(var P="",k=0;k<m.length;k++){var y=m.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|m.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={},w=4,M=.1;function L(m){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,k=[];return m.forEach(function(y,S){var F=null;y.forEach(function(A,X){if(!A&&F!==null){k.push("M".concat(F+P," ").concat(S+P,"h").concat(X-F,"v1H").concat(F+P,"z")),F=null;return}if(X===y.length-1){if(!A)return;F===null?k.push("M".concat(X+P,",").concat(S+P," h1v1H").concat(X+P,"z")):k.push("M".concat(F+P,",").concat(S+P," h").concat(X+1-F,"v1H").concat(F+P,"z"));return}A&&F===null&&(F=X)})}),k.join("")}function _(m,P){return m.slice().map(function(k,y){return y<P.y||y>=P.y+P.h?k:k.map(function(S,F){return F<P.x||F>=P.x+P.w?S:!1})})}function b(m,P){var k=m.imageSettings,y=m.size,S=m.includeMargin;if(k==null)return null;var F=S?w:0,A=P.length+F*2,X=Math.floor(y*M),ne=A/y,fe=(k.width||X)*ne,ye=(k.height||X)*ne,Pe=k.x==null?P.length/2-fe/2:k.x*ne,xe=k.y==null?P.length/2-ye/2:k.y*ne,Ie=null;if(k.excavate){var Me=Math.floor(Pe),ke=Math.floor(xe),Ee=Math.ceil(fe+Pe-Me),J=Math.ceil(ye+xe-ke);Ie={x:Me,y:ke,w:Ee,h:J}}return{x:Pe,y:xe,h:ye,w:fe,excavation:Ie}}var g=function(){try{new Path2D().addPath(new Path2D)}catch(m){return!1}return!0}(),h=function(m){p(P,m);function P(){var k,y;G(this,P);for(var S=arguments.length,F=new Array(S),A=0;A<S;A++)F[A]=arguments[A];return y=T(this,(k=v(P)).call.apply(k,[this].concat(F))),s(f(y),"_canvas",void 0),s(f(y),"_image",void 0),s(f(y),"state",{imgLoaded:!1}),s(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,S=y.value,F=y.size,A=y.level,X=y.bgColor,ne=y.fgColor,fe=y.includeMargin,ye=y.imageSettings,Pe=new l(-1,a[A]);if(Pe.addData(i(S)),Pe.make(),this._canvas!=null){var xe=this._canvas,Ie=xe.getContext("2d");if(!Ie)return;var Me=Pe.modules;if(Me===null)return;var ke=fe?w:0,Ee=Me.length+ke*2,J=b(this.props,Me);ye!=null&&J!=null&&(J.excavation!=null&&(Me=_(Me,J.excavation)));var I=window.devicePixelRatio||1;xe.height=xe.width=F*I;var U=F/Ee*I;Ie.scale(U,U),Ie.fillStyle=X,Ie.fillRect(0,0,Ee,Ee),Ie.fillStyle=ne,g?Ie.fill(new Path2D(L(Me,ke))):Me.forEach(function(K,q){K.forEach(function(V,ue){V&&Ie.fillRect(ue+ke,q+ke,1,1)})}),this.state.imgLoaded&&this._image&&J!=null&&Ie.drawImage(this._image,J.x+ke,J.y+ke,J.w,J.h)}}},{key:"render",value:function(){var y=this,S=this.props,F=S.value,A=S.size,X=S.level,ne=S.bgColor,fe=S.fgColor,ye=S.style,Pe=S.includeMargin,xe=S.imageSettings,Ie=W(S,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),Me=Y({height:A,width:A},ye),ke=null,Ee=xe&&xe.src;return xe!=null&&Ee!=null&&(ke=d.createElement("img",{src:Ee,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(I){return y._image=I}})),d.createElement(d.Fragment,null,d.createElement("canvas",z({style:Me,height:A,width:A,ref:function(I){return y._canvas=I}},Ie)),ke)}}]),P}(d.PureComponent);s(h,"defaultProps",R);var C=function(m){p(P,m);function P(){return G(this,P),T(this,v(P).apply(this,arguments))}return n(P,[{key:"render",value:function(){var y=this.props,S=y.value,F=y.size,A=y.level,X=y.bgColor,ne=y.fgColor,fe=y.includeMargin,ye=y.imageSettings,Pe=W(y,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),xe=new l(-1,a[A]);xe.addData(i(S)),xe.make();var Ie=xe.modules;if(Ie===null)return null;var Me=fe?w:0,ke=Ie.length+Me*2,Ee=b(this.props,Ie),J=null;ye!=null&&Ee!=null&&(Ee.excavation!=null&&(Ie=_(Ie,Ee.excavation)),J=d.createElement("image",{xlinkHref:ye.src,height:Ee.h,width:Ee.w,x:Ee.x+Me,y:Ee.y+Me,preserveAspectRatio:"none"}));var I=L(Ie,Me);return d.createElement("svg",z({shapeRendering:"crispEdges",height:F,width:F,viewBox:"0 0 ".concat(ke," ").concat(ke)},Pe),d.createElement("path",{fill:X,d:"M0,0 h".concat(ke,"v").concat(ke,"H0z")}),d.createElement("path",{fill:ne,d:I}),J)}}]),P}(d.PureComponent);s(C,"defaultProps",R);var x=function(P){var k=P.renderAs,y=W(P,["renderAs"]),S=k==="svg"?C:h;return d.createElement(S,y)};x.defaultProps=Y({renderAs:"canvas"},R),Be.exports=x},DR4n:function(Be,he,B){Be.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(Be,he,B){(function(Z,z){Be.exports=z()})(this,function(){"use strict";function Z(te,ae){for(var de=0;de<ae.length;de++){var ie=ae[de];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(te,ie.key,ie)}}function z(te,ae,de){return ae&&Z(te.prototype,ae),de&&Z(te,de),te}function N(te,ae){if(!te)return;if(typeof te=="string")return Y(te,ae);var de=Object.prototype.toString.call(te).slice(8,-1);if(de==="Object"&&te.constructor&&(de=te.constructor.name),de==="Map"||de==="Set")return Array.from(te);if(de==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(de))return Y(te,ae)}function Y(te,ae){(ae==null||ae>te.length)&&(ae=te.length);for(var de=0,ie=new Array(ae);de<ae;de++)ie[de]=te[de];return ie}function W(te,ae){var de;if(typeof Symbol=="undefined"||te[Symbol.iterator]==null){if(Array.isArray(te)||(de=N(te))||ae&&te&&typeof te.length=="number"){de&&(te=de);var ie=0;return function(){return ie>=te.length?{done:!0}:{done:!1,value:te[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 de=te[Symbol.iterator](),de.next.bind(de)}function D(te,ae){return ae={exports:{}},te(ae,ae.exports),ae.exports}var G=D(function(te){function ae(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function de(ie){te.exports.defaults=ie}te.exports={defaults:ae(),getDefaults:ae,changeDefaults:de}}),j=G.defaults,n=G.getDefaults,T=G.changeDefaults,v=/[&<>"']/,f=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},d=function(ae){return s[ae]};function u(te,ae){if(ae){if(v.test(te))return te.replace(f,d)}else if(p.test(te))return te.replace(c,d);return te}var l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(te){return te.replace(l,function(ae,de){return de=de.toLowerCase(),de==="colon"?":":de.charAt(0)==="#"?de.charAt(1)==="x"?String.fromCharCode(parseInt(de.substring(2),16)):String.fromCharCode(+de.substring(1)):""})}var i=/(^|[^\[])\^/g;function R(te,ae){te=te.source||te,ae=ae||"";var de={replace:function(se,pe){return pe=pe.source||pe,pe=pe.replace(i,"$1"),te=te.replace(se,pe),de},getRegex:function(){return new RegExp(te,ae)}};return de}var O=/[^\w:]/g,w=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function M(te,ae,de){if(te){var ie;try{ie=decodeURIComponent(a(de)).replace(O,"").toLowerCase()}catch(se){return null}if(ie.indexOf("javascript:")===0||ie.indexOf("vbscript:")===0||ie.indexOf("data:")===0)return null}ae&&!w.test(de)&&(de=h(ae,de));try{de=encodeURI(de).replace(/%25/g,"%")}catch(se){return null}return de}var L={},_=/^[^:]+:\/*[^/]*$/,b=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function h(te,ae){L[" "+te]||(_.test(te)?L[" "+te]=te+"/":L[" "+te]=P(te,"/",!0)),te=L[" "+te];var de=te.indexOf(":")===-1;return ae.substring(0,2)==="//"?de?ae:te.replace(b,"$1")+ae:ae.charAt(0)==="/"?de?ae:te.replace(g,"$1")+ae:te+ae}var C={exec:function(){}};function x(te){for(var ae=1,de,ie;ae<arguments.length;ae++){de=arguments[ae];for(ie in de)Object.prototype.hasOwnProperty.call(de,ie)&&(te[ie]=de[ie])}return te}function m(te,ae){var de=te.replace(/\|/g,function(pe,be,_e){for(var Le=!1,Ye=be;--Ye>=0&&_e[Ye]==="\\";)Le=!Le;return Le?"|":" |"}),ie=de.split(/ \|/),se=0;if(ie.length>ae)ie.splice(ae);else for(;ie.length<ae;)ie.push("");for(;se<ie.length;se++)ie[se]=ie[se].trim().replace(/\\\|/g,"|");return ie}function P(te,ae,de){var ie=te.length;if(ie===0)return"";for(var se=0;se<ie;){var pe=te.charAt(ie-se-1);if(pe===ae&&!de)se++;else if(pe!==ae&&de)se++;else break}return te.substr(0,ie-se)}function k(te,ae){if(te.indexOf(ae[1])===-1)return-1;for(var de=te.length,ie=0,se=0;se<de;se++)if(te[se]==="\\")se++;else if(te[se]===ae[0])ie++;else if(te[se]===ae[1]&&(ie--,ie<0))return se;return-1}function y(te){te&&te.sanitize&&!te.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 S={escape:u,unescape:a,edit:R,cleanUrl:M,resolveUrl:h,noopTest:C,merge:x,splitCells:m,rtrim:P,findClosingBracket:k,checkSanitizeDeprecation:y},F=G.defaults,A=S.rtrim,X=S.splitCells,ne=S.escape,fe=S.findClosingBracket;function ye(te,ae,de){var ie=ae.href,se=ae.title?ne(ae.title):null,pe=te[1].replace(/\\([\[\]])/g,"$1");return te[0].charAt(0)!=="!"?{type:"link",raw:de,href:ie,title:se,text:pe}:{type:"image",raw:de,href:ie,title:se,text:ne(pe)}}function Pe(te,ae){var de=te.match(/^(\s+)(?:```)/);if(de===null)return ae;var ie=de[1];return ae.split(`
`).map(function(se){var pe=se.match(/^\s+/);if(pe===null)return se;var be=pe[0];return be.length>=ie.length?se.slice(ie.length):se}).join(`
`)}var xe=function(){function te(de){this.options=de||F}var ae=te.prototype;return ae.space=function(ie){var se=this.rules.block.newline.exec(ie);if(se)return se[0].length>1?{type:"space",raw:se[0]}:{raw:`
`}},ae.code=function(ie,se){var pe=this.rules.block.code.exec(ie);if(pe){var be=se[se.length-1];if(be&&be.type==="paragraph")return{raw:pe[0],text:pe[0].trimRight()};var _e=pe[0].replace(/^ {4}/gm,"");return{type:"code",raw:pe[0],codeBlockStyle:"indented",text:this.options.pedantic?_e:A(_e,`
`)}}},ae.fences=function(ie){var se=this.rules.block.fences.exec(ie);if(se){var pe=se[0],be=Pe(pe,se[3]||"");return{type:"code",raw:pe,lang:se[2]?se[2].trim():se[2],text:be}}},ae.heading=function(ie){var se=this.rules.block.heading.exec(ie);if(se)return{type:"heading",raw:se[0],depth:se[1].length,text:se[2]}},ae.nptable=function(ie){var se=this.rules.block.nptable.exec(ie);if(se){var pe={type:"table",header:X(se[1].replace(/^ *| *\| *$/g,"")),align:se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:se[3]?se[3].replace(/\n$/,"").split(`
`):[],raw:se[0]};if(pe.header.length===pe.align.length){var be=pe.align.length,_e;for(_e=0;_e<be;_e++)/^ *-+: *$/.test(pe.align[_e])?pe.align[_e]="right":/^ *:-+: *$/.test(pe.align[_e])?pe.align[_e]="center":/^ *:-+ *$/.test(pe.align[_e])?pe.align[_e]="left":pe.align[_e]=null;for(be=pe.cells.length,_e=0;_e<be;_e++)pe.cells[_e]=X(pe.cells[_e],pe.header.length);return pe}}},ae.hr=function(ie){var se=this.rules.block.hr.exec(ie);if(se)return{type:"hr",raw:se[0]}},ae.blockquote=function(ie){var se=this.rules.block.blockquote.exec(ie);if(se){var pe=se[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:se[0],text:pe}}},ae.list=function(ie){var se=this.rules.block.list.exec(ie);if(se){for(var pe=se[0],be=se[2],_e=be.length>1,Le=be[be.length-1]===")",Ye={type:"list",raw:pe,ordered:_e,start:_e?+be.slice(0,-1):"",loose:!1,items:[]},lt=se[0].match(this.rules.block.item),Et=!1,vt,ft,ze,Qe,He,me,we,qe=lt.length,Ge=0;Ge<qe;Ge++)vt=lt[Ge],pe=vt,ft=vt.length,vt=vt.replace(/^ *([*+-]|\d+[.)]) */,""),~vt.indexOf(`
`)&&(ft-=vt.length,vt=this.options.pedantic?vt.replace(/^ {1,4}/gm,""):vt.replace(new RegExp("^ {1,"+ft+"}","gm"),"")),Ge!==qe-1&&(ze=this.rules.block.bullet.exec(lt[Ge+1])[0],(_e?ze.length===1||!Le&&ze[ze.length-1]===")":ze.length>1||this.options.smartLists&&ze!==be)&&(Qe=lt.slice(Ge+1).join(`
`),Ye.raw=Ye.raw.substring(0,Ye.raw.length-Qe.length),Ge=qe-1)),He=Et||/\n\n(?!\s*$)/.test(vt),Ge!==qe-1&&(Et=vt.charAt(vt.length-1)===`
`,He||(He=Et)),He&&(Ye.loose=!0),me=/^\[[ xX]\] /.test(vt),we=void 0,me&&(we=vt[1]!==" ",vt=vt.replace(/^\[[ xX]\] +/,"")),Ye.items.push({type:"list_item",raw:pe,task:me,checked:we,loose:He,text:vt});return Ye}},ae.html=function(ie){var se=this.rules.block.html.exec(ie);if(se)return{type:this.options.sanitize?"paragraph":"html",raw:se[0],pre:!this.options.sanitizer&&(se[1]==="pre"||se[1]==="script"||se[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(se[0]):ne(se[0]):se[0]}},ae.def=function(ie){var se=this.rules.block.def.exec(ie);if(se){se[3]&&(se[3]=se[3].substring(1,se[3].length-1));var pe=se[1].toLowerCase().replace(/\s+/g," ");return{tag:pe,raw:se[0],href:se[2],title:se[3]}}},ae.table=function(ie){var se=this.rules.block.table.exec(ie);if(se){var pe={type:"table",header:X(se[1].replace(/^ *| *\| *$/g,"")),align:se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:se[3]?se[3].replace(/\n$/,"").split(`
`):[]};if(pe.header.length===pe.align.length){pe.raw=se[0];var be=pe.align.length,_e;for(_e=0;_e<be;_e++)/^ *-+: *$/.test(pe.align[_e])?pe.align[_e]="right":/^ *:-+: *$/.test(pe.align[_e])?pe.align[_e]="center":/^ *:-+ *$/.test(pe.align[_e])?pe.align[_e]="left":pe.align[_e]=null;for(be=pe.cells.length,_e=0;_e<be;_e++)pe.cells[_e]=X(pe.cells[_e].replace(/^ *\| *| *\| *$/g,""),pe.header.length);return pe}}},ae.lheading=function(ie){var se=this.rules.block.lheading.exec(ie);if(se)return{type:"heading",raw:se[0],depth:se[2].charAt(0)==="="?1:2,text:se[1]}},ae.paragraph=function(ie){var se=this.rules.block.paragraph.exec(ie);if(se)return{type:"paragraph",raw:se[0],text:se[1].charAt(se[1].length-1)===`
`?se[1].slice(0,-1):se[1]}},ae.text=function(ie,se){var pe=this.rules.block.text.exec(ie);if(pe){var be=se[se.length-1];return be&&be.type==="text"?{raw:pe[0],text:pe[0]}:{type:"text",raw:pe[0],text:pe[0]}}},ae.escape=function(ie){var se=this.rules.inline.escape.exec(ie);if(se)return{type:"escape",raw:se[0],text:ne(se[1])}},ae.tag=function(ie,se,pe){var be=this.rules.inline.tag.exec(ie);if(be)return!se&&/^<a /i.test(be[0])?se=!0:se&&/^<\/a>/i.test(be[0])&&(se=!1),!pe&&/^<(pre|code|kbd|script)(\s|>)/i.test(be[0])?pe=!0:pe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(be[0])&&(pe=!1),{type:this.options.sanitize?"text":"html",raw:be[0],inLink:se,inRawBlock:pe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):ne(be[0]):be[0]}},ae.link=function(ie){var se=this.rules.inline.link.exec(ie);if(se){var pe=fe(se[2],"()");if(pe>-1){var be=se[0].indexOf("!")===0?5:4,_e=be+se[1].length+pe;se[2]=se[2].substring(0,pe),se[0]=se[0].substring(0,_e).trim(),se[3]=""}var Le=se[2],Ye="";if(this.options.pedantic){var lt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Le);lt?(Le=lt[1],Ye=lt[3]):Ye=""}else Ye=se[3]?se[3].slice(1,-1):"";Le=Le.trim().replace(/^<([\s\S]*)>$/,"$1");var Et=ye(se,{href:Le&&Le.replace(this.rules.inline._escapes,"$1"),title:Ye&&Ye.replace(this.rules.inline._escapes,"$1")},se[0]);return Et}},ae.reflink=function(ie,se){var pe;if((pe=this.rules.inline.reflink.exec(ie))||(pe=this.rules.inline.nolink.exec(ie))){var be=(pe[2]||pe[1]).replace(/\s+/g," ");if(be=se[be.toLowerCase()],!be||!be.href){var _e=pe[0].charAt(0);return{type:"text",raw:_e,text:_e}}var Le=ye(pe,be,pe[0]);return Le}},ae.strong=function(ie,se,pe){pe===void 0&&(pe="");var be=this.rules.inline.strong.start.exec(ie);if(be&&(!be[1]||be[1]&&(pe===""||this.rules.inline.punctuation.exec(pe)))){se=se.slice(-1*ie.length);var _e=be[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;_e.lastIndex=0;for(var Le;(be=_e.exec(se))!=null;)if(Le=this.rules.inline.strong.middle.exec(se.slice(0,be.index+3)),Le)return{type:"strong",raw:ie.slice(0,Le[0].length),text:ie.slice(2,Le[0].length-2)}}},ae.em=function(ie,se,pe){pe===void 0&&(pe="");var be=this.rules.inline.em.start.exec(ie);if(be&&(!be[1]||be[1]&&(pe===""||this.rules.inline.punctuation.exec(pe)))){se=se.slice(-1*ie.length);var _e=be[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;_e.lastIndex=0;for(var Le;(be=_e.exec(se))!=null;)if(Le=this.rules.inline.em.middle.exec(se.slice(0,be.index+2)),Le)return{type:"em",raw:ie.slice(0,Le[0].length),text:ie.slice(1,Le[0].length-1)}}},ae.codespan=function(ie){var se=this.rules.inline.code.exec(ie);if(se){var pe=se[2].replace(/\n/g," "),be=/[^ ]/.test(pe),_e=pe.startsWith(" ")&&pe.endsWith(" ");return be&&_e&&(pe=pe.substring(1,pe.length-1)),pe=ne(pe,!0),{type:"codespan",raw:se[0],text:pe}}},ae.br=function(ie){var se=this.rules.inline.br.exec(ie);if(se)return{type:"br",raw:se[0]}},ae.del=function(ie){var se=this.rules.inline.del.exec(ie);if(se)return{type:"del",raw:se[0],text:se[1]}},ae.autolink=function(ie,se){var pe=this.rules.inline.autolink.exec(ie);if(pe){var be,_e;return pe[2]==="@"?(be=ne(this.options.mangle?se(pe[1]):pe[1]),_e="mailto:"+be):(be=ne(pe[1]),_e=be),{type:"link",raw:pe[0],text:be,href:_e,tokens:[{type:"text",raw:be,text:be}]}}},ae.url=function(ie,se){var pe;if(pe=this.rules.inline.url.exec(ie)){var be,_e;if(pe[2]==="@")be=ne(this.options.mangle?se(pe[0]):pe[0]),_e="mailto:"+be;else{var Le;do Le=pe[0],pe[0]=this.rules.inline._backpedal.exec(pe[0])[0];while(Le!==pe[0]);be=ne(pe[0]),pe[1]==="www."?_e="http://"+be:_e=be}return{type:"link",raw:pe[0],text:be,href:_e,tokens:[{type:"text",raw:be,text:be}]}}},ae.inlineText=function(ie,se,pe){var be=this.rules.inline.text.exec(ie);if(be){var _e;return se?_e=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):ne(be[0]):be[0]:_e=ne(this.options.smartypants?pe(be[0]):be[0]),{type:"text",raw:be[0],text:_e}}},te}(),Ie=S.noopTest,Me=S.edit,ke=S.merge,Ee={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:Ie,table:Ie,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Ee._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ee._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ee.def=Me(Ee.def).replace("label",Ee._label).replace("title",Ee._title).getRegex(),Ee.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ee.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Ee.item=Me(Ee.item,"gm").replace(/bull/g,Ee.bullet).getRegex(),Ee.list=Me(Ee.list).replace(/bull/g,Ee.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ee.def.source+")").getRegex(),Ee._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",Ee._comment=/<!--(?!-?>)[\s\S]*?-->/,Ee.html=Me(Ee.html,"i").replace("comment",Ee._comment).replace("tag",Ee._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ee.paragraph=Me(Ee._paragraph).replace("hr",Ee.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",Ee._tag).getRegex(),Ee.blockquote=Me(Ee.blockquote).replace("paragraph",Ee.paragraph).getRegex(),Ee.normal=ke({},Ee),Ee.gfm=ke({},Ee.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*|$)"}),Ee.gfm.nptable=Me(Ee.gfm.nptable).replace("hr",Ee.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",Ee._tag).getRegex(),Ee.gfm.table=Me(Ee.gfm.table).replace("hr",Ee.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",Ee._tag).getRegex(),Ee.pedantic=ke({},Ee.normal,{html:Me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ee._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:Ie,paragraph:Me(Ee.normal._paragraph).replace("hr",Ee.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Ee.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var J={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ie,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:Ie,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};J._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",J.punctuation=Me(J.punctuation).replace(/punctuation/g,J._punctuation).getRegex(),J._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",J._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",J.em.start=Me(J.em.start).replace(/punctuation/g,J._punctuation).getRegex(),J.em.middle=Me(J.em.middle).replace(/punctuation/g,J._punctuation).replace(/overlapSkip/g,J._overlapSkip).getRegex(),J.em.endAst=Me(J.em.endAst,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.em.endUnd=Me(J.em.endUnd,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.strong.start=Me(J.strong.start).replace(/punctuation/g,J._punctuation).getRegex(),J.strong.middle=Me(J.strong.middle).replace(/punctuation/g,J._punctuation).replace(/blockSkip/g,J._blockSkip).getRegex(),J.strong.endAst=Me(J.strong.endAst,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.strong.endUnd=Me(J.strong.endUnd,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.blockSkip=Me(J._blockSkip,"g").getRegex(),J.overlapSkip=Me(J._overlapSkip,"g").getRegex(),J._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,J._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,J._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])?)+(?![-_])/,J.autolink=Me(J.autolink).replace("scheme",J._scheme).replace("email",J._email).getRegex(),J._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,J.tag=Me(J.tag).replace("comment",Ee._comment).replace("attribute",J._attribute).getRegex(),J._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,J._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,J._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,J.link=Me(J.link).replace("label",J._label).replace("href",J._href).replace("title",J._title).getRegex(),J.reflink=Me(J.reflink).replace("label",J._label).getRegex(),J.reflinkSearch=Me(J.reflinkSearch,"g").replace("reflink",J.reflink).replace("nolink",J.nolink).getRegex(),J.normal=ke({},J),J.pedantic=ke({},J.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Me(/^!?\[(label)\]\((.*?)\)/).replace("label",J._label).getRegex(),reflink:Me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",J._label).getRegex()}),J.gfm=ke({},J.normal,{escape:Me(J.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),J.gfm.url=Me(J.gfm.url,"i").replace("email",J.gfm._extended_email).getRegex(),J.breaks=ke({},J.gfm,{br:Me(J.br).replace("{2,}","*").getRegex(),text:Me(J.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var I={block:Ee,inline:J},U=G.defaults,K=I.block,q=I.inline;function V(te){return te.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 ue(te){var ae="",de,ie,se=te.length;for(de=0;de<se;de++)ie=te.charCodeAt(de),Math.random()>.5&&(ie="x"+ie.toString(16)),ae+="&#"+ie+";";return ae}var Ae=function(){function te(de){this.tokens=[],this.tokens.links=Object.create(null),this.options=de||U,this.options.tokenizer=this.options.tokenizer||new xe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ie={block:K.normal,inline:q.normal};this.options.pedantic?(ie.block=K.pedantic,ie.inline=q.pedantic):this.options.gfm&&(ie.block=K.gfm,this.options.breaks?ie.inline=q.breaks:ie.inline=q.gfm),this.tokenizer.rules=ie}te.lex=function(ie,se){var pe=new te(se);return pe.lex(ie)};var ae=te.prototype;return ae.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},ae.blockTokens=function(ie,se,pe){se===void 0&&(se=[]),pe===void 0&&(pe=!0),ie=ie.replace(/^ +$/gm,"");for(var be,_e,Le,Ye;ie;){if(be=this.tokenizer.space(ie)){ie=ie.substring(be.raw.length),be.type&&se.push(be);continue}if(be=this.tokenizer.code(ie,se)){ie=ie.substring(be.raw.length),be.type?se.push(be):(Ye=se[se.length-1],Ye.raw+=`
`+be.raw,Ye.text+=`
`+be.text);continue}if(be=this.tokenizer.fences(ie)){ie=ie.substring(be.raw.length),se.push(be);continue}if(be=this.tokenizer.heading(ie)){ie=ie.substring(be.raw.length),se.push(be);continue}if(be=this.tokenizer.nptable(ie)){ie=ie.substring(be.raw.length),se.push(be);continue}if(be=this.tokenizer.hr(ie)){ie=ie.substring(be.raw.length),se.push(be);continue}if(be=this.tokenizer.blockquote(ie)){ie=ie.substring(be.raw.length),be.tokens=this.blockTokens(be.text,[],pe),se.push(be);continue}if(be=this.tokenizer.list(ie)){for(ie=ie.substring(be.raw.length),Le=be.items.length,_e=0;_e<Le;_e++)be.items[_e].tokens=this.blockTokens(be.items[_e].text,[],!1);se.push(be);continue}if(be=this.tokenizer.html(ie)){ie=ie.substring(be.raw.length),se.push(be);continue}if(pe&&(be=this.tokenizer.def(ie))){ie=ie.substring(be.raw.length),this.tokens.links[be.tag]||(this.tokens.links[be.tag]={href:be.href,title:be.title});continue}if(be=this.tokenizer.table(ie)){ie=ie.substring(be.raw.length),se.push(be);continue}if(be=this.tokenizer.lheading(ie)){ie=ie.substring(be.raw.length),se.push(be);continue}if(pe&&(be=this.tokenizer.paragraph(ie))){ie=ie.substring(be.raw.length),se.push(be);continue}if(be=this.tokenizer.text(ie,se)){ie=ie.substring(be.raw.length),be.type?se.push(be):(Ye=se[se.length-1],Ye.raw+=`
`+be.raw,Ye.text+=`
`+be.text);continue}if(ie){var lt="Infinite loop on byte: "+ie.charCodeAt(0);if(this.options.silent){console.error(lt);break}else throw new Error(lt)}}return se},ae.inline=function(ie){var se,pe,be,_e,Le,Ye,lt=ie.length;for(se=0;se<lt;se++){Ye=ie[se];switch(Ye.type){case"paragraph":case"text":case"heading":{Ye.tokens=[],this.inlineTokens(Ye.text,Ye.tokens);break}case"table":{for(Ye.tokens={header:[],cells:[]},_e=Ye.header.length,pe=0;pe<_e;pe++)Ye.tokens.header[pe]=[],this.inlineTokens(Ye.header[pe],Ye.tokens.header[pe]);for(_e=Ye.cells.length,pe=0;pe<_e;pe++)for(Le=Ye.cells[pe],Ye.tokens.cells[pe]=[],be=0;be<Le.length;be++)Ye.tokens.cells[pe][be]=[],this.inlineTokens(Le[be],Ye.tokens.cells[pe][be]);break}case"blockquote":{this.inline(Ye.tokens);break}case"list":{for(_e=Ye.items.length,pe=0;pe<_e;pe++)this.inline(Ye.items[pe].tokens);break}}}return ie},ae.inlineTokens=function(ie,se,pe,be,_e){se===void 0&&(se=[]),pe===void 0&&(pe=!1),be===void 0&&(be=!1),_e===void 0&&(_e="");var Le,Ye=ie,lt;if(this.tokens.links){var Et=Object.keys(this.tokens.links);if(Et.length>0)for(;(lt=this.tokenizer.rules.inline.reflinkSearch.exec(Ye))!=null;)Et.includes(lt[0].slice(lt[0].lastIndexOf("[")+1,-1))&&(Ye=Ye.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+Ye.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(lt=this.tokenizer.rules.inline.blockSkip.exec(Ye))!=null;)Ye=Ye.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+Ye.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ie;){if(Le=this.tokenizer.escape(ie)){ie=ie.substring(Le.raw.length),se.push(Le);continue}if(Le=this.tokenizer.tag(ie,pe,be)){ie=ie.substring(Le.raw.length),pe=Le.inLink,be=Le.inRawBlock,se.push(Le);continue}if(Le=this.tokenizer.link(ie)){ie=ie.substring(Le.raw.length),Le.type==="link"&&(Le.tokens=this.inlineTokens(Le.text,[],!0,be)),se.push(Le);continue}if(Le=this.tokenizer.reflink(ie,this.tokens.links)){ie=ie.substring(Le.raw.length),Le.type==="link"&&(Le.tokens=this.inlineTokens(Le.text,[],!0,be)),se.push(Le);continue}if(Le=this.tokenizer.strong(ie,Ye,_e)){ie=ie.substring(Le.raw.length),Le.tokens=this.inlineTokens(Le.text,[],pe,be),se.push(Le);continue}if(Le=this.tokenizer.em(ie,Ye,_e)){ie=ie.substring(Le.raw.length),Le.tokens=this.inlineTokens(Le.text,[],pe,be),se.push(Le);continue}if(Le=this.tokenizer.codespan(ie)){ie=ie.substring(Le.raw.length),se.push(Le);continue}if(Le=this.tokenizer.br(ie)){ie=ie.substring(Le.raw.length),se.push(Le);continue}if(Le=this.tokenizer.del(ie)){ie=ie.substring(Le.raw.length),Le.tokens=this.inlineTokens(Le.text,[],pe,be),se.push(Le);continue}if(Le=this.tokenizer.autolink(ie,ue)){ie=ie.substring(Le.raw.length),se.push(Le);continue}if(!pe&&(Le=this.tokenizer.url(ie,ue))){ie=ie.substring(Le.raw.length),se.push(Le);continue}if(Le=this.tokenizer.inlineText(ie,be,V)){ie=ie.substring(Le.raw.length),_e=Le.raw.slice(-1),se.push(Le);continue}if(ie){var vt="Infinite loop on byte: "+ie.charCodeAt(0);if(this.options.silent){console.error(vt);break}else throw new Error(vt)}}return se},z(te,null,[{key:"rules",get:function(){return{block:K,inline:q}}}]),te}(),Ue=G.defaults,ce=S.cleanUrl,ge=S.escape,Te=function(){function te(de){this.options=de||Ue}var ae=te.prototype;return ae.code=function(ie,se,pe){var be=(se||"").match(/\S*/)[0];if(this.options.highlight){var _e=this.options.highlight(ie,be);_e!=null&&_e!==ie&&(pe=!0,ie=_e)}return be?'<pre><code class="'+this.options.langPrefix+ge(be,!0)+'">'+(pe?ie:ge(ie,!0))+`</code></pre>
`:"<pre><code>"+(pe?ie:ge(ie,!0))+`</code></pre>
`},ae.blockquote=function(ie){return`<blockquote>
`+ie+`</blockquote>
`},ae.html=function(ie){return ie},ae.heading=function(ie,se,pe,be){return this.options.headerIds?"<h"+se+' id="'+this.options.headerPrefix+be.slug(pe)+'">'+ie+"</h"+se+`>
`:"<h"+se+">"+ie+"</h"+se+`>
`},ae.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},ae.list=function(ie,se,pe){var be=se?"ol":"ul",_e=se&&pe!==1?' start="'+pe+'"':"";return"<"+be+_e+`>
`+ie+"</"+be+`>
`},ae.listitem=function(ie){return"<li>"+ie+`</li>
`},ae.checkbox=function(ie){return"<input "+(ie?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ae.paragraph=function(ie){return"<p>"+ie+`</p>
`},ae.table=function(ie,se){return se&&(se="<tbody>"+se+"</tbody>"),`<table>
<thead>
`+ie+`</thead>
`+se+`</table>
`},ae.tablerow=function(ie){return`<tr>
`+ie+`</tr>
`},ae.tablecell=function(ie,se){var pe=se.header?"th":"td",be=se.align?"<"+pe+' align="'+se.align+'">':"<"+pe+">";return be+ie+"</"+pe+`>
`},ae.strong=function(ie){return"<strong>"+ie+"</strong>"},ae.em=function(ie){return"<em>"+ie+"</em>"},ae.codespan=function(ie){return"<code>"+ie+"</code>"},ae.br=function(){return this.options.xhtml?"<br/>":"<br>"},ae.del=function(ie){return"<del>"+ie+"</del>"},ae.link=function(ie,se,pe){if(ie=ce(this.options.sanitize,this.options.baseUrl,ie),ie===null)return pe;var be='<a href="'+ge(ie)+'"';return se&&(be+=' title="'+se+'"'),be+=">"+pe+"</a>",be},ae.image=function(ie,se,pe){if(ie=ce(this.options.sanitize,this.options.baseUrl,ie),ie===null)return pe;var be='<img src="'+ie+'" alt="'+pe+'"';return se&&(be+=' title="'+se+'"'),be+=this.options.xhtml?"/>":">",be},ae.text=function(ie){return ie},te}(),Oe=function(){function te(){}var ae=te.prototype;return ae.strong=function(ie){return ie},ae.em=function(ie){return ie},ae.codespan=function(ie){return ie},ae.del=function(ie){return ie},ae.html=function(ie){return ie},ae.text=function(ie){return ie},ae.link=function(ie,se,pe){return""+pe},ae.image=function(ie,se,pe){return""+pe},ae.br=function(){return""},te}(),Xe=function(){function te(){this.seen={}}var ae=te.prototype;return ae.slug=function(ie){var se=ie.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(se)){var pe=se;do this.seen[pe]++,se=pe+"-"+this.seen[pe];while(this.seen.hasOwnProperty(se))}return this.seen[se]=0,se},te}(),rt=G.defaults,st=S.unescape,nt=function(){function te(de){this.options=de||rt,this.options.renderer=this.options.renderer||new Te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Oe,this.slugger=new Xe}te.parse=function(ie,se){var pe=new te(se);return pe.parse(ie)};var ae=te.prototype;return ae.parse=function(ie,se){se===void 0&&(se=!0);var pe="",be,_e,Le,Ye,lt,Et,vt,ft,ze,Qe,He,me,we,qe,Ge,pt,dt,je,Ve=ie.length;for(be=0;be<Ve;be++){Qe=ie[be];switch(Qe.type){case"space":continue;case"hr":{pe+=this.renderer.hr();continue}case"heading":{pe+=this.renderer.heading(this.parseInline(Qe.tokens),Qe.depth,st(this.parseInline(Qe.tokens,this.textRenderer)),this.slugger);continue}case"code":{pe+=this.renderer.code(Qe.text,Qe.lang,Qe.escaped);continue}case"table":{for(ft="",vt="",Ye=Qe.header.length,_e=0;_e<Ye;_e++)vt+=this.renderer.tablecell(this.parseInline(Qe.tokens.header[_e]),{header:!0,align:Qe.align[_e]});for(ft+=this.renderer.tablerow(vt),ze="",Ye=Qe.cells.length,_e=0;_e<Ye;_e++){for(Et=Qe.tokens.cells[_e],vt="",lt=Et.length,Le=0;Le<lt;Le++)vt+=this.renderer.tablecell(this.parseInline(Et[Le]),{header:!1,align:Qe.align[Le]});ze+=this.renderer.tablerow(vt)}pe+=this.renderer.table(ft,ze);continue}case"blockquote":{ze=this.parse(Qe.tokens),pe+=this.renderer.blockquote(ze);continue}case"list":{for(He=Qe.ordered,me=Qe.start,we=Qe.loose,Ye=Qe.items.length,ze="",_e=0;_e<Ye;_e++)Ge=Qe.items[_e],pt=Ge.checked,dt=Ge.task,qe="",Ge.task&&(je=this.renderer.checkbox(pt),we?Ge.tokens.length>0&&Ge.tokens[0].type==="text"?(Ge.tokens[0].text=je+" "+Ge.tokens[0].text,Ge.tokens[0].tokens&&Ge.tokens[0].tokens.length>0&&Ge.tokens[0].tokens[0].type==="text"&&(Ge.tokens[0].tokens[0].text=je+" "+Ge.tokens[0].tokens[0].text)):Ge.tokens.unshift({type:"text",text:je}):qe+=je),qe+=this.parse(Ge.tokens,we),ze+=this.renderer.listitem(qe,dt,pt);pe+=this.renderer.list(ze,He,me);continue}case"html":{pe+=this.renderer.html(Qe.text);continue}case"paragraph":{pe+=this.renderer.paragraph(this.parseInline(Qe.tokens));continue}case"text":{for(ze=Qe.tokens?this.parseInline(Qe.tokens):Qe.text;be+1<Ve&&ie[be+1].type==="text";)Qe=ie[++be],ze+=`
`+(Qe.tokens?this.parseInline(Qe.tokens):Qe.text);pe+=se?this.renderer.paragraph(ze):ze;continue}default:{var $e='Token with "'+Qe.type+'" type was not found.';if(this.options.silent){console.error($e);return}else throw new Error($e)}}}return pe},ae.parseInline=function(ie,se){se=se||this.renderer;var pe="",be,_e,Le=ie.length;for(be=0;be<Le;be++){_e=ie[be];switch(_e.type){case"escape":{pe+=se.text(_e.text);break}case"html":{pe+=se.html(_e.text);break}case"link":{pe+=se.link(_e.href,_e.title,this.parseInline(_e.tokens,se));break}case"image":{pe+=se.image(_e.href,_e.title,_e.text);break}case"strong":{pe+=se.strong(this.parseInline(_e.tokens,se));break}case"em":{pe+=se.em(this.parseInline(_e.tokens,se));break}case"codespan":{pe+=se.codespan(_e.text);break}case"br":{pe+=se.br();break}case"del":{pe+=se.del(this.parseInline(_e.tokens,se));break}case"text":{pe+=se.text(_e.text);break}default:{var Ye='Token with "'+_e.type+'" type was not found.';if(this.options.silent){console.error(Ye);return}else throw new Error(Ye)}}}return pe},te}(),bt=S.merge,yt=S.checkSanitizeDeprecation,Ne=S.escape,Re=G.getDefaults,Je=G.changeDefaults,tt=G.defaults;function le(te,ae,de){if(typeof te=="undefined"||te===null)throw new Error("marked(): input parameter is undefined or null");if(typeof te!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(te)+", string expected");if(typeof ae=="function"&&(de=ae,ae=null),ae=bt({},le.defaults,ae||{}),yt(ae),de){var ie=ae.highlight,se;try{se=Ae.lex(te,ae)}catch(Le){return de(Le)}var pe=function(Ye){var lt;if(!Ye)try{lt=nt.parse(se,ae)}catch(Et){Ye=Et}return ae.highlight=ie,Ye?de(Ye):de(null,lt)};if(!ie||ie.length<3)return pe();if(delete ae.highlight,!se.length)return pe();var be=0;le.walkTokens(se,function(Le){Le.type==="code"&&(be++,setTimeout(function(){ie(Le.text,Le.lang,function(Ye,lt){if(Ye)return pe(Ye);lt!=null&&lt!==Le.text&&(Le.text=lt,Le.escaped=!0),be--,be===0&&pe()})},0))}),be===0&&pe();return}try{var _e=Ae.lex(te,ae);return ae.walkTokens&&le.walkTokens(_e,ae.walkTokens),nt.parse(_e,ae)}catch(Le){if(Le.message+=`
Please report this to https://github.com/markedjs/marked.`,ae.silent)return"<p>An error occurred:</p><pre>"+Ne(Le.message+"",!0)+"</pre>";throw Le}}le.options=le.setOptions=function(te){return bt(le.defaults,te),Je(le.defaults),le},le.getDefaults=Re,le.defaults=tt,le.use=function(te){var ae=bt({},te);if(te.renderer&&function(){var ie=le.defaults.renderer||new Te,se=function(_e){var Le=ie[_e];ie[_e]=function(){for(var Ye=arguments.length,lt=new Array(Ye),Et=0;Et<Ye;Et++)lt[Et]=arguments[Et];var vt=te.renderer[_e].apply(ie,lt);return vt===!1&&(vt=Le.apply(ie,lt)),vt}};for(var pe in te.renderer)se(pe);ae.renderer=ie}(),te.tokenizer&&function(){var ie=le.defaults.tokenizer||new xe,se=function(_e){var Le=ie[_e];ie[_e]=function(){for(var Ye=arguments.length,lt=new Array(Ye),Et=0;Et<Ye;Et++)lt[Et]=arguments[Et];var vt=te.tokenizer[_e].apply(ie,lt);return vt===!1&&(vt=Le.apply(ie,lt)),vt}};for(var pe in te.tokenizer)se(pe);ae.tokenizer=ie}(),te.walkTokens){var de=le.defaults.walkTokens;ae.walkTokens=function(ie){te.walkTokens(ie),de&&de(ie)}}le.setOptions(ae)},le.walkTokens=function(te,ae){for(var de=W(te),ie;!(ie=de()).done;){var se=ie.value;ae(se);switch(se.type){case"table":{for(var pe=W(se.tokens.header),be;!(be=pe()).done;){var _e=be.value;le.walkTokens(_e,ae)}for(var Le=W(se.tokens.cells),Ye;!(Ye=Le()).done;)for(var lt=Ye.value,Et=W(lt),vt;!(vt=Et()).done;){var ft=vt.value;le.walkTokens(ft,ae)}break}case"list":{le.walkTokens(se.items,ae);break}default:se.tokens&&le.walkTokens(se.tokens,ae)}}},le.Parser=nt,le.parser=nt.parse,le.Renderer=Te,le.TextRenderer=Oe,le.Lexer=Ae,le.lexer=Ae.lex,le.Tokenizer=xe,le.Slugger=Xe,le.parse=le;var $=le;return $})},E7E6:function(Be,he){Be.exports="data:image/png;base64,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"},ELLl:function(Be,he,B){(function(Z){Z(B("VrN/"))})(function(Z){var z={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},N=Z.Pos;Z.defineOption("autoCloseBrackets",!1,function(s,d,u){u&&u!=Z.Init&&(s.removeKeyMap(W),s.state.closeBrackets=null),d&&(D(Y(d,"pairs")),s.state.closeBrackets=d,s.addKeyMap(W))});function Y(s,d){return d=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[d]!=null?s[d]:z[d]}var W={Backspace:n,Enter:T};function D(s){for(var d=0;d<s.length;d++){var u=s.charAt(d),l="'"+u+"'";W[l]||(W[l]=G(u))}}D(z.pairs+"`");function G(s){return function(d){return f(d,s)}}function j(s){var d=s.state.closeBrackets;if(!d||d.override)return d;var u=s.getModeAt(s.getCursor());return u.closeBrackets||d}function n(s){var d=j(s);if(!d||s.getOption("disableInput"))return Z.Pass;for(var u=Y(d,"pairs"),l=s.listSelections(),a=0;a<l.length;a++){if(!l[a].empty())return Z.Pass;var i=p(s,l[a].head);if(!i||u.indexOf(i)%2!=0)return Z.Pass}for(var a=l.length-1;a>=0;a--){var R=l[a].head;s.replaceRange("",N(R.line,R.ch-1),N(R.line,R.ch+1),"+delete")}}function T(s){var d=j(s),u=d&&Y(d,"explode");if(!u||s.getOption("disableInput"))return Z.Pass;for(var l=s.listSelections(),a=0;a<l.length;a++){if(!l[a].empty())return Z.Pass;var i=p(s,l[a].head);if(!i||u.indexOf(i)%2!=0)return Z.Pass}s.operation(function(){var R=s.lineSeparator()||`
`;s.replaceSelection(R+R,null),s.execCommand("goCharLeft"),l=s.listSelections();for(var O=0;O<l.length;O++){var w=l[O].head.line;s.indentLine(w,null,!0),s.indentLine(w+1,null,!0)}})}function v(s){var d=Z.cmpPos(s.anchor,s.head)>0;return{anchor:new N(s.anchor.line,s.anchor.ch+(d?-1:1)),head:new N(s.head.line,s.head.ch+(d?1:-1))}}function f(s,d){var u=j(s);if(!u||s.getOption("disableInput"))return Z.Pass;var l=Y(u,"pairs"),a=l.indexOf(d);if(a==-1)return Z.Pass;for(var i=Y(u,"closeBefore"),R=Y(u,"triples"),O=l.charAt(a+1)==d,w=s.listSelections(),M=a%2==0,L,_=0;_<w.length;_++){var b=w[_],g=b.head,h,C=s.getRange(g,N(g.line,g.ch+1));if(M&&!b.empty())h="surround";else if((O||!M)&&C==d)O&&c(s,g)?h="both":R.indexOf(d)>=0&&s.getRange(g,N(g.line,g.ch+3))==d+d+d?h="skipThree":h="skip";else if(O&&g.ch>1&&R.indexOf(d)>=0&&s.getRange(N(g.line,g.ch-2),g)==d+d){if(g.ch>2&&/\bstring/.test(s.getTokenTypeAt(N(g.line,g.ch-2))))return Z.Pass;h="addFour"}else if(O){var x=g.ch==0?" ":s.getRange(N(g.line,g.ch-1),g);if(!Z.isWordChar(C)&&x!=d&&!Z.isWordChar(x))h="both";else return Z.Pass}else if(M&&(C.length===0||/\s/.test(C)||i.indexOf(C)>-1))h="both";else return Z.Pass;if(!L)L=h;else if(L!=h)return Z.Pass}var m=a%2?l.charAt(a-1):d,P=a%2?d:l.charAt(a+1);s.operation(function(){if(L=="skip")s.execCommand("goCharRight");else if(L=="skipThree")for(var k=0;k<3;k++)s.execCommand("goCharRight");else if(L=="surround"){for(var y=s.getSelections(),k=0;k<y.length;k++)y[k]=m+y[k]+P;s.replaceSelections(y,"around"),y=s.listSelections().slice();for(var k=0;k<y.length;k++)y[k]=v(y[k]);s.setSelections(y)}else L=="both"?(s.replaceSelection(m+P,null),s.triggerElectric(m+P),s.execCommand("goCharLeft")):L=="addFour"&&(s.replaceSelection(m+m+m+m,"before"),s.execCommand("goCharRight"))})}function p(s,d){var u=s.getRange(N(d.line,d.ch-1),N(d.line,d.ch+1));return u.length==2?u:null}function c(s,d){var u=s.getTokenAt(N(d.line,d.ch+1));return/\bstring/.test(u.type)&&u.start==d.ch&&(d.ch==0||!/\bstring/.test(s.getTokenTypeAt(d)))}})},FOrL:function(Be,he,B){Be.exports=B.p+"static/nodata.a6b3f948.png"},FPkq:function(Be,he,B){Be.exports=B.p+"static/qrCode.dd0fe9b2.png"},FWmy:function(Be,he,B){"use strict";B.d(he,"a",function(){return Z});function Z(z,N){if(!z)throw new Error(N?`Assertion failed (${N})`:"Assertion Failed")}},GABl:function(Be,he){Be.exports="data:image/png;base64,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"},Gytx:function(Be,he){Be.exports=function(Z,z,N,Y){var W=N?N.call(Y,Z,z):void 0;if(W!==void 0)return!!W;if(Z===z)return!0;if(typeof Z!="object"||!Z||typeof z!="object"||!z)return!1;var D=Object.keys(Z),G=Object.keys(z);if(D.length!==G.length)return!1;for(var j=Object.prototype.hasOwnProperty.bind(z),n=0;n<D.length;n++){var T=D[n];if(!j(T))return!1;var v=Z[T],f=z[T];if(W=N?N.call(Y,v,f,T):void 0,W===!1||W===void 0&&v!==f)return!1}return!0}},H38U:function(Be,he,B){var Z=B("f4xo"),z=B("rcnY"),N=B("wU8J"),Y=B("Iq15"),W=B("dWSS");function D(j,n){this.typeNumber=j,this.errorCorrectLevel=n,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var G=D.prototype;G.addData=function(j){var n=new Z(j);this.dataList.push(n),this.dataCache=null},G.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]},G.getModuleCount=function(){return this.moduleCount},G.make=function(){if(this.typeNumber<1){var j=1;for(j=1;j<40;j++){for(var n=z.getRSBlocks(j,this.errorCorrectLevel),T=new N,v=0,f=0;f<n.length;f++)v+=n[f].dataCount;for(var f=0;f<this.dataList.length;f++){var p=this.dataList[f];T.put(p.mode,4),T.put(p.getLength(),Y.getLengthInBits(p.mode,j)),p.write(T)}if(T.getLengthInBits()<=v*8)break}this.typeNumber=j}this.makeImpl(!1,this.getBestMaskPattern())},G.makeImpl=function(j,n){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var T=0;T<this.moduleCount;T++){this.modules[T]=new Array(this.moduleCount);for(var v=0;v<this.moduleCount;v++)this.modules[T][v]=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=D.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,n)},G.setupPositionProbePattern=function(j,n){for(var T=-1;T<=7;T++){if(j+T<=-1||this.moduleCount<=j+T)continue;for(var v=-1;v<=7;v++){if(n+v<=-1||this.moduleCount<=n+v)continue;0<=T&&T<=6&&(v==0||v==6)||0<=v&&v<=6&&(T==0||T==6)||2<=T&&T<=4&&2<=v&&v<=4?this.modules[j+T][n+v]=!0:this.modules[j+T][n+v]=!1}}},G.getBestMaskPattern=function(){for(var j=0,n=0,T=0;T<8;T++){this.makeImpl(!0,T);var v=Y.getLostPoint(this);(T==0||j>v)&&(j=v,n=T)}return n},G.createMovieClip=function(j,n,T){var v=j.createEmptyMovieClip(n,T),f=1;this.make();for(var p=0;p<this.modules.length;p++)for(var c=p*f,s=0;s<this.modules[p].length;s++){var d=s*f,u=this.modules[p][s];u&&(v.beginFill(0,100),v.moveTo(d,c),v.lineTo(d+f,c),v.lineTo(d+f,c+f),v.lineTo(d,c+f),v.endFill())}return v},G.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}},G.setupPositionAdjustPattern=function(){for(var j=Y.getPatternPosition(this.typeNumber),n=0;n<j.length;n++)for(var T=0;T<j.length;T++){var v=j[n],f=j[T];if(this.modules[v][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[v+p][f+c]=!0:this.modules[v+p][f+c]=!1}},G.setupTypeNumber=function(j){for(var n=Y.getBCHTypeNumber(this.typeNumber),T=0;T<18;T++){var v=!j&&(n>>T&1)==1;this.modules[Math.floor(T/3)][T%3+this.moduleCount-8-3]=v}for(var T=0;T<18;T++){var v=!j&&(n>>T&1)==1;this.modules[T%3+this.moduleCount-8-3][Math.floor(T/3)]=v}},G.setupTypeInfo=function(j,n){for(var T=this.errorCorrectLevel<<3|n,v=Y.getBCHTypeInfo(T),f=0;f<15;f++){var p=!j&&(v>>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&&(v>>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},G.mapData=function(j,n){for(var T=-1,v=this.moduleCount-1,f=7,p=0,c=this.moduleCount-1;c>0;c-=2)for(c==6&&c--;;){for(var s=0;s<2;s++)if(this.modules[v][c-s]==null){var d=!1;p<j.length&&(d=(j[p]>>>f&1)==1);var u=Y.getMask(n,v,c-s);u&&(d=!d),this.modules[v][c-s]=d,f--,f==-1&&(p++,f=7)}if(v+=T,v<0||this.moduleCount<=v){v-=T,T=-T;break}}},D.PAD0=236,D.PAD1=17,D.createData=function(j,n,T){for(var v=z.getRSBlocks(j,n),f=new N,p=0;p<T.length;p++){var c=T[p];f.put(c.mode,4),f.put(c.getLength(),Y.getLengthInBits(c.mode,j)),c.write(f)}for(var s=0,p=0;p<v.length;p++)s+=v[p].dataCount;if(f.getLengthInBits()>s*8)throw new Error("code length overflow. ("+f.getLengthInBits()+">"+s*8+")");for(f.getLengthInBits()+4<=s*8&&f.put(0,4);f.getLengthInBits()%8!=0;)f.putBit(!1);for(;!(f.getLengthInBits()>=s*8);){if(f.put(D.PAD0,8),f.getLengthInBits()>=s*8)break;f.put(D.PAD1,8)}return D.createBytes(f,v)},D.createBytes=function(j,n){for(var T=0,v=0,f=0,p=new Array(n.length),c=new Array(n.length),s=0;s<n.length;s++){var d=n[s].dataCount,u=n[s].totalCount-d;v=Math.max(v,d),f=Math.max(f,u),p[s]=new Array(d);for(var l=0;l<p[s].length;l++)p[s][l]=255&j.buffer[l+T];T+=d;var a=Y.getErrorCorrectPolynomial(u),i=new W(p[s],a.getLength()-1),R=i.mod(a);c[s]=new Array(a.getLength()-1);for(var l=0;l<c[s].length;l++){var O=l+R.getLength()-c[s].length;c[s][l]=O>=0?R.get(O):0}}for(var w=0,l=0;l<n.length;l++)w+=n[l].totalCount;for(var M=new Array(w),L=0,l=0;l<v;l++)for(var s=0;s<n.length;s++)l<p[s].length&&(M[L++]=p[s][l]);for(var l=0;l<f;l++)for(var s=0;s<n.length;s++)l<c[s].length&&(M[L++]=c[s][l]);return M},Be.exports=D},HmJG:function(Be,he,B){},HpTS:function(Be,he,B){Be.exports=B.p+"static/small_program.f74069ec.png"},I8Z2:function(Be,he,B){"use strict";B.d(he,"a",function(){return Y}),B.d(he,"b",function(){return p}),B.d(he,"c",function(){return s});var Z=B("q1tI"),z=function(){var d=function(u,l){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,i){a.__proto__=i}||function(a,i){for(var R in i)i.hasOwnProperty(R)&&(a[R]=i[R])},d(u,l)};return function(u,l){d(u,l);function a(){this.constructor=u}u.prototype=l===null?Object.create(l):(a.prototype=l.prototype,new a)}}(),N=Z.createContext(null),Y=function(d){z(u,d);function u(){return d!==null&&d.apply(this,arguments)||this}return u.prototype.render=function(){return Z.createElement(N.Provider,{value:this.props.store},this.props.children)},u}(Z.Component),W=B("Gytx"),D=B.n(W),G=B("2mql"),j=B.n(G),n=function(){var d=function(u,l){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,i){a.__proto__=i}||function(a,i){for(var R in i)i.hasOwnProperty(R)&&(a[R]=i[R])},d(u,l)};return function(u,l){d(u,l);function a(){this.constructor=u}u.prototype=l===null?Object.create(l):(a.prototype=l.prototype,new a)}}(),T=function(){return T=Object.assign||function(d){for(var u,l=1,a=arguments.length;l<a;l++){u=arguments[l];for(var i in u)Object.prototype.hasOwnProperty.call(u,i)&&(d[i]=u[i])}return d},T.apply(this,arguments)};function v(d){return d.displayName||d.name||"Component"}var f=function(){return{}};function p(d,u){u===void 0&&(u={});var l=!!d,a=d||f;return function(R){var O=function(M){n(L,M);function L(_,b){var g=M.call(this,_,b)||this;return g.unsubscribe=null,g.handleChange=function(){if(!g.unsubscribe)return;var h=a(g.store.getState(),g.props);g.setState({subscribed:h})},g.store=g.context,g.state={subscribed:a(g.store.getState(),_),store:g.store,props:_},g}return L.getDerivedStateFromProps=function(_,b){return d&&d.length===2&&_!==b.props?{subscribed:a(b.store.getState(),_),props:_}:{props:_}},L.prototype.componentDidMount=function(){this.trySubscribe()},L.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},L.prototype.shouldComponentUpdate=function(_,b){return!D()(this.props,_)||!D()(this.state.subscribed,b.subscribed)},L.prototype.trySubscribe=function(){l&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},L.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},L.prototype.render=function(){var _=T(T(T({},this.props),this.state.subscribed),{store:this.store});return Z.createElement(R,T({},_,{ref:this.props.miniStoreForwardedRef}))},L.displayName="Connect("+v(R)+")",L.contextType=N,L}(Z.Component);if(u.forwardRef){var w=Z.forwardRef(function(M,L){return Z.createElement(O,T({},M,{miniStoreForwardedRef:L}))});return j()(w,R)}return j()(O,R)}}var c=function(){return c=Object.assign||function(d){for(var u,l=1,a=arguments.length;l<a;l++){u=arguments[l];for(var i in u)Object.prototype.hasOwnProperty.call(u,i)&&(d[i]=u[i])}return d},c.apply(this,arguments)};function s(d){var u=d,l=[];function a(O){u=c(c({},u),O);for(var w=0;w<l.length;w++)l[w]()}function i(){return u}function R(O){return l.push(O),function(){var M=l.indexOf(O);l.splice(M,1)}}return{setState:a,getState:i,subscribe:R}}},IBYe:function(Be,he,B){"use strict";function Z(z){return null}he.a=Z},Iq15:function(Be,he,B){var Z=B("nVVt"),z=B("dWSS"),N=B("dQei"),Y={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(D){for(var G=D<<10;W.getBCHDigit(G)-W.getBCHDigit(W.G15)>=0;)G^=W.G15<<W.getBCHDigit(G)-W.getBCHDigit(W.G15);return(D<<10|G)^W.G15_MASK},getBCHTypeNumber:function(D){for(var G=D<<12;W.getBCHDigit(G)-W.getBCHDigit(W.G18)>=0;)G^=W.G18<<W.getBCHDigit(G)-W.getBCHDigit(W.G18);return D<<12|G},getBCHDigit:function(D){for(var G=0;D!=0;)G++,D>>>=1;return G},getPatternPosition:function(D){return W.PATTERN_POSITION_TABLE[D-1]},getMask:function(D,G,j){switch(D){case Y.PATTERN000:return(G+j)%2==0;case Y.PATTERN001:return G%2==0;case Y.PATTERN010:return j%3==0;case Y.PATTERN011:return(G+j)%3==0;case Y.PATTERN100:return(Math.floor(G/2)+Math.floor(j/3))%2==0;case Y.PATTERN101:return G*j%2+G*j%3==0;case Y.PATTERN110:return(G*j%2+G*j%3)%2==0;case Y.PATTERN111:return(G*j%3+(G+j)%2)%2==0;default:throw new Error("bad maskPattern:"+D)}},getErrorCorrectPolynomial:function(D){for(var G=new z([1],0),j=0;j<D;j++)G=G.multiply(new z([1,N.gexp(j)],0));return G},getLengthInBits:function(D,G){if(1<=G&&G<10)switch(D){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:"+D)}else if(G<27)switch(D){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:"+D)}else if(G<41)switch(D){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:"+D)}else throw new Error("type:"+G)},getLostPoint:function(D){for(var G=D.getModuleCount(),j=0,n=0;n<G;n++)for(var T=0;T<G;T++){for(var v=0,f=D.isDark(n,T),p=-1;p<=1;p++){if(n+p<0||G<=n+p)continue;for(var c=-1;c<=1;c++){if(T+c<0||G<=T+c)continue;if(p==0&&c==0)continue;f==D.isDark(n+p,T+c)&&v++}}v>5&&(j+=3+v-5)}for(var n=0;n<G-1;n++)for(var T=0;T<G-1;T++){var s=0;D.isDark(n,T)&&s++,D.isDark(n+1,T)&&s++,D.isDark(n,T+1)&&s++,D.isDark(n+1,T+1)&&s++,(s==0||s==4)&&(j+=3)}for(var n=0;n<G;n++)for(var T=0;T<G-6;T++)D.isDark(n,T)&&!D.isDark(n,T+1)&&D.isDark(n,T+2)&&D.isDark(n,T+3)&&D.isDark(n,T+4)&&!D.isDark(n,T+5)&&D.isDark(n,T+6)&&(j+=40);for(var T=0;T<G;T++)for(var n=0;n<G-6;n++)D.isDark(n,T)&&!D.isDark(n+1,T)&&D.isDark(n+2,T)&&D.isDark(n+3,T)&&D.isDark(n+4,T)&&!D.isDark(n+5,T)&&D.isDark(n+6,T)&&(j+=40);for(var d=0,T=0;T<G;T++)for(var n=0;n<G;n++)D.isDark(n,T)&&d++;var u=Math.abs(100*d/G/G-50)/5;return j+=u*10,j}};Be.exports=W},J66h:function(Be,he,B){(function(Z){var z,N;(function(Y,W){Be.exports=W(Y)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Z!="undefined"?Z:this,function(Y){"use strict";Y=Y||{};var W=Y.Base64,D="2.6.4",G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",j=function(m){for(var P={},k=0,y=m.length;k<y;k++)P[m.charAt(k)]=k;return P}(G),n=String.fromCharCode,T=function(m){if(m.length<2){var P=m.charCodeAt(0);return P<128?m: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+(m.charCodeAt(0)-55296)*1024+(m.charCodeAt(1)-56320);return n(240|P>>>18&7)+n(128|P>>>12&63)+n(128|P>>>6&63)+n(128|P&63)}},v=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,f=function(m){return m.replace(v,T)},p=function(m){var P=[0,2,1][m.length%3],k=m.charCodeAt(0)<<16|(m.length>1?m.charCodeAt(1):0)<<8|(m.length>2?m.charCodeAt(2):0),y=[G.charAt(k>>>18),G.charAt(k>>>12&63),P>=2?"=":G.charAt(k>>>6&63),P>=1?"=":G.charAt(k&63)];return y.join("")},c=Y.btoa&&typeof Y.btoa=="function"?function(m){return Y.btoa(m)}:function(m){if(m.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return m.replace(/[\s\S]{1,3}/g,p)},s=function(m){return c(f(String(m)))},d=function(m){return m.replace(/[+\/]/g,function(P){return P=="+"?"-":"_"}).replace(/=/g,"")},u=function(m,P){return P?d(s(m)):s(m)},l=function(m){return u(m,!0)},a;Y.Uint8Array&&(a=function(m,P){for(var k="",y=0,S=m.length;y<S;y+=3){var F=m[y],A=m[y+1],X=m[y+2],ne=F<<16|A<<8|X;k+=G.charAt(ne>>>18)+G.charAt(ne>>>12&63)+(typeof A!="undefined"?G.charAt(ne>>>6&63):"=")+(typeof X!="undefined"?G.charAt(ne&63):"=")}return P?d(k):k});var i=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,R=function(m){switch(m.length){case 4:var P=(7&m.charCodeAt(0))<<18|(63&m.charCodeAt(1))<<12|(63&m.charCodeAt(2))<<6|63&m.charCodeAt(3),k=P-65536;return n((k>>>10)+55296)+n((k&1023)+56320);case 3:return n((15&m.charCodeAt(0))<<12|(63&m.charCodeAt(1))<<6|63&m.charCodeAt(2));default:return n((31&m.charCodeAt(0))<<6|63&m.charCodeAt(1))}},O=function(m){return m.replace(i,R)},w=function(m){var P=m.length,k=P%4,y=(P>0?j[m.charAt(0)]<<18:0)|(P>1?j[m.charAt(1)]<<12:0)|(P>2?j[m.charAt(2)]<<6:0)|(P>3?j[m.charAt(3)]:0),S=[n(y>>>16),n(y>>>8&255),n(y&255)];return S.length-=[0,0,2,1][k],S.join("")},M=Y.atob&&typeof Y.atob=="function"?function(m){return Y.atob(m)}:function(m){return m.replace(/\S{1,4}/g,w)},L=function(m){return M(String(m).replace(/[^A-Za-z0-9\+\/]/g,""))},_=function(m){return O(M(m))},b=function(m){return String(m).replace(/[-_]/g,function(P){return P=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},g=function(m){return _(b(m))},h;Y.Uint8Array&&(h=function(m){return Uint8Array.from(L(b(m)),function(P){return P.charCodeAt(0)})});var C=function(){var m=Y.Base64;return Y.Base64=W,m};if(Y.Base64={VERSION:D,atob:L,btoa:c,fromBase64:g,toBase64:u,utob:f,encode:u,encodeURI:l,btou:O,decode:g,noConflict:C,fromUint8Array:a,toUint8Array:h},typeof Object.defineProperty=="function"){var x=function(m){return{value:m,enumerable:!1,writable:!0,configurable:!0}};Y.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",x(function(){return g(this)})),Object.defineProperty(String.prototype,"toBase64",x(function(m){return u(this,m)})),Object.defineProperty(String.prototype,"toBase64URI",x(function(){return u(this,!0)}))}}return Y.Meteor&&(Base64=Y.Base64),Be.exports?Be.exports.Base64=Y.Base64:!(z=[],N=function(){return Y.Base64}.apply(he,z),N!==void 0&&(Be.exports=N)),{Base64:Y.Base64}})}).call(this,B("IyRk"))},JWDV:function(Be,he,B){Be.exports=B.p+"static/charpter-white.5fa14f93.svg"},JYp7:function(Be,he,B){"use strict";B.d(he,"a",function(){return Z});var Z;(function(z){function N(i){return i&&typeof i=="object"&&typeof i[Symbol.iterator]=="function"}z.is=N;const Y=Object.freeze([]);function W(){return Y}z.empty=W;function*D(i){yield i}z.single=D;function G(i){return i||Y}z.from=G;function j(i){return!i||i[Symbol.iterator]().next().done===!0}z.isEmpty=j;function n(i){return i[Symbol.iterator]().next().value}z.first=n;function T(i,R){for(const O of i)if(R(O))return!0;return!1}z.some=T;function v(i,R){for(const O of i)if(R(O))return O;return}z.find=v;function*f(i,R){for(const O of i)R(O)&&(yield O)}z.filter=f;function*p(i,R){let O=0;for(const w of i)yield R(w,O++)}z.map=p;function*c(...i){for(const R of i)for(const O of R)yield O}z.concat=c;function*s(i){for(const R of i)for(const O of R)yield O}z.concatNested=s;function d(i,R,O){let w=O;for(const M of i)w=R(w,M);return w}z.reduce=d;function*u(i,R,O=i.length){for(R<0&&(R+=i.length),O<0?O+=i.length:O>i.length&&(O=i.length);R<O;R++)yield i[R]}z.slice=u;function l(i,R=Number.POSITIVE_INFINITY){const O=[];if(R===0)return[O,i];const w=i[Symbol.iterator]();for(let M=0;M<R;M++){const L=w.next();if(L.done)return[O,z.empty()];O.push(L.value)}return[O,{[Symbol.iterator](){return w}}]}z.consume=l;function a(i,R,O=(w,M)=>w===M){const w=i[Symbol.iterator](),M=R[Symbol.iterator]();for(;;){const L=w.next(),_=M.next();if(L.done!==_.done)return!1;if(L.done)return!0;if(!O(L.value,_.value))return!1}}z.equals=a})(Z||(Z={}))},JeFH:function(Be,he){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qgVaWlHIggHMB+AA8K4TIbe2ek/FzKWUmgLGw7THQtLlCiBUn4z6j9ySa26SUMg3A+ZDyaljBMTC87mXrAUwSQtT+fxBOSqmbpjnaMIyrYJnToRvtQ/sOAJgihFh1ssvRSEFSysEAroJlXQZdp8VhXUEAS07UYGavBPSIQz10vacQ4vjJLJiUMgPAhZByJoQYyr0erZFYmFOFZK+GK7szGOB3Qoi/nsxycG9KQVLKKyDltbDMbBge5NYD87+twvxjNdhbZiIoJZZMysRpPqsShreXECL/ZBRMSjkAwM2wzIugG2k2gOW59fjgaDU2FNbjRI2Fm/r48eigdtz+TUKIF05GOSL3JKSUDwN4SALYXBRQwqzIrUNBvQ1DAIYm4BHAJxMz0TPOLoJu9BFClJxsglVVVWXGx8d/IYTIOl4rsSCnGvNzarCvIghLAl5NoN6WuKVPAu4dkMjtXyuEeP1kk6NJDpJSHgTQ8+Ht5Xj5UBWoqBhNQAsFP/6dwi2alIlTYq1caEY/IUT5zyGYlLIvgD4AugLIgm0zF3qgaccDgcCbMTExu1v6Xinl6YDc/lWxiWvWF6E04BiYxxUEQK0lcUe/BNx9qlLQFUKIt38mOVIAnA6gG4AugM104Qe0ajo1gA+FEHTwVhc96CoAbzy9txJP7KpAPKWKWFRQrCawZEoHZHnN4yEFVbX65DZeIKW8DVI+DiHimrtVSnlCCDFUCHGihc+TYJl7jwf1DlOW5KHWltCiLqSCfndqIm7vlwDLsi41DOP9Nm6z1cullL0BLATAP1tavxZCvNTqw5iDpJSnwrZ2rC60tKvXFTayOCc/AXGGwNIpHdDRCOZA9/QXQtASfrIlpdQg5TYpxMDXDlVhf7mJ/DoLZQEbNabEnf0TMbVTLL+PCHJZy15kL5EQk6ctK8De8mATWaige09LxC19lYIuMQxj7k8mROhBUsrbAfydOW/pd3XIr7VQXG+jImjjtHYePHlmMmDb7wpdv/yHfDcV5Idt7c0NalmTl+Sh2pTh8OYqiF5FBXXwWEeh6acKIWp+yMPbco2U9icS4pyJSwuwsywQDrM1lsQDA5JwW78EPu4iIcS8lhUkHwfw+1s3l2LesRrE6o2jARV032mJuLlv689qy94bRRwpL2YIe3F/Fe7bVqYiEqMs82CvBAOrpmQA0vpUaAZry1ZXCMXZS22ISVM/L8CBSlPFbnfRg/53FCQfAXD/7VtKMTen4XB5qDf38eO+AUm0+usMw3j1exR0GYB3nttXicd2VSDu/0ZB/WCZuzaU2NqMNYUKZHFRQR3jdKyclgGvZa0XhjGqVe2EYbZlzYGm3fmbjSX47EQtYiIEaxTiPNa3IQ/6SUOc46nyUgDvRh8uFXRlNx+eGKKg8d1CiDktCRYIBM7wGPrW5flBce36IgVuIldkiANwsRDiox9ySG25RkqZEIpInRiRGKKFAGwJtPNqWD4tE8nC3AXNOEMIYbX2bLcOugbA63N2V+CpvZWNLK8RSPCYx6ErFPdzgIRBsK2tn+ebuG5Dw+HWWRLnZsXhxWEERnhMCHH/93hQMqzggaP1RuovPs9TsDpSRZEgAcAvhRAftHZAP+ZzadurLCHGTl5agMNVTkRyz3HxlA7o7LVyoOk/KJe7ChoKyE0Lj9fhpk0ljT0oBLs/m9QBp8SYuSEF/eQwW0oZDyuYc7BWb3/usjyY0qmiA7bEqLQYvD0mlWf1ohDixu9RkICUGwJCDJu4OB/HaixERrn/RZj9NIDbZq4vxvLcOnWeVBBR5fzsTPT3WaXQPb2FEEWtGYBSUHV1dYd4r+fA7hrNf8HyfBCgu5bHB//UhaqUkoVIOoBhAPrRBmzbLtSAWyul1mnSkjzk19nqcIO2xMBkLxZOSCP6eU/oOvNMRI6UQgjBbaolpXwZwHUz1hRhXWF9ozBHBf2UhaqUMgYA+T3Wb8Nh2+2haWUASDBf/PDX5XjpYFU4ItHo3hmThuFJMgiPt4sQIu/7ZOFnrgcZsO3tFdBOzV6Up2BhZKFKzX+cnYFTfXZFdV2gt9/v/1FUjySdBDkLltUVUqbD8BjRFsRYfeGqQmwvCSiYTKG6+XR8PjkDBuQ2CLEItt0NQrSDgAe2TIG0bWh6IYTYzLINwB/u31qG149UNwrXVND1Pf340xlJ/NofTfXU19f39Xq9s2Gb/WHLTjA8ityLXm8crsa928rCe6i3JF4a3h5TM3UJ3fMEbDsTQhB3xwOaH9KKhRAVEPpRAK8KIdaEQ7S07XkQ4oJzlxcqmBtZgfPQPhiXjiGJdn2IizvWmmtGfy6lZFW9RwKxJC4Lak10idPw6M5yFNbb+GXXeFzcNV7ddsvmEnx8rFbBZKKf9FgNi7LTkRLTUHrSy/k3opWgDSRqzt8BnABkp1cPVeOB7eVNFBQBOO4RQjzZVjlCXsrcdUlREDhaaSIzVmDZd3X49EQtuvkN/On0JFU7rs6rw9Xri8NnSQN5cnA7XO6QtY0WQ0CpBcTrjoUBKCAb0aAgKWfT8m7cVIKFx53DcRfDzH9Gp2F0CiQML0HC/rYKpmgcK7hnY4kUV68rUjH53yPb456vSrG33MRV3X145uxk9di/7KrA0/scsELj8BsCn2WnI8unozJo48ZNpThYaeLBgYnYWFiPuTm1qgh8a0wqvJBFsILJK4ulPnNdUSNDI+C4oHMcnh2qAMd/CyEeaqscIQV9CuAXF64sxLqCekUd8bQe31WBjDgNyyZloFO8joMVJs5fUYiAdMAKEd0fByTiJqcOwz8PVOH1w1U4MyUGl54Shxs3l6qQPOesZIzLYItHnBGpoGvpVpGH426ervmv4e0xrRNDrhgshNjWVsEU/LTMfTlBvePUJXmqsv7nsBS8eaQaq/LrMSkzFm+Odto17x2twV1fliojoSKJguaPT0PfJI8SctLnBYoE/duZyYoxeOVQNXonGlg5NQMeKbfBtjKP1GkdiOSCIbDB51KOiR1i8dpI9T1/F0Lc0VY5Qgr6C4B7fr2xRBXE/9UlHqPSY3DP1jL4DIF549JwajuPYkKmLisI51N6ENn0+weoEKsMcfaucozJiFVsyTXrihXyZBg8t5MHEPrASAWNAbD6g6M1uCN0OO7m+WAexi9PUSFoLGPjjxLMNldYQh9PtmBPWQCzB7XDzrIg3jlag8EpHiwYn6YKu/UF9bhibTGMUMyiF707JhVnp3ph2sD0lYX4orgejw9uh5wqCy8erELfRAMrpmRAk3I5YPtroA9lPs0LgQ3ul4hwWGoM3h+bSsDxutB1GmWbl5TySgBv/m1PpTrg4WkxuKG3Hzdsckj+N0elYkxGjArPF6wsxI5SJ2XwHGd08+GvTk2Hlw86bMPZqTGKgmI4DNAZRrTHtEwD0IwBkQrqBjO4f0s5PJeuLmwCTx8+PQmzevn53POFECQD27yklH8D8NvrNhRj/rFaxSxz46y9uvsNLMpOQ5JXw+FKE+etKAzXMTzYV4a3x6SOTnS+bE0RluXW4bFB7VBYZ+Mf+yrRN8nAyikZENL6BEJUAtrl01cUYnvocHgfQzUtm+ESkB8LoV3YZiEcpDgYtvXVkrwgfrWhGF19BmYPSsJvNpWi0rTxzFnJ4XxKL1sUKv7pwdM6xeFfw1WIxYff1uCWLaUYlOzBg6cn4ep1xUqJLzUo6LRIBfnJBp8IGllTluaiNlQB80G86bd9E3DPaYqmv0YI8caPFGwmgNfo2k/srsDlp8Qr6/n91jKkxmjq4Dr79CahgbnjqQYPBhmPD3Nq8OczklAdlHhyTwX6JXlCCpLzIcQOAA+wplsQkU9p0V18uvI0XVqrhWaM+5FyJMMyD3xTr6VOXZoHQwhVSN/5ZamqvR6MyDN/+roc/wpB7UYeDCgjo1JoNGwiXrWuSHGhLSlIwLLWB3R9+ITF+ar76OIEKmhmD5/bibxTCEFPaPOSUp4FaW9ZeCKAK9cWIjszFtf38mPWphIFBOaOS1PJngfJ5LorhCb5/Q8NTMKveysPxj1fluLFA1UqxFF5j+wsR/8kD9ZOy2SIWwCHwnl99s4KPLu/gRlhqGwf49AticLeAaExn7ZKt0QLKqXkWa0L6vqIMZ/l43BVEO+NTsXsXRXYURpU3OEDpzt55pWDVXjwawdN0oO5zwUT0lTk2FJUjwtWFqFPoqFY7l+uLkKVaePVkak4p0NUiOPDpGW9BU2bcdGqQnxV3AC1eQjnd47D8w76mS2EuK/N2nFCQxos8+CROi3pmT3lGJcRi3GZMThQEYTf0NAtwQjDYoaOz79zqnAq6Na+CfiD48F4dl8l3v6mBvcPSFR55aUDVciM1/HyiPZU0GIIQVZ7Fa8hSnRJUwIO/j97W508P5xuaU5WaVkvQdOuZzTgc6/p4VP1I/dDUjQjTle3LT5Ri1kbHXaGhpcVr6tQ7vdoCuUxb9Eo7+yfgPu3laOo3sJ9A5MwJt3DQqIBxSkFSevPgPbHyDqE/67olvQYvD1a0S0vCyFm/UgFMe0vAHBOa/f/cVsZXjvsFJqKMO3uwxODneRKS9SEaJQnSeqSlARAmuVvsM0ja4tsjZ7q1nSN6Ra7HLpBuoX1RpuXlJKMxluhcqzF+1lwX7LaKSu4Rw6tUEHpcboqIUwpm5C6vFYA3wEYFD3Vo6B2dGhwkqsXn2Wn8VsWCE2b3maJQjdIy3oWmnbzoUoTu0sD4J8Mp2VBG+MzY1U9xPX8/ipVxFJBTK6/6BSHf4aSKwWl0tgrMm2pckCiV7iCPsueECwz51Cd3v6cz3PDvB6fy+v/MyYNo5Jhw/D2FUKw5d/mFQgEzvZ4PBtKA7bOsMYocLTKVF6UYGi4f2CiYq+P11j4xfICVAUdVpvjBJ9MSEP3BIdEoWyUg+iNy+fRVLiHo6Ah0QrKZu76z5Fqlbjd0MB7WXitmJoBr5QbhaaNaLNEroKkZKv3+ivWOkhMF05Di0ZwVmqMgtr8+8c5DsJhLUQPJpR9zyFMwVKAwIAWqLwJAt0SdLwxJg0+2NugaUMh7a8qpDYgmrpiuH5uaAqmdyYiFMOEQw+1eUkpR3IqjWiUYcqlxnig3Ne8cakYmhajCutpywuVEfIafv7h2FSckeLF8WoLszYWozhgKzaEi2TJY4OSMaFDDEzTHButIDabdq8sssQ16xoof35hokdg2bQOSBXBQ8Lw9mqzRA0Kuo1h6IHtZSAdE2kEGaR0JqarMECGYMba4jBhyuRKwpR10ltHqnHXV2WID6EY7o/UysppHZCpBQ/C8PRh11IKfdoUNiErzHBNRc8jFUNwYprmVI/Hs+THyCKl7MjWxs4qzXfhinwVwtzD5HfMGZKMy7rFK2WRcXDhPg3qjVGpGJsRg9waC5OXFaAiKMPhmt7E8uFXPX1sUJ4TraBUwsd9NVry+cvyQHjDC9xqfmF2Jnr7ZAU0/WYyF5ZlBXVdZ+uBtHkhgJLWUJGUcjyAFe+G2ILIBO4RAgsmpKJ3ogeHKkyct7IAAduxSCZXwvAEj8CSUOL1hhTkTh4tntwBXY3AMeGN6SKlfB7AjVeuLcaagrpwnHc6tAm4zxm9eoZgIiQiaT1WmoW5ublFHTt2/N62vpTSoJdWSW1g9uI8VY+5XsTvuK1vAn4fAjXXbyjGkhDgoQeTaiLlRDZl2rJCfFcbgZhNiQcGJuGGPgqxXhKtIC9sc0exbfSZuCgX5cGG+QTGblbgrFuaLCtILZZBEzmAthuatgXAJgC7opt7UsosWOb+rytF/EUr8xs11BTnNyoVozNiUFRnYeryQpTUO77PeM7kSnS0pSigilXG9EgD+nRSB/SMDeZB92ax+0p67O4vy/Du0eowt8jDu7RrPJ46y+H9Gi9m7WA9OH+uaQcgxVZo2kYAXzU3TSSl/A/Ht/5rdRE2FzW0NqiECzvH4x9Dne+4f1sZXncBjynxyKAkXNvTr8IzywnSVW5rnB70+9DkkRoNa7LFEB2TvSQfR6ut8HwCFXR1D78q9MgxsQ3AhMeDIyLJ8nnQJUFHsoMunWWrIRNO4XDQYzWngVQNIe2vK0P5gUx2ZL311JBkXNotXiXPc1YUKhDBz0kiMrn2SDAUPD1vRUGYZ6MH8WvnT8xEvzirCIansxr9Bd5+anclntxbEQ6HlKN/Oy+u6BavWHQeJnOyz9CQGqujY7yBLgkecIgozJ1bZiU0fSOEmA/gUyHEtxRPSnkngDkPbCvHq4cb+j7MmUNDlBIP+B97SQk5I200kDv7JeAuZzYPl68pwvqIvlXU5zObKsiy3oCmXXXxKvJdgUYQkBqnYoii3EUrpiAMN0keTYUi4nomyKEZcch05+5tcz804zXCdABPsKl2yaoibClusDxu7u7+ibijv8P2snDbVFQfhslMroNSvMirtVTiLQ84YcWN//MmZGCAzy6F4ekCgHPmq9/5pgZ3R9RCym4kFI0ULQc/Y5jlQTIf9kr04Mz2XgzPiMOApJDlUVm6MS8YDD7r8XiINFa/d7RGuOQun+H2sBiSmRvfP1qjWAYCnqiiHzdvLlG0l9s9iKr5rm+qIOlM1xCZfBLVdmgmJoT/ycX5lnSUyAezah+c4sW5WfGY2iUOPgVx7G+gaXyFZURkrcMHcXNXdPPhLyEy8abNJVgQ2jyN4/WR7RUUJ2SdtrxAQVh6l2svH43PwOl+uxyGh72nNNjmvpWFtrhmXWGTWqM1WYhc6W18NsEIPZdM+PSufvTya4AVtKF7lsK2sr8utz00aNdQ3AERNySvyqvDNaG+ED32vKw4vODMWOCh0ESvm4sV493bj/sHKibixuYUdAOAF6Lbtc0JFIlcmvvchcG8jo2sy06Jx8zeCfCFYke0dTOsTciMxb9HOW0HjiO/dMgJHRTs6RAJGc0Su8Yxd3w6BiXKSuieHirxm8HDe2q0xOlRbfwmYT0CgbUkJ5VFKEwyl3u8oU8CBrRzapnSehtTlxegIMScu6Dq4/FpiiPcWRoE2RlmUxrayLQYvBMqGUj0so8UqaAbeoWpojuaU9D5DOccvPtzqFBsbtOM26xhyoO2StbMEU0eFnEjvYqxmXCZMHdkeoxqa7PKdhc3f1o7L+YTTgsWq5V4dKez+Wg+jiTjyvw6lQe5qDR2fc9MlNUwPD0BFMO29hVYeveJi3OV10VNYYW/l8+vNKkAp6qPGqdrJD4Pn8aSYAjF7nOgkgn+stVF2BgBFKhQth0IeFjvqGLVlGCEcUqGdAX93/3GKRkiFeS25W3bvrc5BZ0NyM3zcupw65aSJtOZ7mEwRr8wNEX1c5Z8V4ttJQGF+qIH1qOVSyUxIb86IgUDkr3IXpoftjx3uI+MBS2VdPxvv2iI3bf2ScAfHHiMO74oxQffNgw48t73xqbj7CS7FoaX7zB9J01zY0DXh41flN8IykbuiV5Lqp9Tn5wJZIf0WLXDn5IiakmpjA40mut6+vDIoHaNvJ33Rno8cyVzZm6t81wW/Qx/CR5NFevkHd0ZPj7zVz39iqlnBGxOQd3ZF9pQCmPGmoIw/IsUyn0Dgl/S1e+4OamOJSfqlJD7Kkz1by1ZIjcxOdTZvDTC8sLt7YnpCmxExu7oZtdjO8rx3IHGEzPvjk3DsCRZF1LQCWnbH0GIC5ubs3DlIay9JwKYENZTSQuP1SqPYK0SPQDp3suQReiwYnK6Ipdd5oOfc78kc2/qk6A8k/0twmlGHRofzy4zTse24gAuWeNEESqD913bw1E6gEeaU1AKK+QDofk0WmZzoYskH2sWkqiRix7yRVFAdQpzqhvPpbnXEUGNSY/BW6NTG1meS2Z+NC4NA5I9qhN58aoiFbvJVU3uGItXRjj5iQz2wzsahkIYUt4Zm47h7WR4sEVKSV7uZhUO8xxmPHrR0i/uEo+nQ/MQkZ/nVJsKIr//bU2TQXxe5+6XHs9zohLckTUe9KyefjzseEIYTtMrvRoUpUWU+E2liXNXFKIuNGTJ+8iMk00g2m1OQSxWdxbZRm8Wq6QhmnNzh85oh8u6NZ5QIXTlLNjf91Y2mex0hWdTikPst/ZLULxaZIs9Eq19W+Vsntczdg9J8aqeEXNeJFfH51JBb49Jx4hkOwAjhm8B5kgp2RZ59M4vStUhRw/T8z4a1NntY/DBuNQmhsgcee/WMhURmosGBA0MjQuz05SXTF3mhDFeq1o0WXF4PoTWIuE0IwV5xbNSvYpc5dyCO+qmFNTdh8cc5v6pZvO6NM11AV0fOWFRPk5E0BCR1sUH3d43Ab8L0Rn8jNwS0R/Hj2itzT2c3tPDb+DDcWmqixqJcHh9ZPeU4YZwmuiI1trDr+PT7HR10Gvz63HVuoa5BSrorTHpGJksAzC8bCN868zhNWXnI+Wg5XcO0Uh+TmiGPOONQ9X4y+4K1cJuLsRxP/Tqv4eQJf9OApjhkddHd08f3F6OV0KIVPWwhrXHlE6xSt5zlheGR4R5rld392G2o6B/NK8g254LIS4i8thd1vQ9G94ZNcKkRlypnCNVZpO3CsKhzZJIi9Xx0vAUDGmvKlirPGjrfJ8nt9ZhFLhB9x0efgeti/PNZKzTYjUsmZiu6ivuiwMZbkihBb/ltBGCIQUdlVKy7/QJhzMeCnU1o0McrZmTOJ9mp6GLz1Dv8/x5RznmH69VRWtz0YP38JDZRAzxbWpMj/ex00tERtRK7yL7QWNlRGEbh0Uw5XpySDtc0d2nDI811JchUoDyX9XNh8edWvCF5hUk5XOcvKRFrA1ZRLRgbmh4dWQKnttXpV6fpBVHDjy691Agbur0ZA/+OiQZpyWzWwjONbAiunJGhOU5yMiP/z4jSVX6v95UonIRn8HD+mBMKrr4DQe6rnD6LG67Qs3uJUsTHhXiqKCz+eotK3WGmOZCHDfCZ88dm6qg9h+3l6mhlehXVyKNjAq9q38iZjkt+BO2bc/RNDw1L6c+jHzpmWkxDjtPg/oop0bVOxSYaeOWvn4FILhmbSjG4ojuccRw5cstKehBAH+6dUsp5kW8qxOpJB4eebgOcbqi0psLaS6lQgqI3NftpybB7zAmfHn3N7ZtX6tp2ov0vGdCg4pU5PSsOLzqzK6pxR81CNJrTaB9aFiY0JXexbEqV0Fvjk7D2BSYMLx80fmIlLIXrODedSVSvzLiXZ1oY6MVD2znwd4KE7Wm3fQtw1CByetGcMhlQJIaEwPkIUCws3oIZvDYvlo9gQM3zE0uA7F0UrpiIbiIbflfre30fZw5WuAPX5XhzW8cQleh1VPinTfxgH+3pKDf8E2C1tgEKoDJO9JruDGGG1oQc8yUjnG4rlcC+iTqpHlKoWlU/nMceJdSjgawhvnk42M1yIo3kBqroXeiF0NTlZftA+R+SMpix4PDj0KvghBZpo0uVNCByqCK+QpcjErD+BRuKIY56JDk/LcZPLCnRk+avjyv0UsB0Uri/Sw4Iw+EMjBSsBgelOLBzB5+nNfZfYXWfh/Q7uJvRvAHMyDlF3UQgx7dXoZYQ1NcXlqsgeyOsTTKenBWAjYhbxxs6YemG3B+EGQY5xo4ekbPZF7j/OEcR0FzW1IQmeCPommI5iyPnkQlURgqhxU26Y3JHeNwXhcfsuL4/p9pQTdIzfP9ngPuc6SU3AU7mo0bgCYrXg/Hi2dETrHyXVa+HS2l5Ft21+6usMBuhMtidE/UECdlDYSggk6oV1psa893Qb3rlCW54ZepouXg37l3d0aAfzL/cNSYZcT0LvEYnuqyvnIrIChHo/dbZYjDbPxslSFLAfGUEIIcZ3gppTpvd6zLqweOVZuI0TUVDRgSOzjVy5yWFKSmTNn6vv2LxlMx7jdEMtiZcbR6h/kdmh7nkIlctlUCiLnQNL7Xs7W5g6mrq+sTExNDg6gM9eE5xFEM4HhLL4pJKYdwvg5msCsgg4AwFceueyptKZ/XNO3pkIdqkPaXVdAGjfwkt1FTzeXveCAN7QYNp/gMDEzxYFhaLAaneaH8xTY5hrvasu1/5ebmzuvcuXOTn8KRUpLZ5sQpWVD+EgvfAKEcBWQ1mjUK554XYFvnw7YEhAhCSr6pYULTv2R6aklBAwC5Y3uJief2VyqtEoHGG5rT/4nVVN+EPaCsBB0pkT0gyyyDpq+HEB8DWNTSa/PNbbgt/yal5NkxyzI90VRVdI3+HSFpmyuk0MeTeGXnkspgrE/0aGgfyxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h:function(Be,he,B){Be.exports=B.p+"static/qrcode.2267e4d5.png"},LdHM:function(Be,he,B){"use strict";B.d(he,"b",function(){return i}),B.d(he,"a",function(){return O});var Z=B("1OyB"),z=B("vuIU"),N=B("Ji7U"),Y=B("LK+K"),W=B("q1tI"),D=B("rePB"),G=B("Ff2n"),j=B("ODXe"),n=B("4IlW"),T=B("bX4T"),v=B("YrtM"),f=B("TSYQ"),p=B.n(f),c=B("+nKL"),s=B("8OUc"),d=function(X,ne){var fe=X.prefixCls,ye=X.id,Pe=X.flattenOptions,xe=X.childrenAsData,Ie=X.values,Me=X.searchValue,ke=X.multiple,Ee=X.defaultActiveFirstOption,J=X.height,I=X.itemHeight,U=X.notFoundContent,K=X.open,q=X.menuItemSelectedIcon,V=X.virtual,ue=X.onSelect,Ae=X.onToggleOpen,Ue=X.onActiveValue,ce=X.onScroll,ge=X.onMouseEnter,Te="".concat(fe,"-item"),Oe=Object(v.a)(function(){return Pe},[K,Pe],function($,te){return te[0]&&$[1]!==te[1]}),Xe=W.useRef(null),rt=function(te){te.preventDefault()},st=function(te){Xe.current&&Xe.current.scrollTo({index:te})},nt=function(te){for(var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,de=Oe.length,ie=0;ie<de;ie+=1){var se=(te+ie*ae+de)%de,pe=Oe[se],be=pe.group,_e=pe.data;if(!be&&!_e.disabled)return se}return-1},bt=W.useState(function(){return nt(0)}),yt=Object(j.a)(bt,2),Ne=yt[0],Re=yt[1],Je=function(te){Re(te);var ae=Oe[te];if(!ae){Ue(null,-1);return}Ue(ae.data.value,te)};W.useEffect(function(){Je(Ee!==!1?nt(0):-1)},[Oe.length,Me]),W.useEffect(function(){var $=setTimeout(function(){if(!ke&&K&&Ie.size===1){var te=Array.from(Ie)[0],ae=Oe.findIndex(function(de){var ie=de.data;return ie.value===te});Je(ae),st(ae)}});return function(){return clearTimeout($)}},[K]);var tt=function(te){te!==void 0&&ue(te,{selected:!Ie.has(te)}),ke||Ae(!1)};if(W.useImperativeHandle(ne,function(){return{onKeyDown:function(te){var ae=te.which;switch(ae){case n.a.UP:case n.a.DOWN:{var de=0;if(ae===n.a.UP?de=-1:ae===n.a.DOWN&&(de=1),de!==0){var ie=nt(Ne+de,de);st(ie),Je(ie)}break}case n.a.ENTER:{var se=Oe[Ne];se&&!se.data.disabled?tt(se.data.value):tt(void 0),K&&te.preventDefault();break}case n.a.ESC:Ae(!1)}},onKeyUp:function(){},scrollTo:function(te){st(te)}}}),Oe.length===0)return W.createElement("div",{role:"listbox",id:"".concat(ye,"_list"),className:"".concat(Te,"-empty"),onMouseDown:rt},U);function le($){var te=Oe[$];if(!te)return null;var ae=te.data||{},de=ae.value,ie=ae.label,se=ae.children,pe=Object(T.a)(ae,!0),be=xe?se:ie;return te?W.createElement("div",Object.assign({"aria-label":typeof be=="string"?be:null},pe,{key:$,role:"option",id:"".concat(ye,"_list_").concat($),"aria-selected":Ie.has(de)}),de):null}return W.createElement(W.Fragment,null,W.createElement("div",{role:"listbox",id:"".concat(ye,"_list"),style:{height:0,width:0,overflow:"hidden"}},le(Ne-1),le(Ne),le(Ne+1)),W.createElement(c.a,{itemKey:"key",ref:Xe,data:Oe,height:J,itemHeight:I,fullHeight:!1,onMouseDown:rt,onScroll:ce,virtual:V,onMouseEnter:ge},function($,te){var ae,de=$.group,ie=$.groupOption,se=$.data,pe=se.label,be=se.key;if(de)return W.createElement("div",{className:p()(Te,"".concat(Te,"-group"))},pe!==void 0?pe:be);var _e=se.disabled,Le=se.value,Ye=se.title,lt=se.children,Et=se.style,vt=se.className,ft=Object(G.a)(se,["disabled","value","title","children","style","className"]),ze=Ie.has(Le),Qe="".concat(Te,"-option"),He=p()(Te,Qe,vt,(ae={},Object(D.a)(ae,"".concat(Qe,"-grouped"),ie),Object(D.a)(ae,"".concat(Qe,"-active"),Ne===te&&!_e),Object(D.a)(ae,"".concat(Qe,"-disabled"),_e),Object(D.a)(ae,"".concat(Qe,"-selected"),ze),ae)),me=xe?lt:pe,we=!q||typeof q=="function"||ze;return W.createElement("div",Object.assign({},ft,{"aria-selected":ze,className:He,title:Ye,onMouseMove:function(){if(Ne===te||_e)return;Je(te)},onClick:function(){_e||tt(Le)},style:Et}),W.createElement("div",{className:"".concat(Qe,"-content")},me||Le),W.isValidElement(q)||ze,we&&W.createElement(s.a,{className:"".concat(Te,"-option-state"),customizeIcon:q,customizeIconProps:{isSelected:ze}},ze?"\u2713":null))}))},u=W.forwardRef(d);u.displayName="OptionList";var l=u,a=function(){return null};a.isSelectOption=!0;var i=a,R=function(){return null};R.isSelectOptGroup=!0;var O=R,w=B("VTBJ"),M=B("Zm9Q");function L(A){var X=A.key,ne=A.props,fe=ne.children,ye=ne.value,Pe=Object(G.a)(ne,["children","value"]);return Object(w.a)({key:X,value:ye!==void 0?ye:X,children:fe},Pe)}function _(A){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(M.a)(A).map(function(ne,fe){if(!W.isValidElement(ne)||!ne.type)return null;var ye=ne.type.isSelectOptGroup,Pe=ne.key,xe=ne.props,Ie=xe.children,Me=Object(G.a)(xe,["children"]);return X||!ye?L(ne):Object(w.a)(Object(w.a)({key:"__RC_SELECT_GRP__".concat(Pe===null?fe:Pe,"__"),label:Pe},Me),{},{options:_(Ie)})}).filter(function(ne){return ne})}var b=B("2Qr1"),g=B("qNPg"),h=B("U8pU"),C=B("Kwbf"),x=B("WKfj");function m(A){var X=A.mode,ne=A.options,fe=A.children,ye=A.backfill,Pe=A.allowClear,xe=A.placeholder,Ie=A.getInputElement,Me=A.showSearch,ke=A.onSearch,Ee=A.defaultOpen,J=A.autoFocus,I=A.labelInValue,U=A.value,K=A.inputValue,q=A.optionLabelProp,V=X==="multiple"||X==="tags",ue=Me!==void 0?Me:V||X==="combobox",Ae=ne||_(fe);if(Object(C.a)(X!=="tags"||Ae.every(function(Te){return!Te.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),X==="tags"||X==="combobox"){var Ue=Ae.some(function(Te){return Te.options?Te.options.some(function(Oe){return typeof("value"in Oe?Oe.value:Oe.key)=="number"}):typeof("value"in Te?Te.value:Te.key)=="number"});Object(C.a)(!Ue,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)(X!=="combobox"||!q,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)(X==="combobox"||!ye,"`backfill` only works with `combobox` mode."),Object(C.a)(X==="combobox"||!Ie,"`getInputElement` only work with `combobox` mode."),Object(C.b)(X!=="combobox"||!Ie||!Pe||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ke&&!ue&&X!=="combobox"&&X!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!Ee||J,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),U!=null){var ce=Object(x.d)(U);Object(C.a)(!I||ce.every(function(Te){return Object(h.a)(Te)==="object"&&("key"in Te||"value"in Te)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!V||Array.isArray(U),"`value` should be array when `mode` is `multiple` or `tags`")}if(fe){var ge=null;Object(M.a)(fe).some(function(Te){if(!W.isValidElement(Te)||!Te.type)return!1;var Oe=Te.type;if(Oe.isSelectOption)return!1;if(Oe.isSelectOptGroup){var Xe=Object(M.a)(Te.props.children).every(function(rt){return!W.isValidElement(rt)||!Te.type||rt.type.isSelectOption?!0:(ge=rt.type,!1)});return!Xe}return ge=Oe,!0}),ge&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ge.displayName||ge.name||ge,"`.")),Object(C.a)(K===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var P=m,k=Object(g.a)({prefixCls:"rc-select",components:{optionList:l},convertChildrenToData:_,flattenOptions:b.d,getLabeledValue:b.e,filterOptions:b.b,isValueDisabled:b.g,findValueOption:b.c,warningProps:P,fillOptionsWithMissingValue:b.a}),y=function(A){Object(N.a)(ne,A);var X=Object(Y.a)(ne);function ne(){var fe;return Object(Z.a)(this,ne),fe=X.apply(this,arguments),fe.selectRef=W.createRef(),fe.focus=function(){fe.selectRef.current.focus()},fe.blur=function(){fe.selectRef.current.blur()},fe}return Object(z.a)(ne,[{key:"render",value:function(){return W.createElement(k,Object.assign({ref:this.selectRef},this.props))}}]),ne}(W.Component);y.Option=i,y.OptGroup=O;var S=y,F=he.c=S},M8RZ:function(Be,he,B){"use strict";B.d(he,"a",function(){return n});var Z=B("fWQN"),z=B("mtLc"),N=B("yKVA"),Y=B("879j"),W=B("q1tI"),D=B.n(W),G=B("i8i4"),j=B.n(G),n=function(T){Object(N.a)(f,T);var v=Object(Y.a)(f);function f(p){var c;Object(Z.a)(this,f),c=v.call(this,p);var s=window.document;return c.node=s.createElement("div"),s.body.appendChild(c.node),c}return Object(z.a)(f,[{key:"render",value:function(){var c=this.props.children;return Object(G.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),f}(D.a.Component)},MI8n:function(Be,he,B){"use strict";B.d(he,"c",function(){return W}),B.d(he,"b",function(){return n}),B.d(he,"e",function(){return T}),B.d(he,"a",function(){return v}),B.d(he,"d",function(){return f}),B.d(he,"f",function(){return p});var Z=B("/cxE"),z=B("pmY6"),N=B("24hK"),Y=B("5Y4S"),W;(function(c){c.None=()=>z.a.None;function s(m){return(P,k=null,y)=>{let S=!1,F;return F=m(A=>S?void 0:(F?F.dispose():S=!0,P.call(k,A)),null,y),S&&F.dispose(),F}}c.once=s;function d(m,P){return O((k,y=null,S)=>m(F=>k.call(y,P(F)),null,S))}c.map=d;function u(m,P){return O((k,y=null,S)=>m(F=>{P(F),k.call(y,F)},null,S))}c.forEach=u;function l(m,P){return O((k,y=null,S)=>m(F=>P(F)&&k.call(y,F),null,S))}c.filter=l;function a(m){return m}c.signal=a;function i(...m){return(P,k=null,y)=>Object(z.e)(...m.map(S=>S(F=>P.call(k,F),null,y)))}c.any=i;function R(m,P,k){let y=k;return d(m,S=>(y=P(y,S),y))}c.reduce=R;function O(m){let P;const k=new n({onFirstListenerAdd(){P=m(k.fire,k)},onLastListenerRemove(){P.dispose()}});return k.event}function w(m,P,k=100,y=!1,S){let F,A,X,ne=0;const fe=new n({leakWarningThreshold:S,onFirstListenerAdd(){F=m(ye=>{ne++,A=P(A,ye),y&&!X&&(fe.fire(A),A=void 0),clearTimeout(X),X=setTimeout(()=>{const Pe=A;A=void 0,X=void 0,(!y||ne>1)&&fe.fire(Pe),ne=0},k)})},onLastListenerRemove(){F.dispose()}});return fe.event}c.debounce=w;function M(m,P=(k,y)=>k===y){let k=!0,y;return l(m,S=>{const F=k||!P(S,y);return k=!1,y=S,F})}c.latch=M;function L(m,P){return[c.filter(m,P),c.filter(m,k=>!P(k))]}c.split=L;function _(m,P=!1,k=[]){let y=k.slice(),S=m(X=>{y?y.push(X):A.fire(X)});const F=()=>{y&&y.forEach(X=>A.fire(X)),y=null},A=new n({onFirstListenerAdd(){S||(S=m(X=>A.fire(X)))},onFirstListenerDidAdd(){y&&(P?setTimeout(F):F())},onLastListenerRemove(){S&&S.dispose(),S=null}});return A.event}c.buffer=_;class b{constructor(m){this.event=m}map(m){return new b(d(this.event,m))}forEach(m){return new b(u(this.event,m))}filter(m){return new b(l(this.event,m))}reduce(m,P){return new b(R(this.event,m,P))}latch(){return new b(M(this.event))}debounce(m,P=100,k=!1,y){return new b(w(this.event,m,P,k,y))}on(m,P,k){return this.event(m,P,k)}once(m,P,k){return s(this.event)(m,P,k)}}function g(m){return new b(m)}c.chain=g;function h(m,P,k=y=>y){const y=(...X)=>A.fire(k(...X)),S=()=>m.on(P,y),F=()=>m.removeListener(P,y),A=new n({onFirstListenerAdd:S,onLastListenerRemove:F});return A.event}c.fromNodeEventEmitter=h;function C(m,P,k=y=>y){const y=(...X)=>A.fire(k(...X)),S=()=>m.addEventListener(P,y),F=()=>m.removeEventListener(P,y),A=new n({onFirstListenerAdd:S,onLastListenerRemove:F});return A.event}c.fromDOMEventEmitter=C;function x(m){return new Promise(P=>s(m)(P))}c.toPromise=x})(W||(W={}));class D{constructor(c){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${c}_${D._idPool++}`}start(c){this._stopWatch=new Y.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}}}D._idPool=0;let G=-1;class j{constructor(c,s=Math.random().toString(18).slice(2,5)){this.customThreshold=c,this.name=s,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(c){let s=G;if(typeof this.customThreshold=="number"&&(s=this.customThreshold),s<=0||c<s)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=s*.5;let l,a=0;for(const[i,R]of this._stacks)(!l||a<R)&&(l=i,a=R);console.warn(`[${this.name}] potential listener LEAK detected, having ${c} listeners already. MOST frequent listener (${a}):`),console.warn(l)}return()=>{const l=this._stacks.get(d)||0;this._stacks.set(d,l-1)}}}class n{constructor(c){var s;this._disposed=!1,this._options=c,this._leakageMon=G>0?new j(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((s=this._options)===null||s===void 0?void 0:s._profName)?new D(this._options._profName):void 0}get event(){return this._event||(this._event=(c,s,d)=>{var u;this._listeners||(this._listeners=new N.a);const l=this._listeners.isEmpty();l&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(s?[c,s]:c);l&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,c,s);const i=(u=this._leakageMon)===null||u===void 0?void 0:u.check(this._listeners.size),R=Object(z.i)(()=>{if(i&&i(),!this._disposed&&(a(),this._options&&this._options.onLastListenerRemove)){const O=this._listeners&&!this._listeners.isEmpty();O||this._options.onLastListenerRemove(this)}});return d instanceof z.b?d.add(R):Array.isArray(d)&&d.push(R),R}),this._event}fire(c){var s,d;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new N.a);for(let u of this._listeners)this._deliveryQueue.push([u,c]);for((s=this._perfMon)===null||s===void 0||s.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[u,l]=this._deliveryQueue.shift();try{typeof u=="function"?u.call(void 0,l):u[0].call(u[1],l)}catch(a){Object(Z.f)(a)}}(d=this._perfMon)===null||d===void 0||d.stop()}}dispose(){var c,s,d,u,l;this._disposed||(this._disposed=!0,(c=this._listeners)===null||c===void 0||c.clear(),(s=this._deliveryQueue)===null||s===void 0||s.clear(),(u=(d=this._options)===null||d===void 0?void 0:d.onLastListenerRemove)===null||u===void 0||u.call(d),(l=this._leakageMon)===null||l===void 0||l.dispose())}}class T extends n{constructor(c){super(c);this._isPaused=0,this._eventQueue=new N.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 v extends T{constructor(c){var s;super(c);this._delay=(s=c.delay)!==null&&s!==void 0?s: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(s,d,u)=>c(l=>{const a=this.buffers[this.buffers.length-1];a?a.push(()=>s.call(d,l)):s.call(d,l)},void 0,u)}bufferEvents(c){const s=[];this.buffers.push(s);const d=c();return this.buffers.pop(),s.forEach(u=>u()),d}}class p{constructor(){this.listening=!1,this.inputEvent=W.None,this.inputEventListener=z.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(Be,he,B){"use strict";(function(Z,z){B.d(he,"b",function(){return d}),B.d(he,"i",function(){return i}),B.d(he,"f",function(){return R}),B.d(he,"d",function(){return O}),B.d(he,"g",function(){return w}),B.d(he,"h",function(){return M}),B.d(he,"c",function(){return L}),B.d(he,"k",function(){return _}),B.d(he,"j",function(){return b}),B.d(he,"a",function(){return g}),B.d(he,"e",function(){return x});var N;const Y="en";let W=!1,D=!1,G=!1,j=!1,n=!1,T=!1,v=!1,f,p=Y,c,s;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 z!="undefined"&&(u=z);const l=typeof((N=u==null?void 0:u.versions)===null||N===void 0?void 0:N.electron)=="string"&&u.type==="renderer";if(typeof navigator=="object"&&!l)s=navigator.userAgent,W=s.indexOf("Windows")>=0,D=s.indexOf("Macintosh")>=0,v=(s.indexOf("Macintosh")>=0||s.indexOf("iPad")>=0||s.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,G=s.indexOf("Linux")>=0,T=!0,f=navigator.language,p=f;else if(typeof u=="object"){W=u.platform==="win32",D=u.platform==="darwin",G=u.platform==="linux",j=G&&!!u.env.SNAP&&!!u.env.SNAP_REVISION,f=Y,p=Y;const m=u.env.VSCODE_NLS_CONFIG;if(m)try{const P=JSON.parse(m),k=P.availableLanguages["*"];f=P.locale,p=k||Y,c=P._translationsConfigFile}catch(P){}n=!0}else console.error("Unable to resolve platform.");let a=0;D?a=1:W?a=3:G&&(a=2);const i=W,R=D,O=G,w=n,M=T,L=v,_=s,b=function(){if(d.setImmediate)return d.setImmediate.bind(d);if(typeof d.postMessage=="function"&&!d.importScripts){let k=[];d.addEventListener("message",S=>{if(S.data&&S.data.vscodeSetImmediateId)for(let F=0,A=k.length;F<A;F++){const X=k[F];if(X.id===S.data.vscodeSetImmediateId){k.splice(F,1),X.callback();return}}});let y=0;return S=>{const F=++y;k.push({id:F,callback:S}),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)}(),g=D||v?2:W?1:3;let h=!0,C=!1;function x(){if(!C){C=!0;const m=new Uint8Array(2);m[0]=1,m[1]=2;const P=new Uint16Array(m.buffer);h=P[0]===(2<<8)+1}return h}}).call(this,B("IyRk"),B("Q2Ig"))},MvOs:function(Be,he,B){"use strict";B.r(he);var Z=B("/zsF"),z=B("PArb"),N=B("sPJy"),Y=B("bE4q"),W=B("+L6B"),D=B("2/Rp"),G=B("14J3"),j=B("BMrR"),n=B("jCWc"),T=B("kPKH"),v=B("5Dmo"),f=B("3S7+"),p=B("sRBo"),c=B("kaz8"),s=B("T2oS"),d=B("W9HT"),u=B("7Kak"),l=B("9yH6"),a=B("MXD1"),i=B("CFYs"),R=B("miYZ"),O=B("tsqr"),w=B("k1fw"),M=B("9og8"),L=B("2qtc"),_=B("kLXV"),b=B("tJVT"),g=B("PpiC"),h=B("5NDa"),C=B("5rEg"),x=B("aHsQ"),m=B("sGsY"),P=B("WmNS"),k=B.n(P),y=B("q1tI"),S=B.n(y),F=B("Ty5D"),A=B("55Ip"),X=B("9kvl"),ne=B("D1Df"),fe=B.n(ne),ye=B("Icgb"),Pe=B("gUdW"),xe=B("xGfz"),Ie=B("jhfD"),Me=B("Llu2"),ke=B("BlwA"),Ee=B("bPs0"),J=B("wd/R"),I=B.n(J),U=B("V5fa"),K=B.n(U),q=B("1vsH"),V=B("s8TD"),ue=B("xKgJ"),Ae=B("bntm"),Ue=B("V0Rq"),ce=B("HBuW"),ge=B("9Bee"),Te=B("Ot1p"),Oe=function(je){var Ve,$e,it,ut,et=je.item,Dt=je.answerData,Xt=je.isEducation,gt=je.onBlur,Ct=gt===void 0?function(){}:gt,Mt=Object(y.useRef)(""),St=Object(y.useState)(),kt=Object(b.a)(St,2),Wt=kt[0],dn=kt[1],$t=Object(y.useState)(!1),ot=Object(b.a)($t,2),Pt=ot[0],Ht=ot[1],zt=Object(y.useState)(Xt||!1),Vt=Object(b.a)(zt,2),nn=Vt[0],rn=Vt[1],Lt=Object(y.useRef)(),En=function(){clearInterval(Lt.current),Lt.current=setInterval(function(){Pt&&Ct(Mt.current)},10*1e3)},ct=function(pn){Ct(Mt.current);var Hn="\u786E\u5B9A\u79BB\u5F00\u6B64\u9875\u9762\u5417?\u6B64\u9875\u6570\u636E\u53EF\u80FD\u4F1A\u4E22\u5931";return(pn||window.event).returnValue=Hn,Hn};return Object(y.useEffect)(function(){console.log("isFocus:",Pt),Pt&&En()},[Pt]),Object(y.useEffect)(function(){dn(et==null?void 0:et.a_flag)},[et==null?void 0:et.a_flag]),Object(y.useEffect)(function(){return function(){clearInterval(Lt.current)}},[]),S.a.createElement("div",null,(Dt==null||((Ve=Dt.exercise)===null||Ve===void 0)?void 0:Ve.user_exercise_status)===1?S.a.createElement("div",null,S.a.createElement("p",{className:"mt10 mb0"},"\u6211\u7684\u7B54\u6848\uFF1A"),S.a.createElement("div",{className:K.a.simpleText},S.a.createElement(ge.a,{value:et==null||(($e=et.user_answer)===null||$e===void 0)?void 0:$e[0]}))):S.a.createElement("div",{className:et.user_score&&(et.user_score===et.question_score?"c-green":"c-red")},nn?S.a.createElement(Te.a,{watch:!0,isFocus:!0,defaultValue:et==null||((it=et.user_answer)===null||it===void 0)?void 0:it[0],id:et==null?void 0:et.question_id,onChange:function(pn){Mt.current=pn,Ht(!0)},onBlur:function(){Ct(Mt.current),clearInterval(Lt.current),Ht(!1)}}):S.a.createElement("div",{onClick:function(){var pn;if(!et.repeat_answer&&(et==null||((pn=et.user_answer)===null||pn===void 0)?void 0:pn.length)>0&&!et.israp)return;rn(!0)},className:K.a.startAnswer},S.a.createElement("div",{className:"c-blue"},"\u70B9\u51FB\u5F00\u59CB\u4F5C\u7B54"))),Object(ue.t)()&&(et==null?void 0:et.standard_answer)&&S.a.createElement("div",null,S.a.createElement("p",{className:"mt10 mb0"},"\u53C2\u8003\u7B54\u6848\uFF1A"),S.a.createElement("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5}},S.a.createElement(ge.a,{value:et==null||((ut=et.standard_answer)===null||ut===void 0)?void 0:ut[0]}))))},Xe=Oe,rt=B("OaEy"),st=B("2fM7"),nt=function(je){var Ve,$e,it,ut,et=je.item,Dt=je.answerData,Xt=je.isEducation,gt=je.onBlur,Ct=gt===void 0?function(){}:gt,Mt=Object(y.useRef)(""),St=Object(y.useState)(),kt=Object(b.a)(St,2),Wt=kt[0],dn=kt[1],$t=Object(y.useState)(!1),ot=Object(b.a)($t,2),Pt=ot[0],Ht=ot[1],zt=Object(y.useState)(!1),Vt=Object(b.a)(zt,2),nn=Vt[0],rn=Vt[1],Lt=Object(y.useState)(Xt||!1),En=Object(b.a)(Lt,2),ct=En[0],wn=En[1],pn=Object(y.useState)(0),Hn=Object(b.a)(pn,2),Mn=Hn[0],Dn=Hn[1],Un=Object(y.useRef)(et.kp_content||""),kn=Object(y.useRef)(et.kp_clazz),Pn=Object(y.useRef)(),Sn=Object(y.useMemo)(function(){var In,_n;return(In=Mt.current)===null||In===void 0||((_n=In.replace(/[\n|\r|\t]/g,""))===null||_n===void 0)?void 0:_n.length},[Mt.current]),br=function(){clearInterval(Pn.current),Pn.current=setInterval(function(){nn&&Ct(Mt.current,Un.current,kn.current)},30*1e3)};return Object(y.useEffect)(function(){console.log("isFocus:",nn),br()},[nn]),Object(y.useEffect)(function(){dn(et==null?void 0:et.a_flag)},[et==null?void 0:et.a_flag]),Object(y.useEffect)(function(){return function(){clearInterval(Pn.current)}},[]),S.a.createElement("div",null,(Dt==null||((Ve=Dt.exercise)===null||Ve===void 0)?void 0:Ve.user_exercise_status)===1?S.a.createElement("div",null,S.a.createElement("div",{className:"mt30"},S.a.createElement("strong",null,"\u4F5C\u6587\u9898\u76EE\uFF1A"),S.a.createElement("br",null),S.a.createElement(C.a,{disabled:!0,className:"mt10",value:Un.current,onChange:function(_n){Un.current=_n.target.value,Dn(Mn+1)},onBlur:function(){Ct(Mt.current,Un.current,kn.current),rn(!1)}})),S.a.createElement("div",{className:"mt30"},S.a.createElement("strong",null,"\u4F5C\u54C1\u7C7B\u578B\uFF1A"),S.a.createElement("br",null),S.a.createElement(st.a,{disabled:!0,className:"mt10 w100",placeholder:"\u8BF7\u9009\u62E9\u4F5C\u54C1\u7C7B\u578B",value:kn.current,onChange:function(_n){kn.current=_n,Dn(Mn+1)},onBlur:function(){Ct(Mt.current,Un.current,kn.current),rn(!1)}},S.a.createElement(st.a.Option,{key:1,value:"\u79D1\u666E"},"\u79D1\u666E"),S.a.createElement(st.a.Option,{key:2,value:"\u79D1\u5E7B"},"\u79D1\u5E7B"))),S.a.createElement("p",{className:"mt10 mb0"},"\u4F5C\u54C1\u5185\u5BB9\uFF1A"),S.a.createElement("div",{className:K.a.simpleText},S.a.createElement(ge.a,{value:et==null||(($e=et.user_answer)===null||$e===void 0)?void 0:$e[0]}))):S.a.createElement("div",null,S.a.createElement("div",{className:"mt30"},S.a.createElement("strong",null,"\u4F5C\u6587\u9898\u76EE\uFF1A"),S.a.createElement("br",null),S.a.createElement(C.a,{className:"mt10",maxLength:60,onBlur:function(){return Ct(Mt.current,Un.current,kn.current)},placeholder:"\u8BF7\u8F93\u5165\u4F5C\u6587\u9898\u76EE(\u6700\u591A60\u4E2A\u5B57)",value:Un.current,onChange:function(_n){Un.current=_n.target.value,Dn(Mn+1)}})),S.a.createElement("div",{className:"mt30"},S.a.createElement("strong",null,"\u4F5C\u6587\u7C7B\u578B\uFF1A"),S.a.createElement("br",null),S.a.createElement(st.a,{className:"mt10 w100",placeholder:"\u8BF7\u9009\u62E9\u4F5C\u54C1\u7C7B\u578B",value:kn.current,onChange:function(_n){kn.current=_n,Ct(_n.current,Un.current,kn.current),Dn(Mn+1)}},S.a.createElement(st.a.Option,{key:1,value:"\u79D1\u666E"},"\u79D1\u666E"),S.a.createElement(st.a.Option,{key:2,value:"\u79D1\u5E7B"},"\u79D1\u5E7B"))),S.a.createElement("div",{className:"mt30 mb20"},S.a.createElement("div",{className:et.user_score&&(et.user_score===et.question_score?"c-green":"c-red")},S.a.createElement("strong",null,"\u4F5C\u6587\u5185\u5BB9\uFF1A"),S.a.createElement("br",null),S.a.createElement("div",{className:"mt10 relative"},S.a.createElement("span",{className:"c-blue",style:{position:Pt?"fixed":"absolute",top:Pt?61:4,left:10,zIndex:106}},"\u5DF2\u8F93\u5165",Sn,"\u5B57"),ct?S.a.createElement(Te.a,{className:K.a.simpleMd,disablePaste:!0,hidetoolBar:Xt,height:Xt?"60vh":150,isFocus:!0,defaultValue:et==null||((it=et.user_answer)===null||it===void 0)?void 0:it[0],id:et==null?void 0:et.question_id,onFullScreen:function(_n){return Ht(_n)},onChange:function(_n){Mt.current=_n,rn(!0),Dn(Mn+1)},onBlur:function(){Ct(Mt.current,Un.current,kn.current),rn(!1)}}):S.a.createElement("div",{onClick:function(){return wn(!0)},className:K.a.startAnswer},S.a.createElement("div",{className:"c-blue"},"\u70B9\u51FB\u5F00\u59CB\u4F5C\u7B54")))))),Object(ue.t)()&&(et==null?void 0:et.standard_answer)&&S.a.createElement("div",null,S.a.createElement("p",{className:"mt10 mb0"},"\u53C2\u8003\u7B54\u6848\uFF1A"),S.a.createElement("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5}},S.a.createElement(ge.a,{value:et==null||((ut=et.standard_answer)===null||ut===void 0)?void 0:ut[0]}))))},bt=nt,yt=B("g9YV"),Ne=B("wCAj"),Re=B("5GOC"),Je=B("JsLm"),tt=B("ZW9T"),le=B("o5mm"),$=B.n(le),te=function(je){var Ve,$e,it,ut,et=je.item,Dt=je.answerData,Xt=Object(y.useState)([]),gt=Object(b.a)(Xt,2),Ct=gt[0],Mt=gt[1],St=Object(y.useState)([]),kt=Object(b.a)(St,2),Wt=kt[0],dn=kt[1];Object(y.useEffect)(function(){var Ht;if(!(et!=null&&(Ht=et.shixun_details)!==null&&Ht!==void 0&&Ht.length))return;for(var zt=[],Vt=[],nn=0;nn<(et==null||((rn=et.shixun_details)===null||rn===void 0)?void 0:rn.length);nn++){for(var rn,Lt,En,ct=0;ct<(et==null?void 0:et.shixun_details[nn].stage_list.length);ct++){var wn,pn,Hn,Mn,Dn=et==null?void 0:et.shixun_details[nn].stage_list[ct];zt.push(Object(w.a)(Object(w.a)({},Dn),{operation:et==null||((wn=et.shixun_details)===null||wn===void 0||((pn=wn[nn])===null||pn===void 0||((Hn=pn.shixun_detail)===null||Hn===void 0||((Mn=Hn[0])===null||Mn===void 0))))?void 0:Mn.game_identifier}))}if(et!=null&&(Lt=et.shixun_details)!==null&&Lt!==void 0&&(En=Lt[nn])!==null&&En!==void 0&&En.shixun_detail){var Un,kn,Pn;Vt.push(et==null||((Un=et.shixun_details)===null||Un===void 0||((kn=Un[nn])===null||kn===void 0||((Pn=kn.shixun_detail)===null||Pn===void 0)))?void 0:Pn[0])}}dn(Vt),Mt(zt)},[et==null?void 0:et.shixun_details]);var $t=[{title:"\u5173\u5361",dataIndex:"position",key:"position",align:"center"},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",align:"center",render:function(zt){return S.a.createElement("span",{className:"overflowHidden1",style:{maxWidth:"400px"},title:zt&&zt.length>25?zt:""},zt)}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",key:"evaluate_count",align:"center",render:function(zt,Vt){return S.a.createElement("span",null,Vt.evaluate_count?Vt.evaluate_count:S.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u5B8C\u6210\u65F6\u95F4",key:"endTime",dataIndex:"endTime",align:"center",render:function(zt,Vt){var nn=!1;return Vt.finished_time&&Dt!==null&&Dt!==void 0&&Dt.exercise&&Dt!==null&&Dt!==void 0&&Dt.exercise_answer_user&&((Dt==null?void 0:Dt.exercise.time)===-1?nn=I()(Dt==null?void 0:Dt.exercise.end_time).isBefore(Vt.finished_time):nn=I()(Dt==null?void 0:Dt.exercise_answer_user.start_at).add(Dt==null?void 0:Dt.exercise.time,"m").isBefore(Vt.finished_time)),S.a.createElement("span",null,Vt.finished_time||S.a.createElement("span",{className:"c-grey-999"},"--"),S.a.createElement("span",{className:"c-orange-ff9 "},nn?"\uFF08\u5DF2\u8D85\u65F6\uFF09":""))}},{title:"\u8017\u65F6",dataIndex:"time_consuming",key:"time_consuming",align:"center",render:function(zt,Vt){return S.a.createElement("span",null,Vt.time_consuming||S.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",key:"view_answer",align:"center",render:function(zt,Vt){return S.a.createElement("span",null,Vt.view_answer?"\u5DF2\u67E5\u770B":"\u672A\u67E5\u770B")}},{title:"\u64CD\u4F5C",dataIndex:"operation",key:"operation",align:"center",render:function(zt,Vt,nn){return zt?S.a.createElement(Je.a,{affix:!1,className:"mt10"},S.a.createElement(Je.a.Link,{href:"#challenge_".concat(et==null?void 0:et.question_id).concat(nn),title:S.a.createElement("span",{style:{color:"#0152d9"}},"\u67E5\u770B")})):S.a.createElement("span",{className:"c-grey-999"},"--")}}],ot=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(zt,Vt){return S.a.createElement("span",null,Vt.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(zt,Vt){return S.a.createElement("span",null,Vt.error_msg?Vt.error_msg:"--")}}],Pt={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return S.a.createElement("div",{className:"mt15 mb15"},S.a.createElement("div",null,et==null||((Ve=et.shixun)===null||Ve===void 0)?void 0:Ve.map(function(Ht,zt){return S.a.createElement(j.a,{className:"font16",gutter:[0,20]},S.a.createElement(T.a,{flex:"1"},Ht.challenge_name," (",Ht.challenge_score,"\u5206)"),S.a.createElement(T.a,{flex:"100px",className:"tr"},!Ht.answer_status&&S.a.createElement("span",{className:"font12 tag-style-border border-orange c-orange "},"\u672A\u5B8C\u6210"),!!Ht.answer_status&&S.a.createElement("span",{className:"font12 tag-style-border border-green c-green "},"\u5DF2\u5B8C\u6210")))})),(Dt==null||(($e=Dt.exercise)===null||$e===void 0)?void 0:$e.student_commit_status)!==0||(Dt==null||((it=Dt.exercise)===null||it===void 0)?void 0:it.user_exercise_status)!==0?S.a.createElement(S.a.Fragment,null,!!(Ct!=null&&Ct.length)&&S.a.createElement("div",null,S.a.createElement("p",{className:"font16 c-grey-666"},"\u9636\u6BB5\u6210\u7EE9"),S.a.createElement(Ne.a,{columns:$t,dataSource:Ct,pagination:!1})),!!(Wt!=null&&Wt.length)&&S.a.createElement("div",null,S.a.createElement("p",{className:"font16 c-grey-666 mt10"},"\u5B9E\u8BAD\u8BE6\u60C5"),Wt==null?void 0:Wt.map(function(Ht,zt){return S.a.createElement("div",{id:"challenge_".concat(et==null?void 0:et.question_id).concat(zt),className:"mt5"},S.a.createElement("div",null,S.a.createElement("span",{className:"font16 mr15"}," ","\u7B2C",Ht.position,"\u5173"),S.a.createElement(A.a,{className:"current c-black font16",to:"/tasks/".concat(Ht.game_identifier)},Ht.name)),(Ht==null?void 0:Ht.st)===0&&Ht.passed_code&&S.a.createElement("aside",{className:$.a.shixunWrp},S.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",S.a.createElement("span",{className:"c-light-black"},Ht.path)),S.a.createElement(tt.b,{height:300,language:"python",theme:"default",value:Ht.passed_code,options:Pt})))}))):S.a.createElement(S.a.Fragment,null,Object(ue.t)()&&S.a.createElement(ge.a,{className:"c-grey-999 mt20 mb20",value:et==null?void 0:et.question_title}),et==null||((ut=et.shixun)===null||ut===void 0)?void 0:ut.map(function(Ht,zt){return S.a.createElement("p",{className:"font16 c-grey-666 mb5",key:zt},S.a.createElement("span",{className:"mr20"},"\u7B2C",Ht==null?void 0:Ht.challenge_position,"\u5173 ",Ht==null?void 0:Ht.challenge_name),S.a.createElement("span",null,Ht==null?void 0:Ht.challenge_score,"\u5206"))})))},ae=te,de=B("J66h"),ie=function(je){var Ve=je.item,$e=je.answerData,it=Object(y.useState)([]),ut=Object(b.a)(it,2),et=ut[0],Dt=ut[1];Object(y.useEffect)(function(){var Ct;if((Ve==null||((Ct=Ve.evaluate_codes)===null||Ct===void 0)?void 0:Ct.length)>0){var Mt;Dt(Ve==null||((Mt=Ve.evaluate_codes)===null||Mt===void 0)?void 0:Mt.map(function(St,kt){return{key:kt+1,error_msg:St!=null&&St.error_msg?de.Base64.decode(St==null?void 0:St.error_msg):""}}))}else Dt([{key:"--",error_msg:"--"}])},[Ve==null?void 0:Ve.evaluate_codes]);var Xt=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(Mt,St){return S.a.createElement("span",null,St.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(Mt,St){return S.a.createElement("span",null,St.error_msg?St.error_msg:"--")}}],gt={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return S.a.createElement(S.a.Fragment,null,S.a.createElement("div",{className:"mt15 mb15"},S.a.createElement(ge.a,{value:Ve==null?void 0:Ve.description})),(Ve==null?void 0:Ve.passed_code)&&S.a.createElement("aside",{className:$.a.shixunWrp},S.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"),S.a.createElement(tt.b,{style:{border:"1px solid #ccc"},height:300,language:"python",theme:"vs-light",value:Ve!=null&&Ve.passed_code?de.Base64.decode(Ve==null?void 0:Ve.passed_code):"",options:gt})))},se=ie,pe=B("oBTY"),be=C.a.TextArea,_e=function(je){var Ve,$e,it=je.item,ut=je.answerData,et=je.onBlur,Dt=et===void 0?function(){}:et,Xt=Object(y.useState)([]),gt=Object(b.a)(Xt,2),Ct=gt[0],Mt=gt[1],St=Object(y.useState)(!1),kt=Object(b.a)(St,2),Wt=kt[0],dn=kt[1],$t=Object(y.useRef)(),ot=Object(y.useRef)(),Pt=Object(y.useRef)(),Ht=function(){clearInterval($t.current),$t.current=setInterval(function(){var Vt;ot.current>=0&&Dt((Vt=Pt.current[ot.current])===null||Vt===void 0?void 0:Vt.answer_text,ot.current+1,Pt.current)},5*1e3)};return Object(y.useEffect)(function(){for(var zt=[],Vt=function(Lt){var En,ct=(it==null||((En=it.user_answer)===null||En===void 0)?void 0:En.find(function(wn){return wn.choice_id===Lt+1}))||{choice_id:Lt+1,answer_text:""};zt.push(Object(w.a)({},ct))},nn=0;nn<(it==null?void 0:it.multi_count);nn++)Vt(nn);Pt.current=zt,Mt(zt)},[it==null?void 0:it.user_answer]),Object(y.useEffect)(function(){return Ht(),function(){window.clearInterval($t.current)}},[]),S.a.createElement("div",null,Ct==null?void 0:Ct.map(function(zt,Vt){var nn,rn;return S.a.createElement("div",{className:"mt10"},S.a.createElement("span",null,"\u6211\u7684\u7B54\u6848\uFF08\u586B\u7A7A",Vt+1,"\uFF09:"),S.a.createElement("div",null,S.a.createElement(be,{autoSize:!0,rows:4,disabled:!it.repeat_answer&&(it==null||((nn=it.user_answer)===null||nn===void 0)?void 0:nn.length)>0&&!it.israp||(ut==null||((rn=ut.exercise)===null||rn===void 0)?void 0:rn.user_exercise_status)===1,value:zt==null?void 0:zt.answer_text,onFocus:function(){return ot.current=Vt},onChange:function(En){Ct[Vt].answer_text=En.target.value,Mt(Object(pe.a)(Ct))},onBlur:function(En){Dt(zt==null?void 0:zt.answer_text,Vt+1,Ct),ot.current=null},className:"overflow_hidden ".concat(it.user_score&&(it.user_score===it.question_score?"c-green":"c-red"))})))}),!!(it!=null&&(Ve=it.standard_answer)!==null&&Ve!==void 0&&Ve.length)&&S.a.createElement("div",null,it==null||(($e=it.standard_answer)===null||$e===void 0)?void 0:$e.map(function(zt,Vt){return S.a.createElement("div",null,S.a.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF1A\uFF08\u586B\u7A7A",Vt+1,"\uFF09:"),S.a.createElement("div",null,S.a.createElement(be,{autoSize:!0,disabled:!0,value:zt==null?void 0:zt.answer_text[0]})))})))},Le=_e,Ye=B("lzim"),lt=C.a.TextArea,Et=function(je){var Ve=je.data;return S.a.createElement("div",{className:"tc mt80"},S.a.createElement("img",{width:"486",src:Ye.l})," ",S.a.createElement("br",null),Ve.status===-1&&S.a.createElement("div",{className:"c-grey-999 mt60"},"\u60A8\u7684IP\u4E0D\u5728\u8003\u8BD5\u5141\u8BB8\u7684\u8303\u56F4\u5185\uFF01"),Ve.status===-2&&S.a.createElement("div",{className:" c-grey-999 mt60"},"\u60A8\u5DF2\u7ED1\u5B9A\u5F53\u524D\u8003\u8BD5IP\u5730\u5740\uFF1A",S.a.createElement("span",{className:"c-red"},Ve.ip),"\u8BF7\u4F7F\u7528\u8BE5IP\u5730\u5740\u8FDB\u5165\u8003\u8BD5\u3002"),S.a.createElement(D.a,{className:"mt40 pl20 pr20",type:"primary"},S.a.createElement("a",{href:"/"},"\u56DE\u5230\u9996\u9875")))},vt=Et,ft=B("m3rI"),ze=B("LvDl"),Qe=m.a.Countdown,He=C.a.TextArea,me=["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"],we={0:"c-red-ee4",1:"c-green"},qe=["\u5355\u9009\u9898","\u591A\u9009\u9898","\u5224\u65AD\u9898","\u586B\u7A7A\u9898","\u7B80\u7B54\u9898","\u5B9E\u8BAD\u9898","\u7F16\u7A0B\u9898"],Ge=function(je){var Ve,$e,it,ut,et,Dt,Xt,gt,Ct,Mt,St,kt,Wt,dn,$t,ot,Pt,Ht,zt,Vt,nn,rn,Lt,En,ct,wn,pn,Hn,Mn,Dn,Un,kn,Pn,Sn,br,In,_n,or,di,Fr,Gn,Ar,hi,Cr,nr,Gr,fi,zr,Vr=je.globalSetting,pi=je.loading,Or=je.user,qr=je.exercise,$r=je.dispatch,hr=je.location,Qn=Object(g.a)(je,["globalSetting","loading","user","exercise","dispatch","location"]),Yt=Object(F.i)(),Rr=Object(y.useState)({}),Er=Object(b.a)(Rr,2),Ce=Er[0],On=Er[1],ei=Object(y.useState)({}),mi=Object(b.a)(ei,2),ln=mi[0],ti=mi[1],kr=Object(y.useState)({}),jr=Object(b.a)(kr,2),rr=jr[0],Ir=jr[1],ni=Object(y.useState)(!1),fr=Object(b.a)(ni,2),ri=fr[0],Dr=fr[1],pr=Object(y.useState)(!0),ii=Object(b.a)(pr,2),Bt=ii[0],Jt=ii[1],Kt=Object(y.useState)(!1),en=Object(b.a)(Kt,2),an=en[0],Tn=en[1],sn=Object(y.useState)(!1),Bn=Object(b.a)(sn,2),qn=Bn[0],tn=Bn[1],_r=Object(y.useState)(),yn=Object(b.a)(_r,2),Fn=yn[0],Yn=yn[1],mr=Object(y.useState)(0),ea=Object(b.a)(mr,2),xn=ea[0],mn=ea[1],gn=Object(y.useState)(""),lr=Object(b.a)(gn,2),ai=lr[0],Wr=lr[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],Pr=ms[1],ta=Object(y.useState)(!1),na=Object(b.a)(ta,2),gs=na[0],Nr=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),gr=Da[0],ji=Da[1],Ur=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),un=La[0],yi=La[1],Es=Object(y.useState)(0),aa=Object(b.a)(Es,2),vn=aa[0],bi=aa[1],Ma=Object(y.useState)(!1),Lr=Object(b.a)(Ma,2),_s=Lr[0],si=Lr[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],Yr=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 At;return document.body.scrollIntoView(),(At=Or.userInfo)!==null&&At!==void 0&&At.user_id&&(Object(ue.c)()?zn():Or.userInfo.login&&xi()),window.addEventListener("message",oa),function(){window.removeEventListener("message",oa),hr.pathname.indexOf("/detail")>-1&&Object(Ae.b)()}},[Yt.categoryId,Or.userInfo.login]),Object(y.useEffect)(function(){return gr&&$r({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 At;Ce!=null&&(At=Ce.question_status)!==null&&At!==void 0&&At.every(function(ve){return!!ve.ques_status&&gs&&(ln==null?void 0:ln.used_screen_num)<(ln==null?void 0:ln.screen_num)})&&setTimeout(function(){var ve;(ve=ia.current)===null||ve===void 0||ve.handlePhoto()},1300)},[Ce]),Object(y.useEffect)(function(){var At;if(clearTimeout(Oi.current),clearTimeout(Wi.current),Ce!=null&&(At=Ce.exercise)!==null&&At!==void 0&&At.left_time&&Object(ue.t)()){var ve,Ze;if((Ce==null||((ve=Ce.exercise)===null||ve===void 0)?void 0:ve.left_time)>1800){var Fe;Wi.current=setTimeout(function(){_.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670930\u5206\u949F",icon:S.a.createElement(ye.a,null),okText:"\u77E5\u9053\u4E86"})},((Ce==null||((Fe=Ce.exercise)===null||Fe===void 0)?void 0:Fe.left_time)-1800)*1e3)}if((Ce==null||((Ze=Ce.exercise)===null||Ze===void 0)?void 0:Ze.left_time)>900){var _t;Oi.current=setTimeout(function(){_.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670915\u5206\u949F",icon:S.a.createElement(ye.a,null),okText:"\u77E5\u9053\u4E86"})},((Ce==null||((_t=Ce.exercise)===null||_t===void 0)?void 0:_t.left_time)-900)*1e3)}}},[Ce==null||((Ve=Ce.exercise)===null||Ve===void 0)?void 0:Ve.left_time]);var Ba=function(){var ve;(ve=qr.exerciseUserInfo)!==null&&ve!==void 0&&ve.screen_open&&window.navigator.sendBeacon("".concat(ft.a.API_SERVER,"/api/exercises/").concat(Yt.categoryId,"/commit_screen_at.json"),{})},oa=function(ve){ve.data==="backExercise"&&_i()},_i=function(){Fi("none"),Wr(""),zn()},xi=function(){var At=Object(M.a)(k.a.mark(function ve(){var Ze,Fe,_t,ht,Ot,Ft,Tt,Qt,Nt,wt,hn;return k.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,$r({type:"exercise/getExerciseUserInfo",payload:Object(w.a)({},Yt)});case 2:if(Fe=qt.sent,ti(Object(w.a)({},Fe.data)),!((Fe==null||((Ze=Fe.data)===null||Ze===void 0)?void 0:Ze.ip_limit)!=="no")){qt.next=11;break}if(!((Fe==null||((_t=Fe.data)===null||_t===void 0)?void 0:_t.ip_limit)==="inner")){qt.next=9;break}return qt.next=8,Object(V.a)({ip_limit:Fe==null||((ht=Fe.data)===null||ht===void 0)?void 0:ht.ip_limit});case 8:Ft=qt.sent;case 9:return qt.next=11,Object(q.s)({exerciseId:Yt.categoryId,ip:Ft,errmsgHide:!0,ip_limit:Fe==null||((Ot=Fe.data)===null||Ot===void 0)?void 0:Ot.ip_limit}).catch(function(bn){Pr(bn)});case 11:if(!((Fe==null?void 0:Fe.status)==0)){qt.next=18;break}if(!((Fe==null||((Tt=Fe.data)===null||Tt===void 0)?void 0:Tt.used_screen_num)>(Fe==null||((Qt=Fe.data)===null||Qt===void 0)?void 0:Qt.screen_num)&&Fe!==null&&Fe!==void 0&&(Nt=Fe.data)!==null&&Nt!==void 0&&Nt.screen_open)){qt.next=15;break}return Xr(),qt.abrupt("return",!1);case 15:Tn(Fe==null?void 0:Fe.data.check_camera),Fe!=null&&Fe.data.check_camera||tn(Fe==null||((wt=Fe.data)===null||wt===void 0)?void 0:wt.screen_open),Fe!=null&&(hn=Fe.data)!==null&&hn!==void 0&&hn.check_camera||zn();case 18:case"end":return qt.stop()}},ve)}));return function(){return At.apply(this,arguments)}}(),zn=function(){var At=Object(M.a)(k.a.mark(function ve(){var Ze,Fe,_t,ht,Ot,Ft,Tt,Qt,Nt,wt,hn,jn,qt,bn,cn,Nn,An,Br,za,Di,Va,Ya,Xa,Yi,ha,Xi,Qa,Qi,Ji,fa,pa,Zi,ma,Si,Ja,Li,ur,ga;return k.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:if(document.body.scrollIntoView(),Dr(!0),_t=(Ze=Or.userInfo)===null||Ze===void 0?void 0:Ze.user_id,!Object(ue.c)()){ir.next=11;break}return ir.next=6,Object(Ue.G)({exerciseId:Yt.categoryId,login:Yt.login}).catch(function(){return Dr(!1)});case 6:Fe=ir.sent,((ht=Fe)===null||ht===void 0?void 0:ht.exercise)&&(Fe.exercise.user_exercise_status=1),_t=(Ot=Fe)===null||Ot===void 0||((Ft=Ot.exercise_answer_user)===null||Ft===void 0)?void 0:Ft.user_id,ir.next=31;break;case 11:if(!(hr!=null&&(Tt=hr.query)!==null&&Tt!==void 0&&Tt.check)){ir.next=18;break}return ir.next=14,Object(Ue.z)(Object(w.a)({},Yt)).catch(function(){return Dr(!1)});case 14:Fe=ir.sent,_t=(Br=Fe)===null||Br===void 0||((za=Br.exercise)===null||za===void 0)?void 0:za.user_id,ir.next=25;break;case 18:return ir.next=20,Object(Ue.y)(Object(w.a)({},Yt)).catch(function(){return Dr(!1)});case 20:Fe=ir.sent,Fe.status===-1&&Hr(),((Di=Fe)===null||Di===void 0?void 0:Di.exercise)&&(Fe.exercise.user_exercise_status=0),((Va=Fe)===null||Va===void 0?void 0:Va.exercise)&&(Fe.exercise.exercise_status=2),(Ya=Fe)===null||Ya===void 0||((Xa=Ya.exercise_question_types)===null||Xa===void 0)||Xa.map(function(Cn){if((Cn==null?void 0:Cn.question_type)<3){var fn;Cn==null||((fn=Cn.items)===null||fn===void 0)||fn.map(function(ar){ar.user_answer=ar.question_choices.filter(function(vr){return vr.user_answer_boolean}).map(function(vr){return vr.choice_id})})}});case 25:if(!(!((Qt=Fe)!==null&&Qt!==void 0&&(Nt=Qt.exercise)!==null&&Nt!==void 0&&Nt.can_start)&&(wt=Fe)!==null&&wt!==void 0&&wt.exercise)){ir.next=28;break}return window.location.href="/classrooms/".concat(Yt.coursesId,"/exercise/").concat(Yt.categoryId,"/users/").concat(Yt.login,"/check"),ir.abrupt("return");case 28:if(((hn=Fe.exercise)===null||hn===void 0?void 0:hn.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(Cn){}(jn=Fe)!==null&&jn!==void 0&&(qt=jn.exercise)!==null&&qt!==void 0&&qt.left_time&&setTimeout(function(){fs(K.a.red)},(((Yi=Fe)===null||Yi===void 0||((ha=Yi.exercise)===null||ha===void 0)?void 0:ha.left_time)-300>0?((Xi=Fe)===null||Xi===void 0||((Qa=Xi.exercise)===null||Qa===void 0)?void 0:Qa.left_time)-300:0)*1e3),((bn=Fe)===null||bn===void 0||((cn=bn.exercise)===null||cn===void 0)?void 0:cn.take_photo)>=((Nn=Fe)===null||Nn===void 0||((An=Nn.exercise)===null||An===void 0)?void 0:An.photo_count);case 31:Dr(!1),Fe&&(((Qi=Fe)!==null&&Qi!==void 0&&(Ji=Qi.exercise)!==null&&Ji!==void 0&&Ji.question_random||(fa=Fe)!==null&&fa!==void 0&&(pa=fa.exercise)!==null&&pa!==void 0&&pa.choice_random)&&(ga=1,Fe.exercise.question_random=(Li=Fe)===null||Li===void 0||((ur=Li.exercise_question_types)===null||ur===void 0)?void 0:ur.map(function(Cn){var fn,ar,vr,Kr;return(fn=Fe)!==null&&fn!==void 0&&(ar=fn.exercise)!==null&&ar!==void 0&&ar.choice_random&&((Cn.question_type===0||Cn.question_type===1)&&Cn.items.map(function(Jr){return Jr.question_choices=Object(q.U)(Jr.question_choices,_t),Jr}),Cn.question_type===7&&Cn.items.forEach(function(Jr){Jr.sub_exercise_questions.forEach(function(va){va.question_choices=Object(q.U)(va.question_choices,_t)})})),(vr=Fe)!==null&&vr!==void 0&&(Kr=vr.exercise)!==null&&Kr!==void 0&&Kr.question_random&&(Cn.items=Object(q.U)(Cn.items,_t)),Cn.items.map(function(Jr){return Jr.question_num=ga,ga++,Jr}),Cn})),console.log("---",Fe),Fe.exercise_types=((Zi=Fe)===null||Zi===void 0?void 0:Zi.exercise_types)||((ma=Fe)===null||ma===void 0||((Si=ma.exercise_scores)===null||Si===void 0)?void 0:Si.exercise_types),Fe.question_status=Fe.question_status||oi(((Ja=Fe)===null||Ja===void 0?void 0:Ja.exercise_question_types)||[]),On(Fe));case 33:case"end":return ir.stop()}},ve)}));return function(){return At.apply(this,arguments)}}(),oi=function(ve){var Ze=[];return ve.forEach(function(Fe){Ze=Ze.concat(Fe.items)}),Ze=Ze.map(function(Fe){return{ques_status:Fe==null?void 0:Fe.ques_status,question_num:Fe==null?void 0:Fe.question_num,ques_id:Fe==null?void 0:Fe.question_id}}),Ze};Object(y.useEffect)(function(){var At,ve,Ze;((At=Ce.exercise)===null||At===void 0?void 0:At.left_time)===0&&Xr(),((ve=Ce.exercise)===null||ve===void 0?void 0:ve.left_time)&&Yn(Date.now()+(Ce==null||((Ze=Ce.exercise)===null||Ze===void 0)?void 0:Ze.left_time)*1e3)},[($e=Ce.exercise)===null||$e===void 0?void 0:$e.left_time]);var li=function(){var ve;(Ce==null||((ve=Ce.exercise)===null||ve===void 0)?void 0:ve.exercise_status)===3?_.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:S.a.createElement("div",{className:"tc font16"},"\u622A\u6B62\u65F6\u95F4\u5DF2\u5230\uFF0C\u65E0\u6CD5\u6253\u56DE\u8BD5\u5377",S.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:S.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",S.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u56DE\u9000TA\u7684\u8BD5\u5377\u7B54\u9898"),onOk:function(){var Ze=Object(M.a)(k.a.mark(function _t(){var ht,Ot;return k.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:return Tt.next=2,Object(Ue.S)({categoryId:Yt.categoryId,user_ids:[Ce==null||((ht=Ce.exercise_answer_user)===null||ht===void 0)?void 0:ht.user_id]});case 2:Ot=Tt.sent,Ot&&(O.b.info(Ot==null?void 0:Ot.message),Hr());case 4:case"end":return Tt.stop()}},_t)}));function Fe(){return Ze.apply(this,arguments)}return Fe}()})},Hr=function(){window.location.href=Object(q.r)()?"/":"/classrooms/".concat(Yt.coursesId,"/exercise/").concat(Yt.categoryId,"/detail")},Fa=function(){var At=Object(M.a)(k.a.mark(function ve(){var Ze;return k.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,Object(Ue.l)(Object(w.a)({},Yt));case 2:if(Ze=_t.sent,!(Ze!=null&&Ze.has_time)){_t.next=10;break}return Yn(Date.now()+(Ze==null?void 0:Ze.left_time)*1e3),Ce.exercise.left_time=Ze==null?void 0:Ze.left_time,On(Object(w.a)({},Ce)),_t.abrupt("return",!0);case 10:return ws(),_t.abrupt("return",!1);case 12:case"end":return _t.stop()}},ve)}));return function(){return At.apply(this,arguments)}}(),ws=function(){var At=Object(M.a)(k.a.mark(function ve(){var Ze,Fe;return k.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return ht.next=2,Object(Ue.ab)({categoryId:Yt.categoryId,commit_method:2});case 2:Ze=ht.sent,(Ze==null?void 0:Ze.status)===0&&(_.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:S.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",S.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){var Ot=Object(M.a)(k.a.mark(function Tt(){return k.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:Hr();case 1:case"end":return Nt.stop()}},Tt)}));function Ft(){return Ot.apply(this,arguments)}return Ft}()}),O.b.info(Ze==null?void 0:Ze.message)),(Ze==null?void 0:Ze.status)===-3&&(Fe=parseInt(Ze==null?void 0:Ze.message),Ce.exercise.left_time=Fe,On(Object(w.a)({},Ce)));case 5:case"end":return ht.stop()}},ve)}));return function(){return At.apply(this,arguments)}}(),Ti=function(){var At=Object(M.a)(k.a.mark(function ve(Ze){var Fe;return k.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return ht.next=2,Object(ce.E)({id:Ze.shixun_identifier});case 2:Fe=ht.sent,Fe!=null&&Fe.game_identifier&&(clearTimeout(Oi.current),clearTimeout(Wi.current),Wr("/tasks/".concat(Fe.game_identifier,"?type=exercises&exercisesId=").concat(Yt.categoryId,"&coursesId=").concat(Yt.coursesId,"&login=").concat(Yt.login,"&questionId=").concat(Ze.question_id,"&isFullScreen=").concat(Object(Ae.a)())),Fi("block")),(Fe==null?void 0:Fe.status)===-3?Object(q.q)():(Fe==null?void 0:Fe.status)===2?Ss(Fe==null?void 0:Fe.message,Ze.question_id):(Fe==null?void 0:Fe.status)===3&&ja(Fe==null?void 0:Fe.message);case 5:case"end":return ht.stop()}},ve)}));return function(Ze){return At.apply(this,arguments)}}(),Ss=function At(ve,Ze){var Fe;ve=(Fe=ve)!==null&&Fe!==void 0&&Fe.includes(".json")?ve:"".concat(ve,".json"),_.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:S.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var _t=Object(M.a)(k.a.mark(function Ot(){var Ft,Tt;return k.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Nt.next=2,Object(Ue.T)({url:ve});case 2:if(Ft=Nt.sent,Ft){Nt.next=5;break}return Nt.abrupt("return");case 5:return O.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),Nt.next=8,Object(ce.E)({id:Ft.shixun_identifier});case 8:if(Tt=Nt.sent,!(Tt!=null&&Tt.game_identifier)){Nt.next=12;break}return Ti({shixun_identifier:Tt==null?void 0:Tt.game_identifier,question_id:Ze}),Nt.abrupt("return");case 12:(Tt==null?void 0:Tt.status)===2?At(Tt==null?void 0:Tt.message,Ze):(Tt==null?void 0:Tt.status)===3&&ja(Tt==null?void 0:Tt.message);case 13:case"end":return Nt.stop()}},Ot)}));function ht(){return _t.apply(this,arguments)}return ht}()})},ja=function(ve){_.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:S.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",ve,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},la=function(ve){ve.redo?_.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:S.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 Ze=Object(M.a)(k.a.mark(function _t(){var ht,Ot,Ft,Tt;return k.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Nt.next=2,Object(Ue.T)({id:ve.myshixun_identifier,url:ve.url});case 2:ht=Nt.sent,ht&&(Ot=Object(ze.cloneDeep)(Ce==null?void 0:Ce.exercise_question_types),Ft=Ot==null?void 0:Ot.findIndex(function(wt){return wt.question_type===5}),Ot[Ft].items.find(function(wt){return wt.question_id===ve.question_id}).redo=!1,Ot[Ft].items.find(function(wt){return wt.question_id===ve.question_id}).shixun_identifier=ht.shixun_identifier,Ce.exercise_question_types=Ot,On(Ce),Tt=Object(w.a)(Object(w.a)({},ve),{},{shixun_identifier:ht.shixun_identifier}),Ti(Tt));case 4:case"end":return Nt.stop()}},_t)}));function Fe(){return Ze.apply(this,arguments)}return Fe}()}):Ti(ve)},Vs=function(){var At=Object(M.a)(k.a.mark(function ve(Ze){var Fe;return k.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(!Ze.hack_identifier){ht.next=5;break}return ht.next=3,Object(Ue.Y)({id:Ze.hack_identifier});case 3:Fe=ht.sent,(Fe==null?void 0:Fe.status)===0&&(clearTimeout(Oi.current),clearTimeout(Wi.current),Wr("/myproblems/".concat(Fe.identifier,"?type=exercises&exercisesId=").concat(Yt.categoryId,"&coursesId=").concat(Yt.coursesId,"&login=").concat(Yt.login,"&questionId=").concat(Ze.question_id)),Fi("block"));case 5:case"end":return ht.stop()}},ve)}));return function(Ze){return At.apply(this,arguments)}}(),ui=function(){var At=Object(M.a)(k.a.mark(function ve(Ze,Fe,_t,ht,Ot,Ft){var Tt,Qt,Nt,wt,hn;return k.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:if(Ia(!0),Nt={questionId:Ze,exercise_choice_id:Fe,answer_text:_t},!((ln==null?void 0:ln.ip_limit)==="inner"||ln.ip_bind)){qt.next=6;break}return qt.next=5,Object(V.a)({ip_limit:ln==null?void 0:ln.ip_limit});case 5:Qt=qt.sent;case 6:if(Ot&&(Nt.kp_content=Ot),Ot&&(Nt.kp_clazz=Ft),Ze){qt.next=11;break}return console.error("handleSave no questionId params"),qt.abrupt("return");case 11:return Nt.ip=Qt,qt.next=14,Object(Ue.db)(Nt);case 14:wt=qt.sent,wt!=null&&(Tt=wt.alert)!==null&&Tt!==void 0&&Tt.length&&(wt==null||((hn=wt.alert)===null||hn===void 0)||hn.map(function(bn){_.a.warn({title:"\u63D0\u793A",autoFocusButton:null,content:bn})})),(wt==null?void 0:wt.status)===0?ht&&ht():(wt==null?void 0:wt.status)===-1?setTimeout(function(){Hr()},1e3):(wt==null?void 0:wt.status)===-2?Pr(wt):(wt==null?void 0:wt.status)===-3?(wt.status=-1,Pr(wt)):O.b.warn(wt.message||"\u8BD5\u5377\u5DF2\u622A\u6B62\uFF0C\u5DF2\u81EA\u52A8\u4EA4\u5377"),Ia(!1);case 18:case"end":return qt.stop()}},ve)}));return function(Ze,Fe,_t,ht,Ot,Ft){return At.apply(this,arguments)}}(),As=function(){var At=Object(M.a)(k.a.mark(function ve(Ze){var Fe,_t;return k.a.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:return Ot.next=2,Fa();case 2:return Ot.next=4,Object(Ue.d)({id:Yt.categoryId});case 4:if(Fe=Ot.sent,Fe){Ot.next=7;break}return Ot.abrupt("return");case 7:Fe.question_undo!==0||Fe.oj_undo!==0?(_t="",Fe.question_undo!==0&&Fe.oj_undo!==0?_t="\u6709 ".concat(Fe.question_undo," \u9898\u672A\u5B8C\u6210\uFF0C\u5305\u542B ").concat(Fe.oj_undo," \u4E2A\u7F16\u7A0B\u9898"):Fe.question_undo!==0&&Fe.oj_undo===0?_t="\u6709 ".concat(Fe.question_undo," \u9898\u672A\u5B8C\u6210"):Fe.question_undo===0&&Fe.oj_undo!==0&&(_t="\u6709 ".concat(Fe.oj_undo," \u7F16\u7A0B\u9898\u672A\u5B8C\u6210")),_.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:Ze?"\u77E5\u9053\u4E86":"\u786E\u8BA4\u4EA4\u5377",cancelText:"\u53D6\u6D88",content:S.a.createElement("div",{className:"tc font16"},_t,S.a.createElement("br",null),Ze?"\u5728".concat(I()(Fe.end_time).format("YYYY-MM-DD HH:mm"),"\u4E4B\u524D\uFF0C\u5141\u8BB8\u4FEE\u6539\u7B54\u9898"):Fn?"\u4F60\u672C\u573A\u8003\u8BD5\u5269\u4F59\u65F6\u95F4\u8FD8\u6709".concat(Object(q.cb)((Fn-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 Ft=Object(M.a)(k.a.mark(function Qt(){return k.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:Ze?ln!=null&&ln.screen_open?O.b.success("\u4FDD\u5B58\u6210\u529F"):Hr():Xr();case 1:case"end":return wt.stop()}},Qt)}));function Tt(){return Ft.apply(this,arguments)}return Tt}()})):_.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:Ze?"\u77E5\u9053\u4E86":"\u786E\u8BA4\u4EA4\u5377",cancelText:"\u53D6\u6D88",content:S.a.createElement("div",{className:"tc font16"},Ze?"\u5728".concat(I()(Fe.end_time).format("YYYY-MM-DD HH:mm"),"\u4E4B\u524D\uFF0C\u5141\u8BB8\u4FEE\u6539\u7B54\u9898"):Fn?"\u4F60\u672C\u573A\u8003\u8BD5\u5269\u4F59\u65F6\u95F4\u8FD8\u6709".concat(Object(q.cb)((Fn-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 Ft=Object(M.a)(k.a.mark(function Qt(){return k.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:Ze?ln!=null&&ln.screen_open?O.b.success("\u4FDD\u5B58\u6210\u529F"):Hr():Xr();case 1:case"end":return wt.stop()}},Qt)}));function Tt(){return Ft.apply(this,arguments)}return Tt}()});case 8:case"end":return Ot.stop()}},ve)}));return function(Ze){return At.apply(this,arguments)}}(),Wa=function(ve){return S.a.createElement("div",null,S.a.createElement(i.a,{strokeColor:{from:"#108ee9",to:"#87d068"},status:"active",percent:ve}),S.a.createElement("div",{className:"c-grey-c tc mt10 mb20"},"\u6B63\u5728\u5224\u5206\u4E2D\u2026"))},Ha=function(){var ve=0,Ze=_.a.info({title:"\u4EA4\u5377\u4E2D",icon:null,className:"modal-footer-none",content:Wa(ve)}),Fe=setInterval(function(){ve<=100?(ve+=2,Ze.update({content:Wa(ve)})):(Ze.destroy(),clearInterval(Fe))},50)},Xr=function(){var At=Object(M.a)(k.a.mark(function ve(){var Ze;return k.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,Object(Ue.ab)({categoryId:Yt.categoryId,commit_method:1});case 2:return Ze=_t.sent,_t.next=5,$r({type:"exercise/setActionTabs",payload:Object(w.a)({},{removeEventListenerExitScreen:!0})});case 5:if((Ze==null?void 0:Ze.status)===0){Ha(),O.b.success(Ze==null?void 0:Ze.message),Tn(!1);try{Hi.send(JSON.stringify({type:"toggleLockExit",data:!1})),Hi.send(JSON.stringify({type:"network-open",data:""}))}catch(ht){}setTimeout(function(){_.a.info({title:"\u4EA4\u5377\u6210\u529F\uFF01",okText:"\u786E\u5B9A",maskClosable:!1,keyboard:!1,onOk:function(){Object(Ae.b)(),Hr()}})},3e3)}case 6:case"end":return _t.stop()}},ve)}));return function(){return At.apply(this,arguments)}}(),ua=function(){var At=Object(M.a)(k.a.mark(function ve(Ze,Fe,_t,ht){return k.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:ui(Fe,Ze,null,function(){Ce.question_status.find(function(Tt){return Tt.ques_id===Fe}).ques_status=Ze?1:0,ht.user_answer=[],ht.user_answer.push(Ze),ht.repeat_answer||(ht.israp=!0),On(Object(w.a)({},Ce))});case 1:case"end":return Ft.stop()}},ve)}));return function(Ze,Fe,_t,ht){return At.apply(this,arguments)}}(),Cs=function(){var At=Object(M.a)(k.a.mark(function ve(Ze,Fe,_t,ht,Ot){return k.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:ui(ht.question_id,Ze,null,function(){var Qt,Nt,wt;ht.user_answer=[],ht.user_answer.push(Ze);var hn=Ot==null||((Qt=Ot.sub_exercise_questions)===null||Qt===void 0)?void 0:Qt.filter(function(jn){var qt;return((qt=jn.user_answer)===null||qt===void 0?void 0:qt.length)===0});Ce.question_status.find(function(jn){return jn.ques_id===Fe}).ques_status=(hn==null?void 0:hn.length)===(Ot==null||((Nt=Ot.sub_exercise_questions)===null||Nt===void 0)?void 0:Nt.length)?0:(hn==null?void 0:hn.length)>0&&(hn==null?void 0:hn.length)<(Ot==null||((wt=Ot.sub_exercise_questions)===null||wt===void 0)?void 0:wt.length)?2:1,On(Object(w.a)({},Ce))});case 1:case"end":return Tt.stop()}},ve)}));return function(Ze,Fe,_t,ht,Ot){return At.apply(this,arguments)}}(),ca=function(ve,Ze,Fe){ui(Ze,ve,null,function(){Fe.user_answer=ve,Fe.repeat_answer||(Fe.israp=!0),Ce.question_status.find(function(_t){return _t.ques_id===Ze}).ques_status=ve!=null&&ve.length?1:0,On(Object(w.a)({},Ce))})},Ys=function(ve,Ze,Fe,_t,ht){if(!ve.replaceAll(" ","")){O.b.warning("\u56DE\u7B54\u4E0D\u80FD\u4E3A\u7A7A\u6216\u8005\u7EAF\u7A7A\u683C");return}ui(Fe,Ze,ve,function(){Ce.question_status.find(function(Ft){return Ft.ques_id===Fe}).ques_status=_t.every(function(Ft){return!!Ft.answer_text})?1:Ce.question_status.find(function(Ft){return Ft.ques_id===Fe}).ques_status=_t.some(function(Ft){return!!Ft.answer_text})?2:0;var Ot={choice_id:Ze,answer_text:ve};ht.user_answer.filter(function(Ft){return Ft.choice_id!=Ze})?ht.user_answer.splice(Ze-1,1,Ot):ht.user_answer.push(Ot),ht.repeat_answer||(ht.israp=!0),On(Object(w.a)({},Ce))})},Xs=function(ve,Ze,Fe){if(!ve.replaceAll(" ","")){O.b.warning("\u56DE\u7B54\u4E0D\u80FD\u4E3A\u7A7A\u6216\u8005\u7EAF\u7A7A\u683C");return}ui(Ze,null,ve,function(){Ce.question_status.find(function(_t){return _t.ques_id===Ze}).ques_status=ve?1:0,Fe.user_answer=[],Fe.user_answer.push(ve),Fe.repeat_answer||(Fe.israp=!0),On(Object(w.a)({},Ce))})},Os=function(ve,Ze){var Fe,_t,ht,Ot,Ft,Tt,Qt;return S.a.createElement("div",null,S.a.createElement(d.a,{spinning:vs},S.a.createElement(l.a.Group,{disabled:(Ce==null||((Fe=Ce.exercise)===null||Fe===void 0)?void 0:Fe.user_exercise_status)===1,defaultValue:ve==null||((_t=ve.user_answer)===null||_t===void 0)?void 0:_t[0],onChange:function(wt){return ua(wt.target.value,ve==null?void 0:ve.question_id,Ze,ve)},className:ve.user_score&&"edu-radio-".concat(ve.user_score===ve.question_score?"green":"red")},ve==null||((ht=ve.question_choices)===null||ht===void 0)?void 0:ht.map(function(Nt,wt){var hn,jn=ve.question_type==2,qt=jn?"":"".concat(me[wt],".");return S.a.createElement("div",{className:K.a.answerWrap,key:wt},S.a.createElement(l.a,{disabled:!ve.repeat_answer&&(ve==null||((hn=ve.user_answer)===null||hn===void 0)?void 0:hn.length)>0&&!ve.israp,value:Nt==null?void 0:Nt.choice_id},S.a.createElement("span",{className:"mr3"},qt),S.a.createElement(ge.a,{style:{width:740},className:K.a.renderHtml,value:Nt==null?void 0:Nt.choice_text})))}))),Object(ue.t)()&&(Ce==null||((Ot=Ce.exercise)===null||Ot===void 0)?void 0:Ot.answer_open)&&((Ce==null||((Ft=Ce.exercise)===null||Ft===void 0)?void 0:Ft.exercise_status)==3||(Ce==null||((Tt=Ce.exercise)===null||Tt===void 0)?void 0:Tt.user_exercise_status)==1)&&S.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A",ve==null||((Qt=ve.question_choices)===null||Qt===void 0)?void 0:Qt.map(function(Nt,wt){return Nt.standard_boolean?me[wt]:""}).join("")))},Ka=function(ve,Ze,Fe){var _t;return S.a.createElement("div",null,ve==null||((_t=ve.sub_exercise_questions)===null||_t===void 0)?void 0:_t.map(function(ht,Ot){var Ft,Tt,Qt,Nt,wt,hn,jn;return S.a.createElement("div",null,S.a.createElement("div",{style:{marginTop:20,userSelect:"none",alignItems:"center"}},S.a.createElement("span",{style:{flexShrink:0,fontSize:"14px",color:"#999"}},Fe+1+"."+(Ot+1),"\uFF08\u5355\u9009\u9898 ",ht==null?void 0:ht.question_score,"\u5206\uFF09"),S.a.createElement("br",null),S.a.createElement(ge.a,{style:{marginLeft:27},value:ht==null?void 0:ht.question_title})),S.a.createElement(l.a.Group,{disabled:(Ce==null||((Ft=Ce.exercise)===null||Ft===void 0)?void 0:Ft.user_exercise_status)===1,style:{marginLeft:27},defaultValue:ht==null||((Tt=ht.user_answer)===null||Tt===void 0)?void 0:Tt[0],onChange:function(bn){return Cs(bn.target.value,ve==null?void 0:ve.question_id,Ot,ht,ve)},className:ht.user_score&&"edu-radio-".concat(ht.user_score===ht.question_score?"green":"red")},ht==null||((Qt=ht.question_choices)===null||Qt===void 0)?void 0:Qt.map(function(qt,bn){var cn,Nn=ht.question_type==2,An=Nn?"":"".concat(me[bn],".");return S.a.createElement("div",{className:K.a.answerWrap,key:bn},S.a.createElement(l.a,{disabled:!ht.repeat_answer&&(ht==null||((cn=ht.user_answer)===null||cn===void 0)?void 0:cn.length)>0,value:qt==null?void 0:qt.choice_id},S.a.createElement("span",{className:"mr3"},An),S.a.createElement(ge.a,{style:{width:722},className:K.a.renderHtml,value:qt==null?void 0:qt.choice_text})))})),Object(ue.t)()&&(Ce==null||((Nt=Ce.exercise)===null||Nt===void 0)?void 0:Nt.answer_open)&&((Ce==null||((wt=Ce.exercise)===null||wt===void 0)?void 0:wt.exercise_status)==3||(Ce==null||((hn=Ce.exercise)===null||hn===void 0)?void 0:hn.user_exercise_status)==1)&&S.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A",ht==null||((jn=ht.standard_answer)===null||jn===void 0)?void 0:jn.map(function(qt,bn){return S.a.createElement("span",null,me[Number(qt)-1])})))}))},Ga=function(ve,Ze){var Fe,_t,ht,Ot,Ft;return S.a.createElement("div",null,S.a.createElement(d.a,{spinning:vs},S.a.createElement(c.a.Group,{disabled:(Ce==null||((Fe=Ce.exercise)===null||Fe===void 0)?void 0:Fe.user_exercise_status)===1,defaultValue:ve==null?void 0:ve.user_answer,onChange:function(Qt){return ca(Qt,ve==null?void 0:ve.question_id,ve)},className:ve.user_score&&"edu-checkbox-".concat(ve.user_score===ve.question_score?"green":"red")},ve==null||((_t=ve.question_choices)===null||_t===void 0)?void 0:_t.map(function(Tt,Qt){var Nt,wt="".concat(me[Qt],".");return S.a.createElement("div",{className:K.a.answerWrap},S.a.createElement(c.a,{disabled:!ve.repeat_answer&&(ve==null||((Nt=ve.user_answer)===null||Nt===void 0)?void 0:Nt.length)>0&&!ve.israp,value:Tt==null?void 0:Tt.choice_id},S.a.createElement("span",{className:"mr3"},wt),S.a.createElement(ge.a,{className:K.a.renderHtml,value:Tt==null?void 0:Tt.choice_text})))}))),Object(ue.t)()&&(Ce==null||((ht=Ce.exercise)===null||ht===void 0)?void 0:ht.answer_open)&&(Ce==null||((Ot=Ce.exercise)===null||Ot===void 0)?void 0:Ot.exercise_status)==3&&S.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A",ve==null||((Ft=ve.question_choices)===null||Ft===void 0)?void 0:Ft.map(function(Tt,Qt){return Tt.standard_boolean?me[Qt]:""}).join("")))},Ii=function(ve,Ze){return S.a.createElement(Le,{item:ve,answerData:Ce,onBlur:function(_t,ht,Ot){return Ys(_t,ht,ve==null?void 0:ve.question_id,Ot,ve)}})},Gi=function(ve,Ze){return gr?S.a.createElement(bt,{item:ve,answerData:Ce,onBlur:function(_t,ht,Ot){return ui(ve==null?void 0:ve.question_id,null,_t,void 0,ht,Ot)},isEducation:gr}):S.a.createElement(Xe,{item:ve,answerData:Ce,onBlur:function(_t){return Xs(_t,ve==null?void 0:ve.question_id,ve)},isEducation:gr})},Qs=function(ve,Ze){return S.a.createElement(ae,{item:ve,answerData:Ce})},da=function(ve,Ze){return S.a.createElement(se,{item:ve,answerData:Ce})},Qr=function(ve,Ze,Fe){var _t,ht,Ot=Ce==null||((_t=Ce.exercise_question_types)===null||_t===void 0)?void 0:_t.find(function(Ft){return Ft.question_type===Ze});return S.a.createElement(S.a.Fragment,null,S.a.createElement("h1",{className:"font14 current",onClick:function(){rr[Ze]=!rr[Ze],Ir(Object(w.a)({},rr))}},!rr[Ze]&&S.a.createElement(Pe.a,null),rr[Ze]&&S.a.createElement(xe.a,null),S.a.createElement("span",{className:"ml5 c-grey-666"},ve)),S.a.createElement("ul",{className:K.a.answerSheet,key:Ze},!rr[Ze]&&(Ot==null||((ht=Ot.items)===null||ht===void 0)?void 0:ht.map(function(Ft,Tt){if(Ft.question_type===Ze){var Qt,Nt;return S.a.createElement("li",{onClick:function(){var hn;if(!Ki&&(Ce==null||((hn=Ce.exercise)===null||hn===void 0)?void 0:hn.user_exercise_status)===0&&Object(ue.t)()){var jn,qt,bn,cn;if(!((jn=Ce.exercise_question_types)!==null&&jn!==void 0&&(qt=jn[un])!==null&&qt!==void 0&&(bn=qt.items)!==null&&bn!==void 0&&(cn=bn[vn])!==null&&cn!==void 0&&cn.repeat_answer)){si(!0),Yr(3),Ua({oneindex:Fe,twoindex:Tt});return}}yi(Fe),bi(Tt);var Nn="Anchor_".concat(Ze,"_").concat(Tt),An=document.getElementById(Nn);An&&setTimeout(function(){return An.scrollIntoView({block:"start",behavior:"smooth"})})},key:Tt,className:(Ce==null||((Qt=Ce.question_status)===null||Qt===void 0)?void 0:Qt.some(function(wt){return wt.ques_id===Ft.question_id&&(wt==null?void 0:wt.ques_status)===1}))&&K.a.active},Tt+1,(Ce==null||((Nt=Ce.question_status)===null||Nt===void 0)?void 0:Nt.some(function(wt){return wt.ques_id===Ft.question_id&&(wt==null?void 0:wt.ques_status)===2}))&&S.a.createElement("div",{style:{height:3,background:"#0152d9",position:"absolute",width:26,bottom:0}}))}}))))},zi=function(ve,Ze){var Fe,_t,ht,Ot,Ft,Tt,Qt,Nt,wt,hn=(ve==null?void 0:ve.question_type)==5?ve==null?void 0:ve.shixun_name:ve==null?void 0:ve.question_title,jn="",qt=(ve==null?void 0:ve.question_type)===0||(ve==null?void 0:ve.question_type)===1;if(qt){var bn;ve==null||((bn=ve.question_choices)===null||bn===void 0)||bn.forEach(function(cn,Nn){cn.standard_boolean&&(jn=jn+me[Nn])})}return S.a.createElement("div",{className:K.a.questionItem,id:"Anchor_".concat(ve==null?void 0:ve.question_type,"_").concat(Ze)},S.a.createElement("div",{style:{display:"flex",marginTop:20,userSelect:"none"}},S.a.createElement("span",{style:{flexShrink:0},className:"font18"},Ze+1,"."),S.a.createElement(ge.a,{value:ve==null?void 0:ve.question_title}),S.a.createElement("span",{style:{flexShrink:0},className:"font16"},"\uFF08",ve==null?void 0:ve.question_score,"\u5206\uFF09",(ve==null?void 0:ve.question_type)===7?"\u5171".concat(ve==null||((Fe=ve.sub_exercise_questions)===null||Fe===void 0)?void 0:Fe.length,"\u5C0F\u9898"):""," "),!(ve!=null&&ve.repeat_answer)&&S.a.createElement("span",{style:{color:"#FA6400 ",marginLeft:10,fontSize:16}},"\u6CE8\u610F\uFF1A\u8BE5\u9898\u4E0D\u5141\u8BB8\u91CD\u590D\u7B54\u9898"),!!(ve!=null&&(_t=ve.schools)!==null&&_t!==void 0&&_t.length)&&S.a.createElement(f.a,{title:"\u8BE5\u5B9E\u8BAD\u9898\u9762\u5411\u6307\u5B9A\u5355\u4F4D\u5F00\u653E"},S.a.createElement("i",{className:"iconfont icon-zhidinggongkai1 line24 font18 c-orange"}))),(ve==null?void 0:ve.question_type)==0&&Os(ve,ve==null?void 0:ve.question_type),(ve==null?void 0:ve.question_type)==2&&Os(ve,ve==null?void 0:ve.question_type),(ve==null?void 0:ve.question_type)==1&&Ga(ve,ve==null?void 0:ve.question_type),(ve==null?void 0:ve.question_type)==3&&Ii(ve,ve==null?void 0:ve.question_type),(ve==null?void 0:ve.question_type)==4&&Gi(ve,ve==null?void 0:ve.question_type),(ve==null?void 0:ve.question_type)==5&&Qs(ve,ve==null?void 0:ve.question_type),(ve==null?void 0:ve.question_type)==6&&da(ve,ve==null?void 0:ve.question_type),(ve==null?void 0:ve.question_type)==7&&Ka(ve,ve==null?void 0:ve.question_type,Ze),!!(ve!=null&&(ht=ve.answer_comments)!==null&&ht!==void 0&&ht.length)&&S.a.createElement("div",{className:"mt30"},ve==null||((Ot=ve.answer_comments)===null||Ot===void 0)?void 0:Ot.map(function(cn,Nn){var An,Br;return cn.comment?S.a.createElement("div",null,S.a.createElement(j.a,{align:"middle",gutter:[0,10]},S.a.createElement(T.a,{flex:"50px"},S.a.createElement("img",{src:ft.a.API_SERVER+"/images/"+((An=cn.user)===null||An===void 0?void 0:An.image_url),width:"40",style:{borderRadius:40}})),S.a.createElement(T.a,{flex:"1"},(Br=cn.user)===null||Br===void 0?void 0:Br.name,S.a.createElement("br",null),cn.updated_at)),S.a.createElement(j.a,{align:"middle",gutter:[0,10]},S.a.createElement(T.a,{flex:"50px"}),S.a.createElement(T.a,{flex:"1"},S.a.createElement(He,{autoSize:!0,value:cn.comment,disabled:!0})))):null})),S.a.createElement("div",{className:K.a.itemType},S.a.createElement(j.a,null,S.a.createElement(T.a,{flex:"1"}),S.a.createElement(T.a,null,(ve==null?void 0:ve.question_type)<3&&(ve==null?void 0:ve.standard_answer_show)&&S.a.createElement("span",{className:"font16 ml20"},"\u6B63\u786E\u7B54\u6848\uFF1A",qt?jn:ve==null?void 0:ve.standard_answer_show),(Object(ue.c)()||Object(ue.t)()&&(Ce==null||((Ft=Ce.exercise)===null||Ft===void 0)?void 0:Ft.user_exercise_status)>0&&(Ce==null||((Tt=Ce.exercise)===null||Tt===void 0)?void 0:Tt.open_score))&&S.a.createElement("span",{className:"font16 ml20"},(ve==null?void 0:ve.user_score)&&S.a.createElement("span",null,S.a.createElement("span",{className:we[Number(ve==null?void 0:ve.answer_status)]||"c-orange-ff9"},ve==null?void 0:ve.user_score)," ","\u5206"),!(ve!=null&&ve.user_score)&&S.a.createElement("span",{className:"c-red"},"\u672A\u8BC4")),(ve==null?void 0:ve.question_type)==5&&(Ce==null||((Qt=Ce.exercise)===null||Qt===void 0)?void 0:Qt.user_exercise_status)===0&&(ve==null?void 0:ve.answer_status)!=3&&S.a.createElement(D.a,{type:"primary",className:"font16 ml20",onClick:function(){return la(ve)}},"\u8FDB\u5165\u7B54\u9898"),Object(ue.t)()&&(Ce==null||((Nt=Ce.exercise)===null||Nt===void 0)?void 0:Nt.user_exercise_status)===0&&(ve==null?void 0:ve.question_type)==6&&S.a.createElement(D.a,{type:"primary",className:"font16 ml20",onClick:function(){return Vs(ve)}},"\u8FDB\u5165\u7B54\u9898"))),(ve==null?void 0:ve.question_type)<=4&&((ve==null?void 0:ve.standard_answer_show)||(ve==null||((wt=ve.standard_answer)===null||wt===void 0)?void 0:wt.length)>0)&&S.a.createElement(j.a,{style:{marginTop:14}},S.a.createElement("span",{className:"font16 ml20"},"\u89E3\u6790\uFF1A"),S.a.createElement(ge.a,{className:K.a.renderHtml,value:ve==null?void 0:ve.analysis}))))},Rs=function(ve,Ze){return S.a.createElement(y.Fragment,null,ve.question_type===0&&Qr("\u5355\u9009\u9898",0,Ze),ve.question_type===1&&Qr("\u591A\u9009\u9898",1,Ze),ve.question_type===2&&Qr("\u5224\u65AD\u9898",2,Ze),ve.question_type===3&&Qr("\u586B\u7A7A\u9898",3,Ze),ve.question_type===4&&Qr("\u7B80\u7B54\u9898",4,Ze),ve.question_type===5&&Qr("\u5B9E\u8BAD\u9898",5,Ze),ve.question_type===6&&Qr("\u7F16\u7A0B\u9898",6,Ze),ve.question_type===7&&Qr("\u7EC4\u5408\u9898",7,Ze))},wi=function(ve){var Ze=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Fe=["","\u5341","\u767E","\u5343","\u4E07"];ve=parseInt(ve);var _t=function(Tt){for(var Qt=Tt.toString().split("").reverse(),Nt="",wt=0;wt<Qt.length;wt++)Nt=(wt==0&&Qt[wt]==0||wt>0&&Qt[wt]==0&&Qt[wt-1]==0?"":Ze[Qt[wt]]+(Qt[wt]==0?Fe[0]:Fe[wt]))+Nt;return Nt},ht=Math.floor(ve/1e4),Ot=ve%1e4;return Ot.toString().length<4&&(Ot="0"+Ot),ht?_t(ht)+"\u4E07"+_t(Ot):_t(ve)},Vi=function(){var ve,Ze,Fe,_t,ht,Ot,Ft,Tt,Qt,Nt,wt,hn;return S.a.createElement(y.Fragment,{key:un},S.a.createElement("div",{className:"pt20"},S.a.createElement("span",{className:"font16 c-light-primary"},wi(un+1),"\u3001",Ce==null||((ve=Ce.exercise_question_types)===null||ve===void 0||((Ze=ve[un])===null||Ze===void 0))?void 0:Ze.name),S.a.createElement("span",{className:"c-grey-999"},"\uFF08\u5171",Ce==null||((Fe=Ce.exercise_question_types)===null||Fe===void 0||((_t=Fe[un])===null||_t===void 0))?void 0:_t.count,"\u9898\uFF1B",(Ce==null||((ht=Ce.exercise_question_types)===null||ht===void 0||((Ot=ht[un])===null||Ot===void 0))?void 0:Ot.question_type)===7?"\u5305\u542B".concat(Ce==null||((Ft=Ce.exercise_question_types)===null||Ft===void 0||((Tt=Ft[un])===null||Tt===void 0))?void 0:Tt.sub_questions_count,"\u5C0F\u9898"):""," ","\u5171",Ce==null||((Qt=Ce.exercise_question_types)===null||Qt===void 0||((Nt=Qt[un])===null||Nt===void 0))?void 0:Nt.score,"\u5206\uFF09")),S.a.createElement(y.Fragment,{key:vn},zi(Ce==null||((wt=Ce.exercise_question_types)===null||wt===void 0||((hn=wt[un].items)===null||hn===void 0))?void 0:hn[vn],vn)))};return S.a.createElement(d.a,{size:"large",spinning:ri},qn&&(Ce==null||((it=Ce.exercise)===null||it===void 0)?void 0:it.user_exercise_status)===0&&S.a.createElement(Ee.a,{exerciseUserInfo:qr.exerciseUserInfo,iframe:Ur,socket:Hi}),S.a.createElement("iframe",{style:{display:Ra},id:"iframeShixuns",className:K.a.iframe,src:ai,ref:Ur,frameBorder:"0"}),S.a.createElement("section",{className:"edu-container ".concat(gr&&K.a.wrpAnswer)},S.a.createElement("section",{className:"animated fadeIn ".concat(gr&&K.a.eduTitle)},S.a.createElement("aside",{className:"mt10"},Object(q.r)()&&S.a.createElement(Y.a,{separator:">"},S.a.createElement(Y.a.Item,null,S.a.createElement(A.a,{to:"/"},"\u8BD5\u5377")),S.a.createElement(Y.a.Item,null,(ut=Or.userInfo)===null||ut===void 0?void 0:ut.real_name)),!Object(q.r)()&&Vr.showHeaderFooter&&S.a.createElement(Y.a,{separator:">"},S.a.createElement(Y.a.Item,null,S.a.createElement(A.a,{to:"/classrooms/".concat(Yt.coursesId,"/exercise")},(et=Or.userInfo)===null||et===void 0||((Dt=et.course)===null||Dt===void 0)?void 0:Dt.course_name)),S.a.createElement(Y.a.Item,null,S.a.createElement(A.a,{to:"/classrooms/".concat(Yt.coursesId,"/exercise")},"\u8BD5\u5377")),S.a.createElement(Y.a.Item,null,S.a.createElement(A.a,{to:"/classrooms/".concat(Yt.coursesId,"/exercise/").concat(Yt.categoryId,"/detail")},"\u8BD5\u5377\u8BE6\u60C5")),S.a.createElement(Y.a.Item,null,(Xt=Or.userInfo)===null||Xt===void 0?void 0:Xt.real_name))),S.a.createElement("aside",{className:[K.a.title,"mt10"].join(" ")},S.a.createElement(j.a,{style:{width:"100%",flexFlow:"nowrap"},align:"middle"},S.a.createElement(T.a,{style:{flex:"1"}},S.a.createElement("div",{className:K.a.title},(Vr==null?void 0:Vr.showHeaderFooter)&&S.a.createElement(A.a,{to:Object(q.r)()?"/":"/classrooms/".concat(Yt.coursesId,"/exercise/").concat(Yt.categoryId,"/detail")},S.a.createElement(Ie.a,{className:"font16 c-black"})),Object(q.A)(Ce==null||((gt=Ce.exercise)===null||gt===void 0)?void 0:gt.exercise_status),S.a.createElement("strong",{className:"font24 ml5"},Ce==null||((Ct=Ce.exercise)===null||Ct===void 0)?void 0:Ct.exercise_name))),S.a.createElement(T.a,{style:{display:"flex"}},Object(ue.c)()&&S.a.createElement(D.a,{type:"primary",onClick:li},"\u6253\u56DE\u91CD\u505A"),S.a.createElement(T.a,null,((Ce==null||((Mt=Ce.exercise)===null||Mt===void 0)?void 0:Mt.commit_status)==2||(Ce==null||((St=Ce.exercise)===null||St===void 0)?void 0:St.commit_status)==1)&&Object(ue.c)()&&!Object(q.r)()&&S.a.createElement(D.a,{className:"ml10",type:"primary",onClick:function(){return X.d.push("/classrooms/".concat(Yt.coursesId,"/exercise/").concat(Yt.categoryId,"/export/").concat(Yt.login))}},S.a.createElement(Me.a,null),"\u5BFC\u51FA")),!(Object(ue.c)()||Object(ue.t)()&&(Ce==null||((kt=Ce.exercise)===null||kt===void 0)?void 0:kt.user_exercise_status)==1)&&!!(Ce!=null&&(Wt=Ce.exercise)!==null&&Wt!==void 0&&Wt.left_time)&&S.a.createElement("aside",{className:"".concat(K.a.countDown," ").concat(Ks)},S.a.createElement("div",null,"\u5269\u4F59\u65F6\u95F4:",S.a.createElement(Qe,{value:Fn,onFinish:Fa})),S.a.createElement(D.a,{className:"ml10",type:"primary",onClick:Fa,ghost:!0},S.a.createElement("span",{className:"iconfont icon-shuaxin2 mr5"}),"\u5237\u65B0")),Object(ue.t)()&&(Ce==null||((dn=Ce.exercise)===null||dn===void 0)?void 0:dn.user_exercise_status)===0&&S.a.createElement("aside",{className:gr?K.a.eduSubmit:""},S.a.createElement(D.a,{style:{width:"60px",height:"28px",marginLeft:10},type:"primary",onClick:function(){return As(!1)}},"\u4EA4\u5377")))))),gi.status===0&&S.a.createElement(j.a,{className:"".concat(gr?"mt70":"mt10"," ").concat(K.a.answerWrp)},S.a.createElement(T.a,{flex:Bt?"316px":"16px",className:gr?"mb100":""},S.a.createElement("section",{style:{position:"sticky",top:0,zIndex:1}},!gr&&an&&S.a.createElement(ke.a,{id:Yt.categoryId,number:(Ce==null||(($t=Ce.exercise)===null||$t===void 0)?void 0:$t.photo_count)-(Ce==null||((ot=Ce.exercise)===null||ot===void 0)?void 0:ot.take_photo),take_photo:Ce==null||((Pt=Ce.exercise)===null||Pt===void 0)?void 0:Pt.take_photo,ref:ia,time:(Ht=Ce.exercise)===null||Ht===void 0?void 0:Ht.left_time,update:zn,supportCamera:function(ve){ve===2?(zn(),Nr(!0),tn(ln==null?void 0:ln.screen_open)):ve===1&&setTimeout(function(){return Qn.history.push("/")},3e3)}}),S.a.createElement("div",{className:"relative",style:{minHeight:236}},gr&&S.a.createElement("section",null,an&&S.a.createElement("div",{className:K.a.eduVideo},S.a.createElement(ke.a,{id:Yt.categoryId,number:(Ce==null||((zt=Ce.exercise)===null||zt===void 0)?void 0:zt.photo_count)-(Ce==null||((Vt=Ce.exercise)===null||Vt===void 0)?void 0:Vt.take_photo),take_photo:Ce==null||((nn=Ce.exercise)===null||nn===void 0)?void 0:nn.take_photo,ref:ia,time:(rn=Ce.exercise)===null||rn===void 0?void 0:rn.left_time,update:zn,supportCamera:function(ve){ve===2?(zn(),Nr(!0),tn(ln==null?void 0:ln.screen_open)):ve===1&&setTimeout(function(){return Qn.history.push("/")},3e3)}})),Bt&&S.a.createElement(j.a,{className:K.a.eduUsername,style:{background:"#fff",padding:"16px 20px"}},S.a.createElement(T.a,null,"\u59D3\u540D\uFF1A",(Ce==null||((Lt=Ce.exercise)===null||Lt===void 0)?void 0:Lt.user_name)||"- -"),S.a.createElement(T.a,null,S.a.createElement(z.a,{style:{margin:"0 25px"},type:"vertical"})),S.a.createElement(T.a,null,"\u5B66\u53F7\uFF1A",(Ce==null||((En=Ce.exercise)===null||En===void 0)?void 0:En.student_id)||"- -")),S.a.createElement("div",{className:K.a.eduTip},S.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"),S.a.createElement("div",{className:"font16 tc blod"},"010-62781166"),S.a.createElement("div",{className:"font16 tc blod"},"010-62799826"),S.a.createElement("div",{className:"font16 tc blod"},"18910624893"),S.a.createElement("div",{className:"font16 tc blod"},"13366506792")),Object(ue.t)()&&S.a.createElement(j.a,{className:K.a.eduQrcode,align:"middle"},S.a.createElement(T.a,null,S.a.createElement(fe.a,{value:"https://".concat(document.domain,"/live-push.html?id=").concat(Yt.categoryId,"&login=").concat(Yt.login,"&cookie=").concat(Object(q.F)("_educoder_session"))})),S.a.createElement(T.a,{className:"ml15"},"\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B",S.a.createElement("br",null),"\u5F00\u542F\u624B\u673A\u89C6\u9891\u5F55\u5236"))),!gr&&S.a.createElement("section",null,Bt&&S.a.createElement(T.a,{flex:"1",style:{background:"#fff",height:"90px",marginBottom:"10px",padding:"16px 20px"}},S.a.createElement("p",null,"\u59D3\u540D\uFF1A",(Ce==null||((ct=Ce.exercise)===null||ct===void 0)?void 0:ct.user_name)||"- -"),S.a.createElement("p",null,"\u5B66\u53F7\uFF1A",(Ce==null||((wn=Ce.exercise)===null||wn===void 0)?void 0:wn.student_id)||"- -")),Object(ue.t)()&&((pn=Ce.exercise)===null||pn===void 0?void 0:pn.user_exercise_status)===0&&((Hn=Ce.exercise)===null||Hn===void 0?void 0:Hn.open_phone_video_recording)&&S.a.createElement(j.a,{className:K.a.eduQrcode,style:{marginTop:10},align:"middle"},S.a.createElement(T.a,null,S.a.createElement(fe.a,{value:"https://".concat(document.domain,"/live-push.html?id=").concat(Yt.categoryId,"&login=").concat(Yt.login,"&cookie=").concat(Object(q.F)("_educoder_session"))})),S.a.createElement(T.a,{className:"ml15"},"\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B",S.a.createElement("br",null),"\u5F00\u542F\u624B\u673A\u89C6\u9891\u5F55\u5236")),(Ce==null||((Mn=Ce.exercise)===null||Mn===void 0||((Dn=Mn.exercise_description)===null||Dn===void 0))?void 0:Dn.length)>0&&Bt&&S.a.createElement(T.a,{flex:"1",style:{background:"#fff",marginBottom:"10px",padding:"16px 20px"}},S.a.createElement("p",{style:{fontWeight:500}},"\u8003\u8BD5\u987B\u77E5"),S.a.createElement("p",null,Ce==null||((Un=Ce.exercise)===null||Un===void 0)?void 0:Un.exercise_description)),Bt&&S.a.createElement("aside",{className:"bg-white p16 mt10"},S.a.createElement(j.a,null,S.a.createElement(T.a,{span:8},S.a.createElement("span",{className:"font16 blod"},"\u7B54\u9898\u5361")),S.a.createElement(T.a,{span:16},Object(ue.t)()&&S.a.createElement("div",{className:"tr",style:{display:"flex",alignItems:"center",justifyContent:"end"}},S.a.createElement("span",{className:K.a.answerYes}),"\u5DF2\u7B54",S.a.createElement("span",{style:{width:13,height:13,display:"flex",flexDirection:"column-reverse"},className:"".concat(K.a.answerNo," ml10")},S.a.createElement("div",{style:{height:"10%",background:"#0152d9"}})),"\u90E8\u5206\u7B54\u9898",S.a.createElement("span",{className:"".concat(K.a.answerNo," ml10")}),"\u672A\u7B54"))),S.a.createElement("aside",{className:K.a.answerInfo},S.a.createElement(j.a,null,Object(ue.t)()&&S.a.createElement(S.a.Fragment,null,S.a.createElement(T.a,{span:12},"\u7B54\u9898\u8FDB\u5EA6"),S.a.createElement(T.a,{span:12,className:"tr c-blue"},Ce==null||((kn=Ce.question_status)===null||kn===void 0||((Pn=kn.filter(function(At){return!!At.ques_status}))===null||Pn===void 0))?void 0:Pn.length," ","/ ",Ce==null||((Sn=Ce.exercise_types)===null||Sn===void 0)?void 0:Sn.q_counts),S.a.createElement(T.a,{span:24},S.a.createElement(i.a,{trailColor:"#c3ced2",percent:(Ce==null||((br=Ce.question_status)===null||br===void 0||((In=br.filter(function(At){return!!At.ques_status}))===null||In===void 0))?void 0:In.length)/(Ce==null||((_n=Ce.exercise_types)===null||_n===void 0)?void 0:_n.q_counts)*100,showInfo:!1}))),S.a.createElement(T.a,null,S.a.createElement("span",{className:"c-grey-333"},"\u5171"," ",S.a.createElement("span",{className:"c-blue-4ca"},(Ce==null||((or=Ce.exercise_types)===null||or===void 0)?void 0:or.q_counts)||(Ce==null||((di=Ce.exercise_scores)===null||di===void 0||((Fr=di.exercise_types)===null||Fr===void 0))?void 0:Fr.q_counts))," ","\u9898\uFF1A"),S.a.createElement("span",{className:"c-grey-333"},"\u6EE1\u5206"," ",S.a.createElement("span",{className:"c-blue-4ca"},(Ce==null||((Gn=Ce.exercise_types)===null||Gn===void 0)?void 0:Gn.q_scores)||(Ce==null||((Ar=Ce.exercise_scores)===null||Ar===void 0||((hi=Ar.exercise_types)===null||hi===void 0))?void 0:hi.q_scores))," ","\u5206")))),S.a.createElement(j.a,null,S.a.createElement(T.a,{flex:"1"},S.a.createElement("aside",{className:K.a.cardList},Ce==null||((Cr=Ce.exercise_question_types)===null||Cr===void 0)?void 0:Cr.map(function(At,ve){return S.a.createElement(y.Fragment,{key:At.question_type},Rs(At,ve))}))))),S.a.createElement("div",{className:K.a.fold,onClick:function(){return Jt(!Bt)}},Bt&&S.a.createElement("span",{className:"icon-zuojiantou iconfont c-grey-c"}),!Bt&&S.a.createElement("span",{className:"icon-youjiantou iconfont c-grey-c"})))))),S.a.createElement(T.a,{flex:"1"},S.a.createElement("section",{style:{minHeight:400,position:"relative"},className:[K.a.bg,"pl30","pb30","mb50","ml20"].join(" ")},S.a.createElement("div",{style:{maxHeight:600,overflow:"hidden auto",paddingRight:30}},Vi()),S.a.createElement("div",{style:{marginTop:60,textAlign:"center",paddingRight:30}},(un!=0||vn!=0)&&S.a.createElement(D.a,{className:"".concat(K.a.submitButton," mr10"),type:"default",onClick:function(){var ve;if(!Ki&&(Ce==null||((ve=Ce.exercise)===null||ve===void 0)?void 0:ve.user_exercise_status)===0&&Object(ue.t)()){var Ze,Fe,_t,ht;if(!((Ze=Ce.exercise_question_types)!==null&&Ze!==void 0&&(Fe=Ze[un])!==null&&Fe!==void 0&&(_t=Fe.items)!==null&&_t!==void 0&&(ht=_t[vn])!==null&&ht!==void 0&&ht.repeat_answer)){si(!0),Yr(1);return}}Ce.exercise_question_types[un].items[vn].israp=!1,On(Object(w.a)({},Ce)),vn===0?(un-=1,vn=Ce.exercise_question_types[un].items.length-1):vn-=1,yi(un),bi(vn)}},"\u4E0A\u4E00\u9898"),!(un===(Ce==null||((nr=Ce.exercise_question_types)===null||nr===void 0)?void 0:nr.length)-1&&vn===(Ce==null||((Gr=Ce.exercise_question_types)===null||Gr===void 0||((fi=Gr[un])===null||fi===void 0||((zr=fi.items)===null||zr===void 0)))?void 0:zr.length)-1)&&S.a.createElement(D.a,{className:K.a.submitButton,type:"primary",onClick:function(){var ve;if(!Ki&&(Ce==null||((ve=Ce.exercise)===null||ve===void 0)?void 0:ve.user_exercise_status)===0&&Object(ue.t)()){var Ze,Fe,_t,ht;if(!((Ze=Ce.exercise_question_types)!==null&&Ze!==void 0&&(Fe=Ze[un])!==null&&Fe!==void 0&&(_t=Fe.items)!==null&&_t!==void 0&&(ht=_t[vn])!==null&&ht!==void 0&&ht.repeat_answer)){si(!0),Yr(2);return}}Ce.exercise_question_types[un].items[vn].israp=!1,On(Object(w.a)({},Ce)),Ce.exercise_question_types[un].items.length-1===vn?(un=un+1,vn=0):vn=vn+1,yi(un),bi(vn)}},"\u4E0B\u4E00\u9898"))))),gi.status!==0&&S.a.createElement(vt,{data:gi}),S.a.createElement(_.a,{title:"\u6CE8\u610F",visible:_s,onCancel:function(){return si(!1)},footer:!1},S.a.createElement("div",null,S.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"),S.a.createElement("div",{style:{marginTop:60,display:"flex",justifyContent:"space-between"}},S.a.createElement(c.a,{checked:Ki,onChange:function(ve){Na(ve.target.checked)}},"\u4E0B\u6B21\u4E0D\u518D\u663E\u793A"),S.a.createElement("div",null,S.a.createElement(D.a,{onClick:function(){Ce.exercise_question_types[un].items[vn].israp?(Ce.exercise_question_types[un].items[vn].israp=!0,On(Object(w.a)({},Ce))):Ce.exercise_question_types[un].items[vn].israp===""&&(Ce.exercise_question_types[un].items[vn].israp=!0,On(Object(w.a)({},Ce))),si(!1)}},"\u6211\u518D\u60F3\u60F3"),S.a.createElement(D.a,{onClick:function(){Ce.exercise_question_types[un].items[vn].israp=!1,On(Object(w.a)({},Ce)),Ts===1?(vn===0?(un-=1,vn=Ce.exercise_question_types[un].items.length-1):vn-=1,yi(un),bi(vn)):Ts===2?(Ce.exercise_question_types[un].items.length-1===vn?(un=un+1,vn=0):vn=vn+1,yi(un),bi(vn)):(yi(sa.oneindex),bi(sa.twoindex)),si(!1)},type:"primary",style:{marginLeft:30}},"\u786E\u8BA4")))))))},pt=he.default=Object(X.a)(function(dt){var je=dt.loading,Ve=dt.user,$e=dt.exercise,it=dt.globalSetting;return{globalSetting:it,user:Ve,exercise:$e,loading:je.effects}})(Ge)},N0LK:function(Be,he,B){"use strict";B.d(he,"C",function(){return Z}),B.d(he,"v",function(){return N}),B.d(he,"s",function(){return Y}),B.d(he,"t",function(){return W}),B.d(he,"U",function(){return D}),B.d(he,"J",function(){return G}),B.d(he,"O",function(){return j}),B.d(he,"p",function(){return n}),B.d(he,"T",function(){return T}),B.d(he,"q",function(){return v}),B.d(he,"N",function(){return f}),B.d(he,"M",function(){return p}),B.d(he,"Q",function(){return c}),B.d(he,"u",function(){return s}),B.d(he,"x",function(){return d}),B.d(he,"I",function(){return u}),B.d(he,"f",function(){return l}),B.d(he,"h",function(){return a}),B.d(he,"g",function(){return i}),B.d(he,"i",function(){return R}),B.d(he,"G",function(){return O}),B.d(he,"H",function(){return w}),B.d(he,"r",function(){return M}),B.d(he,"R",function(){return L}),B.d(he,"d",function(){return _}),B.d(he,"e",function(){return b}),B.d(he,"E",function(){return g}),B.d(he,"F",function(){return h}),B.d(he,"j",function(){return C}),B.d(he,"z",function(){return x}),B.d(he,"K",function(){return P}),B.d(he,"L",function(){return k}),B.d(he,"m",function(){return S}),B.d(he,"k",function(){return A}),B.d(he,"A",function(){return ne}),B.d(he,"a",function(){return fe}),B.d(he,"n",function(){return ye}),B.d(he,"l",function(){return Pe}),B.d(he,"D",function(){return xe}),B.d(he,"B",function(){return Ie}),B.d(he,"b",function(){return Me}),B.d(he,"S",function(){return ke}),B.d(he,"o",function(){return Ee}),B.d(he,"P",function(){return J}),B.d(he,"w",function(){return I}),B.d(he,"c",function(){return U}),B.d(he,"y",function(){return V});function Z(ce){return!ce||typeof ce!="string"?!0:ce.trim().length===0}const z=/{(\d+)}/g;function N(ce,...ge){return ge.length===0?ce:ce.replace(z,function(Te,Oe){const Xe=parseInt(Oe,10);return isNaN(Xe)||Xe<0||Xe>=ge.length?Te:ge[Xe]})}function Y(ce){return ce.replace(/[<>&]/g,function(ge){switch(ge){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return ge}})}function W(ce){return ce.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function D(ce,ge=" "){const Te=G(ce,ge);return j(Te,ge)}function G(ce,ge){if(!ce||!ge)return ce;const Te=ge.length;if(Te===0||ce.length===0)return ce;let Oe=0;for(;ce.indexOf(ge,Oe)===Oe;)Oe=Oe+Te;return ce.substring(Oe)}function j(ce,ge){if(!ce||!ge)return ce;const Te=ge.length,Oe=ce.length;if(Te===0||Oe===0)return ce;let Xe=Oe,rt=-1;for(;!(rt=ce.lastIndexOf(ge,Xe-1),rt===-1||rt+Te!==Xe);){if(rt===0)return"";Xe=rt}return ce.substring(0,Xe)}function n(ce){return ce.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function T(ce){return ce.replace(/\*/g,"")}function v(ce,ge,Te={}){if(!ce)throw new Error("Cannot create regex from empty string");ge||(ce=W(ce)),Te.wholeWord&&(/\B/.test(ce.charAt(0))||(ce="\\b"+ce),/\B/.test(ce.charAt(ce.length-1))||(ce=ce+"\\b"));let Oe="";return Te.global&&(Oe+="g"),Te.matchCase||(Oe+="i"),Te.multiline&&(Oe+="m"),Te.unicode&&(Oe+="u"),new RegExp(ce,Oe)}function f(ce){if(ce.source==="^"||ce.source==="^$"||ce.source==="$"||ce.source==="^\\s*$")return!1;const ge=ce.exec("");return!!(ge&&ce.lastIndex===0)}function p(ce){return(ce.global?"g":"")+(ce.ignoreCase?"i":"")+(ce.multiline?"m":"")+(ce.unicode?"u":"")}function c(ce){return ce.split(/\r\n|\r|\n/)}function s(ce){for(let ge=0,Te=ce.length;ge<Te;ge++){const Oe=ce.charCodeAt(ge);if(Oe!==32&&Oe!==9)return ge}return-1}function d(ce,ge=0,Te=ce.length){for(let Oe=ge;Oe<Te;Oe++){const Xe=ce.charCodeAt(Oe);if(Xe!==32&&Xe!==9)return ce.substring(ge,Oe)}return ce.substring(ge,Te)}function u(ce,ge=ce.length-1){for(let Te=ge;Te>=0;Te--){const Oe=ce.charCodeAt(Te);if(Oe!==32&&Oe!==9)return Te}return-1}function l(ce,ge){return ce<ge?-1:ce>ge?1:0}function a(ce,ge,Te=0,Oe=ce.length,Xe=0,rt=ge.length){for(;Te<Oe&&Xe<rt;Te++,Xe++){let bt=ce.charCodeAt(Te),yt=ge.charCodeAt(Xe);if(bt<yt)return-1;if(bt>yt)return 1}const st=Oe-Te,nt=rt-Xe;return st<nt?-1:st>nt?1:0}function i(ce,ge){return R(ce,ge,0,ce.length,0,ge.length)}function R(ce,ge,Te=0,Oe=ce.length,Xe=0,rt=ge.length){for(;Te<Oe&&Xe<rt;Te++,Xe++){let bt=ce.charCodeAt(Te),yt=ge.charCodeAt(Xe);if(bt===yt)continue;if(bt>=128||yt>=128)return a(ce.toLowerCase(),ge.toLowerCase(),Te,Oe,Xe,rt);O(bt)&&(bt-=32),O(yt)&&(yt-=32);const Ne=bt-yt;if(Ne===0)continue;return Ne}const st=Oe-Te,nt=rt-Xe;return st<nt?-1:st>nt?1:0}function O(ce){return ce>=97&&ce<=122}function w(ce){return ce>=65&&ce<=90}function M(ce,ge){return ce.length===ge.length&&R(ce,ge)===0}function L(ce,ge){const Te=ge.length;return ge.length>ce.length?!1:R(ce,ge,0,Te)===0}function _(ce,ge){let Te,Oe=Math.min(ce.length,ge.length);for(Te=0;Te<Oe;Te++)if(ce.charCodeAt(Te)!==ge.charCodeAt(Te))return Te;return Oe}function b(ce,ge){let Te,Oe=Math.min(ce.length,ge.length);const Xe=ce.length-1,rt=ge.length-1;for(Te=0;Te<Oe;Te++)if(ce.charCodeAt(Xe-Te)!==ge.charCodeAt(rt-Te))return Te;return Oe}function g(ce){return 55296<=ce&&ce<=56319}function h(ce){return 56320<=ce&&ce<=57343}function C(ce,ge){return(ce-55296<<10)+(ge-56320)+65536}function x(ce,ge,Te){const Oe=ce.charCodeAt(Te);if(g(Oe)&&Te+1<ge){const Xe=ce.charCodeAt(Te+1);if(h(Xe))return C(Oe,Xe)}return Oe}function m(ce,ge){const Te=ce.charCodeAt(ge-1);if(h(Te)&&ge>1){const Oe=ce.charCodeAt(ge-2);if(g(Oe))return C(Oe,Te)}return Te}function P(ce,ge){const Te=K.getInstance(),Oe=ge,Xe=ce.length,rt=x(ce,Xe,ge);ge+=rt>=65536?2:1;let st=Te.getGraphemeBreakType(rt);for(;ge<Xe;){const nt=x(ce,Xe,ge),bt=Te.getGraphemeBreakType(nt);if(U(st,bt))break;ge+=nt>=65536?2:1,st=bt}return ge-Oe}function k(ce,ge){const Te=K.getInstance(),Oe=ge,Xe=m(ce,ge);ge-=Xe>=65536?2:1;let rt=Te.getGraphemeBreakType(Xe);for(;ge>0;){const st=m(ce,ge),nt=Te.getGraphemeBreakType(st);if(U(nt,rt))break;ge-=st>=65536?2:1,rt=nt}return Oe-ge}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 S(ce){return y.test(ce)}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 A(ce){return F.test(ce)}const X=/^[\t\n\r\x20-\x7E]*$/;function ne(ce){return X.test(ce)}const fe=/[\u2028\u2029]/;function ye(ce){return fe.test(ce)}function Pe(ce){for(let ge=0,Te=ce.length;ge<Te;ge++)if(xe(ce.charCodeAt(ge)))return!0;return!1}function xe(ce){return ce=+ce,ce>=11904&&ce<=55215||ce>=63744&&ce<=64255||ce>=65281&&ce<=65374}function Ie(ce){return ce>=127462&&ce<=127487||ce===8986||ce===8987||ce===9200||ce===9203||ce>=9728&&ce<=10175||ce===11088||ce===11093||ce>=127744&&ce<=128591||ce>=128640&&ce<=128764||ce>=128992&&ce<=129003||ce>=129280&&ce<=129535||ce>=129648&&ce<=129750}const Me=String.fromCharCode(65279);function ke(ce){return!!(ce&&ce.length>0&&ce.charCodeAt(0)===65279)}function Ee(ce,ge=!1){return ce?(ge&&(ce=ce.replace(/\\./g,"")),ce.toLowerCase()!==ce):!1}function J(ce){const ge=90-65+1;return ce=ce%(2*ge),ce<ge?String.fromCharCode(97+ce):String.fromCharCode(65+ce-ge)}function I(ce){const ge=K.getInstance();return ge.getGraphemeBreakType(ce)}function U(ce,ge){return ce===0?ge!==5&&ge!==7:ce===2&&ge===3?!1:ce===4||ce===2||ce===3||(ge===4||ge===2||ge===3)?!0:ce===8&&(ge===8||ge===9||ge===11||ge===12)||((ce===11||ce===9)&&(ge===9||ge===10)||((ce===12||ce===10)&&ge===10||(ge===5||ge===13||(ge===7||(ce===1||ce===13&&ge===14)))))?!1:!(ce===6&&ge===6)}class K{constructor(){this._data=q()}static getInstance(){return K._INSTANCE||(K._INSTANCE=new K),K._INSTANCE}getGraphemeBreakType(ce){if(ce<32)return ce===10?3:ce===13?2:4;if(ce<127)return 0;const ge=this._data,Te=ge.length/3;let Oe=1;for(;Oe<=Te;)if(ce<ge[3*Oe])Oe=2*Oe;else if(ce>ge[3*Oe+1])Oe=2*Oe+1;else return ge[3*Oe+2];return 0}}K._INSTANCE=null;function q(){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 V(ce,ge){if(ce===0)return 0;const Te=ue(ce,ge);if(Te!==void 0)return Te;const Oe=m(ge,ce);return ce-=Ae(Oe),ce}function ue(ce,ge){let Te=m(ge,ce);for(ce-=Ae(Te);Ue(Te)||Te===65039||Te===8419;){if(ce===0)return;Te=m(ge,ce),ce-=Ae(Te)}if(!Ie(Te))return;if(ce>=0){const Oe=m(ge,ce);Oe===8205&&(ce-=Ae(Oe))}return ce}function Ae(ce){return ce>=65536?2:1}function Ue(ce){return 127995<=ce&&ce<=127999}},Nmxd:function(Be,he){Be.exports="data:image/png;base64,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"},NvD2:function(Be,he,B){"use strict";B.d(he,"a",function(){return D});var Z=B("Kwbf");function z(G,j){var n=new Set;return G.forEach(function(T){j.has(T)||n.add(T)}),n}function N(G){var j=G||{},n=j.disabled,T=j.disableCheckbox,v=j.checkable;return!!(n||T)||v===!1}function Y(G,j,n,T){for(var v=new Set(G),f=new Set,p=0;p<=n;p+=1){var c=j.get(p)||new Set;c.forEach(function(l){var a=l.key,i=l.node,R=l.children,O=R===void 0?[]:R;v.has(a)&&!T(i)&&O.filter(function(w){return!T(w.node)}).forEach(function(w){v.add(w.key)})})}for(var s=new Set,d=n;d>=0;d-=1){var u=j.get(d)||new Set;u.forEach(function(l){var a=l.parent,i=l.node;if(T(i)||!l.parent||s.has(l.parent.key))return;if(T(l.parent.node)){s.add(a.key);return}var R=!0,O=!1;(a.children||[]).filter(function(w){return!T(w.node)}).forEach(function(w){var M=w.key,L=v.has(M);R&&!L&&(R=!1),!O&&(L||f.has(M))&&(O=!0)}),R&&v.add(a.key),O&&f.add(a.key),s.add(a.key)})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(z(f,v))}}function W(G,j,n,T,v){for(var f=new Set(G),p=new Set(j),c=0;c<=T;c+=1){var s=n.get(c)||new Set;s.forEach(function(a){var i=a.key,R=a.node,O=a.children,w=O===void 0?[]:O;!f.has(i)&&!p.has(i)&&!v(R)&&w.filter(function(M){return!v(M.node)}).forEach(function(M){f.delete(M.key)})})}p=new Set;for(var d=new Set,u=T;u>=0;u-=1){var l=n.get(u)||new Set;l.forEach(function(a){var i=a.parent,R=a.node;if(v(R)||!a.parent||d.has(a.parent.key))return;if(v(a.parent.node)){d.add(i.key);return}var O=!0,w=!1;(i.children||[]).filter(function(M){return!v(M.node)}).forEach(function(M){var L=M.key,_=f.has(L);O&&!_&&(O=!1),!w&&(_||p.has(L))&&(w=!0)}),O||f.delete(i.key),w&&p.add(i.key),d.add(i.key)})}return{checkedKeys:Array.from(f),halfCheckedKeys:Array.from(z(p,f))}}function D(G,j,n,T){var v=[],f;T?f=T:f=N;var p=new Set(G.filter(function(u){var l=!!n[u];return l||v.push(u),l})),c=new Map,s=0;Object.keys(n).forEach(function(u){var l=n[u],a=l.level,i=c.get(a);i||(i=new Set,c.set(a,i)),i.add(l),s=Math.max(s,a)}),Object(Z.a)(!v.length,"Tree missing follow keys: ".concat(v.slice(0,100).map(function(u){return"'".concat(u,"'")}).join(", ")));var d;return j===!0?d=Y(p,c,s,f):d=W(p,j.halfCheckedKeys,c,s,f),d}},OLES:function(Be,he,B){"use strict";var Z=B("U8pU"),z=B("VTBJ"),N=B("Ff2n"),Y=B("q1tI"),W=B("uciX"),D=B("7ixt"),G=function(p){var c=p.overlay,s=p.prefixCls,d=p.id,u=p.overlayInnerStyle;return Y.createElement("div",{className:"".concat(s,"-inner"),id:d,role:"tooltip",style:u},typeof c=="function"?c():c)},j=G,n=function(p,c){var s=p.overlayClassName,d=p.trigger,u=d===void 0?["hover"]:d,l=p.mouseEnterDelay,a=l===void 0?0:l,i=p.mouseLeaveDelay,R=i===void 0?.1:i,O=p.overlayStyle,w=p.prefixCls,M=w===void 0?"rc-tooltip":w,L=p.children,_=p.onVisibleChange,b=p.afterVisibleChange,g=p.transitionName,h=p.animation,C=p.placement,x=C===void 0?"right":C,m=p.align,P=m===void 0?{}:m,k=p.destroyTooltipOnHide,y=k===void 0?!1:k,S=p.defaultVisible,F=p.getTooltipContainer,A=p.overlayInnerStyle,X=Object(N.a)(p,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),ne=Object(Y.useRef)(null);Object(Y.useImperativeHandle)(c,function(){return ne.current});var fe=Object(z.a)({},X);"visible"in p&&(fe.popupVisible=p.visible);var ye=function(){var ke=p.arrowContent,Ee=ke===void 0?null:ke,J=p.overlay,I=p.id;return[Y.createElement("div",{className:"".concat(M,"-arrow"),key:"arrow"},Ee),Y.createElement(j,{key:"content",prefixCls:M,id:I,overlay:J,overlayInnerStyle:A})]},Pe=!1,xe=!1;if(typeof y=="boolean")Pe=y;else if(y&&Object(Z.a)(y)==="object"){var Ie=y.keepParent;Pe=Ie===!0,xe=Ie===!1}return Y.createElement(W.a,Object.assign({popupClassName:s,prefixCls:M,popup:ye,action:u,builtinPlacements:D.a,popupPlacement:x,ref:ne,popupAlign:P,getPopupContainer:F,onPopupVisibleChange:_,afterPopupVisibleChange:b,popupTransitionName:g,popupAnimation:h,defaultPopupVisible:S,destroyPopupOnHide:Pe,autoDestroy:xe,mouseLeaveDelay:R,popupStyle:O,mouseEnterDelay:a},fe),L)},T=Object(Y.forwardRef)(n),v=he.a=T},OZM5:function(Be,he,B){"use strict";B.d(he,"b",function(){return T}),B.d(he,"a",function(){return v}),B.d(he,"k",function(){return f}),B.d(he,"h",function(){return p}),B.d(he,"i",function(){return c}),B.d(he,"g",function(){return s}),B.d(he,"c",function(){return d}),B.d(he,"d",function(){return u}),B.d(he,"j",function(){return i}),B.d(he,"e",function(){return R}),B.d(he,"f",function(){return O});var Z=B("KQm4"),z=B("U8pU"),N=B("Ff2n"),Y=B("q1tI"),W=B.n(Y),D=B("Kwbf"),G=B("WaYH"),j=.25,n=2;function T(w,M){var L=w.slice(),_=L.indexOf(M);return _>=0&&L.splice(_,1),L}function v(w,M){var L=w.slice();return L.indexOf(M)===-1&&L.push(M),L}function f(w){return w.split("-")}function p(w,M){return"".concat(w,"-").concat(M)}function c(w){return w&&w.type&&w.type.isTreeNode}function s(w,M){var L=[w],_=M[w];function b(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];g.forEach(function(h){var C=h.key,x=h.children;L.push(C),b(x)})}return b(_.children),L}function d(w,M){var L=w.clientY,_=M.selectHandle.getBoundingClientRect(),b=_.top,g=_.bottom,h=_.height,C=Math.max(h*j,n);return L<=b+C?-1:L>=g-C?1:0}function u(w,M){if(!w)return;var L=M.multiple;return L?w.slice():w.length?[w[0]]:w}var l=function(M){return M};function a(w,M){if(!w)return[];var L=M||{},_=L.processProps,b=_===void 0?l:_,g=Array.isArray(w)?w:[w];return g.map(function(h){var C=h.children,x=Object(N.a)(h,["children"]),m=a(C,M);return W.a.createElement(G.a,Object.assign({},b(x)),m)})}function i(w){if(!w)return null;var M;if(Array.isArray(w))M={checkedKeys:w,halfCheckedKeys:void 0};else if(Object(z.a)(w)==="object")M={checkedKeys:w.checked||void 0,halfCheckedKeys:w.halfChecked||void 0};else return Object(D.a)(!1,"`checkedKeys` is not an array or an object"),null;return M}function R(w,M){var L=new Set;function _(b){if(L.has(b))return;var g=M[b];if(!g)return;L.add(b);var h=g.parent,C=g.node;if(C.disabled)return;h&&_(h.key)}return(w||[]).forEach(function(b){_(b)}),Object(Z.a)(L)}function O(w){var M={};return Object.keys(w).forEach(function(L){(L.startsWith("data-")||L.startsWith("aria-"))&&(M[L]=w[L])}),M}},Ohmc:function(Be,he,B){Be.exports=B.p+"static/certificate.fc32dc1b.jpg"},Ot1p:function(Be,he,B){"use strict";var Z=B("2qtc"),z=B("kLXV"),N=B("rAM+"),Y=B("miYZ"),W=B("tsqr"),D=B("9og8"),G=B("tJVT"),j=B("jrin"),n=B("WmNS"),T=B.n(n),v=B("q1tI"),f=B.n(v),p=B("VrN/"),c=B.n(p),s=B("bdgK"),d=B("p77/"),u=B("Bd2K"),l=B("ELLl"),a=B("19Vz"),i=B("lZu9"),R=B("+NIl"),O=B("kSUc"),w=B("9Bee"),M=function(_e){var Le=_e.value,Ye=Le===void 0?"":Le,lt=_e.className,Et=_e.showTextOnly,vt=_e.showLines,ft=_e.style,ze=ft===void 0?{}:ft,Qe=Object(v.useMemo)(function(){return""},[Ye]);return f.a.createElement(f.a.Fragment,null,f.a.createElement("div",{dangerouslySetInnerHTML:{__html:Qe}}))},L=B("0Owb"),_=B("dejd"),b=B("C+DQ"),g=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(_e){var Le=_e.onActionCallback,Ye=_e.title,lt=_e.icon,Et=_e.actionName,vt=_e.className,ft=vt===void 0?"":vt,ze=_e.children;function Qe(){Le(Et)}return f.a.createElement("a",{title:Ye,className:ft,onClick:Qe},f.a.createElement("i",{className:"md-iconfont ".concat(lt)}),ze)}var m=function(_e){var Le=_e.watch,Ye=_e.showNullButton,lt=_e.onActionCallback,Et=_e.fullScreen,vt=_e.insertTemp,ft=_e.hidetoolBar,ze=_e.uuid,Qe=_e.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(g.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(g.F)("_educoder_session"),"&key=").concat(ze,"&api=").concat(encodeURIComponent(h.a.PROXY_SERVER)));var He=[].concat(C,[{title:"".concat(Le?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Le?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return f.a.createElement("ul",{className:"markdown-toolbar-container"},!ft&&He.map(function(me,we){return f.a.createElement("li",{key:we},me.actionName?f.a.createElement(x,Object(L.a)({},me,{onActionCallback:lt})):f.a.createElement("span",{className:"v-line"}))}),Ye?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:lt},f.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,vt&&f.a.createElement("li",null,f.a.createElement(x,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(vt),onActionCallback:lt},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(Et?"icon-shrink":"icon-enlarge"),title:Et?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:lt})))},P=B("M8RZ"),k=B("+L6B"),y=B("2/Rp"),S=B("y8nQ"),F=B("Vl3Y"),A=B("5NDa"),X=B("5rEg"),ne={labelCol:{span:4},wrapperCol:{span:20}},fe=function(_e){var Le=_e.callback,Ye=_e.onCancel;function lt(Et){Le(Et)}return f.a.createElement(F.a,Object(L.a)({},ne,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:lt}),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(X.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(X.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:Ye},"\u53D6\u6D88")))},ye=B("7ahc"),Pe=B("HmJG"),xe=B("BjJ7"),Ie=F.a.useForm,Me={width:280,marginRight:10},ke={labelCol:{span:5},wrapperCol:{span:19}},Ee=function(_e){var Le=_e.callback,Ye=_e.onCancel,lt=Ie(),Et=Object(G.a)(lt,1),vt=Et[0];function ft(He){Le(He)}function ze(He,me){if(He.status===-1){W.b.error(He.message);return}vt.setFieldsValue({src:"/api/attachments/".concat(He.id),type:me.type})}function Qe(He){var me=He.target.files[0];I(me,ze)}return f.a.createElement(F.a,Object(L.a)({form:vt},ke,{className:"upload-image-panel",onFinish:ft}),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(X.a,{style:Me})),f.a.createElement(J,{onFileChange:Qe}))),f.a.createElement(F.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},f.a.createElement(X.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:Ye},"\u53D6\u6D88")))};function J(_e){var Le=_e.onFileChange;return f.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",f.a.createElement("input",{type:"file",onChange:Le}))}function I(_e,Le){if(!_e)throw new String("\u6CA1\u6709\u6587\u4EF6");var Ye=new FormData;Ye.append("editormd-image-file",_e),Ye.append("file_param_name","editormd-image-file"),Ye.append("byxhr","true");var lt=new window.XMLHttpRequest;lt.withCredentials=!0,lt.addEventListener("load",function(Et){Le(JSON.parse(Et.target.responseText),_e)},!1),lt.addEventListener("error",function(Et){console.error(Et)},!1),lt.open("POST","".concat(xe.a,"/api/attachments.json")),lt.send(Ye)}var U=B("giR+"),K=B("fyUT"),q=B("7Kak"),V=B("9yH6"),ue=V.a.Group,Ae={margin:"0 8px"},Ue=function(_e){var Le=_e.callback,Ye=_e.onCancel;function lt(Et){Le(Et)}return f.a.createElement(F.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:lt},f.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},f.a.createElement("span",{style:Ae},"\u5355\u5143\u683C\u6570\uFF1A"),f.a.createElement("span",{style:Ae},"\u884C\u6570"),f.a.createElement(F.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},f.a.createElement(K.a,null)),f.a.createElement("span",{style:Ae},"\u5217\u6570"),f.a.createElement(F.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},f.a.createElement(K.a,null))),f.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},f.a.createElement("span",{style:Ae},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),f.a.createElement(F.a.Item,{name:"align"},f.a.createElement(ue,null,f.a.createElement(V.a,{value:"default"},f.a.createElement("i",{className:"fa fa-align-justify"})),f.a.createElement(V.a,{value:"left"},f.a.createElement("i",{className:"fa fa-align-left"})),f.a.createElement(V.a,{value:"center"},f.a.createElement("i",{className:"fa fa-align-center"})),f.a.createElement(V.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:Ye},"\u53D6\u6D88")))},ce=B("ErOA"),ge=B("7Cbv"),Te="link",Oe="upload-image",Xe="code-block",rt="add-table",st="------------",nt={default:st,left:":".concat(st),center:":".concat(st,":"),right:"".concat(st,":")},bt=B("9VGf"),yt,Ne;function Re(){}var Je=0,tt=1e4,le="\u2581",$=`
**\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 te(_e){return/^\d+$/.test(_e)?"".concat(_e,"px"):_e}var ae=navigator.platform.toUpperCase().indexOf("MAC")>=0,de=ae?"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"],se=(yt={},Object(j.a)(yt,de+"-B","bold"),Object(j.a)(yt,de+"-I","italic"),yt),pe=(Ne={},Object(j.a)(Ne,Te,"\u6DFB\u52A0\u94FE\u63A5"),Object(j.a)(Ne,Xe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(j.a)(Ne,Oe,"\u6DFB\u52A0\u6587\u4EF6"),Object(j.a)(Ne,rt,"\u6DFB\u52A0\u8868\u683C"),Ne),be=he.a=function(_e){var Le=_e.defaultValue,Ye=Le===void 0?"":Le,lt=_e.onChange,Et=_e.width,vt=Et===void 0?"100%":Et,ft=_e.height,ze=ft===void 0?400:ft,Qe=_e.miniToolbar,He=Qe===void 0?!1:Qe,me=_e.isFocus,we=me===void 0?!1:me,qe=_e.watch,Ge=_e.insertTemp,pt=_e.mode,dt=pt===void 0?"markdown":pt,je=_e.id,Ve=je===void 0?"markdown-editor-id":je,$e=_e.showResizeBar,it=$e===void 0?!1:$e,ut=_e.noStorage,et=ut===void 0?!1:ut,Dt=_e.showNullButton,Xt=Dt===void 0?!1:Dt,gt=_e.hidetoolBar,Ct=gt===void 0?!1:gt,Mt=_e.fullScreen,St=Mt===void 0?!1:Mt,kt=_e.onBlur,Wt=_e.onCMBeforeChange,dn=_e.onFullScreen,$t=_e.className,ot=$t===void 0?"":$t,Pt=_e.disablePaste,Ht=Pt===void 0?!1:Pt,zt=_e.placeholder,Vt=zt===void 0?"":zt,nn=_e.values,rn=nn===void 0?"":nn,Lt=Object(v.useState)(null),En=Object(G.a)(Lt,2),ct=En[0],wn=En[1],pn=Object(v.useState)(Ye),Hn=Object(G.a)(pn,2),Mn=Hn[0],Dn=Hn[1],Un=Object(v.useState)(qe),kn=Object(G.a)(Un,2),Pn=kn[0],Sn=kn[1],br=Object(v.useState)(St),In=Object(G.a)(br,2),_n=In[0],or=In[1],di=Object(v.useState)(""),Fr=Object(G.a)(di,2),Gn=Fr[0],Ar=Fr[1],hi=Object(v.useState)(0),Cr=Object(G.a)(hi,2),nr=Cr[0],Gr=Cr[1],fi=Object(v.useState)(ze),zr=Object(G.a)(fi,2),Vr=zr[0],pi=zr[1],Or=Object(v.useState)(!1),qr=Object(G.a)(Or,2),$r=qr[0],hr=qr[1],Qn=Object(v.useRef)(Object(ge.a)()),Yt=Object(v.useRef)(!1),Rr=Object(v.useRef)(),Er=Object(v.useRef)(),Ce=Object(v.useRef)(),On=Object(v.useRef)(),ei=Object(v.useRef)(),mi=function(){var Bt=Object(D.a)(T.a.mark(function Jt(){var Kt,en;return T.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Tn.next=2,Object(ce.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Qn.current}});case 2:en=Tn.sent,en!=null&&(Kt=en.attachments)!==null&&Kt!==void 0&&Kt.length&&(console.log("cm:",ct,Er),en.attachments.map(function(sn){sn.content_type.indexOf("image")>-1?ct.replaceSelection("![,](/api/attachments/".concat(sn.id,"?type=").concat(sn.content_type,")")):sn.content_type.indexOf("video")>-1?ct.replaceSelection('<video width="100%" controls src="'.concat(h.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):sn.content_type.indexOf("pdf")>-1?ct.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(sn.id,"?type=").concat(sn.content_type,'&disposition=inline" target="_blank">').concat(sn.name,"</a>")):ct.replaceSelection("[".concat(sn.name,"](").concat(h.a.API_SERVER,"/api/attachments/").concat(sn.id,"?type=").concat(sn.content_type,")"))}));case 4:case"end":return Tn.stop()}},Jt)}));return function(){return Bt.apply(this,arguments)}}();Object(v.useEffect)(function(){Dn(rn),ct==null||ct.setValue(rn)},[rn]),Object(v.useEffect)(function(){dn==null||dn(_n)},[_n]),Object(v.useEffect)(function(){if(Er.current){var Bt=c.a.fromTextArea(Er.current,{mode:dt,lineNumbers:!He,lineWrapping:!0,value:Ye,autoCloseTags:!0,autoCloseBrackets:!0});we&&Bt.focus();function Jt(Kt,en){if(Ht){en.preventDefault();return}var an=en.clipboardData;if(an){var Tn=an.types.toString(),sn=an.items;if(Tn==="Files"||an.types.indexOf("Files")>-1){if(en.preventDefault(),dt=="stex")return;try{var Bn,qn=sn[1];((Bn=sn[0])===null||Bn===void 0?void 0:Bn.kind)==="file"&&(qn=sn[0]);var tn=qn.getAsFile(),_r=tn.name.split(".").pop();I(tn,function(yn){if(yn.id){var Fn,Yn,mr;(tn==null||((Fn=tn.type)===null||Fn===void 0)?void 0:Fn.indexOf("image"))>-1?Bt.replaceSelection("![,](/api/attachments/".concat(yn.id,"?type=").concat(yn.content_type,")")):(tn==null||((Yn=tn.type)===null||Yn===void 0)?void 0:Yn.indexOf("video"))>-1?Bt.replaceSelection('<video width="100%" controls src="'.concat(h.a.API_SERVER,"/api/attachments/").concat(yn.id,'"></video>')):(tn==null||((mr=tn.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?Bt.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(tn.type,'&disposition=inline" target="_blank">').concat(tn.name,"</a>")):ie.includes(_r)?Bt.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(yn.id,'?type=office&disposition=inline" target="_blank">').concat(tn.name,"</a>")):Bt.replaceSelection("[".concat(tn.name,"](").concat(h.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(yn.content_type,")"))}else(yn==null?void 0:yn.status)===401&&(document.location.href="/user/login")})}catch(yn){W.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Bt.on("paste",Jt),Bt.on("dragleave",function(Kt,en){Ce.current.classList.remove("mouse-hover-md")}),Bt.on("dragover",function(Kt,en){Ce.current.classList.add("mouse-hover-md")}),Bt.on("drop",function(Kt,en){Ce.current.classList.add("mouse-hover-md");var an;if(an=en.dataTransfer.files,an.length>0){en.preventDefault(),en.stopPropagation();for(var Tn=function(qn){var tn=an[qn],_r=tn.name.split(".").pop();I(tn,function(yn){if(yn.id){var Fn,Yn,mr;(tn==null||((Fn=tn.type)===null||Fn===void 0)?void 0:Fn.indexOf("image"))>-1?Bt.replaceSelection("![,](/api/attachments/".concat(yn.id,"?type=").concat(yn.content_type,")")):(tn==null||((Yn=tn.type)===null||Yn===void 0)?void 0:Yn.indexOf("video"))>-1?Bt.replaceSelection('<video width="100%" controls src="'.concat(h.a.API_SERVER,"/api/attachments/").concat(yn.id,'"></video>')):(tn==null||((mr=tn.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?Bt.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(tn.type,'&disposition=inline" target="_blank">').concat(tn.name,"</a>")):ie.includes(_r)?Bt.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(yn.id,'?type=office&disposition=inline" target="_blank">').concat(tn.name,"</a>")):Bt.replaceSelection("[".concat(tn.name,"](").concat(h.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(yn.content_type,")"))}else(yn==null?void 0:yn.status)===401&&(document.location.href="/user/login")})},sn=0;sn<an.length;sn++)Tn(sn)}}),wn(Bt),function(){Bt.off("paste",Jt)}}},[]);var ln=Object(v.useCallback)(function(){if(Ce.current)try{}catch(Bt){console.log(Bt,"---- to set md editor body height")}},[Vr,Ce,_n]);Object(v.useEffect)(function(){function Bt(){var Kt=new s.default(function(en){var an=Object(N.a)(en),Tn;try{for(an.s();!(Tn=an.n()).done;){var sn=Tn.value;(sn.target.offsetHeight>0||sn.target.offsetWidth>0)&&(ln(),ct.setSize("100%","100%"),ct.refresh())}}catch(Bn){an.e(Bn)}finally{an.f()}});return Kt.observe(Er.current.parentElement),Kt}if(ct){var Jt=Bt();return function(){Jt.unobserve(Er.current.parentElement)}}},[ct,ln]),Object(v.useEffect)(function(){if(ct){for(var Bt=[],Jt=function(){var sn=en[Kt];an=Object(G.a)(sn,2);var Bn=an[0],qn=an[1],tn=Object(j.a)({},Bn,function(){ti(qn)});Bt.push(tn),ct.addKeyMap(tn)},Kt=0,en=Object.entries(se);Kt<en.length;Kt++){var an;Jt()}return Rr.current=setInterval(function(){Yt.current&&mi()},4e3),function(){clearInterval(Rr.current);var Tn=Object(N.a)(Bt),sn;try{for(Tn.s();!(sn=Tn.n()).done;){var Bn=sn.value;ct.removeKeyMap(Bn)}}catch(qn){Tn.e(qn)}finally{Tn.f()}}}},[ct]),Object(v.useEffect)(function(){St!==_n&&or(St)},[St]),Object(bt.a)(function(){if(!et&&nr>0){var Bt=new Date().getTime(),Jt=window.sessionStorage.getItem(Ve);Bt>=nr+tt&&(!Jt||Jt!==Mn)&&(window.sessionStorage.setItem(Ve,Mn),hr(!0))}},tt),Object(v.useEffect)(function(){Sn(qe)},[ct,qe]),Object(v.useEffect)(function(){ct&&(we&&ct.focus())},[ct,we]),Object(v.useEffect)(function(){if(Pn&&ct){var Bt=ct.getScrollerElement();function Jt(Kt){var en=Kt.target;if(ei.current){var an=en.scrollTop/en.scrollHeight;ei.current.scrollTop=ei.current.scrollHeight*an}}return Bt.addEventListener("scroll",Jt),function(){Bt.removeEventListener("scroll",Jt)}}},[ct,Pn]),Object(v.useEffect)(function(){if(ct&&Wt){function Bt(Jt,Kt){Wt(Jt,Kt)}return ct.on("beforeChange",Bt),function(){ct.off("beforeChange",Bt)}}},[ct,Wt]),Object(v.useEffect)(function(){if(ct&&kt){function Bt(){kt(ct.getValue())}return ct.on("blur",Bt),function(){ct.off("blur",Bt)}}},[ct,kt]),Object(v.useEffect)(function(){if(ct){function Bt(Jt){var Kt=Jt.getValue();Dn(Kt),Gr(new Date().getTime()),Jt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),lt&&lt(Kt)}return ct.on("change",Bt),function(){ct.off("change",Bt)}}},[ct,lt]),Object(v.useEffect)(function(){ct&&(Ye==null?(ct.setValue(""),Dn("")):Ye!==ct.getValue()&&(ct.setValue(Ye),Dn(Ye),ct.setCursor(ct.lineCount(),0)))},[ct,Ye]);var ti=Object(v.useCallback)(function(Bt){var Jt=ct.getCursor(),Kt=ct.getSelection(),en=Kt.split(`
`);switch(Bt){case"bold":return ct.replaceSelection("**"+Kt+"**"),Kt===""&&ct.setCursor(Jt.line,Jt.ch+2),ct.focus();case"italic":return ct.replaceSelection("*"+Kt+"*"),Kt===""&&ct.setCursor(Jt.line,Jt.ch+1),ct.focus();case"code":return ct.replaceSelection("`"+Kt+"`"),Kt===""&&ct.setCursor(Jt.line,Jt.ch+1),ct.focus();case"inline-latex":return ct.replaceSelection("`$$"+Kt+"$$`"),Kt===""&&ct.setCursor(Jt.line,Jt.ch+3),ct.focus();case"latex":return ct.replaceSelection("```latex\n"+Kt+"\n```"),ct.setCursor(Jt.line+1,Kt.length+1),ct.focus();case"line-break":return ct.replaceSelection(`<br/>
`),ct.focus();case"list-ul":return Kt===""?ct.replaceSelection("- "+Kt):ct.replaceSelection(en.map(function(an){return an===""?"":"- ".concat(an)}).join(`
`)),ct.focus();case"list-ol":return Kt===""?ct.replaceSelection("1. "+Kt):ct.replaceSelection(en.map(function(an,Tn){return an===""?"":"".concat(Tn+1,". ").concat(an)}).join(`
`)),ct.focus();case"add-null-ch":return Kt===""&&ct.setCursor(Jt.line,Jt.ch+1),ct.replaceSelection(le),ct.focus();case"inster-template-1":return Kt===""&&ct.setCursor(Jt.line,Jt.ch),ct.replaceSelection($),ct.focus();case"eraser":return ct.setValue(""),ct.focus();case"trigger-watch":return Sn(!Pn),ct.focus();case"trigger-full-screen":return or(!_n),ct.focus();case Te:Ar(Te);return;case Xe:Ar(Xe);return;case Oe:Ar(Oe);return;case rt:Ar(rt);return;default:throw new Error}},[ct,Pn,_n]),kr=Object(v.useCallback)(function(Bt){Ar("");switch(Gn){case Te:var Jt=Bt.title,Kt=Bt.link;return ct.replaceSelection("[".concat(Jt,"](").concat(Kt,")")),ct.focus();case Xe:var en=Bt.language,an=Bt.content;return ct.replaceSelection(["```"+en,an,"```"].join(`
`)),ct.focus();case Oe:var Tn=Bt.src,sn=Bt.alt;return sn?ct.replaceSelection("![ ".concat(sn," ]( ").concat(Tn,' "').concat(sn,'" )')):ct.replaceSelection("![,](".concat(Tn,")")),ct.focus();case rt:for(var Bn=Bt.row,qn=Bt.col,tn=Bt.align,_r=`
`,yn=0;yn<Bn;yn++){for(var Fn=[],Yn=[],mr=0;mr<qn;mr++)yn===1&&Yn.push(nt[tn]),Fn.push(" ");yn===1&&(_r+="| ".concat(Yn.join(" | "),` |
`)),_r+="| ".concat(Fn.join(qn===1?"":" | "),` |
`)}return ct.replaceSelection(_r+`
`),ct.focus();default:throw new Error}},[ct,Gn]),jr=Object(v.useMemo)(function(){switch(Gn){case Te:return f.a.createElement(fe,{callback:kr,onCancel:rr});case Xe:return f.a.createElement(ye.b,{callback:kr,onCancel:rr});case Oe:return f.a.createElement(Ee,{callback:kr,onCancel:rr});case rt:return f.a.createElement(Ue,{callback:kr,onCancel:rr});default:return null}},[Gn]);function rr(){Ar("")}Object(v.useEffect)(function(){if(On.current){var Bt=On.current,Jt=!1,Kt=0;function en(sn){Jt=!0,Kt=sn.pageY}function an(){Jt=!1}function Tn(sn){if(Jt){var Bn=sn.pageY-Kt;Bn<0&&(Bn=0),Bn>300&&(Bn=300);var qn=ze+Bn+"px";pi(qn)}}return Bt.addEventListener("mousedown",en),document.addEventListener("mousemove",Tn),document.addEventListener("mouseup",an),function(){Bt.removeEventListener("mousedown",en),document.removeEventListener("mousemove",Tn),document.removeEventListener("mouseup",an)}}},[ct,On]),Object(v.useEffect)(function(){pi(ze)},[ze]);var Ir=te(vt),ni=te(Vr),fr={width:Ir,height:ni},ri=Object(v.useMemo)(function(){if(nr){var Bt=new Date(nr),Jt=Bt.getHours(),Kt=Bt.getMinutes(),en=Bt.getSeconds();return Jt=Jt<10?"0"+Jt:Jt,Kt=Kt<10?"0"+Kt:Kt,en=en<10?"0"+en:en,"".concat(Jt,":").concat(Kt,":").concat(en)}return 0},[nr]);function Dr(){window.sessionStorage.removeItem(Ve),hr(!1),Gr(0)}function pr(){hr(!1),Gr(0),ct.setValue(window.sessionStorage.getItem(Ve))}function ii(Bt,Jt){var Kt=ct.getValue();Kt=Kt.replace(Bt,Jt),Dn(Kt),ct==null||ct.setValue(Kt)}return f.a.createElement(v.Fragment,null,f.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ce},f.a.createElement("div",{className:"markdown-editor-container ".concat(ot," ").concat(Pn?"on-preview":""," ").concat(He?"mini":""," ").concat(_n?"full-screen":""),style:fr},f.a.createElement(m,{insertTemp:Ge,watch:Pn,fullScreen:_n,showNullButton:Xt,onActionCallback:ti,hidetoolBar:Ct,uuid:Qn.current,setOpenPhones:function(){Yt.current=!0}}),f.a.createElement("div",{className:"markdown-editor-body"},f.a.createElement("div",{className:"codemirror-container"},f.a.createElement("textarea",{ref:Er,placeholder:Vt})),Pn?f.a.createElement("div",{ref:ei,className:"preview-container"},dt==="stex"&&f.a.createElement(M,{value:Mn}),dt!=="stex"&&f.a.createElement(w.a,{edit:!0,value:Mn,replaces:ii})):null))),it?f.a.createElement("a",{ref:On,className:"editor-resize"}):null,f.a.createElement(P.a,null,pe[Gn]?f.a.createElement(z.a,{centered:!0,title:pe[Gn],visible:!0,onCancel:rr,footer:null,className:"markdown-popup-form"},jr):null))}},RMFE:function(Be,he){Be.exports="data:image/png;base64,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"},"SA+Z":function(Be,he,B){var Z=B("wTVA"),z=B("EbDI"),N=B("ZhPi"),Y=B("wkBT");function W(D){return Z(D)||z(D)||N(D)||Y()}Be.exports=W,Be.exports.__esModule=!0,Be.exports.default=Be.exports},SJMd:function(Be,he){/**
* @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,z,N=!1,Y,W;window.PR_SHOULD_USE_CONTINUATION=!0;var D,G;(function(){var j=window,n=["break,continue,do,else,for,if,return,while"],T=[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"],v=[T,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],f=[v,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],p=[v,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[v,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],s="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=[v,"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",l=[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"],a=[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"],i=[n,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[f,c,p,d,u,l,a,i],O=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,w="str",M="kwd",L="com",_="typ",b="lit",g="pun",h="pln",C="tag",x="dec",m="src",P="atn",k="atv",y="nocode",S="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function F(ue){for(var Ae=0,Ue=!1,ce=!1,ge=0,Te=ue.length;ge<Te;++ge){var Oe=ue[ge];if(Oe.ignoreCase)ce=!0;else if(/[a-z]/i.test(Oe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ue=!0,ce=!1;break}}var Xe={b:8,t:9,n:10,v:11,f:12,r:13};function rt(Ne){var Re=Ne.charCodeAt(0);if(Re!==92)return Re;var Je=Ne.charAt(1);return Re=Xe[Je],Re||("0"<=Je&&Je<="7"?parseInt(Ne.substring(1),8):Je==="u"||Je==="x"?parseInt(Ne.substring(2),16):Ne.charCodeAt(1))}function st(Ne){if(Ne<32)return(Ne<16?"\\x0":"\\x")+Ne.toString(16);var Re=String.fromCharCode(Ne);return Re==="\\"||Re==="-"||Re==="]"||Re==="^"?"\\"+Re:Re}function nt(Ne){var Re=Ne.substring(1,Ne.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")),Je=[],tt=Re[0]==="^",le=["["];tt&&le.push("^");for(var $=tt?1:0,te=Re.length;$<te;++$){var ae=Re[$];if(/\\[bdsw]/i.test(ae))le.push(ae);else{var de=rt(ae),ie;$+2<te&&Re[$+1]==="-"?(ie=rt(Re[$+2]),$+=2):ie=de,Je.push([de,ie]),ie<65||de>122||(ie<65||de>90||Je.push([Math.max(65,de)|32,Math.min(ie,90)|32]),ie<97||de>122||Je.push([Math.max(97,de)&~32,Math.min(ie,122)&~32]))}}Je.sort(function(_e,Le){return _e[0]-Le[0]||Le[1]-_e[1]});for(var se=[],pe=[],$=0;$<Je.length;++$){var be=Je[$];be[0]<=pe[1]+1?pe[1]=Math.max(pe[1],be[1]):se.push(pe=be)}for(var $=0;$<se.length;++$){var be=se[$];le.push(st(be[0])),be[1]>be[0]&&(be[1]+1>be[0]&&le.push("-"),le.push(st(be[1])))}return le.push("]"),le.join("")}function bt(Ne){for(var Re=Ne.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")),Je=Re.length,tt=[],le=0,$=0;le<Je;++le){var te=Re[le];if(te==="(")++$;else if(te.charAt(0)==="\\"){var ae=+te.substring(1);ae&&(ae<=$?tt[ae]=-1:Re[le]=st(ae))}}for(var le=1;le<tt.length;++le)tt[le]===-1&&(tt[le]=++Ae);for(var le=0,$=0;le<Je;++le){var te=Re[le];if(te==="(")++$,tt[$]||(Re[le]="(?:");else if(te.charAt(0)==="\\"){var ae=+te.substring(1);ae&&ae<=$&&(Re[le]="\\"+tt[ae])}}for(var le=0;le<Je;++le)Re[le]==="^"&&Re[le+1]!=="^"&&(Re[le]="");if(Ne.ignoreCase&&Ue)for(var le=0;le<Je;++le){var te=Re[le],de=te.charAt(0);te.length>=2&&de==="["?Re[le]=nt(te):de!=="\\"&&(Re[le]=te.replace(/[a-zA-Z]/g,function(pe){var be=pe.charCodeAt(0);return"["+String.fromCharCode(be&~32,be|32)+"]"}))}return Re.join("")}for(var yt=[],ge=0,Te=ue.length;ge<Te;++ge){var Oe=ue[ge];if(Oe.global||Oe.multiline)throw new Error(""+Oe);yt.push("(?:"+bt(Oe)+")")}return new RegExp(yt.join("|"),ce?"gi":"g")}function A(ue,Ae){var Ue=/(?:^|\s)nocode(?:\s|$)/,ce=[],ge=0,Te=[],Oe=0;function Xe(rt){var st=rt.nodeType;if(st==1){if(Ue.test(rt.className))return;for(var nt=rt.firstChild;nt;nt=nt.nextSibling)Xe(nt);var bt=rt.nodeName.toLowerCase();(bt==="br"||bt==="li")&&(ce[Oe]=`
`,Te[Oe<<1]=ge++,Te[Oe++<<1|1]=rt)}else if(st==3||st==4){var yt=rt.nodeValue;yt.length&&(Ae?yt=yt.replace(/\r\n?/g,`
`):yt=yt.replace(/[ \t\r\n]+/g," "),ce[Oe]=yt,Te[Oe<<1]=ge,ge+=yt.length,Te[Oe++<<1|1]=rt)}}return Xe(ue),{sourceCode:ce.join("").replace(/\n$/,""),spans:Te}}function X(ue,Ae,Ue,ce,ge){if(!Ue)return;var Te={sourceNode:ue,pre:1,langExtension:null,numberLines:null,sourceCode:Ue,spans:null,basePos:Ae,decorations:null};ce(Te),ge.push.apply(ge,Te.decorations)}var ne=/\S/;function fe(ue){for(var Ae=void 0,Ue=ue.firstChild;Ue;Ue=Ue.nextSibling){var ce=Ue.nodeType;Ae=ce===1?Ae?ue:Ue:ce===3&&ne.test(Ue.nodeValue)?ue:Ae}return Ae===ue?void 0:Ae}function ye(ue,Ae){var Ue={},ce;(function(){for(var Oe=ue.concat(Ae),Xe=[],rt={},st=0,nt=Oe.length;st<nt;++st){var bt=Oe[st],yt=bt[3];if(yt)for(var Ne=yt.length;--Ne>=0;)Ue[yt.charAt(Ne)]=bt;var Re=bt[1],Je=""+Re;rt.hasOwnProperty(Je)||(Xe.push(Re),rt[Je]=null)}Xe.push(/[\0-\uffff]/),ce=F(Xe)})();var ge=Ae.length,Te=function(Oe){for(var Xe=Oe.sourceCode,rt=Oe.basePos,st=Oe.sourceNode,nt=[rt,h],bt=0,yt=Xe.match(ce)||[],Ne={},Re=0,Je=yt.length;Re<Je;++Re){var tt=yt[Re],le=Ne[tt],$=void 0,te;if(typeof le=="string")te=!1;else{var ae=Ue[tt.charAt(0)];if(ae)$=tt.match(ae[1]),le=ae[0];else{for(var de=0;de<ge;++de)if(ae=Ae[de],$=tt.match(ae[1]),$){le=ae[0];break}$||(le=h)}te=le.length>=5&&le.substring(0,5)==="lang-",te&&!($&&typeof $[1]=="string")&&(te=!1,le=m),te||(Ne[tt]=le)}var ie=bt;if(bt+=tt.length,!te)nt.push(rt+ie,le);else{var se=$[1],pe=tt.indexOf(se),be=pe+se.length;$[2]&&(be=tt.length-$[2].length,pe=be-se.length);var _e=le.substring(5);X(st,rt+ie,tt.substring(0,pe),Te,nt),X(st,rt+ie+pe,se,J(_e,se),nt),X(st,rt+ie+be,tt.substring(be),Te,nt)}}Oe.decorations=nt};return Te}function Pe(ue){var Ae=[],Ue=[];ue.tripleQuotedStrings?Ae.push([w,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ue.multiLineStrings?Ae.push([w,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ae.push([w,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ue.verbatimStrings&&Ue.push([w,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ce=ue.hashComments;ce&&(ue.cStyleComments?(ce>1?Ae.push([L,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ae.push([L,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ue.push([w,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ae.push([L,/^#[^\r\n]*/,null,"#"])),ue.cStyleComments&&(Ue.push([L,/^\/\/[^\r\n]*/,null]),Ue.push([L,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ge=ue.regexLiterals;if(ge){var Te=ge>1?"":`
\r`,Oe=Te?".":"[\\S\\s]",Xe="/(?=[^/*"+Te+"])(?:[^/\\x5B\\x5C"+Te+"]|\\x5C"+Oe+"|\\x5B(?:[^\\x5C\\x5D"+Te+"]|\\x5C"+Oe+")*(?:\\x5D|$))+/";Ue.push(["lang-regex",RegExp("^"+S+"("+Xe+")")])}var rt=ue.types;rt&&Ue.push([_,rt]);var st=(""+ue.keywords).replace(/^ | $/g,"");st.length&&Ue.push([M,new RegExp("^(?:"+st.replace(/[\s,]+/g,"|")+")\\b"),null]),Ae.push([h,/^\s+/,null,` \r
\xA0`]);var nt="^.[^\\s\\w.$@'\"`/\\\\]*";return ue.regexLiterals&&(nt+="(?!s*/)"),Ue.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],[g,new RegExp(nt),null]),ye(Ae,Ue)}var xe=Pe({keywords:R,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ie(ue,Ae,Ue){for(var ce=/(?:^|\s)nocode(?:\s|$)/,ge=/\r\n?|\n/,Te=ue.ownerDocument,Oe=Te.createElement("li");ue.firstChild;)Oe.appendChild(ue.firstChild);var Xe=[Oe];function rt(Re){var Je=Re.nodeType;if(Je==1&&!ce.test(Re.className))if(Re.nodeName==="br")st(Re),Re.parentNode&&Re.parentNode.removeChild(Re);else for(var tt=Re.firstChild;tt;tt=tt.nextSibling)rt(tt);else if((Je==3||Je==4)&&Ue){var le=Re.nodeValue,$=le.match(ge);if($){var te=le.substring(0,$.index);Re.nodeValue=te;var ae=le.substring($.index+$[0].length);if(ae){var de=Re.parentNode;de.insertBefore(Te.createTextNode(ae),Re.nextSibling)}st(Re),te||Re.parentNode.removeChild(Re)}}}function st(Re){for(;!Re.nextSibling;)if(Re=Re.parentNode,!Re)return;function Je($,te){var ae=te?$.cloneNode(!1):$,de=$.parentNode;if(de){var ie=Je(de,1),se=$.nextSibling;ie.appendChild(ae);for(var pe=se;pe;pe=se)se=pe.nextSibling,ie.appendChild(pe)}return ae}for(var tt=Je(Re.nextSibling,0),le;(le=tt.parentNode)&&le.nodeType===1;)tt=le;Xe.push(tt)}for(var nt=0;nt<Xe.length;++nt)rt(Xe[nt]);Ae===(Ae|0)&&Xe[0].setAttribute("value",Ae);var bt=Te.createElement("ol");bt.className="linenums";for(var yt=Math.max(0,Ae-1|0)||0,nt=0,Ne=Xe.length;nt<Ne;++nt)Oe=Xe[nt],Oe.className="L"+(nt+yt)%10,Oe.firstChild||Oe.appendChild(Te.createTextNode("\xA0")),bt.appendChild(Oe);ue.appendChild(bt)}function Me(ue){var Ae=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ae=Ae&&+Ae[1]<=8;var Ue=/\n/g,ce=ue.sourceCode,ge=ce.length,Te=0,Oe=ue.spans,Xe=Oe.length,rt=0,st=ue.decorations,nt=st.length,bt=0;st[nt]=ge;var yt,Ne;for(Ne=yt=0;Ne<nt;)st[Ne]!==st[Ne+2]?(st[yt++]=st[Ne++],st[yt++]=st[Ne++]):Ne+=2;for(nt=yt,Ne=yt=0;Ne<nt;){for(var Re=st[Ne],Je=st[Ne+1],tt=Ne+2;tt+2<=nt&&st[tt+1]===Je;)tt+=2;st[yt++]=Re,st[yt++]=Je,Ne=tt}nt=st.length=yt;var le=ue.sourceNode,$="";le&&($=le.style.display,le.style.display="none");try{for(var te=null;rt<Xe;){var ae=Oe[rt],de=Oe[rt+2]||ge,ie=st[bt+2]||ge,tt=Math.min(de,ie),se=Oe[rt+1],pe;if(se.nodeType!==1&&(pe=ce.substring(Te,tt))){Ae&&(pe=pe.replace(Ue,"\r")),se.nodeValue=pe;var be=se.ownerDocument,_e=be.createElement("span");_e.className=st[bt+1];var Le=se.parentNode;Le.replaceChild(_e,se),_e.appendChild(se),Te<de&&(Oe[rt+1]=se=be.createTextNode(ce.substring(tt,de)),Le.insertBefore(se,_e.nextSibling))}Te=tt,Te>=de&&(rt+=2),Te>=ie&&(bt+=2)}}finally{le&&(le.style.display=$)}}var ke={};function Ee(ue,Ae){for(var Ue=Ae.length;--Ue>=0;){var ce=Ae[Ue];ke.hasOwnProperty(ce)?j.console&&console.warn("cannot override language handler %s",ce):ke[ce]=ue}}function J(ue,Ae){return ue&&ke.hasOwnProperty(ue)||(ue=/^\s*</.test(Ae)?"default-markup":"default-code"),ke[ue]}Ee(xe,["default-code"]),Ee(ye([],[[h,/^[^<?]+/],[x,/^<!\w[^>]*(?:>|$)/],[L,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[g,/^(?:<[%?]|[%?]>)/],["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"]),Ee(ye([[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)))/],[g,/^[=<>\/]+/],["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"]),Ee(ye([],[[k,/^[\s\S]+/]]),["uq.val"]),Ee(Pe({keywords:f,hashComments:!0,cStyleComments:!0,types:O}),["c","cc","cpp","cxx","cyc","m"]),Ee(Pe({keywords:"null,true,false"}),["json"]),Ee(Pe({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:O}),["cs"]),Ee(Pe({keywords:p,cStyleComments:!0}),["java"]),Ee(Pe({keywords:i,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Ee(Pe({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Ee(Pe({keywords:u,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Ee(Pe({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Ee(Pe({keywords:d,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Ee(Pe({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Ee(ye([],[[w,/^[\s\S]+/]]),["regex"]);function I(ue){var Ae=ue.langExtension;try{var Ue=A(ue.sourceNode,ue.pre),ce=Ue.sourceCode;ue.sourceCode=ce,ue.spans=Ue.spans,ue.basePos=0,J(Ae,ce)(ue),Me(ue)}catch(ge){j.console&&console.log(ge&&ge.stack||ge)}}function U(ue,Ae,Ue){var ce=Ue||!1,ge=Ae||null,Te=document.createElement("div");Te.innerHTML="<pre>"+ue+"</pre>",Te=Te.firstChild,ce&&Ie(Te,ce,!0);var Oe={langExtension:ge,numberLines:ce,sourceNode:Te,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return I(Oe),Te.innerHTML}function K(ue,Ae){var Ue=Ae||document.body,ce=Ue.ownerDocument||document;function ge(ae){return Ue.getElementsByTagName(ae)}for(var Te=[ge("pre"),ge("code"),ge("xmp")],Oe=[],Xe=0;Xe<Te.length;++Xe)for(var rt=0,st=Te[Xe].length;rt<st;++rt)Oe.push(Te[Xe][rt]);Te=null;var nt=Date;nt.now||(nt={now:function(){return+new Date}});var bt=0,yt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ne=/\bprettyprint\b/,Re=/\bprettyprinted\b/,Je=/pre|xmp/i,tt=/^code$/i,le=/^(?:pre|code|xmp)$/i,$={};function te(){for(var ae=j.PR_SHOULD_USE_CONTINUATION?nt.now()+250:Infinity;bt<Oe.length&&nt.now()<ae;bt++){for(var de=Oe[bt],ie=$,se=de;se=se.previousSibling;){var pe=se.nodeType,be=(pe===7||pe===8)&&se.nodeValue;if(be?!/^\??prettify\b/.test(be):pe!==3||/\S/.test(se.nodeValue))break;if(be){ie={},be.replace(/\b(\w+)=([\w:.%+-]+)/g,function(qe,Ge,pt){ie[Ge]=pt});break}}var _e=de.className;if((ie!==$||Ne.test(_e))&&!Re.test(_e)){for(var Le=!1,Ye=de.parentNode;Ye;Ye=Ye.parentNode){var lt=Ye.tagName;if(le.test(lt)&&Ye.className&&Ne.test(Ye.className)){Le=!0;break}}if(!Le){de.className+=" prettyprinted";var Et=ie.lang;if(!Et){Et=_e.match(yt);var vt;!Et&&(vt=fe(de))&&tt.test(vt.tagName)&&(Et=vt.className.match(yt)),Et&&(Et=Et[1])}var ft;if(Je.test(de.tagName))ft=1;else{var ze=de.currentStyle,Qe=ce.defaultView,He=ze?ze.whiteSpace:Qe&&Qe.getComputedStyle?Qe.getComputedStyle(de,null).getPropertyValue("white-space"):0;ft=He&&He.substring(0,3)==="pre"}var me=ie.linenums;(me=me==="true"||+me)||(me=_e.match(/\blinenums\b(?::(\d+))?/),me=me?me[1]&&me[1].length?+me[1]:!0:!1),me&&Ie(de,me,ft);var we={langExtension:Et,sourceNode:de,numberLines:me,pre:ft,sourceCode:null,basePos:null,spans:null,decorations:null};I(we)}}}bt<Oe.length?j.setTimeout(te,250):typeof ue=="function"&&ue()}te()}var q=j.PR={createSimpleLexer:ye,registerLangHandler:Ee,sourceDecorator:Pe,PR_ATTRIB_NAME:P,PR_ATTRIB_VALUE:k,PR_COMMENT:L,PR_DECLARATION:x,PR_KEYWORD:M,PR_LITERAL:b,PR_NOCODE:y,PR_PLAIN:h,PR_PUNCTUATION:g,PR_SOURCE:m,PR_STRING:w,PR_TAG:C,PR_TYPE:_,prettyPrintOne:N?j.prettyPrintOne=U:D=U,prettyPrint:G=N?j.prettyPrint=K:G=K},V=j.define;typeof V=="function"&&V.amd&&V("google-code-prettify",[],function(){return q})})()},SMhR:function(Be,he){Be.exports="data:image/png;base64,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"},STEk:function(Be,he,B){"use strict";B.d(he,"a",function(){return Ee});/*! *****************************************************************************
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 Z=function(J,I){return(Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(U,K){U.__proto__=K}||function(U,K){for(var q in K)Object.prototype.hasOwnProperty.call(K,q)&&(U[q]=K[q])})(J,I)};function z(J,I){function U(){this.constructor=J}Z(J,I),J.prototype=I===null?Object.create(I):(U.prototype=I.prototype,new U)}function N(J,I,U,K){return new(U||(U=Promise))(function(q,V){function ue(ce){try{Ue(K.next(ce))}catch(ge){V(ge)}}function Ae(ce){try{Ue(K.throw(ce))}catch(ge){V(ge)}}function Ue(ce){var ge;ce.done?q(ce.value):(ge=ce.value,ge instanceof U?ge:new U(function(Te){Te(ge)})).then(ue,Ae)}Ue((K=K.apply(J,I||[])).next())})}function Y(J,I){var U,K,q,V,ue={label:0,sent:function(){if(1&q[0])throw q[1];return q[1]},trys:[],ops:[]};return V={next:Ae(0),throw:Ae(1),return:Ae(2)},typeof Symbol=="function"&&(V[Symbol.iterator]=function(){return this}),V;function Ae(Ue){return function(ce){return function(ge){if(U)throw new TypeError("Generator is already executing.");for(;ue;)try{if(U=1,K&&(q=2&ge[0]?K.return:ge[0]?K.throw||((q=K.return)&&q.call(K),0):K.next)&&!(q=q.call(K,ge[1])).done)return q;switch(K=0,q&&(ge=[2&ge[0],q.value]),ge[0]){case 0:case 1:q=ge;break;case 4:return ue.label++,{value:ge[1],done:!1};case 5:ue.label++,K=ge[1],ge=[0];continue;case 7:ge=ue.ops.pop(),ue.trys.pop();continue;default:if(!(q=ue.trys,(q=q.length>0&&q[q.length-1])||ge[0]!==6&&ge[0]!==2)){ue=0;continue}if(ge[0]===3&&(!q||ge[1]>q[0]&&ge[1]<q[3])){ue.label=ge[1];break}if(ge[0]===6&&ue.label<q[1]){ue.label=q[1],q=ge;break}if(q&&ue.label<q[2]){ue.label=q[2],ue.ops.push(ge);break}q[2]&&ue.ops.pop(),ue.trys.pop();continue}ge=I.call(J,ue)}catch(Te){ge=[6,Te],K=0}finally{U=q=0}if(5&ge[0])throw ge[1];return{value:ge[0]?ge[1]:void 0,done:!0}}([Ue,ce])}}}function W(){for(var J=0,I=0,U=arguments.length;I<U;I++)J+=arguments[I].length;var K=Array(J),q=0;for(I=0;I<U;I++)for(var V=arguments[I],ue=0,Ae=V.length;ue<Ae;ue++,q++)K[q]=V[ue];return K}var D=function(){function J(){}return J.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},J.setAttributes=function(I,U){for(var K=0,q=U;K<q.length;K++){var V=q[K],ue=V[0],Ae=V[1];I.setAttribute(ue,Ae)}},J.createRect=function(I,U,K){var q=document.createElementNS("http://www.w3.org/2000/svg","rect");return q.setAttribute("width",I.toString()),q.setAttribute("height",U.toString()),K&&J.setAttributes(q,K),q},J.createLine=function(I,U,K,q,V){var ue=document.createElementNS("http://www.w3.org/2000/svg","line");return ue.setAttribute("x1",I.toString()),ue.setAttribute("y1",U.toString()),ue.setAttribute("x2",K.toString()),ue.setAttribute("y2",q.toString()),V&&J.setAttributes(ue,V),ue},J.createPolygon=function(I,U){var K=document.createElementNS("http://www.w3.org/2000/svg","polygon");return K.setAttribute("points",I),U&&J.setAttributes(K,U),K},J.createCircle=function(I,U){var K=document.createElementNS("http://www.w3.org/2000/svg","circle");return K.setAttribute("cx",(I/2).toString()),K.setAttribute("cy",(I/2).toString()),K.setAttribute("r",I.toString()),U&&J.setAttributes(K,U),K},J.createEllipse=function(I,U,K){var q=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return q.setAttribute("cx",(I/2).toString()),q.setAttribute("cy",(U/2).toString()),q.setAttribute("rx",(I/2).toString()),q.setAttribute("ry",(U/2).toString()),K&&J.setAttributes(q,K),q},J.createGroup=function(I){var U=document.createElementNS("http://www.w3.org/2000/svg","g");return I&&J.setAttributes(U,I),U},J.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},J.createMarker=function(I,U,K,q,V,ue,Ae){var Ue=document.createElementNS("http://www.w3.org/2000/svg","marker");return J.setAttributes(Ue,[["id",I],["orient",U],["markerWidth",K.toString()],["markerHeight",q.toString()],["refX",V.toString()],["refY",ue.toString()]]),Ue.appendChild(Ae),Ue},J.createText=function(I){var U=document.createElementNS("http://www.w3.org/2000/svg","text");return U.setAttribute("x","0"),U.setAttribute("y","0"),I&&J.setAttributes(U,I),U},J.createTSpan=function(I,U){var K=document.createElementNS("http://www.w3.org/2000/svg","tspan");return K.textContent=I,U&&J.setAttributes(K,U),K},J.createImage=function(I){var U=document.createElementNS("http://www.w3.org/2000/svg","image");return I&&J.setAttributes(U,I),U},J.createPoint=function(I,U){var K=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return K.x=I,K.y=U,K},J.createPath=function(I,U){var K=document.createElementNS("http://www.w3.org/2000/svg","path");return K.setAttribute("d",I),U&&J.setAttributes(K,U),K},J}(),G=function(){function J(){}return J.addKey=function(I){J.key=I},Object.defineProperty(J,"isLicensed",{get:function(){return!!J.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(J.key)},enumerable:!1,configurable:!0}),J}(),j=function(){function J(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return J.prototype.rasterize=function(I,U,K){var q=this;return new Promise(function(V){var ue=K!==void 0?K:document.createElement("canvas");I===null&&(q.markersOnly=!0,q.naturalSize=!1);var Ae=document.createElementNS("http://www.w3.org/2000/svg","svg");Ae.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ae.setAttribute("width",U.width.baseVal.valueAsString),Ae.setAttribute("height",U.height.baseVal.valueAsString),Ae.setAttribute("viewBox","0 0 "+U.viewBox.baseVal.width.toString()+" "+U.viewBox.baseVal.height.toString()),Ae.innerHTML=U.innerHTML,q.naturalSize===!0?(Ae.width.baseVal.value=I.naturalWidth,Ae.height.baseVal.value=I.naturalHeight):q.width!==void 0&&q.height!==void 0&&(Ae.width.baseVal.value=q.width,Ae.height.baseVal.value=q.height),ue.width=Ae.width.baseVal.value,ue.height=Ae.height.baseVal.value;var Ue=Ae.outerHTML,ce=ue.getContext("2d");q.markersOnly!==!0&&ce.drawImage(I,0,0,ue.width,ue.height);var ge=window.URL,Te=new Image(ue.width,ue.height);Te.setAttribute("crossOrigin","anonymous");var Oe=new Blob([Ue],{type:"image/svg+xml"}),Xe=ge.createObjectURL(Oe);Te.onload=function(){ce.drawImage(Te,0,0),ge.revokeObjectURL(Xe);var rt=ue.toDataURL(q.imageType,q.imageQuality);V(rt)},Te.src=Xe})},J}(),n=function(){},T=function(){function J(I){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+I+"_"}return Object.defineProperty(J.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(J.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(J.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),J.prototype.addClass=function(I){return this.styleSheet===void 0&&this.addStyleSheet(),I.name=""+this.classNamePrefix+I.localName,this.classes.push(I),this.styleSheet.sheet.insertRule("."+I.name+" {"+I.style+"}",this.styleSheet.sheet.cssRules.length),I},J.prototype.addRule=function(I){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(I),this.styleSheet.sheet.insertRule(I.selector+" {"+I.style+"}",this.styleSheet.sheet.cssRules.length)},J.prototype.addStyleSheet=function(){var I;this.styleSheet=document.createElement("style"),((I=this.styleSheetRoot)!==null&&I!==void 0?I:document.head).appendChild(this.styleSheet),this.addRule(new v("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new v("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new v("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new f("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new f("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},J.prototype.removeStyleSheet=function(){var I;this.styleSheet&&(((I=this.styleSheetRoot)!==null&&I!==void 0?I:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},J}(),v=function(J,I){this.selector=J,this.style=I},f=function(J,I){this.localName=J,this.style=I},p=function(){function J(I,U,K,q,V){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=I,this.displayMode=U,this.markerItems=K,this.uiStyleSettings=q,this.styles=V,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return J.prototype.show=function(I){var U=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=I,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var K=document.createElement("div");K.className=this.toolbarBlockStyleClass.name,K.style.whiteSpace="nowrap",this.uiContainer.appendChild(K),this.addActionButton(K,'<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(K,'<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(K,'<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(K,'<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(K,'<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(K,'<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(K,'<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(K,'<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(V){var ue=document.createElement("div");ue.className=""+U.toolbarButtonStyleClass.name,ue.setAttribute("data-type-name",V.typeName),ue.innerHTML=V.icon,ue.addEventListener("click",function(){U.markerToolbarButtonClicked(ue,V)}),U.buttons.push(ue),U.markerButtons.push(ue)}),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 q=document.createElement("div");q.className=this.toolbarBlockStyleClass.name,q.style.whiteSpace="nowrap",q.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(q),this.addActionButton(q,'<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(q,'<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()},J.prototype.addButtonClickListener=function(I){this.buttonClickListeners.push(I)},J.prototype.removeButtonClickListener=function(I){this.buttonClickListeners.indexOf(I)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(I),1)},J.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},J.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var I=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var U=0;U<this.markerButtons.length;U++)U<I||U===I&&this.markerButtons.length-1===I?this.markerButtonBlock.appendChild(this.markerButtons[U]):(U===I&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[U]))}},J.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")},J.prototype.resetButtonStyles=function(){var I=this;this.buttons.forEach(function(U){U.className=U.className.replace(I.uiStyleSettings.toolbarButtonStyleColorsClassName?I.uiStyleSettings.toolbarButtonStyleColorsClassName:I.toolbarButtonStyleColorsClass.name,"").trim(),U.className=U.className.replace(I.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?I.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:I.toolbarActiveButtonStyleColorsClass.name,"").trim(),U.className+=" "+(I.uiStyleSettings.toolbarButtonStyleColorsClassName?I.uiStyleSettings.toolbarButtonStyleColorsClassName:I.toolbarButtonStyleColorsClass.name)})},J.prototype.addActionButton=function(I,U,K){var q=this,V=document.createElement("div");switch(V.className=""+this.toolbarButtonStyleClass.name,V.innerHTML=U,V.setAttribute("data-action",K),V.addEventListener("click",function(){q.actionToolbarButtonClicked(V,K)}),K){case"select":V.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":V.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":V.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":V.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":V.style.fill=this.uiStyleSettings.closeButtonColor}I.appendChild(V),this.buttons.push(V)},J.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new f("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 f("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new f("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new f("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 f("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var I=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new f("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*I)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*I)+`px;
padding: `+I+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new f("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new f("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new v("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new v("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},J.prototype.markerToolbarButtonClicked=function(I,U){this.setActiveButton(I),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(K){return K("marker",U)}),this.markerButtonOverflowBlock.style.display="none"},J.prototype.actionToolbarButtonClicked=function(I,U){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(K){return K("action",U)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},J.prototype.setActiveButton=function(I){this.resetButtonStyles(),I.className=I.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),I.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},J.prototype.setActiveMarkerButton=function(I){var U=this.markerButtons.find(function(K){return K.getAttribute("data-type-name")===I});U&&this.setActiveButton(U)},J.prototype.setCurrentMarker=function(I){var U=this;this.currentMarker=I,this.buttons.filter(function(K){return/delete|notes/.test(K.getAttribute("data-action"))}).forEach(function(K){U.currentMarker===void 0?(K.style.fillOpacity="0.4",K.style.pointerEvents="none"):(K.style.fillOpacity="1",K.style.pointerEvents="all")})},J}(),c=function(){function J(I,U,K,q){this.panels=[],this.panelButtons=[],this.markerjsContainer=I,this.displayMode=U,this.uiStyleSettings=K,this.styles=q,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return J.prototype.addStyles=function(){var I;this.toolboxStyleClass=this.styles.addClass(new f("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 f("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var U=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new f("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new f("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new f("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 f("toolbox-panel-row_colors",`
background-color: `+((I=this.uiStyleSettings.toolboxBackgroundColor)!==null&&I!==void 0?I:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new f("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*U)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*U)+`px;
padding: `+U+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new f("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new f("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new v("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new v("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},J.prototype.show=function(I){var U;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=I,this.uiContainer.className=this.toolboxStyleClass.name+" "+((U=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&U!==void 0?U:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},J.prototype.setPanelButtons=function(I){var U,K,q=this;this.panels=I,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((U=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&U!==void 0?U:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((K=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&K!==void 0?K:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(V){var ue;V.uiStyleSettings=q.uiStyleSettings;var Ae=document.createElement("div");Ae.className=q.toolboxButtonStyleClass.name+" "+((ue=q.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ue!==void 0?ue:q.toolboxButtonStyleColorsClass.name),Ae.innerHTML=V.icon,Ae.title=V.title,Ae.addEventListener("click",function(){q.panelButtonClick(V)}),q.panelButtons.push(Ae),q.buttonRow.appendChild(Ae)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},J.prototype.panelButtonClick=function(I){var U=this,K=-1;if(I!==this.activePanel){K=this.panels.indexOf(I),this.panelRow.innerHTML="";var q=I.getUi();q.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(q),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=I}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){U.displayMode==="inline"?U.panelRow.style.display="none":U.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(V,ue){var Ae,Ue;V.className=U.toolboxButtonStyleClass.name+" "+(ue===K?""+((Ae=U.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ae!==void 0?Ae:U.toolboxActiveButtonStyleColorsClass.name):""+((Ue=U.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ue!==void 0?Ue:U.toolboxButtonStyleColorsClass.name))})},J}(),s=function(J,I){this.title=J,this.icon=I},d=function(J){function I(U,K,q,V){var ue=J.call(this,U,V||'<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 ue.colors=[],ue.addTransparent=!1,ue.colorBoxes=[],ue.colors=K,ue.currentColor=q,ue.setCurrentColor=ue.setCurrentColor.bind(ue),ue.getColorBox=ue.getColorBox.bind(ue),ue}return z(I,J),I.prototype.getUi=function(){var U=this,K=document.createElement("div");return K.style.overflow="hidden",K.style.whiteSpace="nowrap",this.colors.forEach(function(q){var V=U.getColorBox(q);K.appendChild(V),U.colorBoxes.push(V)}),K},I.prototype.getColorBox=function(U){var K=this,q=this.uiStyleSettings.toolbarHeight/4,V=this.uiStyleSettings.toolbarHeight-q,ue=document.createElement("div");ue.style.display="inline-block",ue.style.boxSizing="content-box",ue.style.width=V-2+"px",ue.style.height=V-2+"px",ue.style.padding="1px",ue.style.marginRight="2px",ue.style.marginBottom="2px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.borderRadius=(V+2)/2+"px",ue.style.borderColor=U===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){K.setCurrentColor(U,ue)});var Ae=document.createElement("div");return Ae.style.display="inline-block",Ae.style.width=V-2+"px",Ae.style.height=V-2+"px",Ae.style.backgroundColor=U,Ae.style.borderRadius=V/2+"px",U==="transparent"&&(Ae.style.fill=this.uiStyleSettings.toolboxAccentColor,Ae.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>`),ue.appendChild(Ae),ue},I.prototype.setCurrentColor=function(U,K){var q=this;this.currentColor=U,this.colorBoxes.forEach(function(V){V.style.borderColor=V===K?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(U)},I}(s),u=function(){function J(I,U,K){this._state="new",this._isSelected=!1,this._container=I,this._overlayContainer=U,this.globalSettings=K,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(J.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),J.prototype.ownsTarget=function(I){return!1},Object.defineProperty(J.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),J.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},J.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},J.prototype.pointerDown=function(I,U){},J.prototype.dblClick=function(I,U){},J.prototype.manipulate=function(I){},J.prototype.pointerUp=function(I){this.stateChanged()},J.prototype.dispose=function(){},J.prototype.addMarkerVisualToContainer=function(I){this.container.childNodes.length>0?this.container.insertBefore(I,this.container.childNodes[0]):this.container.appendChild(I)},J.prototype.getState=function(){return{typeName:J.typeName,state:this.state,notes:this.notes}},J.prototype.restoreState=function(I){this._state=I.state,this.notes=I.notes},J.prototype.scale=function(I,U){},J.prototype.colorChanged=function(I){this.onColorChanged&&this.onColorChanged(I),this.stateChanged()},J.prototype.fillColorChanged=function(I){this.onFillColorChanged&&this.onFillColorChanged(I),this.stateChanged()},J.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var I=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),I.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(I)&&this.onStateChanged(this)}},J.typeName="MarkerBase",J}(),l=function(){function J(){this.findGripByVisual=this.findGripByVisual.bind(this)}return J.prototype.findGripByVisual=function(I){return this.topLeft.ownsTarget(I)?this.topLeft:this.topCenter.ownsTarget(I)?this.topCenter:this.topRight.ownsTarget(I)?this.topRight:this.centerLeft.ownsTarget(I)?this.centerLeft:this.centerRight.ownsTarget(I)?this.centerRight:this.bottomLeft.ownsTarget(I)?this.bottomLeft:this.bottomCenter.ownsTarget(I)?this.bottomCenter:this.bottomRight.ownsTarget(I)?this.bottomRight:void 0},J}(),a=function(){function J(){this.GRIP_SIZE=10,this.visual=D.createGroup(),this.visual.appendChild(D.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(D.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return J.prototype.ownsTarget=function(I){return I===this.visual||I===this.visual.childNodes[0]||I===this.visual.childNodes[1]},J}(),i=function(){function J(){}return J.toITransformMatrix=function(I){return{a:I.a,b:I.b,c:I.c,d:I.d,e:I.e,f:I.f}},J.toSVGMatrix=function(I,U){return I.a=U.a,I.b=U.b,I.c=U.c,I.d=U.d,I.e=U.e,I.f=U.f,I},J}(),R=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.left=0,V.top=0,V.width=0,V.height=0,V.defaultSize={x:50,y:20},V.offsetX=0,V.offsetY=0,V.rotationAngle=0,V.CB_DISTANCE=10,V._suppressMarkerCreateEvent=!1,V.container.transform.baseVal.appendItem(D.createTransform()),V.setupControlBox(),V}return z(I,J),Object.defineProperty(I.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"visual",{get:function(){return this._visual},set:function(U){this._visual=U;var K=D.createTransform();this._visual.transform.baseVal.appendItem(K)},enumerable:!1,configurable:!0}),I.prototype.ownsTarget=function(U){return!!J.prototype.ownsTarget.call(this,U)||!!(this.controlGrips.findGripByVisual(U)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(U))},I.prototype.pointerDown=function(U,K){J.prototype.pointerDown.call(this,U,K),this.state==="new"&&(this.left=U.x,this.top=U.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var q=this.unrotatePoint(U);if(this.manipulationStartX=q.x,this.manipulationStartY=q.y,this.offsetX=q.x-this.left,this.offsetY=q.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(K),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(K)){this.activeGrip=this.rotatorGrip;var V=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=V.x-this.width/2,this.top=V.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ue=this.container.transform.baseVal.getItem(0);ue.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ue,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},I.prototype.pointerUp=function(U){var K=this.state;J.prototype.pointerUp.call(this,U),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(U),this._state="select",K==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},I.prototype.moveVisual=function(U){this.visual.style.transform="translate("+U.x+"px, "+U.y+"px)"},I.prototype.manipulate=function(U){var K=this.unrotatePoint(U);this.state==="creating"?this.resize(U):this.state==="move"?(this.left=this.manipulationStartLeft+(K.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(K.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(K):this.state==="rotate"&&this.rotate(U)},I.prototype.resize=function(U){var K=this.manipulationStartLeft,q=this.manipulationStartWidth,V=this.manipulationStartTop,ue=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:K=this.manipulationStartLeft+U.x-this.manipulationStartX,q=this.manipulationStartWidth+this.manipulationStartLeft-K;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:q=this.manipulationStartWidth+U.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:V=this.manipulationStartTop+U.y-this.manipulationStartY,ue=this.manipulationStartHeight+this.manipulationStartTop-V;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ue=this.manipulationStartHeight+U.y-this.manipulationStartY}q>=0?(this.left=K,this.width=q):(this.left=K+q,this.width=-q),ue>=0?(this.top=V,this.height=ue):(this.top=V+ue,this.height=-ue),this.setSize()},I.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},I.prototype.rotate=function(U){if(Math.abs(U.x-this.centerX)>.1){var K=Math.sign(U.x-this.centerX);this.rotationAngle=180*Math.atan((U.y-this.centerY)/(U.x-this.centerX))/Math.PI+90*K,this.applyRotation()}},I.prototype.applyRotation=function(){var U=this.container.transform.baseVal.getItem(0);U.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(U,0)},I.prototype.rotatePoint=function(U){if(this.rotationAngle===0)return U;var K=this.container.getCTM(),q=D.createPoint(U.x,U.y);return{x:(q=q.matrixTransform(K)).x,y:q.y}},I.prototype.unrotatePoint=function(U){if(this.rotationAngle===0)return U;var K=this.container.getCTM();K=K.inverse();var q=D.createPoint(U.x,U.y);return{x:(q=q.matrixTransform(K)).x,y:q.y}},I.prototype.select=function(){J.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},I.prototype.deselect=function(){J.prototype.deselect.call(this),this.controlBox.style.display="none"},I.prototype.setupControlBox=function(){this.controlBox=D.createGroup();var U=D.createTransform();U.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(U),this.container.appendChild(this.controlBox),this.controlRect=D.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=D.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 l,this.addControlGrips(),this.controlBox.style.display="none"},I.prototype.adjustControlBox=function(){var U=this.controlBox.transform.baseVal.getItem(0);U.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(U,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()},I.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()},I.prototype.createGrip=function(){var U=new a;return U.visual.transform.baseVal.appendItem(D.createTransform()),this.controlBox.appendChild(U.visual),U},I.prototype.positionGrips=function(){var U=this.controlGrips.topLeft.GRIP_SIZE,K=-U/2,q=K,V=(this.width+this.CB_DISTANCE)/2-U/2,ue=(this.height+this.CB_DISTANCE)/2-U/2,Ae=this.height+this.CB_DISTANCE-U/2,Ue=this.width+this.CB_DISTANCE-U/2;this.positionGrip(this.controlGrips.topLeft.visual,K,q),this.positionGrip(this.controlGrips.topCenter.visual,V,q),this.positionGrip(this.controlGrips.topRight.visual,Ue,q),this.positionGrip(this.controlGrips.centerLeft.visual,K,ue),this.positionGrip(this.controlGrips.centerRight.visual,Ue,ue),this.positionGrip(this.controlGrips.bottomLeft.visual,K,Ae),this.positionGrip(this.controlGrips.bottomCenter.visual,V,Ae),this.positionGrip(this.controlGrips.bottomRight.visual,Ue,Ae),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,V,q-3*this.CB_DISTANCE)},I.prototype.positionGrip=function(U,K,q){var V=U.transform.baseVal.getItem(0);V.setTranslate(K,q),U.transform.baseVal.replaceItem(V,0)},I.prototype.hideControlBox=function(){this.controlBox.style.display="none"},I.prototype.showControlBox=function(){this.controlBox.style.display=""},I.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:i.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:i.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},J.prototype.getState.call(this))},I.prototype.restoreState=function(U){J.prototype.restoreState.call(this,U);var K=U;this.left=K.left,this.top=K.top,this.width=K.width,this.height=K.height,this.rotationAngle=K.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(i.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,K.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(i.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,K.containerTransformMatrix))},I.prototype.scale=function(U,K){J.prototype.scale.call(this,U,K);var q=this.rotatePoint({x:this.left,y:this.top}),V=this.unrotatePoint({x:q.x*U,y:q.y*K});this.left=V.x,this.top=V.y,this.width=this.width*U,this.height=this.height*K,this.adjustControlBox()},I}(u),O=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.fillColor="transparent",V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.opacity=1,V.setStrokeColor=V.setStrokeColor.bind(V),V.setFillColor=V.setFillColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.createVisual=V.createVisual.bind(V),V}return z(I,J),I.prototype.ownsTarget=function(U){return!(!J.prototype.ownsTarget.call(this,U)&&U!==this.visual)},I.prototype.createVisual=function(){this.visual=D.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)},I.prototype.pointerDown=function(U,K){J.prototype.pointerDown.call(this,U,K),this.state==="new"&&(this.createVisual(),this.moveVisual(U),this._state="creating")},I.prototype.manipulate=function(U){J.prototype.manipulate.call(this,U)},I.prototype.resize=function(U){J.prototype.resize.call(this,U),this.setSize()},I.prototype.setSize=function(){J.prototype.setSize.call(this),D.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},I.prototype.pointerUp=function(U){J.prototype.pointerUp.call(this,U),this.setSize()},I.prototype.setStrokeColor=function(U){this.strokeColor=U,this.visual&&D.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(U),this.stateChanged()},I.prototype.setFillColor=function(U){this.fillColor=U,this.visual&&D.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},I.prototype.setStrokeWidth=function(U){this.strokeWidth=U,this.visual&&D.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},I.prototype.setStrokeDasharray=function(U){this.strokeDasharray=U,this.visual&&D.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},I.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},J.prototype.getState.call(this))},I.prototype.restoreState=function(U){var K=U;this.fillColor=K.fillColor,this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.opacity=K.opacity,this.createVisual(),J.prototype.restoreState.call(this,U),this.setSize()},I.prototype.scale=function(U,K){J.prototype.scale.call(this,U,K),this.setSize()},I.title="Rectangle marker",I}(R),w=function(J){function I(U,K,q,V){var ue=J.call(this,U,V||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ue.widths=[],ue.widthBoxes=[],ue.widths=K,ue.currentWidth=q,ue.setCurrentWidth=ue.setCurrentWidth.bind(ue),ue}return z(I,J),I.prototype.getUi=function(){var U=this,K=document.createElement("div");return K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2",this.widths.forEach(function(q){var V=document.createElement("div");V.style.display="flex",V.style.flexGrow="2",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.borderColor=q===U.currentWidth?U.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){U.setCurrentWidth(q,V)}),K.appendChild(V);var ue=document.createElement("div");ue.innerText=q.toString(),ue.style.marginRight="5px",V.appendChild(ue);var Ae=document.createElement("div");Ae.style.minHeight="20px",Ae.style.flexGrow="2",Ae.style.display="flex",Ae.style.alignItems="center";var Ue=document.createElement("hr");Ue.style.minWidth="20px",Ue.style.border="0px",Ue.style.borderTop=q+"px solid "+U.uiStyleSettings.toolboxColor,Ue.style.flexGrow="2",Ae.appendChild(Ue),V.appendChild(Ae),U.widthBoxes.push(V)}),K},I.prototype.setCurrentWidth=function(U,K){var q=this;this.currentWidth=U,this.widthBoxes.forEach(function(V){V.style.borderColor=V===K?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},I}(s),M=function(J){function I(U,K,q,V){var ue=J.call(this,U,V||'<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 ue.styles=[],ue.styleBoxes=[],ue.styles=K,ue.currentStyle=q,ue.setCurrentStyle=ue.setCurrentStyle.bind(ue),ue}return z(I,J),I.prototype.getUi=function(){var U=this,K=document.createElement("div");return K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2",this.styles.forEach(function(q){var V=document.createElement("div");V.style.display="flex",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.overflow="hidden",V.style.maxWidth=100/U.styles.length-5+"%",V.style.borderColor=q===U.currentStyle?U.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){U.setCurrentStyle(q,V)}),K.appendChild(V);var ue=document.createElement("div");ue.style.minHeight="20px",ue.style.flexGrow="2",ue.style.overflow="hidden";var Ae=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+U.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(q!==""?'stroke-dasharray="'+q+'"':"")+` />
</svg>`;ue.innerHTML=Ae,V.appendChild(ue),U.styleBoxes.push(V)}),K},I.prototype.setCurrentStyle=function(U,K){var q=this;this.currentStyle=U,this.styleBoxes.forEach(function(V){V.style.borderColor=V===K?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},I}(s),L=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.strokeColor=q.defaultColor,V.strokeWidth=q.defaultStrokeWidth,V.strokeDasharray=q.defaultStrokeDasharray,V.strokePanel=new d("Line color",q.defaultColorSet,q.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new w("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new M("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return z(I,J),Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var U=J.prototype.getState.call(this);return U.typeName=I.typeName,U},I.typeName="FrameMarker",I.title="Frame marker",I.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',I}(O),_=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},b=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.x1=0,V.y1=0,V.x2=0,V.y2=0,V.defaultLength=50,V.manipulationStartX=0,V.manipulationStartY=0,V.manipulationStartX1=0,V.manipulationStartY1=0,V.manipulationStartX2=0,V.manipulationStartY2=0,V.setupControlBox(),V}return z(I,J),I.prototype.ownsTarget=function(U){return!!J.prototype.ownsTarget.call(this,U)||!(!this.grip1.ownsTarget(U)&&!this.grip2.ownsTarget(U))},I.prototype.pointerDown=function(U,K){J.prototype.pointerDown.call(this,U,K),this.manipulationStartX=U.x,this.manipulationStartY=U.y,this.state==="new"&&(this.x1=U.x,this.y1=U.y,this.x2=U.x,this.y2=U.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(K)?this.activeGrip=this.grip1:this.grip2.ownsTarget(K)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},I.prototype.pointerUp=function(U){var K=this.state;J.prototype.pointerUp.call(this,U),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(U),this._state="select",K==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},I.prototype.adjustVisual=function(){},I.prototype.manipulate=function(U){this.state==="creating"?this.resize(U):this.state==="move"?(this.x1=this.manipulationStartX1+U.x-this.manipulationStartX,this.y1=this.manipulationStartY1+U.y-this.manipulationStartY,this.x2=this.manipulationStartX2+U.x-this.manipulationStartX,this.y2=this.manipulationStartY2+U.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(U)},I.prototype.resize=function(U){switch(this.activeGrip){case this.grip1:this.x1=U.x,this.y1=U.y;break;case this.grip2:case void 0:this.x2=U.x,this.y2=U.y}this.adjustVisual(),this.adjustControlBox()},I.prototype.select=function(){J.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},I.prototype.deselect=function(){J.prototype.deselect.call(this),this.controlBox.style.display="none"},I.prototype.setupControlBox=function(){this.controlBox=D.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},I.prototype.adjustControlBox=function(){this.positionGrips()},I.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},I.prototype.createGrip=function(){var U=new a;return U.visual.transform.baseVal.appendItem(D.createTransform()),this.controlBox.appendChild(U.visual),U},I.prototype.positionGrips=function(){var U=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-U/2,this.y1-U/2),this.positionGrip(this.grip2.visual,this.x2-U/2,this.y2-U/2)},I.prototype.positionGrip=function(U,K,q){var V=U.transform.baseVal.getItem(0);V.setTranslate(K,q),U.transform.baseVal.replaceItem(V,0)},I.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},J.prototype.getState.call(this))},I.prototype.restoreState=function(U){J.prototype.restoreState.call(this,U);var K=U;this.x1=K.x1,this.y1=K.y1,this.x2=K.x2,this.y2=K.y2},I.prototype.scale=function(U,K){J.prototype.scale.call(this,U,K),this.x1=this.x1*U,this.y1=this.y1*K,this.x2=this.x2*U,this.y2=this.y2*K,this.adjustVisual(),this.adjustControlBox()},I}(u),g=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.setStrokeColor=V.setStrokeColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.strokeColor=q.defaultColor,V.strokeWidth=q.defaultStrokeWidth,V.strokeDasharray=q.defaultStrokeDasharray,V.strokePanel=new d("Line color",q.defaultColorSet,q.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new w("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new M("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return z(I,J),I.prototype.ownsTarget=function(U){return!(!J.prototype.ownsTarget.call(this,U)&&U!==this.visual&&U!==this.selectorLine&&U!==this.visibleLine)},I.prototype.createVisual=function(){this.visual=D.createGroup(),this.selectorLine=D.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=D.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)},I.prototype.pointerDown=function(U,K){J.prototype.pointerDown.call(this,U,K),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},I.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()),D.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),D.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),D.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},I.prototype.setStrokeColor=function(U){this.strokeColor=U,this.adjustVisual(),this.colorChanged(U)},I.prototype.setStrokeWidth=function(U){this.strokeWidth=U,this.adjustVisual()},I.prototype.setStrokeDasharray=function(U){this.strokeDasharray=U,this.adjustVisual(),this.stateChanged()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var U=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},J.prototype.getState.call(this));return U.typeName=I.typeName,U},I.prototype.restoreState=function(U){J.prototype.restoreState.call(this,U);var K=U;this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.createVisual(),this.adjustVisual()},I.typeName="LineMarker",I.title="Line marker",I.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',I}(b),h=function(J){function I(U,K,q,V){var ue=J.call(this,U,V||'<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 ue.fonts=[],ue.fontBoxes=[],ue.fonts=K,ue.currentFont=q,ue.setCurrentFont=ue.setCurrentFont.bind(ue),ue}return z(I,J),I.prototype.getUi=function(){var U=this,K=document.createElement("div");return K.style.overflow="hidden",K.style.flexGrow="2",this.fonts.forEach(function(q){var V=document.createElement("div");V.style.display="inline-block",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.overflow="hidden",V.style.maxWidth=100/U.fonts.length-5+"%",V.style.borderColor=q===U.currentFont?U.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){U.setCurrentFont(q,V)}),K.appendChild(V);var ue=document.createElement("div");ue.style.display="flex",ue.style.minHeight="20px",ue.style.flexGrow="2",ue.style.fontFamily=q,ue.style.overflow="hidden";var Ae=document.createElement("div");Ae.style.whiteSpace="nowrap",Ae.style.overflow="hidden",Ae.style.textOverflow="ellipsis",Ae.innerHTML="The quick brown fox jumps over the lazy dog",ue.appendChild(Ae),V.appendChild(ue),U.fontBoxes.push(V)}),K},I.prototype.setCurrentFont=function(U,K){var q=this;this.currentFont=U,this.fontBoxes.forEach(function(V){V.style.borderColor=V===K?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},I}(s),C=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.color="transparent",V.padding=5,V.DEFAULT_TEXT="your text here",V.text=V.DEFAULT_TEXT,V.isMoved=!1,V.color=q.defaultColor,V.fontFamily=q.defaultFontFamily,V.defaultSize={x:100,y:30},V.setColor=V.setColor.bind(V),V.setFont=V.setFont.bind(V),V.renderText=V.renderText.bind(V),V.sizeText=V.sizeText.bind(V),V.textEditDivClicked=V.textEditDivClicked.bind(V),V.showTextEditor=V.showTextEditor.bind(V),V.setSize=V.setSize.bind(V),V.positionTextEditor=V.positionTextEditor.bind(V),V.colorPanel=new d("Color",q.defaultColorSet,q.defaultColor),V.colorPanel.onColorChanged=V.setColor,V.fontFamilyPanel=new h("Font",q.defaultFontFamilies,q.defaultFontFamily),V.fontFamilyPanel.onFontChanged=V.setFont,V}return z(I,J),I.prototype.ownsTarget=function(U){if(J.prototype.ownsTarget.call(this,U)||U===this.visual||U===this.textElement||U===this.bgRectangle)return!0;var K=!1;return this.textElement.childNodes.forEach(function(q){q===U&&(K=!0)}),K},I.prototype.createVisual=function(){this.visual=D.createGroup(),this.bgRectangle=D.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=D.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(D.createTransform()),this.textElement.transform.baseVal.appendItem(D.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},I.prototype.pointerDown=function(U,K){J.prototype.pointerDown.call(this,U,K),this.isMoved=!1,this.pointerDownPoint=U,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(U),this._state="creating")},I.prototype.renderText=function(){var U=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(K){U.textElement.appendChild(D.createTSpan(K.trim()===""?" ":K.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},I.prototype.getTextScale=function(){var U=this.textElement.getBBox(),K=1;if(U.width>0&&U.height>0){var q=(1*this.width-this.width*this.padding*2/100)/U.width,V=(1*this.height-this.height*this.padding*2/100)/U.height;K=Math.min(q,V)}return K},I.prototype.getTextPosition=function(U){var K=this.textElement.getBBox(),q=0,V=0;return K.width>0&&K.height>0&&(q=(this.width-K.width*U)/2,V=this.height/2-K.height*U/2),{x:q,y:V}},I.prototype.sizeText=function(){var U=this.textElement.getBBox(),K=this.getTextScale(),q=this.getTextPosition(K);q.y-=U.y*K,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+q.x+"px, "+q.y+"px) scale("+K+", "+K+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(q.x,q.y),this.textElement.transform.baseVal.getItem(1).setScale(K,K))},I.prototype.manipulate=function(U){J.prototype.manipulate.call(this,U),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(U.x-this.pointerDownPoint.x)>5||Math.abs(U.y-this.pointerDownPoint.y)>5)},I.prototype.resize=function(U){J.prototype.resize.call(this,U),this.isMoved=!0,this.setSize(),this.sizeText()},I.prototype.setSize=function(){J.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(D.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),D.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},I.prototype.pointerUp=function(U){var K=this.state;K==="creating"&&(this._suppressMarkerCreateEvent=!0),J.prototype.pointerUp.call(this,U),this.setSize(),(K==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},I.prototype.showTextEditor=function(){var U=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(K){K.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var K=Number.parseFloat(U.textEditor.style.fontSize);U.textEditor.clientWidth>=Number.parseInt(U.textEditor.style.maxWidth)&&K>.9;)K-=.1,U.textEditor.style.fontSize=Math.max(K,.9)+"em"}),this.textEditor.addEventListener("keyup",function(K){K.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(K){if(K.clipboardData){var q=K.clipboardData.getData("text"),V=window.getSelection();if(!V.rangeCount)return!1;V.deleteFromDocument(),V.getRangeAt(0).insertNode(document.createTextNode(q)),K.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){U.textEditDivClicked(U.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},I.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var U=this.getTextScale(),K=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),q=this.textElement.getBBox(),V={x:q.width*U,y:q.height*U};K.x-=V.x/2,K.y-=V.y/2,this.textEditor.style.top=K.y+"px",this.textEditor.style.left=K.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-K.x+"px",this.textEditor.style.fontSize=Math.max(16*U,12)+"px",this.textElement.style.display="none"}},I.prototype.textEditDivClicked=function(U){this.text=U.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},I.prototype.select=function(){J.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},I.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),J.prototype.deselect.call(this)},I.prototype.dblClick=function(U,K){J.prototype.dblClick.call(this,U,K),this.showTextEditor()},I.prototype.setColor=function(U){this.textElement&&D.setAttributes(this.textElement,[["fill",U]]),this.color=U,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(U)},I.prototype.setFont=function(U){this.textElement&&D.setAttributes(this.textElement,[["font-family",U]]),this.fontFamily=U,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},I.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},I.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var U=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},J.prototype.getState.call(this));return U.typeName=I.typeName,U},I.prototype.restoreState=function(U){var K=U;this.color=K.color,this.fontFamily=K.fontFamily,this.padding=K.padding,this.text=K.text,this.createVisual(),J.prototype.restoreState.call(this,U),this.setSize()},I.prototype.scale=function(U,K){J.prototype.scale.call(this,U,K),this.setSize(),this.sizeText(),this.positionTextEditor()},I.typeName="TextMarker",I.title="Text marker",I.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>',I}(R),x=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.color="transparent",V.lineWidth=3,V.drawing=!1,V.pixelRatio=1,V.color=q.defaultColor,V.lineWidth=q.defaultStrokeWidth,V.pixelRatio=q.freehandPixelRatio,V.setColor=V.setColor.bind(V),V.addCanvas=V.addCanvas.bind(V),V.finishCreation=V.finishCreation.bind(V),V.setLineWidth=V.setLineWidth.bind(V),V.colorPanel=new d("Color",q.defaultColorSet,q.defaultColor),V.colorPanel.onColorChanged=V.setColor,V.lineWidthPanel=new w("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),V.lineWidthPanel.onWidthChanged=V.setLineWidth,V}return z(I,J),I.prototype.ownsTarget=function(U){return!(!J.prototype.ownsTarget.call(this,U)&&U!==this.visual&&U!==this.drawingImage)},I.prototype.createVisual=function(){this.visual=D.createGroup(),this.drawingImage=D.createImage(),this.visual.appendChild(this.drawingImage);var U=D.createTransform();this.visual.transform.baseVal.appendItem(U),this.addMarkerVisualToContainer(this.visual)},I.prototype.pointerDown=function(U,K){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(U.x,U.y),this.drawing=!0):J.prototype.pointerDown.call(this,U,K)},I.prototype.manipulate=function(U){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(U.x,U.y),this.canvasContext.stroke()):J.prototype.manipulate.call(this,U)},I.prototype.resize=function(U){J.prototype.resize.call(this,U),D.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),D.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},I.prototype.pointerUp=function(U){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):J.prototype.pointerUp.call(this,U)},I.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)},I.prototype.select=function(){this.state==="creating"&&this.finishCreation(),J.prototype.select.call(this)},I.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),J.prototype.deselect.call(this)},I.prototype.finishCreation=function(){for(var U=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),K=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],q=K[0],V=K[1],ue=K[2],Ae=K[3],Ue=!1,ce=0;ce<this.canvasElement.height;ce++)for(var ge=0;ge<this.canvasElement.width;ge++)U.data[ce*this.canvasElement.width*4+4*ge+3]>0&&(Ue=!0,ce<V&&(V=ce),ge<q&&(q=ge),ce>Ae&&(Ae=ce),ge>ue&&(ue=ge));if(Ue){this.left=q/this.pixelRatio,this.top=V/this.pixelRatio,this.width=(ue-q)/this.pixelRatio,this.height=(Ae-V)/this.pixelRatio;var Te=document.createElement("canvas");Te.width=ue-q,Te.height=Ae-V,Te.getContext("2d").putImageData(this.canvasContext.getImageData(q,V,ue-q,Ae-V),0,0),this.drawingImgUrl=Te.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},I.prototype.setDrawingImage=function(){D.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),D.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},I.prototype.setColor=function(U){this.color=U,this.colorChanged(U)},I.prototype.setLineWidth=function(U){this.lineWidth=U},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var U=Object.assign({drawingImgUrl:this.drawingImgUrl},J.prototype.getState.call(this));return U.typeName=I.typeName,U},I.prototype.restoreState=function(U){this.createVisual(),J.prototype.restoreState.call(this,U),this.drawingImgUrl=U.drawingImgUrl,this.setDrawingImage()},I.prototype.scale=function(U,K){J.prototype.scale.call(this,U,K),this.setDrawingImage()},I.typeName="FreehandMarker",I.title="Freehand marker",I.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>',I}(R),m=function(J){function I(U,K,q){var V=J.call(this,U,q||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return V.typeBoxes=[],V.currentType=K,V.setCurrentType=V.setCurrentType.bind(V),V}return z(I,J),I.prototype.getUi=function(){var U=this,K=document.createElement("div");K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2";for(var q=function(Ae){var Ue="both";switch(Ae){case 0:Ue="both";break;case 1:Ue="start";break;case 2:Ue="end";break;case 3:Ue="none"}var ce=document.createElement("div");if(ce.style.display="flex",ce.style.flexGrow="2",ce.style.alignItems="center",ce.style.justifyContent="space-between",ce.style.padding="5px",ce.style.borderWidth="2px",ce.style.borderStyle="solid",ce.style.borderColor=Ue===V.currentType?V.uiStyleSettings.toolboxAccentColor:"transparent",ce.addEventListener("click",function(){U.setCurrentType(Ue,ce)}),K.appendChild(ce),Ue==="both"||Ue==="start"){var ge=document.createElement("div");ge.style.display="flex",ge.style.alignItems="center",ge.style.minHeight="20px",ge.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="`+(V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,ge.style.marginLeft="5px",ce.appendChild(ge)}var Te=document.createElement("div");Te.style.display="flex",Te.style.alignItems="center",Te.style.minHeight="20px",Te.style.flexGrow="2";var Oe=document.createElement("hr");if(Oe.style.minWidth="20px",Oe.style.border="0px",Oe.style.borderTop="3px solid "+(V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxColor:"#eeeeee"),Oe.style.flexGrow="2",Te.appendChild(Oe),ce.appendChild(Te),Ue==="both"||Ue==="end"){var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.alignItems="center",Xe.style.minHeight="20px",Xe.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="`+(V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Xe.style.marginRight="5px",ce.appendChild(Xe)}V.typeBoxes.push(ce)},V=this,ue=0;ue<4;ue++)q(ue);return K},I.prototype.setCurrentType=function(U,K){var q=this;this.currentType=U,this.typeBoxes.forEach(function(V){V.style.borderColor=V===K?q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},I}(s),P=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.arrowType="end",V.arrowBaseHeight=10,V.arrowBaseWidth=10,V.getArrowPoints=V.getArrowPoints.bind(V),V.setArrowType=V.setArrowType.bind(V),V.arrowTypePanel=new m("Arrow type","end"),V.arrowTypePanel.onArrowTypeChanged=V.setArrowType,V}return z(I,J),I.prototype.ownsTarget=function(U){return!(!J.prototype.ownsTarget.call(this,U)&&U!==this.arrow1&&U!==this.arrow2)},I.prototype.getArrowPoints=function(U,K){var q=this.arrowBaseWidth+2*this.strokeWidth,V=this.arrowBaseHeight+2*this.strokeWidth;return U-q/2+","+(K+V/2)+" "+U+","+(K-V/2)+" "+(U+q/2)+","+(K+V/2)},I.prototype.createTips=function(){this.arrow1=D.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(D.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=D.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(D.createTransform()),this.visual.appendChild(this.arrow2)},I.prototype.pointerDown=function(U,K){J.prototype.pointerDown.call(this,U,K),this.state==="creating"&&this.createTips()},I.prototype.adjustVisual=function(){if(J.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",D.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),D.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var U=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),K=this.arrow1.transform.baseVal.getItem(0);K.setRotate(U,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(K,0);var q=this.arrow2.transform.baseVal.getItem(0);q.setRotate(U+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(q,0)}},I.prototype.setArrowType=function(U){this.arrowType=U,this.adjustVisual(),this.stateChanged()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var U=Object.assign({arrowType:this.arrowType},J.prototype.getState.call(this));return U.typeName=I.typeName,U},I.prototype.restoreState=function(U){J.prototype.restoreState.call(this,U);var K=U;this.arrowType=K.arrowType,this.createTips(),this.adjustVisual()},I.typeName="ArrowMarker",I.title="Arrow marker",I.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',I}(g),k=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.fillColor=q.defaultFillColor,V.strokeWidth=0,V.fillPanel=new d("Color",q.defaultColorSet,q.defaultFillColor),V.fillPanel.onColorChanged=V.setFillColor,V}return z(I,J),Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var U=J.prototype.getState.call(this);return U.typeName=I.typeName,U},I.typeName="CoverMarker",I.title="Cover marker",I.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',I}(O),y=function(J){function I(U,K,q,V){var ue=J.call(this,U,V||'<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 ue.opacities=[],ue.opacityBoxes=[],ue.opacities=K,ue.currentOpacity=q,ue.setCurrentOpacity=ue.setCurrentOpacity.bind(ue),ue}return z(I,J),I.prototype.getUi=function(){var U=this,K=document.createElement("div");return K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2",K.style.justifyContent="space-between",this.opacities.forEach(function(q){var V=document.createElement("div");V.style.display="flex",V.style.alignItems="center",V.style.justifyContent="center",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.borderColor=q===U.currentOpacity?U.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){U.setCurrentOpacity(q,V)}),K.appendChild(V);var ue=document.createElement("div");ue.innerText=100*q+"%",V.appendChild(ue),U.opacityBoxes.push(V)}),K},I.prototype.setCurrentOpacity=function(U,K){var q=this;this.currentOpacity=U,this.opacityBoxes.forEach(function(V){V.style.borderColor=V===K?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},I}(s),S=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.setOpacity=V.setOpacity.bind(V),V.fillColor=q.defaultHighlightColor,V.strokeWidth=0,V.opacity=q.defaultHighlightOpacity,V.fillPanel=new d("Color",q.defaultColorSet,V.fillColor),V.fillPanel.onColorChanged=V.setFillColor,V.opacityPanel=new y("Opacity",q.defaultOpacitySteps,V.opacity),V.opacityPanel.onOpacityChanged=V.setOpacity,V}return z(I,J),I.prototype.setOpacity=function(U){this.opacity=U,this.visual&&D.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var U=J.prototype.getState.call(this);return U.typeName=I.typeName,U},I.typeName="HighlightMarker",I.title="Highlight marker",I.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>',I}(k),F='<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>',A=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.bgColor="transparent",V.tipPosition={x:0,y:0},V.tipBase1Position={x:0,y:0},V.tipBase2Position={x:0,y:0},V.tipMoving=!1,V.color=q.defaultStrokeColor,V.bgColor=q.defaultFillColor,V.fontFamily=q.defaultFontFamily,V.defaultSize={x:100,y:30},V.setBgColor=V.setBgColor.bind(V),V.getTipPoints=V.getTipPoints.bind(V),V.positionTip=V.positionTip.bind(V),V.setTipPoints=V.setTipPoints.bind(V),V.colorPanel=new d("Text color",q.defaultColorSet,V.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>'),V.colorPanel.onColorChanged=V.setColor,V.bgColorPanel=new d("Fill color",q.defaultColorSet,V.bgColor,F),V.bgColorPanel.onColorChanged=V.setBgColor,V.fontFamilyPanel=new h("Font",q.defaultFontFamilies,q.defaultFontFamily),V.fontFamilyPanel.onFontChanged=V.setFont,V.tipGrip=new a,V.tipGrip.visual.transform.baseVal.appendItem(D.createTransform()),V.controlBox.appendChild(V.tipGrip.visual),V}return z(I,J),I.prototype.ownsTarget=function(U){return J.prototype.ownsTarget.call(this,U)||this.tipGrip.ownsTarget(U)||this.tip===U},I.prototype.createTip=function(){D.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=D.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},I.prototype.pointerDown=function(U,K){this.state==="new"&&J.prototype.pointerDown.call(this,U,K),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(K)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):J.prototype.pointerDown.call(this,U,K)},I.prototype.pointerUp=function(U){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,J.prototype.pointerUp.call(this,U);else{var K=this.state==="creating";J.prototype.pointerUp.call(this,U),this.setTipPoints(K),this.positionTip()}},I.prototype.manipulate=function(U){if(this.tipMoving){var K=this.unrotatePoint(U);this.tipPosition={x:K.x-this.manipulationStartLeft,y:K.y-this.manipulationStartTop},this.positionTip()}else J.prototype.manipulate.call(this,U)},I.prototype.setBgColor=function(U){this.bgRectangle&&this.tip&&(D.setAttributes(this.bgRectangle,[["fill",U]]),D.setAttributes(this.tip,[["fill",U]])),this.bgColor=U,this.fillColorChanged(U)},I.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},I.prototype.setTipPoints=function(U){U===void 0&&(U=!1);var K=Math.min(this.height/2,15),q=this.height/5;U&&(this.tipPosition={x:K+q/2,y:this.height+20});var V=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?V<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(q=this.width/5,K=Math.min(this.width/2,15),this.tipBase1Position={x:K,y:0},this.tipBase2Position={x:K+q,y:0}):(this.tipBase1Position={x:0,y:K},this.tipBase2Position={x:0,y:K+q}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?V<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(q=this.width/5,K=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-K-q,y:0},this.tipBase2Position={x:this.width-K,y:0}):(this.tipBase1Position={x:this.width,y:K},this.tipBase2Position={x:this.width,y:K+q}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?V<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(q=this.width/5,K=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-K-q,y:this.height},this.tipBase2Position={x:this.width-K,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-K-q},this.tipBase2Position={x:this.width,y:this.height-K}):V<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(q=this.width/5,K=Math.min(this.width/2,15),this.tipBase1Position={x:K,y:this.height},this.tipBase2Position={x:K+q,y:this.height}):(this.tipBase1Position={x:0,y:this.height-K},this.tipBase2Position={x:0,y:this.height-K-q})},I.prototype.resize=function(U){J.prototype.resize.call(this,U),this.positionTip()},I.prototype.positionTip=function(){D.setAttributes(this.tip,[["points",this.getTipPoints()]]);var U=this.tipGrip.visual.transform.baseVal.getItem(0);U.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(U,0)},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),I.prototype.select=function(){this.positionTip(),J.prototype.select.call(this)},I.prototype.getState=function(){var U=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},J.prototype.getState.call(this));return U.typeName=I.typeName,U},I.prototype.restoreState=function(U){var K=U;this.bgColor=K.bgColor,this.tipPosition=K.tipPosition,J.prototype.restoreState.call(this,U),this.createTip(),this.setTipPoints()},I.prototype.scale=function(U,K){J.prototype.scale.call(this,U,K),this.tipPosition={x:this.tipPosition.x*U,y:this.tipPosition.y*K},this.positionTip()},I.typeName="CalloutMarker",I.title="Callout marker",I.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>',I}(C),X=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.fillColor="transparent",V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.opacity=1,V.strokeColor=q.defaultColor,V.strokeWidth=q.defaultStrokeWidth,V.strokeDasharray=q.defaultStrokeDasharray,V.fillColor=q.defaultFillColor,V.setStrokeColor=V.setStrokeColor.bind(V),V.setFillColor=V.setFillColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.setOpacity=V.setOpacity.bind(V),V.createVisual=V.createVisual.bind(V),V.strokePanel=new d("Line color",W(q.defaultColorSet,["transparent"]),q.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.fillPanel=new d("Fill color",W(q.defaultColorSet,["transparent"]),V.fillColor,F),V.fillPanel.onColorChanged=V.setFillColor,V.strokeWidthPanel=new w("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new M("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V.opacityPanel=new y("Opacity",q.defaultOpacitySteps,V.opacity),V.opacityPanel.onOpacityChanged=V.setOpacity,V}return z(I,J),I.prototype.ownsTarget=function(U){return!(!J.prototype.ownsTarget.call(this,U)&&U!==this.visual)},I.prototype.createVisual=function(){this.visual=D.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)},I.prototype.pointerDown=function(U,K){J.prototype.pointerDown.call(this,U,K),this.state==="new"&&(this.createVisual(),this.moveVisual(U),this._state="creating")},I.prototype.manipulate=function(U){J.prototype.manipulate.call(this,U)},I.prototype.resize=function(U){J.prototype.resize.call(this,U),this.setSize()},I.prototype.setSize=function(){J.prototype.setSize.call(this),D.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},I.prototype.pointerUp=function(U){J.prototype.pointerUp.call(this,U),this.setSize()},I.prototype.setStrokeColor=function(U){this.strokeColor=U,this.visual&&D.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(U),this.stateChanged()},I.prototype.setFillColor=function(U){this.fillColor=U,this.visual&&D.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(U),this.stateChanged()},I.prototype.setStrokeWidth=function(U){this.strokeWidth=U,this.visual&&D.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},I.prototype.setStrokeDasharray=function(U){this.strokeDasharray=U,this.visual&&D.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},I.prototype.setOpacity=function(U){this.opacity=U,this.visual&&D.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var U=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},J.prototype.getState.call(this));return U.typeName=I.typeName,U},I.prototype.restoreState=function(U){var K=U;this.fillColor=K.fillColor,this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.opacity=K.opacity,this.createVisual(),J.prototype.restoreState.call(this,U),this.setSize()},I.prototype.scale=function(U,K){J.prototype.scale.call(this,U,K),this.setSize()},I.typeName="EllipseMarker",I.title="Ellipse marker",I.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>',I}(R),ne=function(J){function I(U,K,q){return J.call(this,U,K,q)||this}return z(I,J),Object.defineProperty(I.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),I.prototype.ownsTarget=function(U){return!(!J.prototype.ownsTarget.call(this,U)&&U!==this.tip1&&U!==this.tip2)},I.prototype.createTips=function(){this.tip1=D.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(D.createTransform()),this.visual.appendChild(this.tip1),this.tip2=D.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(D.createTransform()),this.visual.appendChild(this.tip2)},I.prototype.pointerDown=function(U,K){J.prototype.pointerDown.call(this,U,K),this.state==="creating"&&this.createTips()},I.prototype.adjustVisual=function(){if(J.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(D.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()]]),D.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 U=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),K=this.tip1.transform.baseVal.getItem(0);K.setRotate(U,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(K,0);var q=this.tip2.transform.baseVal.getItem(0);q.setRotate(U+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(q,0)}},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var U=J.prototype.getState.call(this);return U.typeName=I.typeName,U},I.prototype.restoreState=function(U){J.prototype.restoreState.call(this,U),this.createTips(),this.adjustVisual()},I.typeName="MeasurementMarker",I.title="Measurement marker",I.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>',I}(g),fe=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.strokePanel.colors=q.defaultColorSet,V.fillColor="transparent",V}return z(I,J),Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var U=J.prototype.getState.call(this);return U.typeName=I.typeName,U},I.typeName="EllipseFrameMarker",I.title="Ellipse frame marker",I.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>',I}(X),ye=function(){function J(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(J.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),J.prototype.addUndoStep=function(I){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(I)||(this.undoStack.push(I),JSON.stringify(this.lastRedoStep)!==JSON.stringify(I)&&this.redoStack.splice(0,this.redoStack.length))},J.prototype.replaceLastUndoStep=function(I){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=I)},J.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},J.prototype.undo=function(){if(this.undoStack.length>1){var I=this.undoStack.pop();return I!==void 0&&this.redoStack.push(I),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},J.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},J}(),Pe=function(J){function I(U,K,q){var V=J.call(this,U,K,q)||this;return V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.curveX=0,V.curveY=0,V.manipulationStartCurveX=0,V.manipulationStartCurveY=0,V.setStrokeColor=V.setStrokeColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.positionGrips=V.positionGrips.bind(V),V.addControlGrips=V.addControlGrips.bind(V),V.adjustVisual=V.adjustVisual.bind(V),V.setupControlBox=V.setupControlBox.bind(V),V.resize=V.resize.bind(V),V.strokeColor=q.defaultColor,V.strokeWidth=q.defaultStrokeWidth,V.strokeDasharray=q.defaultStrokeDasharray,V.strokePanel=new d("Line color",q.defaultColorSet,q.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new w("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new M("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return z(I,J),I.prototype.ownsTarget=function(U){return!(!J.prototype.ownsTarget.call(this,U)&&U!==this.visual&&U!==this.selectorCurve&&U!==this.visibleCurve&&!this.curveGrip.ownsTarget(U))},I.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},I.prototype.createVisual=function(){this.visual=D.createGroup(),this.selectorCurve=D.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=D.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)},I.prototype.pointerDown=function(U,K){J.prototype.pointerDown.call(this,U,K),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=U.x,this.curveY=U.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(K)&&(this.activeGrip=this.curveGrip,this._state="resize")},I.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),D.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),D.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),D.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},I.prototype.setupControlBox=function(){J.prototype.setupControlBox.call(this),this.curveControlLine1=D.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=D.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)},I.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,J.prototype.addControlGrips.call(this)},I.prototype.positionGrips=function(){J.prototype.positionGrips.call(this);var U=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-U/2,this.curveY-U/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()))},I.prototype.manipulate=function(U){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+U.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+U.y-this.manipulationStartY),J.prototype.manipulate.call(this,U)},I.prototype.resize=function(U){this.activeGrip===this.curveGrip&&(this.curveX=U.x,this.curveY=U.y),J.prototype.resize.call(this,U),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},I.prototype.setStrokeColor=function(U){this.strokeColor=U,this.adjustVisual(),this.colorChanged(U)},I.prototype.setStrokeWidth=function(U){this.strokeWidth=U,this.adjustVisual()},I.prototype.setStrokeDasharray=function(U){this.strokeDasharray=U,this.adjustVisual()},I.prototype.scale=function(U,K){this.curveX=this.curveX*U,this.curveY=this.curveY*K,J.prototype.scale.call(this,U,K)},Object.defineProperty(I.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),I.prototype.getState=function(){var U=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},J.prototype.getState.call(this));return U.typeName=I.typeName,U},I.prototype.restoreState=function(U){J.prototype.restoreState.call(this,U);var K=U;this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.curveX=K.curveX,this.curveY=K.curveY,this.createVisual(),this.adjustVisual()},I.typeName="CurveMarker",I.title="Curve marker",I.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>',I}(b),xe=function(){function J(I,U){U===void 0&&(U=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=I,this.cancelable=U}return Object.defineProperty(J.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),J.prototype.preventDefault=function(){this._defaultPrevented=!0},J}(),Ie=function(J){function I(U,K,q){var V=J.call(this,U,!1)||this;return V.dataUrl=K,V.state=q,V}return z(I,J),I}(xe),Me=function(J){function I(U,K,q){q===void 0&&(q=!1);var V=J.call(this,U,q)||this;return V.marker=K,V}return z(I,J),I}(xe),ke=function(){function J(){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 J.prototype.addEventListener=function(I,U){this[I].push(U)},J.prototype.removeEventListener=function(I,U){var K=this[I].indexOf(U);K>-1&&this[I].splice(K,1)},J}(),Ee=function(){function J(I){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new _,this._isOpen=!1,this.undoRedoManager=new ye,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 ke,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=J.instanceCounter++,this.styles=new T(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=I,this.targetRoot=document.body,this.width=I.clientWidth,this.height=I.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(J.prototype,"ALL_MARKER_TYPES",{get:function(){return[L,x,P,C,fe,X,S,A,ne,k,g,Pe]},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[L,x,P,C,X,S,A]},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"BASIC_MARKER_TYPES",{get:function(){return[L,x,P,C,S]},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(I){var U=this;this._availableMarkerTypes.splice(0),I.forEach(function(K){if(typeof K=="string"){var q=U.ALL_MARKER_TYPES.find(function(V){return V.typeName===K});q!==void 0&&U._availableMarkerTypes.push(q)}else U._availableMarkerTypes.push(K)})},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(I){this._zoomLevel=I,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(J.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),J.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),G.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},J.prototype.show=function(){var I=this;this.styles.styleSheetRoot===void 0&&n.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=n.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(U){return U(new xe(I))})},J.prototype.render=function(){return N(this,void 0,void 0,function(){var I;return Y(this,function(U){switch(U.label){case 0:return this.setCurrentMarker(),(I=new j).naturalSize=this.renderAtNaturalSize,I.imageType=this.renderImageType,I.imageQuality=this.renderImageQuality,I.markersOnly=this.renderMarkersOnly,I.width=this.renderWidth,I.height=this.renderHeight,[4,I.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return U.sent(),[4,I.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,U.sent()]}})})},J.prototype.close=function(I){var U=this;if(I===void 0&&(I=!1),this.isOpen){var K=!1;I||this.eventListeners.beforeclose.forEach(function(q){var V=new xe(U,!0);q(V),V.defaultPrevented&&(K=!0)}),K||(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(q){return q(new xe(U))}),this.detachEvents(),this._isOpen=!1)}},J.prototype.addMarkersToToolbar=function(){for(var I,U=[],K=0;K<arguments.length;K++)U[K]=arguments[K];(I=this._availableMarkerTypes).push.apply(I,U)},J.prototype.addRenderEventListener=function(I){this.addEventListener("render",function(U){I(U.dataUrl,U.state)})},J.prototype.removeRenderEventListener=function(I){},J.prototype.addCloseEventListener=function(I){this.addEventListener("close",function(){I()})},J.prototype.removeCloseEventListener=function(I){},J.prototype.setupResizeObserver=function(){var I=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){I.resize(I.target.clientWidth,I.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return I.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},J.prototype.onPopupTargetResize=function(){var I=1*this.target.clientWidth/this.target.clientHeight,U=this.editorCanvas.clientWidth/I>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*I:this.editorCanvas.clientWidth,K=U<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/I;this.resize(U,K)},J.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},J.prototype.resize=function(I,U){this._isResizing=!0;var K=I/this.imageWidth,q=U/this.imageHeight;this.imageWidth=Math.round(I),this.imageHeight=Math.round(U),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(K,q),this._isResizing=!1},J.prototype.scaleMarkers=function(I,U){var K,q=this;this._currentMarker&&this._currentMarker instanceof C?this._currentMarker.scale(I,U):(K=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(V){V!==q._currentMarker&&V.scale(I,U)}),K!==void 0&&this.setCurrentMarker(K)},J.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"},J.prototype.setTopLeft=function(){var I=this.editingTarget.getBoundingClientRect(),U=this.editorCanvas.getBoundingClientRect();this.left=I.left-U.left,this.top=I.top-U.top},J.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)},J.prototype.addDefs=function(){for(var I,U=[],K=0;K<arguments.length;K++)U[K]=arguments[K];this.defs=D.createDefs(),this.addDefsToImage(),(I=this.defs).append.apply(I,U)},J.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},J.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)},J.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},J.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},J.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)},J.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},J.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)},J.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 I=document.createElement("a");I.href="https://markerjs.com/",I.target="_blank",I.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>',I.title="Powered by marker.js",I.style.display="grid",I.style.alignItems="center",I.style.justifyItems="center",I.style.padding="3px",I.style.width="20px",I.style.height="20px",this.logoUI.appendChild(I),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},J.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")},J.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"},J.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},J.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 I=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=I+"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 p(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 c(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},J.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},J.prototype.removeMarker=function(I){this.markerImage.removeChild(I.container),this.markers.indexOf(I)>-1&&this.markers.splice(this.markers.indexOf(I),1),I.dispose()},J.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())},J.prototype.toolbarButtonClicked=function(I,U){if(I==="marker"&&U!==void 0)this.createNewMarker(U);else if(I==="action")switch(U){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()}},J.prototype.deleteSelectedMarker=function(){var I=this;if(this._currentMarker!==void 0){var U=!1;if(this.eventListeners.markerbeforedelete.forEach(function(q){var V=new Me(I,I._currentMarker,!0);q(V),V.defaultPrevented&&(U=!0)}),!U){var K=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(q){return q(new Me(I,K))})}}},J.prototype.clear=function(){var I=this,U=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ue){var Ae=new Me(I,void 0,!0);ue(Ae),Ae.defaultPrevented&&(U=!0)}),!U)){this.setCurrentMarker();for(var K=function(ue){var Ae=q.markers[ue];q.setCurrentMarker(q.markers[ue]),q._currentMarker.dispose(),q.markerImage.removeChild(q._currentMarker.container),q.markers.splice(q.markers.indexOf(q._currentMarker),1),q.eventListeners.markerdelete.forEach(function(Ue){return Ue(new Me(I,Ae))})},q=this,V=this.markers.length-1;V>=0;V--)K(V);this.addUndoStep()}},Object.defineProperty(J.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),J.prototype.showNotesEditor=function(){var I;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=(I=this._currentMarker.notes)!==null&&I!==void 0?I:"",this.overlayContainer.appendChild(this.notesArea))},J.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)},J.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},J.prototype.addUndoStep=function(){var I=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var U=this.getState(),K=this.undoRedoManager.getLastUndoStep();if(!K||K.width===U.width&&K.height===U.height){var q=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(U),q<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(V){return V(new xe(I))})}else this.undoRedoManager.replaceLastUndoStep(U),this.eventListeners.statechange.forEach(function(V){return V(new xe(I))})}},J.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},J.prototype.undoStep=function(){var I=this,U=this.undoRedoManager.undo();U!==void 0&&(this.restoreState(U),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(K){return K(new xe(I))}))},J.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},J.prototype.redoStep=function(){var I=this,U=this.undoRedoManager.redo();U!==void 0&&(this.restoreState(U),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(K){return K(new xe(I))}))},J.prototype.stepZoom=function(){var I=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=I<this.zoomSteps.length-1?this.zoomSteps[I+1]:this.zoomSteps[0]},J.prototype.panTo=function(I){this.contentDiv.scrollBy({left:this.prevPanPoint.x-I.x,top:this.prevPanPoint.y-I.y}),this.prevPanPoint=I},J.prototype.startRenderAndClose=function(){return N(this,void 0,void 0,function(){var I,U,K=this;return Y(this,function(q){switch(q.label){case 0:return[4,this.render()];case 1:return I=q.sent(),U=this.getState(),this.eventListeners.render.forEach(function(V){return V(new Ie(K,I,U))}),this.close(!0),[2]}})})},J.prototype.getState=function(I){I===!0&&this.setCurrentMarker();var U={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(K){return U.markers.push(K.getState())}),U},J.prototype.restoreState=function(I){var U=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);I.markers.forEach(function(K){var q=U._availableMarkerTypes.find(function(ue){return ue.typeName===K.typeName});if(q!==void 0){var V=U.addNewMarker(q);V.restoreState(K),U.markers.push(V)}}),I.width&&I.height&&(I.width!==this.imageWidth||I.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/I.width,this.imageHeight/I.height),this.eventListeners.restorestate.forEach(function(K){return K(new xe(U))})},J.prototype.addNewMarker=function(I){var U=D.createGroup();return this.markerImage.appendChild(U),new I(U,this.overlayContainer,this.settings)},J.prototype.createNewMarker=function(I){var U,K=this;(U=typeof I=="string"?this._availableMarkerTypes.find(function(q){return q.typeName===I}):I)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(U),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(U.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(q){return q(new Me(K,K._currentMarker))}))},J.prototype.markerCreated=function(I){var U=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(I),this.setCurrentMarker(I),I instanceof x&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(x):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(K){return K(new Me(U,U._currentMarker))})},J.prototype.colorChanged=function(I){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=I,this.settings.defaultStrokeColor=I)},J.prototype.fillColorChanged=function(I){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=I)},J.prototype.markerStateChanged=function(I){var U=this;this.eventListeners.markerchange.forEach(function(K){return K(new Me(U,I))})},J.prototype.setCurrentMarker=function(I){var U=this;this._currentMarker!==I&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(K){return K(new Me(U,U._currentMarker))})),this._currentMarker=I,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(K){return K(new Me(U,U._currentMarker))}))},J.prototype.onPointerDown=function(I){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||I.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var U=this.markers.find(function(K){return K.ownsTarget(I.target)});U!==void 0?(this.setCurrentMarker(U),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(I.clientX,I.clientY),I.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:I.clientX,y:I.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(I.clientX,I.clientY))},J.prototype.onDblClick=function(I){if(this._isFocused||this.focus(),this.mode==="select"){var U=this.markers.find(function(K){return K.ownsTarget(I.target)});U!==void 0&&U!==this._currentMarker&&this.setCurrentMarker(U),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(I.clientX,I.clientY),I.target):this.setCurrentMarker()}},J.prototype.onPointerMove=function(I){this.touchPoints!==1&&I.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||I.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(I.clientX,I.clientY)):this.zoomLevel>1&&this.panTo({x:I.clientX,y:I.clientY}))},J.prototype.onPointerUp=function(I){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(I.clientX,I.clientY)),this.isDragging=!1,this.addUndoStep()},J.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},J.prototype.onKeyUp=function(I){this._currentMarker===void 0||this.notesArea!==void 0||I.key!=="Delete"&&I.key!=="Backspace"||this.deleteSelectedMarker()},J.prototype.clientToLocalCoordinates=function(I,U){var K=this.markerImage.getBoundingClientRect();return{x:(I-K.left)/this.zoomLevel,y:(U-K.top)/this.zoomLevel}},J.prototype.onWindowResize=function(){this.positionUI()},J.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var I=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=I+"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()},J.prototype.addLicenseKey=function(I){G.addKey(I)},J.prototype.addEventListener=function(I,U){this.eventListeners.addEventListener(I,U)},J.prototype.removeEventListener=function(I,U){this.eventListeners.removeEventListener(I,U)},J.prototype.renderState=function(I){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(I),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(J.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),J.prototype.focus=function(){var I=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(U){return U(new xe(I))}))},J.prototype.blur=function(){var I=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(U){return U(new xe(I))}))},J.instanceCounter=0,J}()},T8No:function(Be,he,B){"use strict";B.d(he,"a",function(){return G}),B.d(he,"e",function(){return j}),B.d(he,"c",function(){return g}),B.d(he,"b",function(){return h}),B.d(he,"d",function(){return C}),B.d(he,"f",function(){return P});var Z=B("MNsG"),z=B("N0LK"),N=B("Cg/j");let Y=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",Y.indexOf("Edg/")>=0),W.set("isFirefox",Y.indexOf("Firefox")>=0),W.set("isChrome",Y.indexOf("Chrome")>=0),W.set("isSafari",Y.indexOf("Safari")>=0);const D=Object.prototype.hasOwnProperty;class G{static has(y){return f.create(y)}static equals(y,S){return p.create(y,S)}static regex(y,S){return w.create(y,S)}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,S=!1){return y?this._deserializeOrExpression(y,S):void 0}static _deserializeOrExpression(y,S){let F=y.split("||");return b.create(F.map(A=>this._deserializeAndExpression(A,S)),null,!0)}static _deserializeAndExpression(y,S){let F=y.split("&&");return _.create(F.map(A=>this._deserializeOne(A,S)),null)}static _deserializeOne(y,S){if(y=y.trim(),y.indexOf("!=")>=0){let F=y.split("!=");return d.create(F[0].trim(),this._deserializeValue(F[1],S))}if(y.indexOf("==")>=0){let F=y.split("==");return p.create(F[0].trim(),this._deserializeValue(F[1],S))}if(y.indexOf("=~")>=0){let F=y.split("=~");return w.create(F[0].trim(),this._deserializeRegexValue(F[1],S))}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 i.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 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,S){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,S){if(Object(z.C)(y)){if(S)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let F=y.indexOf("/"),A=y.lastIndexOf("/");if(F===A||F<0){if(S)throw new Error(`bad regexp-value '${y}', missing /-enclosure`);return console.warn(`bad regexp-value '${y}', missing /-enclosure`),null}let X=y.slice(F+1,A),ne=y[A+1]==="i"?"i":"";try{return new RegExp(X,ne)}catch(fe){if(S)throw new Error(`bad regexp-value '${y}', parse error: ${fe}`);return console.warn(`bad regexp-value '${y}', parse error: ${fe}`),null}}}function j(y,S){const F=y?y.substituteConstants():void 0,A=S?S.substituteConstants():void 0;return!F&&!A?!0:!F||!A?!1:F.equals(A)}function n(y,S){return y.cmp(S)}class T{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 v.INSTANCE}}T.INSTANCE=new T;class v{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 T.INSTANCE}}v.INSTANCE=new v;class f{constructor(y,S){this.key=y,this.negated=S,this.type=2}static create(y,S=null){const F=W.get(y);return typeof F=="boolean"?F?v.INSTANCE:T.INSTANCE:new f(y,S)}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?v.INSTANCE:T.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,S,F){this.key=y,this.value=S,this.negated=F,this.type=4}static create(y,S,F=null){if(typeof S=="boolean")return S?f.create(y,F):u.create(y,F);const A=W.get(y);if(typeof A=="boolean"){const X=A?"true":"false";return S===X?v.INSTANCE:T.INSTANCE}return new p(y,S,F)}cmp(y){return y.type!==this.type?this.type-y.type:m(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 S=y?"true":"false";return this.value===S?v.INSTANCE:T.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,S){this.key=y,this.valueKey=S,this.type=10,this.negated=null}static create(y,S){return new c(y,S)}cmp(y){return y.type!==this.type?this.type-y.type:m(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 S=y.getValue(this.valueKey),F=y.getValue(this.key);return Array.isArray(S)?S.indexOf(F)>=0:typeof F=="string"&&typeof S=="object"&&S!==null?D.call(S,F):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=s.create(this)),this.negated}}class s{constructor(y){this._actual=y,this.type=11}static create(y){return new s(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,S,F){this.key=y,this.value=S,this.negated=F,this.type=5}static create(y,S,F=null){if(typeof S=="boolean")return S?u.create(y,F):f.create(y,F);const A=W.get(y);if(typeof A=="boolean"){const X=A?"true":"false";return S===X?T.INSTANCE:v.INSTANCE}return new d(y,S,F)}cmp(y){return y.type!==this.type?this.type-y.type:m(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 S=y?"true":"false";return this.value===S?T.INSTANCE:v.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,S){this.key=y,this.negated=S,this.type=3}static create(y,S=null){const F=W.get(y);return typeof F=="boolean"?F?T.INSTANCE:v.INSTANCE:new u(y,S)}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?T.INSTANCE:v.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 l(y,S){if(typeof y=="string"){const F=parseFloat(y);isNaN(F)||(y=F)}return typeof y=="string"||typeof y=="number"?S(y):T.INSTANCE}class a{constructor(y,S,F){this.key=y,this.value=S,this.negated=F,this.type=12}static create(y,S,F=null){return l(S,A=>new a(y,A,F))}cmp(y){return y.type!==this.type?this.type-y.type:m(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 i{constructor(y,S,F){this.key=y,this.value=S,this.negated=F,this.type=13}static create(y,S,F=null){return l(S,A=>new i(y,A,F))}cmp(y){return y.type!==this.type?this.type-y.type:m(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,S,F){this.key=y,this.value=S,this.negated=F,this.type=14}static create(y,S,F=null){return l(S,A=>new R(y,A,F))}cmp(y){return y.type!==this.type?this.type-y.type:m(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=i.create(this.key,this.value,this)),this.negated}}class O{constructor(y,S,F){this.key=y,this.value=S,this.negated=F,this.type=15}static create(y,S,F=null){return l(S,A=>new O(y,A,F))}cmp(y){return y.type!==this.type?this.type-y.type:m(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 w{constructor(y,S){this.key=y,this.regexp=S,this.type=7,this.negated=null}static create(y,S){return new w(y,S)}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 S=this.regexp?this.regexp.source:"",F=y.regexp?y.regexp.source:"";return S<F?-1:S>F?1:0}equals(y){if(y.type===this.type){const S=this.regexp?this.regexp.source:"",F=y.regexp?y.regexp.source:"";return this.key===y.key&&S===F}return!1}substituteConstants(){return this}evaluate(y){let S=y.getValue(this.key);return this.regexp?this.regexp.test(S):!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=M.create(this)),this.negated}}class M{constructor(y){this._actual=y,this.type=8}static create(y){return new M(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 L(y){let S=null;for(let F=0,A=y.length;F<A;F++){const X=y[F].substituteConstants();if(y[F]!==X&&S===null){S=[];for(let ne=0;ne<F;ne++)S[ne]=y[ne]}S!==null&&(S[F]=X)}return S===null?y:S}class _{constructor(y,S){this.expr=y,this.negated=S,this.type=6}static create(y,S){return _._normalizeArr(y,S)}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 S=0,F=this.expr.length;S<F;S++){const A=n(this.expr[S],y.expr[S]);if(A!==0)return A}return 0}equals(y){if(y.type===this.type){if(this.expr.length!==y.expr.length)return!1;for(let S=0,F=this.expr.length;S<F;S++)if(!this.expr[S].equals(y.expr[S]))return!1;return!0}return!1}substituteConstants(){const y=L(this.expr);return y===this.expr?this:_.create(y,this.negated)}evaluate(y){for(let S=0,F=this.expr.length;S<F;S++)if(!this.expr[S].evaluate(y))return!1;return!0}static _normalizeArr(y,S){const F=[];let A=!1;for(const X of y){if(!X)continue;if(X.type===1){A=!0;continue}if(X.type===0)return T.INSTANCE;if(X.type===6){F.push(...X.expr);continue}F.push(X)}if(F.length===0&&A)return v.INSTANCE;if(F.length===0)return;if(F.length===1)return F[0];F.sort(n);for(let X=1;X<F.length;X++)F[X-1].equals(F[X])&&(F.splice(X,1),X--);if(F.length===1)return F[0];for(;F.length>1;){const X=F[F.length-1];if(X.type!==9)break;F.pop();const ne=F.pop(),fe=F.length===0,ye=b.create(X.expr.map(Pe=>_.create([Pe,ne],null)),null,fe);ye&&(F.push(ye),F.sort(n))}return F.length===1?F[0]:new _(F,S)}serialize(){return this.expr.map(y=>y.serialize()).join(" && ")}keys(){const y=[];for(let S of this.expr)y.push(...S.keys());return y}negate(){if(!this.negated){const y=[];for(let S of this.expr)y.push(S.negate());this.negated=b.create(y,this,!0)}return this.negated}}class b{constructor(y,S){this.expr=y,this.negated=S,this.type=9}static create(y,S,F){return b._normalizeArr(y,S,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 S=0,F=this.expr.length;S<F;S++){const A=n(this.expr[S],y.expr[S]);if(A!==0)return A}return 0}equals(y){if(y.type===this.type){if(this.expr.length!==y.expr.length)return!1;for(let S=0,F=this.expr.length;S<F;S++)if(!this.expr[S].equals(y.expr[S]))return!1;return!0}return!1}substituteConstants(){const y=L(this.expr);return y===this.expr?this:b.create(y,this.negated,!1)}evaluate(y){for(let S=0,F=this.expr.length;S<F;S++)if(this.expr[S].evaluate(y))return!0;return!1}static _normalizeArr(y,S,F){let A=[],X=!1;if(y){for(let ne=0,fe=y.length;ne<fe;ne++){const ye=y[ne];if(!ye)continue;if(ye.type===0){X=!0;continue}if(ye.type===1)return v.INSTANCE;if(ye.type===9){A=A.concat(ye.expr);continue}A.push(ye)}if(A.length===0&&X)return T.INSTANCE;A.sort(n)}if(A.length===0)return;if(A.length===1)return A[0];for(let ne=1;ne<A.length;ne++)A[ne-1].equals(A[ne])&&(A.splice(ne,1),ne--);if(A.length===1)return A[0];if(F){for(let ne=0;ne<A.length;ne++)for(let fe=ne+1;fe<A.length;fe++)P(A[ne],A[fe])&&(A.splice(fe,1),fe--);if(A.length===1)return A[0]}return new b(A,S)}serialize(){return this.expr.map(y=>y.serialize()).join(" || ")}keys(){const y=[];for(let S of this.expr)y.push(...S.keys());return y}negate(){if(!this.negated){let y=[];for(let S of this.expr)y.push(S.negate());for(;y.length>1;){const S=y.shift(),F=y.shift(),A=[];for(const ne of k(S))for(const fe of k(F))A.push(_.create([ne,fe],null));const X=y.length===0;y.unshift(b.create(A,null,X))}this.negated=y[0]}return this.negated}}class g extends f{constructor(y,S,F){super(y,null);this._defaultValue=S,typeof F=="object"?g._info.push(Object.assign(Object.assign({},F),{key:y})):F!==!0&&g._info.push({key:y,description:F,type:S!=null?typeof S:void 0})}static all(){return g._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)}}g._info=[];const h=Object(N.c)("contextKeyService"),C="setContext";function x(y,S){return y<S?-1:y>S?1:0}function m(y,S,F,A){return y<F?-1:y>F?1:S<A?-1:S>A?1:0}function P(y,S){if(S.type===6&&y.type!==9&&y.type!==6){for(const X of S.expr)if(y.equals(X))return!0}const F=y.negate(),A=k(F).concat(k(S));A.sort(n);for(let X=0;X<A.length;X++){const ne=A[X],fe=ne.negate();for(let ye=X+1;ye<A.length;ye++){const Pe=A[ye];if(fe.equals(Pe))return!0}}return!1}function k(y){return y.type===9?y.expr:[y]}},TGq3:function(Be,he,B){Be.exports=B.p+"static/lockclose.365036e8.svg"},TXwP:function(Be,he,B){var Z,z;(function(){var N;(function(){"use strict";var W=[,,function(n){function T(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=[]}T.prototype.clone_empty=function(){var p=new T(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},T.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},T.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},T.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))},T.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)},T.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},T.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},T.prototype.is_empty=function(){return this.__items.length===0},T.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},T.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},T.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},T.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},T.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},T.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},T.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 v(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}v.prototype.get_indent_size=function(p,c){var s=this.__base_string_length;return c=c||0,p<0&&(s=0),s+=p*this.__indent_size,s+=c,s},v.prototype.get_indent_string=function(p,c){var s=this.__base_string;return c=c||0,p<0&&(p=0,s=""),c+=p*this.__indent_size,this.__ensure_cache(c),s+=this.__cache[c],s},v.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var p=this.__cache.length,c=0,s="";this.__indent_size&&p>=this.__indent_size&&(c=Math.floor(p/this.__indent_size),p-=c*this.__indent_size,s=new Array(c+1).join(this.__indent_string)),p&&(s+=new Array(p+1).join(" ")),this.__cache.push(s)};function f(p,c){this.__indent_cache=new v(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 T(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 s=this.__lines.join(`
`);return p!==`
`&&(s=s.replace(/[\n]/g,p)),s},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 s=this.__lines.length-2;s>=0;){var d=this.__lines[s];if(d.is_empty())break;if(d.item(0).indexOf(p)!==0&&d.item(-1)!==c){this.__lines.splice(s+1,0,new T(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},n.exports.Output=f},,,,function(n){function T(p,c){this.raw_options=v(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"])}T.prototype._get_array=function(p,c){var s=this.raw_options[p],d=c||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(d=s.concat()):typeof s=="string"&&(d=s.split(/[^a-zA-Z0-9_\/\-]+/)),d},T.prototype._get_boolean=function(p,c){var s=this.raw_options[p],d=s===void 0?!!c:!!s;return d},T.prototype._get_characters=function(p,c){var s=this.raw_options[p],d=c||"";return typeof s=="string"&&(d=s.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),d},T.prototype._get_number=function(p,c){var s=this.raw_options[p];c=parseInt(c,10),isNaN(c)&&(c=0);var d=parseInt(s,10);return isNaN(d)&&(d=c),d},T.prototype._get_selection=function(p,c,s){var d=this._get_selection_list(p,c,s);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]},T.prototype._get_selection_list=function(p,c,s){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[c[0]],!this._is_valid_selection(s,c))throw new Error("Invalid Default Value!");var d=this._get_array(p,s);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},T.prototype._is_valid_selection=function(p,c){return p.length&&c.length&&!p.some(function(s){return c.indexOf(s)===-1})};function v(p,c){var s={};p=f(p);var d;for(d in p)d!==c&&(s[d]=p[d]);if(c&&p[c])for(d in p[c])s[d]=p[c][d];return s}function f(p){var c={},s;for(s in p){var d=s.replace(/-/g,"_");c[d]=p[s]}return c}n.exports.Options=T,n.exports.normalizeOpts=f,n.exports.mergeOpts=v},,function(n){var T=RegExp.prototype.hasOwnProperty("sticky");function v(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position<this.__input_length},v.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__input.charAt(this.__position),this.__position+=1),f},v.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},v.prototype.__match=function(f,p){f.lastIndex=p;var c=f.exec(this.__input);return c&&!(T&&f.sticky)&&(c.index!==p&&(c=null)),c},v.prototype.test=function(f,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(f,p):!1},v.prototype.testChar=function(f,p){var c=this.peek(p);return f.lastIndex=0,c!==null&&f.test(c)},v.prototype.match=function(f){var p=this.__match(f,this.__position);return p?this.__position+=p[0].length:p=null,p},v.prototype.read=function(f,p,c){var s="",d;return f&&(d=this.match(f),d&&(s+=d[0])),p&&(d||!f)&&(s+=this.readUntil(p,c)),s},v.prototype.readUntil=function(f,p){var c="",s=this.__position;f.lastIndex=this.__position;var d=f.exec(this.__input);return d?(s=d.index,p&&(s+=d[0].length)):s=this.__input_length,c=this.__input.substring(this.__position,s),this.__position=s,c},v.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)},v.prototype.get_regexp=function(f,p){var c=null,s="g";return p&&T&&(s="y"),typeof f=="string"&&f!==""?c=new RegExp(f,s):f&&(c=new RegExp(f.source,s)),c},v.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},v.prototype.peekUntilAfter=function(f){var p=this.__position,c=this.readUntilAfter(f);return this.__position=p,c},v.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=v},,,,,function(n){function T(v,f){v=typeof v=="string"?v:v.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(v+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(v+/\sbeautify\signore:end\s/.source+f,"g")}T.prototype.get_directives=function(v){if(!v.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(v);p;)f[p[1]]=p[2],p=this.__directive_pattern.exec(v);return f},T.prototype.readIgnored=function(v){return v.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=T},,function(n,T,v){var f=v(16).Beautifier,p=v(17).Options;function c(s,d){var u=new f(s,d);return u.beautify()}n.exports=c,n.exports.defaultOptions=function(){return new p}},function(n,T,v){var f=v(17).Options,p=v(2).Output,c=v(8).InputScanner,s=v(13).Directives,d=new s(/\/\*/,/\*\//),u=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,a=/\s/,i=/(?:\s|\n)+/g,R=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,O=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function w(M,L){this._source_text=M||"",this._options=new f(L),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"]}w.prototype.eatString=function(M){var L="";for(this._ch=this._input.next();this._ch;){if(L+=this._ch,this._ch==="\\")L+=this._input.next();else if(M.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return L},w.prototype.eatWhitespace=function(M){for(var L=a.test(this._input.peek()),_=0;a.test(this._input.peek());)this._ch=this._input.next(),M&&this._ch===`
`&&((_===0||_<this._options.max_preserve_newlines)&&(_++,this._output.add_new_line(!0)));return L},w.prototype.foundNestedPseudoClass=function(){for(var M=0,L=1,_=this._input.peek(L);_;){if(_==="{")return!0;if(_==="(")M+=1;else if(_===")"){if(M===0)return!1;M-=1}else if(_===";"||_==="}")return!1;L++,_=this._input.peek(L)}return!1},w.prototype.print_string=function(M){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(M)},w.prototype.preserveSingleSpace=function(M){M&&(this._output.space_before_token=!0)},w.prototype.indent=function(){this._indentLevel++},w.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},w.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var M=this._source_text,L=this._options.eol;L==="auto"&&(L=`
`,M&&u.test(M||"")&&(L=M.match(u)[0])),M=M.replace(l,`
`);var _=M.match(/^[\t ]*/)[0];this._output=new p(this._options,_),this._input=new c(M),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var b=0,g=!1,h=!1,C=!1,x=!1,m=!1,P=!1,k=this._ch,y=!1,S,F,A;S=this._input.read(i),F=S!=="",A=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 X=this._input.read(R),ne=d.get_directives(X);ne&&ne.ignore==="start"&&(X+=d.readIgnored(this._input)),this.print_string(X),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 fe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);fe.match(/[ :]$/)&&(fe=this.eatString(": ").replace(/\s$/,""),this.print_string(fe),this._output.space_before_token=!0),fe=fe.replace(/\s$/,""),fe==="extend"?x=!0:fe==="import"&&(m=!0),fe in this.NESTED_AT_RULE?(this._nestedLevel+=1,fe in this.CONDITIONAL_GROUP_RULE&&(C=!0)):!g&&b===0&&fe.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,g=this._indentLevel>=this._nestedLevel):g=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&g&&(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)):(A==="("?this._output.space_before_token=!1:A!==","&&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(),A==="{"&&this._output.trim(!0),m=!1,x=!1,h&&(this.outdent(),h=!1),this.print_string(this._ch),g=!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 ye=0;ye<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;ye++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[ye])){y=!0;break}(g||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=A==='"'||A==="'";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,m=!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 xe=!1;this._input.lookBack("with")&&(xe=!0),this.preserveSingleSpace(F||xe),this.print_string(this._ch),h&&A==="$"&&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&&!m&&!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&&a.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("="),a.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 Ie=A==='"'||A==="'";this.preserveSingleSpace(Ie||F),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&y&&this._output.add_new_line()}var Me=this._output.get_code(L);return Me},n.exports.Beautifier=w},function(n,T,v){var f=v(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 s=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||s;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}],D={};function G(n){var T=D[n];if(T!==void 0)return T.exports;var v=D[n]={exports:{}};return W[n](v,v.exports,G),v.exports}var j=G(15);N=j})();var Y=N;!(Z=[],z=function(){return{css_beautify:Y}}.apply(he,Z),z!==void 0&&(Be.exports=z))})()},V5fa:function(Be,he,B){Be.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(Be,he,B){"use strict";B.d(he,"d",function(){return Y}),B.d(he,"e",function(){return W}),B.d(he,"c",function(){return D}),B.d(he,"b",function(){return G}),B.d(he,"a",function(){return j});var Z=B("MI8n");class z{constructor(){this._icons=new Map,this._onDidRegister=new Z.b}add(n){const T=this._icons.get(n.id);T?n.description?T.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 N=new z,Y=N;function W(n,T){return new G(n,T)}function D(n){return n?n.replace(/\$\((.*?)\)/g,(T,v)=>` ${v} `).trim():""}class G{constructor(n,T,v){this.id=n,this.definition=T,this.description=v,N.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 T=new RegExp(`^(${n.iconNameExpression})(${n.iconModifierExpression})?$`);function v(c){if(c instanceof G)return["codicon","codicon-"+c.id];const s=T.exec(c.id);if(!s)return v(G.error);let[,d,u]=s;const l=["codicon","codicon-"+d];return u&&l.push("codicon-modifier-"+u.substr(1)),l}n.asClassNameArray=v;function f(c){return v(c).join(" ")}n.asClassName=f;function p(c){return"."+v(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"})}(G||(G={}))},"VrN/":function(Be,he,B){(function(Z,z){Be.exports=z()})(this,function(){"use strict";var Z=navigator.userAgent,z=navigator.platform,N=/gecko\/\d/i.test(Z),Y=/MSIE \d/.test(Z),W=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Z),D=/Edge\/(\d+)/.exec(Z),G=Y||W||D,j=G&&(Y?document.documentMode||6:+(D||W)[1]),n=!D&&/WebKit\//.test(Z),T=n&&/Qt\/\d+\.\d+/.test(Z),v=!D&&/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),s=/PhantomJS/.test(Z),d=!D&&/AppleWebKit/.test(Z)&&/Mobile\/\w+/.test(Z),u=/Android/.test(Z),l=d||u||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Z),a=d||/Mac/.test(z),i=/\bCrOS\b/.test(Z),R=/win/i.test(z),O=f&&Z.match(/Version\/(\d*\.\d*)/);O&&(O=Number(O[1])),O&&O>=15&&(f=!1,n=!0);var w=a&&(T||f&&(O==null||O<12.11)),M=N||G&&j>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _=function(e,t){var o=e.className,r=L(t).exec(o);if(r){var E=o.slice(r.index+r[0].length);e.className=o.slice(0,r.index)+(E?r[1]+E:"")}};function b(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function g(e,t){return b(e).appendChild(t)}function h(e,t,o,r){var E=document.createElement(e);if(o&&(E.className=o),r&&(E.style.cssText=r),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,o,r){var E=h(e,t,o,r);return E.setAttribute("role","presentation"),E}var x;document.createRange?x=function(e,t,o,r){var E=document.createRange();return E.setEnd(r||e,o),E.setStart(e,t),E}:x=function(e,t,o){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(E){return r}return r.collapse(!0),r.moveEnd("character",o),r.moveStart("character",t),r};function m(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 o=e.className;L(t).test(o)||(e.className+=(o?" ":"")+t)}function y(e,t){for(var o=e.split(" "),r=0;r<o.length;r++)o[r]&&!L(o[r]).test(t)&&(t+=" "+o[r]);return t}var S=function(e){e.select()};d?S=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:G&&(S=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 A(e,t,o){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(o!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function X(e,t,o,r,E){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var H=r||0,Q=E||0;;){var ee=e.indexOf(" ",H);if(ee<0||ee>=t)return Q+(t-H);Q+=ee-H,Q+=o-Q%o,H=ee+1}}var ne=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};ne.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ne.prototype.set=function(e,t){this.f=t;var o=+new Date+e;(!this.id||o<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=o)};function fe(e,t){for(var o=0;o<e.length;++o)if(e[o]==t)return o;return-1}var ye=50,Pe={toString:function(){return"CodeMirror.Pass"}},xe={scroll:!1},Ie={origin:"*mouse"},Me={origin:"+move"};function ke(e,t,o){for(var r=0,E=0;;){var H=e.indexOf(" ",r);H==-1&&(H=e.length);var Q=H-r;if(H==e.length||E+Q>=t)return r+Math.min(Q,t-E);if(E+=H-r,E+=o-E%o,r=H+1,E>=t)return r}}var Ee=[""];function J(e){for(;Ee.length<=e;)Ee.push(I(Ee)+" ");return Ee[e]}function I(e){return e[e.length-1]}function U(e,t){for(var o=[],r=0;r<e.length;r++)o[r]=t(e[r],r);return o}function K(e,t,o){for(var r=0,E=o(t);r<e.length&&o(e[r])<=E;)r++;e.splice(r,0,t)}function q(){}function V(e,t){var o;return Object.create?o=Object.create(e):(q.prototype=e,o=new q),t&&A(t,o),o}var ue=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ae(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ue.test(e))}function Ue(e,t){return t?t.source.indexOf("\\w")>-1&&Ae(e)?!0:t.test(e):Ae(e)}function ce(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ge=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Te(e){return e.charCodeAt(0)>=768&&ge.test(e)}function Oe(e,t,o){for(;(o<0?t>0:t<e.length)&&Te(e.charAt(t));)t+=o;return t}function Xe(e,t,o){for(var r=t>o?-1:1;;){if(t==o)return t;var E=(t+o)/2,H=r<0?Math.ceil(E):Math.floor(E);if(H==t)return e(H)?t:o;e(H)?o=H:t=H+r}}function rt(e,t,o,r){if(!e)return r(t,o,"ltr",0);for(var E=!1,H=0;H<e.length;++H){var Q=e[H];(Q.from<o&&Q.to>t||t==o&&Q.to==t)&&(r(Math.max(Q.from,t),Math.min(Q.to,o),Q.level==1?"rtl":"ltr",H),E=!0)}E||r(t,o,"ltr")}var st=null;function nt(e,t,o){var r;st=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&&o=="before"?r=E:st=E),H.from==t&&(H.from!=H.to&&o!="before"?r=E:st=E)}return r!=null?r:st}var bt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function o(oe){return oe<=247?e.charAt(oe):1424<=oe&&oe<=1524?"R":1536<=oe&&oe<=1785?t.charAt(oe-1536):1774<=oe&&oe<=2220?"r":8192<=oe&&oe<=8203?"w":oe==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,H=/[LRr]/,Q=/[Lb1n]/,ee=/[1n]/;function re(oe,Se,De){this.level=oe,this.from=Se,this.to=De}return function(oe,Se){var De=Se=="ltr"?"L":"R";if(oe.length==0||Se=="ltr"&&!r.test(oe))return!1;for(var Ke=oe.length,We=[],at=0;at<Ke;++at)We.push(o(oe.charCodeAt(at)));for(var mt=0,xt=De;mt<Ke;++mt){var Rt=We[mt];Rt=="m"?We[mt]=xt:xt=Rt}for(var Ut=0,It=De;Ut<Ke;++Ut){var jt=We[Ut];jt=="1"&&It=="r"?We[Ut]="n":H.test(jt)&&(It=jt,jt=="r"&&(We[Ut]="R"))}for(var Zt=1,Gt=We[0];Zt<Ke-1;++Zt){var on=We[Zt];on=="+"&&Gt=="1"&&We[Zt+1]=="1"?We[Zt]="1":on==","&&Gt==We[Zt+1]&&(Gt=="1"||Gt=="n")&&(We[Zt]=Gt),Gt=on}for(var Ln=0;Ln<Ke;++Ln){var er=We[Ln];if(er==",")We[Ln]="N";else if(er=="%"){var Kn=void 0;for(Kn=Ln+1;Kn<Ke&&We[Kn]=="%";++Kn);for(var Mr=Ln&&We[Ln-1]=="!"||Kn<Ke&&We[Kn]=="1"?"1":"N",Tr=Ln;Tr<Kn;++Tr)We[Tr]=Mr;Ln=Kn-1}}for(var Jn=0,wr=De;Jn<Ke;++Jn){var sr=We[Jn];wr=="L"&&sr=="1"?We[Jn]="L":H.test(sr)&&(wr=sr)}for(var $n=0;$n<Ke;++$n)if(E.test(We[$n])){var Zn=void 0;for(Zn=$n+1;Zn<Ke&&E.test(We[Zn]);++Zn);for(var Vn=($n?We[$n-1]:De)=="L",Sr=(Zn<Ke?We[Zn]:De)=="L",Ca=Vn==Sr?Vn?"L":"R":De,Ni=$n;Ni<Zn;++Ni)We[Ni]=Ca;$n=Zn-1}for(var dr=[],ci,tr=0;tr<Ke;)if(Q.test(We[tr])){var co=tr;for(++tr;tr<Ke&&Q.test(We[tr]);++tr);dr.push(new re(0,co,tr))}else{var Ci=tr,qi=dr.length,$i=Se=="rtl"?1:0;for(++tr;tr<Ke&&We[tr]!="L";++tr);for(var yr=Ci;yr<tr;)if(ee.test(We[yr])){Ci<yr&&(dr.splice(qi,0,new re(1,Ci,yr)),qi+=$i);var Oa=yr;for(++yr;yr<tr&&ee.test(We[yr]);++yr);dr.splice(qi,0,new re(2,Oa,yr)),qi+=$i,Ci=yr}else++yr;Ci<tr&&dr.splice(qi,0,new re(1,Ci,tr))}return Se=="ltr"&&(dr[0].level==1&&(ci=oe.match(/^\s+/))&&(dr[0].from=ci[0].length,dr.unshift(new re(0,0,ci[0].length))),I(dr).level==1&&(ci=oe.match(/\s+$/))&&(I(dr).to-=ci[0].length,dr.push(new re(0,Ke-ci[0].length,Ke)))),Se=="rtl"?dr.reverse():dr}}();function yt(e,t){var o=e.order;return o==null&&(o=e.order=bt(e.text,t)),o}var Ne=[],Re=function(e,t,o){if(e.addEventListener)e.addEventListener(t,o,!1);else if(e.attachEvent)e.attachEvent("on"+t,o);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Ne).concat(o)}};function Je(e,t){return e._handlers&&e._handlers[t]||Ne}function tt(e,t,o){if(e.removeEventListener)e.removeEventListener(t,o,!1);else if(e.detachEvent)e.detachEvent("on"+t,o);else{var r=e._handlers,E=r&&r[t];if(E){var H=fe(E,o);H>-1&&(r[t]=E.slice(0,H).concat(E.slice(H+1)))}}}function le(e,t){var o=Je(e,t);if(!o.length)return;for(var r=Array.prototype.slice.call(arguments,2),E=0;E<o.length;++E)o[E].apply(null,r)}function $(e,t,o){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),le(e,o||t.type,e,t),pe(t)||t.codemirrorIgnore}function te(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var o=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)fe(o,t[r])==-1&&o.push(t[r])}function ae(e,t){return Je(e,t).length>0}function de(e){e.prototype.on=function(t,o){Re(this,t,o)},e.prototype.off=function(t,o){tt(this,t,o)}}function ie(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function pe(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function be(e){ie(e),se(e)}function _e(e){return e.target||e.srcElement}function Le(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),a&&e.ctrlKey&&t==1&&(t=3),t}var Ye=function(){if(G&&j<9)return!1;var e=h("div");return"draggable"in e||"dragDrop"in e}(),lt;function Et(e){if(lt==null){var t=h("span","\u200B");g(e,h("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(lt=t.offsetWidth<=1&&t.offsetHeight>2&&!(G&&j<8))}var o=lt?h("span","\u200B"):h("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return o.setAttribute("cm-text",""),o}var vt;function ft(e){if(vt!=null)return vt;var t=g(e,document.createTextNode("A\u062EA")),o=x(t,0,1).getBoundingClientRect(),r=x(t,1,2).getBoundingClientRect();return b(e),!o||o.left==o.right?!1:vt=r.right-o.right<3}var ze=`
b`.split(/\n/).length!=3?function(e){for(var t=0,o=[],r=e.length;t<=r;){var E=e.indexOf(`
`,t);E==-1&&(E=e.length);var H=e.slice(t,e.charAt(E-1)=="\r"?E-1:E),Q=H.indexOf("\r");Q!=-1?(o.push(H.slice(0,Q)),t+=Q+1):(o.push(H),t=E+1)}return o}:function(e){return e.split(/\r\n?|\n/)},Qe=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(o){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},He=function(){var e=h("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),me=null;function we(e){if(me!=null)return me;var t=g(e,h("span","x")),o=t.getBoundingClientRect(),r=x(t,0,1).getBoundingClientRect();return me=Math.abs(o.left-r.left)>1}var qe={},Ge={};function pt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),qe[e]=t}function dt(e,t){Ge[e]=t}function je(e){if(typeof e=="string"&&Ge.hasOwnProperty(e))e=Ge[e];else if(e&&typeof e.name=="string"&&Ge.hasOwnProperty(e.name)){var t=Ge[e.name];typeof t=="string"&&(t={name:t}),e=V(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return je("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return je("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Ve(e,t){t=je(t);var o=qe[t.name];if(!o)return Ve(e,"text/plain");var r=o(e,t);if($e.hasOwnProperty(t.name)){var E=$e[t.name];for(var H in E){if(!E.hasOwnProperty(H))continue;r.hasOwnProperty(H)&&(r["_"+H]=r[H]),r[H]=E[H]}}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var Q in t.modeProps)r[Q]=t.modeProps[Q];return r}var $e={};function it(e,t){var o=$e.hasOwnProperty(e)?$e[e]:$e[e]={};A(t,o)}function ut(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var o={};for(var r in t){var E=t[r];E instanceof Array&&(E=E.concat([])),o[r]=E}return o}function et(e,t){for(var o;e.innerMode&&!(o=e.innerMode(t),!o||o.mode==e);)t=o.state,e=o.mode;return o||{mode:e,state:t}}function Dt(e,t,o){return e.startState?e.startState(t,o):!0}var Xt=function(e,t,o){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=o};Xt.prototype.eol=function(){return this.pos>=this.string.length},Xt.prototype.sol=function(){return this.pos==this.lineStart},Xt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Xt.prototype.eat=function(e){var t=this.string.charAt(this.pos),o;if(typeof e=="string"?o=t==e:o=t&&(e.test?e.test(t):e(t)),o)return++this.pos,t},Xt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Xt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Xt.prototype.skipToEnd=function(){this.pos=this.string.length},Xt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Xt.prototype.backUp=function(e){this.pos-=e},Xt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=X(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},Xt.prototype.indentation=function(){return X(this.string,null,this.tabSize)-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},Xt.prototype.match=function(e,t,o){if(typeof e=="string"){var r=function(Q){return o?Q.toLowerCase():Q},E=this.string.substr(this.pos,e.length);if(r(E)==r(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)}},Xt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Xt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Xt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function gt(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 o=e;!o.lines;)for(var r=0;;++r){var E=o.children[r],H=E.chunkSize();if(t<H){o=E;break}t-=H}return o.lines[t]}function Ct(e,t,o){var r=[],E=t.line;return e.iter(t.line,o.line+1,function(H){var Q=H.text;E==o.line&&(Q=Q.slice(0,o.ch)),E==t.line&&(Q=Q.slice(t.ch)),r.push(Q),++E}),r}function Mt(e,t,o){var r=[];return e.iter(t,o,function(E){r.push(E.text)}),r}function St(e,t){var o=t-e.height;if(o)for(var r=e;r;r=r.parent)r.height+=o}function kt(e){if(e.parent==null)return null;for(var t=e.parent,o=fe(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var E=0;!(r.children[E]==t);++E)o+=r.children[E].chunkSize();return o+t.first}function Wt(e,t){var o=e.first;e:do{for(var r=0;r<e.children.length;++r){var E=e.children[r],H=E.height;if(t<H){e=E;continue e}t-=H,o+=E.chunkSize()}return o}while(!e.lines);for(var Q=0;Q<e.lines.length;++Q){var ee=e.lines[Q],re=ee.height;if(t<re)break;t-=re}return o+Q}function dn(e,t){return t>=e.first&&t<e.first+e.size}function $t(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ot(e,t,o){if(o===void 0&&(o=null),!(this instanceof ot))return new ot(e,t,o);this.line=e,this.ch=t,this.sticky=o}function Pt(e,t){return e.line-t.line||e.ch-t.ch}function Ht(e,t){return e.sticky==t.sticky&&Pt(e,t)==0}function zt(e){return ot(e.line,e.ch)}function Vt(e,t){return Pt(e,t)<0?t:e}function nn(e,t){return Pt(e,t)<0?e:t}function rn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Lt(e,t){if(t.line<e.first)return ot(e.first,0);var o=e.first+e.size-1;return t.line>o?ot(o,gt(e,o).text.length):En(t,gt(e,t.line).text.length)}function En(e,t){var o=e.ch;return o==null||o>t?ot(e.line,t):o<0?ot(e.line,0):e}function ct(e,t){for(var o=[],r=0;r<t.length;r++)o[r]=Lt(e,t[r]);return o}var wn=function(e,t){this.state=e,this.lookAhead=t},pn=function(e,t,o,r){this.state=t,this.doc=e,this.line=o,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};pn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},pn.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}},pn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pn.fromSaved=function(e,t,o){return t instanceof wn?new pn(e,ut(e.mode,t.state),o,t.lookAhead):new pn(e,ut(e.mode,t),o)},pn.prototype.save=function(e){var t=e!==!1?ut(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new wn(t,this.maxLookAhead):t};function Hn(e,t,o,r){var E=[e.state.modeGen],H={};_n(e,t.text,e.doc.mode,o,function(oe,Se){return E.push(oe,Se)},H,r);for(var Q=o.state,ee=function(oe){o.baseTokens=E;var Se=e.state.overlays[oe],De=1,Ke=0;o.state=!0,_n(e,t.text,Se.mode,o,function(We,at){for(var mt=De;Ke<We;){var xt=E[De];xt>We&&E.splice(De,1,We,E[De+1],xt),De+=2,Ke=Math.min(We,xt)}if(!at)return;if(Se.opaque)E.splice(mt,De-mt,We,"overlay "+at),De=mt+2;else for(;mt<De;mt+=2){var Rt=E[mt+1];E[mt+1]=(Rt?Rt+" ":"")+"overlay "+at}},H),o.state=Q,o.baseTokens=null,o.baseTokenPos=1},re=0;re<e.state.overlays.length;++re)ee(re);return{styles:E,classes:H.bgClass||H.textClass?H:null}}function Mn(e,t,o){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Dn(e,kt(t)),E=t.text.length>e.options.maxHighlightLength&&ut(e.doc.mode,r.state),H=Hn(e,t,r);E&&(r.state=E),t.stateAfter=r.save(!E),t.styles=H.styles,H.classes?t.styleClasses=H.classes:t.styleClasses&&(t.styleClasses=null),o===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Dn(e,t,o){var r=e.doc,E=e.display;if(!r.mode.startState)return new pn(r,!0,t);var H=or(e,t,o),Q=H>r.first&&gt(r,H-1).stateAfter,ee=Q?pn.fromSaved(r,Q,H):new pn(r,Dt(r.mode),H);return r.iter(H,t,function(re){Un(e,re.text,ee);var oe=ee.line;re.stateAfter=oe==t-1||oe%5==0||oe>=E.viewFrom&&oe<E.viewTo?ee.save():null,ee.nextLine()}),o&&(r.modeFrontier=ee.line),ee}function Un(e,t,o,r){var E=e.doc.mode,H=new Xt(t,e.options.tabSize,o);for(H.start=H.pos=r||0,t==""&&kn(E,o.state);!H.eol();)Pn(E,H,o.state),H.start=H.pos}function kn(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var o=et(e,t);if(o.mode.blankLine)return o.mode.blankLine(o.state)}function Pn(e,t,o,r){for(var E=0;E<10;E++){r&&(r[0]=et(e,o).mode);var H=e.token(t,o);if(t.pos>t.start)return H}throw new Error("Mode "+e.name+" failed to advance stream.")}var Sn=function(e,t,o){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=o};function br(e,t,o,r){var E=e.doc,H=E.mode,Q;t=Lt(E,t);var ee=gt(E,t.line),re=Dn(e,t.line,o),oe=new Xt(ee.text,e.options.tabSize,re),Se;for(r&&(Se=[]);(r||oe.pos<t.ch)&&!oe.eol();)oe.start=oe.pos,Q=Pn(H,oe,re.state),r&&Se.push(new Sn(oe,Q,ut(E.mode,re.state)));return r?Se:new Sn(oe,Q,re.state)}function In(e,t){if(e)for(;;){var o=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!o)break;e=e.slice(0,o.index)+e.slice(o.index+o[0].length);var r=o[1]?"bgClass":"textClass";t[r]==null?t[r]=o[2]:new RegExp("(?:^|\\s)"+o[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+o[2])}return e}function _n(e,t,o,r,E,H,Q){var ee=o.flattenSpans;ee==null&&(ee=e.options.flattenSpans);var re=0,oe=null,Se=new Xt(t,e.options.tabSize,r),De,Ke=e.options.addModeClass&&[null];for(t==""&&In(kn(o,r.state),H);!Se.eol();){if(Se.pos>e.options.maxHighlightLength?(ee=!1,Q&&Un(e,t,r,Se.pos),Se.pos=t.length,De=null):De=In(Pn(o,Se,r.state,Ke),H),Ke){var We=Ke[0].name;We&&(De="m-"+(De?We+" "+De:We))}if(!ee||oe!=De){for(;re<Se.start;)re=Math.min(Se.start,re+5e3),E(re,oe);oe=De}Se.start=Se.pos}for(;re<Se.pos;){var at=Math.min(Se.pos,re+5e3);E(at,oe),re=at}}function or(e,t,o){for(var r,E,H=e.doc,Q=o?-1:t-(e.doc.mode.innerMode?1e3:100),ee=t;ee>Q;--ee){if(ee<=H.first)return H.first;var re=gt(H,ee-1),oe=re.stateAfter;if(oe&&(!o||ee+(oe instanceof wn?oe.lookAhead:0)<=H.modeFrontier))return ee;var Se=X(re.text,null,e.options.tabSize);(E==null||r>Se)&&(E=ee-1,r=Se)}return E}function di(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var o=e.first,r=t-1;r>o;r--){var E=gt(e,r).stateAfter;if(E&&(!(E instanceof wn)||r+E.lookAhead<t)){o=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,o)}var Fr=!1,Gn=!1;function Ar(){Fr=!0}function hi(){Gn=!0}function Cr(e,t,o){this.marker=e,this.from=t,this.to=o}function nr(e,t){if(e)for(var o=0;o<e.length;++o){var r=e[o];if(r.marker==t)return r}}function Gr(e,t){for(var o,r=0;r<e.length;++r)e[r]!=t&&(o||(o=[])).push(e[r]);return o}function fi(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function zr(e,t,o){var r;if(e)for(var E=0;E<e.length;++E){var H=e[E],Q=H.marker,ee=H.from==null||(Q.inclusiveLeft?H.from<=t:H.from<t);if(ee||H.from==t&&Q.type=="bookmark"&&(!o||!H.marker.insertLeft)){var re=H.to==null||(Q.inclusiveRight?H.to>=t:H.to>t);(r||(r=[])).push(new Cr(Q,H.from,re?null:H.to))}}return r}function Vr(e,t,o){var r;if(e)for(var E=0;E<e.length;++E){var H=e[E],Q=H.marker,ee=H.to==null||(Q.inclusiveRight?H.to>=t:H.to>t);if(ee||H.from==t&&Q.type=="bookmark"&&(!o||H.marker.insertLeft)){var re=H.from==null||(Q.inclusiveLeft?H.from<=t:H.from<t);(r||(r=[])).push(new Cr(Q,re?null:H.from-t,H.to==null?null:H.to-t))}}return r}function pi(e,t){if(t.full)return null;var o=dn(e,t.from.line)&&gt(e,t.from.line).markedSpans,r=dn(e,t.to.line)&&gt(e,t.to.line).markedSpans;if(!o&&!r)return null;var E=t.from.ch,H=t.to.ch,Q=Pt(t.from,t.to)==0,ee=zr(o,E,Q),re=Vr(r,H,Q),oe=t.text.length==1,Se=I(t.text).length+(oe?E:0);if(ee)for(var De=0;De<ee.length;++De){var Ke=ee[De];if(Ke.to==null){var We=nr(re,Ke.marker);We?oe&&(Ke.to=We.to==null?null:We.to+Se):Ke.to=E}}if(re)for(var at=0;at<re.length;++at){var mt=re[at];if(mt.to!=null&&(mt.to+=Se),mt.from==null){var xt=nr(ee,mt.marker);xt||(mt.from=Se,oe&&(ee||(ee=[])).push(mt))}else mt.from+=Se,oe&&(ee||(ee=[])).push(mt)}ee&&(ee=Or(ee)),re&&re!=ee&&(re=Or(re));var Rt=[ee];if(!oe){var Ut=t.text.length-2,It;if(Ut>0&&ee)for(var jt=0;jt<ee.length;++jt)ee[jt].to==null&&(It||(It=[])).push(new Cr(ee[jt].marker,null,null));for(var Zt=0;Zt<Ut;++Zt)Rt.push(It);Rt.push(re)}return Rt}function Or(e){for(var t=0;t<e.length;++t){var o=e[t];o.from!=null&&o.from==o.to&&o.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function qr(e,t,o){var r=null;if(e.iter(t.line,o.line+1,function(We){if(We.markedSpans)for(var at=0;at<We.markedSpans.length;++at){var mt=We.markedSpans[at].marker;mt.readOnly&&(!r||fe(r,mt)==-1)&&(r||(r=[])).push(mt)}}),!r)return null;for(var E=[{from:t,to:o}],H=0;H<r.length;++H)for(var Q=r[H],ee=Q.find(0),re=0;re<E.length;++re){var oe=E[re];if(Pt(oe.to,ee.from)<0||Pt(oe.from,ee.to)>0)continue;var Se=[re,1],De=Pt(oe.from,ee.from),Ke=Pt(oe.to,ee.to);(De<0||!Q.inclusiveLeft&&!De)&&Se.push({from:oe.from,to:ee.from}),(Ke>0||!Q.inclusiveRight&&!Ke)&&Se.push({from:ee.to,to:oe.to}),E.splice.apply(E,Se),re+=Se.length-3}return E}function $r(e){var t=e.markedSpans;if(!t)return;for(var o=0;o<t.length;++o)t[o].marker.detachLine(e);e.markedSpans=null}function hr(e,t){if(!t)return;for(var o=0;o<t.length;++o)t[o].marker.attachLine(e);e.markedSpans=t}function Qn(e){return e.inclusiveLeft?-1:0}function Yt(e){return e.inclusiveRight?1:0}function Rr(e,t){var o=e.lines.length-t.lines.length;if(o!=0)return o;var r=e.find(),E=t.find(),H=Pt(r.from,E.from)||Qn(e)-Qn(t);if(H)return-H;var Q=Pt(r.to,E.to)||Yt(e)-Yt(t);return Q||t.id-e.id}function Er(e,t){var o=Gn&&e.markedSpans,r;if(o)for(var E=void 0,H=0;H<o.length;++H)E=o[H],E.marker.collapsed&&(t?E.from:E.to)==null&&(!r||Rr(r,E.marker)<0)&&(r=E.marker);return r}function Ce(e){return Er(e,!0)}function On(e){return Er(e,!1)}function ei(e,t){var o=Gn&&e.markedSpans,r;if(o)for(var E=0;E<o.length;++E){var H=o[E];H.marker.collapsed&&(H.from==null||H.from<t)&&(H.to==null||H.to>t)&&(!r||Rr(r,H.marker)<0)&&(r=H.marker)}return r}function mi(e,t,o,r,E){var H=gt(e,t),Q=Gn&&H.markedSpans;if(Q)for(var ee=0;ee<Q.length;++ee){var re=Q[ee];if(!re.marker.collapsed)continue;var oe=re.marker.find(0),Se=Pt(oe.from,o)||Qn(re.marker)-Qn(E),De=Pt(oe.to,r)||Yt(re.marker)-Yt(E);if(Se>=0&&De<=0||Se<=0&&De>=0)continue;if(Se<=0&&(re.marker.inclusiveRight&&E.inclusiveLeft?Pt(oe.to,o)>=0:Pt(oe.to,o)>0)||Se>=0&&(re.marker.inclusiveRight&&E.inclusiveLeft?Pt(oe.from,r)<=0:Pt(oe.from,r)<0))return!0}}function ln(e){for(var t;t=Ce(e);)e=t.find(-1,!0).line;return e}function ti(e){for(var t;t=On(e);)e=t.find(1,!0).line;return e}function kr(e){for(var t,o;t=On(e);)e=t.find(1,!0).line,(o||(o=[])).push(e);return o}function jr(e,t){var o=gt(e,t),r=ln(o);return o==r?t:kt(r)}function rr(e,t){if(t>e.lastLine())return t;var o=gt(e,t),r;if(!Ir(e,o))return t;for(;r=On(o);)o=r.find(1,!0).line;return kt(o)+1}function Ir(e,t){var o=Gn&&t.markedSpans;if(o)for(var r=void 0,E=0;E<o.length;++E){if(r=o[E],!r.marker.collapsed)continue;if(r.from==null)return!0;if(r.marker.widgetNode)continue;if(r.from==0&&r.marker.inclusiveLeft&&ni(e,t,r))return!0}}function ni(e,t,o){if(o.to==null){var r=o.marker.find(1,!0);return ni(e,r.line,nr(r.line.markedSpans,o.marker))}if(o.marker.inclusiveRight&&o.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==o.to&&(E.to==null||E.to!=o.from)&&(E.marker.inclusiveLeft||o.marker.inclusiveRight)&&ni(e,t,E))return!0}function fr(e){e=ln(e);for(var t=0,o=e.parent,r=0;r<o.lines.length;++r){var E=o.lines[r];if(E==e)break;t+=E.height}for(var H=o.parent;H;o=H,H=o.parent)for(var Q=0;Q<H.children.length;++Q){var ee=H.children[Q];if(ee==o)break;t+=ee.height}return t}function ri(e){if(e.height==0)return 0;for(var t=e.text.length,o,r=e;o=Ce(r);){var E=o.find(0,!0);r=E.from.line,t+=E.from.ch-E.to.ch}for(r=e;o=On(r);){var H=o.find(0,!0);t-=r.text.length-H.from.ch,r=H.to.line,t+=r.text.length-H.to.ch}return t}function Dr(e){var t=e.display,o=e.doc;t.maxLine=gt(o,o.first),t.maxLineLength=ri(t.maxLine),t.maxLineChanged=!0,o.iter(function(r){var E=ri(r);E>t.maxLineLength&&(t.maxLineLength=E,t.maxLine=r)})}var pr=function(e,t,o){this.text=e,hr(this,t),this.height=o?o(this):1};pr.prototype.lineNo=function(){return kt(this)},de(pr);function ii(e,t,o,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),$r(e),hr(e,o);var E=r?r(e):1;E!=e.height&&St(e,E)}function Bt(e){e.parent=null,$r(e)}var Jt={},Kt={};function en(e,t){if(!e||/^\s*$/.test(e))return null;var o=t.addModeClass?Kt:Jt;return o[e]||(o[e]=e.replace(/\S+/g,"cm-$&"))}function an(e,t){var o=C("span",null,null,n?"padding-right: .1px":null),r={pre:C("pre",[o],"CodeMirror-line"),content:o,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,Q=void 0;r.pos=0,r.addToken=sn,ft(e.display.measure)&&(Q=yt(H,e.doc.direction))&&(r.addToken=qn(r.addToken,Q)),r.map=[];var ee=t!=e.display.externalMeasured&&kt(H);_r(H,r,Mn(e,H,ee)),H.styleClasses&&(H.styleClasses.bgClass&&(r.bgClass=y(H.styleClasses.bgClass,r.bgClass||"")),H.styleClasses.textClass&&(r.textClass=y(H.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Et(e.display.measure))),E==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(n){var re=r.content.lastChild;(/\bcm-tab\b/.test(re.className)||re.querySelector&&re.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return le(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=y(r.pre.className,r.textClass||"")),r}function Tn(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 sn(e,t,o,r,E,H,Q){if(!t)return;var ee=e.splitSpaces?Bn(t,e.trailingSpace):t,re=e.cm.state.specialChars,oe=!1,Se;if(!re.test(t))e.col+=t.length,Se=document.createTextNode(ee),e.map.push(e.pos,e.pos+t.length,Se),G&&j<9&&(oe=!0),e.pos+=t.length;else{Se=document.createDocumentFragment();for(var De=0;;){re.lastIndex=De;var Ke=re.exec(t),We=Ke?Ke.index-De:t.length-De;if(We){var at=document.createTextNode(ee.slice(De,De+We));G&&j<9?Se.appendChild(h("span",[at])):Se.appendChild(at),e.map.push(e.pos,e.pos+We,at),e.col+=We,e.pos+=We}if(!Ke)break;De+=We+1;var mt=void 0;if(Ke[0]==" "){var xt=e.cm.options.tabSize,Rt=xt-e.col%xt;mt=Se.appendChild(h("span",J(Rt),"cm-tab")),mt.setAttribute("role","presentation"),mt.setAttribute("cm-text"," "),e.col+=Rt}else Ke[0]=="\r"||Ke[0]==`
`?(mt=Se.appendChild(h("span",Ke[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),mt.setAttribute("cm-text",Ke[0]),e.col+=1):(mt=e.cm.options.specialCharPlaceholder(Ke[0]),mt.setAttribute("cm-text",Ke[0]),G&&j<9?Se.appendChild(h("span",[mt])):Se.appendChild(mt),e.col+=1);e.map.push(e.pos,e.pos+1,mt),e.pos++}}if(e.trailingSpace=ee.charCodeAt(t.length-1)==32,o||r||E||oe||H||Q){var Ut=o||"";r&&(Ut+=r),E&&(Ut+=E);var It=h("span",[Se],Ut,H);if(Q)for(var jt in Q)Q.hasOwnProperty(jt)&&jt!="style"&&jt!="class"&&It.setAttribute(jt,Q[jt]);return e.content.appendChild(It)}e.content.appendChild(Se)}function Bn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var o=t,r="",E=0;E<e.length;E++){var H=e.charAt(E);H==" "&&o&&(E==e.length-1||e.charCodeAt(E+1)==32)&&(H="\xA0"),r+=H,o=H==" "}return r}function qn(e,t){return function(o,r,E,H,Q,ee,re){E=E?E+" cm-force-border":"cm-force-border";for(var oe=o.pos,Se=oe+r.length;;){for(var De=void 0,Ke=0;Ke<t.length&&!(De=t[Ke],De.to>oe&&De.from<=oe);Ke++);if(De.to>=Se)return e(o,r,E,H,Q,ee,re);e(o,r.slice(0,De.to-oe),E,H,null,ee,re),H=null,r=r.slice(De.to-oe),oe=De.to}}}function tn(e,t,o,r){var E=!r&&o.widgetNode;E&&e.map.push(e.pos,e.pos+t,E),!r&&e.cm.display.input.needsContentAttribute&&(E||(E=e.content.appendChild(document.createElement("span"))),E.setAttribute("cm-marker",o.id)),E&&(e.cm.display.input.setUneditable(E),e.content.appendChild(E)),e.pos+=t,e.trailingSpace=!1}function _r(e,t,o){var r=e.markedSpans,E=e.text,H=0;if(!r){for(var Q=1;Q<o.length;Q+=2)t.addToken(t,E.slice(H,H=o[Q]),en(o[Q+1],t.cm.options));return}for(var ee=E.length,re=0,oe=1,Se="",De,Ke,We=0,at,mt,xt,Rt,Ut;;){if(We==re){at=mt=xt=Ke="",Ut=null,Rt=null,We=Infinity;for(var It=[],jt=void 0,Zt=0;Zt<r.length;++Zt){var Gt=r[Zt],on=Gt.marker;if(on.type=="bookmark"&&Gt.from==re&&on.widgetNode)It.push(on);else if(Gt.from<=re&&(Gt.to==null||Gt.to>re||on.collapsed&&Gt.to==re&&Gt.from==re)){if(Gt.to!=null&&Gt.to!=re&&We>Gt.to&&(We=Gt.to,mt=""),on.className&&(at+=" "+on.className),on.css&&(Ke=(Ke?Ke+";":"")+on.css),on.startStyle&&Gt.from==re&&(xt+=" "+on.startStyle),on.endStyle&&Gt.to==We&&(jt||(jt=[])).push(on.endStyle,Gt.to),on.title&&((Ut||(Ut={})).title=on.title),on.attributes)for(var Ln in on.attributes)(Ut||(Ut={}))[Ln]=on.attributes[Ln];on.collapsed&&(!Rt||Rr(Rt.marker,on)<0)&&(Rt=Gt)}else Gt.from>re&&We>Gt.from&&(We=Gt.from)}if(jt)for(var er=0;er<jt.length;er+=2)jt[er+1]==We&&(mt+=" "+jt[er]);if(!Rt||Rt.from==re)for(var Kn=0;Kn<It.length;++Kn)tn(t,0,It[Kn]);if(Rt&&(Rt.from||0)==re){if(tn(t,(Rt.to==null?ee+1:Rt.to)-re,Rt.marker,Rt.from==null),Rt.to==null)return;Rt.to==re&&(Rt=!1)}}if(re>=ee)break;for(var Mr=Math.min(ee,We);;){if(Se){var Tr=re+Se.length;if(!Rt){var Jn=Tr>Mr?Se.slice(0,Mr-re):Se;t.addToken(t,Jn,De?De+at:at,xt,re+Jn.length==We?mt:"",Ke,Ut)}if(Tr>=Mr){Se=Se.slice(Mr-re),re=Mr;break}re=Tr,xt=""}Se=E.slice(H,H=o[oe++]),De=en(o[oe++],t.cm.options)}}}function yn(e,t,o){this.line=t,this.rest=kr(t),this.size=this.rest?kt(I(this.rest))-o+1:1,this.node=this.text=null,this.hidden=Ir(e,t)}function Fn(e,t,o){for(var r=[],E,H=t;H<o;H=E){var Q=new yn(e.doc,gt(e.doc,H),H);E=H+Q.size,r.push(Q)}return r}var Yn=null;function mr(e){Yn?Yn.ops.push(e):e.ownsGroup=Yn={ops:[e],delayedCallbacks:[]}}function ea(e){var t=e.delayedCallbacks,o=0;do{for(;o<t.length;o++)t[o].call(null);for(var r=0;r<e.ops.length;r++){var E=e.ops[r];if(E.cursorActivityHandlers)for(;E.cursorActivityCalled<E.cursorActivityHandlers.length;)E.cursorActivityHandlers[E.cursorActivityCalled++].call(null,E.cm)}}while(o<t.length)}function xn(e,t){var o=e.ownsGroup;if(!o)return;try{ea(o)}finally{Yn=null,t(o)}}var mn=null;function gn(e,t){var o=Je(e,t);if(!o.length)return;var r=Array.prototype.slice.call(arguments,2),E;Yn?E=Yn.delayedCallbacks:mn?E=mn:(E=mn=[],setTimeout(lr,0));for(var H=function(ee){E.push(function(){return o[ee].apply(null,r)})},Q=0;Q<o.length;++Q)H(Q)}function lr(){var e=mn;mn=null;for(var t=0;t<e.length;++t)e[t]()}function ai(e,t,o,r){for(var E=0;E<t.changes.length;E++){var H=t.changes[E];H=="text"?Ra(e,t):H=="gutter"?ds(e,t,o,r):H=="class"?Fi(e,t):H=="widget"&&hs(e,t,r)}t.changes=null}function Wr(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),G&&j<8&&(e.node.style.zIndex=2)),e.node}function Ui(e,t){var o=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(o&&(o+=" CodeMirror-linebackground"),t.background)o?t.background.className=o:(t.background.parentNode.removeChild(t.background),t.background=null);else if(o){var r=Wr(t);t.background=r.insertBefore(h("div",null,o),r.firstChild),e.display.input.setUneditable(t.background)}}function Bi(e,t){var o=e.display.externalMeasured;return o&&o.line==t.line?(e.display.externalMeasured=null,t.measure=o.measure,o.built):an(e,t)}function Ra(e,t){var o=t.text.className,r=Bi(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Fi(e,t)):o&&(t.text.className=o)}function Fi(e,t){Ui(e,t),t.line.wrapClass?Wr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var o=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=o||""}function ds(e,t,o,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var E=Wr(t);t.gutterBackground=h("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),E.insertBefore(t.gutterBackground,t.text)}var H=t.line.gutterMarkers;if(e.options.lineNumbers||H){var Q=Wr(t),ee=t.gutter=h("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(ee),Q.insertBefore(ee,t.text),t.line.gutterClass&&(ee.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!H||!H["CodeMirror-linenumbers"])&&(t.lineNumber=ee.appendChild(h("div",$t(e.options,o),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),H)for(var re=0;re<e.display.gutterSpecs.length;++re){var oe=e.display.gutterSpecs[re].className,Se=H.hasOwnProperty(oe)&&H[oe];Se&&ee.appendChild(h("div",[Se],"CodeMirror-gutter-elt","left: "+r.gutterLeft[oe]+"px; width: "+r.gutterWidth[oe]+"px"))}}}function hs(e,t,o){t.alignable&&(t.alignable=null);for(var r=L("CodeMirror-linewidget"),E=t.node.firstChild,H=void 0;E;E=H)H=E.nextSibling,r.test(E.className)&&t.node.removeChild(E);fs(e,t,o)}function Ks(e,t,o,r){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,o,r),fs(e,t,r),t.node}function fs(e,t,o){if(ps(e,t.line,t,o,!0),t.rest)for(var r=0;r<t.rest.length;r++)ps(e,t.rest[r],t,o,!1)}function ps(e,t,o,r,E){if(!t.widgets)return;for(var H=Wr(o),Q=0,ee=t.widgets;Q<ee.length;++Q){var re=ee[Q],oe=h("div",[re.node],"CodeMirror-linewidget"+(re.className?" "+re.className:""));re.handleMouseEvents||oe.setAttribute("cm-ignore-events","true"),ms(re,oe,o,r),e.display.input.setUneditable(oe),E&&re.above?H.insertBefore(oe,o.gutter||o.text):H.appendChild(oe),gn(re,"redraw")}}function ms(e,t,o,r){if(e.noHScroll){(o.alignable||(o.alignable=[])).push(t);var E=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(E-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=E+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function gi(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!m(document.body,e.node)){var o="position: relative;";e.coverGutter&&(o+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(o+="width: "+t.display.wrapper.clientWidth+"px;"),g(t.display.measure,h("div",[e.node],null,o))}return e.height=e.node.parentNode.offsetHeight}function Pr(e,t){for(var o=_e(t);o!=e.wrapper;o=o.parentNode)if(!o||o.nodeType==1&&o.getAttribute("cm-ignore-events")=="true"||o.parentNode==e.sizer&&o!=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=g(e.measure,h("pre","x","CodeMirror-line-like")),o=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(o.paddingLeft),right:parseInt(o.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function Nr(e){return ye-e.display.nativeBarWidth}function vi(e){return e.display.scroller.clientWidth-Nr(e)-e.display.barWidth}function ra(e){return e.display.scroller.clientHeight-Nr(e)-e.display.barHeight}function vs(e,t,o){var r=e.options.lineWrapping,E=r&&vi(e);if(!t.measure.heights||r&&t.measure.width!=E){var H=t.measure.heights=[];if(r){t.measure.width=E;for(var Q=t.text.firstChild.getClientRects(),ee=0;ee<Q.length-1;ee++){var re=Q[ee],oe=Q[ee+1];Math.abs(re.bottom-oe.bottom)>2&&H.push((re.bottom+oe.top)/2-o.top)}}H.push(o.bottom-o.top)}}function Ia(e,t,o){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var E=0;E<e.rest.length;E++)if(kt(e.rest[E])>o)return{map:e.measure.maps[E],cache:e.measure.caches[E],before:!0}}function Gs(e,t){t=ln(t);var o=kt(t),r=e.display.externalMeasured=new yn(e.doc,t,o);r.lineN=o;var E=r.built=an(e,r);return r.text=E.pre,g(e.display.lineMeasure,E.pre),r}function Da(e,t,o,r){return Ur(e,ji(e,t),o,r)}function gr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[xi(e,t)];var o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size)return o}function ji(e,t){var o=kt(t),r=gr(e,o);r&&!r.text?r=null:r&&r.changes&&(ai(e,r,o,sa(e)),e.curOp.forceUpdate=!0),r||(r=Gs(e,t));var E=Ia(r,t,o);return{line:t,view:r,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Ur(e,t,o,r,E){t.before&&(o=-1);var H=o+(r||""),Q;return t.cache.hasOwnProperty(H)?Q=t.cache[H]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(vs(e,t.view,t.rect),t.hasHeights=!0),Q=ys(e,t,o,r),Q.bogus||(t.cache[H]=Q)),{left:Q.left,right:Q.right,top:E?Q.rtop:Q.top,bottom:E?Q.rbottom:Q.bottom}}var ia={left:0,right:0,top:0,bottom:0};function Oi(e,t,o){for(var r,E,H,Q,ee,re,oe=0;oe<e.length;oe+=3)if(ee=e[oe],re=e[oe+1],t<ee?(E=0,H=1,Q="left"):t<re?(E=t-ee,H=E+1):(oe==e.length-3||t==re&&e[oe+3]>t)&&(H=re-ee,E=H-1,t>=re&&(Q="right")),E!=null){if(r=e[oe+2],ee==re&&o==(r.insertLeft?"left":"right")&&(Q=o),o=="left"&&E==0)for(;oe&&e[oe-2]==e[oe-3]&&e[oe-1].insertLeft;)r=e[(oe-=3)+2],Q="left";if(o=="right"&&E==re-ee)for(;oe<e.length-3&&e[oe+3]==e[oe+4]&&!e[oe+5].insertLeft;)r=e[(oe+=3)+2],Q="right";break}return{node:r,start:E,end:H,collapse:Q,coverStart:ee,coverEnd:re}}function Wi(e,t){var o=ia;if(t=="left")for(var r=0;r<e.length&&!((o=e[r]).left!=o.right);r++);else for(var E=e.length-1;E>=0&&!((o=e[E]).left!=o.right);E--);return o}function ys(e,t,o,r){var E=Oi(t.map,o,r),H=E.node,Q=E.start,ee=E.end,re=E.collapse,oe;if(H.nodeType==3){for(var Se=0;Se<4;Se++){for(;Q&&Te(t.line.text.charAt(E.coverStart+Q));)--Q;for(;E.coverStart+ee<E.coverEnd&&Te(t.line.text.charAt(E.coverStart+ee));)++ee;if(G&&j<9&&Q==0&&ee==E.coverEnd-E.coverStart?oe=H.parentNode.getBoundingClientRect():oe=Wi(x(H,Q,ee).getClientRects(),r),oe.left||oe.right||Q==0)break;ee=Q,Q=Q-1,re="right"}G&&j<11&&(oe=Hi(e.display.measure,oe))}else{Q>0&&(re=r="right");var De;e.options.lineWrapping&&(De=H.getClientRects()).length>1?oe=De[r=="right"?De.length-1:0]:oe=H.getBoundingClientRect()}if(G&&j<9&&!Q&&(!oe||!oe.left&&!oe.right)){var Ke=H.parentNode.getClientRects()[0];Ke?oe={left:Ke.left,right:Ke.left+Ei(e.display),top:Ke.top,bottom:Ke.bottom}:oe=ia}for(var We=oe.top-t.rect.top,at=oe.bottom-t.rect.top,mt=(We+at)/2,xt=t.view.measure.heights,Rt=0;Rt<xt.length-1&&!(mt<xt[Rt]);Rt++);var Ut=Rt?xt[Rt-1]:0,It=xt[Rt],jt={left:(re=="right"?oe.right:oe.left)-t.rect.left,right:(re=="left"?oe.left:oe.right)-t.rect.left,top:Ut,bottom:It};return!oe.left&&!oe.right&&(jt.bogus=!0),e.options.singleCursorHeightPerLine||(jt.rtop=We,jt.rbottom=at),jt}function Hi(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!we(e))return t;var o=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*o,right:t.right*o,top:t.top*r,bottom:t.bottom*r}}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 un(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 v&&u?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Es(){return v&&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 o=0;o<e.widgets.length;++o)e.widgets[o].above&&(t+=gi(e.widgets[o]));return t}function vn(e,t,o,r,E){if(!E){var H=aa(t);o.top+=H,o.bottom+=H}if(r=="line")return o;r||(r="local");var Q=fr(t);if(r=="local"?Q+=ta(e.display):Q-=e.display.viewOffset,r=="page"||r=="window"){var ee=e.display.lineSpace.getBoundingClientRect();Q+=ee.top+(r=="window"?0:Es());var re=ee.left+(r=="window"?0:yi());o.left+=re,o.right+=re}return o.top+=Q,o.bottom+=Q,o}function bi(e,t,o){if(o=="div")return t;var r=t.left,E=t.top;if(o=="page")r-=yi(),E-=Es();else if(o=="local"||!o){var H=e.display.sizer.getBoundingClientRect();r+=H.left,E+=H.top}var Q=e.display.lineSpace.getBoundingClientRect();return{left:r-Q.left,top:E-Q.top}}function Ma(e,t,o,r,E){return r||(r=gt(e.doc,t.line)),vn(e,r,Da(e,r,t.ch,E),o)}function Lr(e,t,o,r,E,H){r=r||gt(e.doc,t.line),E||(E=ji(e,r));function Q(at,mt){var xt=Ur(e,E,at,mt?"right":"left",H);return mt?xt.left=xt.right:xt.right=xt.left,vn(e,r,xt,o)}var ee=yt(r,e.doc.direction),re=t.ch,oe=t.sticky;if(re>=r.text.length?(re=r.text.length,oe="before"):re<=0&&(re=0,oe="after"),!ee)return Q(oe=="before"?re-1:re,oe=="before");function Se(at,mt,xt){var Rt=ee[mt],Ut=Rt.level==1;return Q(xt?at-1:at,Ut!=xt)}var De=nt(ee,re,oe),Ke=st,We=Se(re,De,oe=="before");return Ke!=null&&(We.other=Se(re,Ke,oe!="before")),We}function _s(e,t){var o=0;t=Lt(e.doc,t),e.options.lineWrapping||(o=Ei(e.display)*t.ch);var r=gt(e.doc,t.line),E=fr(r)+ta(e.display);return{left:o,right:o,top:E,bottom:E+r.height}}function si(e,t,o,r,E){var H=ot(e,t,o);return H.xRel=E,r&&(H.outside=r),H}function ka(e,t,o){var r=e.doc;if(o+=e.display.viewOffset,o<0)return si(r.first,0,null,-1,-1);var E=Wt(r,o),H=r.first+r.size-1;if(E>H)return si(r.first+r.size-1,gt(r,H).text.length,null,1,1);t<0&&(t=0);for(var Q=gt(r,E);;){var ee=zs(e,Q,E,t,o),re=ei(Q,ee.ch+(ee.xRel>0||ee.outside>0?1:0));if(!re)return ee;var oe=re.find(1);if(oe.line==E)return oe;Q=gt(r,E=oe.line)}}function Pa(e,t,o,r){r-=aa(t);var E=t.text.length,H=Xe(function(Q){return Ur(e,o,Q-1).bottom<=r},E,0);return E=Xe(function(Q){return Ur(e,o,Q).top>r},H,E),{begin:H,end:E}}function Ki(e,t,o,r){o||(o=ji(e,t));var E=vn(e,t,Ur(e,o,r),"line").top;return Pa(e,t,o,E)}function Na(e,t,o,r){return e.bottom<=o?!1:e.top>o?!0:(r?e.left:e.right)>t}function zs(e,t,o,r,E){E-=fr(t);var H=ji(e,t),Q=aa(t),ee=0,re=t.text.length,oe=!0,Se=yt(t,e.doc.direction);if(Se){var De=(e.options.lineWrapping?Ts:xs)(e,t,o,H,Se,r,E);oe=De.level!=1,ee=oe?De.from:De.to-1,re=oe?De.to:De.from-1}var Ke=null,We=null,at=Xe(function(Zt){var Gt=Ur(e,H,Zt);return Gt.top+=Q,Gt.bottom+=Q,Na(Gt,r,E,!1)?(Gt.top<=E&&Gt.left<=r&&(Ke=Zt,We=Gt),!0):!1},ee,re),mt,xt,Rt=!1;if(We){var Ut=r-We.left<We.right-r,It=Ut==oe;at=Ke+(It?0:1),xt=It?"after":"before",mt=Ut?We.left:We.right}else{!oe&&(at==re||at==ee)&&at++,xt=at==0?"after":at==t.text.length?"before":Ur(e,H,at-(oe?1:0)).bottom+Q<=E==oe?"after":"before";var jt=Lr(e,ot(o,at,xt),"line",t,H);mt=jt.left,Rt=E<jt.top?-1:E>=jt.bottom?1:0}return at=Oe(t.text,at,1),si(o,at,xt,Rt,r-mt)}function xs(e,t,o,r,E,H,Q){var ee=Xe(function(De){var Ke=E[De],We=Ke.level!=1;return Na(Lr(e,ot(o,We?Ke.to:Ke.from,We?"before":"after"),"line",t,r),H,Q,!0)},0,E.length-1),re=E[ee];if(ee>0){var oe=re.level!=1,Se=Lr(e,ot(o,oe?re.from:re.to,oe?"after":"before"),"line",t,r);Na(Se,H,Q,!0)&&Se.top>Q&&(re=E[ee-1])}return re}function Ts(e,t,o,r,E,H,Q){var ee=Pa(e,t,r,Q),re=ee.begin,oe=ee.end;/\s/.test(t.text.charAt(oe-1))&&oe--;for(var Se=null,De=null,Ke=0;Ke<E.length;Ke++){var We=E[Ke];if(We.from>=oe||We.to<=re)continue;var at=We.level!=1,mt=Ur(e,r,at?Math.min(oe,We.to)-1:Math.max(re,We.from)).right,xt=mt<H?H-mt+1e9:mt-H;(!Se||De>xt)&&(Se=We,De=xt)}return Se||(Se=E[E.length-1]),Se.from<re&&(Se={from:re,to:Se.to,level:Se.level}),Se.to>oe&&(Se={from:Se.from,to:oe,level:Se.level}),Se}var Yr;function Ri(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Yr==null){Yr=h("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Yr.appendChild(document.createTextNode("x")),Yr.appendChild(h("br"));Yr.appendChild(document.createTextNode("x"))}g(e.measure,Yr);var o=Yr.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),b(e.measure),o||1}function Ei(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=h("span","xxxxxxxxxx"),o=h("pre",[t],"CodeMirror-line-like");g(e.measure,o);var r=t.getBoundingClientRect(),E=(r.right-r.left)/10;return E>2&&(e.cachedCharWidth=E),E||10}function sa(e){for(var t=e.display,o={},r={},E=t.gutters.clientLeft,H=t.gutters.firstChild,Q=0;H;H=H.nextSibling,++Q){var ee=e.display.gutterSpecs[Q].className;o[ee]=H.offsetLeft+H.clientLeft+E,r[ee]=H.clientWidth}return{fixedPos:Ua(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:o,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ua(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ba(e){var t=Ri(e.display),o=e.options.lineWrapping,r=o&&Math.max(5,e.display.scroller.clientWidth/Ei(e.display)-3);return function(E){if(Ir(e.doc,E))return 0;var H=0;if(E.widgets)for(var Q=0;Q<E.widgets.length;Q++)E.widgets[Q].height&&(H+=E.widgets[Q].height);return o?H+(Math.ceil(E.text.length/r)||1)*t:H+t}}function oa(e){var t=e.doc,o=Ba(e);t.iter(function(r){var E=o(r);E!=r.height&&St(r,E)})}function _i(e,t,o,r){var E=e.display;if(!o&&_e(t).getAttribute("cm-not-content")=="true")return null;var H,Q,ee=E.lineSpace.getBoundingClientRect();try{H=t.clientX-ee.left,Q=t.clientY-ee.top}catch(De){return null}var re=ka(e,H,Q),oe;if(r&&re.xRel>0&&(oe=gt(e.doc,re.line).text).length==re.ch){var Se=X(oe,oe.length,e.options.tabSize)-oe.length;re=ot(re.line,Math.max(0,Math.round((H-gs(e.display).left)/Ei(e.display))-Se))}return re}function xi(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var o=e.display.view,r=0;r<o.length;r++)if(t-=o[r].size,t<0)return r}function zn(e,t,o,r){t==null&&(t=e.doc.first),o==null&&(o=e.doc.first+e.doc.size),r||(r=0);var E=e.display;if(r&&o<E.viewTo&&(E.updateLineNumbers==null||E.updateLineNumbers>t)&&(E.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=E.viewTo)Gn&&jr(e.doc,t)<E.viewTo&&li(e);else if(o<=E.viewFrom)Gn&&rr(e.doc,o+r)>E.viewFrom?li(e):(E.viewFrom+=r,E.viewTo+=r);else if(t<=E.viewFrom&&o>=E.viewTo)li(e);else if(t<=E.viewFrom){var H=Hr(e,o,o+r,1);H?(E.view=E.view.slice(H.index),E.viewFrom=H.lineN,E.viewTo+=r):li(e)}else if(o>=E.viewTo){var Q=Hr(e,t,t,-1);Q?(E.view=E.view.slice(0,Q.index),E.viewTo=Q.lineN):li(e)}else{var ee=Hr(e,t,t,-1),re=Hr(e,o,o+r,1);ee&&re?(E.view=E.view.slice(0,ee.index).concat(Fn(e,ee.lineN,re.lineN)).concat(E.view.slice(re.index)),E.viewTo+=r):li(e)}var oe=E.externalMeasured;oe&&(o<oe.lineN?oe.lineN+=r:t<oe.lineN+oe.size&&(E.externalMeasured=null))}function oi(e,t,o){e.curOp.viewChanged=!0;var r=e.display,E=e.display.externalMeasured;if(E&&t>=E.lineN&&t<E.lineN+E.size&&(r.externalMeasured=null),t<r.viewFrom||t>=r.viewTo)return;var H=r.view[xi(e,t)];if(H.node==null)return;var Q=H.changes||(H.changes=[]);fe(Q,o)==-1&&Q.push(o)}function li(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Hr(e,t,o,r){var E=xi(e,t),H,Q=e.display.view;if(!Gn||o==e.doc.first+e.doc.size)return{index:E,lineN:o};for(var ee=e.display.viewFrom,re=0;re<E;re++)ee+=Q[re].size;if(ee!=t){if(r>0){if(E==Q.length-1)return null;H=ee+Q[E].size-t,E++}else H=ee-t;t+=H,o+=H}for(;jr(e.doc,o)!=o;){if(E==(r<0?0:Q.length-1))return null;o+=r*Q[E-(r<0?1:0)].size,E+=r}return{index:E,lineN:o}}function Fa(e,t,o){var r=e.display,E=r.view;E.length==0||t>=r.viewTo||o<=r.viewFrom?(r.view=Fn(e,t,o),r.viewFrom=t):(r.viewFrom>t?r.view=Fn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(xi(e,t))),r.viewFrom=t,r.viewTo<o?r.view=r.view.concat(Fn(e,r.viewTo,o)):r.viewTo>o&&(r.view=r.view.slice(0,xi(e,o)))),r.viewTo=o}function ws(e){for(var t=e.display.view,o=0,r=0;r<t.length;r++){var E=t[r];!E.hidden&&(!E.node||E.changes)&&++o}return o}function Ti(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ss(e,t){t===void 0&&(t=!0);for(var o=e.doc,r={},E=r.cursors=document.createDocumentFragment(),H=r.selection=document.createDocumentFragment(),Q=0;Q<o.sel.ranges.length;Q++){if(!t&&Q==o.sel.primIndex)continue;var ee=o.sel.ranges[Q];if(ee.from().line>=e.display.viewTo||ee.to().line<e.display.viewFrom)continue;var re=ee.empty();(re||e.options.showCursorWhenSelecting)&&ja(e,ee.head,E),re||Vs(e,ee,H)}return r}function ja(e,t,o){var r=Lr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),E=o.appendChild(h("div","\xA0","CodeMirror-cursor"));if(E.style.left=r.left+"px",E.style.top=r.top+"px",E.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var H=o.appendChild(h("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));H.style.display="",H.style.left=r.other.left+"px",H.style.top=r.other.top+"px",H.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function la(e,t){return e.top-t.top||e.left-t.left}function Vs(e,t,o){var r=e.display,E=e.doc,H=document.createDocumentFragment(),Q=gs(e.display),ee=Q.left,re=Math.max(r.sizerWidth,vi(e)-r.sizer.offsetLeft)-Q.right,oe=E.direction=="ltr";function Se(It,jt,Zt,Gt){jt<0&&(jt=0),jt=Math.round(jt),Gt=Math.round(Gt),H.appendChild(h("div",null,"CodeMirror-selected","position: absolute; left: "+It+`px;
top: `+jt+"px; width: "+(Zt==null?re-It:Zt)+`px;
height: `+(Gt-jt)+"px"))}function De(It,jt,Zt){var Gt=gt(E,It),on=Gt.text.length,Ln,er;function Kn(Jn,wr){return Ma(e,ot(It,Jn),"div",Gt,wr)}function Mr(Jn,wr,sr){var $n=Ki(e,Gt,null,Jn),Zn=wr=="ltr"==(sr=="after")?"left":"right",Vn=sr=="after"?$n.begin:$n.end-(/\s/.test(Gt.text.charAt($n.end-1))?2:1);return Kn(Vn,Zn)[Zn]}var Tr=yt(Gt,E.direction);return rt(Tr,jt||0,Zt==null?on:Zt,function(Jn,wr,sr,$n){var Zn=sr=="ltr",Vn=Kn(Jn,Zn?"left":"right"),Sr=Kn(wr-1,Zn?"right":"left"),Ca=jt==null&&Jn==0,Ni=Zt==null&&wr==on,dr=$n==0,ci=!Tr||$n==Tr.length-1;if(Sr.top-Vn.top<=3){var tr=(oe?Ca:Ni)&&dr,co=(oe?Ni:Ca)&&ci,Ci=tr?ee:(Zn?Vn:Sr).left,qi=co?re:(Zn?Sr:Vn).right;Se(Ci,Vn.top,qi-Ci,Vn.bottom)}else{var $i,yr,Oa,ho;Zn?($i=oe&&Ca&&dr?ee:Vn.left,yr=oe?re:Mr(Jn,sr,"before"),Oa=oe?ee:Mr(wr,sr,"after"),ho=oe&&Ni&&ci?re:Sr.right):($i=oe?Mr(Jn,sr,"before"):ee,yr=!oe&&Ca&&dr?re:Vn.right,Oa=!oe&&Ni&&ci?ee:Sr.left,ho=oe?Mr(wr,sr,"after"):re),Se($i,Vn.top,yr-$i,Vn.bottom),Vn.bottom<Sr.top&&Se(ee,Vn.bottom,null,Sr.top),Se(Oa,Sr.top,ho-Oa,Sr.bottom)}(!Ln||la(Vn,Ln)<0)&&(Ln=Vn),la(Sr,Ln)<0&&(Ln=Sr),(!er||la(Vn,er)<0)&&(er=Vn),la(Sr,er)<0&&(er=Sr)}),{start:Ln,end:er}}var Ke=t.from(),We=t.to();if(Ke.line==We.line)De(Ke.line,Ke.ch,We.ch);else{var at=gt(E,Ke.line),mt=gt(E,We.line),xt=ln(at)==ln(mt),Rt=De(Ke.line,Ke.ch,xt?at.text.length+1:null).end,Ut=De(We.line,xt?0:null,We.ch).start;xt&&(Rt.top<Ut.top-2?(Se(Rt.right,Rt.top,null,Rt.bottom),Se(ee,Ut.top,Ut.left,Ut.bottom)):Se(Rt.right,Rt.top,Ut.left-Rt.right,Rt.bottom)),Rt.bottom<Ut.top&&Se(ee,Rt.bottom,null,Ut.top)}o.appendChild(H)}function ui(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var o=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Xr(e),t.cursorDiv.style.visibility=(o=!o)?"":"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,Xr(e))},100)}function Ha(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(le(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()),ui(e)}function Xr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(le(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,o=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var E=t.view[r],H=e.options.lineWrapping,Q=void 0,ee=0;if(E.hidden)continue;if(G&&j<8){var re=E.node.offsetTop+E.node.offsetHeight;Q=re-o,o=re}else{var oe=E.node.getBoundingClientRect();Q=oe.bottom-oe.top,!H&&E.text.firstChild&&(ee=E.text.firstChild.getBoundingClientRect().right-oe.left-1)}var Se=E.line.height-Q;if((Se>.005||Se<-.005)&&(St(E.line,Q),Cs(E.line),E.rest))for(var De=0;De<E.rest.length;De++)Cs(E.rest[De]);if(ee>e.display.sizerWidth){var Ke=Math.ceil(ee/Ei(e.display));Ke>e.display.maxLineLength&&(e.display.maxLineLength=Ke,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 o=e.widgets[t],r=o.node.parentNode;r&&(o.height=r.offsetHeight)}}function ca(e,t,o){var r=o&&o.top!=null?Math.max(0,o.top):e.scroller.scrollTop;r=Math.floor(r-ta(e));var E=o&&o.bottom!=null?o.bottom:r+e.wrapper.clientHeight,H=Wt(t,r),Q=Wt(t,E);if(o&&o.ensure){var ee=o.ensure.from.line,re=o.ensure.to.line;ee<H?(H=ee,Q=Wt(t,fr(gt(t,ee))+e.wrapper.clientHeight)):Math.min(re,t.lastLine())>=Q&&(H=Wt(t,fr(gt(t,re))-e.wrapper.clientHeight),Q=re)}return{from:H,to:Math.max(Q,H+1)}}function Ys(e,t){if($(e,"scrollCursorIntoView"))return;var o=e.display,r=o.sizer.getBoundingClientRect(),E=null;if(t.top+r.top<0?E=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(E=!1),E!=null&&!s){var H=h("div","\u200B",null,`position: absolute;
top: `+(t.top-o.viewOffset-ta(e.display))+`px;
height: `+(t.bottom-t.top+Nr(e)+o.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,o,r){r==null&&(r=0);var E;!e.options.lineWrapping&&t==o&&(t=t.ch?ot(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,o=t.sticky=="before"?ot(t.line,t.ch+1,"before"):t);for(var H=0;H<5;H++){var Q=!1,ee=Lr(e,t),re=!o||o==t?ee:Lr(e,o);E={left:Math.min(ee.left,re.left),top:Math.min(ee.top,re.top)-r,right:Math.max(ee.left,re.left),bottom:Math.max(ee.bottom,re.bottom)+r};var oe=Ka(e,E),Se=e.doc.scrollTop,De=e.doc.scrollLeft;if(oe.scrollTop!=null&&(zi(e,oe.scrollTop),Math.abs(e.doc.scrollTop-Se)>1&&(Q=!0)),oe.scrollLeft!=null&&(wi(e,oe.scrollLeft),Math.abs(e.doc.scrollLeft-De)>1&&(Q=!0)),!Q)break}return E}function Os(e,t){var o=Ka(e,t);o.scrollTop!=null&&zi(e,o.scrollTop),o.scrollLeft!=null&&wi(e,o.scrollLeft)}function Ka(e,t){var o=e.display,r=Ri(e.display);t.top<0&&(t.top=0);var E=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:o.scroller.scrollTop,H=ra(e),Q={};t.bottom-t.top>H&&(t.bottom=t.top+H);var ee=e.doc.height+na(o),re=t.top<r,oe=t.bottom>ee-r;if(t.top<E)Q.scrollTop=re?0:t.top;else if(t.bottom>E+H){var Se=Math.min(t.top,(oe?ee:t.bottom)-H);Se!=E&&(Q.scrollTop=Se)}var De=e.options.fixedGutter?0:o.gutters.offsetWidth,Ke=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:o.scroller.scrollLeft-De,We=vi(e)-o.gutters.offsetWidth,at=t.right-t.left>We;return at&&(t.right=t.left+We),t.left<10?Q.scrollLeft=0:t.left<Ke?Q.scrollLeft=Math.max(0,t.left+De-(at?0:10)):t.right>We+Ke-3&&(Q.scrollLeft=t.right+(at?0:10)-We),Q}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,o){(t!=null||o!=null)&&da(e),t!=null&&(e.curOp.scrollLeft=t),o!=null&&(e.curOp.scrollTop=o)}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 o=_s(e,t.from),r=_s(e,t.to);Qr(e,o,r,t.margin)}}function Qr(e,t,o,r){var E=Ka(e,{left:Math.min(t.left,o.left),top:Math.min(t.top,o.top)-r,right:Math.max(t.right,o.right),bottom:Math.max(t.bottom,o.bottom)+r});Gi(e,E.scrollLeft,E.scrollTop)}function zi(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;N||Xi(e,{top:t}),Rs(e,t,!0),N&&Xi(e),Br(e,100)}function Rs(e,t,o){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!o)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function wi(e,t,o,r){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(o?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)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,o=t.gutters.offsetWidth,r=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?o:0,docHeight:r,scrollHeight:r+Nr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:o}}var At=function(e,t,o){this.cm=o;var r=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");r.tabIndex=E.tabIndex=-1,e(r),e(E),Re(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Re(E,"scroll",function(){E.clientWidth&&t(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,G&&j<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};At.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,o=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(o){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var E=e.viewHeight-(t?r: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=o?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var H=e.viewWidth-e.barLeft-(o?r: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&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:o?r:0,bottom:t?r:0}},At.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},At.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},At.prototype.zeroWidthHack=function(){var e=a&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ne,this.disableVert=new ne},At.prototype.enableZeroWidthBar=function(e,t,o){e.style.pointerEvents="auto";function r(){var E=e.getBoundingClientRect(),H=o=="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,r)}t.set(1e3,r)},At.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ve=function(){};ve.prototype.update=function(){return{bottom:0,right:0}},ve.prototype.setScrollLeft=function(){},ve.prototype.setScrollTop=function(){},ve.prototype.clear=function(){};function Ze(e,t){t||(t=Vi(e));var o=e.display.barWidth,r=e.display.barHeight;Fe(e,t);for(var E=0;E<4&&o!=e.display.barWidth||r!=e.display.barHeight;E++)o!=e.display.barWidth&&e.options.lineWrapping&&ua(e),Fe(e,Vi(e)),o=e.display.barWidth,r=e.display.barHeight}function Fe(e,t){var o=e.display,r=o.scrollbars.update(t);o.sizer.style.paddingRight=(o.barWidth=r.right)+"px",o.sizer.style.paddingBottom=(o.barHeight=r.bottom)+"px",o.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(o.scrollbarFiller.style.display="block",o.scrollbarFiller.style.height=r.bottom+"px",o.scrollbarFiller.style.width=r.right+"px"):o.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(o.gutterFiller.style.display="block",o.gutterFiller.style.height=r.bottom+"px",o.gutterFiller.style.width=t.gutterWidth+"px"):o.gutterFiller.style.display=""}var _t={native:At,null:ve};function ht(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new _t[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Re(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,o){o=="horizontal"?wi(e,t):zi(e,t)},e),e.display.scrollbars.addClass&&k(e.display.wrapper,e.display.scrollbars.addClass)}var Ot=0;function Ft(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:++Ot},mr(e.curOp)}function Tt(e){var t=e.curOp;t&&xn(t,function(o){for(var r=0;r<o.ops.length;r++)o.ops[r].cm.curOp=null;Qt(o)})}function Qt(e){for(var t=e.ops,o=0;o<t.length;o++)Nt(t[o]);for(var r=0;r<t.length;r++)wt(t[r]);for(var E=0;E<t.length;E++)hn(t[E]);for(var H=0;H<t.length;H++)jn(t[H]);for(var Q=0;Q<t.length;Q++)qt(t[Q])}function Nt(e){var t=e.cm,o=t.display;Va(t),e.updateMaxLine&&Dr(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<o.viewFrom||e.scrollToPos.to.line>=o.viewTo)||o.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Di(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function wt(e){e.updatedDisplay=e.mustUpdate&&Yi(e.cm,e.update)}function hn(e){var t=e.cm,o=t.display;e.updatedDisplay&&ua(t),e.barMeasure=Vi(t),o.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Da(t,o.maxLine,o.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(o.scroller.clientWidth,o.sizer.offsetLeft+e.adjustWidthTo+Nr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,o.sizer.offsetLeft+e.adjustWidthTo-vi(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=o.input.prepareSelection())}function jn(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 o=e.focus&&e.focus==P();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,o),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ze(t,e.barMeasure),e.updatedDisplay&&Ji(t,e.barMeasure),e.selectionChanged&&ui(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),o&&As(e.cm)}function qt(e){var t=e.cm,o=t.display,r=t.doc;if(e.updatedDisplay&&ha(t,e.update),o.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(o.wheelStartX=o.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,Lt(r,e.scrollToPos.from),Lt(r,e.scrollToPos.to),e.scrollToPos.margin);Ys(t,E)}var H=e.maybeHiddenMarkers,Q=e.maybeUnhiddenMarkers;if(H)for(var ee=0;ee<H.length;++ee)H[ee].lines.length||le(H[ee],"hide");if(Q)for(var re=0;re<Q.length;++re)Q[re].lines.length&&le(Q[re],"unhide");o.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&le(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function bn(e,t){if(e.curOp)return t();Ft(e);try{return t()}finally{Tt(e)}}function cn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ft(e);try{return t.apply(e,arguments)}finally{Tt(e)}}}function Nn(e){return function(){if(this.curOp)return e.apply(this,arguments);Ft(this);try{return e.apply(this,arguments)}finally{Tt(this)}}}function An(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ft(t);try{return e.apply(this,arguments)}finally{Tt(t)}}}function Br(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 o=+new Date+e.options.workTime,r=Dn(e,t.highlightFrontier),E=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(H){if(r.line>=e.display.viewFrom){var Q=H.styles,ee=H.text.length>e.options.maxHighlightLength?ut(t.mode,r.state):null,re=Hn(e,H,r,!0);ee&&(r.state=ee),H.styles=re.styles;var oe=H.styleClasses,Se=re.classes;Se?H.styleClasses=Se:oe&&(H.styleClasses=null);for(var De=!Q||Q.length!=H.styles.length||oe!=Se&&(!oe||!Se||oe.bgClass!=Se.bgClass||oe.textClass!=Se.textClass),Ke=0;!De&&Ke<Q.length;++Ke)De=Q[Ke]!=H.styles[Ke];De&&E.push(r.line),H.stateAfter=r.save(),r.nextLine()}else H.text.length<=e.options.maxHighlightLength&&Un(e,H.text,r),H.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>o)return Br(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),E.length&&bn(e,function(){for(var H=0;H<E.length;H++)oi(e,E[H],"text")})}var Di=function(e,t,o){var r=e.display;this.viewport=t,this.visible=ca(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=vi(e),this.force=o,this.dims=sa(e),this.events=[]};Di.prototype.signal=function(e,t){ae(e,t)&&this.events.push(arguments)},Di.prototype.finish=function(){for(var e=0;e<this.events.length;e++)le.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=Nr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Nr(e)+"px",t.scrollbarsClipped=!0)}function Ya(e){if(e.hasFocus())return null;var t=P();if(!t||!m(e.display.lineDiv,t))return null;var o={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&m(e.display.lineDiv,r.anchorNode)&&(o.anchorNode=r.anchorNode,o.anchorOffset=r.anchorOffset,o.focusNode=r.focusNode,o.focusOffset=r.focusOffset)}return o}function Xa(e){if(!e||!e.activeElt||e.activeElt==P())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&m(document.body,e.anchorNode)&&m(document.body,e.focusNode)){var t=window.getSelection(),o=document.createRange();o.setEnd(e.anchorNode,e.anchorOffset),o.collapse(!1),t.removeAllRanges(),t.addRange(o),t.extend(e.focusNode,e.focusOffset)}}function Yi(e,t){var o=e.display,r=e.doc;if(t.editorIsHidden)return li(e),!1;if(!t.force&&t.visible.from>=o.viewFrom&&t.visible.to<=o.viewTo&&(o.updateLineNumbers==null||o.updateLineNumbers>=o.viewTo)&&o.renderedView==o.view&&ws(e)==0)return!1;pa(e)&&(li(e),t.dims=sa(e));var E=r.first+r.size,H=Math.max(t.visible.from-e.options.viewportMargin,r.first),Q=Math.min(E,t.visible.to+e.options.viewportMargin);o.viewFrom<H&&H-o.viewFrom<20&&(H=Math.max(r.first,o.viewFrom)),o.viewTo>Q&&o.viewTo-Q<20&&(Q=Math.min(E,o.viewTo)),Gn&&(H=jr(e.doc,H),Q=rr(e.doc,Q));var ee=H!=o.viewFrom||Q!=o.viewTo||o.lastWrapHeight!=t.wrapperHeight||o.lastWrapWidth!=t.wrapperWidth;Fa(e,H,Q),o.viewOffset=fr(gt(e.doc,o.viewFrom)),e.display.mover.style.top=o.viewOffset+"px";var re=ws(e);if(!ee&&re==0&&!t.force&&o.renderedView==o.view&&(o.updateLineNumbers==null||o.updateLineNumbers>=o.viewTo))return!1;var oe=Ya(e);return re>4&&(o.lineDiv.style.display="none"),Qa(e,o.updateLineNumbers,t.dims),re>4&&(o.lineDiv.style.display=""),o.renderedView=o.view,Xa(oe),b(o.cursorDiv),b(o.selectionDiv),o.gutters.style.height=o.sizer.style.minHeight=0,ee&&(o.lastWrapHeight=t.wrapperHeight,o.lastWrapWidth=t.wrapperWidth,Br(e,400)),o.updateLineNumbers=null,!0}function ha(e,t){for(var o=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==vi(e)){if(o&&o.top!=null&&(o={top:Math.min(e.doc.height+na(e.display)-ra(e),o.top)}),t.visible=ca(e.display,e.doc,o),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=ca(e.display,e.doc,o));if(!Yi(e,t))break;ua(e);var E=Vi(e);Ti(e),Ze(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 o=new Di(e,t);if(Yi(e,o)){ua(e),ha(e,o);var r=Vi(e);Ti(e),Ze(e,r),Ji(e,r),o.finish()}}function Qa(e,t,o){var r=e.display,E=e.options.lineNumbers,H=r.lineDiv,Q=H.firstChild;function ee(at){var mt=at.nextSibling;return n&&a&&e.display.currentWheelTarget==at?at.style.display="none":at.parentNode.removeChild(at),mt}for(var re=r.view,oe=r.viewFrom,Se=0;Se<re.length;Se++){var De=re[Se];if(!De.hidden)if(!De.node||De.node.parentNode!=H){var Ke=Ks(e,De,oe,o);H.insertBefore(Ke,Q)}else{for(;Q!=De.node;)Q=ee(Q);var We=E&&t!=null&&t<=oe&&De.lineNumber;De.changes&&(fe(De.changes,"gutter")>-1&&(We=!1),ai(e,De,oe,o)),We&&(b(De.lineNumber),De.lineNumber.appendChild(document.createTextNode($t(e.options,oe)))),Q=De.node.nextSibling}oe+=De.size}for(;Q;)Q=ee(Q)}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+Nr(e)+"px"}function fa(e){var t=e.display,o=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var r=Ua(t)-t.scroller.scrollLeft+e.doc.scrollLeft,E=t.gutters.offsetWidth,H=r+"px",Q=0;Q<o.length;Q++)if(!o[Q].hidden){e.options.fixedGutter&&(o[Q].gutter&&(o[Q].gutter.style.left=H),o[Q].gutterBackground&&(o[Q].gutterBackground.style.left=H));var ee=o[Q].alignable;if(ee)for(var re=0;re<ee.length;re++)ee[re].style.left=H}e.options.fixedGutter&&(t.gutters.style.left=r+E+"px")}function pa(e){if(!e.options.lineNumbers)return!1;var t=e.doc,o=$t(e.options,t.first+t.size-1),r=e.display;if(o.length!=r.lineNumChars){var E=r.measure.appendChild(h("div",[h("div",o)],"CodeMirror-linenumber CodeMirror-gutter-elt")),H=E.firstChild.offsetWidth,Q=E.offsetWidth-H;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(H,r.lineGutter.offsetWidth-Q)+1,r.lineNumWidth=r.lineNumInnerWidth+Q,r.lineNumChars=r.lineNumInnerWidth?o.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Qi(e.display),!0}return!1}function Zi(e,t){for(var o=[],r=!1,E=0;E<e.length;E++){var H=e[E],Q=null;if(typeof H!="string"&&(Q=H.style,H=H.className),H=="CodeMirror-linenumbers")if(t)r=!0;else continue;o.push({className:H,style:Q})}return t&&!r&&o.push({className:"CodeMirror-linenumbers",style:null}),o}function ma(e){var t=e.gutters,o=e.gutterSpecs;b(t),e.lineGutter=null;for(var r=0;r<o.length;++r){var E=o[r],H=E.className,Q=E.style,ee=t.appendChild(h("div",null,"CodeMirror-gutter "+H));Q&&(ee.style.cssText=Q),H=="CodeMirror-linenumbers"&&(e.lineGutter=ee,ee.style.width=(e.lineNumWidth||1)+"px")}t.style.display=o.length?"":"none",Qi(e)}function Si(e){ma(e.display),zn(e),fa(e)}function Ja(e,t,o,r){var E=this;this.input=o,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: "+ye+"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"),G&&j<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!n&&!(N&&l)&&(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(r.gutters,r.lineNumbers),ma(E),o.init(E)}var Li=0,ur=null;G?ur=-.53:N?ur=15:v?ur=-.7:p&&(ur=-1/3);function ga(e){var t=e.wheelDeltaX,o=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),o==null&&e.detail&&e.axis==e.VERTICAL_AXIS?o=e.detail:o==null&&(o=e.wheelDelta),{x:t,y:o}}function fo(e){var t=ga(e);return t.x*=ur,t.y*=ur,t}function ir(e,t){var o=ga(t),r=o.x,E=o.y,H=e.display,Q=H.scroller,ee=Q.scrollWidth>Q.clientWidth,re=Q.scrollHeight>Q.clientHeight;if(!(r&&ee||E&&re))return;if(E&&a&&n){e:for(var oe=t.target,Se=H.view;oe!=Q;oe=oe.parentNode)for(var De=0;De<Se.length;De++)if(Se[De].node==oe){e.display.currentWheelTarget=oe;break e}}if(r&&!N&&!f&&ur!=null){E&&re&&zi(e,Math.max(0,Q.scrollTop+E*ur)),wi(e,Math.max(0,Q.scrollLeft+r*ur)),(!E||E&&re)&&ie(t),H.wheelStartX=null;return}if(E&&ur!=null){var Ke=E*ur,We=e.doc.scrollTop,at=We+H.wrapper.clientHeight;Ke<0?We=Math.max(0,We+Ke-50):at=Math.min(e.doc.height,at+Ke+50),Xi(e,{top:We,bottom:at})}Li<20&&(H.wheelStartX==null?(H.wheelStartX=Q.scrollLeft,H.wheelStartY=Q.scrollTop,H.wheelDX=r,H.wheelDY=E,setTimeout(function(){if(H.wheelStartX==null)return;var mt=Q.scrollLeft-H.wheelStartX,xt=Q.scrollTop-H.wheelStartY,Rt=xt&&H.wheelDY&&xt/H.wheelDY||mt&&H.wheelDX&&mt/H.wheelDX;if(H.wheelStartX=H.wheelStartY=null,!Rt)return;ur=(ur*Li+Rt)/(Li+1),++Li},200)):(H.wheelDX+=r,H.wheelDY+=E))}var Cn=function(e,t){this.ranges=e,this.primIndex=t};Cn.prototype.primary=function(){return this.ranges[this.primIndex]},Cn.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 o=this.ranges[t],r=e.ranges[t];if(!Ht(o.anchor,r.anchor)||!Ht(o.head,r.head))return!1}return!0},Cn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new fn(zt(this.ranges[t].anchor),zt(this.ranges[t].head));return new Cn(e,this.primIndex)},Cn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Cn.prototype.contains=function(e,t){t||(t=e);for(var o=0;o<this.ranges.length;o++){var r=this.ranges[o];if(Pt(t,r.from())>=0&&Pt(e,r.to())<=0)return o}return-1};var fn=function(e,t){this.anchor=e,this.head=t};fn.prototype.from=function(){return nn(this.anchor,this.head)},fn.prototype.to=function(){return Vt(this.anchor,this.head)},fn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ar(e,t,o){var r=e&&e.options.selectionsMayTouch,E=t[o];t.sort(function(Ke,We){return Pt(Ke.from(),We.from())}),o=fe(t,E);for(var H=1;H<t.length;H++){var Q=t[H],ee=t[H-1],re=Pt(ee.to(),Q.from());if(r&&!Q.empty()?re>0:re>=0){var oe=nn(ee.from(),Q.from()),Se=Vt(ee.to(),Q.to()),De=ee.empty()?Q.from()==Q.head:ee.from()==ee.head;H<=o&&--o,t.splice(--H,2,new fn(De?Se:oe,De?oe:Se))}}return new Cn(t,o)}function vr(e,t){return new Cn([new fn(e,t||e)],0)}function Kr(e){return e.text?ot(e.from.line+e.text.length-1,I(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Jr(e,t){if(Pt(e,t.from)<0)return e;if(Pt(e,t.to)<=0)return Kr(t);var o=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Kr(t).ch-t.to.ch),ot(o,r)}function va(e,t){for(var o=[],r=0;r<e.sel.ranges.length;r++){var E=e.sel.ranges[r];o.push(new fn(Jr(E.anchor,t),Jr(E.head,t)))}return ar(e.cm,o,e.sel.primIndex)}function po(e,t,o){return e.line==t.line?ot(o.line,e.ch-t.ch+o.ch):ot(o.line+(e.line-t.line),e.ch)}function hl(e,t,o){for(var r=[],E=ot(e.first,0),H=E,Q=0;Q<t.length;Q++){var ee=t[Q],re=po(ee.from,E,H),oe=po(Kr(ee),E,H);if(E=ee.to,H=oe,o=="around"){var Se=e.sel.ranges[Q],De=Pt(Se.head,Se.anchor)<0;r[Q]=new fn(De?oe:re,De?re:oe)}else r[Q]=new fn(re,re)}return new Cn(r,e.sel.primIndex)}function Js(e){e.doc.mode=Ve(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,Br(e,100),e.state.modeGen++,e.curOp&&zn(e)}function mo(e,t){return t.from.ch==0&&t.to.ch==0&&I(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Zs(e,t,o,r){function E(Ut){return o?o[Ut]:null}function H(Ut,It,jt){ii(Ut,It,jt,r),gn(Ut,"change",Ut,t)}function Q(Ut,It){for(var jt=[],Zt=Ut;Zt<It;++Zt)jt.push(new pr(oe[Zt],E(Zt),r));return jt}var ee=t.from,re=t.to,oe=t.text,Se=gt(e,ee.line),De=gt(e,re.line),Ke=I(oe),We=E(oe.length-1),at=re.line-ee.line;if(t.full)e.insert(0,Q(0,oe.length)),e.remove(oe.length,e.size-oe.length);else if(mo(e,t)){var mt=Q(0,oe.length-1);H(De,De.text,We),at&&e.remove(ee.line,at),mt.length&&e.insert(ee.line,mt)}else if(Se==De)if(oe.length==1)H(Se,Se.text.slice(0,ee.ch)+Ke+Se.text.slice(re.ch),We);else{var xt=Q(1,oe.length-1);xt.push(new pr(Ke+Se.text.slice(re.ch),We,r)),H(Se,Se.text.slice(0,ee.ch)+oe[0],E(0)),e.insert(ee.line+1,xt)}else if(oe.length==1)H(Se,Se.text.slice(0,ee.ch)+oe[0]+De.text.slice(re.ch),E(0)),e.remove(ee.line+1,at);else{H(Se,Se.text.slice(0,ee.ch)+oe[0],E(0)),H(De,Ke+De.text.slice(re.ch),We);var Rt=Q(1,oe.length-1);at>1&&e.remove(ee.line+1,at-1),e.insert(ee.line+1,Rt)}gn(e,"change",e,t)}function Mi(e,t,o){function r(E,H,Q){if(E.linked)for(var ee=0;ee<E.linked.length;++ee){var re=E.linked[ee];if(re.doc==H)continue;var oe=Q&&re.sharedHist;if(o&&!oe)continue;t(re.doc,oe),r(re.doc,E,oe)}}r(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||Dr(e),e.options.mode=t.modeOption,zn(e)}function vo(e){(e.doc.direction=="rtl"?k:_)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){bn(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 o={from:zt(t.from),to:Kr(t),text:Ct(e,t.from,t.to)};return Eo(e,o,t.from.line,t.to.line+1),Mi(e,function(r){return Eo(r,o,t.from.line,t.to.line+1)},!0),o}function yo(e){for(;e.length;){var t=I(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return yo(e.done),I(e.done);if(e.done.length&&!I(e.done).ranges)return I(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),I(e.done)}function bo(e,t,o,r){var E=e.history;E.undone.length=0;var H=+new Date,Q,ee;if((E.lastOp==r||E.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&E.lastModTime>H-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(Q=pl(E,E.lastOp==r)))ee=I(Q.changes),Pt(t.from,t.to)==0&&Pt(t.from,ee.to)==0?ee.to=Kr(t):Q.changes.push(qs(e,t));else{var re=I(E.done);for((!re||!re.ranges)&&Ds(e.sel,E.done),Q={changes:[qs(e,t)],generation:E.generation},E.done.push(Q);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(o),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=H,E.lastOp=E.lastSelOp=r,E.lastOrigin=E.lastSelOrigin=t.origin,ee||le(e,"historyAdded")}function ml(e,t,o,r){var E=t.charAt(0);return E=="*"||E=="+"&&o.ranges.length==r.ranges.length&&o.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,o,r){var E=e.history,H=r&&r.origin;o==E.lastSelOp||H&&E.lastSelOrigin==H&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==H||ml(e,H,I(E.done),t))?E.done[E.done.length-1]=t:Ds(t,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=H,E.lastSelOp=o,r&&r.clearRedo!==!1&&yo(E.undone)}function Ds(e,t){var o=I(t);o&&o.ranges&&o.equals(e)||t.push(e)}function Eo(e,t,o,r){var E=t["spans_"+e.id],H=0;e.iter(Math.max(e.first,o),Math.min(e.first+e.size,r),function(Q){Q.markedSpans&&((E||(E=t["spans_"+e.id]={}))[H]=Q.markedSpans),++H})}function vl(e){if(!e)return null;for(var t,o=0;o<e.length;++o)e[o].marker.explicitlyCleared?t||(t=e.slice(0,o)):t&&t.push(e[o]);return t?t.length?t:null:e}function yl(e,t){var o=t["spans_"+e.id];if(!o)return null;for(var r=[],E=0;E<t.text.length;++E)r.push(vl(o[E]));return r}function _o(e,t){var o=yl(e,t),r=pi(e,t);if(!o)return r;if(!r)return o;for(var E=0;E<o.length;++E){var H=o[E],Q=r[E];if(H&&Q){e:for(var ee=0;ee<Q.length;++ee){for(var re=Q[ee],oe=0;oe<H.length;++oe)if(H[oe].marker==re.marker)continue e;H.push(re)}}else Q&&(o[E]=Q)}return o}function ya(e,t,o){for(var r=[],E=0;E<e.length;++E){var H=e[E];if(H.ranges){r.push(o?Cn.prototype.deepCopy.call(H):H);continue}var Q=H.changes,ee=[];r.push({changes:ee});for(var re=0;re<Q.length;++re){var oe=Q[re],Se=void 0;if(ee.push({from:oe.from,to:oe.to,text:oe.text}),t)for(var De in oe)(Se=De.match(/^spans_(\d+)$/))&&(fe(t,Number(Se[1]))>-1&&(I(ee)[De]=oe[De],delete oe[De]))}}return r}function $s(e,t,o,r){if(r){var E=e.anchor;if(o){var H=Pt(t,E)<0;H!=Pt(o,E)<0?(E=t,t=o):H!=Pt(t,o)<0&&(t=o)}return new fn(E,t)}else return new fn(o||t,t)}function Ls(e,t,o,r,E){E==null&&(E=e.cm&&(e.cm.display.shift||e.extend)),cr(e,new Cn([$s(e.sel.primary(),t,o,E)],0),r)}function xo(e,t,o){for(var r=[],E=e.cm&&(e.cm.display.shift||e.extend),H=0;H<e.sel.ranges.length;H++)r[H]=$s(e.sel.ranges[H],t[H],null,E);var Q=ar(e.cm,r,e.sel.primIndex);cr(e,Q,o)}function eo(e,t,o,r){var E=e.sel.ranges.slice(0);E[t]=o,cr(e,ar(e.cm,E,e.sel.primIndex),r)}function To(e,t,o,r){cr(e,vr(t,o),r)}function bl(e,t,o){var r={ranges:t.ranges,update:function(E){this.ranges=[];for(var H=0;H<E.length;H++)this.ranges[H]=new fn(Lt(e,E[H].anchor),Lt(e,E[H].head))},origin:o&&o.origin};return le(e,"beforeSelectionChange",e,r),e.cm&&le(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?ar(e.cm,r.ranges,r.ranges.length-1):t}function wo(e,t,o){var r=e.history.done,E=I(r);E&&E.ranges?(r[r.length-1]=t,Ms(e,t,o)):cr(e,t,o)}function cr(e,t,o){Ms(e,t,o),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,o)}function Ms(e,t,o){(ae(e,"beforeSelectionChange")||e.cm&&ae(e.cm,"beforeSelectionChange"))&&(t=bl(e,t,o));var r=o&&o.bias||(Pt(t.primary().head,e.sel.primary().head)<0?-1:1);So(e,Co(e,t,r,!0)),!(o&&o.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,te(e.cm)),gn(e,"cursorActivity",e)}function Ao(e){So(e,Co(e,e.sel,null,!1))}function Co(e,t,o,r){for(var E,H=0;H<t.ranges.length;H++){var Q=t.ranges[H],ee=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[H],re=ks(e,Q.anchor,ee&&ee.anchor,o,r),oe=ks(e,Q.head,ee&&ee.head,o,r);(E||re!=Q.anchor||oe!=Q.head)&&(E||(E=t.ranges.slice(0,H)),E[H]=new fn(re,oe))}return E?ar(e.cm,E,t.primIndex):t}function ba(e,t,o,r,E){var H=gt(e,t.line);if(H.markedSpans)for(var Q=0;Q<H.markedSpans.length;++Q){var ee=H.markedSpans[Q],re=ee.marker,oe="selectLeft"in re?!re.selectLeft:re.inclusiveLeft,Se="selectRight"in re?!re.selectRight:re.inclusiveRight;if((ee.from==null||(oe?ee.from<=t.ch:ee.from<t.ch))&&(ee.to==null||(Se?ee.to>=t.ch:ee.to>t.ch))){if(E&&(le(re,"beforeCursorEnter"),re.explicitlyCleared))if(H.markedSpans){--Q;continue}else break;if(!re.atomic)continue;if(o){var De=re.find(r<0?1:-1),Ke=void 0;if((r<0?Se:oe)&&(De=Oo(e,De,-r,De&&De.line==t.line?H:null)),De&&De.line==t.line&&(Ke=Pt(De,o))&&(r<0?Ke<0:Ke>0))return ba(e,De,t,r,E)}var We=re.find(r<0?-1:1);return(r<0?oe:Se)&&(We=Oo(e,We,r,We.line==t.line?H:null)),We?ba(e,We,t,r,E):null}}return t}function ks(e,t,o,r,E){var H=r||1,Q=ba(e,t,o,H,E)||!E&&ba(e,t,o,H,!0)||ba(e,t,o,-H,E)||!E&&ba(e,t,o,-H,!0);return Q||(e.cantEdit=!0,ot(e.first,0))}function Oo(e,t,o,r){return o<0&&t.ch==0?t.line>e.first?Lt(e,ot(t.line-1)):null:o>0&&t.ch==(r||gt(e,t.line)).text.length?t.line<e.first+e.size-1?ot(t.line+1,0):null:new ot(t.line,t.ch+o)}function Ro(e){e.setSelection(ot(e.firstLine(),0),ot(e.lastLine()),xe)}function Io(e,t,o){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return o&&(r.update=function(E,H,Q,ee){E&&(r.from=Lt(e,E)),H&&(r.to=Lt(e,H)),Q&&(r.text=Q),ee!==void 0&&(r.origin=ee)}),le(e,"beforeChange",e,r),e.cm&&le(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Ea(e,t,o){if(e.cm){if(!e.cm.curOp)return cn(e.cm,Ea)(e,t,o);if(e.cm.state.suppressEdits)return}if((ae(e,"beforeChange")||e.cm&&ae(e.cm,"beforeChange"))&&(t=Io(e,t,!0),!t))return;var r=Fr&&!o&&qr(e,t.from,t.to);if(r)for(var E=r.length-1;E>=0;--E)Do(e,{from:r[E].from,to:r[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]==""&&Pt(t.from,t.to)==0)return;var o=va(e,t);bo(e,t,o,e.cm?e.cm.curOp.id:NaN),qa(e,t,o,pi(e,t));var r=[];Mi(e,function(E,H){!H&&fe(r,E.history)==-1&&(Po(E.history,t),r.push(E.history)),qa(E,t,null,pi(E,t))})}function Ps(e,t,o){var r=e.cm&&e.cm.state.suppressEdits;if(r&&!o)return;for(var E=e.history,H,Q=e.sel,ee=t=="undo"?E.done:E.undone,re=t=="undo"?E.undone:E.done,oe=0;oe<ee.length&&!(H=ee[oe],o?H.ranges&&!H.equals(e.sel):!H.ranges);oe++);if(oe==ee.length)return;for(E.lastOrigin=E.lastSelOrigin=null;;)if(H=ee.pop(),H.ranges){if(Ds(H,re),o&&!H.equals(e.sel)){cr(e,H,{clearRedo:!1});return}Q=H}else if(r){ee.push(H);return}else break;var Se=[];Ds(Q,re),re.push({changes:Se,generation:E.generation}),E.generation=H.generation||++E.maxGeneration;for(var De=ae(e,"beforeChange")||e.cm&&ae(e.cm,"beforeChange"),Ke=function(mt){var xt=H.changes[mt];if(xt.origin=t,De&&!Io(e,xt,!1))return ee.length=0,{};Se.push(qs(e,xt));var Rt=mt?va(e,xt):I(ee);qa(e,xt,Rt,_o(e,xt)),!mt&&e.cm&&e.cm.scrollIntoView({from:xt.from,to:Kr(xt)});var Ut=[];Mi(e,function(It,jt){!jt&&fe(Ut,It.history)==-1&&(Po(It.history,xt),Ut.push(It.history)),qa(It,xt,null,_o(It,xt))})},We=H.changes.length-1;We>=0;--We){var at=Ke(We);if(at)return at.v}}function Lo(e,t){if(t==0)return;if(e.first+=t,e.sel=new Cn(U(e.sel.ranges,function(E){return new fn(ot(E.anchor.line+t,E.anchor.ch),ot(E.head.line+t,E.head.ch))}),e.sel.primIndex),e.cm){zn(e.cm,e.first,e.first-t,t);for(var o=e.cm.display,r=o.viewFrom;r<o.viewTo;r++)oi(e.cm,r,"gutter")}}function qa(e,t,o,r){if(e.cm&&!e.cm.curOp)return cn(e.cm,qa)(e,t,o,r);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:ot(e.first,0),to:ot(t.to.line+E,t.to.ch),text:[I(t.text)],origin:t.origin}}var H=e.lastLine();t.to.line>H&&(t={from:t.from,to:ot(H,gt(e,H).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ct(e,t.from,t.to),o||(o=va(e,t)),e.cm?El(e.cm,t,r):Zs(e,t,r),Ms(e,o,xe),e.cantEdit&&ks(e,ot(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,o){var r=e.doc,E=e.display,H=t.from,Q=t.to,ee=!1,re=H.line;e.options.lineWrapping||(re=kt(ln(gt(r,H.line))),r.iter(re,Q.line+1,function(We){if(We==E.maxLine)return ee=!0,!0})),r.sel.contains(t.from,t.to)>-1&&te(e),Zs(r,t,o,Ba(e)),e.options.lineWrapping||(r.iter(re,H.line+t.text.length,function(We){var at=ri(We);at>E.maxLineLength&&(E.maxLine=We,E.maxLineLength=at,E.maxLineChanged=!0,ee=!1)}),ee&&(e.curOp.updateMaxLine=!0)),di(r,H.line),Br(e,400);var oe=t.text.length-(Q.line-H.line)-1;t.full?zn(e):H.line==Q.line&&t.text.length==1&&!mo(e.doc,t)?oi(e,H.line,"text"):zn(e,H.line,Q.line+1,oe);var Se=ae(e,"changes"),De=ae(e,"change");if(De||Se){var Ke={from:H,to:Q,text:t.text,removed:t.removed,origin:t.origin};De&&gn(e,"change",e,Ke),Se&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Ke)}e.display.selForContextMenu=null}function _a(e,t,o,r,E){var H;r||(r=o),Pt(r,o)<0&&(H=[r,o],o=H[0],r=H[1]),typeof t=="string"&&(t=e.splitLines(t)),Ea(e,{from:o,to:r,text:t,origin:E})}function Mo(e,t,o,r){o<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function ko(e,t,o,r){for(var E=0;E<e.length;++E){var H=e[E],Q=!0;if(H.ranges){H.copied||(H=e[E]=H.deepCopy(),H.copied=!0);for(var ee=0;ee<H.ranges.length;ee++)Mo(H.ranges[ee].anchor,t,o,r),Mo(H.ranges[ee].head,t,o,r);continue}for(var re=0;re<H.changes.length;++re){var oe=H.changes[re];if(o<oe.from.line)oe.from=ot(oe.from.line+r,oe.from.ch),oe.to=ot(oe.to.line+r,oe.to.ch);else if(t<=oe.to.line){Q=!1;break}}Q||(e.splice(0,E+1),E=0)}}function Po(e,t){var o=t.from.line,r=t.to.line,E=t.text.length-(r-o)-1;ko(e.done,o,r,E),ko(e.undone,o,r,E)}function $a(e,t,o,r){var E=t,H=t;return typeof t=="number"?H=gt(e,rn(e,t)):E=kt(t),E==null?null:(r(H,E)&&e.cm&&oi(e.cm,E,o),H)}function es(e){this.lines=e,this.parent=null;for(var t=0,o=0;o<e.length;++o)e[o].parent=this,t+=e[o].height;this.height=t}es.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var o=e,r=e+t;o<r;++o){var E=this.lines[o];this.height-=E.height,Bt(E),gn(E,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,o){this.height+=o,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,o){for(var r=e+t;e<r;++e)if(o(this.lines[e]))return!0}};function ts(e){this.children=e;for(var t=0,o=0,r=0;r<e.length;++r){var E=e[r];t+=E.chunkSize(),o+=E.height,E.parent=this}this.size=t,this.height=o,this.parent=null}ts.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var o=0;o<this.children.length;++o){var r=this.children[o],E=r.chunkSize();if(e<E){var H=Math.min(t,E-e),Q=r.height;if(r.removeInner(e,H),this.height-=Q-r.height,E==H&&(this.children.splice(o--,1),r.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 ee=[];this.collapse(ee),this.children=[new es(ee)],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,o){this.size+=t.length,this.height+=o;for(var r=0;r<this.children.length;++r){var E=this.children[r],H=E.chunkSize();if(e<=H){if(E.insertInner(e,t,o),E.lines&&E.lines.length>50){for(var Q=E.lines.length%25+25,ee=Q;ee<E.lines.length;){var re=new es(E.lines.slice(ee,ee+=25));E.height-=re.height,this.children.splice(++r,0,re),re.parent=this}E.lines=E.lines.slice(0,Q),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),o=new ts(t);if(e.parent){e.size-=o.size,e.height-=o.height;var E=fe(e.parent.children,e);e.parent.children.splice(E+1,0,o)}else{var r=new ts(e.children);r.parent=e,e.children=[r,o],e=r}o.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,o){for(var r=0;r<this.children.length;++r){var E=this.children[r],H=E.chunkSize();if(e<H){var Q=Math.min(t,H-e);if(E.iterN(e,Q,o))return!0;if((t-=Q)==0)break;e=0}else e-=H}}};var ns=function(e,t,o){if(o)for(var r in o)o.hasOwnProperty(r)&&(this[r]=o[r]);this.doc=e,this.node=t};ns.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,o=this.line,r=kt(o);if(r==null||!t)return;for(var E=0;E<t.length;++E)t[E]==this&&t.splice(E--,1);t.length||(o.widgets=null);var H=gi(this);St(o,Math.max(0,o.height-H)),e&&(bn(e,function(){No(e,o,-H),oi(e,r,"widget")}),gn(e,"lineWidgetCleared",e,this,r))},ns.prototype.changed=function(){var e=this,t=this.height,o=this.doc.cm,r=this.line;this.height=null;var E=gi(this)-t;if(!E)return;Ir(this.doc,r)||St(r,r.height+E),o&&bn(o,function(){o.curOp.forceUpdate=!0,No(o,r,E),gn(o,"lineWidgetChanged",o,e,kt(r))})},de(ns);function No(e,t,o){fr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ga(e,o)}function _l(e,t,o,r){var E=new ns(e,o,r),H=e.cm;return H&&E.noHScroll&&(H.display.alignWidgets=!0),$a(e,t,"widget",function(Q){var ee=Q.widgets||(Q.widgets=[]);if(E.insertAt==null?ee.push(E):ee.splice(Math.min(ee.length-1,Math.max(0,E.insertAt)),0,E),E.line=Q,H&&!Ir(e,Q)){var re=fr(Q)<e.scrollTop;St(Q,Q.height+gi(E)),re&&Ga(H,E.height),H.curOp.forceUpdate=!0}return!0}),H&&gn(H,"lineWidgetAdded",H,E,typeof t=="number"?t:kt(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&&Ft(e),ae(this,"clear")){var o=this.find();o&&gn(this,"clear",o.from,o.to)}for(var r=null,E=null,H=0;H<this.lines.length;++H){var Q=this.lines[H],ee=nr(Q.markedSpans,this);e&&!this.collapsed?oi(e,kt(Q),"text"):e&&(ee.to!=null&&(E=kt(Q)),ee.from!=null&&(r=kt(Q))),Q.markedSpans=Gr(Q.markedSpans,ee),ee.from==null&&this.collapsed&&!Ir(this.doc,Q)&&e&&St(Q,Ri(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var re=0;re<this.lines.length;++re){var oe=ln(this.lines[re]),Se=ri(oe);Se>e.display.maxLineLength&&(e.display.maxLine=oe,e.display.maxLineLength=Se,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&zn(e,r,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ao(e.doc)),e&&gn(e,"markerCleared",e,this,r,E),t&&Tt(e),this.parent&&this.parent.clear()},ki.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var o,r,E=0;E<this.lines.length;++E){var H=this.lines[E],Q=nr(H.markedSpans,this);if(Q.from!=null&&(o=ot(t?H:kt(H),Q.from),e==-1))return o;if(Q.to!=null&&(r=ot(t?H:kt(H),Q.to),e==1))return r}return o&&{from:o,to:r}},ki.prototype.changed=function(){var e=this,t=this.find(-1,!0),o=this,r=this.doc.cm;if(!t||!r)return;bn(r,function(){var E=t.line,H=kt(t.line),Q=gr(r,H);if(Q&&(bs(Q),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Ir(o.doc,E)&&o.height!=null){var ee=o.height;o.height=null;var re=gi(o)-ee;re&&St(E,E.height+re)}gn(r,"markerChanged",r,e)})},ki.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||fe(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ki.prototype.detachLine=function(e){if(this.lines.splice(fe(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},de(ki);function xa(e,t,o,r,E){if(r&&r.shared)return xl(e,t,o,r,E);if(e.cm&&!e.cm.curOp)return cn(e.cm,xa)(e,t,o,r,E);var H=new ki(e,E),Q=Pt(t,o);if(r&&A(r,H,!1),Q>0||Q==0&&H.clearWhenEmpty!==!1)return H;if(H.replacedWith&&(H.collapsed=!0,H.widgetNode=C("span",[H.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||H.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(H.widgetNode.insertLeft=!0)),H.collapsed){if(mi(e,t.line,t,o,H)||t.line!=o.line&&mi(e,o.line,t,o,H))throw new Error("Inserting collapsed marker partially overlapping an existing one");hi()}H.addToHistory&&bo(e,{from:t,to:o,origin:"markText"},e.sel,NaN);var ee=t.line,re=e.cm,oe;if(e.iter(ee,o.line+1,function(De){re&&H.collapsed&&!re.options.lineWrapping&&ln(De)==re.display.maxLine&&(oe=!0),H.collapsed&&ee!=t.line&&St(De,0),fi(De,new Cr(H,ee==t.line?t.ch:null,ee==o.line?o.ch:null)),++ee}),H.collapsed&&e.iter(t.line,o.line+1,function(De){Ir(e,De)&&St(De,0)}),H.clearOnEnter&&Re(H,"beforeCursorEnter",function(){return H.clear()}),H.readOnly&&(Ar(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),H.collapsed&&(H.id=++Uo,H.atomic=!0),re){if(oe&&(re.curOp.updateMaxLine=!0),H.collapsed)zn(re,t.line,o.line+1);else if(H.className||H.startStyle||H.endStyle||H.css||H.attributes||H.title)for(var Se=t.line;Se<=o.line;Se++)oi(re,Se,"text");H.atomic&&Ao(re.doc),gn(re,"markerAdded",re,H)}return H}var rs=function(e,t){this.markers=e,this.primary=t;for(var o=0;o<e.length;++o)e[o].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();gn(this,"clear")},rs.prototype.find=function(e,t){return this.primary.find(e,t)},de(rs);function xl(e,t,o,r,E){r=A(r),r.shared=!1;var H=[xa(e,t,o,r,E)],Q=H[0],ee=r.widgetNode;return Mi(e,function(re){ee&&(r.widgetNode=ee.cloneNode(!0)),H.push(xa(re,Lt(re,t),Lt(re,o),r,E));for(var oe=0;oe<re.linked.length;++oe)if(re.linked[oe].isParent)return;Q=I(H)}),new rs(H,Q)}function Bo(e){return e.findMarks(ot(e.first,0),e.clipPos(ot(e.lastLine())),function(t){return t.parent})}function Tl(e,t){for(var o=0;o<t.length;o++){var r=t[o],E=r.find(),H=e.clipPos(E.from),Q=e.clipPos(E.to);if(Pt(H,Q)){var ee=xa(e,H,Q,r.primary,r.primary.type);r.markers.push(ee),ee.parent=r}}}function wl(e){for(var t=function(r){var E=e[r],H=[E.primary.doc];Mi(E.primary.doc,function(re){return H.push(re)});for(var Q=0;Q<E.markers.length;Q++){var ee=E.markers[Q];fe(H,ee.doc)==-1&&(ee.parent=null,E.markers.splice(Q--,1))}},o=0;o<e.length;o++)t(o)}var Sl=0,xr=function(e,t,o,r,E){if(!(this instanceof xr))return new xr(e,t,o,r,E);o==null&&(o=0),ts.call(this,[new es([new pr("",null)])]),this.first=o,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=o;var H=ot(o,0);this.sel=vr(H),this.history=new Is(null),this.id=++Sl,this.modeOption=t,this.lineSep=r,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Zs(this,{from:H,to:H,text:e}),cr(this,vr(H),xe)};xr.prototype=V(ts.prototype,{constructor:xr,iter:function(e,t,o){o?this.iterN(e-this.first,t-e,o):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var o=0,r=0;r<t.length;++r)o+=t[r].height;this.insertInner(e-this.first,t,o)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Mt(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:An(function(e){var t=ot(this.first,0),o=this.first+this.size-1;Ea(this,{from:t,to:ot(o,gt(this,o).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Gi(this.cm,0,0),cr(this,vr(t),xe)}),replaceRange:function(e,t,o,r){t=Lt(this,t),o=o?Lt(this,o):t,_a(this,e,t,o,r)},getRange:function(e,t,o){var r=Ct(this,Lt(this,e),Lt(this,t));return o===!1?r:r.join(o||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(dn(this,e))return gt(this,e)},getLineNumber:function(e){return kt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=gt(this,e)),ln(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Lt(this,e)},getCursor:function(e){var t=this.sel.primary(),o;return e==null||e=="head"?o=t.head:e=="anchor"?o=t.anchor:e=="end"||e=="to"||e===!1?o=t.to():o=t.from(),o},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:An(function(e,t,o){To(this,Lt(this,typeof e=="number"?ot(e,t||0):e),null,o)}),setSelection:An(function(e,t,o){To(this,Lt(this,e),Lt(this,t||e),o)}),extendSelection:An(function(e,t,o){Ls(this,Lt(this,e),t&&Lt(this,t),o)}),extendSelections:An(function(e,t){xo(this,ct(this,e),t)}),extendSelectionsBy:An(function(e,t){var o=U(this.sel.ranges,e);xo(this,ct(this,o),t)}),setSelections:An(function(e,t,o){if(!e.length)return;for(var r=[],E=0;E<e.length;E++)r[E]=new fn(Lt(this,e[E].anchor),Lt(this,e[E].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),cr(this,ar(this.cm,r,t),o)}),addSelection:An(function(e,t,o){var r=this.sel.ranges.slice(0);r.push(new fn(Lt(this,e),Lt(this,t||e))),cr(this,ar(this.cm,r,r.length-1),o)}),getSelection:function(e){for(var t=this.sel.ranges,o,r=0;r<t.length;r++){var E=Ct(this,t[r].from(),t[r].to());o=o?o.concat(E):E}return e===!1?o:o.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],o=this.sel.ranges,r=0;r<o.length;r++){var E=Ct(this,o[r].from(),o[r].to());e!==!1&&(E=E.join(e||this.lineSeparator())),t[r]=E}return t},replaceSelection:function(e,t,o){for(var r=[],E=0;E<this.sel.ranges.length;E++)r[E]=e;this.replaceSelections(r,t,o||"+input")},replaceSelections:An(function(e,t,o){for(var r=[],E=this.sel,H=0;H<E.ranges.length;H++){var Q=E.ranges[H];r[H]={from:Q.from(),to:Q.to(),text:this.splitLines(e[H]),origin:o}}for(var ee=t&&t!="end"&&hl(this,r,t),re=r.length-1;re>=0;re--)Ea(this,r[re]);ee?wo(this,ee):this.cm&&Ii(this.cm)}),undo:An(function(){Ps(this,"undo")}),redo:An(function(){Ps(this,"redo")}),undoSelection:An(function(){Ps(this,"undo",!0)}),redoSelection:An(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,o=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var E=0;E<e.undone.length;E++)e.undone[E].ranges||++o;return{undo:t,redo:o}},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:An(function(e,t,o){return $a(this,e,"gutter",function(r){var E=r.gutterMarkers||(r.gutterMarkers={});return E[t]=o,!o&&ce(E)&&(r.gutterMarkers=null),!0})}),clearGutter:An(function(e){var t=this;this.iter(function(o){o.gutterMarkers&&o.gutterMarkers[e]&&$a(t,o,"gutter",function(){return o.gutterMarkers[e]=null,ce(o.gutterMarkers)&&(o.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!dn(this,e))return null;if(t=e,e=gt(this,e),!e)return null}else if(t=kt(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:An(function(e,t,o){return $a(this,e,t=="gutter"?"gutter":"class",function(r){var E=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[E])r[E]=o;else{if(L(o).test(r[E]))return!1;r[E]+=" "+o}return!0})}),removeLineClass:An(function(e,t,o){return $a(this,e,t=="gutter"?"gutter":"class",function(r){var E=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",H=r[E];if(H)if(o==null)r[E]=null;else{var Q=H.match(L(o));if(!Q)return!1;var ee=Q.index+Q[0].length;r[E]=H.slice(0,Q.index)+(!Q.index||ee==H.length?"":" ")+H.slice(ee)||null}else return!1;return!0})}),addLineWidget:An(function(e,t,o){return _l(this,e,t,o)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,o){return xa(this,Lt(this,e),Lt(this,t),o,o&&o.type||"range")},setBookmark:function(e,t){var o={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Lt(this,e),xa(this,e,e,o,"bookmark")},findMarksAt:function(e){e=Lt(this,e);var t=[],o=gt(this,e.line).markedSpans;if(o)for(var r=0;r<o.length;++r){var E=o[r];(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,o){e=Lt(this,e),t=Lt(this,t);var r=[],E=e.line;return this.iter(e.line,t.line+1,function(H){var Q=H.markedSpans;if(Q)for(var ee=0;ee<Q.length;ee++){var re=Q[ee];!(re.to!=null&&E==e.line&&e.ch>=re.to||re.from==null&&E!=e.line||re.from!=null&&E==t.line&&re.from>=t.ch)&&(!o||o(re.marker))&&r.push(re.marker.parent||re.marker)}++E}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var o=t.markedSpans;if(o)for(var r=0;r<o.length;++r)o[r].from!=null&&e.push(o[r].marker)}),e},posFromIndex:function(e){var t,o=this.first,r=this.lineSeparator().length;return this.iter(function(E){var H=E.text.length+r;if(H>e)return t=e,!0;e-=H,++o}),Lt(this,ot(o,t))},indexFromPos:function(e){e=Lt(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var o=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+o}),t},copy:function(e){var t=new xr(Mt(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,o=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<o&&(o=e.to);var r=new xr(Mt(this,t,o),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(r,Bo(this)),r},unlinkDoc:function(e){if(e instanceof Wn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var o=this.linked[t];if(o.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),wl(Bo(this));break}if(e.history==this.history){var r=[e.id];Mi(e,function(E){return r.push(E.id)},!0),e.history=new Is(null),e.history.done=ya(this.history.done,r),e.history.undone=ya(this.history.undone,r)}},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):ze(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:An(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)})}),xr.prototype.eachLine=xr.prototype.iter;var Fo=0;function Al(e){var t=this;if(jo(t),$(t,e)||Pr(t.display,e))return;ie(e),G&&(Fo=+new Date);var o=_i(t,e,!0),r=e.dataTransfer.files;if(!o||t.isReadOnly())return;if(r&&r.length&&window.FileReader&&window.File)for(var E=r.length,H=Array(E),Q=0,ee=function(){++Q==E&&cn(t,function(){o=Lt(t.doc,o);var We={from:o,to:o,text:t.doc.splitLines(H.filter(function(at){return at!=null}).join(t.doc.lineSeparator())),origin:"paste"};Ea(t.doc,We),wo(t.doc,vr(Lt(t.doc,o),Lt(t.doc,Kr(We))))})()},re=function(We,at){if(t.options.allowDropFileTypes&&fe(t.options.allowDropFileTypes,We.type)==-1){ee();return}var mt=new FileReader;mt.onerror=function(){return ee()},mt.onload=function(){var xt=mt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(xt)){ee();return}H[at]=xt,ee()},mt.readAsText(We)},oe=0;oe<r.length;oe++)re(r[oe],oe);else{if(t.state.draggingText&&t.doc.sel.contains(o)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Se=e.dataTransfer.getData("Text");if(Se){var De;if(t.state.draggingText&&!t.state.draggingText.copy&&(De=t.listSelections()),Ms(t.doc,vr(o,o)),De)for(var Ke=0;Ke<De.length;++Ke)_a(t.doc,"",De[Ke].anchor,De[Ke].head,"drag");t.replaceSelection(Se,"around","paste"),t.display.input.focus()}}catch(We){}}}function Cl(e,t){if(G&&(!e.state.draggingText||+new Date-Fo<100)){be(t);return}if($(e,t)||Pr(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p){var o=h("img",null,null,"position: fixed; left: 0; top: 0;");o.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(o.width=o.height=1,e.display.wrapper.appendChild(o),o._top=o.offsetTop),t.dataTransfer.setDragImage(o,0,0),f&&o.parentNode.removeChild(o)}}function Ol(e,t){var o=_i(e,t);if(!o)return;var r=document.createDocumentFragment();ja(e,o,r),e.display.dragCursor||(e.display.dragCursor=h("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),g(e.display.dragCursor,r)}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"),o=[],r=0;r<t.length;r++){var E=t[r].CodeMirror;E&&o.push(E)}o.length&&o[0].operation(function(){for(var H=0;H<o.length;H++)e(o[H])})}var Ho=!1;function Rl(){if(Ho)return;Il(),Ho=!0}function Il(){var e;Re(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Wo(Dl)},100))}),Re(window,"blur",function(){return Wo(Xr)})}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=a?Ai.macDefault:Ai.pcDefault;function Ll(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var o,r,E,H,Q=0;Q<t.length-1;Q++){var ee=t[Q];if(/^(cmd|meta|m)$/i.test(ee))H=!0;else if(/^a(lt)?$/i.test(ee))o=!0;else if(/^(c|ctrl|control)$/i.test(ee))r=!0;else if(/^s(hift)?$/i.test(ee))E=!0;else throw new Error("Unrecognized modifier name: "+ee)}return o&&(e="Alt-"+e),r&&(e="Ctrl-"+e),H&&(e="Cmd-"+e),E&&(e="Shift-"+e),e}function Ml(e){var t={};for(var o in e)if(e.hasOwnProperty(o)){var r=e[o];if(/^(name|fallthrough|(de|at)tach)$/.test(o))continue;if(r=="..."){delete e[o];continue}for(var E=U(o.split(" "),Ll),H=0;H<E.length;H++){var Q=void 0,ee=void 0;H==E.length-1?(ee=E.join(" "),Q=r):(ee=E.slice(0,H+1).join(" "),Q="...");var re=t[ee];if(!re)t[ee]=Q;else if(re!=Q)throw new Error("Inconsistent bindings for "+ee)}delete e[o]}for(var oe in t)e[oe]=t[oe];return e}function Ta(e,t,o,r){t=Us(t);var E=t.call?t.call(e,r):t[e];if(E===!1)return"nothing";if(E==="...")return"multi";if(E!=null&&o(E))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ta(e,t.fallthrough,o,r);for(var H=0;H<t.fallthrough.length;H++){var Q=Ta(e,t.fallthrough[H],o,r);if(Q)return Q}}}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,o){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(w?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(w?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!o&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function zo(e,t){if(f&&e.keyCode==34&&e.char)return!1;var o=Pi[e.keyCode];return o==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(o=e.code),Go(o,e,t))}function Us(e){return typeof e=="string"?Ai[e]:e}function wa(e,t){for(var o=e.doc.sel.ranges,r=[],E=0;E<o.length;E++){for(var H=t(o[E]);r.length&&Pt(H.from,I(r).to)<=0;){var Q=r.pop();if(Pt(Q.from,H.from)<0){H.from=Q.from;break}}r.push(H)}bn(e,function(){for(var ee=r.length-1;ee>=0;ee--)_a(e.doc,"",r[ee].from,r[ee].to,"+delete");Ii(e)})}function to(e,t,o){var r=Oe(e.text,t+o,o);return r<0||r>e.text.length?null:r}function no(e,t,o){var r=to(e,t.ch,o);return r==null?null:new ot(t.line,r,o<0?"after":"before")}function ro(e,t,o,r,E){if(e){t.doc.direction=="rtl"&&(E=-E);var H=yt(o,t.doc.direction);if(H){var Q=E<0?I(H):H[0],ee=E<0==(Q.level==1),re=ee?"after":"before",oe;if(Q.level>0||t.doc.direction=="rtl"){var Se=ji(t,o);oe=E<0?o.text.length-1:0;var De=Ur(t,Se,oe).top;oe=Xe(function(Ke){return Ur(t,Se,Ke).top==De},E<0==(Q.level==1)?Q.from:Q.to-1,oe),re=="before"&&(oe=to(o,oe,1))}else oe=E<0?Q.to:Q.from;return new ot(r,oe,re)}}return new ot(r,E<0?o.text.length:0,E<0?"before":"after")}function kl(e,t,o,r){var E=yt(t,e.doc.direction);if(!E)return no(t,o,r);o.ch>=t.text.length?(o.ch=t.text.length,o.sticky="before"):o.ch<=0&&(o.ch=0,o.sticky="after");var H=nt(E,o.ch,o.sticky),Q=E[H];if(e.doc.direction=="ltr"&&Q.level%2==0&&(r>0?Q.to>o.ch:Q.from<o.ch))return no(t,o,r);var ee=function(Rt,Ut){return to(t,Rt instanceof ot?Rt.ch:Rt,Ut)},re,oe=function(Rt){return e.options.lineWrapping?(re=re||ji(e,t),Ki(e,t,re,Rt)):{begin:0,end:t.text.length}},Se=oe(o.sticky=="before"?ee(o,-1):o.ch);if(e.doc.direction=="rtl"||Q.level==1){var De=Q.level==1==r<0,Ke=ee(o,De?1:-1);if(Ke!=null&&(De?Ke<=Q.to&&Ke<=Se.end:Ke>=Q.from&&Ke>=Se.begin)){var We=De?"before":"after";return new ot(o.line,Ke,We)}}var at=function(Rt,Ut,It){for(var jt=function(Ln,er){return er?new ot(o.line,ee(Ln,1),"before"):new ot(o.line,Ln,"after")};Rt>=0&&Rt<E.length;Rt+=Ut){var Zt=E[Rt],Gt=Ut>0==(Zt.level!=1),on=Gt?It.begin:ee(It.end,-1);if(Zt.from<=on&&on<Zt.to)return jt(on,Gt);if(on=Gt?Zt.from:ee(Zt.to,-1),It.begin<=on&&on<It.end)return jt(on,Gt)}},mt=at(H+r,r,Se);if(mt)return mt;var xt=r>0?Se.end:ee(Se.begin,-1);return xt!=null&&!(r>0&&xt==t.text.length)&&(mt=at(r>0?0:E.length-1,r,oe(xt)),mt)?mt:null}var ss={selectAll:Ro,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),xe)},killLine:function(e){return wa(e,function(t){if(t.empty()){var o=gt(e.doc,t.head.line).text.length;return t.head.ch==o&&t.head.line<e.lastLine()?{from:t.head,to:ot(t.head.line+1,0)}:{from:t.head,to:ot(t.head.line,o)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return wa(e,function(t){return{from:ot(t.from().line,0),to:Lt(e.doc,ot(t.to().line+1,0))}})},delLineLeft:function(e){return wa(e,function(t){return{from:ot(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return wa(e,function(t){var o=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:o},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return wa(e,function(t){var o=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:o},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ot(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ot(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 o=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:o},"div")},Me)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var o=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:o},"div")},Me)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var o=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:o},"div");return r.ch<e.getLine(r.line).search(/\S/)?Yo(e,t.head):r},Me)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],o=e.listSelections(),r=e.options.tabSize,E=0;E<o.length;E++){var H=o[E].from(),Q=X(e.getLine(H.line),H.ch,r);t.push(J(r-Q%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return bn(e,function(){for(var t=e.listSelections(),o=[],r=0;r<t.length;r++){if(!t[r].empty())continue;var E=t[r].head,H=gt(e.doc,E.line).text;if(H){if(E.ch==H.length&&(E=new ot(E.line,E.ch-1)),E.ch>0)E=new ot(E.line,E.ch+1),e.replaceRange(H.charAt(E.ch-1)+H.charAt(E.ch-2),ot(E.line,E.ch-2),E,"+transpose");else if(E.line>e.doc.first){var Q=gt(e.doc,E.line-1).text;Q&&(E=new ot(E.line,1),e.replaceRange(H.charAt(0)+e.doc.lineSeparator()+Q.charAt(Q.length-1),ot(E.line-1,Q.length-1),E,"+transpose"))}}o.push(new fn(E,E))}e.setSelections(o)})},newlineAndIndent:function(e){return bn(e,function(){for(var t=e.listSelections(),o=t.length-1;o>=0;o--)e.replaceRange(e.doc.lineSeparator(),t[o].anchor,t[o].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Ii(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vo(e,t){var o=gt(e.doc,t),r=ln(o);return r!=o&&(t=kt(r)),ro(!0,e,r,t,1)}function Pl(e,t){var o=gt(e.doc,t),r=ti(o);return r!=o&&(t=kt(r)),ro(!0,e,o,t,-1)}function Yo(e,t){var o=Vo(e,t.line),r=gt(e.doc,o.line),E=yt(r,e.doc.direction);if(!E||E[0].level==0){var H=Math.max(o.ch,r.text.search(/\S/)),Q=t.line==o.line&&t.ch<=H&&t.ch;return ot(o.line,Q?0:H,o.sticky)}return o}function Bs(e,t,o){if(typeof t=="string"&&(t=ss[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,E=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),o&&(e.display.shift=!1),E=t(e)!=Pe}finally{e.display.shift=r,e.state.suppressEdits=!1}return E}function Nl(e,t,o){for(var r=0;r<e.state.keyMaps.length;r++){var E=Ta(t,e.state.keyMaps[r],o,e);if(E)return E}return e.options.extraKeys&&Ta(t,e.options.extraKeys,o,e)||Ta(t,e.options.keyMap,o,e)}var Ul=new ne;function os(e,t,o,r){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,o,r))return!0}return Xo(e,t,o,r)}function Xo(e,t,o,r){var E=Nl(e,t,r);return E=="multi"&&(e.state.keySeq=t),E=="handled"&&gn(e,"keyHandled",e,t,o),(E=="handled"||E=="multi")&&(ie(o),ui(e)),!!E}function Qo(e,t){var o=zo(t,!0);return o?t.shiftKey&&!e.state.keySeq?os(e,"Shift-"+o,t,function(r){return Bs(e,r,!0)})||os(e,o,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return Bs(e,r)}):os(e,o,t,function(r){return Bs(e,r)}):!1}function Bl(e,t,o){return os(e,"'"+o+"'",t,function(r){return Bs(e,r,!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(),$(t,e))return;G&&j<11&&e.keyCode==27&&(e.returnValue=!1);var o=e.keyCode;t.display.shift=o==16||e.shiftKey;var r=Qo(t,e);f&&(io=r?o:null,!r&&o==88&&!He&&(a?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),N&&!a&&!r&&o==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),o==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;k(t,"CodeMirror-crosshair");function o(r){(r.keyCode==18||!r.altKey)&&(_(t,"CodeMirror-crosshair"),tt(document,"keyup",o),tt(document,"mouseover",o))}Re(document,"keyup",o),Re(document,"mouseover",o)}function Zo(e){e.keyCode==16&&(this.doc.sel.shift=!1),$(this,e)}function qo(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Pr(t.display,e)||$(t,e)||e.ctrlKey&&!e.altKey||a&&e.metaKey)return;var o=e.keyCode,r=e.charCode;if(f&&o==io){io=null,ie(e);return}if(f&&(!e.which||e.which<10)&&Qo(t,e))return;var E=String.fromCharCode(r==null?o:r);if(E=="\b")return;if(Bl(t,e,E))return;t.display.input.onKeyPress(e)}var jl=400,ao=function(e,t,o){this.time=e,this.pos=t,this.button=o};ao.prototype.compare=function(e,t,o){return this.time+jl>e&&Pt(t,this.pos)==0&&o==this.button};var ls,us;function Wl(e,t){var o=+new Date;return us&&us.compare(o,e,t)?(ls=us=null,"triple"):ls&&ls.compare(o,e,t)?(us=new ao(o,e,t),ls=null,"double"):(ls=new ao(o,e,t),us=null,"single")}function $o(e){var t=this,o=t.display;if($(t,e)||o.activeTouch&&o.input.supportsTouch())return;if(o.input.ensurePolled(),o.shift=e.shiftKey,Pr(o,e)){n||(o.scroller.draggable=!1,setTimeout(function(){return o.scroller.draggable=!0},100));return}if(so(t,e))return;var r=_i(t,e),E=Le(e),H=r?Wl(r,E):"single";if(window.focus(),E==1&&t.state.selectingText&&t.state.selectingText(e),r&&Hl(t,E,r,H,e))return;E==1?r?Gl(t,r,H,e):_e(e)==o.scroller&&ie(e):E==2?(r&&Ls(t.doc,r),setTimeout(function(){return o.input.focus()},20)):E==3&&(M?t.display.input.onContextMenu(e):Wa(t))}function Hl(e,t,o,r,E){var H="Click";return r=="double"?H="Double"+H:r=="triple"&&(H="Triple"+H),H=(t==1?"Left":t==2?"Middle":"Right")+H,os(e,Go(H,E),E,function(Q){if(typeof Q=="string"&&(Q=ss[Q]),!Q)return!1;var ee=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),ee=Q(e,o)!=Pe}finally{e.state.suppressEdits=!1}return ee})}function Kl(e,t,o){var r=e.getOption("configureMouse"),E=r?r(e,t,o):{};if(E.unit==null){var H=i?o.shiftKey&&o.metaKey:o.altKey;E.unit=H?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(E.extend==null||e.doc.extend)&&(E.extend=e.doc.extend||o.shiftKey),E.addNew==null&&(E.addNew=a?o.metaKey:o.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(a?o.altKey:o.ctrlKey)),E}function Gl(e,t,o,r){G?setTimeout(F(As,e),0):e.curOp.focus=P();var E=Kl(e,o,r),H=e.doc.sel,Q;e.options.dragDrop&&Ye&&!e.isReadOnly()&&o=="single"&&(Q=H.contains(t))>-1&&(Pt((Q=H.ranges[Q]).from(),t)<0||t.xRel>0)&&(Pt(Q.to(),t)>0||t.xRel<0)?zl(e,r,t,E):Vl(e,r,t,E)}function zl(e,t,o,r){var E=e.display,H=!1,Q=cn(e,function(oe){n&&(E.scroller.draggable=!1),e.state.draggingText=!1,tt(E.wrapper.ownerDocument,"mouseup",Q),tt(E.wrapper.ownerDocument,"mousemove",ee),tt(E.scroller,"dragstart",re),tt(E.scroller,"drop",Q),H||(ie(oe),r.addNew||Ls(e.doc,o,null,null,r.extend),n&&!p||G&&j==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ee=function(oe){H=H||Math.abs(t.clientX-oe.clientX)+Math.abs(t.clientY-oe.clientY)>=10},re=function(){return H=!0};n&&(E.scroller.draggable=!0),e.state.draggingText=Q,Q.copy=!r.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),Re(E.wrapper.ownerDocument,"mouseup",Q),Re(E.wrapper.ownerDocument,"mousemove",ee),Re(E.scroller,"dragstart",re),Re(E.scroller,"drop",Q),Wa(e),setTimeout(function(){return E.input.focus()},20)}function el(e,t,o){if(o=="char")return new fn(t,t);if(o=="word")return e.findWordAt(t);if(o=="line")return new fn(ot(t.line,0),Lt(e.doc,ot(t.line+1,0)));var r=o(e,t);return new fn(r.from,r.to)}function Vl(e,t,o,r){var E=e.display,H=e.doc;ie(t);var Q,ee,re=H.sel,oe=re.ranges;if(r.addNew&&!r.extend?(ee=H.sel.contains(o),ee>-1?Q=oe[ee]:Q=new fn(o,o)):(Q=H.sel.primary(),ee=H.sel.primIndex),r.unit=="rectangle")r.addNew||(Q=new fn(o,o)),o=_i(e,t,!0,!0),ee=-1;else{var Se=el(e,o,r.unit);r.extend?Q=$s(Q,Se.anchor,Se.head,r.extend):Q=Se}r.addNew?ee==-1?(ee=oe.length,cr(H,ar(e,oe.concat([Q]),ee),{scroll:!1,origin:"*mouse"})):oe.length>1&&oe[ee].empty()&&r.unit=="char"&&!r.extend?(cr(H,ar(e,oe.slice(0,ee).concat(oe.slice(ee+1)),0),{scroll:!1,origin:"*mouse"}),re=H.sel):eo(H,ee,Q,Ie):(ee=0,cr(H,new Cn([Q],0),Ie),re=H.sel);var De=o;function Ke(It){if(Pt(De,It)==0)return;if(De=It,r.unit=="rectangle"){for(var jt=[],Zt=e.options.tabSize,Gt=X(gt(H,o.line).text,o.ch,Zt),on=X(gt(H,It.line).text,It.ch,Zt),Ln=Math.min(Gt,on),er=Math.max(Gt,on),Kn=Math.min(o.line,It.line),Mr=Math.min(e.lastLine(),Math.max(o.line,It.line));Kn<=Mr;Kn++){var Tr=gt(H,Kn).text,Jn=ke(Tr,Ln,Zt);Ln==er?jt.push(new fn(ot(Kn,Jn),ot(Kn,Jn))):Tr.length>Jn&&jt.push(new fn(ot(Kn,Jn),ot(Kn,ke(Tr,er,Zt))))}jt.length||jt.push(new fn(o,o)),cr(H,ar(e,re.ranges.slice(0,ee).concat(jt),ee),{origin:"*mouse",scroll:!1}),e.scrollIntoView(It)}else{var wr=Q,sr=el(e,It,r.unit),$n=wr.anchor,Zn;Pt(sr.anchor,$n)>0?(Zn=sr.head,$n=nn(wr.from(),sr.anchor)):(Zn=sr.anchor,$n=Vt(wr.to(),sr.head));var Vn=re.ranges.slice(0);Vn[ee]=Yl(e,new fn(Lt(H,$n),Zn)),cr(H,ar(e,Vn,ee),Ie)}}var We=E.wrapper.getBoundingClientRect(),at=0;function mt(It){var jt=++at,Zt=_i(e,It,!0,r.unit=="rectangle");if(!Zt)return;if(Pt(Zt,De)!=0){e.curOp.focus=P(),Ke(Zt);var Gt=ca(E,H);(Zt.line>=Gt.to||Zt.line<Gt.from)&&setTimeout(cn(e,function(){at==jt&&mt(It)}),150)}else{var on=It.clientY<We.top?-20:It.clientY>We.bottom?20:0;on&&setTimeout(cn(e,function(){if(at!=jt)return;E.scroller.scrollTop+=on,mt(It)}),50)}}function xt(It){e.state.selectingText=!1,at=Infinity,It&&(ie(It),E.input.focus()),tt(E.wrapper.ownerDocument,"mousemove",Rt),tt(E.wrapper.ownerDocument,"mouseup",Ut),H.history.lastSelOrigin=null}var Rt=cn(e,function(It){It.buttons===0||!Le(It)?xt(It):mt(It)}),Ut=cn(e,xt);e.state.selectingText=Ut,Re(E.wrapper.ownerDocument,"mousemove",Rt),Re(E.wrapper.ownerDocument,"mouseup",Ut)}function Yl(e,t){var o=t.anchor,r=t.head,E=gt(e.doc,o.line);if(Pt(o,r)==0&&o.sticky==r.sticky)return t;var H=yt(E);if(!H)return t;var Q=nt(H,o.ch,o.sticky),ee=H[Q];if(ee.from!=o.ch&&ee.to!=o.ch)return t;var re=Q+(ee.from==o.ch==(ee.level!=1)?0:1);if(re==0||re==H.length)return t;var oe;if(r.line!=o.line)oe=(r.line-o.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Se=nt(H,r.ch,r.sticky),De=Se-Q||(r.ch-o.ch)*(ee.level==1?-1:1);Se==re-1||Se==re?oe=De<0:oe=De>0}var Ke=H[re+(oe?-1:0)],We=oe==(Ke.level==1),at=We?Ke.from:Ke.to,mt=We?"after":"before";return o.ch==at&&o.sticky==mt?t:new fn(new ot(o.line,at,mt),r)}function tl(e,t,o,r){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(Ke){return!1}if(E>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ie(t);var Q=e.display,ee=Q.lineDiv.getBoundingClientRect();if(H>ee.bottom||!ae(e,o))return pe(t);H-=ee.top-Q.viewOffset;for(var re=0;re<e.display.gutterSpecs.length;++re){var oe=Q.gutters.childNodes[re];if(oe&&oe.getBoundingClientRect().right>=E){var Se=Wt(e.doc,H),De=e.display.gutterSpecs[re];return le(e,o,e,Se,De.className,t),pe(t)}}}function so(e,t){return tl(e,t,"gutterClick",!0)}function nl(e,t){if(Pr(e.display,t)||Xl(e,t))return;if($(e,t,"contextmenu"))return;M||e.display.input.onContextMenu(t)}function Xl(e,t){return ae(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-"),un(e)}var Sa={toString:function(){return"CodeMirror.Init"}},il={},Fs={};function Ql(e){var t=e.optionHandlers;function o(r,E,H,Q){e.defaults[r]=E,H&&(t[r]=Q?function(ee,re,oe){oe!=Sa&&H(ee,re,oe)}:H)}e.defineOption=o,e.Init=Sa,o("value","",function(r,E){return r.setValue(E)},!0),o("mode",null,function(r,E){r.doc.modeOption=E,Js(r)},!0),o("indentUnit",2,Js,!0),o("indentWithTabs",!1),o("smartIndent",!0),o("tabSize",4,function(r){Za(r),un(r),zn(r)},!0),o("lineSeparator",null,function(r,E){if(r.doc.lineSep=E,!E)return;var H=[],Q=r.doc.first;r.doc.iter(function(re){for(var oe=0;;){var Se=re.text.indexOf(E,oe);if(Se==-1)break;oe=Se+E.length,H.push(ot(Q,Se))}Q++});for(var ee=H.length-1;ee>=0;ee--)_a(r.doc,E,H[ee],ot(H[ee].line,H[ee].ch+E.length))}),o("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,E,H){r.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),H!=Sa&&r.refresh()}),o("specialCharPlaceholder",Tn,function(r){return r.refresh()},!0),o("electricChars",!0),o("inputStyle",l?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),o("spellcheck",!1,function(r,E){return r.getInputField().spellcheck=E},!0),o("autocorrect",!1,function(r,E){return r.getInputField().autocorrect=E},!0),o("autocapitalize",!1,function(r,E){return r.getInputField().autocapitalize=E},!0),o("rtlMoveVisually",!R),o("wholeLineUpdateBefore",!0),o("theme","default",function(r){rl(r),Si(r)},!0),o("keyMap","default",function(r,E,H){var Q=Us(E),ee=H!=Sa&&Us(H);ee&&ee.detach&&ee.detach(r,Q),Q.attach&&Q.attach(r,ee||null)}),o("extraKeys",null),o("configureMouse",null),o("lineWrapping",!1,Zl,!0),o("gutters",[],function(r,E){r.display.gutterSpecs=Zi(E,r.options.lineNumbers),Si(r)},!0),o("fixedGutter",!0,function(r,E){r.display.gutters.style.left=E?Ua(r.display)+"px":"0",r.refresh()},!0),o("coverGutterNextToScrollbar",!1,function(r){return Ze(r)},!0),o("scrollbarStyle","native",function(r){ht(r),Ze(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),o("lineNumbers",!1,function(r,E){r.display.gutterSpecs=Zi(r.options.gutters,E),Si(r)},!0),o("firstLineNumber",1,Si,!0),o("lineNumberFormatter",function(r){return r},Si,!0),o("showCursorWhenSelecting",!1,Ti,!0),o("resetSelectionOnContextMenu",!0),o("lineWiseCopyCut",!0),o("pasteLinesPerSelection",!0),o("selectionsMayTouch",!1),o("readOnly",!1,function(r,E){E=="nocursor"&&(Xr(r),r.display.input.blur()),r.display.input.readOnlyChanged(E)}),o("screenReaderLabel",null,function(r,E){E=E===""?null:E,r.display.input.screenReaderLabelChanged(E)}),o("disableInput",!1,function(r,E){E||r.display.input.reset()},!0),o("dragDrop",!0,Jl),o("allowDropFileTypes",null),o("cursorBlinkRate",530),o("cursorScrollMargin",0),o("cursorHeight",1,Ti,!0),o("singleCursorHeightPerLine",!0,Ti,!0),o("workTime",100),o("workDelay",100),o("flattenSpans",!0,Za,!0),o("addModeClass",!1,Za,!0),o("pollInterval",100),o("undoDepth",200,function(r,E){return r.doc.history.undoDepth=E}),o("historyEventDelay",1250),o("viewportMargin",10,function(r){return r.refresh()},!0),o("maxHighlightLength",1e4,Za,!0),o("moveInputWithCursor",!0,function(r,E){E||r.display.input.resetPosition()}),o("tabindex",null,function(r,E){return r.display.input.getField().tabIndex=E||""}),o("autofocus",null),o("direction","ltr",function(r,E){return r.doc.setDirection(E)},!0),o("phrases",null)}function Jl(e,t,o){var r=o&&o!=Sa;if(!t!=!r){var E=e.display.dragFunctions,H=t?Re:tt;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"),Dr(e)),oa(e),zn(e),un(e),setTimeout(function(){return Ze(e)},100)}function Wn(e,t){var o=this;if(!(this instanceof Wn))return new Wn(e,t);this.options=t=t?A(t):{},A(il,t,!1);var r=t.value;typeof r=="string"?r=new xr(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var E=new Wn.inputStyles[t.inputStyle](this),H=this.display=new Ja(e,r,E,t);H.wrapper.CodeMirror=this,rl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ht(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ne,keySeq:null,specialChars:null},t.autofocus&&!l&&H.input.focus(),G&&j<11&&setTimeout(function(){return o.display.input.reset(!0)},20),ql(this),Rl(),Ft(this),this.curOp.forceUpdate=!0,go(this,r),t.autofocus&&!l||this.hasFocus()?setTimeout(function(){o.hasFocus()&&!o.state.focused&&Ha(o)},20):Xr(this);for(var Q in Fs)Fs.hasOwnProperty(Q)&&Fs[Q](this,t[Q],Sa);pa(this),t.finishInit&&t.finishInit(this);for(var ee=0;ee<oo.length;++ee)oo[ee](this);Tt(this),n&&t.lineWrapping&&getComputedStyle(H.lineDiv).textRendering=="optimizelegibility"&&(H.lineDiv.style.textRendering="auto")}Wn.defaults=il,Wn.optionHandlers=Fs;function ql(e){var t=e.display;Re(t.scroller,"mousedown",cn(e,$o)),G&&j<11?Re(t.scroller,"dblclick",cn(e,function(re){if($(e,re))return;var oe=_i(e,re);if(!oe||so(e,re)||Pr(e.display,re))return;ie(re);var Se=e.findWordAt(oe);Ls(e.doc,Se.anchor,Se.head)})):Re(t.scroller,"dblclick",function(re){return $(e,re)||ie(re)}),Re(t.scroller,"contextmenu",function(re){return nl(e,re)}),Re(t.input.getField(),"contextmenu",function(re){t.scroller.contains(re.target)||nl(e,re)});var o,r={end:0};function E(){t.activeTouch&&(o=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function H(re){if(re.touches.length!=1)return!1;var oe=re.touches[0];return oe.radiusX<=1&&oe.radiusY<=1}function Q(re,oe){if(oe.left==null)return!0;var Se=oe.left-re.left,De=oe.top-re.top;return Se*Se+De*De>20*20}Re(t.scroller,"touchstart",function(re){if(!$(e,re)&&!H(re)&&!so(e,re)){t.input.ensurePolled(),clearTimeout(o);var oe=+new Date;t.activeTouch={start:oe,moved:!1,prev:oe-r.end<=300?r:null},re.touches.length==1&&(t.activeTouch.left=re.touches[0].pageX,t.activeTouch.top=re.touches[0].pageY)}}),Re(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Re(t.scroller,"touchend",function(re){var oe=t.activeTouch;if(oe&&!Pr(t,re)&&oe.left!=null&&!oe.moved&&new Date-oe.start<300){var Se=e.coordsChar(t.activeTouch,"page"),De;!oe.prev||Q(oe,oe.prev)?De=new fn(Se,Se):!oe.prev.prev||Q(oe,oe.prev.prev)?De=e.findWordAt(Se):De=new fn(ot(Se.line,0),Lt(e.doc,ot(Se.line+1,0))),e.setSelection(De.anchor,De.head),e.focus(),ie(re)}E()}),Re(t.scroller,"touchcancel",E),Re(t.scroller,"scroll",function(){t.scroller.clientHeight&&(zi(e,t.scroller.scrollTop),wi(e,t.scroller.scrollLeft,!0),le(e,"scroll",e))}),Re(t.scroller,"mousewheel",function(re){return ir(e,re)}),Re(t.scroller,"DOMMouseScroll",function(re){return ir(e,re)}),Re(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(re){$(e,re)||be(re)},over:function(re){$(e,re)||(Ol(e,re),be(re))},start:function(re){return Cl(e,re)},drop:cn(e,Al),leave:function(re){$(e,re)||jo(e)}};var ee=t.input.getField();Re(ee,"keyup",function(re){return Zo.call(e,re)}),Re(ee,"keydown",cn(e,Jo)),Re(ee,"keypress",cn(e,qo)),Re(ee,"focus",function(re){return Ha(e,re)}),Re(ee,"blur",function(re){return Xr(e,re)})}var oo=[];Wn.defineInitHook=function(e){return oo.push(e)};function cs(e,t,o,r){var E=e.doc,H;o==null&&(o="add"),o=="smart"&&(E.mode.indent?H=Dn(e,t).state:o="prev");var Q=e.options.tabSize,ee=gt(E,t),re=X(ee.text,null,Q);ee.stateAfter&&(ee.stateAfter=null);var oe=ee.text.match(/^\s*/)[0],Se;if(!r&&!/\S/.test(ee.text))Se=0,o="not";else if(o=="smart"&&(Se=E.mode.indent(H,ee.text.slice(oe.length),ee.text),Se==Pe||Se>150)){if(!r)return;o="prev"}o=="prev"?t>E.first?Se=X(gt(E,t-1).text,null,Q):Se=0:o=="add"?Se=re+e.options.indentUnit:o=="subtract"?Se=re-e.options.indentUnit:typeof o=="number"&&(Se=re+o),Se=Math.max(0,Se);var De="",Ke=0;if(e.options.indentWithTabs)for(var We=Math.floor(Se/Q);We;--We)Ke+=Q,De+=" ";if(Ke<Se&&(De+=J(Se-Ke)),De!=oe)return _a(E,De,ot(t,0),ot(t,oe.length),"+input"),ee.stateAfter=null,!0;for(var at=0;at<E.sel.ranges.length;at++){var mt=E.sel.ranges[at];if(mt.head.line==t&&mt.head.ch<oe.length){var xt=ot(t,oe.length);eo(E,at,new fn(xt,xt));break}}}var Zr=null;function js(e){Zr=e}function lo(e,t,o,r,E){var H=e.doc;e.display.shift=!1,r||(r=H.sel);var Q=+new Date-200,ee=E=="paste"||e.state.pasteIncoming>Q,re=ze(t),oe=null;if(ee&&r.ranges.length>1)if(Zr&&Zr.text.join(`
`)==t){if(r.ranges.length%Zr.text.length==0){oe=[];for(var Se=0;Se<Zr.text.length;Se++)oe.push(H.splitLines(Zr.text[Se]))}}else re.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(oe=U(re,function(Rt){return[Rt]}));for(var De=e.curOp.updateInput,Ke=r.ranges.length-1;Ke>=0;Ke--){var We=r.ranges[Ke],at=We.from(),mt=We.to();We.empty()&&(o&&o>0?at=ot(at.line,at.ch-o):e.state.overwrite&&!ee?mt=ot(mt.line,Math.min(gt(H,mt.line).text.length,mt.ch+I(re).length)):ee&&Zr&&Zr.lineWise&&Zr.text.join(`
`)==re.join(`
`)&&(at=mt=ot(at.line,0)));var xt={from:at,to:mt,text:oe?oe[Ke%oe.length]:re,origin:E||(ee?"paste":e.state.cutIncoming>Q?"cut":"+input")};Ea(e.doc,xt),gn(e,"inputRead",e,xt)}t&&!ee&&sl(e,t),Ii(e),e.curOp.updateInput<2&&(e.curOp.updateInput=De),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function al(e,t){var o=e.clipboardData&&e.clipboardData.getData("Text");if(o)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&bn(t,function(){return lo(t,o,0,null,"paste")}),!0}function sl(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var o=e.doc.sel,r=o.ranges.length-1;r>=0;r--){var E=o.ranges[r];if(E.head.ch>100||r&&o.ranges[r-1].head.line==E.head.line)continue;var H=e.getModeAt(E.head),Q=!1;if(H.electricChars){for(var ee=0;ee<H.electricChars.length;ee++)if(t.indexOf(H.electricChars.charAt(ee))>-1){Q=cs(e,E.head.line,"smart");break}}else H.electricInput&&(H.electricInput.test(gt(e.doc,E.head.line).text.slice(0,E.head.ch))&&(Q=cs(e,E.head.line,"smart")));Q&&gn(e,"electricInput",e,E.head.line)}}function ol(e){for(var t=[],o=[],r=0;r<e.doc.sel.ranges.length;r++){var E=e.doc.sel.ranges[r].head.line,H={anchor:ot(E,0),head:ot(E+1,0)};o.push(H),t.push(e.getRange(H.anchor,H.head))}return{text:t,ranges:o}}function ll(e,t,o,r){e.setAttribute("autocorrect",o?"":"off"),e.setAttribute("autocapitalize",r?"":"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,o=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(r,E){var H=this.options,Q=H[r];if(H[r]==E&&r!="mode")return;H[r]=E,t.hasOwnProperty(r)&&cn(this,t[r])(this,E,Q),le(this,"optionChange",this,r)},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,E){this.state.keyMaps[E?"push":"unshift"](Us(r))},removeKeyMap:function(r){for(var E=this.state.keyMaps,H=0;H<E.length;++H)if(E[H]==r||E[H].name==r)return E.splice(H,1),!0},addOverlay:Nn(function(r,E){var H=r.token?r:e.getMode(this.options,r);if(H.startState)throw new Error("Overlays may not be stateful.");K(this.state.overlays,{mode:H,modeSpec:r,opaque:E&&E.opaque,priority:E&&E.priority||0},function(Q){return Q.priority}),this.state.modeGen++,zn(this)}),removeOverlay:Nn(function(r){for(var E=this.state.overlays,H=0;H<E.length;++H){var Q=E[H].modeSpec;if(Q==r||typeof r=="string"&&Q.name==r){E.splice(H,1),this.state.modeGen++,zn(this);return}}}),indentLine:Nn(function(r,E,H){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),dn(this.doc,r)&&cs(this,r,E,H)}),indentSelection:Nn(function(r){for(var E=this.doc.sel.ranges,H=-1,Q=0;Q<E.length;Q++){var ee=E[Q];if(ee.empty())ee.head.line>H&&(cs(this,ee.head.line,r,!0),H=ee.head.line,Q==this.doc.sel.primIndex&&Ii(this));else{var re=ee.from(),oe=ee.to(),Se=Math.max(H,re.line);H=Math.min(this.lastLine(),oe.line-(oe.ch?0:1))+1;for(var De=Se;De<H;++De)cs(this,De,r);var Ke=this.doc.sel.ranges;re.ch==0&&E.length==Ke.length&&Ke[Q].from().ch>0&&eo(this.doc,Q,new fn(re,Ke[Q].to()),xe)}}}),getTokenAt:function(r,E){return br(this,r,E)},getLineTokens:function(r,E){return br(this,ot(r),E,!0)},getTokenTypeAt:function(r){r=Lt(this.doc,r);var E=Mn(this,gt(this.doc,r.line)),H=0,Q=(E.length-1)/2,ee=r.ch,re;if(ee==0)re=E[2];else for(;;){var oe=H+Q>>1;if((oe?E[oe*2-1]:0)>=ee)Q=oe;else if(E[oe*2+1]<ee)H=oe+1;else{re=E[oe*2+2];break}}var Se=re?re.indexOf("overlay "):-1;return Se<0?re:Se==0?null:re.slice(0,Se-1)},getModeAt:function(r){var E=this.doc.mode;return E.innerMode?e.innerMode(E,this.getTokenAt(r).state).mode:E},getHelper:function(r,E){return this.getHelpers(r,E)[0]},getHelpers:function(r,E){var H=[];if(!o.hasOwnProperty(E))return H;var Q=o[E],ee=this.getModeAt(r);if(typeof ee[E]=="string")Q[ee[E]]&&H.push(Q[ee[E]]);else if(ee[E])for(var re=0;re<ee[E].length;re++){var oe=Q[ee[E][re]];oe&&H.push(oe)}else ee.helperType&&Q[ee.helperType]?H.push(Q[ee.helperType]):Q[ee.name]&&H.push(Q[ee.name]);for(var Se=0;Se<Q._global.length;Se++){var De=Q._global[Se];De.pred(ee,this)&&fe(H,De.val)==-1&&H.push(De.val)}return H},getStateAfter:function(r,E){var H=this.doc;return r=rn(H,r==null?H.first+H.size-1:r),Dn(this,r+1,E).state},cursorCoords:function(r,E){var H,Q=this.doc.sel.primary();return r==null?H=Q.head:typeof r=="object"?H=Lt(this.doc,r):H=r?Q.from():Q.to(),Lr(this,H,E||"page")},charCoords:function(r,E){return Ma(this,Lt(this.doc,r),E||"page")},coordsChar:function(r,E){return r=bi(this,r,E||"page"),ka(this,r.left,r.top)},lineAtHeight:function(r,E){return r=bi(this,{top:r,left:0},E||"page").top,Wt(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,E,H){var Q=!1,ee;if(typeof r=="number"){var re=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>re&&(r=re,Q=!0),ee=gt(this.doc,r)}else ee=r;return vn(this,ee,{top:0,left:0},E||"page",H||Q).top+(Q?this.doc.height-fr(ee):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(r,E,H,Q,ee){var re=this.display;r=Lr(this,Lt(this.doc,r));var oe=r.bottom,Se=r.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),re.sizer.appendChild(E),Q=="over")oe=r.top;else if(Q=="above"||Q=="near"){var De=Math.max(re.wrapper.clientHeight,this.doc.height),Ke=Math.max(re.sizer.clientWidth,re.lineSpace.clientWidth);(Q=="above"||r.bottom+E.offsetHeight>De)&&r.top>E.offsetHeight?oe=r.top-E.offsetHeight:r.bottom+E.offsetHeight<=De&&(oe=r.bottom),Se+E.offsetWidth>Ke&&(Se=Ke-E.offsetWidth)}E.style.top=oe+"px",E.style.left=E.style.right="",ee=="right"?(Se=re.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ee=="left"?Se=0:ee=="middle"&&(Se=(re.sizer.clientWidth-E.offsetWidth)/2),E.style.left=Se+"px"),H&&Os(this,{left:Se,top:oe,right:Se+E.offsetWidth,bottom:oe+E.offsetHeight})},triggerOnKeyDown:Nn(Jo),triggerOnKeyPress:Nn(qo),triggerOnKeyUp:Zo,triggerOnMouseDown:Nn($o),execCommand:function(r){if(ss.hasOwnProperty(r))return ss[r].call(null,this)},triggerElectric:Nn(function(r){sl(this,r)}),findPosH:function(r,E,H,Q){var ee=1;E<0&&(ee=-1,E=-E);for(var re=Lt(this.doc,r),oe=0;oe<E&&!(re=uo(this.doc,re,ee,H,Q),re.hitSide);++oe);return re},moveH:Nn(function(r,E){var H=this;this.extendSelectionsBy(function(Q){return H.display.shift||H.doc.extend||Q.empty()?uo(H.doc,Q.head,r,E,H.options.rtlMoveVisually):r<0?Q.from():Q.to()},Me)}),deleteH:Nn(function(r,E){var H=this.doc.sel,Q=this.doc;H.somethingSelected()?Q.replaceSelection("",null,"+delete"):wa(this,function(ee){var re=uo(Q,ee.head,r,E,!1);return r<0?{from:re,to:ee.head}:{from:ee.head,to:re}})}),findPosV:function(r,E,H,Q){var ee=1,re=Q;E<0&&(ee=-1,E=-E);for(var oe=Lt(this.doc,r),Se=0;Se<E;++Se){var De=Lr(this,oe,"div");if(re==null?re=De.left:De.left=re,oe=cl(this,De,ee,H),oe.hitSide)break}return oe},moveV:Nn(function(r,E){var H=this,Q=this.doc,ee=[],re=!this.display.shift&&!Q.extend&&Q.sel.somethingSelected();if(Q.extendSelectionsBy(function(Se){if(re)return r<0?Se.from():Se.to();var De=Lr(H,Se.head,"div");Se.goalColumn!=null&&(De.left=Se.goalColumn),ee.push(De.left);var Ke=cl(H,De,r,E);return E=="page"&&Se==Q.sel.primary()&&Ga(H,Ma(H,Ke,"div").top-De.top),Ke},Me),ee.length)for(var oe=0;oe<Q.sel.ranges.length;oe++)Q.sel.ranges[oe].goalColumn=ee[oe]}),findWordAt:function(r){var E=this.doc,H=gt(E,r.line).text,Q=r.ch,ee=r.ch;if(H){var re=this.getHelper(r,"wordChars");(r.sticky=="before"||ee==H.length)&&Q?--Q:++ee;for(var oe=H.charAt(Q),Se=Ue(oe,re)?function(De){return Ue(De,re)}:/\s/.test(oe)?function(De){return/\s/.test(De)}:function(De){return!/\s/.test(De)&&!Ue(De)};Q>0&&Se(H.charAt(Q-1));)--Q;for(;ee<H.length&&Se(H.charAt(ee));)++ee}return new fn(ot(r.line,Q),ot(r.line,ee))},toggleOverwrite:function(r){if(r!=null&&r==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?k(this.display.cursorDiv,"CodeMirror-overwrite"):_(this.display.cursorDiv,"CodeMirror-overwrite"),le(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==P()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Nn(function(r,E){Gi(this,r,E)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-Nr(this)-this.display.barHeight,width:r.scrollWidth-Nr(this)-this.display.barWidth,clientHeight:ra(this),clientWidth:vi(this)}},scrollIntoView:Nn(function(r,E){r==null?(r={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof r=="number"?r={from:ot(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=E||0,r.from.line!=null?Qs(this,r):Qr(this,r.from,r.to,r.margin)}),setSize:Nn(function(r,E){var H=this,Q=function(re){return typeof re=="number"||/^\d+$/.test(String(re))?re+"px":re};r!=null&&(this.display.wrapper.style.width=Q(r)),E!=null&&(this.display.wrapper.style.height=Q(E)),this.options.lineWrapping&&La(this);var ee=this.display.viewFrom;this.doc.iter(ee,this.display.viewTo,function(re){if(re.widgets){for(var oe=0;oe<re.widgets.length;oe++)if(re.widgets[oe].noHScroll){oi(H,ee,"widget");break}}++ee}),this.curOp.forceUpdate=!0,le(this,"refresh",this)}),operation:function(r){return bn(this,r)},startOperation:function(){return Ft(this)},endOperation:function(){return Tt(this)},refresh:Nn(function(){var r=this.display.cachedTextHeight;zn(this),this.curOp.forceUpdate=!0,un(this),Gi(this,this.doc.scrollLeft,this.doc.scrollTop),Qi(this.display),(r==null||Math.abs(r-Ri(this.display))>.5||this.options.lineWrapping)&&oa(this),le(this,"refresh",this)}),swapDoc:Nn(function(r){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),go(this,r),un(this),this.display.input.reset(),Gi(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,gn(this,"swapDoc",this,E),E}),phrase:function(r){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,r)?E[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},de(e),e.registerHelper=function(r,E,H){o.hasOwnProperty(r)||(o[r]=e[r]={_global:[]}),o[r][E]=H},e.registerGlobalHelper=function(r,E,H,Q){e.registerHelper(r,E,Q),o[r]._global.push({pred:H,val:Q})}}function uo(e,t,o,r,E){var H=t,Q=o,ee=gt(e,t.line),re=E&&e.direction=="rtl"?-o:o;function oe(){var Ut=t.line+re;return Ut<e.first||Ut>=e.first+e.size?!1:(t=new ot(Ut,t.ch,t.sticky),ee=gt(e,Ut))}function Se(Ut){var It;if(r=="codepoint"){var jt=ee.text.charCodeAt(t.ch+(r>0?0:-1));isNaN(jt)?It=null:It=new ot(t.line,Math.max(0,Math.min(ee.text.length,t.ch+o*(jt>=55296&&jt<56320?2:1))),-o)}else E?It=kl(e.cm,ee,t,o):It=no(ee,t,o);if(It==null)if(!Ut&&oe())t=ro(E,e.cm,ee,t.line,re);else return!1;else t=It;return!0}if(r=="char"||r=="codepoint")Se();else if(r=="column")Se(!0);else if(r=="word"||r=="group")for(var De=null,Ke=r=="group",We=e.cm&&e.cm.getHelper(t,"wordChars"),at=!0;!(o<0&&!Se(!at));at=!1){var mt=ee.text.charAt(t.ch)||`
`,xt=Ue(mt,We)?"w":Ke&&mt==`
`?"n":!Ke||/\s/.test(mt)?null:"p";if(Ke&&!at&&!xt&&(xt="s"),De&&De!=xt){o<0&&(o=1,Se(),t.sticky="after");break}if(xt&&(De=xt),o>0&&!Se(!at))break}var Rt=ks(e,t,H,Q,!0);return Ht(H,Rt)&&(Rt.hitSide=!0),Rt}function cl(e,t,o,r){var E=e.doc,H=t.left,Q;if(r=="page"){var ee=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),re=Math.max(ee-.5*Ri(e.display),3);Q=(o>0?t.bottom:t.top)+o*re}else r=="line"&&(Q=o>0?t.bottom+3:t.top-3);for(var oe;!(oe=ka(e,H,Q),!oe.outside);){if(o<0?Q<=0:Q>=E.height){oe.hitSide=!0;break}Q+=o*5}return oe}var Rn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ne,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Rn.prototype.init=function(e){var t=this,o=this,r=o.cm,E=o.div=e.lineDiv;ll(E,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function H(ee){for(var re=ee.target;re;re=re.parentNode){if(re==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(re.className))break}return!1}Re(E,"paste",function(ee){if(!H(ee)||$(r,ee)||al(ee,r))return;j<=11&&setTimeout(cn(r,function(){return t.updateFromDOM()}),20)}),Re(E,"compositionstart",function(ee){t.composing={data:ee.data,done:!1}}),Re(E,"compositionupdate",function(ee){t.composing||(t.composing={data:ee.data,done:!1})}),Re(E,"compositionend",function(ee){t.composing&&(ee.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Re(E,"touchstart",function(){return o.forceCompositionEnd()}),Re(E,"input",function(){t.composing||t.readFromDOMSoon()});function Q(ee){if(!H(ee)||$(r,ee))return;if(r.somethingSelected())js({lineWise:!1,text:r.getSelections()}),ee.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var re=ol(r);js({lineWise:!0,text:re.text}),ee.type=="cut"&&r.operation(function(){r.setSelections(re.ranges,0,xe),r.replaceSelection("",null,"cut")})}else return;if(ee.clipboardData){ee.clipboardData.clearData();var oe=Zr.text.join(`
`);if(ee.clipboardData.setData("Text",oe),ee.clipboardData.getData("Text")==oe){ee.preventDefault();return}}var Se=ul(),De=Se.firstChild;r.display.lineSpace.insertBefore(Se,r.display.lineSpace.firstChild),De.value=Zr.text.join(`
`);var Ke=document.activeElement;S(De),setTimeout(function(){r.display.lineSpace.removeChild(Se),Ke.focus(),Ke==E&&o.showPrimarySelection()},50)}Re(E,"copy",Q),Re(E,"cut",Q)},Rn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Rn.prototype.prepareSelection=function(){var e=Ss(this.cm,!1);return e.focus=document.activeElement==this.div,e},Rn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Rn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Rn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,o=t.doc.sel.primary(),r=o.from(),E=o.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||E.line<t.display.viewFrom){e.removeAllRanges();return}var H=Ws(t,e.anchorNode,e.anchorOffset),Q=Ws(t,e.focusNode,e.focusOffset);if(H&&!H.bad&&Q&&!Q.bad&&Pt(nn(H,Q),r)==0&&Pt(Vt(H,Q),E)==0)return;var ee=t.display.view,re=r.line>=t.display.viewFrom&&dl(t,r)||{node:ee[0].measure.map[2],offset:0},oe=E.line<t.display.viewTo&&dl(t,E);if(!oe){var Se=ee[ee.length-1].measure,De=Se.maps?Se.maps[Se.maps.length-1]:Se.map;oe={node:De[De.length-1],offset:De[De.length-2]-De[De.length-3]}}if(!re||!oe){e.removeAllRanges();return}var Ke=e.rangeCount&&e.getRangeAt(0),We;try{We=x(re.node,re.offset,oe.offset,oe.node)}catch(at){}We&&(!N&&t.state.focused?(e.collapse(re.node,re.offset),We.collapsed||(e.removeAllRanges(),e.addRange(We))):(e.removeAllRanges(),e.addRange(We)),Ke&&e.anchorNode==null?e.addRange(Ke):N&&this.startGracePeriod()),this.rememberSelection()},Rn.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)},Rn.prototype.showMultipleSelections=function(e){g(this.cm.display.cursorDiv,e.cursors),g(this.cm.display.selectionDiv,e.selection)},Rn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Rn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return m(this.div,t)},Rn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Rn.prototype.blur=function(){this.div.blur()},Rn.prototype.getField=function(){return this.div},Rn.prototype.supportsTouch=function(){return!0},Rn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():bn(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)},Rn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Rn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(u&&v&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var o=Ws(t,e.anchorNode,e.anchorOffset),r=Ws(t,e.focusNode,e.focusOffset);o&&r&&bn(t,function(){cr(t.doc,vr(o,r),xe),(o.bad||r.bad)&&(t.curOp.selectionChanged=!0)})},Rn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,o=e.doc.sel.primary(),r=o.from(),E=o.to();if(r.ch==0&&r.line>e.firstLine()&&(r=ot(r.line-1,gt(e.doc,r.line-1).length)),E.ch==gt(e.doc,E.line).text.length&&E.line<e.lastLine()&&(E=ot(E.line+1,0)),r.line<t.viewFrom||E.line>t.viewTo-1)return!1;var H,Q,ee;r.line==t.viewFrom||(H=xi(e,r.line))==0?(Q=kt(t.view[0].line),ee=t.view[0].node):(Q=kt(t.view[H].line),ee=t.view[H-1].node.nextSibling);var re=xi(e,E.line),oe,Se;if(re==t.view.length-1?(oe=t.viewTo-1,Se=t.lineDiv.lastChild):(oe=kt(t.view[re+1].line)-1,Se=t.view[re+1].node.previousSibling),!ee)return!1;for(var De=e.doc.splitLines(tu(e,ee,Se,Q,oe)),Ke=Ct(e.doc,ot(Q,0),ot(oe,gt(e.doc,oe).text.length));De.length>1&&Ke.length>1;)if(I(De)==I(Ke))De.pop(),Ke.pop(),oe--;else if(De[0]==Ke[0])De.shift(),Ke.shift(),Q++;else break;for(var We=0,at=0,mt=De[0],xt=Ke[0],Rt=Math.min(mt.length,xt.length);We<Rt&&mt.charCodeAt(We)==xt.charCodeAt(We);)++We;for(var Ut=I(De),It=I(Ke),jt=Math.min(Ut.length-(De.length==1?We:0),It.length-(Ke.length==1?We:0));at<jt&&Ut.charCodeAt(Ut.length-at-1)==It.charCodeAt(It.length-at-1);)++at;if(De.length==1&&Ke.length==1&&Q==r.line)for(;We&&We>r.ch&&Ut.charCodeAt(Ut.length-at-1)==It.charCodeAt(It.length-at-1);)We--,at++;De[De.length-1]=Ut.slice(0,Ut.length-at).replace(/^\u200b+/,""),De[0]=De[0].slice(We).replace(/\u200b+$/,"");var Zt=ot(Q,We),Gt=ot(oe,Ke.length?I(Ke).length-at:0);if(De.length>1||De[0]||Pt(Zt,Gt))return _a(e.doc,De,Zt,Gt,"+input"),!0},Rn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Rn.prototype.reset=function(){this.forceCompositionEnd()},Rn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Rn.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)},Rn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&bn(this.cm,function(){return zn(e.cm)})},Rn.prototype.setUneditable=function(e){e.contentEditable="false"},Rn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||cn(this.cm,lo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Rn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Rn.prototype.onContextMenu=function(){},Rn.prototype.resetPosition=function(){},Rn.prototype.needsContentAttribute=!0;function dl(e,t){var o=gr(e,t.line);if(!o||o.hidden)return null;var r=gt(e.doc,t.line),E=Ia(o,r,t.line),H=yt(r,e.doc.direction),Q="left";if(H){var ee=nt(H,t.ch);Q=ee%2?"right":"left"}var re=Oi(E.map,t.ch,Q);return re.offset=re.collapse=="right"?re.end:re.start,re}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,o,r,E){var H="",Q=!1,ee=e.doc.lineSeparator(),re=!1;function oe(We){return function(at){return at.id==We}}function Se(){Q&&(H+=ee,re&&(H+=ee),Q=re=!1)}function De(We){We&&(Se(),H+=We)}function Ke(We){if(We.nodeType==1){var at=We.getAttribute("cm-text");if(at){De(at);return}var mt=We.getAttribute("cm-marker"),xt;if(mt){var Rt=e.findMarks(ot(r,0),ot(E+1,0),oe(+mt));Rt.length&&(xt=Rt[0].find(0))&&De(Ct(e.doc,xt.from,xt.to).join(ee));return}if(We.getAttribute("contenteditable")=="false")return;var Ut=/^(pre|div|p|li|table|br)$/i.test(We.nodeName);if(!/^br$/i.test(We.nodeName)&&We.textContent.length==0)return;Ut&&Se();for(var It=0;It<We.childNodes.length;It++)Ke(We.childNodes[It]);/^(pre|p)$/i.test(We.nodeName)&&(re=!0),Ut&&(Q=!0)}else We.nodeType==3&&De(We.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Ke(t),t==o);)t=t.nextSibling,re=!1;return H}function Ws(e,t,o){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[o],!r)return Aa(e.clipPos(ot(e.display.viewTo-1)),!0);t=null,o=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var E=0;E<e.display.view.length;E++){var H=e.display.view[E];if(H.node==r)return nu(H,t,o)}}function nu(e,t,o){var r=e.text.firstChild,E=!1;if(!t||!m(r,t))return Aa(ot(kt(e.line),0),!0);if(t==r&&(E=!0,t=r.childNodes[o],o=0,!t)){var H=e.rest?I(e.rest):e.line;return Aa(ot(kt(H),H.text.length),E)}var Q=t.nodeType==3?t:null,ee=t;for(!Q&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(Q=t.firstChild,o&&(o=Q.nodeValue.length));ee.parentNode!=r;)ee=ee.parentNode;var re=e.measure,oe=re.maps;function Se(xt,Rt,Ut){for(var It=-1;It<(oe?oe.length:0);It++)for(var jt=It<0?re.map:oe[It],Zt=0;Zt<jt.length;Zt+=3){var Gt=jt[Zt+2];if(Gt==xt||Gt==Rt){var on=kt(It<0?e.line:e.rest[It]),Ln=jt[Zt]+Ut;return(Ut<0||Gt!=xt)&&(Ln=jt[Zt+(Ut?1:0)]),ot(on,Ln)}}}var De=Se(Q,ee,o);if(De)return Aa(De,E);for(var Ke=ee.nextSibling,We=Q?Q.nodeValue.length-o:0;Ke;Ke=Ke.nextSibling){if(De=Se(Ke,Ke.firstChild,0),De)return Aa(ot(De.line,De.ch-We),E);We+=Ke.textContent.length}for(var at=ee.previousSibling,mt=o;at;at=at.previousSibling){if(De=Se(at,at.firstChild,-1),De)return Aa(ot(De.line,De.ch+mt),E);mt+=at.textContent.length}}var Xn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ne,this.hasSelection=!1,this.composing=null};Xn.prototype.init=function(e){var t=this,o=this,r=this.cm;this.createField(e);var E=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),d&&(E.style.width="0px"),Re(E,"input",function(){G&&j>=9&&t.hasSelection&&(t.hasSelection=null),o.poll()}),Re(E,"paste",function(Q){if($(r,Q)||al(Q,r))return;r.state.pasteIncoming=+new Date,o.fastPoll()});function H(Q){if($(r,Q))return;if(r.somethingSelected())js({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var ee=ol(r);js({lineWise:!0,text:ee.text}),Q.type=="cut"?r.setSelections(ee.ranges,null,xe):(o.prevInput="",E.value=ee.text.join(`
`),S(E))}else return;Q.type=="cut"&&(r.state.cutIncoming=+new Date)}Re(E,"cut",H),Re(E,"copy",H),Re(e.scroller,"paste",function(Q){if(Pr(e,Q)||$(r,Q))return;if(!E.dispatchEvent){r.state.pasteIncoming=+new Date,o.focus();return}var ee=new Event("paste");ee.clipboardData=Q.clipboardData,E.dispatchEvent(ee)}),Re(e.lineSpace,"selectstart",function(Q){Pr(e,Q)||ie(Q)}),Re(E,"compositionstart",function(){var Q=r.getCursor("from");o.composing&&o.composing.range.clear(),o.composing={start:Q,range:r.markText(Q,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Re(E,"compositionend",function(){o.composing&&(o.poll(),o.composing.range.clear(),o.composing=null)})},Xn.prototype.createField=function(e){this.wrapper=ul(),this.textarea=this.wrapper.firstChild},Xn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Xn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,o=e.doc,r=Ss(e);if(e.options.moveInputWithCursor){var E=Lr(e,o.sel.primary().head,"div"),H=t.wrapper.getBoundingClientRect(),Q=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,E.top+Q.top-H.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,E.left+Q.left-H.left))}return r},Xn.prototype.showSelection=function(e){var t=this.cm,o=t.display;g(o.cursorDiv,e.cursors),g(o.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Xn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var o=t.getSelection();this.textarea.value=o,t.state.focused&&S(this.textarea),G&&j>=9&&(this.hasSelection=o)}else e||(this.prevInput=this.textarea.value="",G&&j>=9&&(this.hasSelection=null))},Xn.prototype.getField=function(){return this.textarea},Xn.prototype.supportsTouch=function(){return!1},Xn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!l||P()!=this.textarea))try{this.textarea.focus()}catch(e){}},Xn.prototype.blur=function(){this.textarea.blur()},Xn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xn.prototype.receivedFocus=function(){this.slowPoll()},Xn.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Xn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function o(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,o)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,o)},Xn.prototype.poll=function(){var e=this,t=this.cm,o=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Qe(o)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var E=o.value;if(E==r&&!t.somethingSelected())return!1;if(G&&j>=9&&this.hasSelection===E||a&&/[\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&&!r&&(r="\u200B"),H==8666)return this.reset(),this.cm.execCommand("undo")}for(var Q=0,ee=Math.min(r.length,E.length);Q<ee&&r.charCodeAt(Q)==E.charCodeAt(Q);)++Q;return bn(t,function(){lo(t,E.slice(Q),r.length-Q,null,e.composing?"*compose":null),E.length>1e3||E.indexOf(`
`)>-1?o.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},Xn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xn.prototype.onKeyPress=function(){G&&j>=9&&(this.hasSelection=null),this.fastPoll()},Xn.prototype.onContextMenu=function(e){var t=this,o=t.cm,r=o.display,E=t.textarea;t.contextMenuPending&&t.contextMenuPending();var H=_i(o,e),Q=r.scroller.scrollTop;if(!H||f)return;var ee=o.options.resetSelectionOnContextMenu;ee&&o.doc.sel.contains(H)==-1&&cn(o,cr)(o.doc,vr(H),xe);var re=E.style.cssText,oe=t.wrapper.style.cssText,Se=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Se.top-5)+"px; left: "+(e.clientX-Se.left-5)+`px;
z-index: 1000; background: `+(G?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var De;n&&(De=window.scrollY),r.input.focus(),n&&window.scrollTo(null,De),r.input.reset(),o.somethingSelected()||(E.value=t.prevInput=" "),t.contextMenuPending=We,r.selForContextMenu=o.doc.sel,clearTimeout(r.detectingSelectAll);function Ke(){if(E.selectionStart!=null){var mt=o.somethingSelected(),xt="\u200B"+(mt?E.value:"");E.value="\u21DA",E.value=xt,t.prevInput=mt?"":"\u200B",E.selectionStart=1,E.selectionEnd=xt.length,r.selForContextMenu=o.doc.sel}}function We(){if(t.contextMenuPending!=We)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=oe,E.style.cssText=re,G&&j<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=Q),E.selectionStart!=null){(!G||G&&j<9)&&Ke();var mt=0,xt=function(){r.selForContextMenu==o.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&t.prevInput=="\u200B"?cn(o,Ro)(o):mt++<10?r.detectingSelectAll=setTimeout(xt,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(xt,200)}}if(G&&j>=9&&Ke(),M){be(e);var at=function(){tt(window,"mouseup",at),setTimeout(We,20)};Re(window,"mouseup",at)}else setTimeout(We,50)},Xn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Xn.prototype.setUneditable=function(){},Xn.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?A(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 o=P();t.autofocus=o==e||e.getAttribute("autofocus")!=null&&o==document.body}function r(){e.value=ee.getValue()}var E;if(e.form&&(Re(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var H=e.form;E=H.submit;try{var Q=H.submit=function(){r(),H.submit=E,H.submit(),H.submit=Q}}catch(re){}}t.finishInit=function(re){re.save=r,re.getTextArea=function(){return e},re.toTextArea=function(){re.toTextArea=isNaN,r(),e.parentNode.removeChild(re.getWrapperElement()),e.style.display="",e.form&&(tt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=E))}},e.style.display="none";var ee=Wn(function(re){return e.parentNode.insertBefore(re,e.nextSibling)},t);return ee}function iu(e){e.off=tt,e.on=Re,e.wheelEventPixels=fo,e.Doc=xr,e.splitLines=ze,e.countColumn=X,e.findColumn=ke,e.isWordChar=Ae,e.Pass=Pe,e.signal=le,e.Line=pr,e.changeEnd=Kr,e.scrollbarModel=_t,e.Pos=ot,e.cmpPos=Pt,e.modes=qe,e.mimeModes=Ge,e.resolveMode=je,e.getMode=Ve,e.modeExtensions=$e,e.extendMode=it,e.copyState=ut,e.startState=Dt,e.innerMode=et,e.commands=ss,e.keyMap=Ai,e.keyName=zo,e.isModifierKey=Ko,e.lookupKey=Ta,e.normalizeKeyMap=Ml,e.StringStream=Xt,e.SharedTextMarker=rs,e.TextMarker=ki,e.LineWidget=ns,e.e_preventDefault=ie,e.e_stopPropagation=se,e.e_stop=be,e.addClass=k,e.contains=m,e.rmClass=_,e.keyNames=Pi}Ql(Wn),$l(Wn);var au="iter insert remove copy getEditor constructor".split(" ");for(var Hs in xr.prototype)xr.prototype.hasOwnProperty(Hs)&&fe(au,Hs)<0&&(Wn.prototype[Hs]=function(e){return function(){return e.apply(this.doc,arguments)}}(xr.prototype[Hs]));return de(xr),Wn.inputStyles={textarea:Xn,contenteditable:Rn},Wn.defineMode=function(e){!Wn.defaults.mode&&e!="null"&&(Wn.defaults.mode=e),pt.apply(this,arguments)},Wn.defineMIME=dt,Wn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Wn.defineMIME("text/plain","null"),Wn.defineExtension=function(e,t){Wn.prototype[e]=t},Wn.defineDocExtension=function(e,t){xr.prototype[e]=t},Wn.fromTextArea=ru,iu(Wn),Wn.version="5.58.2",Wn})},W6BS:function(Be,he){Be.exports="data:image/png;base64,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"},WaYH:function(Be,he,B){"use strict";var Z=B("rePB"),z=B("Ff2n"),N=B("VTBJ"),Y=B("1OyB"),W=B("vuIU"),D=B("JX7q"),G=B("Ji7U"),j=B("LK+K"),n=B("q1tI"),T=B("TSYQ"),v=B.n(T),f=B("sboe"),p=B("OZM5"),c=function(M){var L=M.prefixCls,_=M.level,b=M.isStart,g=M.isEnd;if(!_)return null;for(var h="".concat(L,"-indent-unit"),C=[],x=0;x<_;x+=1){var m;C.push(n.createElement("span",{key:x,className:v()(h,(m={},Object(Z.a)(m,"".concat(h,"-start"),b[x+1]),Object(Z.a)(m,"".concat(h,"-end"),g[x+1]),Object(Z.a)(m,"".concat(h,"-end-first-level"),!x&&g[0]),m))}))}return n.createElement("span",{"aria-hidden":"true",className:"".concat(L,"-indent")},C)},s=c,d=B("815F"),u="open",l="close",a="---",i=function(w){Object(G.a)(L,w);var M=Object(j.a)(L);function L(){var _;return Object(Y.a)(this,L),_=M.apply(this,arguments),_.state={dragNodeHighlight:!1},_.onSelectorClick=function(b){var g=_.props.context.onNodeClick;g(b,Object(d.b)(_.props)),_.isSelectable()?_.onSelect(b):_.onCheck(b)},_.onSelectorDoubleClick=function(b){var g=_.props.context.onNodeDoubleClick;g(b,Object(d.b)(_.props))},_.onSelect=function(b){if(_.isDisabled())return;var g=_.props.context.onNodeSelect;b.preventDefault(),g(b,Object(d.b)(_.props))},_.onCheck=function(b){if(_.isDisabled())return;var g=_.props,h=g.disableCheckbox,C=g.checked,x=_.props.context.onNodeCheck;if(!_.isCheckable()||h)return;b.preventDefault();var m=!C;x(b,Object(d.b)(_.props),m)},_.onMouseEnter=function(b){var g=_.props.context.onNodeMouseEnter;g(b,Object(d.b)(_.props))},_.onMouseLeave=function(b){var g=_.props.context.onNodeMouseLeave;g(b,Object(d.b)(_.props))},_.onContextMenu=function(b){var g=_.props.context.onNodeContextMenu;g(b,Object(d.b)(_.props))},_.onDragStart=function(b){var g=_.props.context.onNodeDragStart;b.stopPropagation(),_.setState({dragNodeHighlight:!0}),g(b,Object(D.a)(_));try{b.dataTransfer.setData("text/plain","")}catch(h){}},_.onDragEnter=function(b){var g=_.props.context.onNodeDragEnter;b.preventDefault(),b.stopPropagation(),g(b,Object(D.a)(_))},_.onDragOver=function(b){var g=_.props.context.onNodeDragOver;b.preventDefault(),b.stopPropagation(),g(b,Object(D.a)(_))},_.onDragLeave=function(b){var g=_.props.context.onNodeDragLeave;b.stopPropagation(),g(b,Object(D.a)(_))},_.onDragEnd=function(b){var g=_.props.context.onNodeDragEnd;b.stopPropagation(),_.setState({dragNodeHighlight:!1}),g(b,Object(D.a)(_))},_.onDrop=function(b){var g=_.props.context.onNodeDrop;b.preventDefault(),b.stopPropagation(),_.setState({dragNodeHighlight:!1}),g(b,Object(D.a)(_))},_.onExpand=function(b){var g=_.props.context.onNodeExpand;g(b,Object(d.b)(_.props))},_.setSelectHandle=function(b){_.selectHandle=b},_.getNodeState=function(){var b=_.props.expanded;return _.isLeaf()?null:b?u:l},_.hasChildren=function(){var b=_.props.eventKey,g=_.props.context.keyEntities,h=g[b]||{},C=h.children;return!!(C||[]).length},_.isLeaf=function(){var b=_.props,g=b.isLeaf,h=b.loaded,C=_.props.context.loadData,x=_.hasChildren();return g===!1?!1:g||!C&&!x||C&&h&&!x},_.isDisabled=function(){var b=_.props.disabled,g=_.props.context.disabled;return!!(g||b)},_.isCheckable=function(){var b=_.props.checkable,g=_.props.context.checkable;return!g||b===!1?!1:g},_.syncLoadData=function(b){var g=b.expanded,h=b.loading,C=b.loaded,x=_.props.context,m=x.loadData,P=x.onNodeLoad;if(h)return;m&&g&&!_.isLeaf()&&(!_.hasChildren()&&!C&&P(Object(d.b)(_.props)))},_.renderSwitcher=function(){var b=_.props,g=b.expanded,h=b.switcherIcon,C=_.props.context,x=C.prefixCls,m=C.switcherIcon,P=h||m;if(_.isLeaf())return n.createElement("span",{className:v()("".concat(x,"-switcher"),"".concat(x,"-switcher-noop"))},typeof P=="function"?P(Object(N.a)(Object(N.a)({},_.props),{},{isLeaf:!0})):P);var k=v()("".concat(x,"-switcher"),"".concat(x,"-switcher_").concat(g?u:l));return n.createElement("span",{onClick:_.onExpand,className:k},typeof P=="function"?P(Object(N.a)(Object(N.a)({},_.props),{},{isLeaf:!1})):P)},_.renderCheckbox=function(){var b=_.props,g=b.checked,h=b.halfChecked,C=b.disableCheckbox,x=_.props.context.prefixCls,m=_.isDisabled(),P=_.isCheckable();if(!P)return null;var k=typeof P!="boolean"?P:null;return n.createElement("span",{className:v()("".concat(x,"-checkbox"),g&&"".concat(x,"-checkbox-checked"),!g&&h&&"".concat(x,"-checkbox-indeterminate"),(m||C)&&"".concat(x,"-checkbox-disabled")),onClick:_.onCheck},k)},_.renderIcon=function(){var b=_.props.loading,g=_.props.context.prefixCls;return n.createElement("span",{className:v()("".concat(g,"-iconEle"),"".concat(g,"-icon__").concat(_.getNodeState()||"docu"),b&&"".concat(g,"-icon_loading"))})},_.renderSelector=function(){var b=_.state.dragNodeHighlight,g=_.props,h=g.title,C=g.selected,x=g.icon,m=g.loading,P=g.data,k=_.props.context,y=k.prefixCls,S=k.showIcon,F=k.icon,A=k.draggable,X=k.loadData,ne=k.titleRender,fe=_.isDisabled(),ye="".concat(y,"-node-content-wrapper"),Pe;if(S){var xe=x||F;Pe=xe?n.createElement("span",{className:v()("".concat(y,"-iconEle"),"".concat(y,"-icon__customize"))},typeof xe=="function"?xe(_.props):xe):_.renderIcon()}else X&&m&&(Pe=_.renderIcon());var Ie;typeof h=="function"?Ie=h(P):ne?Ie=ne(P):Ie=h;var Me=n.createElement("span",{className:"".concat(y,"-title")},Ie);return n.createElement("span",{ref:_.setSelectHandle,title:typeof h=="string"?h:"",className:v()("".concat(ye),"".concat(ye,"-").concat(_.getNodeState()||"normal"),!fe&&(C||b)&&"".concat(y,"-node-selected"),!fe&&A&&"draggable"),draggable:!fe&&A||void 0,"aria-grabbed":!fe&&A||void 0,onMouseEnter:_.onMouseEnter,onMouseLeave:_.onMouseLeave,onContextMenu:_.onContextMenu,onClick:_.onSelectorClick,onDoubleClick:_.onSelectorDoubleClick,onDragStart:A?_.onDragStart:void 0},Pe,Me)},_}return Object(W.a)(L,[{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,g=this.props.context.selectable;return typeof b=="boolean"?b:g}},{key:"render",value:function(){var b,g=this.props,h=g.eventKey,C=g.className,x=g.style,m=g.dragOver,P=g.dragOverGapTop,k=g.dragOverGapBottom,y=g.isLeaf,S=g.isStart,F=g.isEnd,A=g.expanded,X=g.selected,ne=g.checked,fe=g.halfChecked,ye=g.loading,Pe=g.domRef,xe=g.active,Ie=g.onMouseMove,Me=Object(z.a)(g,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ke=this.props.context,Ee=ke.prefixCls,J=ke.filterTreeNode,I=ke.draggable,U=ke.keyEntities,K=this.isDisabled(),q=Object(p.f)(Me),V=U[h]||{},ue=V.level,Ae=F[F.length-1];return n.createElement("div",Object.assign({ref:Pe,className:v()(C,"".concat(Ee,"-treenode"),(b={},Object(Z.a)(b,"".concat(Ee,"-treenode-disabled"),K),Object(Z.a)(b,"".concat(Ee,"-treenode-switcher-").concat(A?"open":"close"),!y),Object(Z.a)(b,"".concat(Ee,"-treenode-checkbox-checked"),ne),Object(Z.a)(b,"".concat(Ee,"-treenode-checkbox-indeterminate"),fe),Object(Z.a)(b,"".concat(Ee,"-treenode-selected"),X),Object(Z.a)(b,"".concat(Ee,"-treenode-loading"),ye),Object(Z.a)(b,"".concat(Ee,"-treenode-active"),xe),Object(Z.a)(b,"".concat(Ee,"-treenode-leaf-last"),Ae),Object(Z.a)(b,"drag-over",!K&&m),Object(Z.a)(b,"drag-over-gap-top",!K&&P),Object(Z.a)(b,"drag-over-gap-bottom",!K&&k),Object(Z.a)(b,"filter-node",J&&J(Object(d.b)(this.props))),b)),style:x,onDragEnter:I?this.onDragEnter:void 0,onDragOver:I?this.onDragOver:void 0,onDragLeave:I?this.onDragLeave:void 0,onDrop:I?this.onDrop:void 0,onDragEnd:I?this.onDragEnd:void 0,onMouseMove:Ie},q),n.createElement(s,{prefixCls:Ee,level:ue,isStart:S,isEnd:F}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),L}(n.Component),R=function(M){return n.createElement(f.a.Consumer,null,function(L){return n.createElement(i,Object.assign({},M,{context:L}))})};R.displayName="TreeNode",R.defaultProps={title:a},R.isTreeNode=1;var O=he.a=R},Xsq0:function(Be,he,B){Be.exports=B.p+"static/mainbanner.0a951716.jpg"},Y1PL:function(Be,he,B){"use strict";B.r(he),B.d(he,"ResizableTextArea",function(){return fe});var Z=B("wx14"),z=B("1OyB"),N=B("vuIU"),Y=B("Ji7U"),W=B("LK+K"),D=B("q1tI"),G=B("VTBJ"),j=B("rePB"),n=B("Zm9Q"),T=B("Kwbf"),v=B("c+Xe"),f=B("m+aA"),p=B("bdgK"),c=new Map;function s(xe){xe.forEach(function(Ie){var Me,ke=Ie.target;(Me=c.get(ke))===null||Me===void 0||Me.forEach(function(Ee){return Ee(ke)})})}var d=new p.default(s),u=null,l=null;function a(xe,Ie){c.has(xe)||(c.set(xe,new Set),d.observe(xe)),c.get(xe).add(Ie)}function i(xe,Ie){c.has(xe)&&(c.get(xe).delete(Ie),c.get(xe).size||(d.unobserve(xe),c.delete(xe)))}var R=function(xe){Object(Y.a)(Me,xe);var Ie=Object(W.a)(Me);function Me(){return Object(z.a)(this,Me),Ie.apply(this,arguments)}return Object(N.a)(Me,[{key:"render",value:function(){return this.props.children}}]),Me}(D.Component),O=D.createContext(null);function w(xe){var Ie=xe.children,Me=xe.onBatchResize,ke=D.useRef(0),Ee=D.useRef([]),J=D.useContext(O),I=D.useCallback(function(U,K,q){ke.current+=1;var V=ke.current;Ee.current.push({size:U,element:K,data:q}),Promise.resolve().then(function(){V===ke.current&&(Me==null||Me(Ee.current),Ee.current=[])}),J==null||J(U,K,q)},[Me,J]);return D.createElement(O.Provider,{value:I},Ie)}function M(xe){var Ie=xe.children,Me=xe.disabled,ke=D.useRef(null),Ee=D.useRef(null),J=D.useContext(O),I=D.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),U=D.isValidElement(Ie)&&Object(v.c)(Ie),K=U?Ie.ref:null,q=D.useMemo(function(){return Object(v.a)(K,ke)},[K,ke]),V=D.useRef(xe);V.current=xe;var ue=D.useCallback(function(Ae){var Ue=V.current,ce=Ue.onResize,ge=Ue.data,Te=Ae.getBoundingClientRect(),Oe=Te.width,Xe=Te.height,rt=Ae.offsetWidth,st=Ae.offsetHeight,nt=Math.floor(Oe),bt=Math.floor(Xe);if(I.current.width!==nt||I.current.height!==bt||I.current.offsetWidth!==rt||I.current.offsetHeight!==st){var yt={width:nt,height:bt,offsetWidth:rt,offsetHeight:st};I.current=yt;var Ne=rt===Math.round(Oe)?Oe:rt,Re=st===Math.round(Xe)?Xe:st,Je=Object(G.a)(Object(G.a)({},yt),{},{offsetWidth:Ne,offsetHeight:Re});J==null||J(Je,Ae,ge),ce&&Promise.resolve().then(function(){ce(Je,Ae)})}},[]);return D.useEffect(function(){var Ae=Object(f.a)(ke.current)||Object(f.a)(Ee.current);return Ae&&!Me&&a(Ae,ue),function(){return i(Ae,ue)}},[ke.current,Me]),D.createElement(R,{ref:Ee},U?D.cloneElement(Ie,{ref:q}):Ie)}var L="rc-observer-key";function _(xe){var Ie=xe.children,Me=Object(n.a)(Ie);return Me.map(function(ke,Ee){var J=(ke==null?void 0:ke.key)||"".concat(L,"-").concat(Ee);return D.createElement(M,Object(Z.a)({},xe,{key:J}),ke)})}_.Collection=w;var b=_,g=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
`,m=["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(xe){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Me=xe.getAttribute("id")||xe.getAttribute("data-reactid")||xe.getAttribute("name");if(Ie&&P[Me])return P[Me];var ke=window.getComputedStyle(xe),Ee=ke.getPropertyValue("box-sizing")||ke.getPropertyValue("-moz-box-sizing")||ke.getPropertyValue("-webkit-box-sizing"),J=parseFloat(ke.getPropertyValue("padding-bottom"))+parseFloat(ke.getPropertyValue("padding-top")),I=parseFloat(ke.getPropertyValue("border-bottom-width"))+parseFloat(ke.getPropertyValue("border-top-width")),U=m.map(function(q){return"".concat(q,":").concat(ke.getPropertyValue(q))}).join(";"),K={sizingStyle:U,paddingSize:J,borderSize:I,boxSizing:Ee};return Ie&&Me&&(P[Me]=K),K}function S(xe){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ke=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)),xe.getAttribute("wrap")?k.setAttribute("wrap",xe.getAttribute("wrap")):k.removeAttribute("wrap");var Ee=y(xe,Ie),J=Ee.paddingSize,I=Ee.borderSize,U=Ee.boxSizing,K=Ee.sizingStyle;k.setAttribute("style","".concat(K,";").concat(x)),k.value=xe.value||xe.placeholder||"";var q=Number.MIN_SAFE_INTEGER,V=Number.MAX_SAFE_INTEGER,ue=k.scrollHeight,Ae;if(U==="border-box"?ue+=I:U==="content-box"&&(ue-=J),Me!==null||ke!==null){k.value=" ";var Ue=k.scrollHeight-J;Me!==null&&(q=Ue*Me,U==="border-box"&&(q=q+J+I),ue=Math.max(q,ue)),ke!==null&&(V=Ue*ke,U==="border-box"&&(V=V+J+I),Ae=ue>V?"":"hidden",ue=Math.min(V,ue))}return{height:ue,minHeight:q,maxHeight:V,overflowY:Ae,resize:"none"}}var F=B("Gytx"),A=B.n(F),X;(function(xe){xe[xe.NONE=0]="NONE",xe[xe.RESIZING=1]="RESIZING",xe[xe.RESIZED=2]="RESIZED"})(X||(X={}));var ne=function(xe){Object(Y.a)(Me,xe);var Ie=Object(W.a)(Me);function Me(ke){var Ee;return Object(z.a)(this,Me),Ee=Ie.call(this,ke),Ee.nextFrameActionId=void 0,Ee.resizeFrameId=void 0,Ee.textArea=void 0,Ee.saveTextArea=function(J){Ee.textArea=J},Ee.handleResize=function(J){var I=Ee.state.resizeStatus,U=Ee.props,K=U.autoSize,q=U.onResize;if(I!==X.NONE)return;typeof q=="function"&&q(J),K&&Ee.resizeOnNextFrame()},Ee.resizeOnNextFrame=function(){cancelAnimationFrame(Ee.nextFrameActionId),Ee.nextFrameActionId=requestAnimationFrame(Ee.resizeTextarea)},Ee.resizeTextarea=function(){var J=Ee.props.autoSize;if(!J||!Ee.textArea)return;var I=J.minRows,U=J.maxRows,K=S(Ee.textArea,!1,I,U);Ee.setState({textareaStyles:K,resizeStatus:X.RESIZING},function(){cancelAnimationFrame(Ee.resizeFrameId),Ee.resizeFrameId=requestAnimationFrame(function(){Ee.setState({resizeStatus:X.RESIZED},function(){Ee.resizeFrameId=requestAnimationFrame(function(){Ee.setState({resizeStatus:X.NONE}),Ee.fixFirefoxAutoScroll()})})})})},Ee.renderTextArea=function(){var J=Ee.props,I=J.prefixCls,U=I===void 0?"rc-textarea":I,K=J.autoSize,q=J.onResize,V=J.className,ue=J.disabled,Ae=Ee.state,Ue=Ae.textareaStyles,ce=Ae.resizeStatus,ge=Object(g.a)(Ee.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Te=C()(U,V,Object(j.a)({},"".concat(U,"-disabled"),ue));"value"in ge&&(ge.value=ge.value||"");var Oe=Object(G.a)(Object(G.a)(Object(G.a)({},Ee.props.style),Ue),ce===X.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return D.createElement(b,{onResize:Ee.handleResize,disabled:!(K||q)},D.createElement("textarea",Object(Z.a)({},ge,{className:Te,style:Oe,ref:Ee.saveTextArea})))},Ee.state={textareaStyles:{},resizeStatus:X.NONE},Ee}return Object(N.a)(Me,[{key:"componentDidUpdate",value:function(Ee){(Ee.value!==this.props.value||!A()(Ee.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 Ee=this.textArea.selectionStart,J=this.textArea.selectionEnd;this.textArea.setSelectionRange(Ee,J)}}catch(I){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Me}(D.Component),fe=ne,ye=function(xe){Object(Y.a)(Me,xe);var Ie=Object(W.a)(Me);function Me(ke){var Ee;Object(z.a)(this,Me),Ee=Ie.call(this,ke),Ee.resizableTextArea=void 0,Ee.focus=function(){Ee.resizableTextArea.textArea.focus()},Ee.saveTextArea=function(I){Ee.resizableTextArea=I},Ee.handleChange=function(I){var U=Ee.props.onChange;Ee.setValue(I.target.value,function(){Ee.resizableTextArea.resizeTextarea()}),U&&U(I)},Ee.handleKeyDown=function(I){var U=Ee.props,K=U.onPressEnter,q=U.onKeyDown;I.keyCode===13&&K&&K(I),q&&q(I)};var J=typeof ke.value=="undefined"||ke.value===null?ke.defaultValue:ke.value;return Ee.state={value:J},Ee}return Object(N.a)(Me,[{key:"setValue",value:function(Ee,J){"value"in this.props||this.setState({value:Ee},J)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return D.createElement(fe,Object(Z.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(Ee){return"value"in Ee?{value:Ee.value}:null}}]),Me}(D.Component),Pe=he.default=ye},ZW9T:function(Be,he,B){"use strict";B.d(he,"a",function(){return F});var Z=B("k1fw"),z=B("oBTY"),N=B("miYZ"),Y=B("tsqr"),W=B("rAM+"),D=B("tJVT"),G=B("PpiC"),j=B("q1tI"),n=B.n(j),T=B("bdgK"),v=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"]},s={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(`
`)}]},l=B("5VLF"),a=B.n(l),i={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(X,ne){return ne.map(function(fe){return{label:fe,kind:X.languages.CompletionItemKind.Keyword,insertText:fe}})},O=function(X){return Object.keys(i.tables).map(function(ne){return{label:ne,kind:X.languages.CompletionItemKind.Variable,insertText:ne}})},w=function(X,ne){var fe=i.tables[X];return fe?fe.map(function(ye){return{label:ye,kind:ne.languages.CompletionItemKind.Field,insertText:ye}}):[]};function M(A,X,ne,fe,ye){var Pe=X.getWordUntilPosition(ne),xe={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:Pe.startColumn,endColumn:Pe.endColumn},Ie=fe.map(function(Me){return{label:Me,kind:A.languages.CompletionItemKind.Keyword,insertText:Me,insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xe}});return ye.map(function(Me){Ie.push(Object(Z.a)(Object(Z.a)({},Me),{},{range:xe}))}),Ie}var L=function(A){i.languages.map(function(ye){return A.languages.registerDocumentFormattingEditProvider(ye,{provideDocumentFormattingEdits:function(xe,Ie,Me){return Object(v.a)(p.a.mark(function ke(){var Ee;return p.a.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return Ee=a()(xe.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}),I.abrupt("return",[{range:xe.getFullModelRange(),text:Ee}]);case 2:case"end":return I.stop()}},ke)}))()}}),ye});var X=d.quickKey.map(function(ye){return{label:ye.label,kind:A.languages.CompletionItemKind.Method,insertText:ye.content,insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ne=u.quickKey.map(function(ye){return{label:ye.label,kind:A.languages.CompletionItemKind.Method,insertText:ye.content,insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),fe=s.quickKey.map(function(ye){return{label:ye.label,kind:A.languages.CompletionItemKind.Method,insertText:ye.content,insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet}});A.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Pe,xe){var Ie=Pe.getWordUntilPosition(xe),Me={startLineNumber:xe.lineNumber,endLineNumber:xe.lineNumber,startColumn:Ie.startColumn,endColumn:Ie.endColumn},ke=Pe.getLineContent(xe.lineNumber).substring(Ie.startColumn-2,Ie.endColumn);return{suggestions:[].concat(Object(z.a)(d.keywords.map(function(Ee){return{label:Ee,kind:A.languages.CompletionItemKind.Function,documentation:Ee,insertText:Ee,insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Me}})),Object(z.a)(d.quickKey.map(function(Ee){return{label:Ee.label,kind:A.languages.CompletionItemKind.Function,documentation:Ee.content,insertText:ke.startsWith("#")?Ee.content.replace(/#/,""):Ee.content,insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Me}})))}}}),A.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Pe,xe){var Ie=Pe.getWordUntilPosition(xe),Me={startLineNumber:xe.lineNumber,endLineNumber:xe.lineNumber,startColumn:Ie.startColumn,endColumn:Ie.endColumn};return{suggestions:Object(z.a)(c.keywords.map(function(ke){return{label:ke,kind:A.languages.CompletionItemKind.Function,documentation:ke,insertText:ke,insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Me}}))}}}),A.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Pe,xe){var Ie=Pe.getWordUntilPosition(xe),Me={startLineNumber:xe.lineNumber,endLineNumber:xe.lineNumber,startColumn:Ie.startColumn,endColumn:Ie.endColumn},ke=Pe.getLineContent(xe.lineNumber).substring(Ie.startColumn-2,Ie.endColumn);return{suggestions:[].concat(Object(z.a)(s.keywords.map(function(Ee){return{label:Ee,kind:A.languages.CompletionItemKind.Function,documentation:Ee,insertText:Ee,insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Me}})),Object(z.a)(s.quickKey.map(function(Ee){return{label:Ee.label,kind:A.languages.CompletionItemKind.Function,documentation:Ee.content,insertText:ke.startsWith("#")?Ee.content.replace(/#/,""):Ee.content,insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Me}})))}}}),A.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Pe,xe){var Ie=Pe.getWordUntilPosition(xe),Me={startLineNumber:xe.lineNumber,endLineNumber:xe.lineNumber,startColumn:Ie.startColumn,endColumn:Ie.endColumn},ke=Pe.getLineContent(xe.lineNumber).substring(Ie.startColumn-2,Ie.endColumn);return{suggestions:[].concat(Object(z.a)(u.keywords.map(function(Ee){return{label:Ee,kind:A.languages.CompletionItemKind.Function,documentation:Ee,insertText:Ee,insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Me}})),Object(z.a)(u.quickKey.map(function(Ee){return{label:Ee.label,kind:A.languages.CompletionItemKind.Function,documentation:Ee.content,insertText:ke.startsWith("#")?Ee.content.replace(/#/,""):Ee.content,insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Me}})))}}})},_="\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"),g=B("LvDl"),h=B("+ua5");function C(A){return/^\d+$/.test(A)?"".concat(A,"px"):A}function x(){}var m=!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 A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],X=A;if(Array.isArray(A)){for(var ne=0;ne<A.length;ne++){var fe=P[A[ne]];if(fe)return fe}return X[0]}return P[X]||X}var y=null,S=he.b=function(A){var X=A.width,ne=X===void 0?"100%":X,fe=A.height,ye=fe===void 0?"100%":fe,Pe=A.value,xe=A.language,Ie=xe===void 0?"javascript":xe,Me=A.style,ke=Me===void 0?{}:Me,Ee=A.options,J=Ee===void 0?{}:Ee,I=A.overrideServices,U=I===void 0?{}:I,K=A.theme,q=K===void 0?"vs-dark":K,V=A.onEditBlur,ue=A.onSave,Ae=A.autoHeight,Ue=Ae===void 0?!1:Ae,ce=A.forbidCopy,ge=ce===void 0?!1:ce,Te=A.onChange,Oe=Te===void 0?x:Te,Xe=A.editorDidMount,rt=Xe===void 0?x:Xe,st=A.onFocus,nt=st===void 0?x:st,bt=A.filename,yt=bt===void 0?"educoder.txt":bt,Ne=A.errorLine,Re=A.errorContent,Je=Re===void 0?"":Re,tt=Object(G.a)(A,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),le=Object(j.useRef)(),$=Object(j.useRef)({}),te=Object(j.useRef)(),ae=Object(j.useRef)(),de=Object(j.useRef)(!1),ie=Object(j.useRef)(),se=Object(j.useState)(!1),pe=Object(D.a)(se,2),be=pe[0],_e=pe[1];function Le(){var $e;return le.current&&($e=new T.default(function(it){var ut=Object(W.a)(it),et;try{for(ut.s();!(et=ut.n()).done;){var Dt=et.value;(Dt.target.offsetHeight>0||Dt.target.offsetWidth>0)&&$.current.instance.layout()}}catch(Xt){ut.e(Xt)}finally{ut.f()}}),$e.observe(le.current)),$e}function Ye(){Y.b.warn(decodeURIComponent(_))}var lt=function(){var it=$.current.instance;if(Pe!=null&&it&&be){var ut=it.getModel();ut&&Pe!==ut.getValue()&&(m=!0,ut.setValue(Pe),it.layout(),m=!1)}};Object(j.useEffect)(function(){ae.current&&clearTimeout(ae.current),ae.current=setTimeout(function(){lt()},500)},[Pe,be,$.current]),Object(j.useEffect)(function(){if(Ne&&$.current&&$.current.instance){var $e=$.current.instance;$e.changeViewZones(function(ut){var et=document.createElement("div");et.style.padding="10px 20px",et.style.width="calc(100% - 20px)",et.className="my-error-line-wrp",et.innerHTML=Je,ut.addZone({afterLineNumber:Ne||11,heightInLines:3,domNode:et})});var it={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}};$e.addOverlayWidget(it),$e.revealPositionInCenter({lineNumber:20,column:1})}},[Ne,$.current,be]);function Et(){var $e=$.current.instance;if($e){var it=$e.getSelection(),ut=$.current.pastePos||{},et=new y.Range(ut.startLineNumber||it.endLineNumber,ut.startColumn||it.endColumn,ut.endLineNumber||it.endLineNumber,ut.endColumn||it.endColumn);setTimeout(function(){$e.executeEdits("",[{range:et,text:""}])},300)}}function vt($e){(window.navigator.platform.match("Mac")?$e.metaKey:$e.ctrlKey)&&$e.keyCode==83&&($e.preventDefault(),ue())}var ft=function(){if(Ue&&$.current.instance){var it=$.current.instance.getContentHeight();je(it<ye?ye:it)}else je(ye)};function ze($e){var it=document.createEvent("MouseEvents");it.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),$e.dispatchEvent(it)}function Qe($e,it){var ut=window.URL||window.webkitURL||window,et=new Blob([it]),Dt=document.createElementNS("http://www.w3.org/1999/xhtml","a");Dt.href=ut.createObjectURL(et),Dt.download=$e,ze(Dt)}Object(j.useEffect)(function(){ft()},[ft]),Object(j.useEffect)(function(){le.current&&!be&&Promise.all([B.e(18),B.e(29)]).then(B.t.bind(null,"M/lh",7)).then(function($e){try{y=$e,$.current.instance=y.editor.create(le.current,{value:Pe,language:k(Ie),theme:q,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},U);var it=$.current.instance,ut=b.d._menuItems,et=Object(z.a)(ut).find(function(Mt){return Mt[0]._debugName=="EditorContext"}),Dt=et[1],Xt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],gt=function(St,kt){var Wt=St._first;do{var dn,$t,ot=kt.includes((dn=Wt.element)===null||dn===void 0||(($t=dn.command)===null||$t===void 0)?void 0:$t.id);ot&&St._remove(Wt)}while(Wt=Wt.next)};if(rt(it,y),setTimeout(function(){ft(),$.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Qe(yt||"educoder.txt",it.getValue())}}),it.getDomNode().addEventListener("input",function(){te.current.autoFormat&&it.getAction("editor.action.formatDocument").run()})},500),$.current.subscription=it.onDidChangeModelContent(function(Mt){de.current?clearTimeout(ie.current):(ft(),Oe(it.getValue(),Mt)),ie.current=setTimeout(function(){de.current=!1},500)}),window.Monaco||L(y,k(Ie)),ge&&(gt(Dt,Xt),le.current.classList.add("noCopyPaste"),it.onKeyDown(function(Mt){var St=Mt.keyCode,kt=Mt.ctrlKey,Wt=Mt.metaKey;(St===33||St===52)&&(Wt||kt)&&(Ye(),Mt.preventDefault())})),window.Monaco=y,V&&it.onDidBlurEditorWidget(function(){V(it.getValue())}),nt&&it.onDidFocusEditorText(function(){nt(it.getValue())}),ge){it.addCommand(y.KeyMod.CtrlCmd|y.KeyCode.KEY_V,function(){return Ye(),null}),it.onDidPaste(function(Mt){$.current.pastePos=Mt});try{window.addEventListener("paste",Et)}catch(Mt){}}var Ct=Le();return _e(!0),function(){var Mt=$.current.instance;Mt.dispose();var St=Mt.getModel();St&&St.dispose(),$.current.subscription&&$.current.subscription.dispose(),ge&&window.removeEventListener("paste",Et),Ct.unobserve(le.current)}}catch(Mt){}})},[]),Object(j.useEffect)(function(){var $e=$.current.instance;if($e&&be)return document.addEventListener("keydown",vt,!1),function(){document.removeEventListener("keydown",vt)}},[ue,be]),Object(j.useEffect)(function(){var $e=$.current.instance;if($e&&be){var it=k(Ie);y.editor.setModelLanguage($e.getModel(),it),console.log("language:",Ie,$e.getModel(),it)}},[Ie,be]),Object(j.useEffect)(function(){var $e=$.current.instance;$e&&be&&y.editor.setTheme(q)},[q,be]),Object(j.useEffect)(function(){var $e=$.current.instance;te.current=J,$e&&be&&($e.updateOptions(Object(Z.a)({},J)),setTimeout(function(){$e.getModel().updateOptions(Object(Z.a)({},J))},200))},[JSON.stringify(J),be]),Object(j.useEffect)(function(){var $e=$.current.instance;$e&&be&&$e.layout()},[ne,ye,be]);var He=Object(j.useState)(C(ne)),me=Object(D.a)(He,2),we=me[0],qe=me[1],Ge=Object(j.useState)(C(ye)),pt=Object(D.a)(Ge,2),dt=pt[0],je=pt[1],Ve=Object(Z.a)(Object(Z.a)({},ke),{},{width:we,height:dt});return n.a.createElement("div",{className:"my-monaco-editor",ref:le,style:Ve})};function F(A){var X=A.width,ne=X===void 0?"100%":X,fe=A.height,ye=fe===void 0?"100%":fe,Pe=A.original,xe=A.modified,Ie=A.language,Me=A.options,ke=Me===void 0?{}:Me,Ee=Object(j.useRef)(),J=Object(j.useState)(null),I=Object(D.a)(J,2),U=I[0],K=I[1];function q(Ue){var ce;return Ee.current&&(ce=new T.default(function(ge){var Te=Object(W.a)(ge),Oe;try{for(Te.s();!(Oe=Te.n()).done;){var Xe=Oe.value;(Xe.target.offsetHeight>0||Xe.target.offsetWidth>0)&&Ue.layout()}}catch(rt){Te.e(rt)}finally{Te.f()}}),ce.observe(Ee.current)),ce}Object(j.useEffect)(function(){Ee.current&&Promise.all([B.e(18),B.e(29)]).then(B.t.bind(null,"M/lh",7)).then(function(Ue){y=Ue;var ce=y.editor.createDiffEditor(Ee.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},ke),{},{wordWrap:!0}));K(ce);var ge=q(ce);return function(){ce.dispose();var Te=ce.getModel();Te&&Te.dispose(),ge.unobserve(Ee.current)}})},[]),Object(j.useEffect)(function(){U&&U.setModel({original:y.editor.createModel(Pe,Ie),modified:y.editor.createModel(xe,Ie)})},[Pe,xe,Ie,U]);var V=C(ne),ue=C(ye),Ae={width:V,height:ue};return n.a.createElement("div",{className:"my-diff-editor",ref:Ee,style:Ae})}},Zss7:function(Be,he,B){var Z;(function(z){var N=/^\s+/,Y=/\s+$/,W=0,D=z.round,G=z.min,j=z.max,n=z.random;function T(I,U){if(I=I||"",U=U||{},I instanceof T)return I;if(!(this instanceof T))return new T(I,U);var K=v(I);this._originalInput=I,this._r=K.r,this._g=K.g,this._b=K.b,this._a=K.a,this._roundA=D(100*this._a)/100,this._format=U.format||K.format,this._gradientType=U.gradientType,this._r<1&&(this._r=D(this._r)),this._g<1&&(this._g=D(this._g)),this._b<1&&(this._b=D(this._b)),this._ok=K.ok,this._tc_id=W++}T.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 I=this.toRgb();return(I.r*299+I.g*587+I.b*114)/1e3},getLuminance:function(){var I=this.toRgb(),U,K,q,V,ue,Ae;return U=I.r/255,K=I.g/255,q=I.b/255,U<=.03928?V=U/12.92:V=z.pow((U+.055)/1.055,2.4),K<=.03928?ue=K/12.92:ue=z.pow((K+.055)/1.055,2.4),q<=.03928?Ae=q/12.92:Ae=z.pow((q+.055)/1.055,2.4),.2126*V+.7152*ue+.0722*Ae},setAlpha:function(I){return this._a=S(I),this._roundA=D(100*this._a)/100,this},toHsv:function(){var I=s(this._r,this._g,this._b);return{h:I.h*360,s:I.s,v:I.v,a:this._a}},toHsvString:function(){var I=s(this._r,this._g,this._b),U=D(I.h*360),K=D(I.s*100),q=D(I.v*100);return this._a==1?"hsv("+U+", "+K+"%, "+q+"%)":"hsva("+U+", "+K+"%, "+q+"%, "+this._roundA+")"},toHsl:function(){var I=p(this._r,this._g,this._b);return{h:I.h*360,s:I.s,l:I.l,a:this._a}},toHslString:function(){var I=p(this._r,this._g,this._b),U=D(I.h*360),K=D(I.s*100),q=D(I.l*100);return this._a==1?"hsl("+U+", "+K+"%, "+q+"%)":"hsla("+U+", "+K+"%, "+q+"%, "+this._roundA+")"},toHex:function(I){return u(this._r,this._g,this._b,I)},toHexString:function(I){return"#"+this.toHex(I)},toHex8:function(I){return l(this._r,this._g,this._b,this._a,I)},toHex8String:function(I){return"#"+this.toHex8(I)},toRgb:function(){return{r:D(this._r),g:D(this._g),b:D(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+D(this._r)+", "+D(this._g)+", "+D(this._b)+")":"rgba("+D(this._r)+", "+D(this._g)+", "+D(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:D(F(this._r,255)*100)+"%",g:D(F(this._g,255)*100)+"%",b:D(F(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+D(F(this._r,255)*100)+"%, "+D(F(this._g,255)*100)+"%, "+D(F(this._b,255)*100)+"%)":"rgba("+D(F(this._r,255)*100)+"%, "+D(F(this._g,255)*100)+"%, "+D(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(I){var U="#"+a(this._r,this._g,this._b,this._a),K=U,q=this._gradientType?"GradientType = 1, ":"";if(I){var V=T(I);K="#"+a(V._r,V._g,V._b,V._a)}return"progid:DXImageTransform.Microsoft.gradient("+q+"startColorstr="+U+",endColorstr="+K+")"},toString:function(I){var U=!!I;I=I||this._format;var K=!1,q=this._a<1&&this._a>=0,V=!U&&q&&(I==="hex"||I==="hex6"||I==="hex3"||I==="hex4"||I==="hex8"||I==="name");return V?I==="name"&&this._a===0?this.toName():this.toRgbString():(I==="rgb"&&(K=this.toRgbString()),I==="prgb"&&(K=this.toPercentageRgbString()),(I==="hex"||I==="hex6")&&(K=this.toHexString()),I==="hex3"&&(K=this.toHexString(!0)),I==="hex4"&&(K=this.toHex8String(!0)),I==="hex8"&&(K=this.toHex8String()),I==="name"&&(K=this.toName()),I==="hsl"&&(K=this.toHslString()),I==="hsv"&&(K=this.toHsvString()),K||this.toHexString())},clone:function(){return T(this.toString())},_applyModification:function(I,U){var K=I.apply(null,[this].concat([].slice.call(U)));return this._r=K._r,this._g=K._g,this._b=K._b,this.setAlpha(K._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(L,arguments)},desaturate:function(){return this._applyModification(i,arguments)},saturate:function(){return this._applyModification(R,arguments)},greyscale:function(){return this._applyModification(O,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(I,U){return I.apply(null,[this].concat([].slice.call(U)))},analogous:function(){return this._applyCombination(x,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(m,arguments)},splitcomplement:function(){return this._applyCombination(C,arguments)},triad:function(){return this._applyCombination(g,arguments)},tetrad:function(){return this._applyCombination(h,arguments)}},T.fromRatio=function(I,U){if(typeof I=="object"){var K={};for(var q in I)I.hasOwnProperty(q)&&(q==="a"?K[q]=I[q]:K[q]=Pe(I[q]));I=K}return T(I,U)};function v(I){var U={r:0,g:0,b:0},K=1,q=null,V=null,ue=null,Ae=!1,Ue=!1;return typeof I=="string"&&(I=Ee(I)),typeof I=="object"&&(ke(I.r)&&ke(I.g)&&ke(I.b)?(U=f(I.r,I.g,I.b),Ae=!0,Ue=String(I.r).substr(-1)==="%"?"prgb":"rgb"):ke(I.h)&&ke(I.s)&&ke(I.v)?(q=Pe(I.s),V=Pe(I.v),U=d(I.h,q,V),Ae=!0,Ue="hsv"):ke(I.h)&&ke(I.s)&&ke(I.l)&&(q=Pe(I.s),ue=Pe(I.l),U=c(I.h,q,ue),Ae=!0,Ue="hsl"),I.hasOwnProperty("a")&&(K=I.a)),K=S(K),{ok:Ae,format:I.format||Ue,r:G(255,j(U.r,0)),g:G(255,j(U.g,0)),b:G(255,j(U.b,0)),a:K}}function f(I,U,K){return{r:F(I,255)*255,g:F(U,255)*255,b:F(K,255)*255}}function p(I,U,K){I=F(I,255),U=F(U,255),K=F(K,255);var q=j(I,U,K),V=G(I,U,K),ue,Ae,Ue=(q+V)/2;if(q==V)ue=Ae=0;else{var ce=q-V;Ae=Ue>.5?ce/(2-q-V):ce/(q+V);switch(q){case I:ue=(U-K)/ce+(U<K?6:0);break;case U:ue=(K-I)/ce+2;break;case K:ue=(I-U)/ce+4;break}ue/=6}return{h:ue,s:Ae,l:Ue}}function c(I,U,K){var q,V,ue;I=F(I,360),U=F(U,100),K=F(K,100);function Ae(ge,Te,Oe){return Oe<0&&(Oe+=1),Oe>1&&(Oe-=1),Oe<1/6?ge+(Te-ge)*6*Oe:Oe<1/2?Te:Oe<2/3?ge+(Te-ge)*(2/3-Oe)*6:ge}if(U===0)q=V=ue=K;else{var Ue=K<.5?K*(1+U):K+U-K*U,ce=2*K-Ue;q=Ae(ce,Ue,I+1/3),V=Ae(ce,Ue,I),ue=Ae(ce,Ue,I-1/3)}return{r:q*255,g:V*255,b:ue*255}}function s(I,U,K){I=F(I,255),U=F(U,255),K=F(K,255);var q=j(I,U,K),V=G(I,U,K),ue,Ae,Ue=q,ce=q-V;if(Ae=q===0?0:ce/q,q==V)ue=0;else{switch(q){case I:ue=(U-K)/ce+(U<K?6:0);break;case U:ue=(K-I)/ce+2;break;case K:ue=(I-U)/ce+4;break}ue/=6}return{h:ue,s:Ae,v:Ue}}function d(I,U,K){I=F(I,360)*6,U=F(U,100),K=F(K,100);var q=z.floor(I),V=I-q,ue=K*(1-U),Ae=K*(1-V*U),Ue=K*(1-(1-V)*U),ce=q%6,ge=[K,Ae,ue,ue,Ue,K][ce],Te=[Ue,K,K,Ae,ue,ue][ce],Oe=[ue,ue,Ue,K,K,Ae][ce];return{r:ge*255,g:Te*255,b:Oe*255}}function u(I,U,K,q){var V=[ye(D(I).toString(16)),ye(D(U).toString(16)),ye(D(K).toString(16))];return q&&V[0].charAt(0)==V[0].charAt(1)&&V[1].charAt(0)==V[1].charAt(1)&&V[2].charAt(0)==V[2].charAt(1)?V[0].charAt(0)+V[1].charAt(0)+V[2].charAt(0):V.join("")}function l(I,U,K,q,V){var ue=[ye(D(I).toString(16)),ye(D(U).toString(16)),ye(D(K).toString(16)),ye(xe(q))];return V&&ue[0].charAt(0)==ue[0].charAt(1)&&ue[1].charAt(0)==ue[1].charAt(1)&&ue[2].charAt(0)==ue[2].charAt(1)&&ue[3].charAt(0)==ue[3].charAt(1)?ue[0].charAt(0)+ue[1].charAt(0)+ue[2].charAt(0)+ue[3].charAt(0):ue.join("")}function a(I,U,K,q){var V=[ye(xe(q)),ye(D(I).toString(16)),ye(D(U).toString(16)),ye(D(K).toString(16))];return V.join("")}T.equals=function(I,U){return!I||!U?!1:T(I).toRgbString()==T(U).toRgbString()},T.random=function(){return T.fromRatio({r:n(),g:n(),b:n()})};function i(I,U){U=U===0?0:U||10;var K=T(I).toHsl();return K.s-=U/100,K.s=A(K.s),T(K)}function R(I,U){U=U===0?0:U||10;var K=T(I).toHsl();return K.s+=U/100,K.s=A(K.s),T(K)}function O(I){return T(I).desaturate(100)}function w(I,U){U=U===0?0:U||10;var K=T(I).toHsl();return K.l+=U/100,K.l=A(K.l),T(K)}function M(I,U){U=U===0?0:U||10;var K=T(I).toRgb();return K.r=j(0,G(255,K.r-D(255*-(U/100)))),K.g=j(0,G(255,K.g-D(255*-(U/100)))),K.b=j(0,G(255,K.b-D(255*-(U/100)))),T(K)}function L(I,U){U=U===0?0:U||10;var K=T(I).toHsl();return K.l-=U/100,K.l=A(K.l),T(K)}function _(I,U){var K=T(I).toHsl(),q=(K.h+U)%360;return K.h=q<0?360+q:q,T(K)}function b(I){var U=T(I).toHsl();return U.h=(U.h+180)%360,T(U)}function g(I){var U=T(I).toHsl(),K=U.h;return[T(I),T({h:(K+120)%360,s:U.s,l:U.l}),T({h:(K+240)%360,s:U.s,l:U.l})]}function h(I){var U=T(I).toHsl(),K=U.h;return[T(I),T({h:(K+90)%360,s:U.s,l:U.l}),T({h:(K+180)%360,s:U.s,l:U.l}),T({h:(K+270)%360,s:U.s,l:U.l})]}function C(I){var U=T(I).toHsl(),K=U.h;return[T(I),T({h:(K+72)%360,s:U.s,l:U.l}),T({h:(K+216)%360,s:U.s,l:U.l})]}function x(I,U,K){U=U||6,K=K||30;var q=T(I).toHsl(),V=360/K,ue=[T(I)];for(q.h=(q.h-(V*U>>1)+720)%360;--U;)q.h=(q.h+V)%360,ue.push(T(q));return ue}function m(I,U){U=U||6;for(var K=T(I).toHsv(),q=K.h,V=K.s,ue=K.v,Ae=[],Ue=1/U;U--;)Ae.push(T({h:q,s:V,v:ue})),ue=(ue+Ue)%1;return Ae}T.mix=function(I,U,K){K=K===0?0:K||50;var q=T(I).toRgb(),V=T(U).toRgb(),ue=K/100,Ae={r:(V.r-q.r)*ue+q.r,g:(V.g-q.g)*ue+q.g,b:(V.b-q.b)*ue+q.b,a:(V.a-q.a)*ue+q.a};return T(Ae)},T.readability=function(I,U){var K=T(I),q=T(U);return(z.max(K.getLuminance(),q.getLuminance())+.05)/(z.min(K.getLuminance(),q.getLuminance())+.05)},T.isReadable=function(I,U,K){var q=T.readability(I,U),V,ue;ue=!1,V=J(K);switch(V.level+V.size){case"AAsmall":case"AAAlarge":ue=q>=4.5;break;case"AAlarge":ue=q>=3;break;case"AAAsmall":ue=q>=7;break}return ue},T.mostReadable=function(I,U,K){var q=null,V=0,ue,Ae,Ue,ce;K=K||{},Ae=K.includeFallbackColors,Ue=K.level,ce=K.size;for(var ge=0;ge<U.length;ge++)ue=T.readability(I,U[ge]),ue>V&&(V=ue,q=T(U[ge]));return T.isReadable(I,q,{level:Ue,size:ce})||!Ae?q:(K.includeFallbackColors=!1,T.mostReadable(I,["#fff","#000"],K))};var P=T.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=T.hexNames=y(P);function y(I){var U={};for(var K in I)I.hasOwnProperty(K)&&(U[I[K]]=K);return U}function S(I){return I=parseFloat(I),(isNaN(I)||I<0||I>1)&&(I=1),I}function F(I,U){ne(I)&&(I="100%");var K=fe(I);return I=G(U,j(0,parseFloat(I))),K&&(I=parseInt(I*U,10)/100),z.abs(I-U)<1e-6?1:I%U/parseFloat(U)}function A(I){return G(1,j(0,I))}function X(I){return parseInt(I,16)}function ne(I){return typeof I=="string"&&I.indexOf(".")!=-1&&parseFloat(I)===1}function fe(I){return typeof I=="string"&&I.indexOf("%")!=-1}function ye(I){return I.length==1?"0"+I:""+I}function Pe(I){return I<=1&&(I=I*100+"%"),I}function xe(I){return z.round(parseFloat(I)*255).toString(16)}function Ie(I){return X(I)/255}var Me=function(){var I="[-\\+]?\\d+%?",U="[-\\+]?\\d*\\.\\d+%?",K="(?:"+U+")|(?:"+I+")",q="[\\s|\\(]+("+K+")[,|\\s]+("+K+")[,|\\s]+("+K+")\\s*\\)?",V="[\\s|\\(]+("+K+")[,|\\s]+("+K+")[,|\\s]+("+K+")[,|\\s]+("+K+")\\s*\\)?";return{CSS_UNIT:new RegExp(K),rgb:new RegExp("rgb"+q),rgba:new RegExp("rgba"+V),hsl:new RegExp("hsl"+q),hsla:new RegExp("hsla"+V),hsv:new RegExp("hsv"+q),hsva:new RegExp("hsva"+V),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 ke(I){return!!Me.CSS_UNIT.exec(I)}function Ee(I){I=I.replace(N,"").replace(Y,"").toLowerCase();var U=!1;if(P[I])I=P[I],U=!0;else if(I=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var K;return(K=Me.rgb.exec(I))?{r:K[1],g:K[2],b:K[3]}:(K=Me.rgba.exec(I))?{r:K[1],g:K[2],b:K[3],a:K[4]}:(K=Me.hsl.exec(I))?{h:K[1],s:K[2],l:K[3]}:(K=Me.hsla.exec(I))?{h:K[1],s:K[2],l:K[3],a:K[4]}:(K=Me.hsv.exec(I))?{h:K[1],s:K[2],v:K[3]}:(K=Me.hsva.exec(I))?{h:K[1],s:K[2],v:K[3],a:K[4]}:(K=Me.hex8.exec(I))?{r:X(K[1]),g:X(K[2]),b:X(K[3]),a:Ie(K[4]),format:U?"name":"hex8"}:(K=Me.hex6.exec(I))?{r:X(K[1]),g:X(K[2]),b:X(K[3]),format:U?"name":"hex"}:(K=Me.hex4.exec(I))?{r:X(K[1]+""+K[1]),g:X(K[2]+""+K[2]),b:X(K[3]+""+K[3]),a:Ie(K[4]+""+K[4]),format:U?"name":"hex8"}:(K=Me.hex3.exec(I))?{r:X(K[1]+""+K[1]),g:X(K[2]+""+K[2]),b:X(K[3]+""+K[3]),format:U?"name":"hex"}:!1}function J(I){var U,K;return I=I||{level:"AA",size:"small"},U=(I.level||"AA").toUpperCase(),K=(I.size||"small").toLowerCase(),U!=="AA"&&U!=="AAA"&&(U="AA"),K!=="small"&&K!=="large"&&(K="small"),{level:U,size:K}}Be.exports?Be.exports=T:!(Z=function(){return T}.call(he,B,he,Be),Z!==void 0&&(Be.exports=Z))})(Math)},aRTE:function(Be,he){Be.exports={L:1,M:0,Q:3,H:2}},bPs0:function(Be,he,B){"use strict";B.d(he,"b",function(){return i});var Z=B("k1fw"),z=B("9og8"),N=B("2qtc"),Y=B("kLXV"),W=B("tJVT"),D=B("PpiC"),G=B("aHsQ"),j=B("sGsY"),n=B("WmNS"),T=B.n(n),v=B("q1tI"),f=B.n(v),p=B("bntm"),c=B("V0Rq"),s=B("wd/R"),d=B.n(s),u=B("Ty5D"),l=B("9kvl"),a=j.a.Countdown,i=["fullscreenchange","msfullscreenchange","webkitfullscreenchange","mozfullscreenchange"],R=function(w){var M=w.globalSetting,L=w.loading,_=w.user,b=w.exercise,g=w.socket,h=w.dispatch,C=Object(D.a)(w,["globalSetting","loading","user","exercise","socket","dispatch"]),x=Object(v.useState)({}),m=Object(W.a)(x,2),P=m[0],k=m[1],y=Y.a.useModal(),S=Object(W.a)(y,2),F=S[0],A=S[1],X=Object(v.useRef)(),ne=Object(v.useRef)(null),fe=Object(v.useRef)(null),ye=Object(v.useState)(!0),Pe=Object(W.a)(ye,2),xe=Pe[0],Ie=Pe[1],Me=Object(u.h)().query,ke=Object(u.i)();Object(v.useEffect)(function(){var ce,ge,Te,Oe,Xe;if(clearTimeout(ne.current),document.addEventListener(Object(p.c)(),Ue,!1),window.addEventListener("blur",ue,!1),(ce=b.exerciseUserInfo)!==null&&ce!==void 0&&ce.screen_open&&Object(p.a)()&&(h({type:"globalSetting/headerFooterToggle",payload:!1}),Ie(!1)),(ge=b.exerciseUserInfo)!==null&&ge!==void 0&&ge.screen_at&&d()().diff(d()((Te=b.exerciseUserInfo)===null||Te===void 0?void 0:Te.screen_at),"seconds")>0)Ee();else if((Oe=b.exerciseUserInfo)!==null&&Oe!==void 0&&Oe.screen_open&&!Object(p.a)()){var rt=document.domain==="kepukehuan.educoder.net"?30:b.exerciseUserInfo.screen_sec+10+1;X.current=Y.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(a,{onFinish:function(){var nt;Ee(),(nt=X.current)===null||nt===void 0||nt.destroy()},valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+rt*1e3})),"S\uFF09"),onOk:function(){var nt;(nt=X.current)===null||nt===void 0||nt.destroy(),Ie(!1),Object(p.d)(document.body),document.getElementById("root").addEventListener("click",J,!1)}})}return(Xe=b.exerciseUserInfo)!==null&&Xe!==void 0&&Xe.screen_open&&!Object(p.a)()||document.getElementById("root").addEventListener("click",J,!1),function(){document.getElementById("root").removeEventListener("click",J,!1),document.removeEventListener(Object(p.c)(),Ue,!1),window.removeEventListener("blur",ue,!1),clearTimeout(ne.current)}},[]),Object(v.useEffect)(function(){setTimeout(function(){b.actionTabs.removeEventListenerExitScreen&&(clearTimeout(ne.current),document.getElementById("root").removeEventListener("click",J,!1),document.removeEventListener(Object(p.c)(),Ue,!1))},500),I()},[b.actionTabs]),Object(v.useEffect)(function(){setTimeout(function(){b.exerciseUserInfo.used_screen_num>b.exerciseUserInfo.screen_num?q():!xe},500)},[b.exerciseUserInfo]);var Ee=function(){var ce=Object(z.a)(T.a.mark(function ge(){var Te;return T.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Xe.next=2,Ae();case 2:Te=Xe.sent,setTimeout(function(){var rt,st;(rt=X.current)===null||rt===void 0||rt.destroy(),X.current=Y.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"},Te.used_screen_num),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",f.a.createElement("span",{className:"c-red"},(st=b.exerciseUserInfo)===null||st===void 0?void 0:st.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377"),onOk:function(){var nt=Object(z.a)(T.a.mark(function yt(){return T.a.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:Object(p.d)(document.body);case 1:case"end":return Re.stop()}},yt)}));function bt(){return nt.apply(this,arguments)}return bt}()})},1e3);case 4:case"end":return Xe.stop()}},ge)}));return function(){return ce.apply(this,arguments)}}(),J=function(ge){!Object(p.a)()&&ge.target.nodeName!=="A"&&ge.target.nodeName!=="BUTTON"&&ge.target.innerHTML!=="\u786E \u5B9A"&&(Object(p.d)(document.body),console.log("documentClick.full"))},I=function(){var ce=Object(z.a)(T.a.mark(function ge(){return T.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Oe.abrupt("return",new Promise(function(){var Xe=Object(z.a)(T.a.mark(function rt(st){var nt;return T.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.next=2,h({type:"exercise/getExerciseUserInfo",payload:Object(Z.a)({},ke)});case 2:return nt=yt.sent,st(nt==null?void 0:nt.data),yt.abrupt("return",nt==null?void 0:nt.data);case 5:case"end":return yt.stop()}},rt)}));return function(rt){return Xe.apply(this,arguments)}}()));case 1:case"end":return Oe.stop()}},ge)}));return function(){return ce.apply(this,arguments)}}(),U=function(){var ce=Object(z.a)(T.a.mark(function ge(Te){var Oe,Xe,rt;return T.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:(Oe=X.current)===null||Oe===void 0||((Xe=Oe.destroyAll)===null||Xe===void 0)||Xe.call(Oe),X.current=Y.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(a,{onFinish:Ae,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"},Te),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",f.a.createElement("span",{className:"c-red"},(rt=b.exerciseUserInfo)===null||rt===void 0?void 0:rt.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 bt=Object(z.a)(T.a.mark(function Ne(){return T.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:clearTimeout(fe.current),Object(p.d)(document.body),X.current.destroy();case 3:case"end":return Je.stop()}},Ne)}));function yt(){return bt.apply(this,arguments)}return yt}()}),fe.current=setTimeout(function(){var bt;X.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"},Te+1),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",f.a.createElement("span",{className:"c-red"},(bt=b.exerciseUserInfo)===null||bt===void 0?void 0:bt.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377")})},(b.exerciseUserInfo.screen_sec+1)*1e3);case 3:case"end":return nt.stop()}},ge)}));return function(Te){return ce.apply(this,arguments)}}(),K=function(){location.href="/classrooms/".concat(ke.coursesId,"/exercise/").concat(ke.categoryId,"/detail")},q=function(){var ce=Object(z.a)(T.a.mark(function ge(){var Te,Oe,Xe;return T.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return(Te=X.current)===null||Te===void 0||((Oe=Te.destroyAll)===null||Oe===void 0)||Oe.call(Te),st.next=3,Object(c.ab)({categoryId:ke.categoryId,commit_method:1});case 3:if(Xe=st.sent,Xe){try{g.send(JSON.stringify({type:"toggleLockExit",data:!1})),g.send(JSON.stringify({type:"network-open",data:""}))}catch(nt){}V()}case 5:case"end":return st.stop()}},ge)}));return function(){return ce.apply(this,arguments)}}(),V=function(){var ge,Te;document.removeEventListener(Object(p.c)(),Ue,!1),Object(p.b)(),(ge=X.current)===null||ge===void 0||((Te=ge.destroyAll)===null||Te===void 0)||Te.call(ge);try{g.send(JSON.stringify({type:"toggleLockExit",data:!1})),g.send(JSON.stringify({type:"network-open",data:""}))}catch(Oe){}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(){K()}})},ue=function(ge){Object(p.a)()&&document.getElementById("iframeShixuns").style.display=="none"&&Object(p.b)()},Ae=function(){var ce=Object(z.a)(T.a.mark(function ge(){return T.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Oe.abrupt("return",new Promise(function(){var Xe=Object(z.a)(T.a.mark(function rt(st){var nt,bt,yt;return T.a.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(!((nt=b.exerciseUserInfo)!==null&&nt!==void 0&&nt.screen_at)){Re.next=3;break}return Re.next=3,Object(c.h)(Object(Z.a)(Object(Z.a)({},ke),{},{reset:!0}));case 3:return Re.next=5,Object(c.R)({id:ke.categoryId});case 5:if(bt=Re.sent,!(bt!=null&&bt.is_commit)){Re.next=9;break}return V(),Re.abrupt("return");case 9:return Re.next=11,I();case 11:yt=Re.sent,st(yt);case 13:case"end":return Re.stop()}},rt)}));return function(rt){return Xe.apply(this,arguments)}}()));case 1:case"end":return Oe.stop()}},ge)}));return function(){return ce.apply(this,arguments)}}(),Ue=function(){var ce=Object(z.a)(T.a.mark(function ge(){var Te,Oe,Xe,rt;return T.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:if(Te=!1,console.log("fullscreen change"),!Object(p.a)()){nt.next=7;break}(Oe=b.exerciseUserInfo)!==null&&Oe!==void 0&&Oe.screen_at&&Object(c.h)(Object(Z.a)(Object(Z.a)({},ke),{},{reset:!0})),clearTimeout(ne.current),nt.next=17;break;case 7:return Te=!0,nt.next=10,Object(c.h)(Object(Z.a)({},ke));case 10:return nt.next=12,I();case 12:Xe=nt.sent,U(Xe.used_screen_num),rt=setTimeout(Object(z.a)(T.a.mark(function bt(){return T.a.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:case"end":return Ne.stop()}},bt)})),b.exerciseUserInfo.screen_sec*1e3),window.frames.length!=parent.frames.length&&window.parent.postMessage("backExercise","*"),ne.current=rt;case 17:h({type:"globalSetting/headerFooterToggle",payload:Te});case 18:case"end":return nt.stop()}},ge)}));return function(){return ce.apply(this,arguments)}}();return f.a.createElement("div",null,A)};he.a=Object(l.a)(function(O){var w=O.loading,M=O.user,L=O.exercise,_=O.globalSetting;return{globalSetting:_,user:M,exercise:L,loading:w.effects}})(R)},bT9E:function(Be,he,B){"use strict";B.d(he,"a",function(){return z});var Z=B("VTBJ");function z(N,Y){var W=Object(Z.a)({},N);return Array.isArray(Y)&&Y.forEach(function(D){delete W[D]}),W}},biw7:function(Be,he,B){"use strict";var Z=B("q1tI"),z=B.n(Z),N=Z.createContext(null);he.a=N},c5Ni:function(Be,he,B){},cRFk:function(Be,he,B){Be.exports=B.p+"static/RepositoryNoneData.828085a8.png"},csWT:function(Be,he,B){Be.exports=B.p+"static/choose.4ad1045f.svg"},dQei:function(Be,he){for(var B={glog:function(z){if(z<1)throw new Error("glog("+z+")");return B.LOG_TABLE[z]},gexp:function(z){for(;z<0;)z+=255;for(;z>=256;)z-=255;return B.EXP_TABLE[z]},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;Be.exports=B},dWSS:function(Be,he,B){var Z=B("dQei");function z(N,Y){if(N.length==null)throw new Error(N.length+"/"+Y);for(var W=0;W<N.length&&N[W]==0;)W++;this.num=new Array(N.length-W+Y);for(var D=0;D<N.length-W;D++)this.num[D]=N[D+W]}z.prototype={get:function(N){return this.num[N]},getLength:function(){return this.num.length},multiply:function(N){for(var Y=new Array(this.getLength()+N.getLength()-1),W=0;W<this.getLength();W++)for(var D=0;D<N.getLength();D++)Y[W+D]^=Z.gexp(Z.glog(this.get(W))+Z.glog(N.get(D)));return new z(Y,0)},mod:function(N){if(this.getLength()-N.getLength()<0)return this;for(var Y=Z.glog(this.get(0))-Z.glog(N.get(0)),W=new Array(this.getLength()),D=0;D<this.getLength();D++)W[D]=this.get(D);for(var D=0;D<N.getLength();D++)W[D]^=Z.gexp(Z.glog(N.get(D))+Y);return new z(W,0).mod(N)}},Be.exports=z},dejd:function(Be,he,B){},djh8:function(Be,he,B){Be.exports=B.p+"static/qrCode.d852fdfc.png"},dmUQ:function(Be,he,B){"use strict";var Z=B("Ff2n"),z=B("rePB"),N=B("1OyB"),Y=B("vuIU"),W=B("Ji7U"),D=B("md7G"),G=B("foSv"),j=B("q1tI"),n=B.n(j),T=B("TSYQ"),v=B.n(T),f=B("4IlW");function p(g,h){var C=Object.keys(g);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(g);h&&(x=x.filter(function(m){return Object.getOwnPropertyDescriptor(g,m).enumerable})),C.push.apply(C,x)}return C}function c(g){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(z.a)(g,x,C[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(C)):p(Object(C)).forEach(function(x){Object.defineProperty(g,x,Object.getOwnPropertyDescriptor(C,x))})}return g}function s(g){var h=d();return function(){var x=Object(G.a)(g),m;if(h){var P=Object(G.a)(this).constructor;m=Reflect.construct(x,arguments,P)}else m=x.apply(this,arguments);return Object(D.a)(this,m)}}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(g){return!1}}function u(){}function l(g){g.preventDefault()}var a=function(h){return h.replace(/[^\w.-]+/g,"")},i=200,R=600,O=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,w=function(h){return h!=null},M=function(h,C){return C===h||typeof C=="number"&&typeof h=="number"&&isNaN(C)&&isNaN(h)},L=function(g){Object(W.a)(C,g);var h=s(C);function C(x){var m;Object(N.a)(this,C),m=h.call(this,x),m.onKeyDown=function(y){var S=m.props,F=S.onKeyDown,A=S.onPressEnter;if(y.keyCode===f.a.UP){var X=m.getRatio(y);m.up(y,X,null),m.stop()}else if(y.keyCode===f.a.DOWN){var ne=m.getRatio(y);m.down(y,ne,null),m.stop()}else y.keyCode===f.a.ENTER&&A&&A(y);if(m.recordCursorPosition(),m.lastKeyCode=y.keyCode,F){for(var fe=arguments.length,ye=new Array(fe>1?fe-1:0),Pe=1;Pe<fe;Pe++)ye[Pe-1]=arguments[Pe];F.apply(void 0,[y].concat(ye))}},m.onKeyUp=function(y){var S=m.props.onKeyUp;if(m.stop(),m.recordCursorPosition(),S){for(var F=arguments.length,A=new Array(F>1?F-1:0),X=1;X<F;X++)A[X-1]=arguments[X];S.apply(void 0,[y].concat(A))}},m.onChange=function(y){var S=m.props.onChange;m.state.focused&&(m.inputting=!0),m.rawInput=m.props.parser(m.getValueFromEvent(y)),m.setState({inputValue:m.rawInput}),S(m.toNumber(m.rawInput))},m.onMouseUp=function(){var y=m.props.onMouseUp;m.recordCursorPosition(),y&&y.apply(void 0,arguments)},m.onFocus=function(){var y;m.setState({focused:!0}),(y=m.props).onFocus.apply(y,arguments)},m.onBlur=function(){var y=m.props.onBlur;m.inputting=!1,m.setState({focused:!1});var S=m.getCurrentValidValue(m.state.inputValue),F=m.setValue(S,u);if(y){var A=m.input.value,X=m.getInputDisplayValue({focus:!1,value:F});m.input.value=X&&Number(X),y.apply(void 0,arguments),m.input.value=A}},m.getRatio=function(y){var S=1;return y.metaKey||y.ctrlKey?S=.1:y.shiftKey&&(S=10),S},m.getFullNum=function(y){return isNaN(y)?y:/e/i.test(String(y))?Number(y).toFixed(18).replace(/\.?0+$/,""):y},m.getPrecision=function(y){if(w(m.props.precision))return m.props.precision;var S=String(y);if(S.indexOf("e-")>=0)return parseInt(S.slice(S.indexOf("e-")+2),10);var F=0;return S.indexOf(".")>=0&&(F=S.length-S.indexOf(".")-1),F},m.getInputDisplayValue=function(y){var S=y||m.state,F=S.focused,A=S.inputValue,X=S.value,ne;F?ne=A:ne=m.toPrecisionAsStep(X),ne==null&&(ne="");var fe=m.formatWrapper(ne);return w(m.props.decimalSeparator)&&(fe=fe.toString().replace(".",m.props.decimalSeparator)),fe},m.recordCursorPosition=function(){try{m.cursorStart=m.input.selectionStart,m.cursorEnd=m.input.selectionEnd,m.currentValue=m.input.value,m.cursorBefore=m.input.value.substring(0,m.cursorStart),m.cursorAfter=m.input.value.substring(m.cursorEnd)}catch(y){}},m.restoreByAfter=function(y){if(y===void 0)return!1;var S=m.input.value,F=S.lastIndexOf(y);if(F===-1)return!1;var A=m.cursorBefore.length;return m.lastKeyCode===f.a.DELETE&&m.cursorBefore.charAt(A-1)===y[0]?(m.fixCaret(A,A),!0):F+y.length===S.length?(m.fixCaret(F,F),!0):!1},m.partRestoreByAfter=function(y){return y===void 0?!1:Array.prototype.some.call(y,function(S,F){var A=y.substring(F);return m.restoreByAfter(A)})},m.isNotCompleteNumber=function(y){return isNaN(y)||y===""||y===null||y&&y.toString().indexOf(".")===y.toString().length-1},m.stop=function(){m.autoStepTimer&&clearTimeout(m.autoStepTimer)},m.down=function(y,S,F){m.pressingUpOrDown=!0,m.step("down",y,S,F)},m.up=function(y,S,F){m.pressingUpOrDown=!0,m.step("up",y,S,F)},m.saveInput=function(y){m.input=y};var P=x.value;P===void 0&&(P=x.defaultValue),m.state={focused:x.autoFocus};var k=m.getValidValue(m.toNumber(P));return m.state=c(c({},m.state),{},{inputValue:m.toPrecisionAsStep(k),value:k}),m}return Object(Y.a)(C,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(m){var P=this.props,k=P.value,y=P.onChange,S=P.max,F=P.min,A=this.state.focused;if(m){if(!M(m.value,k)||!M(m.max,S)||!M(m.min,F)){var X=A?k:this.getValidValue(k),ne;this.pressingUpOrDown?ne=X:this.inputting?ne=this.rawInput:ne=this.toPrecisionAsStep(X),this.setState({value:X,inputValue:ne})}var fe="value"in this.props?k:this.state.value;"max"in this.props&&m.max!==S&&typeof fe=="number"&&fe>S&&y&&y(S),"min"in this.props&&m.min!==F&&typeof fe=="number"&&fe<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 ye=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===f.a.BACKSPACE?ye=this.cursorStart-1:this.lastKeyCode===f.a.DELETE&&(ye=this.cursorStart):ye=this.input.value.length,this.fixCaret(ye,ye)}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(m){var P=m;return P===""?P="":this.isNotCompleteNumber(parseFloat(P))?P=this.state.value:P=this.getValidValue(P),this.toNumber(P)}},{key:"getValueFromEvent",value:function(m){var P=m.target.value.trim().replace(/。/g,".");return w(this.props.decimalSeparator)&&(P=P.replace(this.props.decimalSeparator,".")),P}},{key:"getValidValue",value:function(m){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(m);return isNaN(y)?m:(y<P&&(y=P),y>k&&(y=k),y)}},{key:"setValue",value:function(m,P){var k=this.props.precision,y=this.isNotCompleteNumber(parseFloat(m))?null:parseFloat(m),S=this.state.value,F=S===void 0?null:S,A=this.state.inputValue,X=A===void 0?null:A,ne=typeof y=="number"?y.toFixed(k):"".concat(y),fe=y!==F||ne!=="".concat(X);return"value"in this.props?(X=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:X},P)):this.setState({value:y,inputValue:this.toPrecisionAsStep(m)},P),fe&&this.props.onChange(y),y}},{key:"getMaxPrecision",value:function(m){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,k=this.props,y=k.precision,S=k.step;if(w(y))return y;var F=this.getPrecision(P),A=this.getPrecision(S),X=this.getPrecision(m);return m?Math.max(X,F+A):F+A}},{key:"getPrecisionFactor",value:function(m){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,k=this.getMaxPrecision(m,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(m){return this.props.formatter?this.props.formatter(m):m}},{key:"toPrecisionAsStep",value:function(m){if(this.isNotCompleteNumber(m)||m==="")return m;var P=Math.abs(this.getMaxPrecision(m));return isNaN(P)?m.toString():Number(m).toFixed(P)}},{key:"toNumber",value:function(m){var P=this.props.precision,k=this.state.focused,y=m&&m.length>16&&k;return this.isNotCompleteNumber(m)||y?m:w(P)?Math.round(m*Math.pow(10,P))/Math.pow(10,P):Number(m)}},{key:"upStep",value:function(m,P){var k=this.props.step,y=this.getPrecisionFactor(m,P),S=Math.abs(this.getMaxPrecision(m,P)),F=((y*m+y*k*P)/y).toFixed(S);return this.toNumber(F)}},{key:"downStep",value:function(m,P){var k=this.props.step,y=this.getPrecisionFactor(m,P),S=Math.abs(this.getMaxPrecision(m,P)),F=((y*m-y*k*P)/y).toFixed(S);return this.toNumber(F)}},{key:"step",value:function(m,P){var k=this,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=arguments.length>3?arguments[3]:void 0;this.stop(),P&&(P.persist(),P.preventDefault());var F=this.props;if(F.disabled)return;var A=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(A))return;var X=this["".concat(m,"Step")](A,y),ne=X>F.max||X<F.min;if(X>F.max?X=F.max:X<F.min&&(X=F.min),this.setValue(X,null),this.setState({focused:!0},function(){k.pressingUpOrDown=!1}),ne)return;this.autoStepTimer=setTimeout(function(){k[m](P,y,!0)},S?i:R)}},{key:"fixCaret",value:function(m,P){if(m===void 0||P===void 0||!this.input||!this.input.value)return;try{var k=this.input.selectionStart,y=this.input.selectionEnd;(m!==k||P!==y)&&this.input.setSelectionRange(m,P)}catch(S){}}},{key:"render",value:function(){var m,P=this.props,k=P.prefixCls,y=P.disabled,S=P.readOnly,F=P.useTouch,A=P.autoComplete,X=P.upHandler,ne=P.downHandler,fe=P.className,ye=P.max,Pe=P.min,xe=P.style,Ie=P.title,Me=P.onMouseEnter,ke=P.onMouseLeave,Ee=P.onMouseOver,J=P.onMouseOut,I=P.required,U=P.onClick,K=P.tabIndex,q=P.type,V=P.placeholder,ue=P.id,Ae=P.inputMode,Ue=P.pattern,ce=P.step,ge=P.maxLength,Te=P.autoFocus,Oe=P.name,Xe=P.onPaste,rt=P.onInput,st=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"]),nt=this.state,bt=nt.value,yt=nt.focused,Ne=v()(k,(m={},Object(z.a)(m,fe,!!fe),Object(z.a)(m,"".concat(k,"-disabled"),y),Object(z.a)(m,"".concat(k,"-focused"),yt),m)),Re={};Object.keys(st).forEach(function(be){(be.substr(0,5)==="data-"||be.substr(0,5)==="aria-"||be==="role")&&(Re[be]=st[be])});var Je=!S&&!y,tt=this.getInputDisplayValue(null),le=(bt||bt===0)&&(isNaN(bt)||Number(bt)>=ye),$=(bt||bt===0)&&(isNaN(bt)||Number(bt)<=Pe),te=le||y||S,ae=$||y||S,de=v()("".concat(k,"-handler"),"".concat(k,"-handler-up"),Object(z.a)({},"".concat(k,"-handler-up-disabled"),te)),ie=v()("".concat(k,"-handler"),"".concat(k,"-handler-down"),Object(z.a)({},"".concat(k,"-handler-down-disabled"),ae)),se=F?{onTouchStart:te?u:this.up,onTouchEnd:this.stop}:{onMouseDown:te?u:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},pe=F?{onTouchStart:ae?u:this.down,onTouchEnd:this.stop}:{onMouseDown:ae?u:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return n.a.createElement("div",{className:Ne,style:xe,title:Ie,onMouseEnter:Me,onMouseLeave:ke,onMouseOver:Ee,onMouseOut:J,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"},se,{role:"button","aria-label":"Increase Value","aria-disabled":te,className:de}),X||n.a.createElement("span",{unselectable:"on",className:"".concat(k,"-handler-up-inner"),onClick:l})),n.a.createElement("span",Object.assign({unselectable:"on"},pe,{role:"button","aria-label":"Decrease Value","aria-disabled":ae,className:ie}),ne||n.a.createElement("span",{unselectable:"on",className:"".concat(k,"-handler-down-inner"),onClick:l}))),n.a.createElement("div",{className:"".concat(k,"-input-wrap")},n.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Pe,"aria-valuemax":ye,"aria-valuenow":bt,required:I,type:q,placeholder:V,onPaste:Xe,onClick:U,onMouseUp:this.onMouseUp,className:"".concat(k,"-input"),tabIndex:K,autoComplete:A,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Je?this.onKeyDown:u,onKeyUp:Je?this.onKeyUp:u,autoFocus:Te,maxLength:ge,readOnly:S,disabled:y,max:ye,min:Pe,step:ce,name:Oe,title:Ie,id:ue,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(tt),pattern:Ue,inputMode:Ae,onInput:rt},Re))))}}]),C}(n.a.Component);L.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:a,required:!1,autoComplete:"off"};var _=L,b=he.a=_},f4xo:function(Be,he,B){var Z=B("nVVt");function z(N){this.mode=Z.MODE_8BIT_BYTE,this.data=N}z.prototype={getLength:function(N){return this.data.length},write:function(N){for(var Y=0;Y<this.data.length;Y++)N.put(this.data.charCodeAt(Y),8)}},Be.exports=z},fjLI:function(Be,he,B){"use strict";B.d(he,"f",function(){return p}),B.d(he,"b",function(){return c}),B.d(he,"a",function(){return s}),B.d(he,"d",function(){return d}),B.d(he,"e",function(){return u}),B.d(he,"c",function(){return l});var Z=B("8HAY"),z=B("Vhoy"),N=B("MI8n"),Y=B("JYp7"),W=B("pmY6"),D=B("24hK"),G=B("nnTU"),j=B("T8No"),n=B("Cg/j"),T=B("t9D7"),v=function(a,i,R,O){var w=arguments.length,M=w<3?i:O===null?O=Object.getOwnPropertyDescriptor(i,R):O,L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(a,i,R,O);else for(var _=a.length-1;_>=0;_--)(L=a[_])&&(M=(w<3?L(M):w>3?L(i,R,M):L(i,R))||M);return w>3&&M&&Object.defineProperty(i,R,M),M},f=function(a,i){return function(R,O){i(R,O,a)}};function p(a){return a.command!==void 0}class c{constructor(a){this.id=c._idPool++,this._debugName=a}}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 s=Object(n.c)("menuService"),d=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new N.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:a=>a===c.CommandPalette}}addCommand(a){return this.addCommands(Y.a.single(a))}addCommands(a){for(const i of a)this._commands.set(i.id,i);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(W.i)(()=>{let i=!1;for(const R of a)i=this._commands.delete(R.id)||i;i&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(a){return this._commands.get(a)}getCommands(){const a=new Map;return this._commands.forEach((i,R)=>a.set(R,i)),a}appendMenuItem(a,i){return this.appendMenuItems(Y.a.single({id:a,item:i}))}appendMenuItems(a){const i=new Set,R=new D.a;for(const{id:O,item:w}of a){let M=this._menuItems.get(O);M||(M=new D.a,this._menuItems.set(O,M)),R.push(M.push(w)),i.add(O)}return this._onDidChangeMenu.fire(i),Object(W.i)(()=>{if(R.size>0){for(let O of R)O();this._onDidChangeMenu.fire(i),R.clear()}})}getMenuItems(a){let i;return this._menuItems.has(a)?i=[...this._menuItems.get(a)]:i=[],a===c.CommandPalette&&this._appendImplicitItems(i),i}_appendImplicitItems(a){const i=new Set;for(const R of a)p(R)&&(i.add(R.command.id),R.alt&&i.add(R.alt.id));this._commands.forEach((R,O)=>{i.has(O)||a.push({command:R})})}};class u extends Z.e{constructor(a,i,R,O){super(`submenuitem.${a.submenu.id}`,typeof a.title=="string"?a.title:a.title.value,[],"submenu");this.item=a,this._menuService=i,this._contextKeyService=R,this._options=O}get actions(){const a=[],i=this._menuService.createMenu(this.item.submenu,this._contextKeyService),R=i.getActions(this._options);i.dispose();for(const[,O]of R)O.length>0&&(a.push(...O),a.push(new Z.d));return a.length&&a.pop(),a}}let l=class a{constructor(i,R,O,w,M){var L,_;if(this._commandService=M,this.id=i.id,this.label=(O==null?void 0:O.renderShortTitle)&&i.shortTitle?typeof i.shortTitle=="string"?i.shortTitle:i.shortTitle.value:typeof i.title=="string"?i.title:i.title.value,this.tooltip=(_=typeof i.tooltip=="string"?i.tooltip:(L=i.tooltip)===null||L===void 0?void 0:L.value)!==null&&_!==void 0?_:"",this.enabled=!i.precondition||w.contextMatchesRules(i.precondition),this.checked=void 0,i.toggled){const b=i.toggled.condition?i.toggled:{condition:i.toggled};this.checked=w.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=i,this.alt=R?new a(R,void 0,O,w,M):void 0,this._options=O,T.d.isThemeIcon(i.icon)&&(this.class=z.a.asClassName(i.icon))}dispose(){}run(...i){var R,O;let w=[];return((R=this._options)===null||R===void 0?void 0:R.arg)&&(w=[...w,this._options.arg]),((O=this._options)===null||O===void 0?void 0:O.shouldForwardArgs)&&(w=[...w,...i]),this._commandService.executeCommand(this.id,...w)}};l=v([f(3,j.b),f(4,G.b)],l)},fyJ8:function(Be,he,B){"use strict";var Z=B("rePB"),z=B("VTBJ"),N=B("Ff2n"),Y=B("U8pU"),W=B("q1tI"),D=B.n(W),G=B("TSYQ"),j=B.n(G),n=B("c+Xe"),T=B("sR1s");function v(d){return d&&Object(Y.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 l,a=d.prefixCls,i=d.className,R=d.record,O=d.index,w=d.dataIndex,M=d.render,L=d.children,_=d.component,b=_===void 0?"td":_,g=d.colSpan,h=d.rowSpan,C=d.fixLeft,x=d.fixRight,m=d.firstFixLeft,P=d.lastFixLeft,k=d.firstFixRight,y=d.lastFixRight,S=d.appendNode,F=d.additionalProps,A=F===void 0?{}:F,X=d.ellipsis,ne=d.align,fe=d.rowType,ye=d.isSticky,Pe="".concat(a,"-cell"),xe,Ie;if(L)Ie=L;else{var Me=Object(T.b)(R,w);if(Ie=Me,M){var ke=M(Me,R,O);v(ke)?(Ie=ke.children,xe=ke.props):Ie=ke}}Object(Y.a)(Ie)==="object"&&!Array.isArray(Ie)&&!W.isValidElement(Ie)&&(Ie=null),X&&(P||k)&&(Ie=W.createElement("span",{className:"".concat(Pe,"-content")},Ie));var Ee=xe||{},J=Ee.colSpan,I=Ee.rowSpan,U=Ee.style,K=Ee.className,q=Object(N.a)(Ee,["colSpan","rowSpan","style","className"]),V=J!==void 0?J:g,ue=I!==void 0?I:h;if(V===0||ue===0)return null;var Ae={},Ue=typeof C=="number",ce=typeof x=="number";Ue&&(Ae.position="sticky",Ae.left=C),ce&&(Ae.position="sticky",Ae.right=x);var ge={};ne&&(ge.textAlign=ne);var Te,Oe=X===!0?{showTitle:!0}:X;Oe&&(Oe.showTitle||fe==="header")&&(typeof Ie=="string"||typeof Ie=="number"?Te=Ie.toString():W.isValidElement(Ie)&&typeof Ie.props.children=="string"&&(Te=Ie.props.children));var Xe=Object(z.a)(Object(z.a)(Object(z.a)({title:Te},q),A),{},{colSpan:V&&V!==1?V:null,rowSpan:ue&&ue!==1?ue:null,className:j()(Pe,i,(l={},Object(Z.a)(l,"".concat(Pe,"-fix-left"),Ue),Object(Z.a)(l,"".concat(Pe,"-fix-left-first"),m),Object(Z.a)(l,"".concat(Pe,"-fix-left-last"),P),Object(Z.a)(l,"".concat(Pe,"-fix-right"),ce),Object(Z.a)(l,"".concat(Pe,"-fix-right-first"),k),Object(Z.a)(l,"".concat(Pe,"-fix-right-last"),y),Object(Z.a)(l,"".concat(Pe,"-ellipsis"),X),Object(Z.a)(l,"".concat(Pe,"-with-append"),S),Object(Z.a)(l,"".concat(Pe,"-fix-sticky"),(Ue||ce)&&ye),l),A.className,K),style:Object(z.a)(Object(z.a)(Object(z.a)(Object(z.a)({},A.style),ge),Ae),U),ref:f(b)?u:null});return W.createElement(b,Object.assign({},Xe),S,Ie)}var c=W.forwardRef(p);c.displayName="Cell";var s=W.memo(c,function(d,u){return u.shouldCellUpdate?!u.shouldCellUpdate(u.record,d.record):!1});he.a=s},h78n:function(Be,he,B){"use strict";B.d(he,"a",function(){return m});var Z=B("q1tI"),z=B.n(Z),N=B("TSYQ"),Y=B.n(N),W={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},D=function(y){var S=y.map(function(){return Object(Z.useRef)()}),F=Object(Z.useRef)();return Object(Z.useEffect)(function(){var A=Date.now(),X=!1;Object.keys(S).forEach(function(ne){var fe=S[ne].current;if(!fe)return;X=!0;var ye=fe.style;ye.transitionDuration=".3s, .3s, .3s, .06s",F.current&&A-F.current<100&&(ye.transitionDuration="0s, 0s")}),X&&(F.current=Date.now())}),[S]};function G(){return G=Object.assign||function(k){for(var y=1;y<arguments.length;y++){var S=arguments[y];for(var F in S)Object.prototype.hasOwnProperty.call(S,F)&&(k[F]=S[F])}return k},G.apply(this,arguments)}function j(k,y){return p(k)||f(k,y)||T(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 T(k,y){if(!k)return;if(typeof k=="string")return v(k,y);var S=Object.prototype.toString.call(k).slice(8,-1);if(S==="Object"&&k.constructor&&(S=k.constructor.name),S==="Map"||S==="Set")return Array.from(k);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return v(k,y)}function v(k,y){(y==null||y>k.length)&&(y=k.length);for(var S=0,F=new Array(y);S<y;S++)F[S]=k[S];return F}function f(k,y){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(k)))return;var S=[],F=!0,A=!1,X=void 0;try{for(var ne=k[Symbol.iterator](),fe;!(F=(fe=ne.next()).done)&&!(S.push(fe.value),y&&S.length===y);F=!0);}catch(ye){A=!0,X=ye}finally{try{!F&&ne.return!=null&&ne.return()}finally{if(A)throw X}}return S}function p(k){if(Array.isArray(k))return k}function c(k,y){if(k==null)return{};var S=s(k,y),F,A;if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(k);for(A=0;A<X.length;A++){if(F=X[A],y.indexOf(F)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(k,F))continue;S[F]=k[F]}}return S}function s(k,y){if(k==null)return{};var S={},F=Object.keys(k),A,X;for(X=0;X<F.length;X++){if(A=F[X],y.indexOf(A)>=0)continue;S[A]=k[A]}return S}var d=function(y){var S=y.className,F=y.percent,A=y.prefixCls,X=y.strokeColor,ne=y.strokeLinecap,fe=y.strokeWidth,ye=y.style,Pe=y.trailColor,xe=y.trailWidth,Ie=y.transition,Me=c(y,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Me.gapPosition;var ke=Array.isArray(F)?F:[F],Ee=Array.isArray(X)?X:[X],J=D(ke),I=j(J,1),U=I[0],K=fe/2,q=100-fe/2,V="M ".concat(ne==="round"?K:0,",").concat(K,`
L `).concat(ne==="round"?q:100,",").concat(K),ue="0 0 100 ".concat(fe),Ae=0;return z.a.createElement("svg",G({className:Y()("".concat(A,"-line"),S),viewBox:ue,preserveAspectRatio:"none",style:ye},Me),z.a.createElement("path",{className:"".concat(A,"-line-trail"),d:V,strokeLinecap:ne,stroke:Pe,strokeWidth:xe||fe,fillOpacity:"0"}),ke.map(function(Ue,ce){var ge={strokeDasharray:"".concat(Ue,"px, 100px"),strokeDashoffset:"-".concat(Ae,"px"),transition:Ie||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Te=Ee[ce]||Ee[Ee.length-1];return Ae+=Ue,z.a.createElement("path",{key:ce,className:"".concat(A,"-line-path"),d:V,strokeLinecap:ne,stroke:Te,strokeWidth:fe,fillOpacity:"0",ref:U[ce],style:ge})}))};d.defaultProps=W;var u=d;function l(){return l=Object.assign||function(k){for(var y=1;y<arguments.length;y++){var S=arguments[y];for(var F in S)Object.prototype.hasOwnProperty.call(S,F)&&(k[F]=S[F])}return k},l.apply(this,arguments)}function a(k,y){return M(k)||w(k,y)||R(k,y)||i()}function i(){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 S=Object.prototype.toString.call(k).slice(8,-1);if(S==="Object"&&k.constructor&&(S=k.constructor.name),S==="Map"||S==="Set")return Array.from(k);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return O(k,y)}function O(k,y){(y==null||y>k.length)&&(y=k.length);for(var S=0,F=new Array(y);S<y;S++)F[S]=k[S];return F}function w(k,y){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(k)))return;var S=[],F=!0,A=!1,X=void 0;try{for(var ne=k[Symbol.iterator](),fe;!(F=(fe=ne.next()).done)&&!(S.push(fe.value),y&&S.length===y);F=!0);}catch(ye){A=!0,X=ye}finally{try{!F&&ne.return!=null&&ne.return()}finally{if(A)throw X}}return S}function M(k){if(Array.isArray(k))return k}function L(k,y){if(k==null)return{};var S=_(k,y),F,A;if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(k);for(A=0;A<X.length;A++){if(F=X[A],y.indexOf(F)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(k,F))continue;S[F]=k[F]}}return S}function _(k,y){if(k==null)return{};var S={},F=Object.keys(k),A,X;for(X=0;X<F.length;X++){if(A=F[X],y.indexOf(A)>=0)continue;S[A]=k[A]}return S}var b=0;function g(k){return+k.replace("%","")}function h(k){return Array.isArray(k)?k:[k]}function C(k,y,S,F){var A=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,X=arguments.length>5?arguments[5]:void 0,ne=50-F/2,fe=0,ye=-ne,Pe=0,xe=-2*ne;switch(X){case"left":fe=-ne,ye=0,Pe=2*ne,xe=0;break;case"right":fe=ne,ye=0,Pe=-2*ne,xe=0;break;case"bottom":ye=ne,xe=2*ne;break;default:}var Ie="M 50,50 m ".concat(fe,",").concat(ye,`
a `).concat(ne,",").concat(ne," 0 1 1 ").concat(Pe,",").concat(-xe,`
a `).concat(ne,",").concat(ne," 0 1 1 ").concat(-Pe,",").concat(xe),Me=Math.PI*2*ne,ke={stroke:S,strokeDasharray:"".concat(y/100*(Me-A),"px ").concat(Me,"px"),strokeDashoffset:"-".concat(A/2+k/100*(Me-A),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:Ie,pathStyle:ke}}var x=function(y){var S=y.prefixCls,F=y.strokeWidth,A=y.trailWidth,X=y.gapDegree,ne=y.gapPosition,fe=y.trailColor,ye=y.strokeLinecap,Pe=y.style,xe=y.className,Ie=y.strokeColor,Me=y.percent,ke=L(y,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),Ee=Object(Z.useMemo)(function(){return b+=1,b},[]),J=C(0,100,fe,F,X,ne),I=J.pathString,U=J.pathStyle,K=h(Me),q=h(Ie),V=q.find(function(ge){return Object.prototype.toString.call(ge)==="[object Object]"}),ue=D(K),Ae=a(ue,1),Ue=Ae[0],ce=function(){var Te=0;return K.map(function(Oe,Xe){var rt=q[Xe]||q[q.length-1],st=Object.prototype.toString.call(rt)==="[object Object]"?"url(#".concat(S,"-gradient-").concat(Ee,")"):"",nt=C(Te,Oe,rt,F,X,ne);return Te+=Oe,z.a.createElement("path",{key:Xe,className:"".concat(S,"-circle-path"),d:nt.pathString,stroke:st,strokeLinecap:ye,strokeWidth:F,opacity:Oe===0?0:1,fillOpacity:"0",style:nt.pathStyle,ref:Ue[Xe]})})};return z.a.createElement("svg",l({className:Y()("".concat(S,"-circle"),xe),viewBox:"0 0 100 100",style:Pe},ke),V&&z.a.createElement("defs",null,z.a.createElement("linearGradient",{id:"".concat(S,"-gradient-").concat(Ee),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(V).sort(function(ge,Te){return g(ge)-g(Te)}).map(function(ge,Te){return z.a.createElement("stop",{key:Te,offset:ge,stopColor:V[ge]})}))),z.a.createElement("path",{className:"".concat(S,"-circle-trail"),d:I,stroke:fe,strokeLinecap:ye,strokeWidth:A||F,fillOpacity:"0",style:U}),ce().reverse())};x.defaultProps=W;var m=x,P={Line:u,Circle:m}},hW8S:function(Be,he,B){"use strict";B.d(he,"a",function(){return Y}),B.d(he,"c",function(){return W}),B.d(he,"b",function(){return D});var Z=B("VTBJ"),z=B("Ff2n"),N=B("Kwbf"),Y="RC_TABLE_INTERNAL_COL_DEFINE";function W(G){var j=G.expandable,n=Object(z.a)(G,["expandable"]);return"expandable"in G?Object(Z.a)(Object(Z.a)({},n),j):n}function D(G){return Object.keys(G).reduce(function(j,n){return(n.substr(0,5)==="data-"||n.substr(0,5)==="aria-")&&(j[n]=G[n]),j},{})}},ic2d:function(Be,he,B){"use strict";B.d(he,"a",function(){return Y});var Z=B("FWmy"),z=B("746U");class N{constructor(){this.data=new Map}add(W,D){Z.a(z.l(W)),Z.a(z.k(D)),Z.a(!this.data.has(W),"There is already an extension with this id"),this.data.set(W,D)}as(W){return this.data.get(W)||null}}const Y=new N},ji0R:function(Be,he,B){Be.exports=B.p+"static/douyu.3e6df9ee.jpg"},kPWJ:function(Be,he,B){Be.exports=B.p+"static/question.cb52bef9.gif"},kPYp:function(Be,he){Be.exports="data:image/png;base64,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"},kSUc:function(Be,he,B){},l2Kq:function(Be,he,B){Be.exports=B.p+"static/match_ad.24dc22fd.jpg"},lZu9:function(Be,he,B){(function(Z){Z(B("VrN/"),B("1eCo"),B("8EBN"))})(function(Z){"use strict";Z.defineMode("markdown",function(z,N){var Y=Z.getMode(z,"text/html"),W=Y.name=="null";function D(F){if(Z.findModeByName){var A=Z.findModeByName(F);A&&(F=A.mime||A.mimes[0])}var X=Z.getMode(z,F);return X.name=="null"?null:X}N.highlightFormatting===void 0&&(N.highlightFormatting=!1),N.maxBlockquoteDepth===void 0&&(N.maxBlockquoteDepth=0),N.taskLists===void 0&&(N.taskLists=!1),N.strikethrough===void 0&&(N.strikethrough=!1),N.emoji===void 0&&(N.emoji=!1),N.fencedCodeBlockHighlighting===void 0&&(N.fencedCodeBlockHighlighting=!0),N.fencedCodeBlockDefaultMode===void 0&&(N.fencedCodeBlockDefaultMode="text/plain"),N.xml===void 0&&(N.xml=!0),N.tokenTypeOverrides===void 0&&(N.tokenTypeOverrides={});var G={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 G)G.hasOwnProperty(j)&&N.tokenTypeOverrides[j]&&(G[j]=N.tokenTypeOverrides[j]);var n=/^([*\-_])(?:\s*\1){2,}\s*$/,T=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,v=/^\[(x| )\](?=\s)/i,f=N.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,c=/^[^#!\[\]*_\\<>` "'(~:]+/,s=/^(~~~+|```+)[ \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]/,l=" ";function a(F,A,X){return A.f=A.inline=X,X(F,A)}function i(F,A,X){return A.f=A.block=X,X(F,A)}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==M){var A=W;if(!A){var X=Z.innerMode(Y,F.htmlState);A=X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText}A&&(F.f=g,F.block=w,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function w(F,A){var X=F.column()===A.indentation,ne=R(A.prevLine.stream),fe=A.indentedCode,ye=A.prevLine.hr,Pe=A.list!==!1,xe=(A.listStack[A.listStack.length-1]||0)+3;A.indentedCode=!1;var Ie=A.indentation;if(A.indentationDiff===null&&(A.indentationDiff=A.indentation,Pe)){for(A.list=null;Ie<A.listStack[A.listStack.length-1];)A.listStack.pop(),A.listStack.length?A.indentation=A.listStack[A.listStack.length-1]:A.list=!1;A.list!==!1&&(A.indentationDiff=Ie-A.listStack[A.listStack.length-1])}var Me=!ne&&!ye&&!A.prevLine.header&&(!Pe||!fe)&&!A.prevLine.fencedCodeEnd,ke=(A.list===!1||ye||ne)&&A.indentation<=xe&&F.match(n),Ee=null;if(A.indentationDiff>=4&&(fe||A.prevLine.fencedCodeEnd||A.prevLine.header||ne))return F.skipToEnd(),A.indentedCode=!0,G.code;if(F.eatSpace())return null;if(X&&A.indentation<=xe&&(Ee=F.match(f))&&Ee[1].length<=6)return A.quote=0,A.header=Ee[1].length,A.thisLine.header=!0,N.highlightFormatting&&(A.formatting="header"),A.f=A.inline,_(A);if(A.indentation<=xe&&F.eat(">"))return A.quote=X?1:A.quote+1,N.highlightFormatting&&(A.formatting="quote"),F.eatSpace(),_(A);if(!ke&&!A.setext&&X&&A.indentation<=xe&&(Ee=F.match(T))){var J=Ee[1]?"ol":"ul";return A.indentation=Ie+F.current().length,A.list=!0,A.quote=0,A.listStack.push(A.indentation),A.em=!1,A.strong=!1,A.code=!1,A.strikethrough=!1,N.taskLists&&F.match(v,!1)&&(A.taskList=!0),A.f=A.inline,N.highlightFormatting&&(A.formatting=["list","list-"+J]),_(A)}else{if(X&&A.indentation<=xe&&(Ee=F.match(s,!0)))return A.quote=0,A.fencedEndRE=new RegExp(Ee[1]+"+ *$"),A.localMode=N.fencedCodeBlockHighlighting&&D(Ee[2]||N.fencedCodeBlockDefaultMode),A.localMode&&(A.localState=Z.startState(A.localMode)),A.f=A.block=L,N.highlightFormatting&&(A.formatting="code-block"),A.code=-1,_(A);if(A.setext||(!Me||!Pe)&&!A.quote&&A.list===!1&&!A.code&&!ke&&!d.test(F.string)&&(Ee=F.lookAhead(1))&&(Ee=Ee.match(p)))return A.setext?(A.header=A.setext,A.setext=0,F.skipToEnd(),N.highlightFormatting&&(A.formatting="header")):(A.header=Ee[0].charAt(0)=="="?1:2,A.setext=A.header),A.thisLine.header=!0,A.f=A.inline,_(A);if(ke)return F.skipToEnd(),A.hr=!0,A.thisLine.hr=!0,G.hr;if(F.peek()==="[")return a(F,A,P)}return a(F,A,A.inline)}function M(F,A){var X=Y.token(F,A.htmlState);if(!W){var ne=Z.innerMode(Y,A.htmlState);(ne.mode.name=="xml"&&ne.state.tagStart===null&&!ne.state.context&&ne.state.tokenize.isInText||A.md_inside&&F.current().indexOf(">")>-1)&&(A.f=g,A.block=w,A.htmlState=null)}return X}function L(F,A){var X=A.listStack[A.listStack.length-1]||0,ne=A.indentation<X,fe=X+3;if(A.fencedEndRE&&A.indentation<=fe&&(ne||F.match(A.fencedEndRE))){N.highlightFormatting&&(A.formatting="code-block");var ye;return ne||(ye=_(A)),A.localMode=A.localState=null,A.block=w,A.f=g,A.fencedEndRE=null,A.code=0,A.thisLine.fencedCodeEnd=!0,ne?i(F,A,A.block):ye}else return A.localMode?A.localMode.token(F,A.localState):(F.skipToEnd(),G.code)}function _(F){var A=[];if(F.formatting){A.push(G.formatting),typeof F.formatting=="string"&&(F.formatting=[F.formatting]);for(var X=0;X<F.formatting.length;X++)A.push(G.formatting+"-"+F.formatting[X]),F.formatting[X]==="header"&&A.push(G.formatting+"-"+F.formatting[X]+"-"+F.header),F.formatting[X]==="quote"&&(!N.maxBlockquoteDepth||N.maxBlockquoteDepth>=F.quote?A.push(G.formatting+"-"+F.formatting[X]+"-"+F.quote):A.push("error"))}if(F.taskOpen)return A.push("meta"),A.length?A.join(" "):null;if(F.taskClosed)return A.push("property"),A.length?A.join(" "):null;if(F.linkHref?A.push(G.linkHref,"url"):(F.strong&&A.push(G.strong),F.em&&A.push(G.em),F.strikethrough&&A.push(G.strikethrough),F.emoji&&A.push(G.emoji),F.linkText&&A.push(G.linkText),F.code&&A.push(G.code),F.image&&A.push(G.image),F.imageAltText&&A.push(G.imageAltText,"link"),F.imageMarker&&A.push(G.imageMarker)),F.header&&A.push(G.header,G.header+"-"+F.header),F.quote&&(A.push(G.quote),!N.maxBlockquoteDepth||N.maxBlockquoteDepth>=F.quote?A.push(G.quote+"-"+F.quote):A.push(G.quote+"-"+N.maxBlockquoteDepth)),F.list!==!1){var ne=(F.listStack.length-1)%3;ne?ne===1?A.push(G.list2):A.push(G.list3):A.push(G.list1)}return F.trailingSpaceNewLine?A.push("trailing-space-new-line"):F.trailingSpace&&A.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),A.length?A.join(" "):null}function b(F,A){return F.match(c,!0)?_(A):void 0}function g(F,A){var X=A.text(F,A);if(typeof X!="undefined")return X;if(A.list)return A.list=null,_(A);if(A.taskList){var ne=F.match(v,!0)[1]===" ";return ne?A.taskOpen=!0:A.taskClosed=!0,N.highlightFormatting&&(A.formatting="task"),A.taskList=!1,_(A)}if(A.taskOpen=!1,A.taskClosed=!1,A.header&&F.match(/^#+$/,!0))return N.highlightFormatting&&(A.formatting="header"),_(A);var fe=F.next();if(A.linkTitle){A.linkTitle=!1;var ye=fe;fe==="("&&(ye=")"),ye=(ye+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Pe="^\\s*(?:[^"+ye+"\\\\]+|\\\\\\\\|\\\\.)"+ye;if(F.match(new RegExp(Pe),!0))return G.linkHref}if(fe==="`"){var xe=A.formatting;N.highlightFormatting&&(A.formatting="code"),F.eatWhile("`");var Ie=F.current().length;if(A.code==0&&(!A.quote||Ie==1))return A.code=Ie,_(A);if(Ie==A.code){var Me=_(A);return A.code=0,Me}else return A.formatting=xe,_(A)}else if(A.code)return _(A);if(fe==="\\"&&(F.next(),N.highlightFormatting)){var ke=_(A),Ee=G.formatting+"-escape";return ke?ke+" "+Ee:Ee}if(fe==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return A.imageMarker=!0,A.image=!0,N.highlightFormatting&&(A.formatting="image"),_(A);if(fe==="["&&A.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return A.imageMarker=!1,A.imageAltText=!0,N.highlightFormatting&&(A.formatting="image"),_(A);if(fe==="]"&&A.imageAltText){N.highlightFormatting&&(A.formatting="image");var ke=_(A);return A.imageAltText=!1,A.image=!1,A.inline=A.f=C,ke}if(fe==="["&&!A.image)return A.linkText&&F.match(/^.*?\]/)||(A.linkText=!0,N.highlightFormatting&&(A.formatting="link")),_(A);if(fe==="]"&&A.linkText){N.highlightFormatting&&(A.formatting="link");var ke=_(A);return A.linkText=!1,A.inline=A.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?C:g,ke}if(fe==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){A.f=A.inline=h,N.highlightFormatting&&(A.formatting="link");var ke=_(A);return ke?ke+=" ":ke="",ke+G.linkInline}if(fe==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){A.f=A.inline=h,N.highlightFormatting&&(A.formatting="link");var ke=_(A);return ke?ke+=" ":ke="",ke+G.linkEmail}if(N.xml&&fe==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var J=F.string.indexOf(">",F.pos);if(J!=-1){var I=F.string.substring(F.start,J);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(I)&&(A.md_inside=!0)}return F.backUp(1),A.htmlState=Z.startState(Y),i(F,A,M)}if(N.xml&&fe==="<"&&F.match(/^\/\w*?>/))return A.md_inside=!1,"tag";if(fe==="*"||fe==="_"){for(var U=1,K=F.pos==1?" ":F.string.charAt(F.pos-2);U<3&&F.eat(fe);)U++;var q=F.peek()||" ",V=!/\s/.test(q)&&(!u.test(q)||/\s/.test(K)||u.test(K)),ue=!/\s/.test(K)&&(!u.test(K)||/\s/.test(q)||u.test(q)),Ae=null,Ue=null;if(U%2&&(!A.em&&V&&(fe==="*"||!ue||u.test(K))?Ae=!0:A.em==fe&&ue&&(fe==="*"||!V||u.test(q))&&(Ae=!1)),U>1&&(!A.strong&&V&&(fe==="*"||!ue||u.test(K))?Ue=!0:A.strong==fe&&ue&&(fe==="*"||!V||u.test(q))&&(Ue=!1)),Ue!=null||Ae!=null){N.highlightFormatting&&(A.formatting=Ae==null?"strong":Ue==null?"em":"strong em"),Ae===!0&&(A.em=fe),Ue===!0&&(A.strong=fe);var Me=_(A);return Ae===!1&&(A.em=!1),Ue===!1&&(A.strong=!1),Me}}else if(fe===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return _(A);F.backUp(1)}if(N.strikethrough){if(fe==="~"&&F.eatWhile(fe)){if(A.strikethrough){N.highlightFormatting&&(A.formatting="strikethrough");var Me=_(A);return A.strikethrough=!1,Me}else if(F.match(/^[^\s]/,!1))return A.strikethrough=!0,N.highlightFormatting&&(A.formatting="strikethrough"),_(A)}else if(fe===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return _(A);F.backUp(2)}}if(N.emoji&&fe===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){A.emoji=!0,N.highlightFormatting&&(A.formatting="emoji");var ce=_(A);return A.emoji=!1,ce}return fe===" "&&(F.match(/^ +$/,!1)?A.trailingSpace++:A.trailingSpace&&(A.trailingSpaceNewLine=!0)),_(A)}function h(F,A){var X=F.next();if(X===">"){A.f=A.inline=g,N.highlightFormatting&&(A.formatting="link");var ne=_(A);return ne?ne+=" ":ne="",ne+G.linkInline}return F.match(/^[^>]+/,!0),G.linkInline}function C(F,A){if(F.eatSpace())return null;var X=F.next();return X==="("||X==="["?(A.f=A.inline=m(X==="("?")":"]"),N.highlightFormatting&&(A.formatting="link-string"),A.linkHref=!0,_(A)):"error"}var x={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function m(F){return function(A,X){var ne=A.next();if(ne===F){X.f=X.inline=g,N.highlightFormatting&&(X.formatting="link-string");var fe=_(X);return X.linkHref=!1,fe}return A.match(x[F]),X.linkHref=!0,_(X)}}function P(F,A){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(A.f=k,F.next(),N.highlightFormatting&&(A.formatting="link"),A.linkText=!0,_(A)):a(F,A,g)}function k(F,A){if(F.match(/^\]:/,!0)){A.f=A.inline=y,N.highlightFormatting&&(A.formatting="link");var X=_(A);return A.linkText=!1,X}return F.match(/^([^\]\\]|\\.)+/,!0),G.linkText}function y(F,A){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?A.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),A.f=A.inline=g,G.linkHref+" url")}var S={startState:function(){return{f:w,prevLine:{stream:null},thisLine:{stream:null},block:w,htmlState:null,indentation:0,inline:g,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(Y,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,A){if(A.formatting=!1,F!=A.thisLine.stream){if(A.header=0,A.hr=!1,F.match(/^\s*$/,!0))return O(A),null;if(A.prevLine=A.thisLine,A.thisLine={stream:F},A.taskList=!1,A.trailingSpace=0,A.trailingSpaceNewLine=!1,!A.localState&&(A.f=A.block,A.f!=M)){var X=F.match(/^\s*/,!0)[0].replace(/\t/g,l).length;if(A.indentation=X,A.indentationDiff=null,X>0)return null}}return A.f(F,A)},innerMode:function(F){return F.block==M?{state:F.htmlState,mode:Y}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:S}},indent:function(F,A,X){return F.block==M&&Y.indent?Y.indent(F.htmlState,A,X):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,A,X):Z.Pass},blankLine:O,getType:_,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return S},"xml"),Z.defineMIME("text/markdown","markdown"),Z.defineMIME("text/x-markdown","markdown")})},lzim:function(Be,he,B){"use strict";var Z=B("E7E6"),z=B.n(Z);B.d(he,"w",function(){return z.a});var N=B("/GNS"),Y=B.n(N);B.d(he,"v",function(){return Y.a});var W=B("FOrL"),D=B.n(W);B.d(he,"q",function(){return D.a});var G=B("HpTS"),j=B.n(G);B.d(he,"x",function(){return j.a});var n=B("tWlo"),T=B.n(n);B.d(he,"a",function(){return T.a});var v=B("7ZXX"),f=B.n(v);B.d(he,"l",function(){return f.a});var p=B("GABl"),c=B.n(p);B.d(he,"e",function(){return c.a});var s=B("onxn"),d=B.n(s);B.d(he,"n",function(){return d.a});var u=B("nKGa"),l=B.n(u);B.d(he,"m",function(){return l.a});var a=B("4qgm"),i=B.n(a);B.d(he,"y",function(){return i.a});var R=B("JeFH"),O=B.n(R);B.d(he,"b",function(){return O.a});var w=B("ji0R"),M=B.n(w);B.d(he,"i",function(){return M.a});var L=B("W6BS"),_=B.n(L);B.d(he,"z",function(){return _.a});var b=B("kPYp"),g=B.n(b);B.d(he,"A",function(){return g.a});var h=B("nukY"),C=B.n(h),x=B("4u4S"),m=B.n(x),P=B("yslc"),k=B.n(P),y=B("l2Kq"),S=B.n(y),F=B("RMFE"),A=B.n(F);B.d(he,"o",function(){return A.a});var X=B("TGq3"),ne=B.n(X),fe=B("SMhR"),ye=B.n(fe),Pe=B("8/bI"),xe=B.n(Pe);B.d(he,"j",function(){return xe.a});var Ie=B("JWDV"),Me=B.n(Ie),ke=B("Xsq0"),Ee=B.n(ke);B.d(he,"p",function(){return Ee.a});var J=B("Ohmc"),I=B.n(J);B.d(he,"c",function(){return I.a});var U=B("csWT"),K=B.n(U);B.d(he,"d",function(){return K.a});var q=B("7v3h"),V=B.n(q);B.d(he,"k",function(){return V.a});var ue=B("cRFk"),Ae=B.n(ue);B.d(he,"u",function(){return Ae.a});var Ue=B("kPWJ"),ce=B.n(Ue);B.d(he,"t",function(){return ce.a});var ge=B("qgvg"),Te=B.n(ge);B.d(he,"r",function(){return Te.a});var Oe=B("FPkq"),Xe=B.n(Oe);B.d(he,"s",function(){return Xe.a});var rt=B("A/g1"),st=B.n(rt);B.d(he,"f",function(){return st.a});var nt=B("Nmxd"),bt=B.n(nt);B.d(he,"g",function(){return bt.a});var yt=B("5D2P"),Ne=B.n(yt);B.d(he,"h",function(){return Ne.a});var Re=B("djh8"),Je=B.n(Re),tt=B("Jq4h"),le=B.n(tt)},n6Qo:function(Be,he,B){"use strict";B.d(he,"a",function(){return j});var Z=B("q1tI"),z=B("biw7"),N=B("fyJ8");function Y(n){var T=n.className,v=n.index,f=n.children,p=n.colSpan,c=n.rowSpan,s=Z.useContext(z.a),d=s.prefixCls,u=s.fixedInfoList,l=u[v];return Z.createElement(N.a,Object.assign({className:T,index:v,component:"td",prefixCls:d,record:null,dataIndex:null,render:function(){return{children:f,props:{colSpan:p,rowSpan:c}}}},l))}function W(n){return Z.createElement("tr",Object.assign({},n))}function D(n){var T=n.children,v=Z.useContext(z.a),f=v.prefixCls;return Z.createElement("tfoot",{className:"".concat(f,"-summary")},T)}var G=he.b=D,j={Cell:Y,Row:W}},nEHx:function(Be,he,B){"use strict";B.d(he,"a",function(){return Z});var Z;(function(z){z.DARK="dark",z.LIGHT="light",z.HIGH_CONTRAST="hc"})(Z||(Z={}))},nKGa:function(Be,he,B){Be.exports=B.p+"static/export_exercise-template.f7655c19.png"},nVVt:function(Be,he){Be.exports={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3}},nnTU:function(Be,he,B){"use strict";B.d(he,"b",function(){return G}),B.d(he,"a",function(){return j});var Z=B("MI8n"),z=B("JYp7"),N=B("pmY6"),Y=B("24hK"),W=B("746U"),D=B("Cg/j");const G=Object(D.c)("commandService"),j=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Z.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(n,T){if(!n)throw new Error("invalid command");if(typeof n=="string"){if(!T)throw new Error("invalid command");return this.registerCommand({id:n,handler:T})}if(n.description){const s=[];for(let u of n.description.args)s.push(u.constraint);const d=n.handler;n.handler=function(u,...l){return Object(W.o)(l,s),d(u,...l)}}const{id:v}=n;let f=this._commands.get(v);f||(f=new Y.a,this._commands.set(v,f));let p=f.unshift(n),c=Object(N.i)(()=>{p();const s=this._commands.get(v);(s==null?void 0:s.isEmpty())&&this._commands.delete(v)});return this._onDidRegisterCommand.fire(v),c}registerCommandAlias(n,T){return j.registerCommand(n,(v,...f)=>v.get(G).executeCommand(T,...f))}getCommand(n){const T=this._commands.get(n);return!T||T.isEmpty()?void 0:z.a.first(T)}getCommands(){const n=new Map;for(const T of this._commands.keys()){const v=this.getCommand(T);v&&n.set(T,v)}return n}};j.registerCommand("noop",()=>{})},nukY:function(Be,he){Be.exports="data:image/png;base64,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"},o5mm:function(Be,he,B){Be.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(Be,he){Be.exports="data:image/png;base64,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"},osHv:function(Be,he,B){(function(Z){Z(B("VrN/"))})(function(Z){"use strict";var z=Z.Pos;function N(u,l){return u.line-l.line||u.ch-l.ch}var Y="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=Y+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",D=new RegExp("<(/?)(["+Y+"]["+W+"]*)","g");function G(u,l,a,i){this.line=l,this.ch=a,this.cm=u,this.text=u.getLine(l),this.min=i?Math.max(i.from,u.firstLine()):u.firstLine(),this.max=i?Math.min(i.to-1,u.lastLine()):u.lastLine()}function j(u,l){var a=u.cm.getTokenTypeAt(z(u.line,l));return a&&/\btag\b/.test(a)}function n(u){return u.line>=u.max?void 0:(u.ch=0,u.text=u.cm.getLine(++u.line),!0)}function T(u){return u.line<=u.min?void 0:(u.text=u.cm.getLine(--u.line),u.ch=u.text.length,!0)}function v(u){for(;;){var l=u.text.indexOf(">",u.ch);if(l==-1){if(n(u))continue;return}if(!j(u,l+1)){u.ch=l+1;continue}var a=u.text.lastIndexOf("/",l),i=a>-1&&!/\S/.test(u.text.slice(a+1,l));return u.ch=l+1,i?"selfClose":"regular"}}function f(u){for(;;){var l=u.ch?u.text.lastIndexOf("<",u.ch-1):-1;if(l==-1){if(T(u))continue;return}if(!j(u,l+1)){u.ch=l;continue}D.lastIndex=l,u.ch=l;var a=D.exec(u.text);if(a&&a.index==l)return a}}function p(u){for(;;){D.lastIndex=u.ch;var l=D.exec(u.text);if(!l){if(n(u))continue;return}if(!j(u,l.index+1)){u.ch=l.index+1;continue}return u.ch=l.index+l[0].length,l}}function c(u){for(;;){var l=u.ch?u.text.lastIndexOf(">",u.ch-1):-1;if(l==-1){if(T(u))continue;return}if(!j(u,l+1)){u.ch=l;continue}var a=u.text.lastIndexOf("/",l),i=a>-1&&!/\S/.test(u.text.slice(a+1,l));return u.ch=l+1,i?"selfClose":"regular"}}function s(u,l){for(var a=[];;){var i=p(u),R,O=u.line,w=u.ch-(i?i[0].length:0);if(!i||!(R=v(u)))return;if(R=="selfClose")continue;if(i[1]){for(var M=a.length-1;M>=0;--M)if(a[M]==i[2]){a.length=M;break}if(M<0&&(!l||l==i[2]))return{tag:i[2],from:z(O,w),to:z(u.line,u.ch)}}else a.push(i[2])}}function d(u,l){for(var a=[];;){var i=c(u);if(!i)return;if(i=="selfClose"){f(u);continue}var R=u.line,O=u.ch,w=f(u);if(!w)return;if(w[1])a.push(w[2]);else{for(var M=a.length-1;M>=0;--M)if(a[M]==w[2]){a.length=M;break}if(M<0&&(!l||l==w[2]))return{tag:w[2],from:z(u.line,u.ch),to:z(R,O)}}}}Z.registerHelper("fold","xml",function(u,l){for(var a=new G(u,l.line,0);;){var i=p(a);if(!i||a.line!=l.line)return;var R=v(a);if(!R)return;if(!i[1]&&R!="selfClose"){var O=z(a.line,a.ch),w=s(a,i[2]);return w&&N(w.from,O)>0?{from:O,to:w.from}:null}}}),Z.findMatchingTag=function(u,l,a){var i=new G(u,l.line,l.ch,a);if(i.text.indexOf(">")==-1&&i.text.indexOf("<")==-1)return;var R=v(i),O=R&&z(i.line,i.ch),w=R&&f(i);if(!R||!w||N(i,l)>0)return;var M={from:z(i.line,i.ch),to:O,tag:w[2]};return R=="selfClose"?{open:M,close:null,at:"open"}:w[1]?{open:d(i,w[2]),close:M,at:"close"}:(i=new G(u,O.line,O.ch,a),{open:M,close:s(i,w[2]),at:"open"})},Z.findEnclosingTag=function(u,l,a,i){for(var R=new G(u,l.line,l.ch,a);;){var O=d(R,i);if(!O)break;var w=new G(u,l.line,l.ch,a),M=s(w,O.tag);if(M)return{open:O,close:M}}},Z.scanForClosingTag=function(u,l,a,i){var R=new G(u,l.line,l.ch,i?{from:0,to:i}:null);return s(R,a)}})},p5ED:function(Be,he,B){"use strict";var Z=B("+L6B"),z=B("2/Rp"),N=B("5Dmo"),Y=B("3S7+"),W=B("k1fw"),D=B("9og8"),G=B("tJVT"),j=B("WmNS"),n=B.n(j),T=B("q1tI"),v=B.n(T),f=B("vHTk"),p=B.n(f),c=B("yEEn"),s=B("ZW9T"),d=B("1vsH"),u=B("V0Rq"),l=B("m3rI");he.a=function(a){var i,R,O,w,M,L,_,b=a.editOffice,g=b===void 0?"view":b,h=a.data,C=a.theme,x=a.type,m=a.filename,P=a.monacoEditor,k=a.className,y=a.style,S=a.close,F=a.onClose,A=a.hasMask,X=a.disabledDownload,ne=Object(T.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),fe=Object(G.a)(ne,2),ye=fe[0],Pe=fe[1],xe=Object(T.useState)(""),Ie=Object(G.a)(xe,2),Me=Ie[0],ke=Ie[1],Ee=Object(T.useState)(),J=Object(G.a)(Ee,2),I=J[0],U=J[1],K=window.ENV==="build"?"/react/build":"",q=l.a.PROXY_SERVER||location.origin,V,ue=1024*1024,Ae=10*ue,Ue=Object(T.useRef)();(i=h)!==null&&i!==void 0&&i.startsWith("/api")&&x!=="txt"&&(h=(l.a.API_SERVER||location.origin)+h),x==="office"&&(V=Object(d.T)(h).filesize,V>Ae&&(x="other")),m&&P&&(P.filename=m),Object(T.useEffect)(function(){var Oe,Xe,rt=(Oe=document.cookie)===null||Oe===void 0||((Xe=Oe.replace(/\s/g,""))===null||Xe===void 0)?void 0:Xe.split(";");rt==null||rt.map(function(st){var nt=st.split("=");nt[0]==="_educoder_session"&&ke(nt[1])})},[]),Object(T.useEffect)(function(){x==="office"&&ce()},[x,h]);var ce=function(){var Oe=Object(D.a)(n.a.mark(function Xe(){var rt,st,nt;return n.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return console.log("data:",h),rt=h,h.startsWith("http")||(rt=location.origin+rt),st=new URL(rt).pathname.split("/").pop(),yt.next=6,Object(u.V)({attachment_id:st});case 6:nt=yt.sent,U(nt);case 8:case"end":return yt.stop()}},Xe)}));return function(){return Oe.apply(this,arguments)}}(),ge=function(){if(h.startsWith("http")||h.startsWith("blob:")){Te();return}Object(d.z)(m||"educoder",h,m)},Te=function(){Object(d.x)(m||"educoder",decodeURIComponent(h))};return v.a.createElement("div",{style:Object(W.a)({},y||{}),className:"".concat(A&&p.a.bgBlack," ").concat(x?p.a.wrp:"hide")},S&&v.a.createElement("div",{className:p.a.close,ref:Ue},!X&&v.a.createElement(Y.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Ue.current}},v.a.createElement("span",{onClick:Te},v.a.createElement("i",{className:"icon-quxiaozhiding"}))),v.a.createElement(Y.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Ue.current}},v.a.createElement("span",{className:"",onClick:F},v.a.createElement("i",{className:"icon-guanbi1"})))),v.a.createElement("div",{className:"".concat(p.a[k]," ").concat(k," ").concat(p.a.monaco," ").concat(x==="txt"?"show":"hide")},x==="txt"&&v.a.createElement(s.b,P)),x==="audio"&&v.a.createElement("audio",{src:"".concat(((R=h)===null||R===void 0?void 0:R.indexOf("http://"))>-1||((O=h)===null||O===void 0?void 0:O.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(h),autoPlay:!0}),x==="video"&&v.a.createElement(v.a.Fragment,null,((w=h)===null||w===void 0?void 0:w.indexOf("http"))>-1?v.a.createElement("video",{controls:!0,src:"".concat(h),autoPlay:!0}):v.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(h),autoPlay:!0})),x==="office"&&I&&v.a.createElement("iframe",{src:"".concat(K,"/office.html?key=").concat(I.key,"&url=").concat(q+I.url,"&callbackUrl=").concat(q+I.callbackUrl,"&fileType=").concat(I.fileType,"&title=").concat(I.title,"&model=").concat(g,"&officeServer=").concat(l.a.OFFICE_SERVER,"&disabledDownload=").concat(!!X)}),x==="html"&&v.a.createElement("iframe",{src:h+"&disposition=inline"}),x==="pdf"&&v.a.createElement("iframe",{src:"".concat(K,"/js/pdfview/index.html?url=").concat(h,"&disabledDownload=").concat(!!X)}),x==="image"&&v.a.createElement("img",{src:"".concat(((M=h)===null||M===void 0?void 0:M.indexOf("http://"))>-1||((L=h)===null||L===void 0?void 0:L.indexOf("https://"))>-1||(_=h)!==null&&_!==void 0&&_.startsWith("/api")?"":"data:image/png;base64,").concat(h)}),x==="other"&&v.a.createElement("div",null,v.a.createElement(z.a,{type:"primary",size:"large",onClick:ge},v.a.createElement(c.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),x==="download"&&v.a.createElement(z.a,{type:"primary",size:"large",onClick:ge},v.a.createElement(c.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Be,he,B){},pmY6:function(Be,he,B){"use strict";B.d(he,"h",function(){return T}),B.d(he,"g",function(){return f}),B.d(he,"f",function(){return p}),B.d(he,"e",function(){return c}),B.d(he,"i",function(){return s}),B.d(he,"b",function(){return d}),B.d(he,"a",function(){return u}),B.d(he,"d",function(){return l}),B.d(he,"c",function(){return a});var Z=B("C/vA"),z=B("JYp7");const N=!1;let Y=null;function W(i){Y=i}if(N){const i="__is_disposable_tracked__";W(new class{trackDisposable(R){const O=new Error("Potentially leaked disposable").stack;setTimeout(()=>{R[i]||console.log(O)},3e3)}setParent(R,O){if(R&&R!==u.None)try{R[i]=!0}catch(w){}}markAsDisposed(R){if(R&&R!==u.None)try{R[i]=!0}catch(O){}}markAsSingleton(R){}})}function D(i){return Y==null||Y.trackDisposable(i),i}function G(i){Y==null||Y.markAsDisposed(i)}function j(i,R){Y==null||Y.setParent(i,R)}function n(i,R){if(!Y)return;for(const O of i)Y.setParent(O,R)}function T(i){return Y==null||Y.markAsSingleton(i),i}class v extends Error{constructor(i){super(`Encountered errors while disposing of store. Errors: [${i.join(", ")}]`);this.errors=i}}function f(i){return typeof i.dispose=="function"&&i.dispose.length===0}function p(i){if(z.a.is(i)){let R=[];for(const O of i)if(O)try{O.dispose()}catch(w){R.push(w)}if(R.length===1)throw R[0];if(R.length>1)throw new v(R);return Array.isArray(i)?[]:i}else if(i)return i.dispose(),i}function c(...i){const R=s(()=>p(i));return n(i,R),R}function s(i){const R=D({dispose:Object(Z.a)(()=>{G(R),i()})});return R}class d{constructor(){this._toDispose=new Set,this._isDisposed=!1,D(this)}dispose(){if(this._isDisposed)return;G(this),this._isDisposed=!0,this.clear()}clear(){try{p(this._toDispose.values())}finally{this._toDispose.clear()}}add(i){if(!i)return i;if(i===this)throw new Error("Cannot register a disposable on itself!");return j(i,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(i),i}}d.DISABLE_DISPOSED_WARNING=!1;class u{constructor(){this._store=new d,D(this),j(this._store,this)}dispose(){G(this),this._store.dispose()}_register(i){if(i===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(i)}}u.None=Object.freeze({dispose(){}});class l{constructor(){this._isDisposed=!1,D(this)}get value(){return this._isDisposed?void 0:this._value}set value(i){var R;if(this._isDisposed||i===this._value)return;(R=this._value)===null||R===void 0||R.dispose(),i&&j(i,this),this._value=i}clear(){this.value=void 0}dispose(){var i;this._isDisposed=!0,G(this),(i=this._value)===null||i===void 0||i.dispose(),this._value=void 0}clearAndLeak(){const i=this._value;return this._value=void 0,i&&j(i,null),i}}class a{constructor(i){this.object=i}dispose(){}}},psGv:function(Be,he,B){var Z,z;(function(){var N;(function(){"use strict";var G=[,,function(v){function f(s){this.__parent=s,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 s=new f(this.__parent);return s.set_indent(this.__indent_count,this.__alignment_count),s},f.prototype.item=function(s){return s<0?this.__items[this.__items.length+s]:this.__items[s]},f.prototype.has_match=function(s){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(s))return!0;return!1},f.prototype.set_indent=function(s,d){this.is_empty()&&(this.__indent_count=s||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 s=this.__parent.current_line;return s.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),s.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),s.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,s.__items[0]===" "&&(s.__items.splice(0,1),s.__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(s){this.__items.push(s);var d=s.lastIndexOf(`
`);d!==-1?this.__character_count=s.length-d:this.__character_count+=s.length},f.prototype.pop=function(){var s=null;return this.is_empty()||(s=this.__items.pop(),this.__character_count-=s.length),s},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 s="";return this.is_empty()?this.__parent.indent_empty_lines&&(s=this.__parent.get_indent_string(this.__indent_count)):(s=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),s+=this.__items.join("")),s};function p(s,d){this.__cache=[""],this.__indent_size=s.indent_size,this.__indent_string=s.indent_char,s.indent_with_tabs||(this.__indent_string=new Array(s.indent_size+1).join(s.indent_char)),d=d||"",s.indent_level>0&&(d=new Array(s.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}p.prototype.get_indent_size=function(s,d){var u=this.__base_string_length;return d=d||0,s<0&&(u=0),u+=s*this.__indent_size,u+=d,u},p.prototype.get_indent_string=function(s,d){var u=this.__base_string;return d=d||0,s<0&&(s=0,u=""),d+=s*this.__indent_size,this.__ensure_cache(d),u+=this.__cache[d],u},p.prototype.__ensure_cache=function(s){for(;s>=this.__cache.length;)this.__add_column()},p.prototype.__add_column=function(){var s=this.__cache.length,d=0,u="";this.__indent_size&&s>=this.__indent_size&&(d=Math.floor(s/this.__indent_size),s-=d*this.__indent_size,u=new Array(d+1).join(this.__indent_string)),s&&(u+=new Array(s+1).join(" ")),this.__cache.push(u)};function c(s,d){this.__indent_cache=new p(s,d),this.raw=!1,this._end_with_newline=s.end_with_newline,this.indent_size=s.indent_size,this.wrap_line_length=s.wrap_line_length,this.indent_empty_lines=s.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(s,d){return this.__indent_cache.get_indent_string(s,d)},c.prototype.get_indent_size=function(s,d){return this.__indent_cache.get_indent_size(s,d)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(s){return this.is_empty()||!s&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(s){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 s!==`
`&&(u=u.replace(/[\n]/g,s)),u},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(s,d){return s=s||0,d=d||0,this.next_line.set_indent(s,d),this.__lines.length>1?(this.current_line.set_indent(s,d),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(s){for(var d=0;d<s.newlines;d++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(s.whitespace_before),this.current_line.push(s.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(s){this.__add_space_before_token(),this.current_line.push(s),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(s){for(var d=this.__lines.length;s<d;)this.__lines[s]._remove_indent(),s++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(s){for(s=s===void 0?!1:s,this.current_line.trim();s&&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(s,d){for(var u=this.__lines.length-2;u>=0;){var l=this.__lines[u];if(l.is_empty())break;if(l.item(0).indexOf(s)!==0&&l.item(-1)!==d){this.__lines.splice(u+1,0,new f(this)),this.previous_line=this.__lines[this.__lines.length-2];break}u--}},v.exports.Output=c},function(v){function f(p,c,s,d){this.type=p,this.text=c,this.comments_before=null,this.newlines=s||0,this.whitespace_before=d||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}v.exports.Token=f},,,function(v){function f(s,d){this.raw_options=p(s,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(s,d){var u=this.raw_options[s],l=d||[];return typeof u=="object"?u!==null&&typeof u.concat=="function"&&(l=u.concat()):typeof u=="string"&&(l=u.split(/[^a-zA-Z0-9_\/\-]+/)),l},f.prototype._get_boolean=function(s,d){var u=this.raw_options[s],l=u===void 0?!!d:!!u;return l},f.prototype._get_characters=function(s,d){var u=this.raw_options[s],l=d||"";return typeof u=="string"&&(l=u.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),l},f.prototype._get_number=function(s,d){var u=this.raw_options[s];d=parseInt(d,10),isNaN(d)&&(d=0);var l=parseInt(u,10);return isNaN(l)&&(l=d),l},f.prototype._get_selection=function(s,d,u){var l=this._get_selection_list(s,d,u);if(l.length!==1)throw new Error("Invalid Option Value: The option '"+s+`' can only be one of the following values:
`+d+`
You passed in: '`+this.raw_options[s]+"'");return l[0]},f.prototype._get_selection_list=function(s,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 l=this._get_array(s,u);if(!this._is_valid_selection(l,d))throw new Error("Invalid Option Value: The option '"+s+`' can contain only the following values:
`+d+`
You passed in: '`+this.raw_options[s]+"'");return l},f.prototype._is_valid_selection=function(s,d){return s.length&&d.length&&!s.some(function(u){return d.indexOf(u)===-1})};function p(s,d){var u={};s=c(s);var l;for(l in s)l!==d&&(u[l]=s[l]);if(d&&s[d])for(l in s[d])u[l]=s[d][l];return u}function c(s){var d={},u;for(u in s){var l=u.replace(/-/g,"_");d[l]=s[u]}return d}v.exports.Options=f,v.exports.normalizeOpts=c,v.exports.mergeOpts=p},,function(v){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 s=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(s=this.__input.charAt(c)),s},p.prototype.__match=function(c,s){c.lastIndex=s;var d=c.exec(this.__input);return d&&!(f&&c.sticky)&&(d.index!==s&&(d=null)),d},p.prototype.test=function(c,s){return s=s||0,s+=this.__position,s>=0&&s<this.__input_length?!!this.__match(c,s):!1},p.prototype.testChar=function(c,s){var d=this.peek(s);return c.lastIndex=0,d!==null&&c.test(d)},p.prototype.match=function(c){var s=this.__match(c,this.__position);return s?this.__position+=s[0].length:s=null,s},p.prototype.read=function(c,s,d){var u="",l;return c&&(l=this.match(c),l&&(u+=l[0])),s&&(l||!c)&&(u+=this.readUntil(s,d)),u},p.prototype.readUntil=function(c,s){var d="",u=this.__position;c.lastIndex=this.__position;var l=c.exec(this.__input);return l?(u=l.index,s&&(u+=l[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,s){var d=null,u="g";return s&&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 s=this.__position,d=this.readUntilAfter(c);return this.__position=s,d},p.prototype.lookBack=function(c){var s=this.__position-1;return s>=c.length&&this.__input.substring(s-c.length,s).toLowerCase()===c},v.exports.InputScanner=p},function(v,f,p){var c=p(8).InputScanner,s=p(3).Token,d=p(10).TokenStream,u=p(11).WhitespacePattern,l={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},a=function(i,R){this._input=new c(i),this._options=R||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new u(this._input)};a.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var i,R=new s(l.START,""),O=null,w=[],M=new d;R.type!==l.EOF;){for(i=this._get_next_token(R,O);this._is_comment(i);)M.add(i),i=this._get_next_token(R,O);M.isEmpty()||(i.comments_before=M,M=new d),i.parent=O,this._is_opening(i)?(w.push(O),O=i):O&&this._is_closing(i,O)&&(i.opened=O,O.closed=i,O=w.pop(),i.parent=O),i.previous=R,R.next=i,this.__tokens.add(i),R=i}return this.__tokens},a.prototype._is_first_token=function(){return this.__tokens.isEmpty()},a.prototype._reset=function(){},a.prototype._get_next_token=function(i,R){this._readWhitespace();var O=this._input.read(/.+/g);return O?this._create_token(l.RAW,O):this._create_token(l.EOF,"")},a.prototype._is_comment=function(i){return!1},a.prototype._is_opening=function(i){return!1},a.prototype._is_closing=function(i,R){return!1},a.prototype._create_token=function(i,R){var O=new s(i,R,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return O},a.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},v.exports.Tokenizer=a,v.exports.TOKEN=l},function(v){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},v.exports.TokenStream=f},function(v,f,p){var c=p(12).Pattern;function s(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=""}s.prototype=new c,s.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+"]")},s.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},s.prototype.matching=function(d,u){var l=this._create();return l.__set_whitespace_patterns(d,u),l._update(),l},s.prototype._create=function(){return new s(this._input,this)},s.prototype.__split=function(d,u){d.lastIndex=0;for(var l=0,a=[],i=d.exec(u);i;)a.push(u.substring(l,i.index)),l=i.index+i[0].length,i=d.exec(u);return l<u.length?a.push(u.substring(l,u.length)):a.push(""),a},v.exports.WhitespacePattern=s},function(v){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(){},v.exports.Pattern=f},function(v){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 s=this.__directive_pattern.exec(p);s;)c[s[1]]=s[2],s=this.__directive_pattern.exec(p);return c},f.prototype.readIgnored=function(p){return p.readUntilAfter(this.__directives_end_ignore_pattern)},v.exports.Directives=f},function(v,f,p){var c=p(12).Pattern,s={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function d(u,l){c.call(this,u,l),this.__template_pattern=null,this._disabled=Object.assign({},s),this._excluded=Object.assign({},s),l&&(this.__template_pattern=this._input.get_regexp(l.__template_pattern),this._excluded=Object.assign(this._excluded,l._excluded),this._disabled=Object.assign(this._disabled,l._disabled));var a=new c(u);this.__patterns={handlebars_comment:a.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:a.starting_with(/{{{/).until_after(/}}}/),handlebars:a.starting_with(/{{/).until_after(/}}/),php:a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:a.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:a.starting_with(/{%/).until_after(/%}/),django_value:a.starting_with(/{{/).until_after(/}}/),django_comment:a.starting_with(/{#/).until_after(/#}/),smarty:a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:a.starting_with(/{\*/).until_after(/\*}/),smarty_literal:a.starting_with(/{literal}/).until_after(/{\/literal}/)}}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 l=this._create();return l._disabled[u]=!0,l._update(),l},d.prototype.read_options=function(u){var l=this._create();for(var a in s)l._disabled[a]=u.templating.indexOf(a)===-1;return l._update(),l},d.prototype.exclude=function(u){var l=this._create();return l._excluded[u]=!0,l._update(),l},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 l=this._read_template();l;)this._match_pattern?l+=this._input.read(this._match_pattern):l+=this._input.readUntil(this.__template_pattern),u+=l,l=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="",l=this._input.peek();if(l==="<"){var a=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&a==="?"&&(u=u||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&a==="%"&&(u=u||this.__patterns.erb.read())}else l==="{"&&(!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},v.exports.TemplatablePattern=d},,,,function(v,f,p){var c=p(19).Beautifier,s=p(20).Options;function d(u,l,a,i){var R=new c(u,l,a,i);return R.beautify()}v.exports=d,v.exports.defaultOptions=function(){return new s}},function(v,f,p){var c=p(20).Options,s=p(2).Output,d=p(21).Tokenizer,u=p(21).TOKEN,l=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,i=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 s(C,x)};i.prototype.current_line_has_match=function(C){return this._output.current_line.has_match(C)},i.prototype.set_space_before_token=function(C,x){this._output.space_before_token=C,this._output.non_breaking_space=x},i.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},i.prototype.add_raw_token=function(C){this._output.add_raw_token(C)},i.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 m=0;m<x;m++)this.print_newline(m>0);return x!==0},i.prototype.traverse_whitespace=function(C){return C.whitespace_before||C.newlines?(this.print_preserved_newlines(C)||(this._output.space_before_token=!0),!0):!1},i.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},i.prototype.print_newline=function(C){this._output.add_new_line(C)},i.prototype.print_token=function(C){C.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(C.text))},i.prototype.indent=function(){this.indent_level++},i.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,m=C.next;m.type!==u.EOF&&C.closed!==m;){if(m.type===u.ATTRIBUTE&&m.text==="type"){m.next&&m.next.type===u.EQUALS&&m.next.next&&m.next.next.type===u.VALUE&&(x=m.next.next.text);break}m=m.next}return x},O=function(C,x){var m=null,P=null;return x.closed?(C==="script"?m="text/javascript":C==="style"&&(m="text/css"),m=R(x)||m,m.search("text/css")>-1?P="css":m.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?P="javascript":m.search(/(text|application|dojo)\/(x-)?(html)/)>-1?P="html":m.search(/test\/null/)>-1&&(P="null"),P):null};function w(C,x){return x.indexOf(C)!==-1}function M(C,x,m){this.parent=C||null,this.tag=x?x.tag_name:"",this.indent_level=m||0,this.parser_token=x||null}function L(C){this._printer=C,this._current_frame=null}L.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},L.prototype.record_tag=function(C){var x=new M(this._current_frame,C,this._printer.indent_level);this._current_frame=x},L.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},L.prototype._get_frame=function(C,x){for(var m=this._current_frame;m&&!(C.indexOf(m.tag)!==-1);){if(x&&x.indexOf(m.tag)!==-1){m=null;break}m=m.parent}return m},L.prototype.try_pop=function(C,x){var m=this._get_frame([C],x);return this._try_pop_frame(m)},L.prototype.indent_to_tag=function(C){var x=this._get_frame(C);x&&(this._printer.indent_level=x.indent_level)};function _(C,x,m,P){this._source_text=C||"",x=x||{},this._js_beautify=m,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&&l.test(C)&&(x=C.match(l)[0])),C=C.replace(a,`
`);var m=C.match(/^[\t ]*/)[0],P={text:"",type:""},k=new b,y=new i(this._options,m),S=new d(C,this._options).tokenize();this._tag_stack=new L(y);for(var F=null,A=S.next();A.type!==u.EOF;)A.type===u.TAG_OPEN||A.type===u.COMMENT?(F=this._handle_tag_open(y,A,k,P),k=F):A.type===u.ATTRIBUTE||A.type===u.EQUALS||A.type===u.VALUE||A.type===u.TEXT&&!k.tag_complete?F=this._handle_inside_tag(y,A,k,S):A.type===u.TAG_CLOSE?F=this._handle_tag_close(y,A,k):A.type===u.TEXT?F=this._handle_text(y,A,k):y.add_raw_token(A),P=F,A=S.next();var X=y._output.get_code(x);return X},_.prototype._handle_tag_close=function(C,x,m){var P={text:x.text,type:x.type};return C.alignment_size=0,m.tag_complete=!0,C.set_space_before_token(x.newlines||x.whitespace_before!=="",!0),m.is_unformatted?C.add_raw_token(x):(m.tag_start_char==="<"&&(C.set_space_before_token(x.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&m.has_wrapped_attrs&&C.print_newline(!1)),C.print_token(x)),m.indent_content&&!(m.is_unformatted||m.is_content_unformatted)&&(C.indent(),m.indent_content=!1),!m.is_inline_element&&!(m.is_unformatted||m.is_content_unformatted)&&C.set_wrap_point(),P},_.prototype._handle_inside_tag=function(C,x,m,P){var k=m.has_wrapped_attrs,y={text:x.text,type:x.type};if(C.set_space_before_token(x.newlines||x.whitespace_before!=="",!0),m.is_unformatted)C.add_raw_token(x);else if(m.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),m.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&&m.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 S=m.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&m.attr_count===1){var F=!0,A=0,X;do{if(X=P.peek(A),X.type===u.ATTRIBUTE){F=!1;break}A+=1}while(A<4&&X.type!==u.EOF&&X.type!==u.TAG_CLOSE);S=!F}S&&(C.print_newline(!1),k=!0)}C.print_token(x),k=k||C.previous_token_wrapped(),m.has_wrapped_attrs=k}return y},_.prototype._handle_text=function(C,x,m){var P={text:x.text,type:"TK_CONTENT"};return m.custom_beautifier_name?this._print_custom_beatifier_text(C,x,m):m.is_unformatted||m.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,m){var P=this;if(x.text!==""){var k=x.text,y,S=1,F="",A="";m.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?y=this._js_beautify:m.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?y=this._css_beautify:m.custom_beautifier_name==="html"&&(y=function(xe,Ie){var Me=new _(xe,Ie,P._js_beautify,P._css_beautify);return Me.beautify()}),this._options.indent_scripts==="keep"?S=0:this._options.indent_scripts==="separate"&&(S=-C.indent_level);var X=C.get_full_indent(S);if(k=k.replace(/\n[ \t]*$/,""),m.custom_beautifier_name!=="html"&&k[0]==="<"&&k.match(/^(<!--|<!\[CDATA\[)/)){var ne=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(k);if(!ne){C.add_raw_token(x);return}F=X+ne[1]+`
`,k=ne[4],ne[5]&&(A=X+ne[5]),k=k.replace(/\n[ \t]*$/,""),(ne[2]||ne[3].indexOf(`
`)!==-1)&&(ne=ne[3].match(/[ \t]+$/),ne&&(x.whitespace_before=ne[0]))}if(k)if(y){var fe=function(){this.eol=`
`};fe.prototype=this._options.raw_options;var ye=new fe;k=y(X+k,ye)}else{var Pe=x.whitespace_before;Pe&&(k=k.replace(new RegExp(`
(`+Pe+")?","g"),`
`)),k=X+k.replace(/\n/g,`
`+X)}F&&(k?k=F+k+`
`+A:k=F+A),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,m,P){var k=this._get_tag_open_token(x);return(m.is_unformatted||m.is_content_unformatted)&&!m.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,m,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 m;this.tag_start_char=x.text[0],this.text=x.text,this.tag_start_char==="<"?(m=x.text.match(/^<([^\s>]*)/),this.tag_check=m?m[1]:""):(m=x.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=m?m[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||w(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&&w(x.tag_check,this._options.unformatted),x.is_content_unformatted=!x.is_empty_element&&w(x.tag_check,this._options.content_unformatted),x.is_inline_element=w(x.tag_name,this._options.inline)||x.tag_name.includes("-")||x.tag_start_char==="{",x},_.prototype._set_tag_position=function(C,x,m,P,k){if(m.is_empty_element||(m.is_end_tag?m.start_tag_token=this._tag_stack.try_pop(m.tag_name):(this._do_optional_end_element(m)&&(m.is_inline_element||C.print_newline(!1)),this._tag_stack.record_tag(m),(m.tag_name==="script"||m.tag_name==="style")&&!(m.is_unformatted||m.is_content_unformatted)&&(m.custom_beautifier_name=O(m.tag_check,x)))),w(m.tag_check,this._options.extra_liners)&&(C.print_newline(!1),C._output.just_added_blankline()||C.print_newline(!0)),m.is_empty_element){if(m.tag_start_char==="{"&&m.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),m.indent_content=!0;var y=C.current_line_has_match(/{{#if/);y||C.print_newline(!1)}m.tag_name==="!--"&&k.type===u.TAG_CLOSE&&P.is_end_tag&&m.text.indexOf(`
`)===-1||(m.is_inline_element||m.is_unformatted||C.print_newline(!1),this._calcluate_parent_multiline(C,m))}else if(m.is_end_tag){var S=!1;S=m.start_tag_token&&m.start_tag_token.multiline_content,S=S||!m.is_inline_element&&!(P.is_inline_element||P.is_unformatted)&&!(k.type===u.TAG_CLOSE&&m.start_tag_token===P)&&k.type!=="TK_CONTENT",(m.is_content_unformatted||m.is_unformatted)&&(S=!1),S&&C.print_newline(!1)}else m.indent_content=!m.custom_beautifier_name,m.tag_start_char==="<"&&(m.tag_name==="html"?m.indent_content=this._options.indent_inner_html:m.tag_name==="head"?m.indent_content=this._options.indent_head_inner_html:m.tag_name==="body"&&(m.indent_content=this._options.indent_body_inner_html)),!(m.is_inline_element||m.is_unformatted)&&(k.type!=="TK_CONTENT"||m.is_content_unformatted)&&C.print_newline(!1),this._calcluate_parent_multiline(C,m)},_.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 g=["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"&&g.indexOf(C.tag_name)!==-1){var m=C.parent.parent;(!m||h.indexOf(m.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},v.exports.Beautifier=_},function(v,f,p){var c=p(6).Options;function s(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"])}s.prototype=new c,v.exports.Options=s},function(v,f,p){var c=p(9).Tokenizer,s=p(9).TOKEN,d=p(13).Directives,u=p(14).TemplatablePattern,l=p(12).Pattern,a={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:s.START,RAW:s.RAW,EOF:s.EOF},i=new d(/<\!--/,/-->/),R=function(O,w){c.call(this,O,w),this._current_tag_name="";var M=new u(this._input).read_options(this._options),L=new l(this._input);if(this.__patterns={word:M.until(/[\n\r\t <]/),single_quote:M.until_after(/'/),double_quote:M.until_after(/"/),attribute:M.until(/[\n\r\t =>]|\/>/),element_name:M.until(/[\n\r\t >\/]/),handlebars_comment:L.starting_with(/{{!--/).until_after(/--}}/),handlebars:L.starting_with(/{{/).until_after(/}}/),handlebars_open:L.until(/[\n\r\t }]/),handlebars_raw_close:L.until(/}}/),comment:L.starting_with(/<!--/).until_after(/-->/),cdata:L.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:L.starting_with(/<!\[/).until_after(/]>/),processing:L.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=L.matching(_).until_after(_)}};R.prototype=new c,R.prototype._is_comment=function(O){return!1},R.prototype._is_opening=function(O){return O.type===a.TAG_OPEN},R.prototype._is_closing=function(O,w){return O.type===a.TAG_CLOSE&&w&&((O.text===">"||O.text==="/>")&&w.text[0]==="<"||O.text==="}}"&&w.text[0]==="{"&&w.text[1]==="{")},R.prototype._reset=function(){this._current_tag_name=""},R.prototype._get_next_token=function(O,w){var M=null;this._readWhitespace();var L=this._input.peek();return L===null?this._create_token(a.EOF,""):(M=M||this._read_open_handlebars(L,w),M=M||this._read_attribute(L,O,w),M=M||this._read_close(L,w),M=M||this._read_raw_content(L,O,w),M=M||this._read_content_word(L),M=M||this._read_comment_or_cdata(L),M=M||this._read_processing(L),M=M||this._read_open(L,w),M=M||this._create_token(a.UNKNOWN,this._input.next()),M)},R.prototype._read_comment_or_cdata=function(O){var w=null,M=null,L=null;if(O==="<"){var _=this._input.peek(1);_==="!"&&(M=this.__patterns.comment.read(),M?(L=i.get_directives(M),L&&L.ignore==="start"&&(M+=i.readIgnored(this._input))):M=this.__patterns.cdata.read()),M&&(w=this._create_token(a.COMMENT,M),w.directives=L)}return w},R.prototype._read_processing=function(O){var w=null,M=null,L=null;if(O==="<"){var _=this._input.peek(1);(_==="!"||_==="?")&&(M=this.__patterns.conditional_comment.read(),M=M||this.__patterns.processing.read()),M&&(w=this._create_token(a.COMMENT,M),w.directives=L)}return w},R.prototype._read_open=function(O,w){var M=null,L=null;return w||O==="<"&&(M=this._input.next(),this._input.peek()==="/"&&(M+=this._input.next()),M+=this.__patterns.element_name.read(),L=this._create_token(a.TAG_OPEN,M)),L},R.prototype._read_open_handlebars=function(O,w){var M=null,L=null;return w||this._options.indent_handlebars&&O==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(M=this.__patterns.handlebars_comment.read(),M=M||this.__patterns.handlebars.read(),L=this._create_token(a.COMMENT,M)):(M=this.__patterns.handlebars_open.read(),L=this._create_token(a.TAG_OPEN,M))),L},R.prototype._read_close=function(O,w){var M=null,L=null;return w&&(w.text[0]==="<"&&(O===">"||O==="/"&&this._input.peek(1)===">")?(M=this._input.next(),O==="/"&&(M+=this._input.next()),L=this._create_token(a.TAG_CLOSE,M)):w.text[0]==="{"&&O==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),L=this._create_token(a.TAG_CLOSE,"}}"))),L},R.prototype._read_attribute=function(O,w,M){var L=null,_="";if(M&&M.text[0]==="<")if(O==="=")L=this._create_token(a.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(),L=this._create_token(a.VALUE,b)}else _=this.__patterns.attribute.read(),_&&(w.type===a.EQUALS?L=this._create_token(a.VALUE,_):L=this._create_token(a.ATTRIBUTE,_));return L},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,w,M){var L="";if(M&&M.text[0]==="{")L=this.__patterns.handlebars_raw_close.read();else if(w.type===a.TAG_CLOSE&&w.opened.text[0]==="<"&&w.text[0]!=="/"){var _=w.opened.text.substr(1).toLowerCase();if(_==="script"||_==="style"){var b=this._read_comment_or_cdata(O);if(b)return b.type=a.TEXT,b;L=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(_)&&(L=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig")))}return L?this._create_token(a.TEXT,L):null},R.prototype._read_content_word=function(O){var w="";if(this._options.unformatted_content_delimiter&&(O===this._options.unformatted_content_delimiter[0]&&(w=this.__patterns.unformatted_content_delimiter.read())),w||(w=this.__patterns.word.read()),w)return this._create_token(a.TEXT,w)},v.exports.Tokenizer=R,v.exports.TOKEN=a}],j={};function n(v){var f=j[v];if(f!==void 0)return f.exports;var p=j[v]={exports:{}};return G[v](p,p.exports,n),p.exports}var T=n(18);N=T})();var Y=N;if(!0)!(Z=[B,B("6UM0"),B("TXwP")],z=function(G){var j=B("6UM0"),n=B("TXwP");return{html_beautify:function(T,v){return Y(T,v,j.js_beautify,n.css_beautify)}}}.apply(he,Z),z!==void 0&&(Be.exports=z));else var W,D})()},qgvg:function(Be,he){Be.exports="data:image/gif;base64,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"},"rAM+":function(Be,he,B){"use strict";B.d(he,"a",function(){return z});var Z=B("Qw5x");function z(N,Y){var W;if(typeof Symbol=="undefined"||N[Symbol.iterator]==null){if(Array.isArray(N)||(W=Object(Z.a)(N))||Y&&N&&typeof N.length=="number"){W&&(N=W);var D=0,G=function(){};return{s:G,n:function(){return D>=N.length?{done:!0}:{done:!1,value:N[D++]}},e:function(f){throw f},f:G}}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,T;return{s:function(){W=N[Symbol.iterator]()},n:function(){var f=W.next();return j=f.done,f},e:function(f){n=!0,T=f},f:function(){try{!j&&W.return!=null&&W.return()}finally{if(n)throw T}}}}},rUJ1:function(Be,he){const B=/[&<>"']/,Z=/[&<>"']/g,z=/[<>"']|&(?!#?\w+;)/,N=/[<>"']|&(?!#?\w+;)/g,Y={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},W=L=>Y[L];function D(L,_){if(_){if(B.test(L))return L.replace(Z,W)}else if(z.test(L))return L.replace(N,W);return L}const G=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function j(L){return L.replace(G,(_,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 T(L,_){L=L.source||L,_=_||"";const b={replace:(g,h)=>(h=h.source||h,h=h.replace(n,"$1"),L=L.replace(g,h),b),getRegex:()=>new RegExp(L,_)};return b}const v=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(L,_,b){if(L){let g;try{g=decodeURIComponent(j(b)).replace(v,"").toLowerCase()}catch(h){return null}if(g.indexOf("javascript:")===0||g.indexOf("vbscript:")===0||g.indexOf("data:")===0)return null}_&&!f.test(b)&&(b=l(_,b));try{b=encodeURI(b).replace(/%25/g,"%")}catch(g){return null}return b}const c={},s=/^[^:]+:\/*[^/]*$/,d=/^([^:]+:)[\s\S]*$/,u=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(L,_){c[" "+L]||(s.test(L)?c[" "+L]=L+"/":c[" "+L]=O(L,"/",!0)),L=c[" "+L];const b=L.indexOf(":")===-1;return _.substring(0,2)==="//"?b?_:L.replace(d,"$1")+_:_.charAt(0)==="/"?b?_:L.replace(u,"$1")+_:L+_}const a={exec:function(){}};function i(L){let _=1,b,g;for(;_<arguments.length;_++){b=arguments[_];for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(L[g]=b[g])}return L}function R(L,_){const b=L.replace(/\|/g,(C,x,m)=>{let P=!1,k=x;for(;--k>=0&&m[k]==="\\";)P=!P;return P?"|":" |"}),g=b.split(/ \|/);let h=0;if(g.length>_)g.splice(_);else for(;g.length<_;)g.push("");for(;h<g.length;h++)g[h]=g[h].trim().replace(/\\\|/g,"|");return g}function O(L,_,b){const g=L.length;if(g===0)return"";let h=0;for(;h<g;){const C=L.charAt(g-h-1);if(C===_&&!b)h++;else if(C!==_&&b)h++;else break}return L.substr(0,g-h)}function w(L,_){if(L.indexOf(_[1])===-1)return-1;const b=L.length;let g=0,h=0;for(;h<b;h++)if(L[h]==="\\")h++;else if(L[h]===_[0])g++;else if(L[h]===_[1]&&(g--,g<0))return h;return-1}function M(L){L&&L.sanitize&&!L.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}Be.exports={escape:D,unescape:j,edit:T,cleanUrl:p,resolveUrl:l,noopTest:a,merge:i,splitCells:R,rtrim:O,findClosingBracket:w,checkSanitizeDeprecation:M}},rcnY:function(Be,he,B){var Z=B("aRTE");function z(N,Y){this.totalCount=N,this.dataCount=Y}z.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]],z.getRSBlocks=function(N,Y){var W=z.getRsBlockTable(N,Y);if(W==null)throw new Error("bad rs block @ typeNumber:"+N+"/errorCorrectLevel:"+Y);for(var D=W.length/3,G=new Array,j=0;j<D;j++)for(var n=W[j*3+0],T=W[j*3+1],v=W[j*3+2],f=0;f<n;f++)G.push(new z(T,v));return G},z.getRsBlockTable=function(N,Y){switch(Y){case Z.L:return z.RS_BLOCK_TABLE[(N-1)*4+0];case Z.M:return z.RS_BLOCK_TABLE[(N-1)*4+1];case Z.Q:return z.RS_BLOCK_TABLE[(N-1)*4+2];case Z.H:return z.RS_BLOCK_TABLE[(N-1)*4+3];default:return}},Be.exports=z},sR1s:function(Be,he,B){"use strict";B.d(he,"b",function(){return Y}),B.d(he,"a",function(){return W}),B.d(he,"c",function(){return D}),B.d(he,"d",function(){return G});var Z=B("U8pU"),z="RC_TABLE_KEY";function N(j){return j==null?[]:Array.isArray(j)?j:[j]}function Y(j,n){if(!n&&typeof n!="number")return j;for(var T=N(n),v=j,f=0;f<T.length;f+=1){if(!v)return null;var p=T[f];v=v[p]}return v}function W(j){var n=[],T={};return j.forEach(function(v){for(var f=v||{},p=f.key,c=f.dataIndex,s=p||N(c).join("-")||z;T[s];)s="".concat(s,"_next");T[s]=!0,n.push(s)}),n}function D(){var j={};function n(p,c){c&&Object.keys(c).forEach(function(s){var d=c[s];d&&Object(Z.a)(d)==="object"?(p[s]=p[s]||{},n(p[s],d)):p[s]=d})}for(var T=arguments.length,v=new Array(T),f=0;f<T;f++)v[f]=arguments[f];return v.forEach(function(p){n(j,p)}),j}function G(j){return j!=null}},sboe:function(Be,he,B){"use strict";B.d(he,"a",function(){return N});var Z=B("q1tI"),z=B.n(Z),N=Z.createContext(null)},t23M:function(Be,he,B){"use strict";var Z=B("VTBJ"),z=B("1OyB"),N=B("vuIU"),Y=B("Ji7U"),W=B("LK+K"),D=B("q1tI"),G=B.n(D),j=B("m+aA"),n=B("Zm9Q"),T=B("Kwbf"),v=B("c+Xe"),f=B("bdgK"),p="rc-observer-key",c=function(s){Object(Y.a)(u,s);var d=Object(W.a)(u);function u(){var l;return Object(z.a)(this,u),l=d.apply(this,arguments),l.resizeObserver=null,l.childNode=null,l.currentElement=null,l.state={width:0,height:0,offsetHeight:0,offsetWidth:0},l.onResize=function(a){var i=l.props.onResize,R=a[0].target,O=R.getBoundingClientRect(),w=O.width,M=O.height,L=R.offsetWidth,_=R.offsetHeight,b=Math.floor(w),g=Math.floor(M);if(l.state.width!==b||l.state.height!==g||l.state.offsetWidth!==L||l.state.offsetHeight!==_){var h={width:b,height:g,offsetWidth:L,offsetHeight:_};l.setState(h),i&&Promise.resolve().then(function(){i(Object(Z.a)(Object(Z.a)({},h),{},{offsetWidth:L,offsetHeight:_}))})}},l.setChildNode=function(a){l.childNode=a},l}return Object(N.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 a=this.props.disabled;if(a){this.destroyObserver();return}var i=Object(j.a)(this.childNode||this),R=i!==this.currentElement;R&&(this.destroyObserver(),this.currentElement=i),!this.resizeObserver&&i&&(this.resizeObserver=new f.default(this.onResize),this.resizeObserver.observe(i))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var a=this.props.children,i=Object(n.a)(a);if(i.length>1)Object(T.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(i.length===0)return Object(T.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var R=i[0];if(D.isValidElement(R)&&Object(v.c)(R)){var O=R.ref;i[0]=D.cloneElement(R,{ref:Object(v.a)(O,this.setChildNode)})}return i.length===1?i[0]:i.map(function(w,M){return!D.isValidElement(w)||"key"in w&&w.key!==null?w:D.cloneElement(w,{key:"".concat(p,"-").concat(M)})})}}]),u}(D.Component);c.displayName="ResizeObserver",he.a=c},t9D7:function(Be,he,B){"use strict";B.d(he,"b",function(){return G}),B.d(he,"g",function(){return n}),B.d(he,"d",function(){return T}),B.d(he,"e",function(){return v}),B.d(he,"a",function(){return f}),B.d(he,"f",function(){return s}),B.d(he,"c",function(){return d});var Z=B("Vhoy"),z=B("MI8n"),N=B("pmY6"),Y=B("Cg/j"),W=B("ic2d"),D=B("nEHx");const G=Object(Y.c)("themeService");var j;(function(u){function l(a){return a&&typeof a=="object"&&typeof a.id=="string"}u.isThemeColor=l})(j||(j={}));function n(u){return{id:u}}var T;(function(u){function l(M){return M&&typeof M=="object"&&typeof M.id=="string"&&(typeof M.color=="undefined"||j.isThemeColor(M.color))}u.isThemeIcon=l;const a=new RegExp(`^\\$\\((${Z.a.iconNameExpression}(?:${Z.a.iconModifierExpression})?)\\)$`);function i(M){const L=a.exec(M);if(!L)return;let[,_]=L;return{id:_}}u.fromString=i;function R(M,L){let _=M.id;const b=_.lastIndexOf("~");return b!==-1&&(_=_.substring(0,b)),L&&(_=`${_}~${L}`),{id:_}}u.modify=R;function O(M,L){var _,b;return M.id===L.id&&((_=M.color)===null||_===void 0?void 0:_.id)===((b=L.color)===null||b===void 0?void 0:b.id)}u.isEqual=O;function w(M,L){return{id:M.id,color:L?n(L):void 0}}u.asThemeIcon=w,u.asClassNameArray=Z.a.asClassNameArray,u.asClassName=Z.a.asClassName,u.asCSSSelector=Z.a.asCSSSelector})(T||(T={}));function v(u){switch(u){case D.a.DARK:return"vs-dark";case D.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 z.b}onColorThemeChange(u){return this.themingParticipants.push(u),this.onThemingParticipantAddedEmitter.fire(u),Object(N.i)(()=>{const l=this.themingParticipants.indexOf(u);this.themingParticipants.splice(l,1)})}getThemingParticipants(){return this.themingParticipants}}let c=new p;W.a.add(f.ThemingContribution,c);function s(u){return c.onColorThemeChange(u)}class d extends N.a{constructor(u){super();this.themeService=u,this.theme=u.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(l=>this.onThemeChange(l)))}onThemeChange(u){this.theme=u,this.updateStyles()}updateStyles(){}}},tWlo:function(Be,he){Be.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(Be,he,B){typeof window!="undefined"&&function(z,N){Be.exports=N()}(this,function(){return function(Z){var z={};function N(Y){if(z[Y])return z[Y].exports;var W=z[Y]={i:Y,l:!1,exports:{}};return Z[Y].call(W.exports,W,W.exports,N),W.l=!0,W.exports}return N.m=Z,N.c=z,N.d=function(Y,W,D){N.o(Y,W)||Object.defineProperty(Y,W,{enumerable:!0,get:D})},N.r=function(Y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Y,"__esModule",{value:!0})},N.t=function(Y,W){if(W&1&&(Y=N(Y)),W&8)return Y;if(W&4&&typeof Y=="object"&&Y&&Y.__esModule)return Y;var D=Object.create(null);if(N.r(D),Object.defineProperty(D,"default",{enumerable:!0,value:Y}),W&2&&typeof Y!="string")for(var G in Y)N.d(D,G,function(j){return Y[j]}.bind(null,G));return D},N.n=function(Y){var W=Y&&Y.__esModule?function(){return Y.default}:function(){return Y};return N.d(W,"a",W),W},N.o=function(Y,W){return Object.prototype.hasOwnProperty.call(Y,W)},N.p="/dist/",N(N.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(Z,z,N){"use strict";var Y=Object.prototype.hasOwnProperty,W="~";function D(){}Object.create&&(D.prototype=Object.create(null),new D().__proto__||(W=!1));function G(v,f,p){this.fn=v,this.context=f,this.once=p||!1}function j(v,f,p,c,s){if(typeof p!="function")throw new TypeError("The listener must be a function");var d=new G(p,c||v,s),u=W?W+f:f;return v._events[u]?v._events[u].fn?v._events[u]=[v._events[u],d]:v._events[u].push(d):(v._events[u]=d,v._eventsCount++),v}function n(v,f){--v._eventsCount===0?v._events=new D:delete v._events[f]}function T(){this._events=new D,this._eventsCount=0}T.prototype.eventNames=function(){var f=[],p,c;if(this._eventsCount===0)return f;for(c in p=this._events)Y.call(p,c)&&f.push(W?c.slice(1):c);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},T.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 s=0,d=c.length,u=new Array(d);s<d;s++)u[s]=c[s].fn;return u},T.prototype.listenerCount=function(f){var p=W?W+f:f,c=this._events[p];return c?c.fn?1:c.length:0},T.prototype.emit=function(f,p,c,s,d,u){var l=W?W+f:f;if(!this._events[l])return!1;var a=this._events[l],i=arguments.length,R,O;if(a.fn){a.once&&this.removeListener(f,a.fn,void 0,!0);switch(i){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,p),!0;case 3:return a.fn.call(a.context,p,c),!0;case 4:return a.fn.call(a.context,p,c,s),!0;case 5:return a.fn.call(a.context,p,c,s,d),!0;case 6:return a.fn.call(a.context,p,c,s,d,u),!0}for(O=1,R=new Array(i-1);O<i;O++)R[O-1]=arguments[O];a.fn.apply(a.context,R)}else{var w=a.length,M;for(O=0;O<w;O++){a[O].once&&this.removeListener(f,a[O].fn,void 0,!0);switch(i){case 1:a[O].fn.call(a[O].context);break;case 2:a[O].fn.call(a[O].context,p);break;case 3:a[O].fn.call(a[O].context,p,c);break;case 4:a[O].fn.call(a[O].context,p,c,s);break;default:if(!R)for(M=1,R=new Array(i-1);M<i;M++)R[M-1]=arguments[M];a[O].fn.apply(a[O].context,R)}}}return!0},T.prototype.on=function(f,p,c){return j(this,f,p,c,!1)},T.prototype.once=function(f,p,c){return j(this,f,p,c,!0)},T.prototype.removeListener=function(f,p,c,s){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&&(!s||u.once)&&(!c||u.context===c)&&n(this,d);else{for(var l=0,a=[],i=u.length;l<i;l++)(u[l].fn!==p||s&&!u[l].once||c&&u[l].context!==c)&&a.push(u[l]);a.length?this._events[d]=a.length===1?a[0]:a:n(this,d)}return this},T.prototype.removeAllListeners=function(f){var p;return f?(p=W?W+f:f,this._events[p]&&n(this,p)):(this._events=new D,this._eventsCount=0),this},T.prototype.off=T.prototype.removeListener,T.prototype.addListener=T.prototype.on,T.prefixed=W,T.EventEmitter=T,Z.exports=T},"./node_modules/url-toolkit/src/url-toolkit.js":function(Z,z,N){(function(Y){var W=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,D=/^([^\/?#]*)([^]*)$/,G=/(?:\/|^)\.(?=\/)/g,j=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,n={buildAbsoluteURL:function(T,v,f){if(f=f||{},T=T.trim(),v=v.trim(),!v){if(!f.alwaysNormalize)return T;var p=n.parseURL(T);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(v);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)):v;var s=n.parseURL(T);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&s.path[0]!=="/"){var d=D.exec(s.path);s.netLoc=d[1],s.path=d[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:c.netLoc,path:null,params:c.params,query:c.query,fragment:c.fragment};if(!c.netLoc&&(u.netLoc=s.netLoc,c.path[0]!=="/"))if(!c.path)u.path=s.path,c.params||(u.params=s.params,c.query||(u.query=s.query));else{var l=s.path,a=l.substring(0,l.lastIndexOf("/")+1)+c.path;u.path=n.normalizePath(a)}return u.path===null&&(u.path=f.alwaysNormalize?n.normalizePath(c.path):c.path),n.buildURLFromParts(u)},parseURL:function(T){var v=W.exec(T);return v?{scheme:v[1]||"",netLoc:v[2]||"",path:v[3]||"",params:v[4]||"",query:v[5]||"",fragment:v[6]||""}:null},normalizePath:function(T){for(T=T.split("").reverse().join("").replace(G,"");T.length!==(T=T.replace(j,"")).length;);return T.split("").reverse().join("")},buildURLFromParts:function(T){return T.scheme+T.netLoc+T.path+T.params+T.query+T.fragment}};Z.exports=n})(this)},"./node_modules/webworkify-webpack/index.js":function(Z,z,N){function Y(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,l){c.o(d,u)||Object.defineProperty(d,u,{configurable:!1,enumerable:!0,get:l})},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 s=c(c.s=ENTRY_MODULE);return s.default||s}var W="[\\.|\\-|\\+|\\w|/|@]+",D="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+W+").*?\\)";function G(f){return(f+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function j(f){return!isNaN(1*f)}function n(f,p,c){var s={};s[c]=[];var d=p.toString(),u=d.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!u)return s;for(var l=u[1],a=new RegExp("(\\\\n|\\W)"+G(l)+D,"g"),i;i=a.exec(d);){if(i[3]==="dll-reference")continue;s[c].push(i[3])}for(a=new RegExp("\\("+G(l)+'\\("(dll-reference\\s('+W+'))"\\)\\)'+D,"g");i=a.exec(d);)f[i[2]]||(s[c].push(i[1]),f[i[2]]=N(i[1]).m),s[i[2]]=s[i[2]]||[],s[i[2]].push(i[4]);for(var R=Object.keys(s),O=0;O<R.length;O++)for(var w=0;w<s[R[O]].length;w++)j(s[R[O]][w])&&(s[R[O]][w]=1*s[R[O]][w]);return s}function T(f){var p=Object.keys(f);return p.reduce(function(c,s){return c||f[s].length>0},!1)}function v(f,p){for(var c={main:[p]},s={main:[]},d={main:{}};T(c);)for(var u=Object.keys(c),l=0;l<u.length;l++){var a=u[l],i=c[a],R=i.pop();if(d[a]=d[a]||{},d[a][R]||!f[a][R])continue;d[a][R]=!0,s[a]=s[a]||[],s[a].push(R);for(var O=n(f,f[a][R],a),w=Object.keys(O),M=0;M<w.length;M++)c[w[M]]=c[w[M]]||[],c[w[M]]=c[w[M]].concat(O[w[M]])}return s}Z.exports=function(f,p){p=p||{};var c={main:N.m},s=p.all?{main:Object.keys(c.main)}:v(c,f),d="";Object.keys(s).filter(function(R){return R!=="main"}).forEach(function(R){for(var O=0;s[R][O];)O++;s[R].push(O),c[R][O]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",d=d+"var "+R+" = ("+Y.toString().replace("ENTRY_MODULE",JSON.stringify(O))+")({"+s[R].map(function(w){return""+JSON.stringify(w)+": "+c[R][w].toString()}).join(",")+`});
`}),d=d+"new (("+Y.toString().replace("ENTRY_MODULE",JSON.stringify(f))+")({"+s.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 l=window.URL||window.webkitURL||window.mozURL||window.msURL,a=l.createObjectURL(u),i=new window.Worker(a);return i.objectURL=a,i}},"./src/config.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"hlsDefaultConfig",function(){return M}),N.d(z,"mergeConfig",function(){return _}),N.d(z,"enableStreamingMode",function(){return b});var Y=N("./src/controller/abr-controller.ts"),W=N("./src/controller/audio-stream-controller.ts"),D=N("./src/controller/audio-track-controller.ts"),G=N("./src/controller/subtitle-stream-controller.ts"),j=N("./src/controller/subtitle-track-controller.ts"),n=N("./src/controller/buffer-controller.ts"),T=N("./src/controller/timeline-controller.ts"),v=N("./src/controller/cap-level-controller.ts"),f=N("./src/controller/fps-controller.ts"),p=N("./src/controller/eme-controller.ts"),c=N("./src/controller/cmcd-controller.ts"),s=N("./src/utils/xhr-loader.ts"),d=N("./src/utils/fetch-loader.ts"),u=N("./src/utils/cues.ts"),l=N("./src/utils/mediakeys-helper.ts"),a=N("./src/utils/logger.ts");function i(){return i=Object.assign||function(g){for(var h=1;h<arguments.length;h++){var C=arguments[h];for(var x in C)Object.prototype.hasOwnProperty.call(C,x)&&(g[x]=C[x])}return g},i.apply(this,arguments)}function R(g,h){var C=Object.keys(g);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(g);h&&(x=x.filter(function(m){return Object.getOwnPropertyDescriptor(g,m).enumerable})),C.push.apply(C,x)}return C}function O(g){for(var h=1;h<arguments.length;h++){var C=arguments[h]!=null?arguments[h]:{};h%2?R(Object(C),!0).forEach(function(x){w(g,x,C[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(C)):R(Object(C)).forEach(function(x){Object.defineProperty(g,x,Object.getOwnPropertyDescriptor(C,x))})}return g}function w(g,h,C){return h in g?Object.defineProperty(g,h,{value:C,enumerable:!0,configurable:!0,writable:!0}):g[h]=C,g}var M=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:s.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Y.default,bufferController:n.default,capLevelController:v.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:l.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},L()),{},{subtitleStreamController:G.SubtitleStreamController,subtitleTrackController:j.default,timelineController:T.TimelineController,audioStreamController:W.default,audioTrackController:D.default,emeController:p.default,cmcdController:c.default});function L(){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 _(g,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 i({},g,h)}function b(g){var h=g.loader;if(h!==d.default&&h!==s.default)a.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),g.progressive=!1;else{var C=Object(d.fetchSupported)();C&&(g.loader=d.default,g.progressive=!0,g.enableSoftwareAES=!0,a.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/polyfills/number.ts"),W=N("./src/utils/ewma-bandwidth-estimator.ts"),D=N("./src/events.ts"),G=N("./src/utils/buffer-helper.ts"),j=N("./src/errors.ts"),n=N("./src/types/loader.ts"),T=N("./src/utils/logger.ts");function v(c,s){for(var d=0;d<s.length;d++){var u=s[d];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(c,u.key,u)}}function f(c,s,d){return s&&v(c.prototype,s),d&&v(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 s=c.prototype;return s.registerListeners=function(){var u=this.hls;u.on(D.Events.FRAG_LOADING,this.onFragLoading,this),u.on(D.Events.FRAG_LOADED,this.onFragLoaded,this),u.on(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.on(D.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var u=this.hls;u.off(D.Events.FRAG_LOADING,this.onFragLoading,this),u.off(D.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.off(D.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},s.onFragLoading=function(u,l){var a=l.frag;if(a.type===n.PlaylistLevelType.MAIN&&!this.timer){var i;this.fragCurrent=a,this.partCurrent=(i=l.part)!=null?i:null,this.timer=self.setInterval(this.onCheck,100)}},s.onLevelLoaded=function(u,l){var a=this.hls.config;l.details.live?this.bwEstimator.update(a.abrEwmaSlowLive,a.abrEwmaFastLive):this.bwEstimator.update(a.abrEwmaSlowVoD,a.abrEwmaFastVoD)},s._abandonRulesCheck=function(){var u=this.fragCurrent,l=this.partCurrent,a=this.hls,i=a.autoLevelEnabled,R=a.config,O=a.media;if(!u||!O)return;var w=l?l.stats:u.stats,M=l?l.duration:u.duration;if(w.aborted){T.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!i||O.paused||!O.playbackRate||!O.readyState)return;var L=performance.now()-w.loading.start,_=Math.abs(O.playbackRate);if(L<=500*M/_)return;var b=a.levels,g=a.minAutoLevel,h=b[u.level],C=w.total||Math.max(w.loaded,Math.round(M*h.maxBitrate/8)),x=Math.max(1,w.bwEstimate?w.bwEstimate/8:w.loaded*1e3/L),m=(C-w.loaded)/x,P=O.currentTime,k=(G.BufferHelper.bufferInfo(O,P,R.maxBufferHole).end-P)/_;if(k>=2*M/_||m<=k)return;var y=Number.POSITIVE_INFINITY,S;for(S=u.level-1;S>g;S--){var F=b[S].maxBitrate;if(y=M*F/(8*.8*x),y<k)break}if(y>=m)return;var A=this.bwEstimator.getEstimate();T.logger.warn("Fragment "+u.sn+(l?" part "+l.index:"")+" of level "+u.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+S+`
Current BW estimate: `+(Object(Y.isFiniteNumber)(A)?(A/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+m.toFixed(3)+` s
Estimated load time for the next fragment: `+y.toFixed(3)+` s
Time to underbuffer: `+k.toFixed(3)+" s"),a.nextLoadLevel=S,this.bwEstimator.sample(L,w.loaded),this.clearTimer(),u.loader&&(this.fragCurrent=this.partCurrent=null,u.loader.abort()),a.trigger(D.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:u,part:l,stats:w})},s.onFragLoaded=function(u,l){var a=l.frag,i=l.part;if(a.type===n.PlaylistLevelType.MAIN&&Object(Y.isFiniteNumber)(a.sn)){var R=i?i.stats:a.stats,O=i?i.duration:a.duration;if(this.clearTimer(),this.lastLoadedFragLevel=a.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var w=this.hls.levels[a.level],M=(w.loaded?w.loaded.bytes:0)+R.loaded,L=(w.loaded?w.loaded.duration:0)+O;w.loaded={bytes:M,duration:L},w.realBitrate=Math.round(8*M/L)}if(a.bitrateTest){var _={stats:R,frag:a,part:i,id:a.type};this.onFragBuffered(D.Events.FRAG_BUFFERED,_),a.bitrateTest=!1}}},s.onFragBuffered=function(u,l){var a=l.frag,i=l.part,R=i?i.stats:a.stats;if(R.aborted)return;if(a.type!==n.PlaylistLevelType.MAIN||a.sn==="initSegment")return;var O=R.parsing.end-R.loading.start;this.bwEstimator.sample(O,R.loaded),R.bwEstimate=this.bwEstimator.getEstimate(),a.bitrateTest?this.bitrateTestDelay=O/1e3:this.bitrateTestDelay=0},s.onError=function(u,l){switch(l.details){case j.ErrorDetails.FRAG_LOAD_ERROR:case j.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},s.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},s.getNextABRAutoLevel=function(){var u=this.fragCurrent,l=this.partCurrent,a=this.hls,i=a.maxAutoLevel,R=a.config,O=a.minAutoLevel,w=a.media,M=l?l.duration:u?u.duration:0,L=w?w.currentTime:0,_=w&&w.playbackRate!==0?Math.abs(w.playbackRate):1,b=this.bwEstimator?this.bwEstimator.getEstimate():R.abrEwmaDefaultEstimate,g=(G.BufferHelper.bufferInfo(w,L,R.maxBufferHole).end-L)/_,h=this.findBestLevel(b,O,i,g,R.abrBandWidthFactor,R.abrBandWidthUpFactor);if(h>=0)return h;T.logger.trace((g?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var C=M?Math.min(M,R.maxStarvationDelay):R.maxStarvationDelay,x=R.abrBandWidthFactor,m=R.abrBandWidthUpFactor;if(!g){var P=this.bitrateTestDelay;if(P){var k=M?Math.min(M,R.maxLoadingDelay):R.maxLoadingDelay;C=k-P,T.logger.trace("bitrate test took "+Math.round(1e3*P)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*C)+" ms"),x=m=1}}return h=this.findBestLevel(b,O,i,g+C,x,m),Math.max(h,0)},s.findBestLevel=function(u,l,a,i,R,O){for(var w,M=this.fragCurrent,L=this.partCurrent,_=this.lastLoadedFragLevel,b=this.hls.levels,g=b[_],h=!!(g!=null&&(w=g.details)!==null&&w!==void 0&&w.live),C=g==null?void 0:g.codecSet,x=L?L.duration:M?M.duration:0,m=a;m>=l;m--){var P=b[m];if(!P||C&&P.codecSet!==C)continue;var k=P.details,y=(L?k==null?void 0:k.partTarget:k==null?void 0:k.averagetargetduration)||x,S=void 0;m<=_?S=R*u:S=O*u;var F=b[m].maxBitrate,A=F*y/S;if(T.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+m+"/"+Math.round(S)+"/"+F+"/"+y+"/"+i+"/"+A),S>F&&(!A||h&&!this.bitrateTestDelay||A<i))return m}return-1},f(c,[{key:"nextAutoLevel",get:function(){var u=this._nextAutoLevel,l=this.bwEstimator;if(u!==-1&&(!l||!l.canEstimate()))return u;var a=this.getNextABRAutoLevel();return u!==-1&&(a=Math.min(u,a)),a},set:function(u){this._nextAutoLevel=u}}]),c}();z.default=p},"./src/controller/audio-stream-controller.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/polyfills/number.ts"),W=N("./src/controller/base-stream-controller.ts"),D=N("./src/events.ts"),G=N("./src/utils/buffer-helper.ts"),j=N("./src/controller/fragment-tracker.ts"),n=N("./src/types/level.ts"),T=N("./src/types/loader.ts"),v=N("./src/loader/fragment.ts"),f=N("./src/demux/chunk-cache.ts"),p=N("./src/demux/transmuxer-interface.ts"),c=N("./src/types/transmuxer.ts"),s=N("./src/controller/fragment-finders.ts"),d=N("./src/utils/discontinuities.ts"),u=N("./src/errors.ts"),l=N("./src/utils/logger.ts");function a(){return a=Object.assign||function(M){for(var L=1;L<arguments.length;L++){var _=arguments[L];for(var b in _)Object.prototype.hasOwnProperty.call(_,b)&&(M[b]=_[b])}return M},a.apply(this,arguments)}function i(M,L){M.prototype=Object.create(L.prototype),M.prototype.constructor=M,R(M,L)}function R(M,L){return R=Object.setPrototypeOf||function(b,g){return b.__proto__=g,b},R(M,L)}var O=100,w=function(M){i(L,M);function L(b,g){var h;return h=M.call(this,b,g,"[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 _=L.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._registerListeners=function(){var g=this.hls;g.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),g.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),g.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),g.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),g.on(D.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),g.on(D.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),g.on(D.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),g.on(D.Events.ERROR,this.onError,this),g.on(D.Events.BUFFER_RESET,this.onBufferReset,this),g.on(D.Events.BUFFER_CREATED,this.onBufferCreated,this),g.on(D.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),g.on(D.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),g.on(D.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_._unregisterListeners=function(){var g=this.hls;g.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),g.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),g.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),g.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),g.off(D.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),g.off(D.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),g.off(D.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),g.off(D.Events.ERROR,this.onError,this),g.off(D.Events.BUFFER_RESET,this.onBufferReset,this),g.off(D.Events.BUFFER_CREATED,this.onBufferCreated,this),g.off(D.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),g.off(D.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),g.off(D.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_.onInitPtsFound=function(g,h){var C=h.frag,x=h.id,m=h.initPTS;if(x==="main"){var P=C.cc;this.initPTS[C.cc]=m,this.log("InitPTS for cc: "+P+" found from main: "+m),this.videoTrackCC=P,this.state===W.State.WAITING_INIT_PTS&&this.tick()}},_.startLoad=function(g){if(!this.levels){this.startPosition=g,this.state=W.State.STOPPED;return}var h=this.lastCurrentTime;this.stopLoad(),this.setInterval(O),this.fragLoadError=0,h>0&&g===-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=g,this.tick()},_.doTick=function(){switch(this.state){case W.State.IDLE:this.doTickIdle();break;case W.State.WAITING_TRACK:{var g,h=this.levels,C=this.trackId,x=h==null||((g=h[C])===null||g===void 0)?void 0:g.details;if(x){if(this.waitForCdnTuneIn(x))break;this.state=W.State.WAITING_INIT_PTS}break}case W.State.FRAG_LOADING_WAITING_RETRY:{var m,P=performance.now(),k=this.retryDate;(!k||P>=k||(m=this.media)!==null&&m!==void 0&&m.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 S=y.frag,F=y.part,A=y.cache,X=y.complete;if(this.initPTS[S.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=W.State.FRAG_LOADING;var ne=A.flush(),fe={frag:S,part:F,payload:ne,networkDetails:null};this._handleFragmentLoadProgress(fe),X&&M.prototype._handleFragmentLoadComplete.call(this,fe)}else if(this.videoTrackCC!==this.waitingVideoCC)l.logger.log("Waiting fragment cc ("+S.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ye=this.getLoadPosition(),Pe=G.BufferHelper.bufferInfo(this.mediaBuffer,ye,this.config.maxBufferHole),xe=Object(s.fragmentWithinToleranceTest)(Pe.end,this.config.maxFragLookUpTolerance,S);xe<0&&(l.logger.log("Waiting fragment cc ("+S.cc+") @ "+S.start+" cancelled because another fragment at "+Pe.end+" is needed"),this.clearWaitingFragment())}}else this.state=W.State.IDLE}}this.onTickEnd()},_.clearWaitingFragment=function(){var g=this.waitingData;g&&(this.fragmentTracker.removeFragment(g.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=W.State.IDLE)},_.onTickEnd=function(){var g=this.media;if(!g||!g.readyState)return;var h=this.mediaBuffer?this.mediaBuffer:g,C=h.buffered;!this.loadedmetadata&&C.length&&(this.loadedmetadata=!0),this.lastCurrentTime=g.currentTime},_.doTickIdle=function(){var g,h,C=this.hls,x=this.levels,m=this.media,P=this.trackId,k=C.config;if(!x||!x[P])return;if(!m&&(this.startFragRequested||!k.startFragPrefetch))return;var y=x[P],S=y.details;if(!S||S.live&&this.levelLastLoaded!==P||this.waitForCdnTuneIn(S)){this.state=W.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,v.ElementaryStreamTypes.AUDIO,T.PlaylistLevelType.AUDIO));var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,T.PlaylistLevelType.AUDIO);if(F===null)return;var A=F.len,X=this.getMaxBufferLength(),ne=this.audioSwitch;if(A>=X&&!ne)return;if(!ne&&this._streamEnded(F,S)){C.trigger(D.Events.BUFFER_EOS,{type:"audio"}),this.state=W.State.ENDED;return}var fe=S.fragments,ye=fe[0].start,Pe=F.end;if(ne){var xe=this.getLoadPosition();Pe=xe,S.PTSKnown&&xe<ye&&((F.end>ye||F.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),m.currentTime=ye+.05))}var Ie=this.getNextFragment(Pe,S);if(!Ie){this.bufferFlushed=!0;return}((g=Ie.decryptdata)===null||g===void 0?void 0:g.keyFormat)==="identity"&&!((h=Ie.decryptdata)!==null&&h!==void 0&&h.key)?this.loadKey(Ie,S):this.loadFragment(Ie,S,Pe)},_.getMaxBufferLength=function(){var g=M.prototype.getMaxBufferLength.call(this),h=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,T.PlaylistLevelType.MAIN);return h===null?g:Math.max(g,h.len)},_.onMediaDetaching=function(){this.videoBuffer=null,M.prototype.onMediaDetaching.call(this)},_.onAudioTracksUpdated=function(g,h){var C=h.audioTracks;this.resetTransmuxer(),this.levels=C.map(function(x){return new n.Level(x)})},_.onAudioTrackSwitching=function(g,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(g,h){this.mainDetails=h.details},_.onAudioTrackLoaded=function(g,h){var C,x=this.levels,m=h.details,P=h.id;if(!x){this.warn("Audio tracks were reset while loading level "+P);return}this.log("Track "+P+" loaded ["+m.startSN+","+m.endSN+"],duration:"+m.totalduration);var k=x[P],y=0;if(m.live||(C=k.details)!==null&&C!==void 0&&C.live){var S=this.mainDetails;if(m.fragments[0]||(m.deltaUpdateFailed=!0),m.deltaUpdateFailed||!S)return;!k.details&&m.hasProgramDateTime&&S.hasProgramDateTime?(Object(d.alignMediaPlaylistByPDT)(m,S),y=m.fragments[0].start):y=this.alignPlaylists(m,k.details)}k.details=m,this.levelLastLoaded=P,!this.startFragRequested&&(this.mainDetails||!m.live)&&this.setStartPosition(k.details,y),this.state===W.State.WAITING_TRACK&&!this.waitForCdnTuneIn(m)&&(this.state=W.State.IDLE),this.tick()},_._handleFragmentLoadProgress=function(g){var h,C=g.frag,x=g.part,m=g.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 S=y[k];console.assert(S,"Audio track is defined on fragment load progress");var F=S.details;console.assert(F,"Audio track details are defined on fragment load progress");var A=P.defaultAudioCodec||S.audioCodec||"mp4a.40.2",X=this.transmuxer;X||(X=this.transmuxer=new p.default(this.hls,T.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ne=this.initPTS[C.cc],fe=(h=C.initSegment)===null||h===void 0?void 0:h.data;if(ne!==void 0){var ye=!1,Pe=x?x.index:-1,xe=Pe!==-1,Ie=new c.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,m.byteLength,Pe,xe);X.push(m,fe,A,"",C,x,F.totalduration,ye,Ie,ne)}else{l.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 Me=this.waitingData=this.waitingData||{frag:C,part:x,cache:new f.default,complete:!1},ke=Me.cache;ke.push(new Uint8Array(m)),this.waitingVideoCC=this.videoTrackCC,this.state=W.State.WAITING_INIT_PTS}},_._handleFragmentLoadComplete=function(g){if(this.waitingData){this.waitingData.complete=!0;return}M.prototype._handleFragmentLoadComplete.call(this,g)},_.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},_.onBufferCreated=function(g,h){var C=h.tracks.audio;C&&(this.mediaBuffer=C.buffer),h.tracks.video&&(this.videoBuffer=h.tracks.video.buffer)},_.onFragBuffered=function(g,h){var C=h.frag,x=h.part;if(C.type!==T.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(D.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(C,x)},_.onError=function(g,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(T.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,T.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,M.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},_.onBufferFlushed=function(g,h){var C=h.type;C===v.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},_._handleTransmuxComplete=function(g){var h,C="audio",x=this.hls,m=g.remuxResult,P=g.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,S=k.part,F=m.audio,A=m.text,X=m.id3,ne=m.initSegment;if(this.fragContextChanged(y))return;if(this.state=W.State.PARSING,this.audioSwitch&&F&&this.completeAudioSwitch(),ne!=null&&ne.tracks&&(this._bufferInitSegment(ne.tracks,y,P),x.trigger(D.Events.FRAG_PARSING_INIT_SEGMENT,{frag:y,id:C,tracks:ne.tracks})),F){var fe=F.startPTS,ye=F.endPTS,Pe=F.startDTS,xe=F.endDTS;S&&(S.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:fe,endPTS:ye,startDTS:Pe,endDTS:xe}),y.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,fe,ye,Pe,xe),this.bufferFragmentData(F,y,S,P)}if(X!=null&&(h=X.samples)!==null&&h!==void 0&&h.length){var Ie=a({frag:y,id:C},X);x.trigger(D.Events.FRAG_PARSING_METADATA,Ie)}if(A){var Me=a({frag:y,id:C},A);x.trigger(D.Events.FRAG_PARSING_USERDATA,Me)}},_._bufferInitSegment=function(g,h,C){if(this.state!==W.State.PARSING)return;g.video&&delete g.video;var x=g.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(D.Events.BUFFER_CODECS,g);var m=x.initSegment;if(m!=null&&m.byteLength){var P={type:"audio",frag:h,part:null,chunkMeta:C,parent:h.type,data:m};this.hls.trigger(D.Events.BUFFER_APPENDING,P)}this.tick()},_.loadFragment=function(g,h,C){var x=this.fragmentTracker.getState(g);this.fragCurrent=g,(this.audioSwitch||x===j.FragmentState.NOT_LOADED||x===j.FragmentState.PARTIAL)&&(g.sn==="initSegment"?this._loadInitSegment(g):h.live&&!Object(Y.isFiniteNumber)(this.initPTS[g.cc])?(this.log("Waiting for video PTS in continuity counter "+g.cc+" of live stream before loading audio fragment "+g.sn+" of level "+this.trackId),this.state=W.State.WAITING_INIT_PTS):(this.startFragRequested=!0,M.prototype.loadFragment.call(this,g,h,C)))},_.completeAudioSwitch=function(){var g=this.hls,h=this.media,C=this.trackId;h&&(this.log("Switching audio track : flushing all audio"),M.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,g.trigger(D.Events.AUDIO_TRACK_SWITCHED,{id:C})},L}(W.default);z.default=w},"./src/controller/audio-track-controller.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/events.ts"),W=N("./src/errors.ts"),D=N("./src/controller/base-playlist-controller.ts"),G=N("./src/types/loader.ts");function j(p,c){for(var s=0;s<c.length;s++){var d=c[s];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(p,d.key,d)}}function n(p,c,s){return c&&j(p.prototype,c),s&&j(p,s),p}function T(p,c){p.prototype=Object.create(c.prototype),p.prototype.constructor=p,v(p,c)}function v(p,c){return v=Object.setPrototypeOf||function(d,u){return d.__proto__=u,d},v(p,c)}var f=function(p){T(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 s=c.prototype;return s.registerListeners=function(){var u=this.hls;u.on(Y.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(Y.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(Y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.on(Y.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.on(Y.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var u=this.hls;u.off(Y.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(Y.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(Y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.off(Y.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.off(Y.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,p.prototype.destroy.call(this)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},s.onManifestParsed=function(u,l){this.tracks=l.audioTracks||[]},s.onAudioTrackLoaded=function(u,l){var a=l.id,i=l.details,R=this.tracksInGroup[a];if(!R){this.warn("Invalid audio track id "+a);return}var O=R.details;R.details=l.details,this.log("audioTrack "+a+" loaded ["+i.startSN+"-"+i.endSN+"]"),a===this.trackId&&(this.retryCount=0,this.playlistLoaded(a,l,O))},s.onLevelLoading=function(u,l){this.switchLevel(l.level)},s.onLevelSwitching=function(u,l){this.switchLevel(l.level)},s.switchLevel=function(u){var l=this.hls.levels[u];if(!(l!=null&&l.audioGroupIds))return;var a=l.audioGroupIds[l.urlId];if(this.groupId!==a){this.groupId=a;var i=this.tracks.filter(function(O){return!a||O.groupId===a});this.selectDefaultTrack&&!i.some(function(O){return O.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=i;var R={audioTracks:i};this.log("Updating audio tracks, "+i.length+' track(s) found in "'+a+'" group-id'),this.hls.trigger(Y.Events.AUDIO_TRACKS_UPDATED,R),this.selectInitialTrack()}},s.onError=function(u,l){if(p.prototype.onError.call(this,u,l),l.fatal||!l.context)return;l.context.type===G.PlaylistContextType.AUDIO_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},s.setAudioTrack=function(u){var l=this.tracksInGroup;if(u<0||u>=l.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var a=l[this.trackId];this.log("Now switching to audio-track index "+u);var i=l[u],R=i.id,O=i.groupId,w=O===void 0?"":O,M=i.name,L=i.type,_=i.url;if(this.trackId=u,this.trackName=M,this.selectDefaultTrack=!1,this.hls.trigger(Y.Events.AUDIO_TRACK_SWITCHING,{id:R,groupId:w,name:M,type:L,url:_}),i.details&&!i.details.live)return;var b=this.switchParams(i.url,a==null?void 0:a.details);this.loadPlaylist(b)},s.selectInitialTrack=function(){var u=this.tracksInGroup;console.assert(u.length,"Initial audio track should be selected when tracks are known");var l=this.trackName,a=this.findTrackId(l)||this.findTrackId();a!==-1?this.setAudioTrack(a):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(Y.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},s.findTrackId=function(u){for(var l=this.tracksInGroup,a=0;a<l.length;a++){var i=l[a];if((!this.selectDefaultTrack||i.default)&&(!u||u===i.name))return i.id}return-1},s.loadPlaylist=function(u){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var a=l.id,i=l.groupId,R=l.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: "+a),this.clearTimer(),this.hls.trigger(Y.Events.AUDIO_TRACK_LOADING,{url:R,id:a,groupId:i,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}(D.default);z.default=f},"./src/controller/base-playlist-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return n});var Y=N("./src/polyfills/number.ts"),W=N("./src/types/level.ts"),D=N("./src/controller/level-helper.ts"),G=N("./src/utils/logger.ts"),j=N("./src/errors.ts"),n=function(){function T(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=G.logger.log.bind(G.logger,p+":"),this.warn=G.logger.warn.bind(G.logger,p+":"),this.hls=f}var v=T.prototype;return v.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},v.onError=function(p,c){c.fatal&&c.type===j.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},v.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},v.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},v.stopLoad=function(){this.canLoad=!1,this.clearTimer()},v.switchParams=function(p,c){var s=c==null?void 0:c.renditionReports;if(s)for(var d=0;d<s.length;d++){var u=s[d],l=""+u.URI;if(l===p.substr(-l.length)){var a=parseInt(u["LAST-MSN"]),i=parseInt(u["LAST-PART"]);if(c&&this.hls.config.lowLatencyMode){var R=Math.min(c.age-c.partTarget,c.targetduration);i!==void 0&&R>c.partTarget&&(i+=1)}if(Object(Y.isFiniteNumber)(a))return new W.HlsUrlParameters(a,Object(Y.isFiniteNumber)(i)?i:void 0,W.HlsSkip.No)}}},v.loadPlaylist=function(p){},v.shouldLoadTrack=function(p){return this.canLoad&&p&&!!p.url&&(!p.details||p.details.live)},v.playlistLoaded=function(p,c,s){var d=this,u=c.details,l=c.stats,a=l.loading.end?Math.max(0,self.performance.now()-l.loading.end):0;if(u.advancedDateTime=Date.now()-a,u.live||s!=null&&s.live){if(u.reloaded(s),s&&this.log("live playlist "+p+" "+(u.advanced?"REFRESHED "+u.lastPartSn+"-"+u.lastPartIndex:"MISSED")),s&&u.fragments.length>0&&Object(D.mergeDetails)(s,u),!this.canLoad||!u.live)return;var i,R=void 0,O=void 0;if(u.canBlockReload&&u.endSN&&u.advanced){var w=this.hls.config.lowLatencyMode,M=u.lastPartSn,L=u.endSN,_=u.lastPartIndex,b=_!==-1,g=M===L,h=w?0:_;b?(R=g?L+1:M,O=g?h:_+1):R=L+1;var C=u.age,x=C+u.ageHeader,m=Math.min(x-u.partTarget,u.targetduration*1.5);if(m>0){if(s&&m>s.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+s.tuneInGoal+" to: "+m+" with playlist age: "+u.age),m=0;else{var P=Math.floor(m/u.targetduration);if(R+=P,O!==void 0){var k=Math.round(m%u.targetduration/u.partTarget);O+=k}this.log("CDN Tune-in age: "+u.ageHeader+"s last advanced "+C.toFixed(2)+"s goal: "+m+" skip sn "+P+" to part "+O)}u.tuneInGoal=m}if(i=this.getDeliveryDirectives(u,c.deliveryDirectives,R,O),w||!g){this.loadPlaylist(i);return}}else i=this.getDeliveryDirectives(u,c.deliveryDirectives,R,O);var y=Object(D.computeReloadInterval)(u,l);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(i)},y)}else this.clearTimer()},v.getDeliveryDirectives=function(p,c,s,d){var u=Object(W.getSkipValue)(p,s);return c!=null&&c.skip&&p.deltaUpdateFailed&&(s=c.msn,d=c.part,u=W.HlsSkip.No),new W.HlsUrlParameters(s,d,u)},v.retryLoadingOrFail=function(p){var c=this,s=this.hls.config,d=this.retryCount<s.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 l=Math.min(Math.pow(2,this.retryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},l),this.warn("retry playlist loading #"+this.retryCount+" in "+l+' ms after "'+p.details+'"')}}else this.warn('cannot recover from error "'+p.details+'"'),this.clearTimer(),p.fatal=!0;return d},T}()},"./src/controller/base-stream-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"State",function(){return L}),N.d(z,"default",function(){return _});var Y=N("./src/polyfills/number.ts"),W=N("./src/task-loop.ts"),D=N("./src/controller/fragment-tracker.ts"),G=N("./src/utils/buffer-helper.ts"),j=N("./src/utils/logger.ts"),n=N("./src/events.ts"),T=N("./src/errors.ts"),v=N("./src/types/transmuxer.ts"),f=N("./src/utils/mp4-tools.ts"),p=N("./src/utils/discontinuities.ts"),c=N("./src/controller/fragment-finders.ts"),s=N("./src/controller/level-helper.ts"),d=N("./src/loader/fragment-loader.ts"),u=N("./src/crypt/decrypter.ts"),l=N("./src/utils/time-ranges.ts"),a=N("./src/types/loader.ts");function i(b,g){for(var h=0;h<g.length;h++){var C=g[h];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(b,C.key,C)}}function R(b,g,h){return g&&i(b.prototype,g),h&&i(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 w(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,M(b,g)}function M(b,g){return M=Object.setPrototypeOf||function(C,x){return C.__proto__=x,C},M(b,g)}var L={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){w(g,b);function g(C,x,m){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=L.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=m,P.log=j.logger.log.bind(j.logger,m+":"),P.warn=j.logger.warn.bind(j.logger,m+":"),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=g.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=L.STOPPED},h._streamEnded=function(x,m){var P=this.fragCurrent,k=this.fragmentTracker;if(!m.live&&P&&P.sn===m.endSN&&!x.nextStart){var y=k.getState(P);return y===D.FragmentState.PARTIAL||y===D.FragmentState.OK}return!1},h.onMediaAttached=function(x,m){var P=this.media=this.mediaBuffer=m.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===L.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,m=this.fragCurrent,P=this.media,k=this.mediaBuffer,y=this.state,S=P?P.currentTime:0,F=G.BufferHelper.bufferInfo(k||P,S,x.maxBufferHole);if(this.log("media seeking to "+(Object(Y.isFiniteNumber)(S)?S.toFixed(3):S)+", state: "+y),y===L.ENDED)this.resetLoadingState();else if(m&&!F.len){var A=x.maxFragLookUpTolerance,X=m.start-A,ne=m.start+m.duration+A,fe=S>ne;(S<X||fe)&&(fe&&m.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),m.loader.abort()),this.resetLoadingState())}P&&(this.lastCurrentTime=S),!this.loadedmetadata&&!F.len&&(this.nextLoadPosition=this.startPosition=S),this.tickImmediate()},h.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},h.onKeyLoaded=function(x,m){if(this.state!==L.KEY_LOADING||m.frag!==this.fragCurrent||!this.levels)return;this.state=L.IDLE;var P=this.levels[m.frag.level].details;P&&this.loadFragment(m.frag,P,m.frag.start)},h.onHandlerDestroying=function(){this.stopLoad(),b.prototype.onHandlerDestroying.call(this)},h.onHandlerDestroyed=function(){this.state=L.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,m){this.log("Loading key for "+x.sn+" of ["+m.startSN+"-"+m.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+x.level),this.state=L.KEY_LOADING,this.fragCurrent=x,this.hls.trigger(n.Events.KEY_LOADING,{frag:x})},h.loadFragment=function(x,m,P){this._loadFragForPlayback(x,m,P)},h._loadFragForPlayback=function(x,m,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,m,P,y).then(function(S){if(!S)return;k.fragLoadError=0;var F=k.state;if(k.fragContextChanged(x)){(F===L.FRAG_LOADING||F===L.BACKTRACKING||!k.fragCurrent&&F===L.PARSING)&&(k.fragmentTracker.removeFragment(x),k.state=L.IDLE);return}if("payload"in S&&(k.log("Loaded fragment "+x.sn+" of level "+x.level),k.hls.trigger(n.Events.FRAG_LOADED,S),k.state===L.BACKTRACKING)){k.fragmentTracker.backtrack(x,S),k.resetFragmentLoading(x);return}k._handleFragmentLoadComplete(S)}).catch(function(S){k.warn(S),k.resetFragmentLoading(x)})},h.flushMainBuffer=function(x,m,P){if(P===void 0&&(P=null),!(x-m))return;var k={startOffset:x,endOffset:m,type:P};this.fragLoadError=0,this.hls.trigger(n.Events.BUFFER_FLUSHING,k)},h._loadInitSegment=function(x){var m=this;this._doFragLoad(x).then(function(P){if(!P||m.fragContextChanged(x)||!m.levels)throw new Error("init load aborted");return P}).then(function(P){var k=m.hls,y=P.payload,S=x.decryptdata;if(y&&y.byteLength>0&&S&&S.key&&S.iv&&S.method==="AES-128"){var F=self.performance.now();return m.decrypter.webCryptoDecrypt(new Uint8Array(y),S.key.buffer,S.iv.buffer).then(function(A){var X=self.performance.now();return k.trigger(n.Events.FRAG_DECRYPTED,{frag:x,payload:A,stats:{tstart:F,tdecrypt:X}}),P.payload=A,P})}return P}).then(function(P){var k=m.fragCurrent,y=m.hls,S=m.levels;if(!S)throw new Error("init load aborted, missing levels");var F=S[x.level].details;console.assert(F,"Level details are defined when init segment is loaded");var A=x.stats;m.state=L.IDLE,m.fragLoadError=0,x.data=new Uint8Array(P.payload),A.parsing.start=A.buffering.start=self.performance.now(),A.parsing.end=A.buffering.end=self.performance.now(),P.frag===k&&y.trigger(n.Events.FRAG_BUFFERED,{stats:A,frag:k,part:null,id:x.type}),m.tick()}).catch(function(P){m.warn(P),m.resetFragmentLoading(x)})},h.fragContextChanged=function(x){var m=this.fragCurrent;return!x||!m||x.level!==m.level||x.sn!==m.sn||x.urlId!==m.urlId},h.fragBufferedComplete=function(x,m){var P=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+x.type+" sn: "+x.sn+(m?" part: "+m.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+x.level+" "+l.default.toString(G.BufferHelper.getBuffered(P))),this.state=L.IDLE,this.tick()},h._handleFragmentLoadComplete=function(x){var m=this.transmuxer;if(!m)return;var P=x.frag,k=x.part,y=x.partsLoaded,S=!y||y.length===0||y.some(function(A){return!A}),F=new v.ChunkMetadata(P.level,P.sn,P.stats.chunkCount+1,0,k?k.index:-1,!S);m.flush(F)},h._handleFragmentLoadProgress=function(x){},h._doFragLoad=function(x,m,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&&m){var S=m.partList;if(S&&k){P>x.end&&m.fragmentHint&&(x=m.fragmentHint);var F=this.getNextPart(S,x,P);if(F>-1){var A=S[F];return this.log("Loading part sn: "+x.sn+" p: "+A.index+" cc: "+x.cc+" of playlist ["+m.startSN+"-"+m.endSN+"] parts [0-"+F+"-"+(S.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+x.level+", target: "+parseFloat(P.toFixed(3))),this.nextLoadPosition=A.start+A.duration,this.state=L.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:x,part:S[F],targetBufferTime:P}),this.doFragPartsLoad(x,S,F,k).catch(function(X){return y.handleFragLoadError(X)})}else if(!x.url||this.loadedEndOfParts(S,P))return Promise.resolve(null)}}return this.log("Loading fragment "+x.sn+" cc: "+x.cc+" "+(m?"of ["+m.startSN+"-"+m.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+x.level+", target: "+parseFloat(P.toFixed(3))),Object(Y.isFiniteNumber)(x.sn)&&!this.bitrateTest&&(this.nextLoadPosition=x.start+x.duration),this.state=L.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:x,targetBufferTime:P}),this.fragmentLoader.load(x,k).catch(function(X){return y.handleFragLoadError(X)})},h.doFragPartsLoad=function(x,m,P,k){var y=this;return new Promise(function(S,F){var A=[],X=function ne(fe){var ye=m[fe];y.fragmentLoader.loadPart(x,ye,k).then(function(Pe){A[ye.index]=Pe;var xe=Pe.part;y.hls.trigger(n.Events.FRAG_LOADED,Pe);var Ie=m[fe+1];if(Ie&&Ie.fragment===x)ne(fe+1);else return S({frag:x,part:xe,partsLoaded:A})}).catch(F)};X(P)})},h.handleFragLoadError=function(x){var m=x.data;return m&&m.details===T.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(m.frag,m.part):this.hls.trigger(n.Events.ERROR,m),null},h._handleTransmuxerFlush=function(x){var m=this.getCurrentContext(x);if(!m||this.state!==L.PARSING){this.fragCurrent||(this.state=L.IDLE);return}var P=m.frag,k=m.part,y=m.level,S=self.performance.now();P.stats.parsing.end=S,k&&(k.stats.parsing.end=S),this.updateLevelTiming(P,k,y,x.partial)},h.getCurrentContext=function(x){var m=this.levels,P=x.level,k=x.sn,y=x.part;if(!m||!m[P])return this.warn("Levels object was unset while buffering fragment "+k+" of level "+P+". The current chunk will not be buffered."),null;var S=m[P],F=y>-1?Object(s.getPartWith)(S,k,y):null,A=F?F.fragment:Object(s.getFragmentWithSN)(S,k,this.fragCurrent);return A?{frag:A,part:F,level:S}:null},h.bufferFragmentData=function(x,m,P,k){if(!x||this.state!==L.PARSING)return;var y=x.data1,S=x.data2,F=y;if(y&&S&&(F=Object(f.appendUint8Array)(y,S)),!F||!F.length)return;var A={type:x.type,frag:m,part:P,chunkMeta:k,parent:m.type,data:F};this.hls.trigger(n.Events.BUFFER_APPENDING,A),x.dropped&&x.independent&&!P&&this.flushBufferGap(m)},h.flushBufferGap=function(x){var m=this.media;if(!m)return;if(!G.BufferHelper.isBuffered(m,m.currentTime)){this.flushMainBuffer(0,x.start);return}var P=m.currentTime,k=G.BufferHelper.bufferInfo(m,P,0),y=x.duration,S=Math.min(this.config.maxFragLookUpTolerance*2,y*.25),F=Math.max(Math.min(x.start-S,k.end-S),P+S);x.start-F>S&&this.flushMainBuffer(F,x.start)},h.getFwdBufferInfo=function(x,m){var P=this.config,k=this.getLoadPosition();if(!Object(Y.isFiniteNumber)(k))return null;var y=G.BufferHelper.bufferInfo(x,k,P.maxBufferHole);if(y.len===0&&y.nextStart!==void 0){var S=this.fragmentTracker.getBufferedFrag(k,m);if(S&&y.nextStart<S.end)return G.BufferHelper.bufferInfo(x,k,Math.max(y.nextStart,P.maxBufferHole))}return y},h.getMaxBufferLength=function(x){var m=this.config,P;return x?P=Math.max(8*m.maxBufferSize/x,m.maxBufferLength):P=m.maxBufferLength,Math.min(P,m.maxMaxBufferLength)},h.reduceMaxBufferLength=function(x){var m=this.config,P=x||m.maxBufferLength;return m.maxMaxBufferLength>=P?(m.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+m.maxMaxBufferLength+"s"),!0):!1},h.getNextFragment=function(x,m){var P,k,y=m.fragments,S=y.length;if(!S)return null;var F=this.config,A=y[0].start,X;if(m.live){var ne=F.initialLiveManifestSize;if(S<ne)return this.warn("Not enough fragments to start playback (have: "+S+", need: "+ne+")"),null;!m.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(X=this.getInitialLiveFragment(m,y),this.startPosition=X?this.hls.liveSyncPosition||X.start:x)}else x<=A&&(X=y[0]);if(!X){var fe=F.lowLatencyMode?m.partEnd:m.fragmentEnd;X=this.getFragmentAtPosition(x,fe,m)}return(P=X)!==null&&P!==void 0&&P.initSegment&&!((k=X)!==null&&k!==void 0&&k.initSegment.data)&&!this.bitrateTest&&(X=X.initSegment),X},h.getNextPart=function(x,m,P){for(var k=-1,y=!1,S=!0,F=0,A=x.length;F<A;F++){var X=x[F];if(S=S&&!X.independent,k>-1&&P<X.start)break;var ne=X.loaded;!ne&&(y||X.independent||S)&&X.fragment===m&&(k=F),y=ne}return k},h.loadedEndOfParts=function(x,m){var P=x[x.length-1];return P&&m>P.start&&P.loaded},h.getInitialLiveFragment=function(x,m){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)(m,P.endProgramDateTime,this.config.maxFragLookUpTolerance)),!k){var y=P.sn+1;if(y>=x.startSN&&y<=x.endSN){var S=m[y-x.startSN];P.cc===S.cc&&(k=S,this.log("Live playlist, switching playlist, load frag with next SN: "+k.sn))}k||(k=Object(c.findFragWithCC)(m,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,m,P){var k=this.config,y=this.fragPrevious,S=P.fragments,F=P.endSN,A=P.fragmentHint,X=k.maxFragLookUpTolerance,ne=!!(k.lowLatencyMode&&P.partList&&A);ne&&A&&!this.bitrateTest&&(S=S.concat(A),F=A.sn);var fe;if(x<m){var ye=x>m-X?0:X;fe=Object(c.findFragmentByPTS)(y,S,x,ye)}else fe=S[S.length-1];if(fe){var Pe=fe.sn-P.startSN,xe=y&&fe.level===y.level,Ie=S[Pe+1],Me=this.fragmentTracker.getState(fe);if(Me===D.FragmentState.BACKTRACKED){fe=null;for(var ke=Pe;S[ke]&&this.fragmentTracker.getState(S[ke])===D.FragmentState.BACKTRACKED;)y?fe=S[ke--]:fe=S[--ke];fe||(fe=Ie)}else y&&fe.sn===y.sn&&!ne&&(xe&&(fe.sn<F&&this.fragmentTracker.getState(Ie)!==D.FragmentState.OK?(this.log("SN "+fe.sn+" just loaded, load next one: "+Ie.sn),fe=Ie):fe=null))}return fe},h.synchronizeToLiveEdge=function(x){var m=this.config,P=this.media;if(!P)return;var k=this.hls.liveSyncPosition,y=P.currentTime,S=x.fragments[0].start,F=x.edge,A=y>=S-m.maxFragLookUpTolerance&&y<=F;if(k!==null&&P.duration>k&&(y<k||!A)){var X=m.liveMaxLatencyDuration!==void 0?m.liveMaxLatencyDuration:m.liveMaxLatencyDurationCount*x.targetduration;(!A&&P.readyState<4||y<F-X)&&(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,m){var P=this.levels,k=this.levelLastLoaded,y=this.fragPrevious,S=k!==null?P[k]:null,F=x.fragments.length;if(!F)return this.warn("No fragments in live playlist"),0;var A=x.fragments[0].start,X=!m,ne=x.alignedSliding&&Object(Y.isFiniteNumber)(A);if(X||!ne&&!A){Object(p.alignStream)(y,S,x);var fe=x.fragments[0].start;return this.log("Live playlist sliding: "+fe.toFixed(2)+" start-sn: "+(m?m.startSN:"na")+"->"+x.startSN+" prev-sn: "+(y?y.sn:"na")+" fragments: "+F),fe}return A},h.waitForCdnTuneIn=function(x){var m=3;return x.live&&x.canBlockReload&&x.tuneInGoal>Math.max(x.partHoldBack,x.partTarget*m)},h.setStartPosition=function(x,m){var P=this.startPosition;if(P<m&&(P=-1),P===-1||this.lastCurrentTime===-1){var k=x.startTimeOffset;Object(Y.isFiniteNumber)(k)?(P=m+k,k<0&&(P+=x.totalduration),P=Math.min(Math.max(m,P),m+x.totalduration),this.log("Start time offset "+k+" found in playlist, adjust startPosition to "+P),this.startPosition=P):x.live?P=this.hls.liveSyncPosition||m:this.startPosition=P=0,this.lastCurrentTime=P}this.nextLoadPosition=P},h.getLoadPosition=function(){var x=this.media,m=0;return this.loadedmetadata&&x?m=x.currentTime:this.nextLoadPosition&&(m=this.nextLoadPosition),m},h.handleFragLoadAborted=function(x,m){this.transmuxer&&x.sn!=="initSegment"&&x.stats.aborted&&(this.warn("Fragment "+x.sn+(m?" part"+m.index:"")+" of level "+x.level+" was aborted"),this.resetFragmentLoading(x))},h.resetFragmentLoading=function(x){(!this.fragCurrent||!this.fragContextChanged(x))&&(this.state=L.IDLE)},h.onFragmentOrKeyLoadError=function(x,m){if(m.fatal)return;var P=m.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 S=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 "+S+"ms"),this.retryDate=self.performance.now()+S,this.fragLoadError++,this.state=L.FRAG_LOADING_WAITING_RETRY}else m.levelRetry?(x===a.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=L.IDLE):(j.logger.error(m.details+" reaches max retry, redispatch as fatal ..."),m.fatal=!0,this.hls.stopLoad(),this.state=L.ERROR)},h.afterBufferFlushed=function(x,m,P){if(!x)return;var k=G.BufferHelper.getBuffered(x);this.fragmentTracker.detectEvictedFragments(m,k,P),this.state===L.ENDED&&this.resetLoadingState()},h.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=L.IDLE},h.resetLiveStartWhenNotLoaded=function(x){if(!this.loadedmetadata){this.startFragRequested=!1;var m=this.levels?this.levels[x].details:null;if(m!=null&&m.live)return this.startPosition=-1,this.setStartPosition(m,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},h.updateLevelTiming=function(x,m,P,k){var y=this,S=P.details;console.assert(!!S,"level.details must be defined");var F=Object.keys(x.elementaryStreams).reduce(function(A,X){var ne=x.elementaryStreams[X];if(ne){var fe=ne.endPTS-ne.startPTS;if(fe<=0)return y.warn("Could not parse fragment "+x.sn+" "+X+" duration reliably ("+fe+") resetting transmuxer to fallback to playlist timing"),y.resetTransmuxer(),A||!1;var ye=k?0:Object(s.updateFragPTSDTS)(S,x,ne.startPTS,ne.endPTS,ne.startDTS,ne.endDTS);return y.hls.trigger(n.Events.LEVEL_PTS_UPDATED,{details:S,level:P,drift:ye,type:X,frag:x,start:ne.startPTS,end:ne.endPTS}),!0}return A},!1);F?(this.state=L.PARSED,this.hls.trigger(n.Events.FRAG_PARSED,{frag:x,part:m})):this.resetLoadingState()},h.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},R(g,[{key:"state",get:function(){return this._state},set:function(x){var m=this._state;m!==x&&(this._state=x,this.log(m+"->"+x))}}]),g}(W.default)},"./src/controller/buffer-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return c});var Y=N("./src/polyfills/number.ts"),W=N("./src/events.ts"),D=N("./src/utils/logger.ts"),G=N("./src/errors.ts"),j=N("./src/utils/buffer-helper.ts"),n=N("./src/utils/mediasource-helper.ts"),T=N("./src/loader/fragment.ts"),v=N("./src/controller/buffer-operation-queue.ts"),f=Object(n.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function s(u){var l=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 a=l.hls,i=l.media,R=l.mediaSource;D.logger.log("[buffer-controller]: Media source opened"),i&&(l.updateMediaElementDuration(),a.trigger(W.Events.MEDIA_ATTACHED,{media:i})),R&&R.removeEventListener("sourceopen",l._onMediaSourceOpen),l.checkPendingTracks()},this._onMediaSourceClose=function(){D.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){D.logger.log("[buffer-controller]: Media source ended")},this.hls=u,this._initSourceBuffer(),this.registerListeners()}var d=s.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 l=this.hls;l.on(W.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(W.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(W.Events.BUFFER_RESET,this.onBufferReset,this),l.on(W.Events.BUFFER_APPENDING,this.onBufferAppending,this),l.on(W.Events.BUFFER_CODECS,this.onBufferCodecs,this),l.on(W.Events.BUFFER_EOS,this.onBufferEos,this),l.on(W.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),l.on(W.Events.LEVEL_UPDATED,this.onLevelUpdated,this),l.on(W.Events.FRAG_PARSED,this.onFragParsed,this),l.on(W.Events.FRAG_CHANGED,this.onFragChanged,this)},d.unregisterListeners=function(){var l=this.hls;l.off(W.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.off(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(W.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(W.Events.BUFFER_RESET,this.onBufferReset,this),l.off(W.Events.BUFFER_APPENDING,this.onBufferAppending,this),l.off(W.Events.BUFFER_CODECS,this.onBufferCodecs,this),l.off(W.Events.BUFFER_EOS,this.onBufferEos,this),l.off(W.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),l.off(W.Events.LEVEL_UPDATED,this.onLevelUpdated,this),l.off(W.Events.FRAG_PARSED,this.onFragParsed,this),l.off(W.Events.FRAG_CHANGED,this.onFragChanged,this)},d._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new v.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},d.onManifestParsed=function(l,a){var i=2;(a.audio&&!a.video||!a.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,this.details=null,D.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},d.onMediaAttaching=function(l,a){var i=this.media=a.media;if(i&&f){var R=this.mediaSource=new f;R.addEventListener("sourceopen",this._onMediaSourceOpen),R.addEventListener("sourceended",this._onMediaSourceEnded),R.addEventListener("sourceclose",this._onMediaSourceClose),i.src=self.URL.createObjectURL(R),this._objectUrl=i.src}},d.onMediaDetaching=function(){var l=this.media,a=this.mediaSource,i=this._objectUrl;if(a){if(D.logger.log("[buffer-controller]: media source detaching"),a.readyState==="open")try{a.endOfStream()}catch(R){D.logger.warn("[buffer-controller]: onMediaDetaching: "+R.message+" while calling endOfStream")}this.onBufferReset(),a.removeEventListener("sourceopen",this._onMediaSourceOpen),a.removeEventListener("sourceended",this._onMediaSourceEnded),a.removeEventListener("sourceclose",this._onMediaSourceClose),l&&(i&&self.URL.revokeObjectURL(i),l.src===i?(l.removeAttribute("src"),l.load()):D.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 l=this;this.getSourceBufferTypes().forEach(function(a){var i=l.sourceBuffer[a];try{i&&(l.removeBufferListeners(a),l.mediaSource&&l.mediaSource.removeSourceBuffer(i),l.sourceBuffer[a]=void 0)}catch(R){D.logger.warn("[buffer-controller]: Failed to reset the "+a+" buffer",R)}}),this._initSourceBuffer()},d.onBufferCodecs=function(l,a){var i=this,R=this.getSourceBufferTypes().length;if(Object.keys(a).forEach(function(O){if(R){var w=i.tracks[O];if(w&&typeof w.buffer.changeType=="function"){var M=a[O],L=M.codec,_=M.levelCodec,b=M.container,g=(w.levelCodec||w.codec).replace(p,"$1"),h=(_||L).replace(p,"$1");if(g!==h){var C=b+";codecs="+(_||L);i.appendChangeType(O,C)}}}else i.pendingTracks[O]=a[O]}),R)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},d.appendChangeType=function(l,a){var i=this,R=this.operationQueue,O={execute:function(){var M=i.sourceBuffer[l];M&&(D.logger.log("[buffer-controller]: changing "+l+" sourceBuffer type to "+a),M.changeType(a)),R.shiftAndExecuteNext(l)},onStart:function(){},onComplete:function(){},onError:function(M){D.logger.warn("[buffer-controller]: Failed to change "+l+" SourceBuffer type",M)}};R.append(O,l)},d.onBufferAppending=function(l,a){var i=this,R=this.hls,O=this.operationQueue,w=this.tracks,M=a.data,L=a.type,_=a.frag,b=a.part,g=a.chunkMeta,h=g.buffering[L],C=self.performance.now();h.start=C;var x=_.stats.buffering,m=b?b.stats.buffering:null;x.start===0&&(x.start=C),m&&m.start===0&&(m.start=C);var P=w.audio,k=L==="audio"&&g.id===1&&(P==null?void 0:P.container)==="audio/mpeg",y={execute:function(){if(h.executeStart=self.performance.now(),k){var F=i.sourceBuffer[L];if(F){var A=_.start-F.timestampOffset;Math.abs(A)>=.1&&(D.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+_.start+" (delta: "+A+") sn: "+_.sn+")"),F.timestampOffset=_.start)}}i.appendExecutor(M,L)},onStart:function(){},onComplete:function(){var F=self.performance.now();h.executeEnd=h.end=F,x.first===0&&(x.first=F),m&&m.first===0&&(m.first=F);var A=i.sourceBuffer,X={};for(var ne in A)X[ne]=j.BufferHelper.getBuffered(A[ne]);i.appendError=0,i.hls.trigger(W.Events.BUFFER_APPENDED,{type:L,frag:_,part:b,chunkMeta:g,parent:_.type,timeRanges:X})},onError:function(F){D.logger.error("[buffer-controller]: Error encountered while trying to append to the "+L+" SourceBuffer",F);var A={type:G.ErrorTypes.MEDIA_ERROR,parent:_.type,details:G.ErrorDetails.BUFFER_APPEND_ERROR,err:F,fatal:!1};F.code===DOMException.QUOTA_EXCEEDED_ERR?A.details=G.ErrorDetails.BUFFER_FULL_ERROR:(i.appendError++,A.details=G.ErrorDetails.BUFFER_APPEND_ERROR,i.appendError>R.config.appendErrorMaxRetry&&(D.logger.error("[buffer-controller]: Failed "+R.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),A.fatal=!0)),R.trigger(W.Events.ERROR,A)}};O.append(y,L)},d.onBufferFlushing=function(l,a){var i=this,R=this.operationQueue,O=function(M){return{execute:i.removeExecutor.bind(i,M,a.startOffset,a.endOffset),onStart:function(){},onComplete:function(){i.hls.trigger(W.Events.BUFFER_FLUSHED,{type:M})},onError:function(_){D.logger.warn("[buffer-controller]: Failed to remove from "+M+" SourceBuffer",_)}}};a.type?R.append(O(a.type),a.type):this.getSourceBufferTypes().forEach(function(w){R.append(O(w),w)})},d.onFragParsed=function(l,a){var i=this,R=a.frag,O=a.part,w=[],M=O?O.elementaryStreams:R.elementaryStreams;M[T.ElementaryStreamTypes.AUDIOVIDEO]?w.push("audiovideo"):(M[T.ElementaryStreamTypes.AUDIO]&&w.push("audio"),M[T.ElementaryStreamTypes.VIDEO]&&w.push("video"));var L=function(){var b=self.performance.now();R.stats.buffering.end=b,O&&(O.stats.buffering.end=b);var g=O?O.stats:R.stats;i.hls.trigger(W.Events.FRAG_BUFFERED,{frag:R,part:O,stats:g,id:R.type})};w.length===0&&D.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+R.type+" level: "+R.level+" sn: "+R.sn),this.blockBuffers(L,w)},d.onFragChanged=function(l,a){this.flushBackBuffer()},d.onBufferEos=function(l,a){var i=this,R=this.getSourceBufferTypes().reduce(function(O,w){var M=i.sourceBuffer[w];return(!a.type||a.type===w)&&(M&&!M.ended&&(M.ended=!0,D.logger.log("[buffer-controller]: "+w+" sourceBuffer now EOS"))),O&&!!(!M||M.ended)},!0);R&&this.blockBuffers(function(){var O=i.mediaSource;if(!O||O.readyState!=="open")return;O.endOfStream()})},d.onLevelUpdated=function(l,a){var i=a.details;if(!i.fragments.length)return;this.details=i,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},d.flushBackBuffer=function(){var l=this.hls,a=this.details,i=this.media,R=this.sourceBuffer;if(!i||a===null)return;var O=this.getSourceBufferTypes();if(!O.length)return;var w=a.live&&l.config.liveBackBufferLength!==null?l.config.liveBackBufferLength:l.config.backBufferLength;if(!Object(Y.isFiniteNumber)(w)||w<0)return;var M=i.currentTime,L=a.levelTargetDuration,_=Math.max(w,L),b=Math.floor(M/L)*L-_;O.forEach(function(g){var h=R[g];if(h){var C=j.BufferHelper.getBuffered(h);C.length>0&&b>C.start(0)&&(l.trigger(W.Events.BACK_BUFFER_REACHED,{bufferEnd:b}),a.live&&l.trigger(W.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:b}),l.trigger(W.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:b,type:g}))}})},d.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var l=this.details,a=this.hls,i=this.media,R=this.mediaSource,O=l.fragments[0].start+l.totalduration,w=i.duration,M=Object(Y.isFiniteNumber)(R.duration)?R.duration:0;l.live&&a.config.liveDurationInfinity?(D.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),R.duration=Infinity,this.updateSeekableRange(l)):(O>M&&O>w||!Object(Y.isFiniteNumber)(w))&&(D.logger.log("[buffer-controller]: Updating Media Source duration to "+O.toFixed(3)),R.duration=O)},d.updateSeekableRange=function(l){var a=this.mediaSource,i=l.fragments,R=i.length;if(R&&l.live&&a!==null&&a!==void 0&&a.setLiveSeekableRange){var O=Math.max(0,i[0].start),w=Math.max(O,O+l.totalduration);a.setLiveSeekableRange(O,w)}},d.checkPendingTracks=function(){var l=this.bufferCodecEventsExpected,a=this.operationQueue,i=this.pendingTracks,R=Object.keys(i).length;if(R&&!l||R===2){this.createSourceBuffers(i),this.pendingTracks={};var O=this.getSourceBufferTypes();if(O.length===0){this.hls.trigger(W.Events.ERROR,{type:G.ErrorTypes.MEDIA_ERROR,details:G.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}O.forEach(function(w){a.executeNext(w)})}},d.createSourceBuffers=function(l){var a=this.sourceBuffer,i=this.mediaSource;if(!i)throw Error("createSourceBuffers called when mediaSource was null");var R=0;for(var O in l)if(!a[O]){var w=l[O];if(!w)throw Error("source buffer exists for track "+O+", however track does not");var M=w.levelCodec||w.codec,L=w.container+";codecs="+M;D.logger.log("[buffer-controller]: creating sourceBuffer("+L+")");try{var _=a[O]=i.addSourceBuffer(L),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:M,container:w.container,levelCodec:w.levelCodec,id:w.id},R++}catch(g){D.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+g.message),this.hls.trigger(W.Events.ERROR,{type:G.ErrorTypes.MEDIA_ERROR,details:G.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:g,mimeType:L})}}R&&this.hls.trigger(W.Events.BUFFER_CREATED,{tracks:this.tracks})},d._onSBUpdateStart=function(l){var a=this.operationQueue,i=a.current(l);i.onStart()},d._onSBUpdateEnd=function(l){var a=this.operationQueue,i=a.current(l);i.onComplete(),a.shiftAndExecuteNext(l)},d._onSBUpdateError=function(l,a){D.logger.error("[buffer-controller]: "+l+" SourceBuffer error",a),this.hls.trigger(W.Events.ERROR,{type:G.ErrorTypes.MEDIA_ERROR,details:G.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var i=this.operationQueue.current(l);i&&i.onError(a)},d.removeExecutor=function(l,a,i){var R=this.media,O=this.mediaSource,w=this.operationQueue,M=this.sourceBuffer,L=M[l];if(!R||!O||!L){D.logger.warn("[buffer-controller]: Attempting to remove from the "+l+" SourceBuffer, but it does not exist"),w.shiftAndExecuteNext(l);return}var _=Object(Y.isFiniteNumber)(R.duration)?R.duration:Infinity,b=Object(Y.isFiniteNumber)(O.duration)?O.duration:Infinity,g=Math.max(0,a),h=Math.min(i,_,b);h>g?(D.logger.log("[buffer-controller]: Removing ["+g+","+h+"] from the "+l+" SourceBuffer"),console.assert(!L.updating,l+" sourceBuffer must not be updating"),L.remove(g,h)):w.shiftAndExecuteNext(l)},d.appendExecutor=function(l,a){var i=this.operationQueue,R=this.sourceBuffer,O=R[a];if(!O){D.logger.warn("[buffer-controller]: Attempting to append to the "+a+" SourceBuffer, but it does not exist"),i.shiftAndExecuteNext(a);return}O.ended=!1,console.assert(!O.updating,a+" sourceBuffer must not be updating"),O.appendBuffer(l)},d.blockBuffers=function(l,a){var i=this;if(a===void 0&&(a=this.getSourceBufferTypes()),!a.length){D.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(l);return}var R=this.operationQueue,O=a.map(function(w){return R.appendBlocker(w)});Promise.all(O).then(function(){l(),a.forEach(function(w){var M=i.sourceBuffer[w];(!M||!M.updating)&&R.shiftAndExecuteNext(w)})})},d.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},d.addBufferListener=function(l,a,i){var R=this.sourceBuffer[l];if(!R)return;var O=i.bind(this,l);this.listeners[l].push({event:a,listener:O}),R.addEventListener(a,O)},d.removeBufferListeners=function(l){var a=this.sourceBuffer[l];if(!a)return;this.listeners[l].forEach(function(i){a.removeEventListener(i.event,i.listener)})},s}()},"./src/controller/buffer-operation-queue.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return W});var Y=N("./src/utils/logger.ts"),W=function(){function D(j){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=j}var G=D.prototype;return G.append=function(n,T){var v=this.queues[T];v.push(n),v.length===1&&this.buffers[T]&&this.executeNext(T)},G.insertAbort=function(n,T){var v=this.queues[T];v.unshift(n),this.executeNext(T)},G.appendBlocker=function(n){var T,v=new Promise(function(p){T=p}),f={execute:T,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(f,n),v},G.executeNext=function(n){var T=this.buffers,v=this.queues,f=T[n],p=v[n];if(p.length){var c=p[0];try{c.execute()}catch(s){Y.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(s),(!f||!f.updating)&&(p.shift(),this.executeNext(n))}}},G.shiftAndExecuteNext=function(n){this.queues[n].shift(),this.executeNext(n)},G.current=function(n){return this.queues[n][0]},D}()},"./src/controller/cap-level-controller.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/events.ts");function W(j,n){for(var T=0;T<n.length;T++){var v=n[T];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(j,v.key,v)}}function D(j,n,T){return n&&W(j.prototype,n),T&&W(j,T),j}var G=function(){function j(T){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=T,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(v){this.streamController=v},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 v=this.hls;v.on(Y.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),v.on(Y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),v.on(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.on(Y.Events.BUFFER_CODECS,this.onBufferCodecs,this),v.on(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},n.unregisterListener=function(){var v=this.hls;v.off(Y.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),v.off(Y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),v.off(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.off(Y.Events.BUFFER_CODECS,this.onBufferCodecs,this),v.off(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},n.onFpsDropLevelCapping=function(v,f){j.isLevelAllowed(f.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(f.droppedLevel)},n.onMediaAttaching=function(v,f){this.media=f.media instanceof HTMLVideoElement?f.media:null},n.onManifestParsed=function(v,f){var p=this.hls;this.restrictedLevels=[],this.firstLevel=f.firstLevel,p.config.capLevelToPlayerSize&&f.video&&this.startCapping()},n.onBufferCodecs=function(v,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 v=this.hls.levels;if(v.length){var f=this.hls;f.autoLevelCapping=this.getMaxLevel(v.length-1),f.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=f.autoLevelCapping}}},n.getMaxLevel=function(v){var f=this,p=this.hls.levels;if(!p.length)return-1;var c=p.filter(function(s,d){return j.isLevelAllowed(d,f.restrictedLevels)&&d<=v});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 v=this.media,f={width:0,height:0};if(v){var p=v.getBoundingClientRect();f.width=p.width,f.height=p.height,!f.width&&!f.height&&(f.width=p.right-p.left||v.width||0,f.height=p.bottom-p.top||v.height||0)}return this.clientRect=f,f},j.isLevelAllowed=function(v,f){return f===void 0&&(f=[]),f.indexOf(v)===-1},j.getMaxLevelByMediaSize=function(v,f,p){if(!v||!v.length)return-1;for(var c=function(a,i){return i?a.width!==i.width||a.height!==i.height:!0},s=v.length-1,d=0;d<v.length;d+=1){var u=v[d];if((u.width>=f||u.height>=p)&&c(u,v[d+1])){s=d;break}}return s},D(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 v=1;try{v=self.devicePixelRatio}catch(f){}return v}}]),j}();z.default=G},"./src/controller/cmcd-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return c});var Y=N("./src/events.ts"),W=N("./src/types/cmcd.ts"),D=N("./src/utils/buffer-helper.ts"),G=N("./src/utils/logger.ts");function j(s,d){for(var u=0;u<d.length;u++){var l=d[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(s,l.key,l)}}function n(s,d,u){return d&&j(s.prototype,d),u&&j(s,u),s}function T(s,d){var u=typeof Symbol!="undefined"&&s[Symbol.iterator]||s["@@iterator"];if(u)return(u=u.call(s)).next.bind(u);if(Array.isArray(s)||(u=v(s))||d&&s&&typeof s.length=="number"){u&&(s=u);var l=0;return function(){return l>=s.length?{done:!0}:{done:!1,value:s[l++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(s,d){if(!s)return;if(typeof s=="string")return f(s,d);var u=Object.prototype.toString.call(s).slice(8,-1);if(u==="Object"&&s.constructor&&(u=s.constructor.name),u==="Map"||u==="Set")return Array.from(s);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return f(s,d)}function f(s,d){(d==null||d>s.length)&&(d=s.length);for(var u=0,l=new Array(d);u<d;u++)l[u]=s[u];return l}function p(){return p=Object.assign||function(s){for(var d=1;d<arguments.length;d++){var u=arguments[d];for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(s[l]=u[l])}return s},p.apply(this,arguments)}var c=function(){function s(u){var l=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(){l.initialized&&(l.starved=!0),l.buffering=!0},this.onPlaying=function(){l.initialized||(l.initialized=!0),l.buffering=!1},this.applyPlaylistData=function(R){try{l.apply(R,{ot:W.CMCDObjectType.MANIFEST,su:!l.initialized})}catch(O){G.logger.warn("Could not generate manifest CMCD data.",O)}},this.applyFragmentData=function(R){try{var O=R.frag,w=l.hls.levels[O.level],M=l.getObjectType(O),L={d:O.duration*1e3,ot:M};(M===W.CMCDObjectType.VIDEO||M===W.CMCDObjectType.AUDIO||M==W.CMCDObjectType.MUXED)&&(L.br=w.bitrate/1e3,L.tb=l.getTopBandwidth(M),L.bl=l.getBufferLength(M)),l.apply(R,L)}catch(_){G.logger.warn("Could not generate segment CMCD data.",_)}},this.hls=u;var a=this.config=u.config,i=a.cmcd;i!=null&&(a.pLoader=this.createPlaylistLoader(),a.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||s.uuid(),this.cid=i.contentId,this.useHeaders=i.useHeaders===!0,this.registerListeners())}var d=s.prototype;return d.registerListeners=function(){var l=this.hls;l.on(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(Y.Events.MEDIA_DETACHED,this.onMediaDetached,this),l.on(Y.Events.BUFFER_CREATED,this.onBufferCreated,this)},d.unregisterListeners=function(){var l=this.hls;l.off(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(Y.Events.MEDIA_DETACHED,this.onMediaDetached,this),l.off(Y.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(l,a){this.media=a.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(l,a){var i,R;this.audioBuffer=(i=a.tracks.audio)===null||i===void 0?void 0:i.buffer,this.videoBuffer=(R=a.tracks.video)===null||R===void 0?void 0:R.buffer},d.createData=function(){var l;return{v:W.CMCDVersion,sf:W.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(l=this.media)===null||l===void 0?void 0:l.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},d.apply=function(l,a){a===void 0&&(a={}),p(a,this.createData());var i=a.ot===W.CMCDObjectType.INIT||a.ot===W.CMCDObjectType.VIDEO||a.ot===W.CMCDObjectType.MUXED;if(this.starved&&i&&(a.bs=!0,a.su=!0,this.starved=!1),a.su==null&&(a.su=this.buffering),this.useHeaders){var R=s.toHeaders(a);if(!Object.keys(R).length)return;l.headers||(l.headers={}),p(l.headers,R)}else{var O=s.toQuery(a);if(!O)return;l.url=s.appendQueryToUri(l.url,O)}},d.getObjectType=function(l){var a=l.type;return a==="subtitle"?W.CMCDObjectType.TIMED_TEXT:l.sn==="initSegment"?W.CMCDObjectType.INIT:a==="audio"?W.CMCDObjectType.AUDIO:a==="main"?this.hls.audioTracks.length?W.CMCDObjectType.VIDEO:W.CMCDObjectType.MUXED:void 0},d.getTopBandwidth=function(l){for(var a=0,i=l===W.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,R=T(i),O;!(O=R()).done;){var w=O.value;w.bitrate>a&&(a=w.bitrate)}return a>0?a:NaN},d.getBufferLength=function(l){var a=this.hls.media,i=l===W.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!i||!a)return NaN;var R=D.BufferHelper.bufferInfo(i,a.currentTime,this.config.maxBufferHole);return R.len*1e3},d.createPlaylistLoader=function(){var l=this.config.pLoader,a=this.applyPlaylistData,i=l||this.config.loader;return function(){function R(w){this.loader=void 0,this.loader=new i(w)}var O=R.prototype;return O.destroy=function(){this.loader.destroy()},O.abort=function(){this.loader.abort()},O.load=function(M,L,_){a(M),this.loader.load(M,L,_)},n(R,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),R}()},d.createFragmentLoader=function(){var l=this.config.fLoader,a=this.applyFragmentData,i=l||this.config.loader;return function(){function R(w){this.loader=void 0,this.loader=new i(w)}var O=R.prototype;return O.destroy=function(){this.loader.destroy()},O.abort=function(){this.loader.abort()},O.load=function(M,L,_){a(M),this.loader.load(M,L,_)},n(R,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),R}()},s.uuid=function(){var l=URL.createObjectURL(new Blob),a=l.toString();return URL.revokeObjectURL(l),a.substr(a.lastIndexOf("/")+1)},s.serialize=function(l){for(var a=[],i=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},w=function(k){return encodeURIComponent(k)},M={br:R,d:R,bl:O,dl:O,mtp:O,nor:w,rtp:O,tb:R},L=Object.keys(l||{}).sort(),_=T(L),b;!(b=_()).done;){var g=b.value,h=l[g];if(!i(h))continue;if(g==="v"&&h===1)continue;if(g=="pr"&&h===1)continue;var C=M[g];C&&(h=C(h));var x=typeof h,m=void 0;g==="ot"||g==="sf"||g==="st"?m=g+"="+h:x==="boolean"?m=g:x==="number"?m=g+"="+h:m=g+"="+JSON.stringify(h),a.push(m)}return a.join(",")},s.toHeaders=function(l){for(var a=Object.keys(l),i={},R=["Object","Request","Session","Status"],O=[{},{},{},{}],w={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},M=0,L=a;M<L.length;M++){var _=L[M],b=w[_]!=null?w[_]:1;O[b][_]=l[_]}for(var g=0;g<O.length;g++){var h=s.serialize(O[g]);h&&(i["CMCD-"+R[g]]=h)}return i},s.toQuery=function(l){return"CMCD="+encodeURIComponent(s.serialize(l))},s.appendQueryToUri=function(l,a){if(!a)return l;var i=l.includes("?")?"&":"?";return""+l+i+a},s}()},"./src/controller/eme-controller.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/events.ts"),W=N("./src/errors.ts"),D=N("./src/utils/logger.ts"),G=N("./src/utils/mediakeys-helper.ts");function j(c,s){for(var d=0;d<s.length;d++){var u=s[d];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(c,u.key,u)}}function n(c,s,d){return s&&j(c.prototype,s),d&&j(c,d),c}var T=3,v=function(s,d,u){var l={audioCapabilities:[],videoCapabilities:[]};return s.forEach(function(a){l.audioCapabilities.push({contentType:'audio/mp4; codecs="'+a+'"',robustness:u.audioRobustness||""})}),d.forEach(function(a){l.videoCapabilities.push({contentType:'video/mp4; codecs="'+a+'"',robustness:u.videoRobustness||""})}),[l]},f=function(s,d,u,l){switch(s){case G.KeySystems.WIDEVINE:return v(d,u,l);default:throw new Error("Unknown key-system: "+s)}},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 s=c.prototype;return s.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},s._registerListeners=function(){this.hls.on(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Y.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s._unregisterListeners=function(){this.hls.off(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Y.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s.getLicenseServerUrl=function(u){switch(u){case G.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+u+'"')},s._attemptKeySystemAccess=function(u,l,a){var i=this,R=f(u,l,a,this._drmSystemOptions);D.logger.log("Requesting encrypted media key-system access");var O=this.requestMediaKeySystemAccess(u,R);this.mediaKeysPromise=O.then(function(w){return i._onMediaKeySystemAccessObtained(u,w)}),O.catch(function(w){D.logger.error('Failed to obtain key-system "'+u+'" access:',w)})},s._onMediaKeySystemAccessObtained=function(u,l){var a=this;D.logger.log('Access for key-system "'+u+'" obtained');var i={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:l,mediaKeySystemDomain:u};this._mediaKeysList.push(i);var R=Promise.resolve().then(function(){return l.createMediaKeys()}).then(function(O){return i.mediaKeys=O,D.logger.log('Media-keys created for key-system "'+u+'"'),a._onMediaKeysCreated(),O});return R.catch(function(O){D.logger.error("Failed to create media-keys:",O)}),R},s._onMediaKeysCreated=function(){var u=this;this._mediaKeysList.forEach(function(l){l.mediaKeysSession||(l.mediaKeysSession=l.mediaKeys.createSession(),u._onNewMediaKeySession(l.mediaKeysSession))})},s._onNewMediaKeySession=function(u){var l=this;D.logger.log("New key-system session "+u.sessionId),u.addEventListener("message",function(a){l._onKeySessionMessage(u,a.message)},!1)},s._onKeySessionMessage=function(u,l){D.logger.log("Got EME message event, creating license request"),this._requestLicense(l,function(a){D.logger.log("Received license data (length: "+(a&&a.byteLength)+"), updating key-session"),u.update(a)})},s.onMediaEncrypted=function(u){var l=this;if(D.logger.log('Media is encrypted using "'+u.initDataType+'" init data type'),!this.mediaKeysPromise){D.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(Y.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var a=function(R){if(!l._media)return;l._attemptSetMediaKeys(R),l._generateRequestWithPreferredKeySession(u.initDataType,u.initData)};this.mediaKeysPromise.then(a).catch(a)},s._attemptSetMediaKeys=function(u){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var l=this._mediaKeysList[0];if(!l||!l.mediaKeys){D.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(Y.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}D.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(l.mediaKeys),this._hasSetMediaKeys=!0}},s._generateRequestWithPreferredKeySession=function(u,l){var a=this,i=this._mediaKeysList[0];if(!i){D.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(Y.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(i.mediaKeysSessionInitialized){D.logger.warn("Key-Session already initialized but requested again");return}var R=i.mediaKeysSession;if(!R){D.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(Y.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!l){D.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(Y.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}D.logger.log('Generating key-session request for "'+u+'" init data type'),i.mediaKeysSessionInitialized=!0,R.generateRequest(u,l).then(function(){D.logger.debug("Key-session generation succeeded")}).catch(function(O){D.logger.error("Error generating key-session request:",O),a.hls.trigger(Y.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},s._createLicenseXhr=function(u,l,a){var i=new XMLHttpRequest;i.responseType="arraybuffer",i.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,i,u,l,a);var R=this._licenseXhrSetup;if(R)try{R.call(this.hls,i,u),R=void 0}catch(O){D.logger.error(O)}try{i.readyState||i.open("POST",u,!0),R&&R.call(this.hls,i,u)}catch(O){throw new Error("issue setting up KeySystem license XHR "+O)}return i},s._onLicenseRequestReadyStageChange=function(u,l,a,i){switch(u.readyState){case 4:if(u.status===200){this._requestLicenseFailureCount=0,D.logger.log("License request succeeded");var R=u.response,O=this._licenseResponseCallback;if(O)try{R=O.call(this.hls,u,l)}catch(M){D.logger.error(M)}i(R)}else{if(D.logger.error("License Request XHR failed ("+l+"). Status: "+u.status+" ("+u.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>T){this.hls.trigger(Y.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var w=T-this._requestLicenseFailureCount+1;D.logger.warn("Retrying license request, "+w+" attempts left"),this._requestLicense(a,i)}break}},s._generateLicenseRequestChallenge=function(u,l){switch(u.mediaKeySystemDomain){case G.KeySystems.WIDEVINE:return l}throw new Error("unsupported key-system: "+u.mediaKeySystemDomain)},s._requestLicense=function(u,l){D.logger.log("Requesting content license for key-system");var a=this._mediaKeysList[0];if(!a){D.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(Y.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var i=this.getLicenseServerUrl(a.mediaKeySystemDomain),R=this._createLicenseXhr(i,u,l);D.logger.log("Sending license request to URL: "+i);var O=this._generateLicenseRequestChallenge(a,u);R.send(O)}catch(w){D.logger.error("Failure requesting DRM license: "+w),this.hls.trigger(Y.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},s.onMediaAttached=function(u,l){if(!this._emeEnabled)return;var a=l.media;this._media=a,a.addEventListener("encrypted",this._onMediaEncrypted)},s.onMediaDetached=function(){var u=this._media,l=this._mediaKeysList;if(!u)return;u.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(l.map(function(a){if(a.mediaKeysSession)return a.mediaKeysSession.close().catch(function(){})})).then(function(){return u.setMediaKeys(null)}).catch(function(){})},s.onManifestParsed=function(u,l){if(!this._emeEnabled)return;var a=l.levels.map(function(R){return R.audioCodec}).filter(function(R){return!!R}),i=l.levels.map(function(R){return R.videoCodec}).filter(function(R){return!!R});this._attemptKeySystemAccess(G.KeySystems.WIDEVINE,a,i)},n(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();z.default=p},"./src/controller/fps-controller.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/events.ts"),W=N("./src/utils/logger.ts"),D=function(){function G(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=G.prototype;return j.setStreamController=function(T){this.streamController=T},j.registerListeners=function(){this.hls.on(Y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},j.unregisterListeners=function(){this.hls.off(Y.Events.MEDIA_ATTACHING,this.onMediaAttaching)},j.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},j.onMediaAttaching=function(T,v){var f=this.hls.config;if(f.capLevelOnFPSDrop){var p=v.media instanceof self.HTMLVideoElement?v.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(T,v,f){var p=performance.now();if(v){if(this.lastTime){var c=p-this.lastTime,s=f-this.lastDroppedFrames,d=v-this.lastDecodedFrames,u=1e3*s/c,l=this.hls;if(l.trigger(Y.Events.FPS_DROP,{currentDropped:s,currentDecoded:d,totalDroppedFrames:f}),u>0&&s>l.config.fpsDroppedMonitoringThreshold*d){var a=l.currentLevel;W.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+a),a>0&&(l.autoLevelCapping===-1||l.autoLevelCapping>=a)&&(a=a-1,l.trigger(Y.Events.FPS_DROP_LEVEL_CAPPING,{level:a,droppedLevel:l.currentLevel}),l.autoLevelCapping=a,this.streamController.nextLevelSwitch())}}this.lastTime=p,this.lastDroppedFrames=f,this.lastDecodedFrames=v}},j.checkFPSInterval=function(){var T=this.media;if(T)if(this.isVideoPlaybackQualityAvailable){var v=T.getVideoPlaybackQuality();this.checkFPS(T,v.totalVideoFrames,v.droppedVideoFrames)}else this.checkFPS(T,T.webkitDecodedFrameCount,T.webkitDroppedFrameCount)},G}();z.default=D},"./src/controller/fragment-finders.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"findFragmentByPDT",function(){return D}),N.d(z,"findFragmentByPTS",function(){return G}),N.d(z,"fragmentWithinToleranceTest",function(){return j}),N.d(z,"pdtWithinToleranceTest",function(){return n}),N.d(z,"findFragWithCC",function(){return T});var Y=N("./src/polyfills/number.ts"),W=N("./src/utils/binary-search.ts");function D(v,f,p){if(f===null||!Array.isArray(v)||!v.length||!Object(Y.isFiniteNumber)(f))return null;var c=v[0].programDateTime;if(f<(c||0))return null;var s=v[v.length-1].endProgramDateTime;if(f>=(s||0))return null;p=p||0;for(var d=0;d<v.length;++d){var u=v[d];if(n(f,p,u))return u}return null}function G(v,f,p,c){p===void 0&&(p=0),c===void 0&&(c=0);var s=null;if(v?s=f[v.sn-f[0].sn+1]||null:p===0&&f[0].start===0&&(s=f[0]),s&&j(p,c,s)===0)return s;var d=W.default.search(f,j.bind(null,p,c));return d||s}function j(v,f,p){v===void 0&&(v=0),f===void 0&&(f=0);var c=Math.min(f,p.duration+(p.deltaPTS?p.deltaPTS:0));return p.start+p.duration-c<=v?1:p.start-c>v&&p.start?-1:0}function n(v,f,p){var c=Math.min(f,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,s=p.endProgramDateTime||0;return s-c>v}function T(v,f){return W.default.search(v,function(p){return p.cc<f?1:p.cc>f?-1:0})}},"./src/controller/fragment-tracker.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"FragmentState",function(){return D}),N.d(z,"FragmentTracker",function(){return G});var Y=N("./src/events.ts"),W=N("./src/types/loader.ts"),D;(function(T){T.NOT_LOADED="NOT_LOADED",T.BACKTRACKED="BACKTRACKED",T.APPENDING="APPENDING",T.PARTIAL="PARTIAL",T.OK="OK"})(D||(D={}));var G=function(){function T(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 v=T.prototype;return v._registerListeners=function(){var p=this.hls;p.on(Y.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(Y.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(Y.Events.FRAG_LOADED,this.onFragLoaded,this)},v._unregisterListeners=function(){var p=this.hls;p.off(Y.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(Y.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(Y.Events.FRAG_LOADED,this.onFragLoaded,this)},v.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},v.getAppendedFrag=function(p,c){if(c===W.PlaylistLevelType.MAIN){var s=this.activeFragment,d=this.activeParts;if(!s)return null;if(d)for(var u=d.length;u--;){var l=d[u],a=l?l.end:s.appendedPTS;if(l.start<=p&&a!==void 0&&p<=a)return u>9&&(this.activeParts=d.slice(u-9)),l}else if(s.start<=p&&s.appendedPTS!==void 0&&p<=s.appendedPTS)return s}return this.getBufferedFrag(p,c)},v.getBufferedFrag=function(p,c){for(var s=this.fragments,d=Object.keys(s),u=d.length;u--;){var l=s[d[u]];if((l==null?void 0:l.body.type)===c&&l.buffered){var a=l.body;if(a.start<=p&&p<=a.end)return a}}return null},v.detectEvictedFragments=function(p,c,s){var d=this;Object.keys(this.fragments).forEach(function(u){var l=d.fragments[u];if(!l)return;if(!l.buffered){l.body.type===s&&d.removeFragment(l.body);return}var a=l.range[p];if(!a)return;a.time.some(function(i){var R=!d.isTimeBuffered(i.startPTS,i.endPTS,c);return R&&d.removeFragment(l.body),R})})},v.detectPartialFragments=function(p){var c=this,s=this.timeRanges,d=p.frag,u=p.part;if(!s||d.sn==="initSegment")return;var l=n(d),a=this.fragments[l];if(!a)return;Object.keys(s).forEach(function(i){var R=d.elementaryStreams[i];if(!R)return;var O=s[i],w=u!==null||R.partial===!0;a.range[i]=c.getBufferedTimes(d,u,w,O)}),a.backtrack=a.loaded=null,Object.keys(a.range).length?a.buffered=!0:this.removeFragment(a.body)},v.fragBuffered=function(p){var c=n(p),s=this.fragments[c];s&&(s.backtrack=s.loaded=null,s.buffered=!0)},v.getBufferedTimes=function(p,c,s,d){for(var u={time:[],partial:s},l=c?c.start:p.start,a=c?c.end:p.end,i=p.minEndPTS||a,R=p.maxStartPTS||l,O=0;O<d.length;O++){var w=d.start(O)-this.bufferPadding,M=d.end(O)+this.bufferPadding;if(R>=w&&i<=M){u.time.push({startPTS:Math.max(l,d.start(O)),endPTS:Math.min(a,d.end(O))});break}else if(l<M&&a>w)u.partial=!0,u.time.push({startPTS:Math.max(l,d.start(O)),endPTS:Math.min(a,d.end(O))});else if(a<=w)break}return u},v.getPartialFragment=function(p){var c=null,s,d,u,l=0,a=this.bufferPadding,i=this.fragments;return Object.keys(i).forEach(function(R){var O=i[R];if(!O)return;j(O)&&(d=O.body.start-a,u=O.body.end+a,p>=d&&p<=u&&(s=Math.min(p-d,u-p),l<=s&&(c=O.body,l=s)))}),c},v.getState=function(p){var c=n(p),s=this.fragments[c];return s?s.buffered?j(s)?D.PARTIAL:D.OK:s.backtrack?D.BACKTRACKED:D.APPENDING:D.NOT_LOADED},v.backtrack=function(p,c){var s=n(p),d=this.fragments[s];if(!d||d.backtrack)return null;var u=d.backtrack=c||d.loaded;return d.loaded=null,u},v.getBacktrackData=function(p){var c=n(p),s=this.fragments[c];if(s){var d,u=s.backtrack;if(u!=null&&(d=u.payload)!==null&&d!==void 0&&d.byteLength)return u;this.removeFragment(p)}return null},v.isTimeBuffered=function(p,c,s){for(var d,u,l=0;l<s.length;l++){if(d=s.start(l)-this.bufferPadding,u=s.end(l)+this.bufferPadding,p>=d&&c<=u)return!0;if(c<=d)return!1}return!1},v.onFragLoaded=function(p,c){var s=c.frag,d=c.part;if(s.sn==="initSegment"||s.bitrateTest||d)return;var u=n(s);this.fragments[u]={body:s,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},v.onBufferAppended=function(p,c){var s=this,d=c.frag,u=c.part,l=c.timeRanges;if(d.type===W.PlaylistLevelType.MAIN)if(this.activeFragment=d,u){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(u)}else this.activeParts=null;this.timeRanges=l,Object.keys(l).forEach(function(i){var R=l[i];if(s.detectEvictedFragments(i,R),!u)for(var O=0;O<R.length;O++)d.appendedPTS=Math.max(R.end(O),d.appendedPTS||0)})},v.onFragBuffered=function(p,c){this.detectPartialFragments(c)},v.hasFragment=function(p){var c=n(p);return!!this.fragments[c]},v.removeFragmentsInRange=function(p,c,s){var d=this;Object.keys(this.fragments).forEach(function(u){var l=d.fragments[u];if(!l)return;if(l.buffered){var a=l.body;a.type===s&&a.start<c&&a.end>p&&d.removeFragment(a)}})},v.removeFragment=function(p){var c=n(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),delete this.fragments[c]},v.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},T}();function j(T){var v,f;return T.buffered&&(((v=T.range.video)===null||v===void 0?void 0:v.partial)||((f=T.range.audio)===null||f===void 0?void 0:f.partial))}function n(T){return T.type+"_"+T.level+"_"+T.urlId+"_"+T.sn}},"./src/controller/gap-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"STALL_MINIMUM_DURATION_MS",function(){return j}),N.d(z,"MAX_START_GAP_JUMP",function(){return n}),N.d(z,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return T}),N.d(z,"SKIP_BUFFER_RANGE_START",function(){return v}),N.d(z,"default",function(){return f});var Y=N("./src/utils/buffer-helper.ts"),W=N("./src/errors.ts"),D=N("./src/events.ts"),G=N("./src/utils/logger.ts"),j=250,n=2,T=.1,v=.05,f=function(){function p(s,d,u,l){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=s,this.media=d,this.fragmentTracker=u,this.hls=l}var c=p.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(d){var u=this.config,l=this.media,a=this.stalled,i=l.currentTime,R=l.seeking,O=this.seeking&&!R,w=!this.seeking&&R;if(this.seeking=R,i!==d){if(this.moved=!0,a!==null){if(this.stallReported){var M=self.performance.now()-a;G.logger.warn("playback not stuck anymore @"+i+", after "+Math.round(M)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((w||O)&&(this.stalled=null),l.paused||l.ended||l.playbackRate===0||!Y.BufferHelper.getBuffered(l).length)return;var L=Y.BufferHelper.bufferInfo(l,i,0),_=L.len>0,b=L.nextStart||0;if(!_&&!b)return;if(R){var g=L.len>n,h=!b||b-i>n&&!this.fragmentTracker.getPartialFragment(i);if(g||h)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var C,x=Math.max(b,L.start||0)-i,m=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,P=m==null||((C=m.details)===null||C===void 0)?void 0:C.live,k=P?m.details.targetduration*2:n;if(x>0&&x<=k){this._trySkipBufferHole(null);return}}var y=self.performance.now();if(a===null){this.stalled=y;return}var S=y-a;!R&&S>=j&&this._reportStall(L.len);var F=Y.BufferHelper.bufferInfo(l,i,u.maxBufferHole);this._tryFixBufferStall(F,S)},c._tryFixBufferStall=function(d,u){var l=this.config,a=this.fragmentTracker,i=this.media,R=i.currentTime,O=a.getPartialFragment(R);if(O){var w=this._trySkipBufferHole(O);if(w)return}d.len>l.maxBufferHole&&u>l.highBufferWatchdogPeriod*1e3&&(G.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(d){var u=this.hls,l=this.media,a=this.stallReported;a||(this.stallReported=!0,G.logger.warn("Playback stalling at @"+l.currentTime+" due to low buffer (buffer="+d+")"),u.trigger(D.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,l=this.hls,a=this.media,i=a.currentTime,R=0,O=Y.BufferHelper.getBuffered(a),w=0;w<O.length;w++){var M=O.start(w);if(i+u.maxBufferHole>=R&&i<M){var L=Math.max(M+v,a.currentTime+T);return G.logger.warn("skipping hole, adjusting currentTime from "+i+" to "+L),this.moved=!0,this.stalled=null,a.currentTime=L,d&&l.trigger(D.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+i+" to "+L,frag:d}),L}R=O.end(w)}return 0},c._tryNudgeBuffer=function(){var d=this.config,u=this.hls,l=this.media,a=l.currentTime,i=(this.nudgeRetry||0)+1;if(this.nudgeRetry=i,i<d.nudgeMaxRetry){var R=a+i*d.nudgeOffset;G.logger.warn("Nudging 'currentTime' from "+a+" to "+R),l.currentTime=R,u.trigger(D.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else G.logger.error("Playhead still not moving while enough data buffered @"+a+" after "+d.nudgeMaxRetry+" nudges"),u.trigger(D.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},p}()},"./src/controller/id3-track-controller.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/events.ts"),W=N("./src/utils/texttrack-utils.ts"),D=N("./src/demux/id3.ts"),G=.25,j=function(){function n(v){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=v,this._registerListeners()}var T=n.prototype;return T.destroy=function(){this._unregisterListeners()},T._registerListeners=function(){var f=this.hls;f.on(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.on(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.on(Y.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),f.on(Y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},T._unregisterListeners=function(){var f=this.hls;f.off(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.off(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.off(Y.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),f.off(Y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},T.onMediaAttached=function(f,p){this.media=p.media},T.onMediaDetaching=function(){if(!this.id3Track)return;Object(W.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},T.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")},T.onFragParsingMetadata=function(f,p){if(!this.media)return;var c=p.frag,s=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<s.length;u++){var l=D.getID3Frames(s[u].data);if(l){var a=s[u].pts,i=u<s.length-1?s[u+1].pts:c.end,R=i-a;R<=0&&(i=a+G);for(var O=0;O<l.length;O++){var w=l[O];if(!D.isTimeStampFrame(w)){var M=new d(a,i,"");M.value=w,this.id3Track.addCue(M)}}}}},T.onBufferFlushing=function(f,p){var c=p.startOffset,s=p.endOffset,d=p.type;if(!d||d==="audio"){var u=this.id3Track;u&&Object(W.removeCuesInRange)(u,c,s)}},n}();z.default=j},"./src/controller/latency-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return n});var Y=N("./src/errors.ts"),W=N("./src/events.ts"),D=N("./src/utils/logger.ts");function G(T,v){for(var f=0;f<v.length;f++){var p=v[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(T,p.key,p)}}function j(T,v,f){return v&&G(T.prototype,v),f&&G(T,f),T}var n=function(){function T(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 v=T.prototype;return v.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},v.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)},v.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)},v.onMediaAttached=function(p,c){this.media=c.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},v.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},v.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},v.onLevelUpdated=function(p,c){var s=c.details;this.levelDetails=s,s.advanced&&this.timeupdate(),!s.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},v.onError=function(p,c){if(c.details!==Y.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,D.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},v.timeupdate=function(){var p=this.media,c=this.levelDetails;if(!p||!c)return;this.currentTime=p.currentTime;var s=this.computeLatency();if(s===null)return;this._latency=s;var d=this.config,u=d.lowLatencyMode,l=d.maxLiveSyncPlaybackRate;if(!u||l===1)return;var a=this.targetLatency;if(a===null)return;var i=s-a,R=Math.min(this.maxLatency,a+c.targetduration),O=i<R;if(c.live&&O&&i>.05&&this.forwardBufferLength>1){var w=Math.min(2,Math.max(1,l)),M=Math.round(2/(1+Math.exp(-.75*i-this.edgeStalled))*20)/20;p.playbackRate=Math.min(w,Math.max(1,M))}else p.playbackRate!==1&&p.playbackRate!==0&&(p.playbackRate=1)},v.estimateLiveEdge=function(){var p=this.levelDetails;return p===null?null:p.edge+p.age},v.computeLatency=function(){var p=this.estimateLiveEdge();return p===null?null:p-this.currentTime},j(T,[{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,s=p.partHoldBack,d=p.targetduration,u=this.config,l=u.liveSyncDuration,a=u.liveSyncDurationCount,i=u.lowLatencyMode,R=this.hls.userConfig,O=i&&s||c;(R.liveSyncDuration||R.liveSyncDurationCount||O===0)&&(O=l!==void 0?l:a*d);var w=d,M=1;return O+Math.min(this.stallCount*M,w)}},{key:"liveSyncPosition",get:function(){var p=this.estimateLiveEdge(),c=this.targetLatency,s=this.levelDetails;if(p===null||c===null||s===null)return null;var d=s.edge,u=p-c-this.edgeStalled,l=d-s.totalduration,a=d-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(l,u),a)}},{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 s=p.buffered.length;return s?p.buffered.end(s-1):c.edge-this.currentTime}}]),T}()},"./src/controller/level-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return u});var Y=N("./src/types/level.ts"),W=N("./src/events.ts"),D=N("./src/errors.ts"),G=N("./src/utils/codecs.ts"),j=N("./src/controller/level-helper.ts"),n=N("./src/controller/base-playlist-controller.ts"),T=N("./src/types/loader.ts");function v(){return v=Object.assign||function(l){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var R in i)Object.prototype.hasOwnProperty.call(i,R)&&(l[R]=i[R])}return l},v.apply(this,arguments)}function f(l,a){for(var i=0;i<a.length;i++){var R=a[i];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(l,R.key,R)}}function p(l,a,i){return a&&f(l.prototype,a),i&&f(l,i),l}function c(l,a){l.prototype=Object.create(a.prototype),l.prototype.constructor=l,s(l,a)}function s(l,a){return s=Object.setPrototypeOf||function(R,O){return R.__proto__=O,R},s(l,a)}var d=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),u=function(l){c(a,l);function a(R){var O;return O=l.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 i=a.prototype;return i._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)},i._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)},i.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,l.prototype.destroy.call(this)},i.startLoad=function(){var O=this._levels;O.forEach(function(w){w.loadError=0}),l.prototype.startLoad.call(this)},i.onManifestLoaded=function(O,w){var M=[],L=[],_=[],b,g={},h,C=!1,x=!1,m=!1;if(w.levels.forEach(function(S){var F=S.attrs;C=C||!!(S.width&&S.height),x=x||!!S.videoCodec,m=m||!!S.audioCodec,d&&S.audioCodec&&S.audioCodec.indexOf("mp4a.40.34")!==-1&&(S.audioCodec=void 0);var A=S.bitrate+"-"+S.attrs.RESOLUTION+"-"+S.attrs.CODECS;h=g[A],h?h.url.push(S.url):(h=new Y.Level(S),g[A]=h,M.push(h)),F&&(F.AUDIO&&Object(j.addGroupId)(h,"audio",F.AUDIO),F.SUBTITLES&&Object(j.addGroupId)(h,"text",F.SUBTITLES))}),(C||x)&&m&&(M=M.filter(function(S){var F=S.videoCodec,A=S.width,X=S.height;return!!F||!!(A&&X)})),M=M.filter(function(S){var F=S.audioCodec,A=S.videoCodec;return(!F||Object(G.isCodecSupportedInMp4)(F,"audio"))&&(!A||Object(G.isCodecSupportedInMp4)(A,"video"))}),w.audioTracks&&(L=w.audioTracks.filter(function(S){return!S.audioCodec||Object(G.isCodecSupportedInMp4)(S.audioCodec,"audio")}),Object(j.assignTrackIdsByGroup)(L)),w.subtitles&&(_=w.subtitles,Object(j.assignTrackIdsByGroup)(_)),M.length>0){b=M[0].bitrate,M.sort(function(S,F){return S.bitrate-F.bitrate}),this._levels=M;for(var P=0;P<M.length;P++)if(M[P].bitrate===b){this._firstLevel=P,this.log("manifest loaded, "+M.length+" level(s) found, first bitrate: "+b);break}var k=m&&!x,y={levels:M,audioTracks:L,subtitleTracks:_,firstLevel:this._firstLevel,stats:w.stats,audio:m,video:x,altAudio:!k&&L.some(function(S){return!!S.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:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:w.url,reason:"no level with compatible codecs found in manifest"})},i.onError=function(O,w){if(l.prototype.onError.call(this,O,w),w.fatal)return;var M=w.context,L=this._levels[this.currentLevelIndex];if(M&&(M.type===T.PlaylistContextType.AUDIO_TRACK&&L.audioGroupIds&&M.groupId===L.audioGroupIds[L.urlId]||M.type===T.PlaylistContextType.SUBTITLE_TRACK&&L.textGroupIds&&M.groupId===L.textGroupIds[L.urlId])){this.redundantFailover(this.currentLevelIndex);return}var _=!1,b=!0,g;switch(w.details){case D.ErrorDetails.FRAG_LOAD_ERROR:case D.ErrorDetails.FRAG_LOAD_TIMEOUT:case D.ErrorDetails.KEY_LOAD_ERROR:case D.ErrorDetails.KEY_LOAD_TIMEOUT:if(w.frag){var h=this._levels[w.frag.level];h?(h.fragmentError++,h.fragmentError>this.hls.config.fragLoadingMaxRetry&&(g=w.frag.level)):g=w.frag.level}break;case D.ErrorDetails.LEVEL_LOAD_ERROR:case D.ErrorDetails.LEVEL_LOAD_TIMEOUT:M&&(M.deliveryDirectives&&(b=!1),g=M.level),_=!0;break;case D.ErrorDetails.REMUX_ALLOC_ERROR:g=w.level,_=!0;break}g!==void 0&&this.recoverLevel(w,g,_,b)},i.recoverLevel=function(O,w,M,L){var _=O.details,b=this._levels[w];if(b.loadError++,M){var g=this.retryLoadingOrFail(O);if(g)O.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(L){var h=b.url.length;if(h>1&&b.loadError<h)O.levelRetry=!0,this.redundantFailover(w);else if(this.manualLevelIndex===-1){var C=w===0?this._levels.length-1:w-1;this.currentLevelIndex!==C&&this._levels[C].loadError===0&&(this.warn(_+": switch to "+C),O.levelRetry=!0,this.hls.nextAutoLevel=C)}}},i.redundantFailover=function(O){var w=this._levels[O],M=w.url.length;if(M>1){var L=(w.urlId+1)%M;this.warn("Switching to redundant URL-id "+L),this._levels.forEach(function(_){_.urlId=L}),this.level=O}},i.onFragLoaded=function(O,w){var M=w.frag;if(M!==void 0&&M.type===T.PlaylistLevelType.MAIN){var L=this._levels[M.level];L!==void 0&&(L.fragmentError=0,L.loadError=0)}},i.onLevelLoaded=function(O,w){var M,L=w.level,_=w.details,b=this._levels[L];if(!b){var g;this.warn("Invalid level index "+L),(g=w.deliveryDirectives)!==null&&g!==void 0&&g.skip&&(_.deltaUpdateFailed=!0);return}L===this.currentLevelIndex?(b.fragmentError===0&&(b.loadError=0,this.retryCount=0),this.playlistLoaded(L,w,b.details)):(M=w.deliveryDirectives)!==null&&M!==void 0&&M.skip&&(_.deltaUpdateFailed=!0)},i.onAudioTrackSwitched=function(O,w){var M=this.hls.levels[this.currentLevelIndex];if(!M)return;if(M.audioGroupIds){for(var L=-1,_=this.hls.audioTracks[w.id].groupId,b=0;b<M.audioGroupIds.length;b++)if(M.audioGroupIds[b]===_){L=b;break}L!==M.urlId&&(M.urlId=L,this.startLoad())}},i.loadPlaylist=function(O){var w=this.currentLevelIndex,M=this._levels[w];if(this.canLoad&&M&&M.url.length>0){var L=M.urlId,_=M.url[L];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 "+w+(O?" at sn "+O.msn+" part "+O.part:"")+" with URL-id "+L+" "+_),this.clearTimer(),this.hls.trigger(W.Events.LEVEL_LOADING,{url:_,level:w,id:L,deliveryDirectives:O||null})}},i.removeLevel=function(O,w){var M=function(b,g){return g!==w},L=this._levels.filter(function(_,b){return b!==O?!0:_.url.length>1&&w!==void 0?(_.url=_.url.filter(M),_.audioGroupIds&&(_.audioGroupIds=_.audioGroupIds.filter(M)),_.textGroupIds&&(_.textGroupIds=_.textGroupIds.filter(M)),_.urlId=0,!0):!1}).map(function(_,b){var g=_.details;return g!=null&&g.fragments&&g.fragments.forEach(function(h){h.level=b}),_});this._levels=L,this.hls.trigger(W.Events.LEVELS_UPDATED,{levels:L})},p(a,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(O){var w,M=this._levels;if(M.length===0)return;if(this.currentLevelIndex===O&&(w=M[O])!==null&&w!==void 0&&w.details)return;if(O<0||O>=M.length){var L=O<0;if(this.hls.trigger(W.Events.ERROR,{type:D.ErrorTypes.OTHER_ERROR,details:D.ErrorDetails.LEVEL_SWITCH_ERROR,level:O,fatal:L,reason:"invalid level idx"}),L)return;O=Math.min(O,M.length-1)}this.clearTimer();var _=this.currentLevelIndex,b=M[_],g=M[O];this.log("switching to level "+O+" from "+_),this.currentLevelIndex=O;var h=v({},g,{level:O,maxBitrate:g.maxBitrate,uri:g.uri,urlId:g.urlId});delete h._urlId,this.hls.trigger(W.Events.LEVEL_SWITCHING,h);var C=g.details;if(!C||C.live){var x=this.switchParams(g.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)}}]),a}(n.default)},"./src/controller/level-helper.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"addGroupId",function(){return D}),N.d(z,"assignTrackIdsByGroup",function(){return G}),N.d(z,"updatePTS",function(){return j}),N.d(z,"updateFragPTSDTS",function(){return T}),N.d(z,"mergeDetails",function(){return v}),N.d(z,"mapPartIntersection",function(){return f}),N.d(z,"mapFragmentIntersection",function(){return p}),N.d(z,"adjustSliding",function(){return c}),N.d(z,"addSliding",function(){return s}),N.d(z,"computeReloadInterval",function(){return d}),N.d(z,"getFragmentWithSN",function(){return u}),N.d(z,"getPartWith",function(){return l});var Y=N("./src/polyfills/number.ts"),W=N("./src/utils/logger.ts");function D(a,i,R){switch(i){case"audio":a.audioGroupIds||(a.audioGroupIds=[]),a.audioGroupIds.push(R);break;case"text":a.textGroupIds||(a.textGroupIds=[]),a.textGroupIds.push(R);break}}function G(a){var i={};a.forEach(function(R){var O=R.groupId||"";R.id=i[O]=i[O]||0,i[O]++})}function j(a,i,R){var O=a[i],w=a[R];n(O,w)}function n(a,i){var R=i.startPTS;if(Object(Y.isFiniteNumber)(R)){var O=0,w;i.sn>a.sn?(O=R-a.start,w=a):(O=a.start-R,w=i),w.duration!==O&&(w.duration=O)}else if(i.sn>a.sn){var M=a.cc===i.cc;M&&a.minEndPTS?i.start=a.start+(a.minEndPTS-a.start):i.start=a.start+a.duration}else i.start=Math.max(a.start-i.duration,0)}function T(a,i,R,O,w,M){var L=O-R;L<=0&&(W.logger.warn("Fragment should have a positive duration",i),O=R+i.duration,M=w+i.duration);var _=R,b=O,g=i.startPTS,h=i.endPTS;if(Object(Y.isFiniteNumber)(g)){var C=Math.abs(g-R);Object(Y.isFiniteNumber)(i.deltaPTS)?i.deltaPTS=Math.max(C,i.deltaPTS):i.deltaPTS=C,_=Math.max(R,g),R=Math.min(R,g),w=Math.min(w,i.startDTS),b=Math.min(O,h),O=Math.max(O,h),M=Math.max(M,i.endDTS)}i.duration=O-R;var x=R-i.start;i.appendedPTS=O,i.start=i.startPTS=R,i.maxStartPTS=_,i.startDTS=w,i.endPTS=O,i.minEndPTS=b,i.endDTS=M;var m=i.sn;if(!a||m<a.startSN||m>a.endSN)return 0;var P,k=m-a.startSN,y=a.fragments;for(y[k]=i,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 a.fragmentHint&&n(y[y.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,x}function v(a,i){for(var R=null,O=a.fragments,w=O.length-1;w>=0;w--){var M=O[w].initSegment;if(M){R=M;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;var L=0,_;if(p(a,i,function(P,k){P.relurl&&(L=P.cc-k.cc),Object(Y.isFiniteNumber)(P.startPTS)&&Object(Y.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),i.PTSKnown=i.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=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.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(i.skippedSegments&&(i.deltaUpdateFailed=i.fragments.some(function(P){return!P}),i.deltaUpdateFailed)){W.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var g=i.skippedSegments;g--;)i.fragments.shift();i.startSN=i.fragments[0].sn,i.startCC=i.fragments[0].cc}var h=i.fragments;if(L){W.logger.warn("discontinuity sliding from playlist, take drift into account");for(var C=0;C<h.length;C++)h[C].cc+=L}i.skippedSegments&&(i.startCC=i.fragments[0].cc),f(a.partList,i.partList,function(P,k){k.elementaryStreams=P.elementaryStreams,k.stats=P.stats}),_?T(i,_,_.startPTS,_.endPTS,_.startDTS,_.endDTS):c(a,i),h.length&&(i.totalduration=i.edge-h[0].start),i.driftStartTime=a.driftStartTime,i.driftStart=a.driftStart;var x=i.advancedDateTime;if(i.advanced&&x){var m=i.edge;i.driftStart||(i.driftStartTime=x,i.driftStart=m),i.driftEndTime=x,i.driftEnd=m}else i.driftEndTime=a.driftEndTime,i.driftEnd=a.driftEnd,i.advancedDateTime=a.advancedDateTime}function f(a,i,R){if(a&&i)for(var O=0,w=0,M=a.length;w<=M;w++){var L=a[w],_=i[w+O];L&&_&&L.index===_.index&&L.fragment.sn===_.fragment.sn?R(L,_):O--}}function p(a,i,R){for(var O=i.skippedSegments,w=Math.max(a.startSN,i.startSN)-i.startSN,M=(a.fragmentHint?1:0)+(O?i.endSN:Math.min(a.endSN,i.endSN))-i.startSN,L=i.startSN-a.startSN,_=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments,b=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments,g=w;g<=M;g++){var h=b[L+g],C=_[g];O&&!C&&g<O&&(C=i.fragments[g]=h),h&&C&&R(h,C)}}function c(a,i){var R=i.startSN+i.skippedSegments-a.startSN,O=a.fragments;if(R<0||R>=O.length)return;s(i,O[R].start)}function s(a,i){if(i){for(var R=a.fragments,O=a.skippedSegments;O<R.length;O++)R[O].start+=i;a.fragmentHint&&(a.fragmentHint.start+=i)}}function d(a,i){var R=1e3*a.levelTargetDuration,O=R/2,w=a.age,M=w>0&&w<R*3,L=i.loading.end-i.loading.start,_,b=a.availabilityDelay;if(a.updated===!1)if(M){var g=333*a.misses;_=Math.max(Math.min(O,L*2),g),a.availabilityDelay=(a.availabilityDelay||0)+_}else _=O;else M?(b=Math.min(b||R/2,w),a.availabilityDelay=b,_=b+R-w):_=R-L;return Math.round(_)}function u(a,i,R){if(!a||!a.details)return null;var O=a.details,w=O.fragments[i-O.startSN];return w||(w=O.fragmentHint,w&&w.sn===i?w:i<O.startSN&&R&&R.sn===i?R:null)}function l(a,i,R){if(!a||!a.details)return null;var O=a.details.partList;if(O)for(var w=O.length;w--;){var M=O[w];if(M.index===R&&M.fragment.sn===i)return M}return null}},"./src/controller/stream-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return O});var Y=N("./src/polyfills/number.ts"),W=N("./src/controller/base-stream-controller.ts"),D=N("./src/is-supported.ts"),G=N("./src/events.ts"),j=N("./src/utils/buffer-helper.ts"),n=N("./src/controller/fragment-tracker.ts"),T=N("./src/types/loader.ts"),v=N("./src/loader/fragment.ts"),f=N("./src/demux/transmuxer-interface.ts"),p=N("./src/types/transmuxer.ts"),c=N("./src/controller/gap-controller.ts"),s=N("./src/errors.ts"),d=N("./src/utils/logger.ts");function u(w,M){for(var L=0;L<M.length;L++){var _=M[L];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(w,_.key,_)}}function l(w,M,L){return M&&u(w.prototype,M),L&&u(w,L),w}function a(w,M){w.prototype=Object.create(M.prototype),w.prototype.constructor=w,i(w,M)}function i(w,M){return i=Object.setPrototypeOf||function(_,b){return _.__proto__=b,_},i(w,M)}var R=100,O=function(w){a(M,w);function M(_,b){var g;return g=w.call(this,_,b,"[stream-controller]")||this,g.audioCodecSwap=!1,g.gapController=null,g.level=-1,g._forceStartLoad=!1,g.altAudio=!1,g.audioOnly=!1,g.fragPlaying=null,g.onvplaying=null,g.onvseeked=null,g.fragLastKbps=0,g.stalled=!1,g.couldBacktrack=!1,g.audioCodecSwitch=!1,g.videoBuffer=null,g._registerListeners(),g}var L=M.prototype;return L._registerListeners=function(){var b=this.hls;b.on(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.on(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.on(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.on(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.on(G.Events.LEVEL_LOADING,this.onLevelLoading,this),b.on(G.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(G.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),b.on(G.Events.ERROR,this.onError,this),b.on(G.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.on(G.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(G.Events.BUFFER_CREATED,this.onBufferCreated,this),b.on(G.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.on(G.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),b.on(G.Events.FRAG_BUFFERED,this.onFragBuffered,this)},L._unregisterListeners=function(){var b=this.hls;b.off(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.off(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.off(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.off(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.off(G.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(G.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),b.off(G.Events.ERROR,this.onError,this),b.off(G.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.off(G.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(G.Events.BUFFER_CREATED,this.onBufferCreated,this),b.off(G.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.off(G.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),b.off(G.Events.FRAG_BUFFERED,this.onFragBuffered,this)},L.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},L.startLoad=function(b){if(this.levels){var g=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}g>0&&b===-1&&(this.log("Override startPosition with lastCurrentTime @"+g.toFixed(3)),b=g),this.state=W.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=b,this.tick()}else this._forceStartLoad=!0,this.state=W.State.STOPPED},L.stopLoad=function(){this._forceStartLoad=!1,w.prototype.stopLoad.call(this)},L.doTick=function(){switch(this.state){case W.State.IDLE:this.doTickIdle();break;case W.State.WAITING_LEVEL:{var b,g=this.levels,h=this.level,C=g==null||((b=g[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,m=self.performance.now(),P=this.retryDate;(!P||m>=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()},L.onTickEnd=function(){w.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},L.doTickIdle=function(){var b,g,h=this.hls,C=this.levelLastLoaded,x=this.levels,m=this.media,P=h.config,k=h.nextLoadLevel;if(C===null||!m&&(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 S=y.details;if(!S||this.state===W.State.WAITING_LEVEL||S.live&&this.levelLastLoaded!==k){this.state=W.State.WAITING_LEVEL;return}var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:m,T.PlaylistLevelType.MAIN);if(F===null)return;var A=F.len,X=this.getMaxBufferLength(y.maxBitrate);if(A>=X)return;if(this._streamEnded(F,S)){var ne={};this.altAudio&&(ne.type="video"),this.hls.trigger(G.Events.BUFFER_EOS,ne),this.state=W.State.ENDED;return}var fe=F.end,ye=this.getNextFragment(fe,S);if(this.couldBacktrack&&!this.fragPrevious&&ye&&ye.sn!=="initSegment"){var Pe=ye.sn-S.startSN;Pe>1&&(ye=S.fragments[Pe-1],this.fragmentTracker.removeFragment(ye))}if(ye&&this.fragmentTracker.getState(ye)===n.FragmentState.OK&&this.nextLoadPosition>fe){var xe=this.audioOnly&&!this.altAudio?v.ElementaryStreamTypes.AUDIO:v.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(m,xe,T.PlaylistLevelType.MAIN),ye=this.getNextFragment(this.nextLoadPosition,S)}if(!ye)return;ye.initSegment&&!ye.initSegment.data&&!this.bitrateTest&&(ye=ye.initSegment),((b=ye.decryptdata)===null||b===void 0?void 0:b.keyFormat)==="identity"&&!((g=ye.decryptdata)!==null&&g!==void 0&&g.key)?this.loadKey(ye,S):this.loadFragment(ye,S,fe)},L.loadFragment=function(b,g,h){var C,x=this.fragmentTracker.getState(b);if(this.fragCurrent=b,x===n.FragmentState.BACKTRACKED){var m=this.fragmentTracker.getBacktrackData(b);if(m){this._handleFragmentLoadProgress(m),this._handleFragmentLoadComplete(m);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,w.prototype.loadFragment.call(this,b,g,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()},L.getAppendedFrag=function(b){var g=this.fragmentTracker.getAppendedFrag(b,T.PlaylistLevelType.MAIN);return g&&"fragment"in g?g.fragment:g},L.getBufferedFrag=function(b){return this.fragmentTracker.getBufferedFrag(b,T.PlaylistLevelType.MAIN)},L.followingBufferedFrag=function(b){return b?this.getBufferedFrag(b.end+.5):null},L.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},L.nextLevelSwitch=function(){var b=this.levels,g=this.media;if(g!=null&&g.readyState){var h,C=this.getAppendedFrag(g.currentTime);if(C&&C.start>1&&this.flushMainBuffer(0,C.start-1),!g.paused&&b){var x=this.hls.nextLoadLevel,m=b[x],P=this.fragLastKbps;P&&this.fragCurrent?h=this.fragCurrent.duration*m.maxBitrate/(1e3*P)+1:h=0}else h=0;var k=this.getBufferedFrag(g.currentTime+h);if(k){var y=this.followingBufferedFrag(k);if(y){this.abortCurrentFrag();var S=y.maxStartPTS?y.maxStartPTS:y.start,F=y.duration,A=Math.max(k.end,S+Math.min(Math.max(F-this.config.maxFragLookUpTolerance,F*.5),F*.75));this.flushMainBuffer(A,Number.POSITIVE_INFINITY)}}}},L.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()},L.flushMainBuffer=function(b,g){w.prototype.flushMainBuffer.call(this,b,g,this.altAudio?"video":null)},L.onMediaAttached=function(b,g){w.prototype.onMediaAttached.call(this,b,g);var h=g.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)},L.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),w.prototype.onMediaDetaching.call(this)},L.onMediaPlaying=function(){this.tick()},L.onMediaSeeked=function(){var b=this.media,g=b?b.currentTime:null;Object(Y.isFiniteNumber)(g)&&this.log("Media seeked to "+g.toFixed(3)),this.tick()},L.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(G.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},L.onManifestParsed=function(b,g){var h=!1,C=!1,x;g.levels.forEach(function(m){x=m.audioCodec,x&&(x.indexOf("mp4a.40.2")!==-1&&(h=!0),x.indexOf("mp4a.40.5")!==-1&&(C=!0))}),this.audioCodecSwitch=h&&C&&!Object(D.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=g.levels,this.startFragRequested=!1},L.onLevelLoading=function(b,g){var h=this.levels;if(!h||this.state!==W.State.IDLE)return;var C=h[g.level];(!C.details||C.details.live&&this.levelLastLoaded!==g.level||this.waitForCdnTuneIn(C.details))&&(this.state=W.State.WAITING_LEVEL)},L.onLevelLoaded=function(b,g){var h,C=this.levels,x=g.level,m=g.details,P=m.totalduration;if(!C){this.warn("Levels were reset while loading level "+x);return}this.log("Level "+x+" loaded ["+m.startSN+","+m.endSN+"], cc ["+m.startCC+", "+m.endCC+"] duration:"+P);var k=this.fragCurrent;k&&(this.state===W.State.FRAG_LOADING||this.state===W.State.FRAG_LOADING_WAITING_RETRY)&&(k.level!==g.level&&k.loader&&(this.state=W.State.IDLE,k.loader.abort()));var y=C[x],S=0;if(m.live||(h=y.details)!==null&&h!==void 0&&h.live){if(m.fragments[0]||(m.deltaUpdateFailed=!0),m.deltaUpdateFailed)return;S=this.alignPlaylists(m,y.details)}if(y.details=m,this.levelLastLoaded=x,this.hls.trigger(G.Events.LEVEL_UPDATED,{details:m,level:x}),this.state===W.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(m))return;this.state=W.State.IDLE}this.startFragRequested?m.live&&this.synchronizeToLiveEdge(m):this.setStartPosition(m,S),this.tick()},L._handleFragmentLoadProgress=function(b){var g,h=b.frag,C=b.part,x=b.payload,m=this.levels;if(!m){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=m[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,S=k.PTSKnown||!k.live,F=(g=h.initSegment)===null||g===void 0?void 0:g.data,A=this._getAudioCodec(P),X=this.transmuxer=this.transmuxer||new f.default(this.hls,T.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ne=C?C.index:-1,fe=ne!==-1,ye=new p.ChunkMetadata(h.level,h.sn,h.stats.chunkCount,x.byteLength,ne,fe),Pe=this.initPTS[h.cc];X.push(x,F,A,y,h,C,k.totalduration,S,ye,Pe)},L.onAudioTrackSwitching=function(b,g){var h=this.altAudio,C=!!g.url,x=g.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 m=this.fragCurrent;m!=null&&m.loader&&(this.log("Switching to main audio track, cancel main fragment load"),m.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var P=this.hls;h&&P.trigger(G.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),P.trigger(G.Events.AUDIO_TRACK_SWITCHED,{id:x})}},L.onAudioTrackSwitched=function(b,g){var h=g.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()},L.onBufferCreated=function(b,g){var h=g.tracks,C,x,m=!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 m=!0}m&&C?(this.log("Alternate track found, use "+x+".buffered to schedule main fragment loading"),this.mediaBuffer=C.buffer):this.mediaBuffer=this.media},L.onFragBuffered=function(b,g){var h=g.frag,C=g.part;if(h&&h.type!==T.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)},L.onError=function(b,g){switch(g.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(T.PlaylistLevelType.MAIN,g);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==W.State.ERROR&&(g.fatal?(this.warn(""+g.details),this.state=W.State.ERROR):!g.levelRetry&&this.state===W.State.WAITING_LEVEL&&(this.state=W.State.IDLE));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(g.parent==="main"&&(this.state===W.State.PARSING||this.state===W.State.PARSED)){var h=!0,C=this.getFwdBufferInfo(this.media,T.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}},L.checkBuffer=function(){var b=this.media,g=this.gapController;if(!b||!g||!b.readyState)return;var h=j.BufferHelper.getBuffered(b);!this.loadedmetadata&&h.length?(this.loadedmetadata=!0,this.seekToStartPos()):g.poll(this.lastCurrentTime),this.lastCurrentTime=b.currentTime},L.onFragLoadEmergencyAborted=function(){this.state=W.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},L.onBufferFlushed=function(b,g){var h=g.type;if(h!==v.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var C=(h===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(C,h,T.PlaylistLevelType.MAIN)}},L.onLevelsUpdated=function(b,g){this.levels=g.levels},L.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},L.seekToStartPos=function(){var b=this.media,g=b.currentTime,h=this.startPosition;if(h>=0&&g<h){if(b.seeking){d.logger.log("could not seek to "+h+", already seeking at "+g);return}var C=j.BufferHelper.getBuffered(b),x=C.length?C.start(0):0,m=x-h;m>0&&(m<this.config.maxBufferHole||m<this.config.maxFragLookUpTolerance)&&(d.logger.log("adjusting start position by "+m+" to match buffer start"),h+=m,this.startPosition=h),this.log("seek to target start position "+h+" from current time "+g),b.currentTime=h}},L._getAudioCodec=function(b){var g=this.config.defaultAudioCodec||b.audioCodec;return this.audioCodecSwap&&g&&(this.log("Swapping audio codec"),g.indexOf("mp4a.40.5")!==-1?g="mp4a.40.2":g="mp4a.40.5"),g},L._loadBitrateTestFrag=function(b){var g=this;this._doFragLoad(b).then(function(h){var C=g.hls;if(!h||C.nextLoadLevel||g.fragContextChanged(b))return;g.fragLoadError=0,g.state=W.State.IDLE,g.startFragRequested=!1,g.bitrateTest=!1;var x=b.stats;x.parsing.start=x.parsing.end=x.buffering.start=x.buffering.end=self.performance.now(),C.trigger(G.Events.FRAG_LOADED,h)})},L._handleTransmuxComplete=function(b){var g,h="main",C=this.hls,x=b.remuxResult,m=b.chunkMeta,P=this.getCurrentContext(m);if(!P){this.warn("The loading context changed while buffering fragment "+m.sn+" of level "+m.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(m.level);return}var k=P.frag,y=P.part,S=P.level,F=x.video,A=x.text,X=x.id3,ne=x.initSegment,fe=this.altAudio?void 0:x.audio;if(this.fragContextChanged(k))return;if(this.state=W.State.PARSING,ne){ne.tracks&&(this._bufferInitSegment(S,ne.tracks,k,m),C.trigger(G.Events.FRAG_PARSING_INIT_SEGMENT,{frag:k,id:h,tracks:ne.tracks}));var ye=ne.initPTS,Pe=ne.timescale;Object(Y.isFiniteNumber)(ye)&&(this.initPTS[k.cc]=ye,C.trigger(G.Events.INIT_PTS_FOUND,{frag:k,id:h,initPTS:ye,timescale:Pe}))}if(F&&x.independent!==!1){if(S.details){var xe=F.startPTS,Ie=F.endPTS,Me=F.startDTS,ke=F.endDTS;if(y)y.elementaryStreams[F.type]={startPTS:xe,endPTS:Ie,startDTS:Me,endDTS:ke};else if(F.firstKeyFrame&&F.independent&&(this.couldBacktrack=!0),F.dropped&&F.independent){var Ee=this.getLoadPosition()+this.config.maxBufferHole;if(Ee<xe){this.backtrack(k);return}k.setElementaryStreamInfo(F.type,k.start,Ie,k.start,ke,!0)}k.setElementaryStreamInfo(F.type,xe,Ie,Me,ke),this.bufferFragmentData(F,k,y,m)}}else if(x.independent===!1){this.backtrack(k);return}if(fe){var J=fe.startPTS,I=fe.endPTS,U=fe.startDTS,K=fe.endDTS;y&&(y.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:J,endPTS:I,startDTS:U,endDTS:K}),k.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,J,I,U,K),this.bufferFragmentData(fe,k,y,m)}if(X!=null&&(g=X.samples)!==null&&g!==void 0&&g.length){var q={frag:k,id:h,samples:X.samples};C.trigger(G.Events.FRAG_PARSING_METADATA,q)}if(A){var V={frag:k,id:h,samples:A.samples};C.trigger(G.Events.FRAG_PARSING_USERDATA,V)}},L._bufferInitSegment=function(b,g,h,C){var x=this;if(this.state!==W.State.PARSING)return;this.audioOnly=!!g.audio&&!g.video,this.altAudio&&!this.audioOnly&&delete g.audio;var m=g.audio,P=g.video,k=g.audiovideo;if(m){var y=b.audioCodec,S=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(y&&(y.indexOf("mp4a.40.5")!==-1?y="mp4a.40.2":y="mp4a.40.5"),m.metadata.channelCount!==1&&S.indexOf("firefox")===-1&&(y="mp4a.40.5")),S.indexOf("android")!==-1&&m.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+'"'),m.levelCodec=y,m.id="main",this.log("Init audio buffer, container:"+m.container+", codecs[selected/level/parsed]=["+(y||"")+"/"+(b.audioCodec||"")+"/"+m.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(G.Events.BUFFER_CODECS,g),Object.keys(g).forEach(function(F){var A=g[F],X=A.initSegment;X!=null&&X.byteLength&&x.hls.trigger(G.Events.BUFFER_APPENDING,{type:F,data:X,frag:h,part:null,chunkMeta:C,parent:h.type})}),this.tick()},L.backtrack=function(b){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(b);var g=this.fragmentTracker.backtrack(b);this.fragPrevious=null,this.nextLoadPosition=b.start,g?this.resetFragmentLoading(b):this.state=W.State.BACKTRACKING},L.checkFragmentChanged=function(){var b=this.media,g=null;if(b&&b.readyState>1&&b.seeking===!1){var h=b.currentTime;if(j.BufferHelper.isBuffered(b,h)?g=this.getAppendedFrag(h):j.BufferHelper.isBuffered(b,h+.1)&&(g=this.getAppendedFrag(h+.1)),g){var C=this.fragPlaying,x=g.level;(!C||g.sn!==C.sn||C.level!==x||g.urlId!==C.urlId)&&(this.hls.trigger(G.Events.FRAG_CHANGED,{frag:g}),(!C||C.level!==x)&&this.hls.trigger(G.Events.LEVEL_SWITCHED,{level:x}),this.fragPlaying=g)}}},l(M,[{key:"nextLevel",get:function(){var b=this.nextBufferedFrag;return b?b.level:-1}},{key:"currentLevel",get:function(){var b=this.media;if(b){var g=this.getAppendedFrag(b.currentTime);if(g)return g.level}return-1}},{key:"nextBufferedFrag",get:function(){var b=this.media;if(b){var g=this.getAppendedFrag(b.currentTime);return this.followingBufferedFrag(g)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),M}(W.default)},"./src/controller/subtitle-stream-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"SubtitleStreamController",function(){return a});var Y=N("./src/events.ts"),W=N("./src/utils/logger.ts"),D=N("./src/utils/buffer-helper.ts"),G=N("./src/controller/fragment-finders.ts"),j=N("./src/utils/discontinuities.ts"),n=N("./src/controller/level-helper.ts"),T=N("./src/controller/fragment-tracker.ts"),v=N("./src/controller/base-stream-controller.ts"),f=N("./src/types/loader.ts"),p=N("./src/types/level.ts");function c(i,R){for(var O=0;O<R.length;O++){var w=R[O];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(i,w.key,w)}}function s(i,R,O){return R&&c(i.prototype,R),O&&c(i,O),i}function d(i,R){i.prototype=Object.create(R.prototype),i.prototype.constructor=i,u(i,R)}function u(i,R){return u=Object.setPrototypeOf||function(w,M){return w.__proto__=M,w},u(i,R)}var l=500,a=function(i){d(R,i);function R(w,M){var L;return L=i.call(this,w,M,"[subtitle-stream-controller]")||this,L.levels=[],L.currentTrackId=-1,L.tracksBuffered=[],L.mainDetails=null,L._registerListeners(),L}var O=R.prototype;return O.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},O._registerListeners=function(){var M=this.hls;M.on(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),M.on(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),M.on(Y.Events.MANIFEST_LOADING,this.onManifestLoading,this),M.on(Y.Events.LEVEL_LOADED,this.onLevelLoaded,this),M.on(Y.Events.ERROR,this.onError,this),M.on(Y.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),M.on(Y.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),M.on(Y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),M.on(Y.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),M.on(Y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},O._unregisterListeners=function(){var M=this.hls;M.off(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),M.off(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),M.off(Y.Events.MANIFEST_LOADING,this.onManifestLoading,this),M.off(Y.Events.LEVEL_LOADED,this.onLevelLoaded,this),M.off(Y.Events.ERROR,this.onError,this),M.off(Y.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),M.off(Y.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),M.off(Y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),M.off(Y.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),M.off(Y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},O.startLoad=function(){this.stopLoad(),this.state=v.State.IDLE,this.setInterval(l),this.tick()},O.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},O.onLevelLoaded=function(M,L){this.mainDetails=L.details},O.onSubtitleFragProcessed=function(M,L){var _=L.frag,b=L.success;if(this.fragPrevious=_,this.state=v.State.IDLE,!b)return;var g=this.tracksBuffered[this.currentTrackId];if(!g)return;for(var h,C=_.start,x=0;x<g.length;x++)if(C>=g[x].start&&C<=g[x].end){h=g[x];break}var m=_.start+_.duration;h?h.end=m:(h={start:C,end:m},g.push(h)),this.fragmentTracker.fragBuffered(_)},O.onBufferFlushing=function(M,L){var _=L.startOffset,b=L.endOffset;if(_===0&&b!==Number.POSITIVE_INFINITY){var g=this.currentTrackId,h=this.levels;if(!h.length||!h[g]||!h[g].details)return;var C=h[g].details,x=C.targetduration,m=b-x;if(m<=0)return;L.endOffsetSubtitles=Math.max(0,m),this.tracksBuffered.forEach(function(P){for(var k=0;k<P.length;){if(P[k].end<=m){P.shift();continue}else if(P[k].start<m)P[k].start=m;else break;k++}}),this.fragmentTracker.removeFragmentsInRange(_,m,f.PlaylistLevelType.SUBTITLE)}},O.onError=function(M,L){var _,b=L.frag;if(!b||b.type!==f.PlaylistLevelType.SUBTITLE)return;(_=this.fragCurrent)!==null&&_!==void 0&&_.loader&&this.fragCurrent.loader.abort(),this.state=v.State.IDLE},O.onSubtitleTracksUpdated=function(M,L){var _=this,b=L.subtitleTracks;this.tracksBuffered=[],this.levels=b.map(function(g){return new p.Level(g)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(g){_.tracksBuffered[g.id]=[]}),this.mediaBuffer=null},O.onSubtitleTrackSwitch=function(M,L){if(this.currentTrackId=L.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(l)},O.onSubtitleTrackLoaded=function(M,L){var _,b=L.details,g=L.id,h=this.currentTrackId,C=this.levels;if(!C.length)return;var x=C[h];if(g>=C.length||g!==h||!x)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,b.live||(_=x.details)!==null&&_!==void 0&&_.live){var m=this.mainDetails;if(b.deltaUpdateFailed||!m)return;var P=m.fragments[0];if(!x.details)b.hasProgramDateTime&&m.hasProgramDateTime?Object(j.alignMediaPlaylistByPDT)(b,m):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=g,this.tick(),b.live&&!this.fragCurrent&&this.media&&this.state===v.State.IDLE){var y=Object(G.findFragmentByPTS)(null,b.fragments,this.media.currentTime,0);y||(this.warn("Subtitle playlist not aligned with playback"),x.details=void 0)}},O._handleFragmentLoadComplete=function(M){var L=M.frag,_=M.payload,b=L.decryptdata,g=this.hls;if(this.fragContextChanged(L))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();g.trigger(Y.Events.FRAG_DECRYPTED,{frag:L,payload:C,stats:{tstart:h,tdecrypt:x}})})}},O.doTick=function(){if(!this.media){this.state=v.State.IDLE;return}if(this.state===v.State.IDLE){var M,L=this.currentTrackId,_=this.levels;if(!_.length||!_[L]||!_[L].details)return;var b=_[L].details,g=b.targetduration,h=this.config,C=this.media,x=D.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,C.currentTime-g,h.maxBufferHole),m=x.end,P=x.len,k=this.getMaxBufferLength()+g;if(P>k)return;console.assert(b,"Subtitle track details are defined on idle subtitle stream controller tick");var y=b.fragments,S=y.length,F=b.edge,A,X=this.fragPrevious;if(m<F){var ne=h.maxFragLookUpTolerance;X&&b.hasProgramDateTime&&(A=Object(G.findFragmentByPDT)(y,X.endProgramDateTime,ne)),A||(A=Object(G.findFragmentByPTS)(X,y,m,ne),!A&&X&&X.start<y[0].start&&(A=y[0]))}else A=y[S-1];(M=A)!==null&&M!==void 0&&M.encrypted?(W.logger.log("Loading key for "+A.sn),this.state=v.State.KEY_LOADING,this.hls.trigger(Y.Events.KEY_LOADING,{frag:A})):A&&this.fragmentTracker.getState(A)===T.FragmentState.NOT_LOADED&&this.loadFragment(A,b,m)}},O.loadFragment=function(M,L,_){this.fragCurrent=M,i.prototype.loadFragment.call(this,M,L,_)},s(R,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),R}(v.default)},"./src/controller/subtitle-track-controller.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/events.ts"),W=N("./src/utils/texttrack-utils.ts"),D=N("./src/controller/base-playlist-controller.ts"),G=N("./src/types/loader.ts");function j(c,s){for(var d=0;d<s.length;d++){var u=s[d];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(c,u.key,u)}}function n(c,s,d){return s&&j(c.prototype,s),d&&j(c,d),c}function T(c,s){c.prototype=Object.create(s.prototype),c.prototype.constructor=c,v(c,s)}function v(c,s){return v=Object.setPrototypeOf||function(u,l){return u.__proto__=l,u},v(c,s)}var f=function(c){T(s,c);function s(u){var l;return l=c.call(this,u,"[subtitle-track-controller]")||this,l.media=null,l.tracks=[],l.groupId=null,l.tracksInGroup=[],l.trackId=-1,l.selectDefaultTrack=!0,l.queuedDefaultTrack=-1,l.trackChangeListener=function(){return l.onTextTracksChanged()},l.asyncPollTrackChange=function(){return l.pollTrackChange(0)},l.useTextTrackPolling=!1,l.subtitlePollingInterval=-1,l.subtitleDisplay=!0,l.registerListeners(),l}var d=s.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 l=this.hls;l.on(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(Y.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(Y.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(Y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.on(Y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),l.on(Y.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var l=this.hls;l.off(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(Y.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(Y.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(Y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.off(Y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),l.off(Y.Events.ERROR,this.onError,this)},d.onMediaAttached=function(l,a){if(this.media=a.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(l){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,l)},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 l=p(this.media.textTracks);l.forEach(function(a){Object(W.clearCurrentCues)(a)}),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(l,a){this.tracks=a.subtitleTracks},d.onSubtitleTrackLoaded=function(l,a){var i=a.id,R=a.details,O=this.trackId,w=this.tracksInGroup[O];if(!w){this.warn("Invalid subtitle track id "+i);return}var M=w.details;w.details=a.details,this.log("subtitle track "+i+" loaded ["+R.startSN+"-"+R.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,a,M))},d.onLevelLoading=function(l,a){this.switchLevel(a.level)},d.onLevelSwitching=function(l,a){this.switchLevel(a.level)},d.switchLevel=function(l){var a=this.hls.levels[l];if(!(a!=null&&a.textGroupIds))return;var i=a.textGroupIds[a.urlId];if(this.groupId!==i){var R=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,O=this.tracks.filter(function(L){return!i||L.groupId===i});this.tracksInGroup=O;var w=this.findTrackId(R==null?void 0:R.name)||this.findTrackId();this.groupId=i;var M={subtitleTracks:O};this.log("Updating subtitle tracks, "+O.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(Y.Events.SUBTITLE_TRACKS_UPDATED,M),w!==-1&&this.setSubtitleTrack(w,R)}},d.findTrackId=function(l){for(var a=this.tracksInGroup,i=0;i<a.length;i++){var R=a[i];if((!this.selectDefaultTrack||R.default)&&(!l||l===R.name))return R.id}return-1},d.onError=function(l,a){if(c.prototype.onError.call(this,l,a),a.fatal||!a.context)return;a.context.type===G.PlaylistContextType.SUBTITLE_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},d.loadPlaylist=function(l){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var i=a.id,R=a.groupId,O=a.url;if(l)try{O=l.addDirectives(O)}catch(w){this.warn("Could not construct new URL with HLS Delivery Directives: "+w)}this.log("Loading subtitle playlist for id "+i),this.hls.trigger(Y.Events.SUBTITLE_TRACK_LOADING,{url:O,id:i,groupId:R,deliveryDirectives:l||null})}},d.toggleTrackModes=function(l){var a=this,i=this.media,R=this.subtitleDisplay,O=this.trackId;if(!i)return;var w=p(i.textTracks),M=w.filter(function(b){return b.groupId===a.groupId});if(l===-1)[].slice.call(w).forEach(function(b){b.mode="disabled"});else{var L=M[O];L&&(L.mode="disabled")}var _=M[l];_&&(_.mode=R?"showing":"hidden")},d.setSubtitleTrack=function(l,a){var i,R=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=l;return}if(this.trackId!==l&&this.toggleTrackModes(l),this.trackId===l&&(l===-1||(i=R[l])!==null&&i!==void 0&&i.details)||l<-1||l>=R.length)return;this.clearTimer();var O=R[l];if(this.log("Switching to subtitle track "+l),this.trackId=l,O){var w=O.id,M=O.groupId,L=M===void 0?"":M,_=O.name,b=O.type,g=O.url;this.hls.trigger(Y.Events.SUBTITLE_TRACK_SWITCH,{id:w,groupId:L,name:_,type:b,url:g});var h=this.switchParams(O.url,a==null?void 0:a.details);this.loadPlaylist(h)}else this.hls.trigger(Y.Events.SUBTITLE_TRACK_SWITCH,{id:l})},d.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var l=-1,a=p(this.media.textTracks),i=0;i<a.length;i++)if(a[i].mode==="hidden")l=i;else if(a[i].mode==="showing"){l=i;break}this.subtitleTrack!==l&&(this.subtitleTrack=l)},n(s,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(l){this.selectDefaultTrack=!1;var a=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(l,a)}}]),s}(D.default);function p(c){for(var s=[],d=0;d<c.length;d++){var u=c[d];u.kind==="subtitles"&&u.label&&s.push(c[d])}return s}z.default=f},"./src/controller/timeline-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"TimelineController",function(){return p});var Y=N("./src/polyfills/number.ts"),W=N("./src/events.ts"),D=N("./src/utils/cea-608-parser.ts"),G=N("./src/utils/output-filter.ts"),j=N("./src/utils/webvtt-parser.ts"),n=N("./src/utils/texttrack-utils.ts"),T=N("./src/utils/imsc1-ttml-parser.ts"),v=N("./src/types/loader.ts"),f=N("./src/utils/logger.ts"),p=function(){function u(a){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=a,this.config=a.config,this.Cues=a.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 i=new G.default(this,"textTrack1"),R=new G.default(this,"textTrack2"),O=new G.default(this,"textTrack3"),w=new G.default(this,"textTrack4");this.cea608Parser1=new D.default(1,i,R),this.cea608Parser2=new D.default(3,O,w)}a.on(W.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(W.Events.MANIFEST_LOADED,this.onManifestLoaded,this),a.on(W.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),a.on(W.Events.FRAG_LOADING,this.onFragLoading,this),a.on(W.Events.FRAG_LOADED,this.onFragLoaded,this),a.on(W.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),a.on(W.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),a.on(W.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.on(W.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),a.on(W.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var l=u.prototype;return l.destroy=function(){var i=this.hls;i.off(W.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(W.Events.MANIFEST_LOADED,this.onManifestLoaded,this),i.off(W.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),i.off(W.Events.FRAG_LOADING,this.onFragLoading,this),i.off(W.Events.FRAG_LOADED,this.onFragLoaded,this),i.off(W.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),i.off(W.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),i.off(W.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),i.off(W.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),i.off(W.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},l.addCues=function(i,R,O,w,M){for(var L=!1,_=M.length;_--;){var b=M[_],g=s(b[0],b[1],R,O);if(g>=0&&(b[0]=Math.min(b[0],R),b[1]=Math.max(b[1],O),L=!0,g/(O-R)>.5))return}if(L||M.push([R,O]),this.config.renderTextTracksNatively){var h=this.captionsTracks[i];this.Cues.newCue(h,R,O,w)}else{var C=this.Cues.newCue(null,R,O,w);this.hls.trigger(W.Events.CUES_PARSED,{type:"captions",cues:C,track:i})}},l.onInitPtsFound=function(i,R){var O=this,w=R.frag,M=R.id,L=R.initPTS,_=R.timescale,b=this.unparsedVttFrags;M==="main"&&(this.initPTS[w.cc]=L,this.timescale[w.cc]=_),b.length&&(this.unparsedVttFrags=[],b.forEach(function(g){O.onFragLoaded(W.Events.FRAG_LOADED,g)}))},l.getExistingTrack=function(i){var R=this.media;if(R)for(var O=0;O<R.textTracks.length;O++){var w=R.textTracks[O];if(w[i])return w}return null},l.createCaptionsTrack=function(i){this.config.renderTextTracksNatively?this.createNativeTrack(i):this.createNonNativeTrack(i)},l.createNativeTrack=function(i){if(this.captionsTracks[i])return;var R=this.captionsProperties,O=this.captionsTracks,w=this.media,M=R[i],L=M.label,_=M.languageCode,b=this.getExistingTrack(i);if(b)O[i]=b,Object(n.clearCurrentCues)(O[i]),Object(n.sendAddTrackEvent)(O[i],w);else{var g=this.createTextTrack("captions",L,_);g&&(g[i]=!0,O[i]=g)}},l.createNonNativeTrack=function(i){if(this.nonNativeCaptionsTracks[i])return;var R=this.captionsProperties[i];if(!R)return;var O=R.label,w={_id:i,label:O,kind:"captions",default:R.media?!!R.media.default:!1,closedCaptions:R.media};this.nonNativeCaptionsTracks[i]=w,this.hls.trigger(W.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[w]})},l.createTextTrack=function(i,R,O){var w=this.media;return w?w.addTextTrack(i,R,O):void 0},l.onMediaAttaching=function(i,R){this.media=R.media,this._cleanTracks()},l.onMediaDetaching=function(){var i=this.captionsTracks;Object.keys(i).forEach(function(R){Object(n.clearCurrentCues)(i[R]),delete i[R]}),this.nonNativeCaptionsTracks={}},l.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())},l._cleanTracks=function(){var i=this.media;if(!i)return;var R=i.textTracks;if(R)for(var O=0;O<R.length;O++)Object(n.clearCurrentCues)(R[O])},l.onSubtitleTracksUpdated=function(i,R){var O=this;this.textTracks=[];var w=R.subtitleTracks||[],M=w.some(function(g){return g.textCodec===T.IMSC1_CODEC});if(this.config.enableWebVTT||M&&this.config.enableIMSC1){var L=this.tracks&&w&&this.tracks.length===w.length;if(this.tracks=w||[],this.config.renderTextTracksNatively){var _=this.media?this.media.textTracks:[];this.tracks.forEach(function(g,h){var C;if(h<_.length){for(var x=null,m=0;m<_.length;m++)if(c(_[m],g)){x=_[m];break}x&&(C=x)}C?Object(n.clearCurrentCues)(C):(C=O.createTextTrack("subtitles",g.name,g.lang),C&&(C.mode="disabled")),C&&(C.groupId=g.groupId,O.textTracks.push(C))})}else if(!L&&this.tracks&&this.tracks.length){var b=this.tracks.map(function(g){return{label:g.name,kind:g.type.toLowerCase(),default:g.default,subtitleTrack:g}});this.hls.trigger(W.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:b})}}},l.onManifestLoaded=function(i,R){var O=this;this.config.enableCEA708Captions&&R.captions&&R.captions.forEach(function(w){var M=/(?:CC|SERVICE)([1-4])/.exec(w.instreamId);if(!M)return;var L="textTrack"+M[1],_=O.captionsProperties[L];if(!_)return;_.label=w.name,w.lang&&(_.languageCode=w.lang),_.media=w})},l.onFragLoading=function(i,R){var O=this.cea608Parser1,w=this.cea608Parser2,M=this.lastSn,L=this.lastPartIndex;if(!this.enabled||!(O&&w))return;if(R.frag.type===v.PlaylistLevelType.MAIN){var _,b,g=R.frag.sn,h=(_=R==null||((b=R.part)===null||b===void 0)?void 0:b.index)!=null?_:-1;g===M+1||g===M&&h===L+1||(O.reset(),w.reset()),this.lastSn=g,this.lastPartIndex=h}},l.onFragLoaded=function(i,R){var O=R.frag,w=R.payload,M=this.initPTS,L=this.unparsedVttFrags;if(O.type===v.PlaylistLevelType.SUBTITLE)if(w.byteLength){if(!Object(Y.isFiniteNumber)(M[O.cc])){L.push(R),M.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],g=this.vttCCs;g[O.cc]||(g[O.cc]={start:O.start,prevCC:this.prevCC,new:!0},this.prevCC=O.cc),b&&b.textCodec===T.IMSC1_CODEC?this._parseIMSC1(O,w):this._parseVTTs(O,w,g)}}else this.hls.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:O,error:new Error("Empty subtitle payload")})},l._parseIMSC1=function(i,R){var O=this,w=this.hls;Object(T.parseIMSC1)(R,this.initPTS[i.cc],this.timescale[i.cc],function(M){O._appendCues(M,i.level),w.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},function(M){f.logger.log("Failed to parse IMSC1: "+M),w.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:M})})},l._parseVTTs=function(i,R,O){var w=this,M=this.hls;Object(j.parseWebVTT)(R,this.initPTS[i.cc],this.timescale[i.cc],O,i.cc,i.start,function(L){w._appendCues(L,i.level),M.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},function(L){w._fallbackToIMSC1(i,R),f.logger.log("Failed to parse VTT cue: "+L),M.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:L})})},l._fallbackToIMSC1=function(i,R){var O=this,w=this.tracks[i.level];w.textCodec||Object(T.parseIMSC1)(R,this.initPTS[i.cc],this.timescale[i.cc],function(){w.textCodec=T.IMSC1_CODEC,O._parseIMSC1(i,R)},function(){w.textCodec="wvtt"})},l._appendCues=function(i,R){var O=this.hls;if(this.config.renderTextTracksNatively){var w=this.textTracks[R];if(w.mode==="disabled")return;i.forEach(function(_){return Object(n.addCueToTrack)(w,_)})}else{var M=this.tracks[R],L=M.default?"default":"subtitles"+R;O.trigger(W.Events.CUES_PARSED,{type:"subtitles",cues:i,track:L})}},l.onFragDecrypted=function(i,R){var O=R.frag;if(O.type===v.PlaylistLevelType.SUBTITLE){if(!Object(Y.isFiniteNumber)(this.initPTS[O.cc])){this.unparsedVttFrags.push(R);return}this.onFragLoaded(W.Events.FRAG_LOADED,R)}},l.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},l.onFragParsingUserdata=function(i,R){var O=this.cea608Parser1,w=this.cea608Parser2;if(!this.enabled||!(O&&w))return;for(var M=0;M<R.samples.length;M++){var L=R.samples[M].bytes;if(L){var _=this.extractCea608Data(L);O.addData(R.samples[M].pts,_[0]),w.addData(R.samples[M].pts,_[1])}}},l.onBufferFlushing=function(i,R){var O=R.startOffset,w=R.endOffset,M=R.endOffsetSubtitles,L=R.type,_=this.media;if(!_||_.currentTime<w)return;if(!L||L==="video"){var b=this.captionsTracks;Object.keys(b).forEach(function(h){return Object(n.removeCuesInRange)(b[h],O,w)})}if(this.config.renderTextTracksNatively&&(O===0&&M!==void 0)){var g=this.textTracks;Object.keys(g).forEach(function(h){return Object(n.removeCuesInRange)(g[h],O,M)})}},l.extractCea608Data=function(i){for(var R=i[0]&31,O=2,w=[[],[]],M=0;M<R;M++){var L=i[O++],_=127&i[O++],b=127&i[O++],g=(4&L)!==0,h=3&L;if(_===0&&b===0)continue;g&&((h===0||h===1)&&(w[h].push(_),w[h].push(b)))}return w},u}();function c(u,l){return u&&u.label===l.name&&!(u.textTrack1||u.textTrack2)}function s(u,l,a,i){return Math.min(l,i)-Math.max(u,a)}function d(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return Y});var Y=function(){function W(G,j){this.subtle=void 0,this.aesIV=void 0,this.subtle=G,this.aesIV=j}var D=W.prototype;return D.decrypt=function(j,n){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},n,j)},W}()},"./src/crypt/aes-decryptor.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"removePadding",function(){return W}),N.d(z,"default",function(){return D});var Y=N("./src/utils/typed-array.ts");function W(G){var j=G.byteLength,n=j&&new DataView(G.buffer).getUint8(j-1);return n?Object(Y.sliceUint8)(G,0,j-n):G}var D=function(){function G(){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=G.prototype;return j.uint8ArrayToUint32Array_=function(T){for(var v=new DataView(T),f=new Uint32Array(4),p=0;p<4;p++)f[p]=v.getUint32(p*4);return f},j.initTable=function(){var T=this.sBox,v=this.invSBox,f=this.subMix,p=f[0],c=f[1],s=f[2],d=f[3],u=this.invSubMix,l=u[0],a=u[1],i=u[2],R=u[3],O=new Uint32Array(256),w=0,M=0,L=0;for(L=0;L<256;L++)L<128?O[L]=L<<1:O[L]=L<<1^283;for(L=0;L<256;L++){var _=M^M<<1^M<<2^M<<3^M<<4;_=_>>>8^_&255^99,T[w]=_,v[_]=w;var b=O[w],g=O[b],h=O[g],C=O[_]*257^_*16843008;p[w]=C<<24|C>>>8,c[w]=C<<16|C>>>16,s[w]=C<<8|C>>>24,d[w]=C,C=h*16843009^g*65537^b*257^w*16843008,l[_]=C<<24|C>>>8,a[_]=C<<16|C>>>16,i[_]=C<<8|C>>>24,R[_]=C,w?(w=b^O[O[O[h^b]]],M^=O[O[M]]):w=M=1}},j.expandKey=function(T){for(var v=this.uint8ArrayToUint32Array_(T),f=!0,p=0;p<v.length&&f;)f=v[p]===this.key[p],p++;if(f)return;this.key=v;var c=this.keySize=v.length;if(c!==4&&c!==6&&c!==8)throw new Error("Invalid aes key size="+c);var s=this.ksRows=(c+6+1)*4,d,u,l=this.keySchedule=new Uint32Array(s),a=this.invKeySchedule=new Uint32Array(s),i=this.sBox,R=this.rcon,O=this.invSubMix,w=O[0],M=O[1],L=O[2],_=O[3],b,g;for(d=0;d<s;d++){if(d<c){b=l[d]=v[d];continue}g=b,d%c===0?(g=g<<8|g>>>24,g=i[g>>>24]<<24|i[g>>>16&255]<<16|i[g>>>8&255]<<8|i[g&255],g^=R[d/c|0]<<24):c>6&&d%c===4&&(g=i[g>>>24]<<24|i[g>>>16&255]<<16|i[g>>>8&255]<<8|i[g&255]),l[d]=b=(l[d-c]^g)>>>0}for(u=0;u<s;u++)d=s-u,u&3?g=l[d]:g=l[d-4],u<4||d<=4?a[u]=g:a[u]=w[i[g>>>24]]^M[i[g>>>16&255]]^L[i[g>>>8&255]]^_[i[g&255]],a[u]=a[u]>>>0},j.networkToHostOrderSwap=function(T){return T<<24|(T&65280)<<8|(T&16711680)>>8|T>>>24},j.decrypt=function(T,v,f){for(var p=this.keySize+6,c=this.invKeySchedule,s=this.invSBox,d=this.invSubMix,u=d[0],l=d[1],a=d[2],i=d[3],R=this.uint8ArrayToUint32Array_(f),O=R[0],w=R[1],M=R[2],L=R[3],_=new Int32Array(T),b=new Int32Array(_.length),g,h,C,x,m,P,k,y,S,F,A,X,ne,fe,ye=this.networkToHostOrderSwap;v<_.length;){for(S=ye(_[v]),F=ye(_[v+1]),A=ye(_[v+2]),X=ye(_[v+3]),m=S^c[0],P=X^c[1],k=A^c[2],y=F^c[3],ne=4,fe=1;fe<p;fe++)g=u[m>>>24]^l[P>>16&255]^a[k>>8&255]^i[y&255]^c[ne],h=u[P>>>24]^l[k>>16&255]^a[y>>8&255]^i[m&255]^c[ne+1],C=u[k>>>24]^l[y>>16&255]^a[m>>8&255]^i[P&255]^c[ne+2],x=u[y>>>24]^l[m>>16&255]^a[P>>8&255]^i[k&255]^c[ne+3],m=g,P=h,k=C,y=x,ne=ne+4;g=s[m>>>24]<<24^s[P>>16&255]<<16^s[k>>8&255]<<8^s[y&255]^c[ne],h=s[P>>>24]<<24^s[k>>16&255]<<16^s[y>>8&255]<<8^s[m&255]^c[ne+1],C=s[k>>>24]<<24^s[y>>16&255]<<16^s[m>>8&255]<<8^s[P&255]^c[ne+2],x=s[y>>>24]<<24^s[m>>16&255]<<16^s[P>>8&255]<<8^s[k&255]^c[ne+3],b[v]=ye(g^O),b[v+1]=ye(x^w),b[v+2]=ye(C^M),b[v+3]=ye(h^L),O=S,w=F,M=A,L=X,v=v+4}return b.buffer},G}()},"./src/crypt/decrypter.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return v});var Y=N("./src/crypt/aes-crypto.ts"),W=N("./src/crypt/fast-aes-key.ts"),D=N("./src/crypt/aes-decryptor.ts"),G=N("./src/utils/logger.ts"),j=N("./src/utils/mp4-tools.ts"),n=N("./src/utils/typed-array.ts"),T=16,v=function(){function f(c,s,d){var u=d===void 0?{}:d,l=u.removePKCS7Padding,a=l===void 0?!0:l;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=s,this.removePKCS7Padding=a,a)try{var i=self.crypto;i&&(this.subtle=i.subtle||i.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 s=this.currentResult;if(!s){this.reset();return}var d=new Uint8Array(s);return this.reset(),this.removePKCS7Padding?Object(D.removePadding)(d):d},p.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},p.decrypt=function(s,d,u,l){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(s),d,u);var a=this.flush();a&&l(a.buffer)}else this.webCryptoDecrypt(new Uint8Array(s),d,u).then(l)},p.softwareDecrypt=function(s,d,u){var l=this.currentIV,a=this.currentResult,i=this.remainderData;this.logOnce("JS AES decrypt"),i&&(s=Object(j.appendUint8Array)(i,s),this.remainderData=null);var R=this.getValidChunk(s);if(!R.length)return null;l&&(u=l);var O=this.softwareDecrypter;O||(O=this.softwareDecrypter=new D.default),O.expandKey(d);var w=a;return this.currentResult=O.decrypt(R.buffer,0,u),this.currentIV=Object(n.sliceUint8)(R,-16).buffer,w||null},p.webCryptoDecrypt=function(s,d,u){var l=this,a=this.subtle;return(this.key!==d||!this.fastAesKey)&&(this.key=d,this.fastAesKey=new W.default(a,d)),this.fastAesKey.expandKey().then(function(i){if(!a)return Promise.reject(new Error("web crypto not initialized"));var R=new Y.default(a,u);return R.decrypt(s.buffer,i)}).catch(function(i){return l.onWebCryptoError(i,s,d,u)})},p.onWebCryptoError=function(s,d,u,l){return G.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",s),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(d,u,l)},p.getValidChunk=function(s){var d=s,u=s.length-s.length%T;return u!==s.length&&(d=Object(n.sliceUint8)(s,0,u),this.remainderData=Object(n.sliceUint8)(s,u)),d},p.logOnce=function(s){if(!this.logEnabled)return;G.logger.log("[decrypter.ts]: "+s),this.logEnabled=!1},f}()},"./src/crypt/fast-aes-key.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return Y});var Y=function(){function W(G,j){this.subtle=void 0,this.key=void 0,this.subtle=G,this.key=j}var D=W.prototype;return D.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},W}()},"./src/demux/aacdemuxer.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/demux/base-audio-demuxer.ts"),W=N("./src/demux/adts.ts"),D=N("./src/utils/logger.ts"),G=N("./src/demux/id3.ts");function j(v,f){v.prototype=Object.create(f.prototype),v.prototype.constructor=v,n(v,f)}function n(v,f){return n=Object.setPrototypeOf||function(c,s){return c.__proto__=s,c},n(v,f)}var T=function(v){j(f,v);function f(c,s){var d;return d=v.call(this)||this,d.observer=void 0,d.config=void 0,d.observer=c,d.config=s,d}var p=f.prototype;return p.resetInitSegment=function(s,d,u){v.prototype.resetInitSegment.call(this,s,d,u),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:s,duration:u,inputTimeScale:9e4,dropped:0}},f.probe=function(s){if(!s)return!1;for(var d=G.getID3Data(s,0)||[],u=d.length,l=s.length;u<l;u++)if(W.probe(s,u))return D.logger.log("ADTS sync word found !"),!0;return!1},p.canParse=function(s,d){return W.canParse(s,d)},p.appendFrame=function(s,d,u){W.initTrackConfig(s,this.observer,d,u,s.manifestCodec);var l=W.appendFrame(s,d,u,this.initPTS,this.frameIndex);if(l&&l.missing===0)return l},f}(Y.default);T.minProbeByteLength=9,z.default=T},"./src/demux/adts.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"getAudioConfig",function(){return G}),N.d(z,"isHeaderPattern",function(){return j}),N.d(z,"getHeaderLength",function(){return n}),N.d(z,"getFullFrameLength",function(){return T}),N.d(z,"canGetFrameLength",function(){return v}),N.d(z,"isHeader",function(){return f}),N.d(z,"canParse",function(){return p}),N.d(z,"probe",function(){return c}),N.d(z,"initTrackConfig",function(){return s}),N.d(z,"getFrameDuration",function(){return d}),N.d(z,"parseFrameHeader",function(){return u}),N.d(z,"appendFrame",function(){return l});var Y=N("./src/utils/logger.ts"),W=N("./src/errors.ts"),D=N("./src/events.ts");function G(a,i,R,O){var w,M,L,_,b=navigator.userAgent.toLowerCase(),g=O,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];w=((i[R+2]&192)>>>6)+1;var C=(i[R+2]&60)>>>2;if(C>h.length-1){a.trigger(D.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+C});return}return L=(i[R+2]&1)<<2,L|=(i[R+3]&192)>>>6,Y.logger.log("manifest codec:"+O+", ADTS type:"+w+", samplingIndex:"+C),/firefox/i.test(b)?C>=6?(w=5,_=new Array(4),M=C-3):(w=2,_=new Array(2),M=C):b.indexOf("android")!==-1?(w=2,_=new Array(2),M=C):(w=5,_=new Array(4),O&&(O.indexOf("mp4a.40.29")!==-1||O.indexOf("mp4a.40.5")!==-1)||!O&&C>=6?M=C-3:((O&&O.indexOf("mp4a.40.2")!==-1&&(C>=6&&L===1||/vivaldi/i.test(b))||!O&&L===1)&&(w=2,_=new Array(2)),M=C)),_[0]=w<<3,_[0]|=(C&14)>>1,_[1]|=(C&1)<<7,_[1]|=L<<3,w===5&&(_[1]|=(M&14)>>1,_[2]=(M&1)<<7,_[2]|=2<<2,_[3]=0),{config:_,samplerate:h[C],channelCount:L,codec:"mp4a.40."+w,manifestCodec:g}}function j(a,i){return a[i]===255&&(a[i+1]&246)===240}function n(a,i){return a[i+1]&1?7:9}function T(a,i){return(a[i+3]&3)<<11|a[i+4]<<3|(a[i+5]&224)>>>5}function v(a,i){return i+5<a.length}function f(a,i){return i+1<a.length&&j(a,i)}function p(a,i){return v(a,i)&&j(a,i)&&T(a,i)<=a.length-i}function c(a,i){if(f(a,i)){var R=n(a,i);if(i+R>=a.length)return!1;var O=T(a,i);if(O<=R)return!1;var w=i+O;return w===a.length||f(a,w)}return!1}function s(a,i,R,O,w){if(!a.samplerate){var M=G(i,R,O,w);if(!M)return;a.config=M.config,a.samplerate=M.samplerate,a.channelCount=M.channelCount,a.codec=M.codec,a.manifestCodec=M.manifestCodec,Y.logger.log("parsed codec:"+a.codec+", rate:"+M.samplerate+", channels:"+M.channelCount)}}function d(a){return 1024*9e4/a}function u(a,i,R,O,w){var M=n(a,i),L=T(a,i);if(L-=M,L>0){var _=R+O*w;return{headerLength:M,frameLength:L,stamp:_}}}function l(a,i,R,O,w){var M=d(a.samplerate),L=u(i,R,O,w,M);if(L){var _=L.frameLength,b=L.headerLength,g=L.stamp,h=b+_,C=Math.max(0,R+h-i.length),x;C?(x=new Uint8Array(h-b),x.set(i.subarray(R+b,i.length),0)):x=i.subarray(R+b,R+h);var m={unit:x,pts:g};return C||a.samples.push(m),{sample:m,length:h,missing:C}}}},"./src/demux/base-audio-demuxer.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"initPTSFn",function(){return T});var Y=N("./src/polyfills/number.ts"),W=N("./src/demux/id3.ts"),D=N("./src/demux/dummy-demuxed-track.ts"),G=N("./src/utils/mp4-tools.ts"),j=N("./src/utils/typed-array.ts"),n=function(){function v(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var f=v.prototype;return f.resetInitSegment=function(c,s,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,s){return!1},f.appendFrame=function(c,s,d){},f.demux=function(c,s){this.cachedData&&(c=Object(G.appendUint8Array)(this.cachedData,c),this.cachedData=null);var d=W.getID3Data(c,0),u=d?d.length:0,l,a,i=this._audioTrack,R=this._id3Track,O=d?W.getTimeStamp(d):void 0,w=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=T(O,s)),d&&d.length>0&&R.samples.push({pts:this.initPTS,dts:this.initPTS,data:d}),a=this.initPTS;u<w;){if(this.canParse(c,u)){var M=this.appendFrame(i,c,u);M?(this.frameIndex++,a=M.sample.pts,u+=M.length,l=u):u=w}else W.canParse(c,u)?(d=W.getID3Data(c,u),R.samples.push({pts:a,dts:a,data:d}),u+=d.length,l=u):u++;if(u===w&&l!==w){var L=Object(j.sliceUint8)(c,l);this.cachedData?this.cachedData=Object(G.appendUint8Array)(this.cachedData,L):this.cachedData=L}}return{audioTrack:i,avcTrack:Object(D.dummyTrack)(),id3Track:R,textTrack:Object(D.dummyTrack)()}},f.demuxSampleAes=function(c,s,d){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},f.flush=function(c){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(D.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(D.dummyTrack)()}},f.destroy=function(){},v}(),T=function(f,p){return Object(Y.isFiniteNumber)(f)?f*90:p*9e4};z.default=n},"./src/demux/chunk-cache.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return Y});var Y=function(){function D(){this.chunks=[],this.dataLength=0}var G=D.prototype;return G.push=function(n){this.chunks.push(n),this.dataLength+=n.length},G.flush=function(){var n=this.chunks,T=this.dataLength,v;if(n.length)n.length===1?v=n[0]:v=W(n,T);else return new Uint8Array(0);return this.reset(),v},G.reset=function(){this.chunks.length=0,this.dataLength=0},D}();function W(D,G){for(var j=new Uint8Array(G),n=0,T=0;T<D.length;T++){var v=D[T];j.set(v,n),n+=v.length}return j}},"./src/demux/dummy-demuxed-track.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"dummyTrack",function(){return Y});function Y(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/utils/logger.ts"),W=function(){function D(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 G=D.prototype;return G.loadWord=function(){var n=this.data,T=this.bytesAvailable,v=n.byteLength-T,f=new Uint8Array(4),p=Math.min(4,T);if(p===0)throw new Error("no bytes available");f.set(n.subarray(v,v+p)),this.word=new DataView(f.buffer).getUint32(0),this.bitsAvailable=p*8,this.bytesAvailable-=p},G.skipBits=function(n){var T;this.bitsAvailable>n?(this.word<<=n,this.bitsAvailable-=n):(n-=this.bitsAvailable,T=n>>3,n-=T>>3,this.bytesAvailable-=T,this.loadWord(),this.word<<=n,this.bitsAvailable-=n)},G.readBits=function(n){var T=Math.min(this.bitsAvailable,n),v=this.word>>>32-T;return n>32&&Y.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=T,this.bitsAvailable>0?this.word<<=T:this.bytesAvailable>0&&this.loadWord(),T=n-T,T>0&&this.bitsAvailable?v<<T|this.readBits(T):v},G.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()},G.skipUEG=function(){this.skipBits(1+this.skipLZ())},G.skipEG=function(){this.skipBits(1+this.skipLZ())},G.readUEG=function(){var n=this.skipLZ();return this.readBits(n+1)-1},G.readEG=function(){var n=this.readUEG();return 1&n?1+n>>>1:-1*(n>>>1)},G.readBoolean=function(){return this.readBits(1)===1},G.readUByte=function(){return this.readBits(8)},G.readUShort=function(){return this.readBits(16)},G.readUInt=function(){return this.readBits(32)},G.skipScalingList=function(n){for(var T=8,v=8,f,p=0;p<n;p++)v!==0&&(f=this.readEG(),v=(T+f+256)%256),T=v===0?T:v},G.readSPS=function(){var n=0,T=0,v=0,f=0,p,c,s,d=this.readUByte.bind(this),u=this.readBits.bind(this),l=this.readUEG.bind(this),a=this.readBoolean.bind(this),i=this.skipBits.bind(this),R=this.skipEG.bind(this),O=this.skipUEG.bind(this),w=this.skipScalingList.bind(this);d();var M=d();if(u(5),i(3),d(),O(),M===100||M===110||M===122||M===244||M===44||M===83||M===86||M===118||M===128){var L=l();if(L===3&&i(1),O(),O(),i(1),a())for(c=L!==3?8:12,s=0;s<c;s++)a()&&(s<6?w(16):w(64))}O();var _=l();if(_===0)l();else if(_===1)for(i(1),R(),R(),p=l(),s=0;s<p;s++)R();O(),i(1);var b=l(),g=l(),h=u(1);h===0&&i(1),i(1),a()&&(n=l(),T=l(),v=l(),f=l());var C=[1,1];if(a()&&a()){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-T*2),height:(2-h)*(g+1)*16-(h?2:4)*(v+f),pixelRatio:C}},G.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},D}();z.default=W},"./src/demux/id3.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"isHeader",function(){return Y}),N.d(z,"isFooter",function(){return W}),N.d(z,"getID3Data",function(){return D}),N.d(z,"canParse",function(){return j}),N.d(z,"getTimeStamp",function(){return n}),N.d(z,"isTimeStampFrame",function(){return T}),N.d(z,"getID3Frames",function(){return f}),N.d(z,"decodeFrame",function(){return p}),N.d(z,"utf8ArrayToStr",function(){return l}),N.d(z,"testables",function(){return a});var Y=function(w,M){return M+10<=w.length&&(w[M]===73&&w[M+1]===68&&w[M+2]===51&&(w[M+3]<255&&w[M+4]<255&&(w[M+6]<128&&w[M+7]<128&&w[M+8]<128&&w[M+9]<128)))},W=function(w,M){return M+10<=w.length&&(w[M]===51&&w[M+1]===68&&w[M+2]===73&&(w[M+3]<255&&w[M+4]<255&&(w[M+6]<128&&w[M+7]<128&&w[M+8]<128&&w[M+9]<128)))},D=function(w,M){for(var L=M,_=0;Y(w,M);){_+=10;var b=G(w,M+6);_+=b,W(w,M+10)&&(_+=10),M+=_}return _>0?w.subarray(L,L+_):void 0},G=function(w,M){var L=0;return L=(w[M]&127)<<21,L|=(w[M+1]&127)<<14,L|=(w[M+2]&127)<<7,L|=w[M+3]&127,L},j=function(w,M){return Y(w,M)&&G(w,M+6)+10<=w.length-M},n=function(w){for(var M=f(w),L=0;L<M.length;L++){var _=M[L];if(T(_))return u(_)}return},T=function(w){return w&&w.key==="PRIV"&&w.info==="com.apple.streaming.transportStreamTimestamp"},v=function(w){var M=String.fromCharCode(w[0],w[1],w[2],w[3]),L=G(w,4),_=10;return{type:M,size:L,data:w.subarray(_,_+L)}},f=function(w){for(var M=0,L=[];Y(w,M);){var _=G(w,M+6);M+=10;for(var b=M+_;M+8<b;){var g=v(w.subarray(M)),h=p(g);h&&L.push(h),M+=g.size+10}W(w,M)&&(M+=10)}return L},p=function(w){return w.type==="PRIV"?c(w):w.type[0]==="W"?d(w):s(w)},c=function(w){if(w.size<2)return;var M=l(w.data,!0),L=new Uint8Array(w.data.subarray(M.length+1));return{key:w.type,info:M,data:L.buffer}},s=function(w){if(w.size<2)return;if(w.type==="TXXX"){var M=1,L=l(w.data.subarray(M),!0);M+=L.length+1;var _=l(w.data.subarray(M));return{key:w.type,info:L,data:_}}var b=l(w.data.subarray(1));return{key:w.type,data:b}},d=function(w){if(w.type==="WXXX"){if(w.size<2)return;var M=1,L=l(w.data.subarray(M),!0);M+=L.length+1;var _=l(w.data.subarray(M));return{key:w.type,info:L,data:_}}var b=l(w.data);return{key:w.type,data:b}},u=function(w){if(w.data.byteLength===8){var M=new Uint8Array(w.data),L=M[3]&1,_=(M[4]<<23)+(M[5]<<15)+(M[6]<<7)+M[7];return _/=45,L&&(_+=4772185884e-2),Math.round(_)}return},l=function(w,M){M===void 0&&(M=!1);var L=R();if(L){var _=L.decode(w);if(M){var b=_.indexOf("\0");return b!==-1?_.substring(0,b):_}return _.replace(/\0/g,"")}for(var g=w.length,h,C,x,m="",P=0;P<g;){if(h=w[P++],h===0&&M)return m;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:m+=String.fromCharCode(h);break;case 12:case 13:C=w[P++],m+=String.fromCharCode((h&31)<<6|C&63);break;case 14:C=w[P++],x=w[P++],m+=String.fromCharCode((h&15)<<12|(C&63)<<6|(x&63)<<0);break;default:}}return m},a={decodeTextFrame:s},i;function R(){return!i&&typeof self.TextDecoder!="undefined"&&(i=new self.TextDecoder("utf-8")),i}},"./src/demux/mp3demuxer.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/demux/base-audio-demuxer.ts"),W=N("./src/demux/id3.ts"),D=N("./src/utils/logger.ts"),G=N("./src/demux/mpegaudio.ts");function j(v,f){v.prototype=Object.create(f.prototype),v.prototype.constructor=v,n(v,f)}function n(v,f){return n=Object.setPrototypeOf||function(c,s){return c.__proto__=s,c},n(v,f)}var T=function(v){j(f,v);function f(){return v.apply(this,arguments)||this}var p=f.prototype;return p.resetInitSegment=function(s,d,u){v.prototype.resetInitSegment.call(this,s,d,u),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:s,duration:u,inputTimeScale:9e4,dropped:0}},f.probe=function(s){if(!s)return!1;for(var d=W.getID3Data(s,0)||[],u=d.length,l=s.length;u<l;u++)if(G.probe(s,u))return D.logger.log("MPEG Audio sync word found !"),!0;return!1},p.canParse=function(s,d){return G.canParse(s,d)},p.appendFrame=function(s,d,u){return this.initPTS===null?void 0:G.appendFrame(s,d,u,this.initPTS,this.frameIndex)},f}(Y.default);T.minProbeByteLength=4,z.default=T},"./src/demux/mp4demuxer.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/utils/mp4-tools.ts"),W=N("./src/demux/dummy-demuxed-track.ts"),D=function(){function G(n,T){this.remainderData=null,this.config=void 0,this.config=T}var j=G.prototype;return j.resetTimeStamp=function(){},j.resetInitSegment=function(){},j.resetContiguity=function(){},G.probe=function(T){return Object(Y.findBox)({data:T,start:0,end:Math.min(T.length,16384)},["moof"]).length>0},j.demux=function(T){var v=T,f=Object(W.dummyTrack)();if(this.config.progressive){this.remainderData&&(v=Object(Y.appendUint8Array)(this.remainderData,T));var p=Object(Y.segmentValidRange)(v);this.remainderData=p.remainder,f.samples=p.valid||new Uint8Array}else f.samples=v;return{audioTrack:Object(W.dummyTrack)(),avcTrack:f,id3Track:Object(W.dummyTrack)(),textTrack:Object(W.dummyTrack)()}},j.flush=function(){var T=Object(W.dummyTrack)();return T.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(W.dummyTrack)(),avcTrack:T,id3Track:Object(W.dummyTrack)(),textTrack:Object(W.dummyTrack)()}},j.demuxSampleAes=function(T,v,f){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},j.destroy=function(){},G}();D.minProbeByteLength=1024,z.default=D},"./src/demux/mpegaudio.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"appendFrame",function(){return n}),N.d(z,"parseHeader",function(){return T}),N.d(z,"isHeaderPattern",function(){return v}),N.d(z,"isHeader",function(){return f}),N.d(z,"canParse",function(){return p}),N.d(z,"probe",function(){return c});var Y=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],D=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],G=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],j=[0,1,1,4];function n(s,d,u,l,a){if(u+24>d.length)return;var i=T(d,u);if(i&&u+i.frameLength<=d.length){var R=i.samplesPerFrame*9e4/i.sampleRate,O=l+a*R,w={unit:d.subarray(u,u+i.frameLength),pts:O,dts:O};return s.config=[],s.channelCount=i.channelCount,s.samplerate=i.sampleRate,s.samples.push(w),{sample:w,length:i.frameLength,missing:0}}}function T(s,d){var u=s[d+1]>>3&3,l=s[d+1]>>1&3,a=s[d+2]>>4&15,i=s[d+2]>>2&3;if(u!==1&&a!==0&&a!==15&&i!==3){var R=s[d+2]>>1&1,O=s[d+3]>>6,w=u===3?3-l:l===3?3:4,M=W[w*14+a-1]*1e3,L=u===3?0:u===2?1:2,_=D[L*3+i],b=O===3?1:2,g=G[u][l],h=j[l],C=g*8*h,x=Math.floor(g*M/_+R)*h;if(Y===null){var m=navigator.userAgent||"",P=m.match(/Chrome\/(\d+)/i);Y=P?parseInt(P[1]):0}var k=!!Y&&Y<=87;return k&&l===2&&M>=224e3&&O===0&&(s[d+3]=s[d+3]|128),{sampleRate:_,channelCount:b,frameLength:x,samplesPerFrame:C}}}function v(s,d){return s[d]===255&&(s[d+1]&224)===224&&(s[d+1]&6)!==0}function f(s,d){return d+1<s.length&&v(s,d)}function p(s,d){var u=4;return v(s,d)&&u<=s.length-d}function c(s,d){if(d+1<s.length&&v(s,d)){var u=4,l=T(s,d),a=u;l!=null&&l.frameLength&&(a=l.frameLength);var i=d+a;return i===s.length||f(s,i)}return!1}},"./src/demux/sample-aes.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/crypt/decrypter.ts"),W=N("./src/demux/tsdemuxer.ts"),D=function(){function G(n,T,v){this.keyData=void 0,this.decrypter=void 0,this.keyData=v,this.decrypter=new Y.default(n,T,{removePKCS7Padding:!1})}var j=G.prototype;return j.decryptBuffer=function(T,v){this.decrypter.decrypt(T,this.keyData.key.buffer,this.keyData.iv.buffer,v)},j.decryptAacSample=function(T,v,f,p){var c=T[v].unit,s=c.subarray(16,c.length-c.length%16),d=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),u=this;this.decryptBuffer(d,function(l){var a=new Uint8Array(l);c.set(a,16),p||u.decryptAacSamples(T,v+1,f)})},j.decryptAacSamples=function(T,v,f){for(;;v++){if(v>=T.length){f();return}if(T[v].unit.length<32)continue;var p=this.decrypter.isSync();if(this.decryptAacSample(T,v,f,p),!p)return}},j.getAvcEncryptedData=function(T){for(var v=Math.floor((T.length-48)/160)*16+16,f=new Int8Array(v),p=0,c=32;c<=T.length-16;c+=160,p+=16)f.set(T.subarray(c,c+16),p);return f},j.getAvcDecryptedUnit=function(T,v){for(var f=new Uint8Array(v),p=0,c=32;c<=T.length-16;c+=160,p+=16)T.set(f.subarray(p,p+16),c);return T},j.decryptAvcSample=function(T,v,f,p,c,s){var d=Object(W.discardEPB)(c.data),u=this.getAvcEncryptedData(d),l=this;this.decryptBuffer(u.buffer,function(a){c.data=l.getAvcDecryptedUnit(d,a),s||l.decryptAvcSamples(T,v,f+1,p)})},j.decryptAvcSamples=function(T,v,f,p){if(T instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;v++,f=0){if(v>=T.length){p();return}for(var c=T[v].units;!(f>=c.length);f++){var s=c[f];if(s.data.length<=48||s.type!==1&&s.type!==5)continue;var d=this.decrypter.isSync();if(this.decryptAvcSample(T,v,f,p,s,d),!d)return}}},G}();z.default=D},"./src/demux/transmuxer-interface.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return c});var Y=N("./node_modules/webworkify-webpack/index.js"),W=N.n(Y),D=N("./src/events.ts"),G=N("./src/demux/transmuxer.ts"),j=N("./src/utils/logger.ts"),n=N("./src/errors.ts"),T=N("./src/utils/mediasource-helper.ts"),v=N("./node_modules/eventemitter3/index.js"),f=N.n(v),p=Object(T.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function s(u,l,a,i){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=l,this.onTransmuxComplete=a,this.onFlush=i;var O=u.config,w=function(g,h){h=h||{},h.frag=R.frag,h.id=R.id,u.trigger(g,h)};this.observer=new v.EventEmitter,this.observer.on(D.Events.FRAG_DECRYPTED,w),this.observer.on(D.Events.ERROR,w);var M={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},L=navigator.vendor;if(O.enableWorker&&typeof Worker!="undefined"){j.logger.log("demuxing in webworker");var _;try{_=this.worker=Y("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),_.addEventListener("message",this.onwmsg),_.onerror=function(b){u.trigger(D.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:M,vendor:L,id:l,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 G.default(this.observer,M,O,L,l),this.worker=null}}else this.transmuxer=new G.default(this.observer,M,O,L,l)}var d=s.prototype;return d.destroy=function(){var l=this.worker;if(l)l.removeEventListener("message",this.onwmsg),l.terminate(),this.worker=null;else{var a=this.transmuxer;a&&(a.destroy(),this.transmuxer=null)}var i=this.observer;i&&i.removeAllListeners(),this.observer=null},d.push=function(l,a,i,R,O,w,M,L,_,b){var g=this;_.transmuxing.start=self.performance.now();var h=this.transmuxer,C=this.worker,x=w?w.start:O.start,m=O.decryptdata,P=this.frag,k=!(P&&O.cc===P.cc),y=!(P&&_.level===P.level),S=P?_.sn-P.sn:-1,F=this.part?_.part-this.part.index:1,A=!y&&(S===1||S===0&&F===1),X=self.performance.now();(y||S||O.stats.parsing.start===0)&&(O.stats.parsing.start=X),w&&(F||!A)&&(w.stats.parsing.start=X);var ne=new G.TransmuxState(k,A,L,y,x);if(!A||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: `+A+`
accurateTimeOffset: `+L+`
timeOffset: `+x);var fe=new G.TransmuxConfig(i,R,a,M,b);this.configureTransmuxer(fe)}if(this.frag=O,this.part=w,C)C.postMessage({cmd:"demux",data:l,decryptdata:m,chunkMeta:_,state:ne},l instanceof ArrayBuffer?[l]:[]);else if(h){var ye=h.push(l,m,_,ne);Object(G.isPromise)(ye)?ye.then(function(Pe){g.handleTransmuxComplete(Pe)}):this.handleTransmuxComplete(ye)}},d.flush=function(l){var a=this;l.transmuxing.start=self.performance.now();var i=this.transmuxer,R=this.worker;if(R)R.postMessage({cmd:"flush",chunkMeta:l});else if(i){var O=i.flush(l);Object(G.isPromise)(O)?O.then(function(w){a.handleFlushResult(w,l)}):this.handleFlushResult(O,l)}},d.handleFlushResult=function(l,a){var i=this;l.forEach(function(R){i.handleTransmuxComplete(R)}),this.onFlush(a)},d.onWorkerMessage=function(l){var a=l.data,i=this.hls;switch(a.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(a.data);break}case"flush":{this.onFlush(a.data);break}default:{a.data=a.data||{},a.data.frag=this.frag,a.data.id=this.id,i.trigger(a.event,a.data);break}}},d.configureTransmuxer=function(l){var a=this.worker,i=this.transmuxer;a?a.postMessage({cmd:"configure",config:l}):i&&i.configure(l)},d.handleTransmuxComplete=function(l){l.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(l)},s}()},"./src/demux/transmuxer-worker.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return n});var Y=N("./src/demux/transmuxer.ts"),W=N("./src/events.ts"),D=N("./src/utils/logger.ts"),G=N("./node_modules/eventemitter3/index.js"),j=N.n(G);function n(c){var s=new G.EventEmitter,d=function(l,a){c.postMessage({event:l,data:a})};s.on(W.Events.FRAG_DECRYPTED,d),s.on(W.Events.ERROR,d),c.addEventListener("message",function(u){var l=u.data;switch(l.cmd){case"init":{var a=JSON.parse(l.config);c.transmuxer=new Y.default(s,l.typeSupported,a,l.vendor,l.id),Object(D.enableLogs)(a.debug),d("init",null);break}case"configure":{c.transmuxer.configure(l.config);break}case"demux":{var i=c.transmuxer.push(l.data,l.decryptdata,l.chunkMeta,l.state);Object(Y.isPromise)(i)?i.then(function(w){T(c,w)}):T(c,i);break}case"flush":{var R=l.chunkMeta,O=c.transmuxer.flush(R);Object(Y.isPromise)(O)?O.then(function(w){f(c,w,R)}):f(c,O,R);break}default:break}})}function T(c,s){if(p(s.remuxResult))return;var d=[],u=s.remuxResult,l=u.audio,a=u.video;l&&v(d,l),a&&v(d,a),c.postMessage({event:"transmuxComplete",data:s},d)}function v(c,s){s.data1&&c.push(s.data1.buffer),s.data2&&c.push(s.data2.buffer)}function f(c,s,d){s.forEach(function(u){T(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,z,N){"use strict";N.r(z),N.d(z,"default",function(){return a}),N.d(z,"isPromise",function(){return O}),N.d(z,"TransmuxConfig",function(){return w}),N.d(z,"TransmuxState",function(){return M});var Y=N("./src/events.ts"),W=N("./src/errors.ts"),D=N("./src/crypt/decrypter.ts"),G=N("./src/demux/aacdemuxer.ts"),j=N("./src/demux/mp4demuxer.ts"),n=N("./src/demux/tsdemuxer.ts"),T=N("./src/demux/mp3demuxer.ts"),v=N("./src/remux/mp4-remuxer.ts"),f=N("./src/remux/passthrough-remuxer.ts"),p=N("./src/demux/chunk-cache.ts"),c=N("./src/utils/mp4-tools.ts"),s=N("./src/utils/logger.ts"),d;try{d=self.performance.now.bind(self.performance)}catch(L){s.logger.debug("Unable to use Performance API on this environment"),d=self.Date.now}var u=[{demux:n.default,remux:v.default},{demux:j.default,remux:f.default},{demux:G.default,remux:v.default},{demux:T.default,remux:v.default}],l=1024;u.forEach(function(L){var _=L.demux;l=Math.max(l,_.minProbeByteLength)});var a=function(){function L(b,g,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=g,this.config=h,this.vendor=C,this.id=x}var _=L.prototype;return _.configure=function(g){this.transmuxConfig=g,this.decrypter&&this.decrypter.reset()},_.push=function(g,h,C,x){var m=this,P=C.transmuxing;P.executeStart=d();var k=new Uint8Array(g),y=this.cache,S=this.config,F=this.currentTransmuxState,A=this.transmuxConfig;x&&(this.currentTransmuxState=x);var X=i(k,h);if(X&&X.method==="AES-128"){var ne=this.getDecrypter();if(S.enableSoftwareAES){var fe=ne.softwareDecrypt(k,X.key.buffer,X.iv.buffer);if(!fe)return P.executeEnd=d(),R(C);k=new Uint8Array(fe)}else return this.decryptionPromise=ne.webCryptoDecrypt(k,X.key.buffer,X.iv.buffer).then(function(Ae){var Ue=m.push(Ae,null,C);return m.decryptionPromise=null,Ue}),this.decryptionPromise}var ye=x||F,Pe=ye.contiguous,xe=ye.discontinuity,Ie=ye.trackSwitch,Me=ye.accurateTimeOffset,ke=ye.timeOffset,Ee=A.audioCodec,J=A.videoCodec,I=A.defaultInitPts,U=A.duration,K=A.initSegmentData;if((xe||Ie)&&this.resetInitSegment(K,Ee,J,U),xe&&this.resetInitialTimestamp(I),Pe||this.resetContiguity(),this.needsProbing(k,xe,Ie)){if(y.dataLength){var q=y.flush();k=Object(c.appendUint8Array)(q,k)}this.configureTransmuxer(k,A)}var V=this.transmux(k,X,ke,Me,C),ue=this.currentTransmuxState;return ue.contiguous=!0,ue.discontinuity=!1,ue.trackSwitch=!1,P.executeEnd=d(),V},_.flush=function(g){var h=this,C=g.transmuxing;C.executeStart=d();var x=this.decrypter,m=this.cache,P=this.currentTransmuxState,k=this.decryptionPromise;if(k)return k.then(function(){return h.flush(g)});var y=[],S=P.timeOffset;if(x){var F=x.flush();F&&y.push(this.push(F,null,g))}var A=m.dataLength;m.reset();var X=this.demuxer,ne=this.remuxer;if(!X||!ne)return A>=l&&this.observer.emit(Y.Events.ERROR,Y.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(g)];var fe=X.flush(S);return O(fe)?fe.then(function(ye){return h.flushRemux(y,ye,g),y}):(this.flushRemux(y,fe,g),y)},_.flushRemux=function(g,h,C){var x=h.audioTrack,m=h.avcTrack,P=h.id3Track,k=h.textTrack,y=this.currentTransmuxState,S=y.accurateTimeOffset,F=y.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+C.sn+(C.part>-1?" p: "+C.part:"")+" of level "+C.level);var A=this.remuxer.remux(x,m,P,k,F,S,!0,this.id);g.push({remuxResult:A,chunkMeta:C}),C.transmuxing.executeEnd=d()},_.resetInitialTimestamp=function(g){var h=this.demuxer,C=this.remuxer;if(!h||!C)return;h.resetTimeStamp(g),C.resetTimeStamp(g)},_.resetContiguity=function(){var g=this.demuxer,h=this.remuxer;if(!g||!h)return;g.resetContiguity(),h.resetNextTimestamp()},_.resetInitSegment=function(g,h,C,x){var m=this.demuxer,P=this.remuxer;if(!m||!P)return;m.resetInitSegment(h,C,x),P.resetInitSegment(g,h,C)},_.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},_.transmux=function(g,h,C,x,m){var P;return h&&h.method==="SAMPLE-AES"?P=this.transmuxSampleAes(g,h,C,x,m):P=this.transmuxUnencrypted(g,C,x,m),P},_.transmuxUnencrypted=function(g,h,C,x){var m=this.demuxer.demux(g,h,!1,!this.config.progressive),P=m.audioTrack,k=m.avcTrack,y=m.id3Track,S=m.textTrack,F=this.remuxer.remux(P,k,y,S,h,C,!1,this.id);return{remuxResult:F,chunkMeta:x}},_.transmuxSampleAes=function(g,h,C,x,m){var P=this;return this.demuxer.demuxSampleAes(g,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:m}})},_.configureTransmuxer=function(g,h){for(var C=this.config,x=this.observer,m=this.typeSupported,P=this.vendor,k=h.audioCodec,y=h.defaultInitPts,S=h.duration,F=h.initSegmentData,A=h.videoCodec,X,ne=0,fe=u.length;ne<fe;ne++)if(u[ne].demux.probe(g)){X=u[ne];break}X||(s.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),X={demux:j.default,remux:f.default});var ye=this.demuxer,Pe=this.remuxer,xe=X.remux,Ie=X.demux;(!Pe||!(Pe instanceof xe))&&(this.remuxer=new xe(x,C,m,P)),(!ye||!(ye instanceof Ie))&&(this.demuxer=new Ie(x,C,m),this.probe=Ie.probe),this.resetInitSegment(F,k,A,S),this.resetInitialTimestamp(y)},_.needsProbing=function(g,h,C){return!this.demuxer||!this.remuxer||h||C},_.getDecrypter=function(){var g=this.decrypter;return g||(g=this.decrypter=new D.default(this.observer,this.config)),g},L}();function i(L,_){var b=null;return L.byteLength>0&&_!=null&&_.key!=null&&_.iv!==null&&_.method!=null&&(b=_),b}var R=function(_){return{remuxResult:{},chunkMeta:_}};function O(L){return"then"in L&&L.then instanceof Function}var w=function(_,b,g,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=g,this.duration=h,this.defaultInitPts=C},M=function(_,b,g,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=g,this.trackSwitch=h,this.timeOffset=C}},"./src/demux/tsdemuxer.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"discardEPB",function(){return R});var Y=N("./src/demux/adts.ts"),W=N("./src/demux/mpegaudio.ts"),D=N("./src/demux/exp-golomb.ts"),G=N("./src/demux/id3.ts"),j=N("./src/demux/sample-aes.ts"),n=N("./src/events.ts"),T=N("./src/utils/mp4-tools.ts"),v=N("./src/utils/logger.ts"),f=N("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},c=function(){function O(M,L,_){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=M,this.config=L,this.typeSupported=_}O.probe=function(L){var _=O.syncOffset(L);return _<0?!1:(_&&v.logger.warn("MPEG2-TS detected but first sync word found @ offset "+_+", junk ahead ?"),!0)},O.syncOffset=function(L){for(var _=Math.min(1e3,L.length-3*188),b=0;b<_;){if(L[b]===71&&L[b+188]===71&&L[b+2*188]===71)return b;b++}return-1},O.createTrack=function(L,_){return{container:L==="video"||L==="audio"?"video/mp2t":void 0,type:L,id:p[L],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:L==="audio"?_:void 0}};var w=O.prototype;return w.resetInitSegment=function(L,_,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=L,this.videoCodec=_,this._duration=b},w.resetTimeStamp=function(){},w.resetContiguity=function(){var L=this._audioTrack,_=this._avcTrack,b=this._id3Track;L&&(L.pesData=null),_&&(_.pesData=null),b&&(b.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},w.demux=function(L,_,b,g){b===void 0&&(b=!1),g===void 0&&(g=!1),b||(this.sampleAes=null);var h,C=this._avcTrack,x=this._audioTrack,m=this._id3Track,P=C.pid,k=C.pesData,y=x.pid,S=m.pid,F=x.pesData,A=m.pesData,X=!1,ne=this.pmtParsed,fe=this._pmtId,ye=L.length;if(this.remainderData&&(L=Object(T.appendUint8Array)(this.remainderData,L),ye=L.length,this.remainderData=null),ye<188&&!g)return this.remainderData=L,{audioTrack:x,avcTrack:C,id3Track:m,textTrack:this._txtTrack};var Pe=Math.max(0,O.syncOffset(L));ye-=(ye+Pe)%188,ye<L.byteLength&&!g&&(this.remainderData=new Uint8Array(L.buffer,ye,L.buffer.byteLength-ye));for(var xe=Pe;xe<ye;xe+=188)if(L[xe]===71){var Ie=!!(L[xe+1]&64),Me=((L[xe+1]&31)<<8)+L[xe+2],ke=(L[xe+3]&48)>>4,Ee=void 0;if(ke>1){if(Ee=xe+5+L[xe+4],Ee===xe+188)continue}else Ee=xe+4;switch(Me){case P:Ie&&(k&&(h=l(k))&&this.parseAVCPES(h,!1),k={data:[],size:0}),k&&(k.data.push(L.subarray(Ee,xe+188)),k.size+=xe+188-Ee);break;case y:Ie&&(F&&(h=l(F))&&(x.isAAC?this.parseAACPES(h):this.parseMPEGPES(h)),F={data:[],size:0}),F&&(F.data.push(L.subarray(Ee,xe+188)),F.size+=xe+188-Ee);break;case S:Ie&&(A&&(h=l(A))&&this.parseID3PES(h),A={data:[],size:0}),A&&(A.data.push(L.subarray(Ee,xe+188)),A.size+=xe+188-Ee);break;case 0:Ie&&(Ee+=L[Ee]+1),fe=this._pmtId=d(L,Ee);break;case fe:{Ie&&(Ee+=L[Ee]+1);var J=u(L,Ee,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,b);P=J.avc,P>0&&(C.pid=P),y=J.audio,y>0&&(x.pid=y,x.isAAC=J.isAAC),S=J.id3,S>0&&(m.pid=S),X&&!ne&&(v.logger.log("reparse from beginning"),X=!1,xe=Pe-188),ne=this.pmtParsed=!0;break}case 17:case 8191:break;default:X=!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,m.pesData=A;var I={audioTrack:x,avcTrack:C,id3Track:m,textTrack:this._txtTrack};return g&&this.extractRemainingSamples(I),I},w.flush=function(){var L=this.remainderData;this.remainderData=null;var _;return L?_=this.demux(L,-1,!1,!0):_={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(_),this.sampleAes?this.decrypt(_,this.sampleAes):_},w.extractRemainingSamples=function(L){var _=L.audioTrack,b=L.avcTrack,g=L.id3Track,h=b.pesData,C=_.pesData,x=g.pesData,m;h&&(m=l(h))?(this.parseAVCPES(m,!0),b.pesData=null):b.pesData=h,C&&(m=l(C))?(_.isAAC?this.parseAACPES(m):this.parseMPEGPES(m),_.pesData=null):(C!=null&&C.size&&v.logger.log("last AAC PES packet truncated,might overlap between fragments"),_.pesData=C),x&&(m=l(x))?(this.parseID3PES(m),g.pesData=null):g.pesData=x},w.demuxSampleAes=function(L,_,b){var g=this.demux(L,b,!0,!this.config.progressive),h=this.sampleAes=new j.default(this.observer,this.config,_);return this.decrypt(g,h)},w.decrypt=function(L,_){return new Promise(function(b){var g=L.audioTrack,h=L.avcTrack;g.samples&&g.isAAC?_.decryptAacSamples(g.samples,0,function(){h.samples?_.decryptAvcSamples(h.samples,0,0,function(){b(L)}):b(L)}):h.samples&&_.decryptAvcSamples(h.samples,0,0,function(){b(L)})})},w.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},w.parseAVCPES=function(L,_){var b=this,g=this._avcTrack,h=this.parseAVCNALu(L.data),C=!1,x=this.avcSample,m,P=!1;L.data=null,x&&h.length&&!g.audFound&&(a(x,g),x=this.avcSample=s(!1,L.pts,L.dts,"")),h.forEach(function(k){switch(k.type){case 1:{m=!0,x||(x=b.avcSample=s(!0,L.pts,L.dts,"")),C&&(x.debug+="NDR "),x.frame=!0;var y=k.data;if(P&&y.length>4){var S=new D.default(y).readSliceType();(S===2||S===4||S===7||S===9)&&(x.key=!0)}break}case 5:m=!0,x||(x=b.avcSample=s(!0,L.pts,L.dts,"")),C&&(x.debug+="IDR "),x.key=!0,x.frame=!0;break;case 6:{m=!0,C&&x&&(x.debug+="SEI ");var F=new D.default(R(k.data));F.readUByte();for(var A=0,X=0,ne=!1,fe=0;!ne&&F.bytesAvailable>1;){A=0;do fe=F.readUByte(),A+=fe;while(fe===255);X=0;do fe=F.readUByte(),X+=fe;while(fe===255);if(A===4&&F.bytesAvailable!==0){ne=!0;var ye=F.readUByte();if(ye===181){var Pe=F.readUShort();if(Pe===49){var xe=F.readUInt();if(xe===1195456820){var Ie=F.readUByte();if(Ie===3){for(var Me=F.readUByte(),ke=F.readUByte(),Ee=31&Me,J=[Me,ke],I=0;I<Ee;I++)J.push(F.readUByte()),J.push(F.readUByte()),J.push(F.readUByte());i(b._txtTrack.samples,{type:3,pts:L.pts,bytes:J})}}}}}else if(A===5&&F.bytesAvailable!==0){if(ne=!0,X>16){for(var U=[],K=0;K<16;K++)U.push(F.readUByte().toString(16)),(K===3||K===5||K===7||K===9)&&U.push("-");for(var q=X-16,V=new Uint8Array(q),ue=0;ue<q;ue++)V[ue]=F.readUByte();i(b._txtTrack.samples,{pts:L.pts,payloadType:A,uuid:U.join(""),userData:Object(G.utf8ArrayToStr)(V),userDataBytes:V})}}else if(X<F.bytesAvailable)for(var Ae=0;Ae<X;Ae++)F.readUByte()}break}case 7:if(m=!0,P=!0,C&&x&&(x.debug+="SPS "),!g.sps){var Ue=new D.default(k.data),ce=Ue.readSPS();g.width=ce.width,g.height=ce.height,g.pixelRatio=ce.pixelRatio,g.sps=[k.data],g.duration=b._duration;for(var ge=k.data.subarray(1,4),Te="avc1.",Oe=0;Oe<3;Oe++){var Xe=ge[Oe].toString(16);Xe.length<2&&(Xe="0"+Xe),Te+=Xe}g.codec=Te}break;case 8:m=!0,C&&x&&(x.debug+="PPS "),g.pps||(g.pps=[k.data]);break;case 9:m=!1,g.audFound=!0,x&&a(x,g),x=b.avcSample=s(!1,L.pts,L.dts,C?"AUD ":"");break;case 12:m=!1;break;default:m=!1,x&&(x.debug+="unknown NAL "+k.type+" ");break}if(x&&m){var rt=x.units;rt.push(k)}}),_&&x&&(a(x,g),this.avcSample=null)},w.getLastNalUnit=function(){var L,_=this.avcSample,b;if(!_||_.units.length===0){var g=this._avcTrack.samples;_=g[g.length-1]}if((L=_)!==null&&L!==void 0&&L.units){var h=_.units;b=h[h.length-1]}return b},w.parseAVCNALu=function(L){var _=L.byteLength,b=this._avcTrack,g=b.naluState||0,h=g,C=[],x=0,m,P,k,y=-1,S=0;for(g===-1&&(y=0,S=L[0]&31,g=0,x=1);x<_;){if(m=L[x++],!g){g=m?0:1;continue}if(g===1){g=m?0:2;continue}if(!m)g=3;else if(m===1){if(y>=0){var F={data:L.subarray(y,x-g-1),type:S};C.push(F)}else{var A=this.getLastNalUnit();if(A&&(h&&x<=4-h&&(A.state&&(A.data=A.data.subarray(0,A.data.byteLength-h))),P=x-g-1,P>0)){var X=new Uint8Array(A.data.byteLength+P);X.set(A.data,0),X.set(L.subarray(0,P),A.data.byteLength),A.data=X,A.state=0}}x<_?(k=L[x]&31,y=x,S=k,g=0):g=-1}else g=0}if(y>=0&&g>=0){var ne={data:L.subarray(y,_),type:S,state:g};C.push(ne)}if(C.length===0){var fe=this.getLastNalUnit();if(fe){var ye=new Uint8Array(fe.data.byteLength+L.byteLength);ye.set(fe.data,0),ye.set(L,fe.data.byteLength),fe.data=ye}}return b.naluState=g,C},w.parseAACPES=function(L){var _=0,b=this._audioTrack,g=this.aacOverFlow,h=L.data;if(g){this.aacOverFlow=null;var C=g.sample.unit.byteLength,x=Math.min(g.missing,C),m=C-x;g.sample.unit.set(h.subarray(0,x),m),b.samples.push(g.sample),_=g.missing}var P,k;for(P=_,k=h.length;P<k-1&&!Y.isHeader(h,P);P++);if(P!==_){var y,S;if(P<k-1?(y="AAC PES did not start with ADTS header,offset:"+P,S=!1):(y="no ADTS header found in AAC PES",S=!0),v.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:S,reason:y}),S)return}Y.initTrackConfig(b,this.observer,h,P,this.audioCodec);var F;if(L.pts!==void 0)F=L.pts;else if(g){var A=Y.getFrameDuration(b.samplerate);F=g.sample.pts+A}else{v.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var X=0;P<k;)if(Y.isHeader(h,P)){if(P+5<k){var ne=Y.appendFrame(b,h,P,F,X);if(ne)if(ne.missing)this.aacOverFlow=ne;else{P+=ne.length,X++;continue}}break}else P++},w.parseMPEGPES=function(L){var _=L.data,b=_.length,g=0,h=0,C=L.pts;if(C===void 0){v.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;h<b;)if(W.isHeader(_,h)){var x=W.appendFrame(this._audioTrack,_,h,C,g);if(x)h+=x.length,g++;else break}else h++},w.parseID3PES=function(L){if(L.pts===void 0){v.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(L)},O}();c.minProbeByteLength=188;function s(O,w,M,L){return{key:O,frame:!1,pts:w,dts:M,units:[],debug:L,length:0}}function d(O,w){return(O[w+10]&31)<<8|O[w+11]}function u(O,w,M,L){var _={audio:-1,avc:-1,id3:-1,isAAC:!0},b=(O[w+1]&15)<<8|O[w+2],g=w+3+b-4,h=(O[w+10]&15)<<8|O[w+11];for(w+=12+h;w<g;){var C=(O[w+1]&31)<<8|O[w+2];switch(O[w]){case 207:if(!L){v.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(!L){v.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:M?_.audio===-1&&(_.audio=C,_.isAAC=!1):v.logger.log("MPEG audio found, not supported in this browser");break;case 36:v.logger.warn("Unsupported HEVC stream type found");break;default:break}w+=((O[w+3]&15)<<8|O[w+4])+5}return _}function l(O){var w=0,M,L,_,b,g,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)}M=h[0];var x=(M[0]<<16)+(M[1]<<8)+M[2];if(x===1){if(L=(M[4]<<8)+M[5],L&&L>O.size-6)return null;var m=M[7];m&192&&(b=(M[9]&14)*536870912+(M[10]&255)*4194304+(M[11]&254)*16384+(M[12]&255)*128+(M[13]&254)/2,m&64?(g=(M[14]&14)*536870912+(M[15]&255)*4194304+(M[16]&254)*16384+(M[17]&255)*128+(M[18]&254)/2,b-g>60*9e4&&(v.logger.warn(Math.round((b-g)/9e4)+"s delta between PTS and DTS, align them"),b=g)):g=b),_=M[8];var P=_+9;if(O.size<=P)return null;O.size-=P;for(var k=new Uint8Array(O.size),y=0,S=h.length;y<S;y++){M=h[y];var F=M.byteLength;if(P)if(P>F){P-=F;continue}else M=M.subarray(P),F-=P,P=0;k.set(M,w),w+=F}return L&&(L-=_+3),{data:k,pts:b,dts:g,len:L}}return null}function a(O,w){if(O.units.length&&O.frame){if(O.pts===void 0){var M=w.samples,L=M.length;if(L){var _=M[L-1];O.pts=_.pts,O.dts=_.dts}else{w.dropped++;return}}w.samples.push(O)}O.debug.length&&v.logger.log(O.pts+"/"+O.dts+":"+O.debug)}function i(O,w){var M=O.length;if(M>0){if(w.pts>=O[M-1].pts)O.push(w);else for(var L=M-1;L>=0;L--)if(w.pts<O[L].pts){O.splice(L,0,w);break}}else O.push(w)}function R(O){for(var w=O.byteLength,M=[],L=1;L<w-2;)O[L]===0&&O[L+1]===0&&O[L+2]===3?(M.push(L+2),L+=2):L++;if(M.length===0)return O;var _=w-M.length,b=new Uint8Array(_),g=0;for(L=0;L<_;g++,L++)g===M[0]&&(g++,M.shift()),b[L]=O[g];return b}z.default=c},"./src/errors.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"ErrorTypes",function(){return Y}),N.d(z,"ErrorDetails",function(){return W});var Y;(function(D){D.NETWORK_ERROR="networkError",D.MEDIA_ERROR="mediaError",D.KEY_SYSTEM_ERROR="keySystemError",D.MUX_ERROR="muxError",D.OTHER_ERROR="otherError"})(Y||(Y={}));var W;(function(D){D.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",D.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",D.KEY_SYSTEM_NO_SESSION="keySystemNoSession",D.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",D.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",D.MANIFEST_LOAD_ERROR="manifestLoadError",D.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",D.MANIFEST_PARSING_ERROR="manifestParsingError",D.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",D.LEVEL_EMPTY_ERROR="levelEmptyError",D.LEVEL_LOAD_ERROR="levelLoadError",D.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",D.LEVEL_SWITCH_ERROR="levelSwitchError",D.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",D.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",D.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",D.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",D.FRAG_LOAD_ERROR="fragLoadError",D.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",D.FRAG_DECRYPT_ERROR="fragDecryptError",D.FRAG_PARSING_ERROR="fragParsingError",D.REMUX_ALLOC_ERROR="remuxAllocError",D.KEY_LOAD_ERROR="keyLoadError",D.KEY_LOAD_TIMEOUT="keyLoadTimeOut",D.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",D.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",D.BUFFER_APPEND_ERROR="bufferAppendError",D.BUFFER_APPENDING_ERROR="bufferAppendingError",D.BUFFER_STALLED_ERROR="bufferStalledError",D.BUFFER_FULL_ERROR="bufferFullError",D.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",D.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",D.INTERNAL_EXCEPTION="internalException",D.INTERNAL_ABORTED="aborted",D.UNKNOWN="unknown"})(W||(W={}))},"./src/events.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"Events",function(){return Y});var Y;(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"})(Y||(Y={}))},"./src/hls.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return O});var Y=N("./node_modules/url-toolkit/src/url-toolkit.js"),W=N.n(Y),D=N("./src/loader/playlist-loader.ts"),G=N("./src/loader/key-loader.ts"),j=N("./src/controller/id3-track-controller.ts"),n=N("./src/controller/latency-controller.ts"),T=N("./src/controller/level-controller.ts"),v=N("./src/controller/fragment-tracker.ts"),f=N("./src/controller/stream-controller.ts"),p=N("./src/is-supported.ts"),c=N("./src/utils/logger.ts"),s=N("./src/config.ts"),d=N("./node_modules/eventemitter3/index.js"),u=N.n(d),l=N("./src/events.ts"),a=N("./src/errors.ts");function i(w,M){for(var L=0;L<M.length;L++){var _=M[L];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(w,_.key,_)}}function R(w,M,L){return M&&i(w.prototype,M),L&&i(w,L),w}var O=function(){w.isSupported=function(){return Object(p.isSupported)()};function w(L){L===void 0&&(L={}),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(s.mergeConfig)(w.DefaultConfig,L);this.userConfig=L,Object(c.enableLogs)(_.debug),this._autoLevelCapping=-1,_.progressive&&Object(s.enableStreamingMode)(_);var b=_.abrController,g=_.bufferController,h=_.capLevelController,C=_.fpsController,x=this.abrController=new b(this),m=this.bufferController=new g(this),P=this.capLevelController=new h(this),k=new C(this),y=new D.default(this),S=new G.default(this),F=new j.default(this),A=this.levelController=new T.default(this),X=new v.FragmentTracker(this),ne=this.streamController=new f.default(this,X);P.setStreamController(ne),k.setStreamController(ne);var fe=[A,ne];this.networkControllers=fe;var ye=[y,S,x,m,P,k,F,X];this.audioTrackController=this.createController(_.audioTrackController,null,fe),this.createController(_.audioStreamController,X,fe),this.subtitleTrackController=this.createController(_.subtitleTrackController,null,fe),this.createController(_.subtitleStreamController,X,fe),this.createController(_.timelineController,null,ye),this.emeController=this.createController(_.emeController,null,ye),this.cmcdController=this.createController(_.cmcdController,null,ye),this.latencyController=this.createController(n.default,null,ye),this.coreComponents=ye}var M=w.prototype;return M.createController=function(_,b,g){if(_){var h=b?new _(this,b):new _(this);return g&&g.push(h),h}return null},M.on=function(_,b,g){g===void 0&&(g=this),this._emitter.on(_,b,g)},M.once=function(_,b,g){g===void 0&&(g=this),this._emitter.once(_,b,g)},M.removeAllListeners=function(_){this._emitter.removeAllListeners(_)},M.off=function(_,b,g,h){g===void 0&&(g=this),this._emitter.off(_,b,g,h)},M.listeners=function(_){return this._emitter.listeners(_)},M.emit=function(_,b,g){return this._emitter.emit(_,b,g)},M.trigger=function(_,b){if(this.config.debug)return this.emit(_,_,b);try{return this.emit(_,_,b)}catch(g){c.logger.error("An internal error happened while handling event "+_+'. Error message: "'+g.message+'". Here is a stacktrace:',g),this.trigger(l.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:_,error:g})}return!1},M.listenerCount=function(_){return this._emitter.listenerCount(_)},M.destroy=function(){c.logger.log("destroy"),this.trigger(l.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},M.attachMedia=function(_){c.logger.log("attachMedia"),this._media=_,this.trigger(l.Events.MEDIA_ATTACHING,{media:_})},M.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(l.Events.MEDIA_DETACHING,void 0),this._media=null},M.loadSource=function(_){this.stopLoad();var b=this.media,g=this.url,h=this.url=Y.buildAbsoluteURL(self.location.href,_,{alwaysNormalize:!0});c.logger.log("loadSource:"+h),b&&g&&g!==h&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(b)),this.trigger(l.Events.MANIFEST_LOADING,{url:_})},M.startLoad=function(_){_===void 0&&(_=-1),c.logger.log("startLoad("+_+")"),this.networkControllers.forEach(function(b){b.startLoad(_)})},M.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach(function(_){_.stopLoad()})},M.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},M.recoverMediaError=function(){c.logger.log("recoverMediaError");var _=this._media;this.detachMedia(),_&&this.attachMedia(_)},M.removeLevel=function(_,b){b===void 0&&(b=0),this.levelController.removeLevel(_,b)},R(w,[{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 g=_.length,h=0;h<g;h++)if(_[h].maxBitrate>b)return h;return 0}},{key:"maxAutoLevel",get:function(){var _=this.levels,b=this.autoLevelCapping,g;return b===-1&&_&&_.length?g=_.length-1:g=b,g}},{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 l.Events}},{key:"ErrorTypes",get:function(){return a.ErrorTypes}},{key:"ErrorDetails",get:function(){return a.ErrorDetails}},{key:"DefaultConfig",get:function(){return w.defaultConfig?w.defaultConfig:s.hlsDefaultConfig},set:function(_){w.defaultConfig=_}}]),w}();O.defaultConfig=void 0},"./src/is-supported.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"isSupported",function(){return D}),N.d(z,"changeTypeSupported",function(){return G});var Y=N("./src/utils/mediasource-helper.ts");function W(){return self.SourceBuffer||self.WebKitSourceBuffer}function D(){var j=Object(Y.getMediaSource)();if(!j)return!1;var n=W(),T=j&&typeof j.isTypeSupported=="function"&&j.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),v=!n||n.prototype&&typeof n.prototype.appendBuffer=="function"&&typeof n.prototype.remove=="function";return!!T&&!!v}function G(){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,z,N){"use strict";N.r(z),N.d(z,"default",function(){return c}),N.d(z,"LoadError",function(){return d});var Y=N("./src/polyfills/number.ts"),W=N("./src/errors.ts");function D(u,l){u.prototype=Object.create(l.prototype),u.prototype.constructor=u,v(u,l)}function G(u){var l=typeof Map=="function"?new Map:void 0;return G=function(i){if(i===null||!T(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l!="undefined"){if(l.has(i))return l.get(i);l.set(i,R)}function R(){return j(i,arguments,f(this).constructor)}return R.prototype=Object.create(i.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),v(R,i)},G(u)}function j(u,l,a){return n()?j=Reflect.construct:j=function(R,O,w){var M=[null];M.push.apply(M,O);var L=Function.bind.apply(R,M),_=new L;return w&&v(_,w.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 T(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function v(u,l){return v=Object.setPrototypeOf||function(i,R){return i.__proto__=R,i},v(u,l)}function f(u){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},f(u)}var p=Math.pow(2,17),c=function(){function u(a){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=a}var l=u.prototype;return l.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},l.abort=function(){this.loader&&this.loader.abort()},l.load=function(i,R){var O=this,w=i.url;if(!w)return Promise.reject(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,networkDetails:null},"Fragment does not have a "+(w?"part list":"url")));this.abort();var M=this.config,L=M.fLoader,_=M.loader;return new Promise(function(b,g){O.loader&&O.loader.destroy();var h=O.loader=i.loader=L?new L(M):new _(M),C=s(i),x={timeout:M.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:M.fragLoadingMaxRetryTimeout,highWaterMark:p};i.stats=h.stats,h.load(C,x,{onSuccess:function(P,k,y,S){O.resetLoader(i,h),b({frag:i,part:null,payload:P.data,networkDetails:S})},onError:function(P,k,y){O.resetLoader(i,h),g(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,response:P,networkDetails:y}))},onAbort:function(P,k,y){O.resetLoader(i,h),g(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:i,networkDetails:y}))},onTimeout:function(P,k,y){O.resetLoader(i,h),g(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i,networkDetails:y}))},onProgress:function(P,k,y,S){R&&R({frag:i,part:null,payload:y,networkDetails:S})}})})},l.loadPart=function(i,R,O){var w=this;this.abort();var M=this.config,L=M.fLoader,_=M.loader;return new Promise(function(b,g){w.loader&&w.loader.destroy();var h=w.loader=i.loader=L?new L(M):new _(M),C=s(i,R),x={timeout:M.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:M.fragLoadingMaxRetryTimeout,highWaterMark:p};R.stats=h.stats,h.load(C,x,{onSuccess:function(P,k,y,S){w.resetLoader(i,h),w.updateStatsFromPart(i,R);var F={frag:i,part:R,payload:P.data,networkDetails:S};O(F),b(F)},onError:function(P,k,y){w.resetLoader(i,h),g(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,part:R,response:P,networkDetails:y}))},onAbort:function(P,k,y){i.stats.aborted=R.stats.aborted,w.resetLoader(i,h),g(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:i,part:R,networkDetails:y}))},onTimeout:function(P,k,y){w.resetLoader(i,h),g(new d({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i,part:R,networkDetails:y}))}})})},l.updateStatsFromPart=function(i,R){var O=i.stats,w=R.stats,M=w.total;if(O.loaded+=w.loaded,M){var L=Math.round(i.duration/R.duration),_=Math.min(Math.round(O.loaded/M),L),b=L-_,g=b*Math.round(O.loaded/_);O.total=O.loaded+g}else O.total=Math.max(O.loaded,O.total);var h=O.loading,C=w.loading;h.start?h.first+=C.first-C.start:(h.start=C.start,h.first=C.first),h.end=C.end},l.resetLoader=function(i,R){i.loader=null,this.loader===R&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),R.destroy()},u}();function s(u,l){l===void 0&&(l=null);var a=l||u,i={frag:u,part:l,responseType:"arraybuffer",url:a.url,headers:{},rangeStart:0,rangeEnd:0},R=a.byteRangeStartOffset,O=a.byteRangeEndOffset;return Object(Y.isFiniteNumber)(R)&&Object(Y.isFiniteNumber)(O)&&(i.rangeStart=R,i.rangeEnd=O),i}var d=function(u){D(l,u);function l(a){for(var i,R=arguments.length,O=new Array(R>1?R-1:0),w=1;w<R;w++)O[w-1]=arguments[w];return i=u.call.apply(u,[this].concat(O))||this,i.data=void 0,i.data=a,i}return l}(G(Error))},"./src/loader/fragment.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"ElementaryStreamTypes",function(){return c}),N.d(z,"BaseSegment",function(){return s}),N.d(z,"Fragment",function(){return d}),N.d(z,"Part",function(){return u});var Y=N("./src/polyfills/number.ts"),W=N("./node_modules/url-toolkit/src/url-toolkit.js"),D=N.n(W),G=N("./src/utils/logger.ts"),j=N("./src/loader/level-key.ts"),n=N("./src/loader/load-stats.ts");function T(l,a){l.prototype=Object.create(a.prototype),l.prototype.constructor=l,v(l,a)}function v(l,a){return v=Object.setPrototypeOf||function(R,O){return R.__proto__=O,R},v(l,a)}function f(l,a){for(var i=0;i<a.length;i++){var R=a[i];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(l,R.key,R)}}function p(l,a,i){return a&&f(l.prototype,a),i&&f(l,i),l}var c;(function(l){l.AUDIO="audio",l.VIDEO="video",l.AUDIOVIDEO="audiovideo"})(c||(c={}));var s=function(){function l(i){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=i}var a=l.prototype;return a.setByteRange=function(R,O){var w=R.split("@",2),M=[];w.length===1?M[0]=O?O.byteRangeEndOffset:0:M[0]=parseInt(w[1]),M[1]=parseInt(w[0])+M[0],this._byteRange=M},p(l,[{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}}]),l}(),d=function(l){T(a,l);function a(R,O){var w;return w=l.call(this,O)||this,w._decryptdata=null,w.rawProgramDateTime=null,w.programDateTime=null,w.tagList=[],w.duration=0,w.sn=0,w.levelkey=void 0,w.type=void 0,w.loader=null,w.level=-1,w.cc=0,w.startPTS=void 0,w.endPTS=void 0,w.appendedPTS=void 0,w.startDTS=void 0,w.endDTS=void 0,w.start=0,w.deltaPTS=void 0,w.maxStartPTS=void 0,w.minEndPTS=void 0,w.stats=new n.LoadStats,w.urlId=0,w.data=void 0,w.bitrateTest=!1,w.title=null,w.initSegment=null,w.type=R,w}var i=a.prototype;return i.createInitializationVector=function(O){for(var w=new Uint8Array(16),M=12;M<16;M++)w[M]=O>>8*(15-M)&255;return w},i.setDecryptDataFromLevelKey=function(O,w){var M=O;return(O==null?void 0:O.method)==="AES-128"&&O.uri&&!O.iv&&(M=j.LevelKey.fromURI(O.uri),M.method=O.method,M.iv=this.createInitializationVector(w),M.keyFormat="identity"),M},i.setElementaryStreamInfo=function(O,w,M,L,_,b){b===void 0&&(b=!1);var g=this.elementaryStreams,h=g[O];if(!h){g[O]={startPTS:w,endPTS:M,startDTS:L,endDTS:_,partial:b};return}h.startPTS=Math.min(h.startPTS,w),h.endPTS=Math.max(h.endPTS,M),h.startDTS=Math.min(h.startDTS,L),h.endDTS=Math.max(h.endDTS,_)},i.clearElementaryStreamInfo=function(){var O=this.elementaryStreams;O[c.AUDIO]=null,O[c.VIDEO]=null,O[c.AUDIOVIDEO]=null},p(a,[{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&&G.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(Y.isFiniteNumber)(this.programDateTime))return null;var O=Object(Y.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)}}]),a}(s),u=function(l){T(a,l);function a(i,R,O,w,M){var L;L=l.call(this,O)||this,L.fragOffset=0,L.duration=0,L.gap=!1,L.independent=!1,L.relurl=void 0,L.fragment=void 0,L.index=void 0,L.stats=new n.LoadStats,L.duration=i.decimalFloatingPoint("DURATION"),L.gap=i.bool("GAP"),L.independent=i.bool("INDEPENDENT"),L.relurl=i.enumeratedString("URI"),L.fragment=R,L.index=w;var _=i.enumeratedString("BYTERANGE");return _&&L.setByteRange(_,M),M&&(L.fragOffset=M.fragOffset+M.duration),L}return p(a,[{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)}}]),a}(s)},"./src/loader/key-loader.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return G});var Y=N("./src/events.ts"),W=N("./src/errors.ts"),D=N("./src/utils/logger.ts"),G=function(){function j(T){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=T,this._registerListeners()}var n=j.prototype;return n._registerListeners=function(){this.hls.on(Y.Events.KEY_LOADING,this.onKeyLoading,this)},n._unregisterListeners=function(){this.hls.off(Y.Events.KEY_LOADING,this.onKeyLoading)},n.destroy=function(){this._unregisterListeners();for(var v in this.loaders){var f=this.loaders[v];f&&f.destroy()}this.loaders={}},n.onKeyLoading=function(v,f){var p=f.frag,c=p.type,s=this.loaders[c];if(!p.decryptdata){D.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(s&&(D.logger.warn("abort previous key loader for type:"+c),s.abort()),!d){D.logger.warn("key uri is falsy");return}var l=u.loader,a=p.loader=this.loaders[c]=new l(u);this.decrypturl=d,this.decryptkey=null;var i={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)};a.load(i,R,O)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(Y.Events.KEY_LOADED,{frag:p}))},n.loadsuccess=function(v,f,p){var c=p.frag;if(!c.decryptdata){D.logger.error("after key load, decryptdata unset");return}this.decryptkey=c.decryptdata.key=new Uint8Array(v.data),c.loader=null,delete this.loaders[c.type],this.hls.trigger(Y.Events.KEY_LOADED,{frag:c})},n.loaderror=function(v,f){var p=f.frag,c=p.loader;c&&c.abort(),delete this.loaders[p.type],this.hls.trigger(Y.Events.ERROR,{type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:v})},n.loadtimeout=function(v,f){var p=f.frag,c=p.loader;c&&c.abort(),delete this.loaders[p.type],this.hls.trigger(Y.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,z,N){"use strict";N.r(z),N.d(z,"LevelDetails",function(){return j});var Y=N("./src/polyfills/number.ts");function W(n,T){for(var v=0;v<T.length;v++){var f=T[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function D(n,T,v){return T&&W(n.prototype,T),v&&W(n,v),n}var G=10,j=function(){function n(v){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=v}var T=n.prototype;return T.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},D(n,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(Y.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||G}},{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,z,N){"use strict";N.r(z),N.d(z,"LevelKey",function(){return j});var Y=N("./node_modules/url-toolkit/src/url-toolkit.js"),W=N.n(Y);function D(n,T){for(var v=0;v<T.length;v++){var f=T[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function G(n,T,v){return T&&D(n.prototype,T),v&&D(n,v),n}var j=function(){n.fromURL=function(v,f){return new n(v,f)},n.fromURI=function(v){return new n(v)};function n(T,v){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,v?this._uri=Object(Y.buildAbsoluteURL)(T,v,{alwaysNormalize:!0}):this._uri=T}return G(n,[{key:"uri",get:function(){return this._uri}}]),n}()},"./src/loader/load-stats.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"LoadStats",function(){return Y});var Y=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,z,N){"use strict";N.r(z),N.d(z,"default",function(){return a});var Y=N("./src/polyfills/number.ts"),W=N("./node_modules/url-toolkit/src/url-toolkit.js"),D=N.n(W),G=N("./src/loader/fragment.ts"),j=N("./src/loader/level-details.ts"),n=N("./src/loader/level-key.ts"),T=N("./src/utils/attr-list.ts"),v=N("./src/utils/logger.ts"),f=N("./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,s=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 l(M){var L,_;return u.test((L=(_=W.parseURL(M))===null||_===void 0?void 0:_.path)!=null?L:"")}var a=function(){function M(){}return M.findGroup=function(_,b){for(var g=0;g<_.length;g++){var h=_[g];if(h.id===b)return h}},M.convertAVC1ToAVCOTI=function(_){var b=_.split(".");if(b.length>2){var g=b.shift()+".";return g+=parseInt(b.shift()).toString(16),g+=("000"+parseInt(b.shift()).toString(16)).substr(-4),g}return _},M.resolve=function(_,b){return W.buildAbsoluteURL(b,_,{alwaysNormalize:!0})},M.parseMasterPlaylist=function(_,b){var g=[],h={},C=!1;p.lastIndex=0;for(var x;(x=p.exec(_))!=null;)if(x[1]){var m=new T.AttrList(x[1]),P={attrs:m,bitrate:m.decimalInteger("AVERAGE-BANDWIDTH")||m.decimalInteger("BANDWIDTH"),name:m.NAME,url:M.resolve(x[2],b)},k=m.decimalResolution("RESOLUTION");k&&(P.width=k.width,P.height=k.height),i((m.CODECS||"").split(/[ ,]+/).filter(function(S){return S}),P),P.videoCodec&&P.videoCodec.indexOf("avc1")!==-1&&(P.videoCodec=M.convertAVC1ToAVCOTI(P.videoCodec)),g.push(P)}else if(x[3]){var y=new T.AttrList(x[3]);y["DATA-ID"]&&(C=!0,h[y["DATA-ID"]]=y)}return{levels:g,sessionData:C?h:null}},M.parseMasterPlaylistMedia=function(_,b,g,h){h===void 0&&(h=[]);var C,x=[],m=0;for(c.lastIndex=0;(C=c.exec(_))!==null;){var P=new T.AttrList(C[1]);if(P.TYPE===g){var k={attrs:P,bitrate:0,id:m++,groupId:P["GROUP-ID"],instreamId:P["INSTREAM-ID"],name:P.NAME||P.LANGUAGE||"",type:g,default:P.bool("DEFAULT"),autoselect:P.bool("AUTOSELECT"),forced:P.bool("FORCED"),lang:P.LANGUAGE,url:P.URI?M.resolve(P.URI,b):""};if(h.length){var y=M.findGroup(h,k.groupId)||h[0];R(k,y,"audioCodec"),R(k,y,"textCodec")}x.push(k)}}return x},M.parseLevelPlaylist=function(_,b,g,h,C){var x=new j.LevelDetails(b),m=x.fragments,P=null,k=0,y=0,S=0,F=0,A=null,X=new G.Fragment(h,b),ne,fe,ye,Pe=-1,xe=!1;for(s.lastIndex=0,x.m3u8=_;(ne=s.exec(_))!==null;){xe&&(xe=!1,X=new G.Fragment(h,b),X.start=S,X.sn=k,X.cc=F,X.level=g,P&&(X.initSegment=P,X.rawProgramDateTime=P.rawProgramDateTime));var Ie=ne[1];if(Ie){X.duration=parseFloat(Ie);var Me=(" "+ne[2]).slice(1);X.title=Me||null,X.tagList.push(Me?["INF",Ie,Me]:["INF",Ie])}else if(ne[3])Object(Y.isFiniteNumber)(X.duration)&&(X.start=S,ye&&(X.levelkey=ye),X.sn=k,X.level=g,X.cc=F,X.urlId=C,m.push(X),X.relurl=(" "+ne[3]).slice(1),w(X,A),A=X,S+=X.duration,k++,y=0,xe=!0);else if(ne[4]){var ke=(" "+ne[4]).slice(1);A?X.setByteRange(ke,A):X.setByteRange(ke)}else if(ne[5])X.rawProgramDateTime=(" "+ne[5]).slice(1),X.tagList.push(["PROGRAM-DATE-TIME",X.rawProgramDateTime]),Pe===-1&&(Pe=m.length);else{if(ne=ne[0].match(d),!ne){v.logger.warn("No matches on slow regex match for level playlist!");continue}for(fe=1;fe<ne.length&&!(typeof ne[fe]!="undefined");fe++);var Ee=(" "+ne[fe]).slice(1),J=(" "+ne[fe+1]).slice(1),I=ne[fe+2]?(" "+ne[fe+2]).slice(1):"";switch(Ee){case"PLAYLIST-TYPE":x.type=J.toUpperCase();break;case"MEDIA-SEQUENCE":k=x.startSN=parseInt(J);break;case"SKIP":{var U=new T.AttrList(J),K=U.decimalInteger("SKIPPED-SEGMENTS");if(Object(Y.isFiniteNumber)(K)){x.skippedSegments=K;for(var q=K;q--;)m.unshift(null);k+=K}var V=U.enumeratedString("RECENTLY-REMOVED-DATERANGES");V&&(x.recentlyRemovedDateranges=V.split(" "));break}case"TARGETDURATION":x.targetduration=parseFloat(J);break;case"VERSION":x.version=parseInt(J);break;case"EXTM3U":break;case"ENDLIST":x.live=!1;break;case"#":(J||I)&&X.tagList.push(I?[J,I]:[J]);break;case"DIS":F++;case"GAP":X.tagList.push([Ee]);break;case"BITRATE":X.tagList.push([Ee,J]);break;case"DISCONTINUITY-SEQ":F=parseInt(J);break;case"KEY":{var ue,Ae=new T.AttrList(J),Ue=Ae.enumeratedString("METHOD"),ce=Ae.URI,ge=Ae.hexadecimalInteger("IV"),Te=Ae.enumeratedString("KEYFORMATVERSIONS"),Oe=Ae.enumeratedString("KEYID"),Xe=(ue=Ae.enumeratedString("KEYFORMAT"))!=null?ue:"identity",rt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(rt.indexOf(Xe)>-1){v.logger.warn("Keyformat "+Xe+" is not supported from the manifest");continue}else if(Xe!=="identity")continue;Ue&&(ye=n.LevelKey.fromURL(b,ce),ce&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ue)>=0&&(ye.method=Ue,ye.keyFormat=Xe,Oe&&(ye.keyID=Oe),Te&&(ye.keyFormatVersions=Te),ye.iv=ge));break}case"START":{var st=new T.AttrList(J),nt=st.decimalFloatingPoint("TIME-OFFSET");Object(Y.isFiniteNumber)(nt)&&(x.startTimeOffset=nt);break}case"MAP":{var bt=new T.AttrList(J);X.relurl=bt.URI,bt.BYTERANGE&&X.setByteRange(bt.BYTERANGE),X.level=g,X.sn="initSegment",ye&&(X.levelkey=ye),X.initSegment=null,P=X,xe=!0;break}case"SERVER-CONTROL":{var yt=new T.AttrList(J);x.canBlockReload=yt.bool("CAN-BLOCK-RELOAD"),x.canSkipUntil=yt.optionalFloat("CAN-SKIP-UNTIL",0),x.canSkipDateRanges=x.canSkipUntil>0&&yt.bool("CAN-SKIP-DATERANGES"),x.partHoldBack=yt.optionalFloat("PART-HOLD-BACK",0),x.holdBack=yt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ne=new T.AttrList(J);x.partTarget=Ne.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Re=x.partList;Re||(Re=x.partList=[]);var Je=y>0?Re[Re.length-1]:void 0,tt=y++,le=new G.Part(new T.AttrList(J),X,b,tt,Je);Re.push(le),X.duration+=le.duration;break}case"PRELOAD-HINT":{var $=new T.AttrList(J);x.preloadHint=$;break}case"RENDITION-REPORT":{var te=new T.AttrList(J);x.renditionReports=x.renditionReports||[],x.renditionReports.push(te);break}default:v.logger.warn("line parsed but not handled: "+ne);break}}}A&&!A.relurl?(m.pop(),S-=A.duration,x.partList&&(x.fragmentHint=A)):x.partList&&(w(X,A),X.cc=F,x.fragmentHint=X);var ae=m.length,de=m[0],ie=m[ae-1];if(S+=x.skippedSegments*x.targetduration,S>0&&ae&&ie){x.averagetargetduration=S/ae;var se=ie.sn;x.endSN=se!=="initSegment"?se:0,de&&(x.startCC=de.cc,de.initSegment||x.fragments.every(function(pe){return pe.relurl&&l(pe.relurl)})&&(v.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),X=new G.Fragment(h,b),X.relurl=ie.relurl,X.level=g,X.sn="initSegment",de.initSegment=X,x.needSidxRanges=!0))}else x.endSN=0,x.startCC=0;return x.fragmentHint&&(S+=x.fragmentHint.duration),x.totalduration=S,x.endCC=F,Pe>0&&O(m,Pe),x},M}();function i(M,L){["video","audio","text"].forEach(function(_){var b=M.filter(function(h){return Object(f.isCodecType)(h,_)});if(b.length){var g=b.filter(function(h){return h.lastIndexOf("avc1",0)===0||h.lastIndexOf("mp4a",0)===0});L[_+"Codec"]=g.length>0?g[0]:b[0],M=M.filter(function(h){return b.indexOf(h)===-1})}}),L.unknownCodecs=M}function R(M,L,_){var b=L[_];b&&(M[_]=b)}function O(M,L){for(var _=M[L],b=L;b--;){var g=M[b];if(!g)return;g.programDateTime=_.programDateTime-g.duration*1e3,_=g}}function w(M,L){M.rawProgramDateTime?M.programDateTime=Date.parse(M.rawProgramDateTime):L!=null&&L.programDateTime&&(M.programDateTime=L.endProgramDateTime),Object(Y.isFiniteNumber)(M.programDateTime)||(M.programDateTime=null,M.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/polyfills/number.ts"),W=N("./src/events.ts"),D=N("./src/errors.ts"),G=N("./src/utils/logger.ts"),j=N("./src/utils/mp4-tools.ts"),n=N("./src/loader/m3u8-parser.ts"),T=N("./src/types/loader.ts"),v=N("./src/utils/attr-list.ts");function f(s){var d=s.type;switch(d){case T.PlaylistContextType.AUDIO_TRACK:return T.PlaylistLevelType.AUDIO;case T.PlaylistContextType.SUBTITLE_TRACK:return T.PlaylistLevelType.SUBTITLE;default:return T.PlaylistLevelType.MAIN}}function p(s,d){var u=s.url;return(u===void 0||u.indexOf("data:")===0)&&(u=d.url),u}var c=function(){function s(u){this.hls=void 0,this.loaders=Object.create(null),this.hls=u,this.registerListeners()}var d=s.prototype;return d.registerListeners=function(){var l=this.hls;l.on(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(W.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(W.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),l.on(W.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.unregisterListeners=function(){var l=this.hls;l.off(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(W.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(W.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),l.off(W.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.createInternalLoader=function(l){var a=this.hls.config,i=a.pLoader,R=a.loader,O=i||R,w=new O(a);return l.loader=w,this.loaders[l.type]=w,w},d.getInternalLoader=function(l){return this.loaders[l.type]},d.resetInternalLoader=function(l){this.loaders[l]&&delete this.loaders[l]},d.destroyInternalLoaders=function(){for(var l in this.loaders){var a=this.loaders[l];a&&a.destroy(),this.resetInternalLoader(l)}},d.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},d.onManifestLoading=function(l,a){var i=a.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:T.PlaylistContextType.MANIFEST,url:i,deliveryDirectives:null})},d.onLevelLoading=function(l,a){var i=a.id,R=a.level,O=a.url,w=a.deliveryDirectives;this.load({id:i,groupId:null,level:R,responseType:"text",type:T.PlaylistContextType.LEVEL,url:O,deliveryDirectives:w})},d.onAudioTrackLoading=function(l,a){var i=a.id,R=a.groupId,O=a.url,w=a.deliveryDirectives;this.load({id:i,groupId:R,level:null,responseType:"text",type:T.PlaylistContextType.AUDIO_TRACK,url:O,deliveryDirectives:w})},d.onSubtitleTrackLoading=function(l,a){var i=a.id,R=a.groupId,O=a.url,w=a.deliveryDirectives;this.load({id:i,groupId:R,level:null,responseType:"text",type:T.PlaylistContextType.SUBTITLE_TRACK,url:O,deliveryDirectives:w})},d.load=function(l){var a,i=this.hls.config,R=this.getInternalLoader(l);if(R){var O=R.context;if(O&&O.url===l.url){G.logger.trace("[playlist-loader]: playlist request ongoing");return}G.logger.log("[playlist-loader]: aborting previous loader for type: "+l.type),R.abort()}var w,M,L,_;switch(l.type){case T.PlaylistContextType.MANIFEST:w=i.manifestLoadingMaxRetry,M=i.manifestLoadingTimeOut,L=i.manifestLoadingRetryDelay,_=i.manifestLoadingMaxRetryTimeout;break;case T.PlaylistContextType.LEVEL:case T.PlaylistContextType.AUDIO_TRACK:case T.PlaylistContextType.SUBTITLE_TRACK:w=0,M=i.levelLoadingTimeOut;break;default:w=i.levelLoadingMaxRetry,M=i.levelLoadingTimeOut,L=i.levelLoadingRetryDelay,_=i.levelLoadingMaxRetryTimeout;break}if(R=this.createInternalLoader(l),(a=l.deliveryDirectives)!==null&&a!==void 0&&a.part){var b;if(l.type===T.PlaylistContextType.LEVEL&&l.level!==null?b=this.hls.levels[l.level].details:l.type===T.PlaylistContextType.AUDIO_TRACK&&l.id!==null?b=this.hls.audioTracks[l.id].details:l.type===T.PlaylistContextType.SUBTITLE_TRACK&&l.id!==null&&(b=this.hls.subtitleTracks[l.id].details),b){var g=b.partTarget,h=b.targetduration;g&&h&&(M=Math.min(Math.max(g*3,h*.8)*1e3,M))}}var C={timeout:M,maxRetry:w,retryDelay:L,maxRetryDelay:_,highWaterMark:0},x={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};R.load(l,C,x)},d.loadsuccess=function(l,a,i,R){if(R===void 0&&(R=null),i.isSidxRequest){this.handleSidxRequest(l,i),this.handlePlaylistLoaded(l,a,i,R);return}this.resetInternalLoader(i.type);var O=l.data;if(O.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(l,i,"no EXTM3U delimiter",R);return}a.parsing.start=performance.now(),O.indexOf("#EXTINF:")>0||O.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(l,a,i,R):this.handleMasterPlaylist(l,a,i,R)},d.loaderror=function(l,a,i){i===void 0&&(i=null),this.handleNetworkError(a,i,!1,l)},d.loadtimeout=function(l,a,i){i===void 0&&(i=null),this.handleNetworkError(a,i,!0)},d.handleMasterPlaylist=function(l,a,i,R){var O=this.hls,w=l.data,M=p(l,i),L=n.default.parseMasterPlaylist(w,M),_=L.levels,b=L.sessionData;if(!_.length){this.handleManifestParsingError(l,i,"no level found in manifest",R);return}var g=_.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(w,M,"AUDIO",g),x=n.default.parseMasterPlaylistMedia(w,M,"SUBTITLES",h),m=n.default.parseMasterPlaylistMedia(w,M,"CLOSED-CAPTIONS");if(C.length){var P=C.some(function(k){return!k.url});!P&&_[0].audioCodec&&!_[0].attrs.AUDIO&&(G.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 v.AttrList({}),bitrate:0,url:""}))}O.trigger(W.Events.MANIFEST_LOADED,{levels:_,audioTracks:C,subtitles:x,captions:m,url:M,stats:a,networkDetails:R,sessionData:b})},d.handleTrackOrLevelPlaylist=function(l,a,i,R){var O=this.hls,w=i.id,M=i.level,L=i.type,_=p(l,i),b=Object(Y.isFiniteNumber)(w)?w:0,g=Object(Y.isFiniteNumber)(M)?M:b,h=f(i),C=n.default.parseLevelPlaylist(l.data,_,g,h,b);if(!C.fragments.length){O.trigger(W.Events.ERROR,{type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:_,reason:"no fragments found in level",level:typeof i.level=="number"?i.level:void 0});return}if(L===T.PlaylistContextType.MANIFEST){var x={attrs:new v.AttrList({}),bitrate:0,details:C,name:"",url:_};O.trigger(W.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:_,stats:a,networkDetails:R,sessionData:null})}if(a.parsing.end=performance.now(),C.needSidxRanges){var m,P=(m=C.fragments[0].initSegment)===null||m===void 0?void 0:m.url;this.load({url:P,isSidxRequest:!0,type:L,level:M,levelDetails:C,id:w,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}i.levelDetails=C,this.handlePlaylistLoaded(l,a,i,R)},d.handleSidxRequest=function(l,a){var i=Object(j.parseSegmentIndex)(new Uint8Array(l.data));if(!i)return;var R=i.references,O=a.levelDetails;R.forEach(function(w,M){var L=w.info,_=O.fragments[M];_.byteRange.length===0&&_.setByteRange(String(1+L.end-L.start)+"@"+String(L.start)),_.initSegment&&_.initSegment.setByteRange(String(i.moovEndOffset)+"@0")})},d.handleManifestParsingError=function(l,a,i,R){this.hls.trigger(W.Events.ERROR,{type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:a.type===T.PlaylistContextType.MANIFEST,url:l.url,reason:i,response:l,context:a,networkDetails:R})},d.handleNetworkError=function(l,a,i,R){i===void 0&&(i=!1),G.logger.warn("[playlist-loader]: A network "+(i?"timeout":"error")+" occurred while loading "+l.type+" level: "+l.level+" id: "+l.id+' group-id: "'+l.groupId+'"');var O=D.ErrorDetails.UNKNOWN,w=!1,M=this.getInternalLoader(l);switch(l.type){case T.PlaylistContextType.MANIFEST:O=i?D.ErrorDetails.MANIFEST_LOAD_TIMEOUT:D.ErrorDetails.MANIFEST_LOAD_ERROR,w=!0;break;case T.PlaylistContextType.LEVEL:O=i?D.ErrorDetails.LEVEL_LOAD_TIMEOUT:D.ErrorDetails.LEVEL_LOAD_ERROR,w=!1;break;case T.PlaylistContextType.AUDIO_TRACK:O=i?D.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:D.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,w=!1;break;case T.PlaylistContextType.SUBTITLE_TRACK:O=i?D.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:D.ErrorDetails.SUBTITLE_LOAD_ERROR,w=!1;break}M&&this.resetInternalLoader(l.type);var L={type:D.ErrorTypes.NETWORK_ERROR,details:O,fatal:w,url:l.url,loader:M,context:l,networkDetails:a};R&&(L.response=R),this.hls.trigger(W.Events.ERROR,L)},d.handlePlaylistLoaded=function(l,a,i,R){var O=i.type,w=i.level,M=i.id,L=i.groupId,_=i.loader,b=i.levelDetails,g=i.deliveryDirectives;if(!(b!=null&&b.targetduration)){this.handleManifestParsingError(l,i,"invalid target duration",R);return}if(!_)return;b.live&&(_.getCacheAge&&(b.ageHeader=_.getCacheAge()||0),(!_.getCacheAge||isNaN(b.ageHeader))&&(b.ageHeader=0));switch(O){case T.PlaylistContextType.MANIFEST:case T.PlaylistContextType.LEVEL:this.hls.trigger(W.Events.LEVEL_LOADED,{details:b,level:w||0,id:M||0,stats:a,networkDetails:R,deliveryDirectives:g});break;case T.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(W.Events.AUDIO_TRACK_LOADED,{details:b,id:M||0,groupId:L||"",stats:a,networkDetails:R,deliveryDirectives:g});break;case T.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(W.Events.SUBTITLE_TRACK_LOADED,{details:b,id:M||0,groupId:L||"",stats:a,networkDetails:R,deliveryDirectives:g});break}},s}();z.default=c},"./src/polyfills/number.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"isFiniteNumber",function(){return Y}),N.d(z,"MAX_SAFE_INTEGER",function(){return W});var Y=Number.isFinite||function(D){return typeof D=="number"&&isFinite(D)},W=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(Z,z,N){"use strict";N.r(z);var Y=function(){function W(){}return W.getSilentFrame=function(G,j){switch(G){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}();z.default=Y},"./src/remux/mp4-generator.ts":function(Z,z,N){"use strict";N.r(z);var Y=Math.pow(2,32)-1,W=function(){function D(){}return D.init=function(){D.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 D.types)D.types.hasOwnProperty(j)&&(D.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]),T=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]);D.HDLR_TYPES={video:n,audio:T};var v=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]);D.STTS=D.STSC=D.STCO=f,D.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),D.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),D.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),D.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]),s=new Uint8Array([0,0,0,1]);D.FTYP=D.box(D.types.ftyp,p,s,p,c),D.DINF=D.box(D.types.dinf,D.box(D.types.dref,v))},D.box=function(j){for(var n=8,T=arguments.length,v=new Array(T>1?T-1:0),f=1;f<T;f++)v[f-1]=arguments[f];for(var p=v.length,c=p;p--;)n+=v[p].byteLength;var s=new Uint8Array(n);for(s[0]=n>>24&255,s[1]=n>>16&255,s[2]=n>>8&255,s[3]=n&255,s.set(j,4),p=0,n=8;p<c;p++)s.set(v[p],n),n+=v[p].byteLength;return s},D.hdlr=function(j){return D.box(D.types.hdlr,D.HDLR_TYPES[j])},D.mdat=function(j){return D.box(D.types.mdat,j)},D.mdhd=function(j,n){n*=j;var T=Math.floor(n/(Y+1)),v=Math.floor(n%(Y+1));return D.box(D.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,T>>24,T>>16&255,T>>8&255,T&255,v>>24,v>>16&255,v>>8&255,v&255,85,196,0,0]))},D.mdia=function(j){return D.box(D.types.mdia,D.mdhd(j.timescale,j.duration),D.hdlr(j.type),D.minf(j))},D.mfhd=function(j){return D.box(D.types.mfhd,new Uint8Array([0,0,0,0,j>>24,j>>16&255,j>>8&255,j&255]))},D.minf=function(j){return j.type==="audio"?D.box(D.types.minf,D.box(D.types.smhd,D.SMHD),D.DINF,D.stbl(j)):D.box(D.types.minf,D.box(D.types.vmhd,D.VMHD),D.DINF,D.stbl(j))},D.moof=function(j,n,T){return D.box(D.types.moof,D.mfhd(j),D.traf(T,n))},D.moov=function(j){for(var n=j.length,T=[];n--;)T[n]=D.trak(j[n]);return D.box.apply(null,[D.types.moov,D.mvhd(j[0].timescale,j[0].duration)].concat(T).concat(D.mvex(j)))},D.mvex=function(j){for(var n=j.length,T=[];n--;)T[n]=D.trex(j[n]);return D.box.apply(null,[D.types.mvex].concat(T))},D.mvhd=function(j,n){n*=j;var T=Math.floor(n/(Y+1)),v=Math.floor(n%(Y+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,T>>24,T>>16&255,T>>8&255,T&255,v>>24,v>>16&255,v>>8&255,v&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return D.box(D.types.mvhd,f)},D.sdtp=function(j){var n=j.samples||[],T=new Uint8Array(4+n.length),v,f;for(v=0;v<n.length;v++)f=n[v].flags,T[v+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return D.box(D.types.sdtp,T)},D.stbl=function(j){return D.box(D.types.stbl,D.stsd(j),D.box(D.types.stts,D.STTS),D.box(D.types.stsc,D.STSC),D.box(D.types.stsz,D.STSZ),D.box(D.types.stco,D.STCO))},D.avc1=function(j){var n=[],T=[],v,f,p;for(v=0;v<j.sps.length;v++)f=j.sps[v],p=f.byteLength,n.push(p>>>8&255),n.push(p&255),n=n.concat(Array.prototype.slice.call(f));for(v=0;v<j.pps.length;v++)f=j.pps[v],p=f.byteLength,T.push(p>>>8&255),T.push(p&255),T=T.concat(Array.prototype.slice.call(f));var c=D.box(D.types.avcC,new Uint8Array([1,n[3],n[4],n[5],252|3,224|j.sps.length].concat(n).concat([j.pps.length]).concat(T))),s=j.width,d=j.height,u=j.pixelRatio[0],l=j.pixelRatio[1];return D.box(D.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,s>>8&255,s&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,D.box(D.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),D.box(D.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,u&255,l>>24,l>>16&255,l>>8&255,l&255])))},D.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]))},D.mp4a=function(j){var n=j.samplerate;return D.box(D.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]),D.box(D.types.esds,D.esds(j)))},D.mp3=function(j){var n=j.samplerate;return D.box(D.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]))},D.stsd=function(j){return j.type==="audio"?!j.isAAC&&j.codec==="mp3"?D.box(D.types.stsd,D.STSD,D.mp3(j)):D.box(D.types.stsd,D.STSD,D.mp4a(j)):D.box(D.types.stsd,D.STSD,D.avc1(j))},D.tkhd=function(j){var n=j.id,T=j.duration*j.timescale,v=j.width,f=j.height,p=Math.floor(T/(Y+1)),c=Math.floor(T%(Y+1));return D.box(D.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,v>>8&255,v&255,0,0,f>>8&255,f&255,0,0]))},D.traf=function(j,n){var T=D.sdtp(j),v=j.id,f=Math.floor(n/(Y+1)),p=Math.floor(n%(Y+1));return D.box(D.types.traf,D.box(D.types.tfhd,new Uint8Array([0,0,0,0,v>>24,v>>16&255,v>>8&255,v&255])),D.box(D.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])),D.trun(j,T.length+16+20+8+16+8+8),T)},D.trak=function(j){return j.duration=j.duration||4294967295,D.box(D.types.trak,D.tkhd(j),D.mdia(j))},D.trex=function(j){var n=j.id;return D.box(D.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]))},D.trun=function(j,n){var T=j.samples||[],v=T.length,f=12+16*v,p=new Uint8Array(f),c,s,d,u,l,a;for(n+=8+f,p.set([0,0,15,1,v>>>24&255,v>>>16&255,v>>>8&255,v&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255],0),c=0;c<v;c++)s=T[c],d=s.duration,u=s.size,l=s.flags,a=s.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,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.paddingValue<<1|l.isNonSync,l.degradPrio&240<<8,l.degradPrio&15,a>>>24&255,a>>>16&255,a>>>8&255,a&255],12+16*c);return D.box(D.types.trun,p)},D.initSegment=function(j){D.types||D.init();var n=D.moov(j),T=new Uint8Array(D.FTYP.byteLength+n.byteLength);return T.set(D.FTYP),T.set(n,D.FTYP.byteLength),T},D}();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,z.default=W},"./src/remux/mp4-remuxer.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return a}),N.d(z,"normalizePts",function(){return i});var Y=N("./src/polyfills/number.ts"),W=N("./src/remux/aac-helper.ts"),D=N("./src/remux/mp4-generator.ts"),G=N("./src/events.ts"),j=N("./src/errors.ts"),n=N("./src/utils/logger.ts"),T=N("./src/types/loader.ts"),v=N("./src/utils/timescale-conversion.ts");function f(){return f=Object.assign||function(M){for(var L=1;L<arguments.length;L++){var _=arguments[L];for(var b in _)Object.prototype.hasOwnProperty.call(_,b)&&(M[b]=_[b])}return M},f.apply(this,arguments)}var p=10*1e3,c=1024,s=1152,d=null,u=null,l=!1,a=function(){function M(_,b,g,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=g,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 m=navigator.userAgent.match(/Safari\/(\d+)/i);u=m?parseInt(m[1]):0}l=!!d&&d<75||!!u&&u<600}var L=M.prototype;return L.destroy=function(){},L.resetTimeStamp=function(b){n.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=b},L.resetNextTimestamp=function(){n.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},L.resetInitSegment=function(){n.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},L.getVideoStartPts=function(b){var g=!1,h=b.reduce(function(C,x){var m=x.pts-C;return m<-4294967296?(g=!0,i(C,x.pts)):m>0?C:x.pts},b[0].pts);return g&&n.logger.debug("PTS rollover detected"),h},L.remux=function(b,g,h,C,x,m,P,k){var y,S,F,A,X,ne,fe=x,ye=x,Pe=b.pid>-1,xe=g.pid>-1,Ie=g.samples.length,Me=b.samples.length>0,ke=Ie>1,Ee=(!Pe||Me)&&(!xe||ke)||this.ISGenerated||P;if(Ee){this.ISGenerated||(F=this.generateIS(b,g,x));var J=this.isVideoContiguous,I=-1;if(ke&&(I=R(g.samples),!J&&this.config.forceKeyFrameOnDiscontinuity))if(ne=!0,I>0){n.logger.warn("[mp4-remuxer]: Dropped "+I+" out of "+Ie+" video samples due to a missing keyframe");var U=this.getVideoStartPts(g.samples);g.samples=g.samples.slice(I),g.dropped+=I,ye+=(g.samples[0].pts-U)/(g.timescale||9e4)}else I===-1&&(n.logger.warn("[mp4-remuxer]: No keyframe found out of "+Ie+" video samples"),ne=!1);if(this.ISGenerated){if(Me&&ke){var K=this.getVideoStartPts(g.samples),q=i(b.samples[0].pts,K)-K,V=q/g.inputTimeScale;fe+=Math.max(0,V),ye+=Math.max(0,-V)}if(Me){if(b.samplerate||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),F=this.generateIS(b,g,x)),S=this.remuxAudio(b,fe,this.isAudioContiguous,m,xe||ke||k===T.PlaylistLevelType.AUDIO?ye:void 0),ke){var ue=S?S.endPTS-S.startPTS:0;g.inputTimeScale||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),F=this.generateIS(b,g,x)),y=this.remuxVideo(g,ye,J,ue)}}else ke&&(y=this.remuxVideo(g,ye,J,0));y&&(y.firstKeyFrame=I,y.independent=I!==-1)}}return this.ISGenerated&&(h.samples.length&&(X=this.remuxID3(h,x)),C.samples.length&&(A=this.remuxText(C,x))),{audio:S,video:y,initSegment:F,independent:ne,text:A,id3:X}},L.generateIS=function(b,g,h){var C=b.samples,x=g.samples,m=this.typeSupported,P={},k=!Object(Y.isFiniteNumber)(this._initPTS),y="audio/mp4",S,F,A;if(k&&(S=F=Infinity),b.config&&C.length&&(b.timescale=b.samplerate,b.isAAC||(m.mpeg?(y="audio/mpeg",b.codec=""):m.mp3&&(b.codec="mp3")),P.audio={id:"audio",container:y,codec:b.codec,initSegment:!b.isAAC&&m.mpeg?new Uint8Array(0):D.default.initSegment([b]),metadata:{channelCount:b.channelCount}},k&&(A=b.inputTimeScale,S=F=C[0].pts-Math.round(A*h))),g.sps&&g.pps&&x.length&&(g.timescale=g.inputTimeScale,P.video={id:"main",container:"video/mp4",codec:g.codec,initSegment:D.default.initSegment([g]),metadata:{width:g.width,height:g.height}},k)){A=g.inputTimeScale;var X=this.getVideoStartPts(x),ne=Math.round(A*h);F=Math.min(F,i(x[0].dts,X)-ne),S=Math.min(S,X-ne)}if(Object.keys(P).length)return this.ISGenerated=!0,k&&(this._initPTS=S,this._initDTS=F),{tracks:P,initPTS:S,timescale:A}},L.remuxVideo=function(b,g,h,C){var x=b.inputTimeScale,m=b.samples,P=[],k=m.length,y=this._initPTS,S=this.nextAvcDts,F=8,A,X,ne,fe=Number.POSITIVE_INFINITY,ye=Number.NEGATIVE_INFINITY,Pe=0,xe=!1;if(!h||S===null){var Ie=g*x,Me=m[0].pts-i(m[0].dts,m[0].pts);S=Ie-Me}for(var ke=0;ke<k;ke++){var Ee=m[ke];if(Ee.pts=i(Ee.pts-y,S),Ee.dts=i(Ee.dts-y,S),Ee.dts>Ee.pts){var J=9e4*.2;Pe=Math.max(Math.min(Pe,Ee.pts-Ee.dts),-1*J)}Ee.dts<m[ke>0?ke-1:ke].dts&&(xe=!0)}xe&&m.sort(function(ft,ze){var Qe=ft.dts-ze.dts,He=ft.pts-ze.pts;return Qe||He}),X=m[0].dts,ne=m[m.length-1].dts;var I=Math.round((ne-X)/(k-1));if(Pe<0){if(Pe<I*-2){n.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(v.toMsFromMpegTsClock)(-I,!0)+" ms");for(var U=Pe,K=0;K<k;K++)m[K].dts=U=Math.max(U,m[K].pts-I),m[K].pts=Math.max(U,m[K].pts)}else{n.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(v.toMsFromMpegTsClock)(Pe,!0)+" ms to overcome this issue");for(var q=0;q<k;q++)m[q].dts=m[q].dts+Pe}X=m[0].dts}if(h){var V=X-S,ue=V>I,Ae=V<-1;if(ue||Ae){ue?n.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(V,!0)+" ms ("+V+"dts) hole between fragments detected, filling it"):n.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(-V,!0)+" ms ("+V+"dts) overlapping between fragments detected"),X=S;var Ue=m[0].pts-V;m[0].dts=X,m[0].pts=Ue,n.logger.log("Video: First PTS/DTS adjusted: "+Object(v.toMsFromMpegTsClock)(Ue,!0)+"/"+Object(v.toMsFromMpegTsClock)(X,!0)+", delta: "+Object(v.toMsFromMpegTsClock)(V,!0)+" ms")}}l&&(X=Math.max(0,X));for(var ce=0,ge=0,Te=0;Te<k;Te++){for(var Oe=m[Te],Xe=Oe.units,rt=Xe.length,st=0,nt=0;nt<rt;nt++)st+=Xe[nt].data.length;ge+=st,ce+=rt,Oe.length=st,Oe.dts=Math.max(Oe.dts,X),Oe.pts=Math.max(Oe.pts,Oe.dts,0),fe=Math.min(Oe.pts,fe),ye=Math.max(Oe.pts,ye)}ne=m[k-1].dts;var bt=ge+4*ce+8,yt;try{yt=new Uint8Array(bt)}catch(ft){this.observer.emit(G.Events.ERROR,G.Events.ERROR,{type:j.ErrorTypes.MUX_ERROR,details:j.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:bt,reason:"fail allocating video mdat "+bt});return}var Ne=new DataView(yt.buffer);Ne.setUint32(0,bt),yt.set(D.default.types.mdat,4);for(var Re=0;Re<k;Re++){for(var Je=m[Re],tt=Je.units,le=0,$=0,te=tt.length;$<te;$++){var ae=tt[$],de=ae.data,ie=ae.data.byteLength;Ne.setUint32(F,ie),F+=4,yt.set(de,F),F+=ie,le+=4+ie}if(Re<k-1)A=m[Re+1].dts-Je.dts;else{var se=this.config,pe=Je.dts-m[Re>0?Re-1:Re].dts;if(se.stretchShortVideoTrack&&this.nextAudioPts!==null){var be=Math.floor(se.maxBufferHole*x),_e=(C?fe+C*x:this.nextAudioPts)-Je.pts;_e>be?(A=_e-pe,A<0&&(A=pe),n.logger.log("[mp4-remuxer]: It is approximately "+_e/90+" ms to the next segment; using duration "+A/90+" ms for the last video frame.")):A=pe}else A=pe}var Le=Math.round(Je.pts-Je.dts);P.push(new O(Je.key,A,le,Le))}if(P.length&&d&&d<70){var Ye=P[0].flags;Ye.dependsOn=2,Ye.isNonSync=0}console.assert(A!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=S=ne+A,this.isVideoContiguous=!0;var lt=D.default.moof(b.sequenceNumber++,X,f({},b,{samples:P})),Et="video",vt={data1:lt,data2:yt,startPTS:fe/x,endPTS:(ye+A)/x,startDTS:X/x,endDTS:S/x,type:Et,hasAudio:!1,hasVideo:!0,nb:P.length,dropped:b.dropped};return b.samples=[],b.dropped=0,console.assert(yt.length,"MDAT length must not be zero"),vt},L.remuxAudio=function(b,g,h,C,x){var m=b.inputTimeScale,P=b.samplerate?b.samplerate:m,k=m/P,y=b.isAAC?c:s,S=y*k,F=this._initPTS,A=!b.isAAC&&this.typeSupported.mpeg,X=[],ne=b.samples,fe=A?0:8,ye=this.nextAudioPts||-1,Pe=g*m;if(this.isAudioContiguous=h=h||ne.length&&ye>0&&(C&&Math.abs(Pe-ye)<9e3||Math.abs(i(ne[0].pts-F,Pe)-ye)<20*S),ne.forEach(function(de){de.pts=i(de.pts-F,Pe)}),!h||ye<0){if(ne=ne.filter(function(de){return de.pts>=0}),!ne.length)return;x===0?ye=0:C?ye=Math.max(0,Pe):ye=ne[0].pts}if(b.isAAC)for(var xe=x!==void 0,Ie=this.config.maxAudioFramesDrift,Me=0,ke=ye;Me<ne.length;Me++){var Ee=ne[Me],J=Ee.pts,I=J-ke,U=Math.abs(1e3*I/m);if(I<=-Ie*S&&xe)Me===0&&(n.logger.warn("Audio frame @ "+(J/m).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*I/m)+" ms."),this.nextAudioPts=ye=ke=J);else if(I>=Ie*S&&U<p&&xe){var K=Math.round(I/S);ke=J-K*S,ke<0&&(K--,ke+=S),Me===0&&(this.nextAudioPts=ye=ke),n.logger.warn("[mp4-remuxer]: Injecting "+K+" audio frame @ "+(ke/m).toFixed(3)+"s due to "+Math.round(1e3*I/m)+" ms gap.");for(var q=0;q<K;q++){var V=Math.max(ke,0),ue=W.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);ue||(n.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ue=Ee.unit.subarray()),ne.splice(Me,0,{unit:ue,pts:V}),ke+=S,Me++}}Ee.pts=ke,ke+=S}for(var Ae=null,Ue=null,ce,ge=0,Te=ne.length;Te--;)ge+=ne[Te].unit.byteLength;for(var Oe=0,Xe=ne.length;Oe<Xe;Oe++){var rt=ne[Oe],st=rt.unit,nt=rt.pts;if(Ue!==null){var bt=X[Oe-1];bt.duration=Math.round((nt-Ue)/k)}else if(h&&b.isAAC&&(nt=ye),Ae=nt,ge>0){ge+=fe;try{ce=new Uint8Array(ge)}catch(de){this.observer.emit(G.Events.ERROR,G.Events.ERROR,{type:j.ErrorTypes.MUX_ERROR,details:j.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ge,reason:"fail allocating audio mdat "+ge});return}if(!A){var yt=new DataView(ce.buffer);yt.setUint32(0,ge),ce.set(D.default.types.mdat,4)}}else return;ce.set(st,fe);var Ne=st.byteLength;fe+=Ne,X.push(new O(!0,y,Ne,0)),Ue=nt}var Re=X.length;if(!Re)return;var Je=X[X.length-1];this.nextAudioPts=ye=Ue+k*Je.duration;var tt=A?new Uint8Array(0):D.default.moof(b.sequenceNumber++,Ae/k,f({},b,{samples:X}));b.samples=[];var le=Ae/m,$=ye/m,te="audio",ae={data1:tt,data2:ce,startPTS:le,endPTS:$,startDTS:le,endDTS:$,type:te,hasAudio:!0,hasVideo:!1,nb:Re};return this.isAudioContiguous=!0,console.assert(ce.length,"MDAT length must not be zero"),ae},L.remuxEmptyAudio=function(b,g,h,C){var x=b.inputTimeScale,m=b.samplerate?b.samplerate:x,P=x/m,k=this.nextAudioPts,y=(k!==null?k:C.startDTS*x)+this._initDTS,S=C.endDTS*x+this._initDTS,F=P*c,A=Math.ceil((S-y)/F),X=W.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);if(n.logger.warn("[mp4-remuxer]: remux empty Audio"),!X){n.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ne=[],fe=0;fe<A;fe++){var ye=y+fe*F;ne.push({unit:X,pts:ye,dts:ye})}return b.samples=ne,this.remuxAudio(b,g,h,!1)},L.remuxID3=function(b,g){var h=b.samples.length;if(!h)return;for(var C=b.inputTimeScale,x=this._initPTS,m=this._initDTS,P=0;P<h;P++){var k=b.samples[P];k.pts=i(k.pts-x,g*C)/C,k.dts=i(k.dts-m,g*C)/C}var y=b.samples;return b.samples=[],{samples:y}},L.remuxText=function(b,g){var h=b.samples.length;if(!h)return;for(var C=b.inputTimeScale,x=this._initPTS,m=0;m<h;m++){var P=b.samples[m];P.pts=i(P.pts-x,g*C)/C}b.samples.sort(function(y,S){return y.pts-S.pts});var k=b.samples;return b.samples=[],{samples:k}},M}();function i(M,L){var _;if(L===null)return M;for(L<M?_=-8589934592:_=8589934592;Math.abs(M-L)>4294967296;)M+=_;return M}function R(M){for(var L=0;L<M.length;L++)if(M[L].key)return L;return-1}var O=function(L,_,b,g){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=_,this.size=b,this.cts=g,this.flags=new w(L)},w=function(L){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=L?2:1,this.isNonSync=L?0:1}},"./src/remux/passthrough-remuxer.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/polyfills/number.ts"),W=N("./src/utils/mp4-tools.ts"),D=N("./src/loader/fragment.ts"),G=N("./src/utils/logger.ts"),j=function(){function v(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var f=v.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,s,d){this.audioCodec=s,this.videoCodec=d,this.generateInitSegment(c),this.emitInitSegment=!0},f.generateInitSegment=function(c){var s=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);s||(s=T(u.audio,D.ElementaryStreamTypes.AUDIO)),d||(d=T(u.video,D.ElementaryStreamTypes.VIDEO));var l={};u.audio&&u.video?l.audiovideo={container:"video/mp4",codec:s+","+d,initSegment:c,id:"main"}:u.audio?l.audio={container:"audio/mp4",codec:s,initSegment:c,id:"audio"}:u.video?l.video={container:"video/mp4",codec:d,initSegment:c,id:"main"}:G.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=l},f.remux=function(c,s,d,u,l){var a=this.initPTS,i=this.lastEndDTS,R={audio:void 0,video:void 0,text:u,id3:d,initSegment:void 0};Object(Y.isFiniteNumber)(i)||(i=this.lastEndDTS=l||0);var O=s.samples;if(!O||!O.length)return R;var w={initPTS:void 0,timescale:1},M=this.initData;if((!M||!M.length)&&(this.generateInitSegment(O),M=this.initData),!M||!M.length)return G.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),R;this.emitInitSegment&&(w.tracks=this.initTracks,this.emitInitSegment=!1),Object(Y.isFiniteNumber)(a)||(this.initPTS=w.initPTS=a=n(M,O,i));var L=Object(W.getDuration)(O,M),_=i,b=L+_;Object(W.offsetStartDTS)(M,O,a),L>0?this.lastEndDTS=b:(G.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var g=!!M.audio,h=!!M.video,C="";g&&(C+="audio"),h&&(C+="video");var x={data1:O,startPTS:_,startDTS:_,endPTS:b,endDTS:b,type:C,hasAudio:g,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=w,R},v}(),n=function(f,p,c){return Object(W.getStartDTS)(f,p)-c};function T(v,f){var p=v==null?void 0:v.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||f===D.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}z.default=j},"./src/task-loop.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return Y});var Y=function(){function W(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var D=W.prototype;return D.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},D.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},D.onHandlerDestroyed=function(){},D.hasInterval=function(){return!!this._tickInterval},D.hasNextTick=function(){return!!this._tickTimer},D.setInterval=function(j){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,j),!0)},D.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},D.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},D.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},D.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},D.doTick=function(){},W}()},"./src/types/cmcd.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"CMCDVersion",function(){return Y}),N.d(z,"CMCDObjectType",function(){return W}),N.d(z,"CMCDStreamingFormat",function(){return D}),N.d(z,"CMCDStreamType",function(){return G});var Y=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 D;(function(j){j.DASH="d",j.HLS="h",j.SMOOTH="s",j.OTHER="o"})(D||(D={}));var G;(function(j){j.VOD="v",j.LIVE="l"})(G||(G={}))},"./src/types/level.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"HlsSkip",function(){return D}),N.d(z,"getSkipValue",function(){return G}),N.d(z,"HlsUrlParameters",function(){return j}),N.d(z,"Level",function(){return n});function Y(T,v){for(var f=0;f<v.length;f++){var p=v[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(T,p.key,p)}}function W(T,v,f){return v&&Y(T.prototype,v),f&&Y(T,f),T}var D;(function(T){T.No="",T.Yes="YES",T.v2="v2"})(D||(D={}));function G(T,v){var f=T.canSkipUntil,p=T.canSkipDateRanges,c=T.endSN,s=v!==void 0?v-c:0;return f&&s<f?p?D.v2:D.Yes:D.No}var j=function(){function T(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 v=T.prototype;return v.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()},T}(),n=function(){function T(v){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[v.url],this.attrs=v.attrs,this.bitrate=v.bitrate,v.details&&(this.details=v.details),this.id=v.id||0,this.name=v.name,this.width=v.width||0,this.height=v.height||0,this.audioCodec=v.audioCodec,this.videoCodec=v.videoCodec,this.unknownCodecs=v.unknownCodecs,this.codecSet=[v.videoCodec,v.audioCodec].filter(function(f){return f}).join(",").replace(/\.[^.,]+/g,"")}return W(T,[{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)}}]),T}()},"./src/types/loader.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"PlaylistContextType",function(){return Y}),N.d(z,"PlaylistLevelType",function(){return W});var Y;(function(D){D.MANIFEST="manifest",D.LEVEL="level",D.AUDIO_TRACK="audioTrack",D.SUBTITLE_TRACK="subtitleTrack"})(Y||(Y={}));var W;(function(D){D.MAIN="main",D.AUDIO="audio",D.SUBTITLE="subtitle"})(W||(W={}))},"./src/types/transmuxer.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"ChunkMetadata",function(){return Y});var Y=function(G,j,n,T,v,f){T===void 0&&(T=0),v===void 0&&(v=-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=G,this.sn=j,this.id=n,this.size=T,this.part=v,this.partial=f};function W(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"AttrList",function(){return D});var Y=/^(\d+)x(\d+)$/,W=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,D=function(){function G(n){typeof n=="string"&&(n=G.parseAttrList(n));for(var T in n)n.hasOwnProperty(T)&&(this[T]=n[T])}var j=G.prototype;return j.decimalInteger=function(T){var v=parseInt(this[T],10);return v>Number.MAX_SAFE_INTEGER?Infinity:v},j.hexadecimalInteger=function(T){if(this[T]){var v=(this[T]||"0x").slice(2);v=(v.length&1?"0":"")+v;for(var f=new Uint8Array(v.length/2),p=0;p<v.length/2;p++)f[p]=parseInt(v.slice(p*2,p*2+2),16);return f}else return null},j.hexadecimalIntegerAsNumber=function(T){var v=parseInt(this[T],16);return v>Number.MAX_SAFE_INTEGER?Infinity:v},j.decimalFloatingPoint=function(T){return parseFloat(this[T])},j.optionalFloat=function(T,v){var f=this[T];return f?parseFloat(f):v},j.enumeratedString=function(T){return this[T]},j.bool=function(T){return this[T]==="YES"},j.decimalResolution=function(T){var v=Y.exec(this[T]);return v===null?void 0:{width:parseInt(v[1],10),height:parseInt(v[2],10)}},G.parseAttrList=function(T){var v,f={},p='"';for(W.lastIndex=0;(v=W.exec(T))!==null;){var c=v[2];c.indexOf(p)===0&&c.lastIndexOf(p)===c.length-1&&(c=c.slice(1,-1)),f[v[1]]=c}return f},G}()},"./src/utils/binary-search.ts":function(Z,z,N){"use strict";N.r(z);var Y={search:function(D,G){for(var j=0,n=D.length-1,T=null,v=null;j<=n;){T=(j+n)/2|0,v=D[T];var f=G(v);if(f>0)j=T+1;else if(f<0)n=T-1;else return v}return null}};z.default=Y},"./src/utils/buffer-helper.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"BufferHelper",function(){return D});var Y=N("./src/utils/logger.ts"),W={length:0,start:function(){return 0},end:function(){return 0}},D=function(){function G(){}return G.isBuffered=function(n,T){try{if(n){for(var v=G.getBuffered(n),f=0;f<v.length;f++)if(T>=v.start(f)&&T<=v.end(f))return!0}}catch(p){}return!1},G.bufferInfo=function(n,T,v){try{if(n){var f=G.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,T,v)}}catch(s){}return{len:0,start:T,end:T,nextStart:void 0}},G.bufferedInfo=function(n,T,v){T=Math.max(0,T),n.sort(function(w,M){var L=w.start-M.start;return L||M.end-w.end});var f=[];if(v)for(var p=0;p<n.length;p++){var c=f.length;if(c){var s=f[c-1].end;n[p].start-s<v?n[p].end>s&&(f[c-1].end=n[p].end):f.push(n[p])}else f.push(n[p])}else f=n;for(var d=0,u,l=T,a=T,i=0;i<f.length;i++){var R=f[i].start,O=f[i].end;if(T+v>=R&&T<O)l=R,a=O,d=a-T;else if(T+v<R){u=R;break}}return{len:d,start:l||0,end:a||0,nextStart:u}},G.getBuffered=function(n){try{return n.buffered}catch(T){return Y.logger.log("failed to get media.buffered",T),W}},G}()},"./src/utils/cea-608-parser.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"Row",function(){return a}),N.d(z,"CaptionScreen",function(){return i});var Y=N("./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},D=function(b){var g=b;return W.hasOwnProperty(b)&&(g=W[b]),String.fromCharCode(g)},G=15,j=100,n={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},T={17:2,18:4,21:6,22:8,23:10,19:13,20:15},v={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},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 s=function(){function _(){this.time=null,this.verboseLevel=c.ERROR}var b=_.prototype;return b.log=function(h,C){this.verboseLevel>=h&&Y.logger.log(this.time+" ["+h+"] "+C)},_}(),d=function(b){for(var g=[],h=0;h<b.length;h++)g.push(b[h].toString(16));return g},u=function(){function _(g,h,C,x,m){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=g||"white",this.underline=h||!1,this.italics=C||!1,this.background=x||"black",this.flash=m||!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 m=C[x];h.hasOwnProperty(m)&&(this[m]=h[m])}},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},_}(),l=function(){function _(g,h,C,x,m,P){this.uchar=void 0,this.penState=void 0,this.uchar=g||" ",this.penState=new u(h,C,x,m,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()},_}(),a=function(){function _(g){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 l);this.logger=g,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=D(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 m=this.chars[x].uchar;m!==" "&&(C=!1),h.push(m)}return C?"":h.join("")},b.setPenStyles=function(h){this.currPenState.setStyles(h);var C=this.chars[this.pos];C.setPenState(this.currPenState)},_}(),i=function(){function _(g){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<G;h++)this.rows.push(new a(g));this.logger=g,this.currRow=G-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var b=_.prototype;return b.reset=function(){for(var h=0;h<G;h++)this.rows[h].clear();this.currRow=G-1},b.equals=function(h){for(var C=!0,x=0;x<G;x++)if(!this.rows[x].equals(h.rows[x])){C=!1;break}return C},b.copy=function(h){for(var C=0;C<G;C++)this.rows[C].copy(h.rows[C])},b.isEmpty=function(){for(var h=!0,C=0;C<G;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<G;x++)this.rows[x].clear();var m=this.currRow+1-this.nrRollUpRows,P=this.lastOutputScreen;if(P){var k=P.rows[m].cueStartTime,y=this.logger.time;if(k&&y!==null&&k<y)for(var S=0;S<this.nrRollUpRows;S++)this.rows[C-this.nrRollUpRows+S+1].copy(P.rows[m+S])}}this.currRow=C;var F=this.rows[this.currRow];if(h.indent!==null){var A=h.indent,X=Math.max(A-1,0);F.setCursor(h.indent),h.color=F.chars[X].penState.foreground}var ne={foreground:h.color,underline:h.underline,italics:h.italics,background:"black",flash:!1};this.setPen(ne)},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="",m=-1,P=0;P<G;P++){var k=this.rows[P].getTextString();k&&(m=P+1,h?C.push("Row "+m+": '"+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 _(g,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=g,this.outputFilter=h,this.mode=null,this.verbose=0,this.displayedMemory=new i(C),this.nonDisplayedMemory=new i(C),this.lastOutputScreen=new i(C),this.currRollUpRow=this.displayedMemory.rows[G-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[G-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,m=["white","green","blue","cyan","red","yellow","magenta"];C.foreground=m[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 _(g,h,C){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var x=new s;this.channels=[null,new R(g,h,x),new R(g+1,C,x)],this.cmdHistory=L(),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,m,P,k=!1;this.logger.time=h;for(var y=0;y<C.length;y+=2){if(m=C[y]&127,P=C[y+1]&127,m===0&&P===0)continue;if(this.logger.log(c.DATA,"["+d([C[y],C[y+1]])+"] -> ("+d([m,P])+")"),x=this.parseCmd(m,P),x||(x=this.parseMidrow(m,P)),x||(x=this.parsePAC(m,P)),x||(x=this.parseBackgroundAttributes(m,P)),!x&&(k=this.parseChars(m,P),k)){var S=this.currentChannel;if(S&&S>0){var F=this.channels[S];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([m,P])+" orig: "+d([C[y],C[y+1]]))}},b.parseCmd=function(h,C){var x=this.cmdHistory,m=(h===20||h===28||h===21||h===29)&&C>=32&&C<=47,P=(h===23||h===31)&&C>=33&&C<=35;if(!(m||P))return!1;if(M(h,C,x))return w(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),w(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 m=this.channels[x];return m?(m.ccMIDROW(C),this.logger.log(c.DEBUG,"MIDROW ("+d([h,C])+")"),!0):!1}return!1},b.parsePAC=function(h,C){var x,m=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(M(h,C,m))return w(null,null,m),!0;var y=h<=23?1:2;C>=64&&C<=95?x=y===1?n[h]:v[h]:x=y===1?T[h]:f[h];var S=this.channels[y];return S?(S.setPAC(this.interpretPAC(x,C)),w(h,C,m),this.currentChannel=y,!0):!1},b.interpretPAC=function(h,C){var x,m={color:null,italics:!1,indent:null,underline:!1,row:h};return C>95?x=C-96:x=C-64,m.underline=(x&1)===1,x<=13?m.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(x/2)]:x<=15?(m.italics=!0,m.color="white"):m.indent=Math.floor((x-16)/2)*4,m},b.parseChars=function(h,C){var x,m=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 '"+D(k)+"' in channel "+x),m=[k]}else h>=32&&h<=127&&(m=C===0?[h]:[h,C]);if(m){var y=d(m);this.logger.log(c.DEBUG,"Char codes = "+y.join(",")),w(h,C,this.cmdHistory)}return m},b.parseBackgroundAttributes=function(h,C){var x=(h===16||h===24)&&C>=32&&C<=47,m=(h===23||h===31)&&C>=45&&C<=47;if(!(x||m))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,S=this.channels[y];return S.setBkgData(k),w(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=L()},b.cueSplitAtTime=function(h){for(var C=0;C<this.channels.length;C++){var x=this.channels[C];x&&x.cueSplitAtTime(h)}},_}();function w(_,b,g){g.a=_,g.b=b}function M(_,b,g){return g.a===_&&g.b===b}function L(){return{a:null,b:null}}z.default=O},"./src/utils/codecs.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"isCodecType",function(){return W}),N.d(z,"isCodecSupportedInMp4",function(){return D});var Y={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(G,j){var n=Y[j];return!!n&&n[G.slice(0,4)]===!0}function D(G,j){return MediaSource.isTypeSupported((j||"video")+'/mp4;codecs="'+G+'"')}},"./src/utils/cues.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/utils/vttparser.ts"),W=N("./src/utils/webvtt-parser.ts"),D=N("./src/utils/texttrack-utils.ts"),G=/\s/,j={newCue:function(T,v,f,p){for(var c=[],s,d,u,l,a,i=self.VTTCue||self.TextTrackCue,R=0;R<p.rows.length;R++)if(s=p.rows[R],u=!0,l=0,a="",!s.isEmpty()){for(var O=0;O<s.chars.length;O++)G.test(s.chars[O].uchar)&&u?l++:(a+=s.chars[O].uchar,u=!1);s.cueStartTime=v,v===f&&(f+=1e-4),l>=16?l--:l++;var w=Object(Y.fixLineBreaks)(a.trim()),M=Object(W.generateCueId)(v,f,w);(!T||!T.cues||!T.cues.getCueById(M))&&(d=new i(v,f,w),d.id=M,d.line=R+1,d.align="left",d.position=10+Math.min(80,Math.floor(l*8/32)*10),c.push(d))}return T&&c.length&&(c.sort(function(L,_){return L.line==="auto"||_.line==="auto"?0:L.line>8&&_.line>8?_.line-L.line:L.line-_.line}),c.forEach(function(L){return Object(D.addCueToTrack)(T,L)})),c}};z.default=j},"./src/utils/discontinuities.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"findFirstFragWithCC",function(){return G}),N.d(z,"shouldAlignOnDiscontinuities",function(){return j}),N.d(z,"findDiscontinuousReferenceFrag",function(){return n}),N.d(z,"adjustSlidingStart",function(){return v}),N.d(z,"alignStream",function(){return f}),N.d(z,"alignPDT",function(){return c}),N.d(z,"alignFragmentByPDTDelta",function(){return s}),N.d(z,"alignMediaPlaylistByPDT",function(){return d});var Y=N("./src/polyfills/number.ts"),W=N("./src/utils/logger.ts"),D=N("./src/controller/level-helper.ts");function G(u,l){for(var a=null,i=0,R=u.length;i<R;i++){var O=u[i];if(O&&O.cc===l){a=O;break}}return a}function j(u,l,a){return!!(l.details&&(a.endCC>a.startCC||u&&u.cc<a.startCC))}function n(u,l){var a=u.fragments,i=l.fragments;if(!i.length||!a.length){W.logger.log("No fragments to align");return}var R=G(a,i[0].cc);if(!R||R&&!R.startPTS){W.logger.log("No frag in previous level to align on");return}return R}function T(u,l){if(u){var a=u.start+l;u.start=u.startPTS=a,u.endPTS=a+u.duration}}function v(u,l){for(var a=l.fragments,i=0,R=a.length;i<R;i++)T(a[i],u);l.fragmentHint&&T(l.fragmentHint,u),l.alignedSliding=!0}function f(u,l,a){if(!l)return;p(u,a,l),!a.alignedSliding&&l.details&&c(a,l.details),!a.alignedSliding&&l.details&&!a.skippedSegments&&Object(D.adjustSliding)(l.details,a)}function p(u,l,a){if(j(u,a,l)){var i=n(a.details,l);i&&Object(Y.isFiniteNumber)(i.start)&&(W.logger.log("Adjusting PTS using last level due to CC increase within current level "+l.url),v(i.start,l))}}function c(u,l){if(!l.fragments.length||!u.hasProgramDateTime||!l.hasProgramDateTime)return;var a=l.fragments[0].programDateTime,i=u.fragments[0].programDateTime,R=(i-a)/1e3+l.fragments[0].start;R&&Object(Y.isFiniteNumber)(R)&&(W.logger.log("Adjusting PTS using programDateTime delta "+(i-a)+"ms, sliding:"+R.toFixed(3)+" "+u.url+" "),v(R,u))}function s(u,l){var a=u.programDateTime;if(!a)return;var i=(a-l)/1e3;u.start=u.startPTS=i,u.endPTS=i+u.duration}function d(u,l){if(!l.fragments.length||!u.hasProgramDateTime||!l.hasProgramDateTime)return;var a=l.fragments[0].programDateTime,i=l.fragments[0].start,R=a-i*1e3;u.fragments.forEach(function(O){s(O,R)}),u.fragmentHint&&s(u.fragmentHint,R),u.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/utils/ewma.ts"),W=function(){function D(j,n,T){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=T,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Y.default(j),this.fast_=new Y.default(n)}var G=D.prototype;return G.update=function(n,T){var v=this.slow_,f=this.fast_;this.slow_.halfLife!==n&&(this.slow_=new Y.default(n,v.getEstimate(),v.getTotalWeight())),this.fast_.halfLife!==T&&(this.fast_=new Y.default(T,f.getEstimate(),f.getTotalWeight()))},G.sample=function(n,T){n=Math.max(n,this.minDelayMs_);var v=8*T,f=n/1e3,p=v/f;this.fast_.sample(f,p),this.slow_.sample(f,p)},G.canEstimate=function(){var n=this.fast_;return n&&n.getTotalWeight()>=this.minWeight_},G.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},G.destroy=function(){},D}();z.default=W},"./src/utils/ewma.ts":function(Z,z,N){"use strict";N.r(z);var Y=function(){function W(G,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=G,this.alpha_=G?Math.exp(Math.log(.5)/G):0,this.estimate_=j,this.totalWeight_=n}var D=W.prototype;return D.sample=function(j,n){var T=Math.pow(this.alpha_,j);this.estimate_=n*(1-T)+T*this.estimate_,this.totalWeight_+=j},D.getTotalWeight=function(){return this.totalWeight_},D.getEstimate=function(){if(this.alpha_){var j=1-Math.pow(this.alpha_,this.totalWeight_);if(j)return this.estimate_/j}return this.estimate_},W}();z.default=Y},"./src/utils/fetch-loader.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"fetchSupported",function(){return s});var Y=N("./src/polyfills/number.ts"),W=N("./src/loader/load-stats.ts"),D=N("./src/demux/chunk-cache.ts");function G(i,R){i.prototype=Object.create(R.prototype),i.prototype.constructor=i,f(i,R)}function j(i){var R=typeof Map=="function"?new Map:void 0;return j=function(w){if(w===null||!v(w))return w;if(typeof w!="function")throw new TypeError("Super expression must either be null or a function");if(typeof R!="undefined"){if(R.has(w))return R.get(w);R.set(w,M)}function M(){return n(w,arguments,p(this).constructor)}return M.prototype=Object.create(w.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),f(M,w)},j(i)}function n(i,R,O){return T()?n=Reflect.construct:n=function(M,L,_){var b=[null];b.push.apply(b,L);var g=Function.bind.apply(M,b),h=new g;return _&&f(h,_.prototype),h},n.apply(null,arguments)}function T(){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(i){return!1}}function v(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function f(i,R){return f=Object.setPrototypeOf||function(w,M){return w.__proto__=M,w},f(i,R)}function p(i){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},p(i)}function c(){return c=Object.assign||function(i){for(var R=1;R<arguments.length;R++){var O=arguments[R];for(var w in O)Object.prototype.hasOwnProperty.call(O,w)&&(i[w]=O[w])}return i},c.apply(this,arguments)}function s(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(i){}return!1}var d=function(){function i(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||l,this.controller=new self.AbortController,this.stats=new W.LoadStats}var R=i.prototype;return R.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},R.abortInternal=function(){var w=this.response;(!w||!w.ok)&&(this.stats.aborted=!0,this.controller.abort())},R.abort=function(){var w;this.abortInternal(),(w=this.callbacks)!==null&&w!==void 0&&w.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},R.load=function(w,M,L){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 g=u(w,this.controller.signal),h=L.onProgress,C=w.responseType==="arraybuffer",x=C?"byteLength":"length";this.context=w,this.config=M,this.callbacks=L,this.request=this.fetchSetup(w,g),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){_.abortInternal(),L.onTimeout(b,w,_.response)},M.timeout),self.fetch(this.request).then(function(m){if(_.response=_.loader=m,!m.ok){var P=m.status,k=m.statusText;throw new a(k||"fetch, bad network response",P,m)}return b.loading.first=Math.max(self.performance.now(),b.loading.start),b.total=parseInt(m.headers.get("Content-Length")||"0"),h&&Object(Y.isFiniteNumber)(M.highWaterMark)?_.loadProgressively(m,b,w,M.highWaterMark,h):C?m.arrayBuffer():m.text()}).then(function(m){var P=_.response;self.clearTimeout(_.requestTimeout),b.loading.end=Math.max(self.performance.now(),b.loading.first),b.loaded=b.total=m[x];var k={url:P.url,data:m};h&&!Object(Y.isFiniteNumber)(M.highWaterMark)&&h(b,w,m,P),L.onSuccess(k,b,w,P)}).catch(function(m){if(self.clearTimeout(_.requestTimeout),b.aborted)return;var P=m.code||0;L.onError({code:P,text:m.message},w,m.details)})},R.getCacheAge=function(){var w=null;if(this.response){var M=this.response.headers.get("age");w=M?parseFloat(M):null}return w},R.loadProgressively=function(w,M,L,_,b){_===void 0&&(_=0);var g=new D.default,h=w.body.getReader(),C=function x(){return h.read().then(function(m){if(m.done)return g.dataLength&&b(M,L,g.flush(),w),Promise.resolve(new ArrayBuffer(0));var P=m.value,k=P.length;return M.loaded+=k,k<_||g.dataLength?(g.push(P),g.dataLength>=_&&b(M,L,g.flush(),w)):b(M,L,P,w),x()}).catch(function(){return Promise.reject()})};return C()},i}();function u(i,R){var O={method:"GET",mode:"cors",credentials:"same-origin",signal:R,headers:new self.Headers(c({},i.headers))};return i.rangeEnd&&O.headers.set("Range","bytes="+i.rangeStart+"-"+String(i.rangeEnd-1)),O}function l(i,R){return new self.Request(i.url,R)}var a=function(i){G(R,i);function R(O,w,M){var L;return L=i.call(this,O)||this,L.code=void 0,L.details=void 0,L.code=w,L.details=M,L}return R}(j(Error));z.default=d},"./src/utils/imsc1-ttml-parser.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"IMSC1_CODEC",function(){return v}),N.d(z,"parseIMSC1",function(){return s});var Y=N("./src/utils/mp4-tools.ts"),W=N("./src/utils/vttparser.ts"),D=N("./src/utils/vttcue.ts"),G=N("./src/demux/id3.ts"),j=N("./src/utils/timescale-conversion.ts"),n=N("./src/utils/webvtt-parser.ts");function T(){return T=Object.assign||function(_){for(var b=1;b<arguments.length;b++){var g=arguments[b];for(var h in g)Object.prototype.hasOwnProperty.call(g,h)&&(_[h]=g[h])}return _},T.apply(this,arguments)}var v="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 s(_,b,g,h,C){var x=Object(Y.findBox)(new Uint8Array(_),["mdat"]);if(x.length===0){C(new Error("Could not parse IMSC1 mdat"));return}var m=x[0],P=Object(G.utf8ArrayToStr)(new Uint8Array(_,m.start,m.end-m.start)),k=Object(j.toTimescaleFromScale)(b,1,g);try{h(d(P,k))}catch(y){C(y)}}function d(_,b){var g=new DOMParser,h=g.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},m=Object.keys(x).reduce(function(F,A){return F[A]=C.getAttribute("ttp:"+A)||x[A],F},{}),P=C.getAttribute("xml:space")!=="preserve",k=l(u(C,"styling","style")),y=l(u(C,"layout","region")),S=u(C,"body","[begin]");return[].map.call(S,function(F){var A=a(F,P);if(!A||!F.hasAttribute("begin"))return null;var X=w(F.getAttribute("begin"),m),ne=w(F.getAttribute("dur"),m),fe=w(F.getAttribute("end"),m);if(X===null)throw O(F);if(fe===null){if(ne===null)throw O(F);fe=X+ne}var ye=new D.default(X-b,fe-b,A);ye.id=Object(n.generateCueId)(ye.startTime,ye.endTime,ye.text);var Pe=y[F.getAttribute("region")],xe=k[F.getAttribute("style")];ye.position=10,ye.size=80;var Ie=i(Pe,xe),Me=Ie.textAlign;if(Me){var ke=c[Me];ke&&(ye.lineAlign=ke),ye.align=Me}return T(ye,Ie),ye}).filter(function(F){return F!==null})}function u(_,b,g){var h=_.getElementsByTagName(b)[0];return h?[].slice.call(h.querySelectorAll(g)):[]}function l(_){return _.reduce(function(b,g){var h=g.getAttribute("xml:id");return h&&(b[h]=g),b},{})}function a(_,b){return[].slice.call(_.childNodes).reduce(function(g,h,C){var x;return h.nodeName==="br"&&C?g+`
`:(x=h.childNodes)!==null&&x!==void 0&&x.length?a(h,b):b?g+h.textContent.trim().replace(/\s+/g," "):g+h.textContent},"")}function i(_,b){var g="http://www.w3.org/ns/ttml#styling",h=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return h.reduce(function(C,x){var m=R(b,g,x)||R(_,g,x);return m&&(C[x]=m),C},{})}function R(_,b,g){return _.hasAttributeNS(b,g)?_.getAttributeNS(b,g):null}function O(_){return new Error("Could not parse ttml timestamp "+_)}function w(_,b){if(!_)return null;var g=Object(W.parseTimeStamp)(_);return g===null&&(f.test(_)?g=M(_,b):p.test(_)&&(g=L(_,b))),g}function M(_,b){var g=f.exec(_),h=(g[4]|0)+(g[5]|0)/b.subFrameRate;return(g[1]|0)*3600+(g[2]|0)*60+(g[3]|0)+h/b.frameRate}function L(_,b){var g=p.exec(_),h=Number(g[1]),C=g[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,z,N){"use strict";N.r(z),N.d(z,"enableLogs",function(){return n}),N.d(z,"logger",function(){return T});var Y=function(){},W={trace:Y,debug:Y,log:Y,warn:Y,info:Y,error:Y},D=W;function G(v){var f=self.console[v];return f?f.bind(self.console,"["+v+"] >"):Y}function j(v){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(s){D[s]=v[s]?v[s].bind(v):G(s)})}function n(v){if(self.console&&v===!0||typeof v=="object"){j(v,"debug","log","info","warn","error");try{D.log()}catch(f){D=W}}else D=W}var T=D},"./src/utils/mediakeys-helper.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"KeySystems",function(){return Y}),N.d(z,"requestMediaKeySystemAccess",function(){return W});var Y;(function(D){D.WIDEVINE="com.widevine.alpha",D.PLAYREADY="com.microsoft.playready"})(Y||(Y={}));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,z,N){"use strict";N.r(z),N.d(z,"getMediaSource",function(){return Y});function Y(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"bin2str",function(){return j}),N.d(z,"readUint16",function(){return n}),N.d(z,"readUint32",function(){return T}),N.d(z,"writeUint32",function(){return v}),N.d(z,"findBox",function(){return f}),N.d(z,"parseSegmentIndex",function(){return p}),N.d(z,"parseInitSegment",function(){return c}),N.d(z,"getStartDTS",function(){return s}),N.d(z,"getDuration",function(){return d}),N.d(z,"computeRawDurationFromSamples",function(){return u}),N.d(z,"offsetStartDTS",function(){return l}),N.d(z,"segmentValidRange",function(){return a}),N.d(z,"appendUint8Array",function(){return i});var Y=N("./src/utils/typed-array.ts"),W=N("./src/loader/fragment.ts"),D=Math.pow(2,32)-1,G=[].push;function j(R){return String.fromCharCode.apply(null,R)}function n(R,O){"data"in R&&(O+=R.start,R=R.data);var w=R[O]<<8|R[O+1];return w<0?65536+w:w}function T(R,O){"data"in R&&(O+=R.start,R=R.data);var w=R[O]<<24|R[O+1]<<16|R[O+2]<<8|R[O+3];return w<0?4294967296+w:w}function v(R,O,w){"data"in R&&(O+=R.start,R=R.data),R[O]=w>>24,R[O+1]=w>>16&255,R[O+2]=w>>8&255,R[O+3]=w&255}function f(R,O){var w=[];if(!O.length)return w;var M,L,_;"data"in R?(M=R.data,L=R.start,_=R.end):(M=R,L=0,_=M.byteLength);for(var b=L;b<_;){var g=T(M,b),h=j(M.subarray(b+4,b+8)),C=g>1?b+g:_;if(h===O[0])if(O.length===1)w.push({data:M,start:b+8,end:C});else{var x=f({data:M,start:b+8,end:C},O.slice(1));x.length&&G.apply(w,x)}b=C}return w}function p(R){var O=f(R,["moov"]),w=O[0],M=w?w.end:null,L=f(R,["sidx"]);if(!L||!L[0])return null;var _=[],b=L[0],g=b.data[0],h=g===0?8:16,C=T(b,h);h+=4;var x=0,m=0;g===0?h+=8:h+=16,h+=2;var P=b.end+m,k=n(b,h);h+=2;for(var y=0;y<k;y++){var S=h,F=T(b,S);S+=4;var A=F&2147483647,X=(F&2147483648)>>>31;if(X===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ne=T(b,S);S+=4,_.push({referenceSize:A,subsegmentDuration:ne,info:{duration:ne/C,start:P,end:P+A-1}}),P+=A,S+=4,h=S}return{earliestPresentationTime:x,timescale:C,version:g,referencesCount:k,references:_,moovEndOffset:M}}function c(R){for(var O=[],w=f(R,["moov","trak"]),M=0;M<w.length;M++){var L=w[M],_=f(L,["tkhd"])[0];if(_){var b=_.data[_.start],g=b===0?12:20,h=T(_,g),C=f(L,["mdia","mdhd"])[0];if(C){b=C.data[C.start],g=b===0?12:20;var x=T(C,g),m=f(L,["mdia","hdlr"])[0];if(m){var P=j(m.data.subarray(m.start+8,m.start+12)),k={soun:W.ElementaryStreamTypes.AUDIO,vide:W.ElementaryStreamTypes.VIDEO}[P];if(k){var y=f(L,["mdia","minf","stbl","stsd"])[0],S=void 0;y&&(S=j(y.data.subarray(y.start+12,y.start+16))),O[h]={timescale:x,type:k},O[k]={timescale:x,id:h,codec:S}}}}}}var F=f(R,["moov","mvex","trex"]);return F.forEach(function(A){var X=T(A,4),ne=O[X];ne&&(ne.default={duration:T(A,12),flags:T(A,20)})}),O}function s(R,O){return f(O,["moof","traf"]).reduce(function(w,M){var L=f(M,["tfdt"])[0],_=L.data[L.start],b=f(M,["tfhd"]).reduce(function(g,h){var C=T(h,4),x=R[C];if(x){var m=T(L,4);_===1&&(m*=Math.pow(2,32),m+=T(L,8));var P=x.timescale||9e4,k=m/P;if(isFinite(k)&&(g===null||k<g))return k}return g},null);return b!==null&&isFinite(b)&&(w===null||b<w)?b:w},null)||0}function d(R,O){for(var w=0,M=0,L=0,_=f(R,["moof","traf"]),b=0;b<_.length;b++){var g=_[b],h=f(g,["tfhd"])[0],C=T(h,4),x=O[C];if(!x)continue;var m=x.default,P=T(h,0)|(m==null?void 0:m.flags),k=m==null?void 0:m.duration;P&8&&(P&2?k=T(h,12):k=T(h,8));for(var y=x.timescale||9e4,S=f(g,["trun"]),F=0;F<S.length;F++){if(k){var A=T(S[F],4);w=k*A}else w=u(S[F]);x.type===W.ElementaryStreamTypes.VIDEO?M+=w/y:x.type===W.ElementaryStreamTypes.AUDIO&&(L+=w/y)}}if(M===0&&L===0){var X=p(R);if(X!=null&&X.references)return X.references.reduce(function(ne,fe){return ne+fe.info.duration||0},0)}return M||L}function u(R){var O=T(R,0),w=8;O&1&&(w+=4),O&4&&(w+=4);for(var M=0,L=T(R,4),_=0;_<L;_++){if(O&256){var b=T(R,w);M+=b,w+=4}O&512&&(w+=4),O&1024&&(w+=4),O&2048&&(w+=4)}return M}function l(R,O,w){f(O,["moof","traf"]).forEach(function(M){f(M,["tfhd"]).forEach(function(L){var _=T(L,4),b=R[_];if(!b)return;var g=b.timescale||9e4;f(M,["tfdt"]).forEach(function(h){var C=h.data[h.start],x=T(h,4);if(C===0)v(h,4,x-w*g);else{x*=Math.pow(2,32),x+=T(h,8),x-=w*g,x=Math.max(x,0);var m=Math.floor(x/(D+1)),P=Math.floor(x%(D+1));v(h,4,m),v(h,8,P)}})})})}function a(R){var O={valid:null,remainder:null},w=f(R,["moof"]);if(w){if(w.length<2)return O.remainder=R,O}else return O;var M=w[w.length-1];return O.valid=Object(Y.sliceUint8)(R,0,M.start-8),O.remainder=Object(Y.sliceUint8)(R,M.start-8),O}function i(R,O){var w=new Uint8Array(R.length+O.length);return w.set(R),w.set(O,R.length),w}},"./src/utils/output-filter.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return Y});var Y=function(){function W(G,j){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=G,this.trackName=j}var D=W.prototype;return D.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},D.newCue=function(j,n,T){(this.startTime===null||this.startTime>j)&&(this.startTime=j),this.endTime=n,this.screen=T,this.timelineController.createCaptionsTrack(this.trackName)},D.reset=function(){this.cueRanges=[]},W}()},"./src/utils/texttrack-utils.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"sendAddTrackEvent",function(){return W}),N.d(z,"addCueToTrack",function(){return D}),N.d(z,"clearCurrentCues",function(){return G}),N.d(z,"removeCuesInRange",function(){return j}),N.d(z,"getCuesInRange",function(){return T});var Y=N("./src/utils/logger.ts");function W(v,f){var p;try{p=new Event("addtrack")}catch(c){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=v,f.dispatchEvent(p)}function D(v,f){var p=v.mode;if(p==="disabled"&&(v.mode="hidden"),v.cues&&!v.cues.getCueById(f.id))try{if(v.addCue(f),!v.cues.getCueById(f.id))throw new Error("addCue is failed for: "+f)}catch(s){Y.logger.debug("[texttrack-utils]: "+s);var c=new self.TextTrackCue(f.startTime,f.endTime,f.text);c.id=f.id,v.addCue(c)}p==="disabled"&&(v.mode=p)}function G(v){var f=v.mode;if(f==="disabled"&&(v.mode="hidden"),v.cues)for(var p=v.cues.length;p--;)v.removeCue(v.cues[p]);f==="disabled"&&(v.mode=f)}function j(v,f,p){var c=v.mode;if(c==="disabled"&&(v.mode="hidden"),v.cues&&v.cues.length>0)for(var s=T(v.cues,f,p),d=0;d<s.length;d++)v.removeCue(s[d]);c==="disabled"&&(v.mode=c)}function n(v,f){if(f<v[0].startTime)return 0;var p=v.length-1;if(f>v[p].endTime)return-1;for(var c=0,s=p;c<=s;){var d=Math.floor((s+c)/2);if(f<v[d].startTime)s=d-1;else if(f>v[d].startTime&&c<p)c=d+1;else return d}return v[c].startTime-f<f-v[s].startTime?c:s}function T(v,f,p){var c=[],s=n(v,f);if(s>-1)for(var d=s,u=v.length;d<u;d++){var l=v[d];if(l.startTime>=f&&l.endTime<=p)c.push(l);else if(l.startTime>p)return c}return c}},"./src/utils/time-ranges.ts":function(Z,z,N){"use strict";N.r(z);var Y={toString:function(D){for(var G="",j=D.length,n=0;n<j;n++)G+="["+D.start(n).toFixed(3)+","+D.end(n).toFixed(3)+"]";return G}};z.default=Y},"./src/utils/timescale-conversion.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"toTimescaleFromBase",function(){return W}),N.d(z,"toTimescaleFromScale",function(){return D}),N.d(z,"toMsFromMpegTsClock",function(){return G}),N.d(z,"toMpegTsClockFromTimescale",function(){return j});var Y=9e4;function W(n,T,v,f){v===void 0&&(v=1),f===void 0&&(f=!1);var p=n*T*v;return f?Math.round(p):p}function D(n,T,v,f){return v===void 0&&(v=1),f===void 0&&(f=!1),W(n,T,1/v,f)}function G(n,T){return T===void 0&&(T=!1),W(n,1e3,1/Y,T)}function j(n,T){return T===void 0&&(T=1),W(n,Y,1/T)}},"./src/utils/typed-array.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"sliceUint8",function(){return Y});function Y(W,D,G){return Uint8Array.prototype.slice?W.slice(D,G):new Uint8Array(Array.prototype.slice.call(W,D,G))}},"./src/utils/vttcue.ts":function(Z,z,N){"use strict";N.r(z),z.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var Y=["","lr","rl"],W=["start","middle","end","left","right"];function D(v,f){if(typeof f!="string")return!1;if(!Array.isArray(v))return!1;var p=f.toLowerCase();return~v.indexOf(p)?p:!1}function G(v){return D(Y,v)}function j(v){return D(W,v)}function n(v){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 s=1;s<arguments.length;s++){var d=arguments[s];for(var u in d)v[u]=d[u]}return v}function T(v,f,p){var c=this,s={enumerable:!0};c.hasBeenReset=!1;var d="",u=!1,l=v,a=f,i=p,R=null,O="",w=!0,M="auto",L="start",_=50,b="middle",g=50,h="middle";Object.defineProperty(c,"id",n({},s,{get:function(){return d},set:function(x){d=""+x}})),Object.defineProperty(c,"pauseOnExit",n({},s,{get:function(){return u},set:function(x){u=!!x}})),Object.defineProperty(c,"startTime",n({},s,{get:function(){return l},set:function(x){if(typeof x!="number")throw new TypeError("Start time must be set to a number.");l=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",n({},s,{get:function(){return a},set:function(x){if(typeof x!="number")throw new TypeError("End time must be set to a number.");a=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",n({},s,{get:function(){return i},set:function(x){i=""+x,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",n({},s,{get:function(){return R},set:function(x){R=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",n({},s,{get:function(){return O},set:function(x){var m=G(x);if(m===!1)throw new SyntaxError("An invalid or illegal string was specified.");O=m,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",n({},s,{get:function(){return w},set:function(x){w=!!x,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",n({},s,{get:function(){return M},set:function(x){if(typeof x!="number"&&x!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");M=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",n({},s,{get:function(){return L},set:function(x){var m=j(x);if(!m)throw new SyntaxError("An invalid or illegal string was specified.");L=m,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",n({},s,{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({},s,{get:function(){return b},set:function(x){var m=j(x);if(!m)throw new SyntaxError("An invalid or illegal string was specified.");b=m,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",n({},s,{get:function(){return g},set:function(x){if(x<0||x>100)throw new Error("Size must be between 0 and 100.");g=x,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",n({},s,{get:function(){return h},set:function(x){var m=j(x);if(!m)throw new SyntaxError("An invalid or illegal string was specified.");h=m,this.hasBeenReset=!0}})),c.displayState=void 0}return T.prototype.getCueAsHTML=function(){var v=self.WebVTT;return v.convertCueToDOMTree(self,this.text)},T}()},"./src/utils/vttparser.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"parseTimeStamp",function(){return D}),N.d(z,"fixLineBreaks",function(){return f}),N.d(z,"VTTParser",function(){return p});var Y=N("./src/utils/vttcue.ts"),W=function(){function c(){}var s=c.prototype;return s.decode=function(u,l){if(!u)return"";if(typeof u!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(u))},c}();function D(c){function s(u,l,a,i){return(u|0)*3600+(l|0)*60+(a|0)+parseFloat(i||0)}var d=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return d?parseFloat(d[2])>59?s(d[2],d[3],0,d[4]):s(d[1],d[2],d[3],d[4]):null}var G=function(){function c(){this.values=Object.create(null)}var s=c.prototype;return s.set=function(u,l){!this.get(u)&&l!==""&&(this.values[u]=l)},s.get=function(u,l,a){return a?this.has(u)?this.values[u]:l[a]:this.has(u)?this.values[u]:l},s.has=function(u){return u in this.values},s.alt=function(u,l,a){for(var i=0;i<a.length;++i)if(l===a[i]){this.set(u,l);break}},s.integer=function(u,l){/^-?\d+$/.test(l)&&this.set(u,parseInt(l,10))},s.percent=function(u,l){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(l)){var a=parseFloat(l);if(a>=0&&a<=100)return this.set(u,a),!0}return!1},c}();function j(c,s,d,u){var l=u?c.split(u):[c];for(var a in l){if(typeof l[a]!="string")continue;var i=l[a].split(d);if(i.length!==2)continue;var R=i[0],O=i[1];s(R,O)}}var n=new Y.default(0,0,""),T=n.align==="middle"?"middle":"center";function v(c,s,d){var u=c;function l(){var R=D(c);if(R===null)throw new Error("Malformed timestamp: "+u);return c=c.replace(/^[^\sa-zA-Z-]+/,""),R}function a(R,O){var w=new G;j(R,function(_,b){var g;switch(_){case"region":for(var h=d.length-1;h>=0;h--)if(d[h].id===b){w.set(_,d[h].region);break}break;case"vertical":w.alt(_,b,["rl","lr"]);break;case"line":g=b.split(","),w.integer(_,g[0]),w.percent(_,g[0])&&w.set("snapToLines",!1),w.alt(_,g[0],["auto"]),g.length===2&&w.alt("lineAlign",g[1],["start",T,"end"]);break;case"position":g=b.split(","),w.percent(_,g[0]),g.length===2&&w.alt("positionAlign",g[1],["start",T,"end","line-left","line-right","auto"]);break;case"size":w.percent(_,b);break;case"align":w.alt(_,b,["start",T,"end","left","right"]);break}},/:/,/\s/),O.region=w.get("region",null),O.vertical=w.get("vertical","");var M=w.get("line","auto");M==="auto"&&n.line===-1&&(M=-1),O.line=M,O.lineAlign=w.get("lineAlign","start"),O.snapToLines=w.get("snapToLines",!0),O.size=w.get("size",100),O.align=w.get("align",T);var L=w.get("position","auto");L==="auto"&&n.position===50&&(L=O.align==="start"||O.align==="left"?0:O.align==="end"||O.align==="right"?100:50),O.position=L}function i(){c=c.replace(/^\s+/,"")}if(i(),s.startTime=l(),i(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+u);c=c.substr(3),i(),s.endTime=l(),i(),a(c,s)}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 s=c.prototype;return s.parse=function(u){var l=this;u&&(l.buffer+=l.decoder.decode(u,{stream:!0}));function a(){var L=l.buffer,_=0;for(L=f(L);_<L.length&&L[_]!=="\r"&&L[_]!==`
`;)++_;var b=L.substr(0,_);return L[_]==="\r"&&++_,L[_]===`
`&&++_,l.buffer=L.substr(_),b}function i(L){j(L,function(_,b){},/:/)}try{var R="";if(l.state==="INITIAL"){if(!/\r\n|\n/.test(l.buffer))return this;R=a();var O=R.match(/^()?WEBVTT([ \t].*)?$/);if(!O||!O[0])throw new Error("Malformed WebVTT signature.");l.state="HEADER"}for(var w=!1;l.buffer;){if(!/\r\n|\n/.test(l.buffer))return this;w?w=!1:R=a();switch(l.state){case"HEADER":/:/.test(R)?i(R):R||(l.state="ID");continue;case"NOTE":R||(l.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(R)){l.state="NOTE";break}if(!R)continue;if(l.cue=new Y.default(0,0,""),l.state="CUE",R.indexOf("-->")===-1){l.cue.id=R;continue}case"CUE":if(!l.cue){l.state="BADCUE";continue}try{v(R,l.cue,l.regionList)}catch(L){l.cue=null,l.state="BADCUE";continue}l.state="CUETEXT";continue;case"CUETEXT":{var M=R.indexOf("-->")!==-1;if(!R||M&&(w=!0)){l.oncue&&l.cue&&l.oncue(l.cue),l.cue=null,l.state="ID";continue}if(l.cue===null)continue;l.cue.text&&(l.cue.text+=`
`),l.cue.text+=R}continue;case"BADCUE":R||(l.state="ID")}}}catch(L){l.state==="CUETEXT"&&l.cue&&l.oncue&&l.oncue(l.cue),l.cue=null,l.state=l.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},s.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(l){u.onparsingerror&&u.onparsingerror(l)}return u.onflush&&u.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"generateCueId",function(){return p}),N.d(z,"parseWebVTT",function(){return s});var Y=N("./src/polyfills/number.ts"),W=N("./src/utils/vttparser.ts"),D=N("./src/demux/id3.ts"),G=N("./src/utils/timescale-conversion.ts"),j=N("./src/remux/mp4-remuxer.ts"),n=/\r\n|\n\r|\n|\r/g,T=function(u,l,a){return a===void 0&&(a=0),u.substr(a,l.length)===l},v=function(u){var l=parseInt(u.substr(-3)),a=parseInt(u.substr(-6,2)),i=parseInt(u.substr(-9,2)),R=u.length>9?parseInt(u.substr(0,u.indexOf(":"))):0;if(!Object(Y.isFiniteNumber)(l)||!Object(Y.isFiniteNumber)(a)||!Object(Y.isFiniteNumber)(i)||!Object(Y.isFiniteNumber)(R))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+u);return l+=1e3*a,l+=60*1e3*i,l+=60*60*1e3*R,l},f=function(u){for(var l=5381,a=u.length;a;)l=l*33^u.charCodeAt(--a);return(l>>>0).toString()};function p(d,u,l){return f(d.toString())+f(u.toString())+f(l)}var c=function(u,l,a){var i=u[l],R=u[i.prevCC];if(!R||!R.new&&i.new){u.ccOffset=u.presentationOffset=i.start,i.new=!1;return}for(;(O=R)!==null&&O!==void 0&&O.new;){var O;u.ccOffset+=i.start-R.start,i.new=!1,i=R,R=u[i.prevCC]}u.presentationOffset=a};function s(d,u,l,a,i,R,O,w){var M=new W.VTTParser,L=Object(D.utf8ArrayToStr)(new Uint8Array(d)).trim().replace(n,`
`).split(`
`),_=[],b=Object(G.toMpegTsClockFromTimescale)(u,l),g="00:00.000",h=0,C=0,x,m=!0,P=!1;M.oncue=function(k){var y=a[i],S=a.ccOffset,F=(h-b)/9e4;if(y!=null&&y.new&&(C!==void 0?S=a.ccOffset=y.start:c(a,i,F)),F&&(S=F-a.presentationOffset),P){var A=k.endTime-k.startTime,X=Object(j.normalizePts)((k.startTime+S-C)*9e4,R*9e4)/9e4;k.startTime=X,k.endTime=X+A}var ne=k.text.trim();k.text=decodeURIComponent(encodeURIComponent(ne)),k.id||(k.id=p(k.startTime,k.endTime,ne)),k.endTime>0&&_.push(k)},M.onparsingerror=function(k){x=k},M.onflush=function(){if(x){w(x);return}O(_)},L.forEach(function(k){if(m)if(T(k,"X-TIMESTAMP-MAP=")){m=!1,P=!0,k.substr(16).split(",").forEach(function(y){T(y,"LOCAL:")?g=y.substr(6):T(y,"MPEGTS:")&&(h=parseInt(y.substr(7)))});try{C=v(g)/1e3}catch(y){P=!1,x=y}return}else k===""&&(m=!1);M.parse(k+`
`)}),M.flush()}},"./src/utils/xhr-loader.ts":function(Z,z,N){"use strict";N.r(z);var Y=N("./src/utils/logger.ts"),W=N("./src/loader/load-stats.ts"),D=/^age:\s*[\d.]+\s*$/m,G=function(){function j(T){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=T?T.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 v=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),v&&(v.onreadystatechange=null,v.onprogress=null,v.readyState!==4&&(this.stats.aborted=!0,v.abort()))},n.abort=function(){var v;this.abortInternal(),(v=this.callbacks)!==null&&v!==void 0&&v.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},n.load=function(v,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=v,this.config=f,this.callbacks=p,this.retryDelay=f.retryDelay,this.loadInternal()},n.loadInternal=function(){var v=this.config,f=this.context;if(!v)return;var p=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var s=this.xhrSetup;try{if(s)try{s(p,f.url)}catch(l){p.open("GET",f.url,!0),s(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(l){this.callbacks.onError({code:p.status,text:l.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),v.timeout),p.send()},n.readystatechange=function(){var v=this.context,f=this.loader,p=this.stats;if(!v||!f)return;var c=f.readyState,s=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,l;if(v.responseType==="arraybuffer"?(u=f.response,l=u.byteLength):(u=f.responseText,l=u.length),p.loaded=p.total=l,!this.callbacks)return;var a=this.callbacks.onProgress;if(a&&a(p,v,u,f),!this.callbacks)return;var i={url:f.responseURL,data:u};this.callbacks.onSuccess(i,p,v,f)}else p.retry>=s.maxRetry||d>=400&&d<499?(Y.logger.error(d+" while loading "+v.url),this.callbacks.onError({code:d,text:f.statusText},v,f)):(Y.logger.warn(d+" while loading "+v.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)},n.loadtimeout=function(){Y.logger.warn("timeout while loading "+this.context.url);var v=this.callbacks;v&&(this.abortInternal(),v.onTimeout(this.stats,this.context,this.loader))},n.loadprogress=function(v){var f=this.stats;f.loaded=v.loaded,v.lengthComputable&&(f.total=v.total)},n.getCacheAge=function(){var v=null;if(this.loader&&D.test(this.loader.getAllResponseHeaders())){var f=this.loader.getResponseHeader("age");v=f?parseFloat(f):null}return v},j}();z.default=G}}).default})},vHTk:function(Be,he,B){Be.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(Be,he,B){"use strict";B.d(he,"a",function(){return st});var Z=B("rePB"),z=B("VTBJ"),N=B("KQm4"),Y=B("U8pU"),W=B("ODXe"),D=B("q1tI"),G=B("TSYQ"),j=B.n(G),n=B("Gytx"),T=B.n(n),v=B("Kwbf"),f=B("t23M"),p=B("qx4F"),c=B("6eGT"),s=B("IBYe"),d=B("Ff2n"),u=B("c+Xe"),l=B("fyJ8"),a=B("biw7");function i(Ne,Re,Je,tt,le){var $=Je[Ne]||{},te=Je[Re]||{},ae,de;$.fixed==="left"?ae=tt.left[Ne]:te.fixed==="right"&&(de=tt.right[Re]);var ie=!1,se=!1,pe=!1,be=!1,_e=Je[Re+1],Le=Je[Ne-1];if(le==="rtl"){if(ae!==void 0){var Ye=Le&&Le.fixed==="left";be=!Ye}else if(de!==void 0){var lt=_e&&_e.fixed==="right";pe=!lt}}else if(ae!==void 0){var Et=_e&&_e.fixed==="left";ie=!Et}else if(de!==void 0){var vt=Le&&Le.fixed==="right";se=!vt}return{fixLeft:ae,fixRight:de,lastFixLeft:ie,firstFixRight:se,lastFixRight:pe,firstFixLeft:be,isSticky:tt.isSticky}}var R=B("sR1s");function O(Ne){var Re=Ne.cells,Je=Ne.stickyOffsets,tt=Ne.flattenColumns,le=Ne.rowComponent,$=Ne.cellComponent,te=Ne.onHeaderRow,ae=Ne.index,de=D.useContext(a.a),ie=de.prefixCls,se=de.direction,pe;te&&(pe=te(Re.map(function(_e){return _e.column}),ae));var be=Object(R.a)(Re.map(function(_e){return _e.column}));return D.createElement(le,Object.assign({},pe),Re.map(function(_e,Le){var Ye=_e.column,lt=i(_e.colStart,_e.colEnd,tt,Je,se),Et;return Ye&&Ye.onHeaderCell&&(Et=_e.column.onHeaderCell(Ye)),D.createElement(l.a,Object.assign({},_e,{ellipsis:Ye.ellipsis,align:Ye.align,component:$,prefixCls:ie,key:be[Le]},lt,{additionalProps:Et,rowType:"header"}))}))}O.displayName="HeaderRow";var w=O;function M(Ne){var Re=[];function Je(te,ae){var de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Re[de]=Re[de]||[];var ie=ae,se=te.filter(Boolean).map(function(pe){var be={key:pe.key,className:pe.className||"",children:pe.title,column:pe,colStart:ie},_e=1,Le=pe.children;return Le&&Le.length>0&&(_e=Je(Le,ie,de+1).reduce(function(Ye,lt){return Ye+lt},0),be.hasSubColumns=!0),"colSpan"in pe&&(_e=pe.colSpan),"rowSpan"in pe&&(be.rowSpan=pe.rowSpan),be.colSpan=_e,be.colEnd=be.colStart+_e-1,Re[de].push(be),ie+=_e,_e});return se}Je(Ne,0);for(var tt=Re.length,le=function(ae){Re[ae].forEach(function(de){!("rowSpan"in de)&&!de.hasSubColumns&&(de.rowSpan=tt-ae)})},$=0;$<tt;$+=1)le($);return Re}function L(Ne){var Re=Ne.stickyOffsets,Je=Ne.columns,tt=Ne.flattenColumns,le=Ne.onHeaderRow,$=D.useContext(a.a),te=$.prefixCls,ae=$.getComponent,de=D.useMemo(function(){return M(Je)},[Je]),ie=ae(["header","wrapper"],"thead"),se=ae(["header","row"],"tr"),pe=ae(["header","cell"],"th");return D.createElement(ie,{className:"".concat(te,"-thead")},de.map(function(be,_e){var Le=D.createElement(w,{key:_e,flattenColumns:tt,cells:be,stickyOffsets:Re,rowComponent:se,cellComponent:pe,onHeaderRow:le,index:_e});return Le}))}var _=L,b=B("hW8S");function g(Ne){for(var Re=Ne.colWidths,Je=Ne.columns,tt=Ne.columCount,le=[],$=tt||Je.length,te=!1,ae=$-1;ae>=0;ae-=1){var de=Re[ae],ie=Je&&Je[ae],se=ie&&ie[b.a];(de||se||te)&&(le.unshift(D.createElement("col",Object.assign({key:ae,style:{width:de,minWidth:de}},se))),te=!0)}return D.createElement("colgroup",null,le)}var h=g;function C(Ne,Re){return Object(D.useMemo)(function(){for(var Je=[],tt=0;tt<Re;tt+=1){var le=Ne[tt];if(le!==void 0)Je[tt]=le;else return null}return Je},[Ne.join("_"),Re])}var x=D.forwardRef(function(Ne,Re){var Je=Ne.noData,tt=Ne.columns,le=Ne.flattenColumns,$=Ne.colWidths,te=Ne.columCount,ae=Ne.stickyOffsets,de=Ne.direction,ie=Ne.fixHeader,se=Ne.offsetHeader,pe=Ne.stickyClassName,be=Ne.onScroll,_e=Object(d.a)(Ne,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Le=D.useContext(a.a),Ye=Le.prefixCls,lt=Le.scrollbarSize,Et=Le.isSticky,vt=Et&&!ie?0:lt,ft=D.useRef(null),ze=D.useCallback(function(pt){Object(u.b)(Re,pt),Object(u.b)(ft,pt)},[]);D.useEffect(function(){var pt;function dt(je){var Ve=je.currentTarget,$e=je.deltaX;$e&&(be({currentTarget:Ve,scrollLeft:Ve.scrollLeft+$e}),je.preventDefault())}return(pt=ft.current)===null||pt===void 0||pt.addEventListener("wheel",dt),function(){var je;(je=ft.current)===null||je===void 0||je.removeEventListener("wheel",dt)}},[]);var Qe=le[le.length-1],He={fixed:Qe?Qe.fixed:null,onHeaderCell:function(){return{className:"".concat(Ye,"-cell-scrollbar")}}},me=Object(D.useMemo)(function(){return vt?[].concat(Object(N.a)(tt),[He]):tt},[vt,tt]),we=Object(D.useMemo)(function(){return vt?[].concat(Object(N.a)(le),[He]):le},[vt,le]),qe=Object(D.useMemo)(function(){var pt=ae.right,dt=ae.left;return Object(z.a)(Object(z.a)({},ae),{},{left:de==="rtl"?[].concat(Object(N.a)(dt.map(function(je){return je+vt})),[0]):dt,right:de==="rtl"?pt:[].concat(Object(N.a)(pt.map(function(je){return je+vt})),[0]),isSticky:Et})},[vt,ae,Et]),Ge=C($,te);return D.createElement("div",{style:Object(z.a)({overflow:"hidden"},Et?{top:se}:{}),ref:ze,className:j()("".concat(Ye,"-header"),Object(Z.a)({},pe,!!pe))},D.createElement("table",{style:{tableLayout:"fixed",visibility:Je||Ge?null:"hidden"}},D.createElement(h,{colWidths:Ge?[].concat(Object(N.a)(Ge),[vt]):[],columCount:te+1,columns:we}),D.createElement(_,Object.assign({},_e,{stickyOffsets:qe,columns:me,flattenColumns:we}))))});x.displayName="FixedHeader";var m=x,P=D.createContext(null),k=P;function y(Ne){var Re=Ne.prefixCls,Je=Ne.children,tt=Ne.component,le=Ne.cellComponent,$=Ne.fixHeader,te=Ne.fixColumn,ae=Ne.horizonScroll,de=Ne.className,ie=Ne.expanded,se=Ne.componentWidth,pe=Ne.colSpan,be=D.useContext(a.a),_e=be.scrollbarSize;return D.useMemo(function(){var Le=Je;return te&&(Le=D.createElement("div",{style:{width:se-($?_e:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Re,"-expanded-row-fixed")},Le)),D.createElement(tt,{className:de,style:{display:ie?null:"none"}},D.createElement(l.a,{component:le,prefixCls:Re,colSpan:pe},Le))},[Je,tt,$,ae,de,ie,se,pe,_e])}var S=y;function F(Ne){var Re=Ne.className,Je=Ne.style,tt=Ne.record,le=Ne.index,$=Ne.rowKey,te=Ne.getRowKey,ae=Ne.rowExpandable,de=Ne.expandedKeys,ie=Ne.onRow,se=Ne.indent,pe=se===void 0?0:se,be=Ne.rowComponent,_e=Ne.cellComponent,Le=Ne.childrenColumnName,Ye=D.useContext(a.a),lt=Ye.prefixCls,Et=Ye.fixedInfoList,vt=D.useContext(k),ft=vt.fixHeader,ze=vt.fixColumn,Qe=vt.horizonScroll,He=vt.componentWidth,me=vt.flattenColumns,we=vt.expandableType,qe=vt.expandRowByClick,Ge=vt.onTriggerExpand,pt=vt.rowClassName,dt=vt.expandedRowClassName,je=vt.indentSize,Ve=vt.expandIcon,$e=vt.expandedRowRender,it=vt.expandIconColumnIndex,ut=D.useState(!1),et=Object(W.a)(ut,2),Dt=et[0],Xt=et[1],gt=de&&de.has(Ne.recordKey);D.useEffect(function(){gt&&Xt(!0)},[gt]);var Ct=we==="row"&&(!ae||ae(tt)),Mt=we==="nest",St=Le&&tt&&tt[Le],kt=Ct||Mt,Wt;ie&&(Wt=ie(tt,le));var dn=function(Lt){if(qe&&kt&&Ge(tt,Lt),Wt&&Wt.onClick){for(var En,ct=arguments.length,wn=new Array(ct>1?ct-1:0),pn=1;pn<ct;pn++)wn[pn-1]=arguments[pn];(En=Wt).onClick.apply(En,[Lt].concat(wn))}},$t;typeof pt=="string"?$t=pt:typeof pt=="function"&&($t=pt(tt,le,pe));var ot=Object(R.a)(me),Pt=D.createElement(be,Object.assign({},Wt,{"data-row-key":$,className:j()(Re,"".concat(lt,"-row"),"".concat(lt,"-row-level-").concat(pe),$t,Wt&&Wt.className),style:Object(z.a)(Object(z.a)({},Je),Wt?Wt.style:null),onClick:dn}),me.map(function(rn,Lt){var En=rn.render,ct=rn.dataIndex,wn=rn.className,pn=ot[Lt],Hn=Et[Lt],Mn;Lt===(it||0)&&Mt&&(Mn=D.createElement(D.Fragment,null,D.createElement("span",{style:{paddingLeft:"".concat(je*pe,"px")},className:"".concat(lt,"-row-indent indent-level-").concat(pe)}),Ve({prefixCls:lt,expanded:gt,expandable:St,record:tt,onExpand:Ge})));var Dn;return rn.onCell&&(Dn=rn.onCell(tt,le)),D.createElement(l.a,Object.assign({className:wn,ellipsis:rn.ellipsis,align:rn.align,component:_e,prefixCls:lt,key:pn,record:tt,index:le,dataIndex:ct,render:En,shouldCellUpdate:rn.shouldCellUpdate},Hn,{appendNode:Mn,additionalProps:Dn}))})),Ht;if(Ct&&(Dt||gt)){var zt=$e(tt,le,pe+1,gt),Vt=dt&&dt(tt,le,pe);Ht=D.createElement(S,{expanded:gt,className:j()("".concat(lt,"-expanded-row"),"".concat(lt,"-expanded-row-level-").concat(pe+1),Vt),prefixCls:lt,fixHeader:ft,fixColumn:ze,horizonScroll:Qe,component:be,componentWidth:He,cellComponent:_e,colSpan:me.length},zt)}var nn;return St&&gt&&(nn=(tt[Le]||[]).map(function(rn,Lt){var En=te(rn,Lt);return D.createElement(F,Object.assign({},Ne,{key:En,rowKey:En,record:rn,recordKey:En,index:Lt,indent:pe+1}))})),D.createElement(D.Fragment,null,Pt,Ht,nn)}F.displayName="BodyRow";var A=F,X=D.createContext(null),ne=X;function fe(Ne){var Re=Ne.columnKey,Je=Ne.onColumnResize,tt=D.useRef();return D.useEffect(function(){tt.current&&Je(Re,tt.current.offsetWidth)},[]),D.createElement(f.a,{onResize:function($){var te=$.offsetWidth;Je(Re,te)}},D.createElement("td",{ref:tt,style:{padding:0,border:0,height:0}},D.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ye(Ne){var Re=Ne.data,Je=Ne.getRowKey,tt=Ne.measureColumnWidth,le=Ne.expandedKeys,$=Ne.onRow,te=Ne.rowExpandable,ae=Ne.emptyNode,de=Ne.childrenColumnName,ie=D.useContext(ne),se=ie.onColumnResize,pe=D.useContext(a.a),be=pe.prefixCls,_e=pe.getComponent,Le=D.useContext(k),Ye=Le.fixHeader,lt=Le.horizonScroll,Et=Le.flattenColumns,vt=Le.componentWidth;return D.useMemo(function(){var ft=_e(["body","wrapper"],"tbody"),ze=_e(["body","row"],"tr"),Qe=_e(["body","cell"],"td"),He;Re.length?He=Re.map(function(we,qe){var Ge=Je(we,qe);return D.createElement(A,{key:Ge,rowKey:Ge,record:we,recordKey:Ge,index:qe,rowComponent:ze,cellComponent:Qe,expandedKeys:le,onRow:$,getRowKey:Je,rowExpandable:te,childrenColumnName:de})}):He=D.createElement(S,{expanded:!0,className:"".concat(be,"-placeholder"),prefixCls:be,fixHeader:Ye,fixColumn:lt,horizonScroll:lt,component:ze,componentWidth:vt,cellComponent:Qe,colSpan:Et.length},ae);var me=Object(R.a)(Et);return D.createElement(ft,{className:"".concat(be,"-tbody")},tt&&D.createElement("tr",{"aria-hidden":"true",className:"".concat(be,"-measure-row"),style:{height:0}},me.map(function(we){return D.createElement(fe,{key:we,columnKey:we,onColumnResize:se})})),He)},[Re,be,$,tt,le,Je,_e,vt,ae,Et])}var Pe=D.memo(ye);Pe.displayName="Body";var xe=Pe,Ie=B("wRmb"),Me=B("xEkU"),ke=B.n(Me);function Ee(Ne){var Re=Object(D.useRef)(Ne),Je=Object(D.useState)({}),tt=Object(W.a)(Je,2),le=tt[1],$=Object(D.useRef)(null),te=Object(D.useRef)([]);function ae(de){$.current===null&&(te.current=[],$.current=ke()(function(){te.current.forEach(function(ie){Re.current=ie(Re.current)}),$.current=null,le({})})),te.current.push(de)}return Object(D.useEffect)(function(){return function(){ke.a.cancel($.current)}},[]),[Re.current,ae]}function J(Ne){var Re=Object(D.useRef)(Ne),Je=Object(D.useRef)(null);function tt(){window.clearTimeout(Je.current)}function le(te){Re.current=te,tt(),Je.current=window.setTimeout(function(){Re.current=null,Je.current=null},100)}function $(){return Re.current}return Object(D.useEffect)(function(){return tt},[]),[le,$]}function I(Ne,Re,Je){var tt=Object(D.useMemo)(function(){for(var le=[],$=[],te=0,ae=0,de=0;de<Re;de+=1)if(Je==="rtl"){$[de]=ae,ae+=Ne[de]||0;var ie=Re-de-1;le[ie]=te,te+=Ne[ie]||0}else{le[de]=te,te+=Ne[de]||0;var se=Re-de-1;$[se]=ae,ae+=Ne[se]||0}return{left:le,right:$}},[Ne,Re,Je]);return tt}var U=I;function K(Ne){var Re=Ne.className,Je=Ne.children;return D.createElement("div",{className:Re},Je)}var q=K,V=B("n6Qo");function ue(Ne){var Re,Je=Ne.prefixCls,tt=Ne.record,le=Ne.onExpand,$=Ne.expanded,te=Ne.expandable,ae="".concat(Je,"-row-expand-icon");if(!te)return D.createElement("span",{className:j()(ae,"".concat(Je,"-row-spaced"))});var de=function(se){le(tt,se),se.stopPropagation()};return D.createElement("span",{className:j()(ae,(Re={},Object(Z.a)(Re,"".concat(Je,"-row-expanded"),$),Object(Z.a)(Re,"".concat(Je,"-row-collapsed"),!$),Re)),onClick:de})}function Ae(Ne,Re,Je){var tt=[];function le($){($||[]).forEach(function(te,ae){tt.push(Re(te,ae)),le(te[Je])})}return le(Ne),tt}var Ue=B("zT1h"),ce=B("y0+3"),ge=function(Re,Je){var tt,le,$=Re.scrollBodyRef,te=Re.onScroll,ae=Re.offsetScroll,de=D.useContext(a.a),ie=de.prefixCls,se=((tt=$.current)===null||tt===void 0?void 0:tt.scrollWidth)||0,pe=((le=$.current)===null||le===void 0?void 0:le.clientWidth)||0,be=se&&pe*(pe/se),_e=D.useRef(),Le=Ee({scrollLeft:0,isHiddenScrollBar:!1}),Ye=Object(W.a)(Le,2),lt=Ye[0],Et=Ye[1],vt=D.useRef({delta:0,x:0}),ft=D.useState(!1),ze=Object(W.a)(ft,2),Qe=ze[0],He=ze[1],me=function(){He(!1)},we=function(je){je.persist(),vt.current.delta=je.pageX-lt.scrollLeft,vt.current.x=0,He(!0),je.preventDefault()},qe=function(je){var Ve,$e=je||((Ve=window)===null||Ve===void 0?void 0:Ve.event),it=$e.buttons;if(!Qe||it===0){Qe&&He(!1);return}var ut=vt.current.x+je.pageX-vt.current.x-vt.current.delta;ut<=0&&(ut=0),ut+be>=pe&&(ut=pe-be),te({scrollLeft:ut/pe*(se+2)}),vt.current.x=je.pageX},Ge=function(){var je=Object(ce.b)($.current).top,Ve=je+$.current.offsetHeight,$e=document.documentElement.scrollTop+window.innerHeight;Ve-Object(p.a)()<=$e||je>=$e-ae?Et(function(it){return Object(z.a)(Object(z.a)({},it),{},{isHiddenScrollBar:!0})}):Et(function(it){return Object(z.a)(Object(z.a)({},it),{},{isHiddenScrollBar:!1})})},pt=function(je){Et(function(Ve){return Object(z.a)(Object(z.a)({},Ve),{},{scrollLeft:je/se*pe||0})})};return D.useImperativeHandle(Je,function(){return{setScrollLeft:pt}}),D.useEffect(function(){var dt=Object(Ue.a)(document.body,"mouseup",me,!1),je=Object(Ue.a)(document.body,"mousemove",qe,!1);return Ge(),function(){dt.remove(),je.remove()}},[be,Qe]),D.useEffect(function(){var dt=Object(Ue.a)(window,"scroll",Ge,!1),je=Object(Ue.a)(window,"resize",Ge,!1);return function(){dt.remove(),je.remove()}},[]),D.useEffect(function(){lt.isHiddenScrollBar||Et(function(dt){var je,Ve;return Object(z.a)(Object(z.a)({},dt),{},{scrollLeft:$.current.scrollLeft/((je=$.current)===null||je===void 0?void 0:je.scrollWidth)*((Ve=$.current)===null||Ve===void 0?void 0:Ve.clientWidth)})})},[lt.isHiddenScrollBar]),se<=pe||!be||lt.isHiddenScrollBar?null:D.createElement("div",{style:{height:Object(p.a)(),width:pe,bottom:ae},className:"".concat(ie,"-sticky-scroll")},D.createElement("div",{onMouseDown:we,ref:_e,className:j()("".concat(ie,"-sticky-scroll-bar"),Object(Z.a)({},"".concat(ie,"-sticky-scroll-bar-active"),Qe)),style:{width:"".concat(be,"px"),transform:"translate3d(".concat(lt.scrollLeft,"px, 0, 0)")}}))},Te=D.forwardRef(ge);function Oe(Ne,Re){return D.useMemo(function(){var Je=!!Ne;return{isSticky:Je,stickyClassName:Je?"".concat(Re,"-sticky-header"):"",offsetHeader:Object(Y.a)(Ne)==="object"&&Ne.offsetHeader||0,offsetScroll:Object(Y.a)(Ne)==="object"&&Ne.offsetScroll||0}},[Ne,Re])}var Xe=[],rt={},st="rc-table-internal-hook",nt=D.memo(function(Ne){var Re=Ne.children;return Re},function(Ne,Re){return T()(Ne.props,Re.props)?Ne.pingLeft!==Re.pingLeft||Ne.pingRight!==Re.pingRight:!1});function bt(Ne){var Re,Je=Ne.prefixCls,tt=Ne.className,le=Ne.rowClassName,$=Ne.style,te=Ne.data,ae=Ne.rowKey,de=Ne.scroll,ie=Ne.tableLayout,se=Ne.direction,pe=Ne.title,be=Ne.footer,_e=Ne.summary,Le=Ne.id,Ye=Ne.showHeader,lt=Ne.components,Et=Ne.emptyText,vt=Ne.onRow,ft=Ne.onHeaderRow,ze=Ne.internalHooks,Qe=Ne.transformColumns,He=Ne.internalRefs,me=Ne.sticky,we=te||Xe,qe=!!we.length,Ge=D.useState(0),pt=Object(W.a)(Ge,2),dt=pt[0],je=pt[1];D.useEffect(function(){je(Object(p.a)())});var Ve=D.useMemo(function(){return Object(R.c)(lt,{})},[lt]),$e=D.useCallback(function(xn,mn){return Object(R.b)(Ve,xn)||mn},[Ve]),it=D.useMemo(function(){return typeof ae=="function"?ae:function(xn){var mn=xn&&xn[ae];return mn}},[ae]),ut=Object(b.c)(Ne),et=ut.expandIcon,Dt=ut.expandedRowKeys,Xt=ut.defaultExpandedRowKeys,gt=ut.defaultExpandAllRows,Ct=ut.expandedRowRender,Mt=ut.onExpand,St=ut.onExpandedRowsChange,kt=ut.expandRowByClick,Wt=ut.rowExpandable,dn=ut.expandIconColumnIndex,$t=ut.expandedRowClassName,ot=ut.childrenColumnName,Pt=ut.indentSize,Ht=et||ue,zt=ot||"children",Vt=D.useMemo(function(){return Ct?"row":Ne.expandable&&ze===st&&Ne.expandable.__PARENT_RENDER_ICON__||we.some(function(xn){return xn&&Object(Y.a)(xn)==="object"&&xn[zt]})?"nest":!1},[!!Ct,we]),nn=D.useState(function(){return Xt||(gt?Ae(we,it,zt):[])}),rn=Object(W.a)(nn,2),Lt=rn[0],En=rn[1],ct=D.useMemo(function(){return new Set(Dt||Lt||[])},[Dt,Lt]),wn=D.useCallback(function(xn){var mn=it(xn,we.indexOf(xn)),gn,lr=ct.has(mn);lr?(ct.delete(mn),gn=Object(N.a)(ct)):gn=[].concat(Object(N.a)(ct),[mn]),En(gn),Mt&&Mt(!lr,xn),St&&St(gn)},[it,ct,we,Mt,St]),pn=D.useState(0),Hn=Object(W.a)(pn,2),Mn=Hn[0],Dn=Hn[1],Un=Object(Ie.b)(Object(z.a)(Object(z.a)(Object(z.a)({},Ne),ut),{},{expandable:!!Ct,expandedKeys:ct,getRowKey:it,onTriggerExpand:wn,expandIcon:Ht,expandIconColumnIndex:dn,direction:se}),ze===st?Qe:null),kn=Object(W.a)(Un,2),Pn=kn[0],Sn=kn[1],br=D.useMemo(function(){return{columns:Pn,flattenColumns:Sn}},[Pn,Sn]),In=D.useRef(),_n=D.useRef(),or=D.useRef(),di=D.useState(!1),Fr=Object(W.a)(di,2),Gn=Fr[0],Ar=Fr[1],hi=D.useState(!1),Cr=Object(W.a)(hi,2),nr=Cr[0],Gr=Cr[1],fi=Ee(new Map),zr=Object(W.a)(fi,2),Vr=zr[0],pi=zr[1],Or=Object(R.a)(Sn),qr=Or.map(function(xn){return Vr.get(xn)}),$r=D.useMemo(function(){return qr},[qr.join("_")]),hr=U($r,Sn.length,se),Qn=de&&Object(R.d)(de.y),Yt=de&&Object(R.d)(de.x),Rr=Yt&&Sn.some(function(xn){var mn=xn.fixed;return mn}),Er=D.useRef(),Ce=Oe(me,Je),On=Ce.isSticky,ei=Ce.offsetHeader,mi=Ce.offsetScroll,ln=Ce.stickyClassName,ti,kr,jr;Qn&&(kr={overflowY:"scroll",maxHeight:de.y}),Yt&&(ti={overflowX:"auto"},Qn||(kr={overflowY:"hidden"}),jr={width:de.x===!0?"auto":de.x,minWidth:"100%"});var rr=D.useCallback(function(xn,mn){pi(function(gn){var lr=new Map(gn);return lr.set(xn,mn),lr})},[]),Ir=J(null),ni=Object(W.a)(Ir,2),fr=ni[0],ri=ni[1];function Dr(xn,mn){if(!mn)return;typeof mn=="function"?mn(xn):mn.scrollLeft!==xn&&(mn.scrollLeft=xn)}var pr=function(mn){var gn=mn.currentTarget,lr=mn.scrollLeft,ai=typeof lr=="number"?lr:gn.scrollLeft,Wr=gn||rt;if(!ri()||ri()===Wr){var Ui;fr(Wr),Dr(ai,_n.current),Dr(ai,or.current),Dr(ai,(Ui=Er.current)===null||Ui===void 0?void 0:Ui.setScrollLeft)}if(gn){var Bi=gn.scrollWidth,Ra=gn.clientWidth;Ar(ai>0),Gr(ai<Bi-Ra)}},ii=function(){or.current&&pr({currentTarget:or.current})},Bt=function(mn){var gn=mn.width;ii(),Dn(In.current?In.current.offsetWidth:gn)};D.useEffect(function(){return ii},[]),D.useEffect(function(){Yt&&ii()},[Yt]),D.useEffect(function(){ze===st&&He&&(He.body.current=or.current)});var Jt=$e(["table"],"table"),Kt=D.useMemo(function(){return ie||(Rr?de.x==="max-content"?"auto":"fixed":Qn||Sn.some(function(xn){var mn=xn.ellipsis;return mn})?"fixed":"auto")},[Qn,Rr,Sn,ie]),en,an={colWidths:$r,columCount:Sn.length,stickyOffsets:hr,onHeaderRow:ft,fixHeader:Qn},Tn=D.useMemo(function(){return qe?null:typeof Et=="function"?Et():Et},[qe,Et]),sn=D.createElement(xe,{data:we,measureColumnWidth:Qn||Yt||On,expandedKeys:ct,rowExpandable:Wt,getRowKey:it,onRow:vt,emptyNode:Tn,childrenColumnName:zt}),Bn=D.createElement(h,{colWidths:Sn.map(function(xn){var mn=xn.width;return mn}),columns:Sn}),qn=_e&&D.createElement(V.b,null,_e(we)),tn=$e(["body"]);if(Qn||On){var _r;typeof tn=="function"?(_r=tn(we,{scrollbarSize:dt,ref:or,onScroll:pr}),an.colWidths=Sn.map(function(xn,mn){var gn=xn.width,lr=mn===Pn.length-1?gn-dt:gn;return typeof lr=="number"&&!Number.isNaN(lr)?lr:(Object(v.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):_r=D.createElement("div",{style:Object(z.a)(Object(z.a)({},ti),kr),onScroll:pr,ref:or,className:j()("".concat(Je,"-body"))},D.createElement(Jt,{style:Object(z.a)(Object(z.a)({},jr),{},{tableLayout:Kt})},Bn,sn,qn),On&&D.createElement(Te,{ref:Er,offsetScroll:mi,scrollBodyRef:or,onScroll:pr})),en=D.createElement(D.Fragment,null,Ye!==!1&&D.createElement(m,Object.assign({noData:!we.length},an,br,{direction:se,offsetHeader:ei,stickyClassName:ln,ref:_n,onScroll:pr})),_r)}else en=D.createElement("div",{style:Object(z.a)(Object(z.a)({},ti),kr),className:j()("".concat(Je,"-content")),onScroll:pr,ref:or},D.createElement(Jt,{style:Object(z.a)(Object(z.a)({},jr),{},{tableLayout:Kt})},Bn,Ye!==!1&&D.createElement(_,Object.assign({},an,br)),sn,qn));var yn=Object(b.b)(Ne),Fn=D.createElement("div",Object.assign({className:j()(Je,tt,(Re={},Object(Z.a)(Re,"".concat(Je,"-rtl"),se==="rtl"),Object(Z.a)(Re,"".concat(Je,"-ping-left"),Gn),Object(Z.a)(Re,"".concat(Je,"-ping-right"),nr),Object(Z.a)(Re,"".concat(Je,"-layout-fixed"),ie==="fixed"),Object(Z.a)(Re,"".concat(Je,"-fixed-header"),Qn),Object(Z.a)(Re,"".concat(Je,"-fixed-column"),Rr),Object(Z.a)(Re,"".concat(Je,"-scroll-horizontal"),Yt),Object(Z.a)(Re,"".concat(Je,"-has-fix-left"),Sn[0]&&Sn[0].fixed),Object(Z.a)(Re,"".concat(Je,"-has-fix-right"),Sn[Sn.length-1]&&Sn[Sn.length-1].fixed==="right"),Re)),style:$,id:Le,ref:In},yn),D.createElement(nt,{pingLeft:Gn,pingRight:nr,props:Object(z.a)(Object(z.a)({},Ne),{},{stickyOffsets:hr,mergedExpandedKeys:ct})},pe&&D.createElement(q,{className:"".concat(Je,"-title")},pe(we)),D.createElement("div",{className:"".concat(Je,"-container")},en),be&&D.createElement(q,{className:"".concat(Je,"-footer")},be(we))));Yt&&(Fn=D.createElement(f.a,{onResize:Bt},Fn));var Yn=D.useMemo(function(){return{prefixCls:Je,getComponent:$e,scrollbarSize:dt,direction:se,fixedInfoList:Sn.map(function(xn,mn){return i(mn,mn,Sn,hr,se)}),isSticky:On}},[Je,$e,dt,se,Sn,hr,se,On]),mr=D.useMemo(function(){return Object(z.a)(Object(z.a)({},br),{},{tableLayout:Kt,rowClassName:le,expandedRowClassName:$t,componentWidth:Mn,fixHeader:Qn,fixColumn:Rr,horizonScroll:Yt,expandIcon:Ht,expandableType:Vt,expandRowByClick:kt,expandedRowRender:Ct,onTriggerExpand:wn,expandIconColumnIndex:dn,indentSize:Pt})},[br,Kt,le,$t,Mn,Qn,Rr,Yt,Ht,Vt,kt,Ct,wn,dn,Pt]),ea=D.useMemo(function(){return{onColumnResize:rr}},[rr]);return D.createElement(a.a.Provider,{value:Yn},D.createElement(k.Provider,{value:mr},D.createElement(ne.Provider,{value:ea},Fn)))}bt.Column=s.a,bt.ColumnGroup=c.a,bt.Summary=V.a,bt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var yt=he.b=bt},wRmb:function(Be,he,B){"use strict";B.d(he,"a",function(){return T});var Z=B("rePB"),z=B("KQm4"),N=B("VTBJ"),Y=B("Ff2n"),W=B("q1tI"),D=B.n(W),G=B("Kwbf"),j=B("Zm9Q"),n=B("hW8S");function T(s){return Object(j.a)(s).filter(function(d){return W.isValidElement(d)}).map(function(d){var u=d.key,l=d.props,a=l.children,i=Object(Y.a)(l,["children"]),R=Object(N.a)({key:u},i);return a&&(R.children=T(a)),R})}function v(s){return s.reduce(function(d,u){var l=u.fixed,a=l===!0?"left":l,i=u.children;return i&&i.length>0?[].concat(Object(z.a)(d),Object(z.a)(v(i).map(function(R){return Object(N.a)({fixed:a},R)}))):[].concat(Object(z.a)(d),[Object(N.a)(Object(N.a)({},u),{},{fixed:a})])},[])}function f(s){for(var d=!0,u=0;u<s.length;u+=1){var l=s[u];if(d&&l.fixed!=="left")d=!1;else if(!d&&l.fixed==="left"){Object(G.a)(!1,"Index ".concat(u-1," of `columns` missing `fixed='left'` prop."));break}}for(var a=!0,i=s.length-1;i>=0;i-=1){var R=s[i];if(a&&R.fixed!=="right")a=!1;else if(!a&&R.fixed==="right"){Object(G.a)(!1,"Index ".concat(i+1," of `columns` missing `fixed='right'` prop."));break}}}function p(s){return s.map(function(d){var u=d.fixed,l=Object(Y.a)(d,["fixed"]),a=u;return u==="left"?a="right":u==="right"&&(a="left"),Object(N.a)({fixed:a},l)})}function c(s,d){var u=s.prefixCls,l=s.columns,a=s.children,i=s.expandable,R=s.expandedKeys,O=s.getRowKey,w=s.onTriggerExpand,M=s.expandIcon,L=s.rowExpandable,_=s.expandIconColumnIndex,b=s.direction,g=s.expandRowByClick,h=W.useMemo(function(){return l||T(a)},[l,a]),C=W.useMemo(function(){if(i){var P,k=_||0,y=h[k],S=(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(X,ne,fe){var ye=O(ne,fe),Pe=R.has(ye),xe=L?L(ne):!0,Ie=M({prefixCls:u,expanded:Pe,expandable:xe,record:ne,onExpand:w});return g?W.createElement("span",{onClick:function(ke){return ke.stopPropagation()}},Ie):Ie}),P),F=h.slice();return k>=0&&F.splice(k,0,S),F}return h},[i,h,O,R,M,b]),x=W.useMemo(function(){var P=C;return d&&(P=d(P)),P.length||(P=[{render:function(){return null}}]),P},[d,C,b]),m=W.useMemo(function(){return b==="rtl"?p(v(x)):v(x)},[x,b]);return[x,m]}he.b=c},wU8J:function(Be,he){function B(){this.buffer=new Array,this.length=0}B.prototype={get:function(Z){var z=Math.floor(Z/8);return(this.buffer[z]>>>7-Z%8&1)==1},put:function(Z,z){for(var N=0;N<z;N++)this.putBit((Z>>>z-N-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(Z){var z=Math.floor(this.length/8);this.buffer.length<=z&&this.buffer.push(0),Z&&(this.buffer[z]|=128>>>this.length%8),this.length++}},Be.exports=B},"y0+3":function(Be,he,B){"use strict";B.d(he,"a",function(){return v}),B.d(he,"b",function(){return p});var Z=/margin|padding|width|height|max|min|offset/,z={left:!0,top:!0},N={cssFloat:1,styleFloat:1,float:1};function Y(c){return c.nodeType===1?c.ownerDocument.defaultView.getComputedStyle(c,null):{}}function W(c,s,d){if(s=s.toLowerCase(),d==="auto"){if(s==="height")return c.offsetHeight;if(s==="width")return c.offsetWidth}return s in z||(z[s]=Z.test(s)),z[s]?parseFloat(d)||0:d}function D(c,s){var d=arguments.length,u=Y(c);return s=N[s]?"cssFloat"in c.style?"cssFloat":"styleFloat":s,d===1?u:W(c,s,u[s]||c.style[s])}function G(c,s,d){var u=arguments.length;if(s=N[s]?"cssFloat"in c.style?"cssFloat":"styleFloat":s,u===3)return typeof d=="number"&&Z.test(s)&&(d="".concat(d,"px")),c.style[s]=d,d;for(var l in s)s.hasOwnProperty(l)&&G(c,l,s[l]);return Y(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 T(){var c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),s=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:c,height:s}}function v(){var c=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:c,height:s}}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 s=c.getBoundingClientRect(),d=document.documentElement;return{left:s.left+(window.pageXOffset||d.scrollLeft)-(d.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||d.scrollTop)-(d.clientTop||document.body.clientTop||0)}}},yslc:function(Be,he){Be.exports="data:image/png;base64,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"}}]);