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__Shixuns__Edit__body__Lev...

345 lines
753 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[222,7,9,10],{"+NIl":function(Pe,we,p){(function(W){W(p("VrN/"))})(function(W){"use strict";W.defineMode("stex",function(xe,me){"use strict";function Z(se,ee){se.cmdState.push(ee)}function x(se){return se.cmdState.length>0?se.cmdState[se.cmdState.length-1]:null}function ke(se){var ee=se.cmdState.pop();ee&&ee.closeBracket()}function P(se){for(var ee=se.cmdState,U=ee.length-1;U>=0;U--){var R=ee[U];if(R.name=="DEFAULT")continue;return R}return{styleIdentifier:function(){return null}}}function $(se,ee,U){return function(){this.name=se,this.bracketNo=0,this.style=ee,this.styles=U,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ce={};ce.importmodule=$("importmodule","tag",["string","builtin"]),ce.documentclass=$("documentclass","tag",["","atom"]),ce.usepackage=$("usepackage","tag",["atom"]),ce.begin=$("begin","tag",["atom"]),ce.end=$("end","tag",["atom"]),ce.label=$("label","tag",["atom"]),ce.ref=$("ref","tag",["atom"]),ce.eqref=$("eqref","tag",["atom"]),ce.cite=$("cite","tag",["atom"]),ce.bibitem=$("bibitem","tag",["atom"]),ce.Bibitem=$("Bibitem","tag",["atom"]),ce.RBibitem=$("RBibitem","tag",["atom"]),ce.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ye(se,ee){se.f=ee}function _(se,ee){var U;if(se.match(/^\\[a-zA-Z@]+/)){var R=se.current().slice(1);return U=ce.hasOwnProperty(R)?ce[R]:ce.DEFAULT,U=new U,Z(ee,U),ye(ee,Ce),U.style}if(se.match(/^\\[$&%#{}_]/))return"tag";if(se.match(/^\\[,;!\/\\]/))return"tag";if(se.match("\\["))return ye(ee,function(te,Ae){return V(te,Ae,"\\]")}),"keyword";if(se.match("\\("))return ye(ee,function(te,Ae){return V(te,Ae,"\\)")}),"keyword";if(se.match("$$"))return ye(ee,function(te,Ae){return V(te,Ae,"$$")}),"keyword";if(se.match("$"))return ye(ee,function(te,Ae){return V(te,Ae,"$")}),"keyword";var k=se.next();if(k=="%")return se.skipToEnd(),"comment";if(k=="}"||k=="]"){if(U=x(ee),U)U.closeBracket(k),ye(ee,Ce);else return"error";return"bracket"}else return k=="{"||k=="["?(U=ce.DEFAULT,U=new U,Z(ee,U),"bracket"):/\d/.test(k)?(se.eatWhile(/[\w.%]/),"atom"):(se.eatWhile(/[\w\-_]/),U=P(ee),U.name=="begin"&&(U.argument=se.current()),U.styleIdentifier())}function V(se,ee,U){if(se.eatSpace())return null;if(U&&se.match(U))return ye(ee,_),"keyword";if(se.match(/^\\[a-zA-Z@]+/))return"tag";if(se.match(/^[a-zA-Z]+/))return"variable-2";if(se.match(/^\\[$&%#{}_]/))return"tag";if(se.match(/^\\[,;!\/]/))return"tag";if(se.match(/^[\^_&]/))return"tag";if(se.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(se.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var R=se.next();return R=="{"||R=="}"||R=="["||R=="]"||R=="("||R==")"?"bracket":R=="%"?(se.skipToEnd(),"comment"):"error"}function Ce(se,ee){var U=se.peek(),R;return U=="{"||U=="["?(R=x(ee),R.openBracket(U),se.eat(U),ye(ee,_),"bracket"):/[ \t\r]/.test(U)?(se.eat(U),null):(ye(ee,_),ke(ee),_(se,ee))}return{startState:function(){var se=me.inMathMode?function(ee,U){return V(ee,U)}:_;return{cmdState:[],f:se}},copyState:function(se){return{cmdState:se.cmdState.slice(),f:se.f}},token:function(se,ee){return ee.f(se,ee)},blankLine:function(se){se.f=_,se.cmdState.length=0},lineComment:"%"}}),W.defineMIME("text/x-stex","stex"),W.defineMIME("text/x-latex","stex")})},"/GNS":function(Pe,we,p){Pe.exports=p.p+"static/search1.c4136dd4.png"},"19Vz":function(Pe,we,p){(function(W){W(p("VrN/"))})(function(W){W.defineOption("placeholder","",function($,ce,ye){var _=ye&&ye!=W.Init;if(ce&&!_)$.on("blur",x),$.on("change",ke),$.on("swapDoc",ke),W.on($.getInputField(),"compositionupdate",$.state.placeholderCompose=function(){Z($)}),ke($);else if(!ce&&_){$.off("blur",x),$.off("change",ke),$.off("swapDoc",ke),W.off($.getInputField(),"compositionupdate",$.state.placeholderCompose),xe($);var V=$.getWrapperElement();V.className=V.className.replace(" CodeMirror-empty","")}ce&&!$.hasFocus()&&x($)});function xe($){$.state.placeholder&&($.state.placeholder.parentNode.removeChild($.state.placeholder),$.state.placeholder=null)}function me($){xe($);var ce=$.state.placeholder=document.createElement("pre");ce.style.cssText="height: 0; overflow: visible",ce.style.direction=$.getOption("direction"),ce.className="CodeMirror-placeholder CodeMirror-line-like";var ye=$.getOption("placeholder");typeof ye=="string"&&(ye=document.createTextNode(ye)),ce.appendChild(ye),$.display.lineSpace.insertBefore(ce,$.display.lineSpace.firstChild)}function Z($){setTimeout(function(){var ce=!1,ye=$.getInputField();ye.nodeName=="TEXTAREA"?ce=!ye.value:$.lineCount()==1&&(ce=!/[^\u200b]/.test(ye.querySelector(".CodeMirror-line").textContent)),ce?me($):xe($)},20)}function x($){P($)&&me($)}function ke($){var ce=$.getWrapperElement(),ye=P($);ce.className=ce.className.replace(" CodeMirror-empty","")+(ye?" CodeMirror-empty":""),ye?me($):xe($)}function P($){return $.lineCount()===1&&$.getLine(0)===""}})},"1eCo":function(Pe,we,p){(function(W){W(p("VrN/"))})(function(W){"use strict";var xe={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},me={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};W.defineMode("xml",function(Z,x){var ke=Z.indentUnit,P={},$=x.htmlMode?xe:me;for(var ce in $)P[ce]=$[ce];for(var ce in x)P[ce]=x[ce];var ye,_;function V(M,ve){function re(Re){return ve.tokenize=Re,Re(M,ve)}var B=M.next();if(B=="<")return M.eat("!")?M.eat("[")?M.match("CDATA[")?re(ee("atom","]]>")):null:M.match("--")?re(ee("comment","-->")):M.match("DOCTYPE",!0,!0)?(M.eatWhile(/[\w\._\-]/),re(U(1))):null:M.eat("?")?(M.eatWhile(/[\w\._\-]/),ve.tokenize=ee("meta","?>"),"meta"):(ye=M.eat("/")?"closeTag":"openTag",ve.tokenize=Ce,"tag bracket");if(B=="&"){var Ee;return M.eat("#")?M.eat("x")?Ee=M.eatWhile(/[a-fA-F\d]/)&&M.eat(";"):Ee=M.eatWhile(/[\d]/)&&M.eat(";"):Ee=M.eatWhile(/[\w\.\-:]/)&&M.eat(";"),Ee?"atom":"error"}else return M.eatWhile(/[^&<]/),null}V.isInText=!0;function Ce(M,ve){var re=M.next();if(re==">"||re=="/"&&M.eat(">"))return ve.tokenize=V,ye=re==">"?"endTag":"selfcloseTag","tag bracket";if(re=="=")return ye="equals",null;if(re=="<"){ve.tokenize=V,ve.state=Ae,ve.tagName=ve.tagStart=null;var B=ve.tokenize(M,ve);return B?B+" tag error":"tag error"}else return/[\'\"]/.test(re)?(ve.tokenize=se(re),ve.stringStartCol=M.column(),ve.tokenize(M,ve)):(M.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function se(M){var ve=function(re,B){for(;!re.eol();)if(re.next()==M){B.tokenize=Ce;break}return"string"};return ve.isInAttribute=!0,ve}function ee(M,ve){return function(re,B){for(;!re.eol();){if(re.match(ve)){B.tokenize=V;break}re.next()}return M}}function U(M){return function(ve,re){for(var B;(B=ve.next())!=null;){if(B=="<")return re.tokenize=U(M+1),re.tokenize(ve,re);if(B==">")if(M==1){re.tokenize=V;break}else return re.tokenize=U(M-1),re.tokenize(ve,re)}return"meta"}}function R(M,ve,re){this.prev=M.context,this.tagName=ve,this.indent=M.indented,this.startOfLine=re,(P.doNotIndent.hasOwnProperty(ve)||M.context&&M.context.noIndent)&&(this.noIndent=!0)}function k(M){M.context&&(M.context=M.context.prev)}function te(M,ve){for(var re;;){if(!M.context)return;if(re=M.context.tagName,!P.contextGrabbers.hasOwnProperty(re)||!P.contextGrabbers[re].hasOwnProperty(ve))return;k(M)}}function Ae(M,ve,re){return M=="openTag"?(re.tagStart=ve.column(),Fe):M=="closeTag"?be:Ae}function Fe(M,ve,re){return M=="word"?(re.tagName=ve.current(),_="tag",ue):P.allowMissingTagName&&M=="endTag"?(_="tag bracket",ue(M,ve,re)):(_="error",Fe)}function be(M,ve,re){if(M=="word"){var B=ve.current();return re.context&&re.context.tagName!=B&&P.implicitlyClosed.hasOwnProperty(re.context.tagName)&&k(re),re.context&&re.context.tagName==B||P.matchClosing===!1?(_="tag",he):(_="tag error",He)}else return P.allowMissingTagName&&M=="endTag"?(_="tag bracket",he(M,ve,re)):(_="error",He)}function he(M,ve,re){return M!="endTag"?(_="error",he):(k(re),Ae)}function He(M,ve,re){return _="error",he(M,ve,re)}function ue(M,ve,re){if(M=="word")return _="attribute",ge;if(M=="endTag"||M=="selfcloseTag"){var B=re.tagName,Ee=re.tagStart;return re.tagName=re.tagStart=null,M=="selfcloseTag"||P.autoSelfClosers.hasOwnProperty(B)?te(re,B):(te(re,B),re.context=new R(re,B,Ee==re.indented)),Ae}return _="error",ue}function ge(M,ve,re){return M=="equals"?Ie:(P.allowMissing||(_="error"),ue(M,ve,re))}function Ie(M,ve,re){return M=="string"?pe:M=="word"&&P.allowUnquoted?(_="string",ue):(_="error",ue(M,ve,re))}function pe(M,ve,re){return M=="string"?pe:ue(M,ve,re)}return{startState:function(M){var ve={tokenize:V,state:Ae,indented:M||0,tagName:null,tagStart:null,context:null};return M!=null&&(ve.baseIndent=M),ve},token:function(M,ve){if(!ve.tagName&&M.sol()&&(ve.indented=M.indentation()),M.eatSpace())return null;ye=null;var re=ve.tokenize(M,ve);return(re||ye)&&re!="comment"&&(_=null,ve.state=ve.state(ye||re,M,ve),_&&(re=_=="error"?re+" error":_)),re},indent:function(M,ve,re){var B=M.context;if(M.tokenize.isInAttribute)return M.tagStart==M.indented?M.stringStartCol+1:M.indented+ke;if(B&&B.noIndent)return W.Pass;if(M.tokenize!=Ce&&M.tokenize!=V)return re?re.match(/^(\s*)/)[0].length:0;if(M.tagName)return P.multilineTagIndentPastTag!==!1?M.tagStart+M.tagName.length+2:M.tagStart+ke*(P.multilineTagIndentFactor||1);if(P.alignCDATA&&/<!\[CDATA\[/.test(ve))return 0;var Ee=ve&&/^<(\/)?([\w_:\.-]*)/.exec(ve);if(Ee&&Ee[1])for(;B;)if(B.tagName==Ee[2]){B=B.prev;break}else if(P.implicitlyClosed.hasOwnProperty(B.tagName))B=B.prev;else break;else if(Ee)for(;B;){var Re=P.contextGrabbers[B.tagName];if(Re&&Re.hasOwnProperty(Ee[2]))B=B.prev;else break}for(;B&&B.prev&&!B.startOfLine;)B=B.prev;return B?B.indent+ke:M.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:P.htmlMode?"html":"xml",helperType:P.htmlMode?"html":"xml",skipAttribute:function(M){M.state==Ie&&(M.state=ue)},xmlCurrentTag:function(M){return M.tagName?{name:M.tagName,close:M.type=="closeTag"}:null},xmlCurrentContext:function(M){for(var ve=[],re=M.context;re;re=re.prev)re.tagName&&ve.push(re.tagName);return ve.reverse()}}}),W.defineMIME("text/xml","xml"),W.defineMIME("application/xml","xml"),W.mimeModes.hasOwnProperty("text/html")||W.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"4qgm":function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB8imq/lvAWWHdWpOGySIqYEwvKk1mtsmtl5/M72WNk4Wf6dj8jIAqce1qGJEparsgSHQVoIar3M3GRadWnDp+rb5eyJi0RaykgCy47q9DS1srDUvLRzme+YFXhg5CY2YD4uf/RdVrROkffCGgk13vQ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L3s8wz88syAm8x89M5iLmoxpIP4348bRYkolEyxowBkA25S1sLQJbyHhfhUCaWvMT9+fPnx5h5cQrMuugRceAEgDsdlKfTVph2rwMgC4mk37gWSz5L3DcZ+1EckAw0L44FM4/4vq+aZfr7+zu6urq2MbPMoSuavieSt9b6zJyU7+OonXVygIjWKKUOxCGFhaA4cj0AF/KS7z8D4DmMfpTIGdcQOgtgldZaJlpss9auA/B1q/Kgrhjm+08B3JuEF/ediE44T2IikiOP1Uqp7/IYDePeElFvXhwAY2nTqJCXkTiZ1XgBcT9jmplHxYEd4SR04kRER0ul0ur169dLWKVqYb7/IpVSjHB9IctSShzQWq9JQySMeyG/MI1ewhxYnqeYq2itnePYGPMmgO6iyAP4v5gTwBzl9Cta68RdnDHmWQAtz3WyOjRTTodZYSsRvZoRbLvWemeU7vDw8P2e532eETtSjZmf931/d31HtkguHdIWUw3oWmttm60NDQ1dVS6XZat6V8EOTMplitwpNJ5K7ALwQg5Da7XWszbnxphRAE/lwIxSnQnd5mMVGYWsZ///MvMK3/ePiFVjjFyADLSBvCyo0vuzj1VCo3J5kflgi5lPE9EKIprHzFIqtKO1PtiqWzLGyIb6oRyW5ZynBOCOHBhRqmNa61nHnhedjQZBcDsRycS7pg0E8kD+LZse3/d/agS5/I7XG0JpI4B9ebqsQN1NWuuWly2X7xVTvfestXfXarWDRHRTgT2aCMXMv3metzJp/5F4SymWhoaG5pfLZVlpL9k1a7VaVRs2bEi89HZyIOwu2b1tukQX3TL3OHGYsjw1GBwc7Oro6Kg7UthTA7mhn5yc3NfX1ycPQ5xbmhGYBSqPPYhINkMPAJDHHrJ4pWlTAOShx1FmvnSPPVoxbHxu43neAmauP7eRf2nTz2yI6FStViv0uc1/ndZCH8rgOooAAAAASUVORK5CYII="},"7Cbv":function(Pe,we,p){"use strict";var W=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),xe=new Uint8Array(16);function me(){if(!W)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return W(xe)}var Z=/^(?:[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 x(Ce){return typeof Ce=="string"&&Z.test(Ce)}for(var ke=x,P=[],$=0;$<256;++$)P.push(($+256).toString(16).substr(1));function ce(Ce){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ee=(P[Ce[se+0]]+P[Ce[se+1]]+P[Ce[se+2]]+P[Ce[se+3]]+"-"+P[Ce[se+4]]+P[Ce[se+5]]+"-"+P[Ce[se+6]]+P[Ce[se+7]]+"-"+P[Ce[se+8]]+P[Ce[se+9]]+"-"+P[Ce[se+10]]+P[Ce[se+11]]+P[Ce[se+12]]+P[Ce[se+13]]+P[Ce[se+14]]+P[Ce[se+15]]).toLowerCase();if(!ke(ee))throw TypeError("Stringified UUID is invalid");return ee}var ye=ce;function _(Ce,se,ee){Ce=Ce||{};var U=Ce.random||(Ce.rng||me)();if(U[6]=U[6]&15|64,U[8]=U[8]&63|128,se){ee=ee||0;for(var R=0;R<16;++R)se[ee+R]=U[R];return se}return ye(U)}var V=we.a=_},"7ZXX":function(Pe,we,p){Pe.exports=p.p+"static/err.6e7c5817.png"},"7ahc":function(Pe,we,p){"use strict";p.d(we,"a",function(){return Fe});var W=p("k1fw"),xe=p("0Owb"),me=p("+L6B"),Z=p("2/Rp"),x=p("y8nQ"),ke=p("Vl3Y"),P=p("tJVT"),$=p("OaEy"),ce=p("2fM7"),ye=p("q1tI"),_=p.n(ye),V=p("VrN/"),Ce=p.n(V),se=p("p77/"),ee=p.n(se),U=p("c5Ni"),R=p.n(U),k=ce.a.Option,te={labelCol:{span:4},wrapperCol:{span:20}},Ae={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};we.b=function(be){var he=be.callback,He=be.onCancel,ue=Object(ye.useState)("python"),ge=Object(P.a)(ue,2),Ie=ge[0],pe=ge[1];function M(re){pe(Ae[re][1])}function ve(re){he(re)}return _.a.createElement(ke.a,Object(xe.a)({},te,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:ve}),_.a.createElement(ke.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},_.a.createElement(ce.a,{onChange:M},Object.keys(Ae).map(function(re){return _.a.createElement(k,{key:re,value:re},Ae[re][0])}))),_.a.createElement(ke.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},_.a.createElement(Fe,{mode:Ie})),_.a.createElement("div",{className:"flex-container flex-end"},_.a.createElement(Z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),_.a.createElement(Z.a,{type:"ghost",onClick:He},"\u53D6\u6D88")))};function Fe(be){var he=be.value,He=be.onChange,ue=be.mode,ge=be.options,Ie=ge===void 0?{}:ge,pe=Object(ye.useRef)(),M=Object(ye.useState)(),ve=Object(P.a)(M,2),re=ve[0],B=ve[1];return Object(ye.useEffect)(function(){if(re){function Ee(Re){var fe=Re.getValue();He&&He(fe)}return re.on("change",Ee),function(){re.off("change",Ee)}}},[re,He]),Object(ye.useEffect)(function(){re&&re.setOption("mode",ue)},[re,ue]),Object(ye.useEffect)(function(){re&&((he!==re.getValue()||he==="")&&setTimeout(function(){re.setValue(he||" ")},300))},[re,he]),Object(ye.useEffect)(function(){if(pe.current&&!re){var Ee=Ce.a.fromTextArea(pe.current,Object(W.a)({mode:ue,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ie));B(Ee)}},[pe.current,re]),_.a.createElement("div",{className:"my-codemirror-container"},_.a.createElement("textarea",{ref:pe}))}},"7ixt":function(Pe,we,p){"use strict";p.d(we,"a",function(){return me});var W={adjustX:1,adjustY:1},xe=[0,0],me={left:{points:["cr","cl"],overflow:W,offset:[-4,0],targetOffset:xe},right:{points:["cl","cr"],overflow:W,offset:[4,0],targetOffset:xe},top:{points:["bc","tc"],overflow:W,offset:[0,-4],targetOffset:xe},bottom:{points:["tc","bc"],overflow:W,offset:[0,4],targetOffset:xe},topLeft:{points:["bl","tl"],overflow:W,offset:[0,-4],targetOffset:xe},leftTop:{points:["tr","tl"],overflow:W,offset:[-4,0],targetOffset:xe},topRight:{points:["br","tr"],overflow:W,offset:[0,-4],targetOffset:xe},rightTop:{points:["tl","tr"],overflow:W,offset:[4,0],targetOffset:xe},bottomRight:{points:["tr","br"],overflow:W,offset:[0,4],targetOffset:xe},rightBottom:{points:["bl","br"],overflow:W,offset:[4,0],targetOffset:xe},bottomLeft:{points:["tl","bl"],overflow:W,offset:[0,4],targetOffset:xe},leftBottom:{points:["br","bl"],overflow:W,offset:[-4,0],targetOffset:xe}},Z=me},"7v3h":function(Pe,we,p){Pe.exports=p.p+"static/empty2.dd73f390.png"},"8/bI":function(Pe,we,p){Pe.exports=p.p+"static/empty.8918e228.png"},"8EBN":function(Pe,we,p){(function(W){W(p("VrN/"))})(function(W){"use strict";W.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 xe=0;xe<W.modeInfo.length;xe++){var me=W.modeInfo[xe];me.mimes&&(me.mime=me.mimes[0])}W.findModeByMIME=function(Z){Z=Z.toLowerCase();for(var x=0;x<W.modeInfo.length;x++){var ke=W.modeInfo[x];if(ke.mime==Z)return ke;if(ke.mimes){for(var P=0;P<ke.mimes.length;P++)if(ke.mimes[P]==Z)return ke}}if(/\+xml$/.test(Z))return W.findModeByMIME("application/xml");if(/\+json$/.test(Z))return W.findModeByMIME("application/json")},W.findModeByExtension=function(Z){Z=Z.toLowerCase();for(var x=0;x<W.modeInfo.length;x++){var ke=W.modeInfo[x];if(ke.ext){for(var P=0;P<ke.ext.length;P++)if(ke.ext[P]==Z)return ke}}},W.findModeByFileName=function(Z){for(var x=0;x<W.modeInfo.length;x++){var ke=W.modeInfo[x];if(ke.file&&ke.file.test(Z))return ke}var P=Z.lastIndexOf("."),$=P>-1&&Z.substring(P+1,Z.length);if($)return W.findModeByExtension($)},W.findModeByName=function(Z){Z=Z.toLowerCase();for(var x=0;x<W.modeInfo.length;x++){var ke=W.modeInfo[x];if(ke.name.toLowerCase()==Z)return ke;if(ke.alias){for(var P=0;P<ke.alias.length;P++)if(ke.alias[P].toLowerCase()==Z)return ke}}}})},"8hTe":function(Pe,we,p){Pe.exports={button:"button___1wy9m"}},"9Bee":function(Pe,we,p){"use strict";var W=p("DYRE"),xe=p("zeV3"),me=p("+L6B"),Z=p("2/Rp"),x=p("k1fw"),ke=p("9og8"),P=p("tJVT"),$=p("WmNS"),ce=p.n($),ye=p("q1tI"),_=p.n(ye),V=p("vg9a"),Ce=p("DlQD"),se=p.n(Ce),ee=p("rUJ1");function U(d,r){var a=d.match(/^(\s+)(?:```)/);if(a===null)return r;var u=a[1];return r.split(`
`).map(function(h){var c=h.match(/^\s+/);if(c===null)return h;var z=Object(P.a)(c,1),_e=z[0];return _e.length>=u.length?h.slice(u.length):h}).join(`
`)}var R=[],k=["<ul>"],te=new se.a.Renderer,Ae=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Fe(){R.length=0,k=["<ul>"]}var be={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function he(d,r,a,u){if(r>=d.length||d[r].level<=a)return r;var h=d[r];u.push("<li><a href='#"+h.anchor+"'>"+h.text+"</a>"),r++;var c=[];return r=he(d,r,h.level,c),c.length>0&&(u.push("<ul>"),c.forEach(function(z){u.push(z)}),u.push("</ul>")),u.push("</li>"),r=he(d,r,a,u),r}function He(){return he(R,0,0,k),k.push("</ul>"),k.join("")}var ue={heading:function(r){var a=Ae.exec(r);if(a)return{type:"heading",raw:a[0],depth:a[1].length,text:a[2]}},fences:function(r){var a=this.rules.block.fences.exec(r);if(a){var u=a[0],h=U(u,a[3]||""),c=a[2]?a[2].trim():a[2];if(["latex","katex","math"].indexOf(c)>=0){var z=pe(),_e=h;h=z,M[z]={type:"block",expression:_e}}return{type:"code",raw:u,lang:c,text:h}}}},ge=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Ie=0,pe=function(){return"__special_katext_id_".concat(Ie++,"__")},M={};function ve(){return M}function re(){Ie=0,M={}}function B(d){return d=d.replace(ge,function(r,a){var u=pe();return M[u]={type:"inline",expression:a},u}),d}var Ee=te.listitem;te.listitem=function(d){return Ee(B(d))};var Re=te.paragraph;te.paragraph=function(d){return Re(B(d))};var fe=te.tablecell;te.tablecell=function(d,r){return fe(B(d),r)},te.code=function(d,r,a){var u=(r||"").match(/\S*/)[0];return u?["latex","katex","math"].indexOf(u)>=0?"<p class='editormd-tex'>".concat(d,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(r,'">').concat(a?d:Object(ee.escape)(d,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(a?d:Object(ee.escape)(d,!0))+"</code></pre>"},te.heading=function(d,r,a){var u=this.options.headerPrefix+a.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return R.push({anchor:u,level:r,text:d}),"<h"+r+' id="'+u+'">'+d+"</h"+r+">"},se.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),se.a.use({tokenizer:ue,renderer:te});var et=se.a,O=p("SJMd"),y=p("ulZh"),le=p.n(y),je=p("m3rI"),Be=p("Oy/b"),tt=p("p5ED"),xt=p("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Qe=function(d,r){return(Qe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)Object.prototype.hasOwnProperty.call(u,h)&&(a[h]=u[h])})(d,r)};function Je(d,r){function a(){this.constructor=d}Qe(d,r),d.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}function Ue(d,r,a,u){return new(a||(a=Promise))(function(h,c){function z(Mt){try{ut(u.next(Mt))}catch(ze){c(ze)}}function _e(Mt){try{ut(u.throw(Mt))}catch(ze){c(ze)}}function ut(Mt){var ze;Mt.done?h(Mt.value):(ze=Mt.value,ze instanceof a?ze:new a(function(Et){Et(ze)})).then(z,_e)}ut((u=u.apply(d,r||[])).next())})}function Ve(d,r){var a,u,h,c,z={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return c={next:_e(0),throw:_e(1),return:_e(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function _e(ut){return function(Mt){return function(ze){if(a)throw new TypeError("Generator is already executing.");for(;z;)try{if(a=1,u&&(h=2&ze[0]?u.return:ze[0]?u.throw||((h=u.return)&&h.call(u),0):u.next)&&!(h=h.call(u,ze[1])).done)return h;switch(u=0,h&&(ze=[2&ze[0],h.value]),ze[0]){case 0:case 1:h=ze;break;case 4:return z.label++,{value:ze[1],done:!1};case 5:z.label++,u=ze[1],ze=[0];continue;case 7:ze=z.ops.pop(),z.trys.pop();continue;default:if(!(h=z.trys,(h=h.length>0&&h[h.length-1])||ze[0]!==6&&ze[0]!==2)){z=0;continue}if(ze[0]===3&&(!h||ze[1]>h[0]&&ze[1]<h[3])){z.label=ze[1];break}if(ze[0]===6&&z.label<h[1]){z.label=h[1],h=ze;break}if(h&&z.label<h[2]){z.label=h[2],z.ops.push(ze);break}h[2]&&z.ops.pop(),z.trys.pop();continue}ze=r.call(d,z)}catch(Et){ze=[6,Et],u=0}finally{a=h=0}if(5&ze[0])throw ze[1];return{value:ze[0]?ze[1]:void 0,done:!0}}([ut,Mt])}}}function oe(){for(var d=0,r=0,a=arguments.length;r<a;r++)d+=arguments[r].length;var u=Array(d),h=0;for(r=0;r<a;r++)for(var c=arguments[r],z=0,_e=c.length;z<_e;z++,h++)u[h]=c[z];return u}var D=function(){function d(){}return d.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},d.setAttributes=function(r,a){for(var u=0,h=a;u<h.length;u++){var c=h[u],z=c[0],_e=c[1];r.setAttribute(z,_e)}},d.createRect=function(r,a,u){var h=document.createElementNS("http://www.w3.org/2000/svg","rect");return h.setAttribute("width",r.toString()),h.setAttribute("height",a.toString()),u&&d.setAttributes(h,u),h},d.createLine=function(r,a,u,h,c){var z=document.createElementNS("http://www.w3.org/2000/svg","line");return z.setAttribute("x1",r.toString()),z.setAttribute("y1",a.toString()),z.setAttribute("x2",u.toString()),z.setAttribute("y2",h.toString()),c&&d.setAttributes(z,c),z},d.createPolygon=function(r,a){var u=document.createElementNS("http://www.w3.org/2000/svg","polygon");return u.setAttribute("points",r),a&&d.setAttributes(u,a),u},d.createCircle=function(r,a){var u=document.createElementNS("http://www.w3.org/2000/svg","circle");return u.setAttribute("cx",(r/2).toString()),u.setAttribute("cy",(r/2).toString()),u.setAttribute("r",r.toString()),a&&d.setAttributes(u,a),u},d.createEllipse=function(r,a,u){var h=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return h.setAttribute("cx",(r/2).toString()),h.setAttribute("cy",(a/2).toString()),h.setAttribute("rx",(r/2).toString()),h.setAttribute("ry",(a/2).toString()),u&&d.setAttributes(h,u),h},d.createGroup=function(r){var a=document.createElementNS("http://www.w3.org/2000/svg","g");return r&&d.setAttributes(a,r),a},d.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},d.createMarker=function(r,a,u,h,c,z,_e){var ut=document.createElementNS("http://www.w3.org/2000/svg","marker");return d.setAttributes(ut,[["id",r],["orient",a],["markerWidth",u.toString()],["markerHeight",h.toString()],["refX",c.toString()],["refY",z.toString()]]),ut.appendChild(_e),ut},d.createText=function(r){var a=document.createElementNS("http://www.w3.org/2000/svg","text");return a.setAttribute("x","0"),a.setAttribute("y","0"),r&&d.setAttributes(a,r),a},d.createTSpan=function(r,a){var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");return u.textContent=r,a&&d.setAttributes(u,a),u},d.createImage=function(r){var a=document.createElementNS("http://www.w3.org/2000/svg","image");return r&&d.setAttributes(a,r),a},d.createPoint=function(r,a){var u=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return u.x=r,u.y=a,u},d.createPath=function(r,a){var u=document.createElementNS("http://www.w3.org/2000/svg","path");return u.setAttribute("d",r),a&&d.setAttributes(u,a),u},d}(),it=function(){function d(){}return d.addKey=function(r){d.key=r},Object.defineProperty(d,"isLicensed",{get:function(){return!!d.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(d.key)},enumerable:!1,configurable:!0}),d}(),kt=function(){function d(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return d.prototype.rasterize=function(r,a,u){var h=this;return new Promise(function(c){var z=u!==void 0?u:document.createElement("canvas");r===null&&(h.markersOnly=!0,h.naturalSize=!1);var _e=document.createElementNS("http://www.w3.org/2000/svg","svg");_e.setAttribute("xmlns","http://www.w3.org/2000/svg"),_e.setAttribute("width",a.width.baseVal.valueAsString),_e.setAttribute("height",a.height.baseVal.valueAsString),_e.setAttribute("viewBox","0 0 "+a.viewBox.baseVal.width.toString()+" "+a.viewBox.baseVal.height.toString()),_e.innerHTML=a.innerHTML,h.naturalSize===!0?(_e.width.baseVal.value=r.naturalWidth,_e.height.baseVal.value=r.naturalHeight):h.width!==void 0&&h.height!==void 0&&(_e.width.baseVal.value=h.width,_e.height.baseVal.value=h.height),z.width=_e.width.baseVal.value,z.height=_e.height.baseVal.value;var ut=_e.outerHTML,Mt=z.getContext("2d");h.markersOnly!==!0&&Mt.drawImage(r,0,0,z.width,z.height);var ze=window.URL,Et=new Image(z.width,z.height);Et.setAttribute("crossOrigin","anonymous");var St=new Blob([ut],{type:"image/svg+xml"}),Rt=ze.createObjectURL(St);Et.onload=function(){Mt.drawImage(Et,0,0),ze.revokeObjectURL(Rt);var tn=z.toDataURL(h.imageType,h.imageQuality);c(tn)},Et.src=Rt})},d}(),Ut=function(){},mt=function(){function d(r){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+r+"_"}return Object.defineProperty(d.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(d.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(d.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),d.prototype.addClass=function(r){return this.styleSheet===void 0&&this.addStyleSheet(),r.name=""+this.classNamePrefix+r.localName,this.classes.push(r),this.styleSheet.sheet.insertRule("."+r.name+" {"+r.style+"}",this.styleSheet.sheet.cssRules.length),r},d.prototype.addRule=function(r){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(r),this.styleSheet.sheet.insertRule(r.selector+" {"+r.style+"}",this.styleSheet.sheet.cssRules.length)},d.prototype.addStyleSheet=function(){var r;this.styleSheet=document.createElement("style"),((r=this.styleSheetRoot)!==null&&r!==void 0?r:document.head).appendChild(this.styleSheet),this.addRule(new At("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new At("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new At("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Te("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Te("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},d.prototype.removeStyleSheet=function(){var r;this.styleSheet&&(((r=this.styleSheetRoot)!==null&&r!==void 0?r:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},d}(),At=function(d,r){this.selector=d,this.style=r},Te=function(d,r){this.localName=d,this.style=r},Ye=function(){function d(r,a,u,h,c){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=r,this.displayMode=a,this.markerItems=u,this.uiStyleSettings=h,this.styles=c,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return d.prototype.show=function(r){var a=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=r,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var u=document.createElement("div");u.className=this.toolbarBlockStyleClass.name,u.style.whiteSpace="nowrap",this.uiContainer.appendChild(u),this.addActionButton(u,'<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(u,'<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(u,'<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(u,'<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(u,'<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(u,'<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(u,'<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(u,'<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(c){var z=document.createElement("div");z.className=""+a.toolbarButtonStyleClass.name,z.setAttribute("data-type-name",c.typeName),z.innerHTML=c.icon,z.addEventListener("click",function(){a.markerToolbarButtonClicked(z,c)}),a.buttons.push(z),a.markerButtons.push(z)}),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 h=document.createElement("div");h.className=this.toolbarBlockStyleClass.name,h.style.whiteSpace="nowrap",h.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(h),this.addActionButton(h,'<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(h,'<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()},d.prototype.addButtonClickListener=function(r){this.buttonClickListeners.push(r)},d.prototype.removeButtonClickListener=function(r){this.buttonClickListeners.indexOf(r)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(r),1)},d.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},d.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var r=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var a=0;a<this.markerButtons.length;a++)a<r||a===r&&this.markerButtons.length-1===r?this.markerButtonBlock.appendChild(this.markerButtons[a]):(a===r&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[a]))}},d.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")},d.prototype.resetButtonStyles=function(){var r=this;this.buttons.forEach(function(a){a.className=a.className.replace(r.uiStyleSettings.toolbarButtonStyleColorsClassName?r.uiStyleSettings.toolbarButtonStyleColorsClassName:r.toolbarButtonStyleColorsClass.name,"").trim(),a.className=a.className.replace(r.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?r.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:r.toolbarActiveButtonStyleColorsClass.name,"").trim(),a.className+=" "+(r.uiStyleSettings.toolbarButtonStyleColorsClassName?r.uiStyleSettings.toolbarButtonStyleColorsClassName:r.toolbarButtonStyleColorsClass.name)})},d.prototype.addActionButton=function(r,a,u){var h=this,c=document.createElement("div");switch(c.className=""+this.toolbarButtonStyleClass.name,c.innerHTML=a,c.setAttribute("data-action",u),c.addEventListener("click",function(){h.actionToolbarButtonClicked(c,u)}),u){case"select":c.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":c.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":c.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":c.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":c.style.fill=this.uiStyleSettings.closeButtonColor}r.appendChild(c),this.buttons.push(c)},d.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Te("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 Te("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Te("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Te("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 Te("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var r=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Te("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*r)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*r)+`px;
padding: `+r+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Te("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Te("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new At("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new At("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},d.prototype.markerToolbarButtonClicked=function(r,a){this.setActiveButton(r),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(u){return u("marker",a)}),this.markerButtonOverflowBlock.style.display="none"},d.prototype.actionToolbarButtonClicked=function(r,a){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(u){return u("action",a)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},d.prototype.setActiveButton=function(r){this.resetButtonStyles(),r.className=r.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),r.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},d.prototype.setActiveMarkerButton=function(r){var a=this.markerButtons.find(function(u){return u.getAttribute("data-type-name")===r});a&&this.setActiveButton(a)},d.prototype.setCurrentMarker=function(r){var a=this;this.currentMarker=r,this.buttons.filter(function(u){return/delete|notes/.test(u.getAttribute("data-action"))}).forEach(function(u){a.currentMarker===void 0?(u.style.fillOpacity="0.4",u.style.pointerEvents="none"):(u.style.fillOpacity="1",u.style.pointerEvents="all")})},d}(),at=function(){function d(r,a,u,h){this.panels=[],this.panelButtons=[],this.markerjsContainer=r,this.displayMode=a,this.uiStyleSettings=u,this.styles=h,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return d.prototype.addStyles=function(){var r;this.toolboxStyleClass=this.styles.addClass(new Te("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 Te("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var a=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Te("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Te("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Te("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 Te("toolbox-panel-row_colors",`
background-color: `+((r=this.uiStyleSettings.toolboxBackgroundColor)!==null&&r!==void 0?r:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Te("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*a)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*a)+`px;
padding: `+a+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Te("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Te("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new At("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new At("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},d.prototype.show=function(r){var a;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=r,this.uiContainer.className=this.toolboxStyleClass.name+" "+((a=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&a!==void 0?a:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},d.prototype.setPanelButtons=function(r){var a,u,h=this;this.panels=r,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((a=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&a!==void 0?a:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((u=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&u!==void 0?u:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(c){var z;c.uiStyleSettings=h.uiStyleSettings;var _e=document.createElement("div");_e.className=h.toolboxButtonStyleClass.name+" "+((z=h.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&z!==void 0?z:h.toolboxButtonStyleColorsClass.name),_e.innerHTML=c.icon,_e.title=c.title,_e.addEventListener("click",function(){h.panelButtonClick(c)}),h.panelButtons.push(_e),h.buttonRow.appendChild(_e)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},d.prototype.panelButtonClick=function(r){var a=this,u=-1;if(r!==this.activePanel){u=this.panels.indexOf(r),this.panelRow.innerHTML="";var h=r.getUi();h.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(h),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=r}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){a.displayMode==="inline"?a.panelRow.style.display="none":a.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(c,z){var _e,ut;c.className=a.toolboxButtonStyleClass.name+" "+(z===u?""+((_e=a.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&_e!==void 0?_e:a.toolboxActiveButtonStyleColorsClass.name):""+((ut=a.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ut!==void 0?ut:a.toolboxButtonStyleColorsClass.name))})},d}(),dt=function(d,r){this.title=d,this.icon=r},Ke=function(d){function r(a,u,h,c){var z=d.call(this,a,c||'<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 z.colors=[],z.addTransparent=!1,z.colorBoxes=[],z.colors=u,z.currentColor=h,z.setCurrentColor=z.setCurrentColor.bind(z),z.getColorBox=z.getColorBox.bind(z),z}return Je(r,d),r.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.overflow="hidden",u.style.whiteSpace="nowrap",this.colors.forEach(function(h){var c=a.getColorBox(h);u.appendChild(c),a.colorBoxes.push(c)}),u},r.prototype.getColorBox=function(a){var u=this,h=this.uiStyleSettings.toolbarHeight/4,c=this.uiStyleSettings.toolbarHeight-h,z=document.createElement("div");z.style.display="inline-block",z.style.boxSizing="content-box",z.style.width=c-2+"px",z.style.height=c-2+"px",z.style.padding="1px",z.style.marginRight="2px",z.style.marginBottom="2px",z.style.borderWidth="2px",z.style.borderStyle="solid",z.style.borderRadius=(c+2)/2+"px",z.style.borderColor=a===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",z.addEventListener("click",function(){u.setCurrentColor(a,z)});var _e=document.createElement("div");return _e.style.display="inline-block",_e.style.width=c-2+"px",_e.style.height=c-2+"px",_e.style.backgroundColor=a,_e.style.borderRadius=c/2+"px",a==="transparent"&&(_e.style.fill=this.uiStyleSettings.toolboxAccentColor,_e.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>`),z.appendChild(_e),z},r.prototype.setCurrentColor=function(a,u){var h=this;this.currentColor=a,this.colorBoxes.forEach(function(c){c.style.borderColor=c===u?h.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(a)},r}(dt),We=function(){function d(r,a,u){this._state="new",this._isSelected=!1,this._container=r,this._overlayContainer=a,this.globalSettings=u,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(d.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),d.prototype.ownsTarget=function(r){return!1},Object.defineProperty(d.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),d.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},d.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},d.prototype.pointerDown=function(r,a){},d.prototype.dblClick=function(r,a){},d.prototype.manipulate=function(r){},d.prototype.pointerUp=function(r){this.stateChanged()},d.prototype.dispose=function(){},d.prototype.addMarkerVisualToContainer=function(r){this.container.childNodes.length>0?this.container.insertBefore(r,this.container.childNodes[0]):this.container.appendChild(r)},d.prototype.getState=function(){return{typeName:d.typeName,state:this.state,notes:this.notes}},d.prototype.restoreState=function(r){this._state=r.state,this.notes=r.notes},d.prototype.scale=function(r,a){},d.prototype.colorChanged=function(r){this.onColorChanged&&this.onColorChanged(r),this.stateChanged()},d.prototype.fillColorChanged=function(r){this.onFillColorChanged&&this.onFillColorChanged(r),this.stateChanged()},d.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var r=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),r.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(r)&&this.onStateChanged(this)}},d.typeName="MarkerBase",d}(),Ze=function(){function d(){this.findGripByVisual=this.findGripByVisual.bind(this)}return d.prototype.findGripByVisual=function(r){return this.topLeft.ownsTarget(r)?this.topLeft:this.topCenter.ownsTarget(r)?this.topCenter:this.topRight.ownsTarget(r)?this.topRight:this.centerLeft.ownsTarget(r)?this.centerLeft:this.centerRight.ownsTarget(r)?this.centerRight:this.bottomLeft.ownsTarget(r)?this.bottomLeft:this.bottomCenter.ownsTarget(r)?this.bottomCenter:this.bottomRight.ownsTarget(r)?this.bottomRight:void 0},d}(),Lt=function(){function d(){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 d.prototype.ownsTarget=function(r){return r===this.visual||r===this.visual.childNodes[0]||r===this.visual.childNodes[1]},d}(),gt=function(){function d(){}return d.toITransformMatrix=function(r){return{a:r.a,b:r.b,c:r.c,d:r.d,e:r.e,f:r.f}},d.toSVGMatrix=function(r,a){return r.a=a.a,r.b=a.b,r.c=a.c,r.d=a.d,r.e=a.e,r.f=a.f,r},d}(),ot=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.left=0,c.top=0,c.width=0,c.height=0,c.defaultSize={x:50,y:20},c.offsetX=0,c.offsetY=0,c.rotationAngle=0,c.CB_DISTANCE=10,c._suppressMarkerCreateEvent=!1,c.container.transform.baseVal.appendItem(D.createTransform()),c.setupControlBox(),c}return Je(r,d),Object.defineProperty(r.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"visual",{get:function(){return this._visual},set:function(a){this._visual=a;var u=D.createTransform();this._visual.transform.baseVal.appendItem(u)},enumerable:!1,configurable:!0}),r.prototype.ownsTarget=function(a){return!!d.prototype.ownsTarget.call(this,a)||!!(this.controlGrips.findGripByVisual(a)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(a))},r.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.left=a.x,this.top=a.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var h=this.unrotatePoint(a);if(this.manipulationStartX=h.x,this.manipulationStartY=h.y,this.offsetX=h.x-this.left,this.offsetY=h.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(u),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(u)){this.activeGrip=this.rotatorGrip;var c=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=c.x-this.width/2,this.top=c.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var z=this.container.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(z,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},r.prototype.pointerUp=function(a){var u=this.state;d.prototype.pointerUp.call(this,a),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(a),this._state="select",u==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},r.prototype.moveVisual=function(a){this.visual.style.transform="translate("+a.x+"px, "+a.y+"px)"},r.prototype.manipulate=function(a){var u=this.unrotatePoint(a);this.state==="creating"?this.resize(a):this.state==="move"?(this.left=this.manipulationStartLeft+(u.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(u.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(u):this.state==="rotate"&&this.rotate(a)},r.prototype.resize=function(a){var u=this.manipulationStartLeft,h=this.manipulationStartWidth,c=this.manipulationStartTop,z=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:u=this.manipulationStartLeft+a.x-this.manipulationStartX,h=this.manipulationStartWidth+this.manipulationStartLeft-u;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:h=this.manipulationStartWidth+a.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:c=this.manipulationStartTop+a.y-this.manipulationStartY,z=this.manipulationStartHeight+this.manipulationStartTop-c;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:z=this.manipulationStartHeight+a.y-this.manipulationStartY}h>=0?(this.left=u,this.width=h):(this.left=u+h,this.width=-h),z>=0?(this.top=c,this.height=z):(this.top=c+z,this.height=-z),this.setSize()},r.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},r.prototype.rotate=function(a){if(Math.abs(a.x-this.centerX)>.1){var u=Math.sign(a.x-this.centerX);this.rotationAngle=180*Math.atan((a.y-this.centerY)/(a.x-this.centerX))/Math.PI+90*u,this.applyRotation()}},r.prototype.applyRotation=function(){var a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,0)},r.prototype.rotatePoint=function(a){if(this.rotationAngle===0)return a;var u=this.container.getCTM(),h=D.createPoint(a.x,a.y);return{x:(h=h.matrixTransform(u)).x,y:h.y}},r.prototype.unrotatePoint=function(a){if(this.rotationAngle===0)return a;var u=this.container.getCTM();u=u.inverse();var h=D.createPoint(a.x,a.y);return{x:(h=h.matrixTransform(u)).x,y:h.y}},r.prototype.select=function(){d.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},r.prototype.deselect=function(){d.prototype.deselect.call(this),this.controlBox.style.display="none"},r.prototype.setupControlBox=function(){this.controlBox=D.createGroup();var a=D.createTransform();a.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(a),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 Ze,this.addControlGrips(),this.controlBox.style.display="none"},r.prototype.adjustControlBox=function(){var a=this.controlBox.transform.baseVal.getItem(0);a.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(a,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()},r.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()},r.prototype.createGrip=function(){var a=new Lt;return a.visual.transform.baseVal.appendItem(D.createTransform()),this.controlBox.appendChild(a.visual),a},r.prototype.positionGrips=function(){var a=this.controlGrips.topLeft.GRIP_SIZE,u=-a/2,h=u,c=(this.width+this.CB_DISTANCE)/2-a/2,z=(this.height+this.CB_DISTANCE)/2-a/2,_e=this.height+this.CB_DISTANCE-a/2,ut=this.width+this.CB_DISTANCE-a/2;this.positionGrip(this.controlGrips.topLeft.visual,u,h),this.positionGrip(this.controlGrips.topCenter.visual,c,h),this.positionGrip(this.controlGrips.topRight.visual,ut,h),this.positionGrip(this.controlGrips.centerLeft.visual,u,z),this.positionGrip(this.controlGrips.centerRight.visual,ut,z),this.positionGrip(this.controlGrips.bottomLeft.visual,u,_e),this.positionGrip(this.controlGrips.bottomCenter.visual,c,_e),this.positionGrip(this.controlGrips.bottomRight.visual,ut,_e),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,c,h-3*this.CB_DISTANCE)},r.prototype.positionGrip=function(a,u,h){var c=a.transform.baseVal.getItem(0);c.setTranslate(u,h),a.transform.baseVal.replaceItem(c,0)},r.prototype.hideControlBox=function(){this.controlBox.style.display="none"},r.prototype.showControlBox=function(){this.controlBox.style.display=""},r.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:gt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:gt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},d.prototype.getState.call(this))},r.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.left=u.left,this.top=u.top,this.width=u.width,this.height=u.height,this.rotationAngle=u.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(gt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,u.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(gt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,u.containerTransformMatrix))},r.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u);var h=this.rotatePoint({x:this.left,y:this.top}),c=this.unrotatePoint({x:h.x*a,y:h.y*u});this.left=c.x,this.top=c.y,this.width=this.width*a,this.height=this.height*u,this.adjustControlBox()},r}(We),rt=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.fillColor="transparent",c.strokeColor="transparent",c.strokeWidth=0,c.strokeDasharray="",c.opacity=1,c.setStrokeColor=c.setStrokeColor.bind(c),c.setFillColor=c.setFillColor.bind(c),c.setStrokeWidth=c.setStrokeWidth.bind(c),c.setStrokeDasharray=c.setStrokeDasharray.bind(c),c.createVisual=c.createVisual.bind(c),c}return Je(r,d),r.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual)},r.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)},r.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},r.prototype.manipulate=function(a){d.prototype.manipulate.call(this,a)},r.prototype.resize=function(a){d.prototype.resize.call(this,a),this.setSize()},r.prototype.setSize=function(){d.prototype.setSize.call(this),D.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},r.prototype.pointerUp=function(a){d.prototype.pointerUp.call(this,a),this.setSize()},r.prototype.setStrokeColor=function(a){this.strokeColor=a,this.visual&&D.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},r.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&D.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},r.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&D.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},r.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&D.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},r.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},d.prototype.getState.call(this))},r.prototype.restoreState=function(a){var u=a;this.fillColor=u.fillColor,this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.opacity=u.opacity,this.createVisual(),d.prototype.restoreState.call(this,a),this.setSize()},r.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.setSize()},r.title="Rectangle marker",r}(ot),Dt=function(d){function r(a,u,h,c){var z=d.call(this,a,c||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return z.widths=[],z.widthBoxes=[],z.widths=u,z.currentWidth=h,z.setCurrentWidth=z.setCurrentWidth.bind(z),z}return Je(r,d),r.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2",this.widths.forEach(function(h){var c=document.createElement("div");c.style.display="flex",c.style.flexGrow="2",c.style.alignItems="center",c.style.justifyContent="space-between",c.style.padding="5px",c.style.borderWidth="2px",c.style.borderStyle="solid",c.style.borderColor=h===a.currentWidth?a.uiStyleSettings.toolboxAccentColor:"transparent",c.addEventListener("click",function(){a.setCurrentWidth(h,c)}),u.appendChild(c);var z=document.createElement("div");z.innerText=h.toString(),z.style.marginRight="5px",c.appendChild(z);var _e=document.createElement("div");_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.display="flex",_e.style.alignItems="center";var ut=document.createElement("hr");ut.style.minWidth="20px",ut.style.border="0px",ut.style.borderTop=h+"px solid "+a.uiStyleSettings.toolboxColor,ut.style.flexGrow="2",_e.appendChild(ut),c.appendChild(_e),a.widthBoxes.push(c)}),u},r.prototype.setCurrentWidth=function(a,u){var h=this;this.currentWidth=a,this.widthBoxes.forEach(function(c){c.style.borderColor=c===u?h.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},r}(dt),ft=function(d){function r(a,u,h,c){var z=d.call(this,a,c||'<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 z.styles=[],z.styleBoxes=[],z.styles=u,z.currentStyle=h,z.setCurrentStyle=z.setCurrentStyle.bind(z),z}return Je(r,d),r.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2",this.styles.forEach(function(h){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="space-between",c.style.padding="5px",c.style.borderWidth="2px",c.style.borderStyle="solid",c.style.overflow="hidden",c.style.maxWidth=100/a.styles.length-5+"%",c.style.borderColor=h===a.currentStyle?a.uiStyleSettings.toolboxAccentColor:"transparent",c.addEventListener("click",function(){a.setCurrentStyle(h,c)}),u.appendChild(c);var z=document.createElement("div");z.style.minHeight="20px",z.style.flexGrow="2",z.style.overflow="hidden";var _e=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+a.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(h!==""?'stroke-dasharray="'+h+'"':"")+` />
</svg>`;z.innerHTML=_e,c.appendChild(z),a.styleBoxes.push(c)}),u},r.prototype.setCurrentStyle=function(a,u){var h=this;this.currentStyle=a,this.styleBoxes.forEach(function(c){c.style.borderColor=c===u?h.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},r}(dt),wt=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.strokeColor=h.defaultColor,c.strokeWidth=h.defaultStrokeWidth,c.strokeDasharray=h.defaultStrokeDasharray,c.strokePanel=new Ke("Line color",h.defaultColorSet,h.defaultColor),c.strokePanel.onColorChanged=c.setStrokeColor,c.strokeWidthPanel=new Dt("Line width",h.defaultStrokeWidths,h.defaultStrokeWidth),c.strokeWidthPanel.onWidthChanged=c.setStrokeWidth,c.strokeStylePanel=new ft("Line style",h.defaultStrokeDasharrays,h.defaultStrokeDasharray),c.strokeStylePanel.onStyleChanged=c.setStrokeDasharray,c}return Je(r,d),Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),r.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=r.typeName,a},r.typeName="FrameMarker",r.title="Frame marker",r.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',r}(rt),Se=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},It=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.x1=0,c.y1=0,c.x2=0,c.y2=0,c.defaultLength=50,c.manipulationStartX=0,c.manipulationStartY=0,c.manipulationStartX1=0,c.manipulationStartY1=0,c.manipulationStartX2=0,c.manipulationStartY2=0,c.setupControlBox(),c}return Je(r,d),r.prototype.ownsTarget=function(a){return!!d.prototype.ownsTarget.call(this,a)||!(!this.grip1.ownsTarget(a)&&!this.grip2.ownsTarget(a))},r.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.manipulationStartX=a.x,this.manipulationStartY=a.y,this.state==="new"&&(this.x1=a.x,this.y1=a.y,this.x2=a.x,this.y2=a.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(u)?this.activeGrip=this.grip1:this.grip2.ownsTarget(u)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},r.prototype.pointerUp=function(a){var u=this.state;d.prototype.pointerUp.call(this,a),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(a),this._state="select",u==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},r.prototype.adjustVisual=function(){},r.prototype.manipulate=function(a){this.state==="creating"?this.resize(a):this.state==="move"?(this.x1=this.manipulationStartX1+a.x-this.manipulationStartX,this.y1=this.manipulationStartY1+a.y-this.manipulationStartY,this.x2=this.manipulationStartX2+a.x-this.manipulationStartX,this.y2=this.manipulationStartY2+a.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(a)},r.prototype.resize=function(a){switch(this.activeGrip){case this.grip1:this.x1=a.x,this.y1=a.y;break;case this.grip2:case void 0:this.x2=a.x,this.y2=a.y}this.adjustVisual(),this.adjustControlBox()},r.prototype.select=function(){d.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},r.prototype.deselect=function(){d.prototype.deselect.call(this),this.controlBox.style.display="none"},r.prototype.setupControlBox=function(){this.controlBox=D.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},r.prototype.adjustControlBox=function(){this.positionGrips()},r.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},r.prototype.createGrip=function(){var a=new Lt;return a.visual.transform.baseVal.appendItem(D.createTransform()),this.controlBox.appendChild(a.visual),a},r.prototype.positionGrips=function(){var a=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-a/2,this.y1-a/2),this.positionGrip(this.grip2.visual,this.x2-a/2,this.y2-a/2)},r.prototype.positionGrip=function(a,u,h){var c=a.transform.baseVal.getItem(0);c.setTranslate(u,h),a.transform.baseVal.replaceItem(c,0)},r.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},d.prototype.getState.call(this))},r.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.x1=u.x1,this.y1=u.y1,this.x2=u.x2,this.y2=u.y2},r.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.x1=this.x1*a,this.y1=this.y1*u,this.x2=this.x2*a,this.y2=this.y2*u,this.adjustVisual(),this.adjustControlBox()},r}(We),pt=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.strokeColor="transparent",c.strokeWidth=0,c.strokeDasharray="",c.setStrokeColor=c.setStrokeColor.bind(c),c.setStrokeWidth=c.setStrokeWidth.bind(c),c.setStrokeDasharray=c.setStrokeDasharray.bind(c),c.strokeColor=h.defaultColor,c.strokeWidth=h.defaultStrokeWidth,c.strokeDasharray=h.defaultStrokeDasharray,c.strokePanel=new Ke("Line color",h.defaultColorSet,h.defaultColor),c.strokePanel.onColorChanged=c.setStrokeColor,c.strokeWidthPanel=new Dt("Line width",h.defaultStrokeWidths,h.defaultStrokeWidth),c.strokeWidthPanel.onWidthChanged=c.setStrokeWidth,c.strokeStylePanel=new ft("Line style",h.defaultStrokeDasharrays,h.defaultStrokeDasharray),c.strokeStylePanel.onStyleChanged=c.setStrokeDasharray,c}return Je(r,d),r.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.selectorLine&&a!==this.visibleLine)},r.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)},r.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},r.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()]]))},r.prototype.setStrokeColor=function(a){this.strokeColor=a,this.adjustVisual(),this.colorChanged(a)},r.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.adjustVisual()},r.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.adjustVisual(),this.stateChanged()},Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),r.prototype.getState=function(){var a=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},d.prototype.getState.call(this));return a.typeName=r.typeName,a},r.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.createVisual(),this.adjustVisual()},r.typeName="LineMarker",r.title="Line marker",r.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',r}(It),Me=function(d){function r(a,u,h,c){var z=d.call(this,a,c||'<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 z.fonts=[],z.fontBoxes=[],z.fonts=u,z.currentFont=h,z.setCurrentFont=z.setCurrentFont.bind(z),z}return Je(r,d),r.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.overflow="hidden",u.style.flexGrow="2",this.fonts.forEach(function(h){var c=document.createElement("div");c.style.display="inline-block",c.style.alignItems="center",c.style.justifyContent="space-between",c.style.padding="5px",c.style.borderWidth="2px",c.style.borderStyle="solid",c.style.overflow="hidden",c.style.maxWidth=100/a.fonts.length-5+"%",c.style.borderColor=h===a.currentFont?a.uiStyleSettings.toolboxAccentColor:"transparent",c.addEventListener("click",function(){a.setCurrentFont(h,c)}),u.appendChild(c);var z=document.createElement("div");z.style.display="flex",z.style.minHeight="20px",z.style.flexGrow="2",z.style.fontFamily=h,z.style.overflow="hidden";var _e=document.createElement("div");_e.style.whiteSpace="nowrap",_e.style.overflow="hidden",_e.style.textOverflow="ellipsis",_e.innerHTML="The quick brown fox jumps over the lazy dog",z.appendChild(_e),c.appendChild(z),a.fontBoxes.push(c)}),u},r.prototype.setCurrentFont=function(a,u){var h=this;this.currentFont=a,this.fontBoxes.forEach(function(c){c.style.borderColor=c===u?h.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},r}(dt),Xe=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.color="transparent",c.padding=5,c.DEFAULT_TEXT="your text here",c.text=c.DEFAULT_TEXT,c.isMoved=!1,c.color=h.defaultColor,c.fontFamily=h.defaultFontFamily,c.defaultSize={x:100,y:30},c.setColor=c.setColor.bind(c),c.setFont=c.setFont.bind(c),c.renderText=c.renderText.bind(c),c.sizeText=c.sizeText.bind(c),c.textEditDivClicked=c.textEditDivClicked.bind(c),c.showTextEditor=c.showTextEditor.bind(c),c.setSize=c.setSize.bind(c),c.positionTextEditor=c.positionTextEditor.bind(c),c.colorPanel=new Ke("Color",h.defaultColorSet,h.defaultColor),c.colorPanel.onColorChanged=c.setColor,c.fontFamilyPanel=new Me("Font",h.defaultFontFamilies,h.defaultFontFamily),c.fontFamilyPanel.onFontChanged=c.setFont,c}return Je(r,d),r.prototype.ownsTarget=function(a){if(d.prototype.ownsTarget.call(this,a)||a===this.visual||a===this.textElement||a===this.bgRectangle)return!0;var u=!1;return this.textElement.childNodes.forEach(function(h){h===a&&(u=!0)}),u},r.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()},r.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.isMoved=!1,this.pointerDownPoint=a,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},r.prototype.renderText=function(){var a=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(u){a.textElement.appendChild(D.createTSpan(u.trim()===""?" ":u.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},r.prototype.getTextScale=function(){var a=this.textElement.getBBox(),u=1;if(a.width>0&&a.height>0){var h=(1*this.width-this.width*this.padding*2/100)/a.width,c=(1*this.height-this.height*this.padding*2/100)/a.height;u=Math.min(h,c)}return u},r.prototype.getTextPosition=function(a){var u=this.textElement.getBBox(),h=0,c=0;return u.width>0&&u.height>0&&(h=(this.width-u.width*a)/2,c=this.height/2-u.height*a/2),{x:h,y:c}},r.prototype.sizeText=function(){var a=this.textElement.getBBox(),u=this.getTextScale(),h=this.getTextPosition(u);h.y-=a.y*u,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+h.x+"px, "+h.y+"px) scale("+u+", "+u+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(h.x,h.y),this.textElement.transform.baseVal.getItem(1).setScale(u,u))},r.prototype.manipulate=function(a){d.prototype.manipulate.call(this,a),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(a.x-this.pointerDownPoint.x)>5||Math.abs(a.y-this.pointerDownPoint.y)>5)},r.prototype.resize=function(a){d.prototype.resize.call(this,a),this.isMoved=!0,this.setSize(),this.sizeText()},r.prototype.setSize=function(){d.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()]]))},r.prototype.pointerUp=function(a){var u=this.state;u==="creating"&&(this._suppressMarkerCreateEvent=!0),d.prototype.pointerUp.call(this,a),this.setSize(),(u==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},r.prototype.showTextEditor=function(){var a=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(u){u.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var u=Number.parseFloat(a.textEditor.style.fontSize);a.textEditor.clientWidth>=Number.parseInt(a.textEditor.style.maxWidth)&&u>.9;)u-=.1,a.textEditor.style.fontSize=Math.max(u,.9)+"em"}),this.textEditor.addEventListener("keyup",function(u){u.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(u){if(u.clipboardData){var h=u.clipboardData.getData("text"),c=window.getSelection();if(!c.rangeCount)return!1;c.deleteFromDocument(),c.getRangeAt(0).insertNode(document.createTextNode(h)),u.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){a.textEditDivClicked(a.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},r.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var a=this.getTextScale(),u=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),h=this.textElement.getBBox(),c={x:h.width*a,y:h.height*a};u.x-=c.x/2,u.y-=c.y/2,this.textEditor.style.top=u.y+"px",this.textEditor.style.left=u.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-u.x+"px",this.textEditor.style.fontSize=Math.max(16*a,12)+"px",this.textElement.style.display="none"}},r.prototype.textEditDivClicked=function(a){this.text=a.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},r.prototype.select=function(){d.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},r.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),d.prototype.deselect.call(this)},r.prototype.dblClick=function(a,u){d.prototype.dblClick.call(this,a,u),this.showTextEditor()},r.prototype.setColor=function(a){this.textElement&&D.setAttributes(this.textElement,[["fill",a]]),this.color=a,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(a)},r.prototype.setFont=function(a){this.textElement&&D.setAttributes(this.textElement,[["font-family",a]]),this.fontFamily=a,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},r.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},r.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),r.prototype.getState=function(){var a=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},d.prototype.getState.call(this));return a.typeName=r.typeName,a},r.prototype.restoreState=function(a){var u=a;this.color=u.color,this.fontFamily=u.fontFamily,this.padding=u.padding,this.text=u.text,this.createVisual(),d.prototype.restoreState.call(this,a),this.setSize()},r.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.setSize(),this.sizeText(),this.positionTextEditor()},r.typeName="TextMarker",r.title="Text marker",r.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>',r}(ot),J=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.color="transparent",c.lineWidth=3,c.drawing=!1,c.pixelRatio=1,c.color=h.defaultColor,c.lineWidth=h.defaultStrokeWidth,c.pixelRatio=h.freehandPixelRatio,c.setColor=c.setColor.bind(c),c.addCanvas=c.addCanvas.bind(c),c.finishCreation=c.finishCreation.bind(c),c.setLineWidth=c.setLineWidth.bind(c),c.colorPanel=new Ke("Color",h.defaultColorSet,h.defaultColor),c.colorPanel.onColorChanged=c.setColor,c.lineWidthPanel=new Dt("Line width",h.defaultStrokeWidths,h.defaultStrokeWidth),c.lineWidthPanel.onWidthChanged=c.setLineWidth,c}return Je(r,d),r.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.drawingImage)},r.prototype.createVisual=function(){this.visual=D.createGroup(),this.drawingImage=D.createImage(),this.visual.appendChild(this.drawingImage);var a=D.createTransform();this.visual.transform.baseVal.appendItem(a),this.addMarkerVisualToContainer(this.visual)},r.prototype.pointerDown=function(a,u){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(a.x,a.y),this.drawing=!0):d.prototype.pointerDown.call(this,a,u)},r.prototype.manipulate=function(a){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(a.x,a.y),this.canvasContext.stroke()):d.prototype.manipulate.call(this,a)},r.prototype.resize=function(a){d.prototype.resize.call(this,a),D.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),D.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},r.prototype.pointerUp=function(a){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):d.prototype.pointerUp.call(this,a)},r.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)},r.prototype.select=function(){this.state==="creating"&&this.finishCreation(),d.prototype.select.call(this)},r.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),d.prototype.deselect.call(this)},r.prototype.finishCreation=function(){for(var a=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),u=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],h=u[0],c=u[1],z=u[2],_e=u[3],ut=!1,Mt=0;Mt<this.canvasElement.height;Mt++)for(var ze=0;ze<this.canvasElement.width;ze++)a.data[Mt*this.canvasElement.width*4+4*ze+3]>0&&(ut=!0,Mt<c&&(c=Mt),ze<h&&(h=ze),Mt>_e&&(_e=Mt),ze>z&&(z=ze));if(ut){this.left=h/this.pixelRatio,this.top=c/this.pixelRatio,this.width=(z-h)/this.pixelRatio,this.height=(_e-c)/this.pixelRatio;var Et=document.createElement("canvas");Et.width=z-h,Et.height=_e-c,Et.getContext("2d").putImageData(this.canvasContext.getImageData(h,c,z-h,_e-c),0,0),this.drawingImgUrl=Et.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},r.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})},r.prototype.setColor=function(a){this.color=a,this.colorChanged(a)},r.prototype.setLineWidth=function(a){this.lineWidth=a},Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),r.prototype.getState=function(){var a=Object.assign({drawingImgUrl:this.drawingImgUrl},d.prototype.getState.call(this));return a.typeName=r.typeName,a},r.prototype.restoreState=function(a){this.createVisual(),d.prototype.restoreState.call(this,a),this.drawingImgUrl=a.drawingImgUrl,this.setDrawingImage()},r.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.setDrawingImage()},r.typeName="FreehandMarker",r.title="Freehand marker",r.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>',r}(ot),H=function(d){function r(a,u,h){var c=d.call(this,a,h||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return c.typeBoxes=[],c.currentType=u,c.setCurrentType=c.setCurrentType.bind(c),c}return Je(r,d),r.prototype.getUi=function(){var a=this,u=document.createElement("div");u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2";for(var h=function(_e){var ut="both";switch(_e){case 0:ut="both";break;case 1:ut="start";break;case 2:ut="end";break;case 3:ut="none"}var Mt=document.createElement("div");if(Mt.style.display="flex",Mt.style.flexGrow="2",Mt.style.alignItems="center",Mt.style.justifyContent="space-between",Mt.style.padding="5px",Mt.style.borderWidth="2px",Mt.style.borderStyle="solid",Mt.style.borderColor=ut===c.currentType?c.uiStyleSettings.toolboxAccentColor:"transparent",Mt.addEventListener("click",function(){a.setCurrentType(ut,Mt)}),u.appendChild(Mt),ut==="both"||ut==="start"){var ze=document.createElement("div");ze.style.display="flex",ze.style.alignItems="center",ze.style.minHeight="20px",ze.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="`+(c.uiStyleSettings!==void 0?c.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,ze.style.marginLeft="5px",Mt.appendChild(ze)}var Et=document.createElement("div");Et.style.display="flex",Et.style.alignItems="center",Et.style.minHeight="20px",Et.style.flexGrow="2";var St=document.createElement("hr");if(St.style.minWidth="20px",St.style.border="0px",St.style.borderTop="3px solid "+(c.uiStyleSettings!==void 0?c.uiStyleSettings.toolboxColor:"#eeeeee"),St.style.flexGrow="2",Et.appendChild(St),Mt.appendChild(Et),ut==="both"||ut==="end"){var Rt=document.createElement("div");Rt.style.display="flex",Rt.style.alignItems="center",Rt.style.minHeight="20px",Rt.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="`+(c.uiStyleSettings!==void 0?c.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Rt.style.marginRight="5px",Mt.appendChild(Rt)}c.typeBoxes.push(Mt)},c=this,z=0;z<4;z++)h(z);return u},r.prototype.setCurrentType=function(a,u){var h=this;this.currentType=a,this.typeBoxes.forEach(function(c){c.style.borderColor=c===u?h.uiStyleSettings!==void 0?h.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},r}(dt),K=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.arrowType="end",c.arrowBaseHeight=10,c.arrowBaseWidth=10,c.getArrowPoints=c.getArrowPoints.bind(c),c.setArrowType=c.setArrowType.bind(c),c.arrowTypePanel=new H("Arrow type","end"),c.arrowTypePanel.onArrowTypeChanged=c.setArrowType,c}return Je(r,d),r.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.arrow1&&a!==this.arrow2)},r.prototype.getArrowPoints=function(a,u){var h=this.arrowBaseWidth+2*this.strokeWidth,c=this.arrowBaseHeight+2*this.strokeWidth;return a-h/2+","+(u+c/2)+" "+a+","+(u-c/2)+" "+(a+h/2)+","+(u+c/2)},r.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)},r.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="creating"&&this.createTips()},r.prototype.adjustVisual=function(){if(d.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 a=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),u=this.arrow1.transform.baseVal.getItem(0);u.setRotate(a,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(u,0);var h=this.arrow2.transform.baseVal.getItem(0);h.setRotate(a+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(h,0)}},r.prototype.setArrowType=function(a){this.arrowType=a,this.adjustVisual(),this.stateChanged()},Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),r.prototype.getState=function(){var a=Object.assign({arrowType:this.arrowType},d.prototype.getState.call(this));return a.typeName=r.typeName,a},r.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.arrowType=u.arrowType,this.createTips(),this.adjustVisual()},r.typeName="ArrowMarker",r.title="Arrow marker",r.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',r}(pt),C=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.fillColor=h.defaultFillColor,c.strokeWidth=0,c.fillPanel=new Ke("Color",h.defaultColorSet,h.defaultFillColor),c.fillPanel.onColorChanged=c.setFillColor,c}return Je(r,d),Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),r.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=r.typeName,a},r.typeName="CoverMarker",r.title="Cover marker",r.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',r}(rt),E=function(d){function r(a,u,h,c){var z=d.call(this,a,c||'<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 z.opacities=[],z.opacityBoxes=[],z.opacities=u,z.currentOpacity=h,z.setCurrentOpacity=z.setCurrentOpacity.bind(z),z}return Je(r,d),r.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2",u.style.justifyContent="space-between",this.opacities.forEach(function(h){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="center",c.style.padding="5px",c.style.borderWidth="2px",c.style.borderStyle="solid",c.style.borderColor=h===a.currentOpacity?a.uiStyleSettings.toolboxAccentColor:"transparent",c.addEventListener("click",function(){a.setCurrentOpacity(h,c)}),u.appendChild(c);var z=document.createElement("div");z.innerText=100*h+"%",c.appendChild(z),a.opacityBoxes.push(c)}),u},r.prototype.setCurrentOpacity=function(a,u){var h=this;this.currentOpacity=a,this.opacityBoxes.forEach(function(c){c.style.borderColor=c===u?h.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},r}(dt),A=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.setOpacity=c.setOpacity.bind(c),c.fillColor=h.defaultHighlightColor,c.strokeWidth=0,c.opacity=h.defaultHighlightOpacity,c.fillPanel=new Ke("Color",h.defaultColorSet,c.fillColor),c.fillPanel.onColorChanged=c.setFillColor,c.opacityPanel=new E("Opacity",h.defaultOpacitySteps,c.opacity),c.opacityPanel.onOpacityChanged=c.setOpacity,c}return Je(r,d),r.prototype.setOpacity=function(a){this.opacity=a,this.visual&&D.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),r.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=r.typeName,a},r.typeName="HighlightMarker",r.title="Highlight marker",r.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>',r}(C),T='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',ae=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.bgColor="transparent",c.tipPosition={x:0,y:0},c.tipBase1Position={x:0,y:0},c.tipBase2Position={x:0,y:0},c.tipMoving=!1,c.color=h.defaultStrokeColor,c.bgColor=h.defaultFillColor,c.fontFamily=h.defaultFontFamily,c.defaultSize={x:100,y:30},c.setBgColor=c.setBgColor.bind(c),c.getTipPoints=c.getTipPoints.bind(c),c.positionTip=c.positionTip.bind(c),c.setTipPoints=c.setTipPoints.bind(c),c.colorPanel=new Ke("Text color",h.defaultColorSet,c.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>'),c.colorPanel.onColorChanged=c.setColor,c.bgColorPanel=new Ke("Fill color",h.defaultColorSet,c.bgColor,T),c.bgColorPanel.onColorChanged=c.setBgColor,c.fontFamilyPanel=new Me("Font",h.defaultFontFamilies,h.defaultFontFamily),c.fontFamilyPanel.onFontChanged=c.setFont,c.tipGrip=new Lt,c.tipGrip.visual.transform.baseVal.appendItem(D.createTransform()),c.controlBox.appendChild(c.tipGrip.visual),c}return Je(r,d),r.prototype.ownsTarget=function(a){return d.prototype.ownsTarget.call(this,a)||this.tipGrip.ownsTarget(a)||this.tip===a},r.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)},r.prototype.pointerDown=function(a,u){this.state==="new"&&d.prototype.pointerDown.call(this,a,u),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(u)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):d.prototype.pointerDown.call(this,a,u)},r.prototype.pointerUp=function(a){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,d.prototype.pointerUp.call(this,a);else{var u=this.state==="creating";d.prototype.pointerUp.call(this,a),this.setTipPoints(u),this.positionTip()}},r.prototype.manipulate=function(a){if(this.tipMoving){var u=this.unrotatePoint(a);this.tipPosition={x:u.x-this.manipulationStartLeft,y:u.y-this.manipulationStartTop},this.positionTip()}else d.prototype.manipulate.call(this,a)},r.prototype.setBgColor=function(a){this.bgRectangle&&this.tip&&(D.setAttributes(this.bgRectangle,[["fill",a]]),D.setAttributes(this.tip,[["fill",a]])),this.bgColor=a,this.fillColorChanged(a)},r.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},r.prototype.setTipPoints=function(a){a===void 0&&(a=!1);var u=Math.min(this.height/2,15),h=this.height/5;a&&(this.tipPosition={x:u+h/2,y:this.height+20});var c=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?c<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(h=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:u,y:0},this.tipBase2Position={x:u+h,y:0}):(this.tipBase1Position={x:0,y:u},this.tipBase2Position={x:0,y:u+h}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?c<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(h=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-u-h,y:0},this.tipBase2Position={x:this.width-u,y:0}):(this.tipBase1Position={x:this.width,y:u},this.tipBase2Position={x:this.width,y:u+h}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?c<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(h=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-u-h,y:this.height},this.tipBase2Position={x:this.width-u,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-u-h},this.tipBase2Position={x:this.width,y:this.height-u}):c<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(h=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:u,y:this.height},this.tipBase2Position={x:u+h,y:this.height}):(this.tipBase1Position={x:0,y:this.height-u},this.tipBase2Position={x:0,y:this.height-u-h})},r.prototype.resize=function(a){d.prototype.resize.call(this,a),this.positionTip()},r.prototype.positionTip=function(){D.setAttributes(this.tip,[["points",this.getTipPoints()]]);var a=this.tipGrip.visual.transform.baseVal.getItem(0);a.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(a,0)},Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),r.prototype.select=function(){this.positionTip(),d.prototype.select.call(this)},r.prototype.getState=function(){var a=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},d.prototype.getState.call(this));return a.typeName=r.typeName,a},r.prototype.restoreState=function(a){var u=a;this.bgColor=u.bgColor,this.tipPosition=u.tipPosition,d.prototype.restoreState.call(this,a),this.createTip(),this.setTipPoints()},r.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.tipPosition={x:this.tipPosition.x*a,y:this.tipPosition.y*u},this.positionTip()},r.typeName="CalloutMarker",r.title="Callout marker",r.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>',r}(Xe),X=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.fillColor="transparent",c.strokeColor="transparent",c.strokeWidth=0,c.strokeDasharray="",c.opacity=1,c.strokeColor=h.defaultColor,c.strokeWidth=h.defaultStrokeWidth,c.strokeDasharray=h.defaultStrokeDasharray,c.fillColor=h.defaultFillColor,c.setStrokeColor=c.setStrokeColor.bind(c),c.setFillColor=c.setFillColor.bind(c),c.setStrokeWidth=c.setStrokeWidth.bind(c),c.setStrokeDasharray=c.setStrokeDasharray.bind(c),c.setOpacity=c.setOpacity.bind(c),c.createVisual=c.createVisual.bind(c),c.strokePanel=new Ke("Line color",oe(h.defaultColorSet,["transparent"]),h.defaultColor),c.strokePanel.onColorChanged=c.setStrokeColor,c.fillPanel=new Ke("Fill color",oe(h.defaultColorSet,["transparent"]),c.fillColor,T),c.fillPanel.onColorChanged=c.setFillColor,c.strokeWidthPanel=new Dt("Line width",h.defaultStrokeWidths,h.defaultStrokeWidth),c.strokeWidthPanel.onWidthChanged=c.setStrokeWidth,c.strokeStylePanel=new ft("Line style",h.defaultStrokeDasharrays,h.defaultStrokeDasharray),c.strokeStylePanel.onStyleChanged=c.setStrokeDasharray,c.opacityPanel=new E("Opacity",h.defaultOpacitySteps,c.opacity),c.opacityPanel.onOpacityChanged=c.setOpacity,c}return Je(r,d),r.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual)},r.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)},r.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},r.prototype.manipulate=function(a){d.prototype.manipulate.call(this,a)},r.prototype.resize=function(a){d.prototype.resize.call(this,a),this.setSize()},r.prototype.setSize=function(){d.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()]])},r.prototype.pointerUp=function(a){d.prototype.pointerUp.call(this,a),this.setSize()},r.prototype.setStrokeColor=function(a){this.strokeColor=a,this.visual&&D.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},r.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&D.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(a),this.stateChanged()},r.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&D.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},r.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&D.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},r.prototype.setOpacity=function(a){this.opacity=a,this.visual&&D.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),r.prototype.getState=function(){var a=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},d.prototype.getState.call(this));return a.typeName=r.typeName,a},r.prototype.restoreState=function(a){var u=a;this.fillColor=u.fillColor,this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.opacity=u.opacity,this.createVisual(),d.prototype.restoreState.call(this,a),this.setSize()},r.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.setSize()},r.typeName="EllipseMarker",r.title="Ellipse marker",r.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>',r}(ot),Le=function(d){function r(a,u,h){return d.call(this,a,u,h)||this}return Je(r,d),Object.defineProperty(r.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),r.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.tip1&&a!==this.tip2)},r.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)},r.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="creating"&&this.createTips()},r.prototype.adjustVisual=function(){if(d.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 a=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),u=this.tip1.transform.baseVal.getItem(0);u.setRotate(a,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(u,0);var h=this.tip2.transform.baseVal.getItem(0);h.setRotate(a+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(h,0)}},Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),r.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=r.typeName,a},r.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a),this.createTips(),this.adjustVisual()},r.typeName="MeasurementMarker",r.title="Measurement marker",r.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>',r}(pt),ht=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.strokePanel.colors=h.defaultColorSet,c.fillColor="transparent",c}return Je(r,d),Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),r.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=r.typeName,a},r.typeName="EllipseFrameMarker",r.title="Ellipse frame marker",r.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>',r}(X),Ct=function(){function d(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(d.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),d.prototype.addUndoStep=function(r){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(r)||(this.undoStack.push(r),JSON.stringify(this.lastRedoStep)!==JSON.stringify(r)&&this.redoStack.splice(0,this.redoStack.length))},d.prototype.replaceLastUndoStep=function(r){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=r)},d.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},d.prototype.undo=function(){if(this.undoStack.length>1){var r=this.undoStack.pop();return r!==void 0&&this.redoStack.push(r),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},d.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},d}(),ct=function(d){function r(a,u,h){var c=d.call(this,a,u,h)||this;return c.strokeColor="transparent",c.strokeWidth=0,c.strokeDasharray="",c.curveX=0,c.curveY=0,c.manipulationStartCurveX=0,c.manipulationStartCurveY=0,c.setStrokeColor=c.setStrokeColor.bind(c),c.setStrokeWidth=c.setStrokeWidth.bind(c),c.setStrokeDasharray=c.setStrokeDasharray.bind(c),c.positionGrips=c.positionGrips.bind(c),c.addControlGrips=c.addControlGrips.bind(c),c.adjustVisual=c.adjustVisual.bind(c),c.setupControlBox=c.setupControlBox.bind(c),c.resize=c.resize.bind(c),c.strokeColor=h.defaultColor,c.strokeWidth=h.defaultStrokeWidth,c.strokeDasharray=h.defaultStrokeDasharray,c.strokePanel=new Ke("Line color",h.defaultColorSet,h.defaultColor),c.strokePanel.onColorChanged=c.setStrokeColor,c.strokeWidthPanel=new Dt("Line width",h.defaultStrokeWidths,h.defaultStrokeWidth),c.strokeWidthPanel.onWidthChanged=c.setStrokeWidth,c.strokeStylePanel=new ft("Line style",h.defaultStrokeDasharrays,h.defaultStrokeDasharray),c.strokeStylePanel.onStyleChanged=c.setStrokeDasharray,c}return Je(r,d),r.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.selectorCurve&&a!==this.visibleCurve&&!this.curveGrip.ownsTarget(a))},r.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},r.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)},r.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=a.x,this.curveY=a.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(u)&&(this.activeGrip=this.curveGrip,this._state="resize")},r.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()]]))},r.prototype.setupControlBox=function(){d.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)},r.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,d.prototype.addControlGrips.call(this)},r.prototype.positionGrips=function(){d.prototype.positionGrips.call(this);var a=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-a/2,this.curveY-a/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()))},r.prototype.manipulate=function(a){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+a.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+a.y-this.manipulationStartY),d.prototype.manipulate.call(this,a)},r.prototype.resize=function(a){this.activeGrip===this.curveGrip&&(this.curveX=a.x,this.curveY=a.y),d.prototype.resize.call(this,a),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},r.prototype.setStrokeColor=function(a){this.strokeColor=a,this.adjustVisual(),this.colorChanged(a)},r.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.adjustVisual()},r.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.adjustVisual()},r.prototype.scale=function(a,u){this.curveX=this.curveX*a,this.curveY=this.curveY*u,d.prototype.scale.call(this,a,u)},Object.defineProperty(r.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),r.prototype.getState=function(){var a=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},d.prototype.getState.call(this));return a.typeName=r.typeName,a},r.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.curveX=u.curveX,this.curveY=u.curveY,this.createVisual(),this.adjustVisual()},r.typeName="CurveMarker",r.title="Curve marker",r.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>',r}(It),Ft=function(){function d(r,a){a===void 0&&(a=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=r,this.cancelable=a}return Object.defineProperty(d.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),d.prototype.preventDefault=function(){this._defaultPrevented=!0},d}(),Pt=function(d){function r(a,u,h){var c=d.call(this,a,!1)||this;return c.dataUrl=u,c.state=h,c}return Je(r,d),r}(Ft),lt=function(d){function r(a,u,h){h===void 0&&(h=!1);var c=d.call(this,a,h)||this;return c.marker=u,c}return Je(r,d),r}(Ft),an=function(){function d(){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 d.prototype.addEventListener=function(r,a){this[r].push(a)},d.prototype.removeEventListener=function(r,a){var u=this[r].indexOf(a);u>-1&&this[r].splice(u,1)},d}(),Zt=function(){function d(r){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Se,this._isOpen=!1,this.undoRedoManager=new Ct,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 an,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=d.instanceCounter++,this.styles=new mt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=r,this.targetRoot=document.body,this.width=r.clientWidth,this.height=r.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(d.prototype,"ALL_MARKER_TYPES",{get:function(){return[wt,J,K,Xe,ht,X,A,ae,Le,C,pt,ct]},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[wt,J,K,Xe,X,A,ae]},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"BASIC_MARKER_TYPES",{get:function(){return[wt,J,K,Xe,A]},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(r){var a=this;this._availableMarkerTypes.splice(0),r.forEach(function(u){if(typeof u=="string"){var h=a.ALL_MARKER_TYPES.find(function(c){return c.typeName===u});h!==void 0&&a._availableMarkerTypes.push(h)}else a._availableMarkerTypes.push(u)})},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(r){this._zoomLevel=r,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(d.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),d.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),it.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},d.prototype.show=function(){var r=this;this.styles.styleSheetRoot===void 0&&Ut.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ut.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(a){return a(new Ft(r))})},d.prototype.render=function(){return Ue(this,void 0,void 0,function(){var r;return Ve(this,function(a){switch(a.label){case 0:return this.setCurrentMarker(),(r=new kt).naturalSize=this.renderAtNaturalSize,r.imageType=this.renderImageType,r.imageQuality=this.renderImageQuality,r.markersOnly=this.renderMarkersOnly,r.width=this.renderWidth,r.height=this.renderHeight,[4,r.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return a.sent(),[4,r.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,a.sent()]}})})},d.prototype.close=function(r){var a=this;if(r===void 0&&(r=!1),this.isOpen){var u=!1;r||this.eventListeners.beforeclose.forEach(function(h){var c=new Ft(a,!0);h(c),c.defaultPrevented&&(u=!0)}),u||(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(h){return h(new Ft(a))}),this.detachEvents(),this._isOpen=!1)}},d.prototype.addMarkersToToolbar=function(){for(var r,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];(r=this._availableMarkerTypes).push.apply(r,a)},d.prototype.addRenderEventListener=function(r){this.addEventListener("render",function(a){r(a.dataUrl,a.state)})},d.prototype.removeRenderEventListener=function(r){},d.prototype.addCloseEventListener=function(r){this.addEventListener("close",function(){r()})},d.prototype.removeCloseEventListener=function(r){},d.prototype.setupResizeObserver=function(){var r=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){r.resize(r.target.clientWidth,r.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return r.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},d.prototype.onPopupTargetResize=function(){var r=1*this.target.clientWidth/this.target.clientHeight,a=this.editorCanvas.clientWidth/r>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*r:this.editorCanvas.clientWidth,u=a<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/r;this.resize(a,u)},d.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},d.prototype.resize=function(r,a){this._isResizing=!0;var u=r/this.imageWidth,h=a/this.imageHeight;this.imageWidth=Math.round(r),this.imageHeight=Math.round(a),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(u,h),this._isResizing=!1},d.prototype.scaleMarkers=function(r,a){var u,h=this;this._currentMarker&&this._currentMarker instanceof Xe?this._currentMarker.scale(r,a):(u=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(c){c!==h._currentMarker&&c.scale(r,a)}),u!==void 0&&this.setCurrentMarker(u)},d.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"},d.prototype.setTopLeft=function(){var r=this.editingTarget.getBoundingClientRect(),a=this.editorCanvas.getBoundingClientRect();this.left=r.left-a.left,this.top=r.top-a.top},d.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)},d.prototype.addDefs=function(){for(var r,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];this.defs=D.createDefs(),this.addDefsToImage(),(r=this.defs).append.apply(r,a)},d.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},d.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)},d.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},d.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},d.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)},d.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},d.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)},d.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 r=document.createElement("a");r.href="https://markerjs.com/",r.target="_blank",r.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>',r.title="Powered by marker.js",r.style.display="grid",r.style.alignItems="center",r.style.justifyItems="center",r.style.padding="3px",r.style.width="20px",r.style.height="20px",this.logoUI.appendChild(r),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},d.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")},d.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"},d.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},d.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 r=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=r+"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 Ye(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 at(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},d.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},d.prototype.removeMarker=function(r){this.markerImage.removeChild(r.container),this.markers.indexOf(r)>-1&&this.markers.splice(this.markers.indexOf(r),1),r.dispose()},d.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())},d.prototype.toolbarButtonClicked=function(r,a){if(r==="marker"&&a!==void 0)this.createNewMarker(a);else if(r==="action")switch(a){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()}},d.prototype.deleteSelectedMarker=function(){var r=this;if(this._currentMarker!==void 0){var a=!1;if(this.eventListeners.markerbeforedelete.forEach(function(h){var c=new lt(r,r._currentMarker,!0);h(c),c.defaultPrevented&&(a=!0)}),!a){var u=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(h){return h(new lt(r,u))})}}},d.prototype.clear=function(){var r=this,a=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(z){var _e=new lt(r,void 0,!0);z(_e),_e.defaultPrevented&&(a=!0)}),!a)){this.setCurrentMarker();for(var u=function(z){var _e=h.markers[z];h.setCurrentMarker(h.markers[z]),h._currentMarker.dispose(),h.markerImage.removeChild(h._currentMarker.container),h.markers.splice(h.markers.indexOf(h._currentMarker),1),h.eventListeners.markerdelete.forEach(function(ut){return ut(new lt(r,_e))})},h=this,c=this.markers.length-1;c>=0;c--)u(c);this.addUndoStep()}},Object.defineProperty(d.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),d.prototype.showNotesEditor=function(){var r;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=(r=this._currentMarker.notes)!==null&&r!==void 0?r:"",this.overlayContainer.appendChild(this.notesArea))},d.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)},d.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},d.prototype.addUndoStep=function(){var r=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var a=this.getState(),u=this.undoRedoManager.getLastUndoStep();if(!u||u.width===a.width&&u.height===a.height){var h=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(a),h<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(c){return c(new Ft(r))})}else this.undoRedoManager.replaceLastUndoStep(a),this.eventListeners.statechange.forEach(function(c){return c(new Ft(r))})}},d.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},d.prototype.undoStep=function(){var r=this,a=this.undoRedoManager.undo();a!==void 0&&(this.restoreState(a),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(u){return u(new Ft(r))}))},d.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},d.prototype.redoStep=function(){var r=this,a=this.undoRedoManager.redo();a!==void 0&&(this.restoreState(a),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(u){return u(new Ft(r))}))},d.prototype.stepZoom=function(){var r=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=r<this.zoomSteps.length-1?this.zoomSteps[r+1]:this.zoomSteps[0]},d.prototype.panTo=function(r){this.contentDiv.scrollBy({left:this.prevPanPoint.x-r.x,top:this.prevPanPoint.y-r.y}),this.prevPanPoint=r},d.prototype.startRenderAndClose=function(){return Ue(this,void 0,void 0,function(){var r,a,u=this;return Ve(this,function(h){switch(h.label){case 0:return[4,this.render()];case 1:return r=h.sent(),a=this.getState(),this.eventListeners.render.forEach(function(c){return c(new Pt(u,r,a))}),this.close(!0),[2]}})})},d.prototype.getState=function(r){r===!0&&this.setCurrentMarker();var a={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(u){return a.markers.push(u.getState())}),a},d.prototype.restoreState=function(r){var a=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);r.markers.forEach(function(u){var h=a._availableMarkerTypes.find(function(z){return z.typeName===u.typeName});if(h!==void 0){var c=a.addNewMarker(h);c.restoreState(u),a.markers.push(c)}}),r.width&&r.height&&(r.width!==this.imageWidth||r.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/r.width,this.imageHeight/r.height),this.eventListeners.restorestate.forEach(function(u){return u(new Ft(a))})},d.prototype.addNewMarker=function(r){var a=D.createGroup();return this.markerImage.appendChild(a),new r(a,this.overlayContainer,this.settings)},d.prototype.createNewMarker=function(r){var a,u=this;(a=typeof r=="string"?this._availableMarkerTypes.find(function(h){return h.typeName===r}):r)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(a),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(a.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(h){return h(new lt(u,u._currentMarker))}))},d.prototype.markerCreated=function(r){var a=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(r),this.setCurrentMarker(r),r instanceof J&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(J):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(u){return u(new lt(a,a._currentMarker))})},d.prototype.colorChanged=function(r){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=r,this.settings.defaultStrokeColor=r)},d.prototype.fillColorChanged=function(r){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=r)},d.prototype.markerStateChanged=function(r){var a=this;this.eventListeners.markerchange.forEach(function(u){return u(new lt(a,r))})},d.prototype.setCurrentMarker=function(r){var a=this;this._currentMarker!==r&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(u){return u(new lt(a,a._currentMarker))})),this._currentMarker=r,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(u){return u(new lt(a,a._currentMarker))}))},d.prototype.onPointerDown=function(r){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||r.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var a=this.markers.find(function(u){return u.ownsTarget(r.target)});a!==void 0?(this.setCurrentMarker(a),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(r.clientX,r.clientY),r.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:r.clientX,y:r.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(r.clientX,r.clientY))},d.prototype.onDblClick=function(r){if(this._isFocused||this.focus(),this.mode==="select"){var a=this.markers.find(function(u){return u.ownsTarget(r.target)});a!==void 0&&a!==this._currentMarker&&this.setCurrentMarker(a),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(r.clientX,r.clientY),r.target):this.setCurrentMarker()}},d.prototype.onPointerMove=function(r){this.touchPoints!==1&&r.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||r.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(r.clientX,r.clientY)):this.zoomLevel>1&&this.panTo({x:r.clientX,y:r.clientY}))},d.prototype.onPointerUp=function(r){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(r.clientX,r.clientY)),this.isDragging=!1,this.addUndoStep()},d.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},d.prototype.onKeyUp=function(r){this._currentMarker===void 0||this.notesArea!==void 0||r.key!=="Delete"&&r.key!=="Backspace"||this.deleteSelectedMarker()},d.prototype.clientToLocalCoordinates=function(r,a){var u=this.markerImage.getBoundingClientRect();return{x:(r-u.left)/this.zoomLevel,y:(a-u.top)/this.zoomLevel}},d.prototype.onWindowResize=function(){this.positionUI()},d.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var r=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=r+"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()},d.prototype.addLicenseKey=function(r){it.addKey(r)},d.prototype.addEventListener=function(r,a){this.eventListeners.addEventListener(r,a)},d.prototype.removeEventListener=function(r,a){this.eventListeners.removeEventListener(r,a)},d.prototype.renderState=function(r){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(r),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(d.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),d.prototype.focus=function(){var r=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(a){return a(new Ft(r))}))},d.prototype.blur=function(){var r=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(a){return a(new Ft(r))}))},d.instanceCounter=0,d}();/* **********************************
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 nt=function(d,r){return(nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)Object.prototype.hasOwnProperty.call(u,h)&&(a[h]=u[h])})(d,r)};function mn(d,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=d}nt(d,r),d.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}function Qt(d,r,a,u){return new(a||(a=Promise))(function(h,c){function z(Mt){try{ut(u.next(Mt))}catch(ze){c(ze)}}function _e(Mt){try{ut(u.throw(Mt))}catch(ze){c(ze)}}function ut(Mt){var ze;Mt.done?h(Mt.value):(ze=Mt.value,ze instanceof a?ze:new a(function(Et){Et(ze)})).then(z,_e)}ut((u=u.apply(d,r||[])).next())})}function ui(d,r){var a,u,h,c,z={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return c={next:_e(0),throw:_e(1),return:_e(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function _e(ut){return function(Mt){return function(ze){if(a)throw new TypeError("Generator is already executing.");for(;z;)try{if(a=1,u&&(h=2&ze[0]?u.return:ze[0]?u.throw||((h=u.return)&&h.call(u),0):u.next)&&!(h=h.call(u,ze[1])).done)return h;switch(u=0,h&&(ze=[2&ze[0],h.value]),ze[0]){case 0:case 1:h=ze;break;case 4:return z.label++,{value:ze[1],done:!1};case 5:z.label++,u=ze[1],ze=[0];continue;case 7:ze=z.ops.pop(),z.trys.pop();continue;default:if(!(h=z.trys,(h=h.length>0&&h[h.length-1])||ze[0]!==6&&ze[0]!==2)){z=0;continue}if(ze[0]===3&&(!h||ze[1]>h[0]&&ze[1]<h[3])){z.label=ze[1];break}if(ze[0]===6&&z.label<h[1]){z.label=h[1],h=ze;break}if(h&&z.label<h[2]){z.label=h[2],z.ops.push(ze);break}h[2]&&z.ops.pop(),z.trys.pop();continue}ze=r.call(d,z)}catch(Et){ze=[6,Et],u=0}finally{a=h=0}if(5&ze[0])throw ze[1];return{value:ze[0]?ze[1]:void 0,done:!0}}([ut,Mt])}}}var gi=function(){function d(){}return d.addKey=function(r){d.key=r},Object.defineProperty(d,"isLicensed",{get:function(){return!!d.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(d.key)},enumerable:!1,configurable:!0}),d}(),Wt=function(){function d(){}return d.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},d.setAttributes=function(r,a){for(var u=0,h=a;u<h.length;u++){var c=h[u],z=c[0],_e=c[1];r.setAttribute(z,_e)}},d.createRect=function(r,a,u){var h=document.createElementNS("http://www.w3.org/2000/svg","rect");return h.setAttribute("width",r.toString()),h.setAttribute("height",a.toString()),u&&d.setAttributes(h,u),h},d.createLine=function(r,a,u,h,c){var z=document.createElementNS("http://www.w3.org/2000/svg","line");return z.setAttribute("x1",r.toString()),z.setAttribute("y1",a.toString()),z.setAttribute("x2",u.toString()),z.setAttribute("y2",h.toString()),c&&d.setAttributes(z,c),z},d.createPolygon=function(r,a){var u=document.createElementNS("http://www.w3.org/2000/svg","polygon");return u.setAttribute("points",r),a&&d.setAttributes(u,a),u},d.createCircle=function(r,a){var u=document.createElementNS("http://www.w3.org/2000/svg","circle");return u.setAttribute("cx",(r/2).toString()),u.setAttribute("cy",(r/2).toString()),u.setAttribute("r",r.toString()),a&&d.setAttributes(u,a),u},d.createEllipse=function(r,a,u){var h=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return h.setAttribute("cx",(r/2).toString()),h.setAttribute("cy",(a/2).toString()),h.setAttribute("rx",(r/2).toString()),h.setAttribute("ry",(a/2).toString()),u&&d.setAttributes(h,u),h},d.createGroup=function(r){var a=document.createElementNS("http://www.w3.org/2000/svg","g");return r&&d.setAttributes(a,r),a},d.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},d.createMarker=function(r,a,u,h,c,z,_e){var ut=document.createElementNS("http://www.w3.org/2000/svg","marker");return d.setAttributes(ut,[["id",r],["orient",a],["markerWidth",u.toString()],["markerHeight",h.toString()],["refX",c.toString()],["refY",z.toString()]]),ut.appendChild(_e),ut},d.createText=function(r){var a=document.createElementNS("http://www.w3.org/2000/svg","text");return a.setAttribute("x","0"),a.setAttribute("y","0"),r&&d.setAttributes(a,r),a},d.createTSpan=function(r,a){var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");return u.textContent=r,a&&d.setAttributes(u,a),u},d.createImage=function(r){var a=document.createElementNS("http://www.w3.org/2000/svg","image");return r&&d.setAttributes(a,r),a},d.createPoint=function(r,a){var u=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return u.x=r,u.y=a,u},d.createPath=function(r,a){var u=document.createElementNS("http://www.w3.org/2000/svg","path");return u.setAttribute("d",r),a&&d.setAttributes(u,a),u},d.createElement=function(r,a){var u=document.createElementNS("http://www.w3.org/2000/svg",r);return a&&d.setAttributes(u,a),u},d.getHollowRectanglePath=function(r,a,u,h,c,z,_e,ut){return"M"+r+","+a+"V"+(a+h)+"H"+(r+u)+"V"+a+"H"+c+"V"+z+"H"+(c+_e)+"V"+(z+ut)+"H"+c+"V"+a+"Z"},d}(),Ei=function(){function d(r){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+r+"_"}return Object.defineProperty(d.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(d.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(d.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),d.prototype.addClass=function(r){return this.styleSheet===void 0&&this.addStyleSheet(),r.name=""+this.classNamePrefix+r.localName,this.classes.push(r),this.styleSheet.sheet.insertRule("."+r.name+" {"+r.style+"}",this.styleSheet.sheet.cssRules.length),r},d.prototype.addRule=function(r){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(r),this.styleSheet.sheet.insertRule(r.selector+" {"+r.style+"}",this.styleSheet.sheet.cssRules.length)},d.prototype.addStyleSheet=function(){var r;this.styleSheet=document.createElement("style"),((r=this.styleSheetRoot)!==null&&r!==void 0?r:document.head).appendChild(this.styleSheet),this.addRule(new Gn("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Gn("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Gn("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Vn("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Vn("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},d.prototype.removeStyleSheet=function(){var r;this.styleSheet&&(((r=this.styleSheetRoot)!==null&&r!==void 0?r:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},d}(),Gn=function(d,r){this.selector=d,this.style=r},Vn=function(d,r){this.localName=d,this.style=r},vi=function(){function d(){this.blocks=[],this.display=""}return d.prototype.addButtonBlock=function(r){r.className=this.blockClassName,r.buttonClassName=this.buttonClassName,r.buttonColorsClassName=this.buttonColorsClassName,r.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(r)},d.prototype.addElementBlock=function(r){r.className===void 0&&(r.className=this.blockClassName),this.blocks.push(r)},d.prototype.getUI=function(){var r=document.createElement("div");return r.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,r.style.display=this.display,this.blocks.forEach(function(a){return r.appendChild(a.getUI())}),r},d}(),Ii=function(){function d(){}return d.prototype.getUI=function(){var r=document.createElement("div");if(r.className=this.className,this.minWidth!==void 0&&(r.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":r.style.justifyContent="flex-start";break;case"center":r.style.justifyContent="center";break;case"end":r.style.justifyContent="flex-end"}return r.style.whiteSpace="nowrap",r},d}(),Vi=function(d){function r(){var a=d!==null&&d.apply(this,arguments)||this;return a.buttons=[],a}return mn(r,d),r.prototype.addButton=function(a){a.className=this.buttonClassName,a.colorsClassName=this.buttonColorsClassName,a.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(a)},r.prototype.getUI=function(){var a=d.prototype.getUI.call(this);return this.buttons.forEach(function(u){return a.appendChild(u.getUI())}),a},r}(Ii),un=function(){function d(r,a){this._isActive=!1,this._isHidden=!1,this._icon=r,this.title=a,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(d.prototype,"icon",{get:function(){return this._icon},set:function(r){this._icon=r,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isActive",{get:function(){return this._isActive},set:function(r){this._isActive=r,this.adjustClassName()},enumerable:!1,configurable:!0}),d.prototype.getUI=function(){var r=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 r.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},d.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,"")))},d.prototype.hide=function(){this._isHidden=!0},d}(),Tt=function(d){function r(){var a=d!==null&&d.apply(this,arguments)||this;return a.elements=[],a}return mn(r,d),r.prototype.addElement=function(a){this.elements.push(a)},r.prototype.getUI=function(){var a=d.prototype.getUI.call(this);return this.elements.forEach(function(u){return a.appendChild(u)}),a},r}(Ii),Ni=function(){function d(r,a){this.horizontal=r,this.vertical=a}return Object.defineProperty(d.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),d.prototype.getVerticalLength=function(r){return r/this.ratio},d.prototype.getHorizontalLength=function(r){return r*this.ratio},d}(),Ti=function(){function d(){}return d.getIcon=function(r,a){if(r>0&&a>0){var u=new Ni(r,a),h=u.ratio>=1?20:u.getHorizontalLength(20),c=u.ratio<1?20:u.getVerticalLength(20),z=document.createElementNS("http://www.w3.org/2000/svg","svg");z.setAttribute("xmlns","http://www.w3.org/2000/svg"),z.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(z);var _e=Wt.createDefs();z.appendChild(_e);var ut=Wt.createElement("clipPath",[["id","text-bg-clip"]]);_e.appendChild(ut);var Mt=Wt.createPath(Wt.getHollowRectanglePath((24-h)/2,(24-c)/2,h,c,(24-h)/2+2,(24-c)/2+2,h-4,c-4));z.appendChild(Mt);var ze=Wt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);ze.appendChild(Wt.createTSpan(r+":"+a)),z.appendChild(ze);var Et=ze.getBBox();Wt.setAttributes(ze,[["x",((24-Et.width)/2).toString()],["y",((24-Et.height)/2-Et.y).toString()]]);var St=Wt.createPath(Wt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Et.width))/2,(24-Math.ceil(Et.height))/2,Math.ceil(Et.width),Math.ceil(Et.height)));return ut.appendChild(St),Wt.setAttributes(Mt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(z),z.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>'},d}(),In=function(d){function r(a,u,h){var c=d.call(this,a,u)||this;return c.isDropdownOpen=!1,c.onClick=c.dropdownButtonClicked,c.dropdownButtons=h,c}return mn(r,d),r.prototype.setupDropdown=function(){var a=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(u){u.className=a.className,u.colorsClassName=a.colorsClassName,a.dropdownBlock.appendChild(u.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},r.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},r.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},r.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},r.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},r.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},r}(un),zt=function(){function d(r,a){this.GRIP_SIZE=10,this.color=r,this.fillColor=a,this.visual=Wt.createGroup(),this.visual.appendChild(Wt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Wt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return d.prototype.ownsTarget=function(r){return r===this.visual||r===this.visual.childNodes[0]||r===this.visual.childNodes[1]},d.prototype.setCenter=function(r,a){this.visual.childNodes.forEach(function(u){return Wt.setAttributes(u,[["cx",r.toString()],["cy",a.toString()]])})},d}(),En=function(){function d(r,a,u,h){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=r,this.canvasHeight=a,this.margin=u,this.container=h,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(d.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(r){this._aspectRatio=r,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(r){this._isGridVisible=r,this.gridContainer&&Wt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(r){this._zoomFactor=r,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),d.prototype.open=function(){var r=this;this.cropShadeElement=Wt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Wt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var a=0;a<this.numberOfGridLines;a++)this.horizontalGridLines.push(Wt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Wt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(u){return r.gridContainer.appendChild(u)}),this.verticalGridLines.forEach(function(u){return r.gridContainer.appendChild(u)}),this.cropRectElement=Wt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new zt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new zt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new zt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new zt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},d.prototype.setCropRectangle=function(r){this.cropRect=r;var a=Object.assign({},this.cropRect);this.zoomFactor!==1&&(a.width=this.cropRect.width*this.zoomFactor,a.height=this.cropRect.height*this.zoomFactor,a.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-a.width/2,a.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-a.height/2),Wt.setAttributes(this.cropRectElement,[["x",a.x.toString()],["y",a.y.toString()],["width",a.width.toString()],["height",a.height.toString()]]);var u=a.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(c,z){var _e=a.y+u*(z+1);Wt.setAttributes(c,[["x1",""+a.x],["y1",""+_e],["x2",""+(a.x+a.width)],["y2",""+_e]])});var h=a.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(c,z){var _e=a.x+h*(z+1);Wt.setAttributes(c,[["x1",""+_e],["y1",""+a.y],["x2",""+_e],["y2",""+(a.y+a.height)]])}),Wt.setAttributes(this.cropShadeElement,[["d",Wt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,a.x,a.y,a.width,a.height)]]),this.topLeftGrip.setCenter(a.x,a.y),this.topRightGrip.setCenter(a.x+a.width,a.y),this.bottomLeftGrip.setCenter(a.x,a.y+a.height),this.bottomRightGrip.setCenter(a.x+a.width,a.y+a.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},d.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)},d.prototype.clientToLocalCoordinates=function(r,a){var u=this.container.getBoundingClientRect();return{x:r-u.left+this.margin,y:a-u.top+this.margin}},d.prototype.onPointerDown=function(r){this.container.setPointerCapture(r.pointerId),this.previousPoint=this.clientToLocalCoordinates(r.clientX,r.clientY),this.cropRectElement===r.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(r.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(r.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(r.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(r.target)&&(this.activeGrip=this.bottomRightGrip)},d.prototype.onPointerMove=function(r){if(this.isMoving)this.move(this.clientToLocalCoordinates(r.clientX,r.clientY));else if(this.activeGrip){var a=this.clientToLocalCoordinates(r.clientX,r.clientY);this.resize(a)}r.preventDefault()},d.prototype.onPointerUp=function(r){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(r.pointerId)},d.prototype.move=function(r){var a=r.x-this.previousPoint.x,u=r.y-this.previousPoint.y;this.zoomFactor!==1&&(a=-a/this.zoomFactor,u=-u/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+a),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+u),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=r},d.prototype.resize=function(r){var a=Object.assign({},this.cropRect),u=r.x-this.previousPoint.x,h=r.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:a.x+u<this.margin&&(u=this.margin-a.x),a.x+=u,a.width=this.cropRect.x+this.cropRect.width-a.x;break;case this.bottomRightGrip:case this.topRightGrip:a.width+u>this.canvasWidth*this.zoomFactor&&(u=this.canvasWidth*this.zoomFactor-a.width),a.width+=u}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(a.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(u),a.height=this.aspectRatio.getVerticalLength(a.width)):(a.y+=h,a.height=this.cropRect.y+this.cropRect.height-a.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?a.height=this.aspectRatio.getVerticalLength(a.width):a.height+=h}a.width<10&&(a.x=this.cropRect.x,a.width=10),a.height<10&&(a.y=this.cropRect.y,a.height=10),this.previousPoint=r,a.x>=this.margin&&a.y>=this.margin&&a.x-this.margin+a.width<=this.canvasWidth&&a.y-this.margin+a.height<=this.canvasHeight&&(this.cropRect=a,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},d.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var r=this.cropRect.x+this.cropRect.width/2,a=this.cropRect.y+this.cropRect.height/2,u=this.aspectRatio.getHorizontalLength(this.cropRect.height),h=this.aspectRatio.getVerticalLength(this.cropRect.width);u/this.canvasWidth<h/this.canvasHeight?this.cropRect.width=u:this.cropRect.height=h,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=r-this.cropRect.width/2,this.cropRect.y=a-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)}},d.prototype.getRescaledRect=function(r,a,u,h,c,z){var _e=u/r,ut=h/a;return{x:(c.x-z)*_e+z,y:(c.y-z)*ut+z,width:c.width*_e,height:c.height*ut}},d.prototype.scaleCanvas=function(r,a){var u=this.getRescaledRect(this.canvasWidth,this.canvasHeight,r,a,this.cropRect,this.margin);this.canvasWidth=r,this.canvasHeight=a,this.onCropChange&&this.onCropChange(u),this.setCropRectangle(u)},d}(),$t=function(){function d(r){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=r,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(d.prototype,"angle",{get:function(){return this._angle},set:function(r){this._angle=r,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),d.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},d.prototype.onPointerDown=function(r){this.controlContainer.setPointerCapture(r.pointerId),this.isDragging=!0,this.previousPoint={x:r.clientX,y:r.clientY}},d.prototype.onPointerMove=function(r){this.isDragging&&(this.onAngleChange&&this.onAngleChange((r.clientX-this.previousPoint.x)/5),this.previousPoint.x=r.clientX)},d.prototype.onPointerUp=function(r){this.isDragging&&this.onAngleChange&&this.onAngleChange((r.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(r.pointerId)},d.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var r=this.angleLabelText.getBBox();Wt.setAttributes(this.angleLabelElement,[["x",((this.width-r.width)/2).toString()],["y",(this.height/2).toString()]])}},d.prototype.positionScaleShape=function(){if(this.scaleShape){var r=this.scaleShape.transform.baseVal.getItem(0);r.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(r,0)}},d.prototype.getVisual=function(){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("width",this.width+"px"),r.setAttribute("height",this.height+"px"),r.setAttribute("viewBox","0 0 "+this.width+" "+this.height),r.style.flexShrink="0",document.body.appendChild(r);for(var a="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,u=1;u<=this.width/5+10;u++){var h=u%5==0?this.height/3:this.height/6;a+="h4v"+-h+"h1v"+h}a+="v1H0Z",this.scaleShape=Wt.createPath(a);var c=Wt.createTransform();this.scaleShape.transform.baseVal.appendItem(c),r.appendChild(this.scaleShape),this.angleLabelElement=Wt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Wt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var z=Wt.createTSpan("");return z.innerHTML="&deg;",this.angleLabelElement.appendChild(z),r.appendChild(this.angleLabelElement),document.body.removeChild(r),r},d}(),gn=function(){function d(){this.naturalSize=!1,this.imageType="image/png"}return d.prototype.rasterize=function(r,a,u,h,c,z,_e){var ut=this;return new Promise(function(Mt){var ze=document.createElement("canvas");ze.width=r.width.baseVal.value-2*h,ze.height=r.height.baseVal.value-2*h;var Et=1,St=1;ut.naturalSize===!0?(Et=a.naturalWidth/(r.width.baseVal.value-2*h)/z,St=a.naturalHeight/(r.height.baseVal.value-2*h)/_e,ze.width=a.naturalWidth/z,ze.height=a.naturalHeight/_e):ut.width!==void 0&&ut.height!==void 0&&(Et=ut.width/u.width,St=ut.height/u.height,ze.width*=Et,ze.height*=St);var Rt=ze.getContext("2d");Rt.translate(ze.width/2,ze.height/2),Rt.rotate(c*Math.PI/180),Rt.scale(z,_e),Rt.translate(-ze.width/2,-ze.height/2),Rt.drawImage(a,0,0,ze.width,ze.height);var tn=document.createElement("canvas");tn.width=u.width*Et,tn.height=u.height*St,tn.getContext("2d").putImageData(Rt.getImageData((u.x-h)*Et,(u.y-h)*St,u.width*Et,u.height*St),0,0),Mt(tn.toDataURL(ut.imageType,ut.imageQuality))})},d}(),Ne=function(){function d(r){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=d.instanceCounter++,this.styles=new Ei(this.instanceNo),this.target=r,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(d.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(r){this._zoomToCropEnabled=r,r?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(r){this._isGridVisible=r,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"gridLines",{get:function(){return this._gridLines},set:function(r){this._gridLines=r,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(r){this._rotationAngle=r,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"aspectRatio",{get:function(){var r;return(r=this._aspectRatio)!==null&&r!==void 0?r:this.aspectRatios[0]},set:function(r){this._aspectRatio=r},enumerable:!1,configurable:!0}),d.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},d.prototype.show=function(){this.showUI(),this.open()},d.prototype.close=function(r){r===void 0&&(r=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),r||this.closeEventListeners.forEach(function(a){return a()}),this._isOpen=!1)},d.prototype.addRenderEventListener=function(r){this.renderEventListeners.push(r)},d.prototype.removeRenderEventListener=function(r){this.renderEventListeners.indexOf(r)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(r),1)},d.prototype.addCloseEventListener=function(r){this.closeEventListeners.push(r)},d.prototype.removeCloseEventListener=function(r){this.closeEventListeners.indexOf(r)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(r),1)},d.prototype.setupResizeObserver=function(){var r=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){r.resize(r.target.clientWidth,r.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))},d.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var r=1*this.target.clientWidth/this.target.clientHeight,a=this.contentDiv.clientWidth/r>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*r:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,u=a+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/r;this.resize(a,u)}},d.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},d.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",Wt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},d.prototype.resize=function(r,a){this.imageWidth=Math.round(r),this.imageHeight=Math.round(a),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()},d.prototype.setEditingTarget=function(){var r=document.createElement("canvas");r.width=this.target.naturalWidth,r.height=this.target.naturalHeight,r.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var a=r.toDataURL();Wt.setAttributes(this.editingTarget,[["href",a]]),this.setEditingTargetSize()},d.prototype.setTopLeft=function(){var r=this.target.getBoundingClientRect(),a=this.editorCanvas.getBoundingClientRect();this.left=r.left-a.left-this.CANVAS_MARGIN,this.top=r.top-a.top-this.CANVAS_MARGIN},d.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=Wt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Wt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Wt.createGroup(),this.editingTargetRotationScaleContainer=Wt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var r=Wt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(r);var a=Wt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(a),this.editingTargetContainer=Wt.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)},d.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},d.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Wt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new En(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()},d.prototype.zoomToCrop=function(){if(this.cropRect){var r=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,a=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=r+"px "+a+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-r+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-a+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},d.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)},d.prototype.cropRectChanged=function(r){this.cropRect=r,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},d.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},d.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"},d.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},d.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 r=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,a=this.target.offsetTop>r+this.CANVAS_MARGIN?this.target.offsetTop-(r+this.CANVAS_MARGIN):0;this.coverDiv.style.top=a+"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},d.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},d.prototype.addTopToolbar=function(){var r=this;this.topToolbar=new vi,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 a=new Vi;a.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(a);var u=[];this.aspectRatios.forEach(function(St){var Rt=new un(Ti.getIcon(St.horizontal,St.vertical),St.horizontal===0&&St.vertical===0?"FREE":St.horizontal+":"+St.vertical);Rt.onClick=function(){return r.ratioButtonClicked(St)},u.push(Rt)}),this.aspectRatioButton=new In(Ti.getIcon(0,0),"Aspect ratio",u),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,a.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var h=new un('<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");h.isActive=this.isGridVisible,h.onClick=function(){r.isGridVisible=!r.isGridVisible,h.isActive=r.isGridVisible},a.addButton(h);var c=new un('<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(c.isActive=this.zoomToCropEnabled,c.onClick=function(){r.zoomToCropEnabled=!r.zoomToCropEnabled,c.isActive=r.zoomToCropEnabled},a.addButton(c),!gi.isLicensed){var z=new Tt;this.topToolbar.addElementBlock(z);var _e=document.createElement("div");_e.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var ut=document.createElement("a");ut.style.color="currentColor",ut.href="https://markerjs.com/products/cropro",ut.target="_blank",ut.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>',_e.appendChild(ut),z.addElement(_e)}var Mt=new Vi;Mt.minWidth=3*this.toolbarHeight+"px",Mt.contentAlign="end",this.topToolbar.addButtonBlock(Mt);var ze=new un('<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");ze.onClick=this.startRenderAndClose,Mt.addButton(ze),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(ze.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Et=new un('<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");Et.onClick=this.close,Mt.addButton(Et),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Et.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},d.prototype.addBottomToolbar=function(){var r=this;this.bottomToolbar=new vi,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 a=new Vi;a.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(a);var u=new un('<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");u.onClick=this.rotateLeftButtonClicked,a.addButton(u);var h=new un('<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");h.onClick=this.rotateRightButtonClicked,a.addButton(h);var c=new Tt;c.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(c),this.straightener=new $t("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(Mt){r.rotateBy(Mt),r.straightener.angle=r.rotationAngle},c.addElement(this.straightener.getUI());var z=new Vi;z.minWidth=2*this.toolbarHeight+"px",z.contentAlign="end",this.bottomToolbar.addButtonBlock(z);var _e=new un('<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");_e.onClick=this.flipHorizontallyButtonClicked,z.addButton(_e);var ut=new un('<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");ut.onClick=this.flipVerticallyButtonClicked,z.addButton(ut)},d.prototype.ratioButtonClicked=function(r){this.aspectRatio=r,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},d.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Ti.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},d.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Ni(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},d.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},d.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},d.prototype.restoreState=function(r){if(r){var a=this.cropLayer.getRescaledRect(r.width,r.height,this.imageWidth,this.imageHeight,r.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(a),this.cropRectChanged(a),this.flippedHorizontally=r.flippedHorizontally,this.flippedVertically=r.flippedVertically,this.applyFlip(),this.rotationAngle=r.rotationAngle,this.applyRotation()}},d.prototype.clientToLocalCoordinates=function(r,a){var u=this.cropImage.getBoundingClientRect();return{x:r-u.left,y:a-u.top}},d.prototype.onWindowResize=function(){this.positionUI()},d.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var r=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=r+"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()},d.prototype.rotateLeftButtonClicked=function(){var r=this.rotationAngle-90;this.rotationAngle%90!=0&&(r+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(r)},d.prototype.rotateRightButtonClicked=function(){var r=this.rotationAngle+90;this.rotationAngle%90!=0&&(r-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(r)},d.prototype.rotateTo=function(r){r=(r=r>180?r-360:r)<=-180?r+360:r,this.rotationAngle=r,this.applyRotation()},d.prototype.rotateBy=function(r){this.rotateTo((this.rotationAngle+r)%360)},d.prototype.applyRotation=function(){var r=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var a=this.editingTargetRotationContainer.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(a,0);var u=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/u.width,this.imageHeight/u.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=r},d.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},d.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},d.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},d.prototype.startRenderAndClose=function(){return Qt(this,void 0,void 0,function(){var r,a;return ui(this,function(u){switch(u.label){case 0:return[4,this.render()];case 1:return r=u.sent(),a=this.getState(),this.renderEventListeners.forEach(function(h){return h(r,a)}),this.close(!0),[2]}})})},d.prototype.render=function(){return Qt(this,void 0,void 0,function(){var r;return ui(this,function(a){switch(a.label){case 0:return(r=new gn).naturalSize=this.renderAtNaturalSize,r.imageType=this.renderImageType,r.imageQuality=this.renderImageQuality,r.width=this.renderWidth,r.height=this.renderHeight,this.unzoomFromCrop(),Wt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,r.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 a.sent(),[4,r.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,a.sent()]}})})},d.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Vn("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 Vn("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Vn("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var r=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Vn("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*r)+`px;
height: `+(this.toolbarHeight-2*r)+`px;
padding: `+r+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Vn("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Vn("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Gn("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Gn("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Vn("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 Vn("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Vn("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 Vn("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*r)+`px;
padding: `+r+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Vn("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},d.instanceCounter=0,d}(),_t=p("8hTe"),Kn=p.n(_t),ei=/<pre[^>]*>/g;function ro(d){var r=document.createElement("div");return r.innerHTML=d,r.childNodes.length===0?"":r.childNodes[0].nodeValue}var ao=we.a=function(d){var r=d.value,a=r===void 0?"":r,u=d.edit,h=u===void 0?!1:u,c=d.className,z=d.showTextOnly,_e=d.showLines,ut=d.replaces,Mt=d.zoomImg,ze=d.hasMask,Et=d.style,St=Et===void 0?{}:Et,Rt=d.stylesPrev,tn=Rt===void 0?{}:Rt,vn=String(a),qt=Object(ye.useRef)(),Pi=Object(ye.useRef)(),ci=Object(ye.useState)(""),xi=Object(P.a)(ci,2),Ui=xi[0],ti=xi[1],so=Object(ye.useState)("office"),Zi=Object(P.a)(so,2),bo=Zi[0],vo=Zi[1],sr=function(){var Mn=new Ne(Pi.current);Mn.displayMode="popup",Mn.addRenderEventListener(function(){var ni=Object(ke.a)(ce.a.mark(function xn(ii){var Rn;return ce.a.wrap(function(oi){for(;;)switch(oi.prev=oi.next){case 0:return qt.current.style.display="none",oi.next=3,Object(xt.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ii}});case 3:Rn=oi.sent,Rn!=null&&Rn.id&&ut(Pi.current.getAttribute("src").replace(je.a.API_SERVER,""),"/api/attachments/".concat(Rn==null?void 0:Rn.id,"?type=").concat(Rn.content_type));case 5:case"end":return oi.stop()}},xn)}));return function(xn){return ni.apply(this,arguments)}}()),Mn.show()},Go=function(){var Mn=new Zt(Pi.current);Mn.settings.displayMode="popup",Mn.addEventListener("render",function(){var ni=Object(ke.a)(ce.a.mark(function xn(ii){var Rn;return ce.a.wrap(function(oi){for(;;)switch(oi.prev=oi.next){case 0:if(qt.current.style.display="none",!Pi.current){oi.next=6;break}return oi.next=4,Object(xt.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ii.dataUrl}});case 4:Rn=oi.sent,Rn!=null&&Rn.id&&ut(Pi.current.getAttribute("src").replace(je.a.API_SERVER,""),"/api/attachments/".concat(Rn==null?void 0:Rn.id,"?type=").concat(Rn.content_type));case 6:case"end":return oi.stop()}},xn)}));return function(xn){return ni.apply(this,arguments)}}()),Mn.show(),window.markerArea=Mn},lo=Object(ye.useMemo)(function(){try{var Qn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Mn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ni=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;vn=vn.replace(Qn,"("+je.a.API_SERVER+"/api/attachments/").replace(Mn,'"'+je.a.API_SERVER+"/api/attachments/").replace(ni,'"'+je.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,`
`),vn=vn.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(uo){}var xn=et(vn),ii=ve();if(vn.match(/\[TOC\]/)&&(xn=xn.replace("<p>[TOC]</p>",He()),Fe()),xn=xn.replace(/(__special_katext_id_\d+__)/g,function(uo,oi){var _i=ii[oi],Ko=_i.type,Qo=_i.expression;return Object(Be.renderToString)(ro(Qo)||"",{displayMode:Ko==="block",throwOnError:!1,output:"html"})}),xn=xn.replace(/▁/g,"\u2581\u2581\u2581"),re(),z){var Rn=document.createElement("div");return Rn.innerHTML=xn,Rn.innerText}return setTimeout(function(){return _o()},500),xn},[vn]),di=Object(ye.useRef)();be.WebkitLineClamp=_e,_e&&(St=Object(x.a)(Object(x.a)({},St),be));function ko(Qn){var Mn=Qn.target;if(Mn.tagName.toUpperCase()==="IMG"){if(Mt){var ni=Mn.getAttribute("src");ti(ni),vo("image")}}else if(Mn.tagName.toUpperCase()==="A"){var xn=Mn.getAttribute("href");if(xn.indexOf("office")>-1)Qn.preventDefault(),ti(xn),vo("office");else if(xn.indexOf("application/pdf")>-1)Qn.preventDefault(),ti(xn),vo("pdf");else if(xn.indexOf("type=text")>-1)Qn.preventDefault(),ti(xn),vo("html");else if(xn.startsWith("#")){Qn.preventDefault();var ii=document.getElementById(xn.replace("#",""));ii&&ii.scrollIntoView(!0)}}}var _o=function(){var Mn,ni=(Mn=di.current)===null||Mn===void 0?void 0:Mn.querySelectorAll("video");ni==null||ni.forEach(function(xn){if(xn.oncontextmenu=function(){return!1},xn.src.indexOf(".m3u8")>-1&&!xn.canPlayType("application/vnd.apple.mpegurl")){if(le.a.isSupported()){var ii=new le.a;ii.loadSource(xn.src),ii.attachMedia(xn)}}})};Object(ye.useEffect)(function(){if(di.current&&lo&&(lo.match(ei)&&window.PR.prettyPrint()),di.current)return di.current.addEventListener("click",ko),function(){di.current.removeEventListener("click",ko),re(),Fe()}},[lo,di.current,ko]);var yr=function(Mn){if(!h)return;Mn.target.nodeName==="IMG"?(qt.current.style.display="flex",qt.current.style.width=Mn.target.clientWidth+"px",qt.current.style.height=Mn.target.clientHeight+"px",qt.current.style.top=Mn.target.offsetTop+"px",qt.current.style.left=Mn.target.offsetLeft+"px",Pi.current.src=Mn.target.getAttribute("src")):qt.current.style.display="none"};return _.a.createElement("div",{style:{position:"relative"}},_.a.createElement("div",{ref:di,style:Object(x.a)({},St),className:"".concat(c||""," markdown-body ").concat(Kn.a.mdBody),onMouseOver:yr,dangerouslySetInnerHTML:{__html:lo}}),_.a.createElement("div",{ref:qt,className:Kn.a.button},_.a.createElement(xe.a,null,_.a.createElement(Z.a,{onClick:function(){return sr()}},"\u88C1\u526A"),_.a.createElement(Z.a,{onClick:function(){return Go()}},"\u7F16\u8F91"))),_.a.createElement("img",{ref:Pi,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),_.a.createElement(tt.a,{close:!0,data:Ui,hasMask:ze,type:Ui!=null&&Ui.length?bo:"",style:Object(x.a)({},tn),onClose:function(){return ti("")}}))}},"9VGf":function(Pe,we,p){"use strict";p.d(we,"a",function(){return me});var W=p("q1tI"),xe=p.n(W);function me(Z,x){var ke=Object(W.useRef)();Object(W.useEffect)(function(){ke.current=Z}),Object(W.useEffect)(function(){function P(){ke.current()}if(x!==null){var $=setInterval(P,x);return function(){return clearInterval($)}}},[x])}},"9ZNV":function(Pe,we,p){"use strict";p.d(we,"a",function(){return ye});var W=p("0Owb"),xe=p("+L6B"),me=p("2/Rp"),Z=p("q1tI"),x=p.n(Z),ke=p("UUDw"),P=p.n(ke),$=p("TSYQ"),ce=p.n($),ye=function(V){var Ce=V.cancelText,se=Ce===void 0?"\u53D6\u6D88":Ce,ee=V.okText,U=ee===void 0?"\u786E\u5B9A":ee,R=V.loading,k=R===void 0?!1:R,te=V.hasOkBtn,Ae=te===void 0?!0:te,Fe=V.okButtonProps,be=Fe===void 0?{}:Fe,he=V.onCancel,He=he===void 0?function(){}:he,ue=V.onOk,ge=ue===void 0?function(){}:ue,Ie=V.className,pe=Ie===void 0?"":Ie;return x.a.createElement("div",{className:ce()(P.a.buttonFixed,pe)},x.a.createElement("div",{className:P.a.buttonWrap},x.a.createElement(me.a,{size:"large",className:"".concat(P.a.button," mr20"),onClick:He},se),Ae&&x.a.createElement(me.a,Object(W.a)({size:"large",type:"primary",className:"".concat(P.a.button," mr20"),loading:k,onClick:ge},be),U)))}},"A/g1":function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94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sfz5Rnd15ulp/tiGtPV6h0aIwaCDxUPc/F8sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},Bd2K:function(Pe,we,p){(function(W){W(p("VrN/"),p("osHv"))})(function(W){W.defineOption("autoCloseTags",!1,function(ce,ye,_){if(_!=W.Init&&_&&ce.removeKeyMap("autoCloseTags"),!ye)return;var V={name:"autoCloseTags"};(typeof ye!="object"||ye.whenClosing!==!1)&&(V["'/'"]=function(Ce){return ke(Ce)}),(typeof ye!="object"||ye.whenOpening!==!1)&&(V["'>'"]=function(Ce){return Z(Ce)}),ce.addKeyMap(V)});var xe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],me=["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 Z(ce){if(ce.getOption("disableInput"))return W.Pass;for(var ye=ce.listSelections(),_=[],V=ce.getOption("autoCloseTags"),Ce=0;Ce<ye.length;Ce++){if(!ye[Ce].empty())return W.Pass;var se=ye[Ce].head,ee=ce.getTokenAt(se),U=W.innerMode(ce.getMode(),ee.state),R=U.state,k=U.mode.xmlCurrentTag&&U.mode.xmlCurrentTag(R),te=k&&k.name;if(!te)return W.Pass;var Ae=U.mode.configuration=="html",Fe=typeof V=="object"&&V.dontCloseTags||Ae&&xe,be=typeof V=="object"&&V.indentTags||Ae&&me;ee.end>se.ch&&(te=te.slice(0,te.length-ee.end+se.ch));var he=te.toLowerCase();if(!te||ee.type=="string"&&(ee.end!=se.ch||!/[\"\']/.test(ee.string.charAt(ee.string.length-1))||ee.string.length==1)||ee.type=="tag"&&k.close||ee.string.indexOf("/")==se.ch-ee.start-1||Fe&&P(Fe,he)>-1||$(ce,U.mode.xmlCurrentContext&&U.mode.xmlCurrentContext(R)||[],te,se,!0))return W.Pass;var He=typeof V=="object"&&V.emptyTags;if(He&&P(He,te)>-1){_[Ce]={text:"/>",newPos:W.Pos(se.line,se.ch+2)};continue}var ue=be&&P(be,he)>-1;_[Ce]={indent:ue,text:">"+(ue?`
`:"")+"</"+te+">",newPos:ue?W.Pos(se.line+1,0):W.Pos(se.line,se.ch+1)}}for(var ge=typeof V=="object"&&V.dontIndentOnAutoClose,Ce=ye.length-1;Ce>=0;Ce--){var Ie=_[Ce];ce.replaceRange(Ie.text,ye[Ce].head,ye[Ce].anchor,"+insert");var pe=ce.listSelections().slice(0);pe[Ce]={head:Ie.newPos,anchor:Ie.newPos},ce.setSelections(pe),!ge&&Ie.indent&&(ce.indentLine(Ie.newPos.line,null,!0),ce.indentLine(Ie.newPos.line+1,null,!0))}}function x(ce,ye){for(var _=ce.listSelections(),V=[],Ce=ye?"/":"</",se=ce.getOption("autoCloseTags"),ee=typeof se=="object"&&se.dontIndentOnSlash,U=0;U<_.length;U++){if(!_[U].empty())return W.Pass;var R=_[U].head,k=ce.getTokenAt(R),te=W.innerMode(ce.getMode(),k.state),Ae=te.state;if(ye&&(k.type=="string"||k.string.charAt(0)!="<"||k.start!=R.ch-1))return W.Pass;var Fe,be=te.mode.name!="xml"&&ce.getMode().name=="htmlmixed";if(be&&te.mode.name=="javascript")Fe=Ce+"script";else if(be&&te.mode.name=="css")Fe=Ce+"style";else{var he=te.mode.xmlCurrentContext&&te.mode.xmlCurrentContext(Ae);if(!he||he.length&&$(ce,he,he[he.length-1],R))return W.Pass;Fe=Ce+he[he.length-1]}ce.getLine(R.line).charAt(k.end)!=">"&&(Fe+=">"),V[U]=Fe}if(ce.replaceSelections(V),_=ce.listSelections(),!ee)for(var U=0;U<_.length;U++)(U==_.length-1||_[U].head.line<_[U+1].head.line)&&ce.indentLine(_[U].head.line)}function ke(ce){return ce.getOption("disableInput")?W.Pass:x(ce,!0)}W.commands.closeTag=function(ce){return x(ce)};function P(ce,ye){if(ce.indexOf)return ce.indexOf(ye);for(var _=0,V=ce.length;_<V;++_)if(ce[_]==ye)return _;return-1}function $(ce,ye,_,V,Ce){if(!W.scanForClosingTag)return!1;var se=Math.min(ce.lastLine()+1,V.line+500),ee=W.scanForClosingTag(ce,V,null,se);if(!ee||ee.tag!=_)return!1;for(var U=Ce?1:0,R=ye.length-1;R>=0&&ye[R]==_;R--)++U;V=ee.to;for(var R=1;R<U;R++){var k=W.scanForClosingTag(ce,V,null,se);if(!k||k.tag!=_)return!1;V=k.to}return!0}})},BjJ7:function(Pe,we,p){"use strict";p.d(we,"d",function(){return xe}),p.d(we,"c",function(){return me}),p.d(we,"e",function(){return Z}),p.d(we,"b",function(){return x}),p.d(we,"a",function(){return P});var W=p("m3rI");function xe($){var ce=!0;if($.length>0){for(var ye=0;ye<$.length;ye++)if($[ye].compile_success==0||!$[ye].compile_success){ce=!1;break}}else ce=!1;return ce}function me($){for(var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",ye=[],_=0;_<$.length;_++){var V=$[_],Ce=ce?"".concat(ce,"/").concat(V.name):"".concat(V.name);ye.push({title:V.name,isLeaf:!(V.type==="tree"),key:Ce})}return ye}function Z($,ce,ye){for(var _=0;_<$.length;_++){var V=$[_];if(V.key===ce){V.children=ye;break}V.children&&Z(V.children,ce,ye)}return $}function x($,ce,ye){var _;return function(){var V=this,Ce=arguments,se=function(){_=null,ye||$.apply(V,Ce)},ee=ye&&!_;clearTimeout(_),_=setTimeout(se,ce),ee&&$.apply(V,Ce)}}var ke=!0,P=W.a.API_SERVER},"C+DQ":function(Pe,we,p){},DlQD:function(Pe,we,p){(function(W,xe){Pe.exports=xe()})(this,function(){"use strict";function W(J,H){for(var K=0;K<H.length;K++){var C=H[K];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(J,C.key,C)}}function xe(J,H,K){return H&&W(J.prototype,H),K&&W(J,K),J}function me(J,H){if(!J)return;if(typeof J=="string")return Z(J,H);var K=Object.prototype.toString.call(J).slice(8,-1);if(K==="Object"&&J.constructor&&(K=J.constructor.name),K==="Map"||K==="Set")return Array.from(J);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return Z(J,H)}function Z(J,H){(H==null||H>J.length)&&(H=J.length);for(var K=0,C=new Array(H);K<H;K++)C[K]=J[K];return C}function x(J,H){var K;if(typeof Symbol=="undefined"||J[Symbol.iterator]==null){if(Array.isArray(J)||(K=me(J))||H&&J&&typeof J.length=="number"){K&&(J=K);var C=0;return function(){return C>=J.length?{done:!0}:{done:!1,value:J[C++]}}}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 K=J[Symbol.iterator](),K.next.bind(K)}function ke(J,H){return H={exports:{}},J(H,H.exports),H.exports}var P=ke(function(J){function H(){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 K(C){J.exports.defaults=C}J.exports={defaults:H(),getDefaults:H,changeDefaults:K}}),$=P.defaults,ce=P.getDefaults,ye=P.changeDefaults,_=/[&<>"']/,V=/[&<>"']/g,Ce=/[<>"']|&(?!#?\w+;)/,se=/[<>"']|&(?!#?\w+;)/g,ee={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},U=function(H){return ee[H]};function R(J,H){if(H){if(_.test(J))return J.replace(V,U)}else if(Ce.test(J))return J.replace(se,U);return J}var k=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function te(J){return J.replace(k,function(H,K){return K=K.toLowerCase(),K==="colon"?":":K.charAt(0)==="#"?K.charAt(1)==="x"?String.fromCharCode(parseInt(K.substring(2),16)):String.fromCharCode(+K.substring(1)):""})}var Ae=/(^|[^\[])\^/g;function Fe(J,H){J=J.source||J,H=H||"";var K={replace:function(E,A){return A=A.source||A,A=A.replace(Ae,"$1"),J=J.replace(E,A),K},getRegex:function(){return new RegExp(J,H)}};return K}var be=/[^\w:]/g,he=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function He(J,H,K){if(J){var C;try{C=decodeURIComponent(te(K)).replace(be,"").toLowerCase()}catch(E){return null}if(C.indexOf("javascript:")===0||C.indexOf("vbscript:")===0||C.indexOf("data:")===0)return null}H&&!he.test(K)&&(K=M(H,K));try{K=encodeURI(K).replace(/%25/g,"%")}catch(E){return null}return K}var ue={},ge=/^[^:]+:\/*[^/]*$/,Ie=/^([^:]+:)[\s\S]*$/,pe=/^([^:]+:\/*[^/]*)[\s\S]*$/;function M(J,H){ue[" "+J]||(ge.test(J)?ue[" "+J]=J+"/":ue[" "+J]=Ee(J,"/",!0)),J=ue[" "+J];var K=J.indexOf(":")===-1;return H.substring(0,2)==="//"?K?H:J.replace(Ie,"$1")+H:H.charAt(0)==="/"?K?H:J.replace(pe,"$1")+H:J+H}var ve={exec:function(){}};function re(J){for(var H=1,K,C;H<arguments.length;H++){K=arguments[H];for(C in K)Object.prototype.hasOwnProperty.call(K,C)&&(J[C]=K[C])}return J}function B(J,H){var K=J.replace(/\|/g,function(A,T,ae){for(var X=!1,Le=T;--Le>=0&&ae[Le]==="\\";)X=!X;return X?"|":" |"}),C=K.split(/ \|/),E=0;if(C.length>H)C.splice(H);else for(;C.length<H;)C.push("");for(;E<C.length;E++)C[E]=C[E].trim().replace(/\\\|/g,"|");return C}function Ee(J,H,K){var C=J.length;if(C===0)return"";for(var E=0;E<C;){var A=J.charAt(C-E-1);if(A===H&&!K)E++;else if(A!==H&&K)E++;else break}return J.substr(0,C-E)}function Re(J,H){if(J.indexOf(H[1])===-1)return-1;for(var K=J.length,C=0,E=0;E<K;E++)if(J[E]==="\\")E++;else if(J[E]===H[0])C++;else if(J[E]===H[1]&&(C--,C<0))return E;return-1}function fe(J){J&&J.sanitize&&!J.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 et={escape:R,unescape:te,edit:Fe,cleanUrl:He,resolveUrl:M,noopTest:ve,merge:re,splitCells:B,rtrim:Ee,findClosingBracket:Re,checkSanitizeDeprecation:fe},O=P.defaults,y=et.rtrim,le=et.splitCells,je=et.escape,Be=et.findClosingBracket;function tt(J,H,K){var C=H.href,E=H.title?je(H.title):null,A=J[1].replace(/\\([\[\]])/g,"$1");return J[0].charAt(0)!=="!"?{type:"link",raw:K,href:C,title:E,text:A}:{type:"image",raw:K,href:C,title:E,text:je(A)}}function xt(J,H){var K=J.match(/^(\s+)(?:```)/);if(K===null)return H;var C=K[1];return H.split(`
`).map(function(E){var A=E.match(/^\s+/);if(A===null)return E;var T=A[0];return T.length>=C.length?E.slice(C.length):E}).join(`
`)}var Qe=function(){function J(K){this.options=K||O}var H=J.prototype;return H.space=function(C){var E=this.rules.block.newline.exec(C);if(E)return E[0].length>1?{type:"space",raw:E[0]}:{raw:`
`}},H.code=function(C,E){var A=this.rules.block.code.exec(C);if(A){var T=E[E.length-1];if(T&&T.type==="paragraph")return{raw:A[0],text:A[0].trimRight()};var ae=A[0].replace(/^ {4}/gm,"");return{type:"code",raw:A[0],codeBlockStyle:"indented",text:this.options.pedantic?ae:y(ae,`
`)}}},H.fences=function(C){var E=this.rules.block.fences.exec(C);if(E){var A=E[0],T=xt(A,E[3]||"");return{type:"code",raw:A,lang:E[2]?E[2].trim():E[2],text:T}}},H.heading=function(C){var E=this.rules.block.heading.exec(C);if(E)return{type:"heading",raw:E[0],depth:E[1].length,text:E[2]}},H.nptable=function(C){var E=this.rules.block.nptable.exec(C);if(E){var A={type:"table",header:le(E[1].replace(/^ *| *\| *$/g,"")),align:E[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:E[3]?E[3].replace(/\n$/,"").split(`
`):[],raw:E[0]};if(A.header.length===A.align.length){var T=A.align.length,ae;for(ae=0;ae<T;ae++)/^ *-+: *$/.test(A.align[ae])?A.align[ae]="right":/^ *:-+: *$/.test(A.align[ae])?A.align[ae]="center":/^ *:-+ *$/.test(A.align[ae])?A.align[ae]="left":A.align[ae]=null;for(T=A.cells.length,ae=0;ae<T;ae++)A.cells[ae]=le(A.cells[ae],A.header.length);return A}}},H.hr=function(C){var E=this.rules.block.hr.exec(C);if(E)return{type:"hr",raw:E[0]}},H.blockquote=function(C){var E=this.rules.block.blockquote.exec(C);if(E){var A=E[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:E[0],text:A}}},H.list=function(C){var E=this.rules.block.list.exec(C);if(E){for(var A=E[0],T=E[2],ae=T.length>1,X=T[T.length-1]===")",Le={type:"list",raw:A,ordered:ae,start:ae?+T.slice(0,-1):"",loose:!1,items:[]},ht=E[0].match(this.rules.block.item),Ct=!1,ct,Ft,Pt,lt,an,Zt,nt,mn=ht.length,Qt=0;Qt<mn;Qt++)ct=ht[Qt],A=ct,Ft=ct.length,ct=ct.replace(/^ *([*+-]|\d+[.)]) */,""),~ct.indexOf(`
`)&&(Ft-=ct.length,ct=this.options.pedantic?ct.replace(/^ {1,4}/gm,""):ct.replace(new RegExp("^ {1,"+Ft+"}","gm"),"")),Qt!==mn-1&&(Pt=this.rules.block.bullet.exec(ht[Qt+1])[0],(ae?Pt.length===1||!X&&Pt[Pt.length-1]===")":Pt.length>1||this.options.smartLists&&Pt!==T)&&(lt=ht.slice(Qt+1).join(`
`),Le.raw=Le.raw.substring(0,Le.raw.length-lt.length),Qt=mn-1)),an=Ct||/\n\n(?!\s*$)/.test(ct),Qt!==mn-1&&(Ct=ct.charAt(ct.length-1)===`
`,an||(an=Ct)),an&&(Le.loose=!0),Zt=/^\[[ xX]\] /.test(ct),nt=void 0,Zt&&(nt=ct[1]!==" ",ct=ct.replace(/^\[[ xX]\] +/,"")),Le.items.push({type:"list_item",raw:A,task:Zt,checked:nt,loose:an,text:ct});return Le}},H.html=function(C){var E=this.rules.block.html.exec(C);if(E)return{type:this.options.sanitize?"paragraph":"html",raw:E[0],pre:!this.options.sanitizer&&(E[1]==="pre"||E[1]==="script"||E[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(E[0]):je(E[0]):E[0]}},H.def=function(C){var E=this.rules.block.def.exec(C);if(E){E[3]&&(E[3]=E[3].substring(1,E[3].length-1));var A=E[1].toLowerCase().replace(/\s+/g," ");return{tag:A,raw:E[0],href:E[2],title:E[3]}}},H.table=function(C){var E=this.rules.block.table.exec(C);if(E){var A={type:"table",header:le(E[1].replace(/^ *| *\| *$/g,"")),align:E[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:E[3]?E[3].replace(/\n$/,"").split(`
`):[]};if(A.header.length===A.align.length){A.raw=E[0];var T=A.align.length,ae;for(ae=0;ae<T;ae++)/^ *-+: *$/.test(A.align[ae])?A.align[ae]="right":/^ *:-+: *$/.test(A.align[ae])?A.align[ae]="center":/^ *:-+ *$/.test(A.align[ae])?A.align[ae]="left":A.align[ae]=null;for(T=A.cells.length,ae=0;ae<T;ae++)A.cells[ae]=le(A.cells[ae].replace(/^ *\| *| *\| *$/g,""),A.header.length);return A}}},H.lheading=function(C){var E=this.rules.block.lheading.exec(C);if(E)return{type:"heading",raw:E[0],depth:E[2].charAt(0)==="="?1:2,text:E[1]}},H.paragraph=function(C){var E=this.rules.block.paragraph.exec(C);if(E)return{type:"paragraph",raw:E[0],text:E[1].charAt(E[1].length-1)===`
`?E[1].slice(0,-1):E[1]}},H.text=function(C,E){var A=this.rules.block.text.exec(C);if(A){var T=E[E.length-1];return T&&T.type==="text"?{raw:A[0],text:A[0]}:{type:"text",raw:A[0],text:A[0]}}},H.escape=function(C){var E=this.rules.inline.escape.exec(C);if(E)return{type:"escape",raw:E[0],text:je(E[1])}},H.tag=function(C,E,A){var T=this.rules.inline.tag.exec(C);if(T)return!E&&/^<a /i.test(T[0])?E=!0:E&&/^<\/a>/i.test(T[0])&&(E=!1),!A&&/^<(pre|code|kbd|script)(\s|>)/i.test(T[0])?A=!0:A&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(T[0])&&(A=!1),{type:this.options.sanitize?"text":"html",raw:T[0],inLink:E,inRawBlock:A,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(T[0]):je(T[0]):T[0]}},H.link=function(C){var E=this.rules.inline.link.exec(C);if(E){var A=Be(E[2],"()");if(A>-1){var T=E[0].indexOf("!")===0?5:4,ae=T+E[1].length+A;E[2]=E[2].substring(0,A),E[0]=E[0].substring(0,ae).trim(),E[3]=""}var X=E[2],Le="";if(this.options.pedantic){var ht=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(X);ht?(X=ht[1],Le=ht[3]):Le=""}else Le=E[3]?E[3].slice(1,-1):"";X=X.trim().replace(/^<([\s\S]*)>$/,"$1");var Ct=tt(E,{href:X&&X.replace(this.rules.inline._escapes,"$1"),title:Le&&Le.replace(this.rules.inline._escapes,"$1")},E[0]);return Ct}},H.reflink=function(C,E){var A;if((A=this.rules.inline.reflink.exec(C))||(A=this.rules.inline.nolink.exec(C))){var T=(A[2]||A[1]).replace(/\s+/g," ");if(T=E[T.toLowerCase()],!T||!T.href){var ae=A[0].charAt(0);return{type:"text",raw:ae,text:ae}}var X=tt(A,T,A[0]);return X}},H.strong=function(C,E,A){A===void 0&&(A="");var T=this.rules.inline.strong.start.exec(C);if(T&&(!T[1]||T[1]&&(A===""||this.rules.inline.punctuation.exec(A)))){E=E.slice(-1*C.length);var ae=T[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ae.lastIndex=0;for(var X;(T=ae.exec(E))!=null;)if(X=this.rules.inline.strong.middle.exec(E.slice(0,T.index+3)),X)return{type:"strong",raw:C.slice(0,X[0].length),text:C.slice(2,X[0].length-2)}}},H.em=function(C,E,A){A===void 0&&(A="");var T=this.rules.inline.em.start.exec(C);if(T&&(!T[1]||T[1]&&(A===""||this.rules.inline.punctuation.exec(A)))){E=E.slice(-1*C.length);var ae=T[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ae.lastIndex=0;for(var X;(T=ae.exec(E))!=null;)if(X=this.rules.inline.em.middle.exec(E.slice(0,T.index+2)),X)return{type:"em",raw:C.slice(0,X[0].length),text:C.slice(1,X[0].length-1)}}},H.codespan=function(C){var E=this.rules.inline.code.exec(C);if(E){var A=E[2].replace(/\n/g," "),T=/[^ ]/.test(A),ae=A.startsWith(" ")&&A.endsWith(" ");return T&&ae&&(A=A.substring(1,A.length-1)),A=je(A,!0),{type:"codespan",raw:E[0],text:A}}},H.br=function(C){var E=this.rules.inline.br.exec(C);if(E)return{type:"br",raw:E[0]}},H.del=function(C){var E=this.rules.inline.del.exec(C);if(E)return{type:"del",raw:E[0],text:E[1]}},H.autolink=function(C,E){var A=this.rules.inline.autolink.exec(C);if(A){var T,ae;return A[2]==="@"?(T=je(this.options.mangle?E(A[1]):A[1]),ae="mailto:"+T):(T=je(A[1]),ae=T),{type:"link",raw:A[0],text:T,href:ae,tokens:[{type:"text",raw:T,text:T}]}}},H.url=function(C,E){var A;if(A=this.rules.inline.url.exec(C)){var T,ae;if(A[2]==="@")T=je(this.options.mangle?E(A[0]):A[0]),ae="mailto:"+T;else{var X;do X=A[0],A[0]=this.rules.inline._backpedal.exec(A[0])[0];while(X!==A[0]);T=je(A[0]),A[1]==="www."?ae="http://"+T:ae=T}return{type:"link",raw:A[0],text:T,href:ae,tokens:[{type:"text",raw:T,text:T}]}}},H.inlineText=function(C,E,A){var T=this.rules.inline.text.exec(C);if(T){var ae;return E?ae=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(T[0]):je(T[0]):T[0]:ae=je(this.options.smartypants?A(T[0]):T[0]),{type:"text",raw:T[0],text:ae}}},J}(),Je=et.noopTest,Ue=et.edit,Ve=et.merge,oe={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:Je,table:Je,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};oe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,oe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,oe.def=Ue(oe.def).replace("label",oe._label).replace("title",oe._title).getRegex(),oe.bullet=/(?:[*+-]|\d{1,9}[.)])/,oe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,oe.item=Ue(oe.item,"gm").replace(/bull/g,oe.bullet).getRegex(),oe.list=Ue(oe.list).replace(/bull/g,oe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+oe.def.source+")").getRegex(),oe._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",oe._comment=/<!--(?!-?>)[\s\S]*?-->/,oe.html=Ue(oe.html,"i").replace("comment",oe._comment).replace("tag",oe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oe.paragraph=Ue(oe._paragraph).replace("hr",oe.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",oe._tag).getRegex(),oe.blockquote=Ue(oe.blockquote).replace("paragraph",oe.paragraph).getRegex(),oe.normal=Ve({},oe),oe.gfm=Ve({},oe.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*|$)"}),oe.gfm.nptable=Ue(oe.gfm.nptable).replace("hr",oe.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",oe._tag).getRegex(),oe.gfm.table=Ue(oe.gfm.table).replace("hr",oe.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",oe._tag).getRegex(),oe.pedantic=Ve({},oe.normal,{html:Ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oe._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:Je,paragraph:Ue(oe.normal._paragraph).replace("hr",oe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",oe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var D={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Je,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:Je,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};D._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",D.punctuation=Ue(D.punctuation).replace(/punctuation/g,D._punctuation).getRegex(),D._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",D._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",D.em.start=Ue(D.em.start).replace(/punctuation/g,D._punctuation).getRegex(),D.em.middle=Ue(D.em.middle).replace(/punctuation/g,D._punctuation).replace(/overlapSkip/g,D._overlapSkip).getRegex(),D.em.endAst=Ue(D.em.endAst,"g").replace(/punctuation/g,D._punctuation).getRegex(),D.em.endUnd=Ue(D.em.endUnd,"g").replace(/punctuation/g,D._punctuation).getRegex(),D.strong.start=Ue(D.strong.start).replace(/punctuation/g,D._punctuation).getRegex(),D.strong.middle=Ue(D.strong.middle).replace(/punctuation/g,D._punctuation).replace(/blockSkip/g,D._blockSkip).getRegex(),D.strong.endAst=Ue(D.strong.endAst,"g").replace(/punctuation/g,D._punctuation).getRegex(),D.strong.endUnd=Ue(D.strong.endUnd,"g").replace(/punctuation/g,D._punctuation).getRegex(),D.blockSkip=Ue(D._blockSkip,"g").getRegex(),D.overlapSkip=Ue(D._overlapSkip,"g").getRegex(),D._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,D._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,D._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])?)+(?![-_])/,D.autolink=Ue(D.autolink).replace("scheme",D._scheme).replace("email",D._email).getRegex(),D._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,D.tag=Ue(D.tag).replace("comment",oe._comment).replace("attribute",D._attribute).getRegex(),D._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,D._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,D._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,D.link=Ue(D.link).replace("label",D._label).replace("href",D._href).replace("title",D._title).getRegex(),D.reflink=Ue(D.reflink).replace("label",D._label).getRegex(),D.reflinkSearch=Ue(D.reflinkSearch,"g").replace("reflink",D.reflink).replace("nolink",D.nolink).getRegex(),D.normal=Ve({},D),D.pedantic=Ve({},D.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:Ue(/^!?\[(label)\]\((.*?)\)/).replace("label",D._label).getRegex(),reflink:Ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",D._label).getRegex()}),D.gfm=Ve({},D.normal,{escape:Ue(D.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),D.gfm.url=Ue(D.gfm.url,"i").replace("email",D.gfm._extended_email).getRegex(),D.breaks=Ve({},D.gfm,{br:Ue(D.br).replace("{2,}","*").getRegex(),text:Ue(D.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var it={block:oe,inline:D},kt=P.defaults,Ut=it.block,mt=it.inline;function At(J){return J.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 Te(J){var H="",K,C,E=J.length;for(K=0;K<E;K++)C=J.charCodeAt(K),Math.random()>.5&&(C="x"+C.toString(16)),H+="&#"+C+";";return H}var Ye=function(){function J(K){this.tokens=[],this.tokens.links=Object.create(null),this.options=K||kt,this.options.tokenizer=this.options.tokenizer||new Qe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var C={block:Ut.normal,inline:mt.normal};this.options.pedantic?(C.block=Ut.pedantic,C.inline=mt.pedantic):this.options.gfm&&(C.block=Ut.gfm,this.options.breaks?C.inline=mt.breaks:C.inline=mt.gfm),this.tokenizer.rules=C}J.lex=function(C,E){var A=new J(E);return A.lex(C)};var H=J.prototype;return H.lex=function(C){return C=C.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(C,this.tokens,!0),this.inline(this.tokens),this.tokens},H.blockTokens=function(C,E,A){E===void 0&&(E=[]),A===void 0&&(A=!0),C=C.replace(/^ +$/gm,"");for(var T,ae,X,Le;C;){if(T=this.tokenizer.space(C)){C=C.substring(T.raw.length),T.type&&E.push(T);continue}if(T=this.tokenizer.code(C,E)){C=C.substring(T.raw.length),T.type?E.push(T):(Le=E[E.length-1],Le.raw+=`
`+T.raw,Le.text+=`
`+T.text);continue}if(T=this.tokenizer.fences(C)){C=C.substring(T.raw.length),E.push(T);continue}if(T=this.tokenizer.heading(C)){C=C.substring(T.raw.length),E.push(T);continue}if(T=this.tokenizer.nptable(C)){C=C.substring(T.raw.length),E.push(T);continue}if(T=this.tokenizer.hr(C)){C=C.substring(T.raw.length),E.push(T);continue}if(T=this.tokenizer.blockquote(C)){C=C.substring(T.raw.length),T.tokens=this.blockTokens(T.text,[],A),E.push(T);continue}if(T=this.tokenizer.list(C)){for(C=C.substring(T.raw.length),X=T.items.length,ae=0;ae<X;ae++)T.items[ae].tokens=this.blockTokens(T.items[ae].text,[],!1);E.push(T);continue}if(T=this.tokenizer.html(C)){C=C.substring(T.raw.length),E.push(T);continue}if(A&&(T=this.tokenizer.def(C))){C=C.substring(T.raw.length),this.tokens.links[T.tag]||(this.tokens.links[T.tag]={href:T.href,title:T.title});continue}if(T=this.tokenizer.table(C)){C=C.substring(T.raw.length),E.push(T);continue}if(T=this.tokenizer.lheading(C)){C=C.substring(T.raw.length),E.push(T);continue}if(A&&(T=this.tokenizer.paragraph(C))){C=C.substring(T.raw.length),E.push(T);continue}if(T=this.tokenizer.text(C,E)){C=C.substring(T.raw.length),T.type?E.push(T):(Le=E[E.length-1],Le.raw+=`
`+T.raw,Le.text+=`
`+T.text);continue}if(C){var ht="Infinite loop on byte: "+C.charCodeAt(0);if(this.options.silent){console.error(ht);break}else throw new Error(ht)}}return E},H.inline=function(C){var E,A,T,ae,X,Le,ht=C.length;for(E=0;E<ht;E++){Le=C[E];switch(Le.type){case"paragraph":case"text":case"heading":{Le.tokens=[],this.inlineTokens(Le.text,Le.tokens);break}case"table":{for(Le.tokens={header:[],cells:[]},ae=Le.header.length,A=0;A<ae;A++)Le.tokens.header[A]=[],this.inlineTokens(Le.header[A],Le.tokens.header[A]);for(ae=Le.cells.length,A=0;A<ae;A++)for(X=Le.cells[A],Le.tokens.cells[A]=[],T=0;T<X.length;T++)Le.tokens.cells[A][T]=[],this.inlineTokens(X[T],Le.tokens.cells[A][T]);break}case"blockquote":{this.inline(Le.tokens);break}case"list":{for(ae=Le.items.length,A=0;A<ae;A++)this.inline(Le.items[A].tokens);break}}}return C},H.inlineTokens=function(C,E,A,T,ae){E===void 0&&(E=[]),A===void 0&&(A=!1),T===void 0&&(T=!1),ae===void 0&&(ae="");var X,Le=C,ht;if(this.tokens.links){var Ct=Object.keys(this.tokens.links);if(Ct.length>0)for(;(ht=this.tokenizer.rules.inline.reflinkSearch.exec(Le))!=null;)Ct.includes(ht[0].slice(ht[0].lastIndexOf("[")+1,-1))&&(Le=Le.slice(0,ht.index)+"["+"a".repeat(ht[0].length-2)+"]"+Le.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ht=this.tokenizer.rules.inline.blockSkip.exec(Le))!=null;)Le=Le.slice(0,ht.index)+"["+"a".repeat(ht[0].length-2)+"]"+Le.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;C;){if(X=this.tokenizer.escape(C)){C=C.substring(X.raw.length),E.push(X);continue}if(X=this.tokenizer.tag(C,A,T)){C=C.substring(X.raw.length),A=X.inLink,T=X.inRawBlock,E.push(X);continue}if(X=this.tokenizer.link(C)){C=C.substring(X.raw.length),X.type==="link"&&(X.tokens=this.inlineTokens(X.text,[],!0,T)),E.push(X);continue}if(X=this.tokenizer.reflink(C,this.tokens.links)){C=C.substring(X.raw.length),X.type==="link"&&(X.tokens=this.inlineTokens(X.text,[],!0,T)),E.push(X);continue}if(X=this.tokenizer.strong(C,Le,ae)){C=C.substring(X.raw.length),X.tokens=this.inlineTokens(X.text,[],A,T),E.push(X);continue}if(X=this.tokenizer.em(C,Le,ae)){C=C.substring(X.raw.length),X.tokens=this.inlineTokens(X.text,[],A,T),E.push(X);continue}if(X=this.tokenizer.codespan(C)){C=C.substring(X.raw.length),E.push(X);continue}if(X=this.tokenizer.br(C)){C=C.substring(X.raw.length),E.push(X);continue}if(X=this.tokenizer.del(C)){C=C.substring(X.raw.length),X.tokens=this.inlineTokens(X.text,[],A,T),E.push(X);continue}if(X=this.tokenizer.autolink(C,Te)){C=C.substring(X.raw.length),E.push(X);continue}if(!A&&(X=this.tokenizer.url(C,Te))){C=C.substring(X.raw.length),E.push(X);continue}if(X=this.tokenizer.inlineText(C,T,At)){C=C.substring(X.raw.length),ae=X.raw.slice(-1),E.push(X);continue}if(C){var ct="Infinite loop on byte: "+C.charCodeAt(0);if(this.options.silent){console.error(ct);break}else throw new Error(ct)}}return E},xe(J,null,[{key:"rules",get:function(){return{block:Ut,inline:mt}}}]),J}(),at=P.defaults,dt=et.cleanUrl,Ke=et.escape,We=function(){function J(K){this.options=K||at}var H=J.prototype;return H.code=function(C,E,A){var T=(E||"").match(/\S*/)[0];if(this.options.highlight){var ae=this.options.highlight(C,T);ae!=null&&ae!==C&&(A=!0,C=ae)}return T?'<pre><code class="'+this.options.langPrefix+Ke(T,!0)+'">'+(A?C:Ke(C,!0))+`</code></pre>
`:"<pre><code>"+(A?C:Ke(C,!0))+`</code></pre>
`},H.blockquote=function(C){return`<blockquote>
`+C+`</blockquote>
`},H.html=function(C){return C},H.heading=function(C,E,A,T){return this.options.headerIds?"<h"+E+' id="'+this.options.headerPrefix+T.slug(A)+'">'+C+"</h"+E+`>
`:"<h"+E+">"+C+"</h"+E+`>
`},H.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},H.list=function(C,E,A){var T=E?"ol":"ul",ae=E&&A!==1?' start="'+A+'"':"";return"<"+T+ae+`>
`+C+"</"+T+`>
`},H.listitem=function(C){return"<li>"+C+`</li>
`},H.checkbox=function(C){return"<input "+(C?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},H.paragraph=function(C){return"<p>"+C+`</p>
`},H.table=function(C,E){return E&&(E="<tbody>"+E+"</tbody>"),`<table>
<thead>
`+C+`</thead>
`+E+`</table>
`},H.tablerow=function(C){return`<tr>
`+C+`</tr>
`},H.tablecell=function(C,E){var A=E.header?"th":"td",T=E.align?"<"+A+' align="'+E.align+'">':"<"+A+">";return T+C+"</"+A+`>
`},H.strong=function(C){return"<strong>"+C+"</strong>"},H.em=function(C){return"<em>"+C+"</em>"},H.codespan=function(C){return"<code>"+C+"</code>"},H.br=function(){return this.options.xhtml?"<br/>":"<br>"},H.del=function(C){return"<del>"+C+"</del>"},H.link=function(C,E,A){if(C=dt(this.options.sanitize,this.options.baseUrl,C),C===null)return A;var T='<a href="'+Ke(C)+'"';return E&&(T+=' title="'+E+'"'),T+=">"+A+"</a>",T},H.image=function(C,E,A){if(C=dt(this.options.sanitize,this.options.baseUrl,C),C===null)return A;var T='<img src="'+C+'" alt="'+A+'"';return E&&(T+=' title="'+E+'"'),T+=this.options.xhtml?"/>":">",T},H.text=function(C){return C},J}(),Ze=function(){function J(){}var H=J.prototype;return H.strong=function(C){return C},H.em=function(C){return C},H.codespan=function(C){return C},H.del=function(C){return C},H.html=function(C){return C},H.text=function(C){return C},H.link=function(C,E,A){return""+A},H.image=function(C,E,A){return""+A},H.br=function(){return""},J}(),Lt=function(){function J(){this.seen={}}var H=J.prototype;return H.slug=function(C){var E=C.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(E)){var A=E;do this.seen[A]++,E=A+"-"+this.seen[A];while(this.seen.hasOwnProperty(E))}return this.seen[E]=0,E},J}(),gt=P.defaults,ot=et.unescape,rt=function(){function J(K){this.options=K||gt,this.options.renderer=this.options.renderer||new We,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ze,this.slugger=new Lt}J.parse=function(C,E){var A=new J(E);return A.parse(C)};var H=J.prototype;return H.parse=function(C,E){E===void 0&&(E=!0);var A="",T,ae,X,Le,ht,Ct,ct,Ft,Pt,lt,an,Zt,nt,mn,Qt,ui,gi,Wt,Ei=C.length;for(T=0;T<Ei;T++){lt=C[T];switch(lt.type){case"space":continue;case"hr":{A+=this.renderer.hr();continue}case"heading":{A+=this.renderer.heading(this.parseInline(lt.tokens),lt.depth,ot(this.parseInline(lt.tokens,this.textRenderer)),this.slugger);continue}case"code":{A+=this.renderer.code(lt.text,lt.lang,lt.escaped);continue}case"table":{for(Ft="",ct="",Le=lt.header.length,ae=0;ae<Le;ae++)ct+=this.renderer.tablecell(this.parseInline(lt.tokens.header[ae]),{header:!0,align:lt.align[ae]});for(Ft+=this.renderer.tablerow(ct),Pt="",Le=lt.cells.length,ae=0;ae<Le;ae++){for(Ct=lt.tokens.cells[ae],ct="",ht=Ct.length,X=0;X<ht;X++)ct+=this.renderer.tablecell(this.parseInline(Ct[X]),{header:!1,align:lt.align[X]});Pt+=this.renderer.tablerow(ct)}A+=this.renderer.table(Ft,Pt);continue}case"blockquote":{Pt=this.parse(lt.tokens),A+=this.renderer.blockquote(Pt);continue}case"list":{for(an=lt.ordered,Zt=lt.start,nt=lt.loose,Le=lt.items.length,Pt="",ae=0;ae<Le;ae++)Qt=lt.items[ae],ui=Qt.checked,gi=Qt.task,mn="",Qt.task&&(Wt=this.renderer.checkbox(ui),nt?Qt.tokens.length>0&&Qt.tokens[0].type==="text"?(Qt.tokens[0].text=Wt+" "+Qt.tokens[0].text,Qt.tokens[0].tokens&&Qt.tokens[0].tokens.length>0&&Qt.tokens[0].tokens[0].type==="text"&&(Qt.tokens[0].tokens[0].text=Wt+" "+Qt.tokens[0].tokens[0].text)):Qt.tokens.unshift({type:"text",text:Wt}):mn+=Wt),mn+=this.parse(Qt.tokens,nt),Pt+=this.renderer.listitem(mn,gi,ui);A+=this.renderer.list(Pt,an,Zt);continue}case"html":{A+=this.renderer.html(lt.text);continue}case"paragraph":{A+=this.renderer.paragraph(this.parseInline(lt.tokens));continue}case"text":{for(Pt=lt.tokens?this.parseInline(lt.tokens):lt.text;T+1<Ei&&C[T+1].type==="text";)lt=C[++T],Pt+=`
`+(lt.tokens?this.parseInline(lt.tokens):lt.text);A+=E?this.renderer.paragraph(Pt):Pt;continue}default:{var Gn='Token with "'+lt.type+'" type was not found.';if(this.options.silent){console.error(Gn);return}else throw new Error(Gn)}}}return A},H.parseInline=function(C,E){E=E||this.renderer;var A="",T,ae,X=C.length;for(T=0;T<X;T++){ae=C[T];switch(ae.type){case"escape":{A+=E.text(ae.text);break}case"html":{A+=E.html(ae.text);break}case"link":{A+=E.link(ae.href,ae.title,this.parseInline(ae.tokens,E));break}case"image":{A+=E.image(ae.href,ae.title,ae.text);break}case"strong":{A+=E.strong(this.parseInline(ae.tokens,E));break}case"em":{A+=E.em(this.parseInline(ae.tokens,E));break}case"codespan":{A+=E.codespan(ae.text);break}case"br":{A+=E.br();break}case"del":{A+=E.del(this.parseInline(ae.tokens,E));break}case"text":{A+=E.text(ae.text);break}default:{var Le='Token with "'+ae.type+'" type was not found.';if(this.options.silent){console.error(Le);return}else throw new Error(Le)}}}return A},J}(),Dt=et.merge,ft=et.checkSanitizeDeprecation,wt=et.escape,Se=P.getDefaults,It=P.changeDefaults,pt=P.defaults;function Me(J,H,K){if(typeof J=="undefined"||J===null)throw new Error("marked(): input parameter is undefined or null");if(typeof J!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(J)+", string expected");if(typeof H=="function"&&(K=H,H=null),H=Dt({},Me.defaults,H||{}),ft(H),K){var C=H.highlight,E;try{E=Ye.lex(J,H)}catch(X){return K(X)}var A=function(Le){var ht;if(!Le)try{ht=rt.parse(E,H)}catch(Ct){Le=Ct}return H.highlight=C,Le?K(Le):K(null,ht)};if(!C||C.length<3)return A();if(delete H.highlight,!E.length)return A();var T=0;Me.walkTokens(E,function(X){X.type==="code"&&(T++,setTimeout(function(){C(X.text,X.lang,function(Le,ht){if(Le)return A(Le);ht!=null&&ht!==X.text&&(X.text=ht,X.escaped=!0),T--,T===0&&A()})},0))}),T===0&&A();return}try{var ae=Ye.lex(J,H);return H.walkTokens&&Me.walkTokens(ae,H.walkTokens),rt.parse(ae,H)}catch(X){if(X.message+=`
Please report this to https://github.com/markedjs/marked.`,H.silent)return"<p>An error occurred:</p><pre>"+wt(X.message+"",!0)+"</pre>";throw X}}Me.options=Me.setOptions=function(J){return Dt(Me.defaults,J),It(Me.defaults),Me},Me.getDefaults=Se,Me.defaults=pt,Me.use=function(J){var H=Dt({},J);if(J.renderer&&function(){var C=Me.defaults.renderer||new We,E=function(ae){var X=C[ae];C[ae]=function(){for(var Le=arguments.length,ht=new Array(Le),Ct=0;Ct<Le;Ct++)ht[Ct]=arguments[Ct];var ct=J.renderer[ae].apply(C,ht);return ct===!1&&(ct=X.apply(C,ht)),ct}};for(var A in J.renderer)E(A);H.renderer=C}(),J.tokenizer&&function(){var C=Me.defaults.tokenizer||new Qe,E=function(ae){var X=C[ae];C[ae]=function(){for(var Le=arguments.length,ht=new Array(Le),Ct=0;Ct<Le;Ct++)ht[Ct]=arguments[Ct];var ct=J.tokenizer[ae].apply(C,ht);return ct===!1&&(ct=X.apply(C,ht)),ct}};for(var A in J.tokenizer)E(A);H.tokenizer=C}(),J.walkTokens){var K=Me.defaults.walkTokens;H.walkTokens=function(C){J.walkTokens(C),K&&K(C)}}Me.setOptions(H)},Me.walkTokens=function(J,H){for(var K=x(J),C;!(C=K()).done;){var E=C.value;H(E);switch(E.type){case"table":{for(var A=x(E.tokens.header),T;!(T=A()).done;){var ae=T.value;Me.walkTokens(ae,H)}for(var X=x(E.tokens.cells),Le;!(Le=X()).done;)for(var ht=Le.value,Ct=x(ht),ct;!(ct=Ct()).done;){var Ft=ct.value;Me.walkTokens(Ft,H)}break}case"list":{Me.walkTokens(E.items,H);break}default:E.tokens&&Me.walkTokens(E.tokens,H)}}},Me.Parser=rt,Me.parser=rt.parse,Me.Renderer=We,Me.TextRenderer=Ze,Me.Lexer=Ye,Me.lexer=Ye.lex,Me.Tokenizer=Qe,Me.Slugger=Lt,Me.parse=Me;var Xe=Me;return Xe})},E7E6:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADUCAYAAADZTGx+AAAgAElEQVR4Xu2dC3BU13nHv7MrIQkQQoCEtAIEAmxig4GACxhogpM6NY7jOKZO4nimwcFot23SNNNO02napJN0JjN9TNMm5eG3x4+YSeI3ftUGjCDGQMBgG4wxb+0u4mEeQhJI2tP539WR7i77uPfuvXfvar8zs7Mr7bnn8Z3vt9/5zlMQB5aAQQmsW7fO397eHujp6Rkfi8XGExFeDX2vABHVSSlrhBDDiKhdSnlOCBGWUu4mol1lZWWv3nfffccNZueJaMITpeBCeEICjz/++LCOjo5GIpogpWwUQjT2vU/A/wCClNJvtbBCCCml3CaEeGzChAmPLF269LLVtNx6jgFxS9IeyOehhx6q7OnpmSilnEhE2gsA4L0PhjHZillRUUHl5WUUf6+giopyKi+Pv8rKyrSX3++nnp4e7XXpUgedP3+ezp37lE6ebKPe3l4tCyFEhIj+UwjxaHNz8+ls+ebrewYkX5J3IN9169YNv3DhwsRYLIbXJAWBDoZRmbKFYkPRhw4dqgEwdCgAwOfyPiDKyefzWS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Lm0tbU19vb2TpVSThGCphLJKVLSVCFoYrHCAwikpCNC0MdE4qCU9LEQ4qDf7/+4trb2aN/cRGFpeI6lLUpAMslMSulva2ub2NPT0+TzyUAsJup9PgpIKQNSinohtM/1RFRo5/1cFkJEpKSwEDIihAjHYhT2+WQkFhPhkpKSQ7W1tUdwsnmOOjWoHmdALDbn+fPnR3V2dgKW0ULEqmIxUSWlHCmErJJSVAlBVVIS3kcS4X9ULoQolVKWZnpHcaSU3UKI7szv1EUkzuNSKSEI7+eFkOelFOeFEOd8Pnz24fOZioqKcFVV1VmLVS3qx/4fQLyzKIIkCJoAAAAASUVORK5CYII="},ELLl:function(Pe,we,p){(function(W){W(p("VrN/"))})(function(W){var xe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},me=W.Pos;W.defineOption("autoCloseBrackets",!1,function(ee,U,R){R&&R!=W.Init&&(ee.removeKeyMap(x),ee.state.closeBrackets=null),U&&(ke(Z(U,"pairs")),ee.state.closeBrackets=U,ee.addKeyMap(x))});function Z(ee,U){return U=="pairs"&&typeof ee=="string"?ee:typeof ee=="object"&&ee[U]!=null?ee[U]:xe[U]}var x={Backspace:ce,Enter:ye};function ke(ee){for(var U=0;U<ee.length;U++){var R=ee.charAt(U),k="'"+R+"'";x[k]||(x[k]=P(R))}}ke(xe.pairs+"`");function P(ee){return function(U){return V(U,ee)}}function $(ee){var U=ee.state.closeBrackets;if(!U||U.override)return U;var R=ee.getModeAt(ee.getCursor());return R.closeBrackets||U}function ce(ee){var U=$(ee);if(!U||ee.getOption("disableInput"))return W.Pass;for(var R=Z(U,"pairs"),k=ee.listSelections(),te=0;te<k.length;te++){if(!k[te].empty())return W.Pass;var Ae=Ce(ee,k[te].head);if(!Ae||R.indexOf(Ae)%2!=0)return W.Pass}for(var te=k.length-1;te>=0;te--){var Fe=k[te].head;ee.replaceRange("",me(Fe.line,Fe.ch-1),me(Fe.line,Fe.ch+1),"+delete")}}function ye(ee){var U=$(ee),R=U&&Z(U,"explode");if(!R||ee.getOption("disableInput"))return W.Pass;for(var k=ee.listSelections(),te=0;te<k.length;te++){if(!k[te].empty())return W.Pass;var Ae=Ce(ee,k[te].head);if(!Ae||R.indexOf(Ae)%2!=0)return W.Pass}ee.operation(function(){var Fe=ee.lineSeparator()||`
`;ee.replaceSelection(Fe+Fe,null),ee.execCommand("goCharLeft"),k=ee.listSelections();for(var be=0;be<k.length;be++){var he=k[be].head.line;ee.indentLine(he,null,!0),ee.indentLine(he+1,null,!0)}})}function _(ee){var U=W.cmpPos(ee.anchor,ee.head)>0;return{anchor:new me(ee.anchor.line,ee.anchor.ch+(U?-1:1)),head:new me(ee.head.line,ee.head.ch+(U?1:-1))}}function V(ee,U){var R=$(ee);if(!R||ee.getOption("disableInput"))return W.Pass;var k=Z(R,"pairs"),te=k.indexOf(U);if(te==-1)return W.Pass;for(var Ae=Z(R,"closeBefore"),Fe=Z(R,"triples"),be=k.charAt(te+1)==U,he=ee.listSelections(),He=te%2==0,ue,ge=0;ge<he.length;ge++){var Ie=he[ge],pe=Ie.head,M,ve=ee.getRange(pe,me(pe.line,pe.ch+1));if(He&&!Ie.empty())M="surround";else if((be||!He)&&ve==U)be&&se(ee,pe)?M="both":Fe.indexOf(U)>=0&&ee.getRange(pe,me(pe.line,pe.ch+3))==U+U+U?M="skipThree":M="skip";else if(be&&pe.ch>1&&Fe.indexOf(U)>=0&&ee.getRange(me(pe.line,pe.ch-2),pe)==U+U){if(pe.ch>2&&/\bstring/.test(ee.getTokenTypeAt(me(pe.line,pe.ch-2))))return W.Pass;M="addFour"}else if(be){var re=pe.ch==0?" ":ee.getRange(me(pe.line,pe.ch-1),pe);if(!W.isWordChar(ve)&&re!=U&&!W.isWordChar(re))M="both";else return W.Pass}else if(He&&(ve.length===0||/\s/.test(ve)||Ae.indexOf(ve)>-1))M="both";else return W.Pass;if(!ue)ue=M;else if(ue!=M)return W.Pass}var B=te%2?k.charAt(te-1):U,Ee=te%2?U:k.charAt(te+1);ee.operation(function(){if(ue=="skip")ee.execCommand("goCharRight");else if(ue=="skipThree")for(var Re=0;Re<3;Re++)ee.execCommand("goCharRight");else if(ue=="surround"){for(var fe=ee.getSelections(),Re=0;Re<fe.length;Re++)fe[Re]=B+fe[Re]+Ee;ee.replaceSelections(fe,"around"),fe=ee.listSelections().slice();for(var Re=0;Re<fe.length;Re++)fe[Re]=_(fe[Re]);ee.setSelections(fe)}else ue=="both"?(ee.replaceSelection(B+Ee,null),ee.triggerElectric(B+Ee),ee.execCommand("goCharLeft")):ue=="addFour"&&(ee.replaceSelection(B+B+B+B,"before"),ee.execCommand("goCharRight"))})}function Ce(ee,U){var R=ee.getRange(me(U.line,U.ch-1),me(U.line,U.ch+1));return R.length==2?R:null}function se(ee,U){var R=ee.getTokenAt(me(U.line,U.ch+1));return/\bstring/.test(R.type)&&R.start==U.ch&&(U.ch==0||!/\bstring/.test(ee.getTokenTypeAt(U)))}})},F8wB:function(Pe,we,p){Pe.exports={loading:"loading___1SIOG"}},FOrL:function(Pe,we,p){Pe.exports=p.p+"static/nodata.a6b3f948.png"},FPkq:function(Pe,we,p){Pe.exports=p.p+"static/qrCode.dd0fe9b2.png"},GABl:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1Rn//e7dzYuioNRsHlSqRiUB2eUx0hbaKAHEAMWxiQ6PTUAUGCuIQNVOZ0xnrHUE5GHHIqOwCag8BlQiQnnUokgt5AEIK5GnBpIFXwjkAdl7vs7dkJCETXLvEj3/5d7v9/u+337nfN8554bowBHo16+3YRh3K7IPBHcRSIDI9QJ0AWkA8h0E3xM8DWAvde5x6Pqe+D17jnVUGLxWogqPp78SGSeC3wP4ZUR8pJ+Ct50O7e344uKjEXFcBkUkSERY6e43RkE9JcCgawngaiw3O6A/l7CvaHckvLYFhTKi5B8C3B2JQ6sYEhvpcMxKKioqs4ox7SwLkvT0mFNnz82HqKkCaHac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2A7FHmr6w0AAAAASUVORK5CYII="},Gytx:function(Pe,we){Pe.exports=function(W,xe,me,Z){var x=me?me.call(Z,W,xe):void 0;if(x!==void 0)return!!x;if(W===xe)return!0;if(typeof W!="object"||!W||typeof xe!="object"||!xe)return!1;var ke=Object.keys(W),P=Object.keys(xe);if(ke.length!==P.length)return!1;for(var $=Object.prototype.hasOwnProperty.bind(xe),ce=0;ce<ke.length;ce++){var ye=ke[ce];if(!$(ye))return!1;var _=W[ye],V=xe[ye];if(x=me?me.call(Z,_,V,ye):void 0,x===!1||x===void 0&&_!==V)return!1}return!0}},HmJG:function(Pe,we,p){},HpTS:function(Pe,we,p){Pe.exports=p.p+"static/small_program.f74069ec.png"},I8Z2:function(Pe,we,p){"use strict";p.d(we,"a",function(){return Z}),p.d(we,"b",function(){return Ce}),p.d(we,"c",function(){return ee});var W=p("q1tI"),xe=function(){var U=function(R,k){return U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(te,Ae){te.__proto__=Ae}||function(te,Ae){for(var Fe in Ae)Ae.hasOwnProperty(Fe)&&(te[Fe]=Ae[Fe])},U(R,k)};return function(R,k){U(R,k);function te(){this.constructor=R}R.prototype=k===null?Object.create(k):(te.prototype=k.prototype,new te)}}(),me=W.createContext(null),Z=function(U){xe(R,U);function R(){return U!==null&&U.apply(this,arguments)||this}return R.prototype.render=function(){return W.createElement(me.Provider,{value:this.props.store},this.props.children)},R}(W.Component),x=p("Gytx"),ke=p.n(x),P=p("2mql"),$=p.n(P),ce=function(){var U=function(R,k){return U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(te,Ae){te.__proto__=Ae}||function(te,Ae){for(var Fe in Ae)Ae.hasOwnProperty(Fe)&&(te[Fe]=Ae[Fe])},U(R,k)};return function(R,k){U(R,k);function te(){this.constructor=R}R.prototype=k===null?Object.create(k):(te.prototype=k.prototype,new te)}}(),ye=function(){return ye=Object.assign||function(U){for(var R,k=1,te=arguments.length;k<te;k++){R=arguments[k];for(var Ae in R)Object.prototype.hasOwnProperty.call(R,Ae)&&(U[Ae]=R[Ae])}return U},ye.apply(this,arguments)};function _(U){return U.displayName||U.name||"Component"}var V=function(){return{}};function Ce(U,R){R===void 0&&(R={});var k=!!U,te=U||V;return function(Fe){var be=function(He){ce(ue,He);function ue(ge,Ie){var pe=He.call(this,ge,Ie)||this;return pe.unsubscribe=null,pe.handleChange=function(){if(!pe.unsubscribe)return;var M=te(pe.store.getState(),pe.props);pe.setState({subscribed:M})},pe.store=pe.context,pe.state={subscribed:te(pe.store.getState(),ge),store:pe.store,props:ge},pe}return ue.getDerivedStateFromProps=function(ge,Ie){return U&&U.length===2&&ge!==Ie.props?{subscribed:te(Ie.store.getState(),ge),props:ge}:{props:ge}},ue.prototype.componentDidMount=function(){this.trySubscribe()},ue.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},ue.prototype.shouldComponentUpdate=function(ge,Ie){return!ke()(this.props,ge)||!ke()(this.state.subscribed,Ie.subscribed)},ue.prototype.trySubscribe=function(){k&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},ue.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},ue.prototype.render=function(){var ge=ye(ye(ye({},this.props),this.state.subscribed),{store:this.store});return W.createElement(Fe,ye({},ge,{ref:this.props.miniStoreForwardedRef}))},ue.displayName="Connect("+_(Fe)+")",ue.contextType=me,ue}(W.Component);if(R.forwardRef){var he=W.forwardRef(function(He,ue){return W.createElement(be,ye({},He,{miniStoreForwardedRef:ue}))});return $()(he,Fe)}return $()(be,Fe)}}var se=function(){return se=Object.assign||function(U){for(var R,k=1,te=arguments.length;k<te;k++){R=arguments[k];for(var Ae in R)Object.prototype.hasOwnProperty.call(R,Ae)&&(U[Ae]=R[Ae])}return U},se.apply(this,arguments)};function ee(U){var R=U,k=[];function te(be){R=se(se({},R),be);for(var he=0;he<k.length;he++)k[he]()}function Ae(){return R}function Fe(be){return k.push(be),function(){var He=k.indexOf(be);k.splice(He,1)}}return{setState:te,getState:Ae,subscribe:Fe}}},JWDV:function(Pe,we,p){Pe.exports=p.p+"static/charpter-white.5fa14f93.svg"},JeFH:function(Pe,we){Pe.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+TYJl7jwf1DlOW5KHWltCiLqSCfndqIm7vlwDLsi41DOP9N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/qrcode.54870d9b.png"},LdHM:function(Pe,we,p){"use strict";p.d(we,"b",function(){return Ae}),p.d(we,"a",function(){return be});var W=p("1OyB"),xe=p("vuIU"),me=p("Ji7U"),Z=p("LK+K"),x=p("q1tI"),ke=p("rePB"),P=p("Ff2n"),$=p("ODXe"),ce=p("4IlW"),ye=p("bX4T"),_=p("YrtM"),V=p("TSYQ"),Ce=p.n(V),se=p("+nKL"),ee=p("8OUc"),U=function(le,je){var Be=le.prefixCls,tt=le.id,xt=le.flattenOptions,Qe=le.childrenAsData,Je=le.values,Ue=le.searchValue,Ve=le.multiple,oe=le.defaultActiveFirstOption,D=le.height,it=le.itemHeight,kt=le.notFoundContent,Ut=le.open,mt=le.menuItemSelectedIcon,At=le.virtual,Te=le.onSelect,Ye=le.onToggleOpen,at=le.onActiveValue,dt=le.onScroll,Ke=le.onMouseEnter,We="".concat(Be,"-item"),Ze=Object(_.a)(function(){return xt},[Ut,xt],function(Xe,J){return J[0]&&Xe[1]!==J[1]}),Lt=x.useRef(null),gt=function(J){J.preventDefault()},ot=function(J){Lt.current&&Lt.current.scrollTo({index:J})},rt=function(J){for(var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=Ze.length,C=0;C<K;C+=1){var E=(J+C*H+K)%K,A=Ze[E],T=A.group,ae=A.data;if(!T&&!ae.disabled)return E}return-1},Dt=x.useState(function(){return rt(0)}),ft=Object($.a)(Dt,2),wt=ft[0],Se=ft[1],It=function(J){Se(J);var H=Ze[J];if(!H){at(null,-1);return}at(H.data.value,J)};x.useEffect(function(){It(oe!==!1?rt(0):-1)},[Ze.length,Ue]),x.useEffect(function(){var Xe=setTimeout(function(){if(!Ve&&Ut&&Je.size===1){var J=Array.from(Je)[0],H=Ze.findIndex(function(K){var C=K.data;return C.value===J});It(H),ot(H)}});return function(){return clearTimeout(Xe)}},[Ut]);var pt=function(J){J!==void 0&&Te(J,{selected:!Je.has(J)}),Ve||Ye(!1)};if(x.useImperativeHandle(je,function(){return{onKeyDown:function(J){var H=J.which;switch(H){case ce.a.UP:case ce.a.DOWN:{var K=0;if(H===ce.a.UP?K=-1:H===ce.a.DOWN&&(K=1),K!==0){var C=rt(wt+K,K);ot(C),It(C)}break}case ce.a.ENTER:{var E=Ze[wt];E&&!E.data.disabled?pt(E.data.value):pt(void 0),Ut&&J.preventDefault();break}case ce.a.ESC:Ye(!1)}},onKeyUp:function(){},scrollTo:function(J){ot(J)}}}),Ze.length===0)return x.createElement("div",{role:"listbox",id:"".concat(tt,"_list"),className:"".concat(We,"-empty"),onMouseDown:gt},kt);function Me(Xe){var J=Ze[Xe];if(!J)return null;var H=J.data||{},K=H.value,C=H.label,E=H.children,A=Object(ye.a)(H,!0),T=Qe?E:C;return J?x.createElement("div",Object.assign({"aria-label":typeof T=="string"?T:null},A,{key:Xe,role:"option",id:"".concat(tt,"_list_").concat(Xe),"aria-selected":Je.has(K)}),K):null}return x.createElement(x.Fragment,null,x.createElement("div",{role:"listbox",id:"".concat(tt,"_list"),style:{height:0,width:0,overflow:"hidden"}},Me(wt-1),Me(wt),Me(wt+1)),x.createElement(se.a,{itemKey:"key",ref:Lt,data:Ze,height:D,itemHeight:it,fullHeight:!1,onMouseDown:gt,onScroll:dt,virtual:At,onMouseEnter:Ke},function(Xe,J){var H,K=Xe.group,C=Xe.groupOption,E=Xe.data,A=E.label,T=E.key;if(K)return x.createElement("div",{className:Ce()(We,"".concat(We,"-group"))},A!==void 0?A:T);var ae=E.disabled,X=E.value,Le=E.title,ht=E.children,Ct=E.style,ct=E.className,Ft=Object(P.a)(E,["disabled","value","title","children","style","className"]),Pt=Je.has(X),lt="".concat(We,"-option"),an=Ce()(We,lt,ct,(H={},Object(ke.a)(H,"".concat(lt,"-grouped"),C),Object(ke.a)(H,"".concat(lt,"-active"),wt===J&&!ae),Object(ke.a)(H,"".concat(lt,"-disabled"),ae),Object(ke.a)(H,"".concat(lt,"-selected"),Pt),H)),Zt=Qe?ht:A,nt=!mt||typeof mt=="function"||Pt;return x.createElement("div",Object.assign({},Ft,{"aria-selected":Pt,className:an,title:Le,onMouseMove:function(){if(wt===J||ae)return;It(J)},onClick:function(){ae||pt(X)},style:Ct}),x.createElement("div",{className:"".concat(lt,"-content")},Zt||X),x.isValidElement(mt)||Pt,nt&&x.createElement(ee.a,{className:"".concat(We,"-option-state"),customizeIcon:mt,customizeIconProps:{isSelected:Pt}},Pt?"\u2713":null))}))},R=x.forwardRef(U);R.displayName="OptionList";var k=R,te=function(){return null};te.isSelectOption=!0;var Ae=te,Fe=function(){return null};Fe.isSelectOptGroup=!0;var be=Fe,he=p("VTBJ"),He=p("Zm9Q");function ue(y){var le=y.key,je=y.props,Be=je.children,tt=je.value,xt=Object(P.a)(je,["children","value"]);return Object(he.a)({key:le,value:tt!==void 0?tt:le,children:Be},xt)}function ge(y){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(He.a)(y).map(function(je,Be){if(!x.isValidElement(je)||!je.type)return null;var tt=je.type.isSelectOptGroup,xt=je.key,Qe=je.props,Je=Qe.children,Ue=Object(P.a)(Qe,["children"]);return le||!tt?ue(je):Object(he.a)(Object(he.a)({key:"__RC_SELECT_GRP__".concat(xt===null?Be:xt,"__"),label:xt},Ue),{},{options:ge(Je)})}).filter(function(je){return je})}var Ie=p("2Qr1"),pe=p("qNPg"),M=p("U8pU"),ve=p("Kwbf"),re=p("WKfj");function B(y){var le=y.mode,je=y.options,Be=y.children,tt=y.backfill,xt=y.allowClear,Qe=y.placeholder,Je=y.getInputElement,Ue=y.showSearch,Ve=y.onSearch,oe=y.defaultOpen,D=y.autoFocus,it=y.labelInValue,kt=y.value,Ut=y.inputValue,mt=y.optionLabelProp,At=le==="multiple"||le==="tags",Te=Ue!==void 0?Ue:At||le==="combobox",Ye=je||ge(Be);if(Object(ve.a)(le!=="tags"||Ye.every(function(We){return!We.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),le==="tags"||le==="combobox"){var at=Ye.some(function(We){return We.options?We.options.some(function(Ze){return typeof("value"in Ze?Ze.value:Ze.key)=="number"}):typeof("value"in We?We.value:We.key)=="number"});Object(ve.a)(!at,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(ve.a)(le!=="combobox"||!mt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(ve.a)(le==="combobox"||!tt,"`backfill` only works with `combobox` mode."),Object(ve.a)(le==="combobox"||!Je,"`getInputElement` only work with `combobox` mode."),Object(ve.b)(le!=="combobox"||!Je||!xt||!Qe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ve&&!Te&&le!=="combobox"&&le!=="tags"&&Object(ve.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(ve.b)(!oe||D,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),kt!=null){var dt=Object(re.d)(kt);Object(ve.a)(!it||dt.every(function(We){return Object(M.a)(We)==="object"&&("key"in We||"value"in We)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(ve.a)(!At||Array.isArray(kt),"`value` should be array when `mode` is `multiple` or `tags`")}if(Be){var Ke=null;Object(He.a)(Be).some(function(We){if(!x.isValidElement(We)||!We.type)return!1;var Ze=We.type;if(Ze.isSelectOption)return!1;if(Ze.isSelectOptGroup){var Lt=Object(He.a)(We.props.children).every(function(gt){return!x.isValidElement(gt)||!We.type||gt.type.isSelectOption?!0:(Ke=gt.type,!1)});return!Lt}return Ke=Ze,!0}),Ke&&Object(ve.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ke.displayName||Ke.name||Ke,"`.")),Object(ve.a)(Ut===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var Ee=B,Re=Object(pe.a)({prefixCls:"rc-select",components:{optionList:k},convertChildrenToData:ge,flattenOptions:Ie.d,getLabeledValue:Ie.e,filterOptions:Ie.b,isValueDisabled:Ie.g,findValueOption:Ie.c,warningProps:Ee,fillOptionsWithMissingValue:Ie.a}),fe=function(y){Object(me.a)(je,y);var le=Object(Z.a)(je);function je(){var Be;return Object(W.a)(this,je),Be=le.apply(this,arguments),Be.selectRef=x.createRef(),Be.focus=function(){Be.selectRef.current.focus()},Be.blur=function(){Be.selectRef.current.blur()},Be}return Object(xe.a)(je,[{key:"render",value:function(){return x.createElement(Re,Object.assign({ref:this.selectRef},this.props))}}]),je}(x.Component);fe.Option=Ae,fe.OptGroup=be;var et=fe,O=we.c=et},M8RZ:function(Pe,we,p){"use strict";p.d(we,"a",function(){return ce});var W=p("fWQN"),xe=p("mtLc"),me=p("yKVA"),Z=p("879j"),x=p("q1tI"),ke=p.n(x),P=p("i8i4"),$=p.n(P),ce=function(ye){Object(me.a)(V,ye);var _=Object(Z.a)(V);function V(Ce){var se;Object(W.a)(this,V),se=_.call(this,Ce);var ee=window.document;return se.node=ee.createElement("div"),ee.body.appendChild(se.node),se}return Object(xe.a)(V,[{key:"render",value:function(){var se=this.props.children;return Object(P.createPortal)(se,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),V}(ke.a.Component)},Nmxd:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAF4ElEQVRoQ91aW2wUVRj+/rPbSivURIgKjZcHjUYTgZ0lthgv3V0LSqB9IAQeNNEIaKKwZbcFnuQJoZ1piyYawJjIiwZDwiVBaHd28QItaWeLD4KJPgimiA+YCAZj6Z7fzPZiu7e57WriJE0f5v++//tm/j3nn3MOoQyXcmJ/LdfeCBOjEUA9EdUzUA9g0ST9VQJGmXkU5n/CAN2q043Vm295TU9uCRS9MwCiFWBqAmD++R1yjQNIgTgF5tNGuCPtEJ8Nd2xgWarzPil9UbBsA1G1m6R5GOYxkOgRItM71NRxzQmnIwMBvStKoCiAB50kcRB7mcG96XB7r12MLQNPJXrvzdD4QQZW2yX2EkfACR/7N56PRH+14rE0sDSpLRaM4wA/YEVW3v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NRrhtvT0qkQgqe4lRof7RHKdEe6Y9XEe0NVDBLzsnrMwcmbp/rOs8lXPQtzODHhY+/9LEq0aCcV0M22wX21jge5yiwdwGVW+RuPZnGUVM9FkP+NlYesaIFcJ8s+TLM9UQDwY1JYOx6Y3QPLXRpNqPzEiHpJfBOAD8KgHjoJQs3VIh+Kzlj3zDCzp63zEJ8QgCHeXW4AnPsZvGSkbLjR3/DCT5/+3vD7lTkl0bQHRPk9PrVxg5q1GpL3gZkvpLaZU93qW8r/dYhJiw3DTNudbTFMPb1lf5xIpxHEQ7i/XA7XFw/hZSLlmqLn094flLqWZzNzcZikO/JvbrCTkJjub3rYMZJ8YgwJJbSuBK7zRTb3pUGwfCGznTdk3MMm2tG/vIvL7tpJE1G3vlCeMMcYCvTye2TfSvP2qHeFTMY4NTI9Sek8AJFewlCGi7IEPc/JycmWYOUVCJMHitNmYOQF7NjAzmTK8v5Z/N4/biEYI1BN46riNeeTGvEazx21Ao5DmcRs5QHfV6UbQ+3GbvwHH7EQQahyMxwAAAABJRU5ErkJggg=="},OLES:function(Pe,we,p){"use strict";var W=p("U8pU"),xe=p("VTBJ"),me=p("Ff2n"),Z=p("q1tI"),x=p("uciX"),ke=p("7ixt"),P=function(Ce){var se=Ce.overlay,ee=Ce.prefixCls,U=Ce.id,R=Ce.overlayInnerStyle;return Z.createElement("div",{className:"".concat(ee,"-inner"),id:U,role:"tooltip",style:R},typeof se=="function"?se():se)},$=P,ce=function(Ce,se){var ee=Ce.overlayClassName,U=Ce.trigger,R=U===void 0?["hover"]:U,k=Ce.mouseEnterDelay,te=k===void 0?0:k,Ae=Ce.mouseLeaveDelay,Fe=Ae===void 0?.1:Ae,be=Ce.overlayStyle,he=Ce.prefixCls,He=he===void 0?"rc-tooltip":he,ue=Ce.children,ge=Ce.onVisibleChange,Ie=Ce.afterVisibleChange,pe=Ce.transitionName,M=Ce.animation,ve=Ce.placement,re=ve===void 0?"right":ve,B=Ce.align,Ee=B===void 0?{}:B,Re=Ce.destroyTooltipOnHide,fe=Re===void 0?!1:Re,et=Ce.defaultVisible,O=Ce.getTooltipContainer,y=Ce.overlayInnerStyle,le=Object(me.a)(Ce,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),je=Object(Z.useRef)(null);Object(Z.useImperativeHandle)(se,function(){return je.current});var Be=Object(xe.a)({},le);"visible"in Ce&&(Be.popupVisible=Ce.visible);var tt=function(){var Ve=Ce.arrowContent,oe=Ve===void 0?null:Ve,D=Ce.overlay,it=Ce.id;return[Z.createElement("div",{className:"".concat(He,"-arrow"),key:"arrow"},oe),Z.createElement($,{key:"content",prefixCls:He,id:it,overlay:D,overlayInnerStyle:y})]},xt=!1,Qe=!1;if(typeof fe=="boolean")xt=fe;else if(fe&&Object(W.a)(fe)==="object"){var Je=fe.keepParent;xt=Je===!0,Qe=Je===!1}return Z.createElement(x.a,Object.assign({popupClassName:ee,prefixCls:He,popup:tt,action:R,builtinPlacements:ke.a,popupPlacement:re,ref:je,popupAlign:Ee,getPopupContainer:O,onPopupVisibleChange:ge,afterPopupVisibleChange:Ie,popupTransitionName:pe,popupAnimation:M,defaultPopupVisible:et,destroyPopupOnHide:xt,autoDestroy:Qe,mouseLeaveDelay:Fe,popupStyle:be,mouseEnterDelay:te},Be),ue)},ye=Object(Z.forwardRef)(ce),_=we.a=ye},Ohmc:function(Pe,we,p){Pe.exports=p.p+"static/certificate.fc32dc1b.jpg"},Ot1p:function(Pe,we,p){"use strict";var W=p("2qtc"),xe=p("kLXV"),me=p("rAM+"),Z=p("miYZ"),x=p("tsqr"),ke=p("9og8"),P=p("tJVT"),$=p("jrin"),ce=p("WmNS"),ye=p.n(ce),_=p("q1tI"),V=p.n(_),Ce=p("VrN/"),se=p.n(Ce),ee=p("bdgK"),U=p("p77/"),R=p("Bd2K"),k=p("ELLl"),te=p("19Vz"),Ae=p("lZu9"),Fe=p("+NIl"),be=p("kSUc"),he=p("9Bee"),He=function(X){var Le=X.value,ht=Le===void 0?"":Le,Ct=X.className,ct=X.showTextOnly,Ft=X.showLines,Pt=X.style,lt=Pt===void 0?{}:Pt,an=Object(_.useMemo)(function(){return""},[ht]);return V.a.createElement(V.a.Fragment,null,V.a.createElement("div",{dangerouslySetInnerHTML:{__html:an}}))},ue=p("0Owb"),ge=p("dejd"),Ie=p("C+DQ"),pe=p("1vsH"),M=p("m3rI"),ve=[{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 re(X){var Le=X.onActionCallback,ht=X.title,Ct=X.icon,ct=X.actionName,Ft=X.className,Pt=Ft===void 0?"":Ft,lt=X.children;function an(){Le(ct)}return V.a.createElement("a",{title:ht,className:Pt,onClick:an},V.a.createElement("i",{className:"md-iconfont ".concat(Ct)}),lt)}var B=function(X){var Le=X.watch,ht=X.showNullButton,Ct=X.onActionCallback,ct=X.fullScreen,Ft=X.insertTemp,Pt=X.hidetoolBar,lt=X.uuid,an=X.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(pe.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(pe.E)("_educoder_session"),"&key=").concat(lt,"&api=").concat(encodeURIComponent(M.a.PROXY_SERVER)));var Zt=[].concat(ve,[{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 V.a.createElement("ul",{className:"markdown-toolbar-container"},!Pt&&Zt.map(function(nt,mn){return V.a.createElement("li",{key:mn},nt.actionName?V.a.createElement(re,Object(ue.a)({},nt,{onActionCallback:Ct})):V.a.createElement("span",{className:"v-line"}))}),ht?V.a.createElement("li",null,V.a.createElement(re,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ct},V.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ft&&V.a.createElement("li",null,V.a.createElement(re,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ft),onActionCallback:Ct},V.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),V.a.createElement("li",{className:"btn-full-screen"},V.a.createElement(re,{icon:"".concat(ct?"icon-shrink":"icon-enlarge"),title:ct?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ct})))},Ee=p("M8RZ"),Re=p("+L6B"),fe=p("2/Rp"),et=p("y8nQ"),O=p("Vl3Y"),y=p("5NDa"),le=p("5rEg"),je={labelCol:{span:4},wrapperCol:{span:20}},Be=function(X){var Le=X.callback,ht=X.onCancel;function Ct(ct){Le(ct)}return V.a.createElement(O.a,Object(ue.a)({},je,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ct}),V.a.createElement(O.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},V.a.createElement(le.a,null)),V.a.createElement(O.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},V.a.createElement(le.a,null)),V.a.createElement("div",{className:"flex-container flex-end"},V.a.createElement(fe.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),V.a.createElement(fe.a,{type:"ghost",onClick:ht},"\u53D6\u6D88")))},tt=p("7ahc"),xt=p("k1fw"),Qe=p("HmJG"),Je=p("BjJ7"),Ue=O.a.useForm,Ve={width:280,marginRight:10},oe={labelCol:{span:5},wrapperCol:{span:19}},D=function(X){var Le=X.callback,ht=X.onCancel,Ct=Ue(),ct=Object(P.a)(Ct,1),Ft=ct[0],Pt=Object(_.useRef)();function lt(nt){Le(Object(xt.a)(Object(xt.a)({},nt),{},{name:Pt.current}))}function an(nt,mn){Ft.setFieldsValue({src:"/api/attachments/".concat(nt.id,"?type=").concat(nt.content_type),type:mn.type})}function Zt(nt){var mn=nt.target.files[0];Pt.current=mn.name,kt(mn,an)}return V.a.createElement(O.a,Object(ue.a)({form:Ft},oe,{className:"upload-image-panel",onFinish:lt}),V.a.createElement(O.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},V.a.createElement("div",{className:"flex-container"},V.a.createElement(O.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},V.a.createElement(le.a,{style:Ve})),V.a.createElement(it,{onFileChange:Zt}))),V.a.createElement(O.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},V.a.createElement(le.a,{style:{width:264}})),V.a.createElement(O.a.Item,{style:{textAlign:"right"}},V.a.createElement(fe.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),V.a.createElement(fe.a,{type:"ghost",onClick:ht},"\u53D6\u6D88")))};function it(X){var Le=X.onFileChange;return V.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",V.a.createElement("input",{type:"file",onChange:Le}))}function kt(X,Le){if(!X)throw new String("\u6CA1\u6709\u6587\u4EF6");var ht=new FormData;ht.append("editormd-image-file",X),ht.append("file_param_name","editormd-image-file"),ht.append("byxhr","true");var Ct=new window.XMLHttpRequest;Ct.withCredentials=!0,Ct.addEventListener("load",function(ct){Le(JSON.parse(ct.target.responseText),X)},!1),Ct.addEventListener("error",function(ct){console.error(ct)},!1),Ct.open("POST","".concat(Je.a,"/api/attachments.json")),Ct.send(ht)}var Ut=p("giR+"),mt=p("fyUT"),At=p("7Kak"),Te=p("9yH6"),Ye=Te.a.Group,at={margin:"0 8px"},dt=function(X){var Le=X.callback,ht=X.onCancel;function Ct(ct){Le(ct)}return V.a.createElement(O.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ct},V.a.createElement("div",{className:"flex-container"},V.a.createElement("span",{style:at},"\u5355\u5143\u683C\u6570\uFF1A"),V.a.createElement("span",{style:at},"\u884C\u6570"),V.a.createElement(O.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},V.a.createElement(mt.a,null)),V.a.createElement("span",{style:at},"\u5217\u6570"),V.a.createElement(O.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},V.a.createElement(mt.a,null))),V.a.createElement("div",{className:"flex-container",style:{marginTop:12}},V.a.createElement("span",{style:at},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),V.a.createElement(O.a.Item,{name:"align"},V.a.createElement(Ye,null,V.a.createElement(Te.a,{value:"default"},V.a.createElement("i",{className:"fa fa-align-justify"})),V.a.createElement(Te.a,{value:"left"},V.a.createElement("i",{className:"fa fa-align-left"})),V.a.createElement(Te.a,{value:"center"},V.a.createElement("i",{className:"fa fa-align-center"})),V.a.createElement(Te.a,{value:"right"},V.a.createElement("i",{className:"fa fa-align-right"}))))),V.a.createElement("div",{className:"flex-container flex-end"},V.a.createElement(fe.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),V.a.createElement(fe.a,{type:"ghost",onClick:ht},"\u53D6\u6D88")))},Ke=p("ErOA"),We=p("7Cbv"),Ze="link",Lt="upload-image",gt="code-block",ot="add-table",rt="------------",Dt={default:rt,left:":".concat(rt),center:":".concat(rt,":"),right:"".concat(rt,":")},ft=p("9VGf"),wt,Se;function It(){}var pt=0,Me=1e4,Xe="\u2581",J=`
**\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 H(X){return/^\d+$/.test(X)?"".concat(X,"px"):X}var K=navigator.platform.toUpperCase().indexOf("MAC")>=0,C=K?"Cmd":"Ctrl",E=["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"],A=(wt={},Object($.a)(wt,C+"-B","bold"),Object($.a)(wt,C+"-I","italic"),wt),T=(Se={},Object($.a)(Se,Ze,"\u6DFB\u52A0\u94FE\u63A5"),Object($.a)(Se,gt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object($.a)(Se,Lt,"\u6DFB\u52A0\u6587\u4EF6"),Object($.a)(Se,ot,"\u6DFB\u52A0\u8868\u683C"),Se),ae=we.a=function(X){var Le=X.defaultValue,ht=Le===void 0?"":Le,Ct=X.onChange,ct=X.width,Ft=ct===void 0?"100%":ct,Pt=X.height,lt=Pt===void 0?400:Pt,an=X.miniToolbar,Zt=an===void 0?!1:an,nt=X.isFocus,mn=nt===void 0?!1:nt,Qt=X.watch,ui=X.insertTemp,gi=X.mode,Wt=gi===void 0?"markdown":gi,Ei=X.id,Gn=Ei===void 0?"markdown-editor-id":Ei,Vn=X.showResizeBar,vi=Vn===void 0?!1:Vn,Ii=X.noStorage,Vi=Ii===void 0?!1:Ii,un=X.showNullButton,Tt=un===void 0?!1:un,Ni=X.hidetoolBar,Ti=Ni===void 0?!1:Ni,In=X.fullScreen,zt=In===void 0?!1:In,En=X.onBlur,$t=X.onCMBeforeChange,gn=X.onFullScreen,Ne=X.className,_t=Ne===void 0?"":Ne,Kn=X.disablePaste,ei=Kn===void 0?!1:Kn,ro=X.placeholder,ao=ro===void 0?"":ro,d=X.values,r=d===void 0?"":d,a=Object(_.useState)(null),u=Object(P.a)(a,2),h=u[0],c=u[1],z=Object(_.useState)(ht),_e=Object(P.a)(z,2),ut=_e[0],Mt=_e[1],ze=Object(_.useState)(Qt),Et=Object(P.a)(ze,2),St=Et[0],Rt=Et[1],tn=Object(_.useState)(zt),vn=Object(P.a)(tn,2),qt=vn[0],Pi=vn[1],ci=Object(_.useState)(""),xi=Object(P.a)(ci,2),Ui=xi[0],ti=xi[1],so=Object(_.useState)(0),Zi=Object(P.a)(so,2),bo=Zi[0],vo=Zi[1],sr=Object(_.useState)(lt),Go=Object(P.a)(sr,2),lo=Go[0],di=Go[1],ko=Object(_.useState)(!1),_o=Object(P.a)(ko,2),yr=_o[0],Qn=_o[1],Mn=Object(_.useRef)(Object(We.a)()),ni=Object(_.useRef)(!1),xn=Object(_.useRef)(),ii=Object(_.useRef)(),Rn=Object(_.useRef)(),uo=Object(_.useRef)(),oi=Object(_.useRef)(),_i=function(){var Bt=Object(ke.a)(ye.a.mark(function Yt(){var Ht,cn;return ye.a.wrap(function(Nn){for(;;)switch(Nn.prev=Nn.next){case 0:return Nn.next=2,Object(Ke.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Mn.current}});case 2:cn=Nn.sent,cn!=null&&(Ht=cn.attachments)!==null&&Ht!==void 0&&Ht.length&&(console.log("cm:",h,ii),cn.attachments.map(function(bn){bn.content_type.indexOf("image")>-1?h.replaceSelection("![,](/api/attachments/".concat(bn.id,"?type=").concat(bn.content_type,")")):bn.content_type.indexOf("video")>-1?h.replaceSelection('<video width="100%" controls src="'.concat(M.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):bn.content_type.indexOf("pdf")>-1?h.replaceSelection('<a href="'.concat(M.a.API_SERVER,"/api/attachments/").concat(bn.id,"?type=").concat(bn.content_type,'&disposition=inline" target="_blank">').concat(bn.name,"</a>")):h.replaceSelection("[".concat(bn.name,"](").concat(M.a.API_SERVER,"/api/attachments/").concat(bn.id,"?type=").concat(bn.content_type,")"))}));case 4:case"end":return Nn.stop()}},Yt)}));return function(){return Bt.apply(this,arguments)}}();Object(_.useEffect)(function(){Mt(r),h==null||h.setValue(r)},[r]),Object(_.useEffect)(function(){gn==null||gn(qt)},[qt]),Object(_.useEffect)(function(){if(ii.current){var Bt=se.a.fromTextArea(ii.current,{mode:Wt,lineNumbers:!Zt,lineWrapping:!0,value:ht,autoCloseTags:!0,autoCloseBrackets:!0});mn&&Bt.focus();function Yt(Ht,cn){if(ei){cn.preventDefault();return}var wn=cn.clipboardData;if(wn){var Nn=wn.types.toString(),bn=wn.items;if(Nn==="Files"||wn.types.indexOf("Files")>-1){if(cn.preventDefault(),Wt=="stex")return;try{var hi,Fi=bn[1];((hi=bn[0])===null||hi===void 0?void 0:hi.kind)==="file"&&(Fi=bn[0]);var hn=Fi.getAsFile(),Mo=hn.name.split(".").pop();kt(hn,function(On){if(On.id){var yi,io,Gi;(hn==null||((yi=hn.type)===null||yi===void 0)?void 0:yi.indexOf("image"))>-1?Bt.replaceSelection("![,](/api/attachments/".concat(On.id,"?type=").concat(On.content_type,")")):(hn==null||((io=hn.type)===null||io===void 0)?void 0:io.indexOf("video"))>-1?Bt.replaceSelection('<video width="100%" controls src="'.concat(M.a.API_SERVER,"/api/attachments/").concat(On.id,'"></video>')):(hn==null||((Gi=hn.type)===null||Gi===void 0)?void 0:Gi.indexOf("pdf"))>-1?Bt.replaceSelection('<a href="'.concat(M.a.API_SERVER,"/api/attachments/").concat(On.id,"?type=").concat(hn.type,'&disposition=inline" target="_blank">').concat(hn.name,"</a>")):E.includes(Mo)?Bt.replaceSelection('<a href="'.concat(M.a.API_SERVER,"/api/attachments/").concat(On.id,'?type=office&disposition=inline" target="_blank">').concat(hn.name,"</a>")):Bt.replaceSelection("[".concat(hn.name,"](").concat(M.a.API_SERVER,"/api/attachments/").concat(On.id,"?type=").concat(On.content_type,")"))}else(On==null?void 0:On.status)===401&&(document.location.href="/user/login")})}catch(On){x.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Bt.on("paste",Yt),Bt.on("dragleave",function(Ht,cn){Rn.current.classList.remove("mouse-hover-md")}),Bt.on("dragover",function(Ht,cn){Rn.current.classList.add("mouse-hover-md")}),Bt.on("drop",function(Ht,cn){Rn.current.classList.add("mouse-hover-md");var wn;if(wn=cn.dataTransfer.files,wn.length>0){cn.preventDefault(),cn.stopPropagation();for(var Nn=function(Fi){var hn=wn[Fi],Mo=hn.name.split(".").pop();kt(hn,function(On){if(On.id){var yi,io,Gi;(hn==null||((yi=hn.type)===null||yi===void 0)?void 0:yi.indexOf("image"))>-1?Bt.replaceSelection("![,](/api/attachments/".concat(On.id,"?type=").concat(On.content_type,")")):(hn==null||((io=hn.type)===null||io===void 0)?void 0:io.indexOf("video"))>-1?Bt.replaceSelection('<video width="100%" controls src="'.concat(M.a.API_SERVER,"/api/attachments/").concat(On.id,'"></video>')):(hn==null||((Gi=hn.type)===null||Gi===void 0)?void 0:Gi.indexOf("pdf"))>-1?Bt.replaceSelection('<a href="'.concat(M.a.API_SERVER,"/api/attachments/").concat(On.id,"?type=").concat(hn.type,'&disposition=inline" target="_blank">').concat(hn.name,"</a>")):E.includes(Mo)?Bt.replaceSelection('<a href="'.concat(M.a.API_SERVER,"/api/attachments/").concat(On.id,'?type=office&disposition=inline" target="_blank">').concat(hn.name,"</a>")):Bt.replaceSelection("[".concat(hn.name,"](").concat(M.a.API_SERVER,"/api/attachments/").concat(On.id,"?type=").concat(On.content_type,")"))}else(On==null?void 0:On.status)===401&&(document.location.href="/user/login")})},bn=0;bn<wn.length;bn++)Nn(bn)}}),c(Bt),function(){Bt.off("paste",Yt)}}},[]);var Ko=Object(_.useCallback)(function(){if(Rn.current)try{}catch(Bt){console.log(Bt,"---- to set md editor body height")}},[lo,Rn,qt]);Object(_.useEffect)(function(){function Bt(){var Ht=new ee.default(function(cn){var wn=Object(me.a)(cn),Nn;try{for(wn.s();!(Nn=wn.n()).done;){var bn=Nn.value;(bn.target.offsetHeight>0||bn.target.offsetWidth>0)&&(Ko(),h.setSize("100%","100%"),h.refresh())}}catch(hi){wn.e(hi)}finally{wn.f()}});return Ht.observe(ii.current.parentElement),Ht}if(h){var Yt=Bt();return function(){Yt.unobserve(ii.current.parentElement)}}},[h,Ko]),Object(_.useEffect)(function(){if(h){for(var Bt=[],Yt=function(){var bn=cn[Ht];wn=Object(P.a)(bn,2);var hi=wn[0],Fi=wn[1],hn=Object($.a)({},hi,function(){Qo(Fi)});Bt.push(hn),h.addKeyMap(hn)},Ht=0,cn=Object.entries(A);Ht<cn.length;Ht++){var wn;Yt()}return xn.current=setInterval(function(){ni.current&&_i()},4e3),function(){clearInterval(xn.current);var Nn=Object(me.a)(Bt),bn;try{for(Nn.s();!(bn=Nn.n()).done;){var hi=bn.value;h.removeKeyMap(hi)}}catch(Fi){Nn.e(Fi)}finally{Nn.f()}}}},[h]),Object(_.useEffect)(function(){zt!==qt&&Pi(zt)},[zt]),Object(ft.a)(function(){if(!Vi&&bo>0){var Bt=new Date().getTime(),Yt=window.sessionStorage.getItem(Gn);Bt>=bo+Me&&(!Yt||Yt!==ut)&&(window.sessionStorage.setItem(Gn,ut),Qn(!0))}},Me),Object(_.useEffect)(function(){Rt(Qt)},[h,Qt]),Object(_.useEffect)(function(){h&&(mn&&h.focus())},[h,mn]),Object(_.useEffect)(function(){if(St&&h){var Bt=h.getScrollerElement();function Yt(Ht){var cn=Ht.target;if(oi.current){var wn=cn.scrollTop/cn.scrollHeight;oi.current.scrollTop=oi.current.scrollHeight*wn}}return Bt.addEventListener("scroll",Yt),function(){Bt.removeEventListener("scroll",Yt)}}},[h,St]),Object(_.useEffect)(function(){if(h&&$t){function Bt(Yt,Ht){$t(Yt,Ht)}return h.on("beforeChange",Bt),function(){h.off("beforeChange",Bt)}}},[h,$t]),Object(_.useEffect)(function(){if(h&&En){function Bt(){En(h.getValue())}return h.on("blur",Bt),function(){h.off("blur",Bt)}}},[h,En]),Object(_.useEffect)(function(){if(h){function Bt(Yt){var Ht=Yt.getValue();Mt(Ht),vo(new Date().getTime()),Yt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ct&&Ct(Ht)}return h.on("change",Bt),function(){h.off("change",Bt)}}},[h,Ct]),Object(_.useEffect)(function(){h&&(ht==null?(h.setValue(""),Mt("")):ht!==h.getValue()&&(h.setValue(ht),Mt(ht),h.setCursor(h.lineCount(),0)))},[h,ht]);var Qo=Object(_.useCallback)(function(Bt){var Yt=h.getCursor(),Ht=h.getSelection(),cn=Ht.split(`
`);switch(Bt){case"bold":return h.replaceSelection("**"+Ht+"**"),Ht===""&&h.setCursor(Yt.line,Yt.ch+2),h.focus();case"italic":return h.replaceSelection("*"+Ht+"*"),Ht===""&&h.setCursor(Yt.line,Yt.ch+1),h.focus();case"code":return h.replaceSelection("`"+Ht+"`"),Ht===""&&h.setCursor(Yt.line,Yt.ch+1),h.focus();case"inline-latex":return h.replaceSelection("`$$"+Ht+"$$`"),Ht===""&&h.setCursor(Yt.line,Yt.ch+3),h.focus();case"latex":return h.replaceSelection("```latex\n"+Ht+"\n```"),h.setCursor(Yt.line+1,Ht.length+1),h.focus();case"line-break":return h.replaceSelection(`<br/>
`),h.focus();case"list-ul":return Ht===""?h.replaceSelection("- "+Ht):h.replaceSelection(cn.map(function(wn){return wn===""?"":"- ".concat(wn)}).join(`
`)),h.focus();case"list-ol":return Ht===""?h.replaceSelection("1. "+Ht):h.replaceSelection(cn.map(function(wn,Nn){return wn===""?"":"".concat(Nn+1,". ").concat(wn)}).join(`
`)),h.focus();case"add-null-ch":return Ht===""&&h.setCursor(Yt.line,Yt.ch+1),h.replaceSelection(Xe),h.focus();case"inster-template-1":return Ht===""&&h.setCursor(Yt.line,Yt.ch),h.replaceSelection(J),h.focus();case"eraser":return h.setValue(""),h.focus();case"trigger-watch":return Rt(!St),h.focus();case"trigger-full-screen":return Pi(!qt),h.focus();case Ze:ti(Ze);return;case gt:ti(gt);return;case Lt:ti(Lt);return;case ot:ti(ot);return;default:throw new Error}},[h,St,qt]),co=Object(_.useCallback)(function(Bt){ti("");switch(Ui){case Ze:var Yt=Bt.title,Ht=Bt.link;return h.replaceSelection("[".concat(Yt,"](").concat(Ht,")")),h.focus();case gt:var cn=Bt.language,wn=Bt.content;return h.replaceSelection(["```"+cn,wn,"```"].join(`
`)),h.focus();case Lt:var Nn=Bt.src,bn=Bt.alt,hi=Bt.name;return Nn.indexOf("type=image")>-1?h.replaceSelection("![ ".concat(bn||""," ]( ").concat(Nn,' "').concat(bn||"",'" )')):Nn.indexOf("type=application/pdf")>-1?h.replaceSelection('<a href="'.concat(Nn,'&disposition=inline" target="_blank">').concat(hi,"</a>")):h.replaceSelection('<a href="'.concat(Nn,'" target="_blank">').concat(hi,"</a>")),h.focus();case ot:for(var Fi=Bt.row,hn=Bt.col,Mo=Bt.align,On=`
`,yi=0;yi<Fi;yi++){for(var io=[],Gi=[],Cr=0;Cr<hn;Cr++)yi===1&&Gi.push(Dt[Mo]),io.push(" ");yi===1&&(On+="| ".concat(Gi.join(" | "),` |
`)),On+="| ".concat(io.join(hn===1?"":" | "),` |
`)}return h.replaceSelection(On+`
`),h.focus();default:throw new Error}},[h,Ui]),Co=Object(_.useMemo)(function(){switch(Ui){case Ze:return V.a.createElement(Be,{callback:co,onCancel:Ri});case gt:return V.a.createElement(tt.b,{callback:co,onCancel:Ri});case Lt:return V.a.createElement(D,{callback:co,onCancel:Ri});case ot:return V.a.createElement(dt,{callback:co,onCancel:Ri});default:return null}},[Ui]);function Ri(){ti("")}Object(_.useEffect)(function(){if(uo.current){var Bt=uo.current,Yt=!1,Ht=0;function cn(bn){Yt=!0,Ht=bn.pageY}function wn(){Yt=!1}function Nn(bn){if(Yt){var hi=bn.pageY-Ht;hi<0&&(hi=0),hi>300&&(hi=300);var Fi=lt+hi+"px";di(Fi)}}return Bt.addEventListener("mousedown",cn),document.addEventListener("mousemove",Nn),document.addEventListener("mouseup",wn),function(){Bt.removeEventListener("mousedown",cn),document.removeEventListener("mousemove",Nn),document.removeEventListener("mouseup",wn)}}},[h,uo]),Object(_.useEffect)(function(){di(lt)},[lt]);var lr=H(Ft),no=H(lo),Jo={width:lr,height:no},ur=Object(_.useMemo)(function(){if(bo){var Bt=new Date(bo),Yt=Bt.getHours(),Ht=Bt.getMinutes(),cn=Bt.getSeconds();return Yt=Yt<10?"0"+Yt:Yt,Ht=Ht<10?"0"+Ht:Ht,cn=cn<10?"0"+cn:cn,"".concat(Yt,":").concat(Ht,":").concat(cn)}return 0},[bo]);function jo(){window.sessionStorage.removeItem(Gn),Qn(!1),vo(0)}function ga(){Qn(!1),vo(0),h.setValue(window.sessionStorage.getItem(Gn))}function br(Bt,Yt){var Ht=h.getValue();Ht=Ht.replace(Bt,Yt),Mt(Ht),h==null||h.setValue(Ht)}return V.a.createElement(_.Fragment,null,V.a.createElement("div",{className:"markdown-editor-wrapper",ref:Rn},V.a.createElement("div",{className:"markdown-editor-container ".concat(_t," ").concat(St?"on-preview":""," ").concat(Zt?"mini":""," ").concat(qt?"full-screen":""),style:Jo},V.a.createElement(B,{insertTemp:ui,watch:St,fullScreen:qt,showNullButton:Tt,onActionCallback:Qo,hidetoolBar:Ti,uuid:Mn.current,setOpenPhones:function(){ni.current=!0}}),V.a.createElement("div",{className:"markdown-editor-body"},V.a.createElement("div",{className:"codemirror-container"},V.a.createElement("textarea",{ref:ii,placeholder:ao})),St?V.a.createElement("div",{ref:oi,className:"preview-container"},Wt==="stex"&&V.a.createElement(He,{value:ut}),Wt!=="stex"&&V.a.createElement(he.a,{edit:!0,value:ut,replaces:br})):null))),vi?V.a.createElement("a",{ref:uo,className:"editor-resize"}):null,V.a.createElement(Ee.a,null,T[Ui]?V.a.createElement(xe.a,{centered:!0,title:T[Ui],visible:!0,onCancel:Ri,footer:null},Co):null))}},RMFE:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0DBAgQiAoIdPQw1iJAgIBA+wYIECAQFRDo6GGsRYAAAYH2DRAgQCAqINDRw1iLAAECAu0bIECAQFRAoKOHsRYBAgQE2jdAgACBqIBARw9jLQIECAi0b4AAAQJRAYGOHsZaBAgQEGjfAAECBKICAh09jLUIECAg0L4BAgQIRAUEOnoYaxEgQECgfQMECBCICgh09DDWIkCAgED7BggQIBAVEOjoYaxFgAABgfYNECBAICog0NHDWIsAAQIC7RsgQIBAVECgo4exFgECBATaN0CAAIGogEBHD2MtAgQICLRvgAABAlEBgY4exloECBAQaN8AAQIEogICHT2MtQgQICDQvgECBAhEBQQ6ehhrESBAQKB9AwQIEIgKCHT0MNYiQICAQPsGCBAgEBUQ6OhhrEWAAAGB9g0QIEAgKiDQ0cNYiwABAgLtGyBAgEBUQKCjh7EWAQIEBNo3QIAAgaiAQEcPYy0CBAh8/5Tg6+vrp3/q7wgQIEDgPwKfz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gECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICXz/dJvP5/PTP/V3BAgQIHAg4D/oA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},SJMd:function(Pe,we){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var p,W,xe,me=!1,Z,x;window.PR_SHOULD_USE_CONTINUATION=!0;var ke,P;(function(){var $=window,ce=["break,continue,do,else,for,if,return,while"],ye=[ce,"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"],_=[ye,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],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"],Ce=[_,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],se=[_,"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"],ee="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",U=[_,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],R="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",k=[ce,"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"],te=[ce,"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"],Ae=[ce,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Fe=[V,se,Ce,U,R,k,te,Ae],be=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,he="str",He="kwd",ue="com",ge="typ",Ie="lit",pe="pun",M="pln",ve="tag",re="dec",B="src",Ee="atn",Re="atv",fe="nocode",et="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function O(Te){for(var Ye=0,at=!1,dt=!1,Ke=0,We=Te.length;Ke<We;++Ke){var Ze=Te[Ke];if(Ze.ignoreCase)dt=!0;else if(/[a-z]/i.test(Ze.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){at=!0,dt=!1;break}}var Lt={b:8,t:9,n:10,v:11,f:12,r:13};function gt(wt){var Se=wt.charCodeAt(0);if(Se!==92)return Se;var It=wt.charAt(1);return Se=Lt[It],Se||("0"<=It&&It<="7"?parseInt(wt.substring(1),8):It==="u"||It==="x"?parseInt(wt.substring(2),16):wt.charCodeAt(1))}function ot(wt){if(wt<32)return(wt<16?"\\x0":"\\x")+wt.toString(16);var Se=String.fromCharCode(wt);return Se==="\\"||Se==="-"||Se==="]"||Se==="^"?"\\"+Se:Se}function rt(wt){var Se=wt.substring(1,wt.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")),It=[],pt=Se[0]==="^",Me=["["];pt&&Me.push("^");for(var Xe=pt?1:0,J=Se.length;Xe<J;++Xe){var H=Se[Xe];if(/\\[bdsw]/i.test(H))Me.push(H);else{var K=gt(H),C;Xe+2<J&&Se[Xe+1]==="-"?(C=gt(Se[Xe+2]),Xe+=2):C=K,It.push([K,C]),C<65||K>122||(C<65||K>90||It.push([Math.max(65,K)|32,Math.min(C,90)|32]),C<97||K>122||It.push([Math.max(97,K)&~32,Math.min(C,122)&~32]))}}It.sort(function(ae,X){return ae[0]-X[0]||X[1]-ae[1]});for(var E=[],A=[],Xe=0;Xe<It.length;++Xe){var T=It[Xe];T[0]<=A[1]+1?A[1]=Math.max(A[1],T[1]):E.push(A=T)}for(var Xe=0;Xe<E.length;++Xe){var T=E[Xe];Me.push(ot(T[0])),T[1]>T[0]&&(T[1]+1>T[0]&&Me.push("-"),Me.push(ot(T[1])))}return Me.push("]"),Me.join("")}function Dt(wt){for(var Se=wt.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")),It=Se.length,pt=[],Me=0,Xe=0;Me<It;++Me){var J=Se[Me];if(J==="(")++Xe;else if(J.charAt(0)==="\\"){var H=+J.substring(1);H&&(H<=Xe?pt[H]=-1:Se[Me]=ot(H))}}for(var Me=1;Me<pt.length;++Me)pt[Me]===-1&&(pt[Me]=++Ye);for(var Me=0,Xe=0;Me<It;++Me){var J=Se[Me];if(J==="(")++Xe,pt[Xe]||(Se[Me]="(?:");else if(J.charAt(0)==="\\"){var H=+J.substring(1);H&&H<=Xe&&(Se[Me]="\\"+pt[H])}}for(var Me=0;Me<It;++Me)Se[Me]==="^"&&Se[Me+1]!=="^"&&(Se[Me]="");if(wt.ignoreCase&&at)for(var Me=0;Me<It;++Me){var J=Se[Me],K=J.charAt(0);J.length>=2&&K==="["?Se[Me]=rt(J):K!=="\\"&&(Se[Me]=J.replace(/[a-zA-Z]/g,function(A){var T=A.charCodeAt(0);return"["+String.fromCharCode(T&~32,T|32)+"]"}))}return Se.join("")}for(var ft=[],Ke=0,We=Te.length;Ke<We;++Ke){var Ze=Te[Ke];if(Ze.global||Ze.multiline)throw new Error(""+Ze);ft.push("(?:"+Dt(Ze)+")")}return new RegExp(ft.join("|"),dt?"gi":"g")}function y(Te,Ye){var at=/(?:^|\s)nocode(?:\s|$)/,dt=[],Ke=0,We=[],Ze=0;function Lt(gt){var ot=gt.nodeType;if(ot==1){if(at.test(gt.className))return;for(var rt=gt.firstChild;rt;rt=rt.nextSibling)Lt(rt);var Dt=gt.nodeName.toLowerCase();(Dt==="br"||Dt==="li")&&(dt[Ze]=`
`,We[Ze<<1]=Ke++,We[Ze++<<1|1]=gt)}else if(ot==3||ot==4){var ft=gt.nodeValue;ft.length&&(Ye?ft=ft.replace(/\r\n?/g,`
`):ft=ft.replace(/[ \t\r\n]+/g," "),dt[Ze]=ft,We[Ze<<1]=Ke,Ke+=ft.length,We[Ze++<<1|1]=gt)}}return Lt(Te),{sourceCode:dt.join("").replace(/\n$/,""),spans:We}}function le(Te,Ye,at,dt,Ke){if(!at)return;var We={sourceNode:Te,pre:1,langExtension:null,numberLines:null,sourceCode:at,spans:null,basePos:Ye,decorations:null};dt(We),Ke.push.apply(Ke,We.decorations)}var je=/\S/;function Be(Te){for(var Ye=void 0,at=Te.firstChild;at;at=at.nextSibling){var dt=at.nodeType;Ye=dt===1?Ye?Te:at:dt===3&&je.test(at.nodeValue)?Te:Ye}return Ye===Te?void 0:Ye}function tt(Te,Ye){var at={},dt;(function(){for(var Ze=Te.concat(Ye),Lt=[],gt={},ot=0,rt=Ze.length;ot<rt;++ot){var Dt=Ze[ot],ft=Dt[3];if(ft)for(var wt=ft.length;--wt>=0;)at[ft.charAt(wt)]=Dt;var Se=Dt[1],It=""+Se;gt.hasOwnProperty(It)||(Lt.push(Se),gt[It]=null)}Lt.push(/[\0-\uffff]/),dt=O(Lt)})();var Ke=Ye.length,We=function(Ze){for(var Lt=Ze.sourceCode,gt=Ze.basePos,ot=Ze.sourceNode,rt=[gt,M],Dt=0,ft=Lt.match(dt)||[],wt={},Se=0,It=ft.length;Se<It;++Se){var pt=ft[Se],Me=wt[pt],Xe=void 0,J;if(typeof Me=="string")J=!1;else{var H=at[pt.charAt(0)];if(H)Xe=pt.match(H[1]),Me=H[0];else{for(var K=0;K<Ke;++K)if(H=Ye[K],Xe=pt.match(H[1]),Xe){Me=H[0];break}Xe||(Me=M)}J=Me.length>=5&&Me.substring(0,5)==="lang-",J&&!(Xe&&typeof Xe[1]=="string")&&(J=!1,Me=B),J||(wt[pt]=Me)}var C=Dt;if(Dt+=pt.length,!J)rt.push(gt+C,Me);else{var E=Xe[1],A=pt.indexOf(E),T=A+E.length;Xe[2]&&(T=pt.length-Xe[2].length,A=T-E.length);var ae=Me.substring(5);le(ot,gt+C,pt.substring(0,A),We,rt),le(ot,gt+C+A,E,D(ae,E),rt),le(ot,gt+C+T,pt.substring(T),We,rt)}}Ze.decorations=rt};return We}function xt(Te){var Ye=[],at=[];Te.tripleQuotedStrings?Ye.push([he,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Te.multiLineStrings?Ye.push([he,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ye.push([he,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Te.verbatimStrings&&at.push([he,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var dt=Te.hashComments;dt&&(Te.cStyleComments?(dt>1?Ye.push([ue,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ye.push([ue,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),at.push([he,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ye.push([ue,/^#[^\r\n]*/,null,"#"])),Te.cStyleComments&&(at.push([ue,/^\/\/[^\r\n]*/,null]),at.push([ue,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ke=Te.regexLiterals;if(Ke){var We=Ke>1?"":`
\r`,Ze=We?".":"[\\S\\s]",Lt="/(?=[^/*"+We+"])(?:[^/\\x5B\\x5C"+We+"]|\\x5C"+Ze+"|\\x5B(?:[^\\x5C\\x5D"+We+"]|\\x5C"+Ze+")*(?:\\x5D|$))+/";at.push(["lang-regex",RegExp("^"+et+"("+Lt+")")])}var gt=Te.types;gt&&at.push([ge,gt]);var ot=(""+Te.keywords).replace(/^ | $/g,"");ot.length&&at.push([He,new RegExp("^(?:"+ot.replace(/[\s,]+/g,"|")+")\\b"),null]),Ye.push([M,/^\s+/,null,` \r
\xA0`]);var rt="^.[^\\s\\w.$@'\"`/\\\\]*";return Te.regexLiterals&&(rt+="(?!s*/)"),at.push([Ie,/^@[a-z_$][a-z_$@0-9]*/i,null],[ge,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[M,/^[a-z_$][a-z_$@0-9]*/i,null],[Ie,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[M,/^\\[\s\S]?/,null],[pe,new RegExp(rt),null]),tt(Ye,at)}var Qe=xt({keywords:Fe,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Je(Te,Ye,at){for(var dt=/(?:^|\s)nocode(?:\s|$)/,Ke=/\r\n?|\n/,We=Te.ownerDocument,Ze=We.createElement("li");Te.firstChild;)Ze.appendChild(Te.firstChild);var Lt=[Ze];function gt(Se){var It=Se.nodeType;if(It==1&&!dt.test(Se.className))if(Se.nodeName==="br")ot(Se),Se.parentNode&&Se.parentNode.removeChild(Se);else for(var pt=Se.firstChild;pt;pt=pt.nextSibling)gt(pt);else if((It==3||It==4)&&at){var Me=Se.nodeValue,Xe=Me.match(Ke);if(Xe){var J=Me.substring(0,Xe.index);Se.nodeValue=J;var H=Me.substring(Xe.index+Xe[0].length);if(H){var K=Se.parentNode;K.insertBefore(We.createTextNode(H),Se.nextSibling)}ot(Se),J||Se.parentNode.removeChild(Se)}}}function ot(Se){for(;!Se.nextSibling;)if(Se=Se.parentNode,!Se)return;function It(Xe,J){var H=J?Xe.cloneNode(!1):Xe,K=Xe.parentNode;if(K){var C=It(K,1),E=Xe.nextSibling;C.appendChild(H);for(var A=E;A;A=E)E=A.nextSibling,C.appendChild(A)}return H}for(var pt=It(Se.nextSibling,0),Me;(Me=pt.parentNode)&&Me.nodeType===1;)pt=Me;Lt.push(pt)}for(var rt=0;rt<Lt.length;++rt)gt(Lt[rt]);Ye===(Ye|0)&&Lt[0].setAttribute("value",Ye);var Dt=We.createElement("ol");Dt.className="linenums";for(var ft=Math.max(0,Ye-1|0)||0,rt=0,wt=Lt.length;rt<wt;++rt)Ze=Lt[rt],Ze.className="L"+(rt+ft)%10,Ze.firstChild||Ze.appendChild(We.createTextNode("\xA0")),Dt.appendChild(Ze);Te.appendChild(Dt)}function Ue(Te){var Ye=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ye=Ye&&+Ye[1]<=8;var at=/\n/g,dt=Te.sourceCode,Ke=dt.length,We=0,Ze=Te.spans,Lt=Ze.length,gt=0,ot=Te.decorations,rt=ot.length,Dt=0;ot[rt]=Ke;var ft,wt;for(wt=ft=0;wt<rt;)ot[wt]!==ot[wt+2]?(ot[ft++]=ot[wt++],ot[ft++]=ot[wt++]):wt+=2;for(rt=ft,wt=ft=0;wt<rt;){for(var Se=ot[wt],It=ot[wt+1],pt=wt+2;pt+2<=rt&&ot[pt+1]===It;)pt+=2;ot[ft++]=Se,ot[ft++]=It,wt=pt}rt=ot.length=ft;var Me=Te.sourceNode,Xe="";Me&&(Xe=Me.style.display,Me.style.display="none");try{for(var J=null;gt<Lt;){var H=Ze[gt],K=Ze[gt+2]||Ke,C=ot[Dt+2]||Ke,pt=Math.min(K,C),E=Ze[gt+1],A;if(E.nodeType!==1&&(A=dt.substring(We,pt))){Ye&&(A=A.replace(at,"\r")),E.nodeValue=A;var T=E.ownerDocument,ae=T.createElement("span");ae.className=ot[Dt+1];var X=E.parentNode;X.replaceChild(ae,E),ae.appendChild(E),We<K&&(Ze[gt+1]=E=T.createTextNode(dt.substring(pt,K)),X.insertBefore(E,ae.nextSibling))}We=pt,We>=K&&(gt+=2),We>=C&&(Dt+=2)}}finally{Me&&(Me.style.display=Xe)}}var Ve={};function oe(Te,Ye){for(var at=Ye.length;--at>=0;){var dt=Ye[at];Ve.hasOwnProperty(dt)?$.console&&console.warn("cannot override language handler %s",dt):Ve[dt]=Te}}function D(Te,Ye){return Te&&Ve.hasOwnProperty(Te)||(Te=/^\s*</.test(Ye)?"default-markup":"default-code"),Ve[Te]}oe(Qe,["default-code"]),oe(tt([],[[M,/^[^<?]+/],[re,/^<!\w[^>]*(?:>|$)/],[ue,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[pe,/^(?:<[%?]|[%?]>)/],["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"]),oe(tt([[M,/^[\s]+/,null,` \r
`],[Re,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ve,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[Ee,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[pe,/^[=<>\/]+/],["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"]),oe(tt([],[[Re,/^[\s\S]+/]]),["uq.val"]),oe(xt({keywords:V,hashComments:!0,cStyleComments:!0,types:be}),["c","cc","cpp","cxx","cyc","m"]),oe(xt({keywords:"null,true,false"}),["json"]),oe(xt({keywords:se,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:be}),["cs"]),oe(xt({keywords:Ce,cStyleComments:!0}),["java"]),oe(xt({keywords:Ae,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),oe(xt({keywords:k,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),oe(xt({keywords:R,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),oe(xt({keywords:te,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),oe(xt({keywords:U,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),oe(xt({keywords:ee,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),oe(tt([],[[he,/^[\s\S]+/]]),["regex"]);function it(Te){var Ye=Te.langExtension;try{var at=y(Te.sourceNode,Te.pre),dt=at.sourceCode;Te.sourceCode=dt,Te.spans=at.spans,Te.basePos=0,D(Ye,dt)(Te),Ue(Te)}catch(Ke){$.console&&console.log(Ke&&Ke.stack||Ke)}}function kt(Te,Ye,at){var dt=at||!1,Ke=Ye||null,We=document.createElement("div");We.innerHTML="<pre>"+Te+"</pre>",We=We.firstChild,dt&&Je(We,dt,!0);var Ze={langExtension:Ke,numberLines:dt,sourceNode:We,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return it(Ze),We.innerHTML}function Ut(Te,Ye){var at=Ye||document.body,dt=at.ownerDocument||document;function Ke(H){return at.getElementsByTagName(H)}for(var We=[Ke("pre"),Ke("code"),Ke("xmp")],Ze=[],Lt=0;Lt<We.length;++Lt)for(var gt=0,ot=We[Lt].length;gt<ot;++gt)Ze.push(We[Lt][gt]);We=null;var rt=Date;rt.now||(rt={now:function(){return+new Date}});var Dt=0,ft=/\blang(?:uage)?-([\w.]+)(?!\S)/,wt=/\bprettyprint\b/,Se=/\bprettyprinted\b/,It=/pre|xmp/i,pt=/^code$/i,Me=/^(?:pre|code|xmp)$/i,Xe={};function J(){for(var H=$.PR_SHOULD_USE_CONTINUATION?rt.now()+250:Infinity;Dt<Ze.length&&rt.now()<H;Dt++){for(var K=Ze[Dt],C=Xe,E=K;E=E.previousSibling;){var A=E.nodeType,T=(A===7||A===8)&&E.nodeValue;if(T?!/^\??prettify\b/.test(T):A!==3||/\S/.test(E.nodeValue))break;if(T){C={},T.replace(/\b(\w+)=([\w:.%+-]+)/g,function(mn,Qt,ui){C[Qt]=ui});break}}var ae=K.className;if((C!==Xe||wt.test(ae))&&!Se.test(ae)){for(var X=!1,Le=K.parentNode;Le;Le=Le.parentNode){var ht=Le.tagName;if(Me.test(ht)&&Le.className&&wt.test(Le.className)){X=!0;break}}if(!X){K.className+=" prettyprinted";var Ct=C.lang;if(!Ct){Ct=ae.match(ft);var ct;!Ct&&(ct=Be(K))&&pt.test(ct.tagName)&&(Ct=ct.className.match(ft)),Ct&&(Ct=Ct[1])}var Ft;if(It.test(K.tagName))Ft=1;else{var Pt=K.currentStyle,lt=dt.defaultView,an=Pt?Pt.whiteSpace:lt&&lt.getComputedStyle?lt.getComputedStyle(K,null).getPropertyValue("white-space"):0;Ft=an&&an.substring(0,3)==="pre"}var Zt=C.linenums;(Zt=Zt==="true"||+Zt)||(Zt=ae.match(/\blinenums\b(?::(\d+))?/),Zt=Zt?Zt[1]&&Zt[1].length?+Zt[1]:!0:!1),Zt&&Je(K,Zt,Ft);var nt={langExtension:Ct,sourceNode:K,numberLines:Zt,pre:Ft,sourceCode:null,basePos:null,spans:null,decorations:null};it(nt)}}}Dt<Ze.length?$.setTimeout(J,250):typeof Te=="function"&&Te()}J()}var mt=$.PR={createSimpleLexer:tt,registerLangHandler:oe,sourceDecorator:xt,PR_ATTRIB_NAME:Ee,PR_ATTRIB_VALUE:Re,PR_COMMENT:ue,PR_DECLARATION:re,PR_KEYWORD:He,PR_LITERAL:Ie,PR_NOCODE:fe,PR_PLAIN:M,PR_PUNCTUATION:pe,PR_SOURCE:B,PR_STRING:he,PR_TAG:ve,PR_TYPE:ge,prettyPrintOne:me?$.prettyPrintOne=kt:ke=kt,prettyPrint:P=me?$.prettyPrint=Ut:P=Ut},At=$.define;typeof At=="function"&&At.amd&&At("google-code-prettify",[],function(){return mt})})()},SMhR:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcYAAAHGCAYAAADuYispAAAAAklEQVR4AewaftIAABHTSURBVO3BQY4cy5IEQdNA3//KNo2/8NU8XzCQyCpSReivSJKk/zmRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJE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LGiSRJGieSJGmcSJKkcSJJksaJJEkaP9FHA3KjbTZAngRk0zafDMiTgPyptrkB5Eltc6Nt3gTkTW1zA8imbZ7UNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZdrm28G5JO1zQ0gN9pmA2QDZNM2GyCbtrnRNk8BcqNtNkA2QN7UNhsgTwKyaZsNkE3bvAnIjbb5VCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSBv2VFwH5m7XNk4Bs2uZJQJ7UNjeA3GibTwXkRttsgNxomw2QG22zAXKjbW4AeVLbbIDcaJsNkCe1zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJA36K5Ik6X9OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4/8ATrCgy9kbxW8AAAAASUVORK5CYII="},TGq3:function(Pe,we,p){Pe.exports=p.p+"static/lockclose.365036e8.svg"},UUDw:function(Pe,we,p){Pe.exports={buttonFixed:"buttonFixed___2zLVJ",button:"button___-JgFH",buttonWrap:"buttonWrap___aZhhk"}},UeE2:function(Pe,we,p){"use strict";p.r(we);var W=p("5NDa"),xe=p("5rEg"),me=p("2qtc"),Z=p("kLXV"),x=p("miYZ"),ke=p("tsqr"),P=p("9og8"),$=p("k1fw"),ce=p("y8nQ"),ye=p("Vl3Y"),_=p("tJVT"),V=p("PpiC"),Ce=p("Znn+"),se=p("ZTPi"),ee=p("WmNS"),U=p.n(ee),R=p("q1tI"),k=p.n(R),te=p("9kvl"),Ae=p("Ot1p"),Fe=p("9Bee"),be=p("HBuW"),he=p("+L6B"),He=p("2/Rp"),ue=p("14J3"),ge=p("BMrR"),Ie=p("jCWc"),pe=p("kPKH"),M=p("OaEy"),ve=p("2fM7"),re=p("7Kak"),B=p("9yH6"),Ee=p("1vsH"),Re=p("uIXO"),fe=p.n(Re),et=p("5Dmo"),O=p("3S7+"),y=p("oBTY"),le=p("Ty5D"),je=p("V0Rq"),Be=p("muJo"),tt=p.n(Be),xt=["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"],Qe=function(Ke,We){var Ze=Ke.problemset,Lt=Ke.globalSetting,gt=Ke.loading,ot=Ke.dispatch,rt=Ke.onRef,Dt=rt===void 0?function(){}:rt,ft=Ke.editData,wt=Object(V.a)(Ke,["problemset","globalSetting","loading","dispatch","onRef","editData"]),Se=Object(R.useState)([]),It=Object(_.a)(Se,2),pt=It[0],Me=It[1],Xe=Object(R.useState)(),J=Object(_.a)(Xe,2),H=J[0],K=J[1],C=Object(R.useState)([]),E=Object(_.a)(C,2),A=E[0],T=E[1],ae=Object(R.useState)(""),X=Object(_.a)(ae,2),Le=X[0],ht=X[1],Ct=Object(R.useState)(!1),ct=Object(_.a)(Ct,2),Ft=ct[0],Pt=ct[1],lt=Object(R.useState)(""),an=Object(_.a)(lt,2),Zt=an[0],nt=an[1],mn=Object(R.useState)(5),Qt=Object(_.a)(mn,2),ui=Qt[0],gi=Qt[1],Wt=Object(R.useState)(!1),Ei=Object(_.a)(Wt,2),Gn=Ei[0],Vn=Ei[1],vi=Object(le.i)();Object(R.useEffect)(function(){Me(["","","",""])},[]),Object(R.useEffect)(function(){console.log(pt,"questionChoiceList")},[pt]),Object(R.useEffect)(function(){var In,zt;if(!(ft!=null&&ft.challenge_id)){Vn(!0);return}ht(ft==null?void 0:ft.subject),gi(parseInt(ft==null?void 0:ft.question_score)),Me(ft==null||((In=ft.choose_contents)===null||In===void 0)?void 0:In.map(function($t){return $t.option_name}));var En=[];ft==null||((zt=ft.standard_answer)===null||zt===void 0)||zt.split("").map(function($t,gn){En.push(xt.indexOf($t))}),T(En)},[ft]),Object(R.useImperativeHandle)(We,function(){return{onSave:un,onReset:Ii,isEdit:Gn}});var Ii=function(){Me(["","","",""]),ht(""),T([])},Vi=function(){for(var zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],En=Object(y.a)(zt),$t=En.sort(),gn=0;gn<$t.length-1;gn++)if($t[gn]==$t[gn+1])return!0;return!1},un=function(){var In=Object(P.a)(U.a.mark(function zt(){var En,$t;return U.a.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:if(Le){Ne.next=4;break}return document.getElementById("question-scroll").scrollTo(0,0),Pt(!0),Ne.abrupt("return",!1);case 4:if(En=pt.findIndex(function(_t){return!_t}),!(En>-1)){Ne.next=9;break}return document.getElementById("question-scroll").scrollTo(0,250),nt("\u8BF7\u5148\u8F93\u5165 ".concat(xt[En]," \u9009\u9879\u7684\u5185\u5BB9")),Ne.abrupt("return",!1);case 9:if(!Vi(pt)){Ne.next=13;break}return document.getElementById("question-scroll").scrollTo(0,250),nt("\u9009\u9879\u5DF2\u91CD\u590D"),Ne.abrupt("return",!1);case 13:if(A.length){Ne.next=17;break}return document.getElementById("question-scroll").scrollTo(0,250),nt("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),Ne.abrupt("return",!1);case 17:return $t=pt.map(function(_t,Kn){return{choice_text:_t,is_answer:!!A.includes(Kn)}}),Ne.abrupt("return",{subject:Le,question:{cnt:$t.map(function(_t){return _t.choice_text})},choice:{answer:$t.map(function(_t){return _t.is_answer})}});case 19:case"end":return Ne.stop()}},zt)}));return function(){return In.apply(this,arguments)}}(),Tt=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Ni=function(){var In=Object(P.a)(U.a.mark(function zt(En){return U.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:gn.t0=En.id,gn.next=gn.t0==="del"?3:gn.t0==="up"||gn.t0==="down"?5:gn.t0==="edit"?9:11;break;case 3:return Z.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(P.a)(U.a.mark(function _t(){return U.a.wrap(function(ei){for(;;)switch(ei.prev=ei.next){case 0:return ei.next=2,Object(je.m)({id:ft.question_id});case 2:ot({type:"exercise/editExercise",payload:Object($.a)({},vi)});case 3:case"end":return ei.stop()}},_t)}))()}}),gn.abrupt("break",11);case 5:return gn.next=7,ot({type:"exercise/exeriseMoveUpDown",payload:{id:ft.question_id,opr:En.id}});case 7:return ot({type:"exercise/editExercise",payload:Object($.a)({},vi)}),gn.abrupt("break",11);case 9:return Vn(!0),gn.abrupt("break",11);case 11:case"end":return gn.stop()}},zt)}));return function(En){return In.apply(this,arguments)}}(),Ti=function(){var zt;return k.a.createElement("aside",null,k.a.createElement("p",{className:tt.a.titleWrap},k.a.createElement("span",{className:tt.a.required},"*"),k.a.createElement("span",{className:tt.a.title},"\u9898\u5E72\uFF1A")),k.a.createElement(Ae.a,{id:"single-question-title",watch:!0,isFocus:!0,height:155,defaultValue:Le,onChange:function($t){ht($t),Pt(!1)}}),Ft&&k.a.createElement("div",{className:tt.a.error},"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),k.a.createElement("p",{className:tt.a.titleWrap},k.a.createElement("span",{className:tt.a.required},"*"),k.a.createElement("span",{className:tt.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",k.a.createElement("span",{className:tt.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),pt.map(function(En,$t){return k.a.createElement("div",{className:tt.a.choiceWrap,key:$t},k.a.createElement(O.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},k.a.createElement("div",{className:"".concat(tt.a.answer," ").concat(A.includes($t)?tt.a.activeAnswer:""),onClick:function(){nt(""),A.includes($t)?T(A.filter(function(Ne){return Ne!==$t})):T([].concat(Object(y.a)(A),[$t]))}},xt[$t])),k.a.createElement("div",{className:tt.a.editorWrap},H===$t?k.a.createElement(Ae.a,{id:"single-question-option-".concat($t),watch:!0,isFocus:!0,height:155,defaultValue:En,onChange:function(Ne){nt(""),pt[$t]=Ne,Me(pt)}}):k.a.createElement("div",{className:tt.a.htmlWrap,onClick:function(){return K($t)}},k.a.createElement(Fe.a,{value:En}))),$t>1&&k.a.createElement(O.a,{title:"\u5220\u9664"},k.a.createElement("i",{className:"".concat(tt.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){Me(pt.filter(function(Kn,ei){return ei!==$t}));var Ne=A.filter(function(Kn,ei){return Kn!==$t}),_t=Ne.map(function(Kn){return Kn<$t?Kn:Kn-1});T(_t)}})),$t<7&&$t===pt.length-1&&k.a.createElement(O.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},k.a.createElement("i",{className:"".concat(tt.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return Me([].concat(Object(y.a)(pt),[""]))}})))}),Zt&&k.a.createElement("div",{className:"".concat(tt.a.error," mt10")},Zt),k.a.createElement("div",{className:"mt10"},k.a.createElement("span",{className:"c-grey-999"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),k.a.createElement("p",null,"\u6807\u51C6\u7B54\u6848\uFF1A",k.a.createElement("span",{className:"c-light-primary"},A==null||((zt=A.sort(function(En,$t){return En-$t}))===null||zt===void 0)?void 0:zt.map(function(En){return xt[En]})))))};return console.log(A,"activeAnswer"),k.a.createElement("section",{className:tt.a.wrap},Ti())},Je=Object(te.a)(function(dt){var Ke=dt.problemset,We=dt.loading,Ze=dt.globalSetting;return{problemset:Ke,globalSetting:Ze,loading:We.effects}},null,null,{forwardRef:!0})(Object(R.forwardRef)(Qe)),Ue=function(Ke){var We=Ke.visible,Ze=We===void 0?!1:We,Lt=Ke.is_published,gt=Ke.match,ot=Ke.editData,rt=Ke.onOk,Dt=Ke.onCancel,ft=Object(R.useState)([10,20]),wt=Object(_.a)(ft,2),Se=wt[0],It=wt[1],pt=ye.a.useForm(),Me=Object(_.a)(pt,1),Xe=Me[0],J=Object(R.useState)({}),H=Object(_.a)(J,2),K=H[0],C=H[1],E=Object(R.useRef)();Object(R.useEffect)(function(){return document.getElementById("modal-level-question").style.transform="none",function(){document.getElementById("modal-level-question").style.transform="translateX(0)"}},[]),Object(R.useEffect)(function(){Ze&&ot&&(Xe.setFieldsValue(Object($.a)({},ot)),It(A[ot.difficult]))},[Ze]);var A={1:[10,20],2:[30,40,50,60],3:[70,80,90,100]},T=function(ct,Ft){C(Object($.a)({},Ft)),"difficult"in ct&&X(ct.difficult)},ae=function(){var Ct=Object(P.a)(U.a.mark(function ct(){var Ft,Pt,lt;return U.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Pt="",Zt.next=3,E.current.onSave();case 3:if(lt=Zt.sent,lt){Zt.next=6;break}return Zt.abrupt("return",!1);case 6:return(Ft=lt.choice)===null||Ft===void 0||Ft.answer.map(function(nt,mn){nt&&(Pt+=Ee.m[mn])}),Zt.abrupt("return",{challenge_choose:{subject:lt.subject,answer:K.task_pass,standard_answer:Pt,score:K.score,difficult:K.difficult},challenge_tag:K.challenge_tag,question:lt.question,choice:lt.choice});case 8:case"end":return Zt.stop()}},ct)}));return function(){return Ct.apply(this,arguments)}}(),X=function(ct){var Ft=A[ct],Pt=Ft==null?void 0:Ft[0];It(Ft),Xe.setFieldsValue({score:Pt}),C(Object($.a)(Object($.a)({},Xe.getFieldsValue()),{score:Pt}))},Le=function(){var Ct=Object(P.a)(U.a.mark(function ct(Ft){var Pt,lt,an;return U.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return nt.next=2,ae();case 2:if(Pt=nt.sent,Pt){nt.next=5;break}return nt.abrupt("return");case 5:if(!ot){nt.next=25;break}return nt.t0=be.Mb,nt.t1=$.a,nt.t2=$.a,nt.t3=$.a,nt.t4={},nt.next=13,Pt;case 13:return nt.t5=nt.sent,nt.t6=(0,nt.t3)(nt.t4,nt.t5),nt.t7=gt.params,nt.t8=(0,nt.t2)(nt.t6,nt.t7),nt.t9={},nt.t10={questionId:ot.choose_id},nt.t11=(0,nt.t1)(nt.t8,nt.t9,nt.t10),nt.next=22,(0,nt.t0)(nt.t11);case 22:return lt=nt.sent,lt.challenge_choose_id&&(ke.b.success("\u64CD\u4F5C\u6210\u529F"),rt()),nt.abrupt("return");case 25:return nt.t12=be.c,nt.t13=$.a,nt.t14=$.a,nt.t15={},nt.next=31,Pt;case 31:return nt.t16=nt.sent,nt.t17=(0,nt.t14)(nt.t15,nt.t16),nt.t18=gt.params,nt.t19=(0,nt.t13)(nt.t17,nt.t18),nt.next=37,(0,nt.t12)(nt.t19);case 37:an=nt.sent,an.challenge_choose_id&&(ke.b.success("\u64CD\u4F5C\u6210\u529F"),rt());case 39:case"end":return nt.stop()}},ct)}));return function(Ft){return Ct.apply(this,arguments)}}(),ht=function(){var Ct=Object(P.a)(U.a.mark(function ct(){var Ft;return U.a.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return lt.next=2,E.current.onSave();case 2:if(Ft=lt.sent,Ft){lt.next=5;break}return lt.abrupt("return",!1);case 5:Xe.submit();case 6:case"end":return lt.stop()}},ct)}));return function(){return Ct.apply(this,arguments)}}();return k.a.createElement("div",{className:fe.a.modal},k.a.createElement("div",{className:fe.a.main},k.a.createElement("div",{className:fe.a.title},k.a.createElement("span",{className:fe.a.name},ot?"\u7F16\u8F91\u9898\u76EE":"\u6DFB\u52A0\u9898\u76EE"),k.a.createElement("span",{className:fe.a.edit,onClick:Dt}," ",k.a.createElement("i",{className:"iconfont icon-guanbi1"})," ")),k.a.createElement("div",{className:fe.a.body,id:"question-scroll"},k.a.createElement(ye.a,{form:Xe,className:fe.a.form,scrollToFirstError:!0,layout:"vertical",onValuesChange:T,onFinish:Le,initialValues:{difficult:1,score:10}},k.a.createElement(Je,{ref:E,editData:ot}),k.a.createElement(ye.a.Item,{name:"task_pass",label:"\u53C2\u8003\u7B54\u6848:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u53C2\u8003\u7B54\u6848"},{max:35e3,message:"\u53C2\u8003\u7B54\u6848\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},k.a.createElement(Ae.a,{watch:!0,defaultValue:(ot==null?void 0:ot.answer)||""})),k.a.createElement(ye.a.Item,{name:"difficult",label:"\u96BE\u5EA6\u7CFB\u6570:",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6\u7CFB\u6570"}]},k.a.createElement(B.a.Group,{disabled:Lt},k.a.createElement(B.a,{value:1},"\u7B80\u5355"),k.a.createElement(B.a,{style:{marginLeft:80},value:2},"\u4E2D\u7B49"),k.a.createElement(B.a,{style:{marginLeft:80},className:"ml80",value:3},"\u56F0\u96BE"))),k.a.createElement(ge.a,{className:"customAddItemSelect"},k.a.createElement(pe.a,null,k.a.createElement(ye.a.Item,{name:"score",label:"\u5956\u52B1\u91D1\u5E01:",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5956\u52B1\u7ECF\u9A8C\u503C"}]},k.a.createElement(ve.a,{disabled:Lt,bordered:!1},Se.map(function(Ct){return k.a.createElement(ve.a.Option,{key:Ct,value:Ct},Ct)})))),k.a.createElement(pe.a,{style:{paddingTop:65}},k.a.createElement("div",{className:"font12 c-light-black ml10 mt20"},"\u5B66\u5458\u6B63\u786E\u7B54\u9898\u65F6\u83B7\u5F97\u91D1\u5E01\uFF0C\u5E76\u4E14\u83B7\u5F97\u7B49\u91CF\u7684\u7ECF\u9A8C\u503C\u3002\u5982\uFF1A+100\u91D1\u5E01\u3001+100\u7ECF\u9A8C\u503C\u3002"))))),k.a.createElement("div",{className:fe.a.btns},k.a.createElement(He.a,{size:"large",style:{marginRight:20},onClick:Dt},"\u53D6\u6D88"),k.a.createElement(He.a,{size:"large",type:"primary",onClick:ht},"\u4FDD\u5B58"))))},Ve=Ue,oe=p("mepR"),D=p.n(oe),it=p("9ZNV"),kt=p("nuEh"),Ut=p("UqFu"),mt=p("lzim"),At=p("xKgJ"),Te=se.a.TabPane,Ye=function(Ke){var We,Ze,Lt=Ke.shixunsDetail,gt=Ke.practiceSetting,ot=Ke.dispatch,rt=Ke.match,Dt=Ke.location,ft=Object(V.a)(Ke,["shixunsDetail","practiceSetting","dispatch","match","location"]),wt=ye.a.useForm(),Se=Object(_.a)(wt,1),It=Se[0],pt=Object(R.useState)({}),Me=Object(_.a)(pt,2),Xe=Me[0],J=Me[1],H=Object(R.useState)([]),K=Object(_.a)(H,2),C=K[0],E=K[1],A=Object(R.useState)(!0),T=Object(_.a)(A,2),ae=T[0],X=T[1],Le=Object(R.useState)(!0),ht=Object(_.a)(Le,2),Ct=ht[0],ct=ht[1],Ft=Object(R.useState)(!1),Pt=Object(_.a)(Ft,2),lt=Pt[0],an=Pt[1],Zt=Object(R.useState)(null),nt=Object(_.a)(Zt,2),mn=nt[0],Qt=nt[1],ui=Object(R.useState)(null),gi=Object(_.a)(ui,2),Wt=gi[0],Ei=gi[1],Gn=Object(R.useState)("1"),Vn=Object(_.a)(Gn,2),vi=Vn[0],Ii=Vn[1],Vi=Object(R.useState)(1),un=Object(_.a)(Vi,2),Tt=un[0],Ni=un[1],Ti=Object(R.useRef)({subject:"",task_pass:""}),In=Object(R.useRef)(null),zt=gt.is_published,En=gt.id,$t=Lt.challengesEdit,gn=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];Object(R.useEffect)(function(){var Et;return Dt!=null&&(Et=Dt.query)!==null&&Et!==void 0&&Et.tab&&Ii(Dt.query.tab),Kn(),ei(),function(){clearTimeout(In.current)}},[Dt.pathname]);var Ne=function(){clearTimeout(In.current),In.current=setTimeout(function(){var St=It.getFieldsValue(),Rt=St.subject,tn=St.task_pass;Ti.current.subject!==""&&(Rt!==Ti.current.subject||tn!==Ti.current.task_pass?ot({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!0}}):ot({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}}))},500)},_t=function(St,Rt){J(Object($.a)({},Rt)),Ne()},Kn=function(){var Et=Object(P.a)(U.a.mark(function St(){var Rt;return U.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return ct(!0),vn.next=3,ot({type:"shixunsDetail/getChallengesEdit",payload:Object($.a)({},rt.params)});case 3:Rt=vn.sent,Ei(Object($.a)({},Rt)),Ti.current={subject:Rt.subject,task_pass:Object(Ut.a)(Rt.task_pass),unity_3d_routes:Rt.unity_3d_routes},J(Object($.a)({},Ti.current)),It.setFieldsValue(Object($.a)({},Rt)),ct(!1);case 9:case"end":return vn.stop()}},St)}));return function(){return Et.apply(this,arguments)}}(),ei=function(){var Et=Object(P.a)(U.a.mark(function St(){var Rt;return U.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return X(!0),vn.next=3,Object(be.ab)(Object($.a)({},rt.params));case 3:Rt=vn.sent,E(Rt.data),X(!1);case 6:case"end":return vn.stop()}},St)}));return function(){return Et.apply(this,arguments)}}(),ro=function(){var Et=Object(P.a)(U.a.mark(function St(Rt){var tn,vn,qt;return U.a.wrap(function(ci){for(;;)switch(ci.prev=ci.next){case 0:return tn=!(!Rt.unity_3d_routes||Rt.unity_3d_routes==""),vn=Object($.a)(Object($.a)(Object($.a)({},Rt),rt.params),{},{unity_3d_routes:tn?Rt.unity_3d_routes:null,unity_3d:tn}),ci.next=4,Object(be.Lb)(vn);case 4:qt=ci.sent,qt.status===0&&(ke.b.success(qt.message),ot({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}}),ot({type:"practiceSetting/setUpdateIndex"}),Ii("2"),z());case 6:case"end":return ci.stop()}},St)}));return function(Rt){return Et.apply(this,arguments)}}(),ao=function(){return vi==="1"?null:k.a.createElement("span",{className:D.a.addBtn,onClick:function(){return an(!0)}},k.a.createElement("i",{className:"iconfont icon-tianjiatimu"}),"\u6DFB\u52A0\u9898\u76EE")},d=function(St){var Rt,tn=function(){Ii(St),z(),ot({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};gt!=null&&(Rt=gt.sideBar)!==null&&Rt!==void 0&&Rt.confirmLeave?Z.a.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:function(){tn()}}):tn()},r=function(St){var Rt=function(){var tn=Object(P.a)(U.a.mark(function vn(){var qt;return U.a.wrap(function(ci){for(;;)switch(ci.prev=ci.next){case 0:return ci.next=2,Object(be.v)(Object($.a)(Object($.a)({},rt.params),{},{questionId:St}));case 2:qt=ci.sent,qt.challenge_id&&(ei(),ke.b.success("\u5220\u9664\u6210\u529F"));case 4:case"end":return ci.stop()}},vn)}));return function(){return tn.apply(this,arguments)}}();Z.a.confirm({title:"\u63D0\u793A",content:"\u662F\u5426\u5220\u9664\u9898\u76EE!",centered:!0,onOk:Rt})},a=function(){var Et=Object(P.a)(U.a.mark(function St(Rt){var tn;return U.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Object(be.Hb)(Object($.a)(Object($.a)({},rt.params),{},{questionId:Rt}));case 2:tn=qt.sent,tn.status===0&&ei();case 4:case"end":return qt.stop()}},St)}));return function(Rt){return Et.apply(this,arguments)}}(),u=function(){var Et=Object(P.a)(U.a.mark(function St(Rt){var tn;return U.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Object(be.B)(Object($.a)(Object($.a)({},rt.params),{},{questionId:Rt}));case 2:tn=qt.sent,tn.status===0&&ei();case 4:case"end":return qt.stop()}},St)}));return function(Rt){return Et.apply(this,arguments)}}(),h=function(){var Et=Object(P.a)(U.a.mark(function St(Rt){var tn;return U.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Object(be.P)(Object($.a)(Object($.a)({},rt.params),{},{questionId:Rt}));case 2:tn=qt.sent,Qt(Object($.a)(Object($.a)({},tn),{},{choose_id:Rt})),an(!0);case 5:case"end":return qt.stop()}},St)}));return function(Rt){return Et.apply(this,arguments)}}(),c=function(){_e()},z=function(){Ni(Tt+1),Kn()},_e=function(){var St,Rt=function(){te.d.push("/shixuns/".concat(En,"/challenges")),ot({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};gt!=null&&(St=gt.sideBar)!==null&&St!==void 0&&St.confirmLeave?Z.a.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:function(){Rt()}}):Rt()},ut=function(){return C.map(function(St,Rt){var tn=St.challenge_choose_id,vn=St.subject,qt=St.choose_contents,Pi=St.standard_answer,ci=St.answer,xi=St.score,Ui=St.category;return k.a.createElement("div",{key:tn,className:D.a.list},k.a.createElement("div",{className:D.a.top},k.a.createElement("div",{className:D.a.left},k.a.createElement("div",{className:D.a.title},k.a.createElement("div",{className:D.a.fs},Rt+1,". "),k.a.createElement(Fe.a,{value:vn})),qt.map(function(ti,so){return k.a.createElement("ul",{key:so,className:ti.right_key?D.a.qsActive:D.a.qs},k.a.createElement("li",null,gn[ti.position]),k.a.createElement("li",null,k.a.createElement(Fe.a,{value:ti.option_name})))})),k.a.createElement("div",{className:D.a.right},k.a.createElement("i",{onClick:function(){return h(tn)},className:"iconfont icon-xiaoxiugai"}),k.a.createElement("i",{onClick:function(){return r(tn)},className:"iconfont icon-shanchu23"}),Rt!==C.length-1&&k.a.createElement("i",{onClick:function(){return u(tn)},className:"iconfont icon-xiayi2"}),Rt!==0&&k.a.createElement("i",{onClick:function(){return a(tn)},className:"iconfont icon-shangyi2"}))),k.a.createElement("div",{className:D.a.bt},"\u9898\u578B\uFF1A",Ui===1?"\u5355\u9009\u9898":"\u591A\u9009\u9898","\xA0\xA0\xA0\xA0\u5956\u52B1\u91D1\u5E01\uFF1A",xi),k.a.createElement("div",{className:D.a.answer},k.a.createElement("p",null,"\u6807\u51C6\u7B54\u6848\uFF1A",Pi),k.a.createElement("p",null,k.a.createElement("div",{className:D.a.fs},"\u53C2\u8003\u7B54\u6848\uFF1A"),k.a.createElement(Fe.a,{value:ci}))))})},Mt=function(){an(!1),Qt(null),ei()},ze=function(){an(!1),Qt(null)};return k.a.createElement("section",{className:D.a.bg,style:{marginBottom:vi==="1"?67:0}},k.a.createElement(se.a,{activeKey:vi,onChange:d,tabBarExtraContent:ao()},k.a.createElement(Te,{tab:"\u672C\u5173\u4EFB\u52A1",key:"1"},k.a.createElement(ye.a,{key:Tt,form:It,scrollToFirstError:!0,className:D.a.formWrap,layout:"vertical",onValuesChange:_t,onFinish:ro},k.a.createElement("div",{className:D.a.fieldWrap},k.a.createElement(ye.a.Item,{initialValue:"",name:"subject",label:"\u4EFB\u52A1\u540D\u79F0:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},k.a.createElement(xe.a,{bordered:!1,maxLength:60,suffix:"".concat(((We=Xe.subject)===null||We===void 0?void 0:We.length)||0,"/60"),placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),k.a.createElement("div",{className:D.a.mdWrap},k.a.createElement(ye.a.Item,{name:"task_pass",label:"\u4EFB\u52A1\u8981\u6C42:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:35e3,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},k.a.createElement(Ae.a,{key:rt.params.challengesId||"3",watch:!0,defaultValue:$t.task_pass}))),k.a.createElement(ye.a.Item,{noStyle:!0},k.a.createElement(it.a,{okButtonProps:{htmlType:"submit"},className:"customFixedButton",onCancel:c})),Object(At.o)()&&k.a.createElement("div",{className:D.a.fieldWrap},k.a.createElement(ye.a.Item,{initialValue:"",name:"unity_3d_routes",label:"\u5D4C\u5165\u7B2C\u4E09\u65B9\u5E73\u53F0:"},k.a.createElement(xe.a,{bordered:!1,maxLength:60,suffix:"".concat(((Ze=Xe.unity_3d_routes)===null||Ze===void 0?void 0:Ze.length)||0,"/60"),placeholder:"\u8BF7\u8F93\u5165\u7B2C\u4E09\u65B9\u5E73\u53F0\u5730\u5740"}))))),k.a.createElement(Te,{tab:"\u9898\u76EE",key:"2"},!!C.length&&ut(),!C.length&&k.a.createElement("div",{className:D.a.empty},k.a.createElement("img",{src:mt.l,width:"258"}),k.a.createElement("span",{className:"c-grey-c"},"\u8BF7\u70B9\u51FB\u53F3\u4E0A\u89D2\u6DFB\u52A0\u9898\u76EE\u6309\u94AE\u8FDB\u884C\u9898\u76EE\u7684\u521B\u5EFA! ")))),lt&&k.a.createElement(Ve,{is_published:zt,visible:lt,onCancel:ze,onOk:Mt,match:rt,editData:mn}),k.a.createElement(kt.a,{loading:Ct}))},at=we.default=Object(te.a)(function(dt){var Ke=dt.shixunsDetail,We=dt.newCourse,Ze=dt.globalSetting,Lt=dt.practiceSetting;return{shixunsDetail:Ke,newCourse:We,globalSetting:Ze,practiceSetting:Lt}})(Ye)},UqFu:function(Pe,we,p){"use strict";p.d(we,"a",function(){return W});var W=function(me){var Z=document.createElement("textarea");return Z.value=me,Z.value}},"VrN/":function(Pe,we,p){(function(W,xe){Pe.exports=xe()})(this,function(){"use strict";var W=navigator.userAgent,xe=navigator.platform,me=/gecko\/\d/i.test(W),Z=/MSIE \d/.test(W),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(W),ke=/Edge\/(\d+)/.exec(W),P=Z||x||ke,$=P&&(Z?document.documentMode||6:+(ke||x)[1]),ce=!ke&&/WebKit\//.test(W),ye=ce&&/Qt\/\d+\.\d+/.test(W),_=!ke&&/Chrome\//.test(W),V=/Opera\//.test(W),Ce=/Apple Computer/.test(navigator.vendor),se=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(W),ee=/PhantomJS/.test(W),U=!ke&&/AppleWebKit/.test(W)&&/Mobile\/\w+/.test(W),R=/Android/.test(W),k=U||R||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(W),te=U||/Mac/.test(xe),Ae=/\bCrOS\b/.test(W),Fe=/win/i.test(xe),be=V&&W.match(/Version\/(\d*\.\d*)/);be&&(be=Number(be[1])),be&&be>=15&&(V=!1,ce=!0);var he=te&&(ye||V&&(be==null||be<12.11)),He=me||P&&$>=9;function ue(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var ge=function(e,t){var i=e.className,n=ue(t).exec(i);if(n){var o=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(o?n[1]+o:"")}};function Ie(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function pe(e,t){return Ie(e).appendChild(t)}function M(e,t,i,n){var o=document.createElement(e);if(i&&(o.className=i),n&&(o.style.cssText=n),typeof t=="string")o.appendChild(document.createTextNode(t));else if(t)for(var s=0;s<t.length;++s)o.appendChild(t[s]);return o}function ve(e,t,i,n){var o=M(e,t,i,n);return o.setAttribute("role","presentation"),o}var re;document.createRange?re=function(e,t,i,n){var o=document.createRange();return o.setEnd(n||e,i),o.setStart(e,t),o}:re=function(e,t,i){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(o){return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",t),n};function B(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 Ee(){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 Re(e,t){var i=e.className;ue(t).test(i)||(e.className+=(i?" ":"")+t)}function fe(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!ue(i[n]).test(t)&&(t+=" "+i[n]);return t}var et=function(e){e.select()};U?et=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:P&&(et=function(e){try{e.select()}catch(t){}});function O(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function y(e,t,i){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(i!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function le(e,t,i,n,o){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var s=n||0,l=o||0;;){var f=e.indexOf(" ",s);if(f<0||f>=t)return l+(t-s);l+=f-s,l+=i-l%i,s=f+1}}var je=function(){this.id=null,this.f=null,this.time=0,this.handler=O(this.onTimeout,this)};je.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},je.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function Be(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var tt=50,xt={toString:function(){return"CodeMirror.Pass"}},Qe={scroll:!1},Je={origin:"*mouse"},Ue={origin:"+move"};function Ve(e,t,i){for(var n=0,o=0;;){var s=e.indexOf(" ",n);s==-1&&(s=e.length);var l=s-n;if(s==e.length||o+l>=t)return n+Math.min(l,t-o);if(o+=s-n,o+=i-o%i,n=s+1,o>=t)return n}}var oe=[""];function D(e){for(;oe.length<=e;)oe.push(it(oe)+" ");return oe[e]}function it(e){return e[e.length-1]}function kt(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function Ut(e,t,i){for(var n=0,o=i(t);n<e.length&&i(e[n])<=o;)n++;e.splice(n,0,t)}function mt(){}function At(e,t){var i;return Object.create?i=Object.create(e):(mt.prototype=e,i=new mt),t&&y(t,i),i}var Te=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ye(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Te.test(e))}function at(e,t){return t?t.source.indexOf("\\w")>-1&&Ye(e)?!0:t.test(e):Ye(e)}function dt(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ke=/[\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 We(e){return e.charCodeAt(0)>=768&&Ke.test(e)}function Ze(e,t,i){for(;(i<0?t>0:t<e.length)&&We(e.charAt(t));)t+=i;return t}function Lt(e,t,i){for(var n=t>i?-1:1;;){if(t==i)return t;var o=(t+i)/2,s=n<0?Math.ceil(o):Math.floor(o);if(s==t)return e(s)?t:i;e(s)?i=s:t=s+n}}function gt(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var o=!1,s=0;s<e.length;++s){var l=e[s];(l.from<i&&l.to>t||t==i&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,i),l.level==1?"rtl":"ltr",s),o=!0)}o||n(t,i,"ltr")}var ot=null;function rt(e,t,i){var n;ot=null;for(var o=0;o<e.length;++o){var s=e[o];if(s.from<t&&s.to>t)return o;s.to==t&&(s.from!=s.to&&i=="before"?n=o:ot=o),s.from==t&&(s.from!=s.to&&i!="before"?n=o:ot=o)}return n!=null?n:ot}var Dt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(v){return v<=247?e.charAt(v):1424<=v&&v<=1524?"R":1536<=v&&v<=1785?t.charAt(v-1536):1774<=v&&v<=2220?"r":8192<=v&&v<=8203?"w":v==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,l=/[Lb1n]/,f=/[1n]/;function m(v,I,F){this.level=v,this.from=I,this.to=F}return function(v,I){var F=I=="ltr"?"L":"R";if(v.length==0||I=="ltr"&&!n.test(v))return!1;for(var de=v.length,ne=[],De=0;De<de;++De)ne.push(i(v.charCodeAt(De)));for(var Ge=0,st=F;Ge<de;++Ge){var yt=ne[Ge];yt=="m"?ne[Ge]=st:st=yt}for(var Ot=0,bt=F;Ot<de;++Ot){var Nt=ne[Ot];Nt=="1"&&bt=="r"?ne[Ot]="n":s.test(Nt)&&(bt=Nt,Nt=="r"&&(ne[Ot]="R"))}for(var Xt=1,Gt=ne[0];Xt<de-1;++Xt){var dn=ne[Xt];dn=="+"&&Gt=="1"&&ne[Xt+1]=="1"?ne[Xt]="1":dn==","&&Gt==ne[Xt+1]&&(Gt=="1"||Gt=="n")&&(ne[Xt]=Gt),Gt=dn}for(var Hn=0;Hn<de;++Hn){var Di=ne[Hn];if(Di==",")ne[Hn]="N";else if(Di=="%"){var ri=void 0;for(ri=Hn+1;ri<de&&ne[ri]=="%";++ri);for(var oo=Hn&&ne[Hn-1]=="!"||ri<de&&ne[ri]=="1"?"1":"N",$i=Hn;$i<ri;++$i)ne[$i]=oo;Hn=ri-1}}for(var bi=0,eo=F;bi<de;++bi){var Bi=ne[bi];eo=="L"&&Bi=="1"?ne[bi]="L":s.test(Bi)&&(eo=Bi)}for(var Oi=0;Oi<de;++Oi)if(o.test(ne[Oi])){var Ci=void 0;for(Ci=Oi+1;Ci<de&&o.test(ne[Ci]);++Ci);for(var li=(Oi?ne[Oi-1]:F)=="L",to=(Ci<de?ne[Ci]:F)=="L",Ur=li==to?li?"L":"R":F,ar=Oi;ar<Ci;++ar)ne[ar]=Ur;Oi=Ci-1}for(var Hi=[],Po,Li=0;Li<de;)if(l.test(ne[Li])){var ps=Li;for(++Li;Li<de&&l.test(ne[Li]);++Li);Hi.push(new m(0,ps,Li))}else{var Vo=Li,gr=Hi.length,vr=I=="rtl"?1:0;for(++Li;Li<de&&ne[Li]!="L";++Li);for(var Yi=Vo;Yi<Li;)if(f.test(ne[Yi])){Vo<Yi&&(Hi.splice(gr,0,new m(1,Vo,Yi)),gr+=vr);var Fr=Yi;for(++Yi;Yi<Li&&f.test(ne[Yi]);++Yi);Hi.splice(gr,0,new m(2,Fr,Yi)),gr+=vr,Vo=Yi}else++Yi;Vo<Li&&Hi.splice(gr,0,new m(1,Vo,Li))}return I=="ltr"&&(Hi[0].level==1&&(Po=v.match(/^\s+/))&&(Hi[0].from=Po[0].length,Hi.unshift(new m(0,0,Po[0].length))),it(Hi).level==1&&(Po=v.match(/\s+$/))&&(it(Hi).to-=Po[0].length,Hi.push(new m(0,de-Po[0].length,de)))),I=="rtl"?Hi.reverse():Hi}}();function ft(e,t){var i=e.order;return i==null&&(i=e.order=Dt(e.text,t)),i}var wt=[],Se=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||wt).concat(i)}};function It(e,t){return e._handlers&&e._handlers[t]||wt}function pt(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var n=e._handlers,o=n&&n[t];if(o){var s=Be(o,i);s>-1&&(n[t]=o.slice(0,s).concat(o.slice(s+1)))}}}function Me(e,t){var i=It(e,t);if(!i.length)return;for(var n=Array.prototype.slice.call(arguments,2),o=0;o<i.length;++o)i[o].apply(null,n)}function Xe(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Me(e,i||t.type,e,t),A(t)||t.codemirrorIgnore}function J(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)Be(i,t[n])==-1&&i.push(t[n])}function H(e,t){return It(e,t).length>0}function K(e){e.prototype.on=function(t,i){Se(this,t,i)},e.prototype.off=function(t,i){pt(this,t,i)}}function C(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function E(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function A(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function T(e){C(e),E(e)}function ae(e){return e.target||e.srcElement}function X(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),te&&e.ctrlKey&&t==1&&(t=3),t}var Le=function(){if(P&&$<9)return!1;var e=M("div");return"draggable"in e||"dragDrop"in e}(),ht;function Ct(e){if(ht==null){var t=M("span","\u200B");pe(e,M("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ht=t.offsetWidth<=1&&t.offsetHeight>2&&!(P&&$<8))}var i=ht?M("span","\u200B"):M("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var ct;function Ft(e){if(ct!=null)return ct;var t=pe(e,document.createTextNode("A\u062EA")),i=re(t,0,1).getBoundingClientRect(),n=re(t,1,2).getBoundingClientRect();return Ie(e),!i||i.left==i.right?!1:ct=n.right-i.right<3}var Pt=`
b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],n=e.length;t<=n;){var o=e.indexOf(`
`,t);o==-1&&(o=e.length);var s=e.slice(t,e.charAt(o-1)=="\r"?o-1:o),l=s.indexOf("\r");l!=-1?(i.push(s.slice(0,l)),t+=l+1):(i.push(s),t=o+1)}return i}:function(e){return e.split(/\r\n?|\n/)},lt=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(i){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},an=function(){var e=M("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Zt=null;function nt(e){if(Zt!=null)return Zt;var t=pe(e,M("span","x")),i=t.getBoundingClientRect(),n=re(t,0,1).getBoundingClientRect();return Zt=Math.abs(i.left-n.left)>1}var mn={},Qt={};function ui(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),mn[e]=t}function gi(e,t){Qt[e]=t}function Wt(e){if(typeof e=="string"&&Qt.hasOwnProperty(e))e=Qt[e];else if(e&&typeof e.name=="string"&&Qt.hasOwnProperty(e.name)){var t=Qt[e.name];typeof t=="string"&&(t={name:t}),e=At(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Wt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Wt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Ei(e,t){t=Wt(t);var i=mn[t.name];if(!i)return Ei(e,"text/plain");var n=i(e,t);if(Gn.hasOwnProperty(t.name)){var o=Gn[t.name];for(var s in o){if(!o.hasOwnProperty(s))continue;n.hasOwnProperty(s)&&(n["_"+s]=n[s]),n[s]=o[s]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Gn={};function Vn(e,t){var i=Gn.hasOwnProperty(e)?Gn[e]:Gn[e]={};y(t,i)}function vi(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var n in t){var o=t[n];o instanceof Array&&(o=o.concat([])),i[n]=o}return i}function Ii(e,t){for(var i;e.innerMode&&!(i=e.innerMode(t),!i||i.mode==e);)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Vi(e,t,i){return e.startState?e.startState(t,i):!0}var un=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};un.prototype.eol=function(){return this.pos>=this.string.length},un.prototype.sol=function(){return this.pos==this.lineStart},un.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},un.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},un.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},un.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},un.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},un.prototype.skipToEnd=function(){this.pos=this.string.length},un.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},un.prototype.backUp=function(e){this.pos-=e},un.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=le(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?le(this.string,this.lineStart,this.tabSize):0)},un.prototype.indentation=function(){return le(this.string,null,this.tabSize)-(this.lineStart?le(this.string,this.lineStart,this.tabSize):0)},un.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(l){return i?l.toLowerCase():l},o=this.string.substr(this.pos,e.length);if(n(o)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}},un.prototype.current=function(){return this.string.slice(this.start,this.pos)},un.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},un.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},un.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Tt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var n=0;;++n){var o=i.children[n],s=o.chunkSize();if(t<s){i=o;break}t-=s}return i.lines[t]}function Ni(e,t,i){var n=[],o=t.line;return e.iter(t.line,i.line+1,function(s){var l=s.text;o==i.line&&(l=l.slice(0,i.ch)),o==t.line&&(l=l.slice(t.ch)),n.push(l),++o}),n}function Ti(e,t,i){var n=[];return e.iter(t,i,function(o){n.push(o.text)}),n}function In(e,t){var i=t-e.height;if(i)for(var n=e;n;n=n.parent)n.height+=i}function zt(e){if(e.parent==null)return null;for(var t=e.parent,i=Be(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var o=0;!(n.children[o]==t);++o)i+=n.children[o].chunkSize();return i+t.first}function En(e,t){var i=e.first;e:do{for(var n=0;n<e.children.length;++n){var o=e.children[n],s=o.height;if(t<s){e=o;continue e}t-=s,i+=o.chunkSize()}return i}while(!e.lines);for(var l=0;l<e.lines.length;++l){var f=e.lines[l],m=f.height;if(t<m)break;t-=m}return i+l}function $t(e,t){return t>=e.first&&t<e.first+e.size}function gn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Ne(e,t,i){if(i===void 0&&(i=null),!(this instanceof Ne))return new Ne(e,t,i);this.line=e,this.ch=t,this.sticky=i}function _t(e,t){return e.line-t.line||e.ch-t.ch}function Kn(e,t){return e.sticky==t.sticky&&_t(e,t)==0}function ei(e){return Ne(e.line,e.ch)}function ro(e,t){return _t(e,t)<0?t:e}function ao(e,t){return _t(e,t)<0?e:t}function d(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function r(e,t){if(t.line<e.first)return Ne(e.first,0);var i=e.first+e.size-1;return t.line>i?Ne(i,Tt(e,i).text.length):a(t,Tt(e,t.line).text.length)}function a(e,t){var i=e.ch;return i==null||i>t?Ne(e.line,t):i<0?Ne(e.line,0):e}function u(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=r(e,t[n]);return i}var h=function(e,t){this.state=e,this.lookAhead=t},c=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};c.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},c.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}},c.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},c.fromSaved=function(e,t,i){return t instanceof h?new c(e,vi(e.mode,t.state),i,t.lookAhead):new c(e,vi(e.mode,t),i)},c.prototype.save=function(e){var t=e!==!1?vi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new h(t,this.maxLookAhead):t};function z(e,t,i,n){var o=[e.state.modeGen],s={};vn(e,t.text,e.doc.mode,i,function(v,I){return o.push(v,I)},s,n);for(var l=i.state,f=function(v){i.baseTokens=o;var I=e.state.overlays[v],F=1,de=0;i.state=!0,vn(e,t.text,I.mode,i,function(ne,De){for(var Ge=F;de<ne;){var st=o[F];st>ne&&o.splice(F,1,ne,o[F+1],st),F+=2,de=Math.min(ne,st)}if(!De)return;if(I.opaque)o.splice(Ge,F-Ge,ne,"overlay "+De),F=Ge+2;else for(;Ge<F;Ge+=2){var yt=o[Ge+1];o[Ge+1]=(yt?yt+" ":"")+"overlay "+De}},s),i.state=l,i.baseTokens=null,i.baseTokenPos=1},m=0;m<e.state.overlays.length;++m)f(m);return{styles:o,classes:s.bgClass||s.textClass?s:null}}function _e(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=ut(e,zt(t)),o=t.text.length>e.options.maxHighlightLength&&vi(e.doc.mode,n.state),s=z(e,t,n);o&&(n.state=o),t.stateAfter=n.save(!o),t.styles=s.styles,s.classes?t.styleClasses=s.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ut(e,t,i){var n=e.doc,o=e.display;if(!n.mode.startState)return new c(n,!0,t);var s=qt(e,t,i),l=s>n.first&&Tt(n,s-1).stateAfter,f=l?c.fromSaved(n,l,s):new c(n,Vi(n.mode),s);return n.iter(s,t,function(m){Mt(e,m.text,f);var v=f.line;m.stateAfter=v==t-1||v%5==0||v>=o.viewFrom&&v<o.viewTo?f.save():null,f.nextLine()}),i&&(n.modeFrontier=f.line),f}function Mt(e,t,i,n){var o=e.doc.mode,s=new un(t,e.options.tabSize,i);for(s.start=s.pos=n||0,t==""&&ze(o,i.state);!s.eol();)Et(o,s,i.state),s.start=s.pos}function ze(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var i=Ii(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}function Et(e,t,i,n){for(var o=0;o<10;o++){n&&(n[0]=Ii(e,i).mode);var s=e.token(t,i);if(t.pos>t.start)return s}throw new Error("Mode "+e.name+" failed to advance stream.")}var St=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function Rt(e,t,i,n){var o=e.doc,s=o.mode,l;t=r(o,t);var f=Tt(o,t.line),m=ut(e,t.line,i),v=new un(f.text,e.options.tabSize,m),I;for(n&&(I=[]);(n||v.pos<t.ch)&&!v.eol();)v.start=v.pos,l=Et(s,v,m.state),n&&I.push(new St(v,l,vi(o.mode,m.state)));return n?I:new St(v,l,m.state)}function tn(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";t[n]==null?t[n]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+i[2])}return e}function vn(e,t,i,n,o,s,l){var f=i.flattenSpans;f==null&&(f=e.options.flattenSpans);var m=0,v=null,I=new un(t,e.options.tabSize,n),F,de=e.options.addModeClass&&[null];for(t==""&&tn(ze(i,n.state),s);!I.eol();){if(I.pos>e.options.maxHighlightLength?(f=!1,l&&Mt(e,t,n,I.pos),I.pos=t.length,F=null):F=tn(Et(i,I,n.state,de),s),de){var ne=de[0].name;ne&&(F="m-"+(F?ne+" "+F:ne))}if(!f||v!=F){for(;m<I.start;)m=Math.min(I.start,m+5e3),o(m,v);v=F}I.start=I.pos}for(;m<I.pos;){var De=Math.min(I.pos,m+5e3);o(De,v),m=De}}function qt(e,t,i){for(var n,o,s=e.doc,l=i?-1:t-(e.doc.mode.innerMode?1e3:100),f=t;f>l;--f){if(f<=s.first)return s.first;var m=Tt(s,f-1),v=m.stateAfter;if(v&&(!i||f+(v instanceof h?v.lookAhead:0)<=s.modeFrontier))return f;var I=le(m.text,null,e.options.tabSize);(o==null||n>I)&&(o=f-1,n=I)}return o}function Pi(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var i=e.first,n=t-1;n>i;n--){var o=Tt(e,n).stateAfter;if(o&&(!(o instanceof h)||n+o.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}var ci=!1,xi=!1;function Ui(){ci=!0}function ti(){xi=!0}function so(e,t,i){this.marker=e,this.from=t,this.to=i}function Zi(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function bo(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function vo(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function sr(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var s=e[o],l=s.marker,f=s.from==null||(l.inclusiveLeft?s.from<=t:s.from<t);if(f||s.from==t&&l.type=="bookmark"&&(!i||!s.marker.insertLeft)){var m=s.to==null||(l.inclusiveRight?s.to>=t:s.to>t);(n||(n=[])).push(new so(l,s.from,m?null:s.to))}}return n}function Go(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var s=e[o],l=s.marker,f=s.to==null||(l.inclusiveRight?s.to>=t:s.to>t);if(f||s.from==t&&l.type=="bookmark"&&(!i||s.marker.insertLeft)){var m=s.from==null||(l.inclusiveLeft?s.from<=t:s.from<t);(n||(n=[])).push(new so(l,m?null:s.from-t,s.to==null?null:s.to-t))}}return n}function lo(e,t){if(t.full)return null;var i=$t(e,t.from.line)&&Tt(e,t.from.line).markedSpans,n=$t(e,t.to.line)&&Tt(e,t.to.line).markedSpans;if(!i&&!n)return null;var o=t.from.ch,s=t.to.ch,l=_t(t.from,t.to)==0,f=sr(i,o,l),m=Go(n,s,l),v=t.text.length==1,I=it(t.text).length+(v?o:0);if(f)for(var F=0;F<f.length;++F){var de=f[F];if(de.to==null){var ne=Zi(m,de.marker);ne?v&&(de.to=ne.to==null?null:ne.to+I):de.to=o}}if(m)for(var De=0;De<m.length;++De){var Ge=m[De];if(Ge.to!=null&&(Ge.to+=I),Ge.from==null){var st=Zi(f,Ge.marker);st||(Ge.from=I,v&&(f||(f=[])).push(Ge))}else Ge.from+=I,v&&(f||(f=[])).push(Ge)}f&&(f=di(f)),m&&m!=f&&(m=di(m));var yt=[f];if(!v){var Ot=t.text.length-2,bt;if(Ot>0&&f)for(var Nt=0;Nt<f.length;++Nt)f[Nt].to==null&&(bt||(bt=[])).push(new so(f[Nt].marker,null,null));for(var Xt=0;Xt<Ot;++Xt)yt.push(bt);yt.push(m)}return yt}function di(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function ko(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(ne){if(ne.markedSpans)for(var De=0;De<ne.markedSpans.length;++De){var Ge=ne.markedSpans[De].marker;Ge.readOnly&&(!n||Be(n,Ge)==-1)&&(n||(n=[])).push(Ge)}}),!n)return null;for(var o=[{from:t,to:i}],s=0;s<n.length;++s)for(var l=n[s],f=l.find(0),m=0;m<o.length;++m){var v=o[m];if(_t(v.to,f.from)<0||_t(v.from,f.to)>0)continue;var I=[m,1],F=_t(v.from,f.from),de=_t(v.to,f.to);(F<0||!l.inclusiveLeft&&!F)&&I.push({from:v.from,to:f.from}),(de>0||!l.inclusiveRight&&!de)&&I.push({from:f.to,to:v.to}),o.splice.apply(o,I),m+=I.length-3}return o}function _o(e){var t=e.markedSpans;if(!t)return;for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}function yr(e,t){if(!t)return;for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}function Qn(e){return e.inclusiveLeft?-1:0}function Mn(e){return e.inclusiveRight?1:0}function ni(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),o=t.find(),s=_t(n.from,o.from)||Qn(e)-Qn(t);if(s)return-s;var l=_t(n.to,o.to)||Mn(e)-Mn(t);return l||t.id-e.id}function xn(e,t){var i=xi&&e.markedSpans,n;if(i)for(var o=void 0,s=0;s<i.length;++s)o=i[s],o.marker.collapsed&&(t?o.from:o.to)==null&&(!n||ni(n,o.marker)<0)&&(n=o.marker);return n}function ii(e){return xn(e,!0)}function Rn(e){return xn(e,!1)}function uo(e,t){var i=xi&&e.markedSpans,n;if(i)for(var o=0;o<i.length;++o){var s=i[o];s.marker.collapsed&&(s.from==null||s.from<t)&&(s.to==null||s.to>t)&&(!n||ni(n,s.marker)<0)&&(n=s.marker)}return n}function oi(e,t,i,n,o){var s=Tt(e,t),l=xi&&s.markedSpans;if(l)for(var f=0;f<l.length;++f){var m=l[f];if(!m.marker.collapsed)continue;var v=m.marker.find(0),I=_t(v.from,i)||Qn(m.marker)-Qn(o),F=_t(v.to,n)||Mn(m.marker)-Mn(o);if(I>=0&&F<=0||I<=0&&F>=0)continue;if(I<=0&&(m.marker.inclusiveRight&&o.inclusiveLeft?_t(v.to,i)>=0:_t(v.to,i)>0)||I>=0&&(m.marker.inclusiveRight&&o.inclusiveLeft?_t(v.from,n)<=0:_t(v.from,n)<0))return!0}}function _i(e){for(var t;t=ii(e);)e=t.find(-1,!0).line;return e}function Ko(e){for(var t;t=Rn(e);)e=t.find(1,!0).line;return e}function Qo(e){for(var t,i;t=Rn(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function co(e,t){var i=Tt(e,t),n=_i(i);return i==n?t:zt(n)}function Co(e,t){if(t>e.lastLine())return t;var i=Tt(e,t),n;if(!Ri(e,i))return t;for(;n=Rn(i);)i=n.find(1,!0).line;return zt(i)+1}function Ri(e,t){var i=xi&&t.markedSpans;if(i)for(var n=void 0,o=0;o<i.length;++o){if(n=i[o],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&lr(e,t,n))return!0}}function lr(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return lr(e,n.line,Zi(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var o=void 0,s=0;s<t.markedSpans.length;++s)if(o=t.markedSpans[s],o.marker.collapsed&&!o.marker.widgetNode&&o.from==i.to&&(o.to==null||o.to!=i.from)&&(o.marker.inclusiveLeft||i.marker.inclusiveRight)&&lr(e,t,o))return!0}function no(e){e=_i(e);for(var t=0,i=e.parent,n=0;n<i.lines.length;++n){var o=i.lines[n];if(o==e)break;t+=o.height}for(var s=i.parent;s;i=s,s=i.parent)for(var l=0;l<s.children.length;++l){var f=s.children[l];if(f==i)break;t+=f.height}return t}function Jo(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=ii(n);){var o=i.find(0,!0);n=o.from.line,t+=o.from.ch-o.to.ch}for(n=e;i=Rn(n);){var s=i.find(0,!0);t-=n.text.length-s.from.ch,n=s.to.line,t+=n.text.length-s.to.ch}return t}function ur(e){var t=e.display,i=e.doc;t.maxLine=Tt(i,i.first),t.maxLineLength=Jo(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var o=Jo(n);o>t.maxLineLength&&(t.maxLineLength=o,t.maxLine=n)})}var jo=function(e,t,i){this.text=e,yr(this,t),this.height=i?i(this):1};jo.prototype.lineNo=function(){return zt(this)},K(jo);function ga(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),_o(e),yr(e,i);var o=n?n(e):1;o!=e.height&&In(e,o)}function br(e){e.parent=null,_o(e)}var Bt={},Yt={};function Ht(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Yt:Bt;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function cn(e,t){var i=ve("span",null,null,ce?"padding-right: .1px":null),n={pre:ve("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var s=o?t.rest[o-1]:t.line,l=void 0;n.pos=0,n.addToken=Nn,Ft(e.display.measure)&&(l=ft(s,e.doc.direction))&&(n.addToken=hi(n.addToken,l)),n.map=[];var f=t!=e.display.externalMeasured&&zt(s);hn(s,n,_e(e,s,f)),s.styleClasses&&(s.styleClasses.bgClass&&(n.bgClass=fe(s.styleClasses.bgClass,n.bgClass||"")),s.styleClasses.textClass&&(n.textClass=fe(s.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Ct(e.display.measure))),o==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(ce){var m=n.content.lastChild;(/\bcm-tab\b/.test(m.className)||m.querySelector&&m.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Me(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=fe(n.pre.className,n.textClass||"")),n}function wn(e){var t=M("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Nn(e,t,i,n,o,s,l){if(!t)return;var f=e.splitSpaces?bn(t,e.trailingSpace):t,m=e.cm.state.specialChars,v=!1,I;if(!m.test(t))e.col+=t.length,I=document.createTextNode(f),e.map.push(e.pos,e.pos+t.length,I),P&&$<9&&(v=!0),e.pos+=t.length;else{I=document.createDocumentFragment();for(var F=0;;){m.lastIndex=F;var de=m.exec(t),ne=de?de.index-F:t.length-F;if(ne){var De=document.createTextNode(f.slice(F,F+ne));P&&$<9?I.appendChild(M("span",[De])):I.appendChild(De),e.map.push(e.pos,e.pos+ne,De),e.col+=ne,e.pos+=ne}if(!de)break;F+=ne+1;var Ge=void 0;if(de[0]==" "){var st=e.cm.options.tabSize,yt=st-e.col%st;Ge=I.appendChild(M("span",D(yt),"cm-tab")),Ge.setAttribute("role","presentation"),Ge.setAttribute("cm-text"," "),e.col+=yt}else de[0]=="\r"||de[0]==`
`?(Ge=I.appendChild(M("span",de[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ge.setAttribute("cm-text",de[0]),e.col+=1):(Ge=e.cm.options.specialCharPlaceholder(de[0]),Ge.setAttribute("cm-text",de[0]),P&&$<9?I.appendChild(M("span",[Ge])):I.appendChild(Ge),e.col+=1);e.map.push(e.pos,e.pos+1,Ge),e.pos++}}if(e.trailingSpace=f.charCodeAt(t.length-1)==32,i||n||o||v||s||l){var Ot=i||"";n&&(Ot+=n),o&&(Ot+=o);var bt=M("span",[I],Ot,s);if(l)for(var Nt in l)l.hasOwnProperty(Nt)&&Nt!="style"&&Nt!="class"&&bt.setAttribute(Nt,l[Nt]);return e.content.appendChild(bt)}e.content.appendChild(I)}function bn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,n="",o=0;o<e.length;o++){var s=e.charAt(o);s==" "&&i&&(o==e.length-1||e.charCodeAt(o+1)==32)&&(s="\xA0"),n+=s,i=s==" "}return n}function hi(e,t){return function(i,n,o,s,l,f,m){o=o?o+" cm-force-border":"cm-force-border";for(var v=i.pos,I=v+n.length;;){for(var F=void 0,de=0;de<t.length&&!(F=t[de],F.to>v&&F.from<=v);de++);if(F.to>=I)return e(i,n,o,s,l,f,m);e(i,n.slice(0,F.to-v),o,s,null,f,m),s=null,n=n.slice(F.to-v),v=F.to}}}function Fi(e,t,i,n){var o=!n&&i.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!n&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",i.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function hn(e,t,i){var n=e.markedSpans,o=e.text,s=0;if(!n){for(var l=1;l<i.length;l+=2)t.addToken(t,o.slice(s,s=i[l]),Ht(i[l+1],t.cm.options));return}for(var f=o.length,m=0,v=1,I="",F,de,ne=0,De,Ge,st,yt,Ot;;){if(ne==m){De=Ge=st=de="",Ot=null,yt=null,ne=Infinity;for(var bt=[],Nt=void 0,Xt=0;Xt<n.length;++Xt){var Gt=n[Xt],dn=Gt.marker;if(dn.type=="bookmark"&&Gt.from==m&&dn.widgetNode)bt.push(dn);else if(Gt.from<=m&&(Gt.to==null||Gt.to>m||dn.collapsed&&Gt.to==m&&Gt.from==m)){if(Gt.to!=null&&Gt.to!=m&&ne>Gt.to&&(ne=Gt.to,Ge=""),dn.className&&(De+=" "+dn.className),dn.css&&(de=(de?de+";":"")+dn.css),dn.startStyle&&Gt.from==m&&(st+=" "+dn.startStyle),dn.endStyle&&Gt.to==ne&&(Nt||(Nt=[])).push(dn.endStyle,Gt.to),dn.title&&((Ot||(Ot={})).title=dn.title),dn.attributes)for(var Hn in dn.attributes)(Ot||(Ot={}))[Hn]=dn.attributes[Hn];dn.collapsed&&(!yt||ni(yt.marker,dn)<0)&&(yt=Gt)}else Gt.from>m&&ne>Gt.from&&(ne=Gt.from)}if(Nt)for(var Di=0;Di<Nt.length;Di+=2)Nt[Di+1]==ne&&(Ge+=" "+Nt[Di]);if(!yt||yt.from==m)for(var ri=0;ri<bt.length;++ri)Fi(t,0,bt[ri]);if(yt&&(yt.from||0)==m){if(Fi(t,(yt.to==null?f+1:yt.to)-m,yt.marker,yt.from==null),yt.to==null)return;yt.to==m&&(yt=!1)}}if(m>=f)break;for(var oo=Math.min(f,ne);;){if(I){var $i=m+I.length;if(!yt){var bi=$i>oo?I.slice(0,oo-m):I;t.addToken(t,bi,F?F+De:De,st,m+bi.length==ne?Ge:"",de,Ot)}if($i>=oo){I=I.slice(oo-m),m=oo;break}m=$i,st=""}I=o.slice(s,s=i[v++]),F=Ht(i[v++],t.cm.options)}}}function Mo(e,t,i){this.line=t,this.rest=Qo(t),this.size=this.rest?zt(it(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Ri(e,t)}function On(e,t,i){for(var n=[],o,s=t;s<i;s=o){var l=new Mo(e.doc,Tt(e.doc,s),s);o=s+l.size,n.push(l)}return n}var yi=null;function io(e){yi?yi.ops.push(e):e.ownsGroup=yi={ops:[e],delayedCallbacks:[]}}function Gi(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var n=0;n<e.ops.length;n++){var o=e.ops[n];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(i<t.length)}function Cr(e,t){var i=e.ownsGroup;if(!i)return;try{Gi(i)}finally{yi=null,t(i)}}var Xo=null;function ai(e,t){var i=It(e,t);if(!i.length)return;var n=Array.prototype.slice.call(arguments,2),o;yi?o=yi.delayedCallbacks:Xo?o=Xo:(o=Xo=[],setTimeout(va,0));for(var s=function(f){o.push(function(){return i[f].apply(null,n)})},l=0;l<i.length;++l)s(l)}function va(){var e=Xo;Xo=null;for(var t=0;t<e.length;++t)e[t]()}function ya(e,t,i,n){for(var o=0;o<t.changes.length;o++){var s=t.changes[o];s=="text"?ba(e,t):s=="gutter"?Hr(e,t,i,n):s=="class"?zr(e,t):s=="widget"&&Ga(e,t,n)}t.changes=null}function cr(e){return e.node==e.text&&(e.node=M("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),P&&$<8&&(e.node.style.zIndex=2)),e.node}function Va(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var n=cr(t);t.background=n.insertBefore(M("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function Wr(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):cn(e,t)}function ba(e,t){var i=t.text.className,n=Wr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,zr(e,t)):i&&(t.text.className=i)}function zr(e,t){Va(e,t),t.line.wrapClass?cr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function Hr(e,t,i,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=cr(t);t.gutterBackground=M("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var s=t.line.gutterMarkers;if(e.options.lineNumbers||s){var l=cr(t),f=t.gutter=M("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(f),l.insertBefore(f,t.text),t.line.gutterClass&&(f.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!s||!s["CodeMirror-linenumbers"])&&(t.lineNumber=f.appendChild(M("div",gn(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),s)for(var m=0;m<e.display.gutterSpecs.length;++m){var v=e.display.gutterSpecs[m].className,I=s.hasOwnProperty(v)&&s[v];I&&f.appendChild(M("div",[I],"CodeMirror-gutter-elt","left: "+n.gutterLeft[v]+"px; width: "+n.gutterWidth[v]+"px"))}}}function Ga(e,t,i){t.alignable&&(t.alignable=null);for(var n=ue("CodeMirror-linewidget"),o=t.node.firstChild,s=void 0;o;o=s)s=o.nextSibling,n.test(o.className)&&t.node.removeChild(o);Vr(e,t,i)}function Ca(e,t,i,n){var o=Wr(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),zr(e,t),Hr(e,t,i,n),Vr(e,t,n),t.node}function Vr(e,t,i){if(Ea(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)Ea(e,t.rest[n],t,i,!1)}function Ea(e,t,i,n,o){if(!t.widgets)return;for(var s=cr(i),l=0,f=t.widgets;l<f.length;++l){var m=f[l],v=M("div",[m.node],"CodeMirror-linewidget"+(m.className?" "+m.className:""));m.handleMouseEvents||v.setAttribute("cm-ignore-events","true"),Ka(m,v,i,n),e.display.input.setUneditable(v),o&&m.above?s.insertBefore(v,i.gutter||i.text):s.appendChild(v),ai(m,"redraw")}}function Ka(e,t,i,n){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var o=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(o-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Yo(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!B(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),pe(t.display.measure,M("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Eo(e,t){for(var i=ae(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function Gr(e){return e.lineSpace.offsetTop}function S(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function G(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=pe(e.measure,M("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Y(e){return tt-e.display.nativeBarWidth}function L(e){return e.display.scroller.clientWidth-Y(e)-e.display.barWidth}function g(e){return e.display.scroller.clientHeight-Y(e)-e.display.barHeight}function w(e,t,i){var n=e.options.lineWrapping,o=n&&L(e);if(!t.measure.heights||n&&t.measure.width!=o){var s=t.measure.heights=[];if(n){t.measure.width=o;for(var l=t.text.firstChild.getClientRects(),f=0;f<l.length-1;f++){var m=l[f],v=l[f+1];Math.abs(m.bottom-v.bottom)>2&&s.push((m.bottom+v.top)/2-i.top)}}s.push(i.bottom-i.top)}}function b(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var o=0;o<e.rest.length;o++)if(zt(e.rest[o])>i)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function N(e,t){t=_i(t);var i=zt(t),n=e.display.externalMeasured=new Mo(e.doc,t,i);n.lineN=i;var o=n.built=cn(e,n);return n.text=o.pre,pe(e.display.lineMeasure,o.pre),n}function j(e,t,i,n){return ie(e,Q(e,t),i,n)}function q(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[zn(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function Q(e,t){var i=zt(t),n=q(e,i);n&&!n.text?n=null:n&&n.changes&&(ya(e,n,i,Zn(e)),e.curOp.forceUpdate=!0),n||(n=N(e,t));var o=b(n,t,i);return{line:t,view:n,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function ie(e,t,i,n,o){t.before&&(i=-1);var s=i+(n||""),l;return t.cache.hasOwnProperty(s)?l=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(w(e,t.view,t.rect),t.hasHeights=!0),l=vt(e,t,i,n),l.bogus||(t.cache[s]=l)),{left:l.left,right:l.right,top:o?l.rtop:l.top,bottom:o?l.rbottom:l.bottom}}var Oe={left:0,right:0,top:0,bottom:0};function $e(e,t,i){for(var n,o,s,l,f,m,v=0;v<e.length;v+=3)if(f=e[v],m=e[v+1],t<f?(o=0,s=1,l="left"):t<m?(o=t-f,s=o+1):(v==e.length-3||t==m&&e[v+3]>t)&&(s=m-f,o=s-1,t>=m&&(l="right")),o!=null){if(n=e[v+2],f==m&&i==(n.insertLeft?"left":"right")&&(l=i),i=="left"&&o==0)for(;v&&e[v-2]==e[v-3]&&e[v-1].insertLeft;)n=e[(v-=3)+2],l="left";if(i=="right"&&o==m-f)for(;v<e.length-3&&e[v+3]==e[v+4]&&!e[v+5].insertLeft;)n=e[(v+=3)+2],l="right";break}return{node:n,start:o,end:s,collapse:l,coverStart:f,coverEnd:m}}function qe(e,t){var i=Oe;if(t=="left")for(var n=0;n<e.length&&!((i=e[n]).left!=i.right);n++);else for(var o=e.length-1;o>=0&&!((i=e[o]).left!=i.right);o--);return i}function vt(e,t,i,n){var o=$e(t.map,i,n),s=o.node,l=o.start,f=o.end,m=o.collapse,v;if(s.nodeType==3){for(var I=0;I<4;I++){for(;l&&We(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+f<o.coverEnd&&We(t.line.text.charAt(o.coverStart+f));)++f;if(P&&$<9&&l==0&&f==o.coverEnd-o.coverStart?v=s.parentNode.getBoundingClientRect():v=qe(re(s,l,f).getClientRects(),n),v.left||v.right||l==0)break;f=l,l=l-1,m="right"}P&&$<11&&(v=Jt(e.display.measure,v))}else{l>0&&(m=n="right");var F;e.options.lineWrapping&&(F=s.getClientRects()).length>1?v=F[n=="right"?F.length-1:0]:v=s.getBoundingClientRect()}if(P&&$<9&&!l&&(!v||!v.left&&!v.right)){var de=s.parentNode.getClientRects()[0];de?v={left:de.left,right:de.left+wi(e.display),top:de.top,bottom:de.bottom}:v=Oe}for(var ne=v.top-t.rect.top,De=v.bottom-t.rect.top,Ge=(ne+De)/2,st=t.view.measure.heights,yt=0;yt<st.length-1&&!(Ge<st[yt]);yt++);var Ot=yt?st[yt-1]:0,bt=st[yt],Nt={left:(m=="right"?v.right:v.left)-t.rect.left,right:(m=="left"?v.left:v.right)-t.rect.left,top:Ot,bottom:bt};return!v.left&&!v.right&&(Nt.bogus=!0),e.options.singleCursorHeightPerLine||(Nt.rtop=ne,Nt.rbottom=De),Nt}function Jt(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!nt(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*n,bottom:t.bottom*n}}function sn(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 en(e){e.display.externalMeasure=null,Ie(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)sn(e.display.view[t])}function nn(e){en(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ln(){return _&&R?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function rn(){return _&&R?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function on(e){var t=0;if(e.widgets)for(var i=0;i<e.widgets.length;++i)e.widgets[i].above&&(t+=Yo(e.widgets[i]));return t}function An(e,t,i,n,o){if(!o){var s=on(t);i.top+=s,i.bottom+=s}if(n=="line")return i;n||(n="local");var l=no(t);if(n=="local"?l+=Gr(e.display):l-=e.display.viewOffset,n=="page"||n=="window"){var f=e.display.lineSpace.getBoundingClientRect();l+=f.top+(n=="window"?0:rn());var m=f.left+(n=="window"?0:ln());i.left+=m,i.right+=m}return i.top+=l,i.bottom+=l,i}function fn(e,t,i){if(i=="div")return t;var n=t.left,o=t.top;if(i=="page")n-=ln(),o-=rn();else if(i=="local"||!i){var s=e.display.sizer.getBoundingClientRect();n+=s.left,o+=s.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:o-l.top}}function Jn(e,t,i,n,o){return n||(n=Tt(e.doc,t.line)),An(e,n,j(e,n,t.ch,o),i)}function pn(e,t,i,n,o,s){n=n||Tt(e.doc,t.line),o||(o=Q(e,n));function l(De,Ge){var st=ie(e,o,De,Ge?"right":"left",s);return Ge?st.left=st.right:st.right=st.left,An(e,n,st,i)}var f=ft(n,e.doc.direction),m=t.ch,v=t.sticky;if(m>=n.text.length?(m=n.text.length,v="before"):m<=0&&(m=0,v="after"),!f)return l(v=="before"?m-1:m,v=="before");function I(De,Ge,st){var yt=f[Ge],Ot=yt.level==1;return l(st?De-1:De,Ot!=st)}var F=rt(f,m,v),de=ot,ne=I(m,F,v=="before");return de!=null&&(ne.other=I(m,de,v!="before")),ne}function Kt(e,t){var i=0;t=r(e.doc,t),e.options.lineWrapping||(i=wi(e.display)*t.ch);var n=Tt(e.doc,t.line),o=no(n)+Gr(e.display);return{left:i,right:i,top:o,bottom:o+n.height}}function Vt(e,t,i,n,o){var s=Ne(e,t,i);return s.xRel=o,n&&(s.outside=n),s}function yn(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return Vt(n.first,0,null,-1,-1);var o=En(n,i),s=n.first+n.size-1;if(o>s)return Vt(n.first+n.size-1,Tt(n,s).text.length,null,1,1);t<0&&(t=0);for(var l=Tt(n,o);;){var f=Xn(e,l,o,t,i),m=uo(l,f.ch+(f.xRel>0||f.outside>0?1:0));if(!m)return f;var v=m.find(1);if(v.line==o)return v;l=Tt(n,o=v.line)}}function Sn(e,t,i,n){n-=on(t);var o=t.text.length,s=Lt(function(l){return ie(e,i,l-1).bottom<=n},o,0);return o=Lt(function(l){return ie(e,i,l).top>n},s,o),{begin:s,end:o}}function jt(e,t,i,n){i||(i=Q(e,t));var o=An(e,t,ie(e,i,n),"line").top;return Sn(e,t,i,o)}function kn(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function Xn(e,t,i,n,o){o-=no(t);var s=Q(e,t),l=on(t),f=0,m=t.text.length,v=!0,I=ft(t,e.doc.direction);if(I){var F=(e.options.lineWrapping?Bn:Tn)(e,t,i,s,I,n,o);v=F.level!=1,f=v?F.from:F.to-1,m=v?F.to:F.from-1}var de=null,ne=null,De=Lt(function(Xt){var Gt=ie(e,s,Xt);return Gt.top+=l,Gt.bottom+=l,kn(Gt,n,o,!1)?(Gt.top<=o&&Gt.left<=n&&(de=Xt,ne=Gt),!0):!1},f,m),Ge,st,yt=!1;if(ne){var Ot=n-ne.left<ne.right-n,bt=Ot==v;De=de+(bt?0:1),st=bt?"after":"before",Ge=Ot?ne.left:ne.right}else{!v&&(De==m||De==f)&&De++,st=De==0?"after":De==t.text.length?"before":ie(e,s,De-(v?1:0)).bottom+l<=o==v?"after":"before";var Nt=pn(e,Ne(i,De,st),"line",t,s);Ge=Nt.left,yt=o<Nt.top?-1:o>=Nt.bottom?1:0}return De=Ze(t.text,De,1),Vt(i,De,st,yt,n-Ge)}function Tn(e,t,i,n,o,s,l){var f=Lt(function(F){var de=o[F],ne=de.level!=1;return kn(pn(e,Ne(i,ne?de.to:de.from,ne?"before":"after"),"line",t,n),s,l,!0)},0,o.length-1),m=o[f];if(f>0){var v=m.level!=1,I=pn(e,Ne(i,v?m.from:m.to,v?"after":"before"),"line",t,n);kn(I,s,l,!0)&&I.top>l&&(m=o[f-1])}return m}function Bn(e,t,i,n,o,s,l){var f=Sn(e,t,n,l),m=f.begin,v=f.end;/\s/.test(t.text.charAt(v-1))&&v--;for(var I=null,F=null,de=0;de<o.length;de++){var ne=o[de];if(ne.from>=v||ne.to<=m)continue;var De=ne.level!=1,Ge=ie(e,n,De?Math.min(v,ne.to)-1:Math.max(m,ne.from)).right,st=Ge<s?s-Ge+1e9:Ge-s;(!I||F>st)&&(I=ne,F=st)}return I||(I=o[o.length-1]),I.from<m&&(I={from:m,to:I.to,level:I.level}),I.to>v&&(I={from:I.from,to:v,level:I.level}),I}var _n;function si(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(_n==null){_n=M("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)_n.appendChild(document.createTextNode("x")),_n.appendChild(M("br"));_n.appendChild(document.createTextNode("x"))}pe(e.measure,_n);var i=_n.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),Ie(e.measure),i||1}function wi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=M("span","xxxxxxxxxx"),i=M("pre",[t],"CodeMirror-line-like");pe(e.measure,i);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function Zn(e){for(var t=e.display,i={},n={},o=t.gutters.clientLeft,s=t.gutters.firstChild,l=0;s;s=s.nextSibling,++l){var f=e.display.gutterSpecs[l].className;i[f]=s.offsetLeft+s.clientLeft+o,n[f]=s.clientWidth}return{fixedPos:Wi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Wi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ho(e){var t=si(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/wi(e.display)-3);return function(o){if(Ri(e.doc,o))return 0;var s=0;if(o.widgets)for(var l=0;l<o.widgets.length;l++)o.widgets[l].height&&(s+=o.widgets[l].height);return i?s+(Math.ceil(o.text.length/n)||1)*t:s+t}}function Ki(e){var t=e.doc,i=ho(e);t.iter(function(n){var o=i(n);o!=n.height&&In(n,o)})}function Ai(e,t,i,n){var o=e.display;if(!i&&ae(t).getAttribute("cm-not-content")=="true")return null;var s,l,f=o.lineSpace.getBoundingClientRect();try{s=t.clientX-f.left,l=t.clientY-f.top}catch(F){return null}var m=yn(e,s,l),v;if(n&&m.xRel>0&&(v=Tt(e.doc,m.line).text).length==m.ch){var I=le(v,v.length,e.options.tabSize)-v.length;m=Ne(m.line,Math.max(0,Math.round((s-G(e.display).left)/wi(e.display))-I))}return m}function zn(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var i=e.display.view,n=0;n<i.length;n++)if(t-=i[n].size,t<0)return n}function Un(e,t,i,n){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),n||(n=0);var o=e.display;if(n&&i<o.viewTo&&(o.updateLineNumbers==null||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)xi&&co(e.doc,t)<o.viewTo&&Yn(e);else if(i<=o.viewFrom)xi&&Co(e.doc,i+n)>o.viewFrom?Yn(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&i>=o.viewTo)Yn(e);else if(t<=o.viewFrom){var s=fo(e,i,i+n,1);s?(o.view=o.view.slice(s.index),o.viewFrom=s.lineN,o.viewTo+=n):Yn(e)}else if(i>=o.viewTo){var l=fo(e,t,t,-1);l?(o.view=o.view.slice(0,l.index),o.viewTo=l.lineN):Yn(e)}else{var f=fo(e,t,t,-1),m=fo(e,i,i+n,1);f&&m?(o.view=o.view.slice(0,f.index).concat(On(e,f.lineN,m.lineN)).concat(o.view.slice(m.index)),o.viewTo+=n):Yn(e)}var v=o.externalMeasured;v&&(i<v.lineN?v.lineN+=n:t<v.lineN+v.size&&(o.externalMeasured=null))}function qn(e,t,i){e.curOp.viewChanged=!0;var n=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var s=n.view[zn(e,t)];if(s.node==null)return;var l=s.changes||(s.changes=[]);Be(l,i)==-1&&l.push(i)}function Yn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function fo(e,t,i,n){var o=zn(e,t),s,l=e.display.view;if(!xi||i==e.doc.first+e.doc.size)return{index:o,lineN:i};for(var f=e.display.viewFrom,m=0;m<o;m++)f+=l[m].size;if(f!=t){if(n>0){if(o==l.length-1)return null;s=f+l[o].size-t,o++}else s=f-t;t+=s,i+=s}for(;co(e.doc,i)!=i;){if(o==(n<0?0:l.length-1))return null;i+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:i}}function Oo(e,t,i){var n=e.display,o=n.view;o.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=On(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=On(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(zn(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(On(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,zn(e,i)))),n.viewTo=i}function To(e){for(var t=e.display.view,i=0,n=0;n<t.length;n++){var o=t[n];!o.hidden&&(!o.node||o.changes)&&++i}return i}function jn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function yo(e,t){t===void 0&&(t=!0);for(var i=e.doc,n={},o=n.cursors=document.createDocumentFragment(),s=n.selection=document.createDocumentFragment(),l=0;l<i.sel.ranges.length;l++){if(!t&&l==i.sel.primIndex)continue;var f=i.sel.ranges[l];if(f.from().line>=e.display.viewTo||f.to().line<e.display.viewFrom)continue;var m=f.empty();(m||e.options.showCursorWhenSelecting)&&Ro(e,f.head,o),m||Pn(e,f,s)}return n}function Ro(e,t,i){var n=pn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=i.appendChild(M("div","\xA0","CodeMirror-cursor"));if(o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var s=i.appendChild(M("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Wn(e,t){return e.top-t.top||e.left-t.left}function Pn(e,t,i){var n=e.display,o=e.doc,s=document.createDocumentFragment(),l=G(e.display),f=l.left,m=Math.max(n.sizerWidth,L(e)-n.sizer.offsetLeft)-l.right,v=o.direction=="ltr";function I(bt,Nt,Xt,Gt){Nt<0&&(Nt=0),Nt=Math.round(Nt),Gt=Math.round(Gt),s.appendChild(M("div",null,"CodeMirror-selected","position: absolute; left: "+bt+`px;
top: `+Nt+"px; width: "+(Xt==null?m-bt:Xt)+`px;
height: `+(Gt-Nt)+"px"))}function F(bt,Nt,Xt){var Gt=Tt(o,bt),dn=Gt.text.length,Hn,Di;function ri(bi,eo){return Jn(e,Ne(bt,bi),"div",Gt,eo)}function oo(bi,eo,Bi){var Oi=jt(e,Gt,null,bi),Ci=eo=="ltr"==(Bi=="after")?"left":"right",li=Bi=="after"?Oi.begin:Oi.end-(/\s/.test(Gt.text.charAt(Oi.end-1))?2:1);return ri(li,Ci)[Ci]}var $i=ft(Gt,o.direction);return gt($i,Nt||0,Xt==null?dn:Xt,function(bi,eo,Bi,Oi){var Ci=Bi=="ltr",li=ri(bi,Ci?"left":"right"),to=ri(eo-1,Ci?"right":"left"),Ur=Nt==null&&bi==0,ar=Xt==null&&eo==dn,Hi=Oi==0,Po=!$i||Oi==$i.length-1;if(to.top-li.top<=3){var Li=(v?Ur:ar)&&Hi,ps=(v?ar:Ur)&&Po,Vo=Li?f:(Ci?li:to).left,gr=ps?m:(Ci?to:li).right;I(Vo,li.top,gr-Vo,li.bottom)}else{var vr,Yi,Fr,ms;Ci?(vr=v&&Ur&&Hi?f:li.left,Yi=v?m:oo(bi,Bi,"before"),Fr=v?f:oo(eo,Bi,"after"),ms=v&&ar&&Po?m:to.right):(vr=v?oo(bi,Bi,"before"):f,Yi=!v&&Ur&&Hi?m:li.right,Fr=!v&&ar&&Po?f:to.left,ms=v?oo(eo,Bi,"after"):m),I(vr,li.top,Yi-vr,li.bottom),li.bottom<to.top&&I(f,li.bottom,null,to.top),I(Fr,to.top,ms-Fr,to.bottom)}(!Hn||Wn(li,Hn)<0)&&(Hn=li),Wn(to,Hn)<0&&(Hn=to),(!Di||Wn(li,Di)<0)&&(Di=li),Wn(to,Di)<0&&(Di=to)}),{start:Hn,end:Di}}var de=t.from(),ne=t.to();if(de.line==ne.line)F(de.line,de.ch,ne.ch);else{var De=Tt(o,de.line),Ge=Tt(o,ne.line),st=_i(De)==_i(Ge),yt=F(de.line,de.ch,st?De.text.length+1:null).end,Ot=F(ne.line,st?0:null,ne.ch).start;st&&(yt.top<Ot.top-2?(I(yt.right,yt.top,null,yt.bottom),I(f,Ot.top,Ot.left,Ot.bottom)):I(yt.right,yt.top,Ot.left-yt.right,yt.bottom)),yt.bottom<Ot.top&&I(f,yt.bottom,null,Ot.top)}i.appendChild(s)}function Si(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Zo(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function xa(e){e.state.focused||(e.display.input.focus(),Do(e))}function Kr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Zo(e))},100)}function Do(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Me(e,"focus",e,t),e.state.focused=!0,Re(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),ce&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Si(e)}function Zo(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Me(e,"blur",e,t),e.state.focused=!1,ge(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Er(e){for(var t=e.display,i=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var o=t.view[n],s=e.options.lineWrapping,l=void 0,f=0;if(o.hidden)continue;if(P&&$<8){var m=o.node.offsetTop+o.node.offsetHeight;l=m-i,i=m}else{var v=o.node.getBoundingClientRect();l=v.bottom-v.top,!s&&o.text.firstChild&&(f=o.text.firstChild.getBoundingClientRect().right-v.left-1)}var I=o.line.height-l;if((I>.005||I<-.005)&&(In(o.line,l),Qr(o.line),o.rest))for(var F=0;F<o.rest.length;F++)Qr(o.rest[F]);if(f>e.display.sizerWidth){var de=Math.ceil(f/wi(e.display));de>e.display.maxLineLength&&(e.display.maxLineLength=de,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}function Qr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],n=i.node.parentNode;n&&(i.height=n.offsetHeight)}}function xr(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-Gr(e));var o=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight,s=En(t,n),l=En(t,o);if(i&&i.ensure){var f=i.ensure.from.line,m=i.ensure.to.line;f<s?(s=f,l=En(t,no(Tt(t,f))+e.wrapper.clientHeight)):Math.min(m,t.lastLine())>=l&&(s=En(t,no(Tt(t,m))-e.wrapper.clientHeight),l=m)}return{from:s,to:Math.max(l,s+1)}}function Qa(e,t){if(Xe(e,"scrollCursorIntoView"))return;var i=e.display,n=i.sizer.getBoundingClientRect(),o=null;if(t.top+n.top<0?o=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),o!=null&&!ee){var s=M("div","\u200B",null,`position: absolute;
top: `+(t.top-i.viewOffset-Gr(e.display))+`px;
height: `+(t.bottom-t.top+Y(e)+i.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(s),s.scrollIntoView(o),e.display.lineSpace.removeChild(s)}}function Ja(e,t,i,n){n==null&&(n=0);var o;!e.options.lineWrapping&&t==i&&(t=t.ch?Ne(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,i=t.sticky=="before"?Ne(t.line,t.ch+1,"before"):t);for(var s=0;s<5;s++){var l=!1,f=pn(e,t),m=!i||i==t?f:pn(e,i);o={left:Math.min(f.left,m.left),top:Math.min(f.top,m.top)-n,right:Math.max(f.left,m.left),bottom:Math.max(f.bottom,m.bottom)+n};var v=Jr(e,o),I=e.doc.scrollTop,F=e.doc.scrollLeft;if(v.scrollTop!=null&&(er(e,v.scrollTop),Math.abs(e.doc.scrollTop-I)>1&&(l=!0)),v.scrollLeft!=null&&(po(e,v.scrollLeft),Math.abs(e.doc.scrollLeft-F)>1&&(l=!0)),!l)break}return o}function wa(e,t){var i=Jr(e,t);i.scrollTop!=null&&er(e,i.scrollTop),i.scrollLeft!=null&&po(e,i.scrollLeft)}function Jr(e,t){var i=e.display,n=si(e.display);t.top<0&&(t.top=0);var o=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,s=g(e),l={};t.bottom-t.top>s&&(t.bottom=t.top+s);var f=e.doc.height+S(i),m=t.top<n,v=t.bottom>f-n;if(t.top<o)l.scrollTop=m?0:t.top;else if(t.bottom>o+s){var I=Math.min(t.top,(v?f:t.bottom)-s);I!=o&&(l.scrollTop=I)}var F=e.options.fixedGutter?0:i.gutters.offsetWidth,de=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-F,ne=L(e)-i.gutters.offsetWidth,De=t.right-t.left>ne;return De&&(t.right=t.left+ne),t.left<10?l.scrollLeft=0:t.left<de?l.scrollLeft=Math.max(0,t.left+F-(De?0:10)):t.right>ne+de-3&&(l.scrollLeft=t.right+(De?0:10)-ne),l}function Xr(e,t){if(t==null)return;wr(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function qo(e){wr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function $o(e,t,i){(t!=null||i!=null)&&wr(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Xa(e,t){wr(e),e.curOp.scrollToPos=t}function wr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=Kt(e,t.from),n=Kt(e,t.to);dr(e,i,n,t.margin)}}function dr(e,t,i,n){var o=Jr(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});$o(e,o.scrollLeft,o.scrollTop)}function er(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;me||pr(e,{top:t}),tr(e,t,!0),me&&pr(e),fr(e,100)}function tr(e,t,i){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!i)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function po(e,t,i,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,Cn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function Bo(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+S(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?i:0,docHeight:n,scrollHeight:n+Y(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Lo=function(e,t,i){this.cm=i;var n=this.vert=M("div",[M("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=M("div",[M("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),Se(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Se(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,P&&$<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Lo.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var o=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var s=e.viewWidth-e.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+s)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:t?n:0}},Lo.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Lo.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Lo.prototype.zeroWidthHack=function(){var e=te&&!se?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new je,this.disableVert=new je},Lo.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function n(){var o=e.getBoundingClientRect(),s=i=="vert"?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1);s!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Lo.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var hr=function(){};hr.prototype.update=function(){return{bottom:0,right:0}},hr.prototype.setScrollLeft=function(){},hr.prototype.setScrollTop=function(){},hr.prototype.clear=function(){};function Uo(e,t){t||(t=Bo(e));var i=e.display.barWidth,n=e.display.barHeight;Ar(e,t);for(var o=0;o<4&&i!=e.display.barWidth||n!=e.display.barHeight;o++)i!=e.display.barWidth&&e.options.lineWrapping&&Er(e),Ar(e,Bo(e)),i=e.display.barWidth,n=e.display.barHeight}function Ar(e,t){var i=e.display,n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var Yr={native:Lo,null:hr};function Sr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&ge(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Yr[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Se(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?po(e,t):er(e,t)},e),e.display.scrollbars.addClass&&Re(e.display.wrapper,e.display.scrollbars.addClass)}var Zr=0;function Io(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:++Zr},io(e.curOp)}function Fo(e){var t=e.curOp;t&&Cr(t,function(i){for(var n=0;n<i.ops.length;n++)i.ops[n].cm.curOp=null;Aa(i)})}function Aa(e){for(var t=e.ops,i=0;i<t.length;i++)Ya(t[i]);for(var n=0;n<t.length;n++)Za(t[n]);for(var o=0;o<t.length;o++)qa(t[o]);for(var s=0;s<t.length;s++)qr(t[s]);for(var l=0;l<t.length;l++)$a(t[l])}function Ya(e){var t=e.cm,i=t.display;Sa(t),e.updateMaxLine&&ur(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new mo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Za(e){e.updatedDisplay=e.mustUpdate&&Wo(e.cm,e.update)}function qa(e){var t=e.cm,i=t.display;e.updatedDisplay&&Er(t),e.barMeasure=Bo(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=j(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+Y(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-L(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function qr(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&po(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==Ee();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Uo(t,e.barMeasure),e.updatedDisplay&&Ln(t,e.barMeasure),e.selectionChanged&&Si(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&xa(e.cm)}function $a(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&kr(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&tr(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&po(t,e.scrollLeft,!0,!0),e.scrollToPos){var o=Ja(t,r(n,e.scrollToPos.from),r(n,e.scrollToPos.to),e.scrollToPos.margin);Qa(t,o)}var s=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(s)for(var f=0;f<s.length;++f)s[f].lines.length||Me(s[f],"hide");if(l)for(var m=0;m<l.length;++m)l[m].lines.length&&Me(l[m],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Me(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qi(e,t){if(e.curOp)return t();Io(e);try{return t()}finally{Fo(e)}}function fi(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Io(e);try{return t.apply(e,arguments)}finally{Fo(e)}}}function ji(e){return function(){if(this.curOp)return e.apply(this,arguments);Io(this);try{return e.apply(this,arguments)}finally{Fo(this)}}}function pi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Io(t);try{return e.apply(this,arguments)}finally{Fo(t)}}}function fr(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,O(es,e))}function es(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var i=+new Date+e.options.workTime,n=ut(e,t.highlightFrontier),o=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(s){if(n.line>=e.display.viewFrom){var l=s.styles,f=s.text.length>e.options.maxHighlightLength?vi(t.mode,n.state):null,m=z(e,s,n,!0);f&&(n.state=f),s.styles=m.styles;var v=s.styleClasses,I=m.classes;I?s.styleClasses=I:v&&(s.styleClasses=null);for(var F=!l||l.length!=s.styles.length||v!=I&&(!v||!I||v.bgClass!=I.bgClass||v.textClass!=I.textClass),de=0;!F&&de<l.length;++de)F=l[de]!=s.styles[de];F&&o.push(n.line),s.stateAfter=n.save(),n.nextLine()}else s.text.length<=e.options.maxHighlightLength&&Mt(e,s.text,n),s.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return fr(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),o.length&&Qi(e,function(){for(var s=0;s<o.length;s++)qn(e,o[s],"text")})}var mo=function(e,t,i){var n=e.display;this.viewport=t,this.visible=xr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=L(e),this.force=i,this.dims=Zn(e),this.events=[]};mo.prototype.signal=function(e,t){H(e,t)&&this.events.push(arguments)},mo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Me.apply(null,this.events[e])};function Sa(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Y(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Y(e)+"px",t.scrollbarsClipped=!0)}function ka(e){if(e.hasFocus())return null;var t=Ee();if(!t||!B(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&B(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function Ma(e){if(!e||!e.activeElt||e.activeElt==Ee())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&B(document.body,e.anchorNode)&&B(document.body,e.focusNode)){var t=window.getSelection(),i=document.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),t.removeAllRanges(),t.addRange(i),t.extend(e.focusNode,e.focusOffset)}}function Wo(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return Yn(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&To(e)==0)return!1;ki(e)&&(Yn(e),t.dims=Zn(e));var o=n.first+n.size,s=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(o,t.visible.to+e.options.viewportMargin);i.viewFrom<s&&s-i.viewFrom<20&&(s=Math.max(n.first,i.viewFrom)),i.viewTo>l&&i.viewTo-l<20&&(l=Math.min(o,i.viewTo)),xi&&(s=co(e.doc,s),l=Co(e.doc,l));var f=s!=i.viewFrom||l!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Oo(e,s,l),i.viewOffset=no(Tt(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var m=To(e);if(!f&&m==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var v=ka(e);return m>4&&(i.lineDiv.style.display="none"),Oa(e,i.updateLineNumbers,t.dims),m>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Ma(v),Ie(i.cursorDiv),Ie(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,f&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,fr(e,400)),i.updateLineNumbers=null,!0}function kr(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==L(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+S(e.display)-g(e),i.top)}),t.visible=xr(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=xr(e.display,e.doc,i));if(!Wo(e,t))break;Er(e);var o=Bo(e);jn(e),Uo(e,o),Ln(e,o),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 pr(e,t){var i=new mo(e,t);if(Wo(e,i)){Er(e),kr(e,i);var n=Bo(e);jn(e),Uo(e,n),Ln(e,n),i.finish()}}function Oa(e,t,i){var n=e.display,o=e.options.lineNumbers,s=n.lineDiv,l=s.firstChild;function f(De){var Ge=De.nextSibling;return ce&&te&&e.display.currentWheelTarget==De?De.style.display="none":De.parentNode.removeChild(De),Ge}for(var m=n.view,v=n.viewFrom,I=0;I<m.length;I++){var F=m[I];if(!F.hidden)if(!F.node||F.node.parentNode!=s){var de=Ca(e,F,v,i);s.insertBefore(de,l)}else{for(;l!=F.node;)l=f(l);var ne=o&&t!=null&&t<=v&&F.lineNumber;F.changes&&(Be(F.changes,"gutter")>-1&&(ne=!1),ya(e,F,v,i)),ne&&(Ie(F.lineNumber),F.lineNumber.appendChild(document.createTextNode(gn(e.options,v)))),l=F.node.nextSibling}v+=F.size}for(;l;)l=f(l)}function Mr(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ln(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+Y(e)+"px"}function Cn(e){var t=e.display,i=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=Wi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,s=n+"px",l=0;l<i.length;l++)if(!i[l].hidden){e.options.fixedGutter&&(i[l].gutter&&(i[l].gutter.style.left=s),i[l].gutterBackground&&(i[l].gutterBackground.style.left=s));var f=i[l].alignable;if(f)for(var m=0;m<f.length;m++)f[m].style.left=s}e.options.fixedGutter&&(t.gutters.style.left=n+o+"px")}function ki(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=gn(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var o=n.measure.appendChild(M("div",[M("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),s=o.firstChild.offsetWidth,l=o.offsetWidth-s;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(s,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Mr(e.display),!0}return!1}function Ji(e,t){for(var i=[],n=!1,o=0;o<e.length;o++){var s=e[o],l=null;if(typeof s!="string"&&(l=s.style,s=s.className),s=="CodeMirror-linenumbers")if(t)n=!0;else continue;i.push({className:s,style:l})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function nr(e){var t=e.gutters,i=e.gutterSpecs;Ie(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var o=i[n],s=o.className,l=o.style,f=t.appendChild(M("div",null,"CodeMirror-gutter "+s));l&&(f.style.cssText=l),s=="CodeMirror-linenumbers"&&(e.lineGutter=f,f.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",Mr(e)}function xo(e){nr(e.display),Un(e),Cn(e)}function mr(e,t,i,n){var o=this;this.input=i,o.scrollbarFiller=M("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=M("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=ve("div",null,"CodeMirror-code"),o.selectionDiv=M("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=M("div",null,"CodeMirror-cursors"),o.measure=M("div",null,"CodeMirror-measure"),o.lineMeasure=M("div",null,"CodeMirror-measure"),o.lineSpace=ve("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var s=ve("div",[o.lineSpace],"CodeMirror-lines");o.mover=M("div",[s],null,"position: relative"),o.sizer=M("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=M("div",null,null,"position: absolute; height: "+tt+"px; width: 1px;"),o.gutters=M("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=M("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=M("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),P&&$<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),!ce&&!(me&&k)&&(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Ji(n.gutters,n.lineNumbers),nr(o),i.init(o)}var No=0,Mi=null;P?Mi=-.53:me?Mi=15:_?Mi=-.7:Ce&&(Mi=-1/3);function Or(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function $r(e){var t=Or(e);return t.x*=Mi,t.y*=Mi,t}function ea(e,t){var i=Or(t),n=i.x,o=i.y,s=e.display,l=s.scroller,f=l.scrollWidth>l.clientWidth,m=l.scrollHeight>l.clientHeight;if(!(n&&f||o&&m))return;if(o&&te&&ce){e:for(var v=t.target,I=s.view;v!=l;v=v.parentNode)for(var F=0;F<I.length;F++)if(I[F].node==v){e.display.currentWheelTarget=v;break e}}if(n&&!me&&!V&&Mi!=null){o&&m&&er(e,Math.max(0,l.scrollTop+o*Mi)),po(e,Math.max(0,l.scrollLeft+n*Mi)),(!o||o&&m)&&C(t),s.wheelStartX=null;return}if(o&&Mi!=null){var de=o*Mi,ne=e.doc.scrollTop,De=ne+s.wrapper.clientHeight;de<0?ne=Math.max(0,ne+de-50):De=Math.min(e.doc.height,De+de+50),pr(e,{top:ne,bottom:De})}No<20&&(s.wheelStartX==null?(s.wheelStartX=l.scrollLeft,s.wheelStartY=l.scrollTop,s.wheelDX=n,s.wheelDY=o,setTimeout(function(){if(s.wheelStartX==null)return;var Ge=l.scrollLeft-s.wheelStartX,st=l.scrollTop-s.wheelStartY,yt=st&&s.wheelDY&&st/s.wheelDY||Ge&&s.wheelDX&&Ge/s.wheelDX;if(s.wheelStartX=s.wheelStartY=null,!yt)return;Mi=(Mi*No+yt)/(No+1),++No},200)):(s.wheelDX+=n,s.wheelDY+=o))}var Xi=function(e,t){this.ranges=e,this.primIndex=t};Xi.prototype.primary=function(){return this.ranges[this.primIndex]},Xi.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 i=this.ranges[t],n=e.ranges[t];if(!Kn(i.anchor,n.anchor)||!Kn(i.head,n.head))return!1}return!0},Xi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Dn(ei(this.ranges[t].anchor),ei(this.ranges[t].head));return new Xi(e,this.primIndex)},Xi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Xi.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(_t(t,n.from())>=0&&_t(e,n.to())<=0)return i}return-1};var Dn=function(e,t){this.anchor=e,this.head=t};Dn.prototype.from=function(){return ao(this.anchor,this.head)},Dn.prototype.to=function(){return ro(this.anchor,this.head)},Dn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function go(e,t,i){var n=e&&e.options.selectionsMayTouch,o=t[i];t.sort(function(de,ne){return _t(de.from(),ne.from())}),i=Be(t,o);for(var s=1;s<t.length;s++){var l=t[s],f=t[s-1],m=_t(f.to(),l.from());if(n&&!l.empty()?m>0:m>=0){var v=ao(f.from(),l.from()),I=ro(f.to(),l.to()),F=f.empty()?l.from()==l.head:f.from()==f.head;s<=i&&--i,t.splice(--s,2,new Dn(F?I:v,F?v:I))}}return new Xi(t,i)}function wo(e,t){return new Xi([new Dn(e,t||e)],0)}function Ao(e){return e.text?Ne(e.from.line+e.text.length-1,it(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ta(e,t){if(_t(e,t.from)<0)return e;if(_t(e,t.to)<=0)return Ao(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Ao(t).ch-t.to.ch),Ne(i,n)}function Tr(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];i.push(new Dn(ta(o.anchor,t),ta(o.head,t)))}return go(e.cm,i,e.sel.primIndex)}function Ta(e,t,i){return e.line==t.line?Ne(i.line,e.ch-t.ch+i.ch):Ne(i.line+(e.line-t.line),e.ch)}function Ra(e,t,i){for(var n=[],o=Ne(e.first,0),s=o,l=0;l<t.length;l++){var f=t[l],m=Ta(f.from,o,s),v=Ta(Ao(f),o,s);if(o=f.to,s=v,i=="around"){var I=e.sel.ranges[l],F=_t(I.head,I.anchor)<0;n[l]=new Dn(F?v:m,F?m:v)}else n[l]=new Dn(m,m)}return new Xi(n,e.sel.primIndex)}function zo(e){e.doc.mode=Ei(e.options,e.doc.modeOption),na(e)}function na(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,fr(e,100),e.state.modeGen++,e.curOp&&Un(e)}function gs(e,t){return t.from.ch==0&&t.to.ch==0&&it(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,t,i,n){function o(Ot){return i?i[Ot]:null}function s(Ot,bt,Nt){ga(Ot,bt,Nt,n),ai(Ot,"change",Ot,t)}function l(Ot,bt){for(var Nt=[],Xt=Ot;Xt<bt;++Xt)Nt.push(new jo(v[Xt],o(Xt),n));return Nt}var f=t.from,m=t.to,v=t.text,I=Tt(e,f.line),F=Tt(e,m.line),de=it(v),ne=o(v.length-1),De=m.line-f.line;if(t.full)e.insert(0,l(0,v.length)),e.remove(v.length,e.size-v.length);else if(gs(e,t)){var Ge=l(0,v.length-1);s(F,F.text,ne),De&&e.remove(f.line,De),Ge.length&&e.insert(f.line,Ge)}else if(I==F)if(v.length==1)s(I,I.text.slice(0,f.ch)+de+I.text.slice(m.ch),ne);else{var st=l(1,v.length-1);st.push(new jo(de+I.text.slice(m.ch),ne,n)),s(I,I.text.slice(0,f.ch)+v[0],o(0)),e.insert(f.line+1,st)}else if(v.length==1)s(I,I.text.slice(0,f.ch)+v[0]+F.text.slice(m.ch),o(0)),e.remove(f.line+1,De);else{s(I,I.text.slice(0,f.ch)+v[0],o(0)),s(F,de+F.text.slice(m.ch),ne);var yt=l(1,v.length-1);De>1&&e.remove(f.line+1,De-1),e.insert(f.line+1,yt)}ai(e,"change",e,t)}function ir(e,t,i){function n(o,s,l){if(o.linked)for(var f=0;f<o.linked.length;++f){var m=o.linked[f];if(m.doc==s)continue;var v=l&&m.sharedHist;if(i&&!v)continue;t(m.doc,v),n(m.doc,o,v)}}n(e,null,!0)}function vs(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Ki(e),zo(e),ys(e),e.options.lineWrapping||ur(e),e.options.mode=t.modeOption,Un(e)}function ys(e){(e.doc.direction=="rtl"?Re:ge)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){Qi(e,function(){ys(e),Un(e)})}function Da(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function ns(e,t){var i={from:ei(t.from),to:Ao(t),text:Ni(e,t.from,t.to)};return Es(e,i,t.from.line,t.to.line+1),ir(e,function(n){return Es(n,i,t.from.line,t.to.line+1)},!0),i}function bs(e){for(;e.length;){var t=it(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return bs(e.done),it(e.done);if(e.done.length&&!it(e.done).ranges)return it(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),it(e.done)}function Cs(e,t,i,n){var o=e.history;o.undone.length=0;var s=+new Date,l,f;if((o.lastOp==n||o.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&o.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=pl(o,o.lastOp==n)))f=it(l.changes),_t(t.from,t.to)==0&&_t(t.from,f.to)==0?f.to=Ao(t):l.changes.push(ns(e,t));else{var m=it(o.done);for((!m||!m.ranges)&&La(e.sel,o.done),l={changes:[ns(e,t)],generation:o.generation},o.done.push(l);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(i),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,f||Me(e,"historyAdded")}function ml(e,t,i,n){var o=t.charAt(0);return o=="*"||o=="+"&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,i,n){var o=e.history,s=n&&n.origin;i==o.lastSelOp||s&&o.lastSelOrigin==s&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==s||ml(e,s,it(o.done),t))?o.done[o.done.length-1]=t:La(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=s,o.lastSelOp=i,n&&n.clearRedo!==!1&&bs(o.undone)}function La(e,t){var i=it(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Es(e,t,i,n){var o=t["spans_"+e.id],s=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(l){l.markedSpans&&((o||(o=t["spans_"+e.id]={}))[s]=l.markedSpans),++s})}function vl(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function yl(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],o=0;o<t.text.length;++o)n.push(vl(i[o]));return n}function xs(e,t){var i=yl(e,t),n=lo(e,t);if(!i)return n;if(!n)return i;for(var o=0;o<i.length;++o){var s=i[o],l=n[o];if(s&&l){e:for(var f=0;f<l.length;++f){for(var m=l[f],v=0;v<s.length;++v)if(s[v].marker==m.marker)continue e;s.push(m)}}else l&&(i[o]=l)}return i}function Rr(e,t,i){for(var n=[],o=0;o<e.length;++o){var s=e[o];if(s.ranges){n.push(i?Xi.prototype.deepCopy.call(s):s);continue}var l=s.changes,f=[];n.push({changes:f});for(var m=0;m<l.length;++m){var v=l[m],I=void 0;if(f.push({from:v.from,to:v.to,text:v.text}),t)for(var F in v)(I=F.match(/^spans_(\d+)$/))&&(Be(t,Number(I[1]))>-1&&(it(f)[F]=v[F],delete v[F]))}}return n}function is(e,t,i,n){if(n){var o=e.anchor;if(i){var s=_t(t,o)<0;s!=_t(i,o)<0?(o=t,t=i):s!=_t(t,i)<0&&(t=i)}return new Dn(o,t)}else return new Dn(i||t,t)}function Ia(e,t,i,n,o){o==null&&(o=e.cm&&(e.cm.display.shift||e.extend)),zi(e,new Xi([is(e.sel.primary(),t,i,o)],0),n)}function ws(e,t,i){for(var n=[],o=e.cm&&(e.cm.display.shift||e.extend),s=0;s<e.sel.ranges.length;s++)n[s]=is(e.sel.ranges[s],t[s],null,o);var l=go(e.cm,n,e.sel.primIndex);zi(e,l,i)}function os(e,t,i,n){var o=e.sel.ranges.slice(0);o[t]=i,zi(e,go(e.cm,o,e.sel.primIndex),n)}function As(e,t,i,n){zi(e,wo(t,i),n)}function bl(e,t,i){var n={ranges:t.ranges,update:function(o){this.ranges=[];for(var s=0;s<o.length;s++)this.ranges[s]=new Dn(r(e,o[s].anchor),r(e,o[s].head))},origin:i&&i.origin};return Me(e,"beforeSelectionChange",e,n),e.cm&&Me(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?go(e.cm,n.ranges,n.ranges.length-1):t}function Ss(e,t,i){var n=e.history.done,o=it(n);o&&o.ranges?(n[n.length-1]=t,Na(e,t,i)):zi(e,t,i)}function zi(e,t,i){Na(e,t,i),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function Na(e,t,i){(H(e,"beforeSelectionChange")||e.cm&&H(e.cm,"beforeSelectionChange"))&&(t=bl(e,t,i));var n=i&&i.bias||(_t(t.primary().head,e.sel.primary().head)<0?-1:1);ks(e,Os(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&qo(e.cm)}function ks(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,J(e.cm)),ai(e,"cursorActivity",e)}function Ms(e){ks(e,Os(e,e.sel,null,!1))}function Os(e,t,i,n){for(var o,s=0;s<t.ranges.length;s++){var l=t.ranges[s],f=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[s],m=Pa(e,l.anchor,f&&f.anchor,i,n),v=Pa(e,l.head,f&&f.head,i,n);(o||m!=l.anchor||v!=l.head)&&(o||(o=t.ranges.slice(0,s)),o[s]=new Dn(m,v))}return o?go(e.cm,o,t.primIndex):t}function Dr(e,t,i,n,o){var s=Tt(e,t.line);if(s.markedSpans)for(var l=0;l<s.markedSpans.length;++l){var f=s.markedSpans[l],m=f.marker,v="selectLeft"in m?!m.selectLeft:m.inclusiveLeft,I="selectRight"in m?!m.selectRight:m.inclusiveRight;if((f.from==null||(v?f.from<=t.ch:f.from<t.ch))&&(f.to==null||(I?f.to>=t.ch:f.to>t.ch))){if(o&&(Me(m,"beforeCursorEnter"),m.explicitlyCleared))if(s.markedSpans){--l;continue}else break;if(!m.atomic)continue;if(i){var F=m.find(n<0?1:-1),de=void 0;if((n<0?I:v)&&(F=Ts(e,F,-n,F&&F.line==t.line?s:null)),F&&F.line==t.line&&(de=_t(F,i))&&(n<0?de<0:de>0))return Dr(e,F,t,n,o)}var ne=m.find(n<0?-1:1);return(n<0?v:I)&&(ne=Ts(e,ne,n,ne.line==t.line?s:null)),ne?Dr(e,ne,t,n,o):null}}return t}function Pa(e,t,i,n,o){var s=n||1,l=Dr(e,t,i,s,o)||!o&&Dr(e,t,i,s,!0)||Dr(e,t,i,-s,o)||!o&&Dr(e,t,i,-s,!0);return l||(e.cantEdit=!0,Ne(e.first,0))}function Ts(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?r(e,Ne(t.line-1)):null:i>0&&t.ch==(n||Tt(e,t.line)).text.length?t.line<e.first+e.size-1?Ne(t.line+1,0):null:new Ne(t.line,t.ch+i)}function Rs(e){e.setSelection(Ne(e.firstLine(),0),Ne(e.lastLine()),Qe)}function Ds(e,t,i){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return i&&(n.update=function(o,s,l,f){o&&(n.from=r(e,o)),s&&(n.to=r(e,s)),l&&(n.text=l),f!==void 0&&(n.origin=f)}),Me(e,"beforeChange",e,n),e.cm&&Me(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Lr(e,t,i){if(e.cm){if(!e.cm.curOp)return fi(e.cm,Lr)(e,t,i);if(e.cm.state.suppressEdits)return}if((H(e,"beforeChange")||e.cm&&H(e.cm,"beforeChange"))&&(t=Ds(e,t,!0),!t))return;var n=ci&&!i&&ko(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)Ls(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else Ls(e,t)}function Ls(e,t){if(t.text.length==1&&t.text[0]==""&&_t(t.from,t.to)==0)return;var i=Tr(e,t);Cs(e,t,i,e.cm?e.cm.curOp.id:NaN),ia(e,t,i,lo(e,t));var n=[];ir(e,function(o,s){!s&&Be(n,o.history)==-1&&(_s(o.history,t),n.push(o.history)),ia(o,t,null,lo(o,t))})}function _a(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!i)return;for(var o=e.history,s,l=e.sel,f=t=="undo"?o.done:o.undone,m=t=="undo"?o.undone:o.done,v=0;v<f.length&&!(s=f[v],i?s.ranges&&!s.equals(e.sel):!s.ranges);v++);if(v==f.length)return;for(o.lastOrigin=o.lastSelOrigin=null;;)if(s=f.pop(),s.ranges){if(La(s,m),i&&!s.equals(e.sel)){zi(e,s,{clearRedo:!1});return}l=s}else if(n){f.push(s);return}else break;var I=[];La(l,m),m.push({changes:I,generation:o.generation}),o.generation=s.generation||++o.maxGeneration;for(var F=H(e,"beforeChange")||e.cm&&H(e.cm,"beforeChange"),de=function(Ge){var st=s.changes[Ge];if(st.origin=t,F&&!Ds(e,st,!1))return f.length=0,{};I.push(ns(e,st));var yt=Ge?Tr(e,st):it(f);ia(e,st,yt,xs(e,st)),!Ge&&e.cm&&e.cm.scrollIntoView({from:st.from,to:Ao(st)});var Ot=[];ir(e,function(bt,Nt){!Nt&&Be(Ot,bt.history)==-1&&(_s(bt.history,st),Ot.push(bt.history)),ia(bt,st,null,xs(bt,st))})},ne=s.changes.length-1;ne>=0;--ne){var De=de(ne);if(De)return De.v}}function Is(e,t){if(t==0)return;if(e.first+=t,e.sel=new Xi(kt(e.sel.ranges,function(o){return new Dn(Ne(o.anchor.line+t,o.anchor.ch),Ne(o.head.line+t,o.head.ch))}),e.sel.primIndex),e.cm){Un(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)qn(e.cm,n,"gutter")}}function ia(e,t,i,n){if(e.cm&&!e.cm.curOp)return fi(e.cm,ia)(e,t,i,n);if(t.to.line<e.first){Is(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 o=t.text.length-1-(e.first-t.from.line);Is(e,o),t={from:Ne(e.first,0),to:Ne(t.to.line+o,t.to.ch),text:[it(t.text)],origin:t.origin}}var s=e.lastLine();t.to.line>s&&(t={from:t.from,to:Ne(s,Tt(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ni(e,t.from,t.to),i||(i=Tr(e,t)),e.cm?Cl(e.cm,t,n):ts(e,t,n),Na(e,i,Qe),e.cantEdit&&Pa(e,Ne(e.firstLine(),0))&&(e.cantEdit=!1)}function Cl(e,t,i){var n=e.doc,o=e.display,s=t.from,l=t.to,f=!1,m=s.line;e.options.lineWrapping||(m=zt(_i(Tt(n,s.line))),n.iter(m,l.line+1,function(ne){if(ne==o.maxLine)return f=!0,!0})),n.sel.contains(t.from,t.to)>-1&&J(e),ts(n,t,i,ho(e)),e.options.lineWrapping||(n.iter(m,s.line+t.text.length,function(ne){var De=Jo(ne);De>o.maxLineLength&&(o.maxLine=ne,o.maxLineLength=De,o.maxLineChanged=!0,f=!1)}),f&&(e.curOp.updateMaxLine=!0)),Pi(n,s.line),fr(e,400);var v=t.text.length-(l.line-s.line)-1;t.full?Un(e):s.line==l.line&&t.text.length==1&&!gs(e.doc,t)?qn(e,s.line,"text"):Un(e,s.line,l.line+1,v);var I=H(e,"changes"),F=H(e,"change");if(F||I){var de={from:s,to:l,text:t.text,removed:t.removed,origin:t.origin};F&&ai(e,"change",e,de),I&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(de)}e.display.selForContextMenu=null}function Ir(e,t,i,n,o){var s;n||(n=i),_t(n,i)<0&&(s=[n,i],i=s[0],n=s[1]),typeof t=="string"&&(t=e.splitLines(t)),Lr(e,{from:i,to:n,text:t,origin:o})}function Ns(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Ps(e,t,i,n){for(var o=0;o<e.length;++o){var s=e[o],l=!0;if(s.ranges){s.copied||(s=e[o]=s.deepCopy(),s.copied=!0);for(var f=0;f<s.ranges.length;f++)Ns(s.ranges[f].anchor,t,i,n),Ns(s.ranges[f].head,t,i,n);continue}for(var m=0;m<s.changes.length;++m){var v=s.changes[m];if(i<v.from.line)v.from=Ne(v.from.line+n,v.from.ch),v.to=Ne(v.to.line+n,v.to.ch);else if(t<=v.to.line){l=!1;break}}l||(e.splice(0,o+1),o=0)}}function _s(e,t){var i=t.from.line,n=t.to.line,o=t.text.length-(n-i)-1;Ps(e.done,i,n,o),Ps(e.undone,i,n,o)}function oa(e,t,i,n){var o=t,s=t;return typeof t=="number"?s=Tt(e,d(e,t)):o=zt(t),o==null?null:(n(s,o)&&e.cm&&qn(e.cm,o,i),s)}function ra(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}ra.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,n=e+t;i<n;++i){var o=this.lines[i];this.height-=o.height,br(o),ai(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,i){for(var n=e+t;e<n;++e)if(i(this.lines[e]))return!0}};function aa(e){this.children=e;for(var t=0,i=0,n=0;n<e.length;++n){var o=e[n];t+=o.chunkSize(),i+=o.height,o.parent=this}this.size=t,this.height=i,this.parent=null}aa.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var n=this.children[i],o=n.chunkSize();if(e<o){var s=Math.min(t,o-e),l=n.height;if(n.removeInner(e,s),this.height-=l-n.height,o==s&&(this.children.splice(i--,1),n.parent=null),(t-=s)==0)break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ra))){var f=[];this.collapse(f),this.children=[new ra(f)],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,i){this.size+=t.length,this.height+=i;for(var n=0;n<this.children.length;++n){var o=this.children[n],s=o.chunkSize();if(e<=s){if(o.insertInner(e,t,i),o.lines&&o.lines.length>50){for(var l=o.lines.length%25+25,f=l;f<o.lines.length;){var m=new ra(o.lines.slice(f,f+=25));o.height-=m.height,this.children.splice(++n,0,m),m.parent=this}o.lines=o.lines.slice(0,l),this.maybeSpill()}break}e-=s}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new aa(t);if(e.parent){e.size-=i.size,e.height-=i.height;var o=Be(e.parent.children,e);e.parent.children.splice(o+1,0,i)}else{var n=new aa(e.children);n.parent=e,e.children=[n,i],e=n}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,i){for(var n=0;n<this.children.length;++n){var o=this.children[n],s=o.chunkSize();if(e<s){var l=Math.min(t,s-e);if(o.iterN(e,l,i))return!0;if((t-=l)==0)break;e=0}else e-=s}}};var sa=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};sa.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=zt(i);if(n==null||!t)return;for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(i.widgets=null);var s=Yo(this);In(i,Math.max(0,i.height-s)),e&&(Qi(e,function(){js(e,i,-s),qn(e,n,"widget")}),ai(e,"lineWidgetCleared",e,this,n))},sa.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var o=Yo(this)-t;if(!o)return;Ri(this.doc,n)||In(n,n.height+o),i&&Qi(i,function(){i.curOp.forceUpdate=!0,js(i,n,o),ai(i,"lineWidgetChanged",i,e,zt(n))})},K(sa);function js(e,t,i){no(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Xr(e,i)}function El(e,t,i,n){var o=new sa(e,i,n),s=e.cm;return s&&o.noHScroll&&(s.display.alignWidgets=!0),oa(e,t,"widget",function(l){var f=l.widgets||(l.widgets=[]);if(o.insertAt==null?f.push(o):f.splice(Math.min(f.length-1,Math.max(0,o.insertAt)),0,o),o.line=l,s&&!Ri(e,l)){var m=no(l)<e.scrollTop;In(l,l.height+Yo(o)),m&&Xr(s,o.height),s.curOp.forceUpdate=!0}return!0}),s&&ai(s,"lineWidgetAdded",s,o,typeof t=="number"?t:zt(t)),o}var Bs=0,or=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Bs};or.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Io(e),H(this,"clear")){var i=this.find();i&&ai(this,"clear",i.from,i.to)}for(var n=null,o=null,s=0;s<this.lines.length;++s){var l=this.lines[s],f=Zi(l.markedSpans,this);e&&!this.collapsed?qn(e,zt(l),"text"):e&&(f.to!=null&&(o=zt(l)),f.from!=null&&(n=zt(l))),l.markedSpans=bo(l.markedSpans,f),f.from==null&&this.collapsed&&!Ri(this.doc,l)&&e&&In(l,si(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var m=0;m<this.lines.length;++m){var v=_i(this.lines[m]),I=Jo(v);I>e.display.maxLineLength&&(e.display.maxLine=v,e.display.maxLineLength=I,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Un(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ms(e.doc)),e&&ai(e,"markerCleared",e,this,n,o),t&&Fo(e),this.parent&&this.parent.clear()},or.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,n,o=0;o<this.lines.length;++o){var s=this.lines[o],l=Zi(s.markedSpans,this);if(l.from!=null&&(i=Ne(t?s:zt(s),l.from),e==-1))return i;if(l.to!=null&&(n=Ne(t?s:zt(s),l.to),e==1))return n}return i&&{from:i,to:n}},or.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,n=this.doc.cm;if(!t||!n)return;Qi(n,function(){var o=t.line,s=zt(t.line),l=q(n,s);if(l&&(sn(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ri(i.doc,o)&&i.height!=null){var f=i.height;i.height=null;var m=Yo(i)-f;m&&In(o,o.height+m)}ai(n,"markerChanged",n,e)})},or.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Be(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},or.prototype.detachLine=function(e){if(this.lines.splice(Be(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},K(or);function Nr(e,t,i,n,o){if(n&&n.shared)return xl(e,t,i,n,o);if(e.cm&&!e.cm.curOp)return fi(e.cm,Nr)(e,t,i,n,o);var s=new or(e,o),l=_t(t,i);if(n&&y(n,s,!1),l>0||l==0&&s.clearWhenEmpty!==!1)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=ve("span",[s.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(oi(e,t.line,t,i,s)||t.line!=i.line&&oi(e,i.line,t,i,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");ti()}s.addToHistory&&Cs(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var f=t.line,m=e.cm,v;if(e.iter(f,i.line+1,function(F){m&&s.collapsed&&!m.options.lineWrapping&&_i(F)==m.display.maxLine&&(v=!0),s.collapsed&&f!=t.line&&In(F,0),vo(F,new so(s,f==t.line?t.ch:null,f==i.line?i.ch:null)),++f}),s.collapsed&&e.iter(t.line,i.line+1,function(F){Ri(e,F)&&In(F,0)}),s.clearOnEnter&&Se(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(Ui(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),s.collapsed&&(s.id=++Bs,s.atomic=!0),m){if(v&&(m.curOp.updateMaxLine=!0),s.collapsed)Un(m,t.line,i.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var I=t.line;I<=i.line;I++)qn(m,I,"text");s.atomic&&Ms(m.doc),ai(m,"markerAdded",m,s)}return s}var la=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};la.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ai(this,"clear")},la.prototype.find=function(e,t){return this.primary.find(e,t)},K(la);function xl(e,t,i,n,o){n=y(n),n.shared=!1;var s=[Nr(e,t,i,n,o)],l=s[0],f=n.widgetNode;return ir(e,function(m){f&&(n.widgetNode=f.cloneNode(!0)),s.push(Nr(m,r(m,t),r(m,i),n,o));for(var v=0;v<m.linked.length;++v)if(m.linked[v].isParent)return;l=it(s)}),new la(s,l)}function Us(e){return e.findMarks(Ne(e.first,0),e.clipPos(Ne(e.lastLine())),function(t){return t.parent})}function wl(e,t){for(var i=0;i<t.length;i++){var n=t[i],o=n.find(),s=e.clipPos(o.from),l=e.clipPos(o.to);if(_t(s,l)){var f=Nr(e,s,l,n.primary,n.primary.type);n.markers.push(f),f.parent=n}}}function Al(e){for(var t=function(n){var o=e[n],s=[o.primary.doc];ir(o.primary.doc,function(m){return s.push(m)});for(var l=0;l<o.markers.length;l++){var f=o.markers[l];Be(s,f.doc)==-1&&(f.parent=null,o.markers.splice(l--,1))}},i=0;i<e.length;i++)t(i)}var Sl=0,qi=function(e,t,i,n,o){if(!(this instanceof qi))return new qi(e,t,i,n,o);i==null&&(i=0),aa.call(this,[new ra([new jo("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var s=Ne(i,0);this.sel=wo(s),this.history=new Da(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=o=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:s,to:s,text:e}),zi(this,wo(s),Qe)};qi.prototype=At(aa.prototype,{constructor:qi,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,n=0;n<t.length;++n)i+=t[n].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ti(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:pi(function(e){var t=Ne(this.first,0),i=this.first+this.size-1;Lr(this,{from:t,to:Ne(i,Tt(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&$o(this.cm,0,0),zi(this,wo(t),Qe)}),replaceRange:function(e,t,i,n){t=r(this,t),i=i?r(this,i):t,Ir(this,e,t,i,n)},getRange:function(e,t,i){var n=Ni(this,r(this,e),r(this,t));return i===!1?n:n.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if($t(this,e))return Tt(this,e)},getLineNumber:function(e){return zt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Tt(this,e)),_i(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return r(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:pi(function(e,t,i){As(this,r(this,typeof e=="number"?Ne(e,t||0):e),null,i)}),setSelection:pi(function(e,t,i){As(this,r(this,e),r(this,t||e),i)}),extendSelection:pi(function(e,t,i){Ia(this,r(this,e),t&&r(this,t),i)}),extendSelections:pi(function(e,t){ws(this,u(this,e),t)}),extendSelectionsBy:pi(function(e,t){var i=kt(this.sel.ranges,e);ws(this,u(this,i),t)}),setSelections:pi(function(e,t,i){if(!e.length)return;for(var n=[],o=0;o<e.length;o++)n[o]=new Dn(r(this,e[o].anchor),r(this,e[o].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),zi(this,go(this.cm,n,t),i)}),addSelection:pi(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new Dn(r(this,e),r(this,t||e))),zi(this,go(this.cm,n,n.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,n=0;n<t.length;n++){var o=Ni(this,t[n].from(),t[n].to());i=i?i.concat(o):o}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,n=0;n<i.length;n++){var o=Ni(this,i[n].from(),i[n].to());e!==!1&&(o=o.join(e||this.lineSeparator())),t[n]=o}return t},replaceSelection:function(e,t,i){for(var n=[],o=0;o<this.sel.ranges.length;o++)n[o]=e;this.replaceSelections(n,t,i||"+input")},replaceSelections:pi(function(e,t,i){for(var n=[],o=this.sel,s=0;s<o.ranges.length;s++){var l=o.ranges[s];n[s]={from:l.from(),to:l.to(),text:this.splitLines(e[s]),origin:i}}for(var f=t&&t!="end"&&Ra(this,n,t),m=n.length-1;m>=0;m--)Lr(this,n[m]);f?Ss(this,f):this.cm&&qo(this.cm)}),undo:pi(function(){_a(this,"undo")}),redo:pi(function(){_a(this,"redo")}),undoSelection:pi(function(){_a(this,"undo",!0)}),redoSelection:pi(function(){_a(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Da(this.history.maxGeneration),ir(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:Rr(this.history.done),undone:Rr(this.history.undone)}},setHistory:function(e){var t=this.history=new Da(this.history.maxGeneration);t.done=Rr(e.done.slice(0),null,!0),t.undone=Rr(e.undone.slice(0),null,!0)},setGutterMarker:pi(function(e,t,i){return oa(this,e,"gutter",function(n){var o=n.gutterMarkers||(n.gutterMarkers={});return o[t]=i,!i&&dt(o)&&(n.gutterMarkers=null),!0})}),clearGutter:pi(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&oa(t,i,"gutter",function(){return i.gutterMarkers[e]=null,dt(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!$t(this,e))return null;if(t=e,e=Tt(this,e),!e)return null}else if(t=zt(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:pi(function(e,t,i){return oa(this,e,t=="gutter"?"gutter":"class",function(n){var o=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[o])n[o]=i;else{if(ue(i).test(n[o]))return!1;n[o]+=" "+i}return!0})}),removeLineClass:pi(function(e,t,i){return oa(this,e,t=="gutter"?"gutter":"class",function(n){var o=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",s=n[o];if(s)if(i==null)n[o]=null;else{var l=s.match(ue(i));if(!l)return!1;var f=l.index+l[0].length;n[o]=s.slice(0,l.index)+(!l.index||f==s.length?"":" ")+s.slice(f)||null}else return!1;return!0})}),addLineWidget:pi(function(e,t,i){return El(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return Nr(this,r(this,e),r(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=r(this,e),Nr(this,e,e,i,"bookmark")},findMarksAt:function(e){e=r(this,e);var t=[],i=Tt(this,e.line).markedSpans;if(i)for(var n=0;n<i.length;++n){var o=i[n];(o.from==null||o.from<=e.ch)&&(o.to==null||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,i){e=r(this,e),t=r(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,function(s){var l=s.markedSpans;if(l)for(var f=0;f<l.length;f++){var m=l[f];!(m.to!=null&&o==e.line&&e.ch>=m.to||m.from==null&&o!=e.line||m.from!=null&&o==t.line&&m.from>=t.ch)&&(!i||i(m.marker))&&n.push(m.marker.parent||m.marker)}++o}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var n=0;n<i.length;++n)i[n].from!=null&&e.push(i[n].marker)}),e},posFromIndex:function(e){var t,i=this.first,n=this.lineSeparator().length;return this.iter(function(o){var s=o.text.length+n;if(s>e)return t=e,!0;e-=s,++i}),r(this,Ne(i,t))},indexFromPos:function(e){e=r(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+i}),t},copy:function(e){var t=new qi(Ti(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var n=new qi(Ti(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wl(n,Us(this)),n},unlinkDoc:function(e){if(e instanceof $n&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Al(Us(this));break}if(e.history==this.history){var n=[e.id];ir(e,function(o){return n.push(o.id)},!0),e.history=new Da(null),e.history.done=Rr(this.history.done,n),e.history.undone=Rr(this.history.undone,n)}},iterLinkedDocs:function(e){ir(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Pt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:pi(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)})}),qi.prototype.eachLine=qi.prototype.iter;var Fs=0;function kl(e){var t=this;if(Ws(t),Xe(t,e)||Eo(t.display,e))return;C(e),P&&(Fs=+new Date);var i=Ai(t,e,!0),n=e.dataTransfer.files;if(!i||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var o=n.length,s=Array(o),l=0,f=function(){++l==o&&fi(t,function(){i=r(t.doc,i);var ne={from:i,to:i,text:t.doc.splitLines(s.filter(function(De){return De!=null}).join(t.doc.lineSeparator())),origin:"paste"};Lr(t.doc,ne),Ss(t.doc,wo(r(t.doc,i),r(t.doc,Ao(ne))))})()},m=function(ne,De){if(t.options.allowDropFileTypes&&Be(t.options.allowDropFileTypes,ne.type)==-1){f();return}var Ge=new FileReader;Ge.onerror=function(){return f()},Ge.onload=function(){var st=Ge.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(st)){f();return}s[De]=st,f()},Ge.readAsText(ne)},v=0;v<n.length;v++)m(n[v],v);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var I=e.dataTransfer.getData("Text");if(I){var F;if(t.state.draggingText&&!t.state.draggingText.copy&&(F=t.listSelections()),Na(t.doc,wo(i,i)),F)for(var de=0;de<F.length;++de)Ir(t.doc,"",F[de].anchor,F[de].head,"drag");t.replaceSelection(I,"around","paste"),t.display.input.focus()}}catch(ne){}}}function Ml(e,t){if(P&&(!e.state.draggingText||+new Date-Fs<100)){T(t);return}if(Xe(e,t)||Eo(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ce){var i=M("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",V&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),V&&i.parentNode.removeChild(i)}}function Ol(e,t){var i=Ai(e,t);if(!i)return;var n=document.createDocumentFragment();Ro(e,i,n),e.display.dragCursor||(e.display.dragCursor=M("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),pe(e.display.dragCursor,n)}function Ws(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function zs(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),i=[],n=0;n<t.length;n++){var o=t[n].CodeMirror;o&&i.push(o)}i.length&&i[0].operation(function(){for(var s=0;s<i.length;s++)e(i[s])})}var Hs=!1;function Tl(){if(Hs)return;Rl(),Hs=!0}function Rl(){var e;Se(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,zs(Dl)},100))}),Se(window,"blur",function(){return zs(Zo)})}function Dl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var rr={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"},ua=0;ua<10;ua++)rr[ua+48]=rr[ua+96]=String(ua);for(var ja=65;ja<=90;ja++)rr[ja]=String.fromCharCode(ja);for(var ca=1;ca<=12;ca++)rr[ca+111]=rr[ca+63235]="F"+ca;var Ho={};Ho.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"},Ho.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"},Ho.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"},Ho.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"]},Ho.default=te?Ho.macDefault:Ho.pcDefault;function Ll(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,n,o,s,l=0;l<t.length-1;l++){var f=t[l];if(/^(cmd|meta|m)$/i.test(f))s=!0;else if(/^a(lt)?$/i.test(f))i=!0;else if(/^(c|ctrl|control)$/i.test(f))n=!0;else if(/^s(hift)?$/i.test(f))o=!0;else throw new Error("Unrecognized modifier name: "+f)}return i&&(e="Alt-"+e),n&&(e="Ctrl-"+e),s&&(e="Cmd-"+e),o&&(e="Shift-"+e),e}function Il(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(n=="..."){delete e[i];continue}for(var o=kt(i.split(" "),Ll),s=0;s<o.length;s++){var l=void 0,f=void 0;s==o.length-1?(f=o.join(" "),l=n):(f=o.slice(0,s+1).join(" "),l="...");var m=t[f];if(!m)t[f]=l;else if(m!=l)throw new Error("Inconsistent bindings for "+f)}delete e[i]}for(var v in t)e[v]=t[v];return e}function Pr(e,t,i,n){t=Ba(t);var o=t.call?t.call(e,n):t[e];if(o===!1)return"nothing";if(o==="...")return"multi";if(o!=null&&i(o))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Pr(e,t.fallthrough,i,n);for(var s=0;s<t.fallthrough.length;s++){var l=Pr(e,t.fallthrough[s],i,n);if(l)return l}}}function Vs(e){var t=typeof e=="string"?e:rr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Gs(e,t,i){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(he?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(he?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Ks(e,t){if(V&&e.keyCode==34&&e.char)return!1;var i=rr[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),Gs(i,e,t))}function Ba(e){return typeof e=="string"?Ho[e]:e}function _r(e,t){for(var i=e.doc.sel.ranges,n=[],o=0;o<i.length;o++){for(var s=t(i[o]);n.length&&_t(s.from,it(n).to)<=0;){var l=n.pop();if(_t(l.from,s.from)<0){s.from=l.from;break}}n.push(s)}Qi(e,function(){for(var f=n.length-1;f>=0;f--)Ir(e.doc,"",n[f].from,n[f].to,"+delete");qo(e)})}function rs(e,t,i){var n=Ze(e.text,t+i,i);return n<0||n>e.text.length?null:n}function as(e,t,i){var n=rs(e,t.ch,i);return n==null?null:new Ne(t.line,n,i<0?"after":"before")}function ss(e,t,i,n,o){if(e){t.doc.direction=="rtl"&&(o=-o);var s=ft(i,t.doc.direction);if(s){var l=o<0?it(s):s[0],f=o<0==(l.level==1),m=f?"after":"before",v;if(l.level>0||t.doc.direction=="rtl"){var I=Q(t,i);v=o<0?i.text.length-1:0;var F=ie(t,I,v).top;v=Lt(function(de){return ie(t,I,de).top==F},o<0==(l.level==1)?l.from:l.to-1,v),m=="before"&&(v=rs(i,v,1))}else v=o<0?l.to:l.from;return new Ne(n,v,m)}}return new Ne(n,o<0?i.text.length:0,o<0?"before":"after")}function Nl(e,t,i,n){var o=ft(t,e.doc.direction);if(!o)return as(t,i,n);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var s=rt(o,i.ch,i.sticky),l=o[s];if(e.doc.direction=="ltr"&&l.level%2==0&&(n>0?l.to>i.ch:l.from<i.ch))return as(t,i,n);var f=function(yt,Ot){return rs(t,yt instanceof Ne?yt.ch:yt,Ot)},m,v=function(yt){return e.options.lineWrapping?(m=m||Q(e,t),jt(e,t,m,yt)):{begin:0,end:t.text.length}},I=v(i.sticky=="before"?f(i,-1):i.ch);if(e.doc.direction=="rtl"||l.level==1){var F=l.level==1==n<0,de=f(i,F?1:-1);if(de!=null&&(F?de<=l.to&&de<=I.end:de>=l.from&&de>=I.begin)){var ne=F?"before":"after";return new Ne(i.line,de,ne)}}var De=function(yt,Ot,bt){for(var Nt=function(Hn,Di){return Di?new Ne(i.line,f(Hn,1),"before"):new Ne(i.line,Hn,"after")};yt>=0&&yt<o.length;yt+=Ot){var Xt=o[yt],Gt=Ot>0==(Xt.level!=1),dn=Gt?bt.begin:f(bt.end,-1);if(Xt.from<=dn&&dn<Xt.to)return Nt(dn,Gt);if(dn=Gt?Xt.from:f(Xt.to,-1),bt.begin<=dn&&dn<bt.end)return Nt(dn,Gt)}},Ge=De(s+n,n,I);if(Ge)return Ge;var st=n>0?I.end:f(I.begin,-1);return st!=null&&!(n>0&&st==t.text.length)&&(Ge=De(n>0?0:o.length-1,n,v(st)),Ge)?Ge:null}var da={selectAll:Rs,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Qe)},killLine:function(e){return _r(e,function(t){if(t.empty()){var i=Tt(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:Ne(t.head.line+1,0)}:{from:t.head,to:Ne(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return _r(e,function(t){return{from:Ne(t.from().line,0),to:r(e.doc,Ne(t.to().line+1,0))}})},delLineLeft:function(e){return _r(e,function(t){return{from:Ne(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return _r(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return _r(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Ne(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Ne(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Qs(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Js(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 i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},Ue)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},Ue)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return n.ch<e.getLine(n.line).search(/\S/)?Js(e,t.head):n},Ue)},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=[],i=e.listSelections(),n=e.options.tabSize,o=0;o<i.length;o++){var s=i[o].from(),l=le(e.getLine(s.line),s.ch,n);t.push(D(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Qi(e,function(){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var o=t[n].head,s=Tt(e.doc,o.line).text;if(s){if(o.ch==s.length&&(o=new Ne(o.line,o.ch-1)),o.ch>0)o=new Ne(o.line,o.ch+1),e.replaceRange(s.charAt(o.ch-1)+s.charAt(o.ch-2),Ne(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var l=Tt(e.doc,o.line-1).text;l&&(o=new Ne(o.line,1),e.replaceRange(s.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),Ne(o.line-1,l.length-1),o,"+transpose"))}}i.push(new Dn(o,o))}e.setSelections(i)})},newlineAndIndent:function(e){return Qi(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);qo(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Qs(e,t){var i=Tt(e.doc,t),n=_i(i);return n!=i&&(t=zt(n)),ss(!0,e,n,t,1)}function Pl(e,t){var i=Tt(e.doc,t),n=Ko(i);return n!=i&&(t=zt(n)),ss(!0,e,i,t,-1)}function Js(e,t){var i=Qs(e,t.line),n=Tt(e.doc,i.line),o=ft(n,e.doc.direction);if(!o||o[0].level==0){var s=Math.max(i.ch,n.text.search(/\S/)),l=t.line==i.line&&t.ch<=s&&t.ch;return Ne(i.line,l?0:s,i.sticky)}return i}function Ua(e,t,i){if(typeof t=="string"&&(t=da[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),o=t(e)!=xt}finally{e.display.shift=n,e.state.suppressEdits=!1}return o}function _l(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var o=Pr(t,e.state.keyMaps[n],i,e);if(o)return o}return e.options.extraKeys&&Pr(t,e.options.extraKeys,i,e)||Pr(t,e.options.keyMap,i,e)}var jl=new je;function ha(e,t,i,n){var o=e.state.keySeq;if(o){if(Vs(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:jl.set(50,function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())}),Xs(e,o+" "+t,i,n))return!0}return Xs(e,t,i,n)}function Xs(e,t,i,n){var o=_l(e,t,n);return o=="multi"&&(e.state.keySeq=t),o=="handled"&&ai(e,"keyHandled",e,t,i),(o=="handled"||o=="multi")&&(C(i),Si(e)),!!o}function Ys(e,t){var i=Ks(t,!0);return i?t.shiftKey&&!e.state.keySeq?ha(e,"Shift-"+i,t,function(n){return Ua(e,n,!0)})||ha(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Ua(e,n)}):ha(e,i,t,function(n){return Ua(e,n)}):!1}function Bl(e,t,i){return ha(e,"'"+i+"'",t,function(n){return Ua(e,n,!0)})}var ls=null;function Zs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=Ee(),Xe(t,e))return;P&&$<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=Ys(t,e);V&&(ls=n?i:null,!n&&i==88&&!an&&(te?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),me&&!te&&!n&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Ul(t)}function Ul(e){var t=e.display.lineDiv;Re(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&(ge(t,"CodeMirror-crosshair"),pt(document,"keyup",i),pt(document,"mouseover",i))}Se(document,"keyup",i),Se(document,"mouseover",i)}function qs(e){e.keyCode==16&&(this.doc.sel.shift=!1),Xe(this,e)}function $s(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Eo(t.display,e)||Xe(t,e)||e.ctrlKey&&!e.altKey||te&&e.metaKey)return;var i=e.keyCode,n=e.charCode;if(V&&i==ls){ls=null,C(e);return}if(V&&(!e.which||e.which<10)&&Ys(t,e))return;var o=String.fromCharCode(n==null?i:n);if(o=="\b")return;if(Bl(t,e,o))return;t.display.input.onKeyPress(e)}var Fl=400,us=function(e,t,i){this.time=e,this.pos=t,this.button=i};us.prototype.compare=function(e,t,i){return this.time+Fl>e&&_t(t,this.pos)==0&&i==this.button};var fa,pa;function Wl(e,t){var i=+new Date;return pa&&pa.compare(i,e,t)?(fa=pa=null,"triple"):fa&&fa.compare(i,e,t)?(pa=new us(i,e,t),fa=null,"double"):(fa=new us(i,e,t),pa=null,"single")}function el(e){var t=this,i=t.display;if(Xe(t,e)||i.activeTouch&&i.input.supportsTouch())return;if(i.input.ensurePolled(),i.shift=e.shiftKey,Eo(i,e)){ce||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(cs(t,e))return;var n=Ai(t,e),o=X(e),s=n?Wl(n,o):"single";if(window.focus(),o==1&&t.state.selectingText&&t.state.selectingText(e),n&&zl(t,o,n,s,e))return;o==1?n?Vl(t,n,s,e):ae(e)==i.scroller&&C(e):o==2?(n&&Ia(t.doc,n),setTimeout(function(){return i.input.focus()},20)):o==3&&(He?t.display.input.onContextMenu(e):Kr(t))}function zl(e,t,i,n,o){var s="Click";return n=="double"?s="Double"+s:n=="triple"&&(s="Triple"+s),s=(t==1?"Left":t==2?"Middle":"Right")+s,ha(e,Gs(s,o),o,function(l){if(typeof l=="string"&&(l=da[l]),!l)return!1;var f=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),f=l(e,i)!=xt}finally{e.state.suppressEdits=!1}return f})}function Hl(e,t,i){var n=e.getOption("configureMouse"),o=n?n(e,t,i):{};if(o.unit==null){var s=Ae?i.shiftKey&&i.metaKey:i.altKey;o.unit=s?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(o.extend==null||e.doc.extend)&&(o.extend=e.doc.extend||i.shiftKey),o.addNew==null&&(o.addNew=te?i.metaKey:i.ctrlKey),o.moveOnDrag==null&&(o.moveOnDrag=!(te?i.altKey:i.ctrlKey)),o}function Vl(e,t,i,n){P?setTimeout(O(xa,e),0):e.curOp.focus=Ee();var o=Hl(e,i,n),s=e.doc.sel,l;e.options.dragDrop&&Le&&!e.isReadOnly()&&i=="single"&&(l=s.contains(t))>-1&&(_t((l=s.ranges[l]).from(),t)<0||t.xRel>0)&&(_t(l.to(),t)>0||t.xRel<0)?Gl(e,n,t,o):Kl(e,n,t,o)}function Gl(e,t,i,n){var o=e.display,s=!1,l=fi(e,function(v){ce&&(o.scroller.draggable=!1),e.state.draggingText=!1,pt(o.wrapper.ownerDocument,"mouseup",l),pt(o.wrapper.ownerDocument,"mousemove",f),pt(o.scroller,"dragstart",m),pt(o.scroller,"drop",l),s||(C(v),n.addNew||Ia(e.doc,i,null,null,n.extend),ce&&!Ce||P&&$==9?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),f=function(v){s=s||Math.abs(t.clientX-v.clientX)+Math.abs(t.clientY-v.clientY)>=10},m=function(){return s=!0};ce&&(o.scroller.draggable=!0),e.state.draggingText=l,l.copy=!n.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop(),Se(o.wrapper.ownerDocument,"mouseup",l),Se(o.wrapper.ownerDocument,"mousemove",f),Se(o.scroller,"dragstart",m),Se(o.scroller,"drop",l),Kr(e),setTimeout(function(){return o.input.focus()},20)}function tl(e,t,i){if(i=="char")return new Dn(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Dn(Ne(t.line,0),r(e.doc,Ne(t.line+1,0)));var n=i(e,t);return new Dn(n.from,n.to)}function Kl(e,t,i,n){var o=e.display,s=e.doc;C(t);var l,f,m=s.sel,v=m.ranges;if(n.addNew&&!n.extend?(f=s.sel.contains(i),f>-1?l=v[f]:l=new Dn(i,i)):(l=s.sel.primary(),f=s.sel.primIndex),n.unit=="rectangle")n.addNew||(l=new Dn(i,i)),i=Ai(e,t,!0,!0),f=-1;else{var I=tl(e,i,n.unit);n.extend?l=is(l,I.anchor,I.head,n.extend):l=I}n.addNew?f==-1?(f=v.length,zi(s,go(e,v.concat([l]),f),{scroll:!1,origin:"*mouse"})):v.length>1&&v[f].empty()&&n.unit=="char"&&!n.extend?(zi(s,go(e,v.slice(0,f).concat(v.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),m=s.sel):os(s,f,l,Je):(f=0,zi(s,new Xi([l],0),Je),m=s.sel);var F=i;function de(bt){if(_t(F,bt)==0)return;if(F=bt,n.unit=="rectangle"){for(var Nt=[],Xt=e.options.tabSize,Gt=le(Tt(s,i.line).text,i.ch,Xt),dn=le(Tt(s,bt.line).text,bt.ch,Xt),Hn=Math.min(Gt,dn),Di=Math.max(Gt,dn),ri=Math.min(i.line,bt.line),oo=Math.min(e.lastLine(),Math.max(i.line,bt.line));ri<=oo;ri++){var $i=Tt(s,ri).text,bi=Ve($i,Hn,Xt);Hn==Di?Nt.push(new Dn(Ne(ri,bi),Ne(ri,bi))):$i.length>bi&&Nt.push(new Dn(Ne(ri,bi),Ne(ri,Ve($i,Di,Xt))))}Nt.length||Nt.push(new Dn(i,i)),zi(s,go(e,m.ranges.slice(0,f).concat(Nt),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(bt)}else{var eo=l,Bi=tl(e,bt,n.unit),Oi=eo.anchor,Ci;_t(Bi.anchor,Oi)>0?(Ci=Bi.head,Oi=ao(eo.from(),Bi.anchor)):(Ci=Bi.anchor,Oi=ro(eo.to(),Bi.head));var li=m.ranges.slice(0);li[f]=Ql(e,new Dn(r(s,Oi),Ci)),zi(s,go(e,li,f),Je)}}var ne=o.wrapper.getBoundingClientRect(),De=0;function Ge(bt){var Nt=++De,Xt=Ai(e,bt,!0,n.unit=="rectangle");if(!Xt)return;if(_t(Xt,F)!=0){e.curOp.focus=Ee(),de(Xt);var Gt=xr(o,s);(Xt.line>=Gt.to||Xt.line<Gt.from)&&setTimeout(fi(e,function(){De==Nt&&Ge(bt)}),150)}else{var dn=bt.clientY<ne.top?-20:bt.clientY>ne.bottom?20:0;dn&&setTimeout(fi(e,function(){if(De!=Nt)return;o.scroller.scrollTop+=dn,Ge(bt)}),50)}}function st(bt){e.state.selectingText=!1,De=Infinity,bt&&(C(bt),o.input.focus()),pt(o.wrapper.ownerDocument,"mousemove",yt),pt(o.wrapper.ownerDocument,"mouseup",Ot),s.history.lastSelOrigin=null}var yt=fi(e,function(bt){bt.buttons===0||!X(bt)?st(bt):Ge(bt)}),Ot=fi(e,st);e.state.selectingText=Ot,Se(o.wrapper.ownerDocument,"mousemove",yt),Se(o.wrapper.ownerDocument,"mouseup",Ot)}function Ql(e,t){var i=t.anchor,n=t.head,o=Tt(e.doc,i.line);if(_t(i,n)==0&&i.sticky==n.sticky)return t;var s=ft(o);if(!s)return t;var l=rt(s,i.ch,i.sticky),f=s[l];if(f.from!=i.ch&&f.to!=i.ch)return t;var m=l+(f.from==i.ch==(f.level!=1)?0:1);if(m==0||m==s.length)return t;var v;if(n.line!=i.line)v=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var I=rt(s,n.ch,n.sticky),F=I-l||(n.ch-i.ch)*(f.level==1?-1:1);I==m-1||I==m?v=F<0:v=F>0}var de=s[m+(v?-1:0)],ne=v==(de.level==1),De=ne?de.from:de.to,Ge=ne?"after":"before";return i.ch==De&&i.sticky==Ge?t:new Dn(new Ne(i.line,De,Ge),n)}function nl(e,t,i,n){var o,s;if(t.touches)o=t.touches[0].clientX,s=t.touches[0].clientY;else try{o=t.clientX,s=t.clientY}catch(de){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&C(t);var l=e.display,f=l.lineDiv.getBoundingClientRect();if(s>f.bottom||!H(e,i))return A(t);s-=f.top-l.viewOffset;for(var m=0;m<e.display.gutterSpecs.length;++m){var v=l.gutters.childNodes[m];if(v&&v.getBoundingClientRect().right>=o){var I=En(e.doc,s),F=e.display.gutterSpecs[m];return Me(e,i,e,I,F.className,t),A(t)}}}function cs(e,t){return nl(e,t,"gutterClick",!0)}function il(e,t){if(Eo(e.display,t)||Jl(e,t))return;if(Xe(e,t,"contextmenu"))return;He||e.display.input.onContextMenu(t)}function Jl(e,t){return H(e,"gutterContextMenu")?nl(e,t,"gutterContextMenu",!1):!1}function ol(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),nn(e)}var jr={toString:function(){return"CodeMirror.Init"}},rl={},Fa={};function Xl(e){var t=e.optionHandlers;function i(n,o,s,l){e.defaults[n]=o,s&&(t[n]=l?function(f,m,v){v!=jr&&s(f,m,v)}:s)}e.defineOption=i,e.Init=jr,i("value","",function(n,o){return n.setValue(o)},!0),i("mode",null,function(n,o){n.doc.modeOption=o,zo(n)},!0),i("indentUnit",2,zo,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){na(n),nn(n),Un(n)},!0),i("lineSeparator",null,function(n,o){if(n.doc.lineSep=o,!o)return;var s=[],l=n.doc.first;n.doc.iter(function(m){for(var v=0;;){var I=m.text.indexOf(o,v);if(I==-1)break;v=I+o.length,s.push(Ne(l,I))}l++});for(var f=s.length-1;f>=0;f--)Ir(n.doc,o,s[f],Ne(s[f].line,s[f].ch+o.length))}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,o,s){n.state.specialChars=new RegExp(o.source+(o.test(" ")?"":"| "),"g"),s!=jr&&n.refresh()}),i("specialCharPlaceholder",wn,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",k?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(n,o){return n.getInputField().spellcheck=o},!0),i("autocorrect",!1,function(n,o){return n.getInputField().autocorrect=o},!0),i("autocapitalize",!1,function(n,o){return n.getInputField().autocapitalize=o},!0),i("rtlMoveVisually",!Fe),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){ol(n),xo(n)},!0),i("keyMap","default",function(n,o,s){var l=Ba(o),f=s!=jr&&Ba(s);f&&f.detach&&f.detach(n,l),l.attach&&l.attach(n,f||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Zl,!0),i("gutters",[],function(n,o){n.display.gutterSpecs=Ji(o,n.options.lineNumbers),xo(n)},!0),i("fixedGutter",!0,function(n,o){n.display.gutters.style.left=o?Wi(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return Uo(n)},!0),i("scrollbarStyle","native",function(n){Sr(n),Uo(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),i("lineNumbers",!1,function(n,o){n.display.gutterSpecs=Ji(n.options.gutters,o),xo(n)},!0),i("firstLineNumber",1,xo,!0),i("lineNumberFormatter",function(n){return n},xo,!0),i("showCursorWhenSelecting",!1,jn,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,o){o=="nocursor"&&(Zo(n),n.display.input.blur()),n.display.input.readOnlyChanged(o)}),i("screenReaderLabel",null,function(n,o){o=o===""?null:o,n.display.input.screenReaderLabelChanged(o)}),i("disableInput",!1,function(n,o){o||n.display.input.reset()},!0),i("dragDrop",!0,Yl),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,jn,!0),i("singleCursorHeightPerLine",!0,jn,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,na,!0),i("addModeClass",!1,na,!0),i("pollInterval",100),i("undoDepth",200,function(n,o){return n.doc.history.undoDepth=o}),i("historyEventDelay",1250),i("viewportMargin",10,function(n){return n.refresh()},!0),i("maxHighlightLength",1e4,na,!0),i("moveInputWithCursor",!0,function(n,o){o||n.display.input.resetPosition()}),i("tabindex",null,function(n,o){return n.display.input.getField().tabIndex=o||""}),i("autofocus",null),i("direction","ltr",function(n,o){return n.doc.setDirection(o)},!0),i("phrases",null)}function Yl(e,t,i){var n=i&&i!=jr;if(!t!=!n){var o=e.display.dragFunctions,s=t?Se:pt;s(e.display.scroller,"dragstart",o.start),s(e.display.scroller,"dragenter",o.enter),s(e.display.scroller,"dragover",o.over),s(e.display.scroller,"dragleave",o.leave),s(e.display.scroller,"drop",o.drop)}}function Zl(e){e.options.lineWrapping?(Re(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ge(e.display.wrapper,"CodeMirror-wrap"),ur(e)),Ki(e),Un(e),nn(e),setTimeout(function(){return Uo(e)},100)}function $n(e,t){var i=this;if(!(this instanceof $n))return new $n(e,t);this.options=t=t?y(t):{},y(rl,t,!1);var n=t.value;typeof n=="string"?n=new qi(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new $n.inputStyles[t.inputStyle](this),s=this.display=new mr(e,n,o,t);s.wrapper.CodeMirror=this,ol(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Sr(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 je,keySeq:null,specialChars:null},t.autofocus&&!k&&s.input.focus(),P&&$<11&&setTimeout(function(){return i.display.input.reset(!0)},20),ql(this),Tl(),Io(this),this.curOp.forceUpdate=!0,vs(this,n),t.autofocus&&!k||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&Do(i)},20):Zo(this);for(var l in Fa)Fa.hasOwnProperty(l)&&Fa[l](this,t[l],jr);ki(this),t.finishInit&&t.finishInit(this);for(var f=0;f<ds.length;++f)ds[f](this);Fo(this),ce&&t.lineWrapping&&getComputedStyle(s.lineDiv).textRendering=="optimizelegibility"&&(s.lineDiv.style.textRendering="auto")}$n.defaults=rl,$n.optionHandlers=Fa;function ql(e){var t=e.display;Se(t.scroller,"mousedown",fi(e,el)),P&&$<11?Se(t.scroller,"dblclick",fi(e,function(m){if(Xe(e,m))return;var v=Ai(e,m);if(!v||cs(e,m)||Eo(e.display,m))return;C(m);var I=e.findWordAt(v);Ia(e.doc,I.anchor,I.head)})):Se(t.scroller,"dblclick",function(m){return Xe(e,m)||C(m)}),Se(t.scroller,"contextmenu",function(m){return il(e,m)}),Se(t.input.getField(),"contextmenu",function(m){t.scroller.contains(m.target)||il(e,m)});var i,n={end:0};function o(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function s(m){if(m.touches.length!=1)return!1;var v=m.touches[0];return v.radiusX<=1&&v.radiusY<=1}function l(m,v){if(v.left==null)return!0;var I=v.left-m.left,F=v.top-m.top;return I*I+F*F>20*20}Se(t.scroller,"touchstart",function(m){if(!Xe(e,m)&&!s(m)&&!cs(e,m)){t.input.ensurePolled(),clearTimeout(i);var v=+new Date;t.activeTouch={start:v,moved:!1,prev:v-n.end<=300?n:null},m.touches.length==1&&(t.activeTouch.left=m.touches[0].pageX,t.activeTouch.top=m.touches[0].pageY)}}),Se(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Se(t.scroller,"touchend",function(m){var v=t.activeTouch;if(v&&!Eo(t,m)&&v.left!=null&&!v.moved&&new Date-v.start<300){var I=e.coordsChar(t.activeTouch,"page"),F;!v.prev||l(v,v.prev)?F=new Dn(I,I):!v.prev.prev||l(v,v.prev.prev)?F=e.findWordAt(I):F=new Dn(Ne(I.line,0),r(e.doc,Ne(I.line+1,0))),e.setSelection(F.anchor,F.head),e.focus(),C(m)}o()}),Se(t.scroller,"touchcancel",o),Se(t.scroller,"scroll",function(){t.scroller.clientHeight&&(er(e,t.scroller.scrollTop),po(e,t.scroller.scrollLeft,!0),Me(e,"scroll",e))}),Se(t.scroller,"mousewheel",function(m){return ea(e,m)}),Se(t.scroller,"DOMMouseScroll",function(m){return ea(e,m)}),Se(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(m){Xe(e,m)||T(m)},over:function(m){Xe(e,m)||(Ol(e,m),T(m))},start:function(m){return Ml(e,m)},drop:fi(e,kl),leave:function(m){Xe(e,m)||Ws(e)}};var f=t.input.getField();Se(f,"keyup",function(m){return qs.call(e,m)}),Se(f,"keydown",fi(e,Zs)),Se(f,"keypress",fi(e,$s)),Se(f,"focus",function(m){return Do(e,m)}),Se(f,"blur",function(m){return Zo(e,m)})}var ds=[];$n.defineInitHook=function(e){return ds.push(e)};function ma(e,t,i,n){var o=e.doc,s;i==null&&(i="add"),i=="smart"&&(o.mode.indent?s=ut(e,t).state:i="prev");var l=e.options.tabSize,f=Tt(o,t),m=le(f.text,null,l);f.stateAfter&&(f.stateAfter=null);var v=f.text.match(/^\s*/)[0],I;if(!n&&!/\S/.test(f.text))I=0,i="not";else if(i=="smart"&&(I=o.mode.indent(s,f.text.slice(v.length),f.text),I==xt||I>150)){if(!n)return;i="prev"}i=="prev"?t>o.first?I=le(Tt(o,t-1).text,null,l):I=0:i=="add"?I=m+e.options.indentUnit:i=="subtract"?I=m-e.options.indentUnit:typeof i=="number"&&(I=m+i),I=Math.max(0,I);var F="",de=0;if(e.options.indentWithTabs)for(var ne=Math.floor(I/l);ne;--ne)de+=l,F+=" ";if(de<I&&(F+=D(I-de)),F!=v)return Ir(o,F,Ne(t,0),Ne(t,v.length),"+input"),f.stateAfter=null,!0;for(var De=0;De<o.sel.ranges.length;De++){var Ge=o.sel.ranges[De];if(Ge.head.line==t&&Ge.head.ch<v.length){var st=Ne(t,v.length);os(o,De,new Dn(st,st));break}}}var So=null;function Wa(e){So=e}function hs(e,t,i,n,o){var s=e.doc;e.display.shift=!1,n||(n=s.sel);var l=+new Date-200,f=o=="paste"||e.state.pasteIncoming>l,m=Pt(t),v=null;if(f&&n.ranges.length>1)if(So&&So.text.join(`
`)==t){if(n.ranges.length%So.text.length==0){v=[];for(var I=0;I<So.text.length;I++)v.push(s.splitLines(So.text[I]))}}else m.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(v=kt(m,function(yt){return[yt]}));for(var F=e.curOp.updateInput,de=n.ranges.length-1;de>=0;de--){var ne=n.ranges[de],De=ne.from(),Ge=ne.to();ne.empty()&&(i&&i>0?De=Ne(De.line,De.ch-i):e.state.overwrite&&!f?Ge=Ne(Ge.line,Math.min(Tt(s,Ge.line).text.length,Ge.ch+it(m).length)):f&&So&&So.lineWise&&So.text.join(`
`)==m.join(`
`)&&(De=Ge=Ne(De.line,0)));var st={from:De,to:Ge,text:v?v[de%v.length]:m,origin:o||(f?"paste":e.state.cutIncoming>l?"cut":"+input")};Lr(e.doc,st),ai(e,"inputRead",e,st)}t&&!f&&sl(e,t),qo(e),e.curOp.updateInput<2&&(e.curOp.updateInput=F),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function al(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Qi(t,function(){return hs(t,i,0,null,"paste")}),!0}function sl(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var i=e.doc.sel,n=i.ranges.length-1;n>=0;n--){var o=i.ranges[n];if(o.head.ch>100||n&&i.ranges[n-1].head.line==o.head.line)continue;var s=e.getModeAt(o.head),l=!1;if(s.electricChars){for(var f=0;f<s.electricChars.length;f++)if(t.indexOf(s.electricChars.charAt(f))>-1){l=ma(e,o.head.line,"smart");break}}else s.electricInput&&(s.electricInput.test(Tt(e.doc,o.head.line).text.slice(0,o.head.ch))&&(l=ma(e,o.head.line,"smart")));l&&ai(e,"electricInput",e,o.head.line)}}function ll(e){for(var t=[],i=[],n=0;n<e.doc.sel.ranges.length;n++){var o=e.doc.sel.ranges[n].head.line,s={anchor:Ne(o,0),head:Ne(o+1,0)};i.push(s),t.push(e.getRange(s.anchor,s.head))}return{text:t,ranges:i}}function ul(e,t,i,n){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function cl(){var e=M("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=M("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ce?e.style.width="1000px":e.setAttribute("wrap","off"),U&&(e.style.border="1px solid black"),ul(e),t}function $l(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,o){var s=this.options,l=s[n];if(s[n]==o&&n!="mode")return;s[n]=o,t.hasOwnProperty(n)&&fi(this,t[n])(this,o,l),Me(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,o){this.state.keyMaps[o?"push":"unshift"](Ba(n))},removeKeyMap:function(n){for(var o=this.state.keyMaps,s=0;s<o.length;++s)if(o[s]==n||o[s].name==n)return o.splice(s,1),!0},addOverlay:ji(function(n,o){var s=n.token?n:e.getMode(this.options,n);if(s.startState)throw new Error("Overlays may not be stateful.");Ut(this.state.overlays,{mode:s,modeSpec:n,opaque:o&&o.opaque,priority:o&&o.priority||0},function(l){return l.priority}),this.state.modeGen++,Un(this)}),removeOverlay:ji(function(n){for(var o=this.state.overlays,s=0;s<o.length;++s){var l=o[s].modeSpec;if(l==n||typeof n=="string"&&l.name==n){o.splice(s,1),this.state.modeGen++,Un(this);return}}}),indentLine:ji(function(n,o,s){typeof o!="string"&&typeof o!="number"&&(o==null?o=this.options.smartIndent?"smart":"prev":o=o?"add":"subtract"),$t(this.doc,n)&&ma(this,n,o,s)}),indentSelection:ji(function(n){for(var o=this.doc.sel.ranges,s=-1,l=0;l<o.length;l++){var f=o[l];if(f.empty())f.head.line>s&&(ma(this,f.head.line,n,!0),s=f.head.line,l==this.doc.sel.primIndex&&qo(this));else{var m=f.from(),v=f.to(),I=Math.max(s,m.line);s=Math.min(this.lastLine(),v.line-(v.ch?0:1))+1;for(var F=I;F<s;++F)ma(this,F,n);var de=this.doc.sel.ranges;m.ch==0&&o.length==de.length&&de[l].from().ch>0&&os(this.doc,l,new Dn(m,de[l].to()),Qe)}}}),getTokenAt:function(n,o){return Rt(this,n,o)},getLineTokens:function(n,o){return Rt(this,Ne(n),o,!0)},getTokenTypeAt:function(n){n=r(this.doc,n);var o=_e(this,Tt(this.doc,n.line)),s=0,l=(o.length-1)/2,f=n.ch,m;if(f==0)m=o[2];else for(;;){var v=s+l>>1;if((v?o[v*2-1]:0)>=f)l=v;else if(o[v*2+1]<f)s=v+1;else{m=o[v*2+2];break}}var I=m?m.indexOf("overlay "):-1;return I<0?m:I==0?null:m.slice(0,I-1)},getModeAt:function(n){var o=this.doc.mode;return o.innerMode?e.innerMode(o,this.getTokenAt(n).state).mode:o},getHelper:function(n,o){return this.getHelpers(n,o)[0]},getHelpers:function(n,o){var s=[];if(!i.hasOwnProperty(o))return s;var l=i[o],f=this.getModeAt(n);if(typeof f[o]=="string")l[f[o]]&&s.push(l[f[o]]);else if(f[o])for(var m=0;m<f[o].length;m++){var v=l[f[o][m]];v&&s.push(v)}else f.helperType&&l[f.helperType]?s.push(l[f.helperType]):l[f.name]&&s.push(l[f.name]);for(var I=0;I<l._global.length;I++){var F=l._global[I];F.pred(f,this)&&Be(s,F.val)==-1&&s.push(F.val)}return s},getStateAfter:function(n,o){var s=this.doc;return n=d(s,n==null?s.first+s.size-1:n),ut(this,n+1,o).state},cursorCoords:function(n,o){var s,l=this.doc.sel.primary();return n==null?s=l.head:typeof n=="object"?s=r(this.doc,n):s=n?l.from():l.to(),pn(this,s,o||"page")},charCoords:function(n,o){return Jn(this,r(this.doc,n),o||"page")},coordsChar:function(n,o){return n=fn(this,n,o||"page"),yn(this,n.left,n.top)},lineAtHeight:function(n,o){return n=fn(this,{top:n,left:0},o||"page").top,En(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,o,s){var l=!1,f;if(typeof n=="number"){var m=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>m&&(n=m,l=!0),f=Tt(this.doc,n)}else f=n;return An(this,f,{top:0,left:0},o||"page",s||l).top+(l?this.doc.height-no(f):0)},defaultTextHeight:function(){return si(this.display)},defaultCharWidth:function(){return wi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,o,s,l,f){var m=this.display;n=pn(this,r(this.doc,n));var v=n.bottom,I=n.left;if(o.style.position="absolute",o.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(o),m.sizer.appendChild(o),l=="over")v=n.top;else if(l=="above"||l=="near"){var F=Math.max(m.wrapper.clientHeight,this.doc.height),de=Math.max(m.sizer.clientWidth,m.lineSpace.clientWidth);(l=="above"||n.bottom+o.offsetHeight>F)&&n.top>o.offsetHeight?v=n.top-o.offsetHeight:n.bottom+o.offsetHeight<=F&&(v=n.bottom),I+o.offsetWidth>de&&(I=de-o.offsetWidth)}o.style.top=v+"px",o.style.left=o.style.right="",f=="right"?(I=m.sizer.clientWidth-o.offsetWidth,o.style.right="0px"):(f=="left"?I=0:f=="middle"&&(I=(m.sizer.clientWidth-o.offsetWidth)/2),o.style.left=I+"px"),s&&wa(this,{left:I,top:v,right:I+o.offsetWidth,bottom:v+o.offsetHeight})},triggerOnKeyDown:ji(Zs),triggerOnKeyPress:ji($s),triggerOnKeyUp:qs,triggerOnMouseDown:ji(el),execCommand:function(n){if(da.hasOwnProperty(n))return da[n].call(null,this)},triggerElectric:ji(function(n){sl(this,n)}),findPosH:function(n,o,s,l){var f=1;o<0&&(f=-1,o=-o);for(var m=r(this.doc,n),v=0;v<o&&!(m=fs(this.doc,m,f,s,l),m.hitSide);++v);return m},moveH:ji(function(n,o){var s=this;this.extendSelectionsBy(function(l){return s.display.shift||s.doc.extend||l.empty()?fs(s.doc,l.head,n,o,s.options.rtlMoveVisually):n<0?l.from():l.to()},Ue)}),deleteH:ji(function(n,o){var s=this.doc.sel,l=this.doc;s.somethingSelected()?l.replaceSelection("",null,"+delete"):_r(this,function(f){var m=fs(l,f.head,n,o,!1);return n<0?{from:m,to:f.head}:{from:f.head,to:m}})}),findPosV:function(n,o,s,l){var f=1,m=l;o<0&&(f=-1,o=-o);for(var v=r(this.doc,n),I=0;I<o;++I){var F=pn(this,v,"div");if(m==null?m=F.left:F.left=m,v=dl(this,F,f,s),v.hitSide)break}return v},moveV:ji(function(n,o){var s=this,l=this.doc,f=[],m=!this.display.shift&&!l.extend&&l.sel.somethingSelected();if(l.extendSelectionsBy(function(I){if(m)return n<0?I.from():I.to();var F=pn(s,I.head,"div");I.goalColumn!=null&&(F.left=I.goalColumn),f.push(F.left);var de=dl(s,F,n,o);return o=="page"&&I==l.sel.primary()&&Xr(s,Jn(s,de,"div").top-F.top),de},Ue),f.length)for(var v=0;v<l.sel.ranges.length;v++)l.sel.ranges[v].goalColumn=f[v]}),findWordAt:function(n){var o=this.doc,s=Tt(o,n.line).text,l=n.ch,f=n.ch;if(s){var m=this.getHelper(n,"wordChars");(n.sticky=="before"||f==s.length)&&l?--l:++f;for(var v=s.charAt(l),I=at(v,m)?function(F){return at(F,m)}:/\s/.test(v)?function(F){return/\s/.test(F)}:function(F){return!/\s/.test(F)&&!at(F)};l>0&&I(s.charAt(l-1));)--l;for(;f<s.length&&I(s.charAt(f));)++f}return new Dn(Ne(n.line,l),Ne(n.line,f))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?Re(this.display.cursorDiv,"CodeMirror-overwrite"):ge(this.display.cursorDiv,"CodeMirror-overwrite"),Me(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==Ee()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ji(function(n,o){$o(this,n,o)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Y(this)-this.display.barHeight,width:n.scrollWidth-Y(this)-this.display.barWidth,clientHeight:g(this),clientWidth:L(this)}},scrollIntoView:ji(function(n,o){n==null?(n={from:this.doc.sel.primary().head,to:null},o==null&&(o=this.options.cursorScrollMargin)):typeof n=="number"?n={from:Ne(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=o||0,n.from.line!=null?Xa(this,n):dr(this,n.from,n.to,n.margin)}),setSize:ji(function(n,o){var s=this,l=function(m){return typeof m=="number"||/^\d+$/.test(String(m))?m+"px":m};n!=null&&(this.display.wrapper.style.width=l(n)),o!=null&&(this.display.wrapper.style.height=l(o)),this.options.lineWrapping&&en(this);var f=this.display.viewFrom;this.doc.iter(f,this.display.viewTo,function(m){if(m.widgets){for(var v=0;v<m.widgets.length;v++)if(m.widgets[v].noHScroll){qn(s,f,"widget");break}}++f}),this.curOp.forceUpdate=!0,Me(this,"refresh",this)}),operation:function(n){return Qi(this,n)},startOperation:function(){return Io(this)},endOperation:function(){return Fo(this)},refresh:ji(function(){var n=this.display.cachedTextHeight;Un(this),this.curOp.forceUpdate=!0,nn(this),$o(this,this.doc.scrollLeft,this.doc.scrollTop),Mr(this.display),(n==null||Math.abs(n-si(this.display))>.5||this.options.lineWrapping)&&Ki(this),Me(this,"refresh",this)}),swapDoc:ji(function(n){var o=this.doc;return o.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,n),nn(this),this.display.input.reset(),$o(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,ai(this,"swapDoc",this,o),o}),phrase:function(n){var o=this.options.phrases;return o&&Object.prototype.hasOwnProperty.call(o,n)?o[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},K(e),e.registerHelper=function(n,o,s){i.hasOwnProperty(n)||(i[n]=e[n]={_global:[]}),i[n][o]=s},e.registerGlobalHelper=function(n,o,s,l){e.registerHelper(n,o,l),i[n]._global.push({pred:s,val:l})}}function fs(e,t,i,n,o){var s=t,l=i,f=Tt(e,t.line),m=o&&e.direction=="rtl"?-i:i;function v(){var Ot=t.line+m;return Ot<e.first||Ot>=e.first+e.size?!1:(t=new Ne(Ot,t.ch,t.sticky),f=Tt(e,Ot))}function I(Ot){var bt;if(n=="codepoint"){var Nt=f.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Nt)?bt=null:bt=new Ne(t.line,Math.max(0,Math.min(f.text.length,t.ch+i*(Nt>=55296&&Nt<56320?2:1))),-i)}else o?bt=Nl(e.cm,f,t,i):bt=as(f,t,i);if(bt==null)if(!Ot&&v())t=ss(o,e.cm,f,t.line,m);else return!1;else t=bt;return!0}if(n=="char"||n=="codepoint")I();else if(n=="column")I(!0);else if(n=="word"||n=="group")for(var F=null,de=n=="group",ne=e.cm&&e.cm.getHelper(t,"wordChars"),De=!0;!(i<0&&!I(!De));De=!1){var Ge=f.text.charAt(t.ch)||`
`,st=at(Ge,ne)?"w":de&&Ge==`
`?"n":!de||/\s/.test(Ge)?null:"p";if(de&&!De&&!st&&(st="s"),F&&F!=st){i<0&&(i=1,I(),t.sticky="after");break}if(st&&(F=st),i>0&&!I(!De))break}var yt=Pa(e,t,s,l,!0);return Kn(s,yt)&&(yt.hitSide=!0),yt}function dl(e,t,i,n){var o=e.doc,s=t.left,l;if(n=="page"){var f=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),m=Math.max(f-.5*si(e.display),3);l=(i>0?t.bottom:t.top)+i*m}else n=="line"&&(l=i>0?t.bottom+3:t.top-3);for(var v;!(v=yn(e,s,l),!v.outside);){if(i<0?l<=0:l>=o.height){v.hitSide=!0;break}l+=i*5}return v}var Fn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new je,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Fn.prototype.init=function(e){var t=this,i=this,n=i.cm,o=i.div=e.lineDiv;ul(o,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function s(f){for(var m=f.target;m;m=m.parentNode){if(m==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(m.className))break}return!1}Se(o,"paste",function(f){if(!s(f)||Xe(n,f)||al(f,n))return;$<=11&&setTimeout(fi(n,function(){return t.updateFromDOM()}),20)}),Se(o,"compositionstart",function(f){t.composing={data:f.data,done:!1}}),Se(o,"compositionupdate",function(f){t.composing||(t.composing={data:f.data,done:!1})}),Se(o,"compositionend",function(f){t.composing&&(f.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Se(o,"touchstart",function(){return i.forceCompositionEnd()}),Se(o,"input",function(){t.composing||t.readFromDOMSoon()});function l(f){if(!s(f)||Xe(n,f))return;if(n.somethingSelected())Wa({lineWise:!1,text:n.getSelections()}),f.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var m=ll(n);Wa({lineWise:!0,text:m.text}),f.type=="cut"&&n.operation(function(){n.setSelections(m.ranges,0,Qe),n.replaceSelection("",null,"cut")})}else return;if(f.clipboardData){f.clipboardData.clearData();var v=So.text.join(`
`);if(f.clipboardData.setData("Text",v),f.clipboardData.getData("Text")==v){f.preventDefault();return}}var I=cl(),F=I.firstChild;n.display.lineSpace.insertBefore(I,n.display.lineSpace.firstChild),F.value=So.text.join(`
`);var de=document.activeElement;et(F),setTimeout(function(){n.display.lineSpace.removeChild(I),de.focus(),de==o&&i.showPrimarySelection()},50)}Se(o,"copy",l),Se(o,"cut",l)},Fn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Fn.prototype.prepareSelection=function(){var e=yo(this.cm,!1);return e.focus=document.activeElement==this.div,e},Fn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Fn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),n=i.from(),o=i.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||o.line<t.display.viewFrom){e.removeAllRanges();return}var s=za(t,e.anchorNode,e.anchorOffset),l=za(t,e.focusNode,e.focusOffset);if(s&&!s.bad&&l&&!l.bad&&_t(ao(s,l),n)==0&&_t(ro(s,l),o)==0)return;var f=t.display.view,m=n.line>=t.display.viewFrom&&hl(t,n)||{node:f[0].measure.map[2],offset:0},v=o.line<t.display.viewTo&&hl(t,o);if(!v){var I=f[f.length-1].measure,F=I.maps?I.maps[I.maps.length-1]:I.map;v={node:F[F.length-1],offset:F[F.length-2]-F[F.length-3]}}if(!m||!v){e.removeAllRanges();return}var de=e.rangeCount&&e.getRangeAt(0),ne;try{ne=re(m.node,m.offset,v.offset,v.node)}catch(De){}ne&&(!me&&t.state.focused?(e.collapse(m.node,m.offset),ne.collapsed||(e.removeAllRanges(),e.addRange(ne))):(e.removeAllRanges(),e.addRange(ne)),de&&e.anchorNode==null?e.addRange(de):me&&this.startGracePeriod()),this.rememberSelection()},Fn.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)},Fn.prototype.showMultipleSelections=function(e){pe(this.cm.display.cursorDiv,e.cursors),pe(this.cm.display.selectionDiv,e.selection)},Fn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Fn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return B(this.div,t)},Fn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Fn.prototype.blur=function(){this.div.blur()},Fn.prototype.getField=function(){return this.div},Fn.prototype.supportsTouch=function(){return!0},Fn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Qi(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)},Fn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Fn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(R&&_&&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 i=za(t,e.anchorNode,e.anchorOffset),n=za(t,e.focusNode,e.focusOffset);i&&n&&Qi(t,function(){zi(t.doc,wo(i,n),Qe),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},Fn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),n=i.from(),o=i.to();if(n.ch==0&&n.line>e.firstLine()&&(n=Ne(n.line-1,Tt(e.doc,n.line-1).length)),o.ch==Tt(e.doc,o.line).text.length&&o.line<e.lastLine()&&(o=Ne(o.line+1,0)),n.line<t.viewFrom||o.line>t.viewTo-1)return!1;var s,l,f;n.line==t.viewFrom||(s=zn(e,n.line))==0?(l=zt(t.view[0].line),f=t.view[0].node):(l=zt(t.view[s].line),f=t.view[s-1].node.nextSibling);var m=zn(e,o.line),v,I;if(m==t.view.length-1?(v=t.viewTo-1,I=t.lineDiv.lastChild):(v=zt(t.view[m+1].line)-1,I=t.view[m+1].node.previousSibling),!f)return!1;for(var F=e.doc.splitLines(tu(e,f,I,l,v)),de=Ni(e.doc,Ne(l,0),Ne(v,Tt(e.doc,v).text.length));F.length>1&&de.length>1;)if(it(F)==it(de))F.pop(),de.pop(),v--;else if(F[0]==de[0])F.shift(),de.shift(),l++;else break;for(var ne=0,De=0,Ge=F[0],st=de[0],yt=Math.min(Ge.length,st.length);ne<yt&&Ge.charCodeAt(ne)==st.charCodeAt(ne);)++ne;for(var Ot=it(F),bt=it(de),Nt=Math.min(Ot.length-(F.length==1?ne:0),bt.length-(de.length==1?ne:0));De<Nt&&Ot.charCodeAt(Ot.length-De-1)==bt.charCodeAt(bt.length-De-1);)++De;if(F.length==1&&de.length==1&&l==n.line)for(;ne&&ne>n.ch&&Ot.charCodeAt(Ot.length-De-1)==bt.charCodeAt(bt.length-De-1);)ne--,De++;F[F.length-1]=Ot.slice(0,Ot.length-De).replace(/^\u200b+/,""),F[0]=F[0].slice(ne).replace(/\u200b+$/,"");var Xt=Ne(l,ne),Gt=Ne(v,de.length?it(de).length-De:0);if(F.length>1||F[0]||_t(Xt,Gt))return Ir(e.doc,F,Xt,Gt,"+input"),!0},Fn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fn.prototype.reset=function(){this.forceCompositionEnd()},Fn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Fn.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)},Fn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Qi(this.cm,function(){return Un(e.cm)})},Fn.prototype.setUneditable=function(e){e.contentEditable="false"},Fn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||fi(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Fn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Fn.prototype.onContextMenu=function(){},Fn.prototype.resetPosition=function(){},Fn.prototype.needsContentAttribute=!0;function hl(e,t){var i=q(e,t.line);if(!i||i.hidden)return null;var n=Tt(e.doc,t.line),o=b(i,n,t.line),s=ft(n,e.doc.direction),l="left";if(s){var f=rt(s,t.ch);l=f%2?"right":"left"}var m=$e(o.map,t.ch,l);return m.offset=m.collapse=="right"?m.end:m.start,m}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Br(e,t){return t&&(e.bad=!0),e}function tu(e,t,i,n,o){var s="",l=!1,f=e.doc.lineSeparator(),m=!1;function v(ne){return function(De){return De.id==ne}}function I(){l&&(s+=f,m&&(s+=f),l=m=!1)}function F(ne){ne&&(I(),s+=ne)}function de(ne){if(ne.nodeType==1){var De=ne.getAttribute("cm-text");if(De){F(De);return}var Ge=ne.getAttribute("cm-marker"),st;if(Ge){var yt=e.findMarks(Ne(n,0),Ne(o+1,0),v(+Ge));yt.length&&(st=yt[0].find(0))&&F(Ni(e.doc,st.from,st.to).join(f));return}if(ne.getAttribute("contenteditable")=="false")return;var Ot=/^(pre|div|p|li|table|br)$/i.test(ne.nodeName);if(!/^br$/i.test(ne.nodeName)&&ne.textContent.length==0)return;Ot&&I();for(var bt=0;bt<ne.childNodes.length;bt++)de(ne.childNodes[bt]);/^(pre|p)$/i.test(ne.nodeName)&&(m=!0),Ot&&(l=!0)}else ne.nodeType==3&&F(ne.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(de(t),t==i);)t=t.nextSibling,m=!1;return s}function za(e,t,i){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[i],!n)return Br(e.clipPos(Ne(e.display.viewTo-1)),!0);t=null,i=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var s=e.display.view[o];if(s.node==n)return nu(s,t,i)}}function nu(e,t,i){var n=e.text.firstChild,o=!1;if(!t||!B(n,t))return Br(Ne(zt(e.line),0),!0);if(t==n&&(o=!0,t=n.childNodes[i],i=0,!t)){var s=e.rest?it(e.rest):e.line;return Br(Ne(zt(s),s.text.length),o)}var l=t.nodeType==3?t:null,f=t;for(!l&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(l=t.firstChild,i&&(i=l.nodeValue.length));f.parentNode!=n;)f=f.parentNode;var m=e.measure,v=m.maps;function I(st,yt,Ot){for(var bt=-1;bt<(v?v.length:0);bt++)for(var Nt=bt<0?m.map:v[bt],Xt=0;Xt<Nt.length;Xt+=3){var Gt=Nt[Xt+2];if(Gt==st||Gt==yt){var dn=zt(bt<0?e.line:e.rest[bt]),Hn=Nt[Xt]+Ot;return(Ot<0||Gt!=st)&&(Hn=Nt[Xt+(Ot?1:0)]),Ne(dn,Hn)}}}var F=I(l,f,i);if(F)return Br(F,o);for(var de=f.nextSibling,ne=l?l.nodeValue.length-i:0;de;de=de.nextSibling){if(F=I(de,de.firstChild,0),F)return Br(Ne(F.line,F.ch-ne),o);ne+=de.textContent.length}for(var De=f.previousSibling,Ge=i;De;De=De.previousSibling){if(F=I(De,De.firstChild,-1),F)return Br(Ne(F.line,F.ch+Ge),o);Ge+=De.textContent.length}}var mi=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new je,this.hasSelection=!1,this.composing=null};mi.prototype.init=function(e){var t=this,i=this,n=this.cm;this.createField(e);var o=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),U&&(o.style.width="0px"),Se(o,"input",function(){P&&$>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Se(o,"paste",function(l){if(Xe(n,l)||al(l,n))return;n.state.pasteIncoming=+new Date,i.fastPoll()});function s(l){if(Xe(n,l))return;if(n.somethingSelected())Wa({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var f=ll(n);Wa({lineWise:!0,text:f.text}),l.type=="cut"?n.setSelections(f.ranges,null,Qe):(i.prevInput="",o.value=f.text.join(`
`),et(o))}else return;l.type=="cut"&&(n.state.cutIncoming=+new Date)}Se(o,"cut",s),Se(o,"copy",s),Se(e.scroller,"paste",function(l){if(Eo(e,l)||Xe(n,l))return;if(!o.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var f=new Event("paste");f.clipboardData=l.clipboardData,o.dispatchEvent(f)}),Se(e.lineSpace,"selectstart",function(l){Eo(e,l)||C(l)}),Se(o,"compositionstart",function(){var l=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:l,range:n.markText(l,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Se(o,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},mi.prototype.createField=function(e){this.wrapper=cl(),this.textarea=this.wrapper.firstChild},mi.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},mi.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=yo(e);if(e.options.moveInputWithCursor){var o=pn(e,i.sel.primary().head,"div"),s=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+l.top-s.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+l.left-s.left))}return n},mi.prototype.showSelection=function(e){var t=this.cm,i=t.display;pe(i.cursorDiv,e.cursors),pe(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},mi.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&et(this.textarea),P&&$>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",P&&$>=9&&(this.hasSelection=null))},mi.prototype.getField=function(){return this.textarea},mi.prototype.supportsTouch=function(){return!1},mi.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!k||Ee()!=this.textarea))try{this.textarea.focus()}catch(e){}},mi.prototype.blur=function(){this.textarea.blur()},mi.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},mi.prototype.receivedFocus=function(){this.slowPoll()},mi.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()})},mi.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},mi.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||lt(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=i.value;if(o==n&&!t.somethingSelected())return!1;if(P&&$>=9&&this.hasSelection===o||te&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var s=o.charCodeAt(0);if(s==8203&&!n&&(n="\u200B"),s==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,f=Math.min(n.length,o.length);l<f&&n.charCodeAt(l)==o.charCodeAt(l);)++l;return Qi(t,function(){hs(t,o.slice(l),n.length-l,null,e.composing?"*compose":null),o.length>1e3||o.indexOf(`
`)>-1?i.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},mi.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},mi.prototype.onKeyPress=function(){P&&$>=9&&(this.hasSelection=null),this.fastPoll()},mi.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var s=Ai(i,e),l=n.scroller.scrollTop;if(!s||V)return;var f=i.options.resetSelectionOnContextMenu;f&&i.doc.sel.contains(s)==-1&&fi(i,zi)(i.doc,wo(s),Qe);var m=o.style.cssText,v=t.wrapper.style.cssText,I=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",o.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-I.top-5)+"px; left: "+(e.clientX-I.left-5)+`px;
z-index: 1000; background: `+(P?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var F;ce&&(F=window.scrollY),n.input.focus(),ce&&window.scrollTo(null,F),n.input.reset(),i.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=ne,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function de(){if(o.selectionStart!=null){var Ge=i.somethingSelected(),st="\u200B"+(Ge?o.value:"");o.value="\u21DA",o.value=st,t.prevInput=Ge?"":"\u200B",o.selectionStart=1,o.selectionEnd=st.length,n.selForContextMenu=i.doc.sel}}function ne(){if(t.contextMenuPending!=ne)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=v,o.style.cssText=m,P&&$<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=l),o.selectionStart!=null){(!P||P&&$<9)&&de();var Ge=0,st=function(){n.selForContextMenu==i.doc.sel&&o.selectionStart==0&&o.selectionEnd>0&&t.prevInput=="\u200B"?fi(i,Rs)(i):Ge++<10?n.detectingSelectAll=setTimeout(st,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(st,200)}}if(P&&$>=9&&de(),He){T(e);var De=function(){pt(window,"mouseup",De),setTimeout(ne,20)};Se(window,"mouseup",De)}else setTimeout(ne,50)},mi.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},mi.prototype.setUneditable=function(){},mi.prototype.needsContentAttribute=!1;function iu(e,t){if(t=t?y(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 i=Ee();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=f.getValue()}var o;if(e.form&&(Se(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var s=e.form;o=s.submit;try{var l=s.submit=function(){n(),s.submit=o,s.submit(),s.submit=l}}catch(m){}}t.finishInit=function(m){m.save=n,m.getTextArea=function(){return e},m.toTextArea=function(){m.toTextArea=isNaN,n(),e.parentNode.removeChild(m.getWrapperElement()),e.style.display="",e.form&&(pt(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=o))}},e.style.display="none";var f=$n(function(m){return e.parentNode.insertBefore(m,e.nextSibling)},t);return f}function ou(e){e.off=pt,e.on=Se,e.wheelEventPixels=$r,e.Doc=qi,e.splitLines=Pt,e.countColumn=le,e.findColumn=Ve,e.isWordChar=Ye,e.Pass=xt,e.signal=Me,e.Line=jo,e.changeEnd=Ao,e.scrollbarModel=Yr,e.Pos=Ne,e.cmpPos=_t,e.modes=mn,e.mimeModes=Qt,e.resolveMode=Wt,e.getMode=Ei,e.modeExtensions=Gn,e.extendMode=Vn,e.copyState=vi,e.startState=Vi,e.innerMode=Ii,e.commands=da,e.keyMap=Ho,e.keyName=Ks,e.isModifierKey=Vs,e.lookupKey=Pr,e.normalizeKeyMap=Il,e.StringStream=un,e.SharedTextMarker=la,e.TextMarker=or,e.LineWidget=sa,e.e_preventDefault=C,e.e_stopPropagation=E,e.e_stop=T,e.addClass=Re,e.contains=B,e.rmClass=ge,e.keyNames=rr}Xl($n),$l($n);var ru="iter insert remove copy getEditor constructor".split(" ");for(var Ha in qi.prototype)qi.prototype.hasOwnProperty(Ha)&&Be(ru,Ha)<0&&($n.prototype[Ha]=function(e){return function(){return e.apply(this.doc,arguments)}}(qi.prototype[Ha]));return K(qi),$n.inputStyles={textarea:mi,contenteditable:Fn},$n.defineMode=function(e){!$n.defaults.mode&&e!="null"&&($n.defaults.mode=e),ui.apply(this,arguments)},$n.defineMIME=gi,$n.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),$n.defineMIME("text/plain","null"),$n.defineExtension=function(e,t){$n.prototype[e]=t},$n.defineDocExtension=function(e,t){qi.prototype[e]=t},$n.fromTextArea=iu,ou($n),$n.version="5.58.2",$n})},W6BS:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAVs0lEQVRoQ+2aa6xlZ3nff++677Xv+9zPHM/YHo+xwQ4E14GKKESkiFsSM8bYQBIEkaBEAkqbRmo/9FulSoX2Qz9GVVQJqUJBhKKA1KRJCIlowwdDDDa+jOd65syc275f1v1d1fOufYYE2ZhJZKRWXjOjvffaa6/1/p//8/yfyzuqLMuS/48P9RrA/8fZfY3B2yXQBHQpf185tBUK+SvH8uV2H/eK1/+jGfwRIBC5ks/Vq/yplq2Wqz+B/ONg5LNlrlz+Qhnot373iih+wgX/YIAivrJgjTKA9BKcYa/Uy/MnUEpD0S2AyzdKkMslZYklbwVYWZpXQSygrSVoc+4fcPzUAKtsom4xpIGiLCkMZbJGs1LkvOHPfJbrhRX5/CM/NDwJZlXiqBKlc7AEjg1aI2iVDXZpoeS9AFXlkmV1W8z+VACLE7dbMiWLE2CFADLgqig6SakCSs4jizcvAvBHMVkqxxhKkePqAs8S1mxyLUxqw6AYKLdtbMtGINpiKKUM07bc96dk9BUBykIFoNYVC/JewMkCDDh18p0so6w+GzfT+F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eHJ0nMYhEh8TscDun3+0aoJuMJi8WCJMnRZgRZkJOR5FMKvWBz/QyN2gqqsEjTBE1q7iU5znZsfN83i2+32zSbTXq9HisrK6yurtJoNH4ympf49rYAvhzL1b5JSZqmZqGTyZT+4Jj+cd+4+mg4Yh7F5Kk0xqK4Jb7rVP87w1KGpU6nR6vVNMAEkPzrdDqGxX/McVsAb/dBsh0mKWgxnzMajxgOhhwf9+n3j5nNZ7RbbbrdrgElYE5Aua57u4962etfNYAvx7YISJIkxrXFxdvtlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},Xsq0:function(Pe,we,p){Pe.exports=p.p+"static/mainbanner.0a951716.jpg"},Y1PL:function(Pe,we,p){"use strict";p.r(we),p.d(we,"ResizableTextArea",function(){return Be});var W=p("wx14"),xe=p("1OyB"),me=p("vuIU"),Z=p("Ji7U"),x=p("LK+K"),ke=p("q1tI"),P=p("VTBJ"),$=p("rePB"),ce=p("Zm9Q"),ye=p("Kwbf"),_=p("c+Xe"),V=p("m+aA"),Ce=p("bdgK"),se=new Map;function ee(Qe){Qe.forEach(function(Je){var Ue,Ve=Je.target;(Ue=se.get(Ve))===null||Ue===void 0||Ue.forEach(function(oe){return oe(Ve)})})}var U=new Ce.default(ee),R=null,k=null;function te(Qe,Je){se.has(Qe)||(se.set(Qe,new Set),U.observe(Qe)),se.get(Qe).add(Je)}function Ae(Qe,Je){se.has(Qe)&&(se.get(Qe).delete(Je),se.get(Qe).size||(U.unobserve(Qe),se.delete(Qe)))}var Fe=function(Qe){Object(Z.a)(Ue,Qe);var Je=Object(x.a)(Ue);function Ue(){return Object(xe.a)(this,Ue),Je.apply(this,arguments)}return Object(me.a)(Ue,[{key:"render",value:function(){return this.props.children}}]),Ue}(ke.Component),be=ke.createContext(null);function he(Qe){var Je=Qe.children,Ue=Qe.onBatchResize,Ve=ke.useRef(0),oe=ke.useRef([]),D=ke.useContext(be),it=ke.useCallback(function(kt,Ut,mt){Ve.current+=1;var At=Ve.current;oe.current.push({size:kt,element:Ut,data:mt}),Promise.resolve().then(function(){At===Ve.current&&(Ue==null||Ue(oe.current),oe.current=[])}),D==null||D(kt,Ut,mt)},[Ue,D]);return ke.createElement(be.Provider,{value:it},Je)}function He(Qe){var Je=Qe.children,Ue=Qe.disabled,Ve=ke.useRef(null),oe=ke.useRef(null),D=ke.useContext(be),it=ke.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),kt=ke.isValidElement(Je)&&Object(_.c)(Je),Ut=kt?Je.ref:null,mt=ke.useMemo(function(){return Object(_.a)(Ut,Ve)},[Ut,Ve]),At=ke.useRef(Qe);At.current=Qe;var Te=ke.useCallback(function(Ye){var at=At.current,dt=at.onResize,Ke=at.data,We=Ye.getBoundingClientRect(),Ze=We.width,Lt=We.height,gt=Ye.offsetWidth,ot=Ye.offsetHeight,rt=Math.floor(Ze),Dt=Math.floor(Lt);if(it.current.width!==rt||it.current.height!==Dt||it.current.offsetWidth!==gt||it.current.offsetHeight!==ot){var ft={width:rt,height:Dt,offsetWidth:gt,offsetHeight:ot};it.current=ft;var wt=gt===Math.round(Ze)?Ze:gt,Se=ot===Math.round(Lt)?Lt:ot,It=Object(P.a)(Object(P.a)({},ft),{},{offsetWidth:wt,offsetHeight:Se});D==null||D(It,Ye,Ke),dt&&Promise.resolve().then(function(){dt(It,Ye)})}},[]);return ke.useEffect(function(){var Ye=Object(V.a)(Ve.current)||Object(V.a)(oe.current);return Ye&&!Ue&&te(Ye,Te),function(){return Ae(Ye,Te)}},[Ve.current,Ue]),ke.createElement(Fe,{ref:oe},kt?ke.cloneElement(Je,{ref:mt}):Je)}var ue="rc-observer-key";function ge(Qe){var Je=Qe.children,Ue=Object(ce.a)(Je);return Ue.map(function(Ve,oe){var D=(Ve==null?void 0:Ve.key)||"".concat(ue,"-").concat(oe);return ke.createElement(He,Object(W.a)({},Qe,{key:D}),Ve)})}ge.Collection=he;var Ie=ge,pe=p("bT9E"),M=p("TSYQ"),ve=p.n(M),re=`
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
`,B=["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"],Ee={},Re;function fe(Qe){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ue=Qe.getAttribute("id")||Qe.getAttribute("data-reactid")||Qe.getAttribute("name");if(Je&&Ee[Ue])return Ee[Ue];var Ve=window.getComputedStyle(Qe),oe=Ve.getPropertyValue("box-sizing")||Ve.getPropertyValue("-moz-box-sizing")||Ve.getPropertyValue("-webkit-box-sizing"),D=parseFloat(Ve.getPropertyValue("padding-bottom"))+parseFloat(Ve.getPropertyValue("padding-top")),it=parseFloat(Ve.getPropertyValue("border-bottom-width"))+parseFloat(Ve.getPropertyValue("border-top-width")),kt=B.map(function(mt){return"".concat(mt,":").concat(Ve.getPropertyValue(mt))}).join(";"),Ut={sizingStyle:kt,paddingSize:D,borderSize:it,boxSizing:oe};return Je&&Ue&&(Ee[Ue]=Ut),Ut}function et(Qe){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Re||(Re=document.createElement("textarea"),Re.setAttribute("tab-index","-1"),Re.setAttribute("aria-hidden","true"),document.body.appendChild(Re)),Qe.getAttribute("wrap")?Re.setAttribute("wrap",Qe.getAttribute("wrap")):Re.removeAttribute("wrap");var oe=fe(Qe,Je),D=oe.paddingSize,it=oe.borderSize,kt=oe.boxSizing,Ut=oe.sizingStyle;Re.setAttribute("style","".concat(Ut,";").concat(re)),Re.value=Qe.value||Qe.placeholder||"";var mt=Number.MIN_SAFE_INTEGER,At=Number.MAX_SAFE_INTEGER,Te=Re.scrollHeight,Ye;if(kt==="border-box"?Te+=it:kt==="content-box"&&(Te-=D),Ue!==null||Ve!==null){Re.value=" ";var at=Re.scrollHeight-D;Ue!==null&&(mt=at*Ue,kt==="border-box"&&(mt=mt+D+it),Te=Math.max(mt,Te)),Ve!==null&&(At=at*Ve,kt==="border-box"&&(At=At+D+it),Ye=Te>At?"":"hidden",Te=Math.min(At,Te))}return{height:Te,minHeight:mt,maxHeight:At,overflowY:Ye,resize:"none"}}var O=p("Gytx"),y=p.n(O),le;(function(Qe){Qe[Qe.NONE=0]="NONE",Qe[Qe.RESIZING=1]="RESIZING",Qe[Qe.RESIZED=2]="RESIZED"})(le||(le={}));var je=function(Qe){Object(Z.a)(Ue,Qe);var Je=Object(x.a)(Ue);function Ue(Ve){var oe;return Object(xe.a)(this,Ue),oe=Je.call(this,Ve),oe.nextFrameActionId=void 0,oe.resizeFrameId=void 0,oe.textArea=void 0,oe.saveTextArea=function(D){oe.textArea=D},oe.handleResize=function(D){var it=oe.state.resizeStatus,kt=oe.props,Ut=kt.autoSize,mt=kt.onResize;if(it!==le.NONE)return;typeof mt=="function"&&mt(D),Ut&&oe.resizeOnNextFrame()},oe.resizeOnNextFrame=function(){cancelAnimationFrame(oe.nextFrameActionId),oe.nextFrameActionId=requestAnimationFrame(oe.resizeTextarea)},oe.resizeTextarea=function(){var D=oe.props.autoSize;if(!D||!oe.textArea)return;var it=D.minRows,kt=D.maxRows,Ut=et(oe.textArea,!1,it,kt);oe.setState({textareaStyles:Ut,resizeStatus:le.RESIZING},function(){cancelAnimationFrame(oe.resizeFrameId),oe.resizeFrameId=requestAnimationFrame(function(){oe.setState({resizeStatus:le.RESIZED},function(){oe.resizeFrameId=requestAnimationFrame(function(){oe.setState({resizeStatus:le.NONE}),oe.fixFirefoxAutoScroll()})})})})},oe.renderTextArea=function(){var D=oe.props,it=D.prefixCls,kt=it===void 0?"rc-textarea":it,Ut=D.autoSize,mt=D.onResize,At=D.className,Te=D.disabled,Ye=oe.state,at=Ye.textareaStyles,dt=Ye.resizeStatus,Ke=Object(pe.a)(oe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),We=ve()(kt,At,Object($.a)({},"".concat(kt,"-disabled"),Te));"value"in Ke&&(Ke.value=Ke.value||"");var Ze=Object(P.a)(Object(P.a)(Object(P.a)({},oe.props.style),at),dt===le.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return ke.createElement(Ie,{onResize:oe.handleResize,disabled:!(Ut||mt)},ke.createElement("textarea",Object(W.a)({},Ke,{className:We,style:Ze,ref:oe.saveTextArea})))},oe.state={textareaStyles:{},resizeStatus:le.NONE},oe}return Object(me.a)(Ue,[{key:"componentDidUpdate",value:function(oe){(oe.value!==this.props.value||!y()(oe.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 oe=this.textArea.selectionStart,D=this.textArea.selectionEnd;this.textArea.setSelectionRange(oe,D)}}catch(it){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ue}(ke.Component),Be=je,tt=function(Qe){Object(Z.a)(Ue,Qe);var Je=Object(x.a)(Ue);function Ue(Ve){var oe;Object(xe.a)(this,Ue),oe=Je.call(this,Ve),oe.resizableTextArea=void 0,oe.focus=function(){oe.resizableTextArea.textArea.focus()},oe.saveTextArea=function(it){oe.resizableTextArea=it},oe.handleChange=function(it){var kt=oe.props.onChange;oe.setValue(it.target.value,function(){oe.resizableTextArea.resizeTextarea()}),kt&&kt(it)},oe.handleKeyDown=function(it){var kt=oe.props,Ut=kt.onPressEnter,mt=kt.onKeyDown;it.keyCode===13&&Ut&&Ut(it),mt&&mt(it)};var D=typeof Ve.value=="undefined"||Ve.value===null?Ve.defaultValue:Ve.value;return oe.state={value:D},oe}return Object(me.a)(Ue,[{key:"setValue",value:function(oe,D){"value"in this.props||this.setState({value:oe},D)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return ke.createElement(Be,Object(W.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(oe){return"value"in oe?{value:oe.value}:null}}]),Ue}(ke.Component),xt=we.default=tt},ZW9T:function(Pe,we,p){"use strict";p.d(we,"a",function(){return Fe});var W=p("k1fw"),xe=p("miYZ"),me=p("tsqr"),Z=p("rAM+"),x=p("tJVT"),ke=p("PpiC"),P=p("q1tI"),$=p.n(P),ce=p("bdgK");function ye(be,he,He,ue,ge){var Ie=he.getWordUntilPosition(He),pe={startLineNumber:He.lineNumber,endLineNumber:He.lineNumber,startColumn:Ie.startColumn,endColumn:Ie.endColumn},M=ue.map(function(ve){return{label:ve,kind:be.languages.CompletionItemKind.Keyword,insertText:ve,insertTextRules:be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:pe}});return ge.map(function(ve){M.push(Object(W.a)(Object(W.a)({},ve),{},{range:pe}))}),M}var _=function(be){var he={label:"ifelse",kind:be.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:be.languages.CompletionItemInsertTextRule.InsertAsSnippet},He=["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","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];be.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(pe,M){var ve=ye(be,pe,M,He,[he]);return{suggestions:ve}}});var ue=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];be.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(pe,M){var ve=[{label:"print",kind:be.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:be.languages.CompletionItemInsertTextRule.InsertAsSnippet}],re=ye(be,pe,M,ue,ve);return{suggestions:re}}});var ge=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];be.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(pe,M){var ve=[he,{label:"main",kind:be.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:be.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:be.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:be.languages.CompletionItemInsertTextRule.InsertAsSnippet}],re=ye(be,pe,M,ge,ve);return{suggestions:re}}})},V="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",Ce=p("LvDl");function se(be){return/^\d+$/.test(be)?"".concat(be,"px"):be}function ee(){}var U=!1,R={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function k(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],he=be;if(Array.isArray(be)){for(var He=0;He<be.length;He++){var ue=R[be[He]];if(ue)return ue}return he[0]}return R[he]||he}var te=null,Ae=we.b=function(be){var he=be.width,He=he===void 0?"100%":he,ue=be.height,ge=ue===void 0?"100%":ue,Ie=be.value,pe=be.language,M=pe===void 0?"javascript":pe,ve=be.style,re=ve===void 0?{}:ve,B=be.options,Ee=B===void 0?{}:B,Re=be.overrideServices,fe=Re===void 0?{}:Re,et=be.theme,O=et===void 0?"vs-dark":et,y=be.onEditBlur,le=be.onSave,je=be.autoHeight,Be=je===void 0?!1:je,tt=be.forbidCopy,xt=tt===void 0?!1:tt,Qe=be.onChange,Je=Qe===void 0?ee:Qe,Ue=be.editorDidMount,Ve=Ue===void 0?ee:Ue,oe=be.onFocus,D=oe===void 0?ee:oe,it=be.filename,kt=it===void 0?"educoder.txt":it,Ut=Object(ke.a)(be,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),mt=Object(P.useRef)(),At=Object(P.useRef)({}),Te=Object(P.useRef)(),Ye=Object(P.useRef)(!1),at=Object(P.useRef)(),dt=Object(P.useState)(!1),Ke=Object(x.a)(dt,2),We=Ke[0],Ze=Ke[1];function Lt(){var A;return mt.current&&(A=new ce.default(function(T){var ae=Object(Z.a)(T),X;try{for(ae.s();!(X=ae.n()).done;){var Le=X.value;(Le.target.offsetHeight>0||Le.target.offsetWidth>0)&&At.current.instance.layout()}}catch(ht){ae.e(ht)}finally{ae.f()}}),A.observe(mt.current)),A}function gt(){me.b.warn(decodeURIComponent(V))}var ot=function(){var T=At.current.instance;if(Ie!=null&&T&&We){var ae=T.getModel();ae&&Ie!==ae.getValue()&&(U=!0,ae.setValue(Ie),T.layout(),U=!1)}};Object(P.useEffect)(function(){Te.current&&clearTimeout(Te.current),Te.current=setTimeout(function(){ot()},500)},[Ie,We,At.current]);function rt(){var A=At.current.instance;if(A){var T=A.getSelection(),ae=At.current.pastePos||{},X=new te.Range(ae.startLineNumber||T.endLineNumber,ae.startColumn||T.endColumn,ae.endLineNumber||T.endLineNumber,ae.endColumn||T.endColumn);setTimeout(function(){A.executeEdits("",[{range:X,text:""}])},300)}}function Dt(A){(window.navigator.platform.match("Mac")?A.metaKey:A.ctrlKey)&&A.keyCode==83&&(A.preventDefault(),le())}var ft=function(){if(Be&&At.current.instance){var T=At.current.instance.getContentHeight();C(T<ge?ge:T)}else C(ge)};function wt(A){var T=document.createEvent("MouseEvents");T.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),A.dispatchEvent(T)}function Se(A,T){var ae=window.URL||window.webkitURL||window,X=new Blob([T]),Le=document.createElementNS("http://www.w3.org/1999/xhtml","a");Le.href=ae.createObjectURL(X),Le.download=A,wt(Le)}Object(P.useEffect)(function(){ft()},[ft]),Object(P.useEffect)(function(){mt.current&&!We&&p.e(27).then(p.t.bind(null,"M/lh",7)).then(function(A){try{te=A,At.current.instance=te.editor.create(mt.current,{value:Ie,language:k(M),theme:O,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},fe);var T=At.current.instance;if(Ve(T,te),setTimeout(function(){ft(),At.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Se(kt||"educoder.txt",T.getValue())}})},500),At.current.subscription=T.onDidChangeModelContent(function(X){Ye.current?clearTimeout(at.current):(ft(),Je(T.getValue(),X)),at.current=setTimeout(function(){Ye.current=!1},500)}),window.Monaco||_(te),xt&&(T.addCommand(te.KeyMod.CtrlCmd|te.KeyMod.Shift|te.KeyCode.KEY_V,function(){return gt(),null}),T.addCommand(te.KeyMod.CtrlCmd|te.KeyCode.KEY_C,function(){return gt(),null})),window.Monaco=te,y&&T.onDidBlurEditorWidget(function(){y(T.getValue())}),D&&T.onDidFocusEditorText(function(){D(T.getValue())}),xt){T.addCommand(te.KeyMod.CtrlCmd|te.KeyCode.KEY_V,function(){return gt(),null}),T.onDidPaste(function(X){At.current.pastePos=X});try{window.addEventListener("paste",rt)}catch(X){}}var ae=Lt();return Ze(!0),function(){var X=At.current.instance;X.dispose();var Le=X.getModel();Le&&Le.dispose(),At.current.subscription&&At.current.subscription.dispose(),xt&&window.removeEventListener("paste",rt),ae.unobserve(mt.current)}}catch(X){}})},[]),Object(P.useEffect)(function(){var A=At.current.instance;if(A&&We)return document.addEventListener("keydown",Dt,!1),function(){document.removeEventListener("keydown",Dt)}},[le,We]),Object(P.useEffect)(function(){var A=At.current.instance;if(A&&We){var T=k(M);te.editor.setModelLanguage(A.getModel(),T),console.log("language:",M,A.getModel(),T)}},[M,We]),Object(P.useEffect)(function(){var A=At.current.instance;A&&We&&te.editor.setTheme(O)},[O,We]),Object(P.useEffect)(function(){var A=At.current.instance;A&&We&&(A.updateOptions(Object(W.a)({},Ee)),setTimeout(function(){A.getModel().updateOptions(Object(W.a)({},Ee))},200))},[JSON.stringify(Ee),We]),Object(P.useEffect)(function(){var A=At.current.instance;A&&We&&A.layout()},[He,ge,We]);var It=Object(P.useState)(se(He)),pt=Object(x.a)(It,2),Me=pt[0],Xe=pt[1],J=Object(P.useState)(se(ge)),H=Object(x.a)(J,2),K=H[0],C=H[1],E=Object(W.a)(Object(W.a)({},re),{},{width:Me,height:K});return $.a.createElement("div",{className:"my-monaco-editor",ref:mt,style:E})};function Fe(be){var he=be.width,He=he===void 0?"100%":he,ue=be.height,ge=ue===void 0?"100%":ue,Ie=be.original,pe=be.modified,M=be.language,ve=be.options,re=ve===void 0?{}:ve,B=Object(P.useRef)(),Ee=Object(P.useState)(null),Re=Object(x.a)(Ee,2),fe=Re[0],et=Re[1];function O(Be){var tt;return B.current&&(tt=new ce.default(function(xt){var Qe=Object(Z.a)(xt),Je;try{for(Qe.s();!(Je=Qe.n()).done;){var Ue=Je.value;(Ue.target.offsetHeight>0||Ue.target.offsetWidth>0)&&Be.layout()}}catch(Ve){Qe.e(Ve)}finally{Qe.f()}}),tt.observe(B.current)),tt}Object(P.useEffect)(function(){B.current&&p.e(27).then(p.t.bind(null,"M/lh",7)).then(function(Be){te=Be;var tt=te.editor.createDiffEditor(B.current,Object(W.a)(Object(W.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},re),{},{wordWrap:!0}));et(tt);var xt=O(tt);return function(){tt.dispose();var Qe=tt.getModel();Qe&&Qe.dispose(),xt.unobserve(B.current)}})},[]),Object(P.useEffect)(function(){fe&&fe.setModel({original:te.editor.createModel(Ie,M),modified:te.editor.createModel(pe,M)})},[Ie,pe,M,fe]);var y=se(He),le=se(ge),je={width:y,height:le};return $.a.createElement("div",{className:"my-diff-editor",ref:B,style:je})}},ZpRC:function(Pe,we,p){"use strict";function W(_){return typeof _=="object"&&_!=null&&_.nodeType===1}function xe(_,V){return(!V||_!=="hidden")&&_!=="visible"&&_!=="clip"}function me(_,V){if(_.clientHeight<_.scrollHeight||_.clientWidth<_.scrollWidth){var Ce=getComputedStyle(_,null);return xe(Ce.overflowY,V)||xe(Ce.overflowX,V)||function(se){var ee=function(U){if(!U.ownerDocument||!U.ownerDocument.defaultView)return null;try{return U.ownerDocument.defaultView.frameElement}catch(R){return null}}(se);return!!ee&&(ee.clientHeight<se.scrollHeight||ee.clientWidth<se.scrollWidth)}(_)}return!1}function Z(_,V,Ce,se,ee,U,R,k){return U<_&&R>V||U>_&&R<V?0:U<=_&&k<=Ce||R>=V&&k>=Ce?U-_-se:R>V&&k<Ce||U<_&&k>Ce?R-V+ee:0}var x=function(_,V){var Ce=window,se=V.scrollMode,ee=V.block,U=V.inline,R=V.boundary,k=V.skipOverflowHiddenElements,te=typeof R=="function"?R:function(at){return at!==R};if(!W(_))throw new TypeError("Invalid target");for(var Ae=document.scrollingElement||document.documentElement,Fe=[],be=_;W(be)&&te(be);){if((be=be.parentElement)===Ae){Fe.push(be);break}be!=null&&be===document.body&&me(be)&&!me(document.documentElement)||be!=null&&me(be,k)&&Fe.push(be)}for(var he=Ce.visualViewport?Ce.visualViewport.width:innerWidth,He=Ce.visualViewport?Ce.visualViewport.height:innerHeight,ue=window.scrollX||pageXOffset,ge=window.scrollY||pageYOffset,Ie=_.getBoundingClientRect(),pe=Ie.height,M=Ie.width,ve=Ie.top,re=Ie.right,B=Ie.bottom,Ee=Ie.left,Re=ee==="start"||ee==="nearest"?ve:ee==="end"?B:ve+pe/2,fe=U==="center"?Ee+M/2:U==="end"?re:Ee,et=[],O=0;O<Fe.length;O++){var y=Fe[O],le=y.getBoundingClientRect(),je=le.height,Be=le.width,tt=le.top,xt=le.right,Qe=le.bottom,Je=le.left;if(se==="if-needed"&&ve>=0&&Ee>=0&&B<=He&&re<=he&&ve>=tt&&B<=Qe&&Ee>=Je&&re<=xt)return et;var Ue=getComputedStyle(y),Ve=parseInt(Ue.borderLeftWidth,10),oe=parseInt(Ue.borderTopWidth,10),D=parseInt(Ue.borderRightWidth,10),it=parseInt(Ue.borderBottomWidth,10),kt=0,Ut=0,mt="offsetWidth"in y?y.offsetWidth-y.clientWidth-Ve-D:0,At="offsetHeight"in y?y.offsetHeight-y.clientHeight-oe-it:0;if(Ae===y)kt=ee==="start"?Re:ee==="end"?Re-He:ee==="nearest"?Z(ge,ge+He,He,oe,it,ge+Re,ge+Re+pe,pe):Re-He/2,Ut=U==="start"?fe:U==="center"?fe-he/2:U==="end"?fe-he:Z(ue,ue+he,he,Ve,D,ue+fe,ue+fe+M,M),kt=Math.max(0,kt+ge),Ut=Math.max(0,Ut+ue);else{kt=ee==="start"?Re-tt-oe:ee==="end"?Re-Qe+it+At:ee==="nearest"?Z(tt,Qe,je,oe,it+At,Re,Re+pe,pe):Re-(tt+je/2)+At/2,Ut=U==="start"?fe-Je-Ve:U==="center"?fe-(Je+Be/2)+mt/2:U==="end"?fe-xt+D+mt:Z(Je,xt,Be,Ve,D+mt,fe,fe+M,M);var Te=y.scrollLeft,Ye=y.scrollTop;Re+=Ye-(kt=Math.max(0,Math.min(Ye+kt,y.scrollHeight-je+At))),fe+=Te-(Ut=Math.max(0,Math.min(Te+Ut,y.scrollWidth-Be+mt)))}et.push({el:y,top:kt,left:Ut})}return et};function ke(_){return _===Object(_)&&Object.keys(_).length!==0}function P(_,V){V===void 0&&(V="auto");var Ce="scrollBehavior"in document.body.style;_.forEach(function(se){var ee=se.el,U=se.top,R=se.left;ee.scroll&&Ce?ee.scroll({top:U,left:R,behavior:V}):(ee.scrollTop=U,ee.scrollLeft=R)})}function $(_){return _===!1?{block:"end",inline:"nearest"}:ke(_)?_:{block:"start",inline:"nearest"}}function ce(_,V){var Ce=!_.ownerDocument.documentElement.contains(_);if(ke(V)&&typeof V.behavior=="function")return V.behavior(Ce?[]:x(_,V));if(Ce)return;var se=$(V);return P(x(_,se),se.behavior)}var ye=we.a=ce},bT9E:function(Pe,we,p){"use strict";p.d(we,"a",function(){return xe});var W=p("VTBJ");function xe(me,Z){var x=Object(W.a)({},me);return Array.isArray(Z)&&Z.forEach(function(ke){delete x[ke]}),x}},c5Ni:function(Pe,we,p){},cRFk:function(Pe,we,p){Pe.exports=p.p+"static/RepositoryNoneData.828085a8.png"},csWT:function(Pe,we,p){Pe.exports=p.p+"static/choose.4ad1045f.svg"},dejd:function(Pe,we,p){},djh8:function(Pe,we,p){Pe.exports=p.p+"static/qrCode.42927872.png"},dmUQ:function(Pe,we,p){"use strict";var W=p("Ff2n"),xe=p("rePB"),me=p("1OyB"),Z=p("vuIU"),x=p("Ji7U"),ke=p("md7G"),P=p("foSv"),$=p("q1tI"),ce=p.n($),ye=p("TSYQ"),_=p.n(ye),V=p("4IlW");function Ce(pe,M){var ve=Object.keys(pe);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(pe);M&&(re=re.filter(function(B){return Object.getOwnPropertyDescriptor(pe,B).enumerable})),ve.push.apply(ve,re)}return ve}function se(pe){for(var M=1;M<arguments.length;M++){var ve=arguments[M]!=null?arguments[M]:{};M%2?Ce(Object(ve),!0).forEach(function(re){Object(xe.a)(pe,re,ve[re])}):Object.getOwnPropertyDescriptors?Object.defineProperties(pe,Object.getOwnPropertyDescriptors(ve)):Ce(Object(ve)).forEach(function(re){Object.defineProperty(pe,re,Object.getOwnPropertyDescriptor(ve,re))})}return pe}function ee(pe){var M=U();return function(){var re=Object(P.a)(pe),B;if(M){var Ee=Object(P.a)(this).constructor;B=Reflect.construct(re,arguments,Ee)}else B=re.apply(this,arguments);return Object(ke.a)(this,B)}}function U(){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(pe){return!1}}function R(){}function k(pe){pe.preventDefault()}var te=function(M){return M.replace(/[^\w.-]+/g,"")},Ae=200,Fe=600,be=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,he=function(M){return M!=null},He=function(M,ve){return ve===M||typeof ve=="number"&&typeof M=="number"&&isNaN(ve)&&isNaN(M)},ue=function(pe){Object(x.a)(ve,pe);var M=ee(ve);function ve(re){var B;Object(me.a)(this,ve),B=M.call(this,re),B.onKeyDown=function(fe){var et=B.props,O=et.onKeyDown,y=et.onPressEnter;if(fe.keyCode===V.a.UP){var le=B.getRatio(fe);B.up(fe,le,null),B.stop()}else if(fe.keyCode===V.a.DOWN){var je=B.getRatio(fe);B.down(fe,je,null),B.stop()}else fe.keyCode===V.a.ENTER&&y&&y(fe);if(B.recordCursorPosition(),B.lastKeyCode=fe.keyCode,O){for(var Be=arguments.length,tt=new Array(Be>1?Be-1:0),xt=1;xt<Be;xt++)tt[xt-1]=arguments[xt];O.apply(void 0,[fe].concat(tt))}},B.onKeyUp=function(fe){var et=B.props.onKeyUp;if(B.stop(),B.recordCursorPosition(),et){for(var O=arguments.length,y=new Array(O>1?O-1:0),le=1;le<O;le++)y[le-1]=arguments[le];et.apply(void 0,[fe].concat(y))}},B.onChange=function(fe){var et=B.props.onChange;B.state.focused&&(B.inputting=!0),B.rawInput=B.props.parser(B.getValueFromEvent(fe)),B.setState({inputValue:B.rawInput}),et(B.toNumber(B.rawInput))},B.onMouseUp=function(){var fe=B.props.onMouseUp;B.recordCursorPosition(),fe&&fe.apply(void 0,arguments)},B.onFocus=function(){var fe;B.setState({focused:!0}),(fe=B.props).onFocus.apply(fe,arguments)},B.onBlur=function(){var fe=B.props.onBlur;B.inputting=!1,B.setState({focused:!1});var et=B.getCurrentValidValue(B.state.inputValue),O=B.setValue(et,R);if(fe){var y=B.input.value,le=B.getInputDisplayValue({focus:!1,value:O});B.input.value=le&&Number(le),fe.apply(void 0,arguments),B.input.value=y}},B.getRatio=function(fe){var et=1;return fe.metaKey||fe.ctrlKey?et=.1:fe.shiftKey&&(et=10),et},B.getFullNum=function(fe){return isNaN(fe)?fe:/e/i.test(String(fe))?Number(fe).toFixed(18).replace(/\.?0+$/,""):fe},B.getPrecision=function(fe){if(he(B.props.precision))return B.props.precision;var et=String(fe);if(et.indexOf("e-")>=0)return parseInt(et.slice(et.indexOf("e-")+2),10);var O=0;return et.indexOf(".")>=0&&(O=et.length-et.indexOf(".")-1),O},B.getInputDisplayValue=function(fe){var et=fe||B.state,O=et.focused,y=et.inputValue,le=et.value,je;O?je=y:je=B.toPrecisionAsStep(le),je==null&&(je="");var Be=B.formatWrapper(je);return he(B.props.decimalSeparator)&&(Be=Be.toString().replace(".",B.props.decimalSeparator)),Be},B.recordCursorPosition=function(){try{B.cursorStart=B.input.selectionStart,B.cursorEnd=B.input.selectionEnd,B.currentValue=B.input.value,B.cursorBefore=B.input.value.substring(0,B.cursorStart),B.cursorAfter=B.input.value.substring(B.cursorEnd)}catch(fe){}},B.restoreByAfter=function(fe){if(fe===void 0)return!1;var et=B.input.value,O=et.lastIndexOf(fe);if(O===-1)return!1;var y=B.cursorBefore.length;return B.lastKeyCode===V.a.DELETE&&B.cursorBefore.charAt(y-1)===fe[0]?(B.fixCaret(y,y),!0):O+fe.length===et.length?(B.fixCaret(O,O),!0):!1},B.partRestoreByAfter=function(fe){return fe===void 0?!1:Array.prototype.some.call(fe,function(et,O){var y=fe.substring(O);return B.restoreByAfter(y)})},B.isNotCompleteNumber=function(fe){return isNaN(fe)||fe===""||fe===null||fe&&fe.toString().indexOf(".")===fe.toString().length-1},B.stop=function(){B.autoStepTimer&&clearTimeout(B.autoStepTimer)},B.down=function(fe,et,O){B.pressingUpOrDown=!0,B.step("down",fe,et,O)},B.up=function(fe,et,O){B.pressingUpOrDown=!0,B.step("up",fe,et,O)},B.saveInput=function(fe){B.input=fe};var Ee=re.value;Ee===void 0&&(Ee=re.defaultValue),B.state={focused:re.autoFocus};var Re=B.getValidValue(B.toNumber(Ee));return B.state=se(se({},B.state),{},{inputValue:B.toPrecisionAsStep(Re),value:Re}),B}return Object(Z.a)(ve,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(B){var Ee=this.props,Re=Ee.value,fe=Ee.onChange,et=Ee.max,O=Ee.min,y=this.state.focused;if(B){if(!He(B.value,Re)||!He(B.max,et)||!He(B.min,O)){var le=y?Re:this.getValidValue(Re),je;this.pressingUpOrDown?je=le:this.inputting?je=this.rawInput:je=this.toPrecisionAsStep(le),this.setState({value:le,inputValue:je})}var Be="value"in this.props?Re:this.state.value;"max"in this.props&&B.max!==et&&typeof Be=="number"&&Be>et&&fe&&fe(et),"min"in this.props&&B.min!==O&&typeof Be=="number"&&Be<O&&fe&&fe(O)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var tt=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===V.a.BACKSPACE?tt=this.cursorStart-1:this.lastKeyCode===V.a.DELETE&&(tt=this.cursorStart):tt=this.input.value.length,this.fixCaret(tt,tt)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case V.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case V.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(xt){}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(B){var Ee=B;return Ee===""?Ee="":this.isNotCompleteNumber(parseFloat(Ee))?Ee=this.state.value:Ee=this.getValidValue(Ee),this.toNumber(Ee)}},{key:"getValueFromEvent",value:function(B){var Ee=B.target.value.trim().replace(/。/g,".");return he(this.props.decimalSeparator)&&(Ee=Ee.replace(this.props.decimalSeparator,".")),Ee}},{key:"getValidValue",value:function(B){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,fe=parseFloat(B);return isNaN(fe)?B:(fe<Ee&&(fe=Ee),fe>Re&&(fe=Re),fe)}},{key:"setValue",value:function(B,Ee){var Re=this.props.precision,fe=this.isNotCompleteNumber(parseFloat(B))?null:parseFloat(B),et=this.state.value,O=et===void 0?null:et,y=this.state.inputValue,le=y===void 0?null:y,je=typeof fe=="number"?fe.toFixed(Re):"".concat(fe),Be=fe!==O||je!=="".concat(le);return"value"in this.props?(le=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:le},Ee)):this.setState({value:fe,inputValue:this.toPrecisionAsStep(B)},Ee),Be&&this.props.onChange(fe),fe}},{key:"getMaxPrecision",value:function(B){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Re=this.props,fe=Re.precision,et=Re.step;if(he(fe))return fe;var O=this.getPrecision(Ee),y=this.getPrecision(et),le=this.getPrecision(B);return B?Math.max(le,O+y):O+y}},{key:"getPrecisionFactor",value:function(B){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Re=this.getMaxPrecision(B,Ee);return Math.pow(10,Re)}},{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(B){return this.props.formatter?this.props.formatter(B):B}},{key:"toPrecisionAsStep",value:function(B){if(this.isNotCompleteNumber(B)||B==="")return B;var Ee=Math.abs(this.getMaxPrecision(B));return isNaN(Ee)?B.toString():Number(B).toFixed(Ee)}},{key:"toNumber",value:function(B){var Ee=this.props.precision,Re=this.state.focused,fe=B&&B.length>16&&Re;return this.isNotCompleteNumber(B)||fe?B:he(Ee)?Math.round(B*Math.pow(10,Ee))/Math.pow(10,Ee):Number(B)}},{key:"upStep",value:function(B,Ee){var Re=this.props.step,fe=this.getPrecisionFactor(B,Ee),et=Math.abs(this.getMaxPrecision(B,Ee)),O=((fe*B+fe*Re*Ee)/fe).toFixed(et);return this.toNumber(O)}},{key:"downStep",value:function(B,Ee){var Re=this.props.step,fe=this.getPrecisionFactor(B,Ee),et=Math.abs(this.getMaxPrecision(B,Ee)),O=((fe*B-fe*Re*Ee)/fe).toFixed(et);return this.toNumber(O)}},{key:"step",value:function(B,Ee){var Re=this,fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,et=arguments.length>3?arguments[3]:void 0;this.stop(),Ee&&(Ee.persist(),Ee.preventDefault());var O=this.props;if(O.disabled)return;var y=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(y))return;var le=this["".concat(B,"Step")](y,fe),je=le>O.max||le<O.min;if(le>O.max?le=O.max:le<O.min&&(le=O.min),this.setValue(le,null),this.setState({focused:!0},function(){Re.pressingUpOrDown=!1}),je)return;this.autoStepTimer=setTimeout(function(){Re[B](Ee,fe,!0)},et?Ae:Fe)}},{key:"fixCaret",value:function(B,Ee){if(B===void 0||Ee===void 0||!this.input||!this.input.value)return;try{var Re=this.input.selectionStart,fe=this.input.selectionEnd;(B!==Re||Ee!==fe)&&this.input.setSelectionRange(B,Ee)}catch(et){}}},{key:"render",value:function(){var B,Ee=this.props,Re=Ee.prefixCls,fe=Ee.disabled,et=Ee.readOnly,O=Ee.useTouch,y=Ee.autoComplete,le=Ee.upHandler,je=Ee.downHandler,Be=Ee.className,tt=Ee.max,xt=Ee.min,Qe=Ee.style,Je=Ee.title,Ue=Ee.onMouseEnter,Ve=Ee.onMouseLeave,oe=Ee.onMouseOver,D=Ee.onMouseOut,it=Ee.required,kt=Ee.onClick,Ut=Ee.tabIndex,mt=Ee.type,At=Ee.placeholder,Te=Ee.id,Ye=Ee.inputMode,at=Ee.pattern,dt=Ee.step,Ke=Ee.maxLength,We=Ee.autoFocus,Ze=Ee.name,Lt=Ee.onPaste,gt=Ee.onInput,ot=Object(W.a)(Ee,["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"]),rt=this.state,Dt=rt.value,ft=rt.focused,wt=_()(Re,(B={},Object(xe.a)(B,Be,!!Be),Object(xe.a)(B,"".concat(Re,"-disabled"),fe),Object(xe.a)(B,"".concat(Re,"-focused"),ft),B)),Se={};Object.keys(ot).forEach(function(T){(T.substr(0,5)==="data-"||T.substr(0,5)==="aria-"||T==="role")&&(Se[T]=ot[T])});var It=!et&&!fe,pt=this.getInputDisplayValue(null),Me=(Dt||Dt===0)&&(isNaN(Dt)||Number(Dt)>=tt),Xe=(Dt||Dt===0)&&(isNaN(Dt)||Number(Dt)<=xt),J=Me||fe||et,H=Xe||fe||et,K=_()("".concat(Re,"-handler"),"".concat(Re,"-handler-up"),Object(xe.a)({},"".concat(Re,"-handler-up-disabled"),J)),C=_()("".concat(Re,"-handler"),"".concat(Re,"-handler-down"),Object(xe.a)({},"".concat(Re,"-handler-down-disabled"),H)),E=O?{onTouchStart:J?R:this.up,onTouchEnd:this.stop}:{onMouseDown:J?R:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},A=O?{onTouchStart:H?R:this.down,onTouchEnd:this.stop}:{onMouseDown:H?R:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return ce.a.createElement("div",{className:wt,style:Qe,title:Je,onMouseEnter:Ue,onMouseLeave:Ve,onMouseOver:oe,onMouseOut:D,onFocus:function(){return null},onBlur:function(){return null}},ce.a.createElement("div",{className:"".concat(Re,"-handler-wrap")},ce.a.createElement("span",Object.assign({unselectable:"on"},E,{role:"button","aria-label":"Increase Value","aria-disabled":J,className:K}),le||ce.a.createElement("span",{unselectable:"on",className:"".concat(Re,"-handler-up-inner"),onClick:k})),ce.a.createElement("span",Object.assign({unselectable:"on"},A,{role:"button","aria-label":"Decrease Value","aria-disabled":H,className:C}),je||ce.a.createElement("span",{unselectable:"on",className:"".concat(Re,"-handler-down-inner"),onClick:k}))),ce.a.createElement("div",{className:"".concat(Re,"-input-wrap")},ce.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":xt,"aria-valuemax":tt,"aria-valuenow":Dt,required:it,type:mt,placeholder:At,onPaste:Lt,onClick:kt,onMouseUp:this.onMouseUp,className:"".concat(Re,"-input"),tabIndex:Ut,autoComplete:y,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:It?this.onKeyDown:R,onKeyUp:It?this.onKeyUp:R,autoFocus:We,maxLength:Ke,readOnly:et,disabled:fe,max:tt,min:xt,step:dt,name:Ze,title:Je,id:Te,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(pt),pattern:at,inputMode:Ye,onInput:gt},Se))))}}]),ve}(ce.a.Component);ue.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:be,min:-be,step:1,style:{},onChange:R,onKeyDown:R,onPressEnter:R,onFocus:R,onBlur:R,parser:te,required:!1,autoComplete:"off"};var ge=ue,Ie=we.a=ge},ji0R:function(Pe,we,p){Pe.exports=p.p+"static/douyu.3e6df9ee.jpg"},k3GJ:function(Pe,we,p){"use strict";p.d(we,"a",function(){return Ca});var W=p("rePB"),xe=p("ODXe"),me=p("Ff2n"),Z=p("VTBJ"),x=p("q1tI"),ke=p("TSYQ"),P=p.n(ke),$=p("Zm9Q"),ce=p("6cGi"),ye=p("KQm4"),_=p("xEkU"),V=p.n(_),Ce=p("t23M");function se(S){var G=Object(x.useRef)(),Y=Object(x.useRef)(!1);function L(){for(var g=arguments.length,w=new Array(g),b=0;b<g;b++)w[b]=arguments[b];Y.current||(V.a.cancel(G.current),G.current=V()(function(){S.apply(void 0,w)}))}return Object(x.useEffect)(function(){return function(){Y.current=!0,V.a.cancel(G.current)}},[]),L}function ee(S){var G=Object(x.useRef)([]),Y=Object(x.useState)({}),L=Object(xe.a)(Y,2),g=L[1],w=Object(x.useRef)(typeof S=="function"?S():S),b=se(function(){var j=w.current;G.current.forEach(function(q){j=q(j)}),G.current=[],w.current=j,g({})});function N(j){G.current.push(j),b()}return[w.current,N]}var U=p("4IlW");function R(S,G){var Y,L=S.prefixCls,g=S.id,w=S.active,b=S.rtl,N=S.tab,j=N.key,q=N.tab,Q=N.disabled,ie=N.closeIcon,Oe=S.tabBarGutter,$e=S.tabPosition,qe=S.closable,vt=S.renderWrapper,Jt=S.removeAriaLabel,sn=S.editable,en=S.onClick,nn=S.onRemove,ln=S.onFocus,rn="".concat(L,"-tab");x.useEffect(function(){return nn},[]);var on={};$e==="top"||$e==="bottom"?on[b?"marginLeft":"marginRight"]=Oe:on.marginBottom=Oe;var An=sn&&qe!==!1&&!Q;function fn(Kt){if(Q)return;en(Kt)}function Jn(Kt){Kt.preventDefault(),Kt.stopPropagation(),sn.onEdit("remove",{key:j,event:Kt})}var pn=x.createElement("div",{key:j,ref:G,className:P()(rn,(Y={},Object(W.a)(Y,"".concat(rn,"-with-remove"),An),Object(W.a)(Y,"".concat(rn,"-active"),w),Object(W.a)(Y,"".concat(rn,"-disabled"),Q),Y)),style:on,onClick:fn},x.createElement("div",{role:"tab","aria-selected":w,id:g&&"".concat(g,"-tab-").concat(j),className:"".concat(rn,"-btn"),"aria-controls":g&&"".concat(g,"-panel-").concat(j),"aria-disabled":Q,tabIndex:Q?null:0,onClick:function(Vt){Vt.stopPropagation(),fn(Vt)},onKeyDown:function(Vt){[U.a.SPACE,U.a.ENTER].includes(Vt.which)&&(Vt.preventDefault(),fn(Vt))},onFocus:ln},q),An&&x.createElement("button",{type:"button","aria-label":Jt||"remove",tabIndex:0,className:"".concat(rn,"-remove"),onClick:function(Vt){Vt.stopPropagation(),Jn(Vt)}},ie||sn.removeIcon||"\xD7"));return vt&&(pn=vt(pn)),pn}var k=x.forwardRef(R),te={width:0,height:0,left:0,top:0};function Ae(S,G,Y){return Object(x.useMemo)(function(){for(var L,g=new Map,w=G.get((L=S[0])===null||L===void 0?void 0:L.key)||te,b=w.left+w.width,N=0;N<S.length;N+=1){var j=S[N].key,q=G.get(j);if(!q){var Q;q=G.get((Q=S[N-1])===null||Q===void 0?void 0:Q.key)||te}var ie=g.get(j)||Object(Z.a)({},q);ie.right=b-ie.left-ie.width,g.set(j,ie)}return g},[S.map(function(L){return L.key}).join("_"),G,Y])}var Fe={width:0,height:0,left:0,top:0,right:0};function be(S,G,Y,L,g){var w=g.tabs,b=g.tabPosition,N=g.rtl,j,q,Q;["top","bottom"].includes(b)?(j="width",q=N?"right":"left",Q=Math.abs(G.left)):(j="height",q="top",Q=-G.top);var ie=G[j],Oe=Y[j],$e=L[j],qe=ie;return Oe+$e>ie&&(qe=ie-$e),Object(x.useMemo)(function(){if(!w.length)return[0,0];for(var vt=w.length,Jt=vt,sn=0;sn<vt;sn+=1){var en=S.get(w[sn].key)||Fe;if(en[q]+en[j]>Q+qe){Jt=sn-1;break}}for(var nn=0,ln=vt-1;ln>=0;ln-=1){var rn=S.get(w[ln].key)||Fe;if(rn[q]<Q){nn=ln+1;break}}return[nn,Jt]},[S,Q,qe,b,w.map(function(vt){return vt.key}).join("_"),N])}var he=p("wx14"),He=p("1OyB"),ue=p("vuIU"),ge=p("JX7q"),Ie=p("Ji7U"),pe=p("LK+K"),M=p("I8Z2"),ve=p("bT9E"),re=p("2GS6"),B=p("Gytx"),Ee=p.n(B),Re=p("U8pU"),fe=/iPhone/i,et=/iPod/i,O=/iPad/i,y=/\bAndroid(?:.+)Mobile\b/i,le=/Android/i,je=/\bAndroid(?:.+)SD4930UR\b/i,Be=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,tt=/Windows Phone/i,xt=/\bWindows(?:.+)ARM\b/i,Qe=/BlackBerry/i,Je=/BB10/i,Ue=/Opera Mini/i,Ve=/\b(CriOS|Chrome)(?:.+)Mobile/i,oe=/Mobile(?:.+)Firefox\b/i;function D(S,G){return S.test(G)}function it(S){var G=S||(typeof navigator!="undefined"?navigator.userAgent:""),Y=(G||"").split("[FBAN");if(typeof Y[1]!="undefined"){var L=Y,g=Object(xe.a)(L,1);G=g[0]}if(Y=G.split("Twitter"),typeof Y[1]!="undefined"){var w=Y,b=Object(xe.a)(w,1);G=b[0]}var N={apple:{phone:D(fe,G)&&!D(tt,G),ipod:D(et,G),tablet:!D(fe,G)&&D(O,G)&&!D(tt,G),device:(D(fe,G)||D(et,G)||D(O,G))&&!D(tt,G)},amazon:{phone:D(je,G),tablet:!D(je,G)&&D(Be,G),device:D(je,G)||D(Be,G)},android:{phone:!D(tt,G)&&D(je,G)||!D(tt,G)&&D(y,G),tablet:!D(tt,G)&&!D(je,G)&&!D(y,G)&&(D(Be,G)||D(le,G)),device:!D(tt,G)&&(D(je,G)||D(Be,G)||D(y,G)||D(le,G))||D(/\bokhttp\b/i,G)},windows:{phone:D(tt,G),tablet:D(xt,G),device:D(tt,G)||D(xt,G)},other:{blackberry:D(Qe,G),blackberry10:D(Je,G),opera:D(Ue,G),firefox:D(oe,G),chrome:D(Ve,G),device:D(Qe,G)||D(Je,G)||D(Ue,G)||D(oe,G)||D(Ve,G)},any:null,phone:null,tablet:null};return N.any=N.apple.device||N.android.device||N.windows.device||N.other.device,N.phone=N.apple.phone||N.android.phone||N.windows.phone,N.tablet=N.apple.tablet||N.android.tablet||N.windows.tablet,N}var kt=Object(Z.a)(Object(Z.a)({},it()),{},{isMobile:it}),Ut=kt;function mt(){}function At(S,G,Y){var L=G||"";return S.key||"".concat(L,"item_").concat(Y)}function Te(S){return"".concat(S,"-menu-")}function Ye(S,G){var Y=-1;x.Children.forEach(S,function(L){Y+=1,L&&L.type&&L.type.isMenuItemGroup?x.Children.forEach(L.props.children,function(g){Y+=1,G(g,Y)}):G(L,Y)})}function at(S,G,Y){if(!S||Y.find)return;x.Children.forEach(S,function(L){if(L){var g=L.type;if(!g||!(g.isSubMenu||g.isMenuItem||g.isMenuItemGroup))return;G.indexOf(L.key)!==-1?Y.find=!0:L.props.children&&at(L.props.children,G,Y)}})}var dt=["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"],Ke=function(G){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,L=G&&typeof G.getBoundingClientRect=="function"&&G.getBoundingClientRect().width;if(L){if(Y){var g=getComputedStyle(G),w=g.marginLeft,b=g.marginRight;L+=+w.replace("px","")+ +b.replace("px","")}L=+L.toFixed(6)}return L||0},We=function(G,Y,L){G&&Object(Re.a)(G.style)==="object"&&(G.style[Y]=L)},Ze=function(){return Ut.any},Lt=p("bdgK"),gt=p("i8i4"),ot=p.n(gt),rt=p("wgJM"),Dt=p("l4aY"),ft=p("m+aA"),wt=p("c+Xe"),Se=p("zT1h"),It=p("QC+M");function pt(S,G,Y){return Y?S[0]===G[0]:S[0]===G[0]&&S[1]===G[1]}function Me(S,G,Y){var L=S[G]||{};return Object(Z.a)(Object(Z.a)({},L),Y)}function Xe(S,G,Y,L){for(var g=Y.points,w=Object.keys(S),b=0;b<w.length;b+=1){var N=w[b];if(pt(S[N].points,g,L))return"".concat(G,"-placement-").concat(N)}return""}var J=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var S=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(S)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(S==null?void 0:S.substr(0,4)))},H=p("MNnm");function K(S,G){var Y={};return Y[S.toLowerCase()]=G.toLowerCase(),Y["Webkit".concat(S)]="webkit".concat(G),Y["Moz".concat(S)]="moz".concat(G),Y["ms".concat(S)]="MS".concat(G),Y["O".concat(S)]="o".concat(G.toLowerCase()),Y}function C(S,G){var Y={animationend:K("Animation","AnimationEnd"),transitionend:K("Transition","TransitionEnd")};return S&&("AnimationEvent"in G||delete Y.animationend.animation,"TransitionEvent"in G||delete Y.transitionend.transition),Y}var E=C(Object(H.a)(),typeof window!="undefined"?window:{}),A={};if(Object(H.a)()){var T=document.createElement("div");A=T.style}var ae={};function X(S){if(ae[S])return ae[S];var G=E[S];if(G)for(var Y=Object.keys(G),L=Y.length,g=0;g<L;g+=1){var w=Y[g];if(Object.prototype.hasOwnProperty.call(G,w)&&w in A)return ae[S]=G[w],ae[S]}return""}var Le=X("animationend"),ht=X("transitionend"),Ct=!!(Le&&ht),ct=Le||"animationend",Ft=ht||"transitionend";function Pt(S,G){if(!S)return null;if(Object(Re.a)(S)==="object"){var Y=G.replace(/-\w/g,function(L){return L[1].toUpperCase()});return S[Y]}return"".concat(S,"-").concat(G)}var lt="none",an="appear",Zt="enter",nt="leave",mn="none",Qt="prepare",ui="start",gi="active",Wt="end";function Ei(S){var G=Object(x.useRef)(!1),Y=Object(x.useState)(S),L=Object(xe.a)(Y,2),g=L[0],w=L[1];function b(N){G.current||w(N)}return Object(x.useEffect)(function(){return function(){G.current=!0}},[]),[g,b]}var Gn=Object(H.a)()?x.useLayoutEffect:x.useEffect,Vn=Gn,vi=function(){var S=x.useRef(null);function G(){rt.a.cancel(S.current)}function Y(L){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;G();var w=Object(rt.a)(function(){g<=1?L({isCanceled:function(){return w!==S.current}}):Y(L,g-1)});S.current=w}return x.useEffect(function(){return function(){G()}},[]),[Y,G]},Ii=[Qt,ui,gi,Wt],Vi=!1,un=!0;function Tt(S){return S===gi||S===Wt}var Ni=function(S,G){var Y=x.useState(mn),L=Object(xe.a)(Y,2),g=L[0],w=L[1],b=vi(),N=Object(xe.a)(b,2),j=N[0],q=N[1];function Q(){w(Qt)}return Vn(function(){if(g!==mn&&g!==Wt){var ie=Ii.indexOf(g),Oe=Ii[ie+1],$e=G(g);$e===Vi?w(Oe):j(function(qe){function vt(){if(qe.isCanceled())return;w(Oe)}$e===!0?vt():Promise.resolve($e).then(vt)})}},[S,g]),x.useEffect(function(){return function(){q()}},[]),[Q,g]},Ti=function(S){var G=Object(x.useRef)(),Y=Object(x.useRef)(S);Y.current=S;var L=x.useCallback(function(b){Y.current(b)},[]);function g(b){b&&(b.removeEventListener(Ft,L),b.removeEventListener(ct,L))}function w(b){G.current&&G.current!==b&&g(G.current),b&&b!==G.current&&(b.addEventListener(Ft,L),b.addEventListener(ct,L),G.current=b)}return x.useEffect(function(){return function(){g(G.current)}},[]),[w,g]};function In(S,G,Y,L){var g=L.motionEnter,w=g===void 0?!0:g,b=L.motionAppear,N=b===void 0?!0:b,j=L.motionLeave,q=j===void 0?!0:j,Q=L.motionDeadline,ie=L.motionLeaveImmediately,Oe=L.onAppearPrepare,$e=L.onEnterPrepare,qe=L.onLeavePrepare,vt=L.onAppearStart,Jt=L.onEnterStart,sn=L.onLeaveStart,en=L.onAppearActive,nn=L.onEnterActive,ln=L.onLeaveActive,rn=L.onAppearEnd,on=L.onEnterEnd,An=L.onLeaveEnd,fn=L.onVisibleChanged,Jn=Ei(),pn=Object(xe.a)(Jn,2),Kt=pn[0],Vt=pn[1],yn=Ei(lt),Sn=Object(xe.a)(yn,2),jt=Sn[0],kn=Sn[1],Xn=Ei(null),Tn=Object(xe.a)(Xn,2),Bn=Tn[0],_n=Tn[1],si=Object(x.useRef)(!1),wi=Object(x.useRef)(null),Zn=Object(x.useRef)(!1),Wi=Object(x.useRef)(null);function ho(){var Wn=Y();return Wn||Wi.current}var Ki=Object(x.useRef)(!1);function Ai(Wn){var Pn=ho();if(Wn&&!Wn.deadline&&Wn.target!==Pn)return;var Si;jt===an&&Ki.current?Si=rn==null?void 0:rn(Pn,Wn):jt===Zt&&Ki.current?Si=on==null?void 0:on(Pn,Wn):jt===nt&&Ki.current&&(Si=An==null?void 0:An(Pn,Wn)),Si!==!1&&!Zn.current&&(kn(lt),_n(null))}var zn=Ti(Ai),Un=Object(xe.a)(zn,1),qn=Un[0],Yn=x.useMemo(function(){var Wn,Pn,Si;switch(jt){case"appear":return Wn={},Object(W.a)(Wn,Qt,Oe),Object(W.a)(Wn,ui,vt),Object(W.a)(Wn,gi,en),Wn;case"enter":return Pn={},Object(W.a)(Pn,Qt,$e),Object(W.a)(Pn,ui,Jt),Object(W.a)(Pn,gi,nn),Pn;case"leave":return Si={},Object(W.a)(Si,Qt,qe),Object(W.a)(Si,ui,sn),Object(W.a)(Si,gi,ln),Si;default:return{}}},[jt]),fo=Ni(jt,function(Wn){if(Wn===Qt){var Pn=Yn[Qt];return Pn?Pn(ho()):Vi}if(jn in Yn){var Si;_n(((Si=Yn[jn])===null||Si===void 0?void 0:Si.call(Yn,ho(),null))||null)}return jn===gi&&(qn(ho()),Q>0&&(clearTimeout(wi.current),wi.current=setTimeout(function(){Ai({deadline:!0})},Q))),un}),Oo=Object(xe.a)(fo,2),To=Oo[0],jn=Oo[1],yo=Tt(jn);Ki.current=yo,Vn(function(){Vt(G);var Wn=si.current;if(si.current=!0,!S)return;var Pn;!Wn&&G&&N&&(Pn=an),Wn&&G&&w&&(Pn=Zt),(Wn&&!G&&q||!Wn&&ie&&!G&&q)&&(Pn=nt),Pn&&(kn(Pn),To())},[G]),Object(x.useEffect)(function(){(jt===an&&!N||jt===Zt&&!w||jt===nt&&!q)&&kn(lt)},[N,w,q]),Object(x.useEffect)(function(){return function(){clearTimeout(wi.current),Zn.current=!0}},[]),Object(x.useEffect)(function(){Kt!==void 0&&jt===lt&&(fn==null||fn(Kt))},[Kt,jt]);var Ro=Bn;return Yn[Qt]&&jn===ui&&(Ro=Object(Z.a)({transition:"none"},Ro)),[jt,jn,Ro,Kt!=null?Kt:G]}var zt=function(S){Object(Ie.a)(Y,S);var G=Object(pe.a)(Y);function Y(){return Object(He.a)(this,Y),G.apply(this,arguments)}return Object(ue.a)(Y,[{key:"render",value:function(){return this.props.children}}]),Y}(x.Component),En=zt;function $t(S){var G=S;Object(Re.a)(S)==="object"&&(G=S.transitionSupport);function Y(g){return!!(g.motionName&&G)}var L=x.forwardRef(function(g,w){var b=g.visible,N=b===void 0?!0:b,j=g.removeOnLeave,q=j===void 0?!0:j,Q=g.forceRender,ie=g.children,Oe=g.motionName,$e=g.leavedClassName,qe=g.eventProps,vt=Y(g),Jt=Object(x.useRef)(),sn=Object(x.useRef)();function en(){try{return Object(ft.a)(Jt.current||sn.current)}catch(kn){return null}}var nn=In(vt,N,en,g),ln=Object(xe.a)(nn,4),rn=ln[0],on=ln[1],An=ln[2],fn=ln[3],Jn=x.useRef(fn);fn&&(Jn.current=!0);var pn=Object(x.useRef)(w);pn.current=w;var Kt=x.useCallback(function(kn){Jt.current=kn,Object(wt.b)(pn.current,kn)},[]),Vt,yn=Object(Z.a)(Object(Z.a)({},qe),{},{visible:N});if(!ie)Vt=null;else if(rn===lt||!Y(g))fn?Vt=ie(Object(Z.a)({},yn),Kt):!q&&Jn.current?Vt=ie(Object(Z.a)(Object(Z.a)({},yn),{},{className:$e}),Kt):Q?Vt=ie(Object(Z.a)(Object(Z.a)({},yn),{},{style:{display:"none"}}),Kt):Vt=null;else{var Sn,jt;on===Qt?jt="prepare":Tt(on)?jt="active":on===ui&&(jt="start"),Vt=ie(Object(Z.a)(Object(Z.a)({},yn),{},{className:P()(Pt(Oe,rn),(Sn={},Object(W.a)(Sn,Pt(Oe,"".concat(rn,"-").concat(jt)),jt),Object(W.a)(Sn,Oe,typeof Oe=="string"),Sn)),style:An}),Kt)}return x.createElement(En,{ref:sn},Vt)});return L.displayName="CSSMotion",L}var gn=$t(Ct),Ne="add",_t="keep",Kn="remove",ei="removed";function ro(S){var G;return S&&Object(Re.a)(S)==="object"&&"key"in S?G=S:G={key:S},Object(Z.a)(Object(Z.a)({},G),{},{key:String(G.key)})}function ao(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return S.map(ro)}function d(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Y=[],L=0,g=G.length,w=ao(S),b=ao(G);w.forEach(function(q){for(var Q=!1,ie=L;ie<g;ie+=1){var Oe=b[ie];if(Oe.key===q.key){L<ie&&(Y=Y.concat(b.slice(L,ie).map(function($e){return Object(Z.a)(Object(Z.a)({},$e),{},{status:Ne})})),L=ie),Y.push(Object(Z.a)(Object(Z.a)({},Oe),{},{status:_t})),L+=1,Q=!0;break}}Q||Y.push(Object(Z.a)(Object(Z.a)({},q),{},{status:Kn}))}),L<g&&(Y=Y.concat(b.slice(L).map(function(q){return Object(Z.a)(Object(Z.a)({},q),{},{status:Ne})})));var N={};Y.forEach(function(q){var Q=q.key;N[Q]=(N[Q]||0)+1});var j=Object.keys(N).filter(function(q){return N[q]>1});return j.forEach(function(q){Y=Y.filter(function(Q){var ie=Q.key,Oe=Q.status;return ie!==q||Oe!==Kn}),Y.forEach(function(Q){Q.key===q&&(Q.status=_t)})}),Y}var r=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function a(S){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gn,Y=function(L){Object(Ie.a)(w,L);var g=Object(pe.a)(w);function w(){var b;return Object(He.a)(this,w),b=g.apply(this,arguments),b.state={keyEntities:[]},b.removeKey=function(N){b.setState(function(j){var q=j.keyEntities;return{keyEntities:q.map(function(Q){return Q.key!==N?Q:Object(Z.a)(Object(Z.a)({},Q),{},{status:ei})})}})},b}return Object(ue.a)(w,[{key:"render",value:function(){var N=this,j=this.state.keyEntities,q=this.props,Q=q.component,ie=q.children,Oe=q.onVisibleChanged,$e=Object(me.a)(q,["component","children","onVisibleChanged"]),qe=Q||x.Fragment,vt={};return r.forEach(function(Jt){vt[Jt]=$e[Jt],delete $e[Jt]}),delete $e.keys,x.createElement(qe,$e,j.map(function(Jt){var sn=Jt.status,en=Object(me.a)(Jt,["status"]),nn=sn===Ne||sn===_t;return x.createElement(G,Object(he.a)({},vt,{key:en.key,visible:nn,eventProps:en,onVisibleChanged:function(rn){Oe==null||Oe(rn,{key:en.key}),rn||N.removeKey(en.key)}}),ie)}))}}],[{key:"getDerivedStateFromProps",value:function(N,j){var q=N.keys,Q=j.keyEntities,ie=ao(q),Oe=d(Q,ie);return{keyEntities:Oe.filter(function($e){var qe=Q.find(function(vt){var Jt=vt.key;return $e.key===Jt});return!(qe&&qe.status===ei&&$e.status===Kn)})}}}]),w}(x.Component);return Y.defaultProps={component:"div"},Y}var u=a(Ct),h=gn;function c(S){var G=S.prefixCls,Y=S.motion,L=S.animation,g=S.transitionName;return Y||(L?{motionName:"".concat(G,"-").concat(L)}:g?{motionName:g}:null)}function z(S){var G=S.prefixCls,Y=S.visible,L=S.zIndex,g=S.mask,w=S.maskMotion,b=S.maskAnimation,N=S.maskTransitionName;if(!g)return null;var j={};return(w||N||b)&&(j=Object(Z.a)({motionAppear:!0},c({motion:w,prefixCls:G,transitionName:N,animation:b}))),x.createElement(h,Object(he.a)({},j,{visible:Y,removeOnLeave:!0}),function(q){var Q=q.className;return x.createElement("div",{style:{zIndex:L},className:P()("".concat(G,"-mask"),Q)})})}var _e=p("9mu1"),ut=p("o0o1"),Mt=p.n(ut),ze=p("HaE+"),Et=["measure","align",null,"motion"],St=function(S,G){var Y=Object(x.useState)(null),L=Object(xe.a)(Y,2),g=L[0],w=L[1],b=Object(x.useRef)(),N=Object(x.useRef)(!1);function j(ie){N.current||w(ie)}function q(){rt.a.cancel(b.current)}function Q(ie){q(),b.current=Object(rt.a)(function(){j(function(Oe){switch(g){case"align":return"motion";case"motion":return"stable";default:}return Oe}),ie==null||ie()})}return Object(x.useEffect)(function(){j("measure")},[S]),Object(x.useEffect)(function(){switch(g){case"measure":G();break;default:}g&&(b.current=Object(rt.a)(Object(ze.a)(Mt.a.mark(function ie(){var Oe,$e;return Mt.a.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:Oe=Et.indexOf(g),$e=Et[Oe+1],$e&&Oe!==-1&&j($e);case 3:case"end":return vt.stop()}},ie)}))))},[g]),Object(x.useEffect)(function(){return function(){N.current=!0,q()}},[]),[g,Q]},Rt=function(S){var G=x.useState({width:0,height:0}),Y=Object(xe.a)(G,2),L=Y[0],g=Y[1];function w(N){g({width:N.offsetWidth,height:N.offsetHeight})}var b=x.useMemo(function(){var N={};if(S){var j=L.width,q=L.height;S.indexOf("height")!==-1&&q?N.height=q:S.indexOf("minHeight")!==-1&&q&&(N.minHeight=q),S.indexOf("width")!==-1&&j?N.width=j:S.indexOf("minWidth")!==-1&&j&&(N.minWidth=j)}return N},[S,L]);return[b,w]},tn=x.forwardRef(function(S,G){var Y=S.visible,L=S.prefixCls,g=S.className,w=S.style,b=S.children,N=S.zIndex,j=S.stretch,q=S.destroyPopupOnHide,Q=S.forceRender,ie=S.align,Oe=S.point,$e=S.getRootDomNode,qe=S.getClassNameFromAlign,vt=S.onAlign,Jt=S.onMouseEnter,sn=S.onMouseLeave,en=S.onMouseDown,nn=S.onTouchStart,ln=Object(x.useRef)(),rn=Object(x.useRef)(),on=Object(x.useState)(),An=Object(xe.a)(on,2),fn=An[0],Jn=An[1],pn=Rt(j),Kt=Object(xe.a)(pn,2),Vt=Kt[0],yn=Kt[1];function Sn(){j&&yn($e())}var jt=St(Y,Sn),kn=Object(xe.a)(jt,2),Xn=kn[0],Tn=kn[1],Bn=Object(x.useRef)();function _n(){return Oe||$e}function si(){var zn;(zn=ln.current)===null||zn===void 0||zn.forceAlign()}function wi(zn,Un){var qn=qe(Un);fn!==qn&&Jn(qn),Xn==="align"&&(fn!==qn?Promise.resolve().then(function(){si()}):Tn(function(){var Yn;(Yn=Bn.current)===null||Yn===void 0||Yn.call(Bn)}),vt==null||vt(zn,Un))}var Zn=Object(Z.a)({},c(S));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(zn){var Un=Zn[zn];Zn[zn]=function(qn,Yn){return Tn(),Un==null?void 0:Un(qn,Yn)}});function Wi(){return new Promise(function(zn){Bn.current=zn})}x.useEffect(function(){!Zn.motionName&&Xn==="motion"&&Tn()},[Zn.motionName,Xn]),x.useImperativeHandle(G,function(){return{forceAlign:si,getElement:function(){return rn.current}}});var ho=Object(Z.a)(Object(Z.a)({},Vt),{},{zIndex:N,opacity:Xn==="motion"||Xn==="stable"||!Y?void 0:0,pointerEvents:Xn==="stable"?void 0:"none"},w),Ki=!0;(ie==null?void 0:ie.points)&&(Xn==="align"||Xn==="stable")&&(Ki=!1);var Ai=b;return x.Children.count(b)>1&&(Ai=x.createElement("div",{className:"".concat(L,"-content")},b)),x.createElement(h,Object(he.a)({visible:Y,ref:rn,leavedClassName:"".concat(L,"-hidden")},Zn,{onAppearPrepare:Wi,onEnterPrepare:Wi,removeOnLeave:q,forceRender:Q}),function(zn,Un){var qn=zn.className,Yn=zn.style,fo=P()(L,g,fn,qn);return x.createElement(_e.a,{target:_n(),key:"popup",ref:ln,monitorWindowResize:!0,disabled:Ki,align:ie,onAlign:wi},x.createElement("div",{ref:Un,className:fo,onMouseEnter:Jt,onMouseLeave:sn,onMouseDownCapture:en,onTouchStartCapture:nn,style:Object(Z.a)(Object(Z.a)({},Yn),ho)},Ai))})});tn.displayName="PopupInner";var vn=tn,qt=x.forwardRef(function(S,G){var Y=S.prefixCls,L=S.visible,g=S.zIndex,w=S.children,b=S.mobile;b=b===void 0?{}:b;var N=b.popupClassName,j=b.popupStyle,q=b.popupMotion,Q=q===void 0?{}:q,ie=b.popupRender,Oe=x.useRef();x.useImperativeHandle(G,function(){return{forceAlign:function(){},getElement:function(){return Oe.current}}});var $e=Object(Z.a)({zIndex:g},j),qe=w;return x.Children.count(w)>1&&(qe=x.createElement("div",{className:"".concat(Y,"-content")},w)),ie&&(qe=ie(qe)),x.createElement(h,Object(he.a)({visible:L,ref:Oe,removeOnLeave:!0},Q),function(vt,Jt){var sn=vt.className,en=vt.style,nn=P()(Y,N,sn);return x.createElement("div",{ref:Jt,className:nn,style:Object(Z.a)(Object(Z.a)({},en),$e)},qe)})});qt.displayName="MobilePopupInner";var Pi=qt,ci=["visible","mobile"],xi=x.forwardRef(function(S,G){var Y=S.visible,L=S.mobile,g=Object(me.a)(S,ci),w=Object(x.useState)(Y),b=Object(xe.a)(w,2),N=b[0],j=b[1],q=Object(x.useState)(!1),Q=Object(xe.a)(q,2),ie=Q[0],Oe=Q[1],$e=Object(Z.a)(Object(Z.a)({},g),{},{visible:N});Object(x.useEffect)(function(){j(Y),Y&&L&&Oe(J())},[Y,L]);var qe=ie?x.createElement(Pi,Object(he.a)({},$e,{mobile:L,ref:G})):x.createElement(vn,Object(he.a)({},$e,{ref:G}));return x.createElement("div",null,x.createElement(z,$e),qe)});xi.displayName="Popup";var Ui=xi,ti=x.createContext(null),so=ti;function Zi(){}function bo(){return""}function vo(S){return S?S.ownerDocument:window.document}var sr=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Go(S){var G=function(Y){Object(Ie.a)(g,Y);var L=Object(pe.a)(g);function g(w){var b;Object(He.a)(this,g),b=L.call(this,w),b.popupRef=x.createRef(),b.triggerRef=x.createRef(),b.attachId=void 0,b.clickOutsideHandler=void 0,b.touchOutsideHandler=void 0,b.contextMenuOutsideHandler1=void 0,b.contextMenuOutsideHandler2=void 0,b.mouseDownTimeout=void 0,b.focusTime=void 0,b.preClickTime=void 0,b.preTouchTime=void 0,b.delayTimer=void 0,b.hasPopupMouseDown=void 0,b.onMouseEnter=function(j){var q=b.props.mouseEnterDelay;b.fireEvents("onMouseEnter",j),b.delaySetPopupVisible(!0,q,q?null:j)},b.onMouseMove=function(j){b.fireEvents("onMouseMove",j),b.setPoint(j)},b.onMouseLeave=function(j){b.fireEvents("onMouseLeave",j),b.delaySetPopupVisible(!1,b.props.mouseLeaveDelay)},b.onPopupMouseEnter=function(){b.clearDelayTimer()},b.onPopupMouseLeave=function(j){var q;if(j.relatedTarget&&!j.relatedTarget.setTimeout&&Object(Dt.a)((q=b.popupRef.current)===null||q===void 0?void 0:q.getElement(),j.relatedTarget))return;b.delaySetPopupVisible(!1,b.props.mouseLeaveDelay)},b.onFocus=function(j){b.fireEvents("onFocus",j),b.clearDelayTimer(),b.isFocusToShow()&&(b.focusTime=Date.now(),b.delaySetPopupVisible(!0,b.props.focusDelay))},b.onMouseDown=function(j){b.fireEvents("onMouseDown",j),b.preClickTime=Date.now()},b.onTouchStart=function(j){b.fireEvents("onTouchStart",j),b.preTouchTime=Date.now()},b.onBlur=function(j){b.fireEvents("onBlur",j),b.clearDelayTimer(),b.isBlurToHide()&&b.delaySetPopupVisible(!1,b.props.blurDelay)},b.onContextMenu=function(j){j.preventDefault(),b.fireEvents("onContextMenu",j),b.setPopupVisible(!0,j)},b.onContextMenuClose=function(){b.isContextMenuToShow()&&b.close()},b.onClick=function(j){if(b.fireEvents("onClick",j),b.focusTime){var q;if(b.preClickTime&&b.preTouchTime?q=Math.min(b.preClickTime,b.preTouchTime):b.preClickTime?q=b.preClickTime:b.preTouchTime&&(q=b.preTouchTime),Math.abs(q-b.focusTime)<20)return;b.focusTime=0}b.preClickTime=0,b.preTouchTime=0,b.isClickToShow()&&(b.isClickToHide()||b.isBlurToHide())&&j&&j.preventDefault&&j.preventDefault();var Q=!b.state.popupVisible;(b.isClickToHide()&&!Q||Q&&b.isClickToShow())&&b.setPopupVisible(!b.state.popupVisible,j)},b.onPopupMouseDown=function(){if(b.hasPopupMouseDown=!0,clearTimeout(b.mouseDownTimeout),b.mouseDownTimeout=window.setTimeout(function(){b.hasPopupMouseDown=!1},0),b.context){var j;(j=b.context).onPopupMouseDown.apply(j,arguments)}},b.onDocumentClick=function(j){if(b.props.mask&&!b.props.maskClosable)return;var q=j.target,Q=b.getRootDomNode(),ie=b.getPopupDomNode();(!Object(Dt.a)(Q,q)||b.isContextMenuOnly())&&!Object(Dt.a)(ie,q)&&!b.hasPopupMouseDown&&b.close()},b.getRootDomNode=function(){var j=b.props.getTriggerDOMNode;if(j)return j(b.triggerRef.current);try{var q=Object(ft.a)(b.triggerRef.current);if(q)return q}catch(Q){}return ot.a.findDOMNode(Object(ge.a)(b))},b.getPopupClassNameFromAlign=function(j){var q=[],Q=b.props,ie=Q.popupPlacement,Oe=Q.builtinPlacements,$e=Q.prefixCls,qe=Q.alignPoint,vt=Q.getPopupClassNameFromAlign;return ie&&Oe&&q.push(Xe(Oe,$e,j,qe)),vt&&q.push(vt(j)),q.join(" ")},b.getComponent=function(){var j=b.props,q=j.prefixCls,Q=j.destroyPopupOnHide,ie=j.popupClassName,Oe=j.onPopupAlign,$e=j.popupMotion,qe=j.popupAnimation,vt=j.popupTransitionName,Jt=j.popupStyle,sn=j.mask,en=j.maskAnimation,nn=j.maskTransitionName,ln=j.maskMotion,rn=j.zIndex,on=j.popup,An=j.stretch,fn=j.alignPoint,Jn=j.mobile,pn=j.forceRender,Kt=b.state,Vt=Kt.popupVisible,yn=Kt.point,Sn=b.getPopupAlign(),jt={};return b.isMouseEnterToShow()&&(jt.onMouseEnter=b.onPopupMouseEnter),b.isMouseLeaveToHide()&&(jt.onMouseLeave=b.onPopupMouseLeave),jt.onMouseDown=b.onPopupMouseDown,jt.onTouchStart=b.onPopupMouseDown,x.createElement(Ui,Object(he.a)({prefixCls:q,destroyPopupOnHide:Q,visible:Vt,point:fn&&yn,className:ie,align:Sn,onAlign:Oe,animation:qe,getClassNameFromAlign:b.getPopupClassNameFromAlign},jt,{stretch:An,getRootDomNode:b.getRootDomNode,style:Jt,mask:sn,zIndex:rn,transitionName:vt,maskAnimation:en,maskTransitionName:nn,maskMotion:ln,ref:b.popupRef,motion:$e,mobile:Jn,forceRender:pn}),typeof on=="function"?on():on)},b.attachParent=function(j){rt.a.cancel(b.attachId);var q=b.props,Q=q.getPopupContainer,ie=q.getDocument,Oe=b.getRootDomNode(),$e;Q?(Oe||Q.length===0)&&($e=Q(Oe)):$e=ie(b.getRootDomNode()).body,$e?$e.appendChild(j):b.attachId=Object(rt.a)(function(){b.attachParent(j)})},b.getContainer=function(){var j=b.props.getDocument,q=j(b.getRootDomNode()).createElement("div");return q.style.position="absolute",q.style.top="0",q.style.left="0",q.style.width="100%",b.attachParent(q),q},b.setPoint=function(j){var q=b.props.alignPoint;if(!q||!j)return;b.setState({point:{pageX:j.pageX,pageY:j.pageY}})},b.handlePortalUpdate=function(){b.state.prevPopupVisible!==b.state.popupVisible&&b.props.afterPopupVisibleChange(b.state.popupVisible)},b.triggerContextValue={onPopupMouseDown:b.onPopupMouseDown};var N;return"popupVisible"in w?N=!!w.popupVisible:N=!!w.defaultPopupVisible,b.state={prevPopupVisible:N,popupVisible:N},sr.forEach(function(j){b["fire".concat(j)]=function(q){b.fireEvents(j,q)}}),b}return Object(ue.a)(g,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var b=this.props,N=this.state;if(N.popupVisible){var j;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(j=b.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Se.a)(j,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(j=j||b.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Se.a)(j,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(j=j||b.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Se.a)(j,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Se.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),rt.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var b;return((b=this.popupRef.current)===null||b===void 0?void 0:b.getElement())||null}},{key:"getPopupAlign",value:function(){var b=this.props,N=b.popupPlacement,j=b.popupAlign,q=b.builtinPlacements;return N&&q?Me(q,N,j):j}},{key:"setPopupVisible",value:function(b,N){var j=this.props.alignPoint,q=this.state.popupVisible;this.clearDelayTimer(),q!==b&&("popupVisible"in this.props||this.setState({popupVisible:b,prevPopupVisible:q}),this.props.onPopupVisibleChange(b)),j&&N&&b&&this.setPoint(N)}},{key:"delaySetPopupVisible",value:function(b,N,j){var q=this,Q=N*1e3;if(this.clearDelayTimer(),Q){var ie=j?{pageX:j.pageX,pageY:j.pageY}:null;this.delayTimer=window.setTimeout(function(){q.setPopupVisible(b,ie),q.clearDelayTimer()},Q)}else this.setPopupVisible(b,j)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(b){var N=this.props.children.props,j=this.props;return N[b]&&j[b]?this["fire".concat(b)]:N[b]||j[b]}},{key:"isClickToShow",value:function(){var b=this.props,N=b.action,j=b.showAction;return N.indexOf("click")!==-1||j.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var b=this.props.action;return b==="contextMenu"||b.length===1&&b[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var b=this.props,N=b.action,j=b.showAction;return N.indexOf("contextMenu")!==-1||j.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var b=this.props,N=b.action,j=b.hideAction;return N.indexOf("click")!==-1||j.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var b=this.props,N=b.action,j=b.showAction;return N.indexOf("hover")!==-1||j.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var b=this.props,N=b.action,j=b.hideAction;return N.indexOf("hover")!==-1||j.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var b=this.props,N=b.action,j=b.showAction;return N.indexOf("focus")!==-1||j.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var b=this.props,N=b.action,j=b.hideAction;return N.indexOf("focus")!==-1||j.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var b;(b=this.popupRef.current)===null||b===void 0||b.forceAlign()}}},{key:"fireEvents",value:function(b,N){var j=this.props.children.props[b];j&&j(N);var q=this.props[b];q&&q(N)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var b=this.state.popupVisible,N=this.props,j=N.children,q=N.forceRender,Q=N.alignPoint,ie=N.className,Oe=N.autoDestroy,$e=x.Children.only(j),qe={key:"trigger"};this.isContextMenuToShow()?qe.onContextMenu=this.onContextMenu:qe.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(qe.onClick=this.onClick,qe.onMouseDown=this.onMouseDown,qe.onTouchStart=this.onTouchStart):(qe.onClick=this.createTwoChains("onClick"),qe.onMouseDown=this.createTwoChains("onMouseDown"),qe.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(qe.onMouseEnter=this.onMouseEnter,Q&&(qe.onMouseMove=this.onMouseMove)):qe.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?qe.onMouseLeave=this.onMouseLeave:qe.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(qe.onFocus=this.onFocus,qe.onBlur=this.onBlur):(qe.onFocus=this.createTwoChains("onFocus"),qe.onBlur=this.createTwoChains("onBlur"));var vt=P()($e&&$e.props&&$e.props.className,ie);vt&&(qe.className=vt);var Jt=Object(Z.a)({},qe);Object(wt.c)($e)&&(Jt.ref=Object(wt.a)(this.triggerRef,$e.ref));var sn=x.cloneElement($e,Jt),en;return(b||this.popupRef.current||q)&&(en=x.createElement(S,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!b&&Oe&&(en=null),x.createElement(so.Provider,{value:this.triggerContextValue},sn,en)}}],[{key:"getDerivedStateFromProps",value:function(b,N){var j=b.popupVisible,q={};return j!==void 0&&N.popupVisible!==j&&(q.popupVisible=j,q.prevPopupVisible=N.popupVisible),q}}]),g}(x.Component);return G.contextType=so,G.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:bo,getDocument:vo,onPopupVisibleChange:Zi,afterPopupVisibleChange:Zi,onPopupAlign:Zi,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},G}var lo=Go(It.a),di={adjustX:1,adjustY:1},ko={topLeft:{points:["bl","tl"],overflow:di,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:di,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:di,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:di,offset:[4,0]}},_o={topLeft:{points:["bl","tl"],overflow:di,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:di,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:di,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:di,offset:[4,0]}},yr=ko,Qn=0,Mn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ni=function(G,Y,L){var g=Te(Y),w=G.getState();G.setState({defaultActiveFirst:Object(Z.a)(Object(Z.a)({},w.defaultActiveFirst),{},Object(W.a)({},g,L))})},xn=function(S){Object(Ie.a)(Y,S);var G=Object(pe.a)(Y);function Y(L){var g;Object(He.a)(this,Y),g=G.call(this,L),g.onDestroy=function(Q){g.props.onDestroy(Q)},g.onKeyDown=function(Q){var ie=Q.keyCode,Oe=g.menuInstance,$e=g.props.store,qe=g.getVisible();if(ie===U.a.ENTER)return g.onTitleClick(Q),ni($e,g.props.eventKey,!0),!0;if(ie===U.a.RIGHT)return qe?Oe.onKeyDown(Q):(g.triggerOpenChange(!0),ni($e,g.props.eventKey,!0)),!0;if(ie===U.a.LEFT){var vt;if(qe)vt=Oe.onKeyDown(Q);else return;return vt||(g.triggerOpenChange(!1),vt=!0),vt}return qe&&(ie===U.a.UP||ie===U.a.DOWN)?Oe.onKeyDown(Q):void 0},g.onOpenChange=function(Q){g.props.onOpenChange(Q)},g.onPopupVisibleChange=function(Q){g.triggerOpenChange(Q,Q?"mouseenter":"mouseleave")},g.onMouseEnter=function(Q){var ie=g.props,Oe=ie.eventKey,$e=ie.onMouseEnter,qe=ie.store;ni(qe,g.props.eventKey,!1),$e({key:Oe,domEvent:Q})},g.onMouseLeave=function(Q){var ie=g.props,Oe=ie.parentMenu,$e=ie.eventKey,qe=ie.onMouseLeave;Oe.subMenuInstance=Object(ge.a)(g),qe({key:$e,domEvent:Q})},g.onTitleMouseEnter=function(Q){var ie=g.props,Oe=ie.eventKey,$e=ie.onItemHover,qe=ie.onTitleMouseEnter;$e({key:Oe,hover:!0}),qe({key:Oe,domEvent:Q})},g.onTitleMouseLeave=function(Q){var ie=g.props,Oe=ie.parentMenu,$e=ie.eventKey,qe=ie.onItemHover,vt=ie.onTitleMouseLeave;Oe.subMenuInstance=Object(ge.a)(g),qe({key:$e,hover:!1}),vt({key:$e,domEvent:Q})},g.onTitleClick=function(Q){var ie=Object(ge.a)(g),Oe=ie.props;if(Oe.onTitleClick({key:Oe.eventKey,domEvent:Q}),Oe.triggerSubMenuAction==="hover")return;g.triggerOpenChange(!g.getVisible(),"click"),ni(Oe.store,g.props.eventKey,!1)},g.onSubMenuClick=function(Q){typeof g.props.onClick=="function"&&g.props.onClick(g.addKeyPath(Q))},g.onSelect=function(Q){g.props.onSelect(Q)},g.onDeselect=function(Q){g.props.onDeselect(Q)},g.getPrefixCls=function(){return"".concat(g.props.rootPrefixCls,"-submenu")},g.getActiveClassName=function(){return"".concat(g.getPrefixCls(),"-active")},g.getDisabledClassName=function(){return"".concat(g.getPrefixCls(),"-disabled")},g.getSelectedClassName=function(){return"".concat(g.getPrefixCls(),"-selected")},g.getOpenClassName=function(){return"".concat(g.props.rootPrefixCls,"-submenu-open")},g.getVisible=function(){return g.state.isOpen},g.getMode=function(){return g.state.mode},g.saveMenuInstance=function(Q){g.menuInstance=Q},g.addKeyPath=function(Q){return Object(Z.a)(Object(Z.a)({},Q),{},{keyPath:(Q.keyPath||[]).concat(g.props.eventKey)})},g.triggerOpenChange=function(Q,ie){var Oe=g.props.eventKey,$e=function(){g.onOpenChange({key:Oe,item:Object(ge.a)(g),trigger:ie,open:Q})};ie==="mouseenter"?g.mouseenterTimeout=setTimeout(function(){$e()},0):$e()},g.isChildrenSelected=function(){var Q={find:!1};return at(g.props.children,g.props.selectedKeys,Q),Q.find},g.isInlineMode=function(){return g.getMode()==="inline"},g.adjustWidth=function(){if(!g.subMenuTitle||!g.menuInstance)return;var Q=gt.findDOMNode(g.menuInstance);if(Q.offsetWidth>=g.subMenuTitle.offsetWidth)return;Q.style.minWidth="".concat(g.subMenuTitle.offsetWidth,"px")},g.saveSubMenuTitle=function(Q){g.subMenuTitle=Q},g.getBaseProps=function(){var Q=Object(ge.a)(g),ie=Q.props,Oe=g.getMode();return{mode:Oe==="horizontal"?"vertical":Oe,visible:g.getVisible(),level:ie.level+1,inlineIndent:ie.inlineIndent,focusable:!1,onClick:g.onSubMenuClick,onSelect:g.onSelect,onDeselect:g.onDeselect,onDestroy:g.onDestroy,selectedKeys:ie.selectedKeys,eventKey:"".concat(ie.eventKey,"-menu-"),openKeys:ie.openKeys,motion:ie.motion,onOpenChange:g.onOpenChange,subMenuOpenDelay:ie.subMenuOpenDelay,parentMenu:Object(ge.a)(g),subMenuCloseDelay:ie.subMenuCloseDelay,forceSubMenuRender:ie.forceSubMenuRender,triggerSubMenuAction:ie.triggerSubMenuAction,builtinPlacements:ie.builtinPlacements,defaultActiveFirst:ie.store.getState().defaultActiveFirst[Te(ie.eventKey)],multiple:ie.multiple,prefixCls:ie.rootPrefixCls,id:g.internalMenuId,manualRef:g.saveMenuInstance,itemIcon:ie.itemIcon,expandIcon:ie.expandIcon,direction:ie.direction}},g.getMotion=function(Q,ie){var Oe=Object(ge.a)(g),$e=Oe.haveRendered,qe=g.props,vt=qe.motion,Jt=qe.rootPrefixCls,sn=Object(Z.a)(Object(Z.a)({},vt),{},{leavedClassName:"".concat(Jt,"-hidden"),removeOnLeave:!1,motionAppear:$e||!ie||Q!=="inline"});return sn};var w=L.store,b=L.eventKey,N=w.getState(),j=N.defaultActiveFirst;g.isRootMenu=!1;var q=!1;return j&&(q=j[b]),ni(w,b,q),g.state={mode:L.mode,isOpen:L.isOpen},g}return Object(ue.a)(Y,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var g=this,w=this.props,b=w.mode,N=w.parentMenu,j=w.manualRef,q=w.isOpen,Q=function(){g.setState({mode:b,isOpen:q})},ie=q!==this.state.isOpen,Oe=b!==this.state.mode;if((Oe||ie)&&(rt.a.cancel(this.updateStateRaf),Oe?this.updateStateRaf=Object(rt.a)(Q):Q()),j&&j(this),b!=="horizontal"||!(N==null?void 0:N.isRootMenu)||!q)return;this.minWidthTimeout=setTimeout(function(){return g.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var g=this.props,w=g.onDestroy,b=g.eventKey;w&&w(b),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),rt.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(g,w){var b=this.getBaseProps();return x.createElement(ur,Object(he.a)({},b,{id:this.internalMenuId,className:g,style:w}),this.props.children)}},{key:"renderChildren",value:function(){var g=this,w=this.getBaseProps(),b=w.mode,N=w.visible,j=w.forceSubMenuRender,q=w.direction,Q=this.getMotion(b,N);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||N||j,!this.haveOpened)return x.createElement("div",null);var ie=P()("".concat(w.prefixCls,"-sub"),Object(W.a)({},"".concat(w.prefixCls,"-rtl"),q==="rtl"));return this.isInlineMode()?x.createElement(h,Object(he.a)({visible:w.visible,forceRender:j},Q),function(Oe){var $e=Oe.className,qe=Oe.style,vt=P()(ie,$e);return g.renderPopupMenu(vt,qe)}):this.renderPopupMenu(ie)}},{key:"render",value:function(){var g,w,b,N=Object(Z.a)({},this.props),j=this.getVisible(),q=this.getPrefixCls(),Q=this.isInlineMode(),ie=this.getMode(),Oe=P()(q,"".concat(q,"-").concat(ie),(g={},Object(W.a)(g,N.className,!!N.className),Object(W.a)(g,this.getOpenClassName(),j),Object(W.a)(g,this.getActiveClassName(),N.active||j&&!Q),Object(W.a)(g,this.getDisabledClassName(),N.disabled),Object(W.a)(g,this.getSelectedClassName(),this.isChildrenSelected()),g));this.internalMenuId||(N.eventKey?this.internalMenuId="".concat(N.eventKey,"$Menu"):(Qn+=1,this.internalMenuId="$__$".concat(Qn,"$Menu")));var $e={},qe={},vt={};N.disabled||($e={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},qe={onClick:this.onTitleClick},vt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Jt={},sn=N.direction,en=sn==="rtl";Q&&(en?Jt.paddingRight=N.inlineIndent*N.level:Jt.paddingLeft=N.inlineIndent*N.level);var nn={};this.getVisible()&&(nn={"aria-owns":this.internalMenuId});var ln=null;ie!=="horizontal"&&(ln=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(ln=x.createElement(this.props.expandIcon,Object(Z.a)({},this.props))));var rn=x.createElement("div",Object(he.a)({ref:this.saveSubMenuTitle,style:Jt,className:"".concat(q,"-title"),role:"button"},vt,qe,{"aria-expanded":j},nn,{"aria-haspopup":"true",title:typeof N.title=="string"?N.title:void 0}),N.title,ln||x.createElement("i",{className:"".concat(q,"-arrow")})),on=this.renderChildren(),An=((w=N.parentMenu)===null||w===void 0?void 0:w.isRootMenu)?N.parentMenu.props.getPopupContainer:function(_n){return _n.parentNode},fn=Mn[ie],Jn=N.popupOffset?{offset:N.popupOffset}:{},pn=P()((b={},Object(W.a)(b,N.popupClassName,N.popupClassName&&!Q),Object(W.a)(b,"".concat(q,"-rtl"),en),b)),Kt=N.disabled,Vt=N.triggerSubMenuAction,yn=N.subMenuOpenDelay,Sn=N.forceSubMenuRender,jt=N.subMenuCloseDelay,kn=N.builtinPlacements;dt.forEach(function(_n){return delete N[_n]}),delete N.onClick;var Xn=en?Object(Z.a)(Object(Z.a)({},_o),kn):Object(Z.a)(Object(Z.a)({},ko),kn);delete N.direction;var Tn=this.getBaseProps(),Bn=Q?null:this.getMotion(Tn.mode,Tn.visible);return x.createElement("li",Object(he.a)({},N,$e,{className:Oe,role:"menuitem"}),x.createElement(lo,{prefixCls:q,popupClassName:P()("".concat(q,"-popup"),pn),getPopupContainer:An,builtinPlacements:Xn,popupPlacement:fn,popupVisible:Q?!1:j,popupAlign:Jn,popup:Q?null:on,action:Kt||Q?[]:[Vt],mouseEnterDelay:yn,mouseLeaveDelay:jt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Sn,popupMotion:Bn},rn),Q?on:null)}}]),Y}(x.Component);xn.defaultProps={onMouseEnter:mt,onMouseLeave:mt,onTitleMouseEnter:mt,onTitleMouseLeave:mt,onTitleClick:mt,manualRef:mt,mode:"vertical",title:""};var ii=Object(M.b)(function(S,G){var Y=S.openKeys,L=S.activeKey,g=S.selectedKeys,w=G.eventKey,b=G.subMenuKey;return{isOpen:Y.indexOf(w)>-1,active:L[b]===w,selectedKeys:g}})(xn);ii.isSubMenu=!0;var Rn=ii,uo="menuitem-overflowed",oi=.5,_i=function(S){Object(Ie.a)(Y,S);var G=Object(pe.a)(Y);function Y(){var L;return Object(He.a)(this,Y),L=G.apply(this,arguments),L.resizeObserver=null,L.mutationObserver=null,L.originalTotalWidth=0,L.overflowedItems=[],L.menuItemSizes=[],L.cancelFrameId=null,L.state={lastVisibleIndex:void 0},L.childRef=x.createRef(),L.getMenuItemNodes=function(){var g=L.props.prefixCls,w=L.childRef.current;return w?[].slice.call(w.children).filter(function(b){return b.className.split(" ").indexOf("".concat(g,"-overflowed-submenu"))<0}):[]},L.getOverflowedSubMenuItem=function(g,w,b){var N=L.props,j=N.overflowedIndicator,q=N.level,Q=N.mode,ie=N.prefixCls,Oe=N.theme;if(q!==1||Q!=="horizontal")return null;var $e=L.props.children[0],qe=$e.props,vt=qe.children,Jt=qe.title,sn=qe.style,en=Object(me.a)(qe,["children","title","style"]),nn=Object(Z.a)({},sn),ln="".concat(g,"-overflowed-indicator"),rn="".concat(g,"-overflowed-indicator");w.length===0&&b!==!0?nn=Object(Z.a)(Object(Z.a)({},nn),{},{display:"none"}):b&&(nn=Object(Z.a)(Object(Z.a)({},nn),{},{visibility:"hidden",position:"absolute"}),ln="".concat(ln,"-placeholder"),rn="".concat(rn,"-placeholder"));var on=Oe?"".concat(ie,"-").concat(Oe):"",An={};return dt.forEach(function(fn){en[fn]!==void 0&&(An[fn]=en[fn])}),x.createElement(Rn,Object(he.a)({title:j,className:"".concat(ie,"-overflowed-submenu"),popupClassName:on},An,{key:ln,eventKey:rn,disabled:!1,style:nn}),w)},L.setChildrenWidthAndResize=function(){if(L.props.mode!=="horizontal")return;var g=L.childRef.current;if(!g)return;var w=g.children;if(!w||w.length===0)return;var b=g.children[w.length-1];We(b,"display","inline-block");var N=L.getMenuItemNodes(),j=N.filter(function(q){return q.className.split(" ").indexOf(uo)>=0});j.forEach(function(q){We(q,"display","inline-block")}),L.menuItemSizes=N.map(function(q){return Ke(q,!0)}),j.forEach(function(q){We(q,"display","none")}),L.overflowedIndicatorWidth=Ke(g.children[g.children.length-1],!0),L.originalTotalWidth=L.menuItemSizes.reduce(function(q,Q){return q+Q},0),L.handleResize(),We(b,"display","none")},L.handleResize=function(){if(L.props.mode!=="horizontal")return;var g=L.childRef.current;if(!g)return;var w=Ke(g);L.overflowedItems=[];var b=0,N;L.originalTotalWidth>w+oi&&(N=-1,L.menuItemSizes.forEach(function(j){b+=j,b+L.overflowedIndicatorWidth<=w&&(N+=1)})),L.setState({lastVisibleIndex:N})},L}return Object(ue.a)(Y,[{key:"componentDidMount",value:function(){var g=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var w=this.childRef.current;if(!w)return;this.resizeObserver=new Lt.default(function(b){b.forEach(function(){var N=g.cancelFrameId;cancelAnimationFrame(N),g.cancelFrameId=requestAnimationFrame(g.setChildrenWidthAndResize)})}),[].slice.call(w.children).concat(w).forEach(function(b){g.resizeObserver.observe(b)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){g.resizeObserver.disconnect(),[].slice.call(w.children).concat(w).forEach(function(b){g.resizeObserver.observe(b)}),g.setChildrenWidthAndResize()}),this.mutationObserver.observe(w,{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(g){var w=this,b=this.state.lastVisibleIndex;return(g||[]).reduce(function(N,j,q){var Q=j;if(w.props.mode==="horizontal"){var ie=w.getOverflowedSubMenuItem(j.props.eventKey,[]);b!==void 0&&w.props.className.indexOf("".concat(w.props.prefixCls,"-root"))!==-1&&(q>b&&(Q=x.cloneElement(j,{style:{display:"none"},eventKey:"".concat(j.props.eventKey,"-hidden"),className:"".concat(uo)})),q===b+1&&(w.overflowedItems=g.slice(b+1).map(function($e){return x.cloneElement($e,{key:$e.props.eventKey,mode:"vertical-left"})}),ie=w.getOverflowedSubMenuItem(j.props.eventKey,w.overflowedItems)));var Oe=[].concat(Object(ye.a)(N),[ie,Q]);return q===g.length-1&&Oe.push(w.getOverflowedSubMenuItem(j.props.eventKey,[],!0)),Oe}return[].concat(Object(ye.a)(N),[Q])},[])}},{key:"render",value:function(){var g=this.props,w=g.visible,b=g.prefixCls,N=g.overflowedIndicator,j=g.mode,q=g.level,Q=g.tag,ie=g.children,Oe=g.theme,$e=Object(me.a)(g,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),qe=Q;return x.createElement(qe,Object(he.a)({ref:this.childRef},$e),this.renderChildren(ie))}}]),Y}(x.Component);_i.defaultProps={tag:"div",className:""};var Ko=_i;function Qo(S){return S.length?S.every(function(G){return!!G.props.disabled}):!0}function co(S,G,Y){var L=S.getState();S.setState({activeKey:Object(Z.a)(Object(Z.a)({},L.activeKey),{},Object(W.a)({},G,Y))})}function Co(S){return S.eventKey||"0-menu-"}function Ri(S,G){var Y=G,L=S.children,g=S.eventKey;if(Y){var w;if(Ye(L,function(b,N){b&&b.props&&!b.props.disabled&&Y===At(b,g,N)&&(w=!0)}),w)return Y}return Y=null,S.defaultActiveFirst&&Ye(L,function(b,N){!Y&&b&&!b.props.disabled&&(Y=At(b,g,N))}),Y}function lr(S){if(!S)return;var G=this.instanceArray.indexOf(S);G!==-1?this.instanceArray[G]=S:this.instanceArray.push(S)}var no=function(S){Object(Ie.a)(Y,S);var G=Object(pe.a)(Y);function Y(L){var g;return Object(He.a)(this,Y),g=G.call(this,L),g.onKeyDown=function(w,b){var N=w.keyCode,j;if(g.getFlatInstanceArray().forEach(function(Q){Q&&Q.props.active&&Q.onKeyDown&&(j=Q.onKeyDown(w))}),j)return 1;var q=null;return(N===U.a.UP||N===U.a.DOWN)&&(q=g.step(N===U.a.UP?-1:1)),q?(w.preventDefault(),co(g.props.store,Co(g.props),q.props.eventKey),typeof b=="function"&&b(q),1):void 0},g.onItemHover=function(w){var b=w.key,N=w.hover;co(g.props.store,Co(g.props),N?b:null)},g.onDeselect=function(w){g.props.onDeselect(w)},g.onSelect=function(w){g.props.onSelect(w)},g.onClick=function(w){g.props.onClick(w)},g.onOpenChange=function(w){g.props.onOpenChange(w)},g.onDestroy=function(w){g.props.onDestroy(w)},g.getFlatInstanceArray=function(){return g.instanceArray},g.step=function(w){var b=g.getFlatInstanceArray(),N=g.props.store.getState().activeKey[Co(g.props)],j=b.length;if(!j)return null;w<0&&(b=b.concat().reverse());var q=-1;if(b.every(function($e,qe){return $e&&$e.props.eventKey===N?(q=qe,!1):!0}),!g.props.defaultActiveFirst&&q!==-1&&Qo(b.slice(q,j-1)))return;var Q=(q+1)%j,ie=Q;do{var Oe=b[ie];if(!Oe||Oe.props.disabled)ie=(ie+1)%j;else return Oe}while(ie!==Q);return null},g.renderCommonMenuItem=function(w,b,N){var j=g.props.store.getState(),q=Object(ge.a)(g),Q=q.props,ie=At(w,Q.eventKey,b),Oe=w.props;if(!Oe||typeof w.type=="string")return w;var $e=ie===j.activeKey,qe=Object(Z.a)(Object(Z.a)({mode:Oe.mode||Q.mode,level:Q.level,inlineIndent:Q.inlineIndent,renderMenuItem:g.renderMenuItem,rootPrefixCls:Q.prefixCls,index:b,parentMenu:Q.parentMenu,manualRef:Oe.disabled?void 0:Object(re.a)(w.ref,lr.bind(Object(ge.a)(g))),eventKey:ie,active:!Oe.disabled&&$e,multiple:Q.multiple,onClick:function(Jt){(Oe.onClick||mt)(Jt),g.onClick(Jt)},onItemHover:g.onItemHover,motion:Q.motion,subMenuOpenDelay:Q.subMenuOpenDelay,subMenuCloseDelay:Q.subMenuCloseDelay,forceSubMenuRender:Q.forceSubMenuRender,onOpenChange:g.onOpenChange,onDeselect:g.onDeselect,onSelect:g.onSelect,builtinPlacements:Q.builtinPlacements,itemIcon:Oe.itemIcon||g.props.itemIcon,expandIcon:Oe.expandIcon||g.props.expandIcon},N),{},{direction:Q.direction});return(Q.mode==="inline"||Ze())&&(qe.triggerSubMenuAction="click"),x.cloneElement(w,Object(Z.a)(Object(Z.a)({},qe),{},{key:ie||b}))},g.renderMenuItem=function(w,b,N){if(!w)return null;var j=g.props.store.getState(),q={openKeys:j.openKeys,selectedKeys:j.selectedKeys,triggerSubMenuAction:g.props.triggerSubMenuAction,subMenuKey:N};return g.renderCommonMenuItem(w,b,q)},L.store.setState({activeKey:Object(Z.a)(Object(Z.a)({},L.store.getState().activeKey),{},Object(W.a)({},L.eventKey,Ri(L,L.activeKey)))}),g.instanceArray=[],g}return Object(ue.a)(Y,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(g){return this.props.visible||g.visible||this.props.className!==g.className||!Ee()(this.props.style,g.style)}},{key:"componentDidUpdate",value:function(g){var w=this.props,b="activeKey"in w?w.activeKey:w.store.getState().activeKey[Co(w)],N=Ri(w,b);if(N!==b)co(w.store,Co(w),N);else if("activeKey"in g){var j=Ri(g,g.activeKey);N!==j&&co(w.store,Co(w),N)}}},{key:"render",value:function(){var g=this,w=Object(he.a)({},this.props);this.instanceArray=[];var b=P()(w.prefixCls,w.className,"".concat(w.prefixCls,"-").concat(w.mode)),N={className:b,role:w.role||"menu"};w.id&&(N.id=w.id),w.focusable&&(N.tabIndex=0,N.onKeyDown=this.onKeyDown);var j=w.prefixCls,q=w.eventKey,Q=w.visible,ie=w.level,Oe=w.mode,$e=w.overflowedIndicator,qe=w.theme;return dt.forEach(function(vt){return delete w[vt]}),delete w.onClick,x.createElement(Ko,Object(he.a)({},w,{prefixCls:j,mode:Oe,tag:"ul",level:ie,theme:qe,visible:Q,overflowedIndicator:$e},N),Object($.a)(w.children).map(function(vt,Jt){return g.renderMenuItem(vt,Jt,q||"0-menu-")}))}}]),Y}(x.Component);no.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:mt};var Jo=Object(M.b)()(no),ur=Jo,jo=p("Kwbf");function ga(S,G,Y){var L=S.prefixCls,g=S.motion,w=S.defaultMotions,b=w===void 0?{}:w,N=S.openAnimation,j=S.openTransitionName,q=G.switchingModeFromInline;if(g)return g;if(Object(Re.a)(N)==="object"&&N)Object(jo.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof N=="string")return{motionName:"".concat(L,"-open-").concat(N)};if(j)return{motionName:j};var Q=b[Y];return Q||(q?null:b.other)}var br=function(S){Object(Ie.a)(Y,S);var G=Object(pe.a)(Y);function Y(L){var g;Object(He.a)(this,Y),g=G.call(this,L),g.onSelect=function(N){var j=Object(ge.a)(g),q=j.props;if(q.selectable){var Q=g.store.getState(),ie=Q.selectedKeys,Oe=N.key;q.multiple?ie=ie.concat([Oe]):ie=[Oe],"selectedKeys"in q||g.store.setState({selectedKeys:ie}),q.onSelect(Object(Z.a)(Object(Z.a)({},N),{},{selectedKeys:ie}))}},g.onClick=function(N){var j=g.getRealMenuMode(),q=Object(ge.a)(g),Q=q.store,ie=q.props.onOpenChange;j!=="inline"&&!("openKeys"in g.props)&&(Q.setState({openKeys:[]}),ie([])),g.props.onClick(N)},g.onKeyDown=function(N,j){g.innerMenu.getWrappedInstance().onKeyDown(N,j)},g.onOpenChange=function(N){var j=Object(ge.a)(g),q=j.props,Q=g.store.getState().openKeys.concat(),ie=!1,Oe=function(qe){var vt=!1;if(qe.open)vt=Q.indexOf(qe.key)===-1,vt&&Q.push(qe.key);else{var Jt=Q.indexOf(qe.key);vt=Jt!==-1,vt&&Q.splice(Jt,1)}ie=ie||vt};Array.isArray(N)?N.forEach(Oe):Oe(N),ie&&("openKeys"in g.props||g.store.setState({openKeys:Q}),q.onOpenChange(Q))},g.onDeselect=function(N){var j=Object(ge.a)(g),q=j.props;if(q.selectable){var Q=g.store.getState().selectedKeys.concat(),ie=N.key,Oe=Q.indexOf(ie);Oe!==-1&&Q.splice(Oe,1),"selectedKeys"in q||g.store.setState({selectedKeys:Q}),q.onDeselect(Object(Z.a)(Object(Z.a)({},N),{},{selectedKeys:Q}))}},g.onMouseEnter=function(N){g.restoreModeVerticalFromInline();var j=g.props.onMouseEnter;j&&j(N)},g.onTransitionEnd=function(N){var j=N.propertyName==="width"&&N.target===N.currentTarget,q=N.target.className,Q=Object.prototype.toString.call(q)==="[object SVGAnimatedString]"?q.animVal:q,ie=N.propertyName==="font-size"&&Q.indexOf("anticon")>=0;(j||ie)&&g.restoreModeVerticalFromInline()},g.setInnerMenu=function(N){g.innerMenu=N},g.isRootMenu=!0;var w=L.defaultSelectedKeys,b=L.defaultOpenKeys;return"selectedKeys"in L&&(w=L.selectedKeys||[]),"openKeys"in L&&(b=L.openKeys||[]),g.store=Object(M.c)({selectedKeys:w,openKeys:b,activeKey:{"0-menu-":Ri(L,L.activeKey)}}),g.state={switchingModeFromInline:!1,prevProps:L,inlineOpenKeys:[],store:g.store},g}return Object(ue.a)(Y,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(g){var w=this.props,b=w.siderCollapsed,N=w.inlineCollapsed,j=w.onOpenChange;(!g.inlineCollapsed&&N||!g.siderCollapsed&&b)&&j([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var g=this.props.collapsedWidth,w=this.store,b=this.prevOpenKeys,N=this.getInlineCollapsed()&&(g===0||g==="0"||g==="0px");N?(this.prevOpenKeys=w.getState().openKeys.concat(),this.store.setState({openKeys:[]})):b&&(this.store.setState({openKeys:b}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var g=this.props.mode,w=this.state.switchingModeFromInline,b=this.getInlineCollapsed();return w&&b?"inline":b?"vertical":g}},{key:"getInlineCollapsed",value:function(){var g=this.props,w=g.inlineCollapsed,b=g.siderCollapsed;return b!==void 0?b:w}},{key:"restoreModeVerticalFromInline",value:function(){var g=this.state.switchingModeFromInline;g&&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 g=Object(Z.a)({},Object(ve.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),w=this.getRealMenuMode();return g.className+=" ".concat(g.prefixCls,"-root"),g.direction==="rtl"&&(g.className+=" ".concat(g.prefixCls,"-rtl")),g=Object(Z.a)(Object(Z.a)({},g),{},{mode:w,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ga(this.props,this.state,w)}),delete g.openAnimation,delete g.openTransitionName,x.createElement(M.a,{store:this.store},x.createElement(ur,Object(he.a)({},g,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(g,w){var b=w.prevProps,N=w.store,j=N.getState(),q={},Q={prevProps:g};return b.mode==="inline"&&g.mode!=="inline"&&(Q.switchingModeFromInline=!0),"openKeys"in g?q.openKeys=g.openKeys||[]:((g.inlineCollapsed&&!b.inlineCollapsed||g.siderCollapsed&&!b.siderCollapsed)&&(Q.switchingModeFromInline=!0,Q.inlineOpenKeys=j.openKeys,q.openKeys=[]),(!g.inlineCollapsed&&b.inlineCollapsed||!g.siderCollapsed&&b.siderCollapsed)&&(q.openKeys=w.inlineOpenKeys,Q.inlineOpenKeys=[])),Object.keys(q).length&&N.setState(q),Q}}]),Y}(x.Component);br.defaultProps={selectable:!0,onClick:mt,onSelect:mt,onOpenChange:mt,onDeselect:mt,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:x.createElement("span",null,"\xB7\xB7\xB7")};var Bt=br,Yt=function(S){Object(Ie.a)(Y,S);var G=Object(pe.a)(Y);function Y(){var L;return Object(He.a)(this,Y),L=G.apply(this,arguments),L.onKeyDown=function(g){var w=g.keyCode;return w===U.a.ENTER?(L.onClick(g),!0):void 0},L.onMouseLeave=function(g){var w=L.props,b=w.eventKey,N=w.onItemHover,j=w.onMouseLeave;N({key:b,hover:!1}),j({key:b,domEvent:g})},L.onMouseEnter=function(g){var w=L.props,b=w.eventKey,N=w.onItemHover,j=w.onMouseEnter;N({key:b,hover:!0}),j({key:b,domEvent:g})},L.onClick=function(g){var w=L.props,b=w.eventKey,N=w.multiple,j=w.onClick,q=w.onSelect,Q=w.onDeselect,ie=w.isSelected,Oe={key:b,keyPath:[b],item:Object(ge.a)(L),domEvent:g};j(Oe),N?ie?Q(Oe):q(Oe):ie||q(Oe)},L.saveNode=function(g){L.node=g},L}return Object(ue.a)(Y,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var g=this.props;g.onDestroy&&g.onDestroy(g.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 g,w=Object(Z.a)({},this.props),b=P()(this.getPrefixCls(),w.className,(g={},Object(W.a)(g,this.getActiveClassName(),!w.disabled&&w.active),Object(W.a)(g,this.getSelectedClassName(),w.isSelected),Object(W.a)(g,this.getDisabledClassName(),w.disabled),g)),N=Object(Z.a)(Object(Z.a)({},w.attribute),{},{title:typeof w.title=="string"?w.title:void 0,className:b,role:w.role||"menuitem","aria-disabled":w.disabled});w.role==="option"?N=Object(Z.a)(Object(Z.a)({},N),{},{role:"option","aria-selected":w.isSelected}):(w.role===null||w.role==="none")&&(N.role="none");var j={onClick:w.disabled?null:this.onClick,onMouseLeave:w.disabled?null:this.onMouseLeave,onMouseEnter:w.disabled?null:this.onMouseEnter},q=Object(Z.a)({},w.style);w.mode==="inline"&&(w.direction==="rtl"?q.paddingRight=w.inlineIndent*w.level:q.paddingLeft=w.inlineIndent*w.level),dt.forEach(function(ie){return delete w[ie]}),delete w.direction;var Q=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Q=x.createElement(this.props.itemIcon,this.props)),x.createElement("li",Object(he.a)({},Object(ve.a)(w,["onClick","onMouseEnter","onMouseLeave","onSelect"]),N,j,{style:q,ref:this.saveNode}),w.children,Q)}}]),Y}(x.Component);Yt.isMenuItem=!0,Yt.defaultProps={onSelect:mt,onMouseEnter:mt,onMouseLeave:mt,manualRef:mt};var Ht=Object(M.b)(function(S,G){var Y=S.activeKey,L=S.selectedKeys,g=G.eventKey,w=G.subMenuKey;return{active:Y[w]===g,isSelected:Array.isArray(L)?L.indexOf(g)!==-1:L===g}})(Yt),cn=Ht,wn=function(S){Object(Ie.a)(Y,S);var G=Object(pe.a)(Y);function Y(){var L;return Object(He.a)(this,Y),L=G.apply(this,arguments),L.renderInnerMenuItem=function(g){var w=L.props,b=w.renderMenuItem,N=w.index;return b(g,N,L.props.subMenuKey)},L}return Object(ue.a)(Y,[{key:"render",value:function(){var g=Object(he.a)({},this.props),w=g.className,b=w===void 0?"":w,N=g.rootPrefixCls,j="".concat(N,"-item-group-title"),q="".concat(N,"-item-group-list"),Q=g.title,ie=g.children;return dt.forEach(function(Oe){return delete g[Oe]}),delete g.direction,x.createElement("li",Object(he.a)({},g,{onClick:function($e){return $e.stopPropagation()},className:"".concat(b," ").concat(N,"-item-group")}),x.createElement("div",{className:j,title:typeof Q=="string"?Q:void 0},Q),x.createElement("ul",{className:q},x.Children.map(ie,this.renderInnerMenuItem)))}}]),Y}(x.Component);wn.isMenuItemGroup=!0,wn.defaultProps={disabled:!0};var Nn=wn,bn=function(G){var Y=G.className,L=G.rootPrefixCls,g=G.style;return x.createElement("li",{className:"".concat(Y," ").concat(L,"-item-divider"),style:g})};bn.defaultProps={disabled:!0,className:"",style:{}};var hi=bn,Fi=Bt,hn=p("eDIo");function Mo(S,G){var Y=S.prefixCls,L=S.editable,g=S.locale,w=S.style;return!L||L.showAdd===!1?null:x.createElement("button",{ref:G,type:"button",className:"".concat(Y,"-nav-add"),style:w,"aria-label":(g==null?void 0:g.addAriaLabel)||"Add tab",onClick:function(N){L.onEdit("add",{event:N})}},L.addIcon||"+")}var On=x.forwardRef(Mo);function yi(S,G){var Y=S.prefixCls,L=S.id,g=S.tabs,w=S.locale,b=S.mobile,N=S.moreIcon,j=N===void 0?"More":N,q=S.moreTransitionName,Q=S.style,ie=S.className,Oe=S.editable,$e=S.tabBarGutter,qe=S.rtl,vt=S.onTabClick,Jt=Object(x.useState)(!1),sn=Object(xe.a)(Jt,2),en=sn[0],nn=sn[1],ln=Object(x.useState)(null),rn=Object(xe.a)(ln,2),on=rn[0],An=rn[1],fn="".concat(L,"-more-popup"),Jn="".concat(Y,"-dropdown"),pn=on!==null?"".concat(fn,"-").concat(on):null,Kt=w==null?void 0:w.dropdownAriaLabel,Vt=x.createElement(Fi,{onClick:function(Bn){var _n=Bn.key,si=Bn.domEvent;vt(_n,si),nn(!1)},id:fn,tabIndex:-1,role:"listbox","aria-activedescendant":pn,selectedKeys:[on],"aria-label":Kt!==void 0?Kt:"expanded dropdown"},g.map(function(Tn){return x.createElement(cn,{key:Tn.key,id:"".concat(fn,"-").concat(Tn.key),role:"option","aria-controls":L&&"".concat(L,"-panel-").concat(Tn.key),disabled:Tn.disabled},Tn.tab)}));function yn(Tn){for(var Bn=g.filter(function(Wi){return!Wi.disabled}),_n=Bn.findIndex(function(Wi){return Wi.key===on})||0,si=Bn.length,wi=0;wi<si;wi+=1){_n=(_n+Tn+si)%si;var Zn=Bn[_n];if(!Zn.disabled){An(Zn.key);return}}}function Sn(Tn){var Bn=Tn.which;if(!en){[U.a.DOWN,U.a.SPACE,U.a.ENTER].includes(Bn)&&(nn(!0),Tn.preventDefault());return}switch(Bn){case U.a.UP:yn(-1),Tn.preventDefault();break;case U.a.DOWN:yn(1),Tn.preventDefault();break;case U.a.ESC:nn(!1);break;case U.a.SPACE:case U.a.ENTER:on!==null&&vt(on,Tn);break}}Object(x.useEffect)(function(){var Tn=document.getElementById(pn);Tn&&Tn.scrollIntoView&&Tn.scrollIntoView(!1)},[on]),Object(x.useEffect)(function(){en||An(null)},[en]);var jt=Object(W.a)({},qe?"marginLeft":"marginRight",$e);g.length||(jt.visibility="hidden",jt.order=1);var kn=P()(Object(W.a)({},"".concat(Jn,"-rtl"),qe)),Xn=b?null:x.createElement(hn.a,{prefixCls:Jn,overlay:Vt,trigger:["hover"],visible:en,transitionName:q,onVisibleChange:nn,overlayClassName:kn,mouseEnterDelay:.1,mouseLeaveDelay:.1},x.createElement("button",{type:"button",className:"".concat(Y,"-nav-more"),style:jt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":fn,id:"".concat(L,"-more"),"aria-expanded":en,onKeyDown:Sn},j));return x.createElement("div",{className:P()("".concat(Y,"-nav-operations"),ie),style:Q,ref:G},Xn,x.createElement(On,{prefixCls:Y,locale:w,editable:Oe}))}var io=x.forwardRef(yi),Gi=Object(x.createContext)(null),Cr=.1,Xo=.01,ai=20,va=Math.pow(.995,ai);function ya(){var S=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(S)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(S.substr(0,4)))}function cr(S,G){var Y=Object(x.useState)(),L=Object(xe.a)(Y,2),g=L[0],w=L[1],b=Object(x.useState)(0),N=Object(xe.a)(b,2),j=N[0],q=N[1],Q=Object(x.useState)(0),ie=Object(xe.a)(Q,2),Oe=ie[0],$e=ie[1],qe=Object(x.useState)(),vt=Object(xe.a)(qe,2),Jt=vt[0],sn=vt[1],en=Object(x.useRef)();function nn(Kt){var Vt=Kt.touches[0],yn=Vt.screenX,Sn=Vt.screenY;w({x:yn,y:Sn}),window.clearInterval(en.current)}function ln(Kt){if(!g)return;Kt.preventDefault();var Vt=Kt.touches[0],yn=Vt.screenX,Sn=Vt.screenY;w({x:yn,y:Sn});var jt=yn-g.x,kn=Sn-g.y;G(jt,kn);var Xn=Date.now();q(Xn),$e(Xn-j),sn({x:jt,y:kn})}function rn(){if(!g)return;if(w(null),sn(null),Jt){var Kt=Jt.x/Oe,Vt=Jt.y/Oe,yn=Math.abs(Kt),Sn=Math.abs(Vt);if(Math.max(yn,Sn)<Cr)return;var jt=Kt,kn=Vt;en.current=window.setInterval(function(){if(Math.abs(jt)<Xo&&Math.abs(kn)<Xo){window.clearInterval(en.current);return}jt*=va,kn*=va,G(jt*ai,kn*ai)},ai)}}var on=Object(x.useRef)(0),An=Object(x.useRef)(!1),fn=Object(x.useRef)();function Jn(Kt){var Vt=Kt.deltaX,yn=Kt.deltaY,Sn=0,jt=Math.abs(Vt),kn=Math.abs(yn);jt===kn?Sn=fn.current==="x"?Vt:yn:jt>kn?(Sn=Vt,fn.current="x"):(Sn=yn,fn.current="y");var Xn=Date.now();Xn-on.current>100&&(An.current=!1),(G(-Sn,-Sn)||An.current)&&(Kt.preventDefault(),An.current=!0),on.current=Xn}var pn=Object(x.useRef)(null);pn.current={onTouchStart:nn,onTouchMove:ln,onTouchEnd:rn,onWheel:Jn},x.useEffect(function(){function Kt(jt){pn.current.onTouchStart(jt)}function Vt(jt){pn.current.onTouchMove(jt)}function yn(jt){pn.current.onTouchEnd(jt)}function Sn(jt){pn.current.onWheel(jt)}return document.addEventListener("touchmove",Vt,{passive:!1}),document.addEventListener("touchend",yn,{passive:!1}),S.current.addEventListener("touchstart",Kt,{passive:!1}),S.current.addEventListener("wheel",Sn),function(){document.removeEventListener("touchmove",Vt),document.removeEventListener("touchend",yn)}},[])}function Va(){var S=Object(x.useRef)(new Map);function G(L){return S.current.has(L)||S.current.set(L,x.createRef()),S.current.get(L)}function Y(L){S.current.delete(L)}return[G,Y]}function Wr(S,G){var Y=x.useRef(S),L=x.useState({}),g=Object(xe.a)(L,2),w=g[1];function b(N){var j=typeof N=="function"?N(Y.current):N;j!==Y.current&&G(j,Y.current),Y.current=j,w({})}return[Y.current,b]}var ba=function(G){var Y=G.position,L=G.prefixCls,g=G.extra;if(!g)return null;var w,b=g;return Y==="right"&&(w=b.right||!b.left&&b||null),Y==="left"&&(w=b.left||null),w?x.createElement("div",{className:"".concat(L,"-extra-content")},w):null};function zr(S,G){var Y,L=x.useContext(Gi),g=L.prefixCls,w=L.tabs,b=S.className,N=S.style,j=S.id,q=S.animated,Q=S.activeKey,ie=S.rtl,Oe=S.extra,$e=S.editable,qe=S.locale,vt=S.tabPosition,Jt=S.tabBarGutter,sn=S.children,en=S.onTabClick,nn=S.onTabScroll,ln=Object(x.useRef)(),rn=Object(x.useRef)(),on=Object(x.useRef)(),An=Object(x.useRef)(),fn=Va(),Jn=Object(xe.a)(fn,2),pn=Jn[0],Kt=Jn[1],Vt=vt==="top"||vt==="bottom",yn=Wr(0,function(Ln,Cn){Vt&&nn&&nn({direction:Ln>Cn?"left":"right"})}),Sn=Object(xe.a)(yn,2),jt=Sn[0],kn=Sn[1],Xn=Wr(0,function(Ln,Cn){!Vt&&nn&&nn({direction:Ln>Cn?"top":"bottom"})}),Tn=Object(xe.a)(Xn,2),Bn=Tn[0],_n=Tn[1],si=Object(x.useState)(0),wi=Object(xe.a)(si,2),Zn=wi[0],Wi=wi[1],ho=Object(x.useState)(0),Ki=Object(xe.a)(ho,2),Ai=Ki[0],zn=Ki[1],Un=Object(x.useState)(0),qn=Object(xe.a)(Un,2),Yn=qn[0],fo=qn[1],Oo=Object(x.useState)(0),To=Object(xe.a)(Oo,2),jn=To[0],yo=To[1],Ro=Object(x.useState)(null),Wn=Object(xe.a)(Ro,2),Pn=Wn[0],Si=Wn[1],xa=Object(x.useState)(null),Kr=Object(xe.a)(xa,2),Do=Kr[0],Zo=Kr[1],Er=Object(x.useState)(0),Qr=Object(xe.a)(Er,2),xr=Qr[0],Qa=Qr[1],Ja=Object(x.useState)(0),wa=Object(xe.a)(Ja,2),Jr=wa[0],Xr=wa[1],qo=ee(new Map),$o=Object(xe.a)(qo,2),Xa=$o[0],wr=$o[1],dr=Ae(w,Xa,Zn),er="".concat(g,"-nav-operations-hidden"),tr=0,po=0;Vt?ie?(tr=0,po=Math.max(0,Zn-Pn)):(tr=Math.min(0,Pn-Zn),po=0):(tr=Math.min(0,Do-Ai),po=0);function Bo(Ln){return Ln<tr?[tr,!1]:Ln>po?[po,!1]:[Ln,!0]}var Lo=Object(x.useRef)(),hr=Object(x.useState)(),Uo=Object(xe.a)(hr,2),Ar=Uo[0],Yr=Uo[1];function Sr(){Yr(Date.now())}function Zr(){window.clearTimeout(Lo.current)}cr(ln,function(Ln,Cn){var ki=!1;function Ji(nr,xo){nr(function(mr){var No=Bo(mr+xo),Mi=Object(xe.a)(No,2),Or=Mi[0],$r=Mi[1];return ki=$r,Or})}if(Vt){if(Pn>=Zn)return ki;Ji(kn,Ln)}else{if(Do>=Ai)return ki;Ji(_n,Cn)}return Zr(),Sr(),ki}),Object(x.useEffect)(function(){return Zr(),Ar&&(Lo.current=window.setTimeout(function(){Yr(0)},100)),Zr},[Ar]);function Io(){var Ln=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Q,Cn=dr.get(Ln);if(!Cn)return;if(Vt){var ki=jt;ie?Cn.right<jt?ki=Cn.right:Cn.right+Cn.width>jt+Pn&&(ki=Cn.right+Cn.width-Pn):Cn.left<-jt?ki=-Cn.left:Cn.left+Cn.width>-jt+Pn&&(ki=-(Cn.left+Cn.width-Pn)),_n(0),kn(Bo(ki)[0])}else{var Ji=Bn;Cn.top<-Bn?Ji=-Cn.top:Cn.top+Cn.height>-Bn+Do&&(Ji=-(Cn.top+Cn.height-Do)),kn(0),_n(Bo(Ji)[0])}}var Fo=be(dr,{width:Pn,height:Do,left:jt,top:Bn},{width:Yn,height:jn},{width:xr,height:Jr},Object(Z.a)(Object(Z.a)({},S),{},{tabs:w})),Aa=Object(xe.a)(Fo,2),Ya=Aa[0],Za=Aa[1],qa=w.map(function(Ln){var Cn=Ln.key;return x.createElement(k,{id:j,prefixCls:g,key:Cn,rtl:ie,tab:Ln,closable:Ln.closable,editable:$e,active:Cn===Q,tabPosition:vt,tabBarGutter:Jt,renderWrapper:sn,removeAriaLabel:qe==null?void 0:qe.removeAriaLabel,ref:pn(Cn),onClick:function(Ji){en(Cn,Ji)},onRemove:function(){Kt(Cn)},onFocus:function(){Io(Cn),Sr(),ie||(ln.current.scrollLeft=0),ln.current.scrollTop=0}})}),qr=se(function(){var Ln,Cn,ki,Ji,nr,xo,mr,No,Mi,Or=((Ln=ln.current)===null||Ln===void 0?void 0:Ln.offsetWidth)||0,$r=((Cn=ln.current)===null||Cn===void 0?void 0:Cn.offsetHeight)||0,ea=((ki=An.current)===null||ki===void 0?void 0:ki.offsetWidth)||0,Xi=((Ji=An.current)===null||Ji===void 0?void 0:Ji.offsetHeight)||0,Dn=((nr=on.current)===null||nr===void 0?void 0:nr.offsetWidth)||0,go=((xo=on.current)===null||xo===void 0?void 0:xo.offsetHeight)||0;Si(Or),Zo($r),Qa(ea),Xr(Xi);var wo=(((mr=rn.current)===null||mr===void 0?void 0:mr.offsetWidth)||0)-ea,Ao=(((No=rn.current)===null||No===void 0?void 0:No.offsetHeight)||0)-Xi;Wi(wo),zn(Ao);var ta=(Mi=on.current)===null||Mi===void 0?void 0:Mi.className.includes(er);fo(wo-(ta?0:Dn)),yo(Ao-(ta?0:go)),wr(function(){var Tr=new Map;return w.forEach(function(Ta){var Ra=Ta.key,zo=pn(Ra).current;zo&&Tr.set(Ra,{width:zo.offsetWidth,height:zo.offsetHeight,left:zo.offsetLeft,top:zo.offsetTop})}),Tr})}),$a=w.slice(0,Ya),Qi=w.slice(Za+1),fi=[].concat(Object(ye.a)($a),Object(ye.a)(Qi)),ji=Object(x.useState)(),pi=Object(xe.a)(ji,2),fr=pi[0],es=pi[1],mo=dr.get(Q),Sa=Object(x.useRef)();function ka(){V.a.cancel(Sa.current)}Object(x.useEffect)(function(){var Ln={};return mo&&(Vt?(ie?Ln.right=mo.right:Ln.left=mo.left,Ln.width=mo.width):(Ln.top=mo.top,Ln.height=mo.height)),ka(),Sa.current=V()(function(){es(Ln)}),ka},[mo,Vt,ie]),Object(x.useEffect)(function(){Io()},[Q,mo,dr,Vt]),Object(x.useEffect)(function(){qr()},[ie,Jt,Q,w.map(function(Ln){return Ln.key}).join("_")]);var Ma=!!fi.length,Wo="".concat(g,"-nav-wrap"),kr,pr,Oa,Mr;return Vt?ie?(pr=jt>0,kr=jt+Pn<Zn):(kr=jt<0,pr=-jt+Pn<Zn):(Oa=Bn<0,Mr=-Bn+Do<Ai),x.createElement("div",{ref:G,role:"tablist",className:P()("".concat(g,"-nav"),b),style:N,onKeyDown:function(){Sr()}},x.createElement(ba,{position:"left",extra:Oe,prefixCls:g}),x.createElement(Ce.a,{onResize:qr},x.createElement("div",{className:P()(Wo,(Y={},Object(W.a)(Y,"".concat(Wo,"-ping-left"),kr),Object(W.a)(Y,"".concat(Wo,"-ping-right"),pr),Object(W.a)(Y,"".concat(Wo,"-ping-top"),Oa),Object(W.a)(Y,"".concat(Wo,"-ping-bottom"),Mr),Y)),ref:ln},x.createElement(Ce.a,{onResize:qr},x.createElement("div",{ref:rn,className:"".concat(g,"-nav-list"),style:{transform:"translate(".concat(jt,"px, ").concat(Bn,"px)"),transition:Ar?"none":void 0}},qa,x.createElement(On,{ref:An,prefixCls:g,locale:qe,editable:$e,style:{visibility:Ma?"hidden":null}}),x.createElement("div",{className:P()("".concat(g,"-ink-bar"),Object(W.a)({},"".concat(g,"-ink-bar-animated"),q.inkBar)),style:fr}))))),x.createElement(io,Object.assign({},S,{ref:on,prefixCls:g,tabs:fi,className:!Ma&&er})),x.createElement(ba,{position:"right",extra:Oe,prefixCls:g}))}var Hr=x.forwardRef(zr);function Ga(S){var G=S.id,Y=S.activeKey,L=S.animated,g=S.tabPosition,w=S.rtl,b=S.destroyInactiveTabPane,N=x.useContext(Gi),j=N.prefixCls,q=N.tabs,Q=L.tabPane,ie=q.findIndex(function(Oe){return Oe.key===Y});return x.createElement("div",{className:P()("".concat(j,"-content-holder"))},x.createElement("div",{className:P()("".concat(j,"-content"),"".concat(j,"-content-").concat(g),Object(W.a)({},"".concat(j,"-content-animated"),Q)),style:ie&&Q?Object(W.a)({},w?"marginRight":"marginLeft","-".concat(ie,"00%")):null},q.map(function(Oe){return x.cloneElement(Oe.node,{key:Oe.key,prefixCls:j,tabKey:Oe.key,id:G,animated:Q,active:Oe.key===Y,destroyInactiveTabPane:b})})))}function Ca(S){var G=S.prefixCls,Y=S.forceRender,L=S.className,g=S.style,w=S.id,b=S.active,N=S.animated,j=S.destroyInactiveTabPane,q=S.tabKey,Q=S.children,ie=x.useState(Y),Oe=Object(xe.a)(ie,2),$e=Oe[0],qe=Oe[1];x.useEffect(function(){b?qe(!0):j&&qe(!1)},[b,j]);var vt={};return b||(N?(vt.visibility="hidden",vt.height=0,vt.overflowY="hidden"):vt.display="none"),x.createElement("div",{id:w&&"".concat(w,"-panel-").concat(q),role:"tabpanel",tabIndex:b?0:-1,"aria-labelledby":w&&"".concat(w,"-tab-").concat(q),"aria-hidden":!b,style:Object(Z.a)(Object(Z.a)({},vt),g),className:P()("".concat(G,"-tabpane"),b&&"".concat(G,"-tabpane-active"),L)},(b||$e||Y)&&Q)}var Vr=0;function Ea(S){return Object($.a)(S).map(function(G){if(x.isValidElement(G)){var Y=G.key!==void 0?String(G.key):void 0;return Object(Z.a)(Object(Z.a)({key:Y},G.props),{},{node:G})}return null}).filter(function(G){return G})}function Ka(S,G){var Y,L=S.id,g=S.prefixCls,w=g===void 0?"rc-tabs":g,b=S.className,N=S.children,j=S.direction,q=S.activeKey,Q=S.defaultActiveKey,ie=S.editable,Oe=S.animated,$e=S.tabPosition,qe=$e===void 0?"top":$e,vt=S.tabBarGutter,Jt=S.tabBarStyle,sn=S.tabBarExtraContent,en=S.locale,nn=S.moreIcon,ln=S.moreTransitionName,rn=S.destroyInactiveTabPane,on=S.renderTabBar,An=S.onChange,fn=S.onTabClick,Jn=S.onTabScroll,pn=Object(me.a)(S,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Kt=Ea(N),Vt=j==="rtl",yn;Oe===!1?yn={inkBar:!1,tabPane:!1}:yn=Object(Z.a)({inkBar:!0,tabPane:!1},Oe!==!0?Oe:null);var Sn=Object(x.useState)(!1),jt=Object(xe.a)(Sn,2),kn=jt[0],Xn=jt[1];Object(x.useEffect)(function(){Xn(ya())},[]);var Tn=Object(ce.a)(function(){var jn;return(jn=Kt[0])===null||jn===void 0?void 0:jn.key},{value:q,defaultValue:Q}),Bn=Object(xe.a)(Tn,2),_n=Bn[0],si=Bn[1],wi=Object(x.useState)(function(){return Kt.findIndex(function(jn){return jn.key===_n})}),Zn=Object(xe.a)(wi,2),Wi=Zn[0],ho=Zn[1];Object(x.useEffect)(function(){var jn=Kt.findIndex(function(Ro){return Ro.key===_n});if(jn===-1){var yo;jn=Math.max(0,Math.min(Wi,Kt.length-1)),si((yo=Kt[jn])===null||yo===void 0?void 0:yo.key)}ho(jn)},[Kt.map(function(jn){return jn.key}).join("_"),_n,Wi]);var Ki=Object(ce.a)(null,{value:L}),Ai=Object(xe.a)(Ki,2),zn=Ai[0],Un=Ai[1],qn=qe;kn&&!["left","right"].includes(qe)&&(qn="top"),Object(x.useEffect)(function(){L||(Un("rc-tabs-".concat(Vr)),Vr+=1)},[]);function Yn(jn,yo){fn==null||fn(jn,yo),si(jn),An==null||An(jn)}var fo={id:zn,activeKey:_n,animated:yn,tabPosition:qn,rtl:Vt,mobile:kn},Oo,To=Object(Z.a)(Object(Z.a)({},fo),{},{editable:ie,locale:en,moreIcon:nn,moreTransitionName:ln,tabBarGutter:vt,onTabClick:Yn,onTabScroll:Jn,extra:sn,style:Jt,panes:N});return on?Oo=on(To,Hr):Oo=x.createElement(Hr,Object.assign({},To)),x.createElement(Gi.Provider,{value:{tabs:Kt,prefixCls:w}},x.createElement("div",Object.assign({ref:G,id:L,className:P()(w,"".concat(w,"-").concat(qn),(Y={},Object(W.a)(Y,"".concat(w,"-mobile"),kn),Object(W.a)(Y,"".concat(w,"-editable"),ie),Object(W.a)(Y,"".concat(w,"-rtl"),Vt),Y),b)},pn),Oo,x.createElement(Ga,Object.assign({destroyInactiveTabPane:rn},fo,{animated:yn}))))}var Yo=x.forwardRef(Ka);Yo.TabPane=Ca;var Eo=Yo,Gr=we.b=Eo},kPWJ:function(Pe,we,p){Pe.exports=p.p+"static/question.cb52bef9.gif"},kPYp:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF8AAAAUCAYAAADr0+FaAAANEklEQVRYR8WZe5RX1XXHP/vce3/zHoaXgFp5DQyOQLRgUTEtDW1qYyVmZUGNklRdiRpKE3lHfPyc4TngIBgfC0wx1ixt1NRWal2kotbE2lbRiCIISBCGhzDAvGd+87v37K5z5zfDzMCM46pr9fw1a+45+5zz3fvs/d3fn4yr1F8Do0UIUb74UFR8G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5ErkJggg=="},kSUc:function(Pe,we,p){},l2Kq:function(Pe,we,p){Pe.exports=p.p+"static/match_ad.24dc22fd.jpg"},lZu9:function(Pe,we,p){(function(W){W(p("VrN/"),p("1eCo"),p("8EBN"))})(function(W){"use strict";W.defineMode("markdown",function(xe,me){var Z=W.getMode(xe,"text/html"),x=Z.name=="null";function ke(O){if(W.findModeByName){var y=W.findModeByName(O);y&&(O=y.mime||y.mimes[0])}var le=W.getMode(xe,O);return le.name=="null"?null:le}me.highlightFormatting===void 0&&(me.highlightFormatting=!1),me.maxBlockquoteDepth===void 0&&(me.maxBlockquoteDepth=0),me.taskLists===void 0&&(me.taskLists=!1),me.strikethrough===void 0&&(me.strikethrough=!1),me.emoji===void 0&&(me.emoji=!1),me.fencedCodeBlockHighlighting===void 0&&(me.fencedCodeBlockHighlighting=!0),me.fencedCodeBlockDefaultMode===void 0&&(me.fencedCodeBlockDefaultMode="text/plain"),me.xml===void 0&&(me.xml=!0),me.tokenTypeOverrides===void 0&&(me.tokenTypeOverrides={});var P={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var $ in P)P.hasOwnProperty($)&&me.tokenTypeOverrides[$]&&(P[$]=me.tokenTypeOverrides[$]);var ce=/^([*\-_])(?:\s*\1){2,}\s*$/,ye=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,_=/^\[(x| )\](?=\s)/i,V=me.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Ce=/^ {0,3}(?:\={1,}|-{2,})\s*$/,se=/^[^#!\[\]*_\\<>` "'(~:]+/,ee=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,U=/^\s*\[[^\]]+?\]:.*$/,R=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,k=" ";function te(O,y,le){return y.f=y.inline=le,le(O,y)}function Ae(O,y,le){return y.f=y.block=le,le(O,y)}function Fe(O){return!O||!/\S/.test(O.string)}function be(O){if(O.linkTitle=!1,O.linkHref=!1,O.linkText=!1,O.em=!1,O.strong=!1,O.strikethrough=!1,O.quote=0,O.indentedCode=!1,O.f==He){var y=x;if(!y){var le=W.innerMode(Z,O.htmlState);y=le.mode.name=="xml"&&le.state.tagStart===null&&!le.state.context&&le.state.tokenize.isInText}y&&(O.f=pe,O.block=he,O.htmlState=null)}return O.trailingSpace=0,O.trailingSpaceNewLine=!1,O.prevLine=O.thisLine,O.thisLine={stream:null},null}function he(O,y){var le=O.column()===y.indentation,je=Fe(y.prevLine.stream),Be=y.indentedCode,tt=y.prevLine.hr,xt=y.list!==!1,Qe=(y.listStack[y.listStack.length-1]||0)+3;y.indentedCode=!1;var Je=y.indentation;if(y.indentationDiff===null&&(y.indentationDiff=y.indentation,xt)){for(y.list=null;Je<y.listStack[y.listStack.length-1];)y.listStack.pop(),y.listStack.length?y.indentation=y.listStack[y.listStack.length-1]:y.list=!1;y.list!==!1&&(y.indentationDiff=Je-y.listStack[y.listStack.length-1])}var Ue=!je&&!tt&&!y.prevLine.header&&(!xt||!Be)&&!y.prevLine.fencedCodeEnd,Ve=(y.list===!1||tt||je)&&y.indentation<=Qe&&O.match(ce),oe=null;if(y.indentationDiff>=4&&(Be||y.prevLine.fencedCodeEnd||y.prevLine.header||je))return O.skipToEnd(),y.indentedCode=!0,P.code;if(O.eatSpace())return null;if(le&&y.indentation<=Qe&&(oe=O.match(V))&&oe[1].length<=6)return y.quote=0,y.header=oe[1].length,y.thisLine.header=!0,me.highlightFormatting&&(y.formatting="header"),y.f=y.inline,ge(y);if(y.indentation<=Qe&&O.eat(">"))return y.quote=le?1:y.quote+1,me.highlightFormatting&&(y.formatting="quote"),O.eatSpace(),ge(y);if(!Ve&&!y.setext&&le&&y.indentation<=Qe&&(oe=O.match(ye))){var D=oe[1]?"ol":"ul";return y.indentation=Je+O.current().length,y.list=!0,y.quote=0,y.listStack.push(y.indentation),y.em=!1,y.strong=!1,y.code=!1,y.strikethrough=!1,me.taskLists&&O.match(_,!1)&&(y.taskList=!0),y.f=y.inline,me.highlightFormatting&&(y.formatting=["list","list-"+D]),ge(y)}else{if(le&&y.indentation<=Qe&&(oe=O.match(ee,!0)))return y.quote=0,y.fencedEndRE=new RegExp(oe[1]+"+ *$"),y.localMode=me.fencedCodeBlockHighlighting&&ke(oe[2]||me.fencedCodeBlockDefaultMode),y.localMode&&(y.localState=W.startState(y.localMode)),y.f=y.block=ue,me.highlightFormatting&&(y.formatting="code-block"),y.code=-1,ge(y);if(y.setext||(!Ue||!xt)&&!y.quote&&y.list===!1&&!y.code&&!Ve&&!U.test(O.string)&&(oe=O.lookAhead(1))&&(oe=oe.match(Ce)))return y.setext?(y.header=y.setext,y.setext=0,O.skipToEnd(),me.highlightFormatting&&(y.formatting="header")):(y.header=oe[0].charAt(0)=="="?1:2,y.setext=y.header),y.thisLine.header=!0,y.f=y.inline,ge(y);if(Ve)return O.skipToEnd(),y.hr=!0,y.thisLine.hr=!0,P.hr;if(O.peek()==="[")return te(O,y,Ee)}return te(O,y,y.inline)}function He(O,y){var le=Z.token(O,y.htmlState);if(!x){var je=W.innerMode(Z,y.htmlState);(je.mode.name=="xml"&&je.state.tagStart===null&&!je.state.context&&je.state.tokenize.isInText||y.md_inside&&O.current().indexOf(">")>-1)&&(y.f=pe,y.block=he,y.htmlState=null)}return le}function ue(O,y){var le=y.listStack[y.listStack.length-1]||0,je=y.indentation<le,Be=le+3;if(y.fencedEndRE&&y.indentation<=Be&&(je||O.match(y.fencedEndRE))){me.highlightFormatting&&(y.formatting="code-block");var tt;return je||(tt=ge(y)),y.localMode=y.localState=null,y.block=he,y.f=pe,y.fencedEndRE=null,y.code=0,y.thisLine.fencedCodeEnd=!0,je?Ae(O,y,y.block):tt}else return y.localMode?y.localMode.token(O,y.localState):(O.skipToEnd(),P.code)}function ge(O){var y=[];if(O.formatting){y.push(P.formatting),typeof O.formatting=="string"&&(O.formatting=[O.formatting]);for(var le=0;le<O.formatting.length;le++)y.push(P.formatting+"-"+O.formatting[le]),O.formatting[le]==="header"&&y.push(P.formatting+"-"+O.formatting[le]+"-"+O.header),O.formatting[le]==="quote"&&(!me.maxBlockquoteDepth||me.maxBlockquoteDepth>=O.quote?y.push(P.formatting+"-"+O.formatting[le]+"-"+O.quote):y.push("error"))}if(O.taskOpen)return y.push("meta"),y.length?y.join(" "):null;if(O.taskClosed)return y.push("property"),y.length?y.join(" "):null;if(O.linkHref?y.push(P.linkHref,"url"):(O.strong&&y.push(P.strong),O.em&&y.push(P.em),O.strikethrough&&y.push(P.strikethrough),O.emoji&&y.push(P.emoji),O.linkText&&y.push(P.linkText),O.code&&y.push(P.code),O.image&&y.push(P.image),O.imageAltText&&y.push(P.imageAltText,"link"),O.imageMarker&&y.push(P.imageMarker)),O.header&&y.push(P.header,P.header+"-"+O.header),O.quote&&(y.push(P.quote),!me.maxBlockquoteDepth||me.maxBlockquoteDepth>=O.quote?y.push(P.quote+"-"+O.quote):y.push(P.quote+"-"+me.maxBlockquoteDepth)),O.list!==!1){var je=(O.listStack.length-1)%3;je?je===1?y.push(P.list2):y.push(P.list3):y.push(P.list1)}return O.trailingSpaceNewLine?y.push("trailing-space-new-line"):O.trailingSpace&&y.push("trailing-space-"+(O.trailingSpace%2?"a":"b")),y.length?y.join(" "):null}function Ie(O,y){return O.match(se,!0)?ge(y):void 0}function pe(O,y){var le=y.text(O,y);if(typeof le!="undefined")return le;if(y.list)return y.list=null,ge(y);if(y.taskList){var je=O.match(_,!0)[1]===" ";return je?y.taskOpen=!0:y.taskClosed=!0,me.highlightFormatting&&(y.formatting="task"),y.taskList=!1,ge(y)}if(y.taskOpen=!1,y.taskClosed=!1,y.header&&O.match(/^#+$/,!0))return me.highlightFormatting&&(y.formatting="header"),ge(y);var Be=O.next();if(y.linkTitle){y.linkTitle=!1;var tt=Be;Be==="("&&(tt=")"),tt=(tt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var xt="^\\s*(?:[^"+tt+"\\\\]+|\\\\\\\\|\\\\.)"+tt;if(O.match(new RegExp(xt),!0))return P.linkHref}if(Be==="`"){var Qe=y.formatting;me.highlightFormatting&&(y.formatting="code"),O.eatWhile("`");var Je=O.current().length;if(y.code==0&&(!y.quote||Je==1))return y.code=Je,ge(y);if(Je==y.code){var Ue=ge(y);return y.code=0,Ue}else return y.formatting=Qe,ge(y)}else if(y.code)return ge(y);if(Be==="\\"&&(O.next(),me.highlightFormatting)){var Ve=ge(y),oe=P.formatting+"-escape";return Ve?Ve+" "+oe:oe}if(Be==="!"&&O.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return y.imageMarker=!0,y.image=!0,me.highlightFormatting&&(y.formatting="image"),ge(y);if(Be==="["&&y.imageMarker&&O.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return y.imageMarker=!1,y.imageAltText=!0,me.highlightFormatting&&(y.formatting="image"),ge(y);if(Be==="]"&&y.imageAltText){me.highlightFormatting&&(y.formatting="image");var Ve=ge(y);return y.imageAltText=!1,y.image=!1,y.inline=y.f=ve,Ve}if(Be==="["&&!y.image)return y.linkText&&O.match(/^.*?\]/)||(y.linkText=!0,me.highlightFormatting&&(y.formatting="link")),ge(y);if(Be==="]"&&y.linkText){me.highlightFormatting&&(y.formatting="link");var Ve=ge(y);return y.linkText=!1,y.inline=y.f=O.match(/\(.*?\)| ?\[.*?\]/,!1)?ve:pe,Ve}if(Be==="<"&&O.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){y.f=y.inline=M,me.highlightFormatting&&(y.formatting="link");var Ve=ge(y);return Ve?Ve+=" ":Ve="",Ve+P.linkInline}if(Be==="<"&&O.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){y.f=y.inline=M,me.highlightFormatting&&(y.formatting="link");var Ve=ge(y);return Ve?Ve+=" ":Ve="",Ve+P.linkEmail}if(me.xml&&Be==="<"&&O.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var D=O.string.indexOf(">",O.pos);if(D!=-1){var it=O.string.substring(O.start,D);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(it)&&(y.md_inside=!0)}return O.backUp(1),y.htmlState=W.startState(Z),Ae(O,y,He)}if(me.xml&&Be==="<"&&O.match(/^\/\w*?>/))return y.md_inside=!1,"tag";if(Be==="*"||Be==="_"){for(var kt=1,Ut=O.pos==1?" ":O.string.charAt(O.pos-2);kt<3&&O.eat(Be);)kt++;var mt=O.peek()||" ",At=!/\s/.test(mt)&&(!R.test(mt)||/\s/.test(Ut)||R.test(Ut)),Te=!/\s/.test(Ut)&&(!R.test(Ut)||/\s/.test(mt)||R.test(mt)),Ye=null,at=null;if(kt%2&&(!y.em&&At&&(Be==="*"||!Te||R.test(Ut))?Ye=!0:y.em==Be&&Te&&(Be==="*"||!At||R.test(mt))&&(Ye=!1)),kt>1&&(!y.strong&&At&&(Be==="*"||!Te||R.test(Ut))?at=!0:y.strong==Be&&Te&&(Be==="*"||!At||R.test(mt))&&(at=!1)),at!=null||Ye!=null){me.highlightFormatting&&(y.formatting=Ye==null?"strong":at==null?"em":"strong em"),Ye===!0&&(y.em=Be),at===!0&&(y.strong=Be);var Ue=ge(y);return Ye===!1&&(y.em=!1),at===!1&&(y.strong=!1),Ue}}else if(Be===" "&&(O.eat("*")||O.eat("_"))){if(O.peek()===" ")return ge(y);O.backUp(1)}if(me.strikethrough){if(Be==="~"&&O.eatWhile(Be)){if(y.strikethrough){me.highlightFormatting&&(y.formatting="strikethrough");var Ue=ge(y);return y.strikethrough=!1,Ue}else if(O.match(/^[^\s]/,!1))return y.strikethrough=!0,me.highlightFormatting&&(y.formatting="strikethrough"),ge(y)}else if(Be===" "&&O.match(/^~~/,!0)){if(O.peek()===" ")return ge(y);O.backUp(2)}}if(me.emoji&&Be===":"&&O.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){y.emoji=!0,me.highlightFormatting&&(y.formatting="emoji");var dt=ge(y);return y.emoji=!1,dt}return Be===" "&&(O.match(/^ +$/,!1)?y.trailingSpace++:y.trailingSpace&&(y.trailingSpaceNewLine=!0)),ge(y)}function M(O,y){var le=O.next();if(le===">"){y.f=y.inline=pe,me.highlightFormatting&&(y.formatting="link");var je=ge(y);return je?je+=" ":je="",je+P.linkInline}return O.match(/^[^>]+/,!0),P.linkInline}function ve(O,y){if(O.eatSpace())return null;var le=O.next();return le==="("||le==="["?(y.f=y.inline=B(le==="("?")":"]"),me.highlightFormatting&&(y.formatting="link-string"),y.linkHref=!0,ge(y)):"error"}var re={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function B(O){return function(y,le){var je=y.next();if(je===O){le.f=le.inline=pe,me.highlightFormatting&&(le.formatting="link-string");var Be=ge(le);return le.linkHref=!1,Be}return y.match(re[O]),le.linkHref=!0,ge(le)}}function Ee(O,y){return O.match(/^([^\]\\]|\\.)*\]:/,!1)?(y.f=Re,O.next(),me.highlightFormatting&&(y.formatting="link"),y.linkText=!0,ge(y)):te(O,y,pe)}function Re(O,y){if(O.match(/^\]:/,!0)){y.f=y.inline=fe,me.highlightFormatting&&(y.formatting="link");var le=ge(y);return y.linkText=!1,le}return O.match(/^([^\]\\]|\\.)+/,!0),P.linkText}function fe(O,y){return O.eatSpace()?null:(O.match(/^[^\s]+/,!0),O.peek()===void 0?y.linkTitle=!0:O.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),y.f=y.inline=pe,P.linkHref+" url")}var et={startState:function(){return{f:he,prevLine:{stream:null},thisLine:{stream:null},block:he,htmlState:null,indentation:0,inline:pe,text:Ie,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(O){return{f:O.f,prevLine:O.prevLine,thisLine:O.thisLine,block:O.block,htmlState:O.htmlState&&W.copyState(Z,O.htmlState),indentation:O.indentation,localMode:O.localMode,localState:O.localMode?W.copyState(O.localMode,O.localState):null,inline:O.inline,text:O.text,formatting:!1,linkText:O.linkText,linkTitle:O.linkTitle,linkHref:O.linkHref,code:O.code,em:O.em,strong:O.strong,strikethrough:O.strikethrough,emoji:O.emoji,header:O.header,setext:O.setext,hr:O.hr,taskList:O.taskList,list:O.list,listStack:O.listStack.slice(0),quote:O.quote,indentedCode:O.indentedCode,trailingSpace:O.trailingSpace,trailingSpaceNewLine:O.trailingSpaceNewLine,md_inside:O.md_inside,fencedEndRE:O.fencedEndRE}},token:function(O,y){if(y.formatting=!1,O!=y.thisLine.stream){if(y.header=0,y.hr=!1,O.match(/^\s*$/,!0))return be(y),null;if(y.prevLine=y.thisLine,y.thisLine={stream:O},y.taskList=!1,y.trailingSpace=0,y.trailingSpaceNewLine=!1,!y.localState&&(y.f=y.block,y.f!=He)){var le=O.match(/^\s*/,!0)[0].replace(/\t/g,k).length;if(y.indentation=le,y.indentationDiff=null,le>0)return null}}return y.f(O,y)},innerMode:function(O){return O.block==He?{state:O.htmlState,mode:Z}:O.localState?{state:O.localState,mode:O.localMode}:{state:O,mode:et}},indent:function(O,y,le){return O.block==He&&Z.indent?Z.indent(O.htmlState,y,le):O.localState&&O.localMode.indent?O.localMode.indent(O.localState,y,le):W.Pass},blankLine:be,getType:ge,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return et},"xml"),W.defineMIME("text/markdown","markdown"),W.defineMIME("text/x-markdown","markdown")})},lzim:function(Pe,we,p){"use strict";var W=p("E7E6"),xe=p.n(W);p.d(we,"A",function(){return xe.a});var me=p("/GNS"),Z=p.n(me);p.d(we,"z",function(){return Z.a});var x=p("FOrL"),ke=p.n(x);p.d(we,"t",function(){return ke.a});var P=p("HpTS"),$=p.n(P);p.d(we,"B",function(){return $.a});var ce=p("tWlo"),ye=p.n(ce);p.d(we,"b",function(){return ye.a});var _=p("7ZXX"),V=p.n(_);p.d(we,"n",function(){return V.a});var Ce=p("GABl"),se=p.n(Ce);p.d(we,"g",function(){return se.a});var ee=p("onxn"),U=p.n(ee);p.d(we,"p",function(){return U.a});var R=p("nKGa"),k=p.n(R);p.d(we,"o",function(){return k.a});var te=p("4qgm"),Ae=p.n(te);p.d(we,"D",function(){return Ae.a});var Fe=p("JeFH"),be=p.n(Fe);p.d(we,"c",function(){return be.a});var he=p("ji0R"),He=p.n(he);p.d(we,"k",function(){return He.a});var ue=p("W6BS"),ge=p.n(ue);p.d(we,"E",function(){return ge.a});var Ie=p("kPYp"),pe=p.n(Ie);p.d(we,"F",function(){return pe.a});var M=p("nukY"),ve=p.n(M),re=p("4u4S"),B=p.n(re),Ee=p("yslc"),Re=p.n(Ee),fe=p("l2Kq"),et=p.n(fe),O=p("RMFE"),y=p.n(O);p.d(we,"q",function(){return y.a});var le=p("TGq3"),je=p.n(le);p.d(we,"r",function(){return je.a});var Be=p("SMhR"),tt=p.n(Be);p.d(we,"C",function(){return tt.a});var xt=p("8/bI"),Qe=p.n(xt);p.d(we,"l",function(){return Qe.a});var Je=p("JWDV"),Ue=p.n(Je);p.d(we,"e",function(){return Ue.a});var Ve=p("Xsq0"),oe=p.n(Ve);p.d(we,"s",function(){return oe.a});var D=p("Ohmc"),it=p.n(D);p.d(we,"d",function(){return it.a});var kt=p("csWT"),Ut=p.n(kt);p.d(we,"f",function(){return Ut.a});var mt=p("7v3h"),At=p.n(mt);p.d(we,"m",function(){return At.a});var Te=p("cRFk"),Ye=p.n(Te);p.d(we,"y",function(){return Ye.a});var at=p("kPWJ"),dt=p.n(at);p.d(we,"x",function(){return dt.a});var Ke=p("qgvg"),We=p.n(Ke);p.d(we,"u",function(){return We.a});var Ze=p("FPkq"),Lt=p.n(Ze);p.d(we,"w",function(){return Lt.a});var gt=p("A/g1"),ot=p.n(gt);p.d(we,"h",function(){return ot.a});var rt=p("Nmxd"),Dt=p.n(rt);p.d(we,"i",function(){return Dt.a});var ft=p("5D2P"),wt=p.n(ft);p.d(we,"j",function(){return wt.a});var Se=p("djh8"),It=p.n(Se);p.d(we,"v",function(){return It.a});var pt=p("Jq4h"),Me=p.n(pt);p.d(we,"a",function(){return Me.a})},mepR:function(Pe,we,p){Pe.exports={flex_box_center:"flex_box_center___3PiSf",flex_space_between:"flex_space_between___3wd5O",flex_box_vertical_center:"flex_box_vertical_center___3qKIW",flex_box_center_end:"flex_box_center_end___2PBRG",flex_box_column:"flex_box_column___39GGe",bg:"bg___3lEyf",formWrap:"formWrap___1e8Z1",empty:"empty___2jgvs",list:"list___3m2Ed",fs:"fs___2PURZ",top:"top___2EfKX",left:"left___3Bk5W",title:"title___1hcE1",qs:"qs___KHjhf",qsActive:"qsActive___2FXkO",right:"right___2XWtX",bt:"bt___2mIBt",answer:"answer___1TBgK",addBtn:"addBtn___NMPyJ"}},muJo:function(Pe,we,p){Pe.exports={flex_box_center:"flex_box_center___1GzcK",flex_space_between:"flex_space_between___4Rl0j",flex_box_vertical_center:"flex_box_vertical_center___1-qMw",flex_box_center_end:"flex_box_center_end___pqqwK",flex_box_column:"flex_box_column___zVFuu",wrap:"wrap___YGogw",modal:"modal___1QSEy",titleWrap:"titleWrap___3EOlz",required:"required___1x65S",title:"title___3ujkw",colorGray:"colorGray___jarKl",choiceWrap:"choiceWrap___38GG9",answer:"answer___1L3jg",activeAnswer:"activeAnswer___2rQWC",deleteIcon:"deleteIcon___QdOVW",addIcon:"addIcon___3FfXv",editorWrap:"editorWrap___QTfGw",htmlWrap:"htmlWrap___1jgO0",radio:"radio___3VIqN",error:"error___ojNkY",color333:"color333___2XFbv",color999:"color999___1xmOg",questionType:"questionType___ttkA1",questionChoices:"questionChoices___I-cIa"}},nKGa:function(Pe,we,p){Pe.exports=p.p+"static/export_exercise-template.f7655c19.png"},nuEh:function(Pe,we,p){"use strict";var W=p("T2oS"),xe=p("W9HT"),me=p("q1tI"),Z=p.n(me),x=p("F8wB"),ke=p.n(x),P=function(ce){var ye=ce.loading;return ye?Z.a.createElement("div",{className:ke.a.loading},Z.a.createElement(xe.a,null)):Z.a.createElement(Z.a.Fragment,null)};we.a=P},nukY:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAMkklEQVR4Xu2dWWwcSRnHv7Yd577v+74vkgWEQCAEy6IVWuCB62GVICFIYkcsvMC+LW8LL7BIiTiEhCweInjgPrRCC2KBJTBVYzm24yRO4ty3kziJj9ie+tC/d9oaT2b67ume7irJsjdbVf19X/266quvjjaEEG8w8yukk7ZAii1gMHODEOK3RPRSivXUqmXcAgb07+jomDk2NvYPZn4u4/bQ6qfUAiboSEKI5cz8XyJanVJdtVoZtsAE6EXY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OtbYGZlepehMpyXnZdKKvbop+2IXUwrKpjDHR93OdTeicVLgi6VwUJ7t89ijK4sQ2HP6dGrDm2PhLotetiNpgPVZXi741I8aN0t80R9Pv/VU4P9kJi0VLnm8iU5cvsOAu1Y//8jLZMlF3SBN0ZrRNFnBG8RRxza2utYf3syDjWVoIjV30Z8kzc7aR6579BgYRl30tvXLH7rPLn+7h8bjlZ5mFP9MDt8EMxD13lt4lpb2ZQc0qegnTeyyKOv2QE5FO3OSgzvFjjporyX6qKNwdMU/6UxpWTfmsuOFCrtZT8WKMKqyJkdbfSPpn5nql4XamMamN5GB0TvUK4KE6HbTqS5ma+eahgtO2ZY9fx2TlKtVziZp3Zl/FigUiZ3wOIYWZ/52pLR35oOU6oPtuw+dNdl6QfsAHmYlMZcEpiXsak6tnQY70bWubrUepjkNJTKTbGv8s8SSlOaD5Z0LwhL4XWmQvSa42rWrgf7+Fn7byVVV5KX6mLbTWcKueEa6etz+M+OphwqlZtmnSUME1bjJyb6vOmm8tc3PvrCeMIJZTLt5zBb1i59tUxuvDeRm+14RscbD1IB9Uo6ZnHRfp2XsX4489Ujy8eT08YTAjSg6Plf333p9HDLpzPlpnEvg4kYH83TrZrxcugy7IkU4SnrdszlW6AS5iOzndzu2FAbexmKY2RCgDR5zVsfrFm2YSrc92cqveNe2xMF9pk4HZvFMmQwflxrqMZFXKub49R1+ZtOne5hJaZpwoAG1GpXjhf/YXuxTK37pyLFPZSGErM7JleYCPVGRN7kreaXsp45OnY7aAwN3xvQcH1b1y65VabMwzMU5zQ79bMKmLHLm2GCEXC0jUkVRSLUF6hdW62c8n7WyzXHfsianBVAg16rqGCOerYt+E4tuOIbviR3suK+cBp1Zdpp0GRVRfZl4/XHD7AzTpnYSFWB0vHlzS2TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},osHv:function(Pe,we,p){(function(W){W(p("VrN/"))})(function(W){"use strict";var xe=W.Pos;function me(R,k){return R.line-k.line||R.ch-k.ch}var Z="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",x=Z+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ke=new RegExp("<(/?)(["+Z+"]["+x+"]*)","g");function P(R,k,te,Ae){this.line=k,this.ch=te,this.cm=R,this.text=R.getLine(k),this.min=Ae?Math.max(Ae.from,R.firstLine()):R.firstLine(),this.max=Ae?Math.min(Ae.to-1,R.lastLine()):R.lastLine()}function $(R,k){var te=R.cm.getTokenTypeAt(xe(R.line,k));return te&&/\btag\b/.test(te)}function ce(R){return R.line>=R.max?void 0:(R.ch=0,R.text=R.cm.getLine(++R.line),!0)}function ye(R){return R.line<=R.min?void 0:(R.text=R.cm.getLine(--R.line),R.ch=R.text.length,!0)}function _(R){for(;;){var k=R.text.indexOf(">",R.ch);if(k==-1){if(ce(R))continue;return}if(!$(R,k+1)){R.ch=k+1;continue}var te=R.text.lastIndexOf("/",k),Ae=te>-1&&!/\S/.test(R.text.slice(te+1,k));return R.ch=k+1,Ae?"selfClose":"regular"}}function V(R){for(;;){var k=R.ch?R.text.lastIndexOf("<",R.ch-1):-1;if(k==-1){if(ye(R))continue;return}if(!$(R,k+1)){R.ch=k;continue}ke.lastIndex=k,R.ch=k;var te=ke.exec(R.text);if(te&&te.index==k)return te}}function Ce(R){for(;;){ke.lastIndex=R.ch;var k=ke.exec(R.text);if(!k){if(ce(R))continue;return}if(!$(R,k.index+1)){R.ch=k.index+1;continue}return R.ch=k.index+k[0].length,k}}function se(R){for(;;){var k=R.ch?R.text.lastIndexOf(">",R.ch-1):-1;if(k==-1){if(ye(R))continue;return}if(!$(R,k+1)){R.ch=k;continue}var te=R.text.lastIndexOf("/",k),Ae=te>-1&&!/\S/.test(R.text.slice(te+1,k));return R.ch=k+1,Ae?"selfClose":"regular"}}function ee(R,k){for(var te=[];;){var Ae=Ce(R),Fe,be=R.line,he=R.ch-(Ae?Ae[0].length:0);if(!Ae||!(Fe=_(R)))return;if(Fe=="selfClose")continue;if(Ae[1]){for(var He=te.length-1;He>=0;--He)if(te[He]==Ae[2]){te.length=He;break}if(He<0&&(!k||k==Ae[2]))return{tag:Ae[2],from:xe(be,he),to:xe(R.line,R.ch)}}else te.push(Ae[2])}}function U(R,k){for(var te=[];;){var Ae=se(R);if(!Ae)return;if(Ae=="selfClose"){V(R);continue}var Fe=R.line,be=R.ch,he=V(R);if(!he)return;if(he[1])te.push(he[2]);else{for(var He=te.length-1;He>=0;--He)if(te[He]==he[2]){te.length=He;break}if(He<0&&(!k||k==he[2]))return{tag:he[2],from:xe(R.line,R.ch),to:xe(Fe,be)}}}}W.registerHelper("fold","xml",function(R,k){for(var te=new P(R,k.line,0);;){var Ae=Ce(te);if(!Ae||te.line!=k.line)return;var Fe=_(te);if(!Fe)return;if(!Ae[1]&&Fe!="selfClose"){var be=xe(te.line,te.ch),he=ee(te,Ae[2]);return he&&me(he.from,be)>0?{from:be,to:he.from}:null}}}),W.findMatchingTag=function(R,k,te){var Ae=new P(R,k.line,k.ch,te);if(Ae.text.indexOf(">")==-1&&Ae.text.indexOf("<")==-1)return;var Fe=_(Ae),be=Fe&&xe(Ae.line,Ae.ch),he=Fe&&V(Ae);if(!Fe||!he||me(Ae,k)>0)return;var He={from:xe(Ae.line,Ae.ch),to:be,tag:he[2]};return Fe=="selfClose"?{open:He,close:null,at:"open"}:he[1]?{open:U(Ae,he[2]),close:He,at:"close"}:(Ae=new P(R,be.line,be.ch,te),{open:He,close:ee(Ae,he[2]),at:"open"})},W.findEnclosingTag=function(R,k,te,Ae){for(var Fe=new P(R,k.line,k.ch,te);;){var be=U(Fe,Ae);if(!be)break;var he=new P(R,k.line,k.ch,te),He=ee(he,be.tag);if(He)return{open:be,close:He}}},W.scanForClosingTag=function(R,k,te,Ae){var Fe=new P(R,k.line,k.ch,Ae?{from:0,to:Ae}:null);return ee(Fe,te)}})},p5ED:function(Pe,we,p){"use strict";var W=p("+L6B"),xe=p("2/Rp"),me=p("5Dmo"),Z=p("3S7+"),x=p("k1fw"),ke=p("9og8"),P=p("tJVT"),$=p("WmNS"),ce=p.n($),ye=p("q1tI"),_=p.n(ye),V=p("vHTk"),Ce=p.n(V),se=p("yEEn"),ee=p("ZW9T"),U=p("1vsH"),R=p("V0Rq"),k=p("m3rI"),te=function(Fe){var be=Fe.name,he=Fe.data,He=Fe.theme,ue=Fe.type,ge=Fe.filename,Ie=Fe.monacoEditor,pe=Fe.className,M=Fe.style,ve=Fe.close,re=Fe.onClose,B=Fe.hasMask,Ee=Fe.otherData,Re=Ee===void 0?{}:Ee,fe=Object(ye.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),et=Object(P.a)(fe,2),O=et[0],y=et[1],le=Object(ye.useState)(""),je=Object(P.a)(le,2),Be=je[0],tt=je[1],xt=Object(ye.useState)(),Qe=Object(P.a)(xt,2),Je=Qe[0],Ue=Qe[1],Ve=window.ENV==="build"?"/react/build/office.html":"/office.html",oe,D=1024*1024,it=10*D,kt=Object(ye.useRef)();ue==="office"&&(oe=Object(U.R)(he).filesize,oe>it&&(ue="other")),ge&&(Ie.filename=ge),Object(ye.useEffect)(function(){var Te,Ye,at=(Te=document.cookie)===null||Te===void 0||((Ye=Te.replace(/\s/g,""))===null||Ye===void 0)?void 0:Ye.split(";");at==null||at.map(function(dt){var Ke=dt.split("=");Ke[0]==="_educoder_session"&&tt(Ke[1])})},[]),Object(ye.useEffect)(function(){ue==="office"&&Ut()},[ue]);var Ut=function(){var Te=Object(ke.a)(ce.a.mark(function Ye(){var at,dt,Ke;return ce.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return console.log("data:",he),at=he,he.startsWith("http")||(at=location.origin+at),dt=new URL(at).pathname.split("/").pop(),Ze.next=6,Object(R.U)({attachment_id:dt});case 6:Ke=Ze.sent,Ue(Ke);case 8:case"end":return Ze.stop()}},Ye)}));return function(){return Te.apply(this,arguments)}}(),mt=function(){if(he.startsWith("http")||he.startsWith("/api")||he.startsWith("blob:")){At();return}Object(U.x)(ge||"educoder",he,ge||"educoder")},At=function(){Object(U.v)(ge||"educoder",decodeURIComponent(he))};return _.a.createElement("div",{style:Object(x.a)({},M||{}),className:"".concat(B&&Ce.a.bgBlack," ").concat(ue?Ce.a.wrp:"hide")},ve&&_.a.createElement("div",{className:Ce.a.close,ref:kt},_.a.createElement(Z.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return kt.current}},_.a.createElement("span",{onClick:At},_.a.createElement("i",{className:"icon-quxiaozhiding"}))),_.a.createElement(Z.a,{title:"\u5173\u95ED",getPopupContainer:function(){return kt.current}},_.a.createElement("span",{className:"",onClick:function(){re(),Ue(null)}},_.a.createElement("i",{className:"icon-guanbi1"})))),_.a.createElement("div",{className:"".concat(Ce.a[pe]," ").concat(pe," ").concat(Ce.a.monaco," ").concat(ue==="txt"?"show":"hide")},ue==="txt"&&_.a.createElement(ee.b,Ie)),ue==="audio"&&_.a.createElement("audio",{src:"".concat((he==null?void 0:he.indexOf("http://"))>-1||(he==null?void 0:he.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(he),autoPlay:!0}),ue==="video"&&_.a.createElement(_.a.Fragment,null,(he==null?void 0:he.indexOf("/api"))>-1?_.a.createElement("video",{controls:!0,src:"".concat(he),autoPlay:!0}):_.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(he),autoPlay:!0})),ue==="office"&&Je&&_.a.createElement("iframe",{src:"".concat(Ve,"?key=").concat(Je.key,"&url=").concat(k.a.API_SERVER+Je.url,"&callbackUrl=").concat(k.a.API_SERVER+Je.callbackUrl,"&fileType=").concat(Je.fileType,"&title=").concat(Je.title,"&model=view")}),(ue==="xlsx"||ue==="doc"||ue==="pptx"||ue==="docx")&&_.a.createElement("iframe",{src:"".concat(Ve,"?key=").concat(Re.key,"&url=").concat(k.a.API_SERVER+Re.url,"&callbackUrl=").concat(k.a.API_SERVER+Re.callbackUrl,"&fileType=").concat(Re.fileType,"&title=").concat(Re.title,"&model=").concat(Re.model)}),ue==="html"&&_.a.createElement("iframe",{src:he+"&disposition=inline"}),ue==="pdf"&&_.a.createElement("embed",{className:Ce.a.embed,src:he,type:"application/pdf"}),ue==="image"&&_.a.createElement("img",{src:"".concat((he==null?void 0:he.indexOf("http://"))>-1||(he==null?void 0:he.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(he)}),ue==="other"&&_.a.createElement("div",null,_.a.createElement(xe.a,{type:"primary",size:"large",onClick:mt},_.a.createElement(se.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),ue==="download"&&_.a.createElement(xe.a,{type:"primary",size:"large",onClick:mt},_.a.createElement(se.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))};we.a=te},"p77/":function(Pe,we,p){},qgvg:function(Pe,we){Pe.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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RUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},"rAM+":function(Pe,we,p){"use strict";p.d(we,"a",function(){return xe});var W=p("Qw5x");function xe(me,Z){var x;if(typeof Symbol=="undefined"||me[Symbol.iterator]==null){if(Array.isArray(me)||(x=Object(W.a)(me))||Z&&me&&typeof me.length=="number"){x&&(me=x);var ke=0,P=function(){};return{s:P,n:function(){return ke>=me.length?{done:!0}:{done:!1,value:me[ke++]}},e:function(V){throw V},f:P}}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 $=!0,ce=!1,ye;return{s:function(){x=me[Symbol.iterator]()},n:function(){var V=x.next();return $=V.done,V},e:function(V){ce=!0,ye=V},f:function(){try{!$&&x.return!=null&&x.return()}finally{if(ce)throw ye}}}}},rUJ1:function(Pe,we){const p=/[&<>"']/,W=/[&<>"']/g,xe=/[<>"']|&(?!#?\w+;)/,me=/[<>"']|&(?!#?\w+;)/g,Z={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},x=ue=>Z[ue];function ke(ue,ge){if(ge){if(p.test(ue))return ue.replace(W,x)}else if(xe.test(ue))return ue.replace(me,x);return ue}const P=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function $(ue){return ue.replace(P,(ge,Ie)=>(Ie=Ie.toLowerCase(),Ie==="colon"?":":Ie.charAt(0)==="#"?Ie.charAt(1)==="x"?String.fromCharCode(parseInt(Ie.substring(2),16)):String.fromCharCode(+Ie.substring(1)):""))}const ce=/(^|[^\[])\^/g;function ye(ue,ge){ue=ue.source||ue,ge=ge||"";const Ie={replace:(pe,M)=>(M=M.source||M,M=M.replace(ce,"$1"),ue=ue.replace(pe,M),Ie),getRegex:()=>new RegExp(ue,ge)};return Ie}const _=/[^\w:]/g,V=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ce(ue,ge,Ie){if(ue){let pe;try{pe=decodeURIComponent($(Ie)).replace(_,"").toLowerCase()}catch(M){return null}if(pe.indexOf("javascript:")===0||pe.indexOf("vbscript:")===0||pe.indexOf("data:")===0)return null}ge&&!V.test(Ie)&&(Ie=k(ge,Ie));try{Ie=encodeURI(Ie).replace(/%25/g,"%")}catch(pe){return null}return Ie}const se={},ee=/^[^:]+:\/*[^/]*$/,U=/^([^:]+:)[\s\S]*$/,R=/^([^:]+:\/*[^/]*)[\s\S]*$/;function k(ue,ge){se[" "+ue]||(ee.test(ue)?se[" "+ue]=ue+"/":se[" "+ue]=be(ue,"/",!0)),ue=se[" "+ue];const Ie=ue.indexOf(":")===-1;return ge.substring(0,2)==="//"?Ie?ge:ue.replace(U,"$1")+ge:ge.charAt(0)==="/"?Ie?ge:ue.replace(R,"$1")+ge:ue+ge}const te={exec:function(){}};function Ae(ue){let ge=1,Ie,pe;for(;ge<arguments.length;ge++){Ie=arguments[ge];for(pe in Ie)Object.prototype.hasOwnProperty.call(Ie,pe)&&(ue[pe]=Ie[pe])}return ue}function Fe(ue,ge){const Ie=ue.replace(/\|/g,(ve,re,B)=>{let Ee=!1,Re=re;for(;--Re>=0&&B[Re]==="\\";)Ee=!Ee;return Ee?"|":" |"}),pe=Ie.split(/ \|/);let M=0;if(pe.length>ge)pe.splice(ge);else for(;pe.length<ge;)pe.push("");for(;M<pe.length;M++)pe[M]=pe[M].trim().replace(/\\\|/g,"|");return pe}function be(ue,ge,Ie){const pe=ue.length;if(pe===0)return"";let M=0;for(;M<pe;){const ve=ue.charAt(pe-M-1);if(ve===ge&&!Ie)M++;else if(ve!==ge&&Ie)M++;else break}return ue.substr(0,pe-M)}function he(ue,ge){if(ue.indexOf(ge[1])===-1)return-1;const Ie=ue.length;let pe=0,M=0;for(;M<Ie;M++)if(ue[M]==="\\")M++;else if(ue[M]===ge[0])pe++;else if(ue[M]===ge[1]&&(pe--,pe<0))return M;return-1}function He(ue){ue&&ue.sanitize&&!ue.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")}Pe.exports={escape:ke,unescape:$,edit:ye,cleanUrl:Ce,resolveUrl:k,noopTest:te,merge:Ae,splitCells:Fe,rtrim:be,findClosingBracket:he,checkSanitizeDeprecation:He}},t23M:function(Pe,we,p){"use strict";var W=p("VTBJ"),xe=p("1OyB"),me=p("vuIU"),Z=p("Ji7U"),x=p("LK+K"),ke=p("q1tI"),P=p.n(ke),$=p("m+aA"),ce=p("Zm9Q"),ye=p("Kwbf"),_=p("c+Xe"),V=p("bdgK"),Ce="rc-observer-key",se=function(ee){Object(Z.a)(R,ee);var U=Object(x.a)(R);function R(){var k;return Object(xe.a)(this,R),k=U.apply(this,arguments),k.resizeObserver=null,k.childNode=null,k.currentElement=null,k.state={width:0,height:0,offsetHeight:0,offsetWidth:0},k.onResize=function(te){var Ae=k.props.onResize,Fe=te[0].target,be=Fe.getBoundingClientRect(),he=be.width,He=be.height,ue=Fe.offsetWidth,ge=Fe.offsetHeight,Ie=Math.floor(he),pe=Math.floor(He);if(k.state.width!==Ie||k.state.height!==pe||k.state.offsetWidth!==ue||k.state.offsetHeight!==ge){var M={width:Ie,height:pe,offsetWidth:ue,offsetHeight:ge};k.setState(M),Ae&&Promise.resolve().then(function(){Ae(Object(W.a)(Object(W.a)({},M),{},{offsetWidth:ue,offsetHeight:ge}))})}},k.setChildNode=function(te){k.childNode=te},k}return Object(me.a)(R,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var te=this.props.disabled;if(te){this.destroyObserver();return}var Ae=Object($.a)(this.childNode||this),Fe=Ae!==this.currentElement;Fe&&(this.destroyObserver(),this.currentElement=Ae),!this.resizeObserver&&Ae&&(this.resizeObserver=new V.default(this.onResize),this.resizeObserver.observe(Ae))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var te=this.props.children,Ae=Object(ce.a)(te);if(Ae.length>1)Object(ye.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(Ae.length===0)return Object(ye.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var Fe=Ae[0];if(ke.isValidElement(Fe)&&Object(_.c)(Fe)){var be=Fe.ref;Ae[0]=ke.cloneElement(Fe,{ref:Object(_.a)(be,this.setChildNode)})}return Ae.length===1?Ae[0]:Ae.map(function(he,He){return!ke.isValidElement(he)||"key"in he&&he.key!==null?he:ke.cloneElement(he,{key:"".concat(Ce,"-").concat(He)})})}}]),R}(ke.Component);se.displayName="ResizeObserver",we.a=se},tWlo:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkVCNENBMTM0OENGMTExRTk4NzNCRkMxMzdBMjc5MEY5IiB4bXB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Jvr0DrWaNkEe3L32kULmhXV+cHHR8cOvV5tcDd9f8qvm9ouAW2Zm5yhpm5uwWi9HRoRXq1UqC9zt08cDe391VUiJPyaPo+F1zddaZy80XFyLRv52v2ViPrehiJSvz6Z7rthQpZI+t6E+K91yuj+3UXnkL+7PbYxCFdiIKfgYdTcohHZ23QTnEntd8Y8AAwCTubpzlq2wWAAAAABJRU5ErkJggg=="},uIXO:function(Pe,we,p){Pe.exports={flex_box_center:"flex_box_center___1HoSW",flex_space_between:"flex_space_between___1NTlm",flex_box_vertical_center:"flex_box_vertical_center___1RREG",flex_box_center_end:"flex_box_center_end___-OJaq",flex_box_column:"flex_box_column___11ry4",modal:"modal___32KcS",main:"main___3HP_p",title:"title___1Kjif",name:"name___3ysu_",body:"body___33mTT",form:"form___2fckF",btns:"btns___3SmLH"}},vHTk:function(Pe,we,p){Pe.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},yslc:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAOHklEQVR4Xu1dCXQURRr+emZyTO6D3BCEgKCInCKeK3IoiyIqlxLyQBRBV8DNhCCrS3Z9Cq66KOoi68ECKocCcutTLhUERM1MEpBLEuQmQMKEnDNd+6onEzKTuXqmJ5l0V/EeL+mp+qu+r77UVP1V9TcHffZbIJgOlhgDMmaAA8lTwVDxJQh5UMY4GTSFM8AJ+PW6cIDsBEEfhfPB4MuUAYvQaTowOwV1NXtB0E6mWBksBTNwTeiUBENud/CmHwBEKZgTBl2GDNgKnQIsyBkCM9kEEI0M8TJICmWgqdCFkT17MngsUignDLYMGXAsdAo0XzcPILkyxMwgKZAB50InhIMhZxUIGalAXhhkmTHgXOgU6PG8UFwxbgdBf5nhZnAUxoBroVMyjryQgMraPSDoqDBuGFwZMeBe6MLi9IWuIHW7QUisjLA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