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.
122 lines
414 KiB
122 lines
414 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[272,6,7,14],{"+NIl":function(qe,Ie,f){(function(W){W(f("VrN/"))})(function(W){"use strict";W.defineMode("stex",function(be,le){"use strict";function Oe(K,P){K.cmdState.push(P)}function ge(K){return K.cmdState.length>0?K.cmdState[K.cmdState.length-1]:null}function J(K){var P=K.cmdState.pop();P&&P.closeBracket()}function N(K){for(var P=K.cmdState,U=P.length-1;U>=0;U--){var j=P[U];if(j.name=="DEFAULT")continue;return j}return{styleIdentifier:function(){return null}}}function A(K,P,U){return function(){this.name=K,this.bracketNo=0,this.style=P,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 w={};w.importmodule=A("importmodule","tag",["string","builtin"]),w.documentclass=A("documentclass","tag",["","atom"]),w.usepackage=A("usepackage","tag",["atom"]),w.begin=A("begin","tag",["atom"]),w.end=A("end","tag",["atom"]),w.label=A("label","tag",["atom"]),w.ref=A("ref","tag",["atom"]),w.eqref=A("eqref","tag",["atom"]),w.cite=A("cite","tag",["atom"]),w.bibitem=A("bibitem","tag",["atom"]),w.Bibitem=A("Bibitem","tag",["atom"]),w.RBibitem=A("RBibitem","tag",["atom"]),w.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function H(K,P){K.f=P}function X(K,P){var U;if(K.match(/^\\[a-zA-Z@]+/)){var j=K.current().slice(1);return U=w.hasOwnProperty(j)?w[j]:w.DEFAULT,U=new U,Oe(P,U),H(P,ue),U.style}if(K.match(/^\\[$&%#{}_]/))return"tag";if(K.match(/^\\[,;!\/\\]/))return"tag";if(K.match("\\["))return H(P,function(ne,ke){return ie(ne,ke,"\\]")}),"keyword";if(K.match("\\("))return H(P,function(ne,ke){return ie(ne,ke,"\\)")}),"keyword";if(K.match("$$"))return H(P,function(ne,ke){return ie(ne,ke,"$$")}),"keyword";if(K.match("$"))return H(P,function(ne,ke){return ie(ne,ke,"$")}),"keyword";var B=K.next();if(B=="%")return K.skipToEnd(),"comment";if(B=="}"||B=="]"){if(U=ge(P),U)U.closeBracket(B),H(P,ue);else return"error";return"bracket"}else return B=="{"||B=="["?(U=w.DEFAULT,U=new U,Oe(P,U),"bracket"):/\d/.test(B)?(K.eatWhile(/[\w.%]/),"atom"):(K.eatWhile(/[\w\-_]/),U=N(P),U.name=="begin"&&(U.argument=K.current()),U.styleIdentifier())}function ie(K,P,U){if(K.eatSpace())return null;if(U&&K.match(U))return H(P,X),"keyword";if(K.match(/^\\[a-zA-Z@]+/))return"tag";if(K.match(/^[a-zA-Z]+/))return"variable-2";if(K.match(/^\\[$&%#{}_]/))return"tag";if(K.match(/^\\[,;!\/]/))return"tag";if(K.match(/^[\^_&]/))return"tag";if(K.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(K.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var j=K.next();return j=="{"||j=="}"||j=="["||j=="]"||j=="("||j==")"?"bracket":j=="%"?(K.skipToEnd(),"comment"):"error"}function ue(K,P){var U=K.peek(),j;return U=="{"||U=="["?(j=ge(P),j.openBracket(U),K.eat(U),H(P,X),"bracket"):/[ \t\r]/.test(U)?(K.eat(U),null):(H(P,X),J(P),X(K,P))}return{startState:function(){var K=le.inMathMode?function(P,U){return ie(P,U)}:X;return{cmdState:[],f:K}},copyState:function(K){return{cmdState:K.cmdState.slice(),f:K.f}},token:function(K,P){return P.f(K,P)},blankLine:function(K){K.f=X,K.cmdState.length=0},lineComment:"%"}}),W.defineMIME("text/x-stex","stex"),W.defineMIME("text/x-latex","stex")})},"19Vz":function(qe,Ie,f){(function(W){W(f("VrN/"))})(function(W){W.defineOption("placeholder","",function(A,w,H){var X=H&&H!=W.Init;if(w&&!X)A.on("blur",ge),A.on("change",J),A.on("swapDoc",J),W.on(A.getInputField(),"compositionupdate",A.state.placeholderCompose=function(){Oe(A)}),J(A);else if(!w&&X){A.off("blur",ge),A.off("change",J),A.off("swapDoc",J),W.off(A.getInputField(),"compositionupdate",A.state.placeholderCompose),be(A);var ie=A.getWrapperElement();ie.className=ie.className.replace(" CodeMirror-empty","")}w&&!A.hasFocus()&&ge(A)});function be(A){A.state.placeholder&&(A.state.placeholder.parentNode.removeChild(A.state.placeholder),A.state.placeholder=null)}function le(A){be(A);var w=A.state.placeholder=document.createElement("pre");w.style.cssText="height: 0; overflow: visible",w.style.direction=A.getOption("direction"),w.className="CodeMirror-placeholder CodeMirror-line-like";var H=A.getOption("placeholder");typeof H=="string"&&(H=document.createTextNode(H)),w.appendChild(H),A.display.lineSpace.insertBefore(w,A.display.lineSpace.firstChild)}function Oe(A){setTimeout(function(){var w=!1,H=A.getInputField();H.nodeName=="TEXTAREA"?w=!H.value:A.lineCount()==1&&(w=!/[^\u200b]/.test(H.querySelector(".CodeMirror-line").textContent)),w?le(A):be(A)},20)}function ge(A){N(A)&&le(A)}function J(A){var w=A.getWrapperElement(),H=N(A);w.className=w.className.replace(" CodeMirror-empty","")+(H?" CodeMirror-empty":""),H?le(A):be(A)}function N(A){return A.lineCount()===1&&A.getLine(0)===""}})},"1ZF9":function(qe,Ie,f){qe.exports=f.p+"static/Authorize.cc9c212f.png"},"1eCo":function(qe,Ie,f){(function(W){W(f("VrN/"))})(function(W){"use strict";var be={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},le={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};W.defineMode("xml",function(Oe,ge){var J=Oe.indentUnit,N={},A=ge.htmlMode?be:le;for(var w in A)N[w]=A[w];for(var w in ge)N[w]=ge[w];var H,X;function ie(y,V){function M(I){return V.tokenize=I,I(y,V)}var v=y.next();if(v=="<")return y.eat("!")?y.eat("[")?y.match("CDATA[")?M(P("atom","]]>")):null:y.match("--")?M(P("comment","-->")):y.match("DOCTYPE",!0,!0)?(y.eatWhile(/[\w\._\-]/),M(U(1))):null:y.eat("?")?(y.eatWhile(/[\w\._\-]/),V.tokenize=P("meta","?>"),"meta"):(H=y.eat("/")?"closeTag":"openTag",V.tokenize=ue,"tag bracket");if(v=="&"){var ee;return y.eat("#")?y.eat("x")?ee=y.eatWhile(/[a-fA-F\d]/)&&y.eat(";"):ee=y.eatWhile(/[\d]/)&&y.eat(";"):ee=y.eatWhile(/[\w\.\-:]/)&&y.eat(";"),ee?"atom":"error"}else return y.eatWhile(/[^&<]/),null}ie.isInText=!0;function ue(y,V){var M=y.next();if(M==">"||M=="/"&&y.eat(">"))return V.tokenize=ie,H=M==">"?"endTag":"selfcloseTag","tag bracket";if(M=="=")return H="equals",null;if(M=="<"){V.tokenize=ie,V.state=ke,V.tagName=V.tagStart=null;var v=V.tokenize(y,V);return v?v+" tag error":"tag error"}else return/[\'\"]/.test(M)?(V.tokenize=K(M),V.stringStartCol=y.column(),V.tokenize(y,V)):(y.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function K(y){var V=function(M,v){for(;!M.eol();)if(M.next()==y){v.tokenize=ue;break}return"string"};return V.isInAttribute=!0,V}function P(y,V){return function(M,v){for(;!M.eol();){if(M.match(V)){v.tokenize=ie;break}M.next()}return y}}function U(y){return function(V,M){for(var v;(v=V.next())!=null;){if(v=="<")return M.tokenize=U(y+1),M.tokenize(V,M);if(v==">")if(y==1){M.tokenize=ie;break}else return M.tokenize=U(y-1),M.tokenize(V,M)}return"meta"}}function j(y,V,M){this.prev=y.context,this.tagName=V,this.indent=y.indented,this.startOfLine=M,(N.doNotIndent.hasOwnProperty(V)||y.context&&y.context.noIndent)&&(this.noIndent=!0)}function B(y){y.context&&(y.context=y.context.prev)}function ne(y,V){for(var M;;){if(!y.context)return;if(M=y.context.tagName,!N.contextGrabbers.hasOwnProperty(M)||!N.contextGrabbers[M].hasOwnProperty(V))return;B(y)}}function ke(y,V,M){return y=="openTag"?(M.tagStart=V.column(),Fe):y=="closeTag"?ce:ke}function Fe(y,V,M){return y=="word"?(M.tagName=V.current(),X="tag",de):N.allowMissingTagName&&y=="endTag"?(X="tag bracket",de(y,V,M)):(X="error",Fe)}function ce(y,V,M){if(y=="word"){var v=V.current();return M.context&&M.context.tagName!=v&&N.implicitlyClosed.hasOwnProperty(M.context.tagName)&&B(M),M.context&&M.context.tagName==v||N.matchClosing===!1?(X="tag",we):(X="tag error",Me)}else return N.allowMissingTagName&&y=="endTag"?(X="tag bracket",we(y,V,M)):(X="error",Me)}function we(y,V,M){return y!="endTag"?(X="error",we):(B(M),ke)}function Me(y,V,M){return X="error",we(y,V,M)}function de(y,V,M){if(y=="word")return X="attribute",he;if(y=="endTag"||y=="selfcloseTag"){var v=M.tagName,ee=M.tagStart;return M.tagName=M.tagStart=null,y=="selfcloseTag"||N.autoSelfClosers.hasOwnProperty(v)?ne(M,v):(ne(M,v),M.context=new j(M,v,ee==M.indented)),ke}return X="error",de}function he(y,V,M){return y=="equals"?Te:(N.allowMissing||(X="error"),de(y,V,M))}function Te(y,V,M){return y=="string"?se:y=="word"&&N.allowUnquoted?(X="string",de):(X="error",de(y,V,M))}function se(y,V,M){return y=="string"?se:de(y,V,M)}return{startState:function(y){var V={tokenize:ie,state:ke,indented:y||0,tagName:null,tagStart:null,context:null};return y!=null&&(V.baseIndent=y),V},token:function(y,V){if(!V.tagName&&y.sol()&&(V.indented=y.indentation()),y.eatSpace())return null;H=null;var M=V.tokenize(y,V);return(M||H)&&M!="comment"&&(X=null,V.state=V.state(H||M,y,V),X&&(M=X=="error"?M+" error":X)),M},indent:function(y,V,M){var v=y.context;if(y.tokenize.isInAttribute)return y.tagStart==y.indented?y.stringStartCol+1:y.indented+J;if(v&&v.noIndent)return W.Pass;if(y.tokenize!=ue&&y.tokenize!=ie)return M?M.match(/^(\s*)/)[0].length:0;if(y.tagName)return N.multilineTagIndentPastTag!==!1?y.tagStart+y.tagName.length+2:y.tagStart+J*(N.multilineTagIndentFactor||1);if(N.alignCDATA&&/<!\[CDATA\[/.test(V))return 0;var ee=V&&/^<(\/)?([\w_:\.-]*)/.exec(V);if(ee&&ee[1])for(;v;)if(v.tagName==ee[2]){v=v.prev;break}else if(N.implicitlyClosed.hasOwnProperty(v.tagName))v=v.prev;else break;else if(ee)for(;v;){var I=N.contextGrabbers[v.tagName];if(I&&I.hasOwnProperty(ee[2]))v=v.prev;else break}for(;v&&v.prev&&!v.startOfLine;)v=v.prev;return v?v.indent+J:y.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:N.htmlMode?"html":"xml",helperType:N.htmlMode?"html":"xml",skipAttribute:function(y){y.state==Te&&(y.state=de)},xmlCurrentTag:function(y){return y.tagName?{name:y.tagName,close:y.type=="closeTag"}:null},xmlCurrentContext:function(y){for(var V=[],M=y.context;M;M=M.prev)M.tagName&&V.push(M.tagName);return V.reverse()}}}),W.defineMIME("text/xml","xml"),W.defineMIME("application/xml","xml"),W.mimeModes.hasOwnProperty("text/html")||W.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"3vs6":function(qe,Ie,f){"use strict";var W=f("+L6B"),be=f("2/Rp"),le=f("5Dmo"),Oe=f("3S7+"),ge=f("k1fw"),J=f("miYZ"),N=f("tsqr"),A=f("9og8"),w=f("2qtc"),H=f("kLXV"),X=f("tJVT"),ie=f("WmNS"),ue=f.n(ie),K=f("q1tI"),P=f.n(K),U=f("ttuQ"),j=f.n(U),B=f("ErOA"),ne=f("m3rI"),ke=f("IE1O"),Fe=f("xKgJ"),ce=f("NLgs"),we=f("Ty5D"),Me=f("9kvl"),de=function(Te){var se=Te.virtualSpaces,y=Te.user,V=Te.dispatch,M=Object(K.useState)(!1),v=Object(X.a)(M,2),ee=v[0],I=v[1],O=Object(we.i)(),C=se.virtualSpacesDetails;Object(K.useEffect)(function(){u()},[]);var u=function(){V({type:"virtualSpaces/getVirtualSpacesDetails",payload:{id:O==null?void 0:O.virtual_spacesId}})},l=function(){if(!Object(ce.f)(V))return;H.a.confirm({centered:!0,width:424,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u7533\u8BF7\u52A0\u5165",icon:null,className:"custom-modal-divider",content:P.a.createElement("div",{className:"font14"},"\u786E\u8BA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\u52A0\u5165\u8BE5\u865A\u62DF\u793E\u533A\u5417\uFF1F"),onOk:function(){var oe=Object(A.a)(ue.a.mark(function $(){var q;return ue.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.next=2,Object(B.a)("/api/virtual_classrooms/".concat(O==null?void 0:O.virtual_spacesId,"/apply_become_member.json"),{method:"post"});case 2:q=Y.sent,(q==null?void 0:q.status)!==-1&&(N.b.success(q==null?void 0:q.message),u());case 4:case"end":return Y.stop()}},$)}));function ye(){return oe.apply(this,arguments)}return ye}()})},m=function(){H.a.confirm({centered:!0,width:424,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u7533\u8BF7\u516C\u5F00",icon:null,className:"custom-modal-divider",content:P.a.createElement("div",{className:"font14"},P.a.createElement("p",null,"\u786E\u8BA4\u5411\u5E73\u53F0\u7533\u8BF7\u516C\u5F00\u865A\u62DF\u793E\u533A\u5417\uFF1F"),P.a.createElement("p",null,"\u516C\u5F00\u865A\u62DF\u793E\u533A\u9700\u7ECF\u8FC7\u5E73\u53F0\u6807\u51C6\u5316\u5BA1\u6838\uFF0C\u5BA1\u6838\u5468\u671F\u4E3A1-2\u5929\uFF0C"),P.a.createElement("div",null,"\u516C\u5F00\u7684\u865A\u62DF\u793E\u533A\u5C06\u5BF9\u5E73\u53F0\u6240\u6709\u4EBA\u53EF\u89C1\u3002")),onOk:function(){var oe=Object(A.a)(ue.a.mark(function $(){var q;return ue.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.next=2,Object(B.a)("/api/virtual_classrooms/".concat(O==null?void 0:O.virtual_spacesId,"/apply_public.json"),{method:"post"});case 2:q=Y.sent,(q==null?void 0:q.status)!==-1&&(N.b.success(q==null?void 0:q.message),u());case 4:case"end":return Y.stop()}},$)}));function ye(){return oe.apply(this,arguments)}return ye}()})},x=function(){var xe=Object(A.a)(ue.a.mark(function oe(ye){var $;return ue.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,Object(B.a)("/api/virtual_classrooms/".concat(O==null?void 0:O.virtual_spacesId,".json"),{method:"put",body:ye});case 2:$=z.sent,($==null?void 0:$.status)===0&&(u(),I(!1));case 4:case"end":return z.stop()}},oe)}));return function(ye){return xe.apply(this,arguments)}}(),F=function(){var xe=Object(A.a)(ue.a.mark(function oe(ye){return ue.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:I(Object(ge.a)({},C));case 1:case"end":return q.stop()}},oe)}));return function(ye){return xe.apply(this,arguments)}}(),ae=(C==null?void 0:C.is_member)||Object(Fe.v)();return P.a.createElement("div",{className:j.a.bg,style:{background:"url('".concat(ne.a.IMG_SERVER+(C==null?void 0:C.backbground_image_url),"') no-repeat center center")}},P.a.createElement("aside",null,P.a.createElement("div",null,P.a.createElement("div",{className:j.a.member},P.a.createElement("div",null,P.a.createElement(Oe.a,{title:"\u6210\u5458\u603B\u6570"},P.a.createElement("i",{style:{color:"#FF8B58",fontSize:24},className:"iconfont icon-a-chengyuan1"})),P.a.createElement(Oe.a,{title:"\u6210\u5458\u603B\u6570"},P.a.createElement("span",null,C==null?void 0:C.members_count))),P.a.createElement("div",null,P.a.createElement(Oe.a,{title:"\u8D44\u6E90\u603B\u6570"},P.a.createElement("i",{style:{color:"#07C160",marginLeft:100},className:"iconfont icon-a-ziyuanku1"})),P.a.createElement(Oe.a,{title:"\u8D44\u6E90\u603B\u6570"},P.a.createElement("span",null,C==null?void 0:C.resources_count)))),ae&&P.a.createElement(be.a,{disabled:(C==null?void 0:C.status)!==2,onClick:m,type:"primary"},P.a.createElement("i",{className:"iconfont icon-sheweigongkai2 mr5 font14"}),(C==null?void 0:C.status)===2?"\u7533\u8BF7\u516C\u5F00":(C==null?void 0:C.status)===0?"\u7533\u8BF7\u4E2D":"\u5DF2\u516C\u5F00"),!ae&&P.a.createElement(be.a,{onClick:l,type:"primary"},P.a.createElement("i",{className:"iconfont icon-shenqingjiaru2 mr5 font14"}),"\u7533\u8BF7\u52A0\u5165"))),P.a.createElement(ke.b,{visible:ee,title:"\u7F16\u8F91\u865A\u62DF\u793E\u533A",onCancel:function(){return I(!1)},onOk:x}))};Ie.a=Object(Me.a)(function(he){var Te=he.virtualSpaces,se=he.user;return{virtualSpaces:Te,user:se}})(de)},"500L":function(qe,Ie,f){"use strict";f.d(Ie,"a",function(){return ce});var W=f("+L6B"),be=f("2/Rp"),le=f("2qtc"),Oe=f("kLXV"),ge=f("9og8"),J=f("k1fw"),N=f("miYZ"),A=f("tsqr"),w=f("oBTY"),H=f("tJVT"),X=f("DZo9"),ie=f("8z0m"),ue=f("WmNS"),K=f.n(ue),P=f("q1tI"),U=f.n(P),j=f("m3rI"),B=f("wzkS"),ne=f("y5JW"),ke=f("LtfV"),Fe=ie.a.Dragger;function ce(we){var Me=[];return we&&we.length>0&&(Me=we.map(function(de){return{uid:de.id,id:de.id,name:de.title+ne.c+de.filesize,url:de.url,filesize:de.filesize,status:"done",response:{id:de.id}}})),Me}Ie.b=function(we){var Me=we.value,de=we.onChange,he=we.action,Te=we.className,se=we.maxSize,y=se===void 0?150:se,V=we.title,M=V===void 0?"\u4E0A\u4F20\u9644\u4EF6":V,v=we.showRemoveModal,ee=v===void 0?!1:v,I=we.accept,O=I===void 0?"":I,C=we.additionalText,u=we.isDragger,l=we.number,m=l===void 0?1e3:l,x=we.aloneClear,F=x===void 0?!1:x,ae=we.restrict,xe=ae===void 0?!0:ae,oe=Object(P.useState)(!1),ye=Object(H.a)(oe,2),$=ye[0],q=ye[1],z=Object(P.useState)(Me||[]),Y=Object(H.a)(z,2),p=Y[0],T=Y[1];Object(P.useEffect)(function(){Me&&(T(Object(w.a)(Me)),m===(Me==null?void 0:Me.length)&&q(!0))},[Me]);var b=function(){setTimeout(function(){p.pop(),T(Object(w.a)(p))},500)},re={multiple:!0,disabled:$,accept:O,withCredentials:!0,fileList:p,beforeUpload:function(pe,Ae){var Ce=pe.size/1024/1024;return p.concat(Ae).length>m?(p.pop(),T(Object(w.a)(p)),A.b.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(m,"\u4E2A\u6587\u4EF6")),F?Promise.reject():(b(),!1)):Ce<y?!0:(A.b.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(y,"MB).")),F?Promise.reject():(b(),!1))},action:he||"".concat(j.a.API_SERVER,"/api/attachments.json"),onChange:function(pe){var Ae=Object(w.a)(pe.fileList);Ae.length>=m?q(!0):q(!1),T(Object(w.a)(Ae)),Ae=Ae.map(function(Ce){var _e;if(Ce!=null&&(_e=Ce.response)!==null&&_e!==void 0&&_e.id){var ve;Ce.url="/api/attachments/".concat(Ce==null||((ve=Ce.response)===null||ve===void 0)?void 0:ve.id)}return Ce.name.indexOf(ne.c)===-1&&(Ce.name="".concat(Ce.name).concat(ne.c).concat(Object(ne.a)(Ce.size))),Object(J.a)({},Ce)}),console.log("info:",pe),de(Ae)},onRemove:function(){var G=Object(ge.a)(K.a.mark(function Ae(Ce){var _e;return K.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(_e=function(){var Ue=Object(ge.a)(K.a.mark(function Pe(){var We,ze;return K.a.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:if(We=Ce.response?Ce.response.id:Ce.id,!We){$e.next=8;break}return $e.next=4,Object(B.d)(Ce.response?Ce.response.id:Ce.uid);case 4:return ze=$e.sent,$e.abrupt("return",ze);case 8:return $e.abrupt("return",!0);case 9:case"end":return $e.stop()}},Pe)}));return function(){return Ue.apply(this,arguments)}}(),!ee){Ee.next=5;break}return Ee.abrupt("return",new Promise(function(Ue,Pe){Oe.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:U.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var We=Object(ge.a)(K.a.mark(function Qe(){var $e;return K.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return Se.next=2,_e();case 2:$e=Se.sent,A.b.success("\u5220\u9664\u6210\u529F"),Ue(!0);case 5:case"end":return Se.stop()}},Qe)}));function ze(){return We.apply(this,arguments)}return ze}(),onCancel:function(){return Ue(!1)}})}));case 5:return Ee.next=7,_e();case 7:return Ee.abrupt("return",Ee.sent);case 8:case"end":return Ee.stop()}},Ae)}));function pe(Ae){return G.apply(this,arguments)}return pe}()};function fe(G){G.preventDefault(),G.stopPropagation()}return U.a.createElement("div",{className:"multi-upload ".concat(Te||"")},u&&U.a.createElement(Fe,re,U.a.createElement("p",{className:"ant-upload-drag-icon"},U.a.createElement(ke.a,null)),U.a.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",U.a.createElement("br",null),U.a.createElement("span",{style:{display:xe?"block":"none"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",y,"MB) ")),C),!u&&U.a.createElement(ie.a,re,U.a.createElement(be.a,{disabled:$},M),U.a.createElement("span",{onClick:fe,style:{marginLeft:10,color:"#FA6400",display:xe?"block":"none"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",y,"MB) ")))}},"7ahc":function(qe,Ie,f){"use strict";f.d(Ie,"a",function(){return Fe});var W=f("k1fw"),be=f("0Owb"),le=f("+L6B"),Oe=f("2/Rp"),ge=f("y8nQ"),J=f("Vl3Y"),N=f("tJVT"),A=f("OaEy"),w=f("2fM7"),H=f("q1tI"),X=f.n(H),ie=f("VrN/"),ue=f.n(ie),K=f("p77/"),P=f.n(K),U=f("c5Ni"),j=f.n(U),B=w.a.Option,ne={labelCol:{span:4},wrapperCol:{span:20}},ke={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Ie.b=function(ce){var we=ce.callback,Me=ce.onCancel,de=Object(H.useState)("python"),he=Object(N.a)(de,2),Te=he[0],se=he[1];function y(M){se(ke[M][1])}function V(M){we(M)}return X.a.createElement(J.a,Object(be.a)({},ne,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:V}),X.a.createElement(J.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},X.a.createElement(w.a,{onChange:y},Object.keys(ke).map(function(M){return X.a.createElement(B,{key:M,value:M},ke[M][0])}))),X.a.createElement(J.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},X.a.createElement(Fe,{mode:Te})),X.a.createElement("div",{className:"flex-container flex-end"},X.a.createElement(Oe.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),X.a.createElement(Oe.a,{type:"ghost",onClick:Me},"\u53D6\u6D88")))};function Fe(ce){var we=ce.value,Me=ce.onChange,de=ce.mode,he=ce.options,Te=he===void 0?{}:he,se=Object(H.useRef)(),y=Object(H.useState)(),V=Object(N.a)(y,2),M=V[0],v=V[1];return Object(H.useEffect)(function(){if(M){function ee(I){var O=I.getValue();Me&&Me(O)}return M.on("change",ee),function(){M.off("change",ee)}}},[M,Me]),Object(H.useEffect)(function(){M&&M.setOption("mode",de)},[M,de]),Object(H.useEffect)(function(){M&&((we!==M.getValue()||we==="")&&setTimeout(function(){M.setValue(we||" ")},300))},[M,we]),Object(H.useEffect)(function(){if(se.current&&!M){var ee=ue.a.fromTextArea(se.current,Object(W.a)({mode:de,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Te));v(ee)}},[se.current,M]),X.a.createElement("div",{className:"my-codemirror-container"},X.a.createElement("textarea",{ref:se}))}},"7ixt":function(qe,Ie,f){"use strict";f.d(Ie,"a",function(){return le});var W={adjustX:1,adjustY:1},be=[0,0],le={left:{points:["cr","cl"],overflow:W,offset:[-4,0],targetOffset:be},right:{points:["cl","cr"],overflow:W,offset:[4,0],targetOffset:be},top:{points:["bc","tc"],overflow:W,offset:[0,-4],targetOffset:be},bottom:{points:["tc","bc"],overflow:W,offset:[0,4],targetOffset:be},topLeft:{points:["bl","tl"],overflow:W,offset:[0,-4],targetOffset:be},leftTop:{points:["tr","tl"],overflow:W,offset:[-4,0],targetOffset:be},topRight:{points:["br","tr"],overflow:W,offset:[0,-4],targetOffset:be},rightTop:{points:["tl","tr"],overflow:W,offset:[4,0],targetOffset:be},bottomRight:{points:["tr","br"],overflow:W,offset:[0,4],targetOffset:be},rightBottom:{points:["bl","br"],overflow:W,offset:[4,0],targetOffset:be},bottomLeft:{points:["tl","bl"],overflow:W,offset:[0,4],targetOffset:be},leftBottom:{points:["br","bl"],overflow:W,offset:[-4,0],targetOffset:be}},Oe=le},"8EBN":function(qe,Ie,f){(function(W){W(f("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 be=0;be<W.modeInfo.length;be++){var le=W.modeInfo[be];le.mimes&&(le.mime=le.mimes[0])}W.findModeByMIME=function(Oe){Oe=Oe.toLowerCase();for(var ge=0;ge<W.modeInfo.length;ge++){var J=W.modeInfo[ge];if(J.mime==Oe)return J;if(J.mimes){for(var N=0;N<J.mimes.length;N++)if(J.mimes[N]==Oe)return J}}if(/\+xml$/.test(Oe))return W.findModeByMIME("application/xml");if(/\+json$/.test(Oe))return W.findModeByMIME("application/json")},W.findModeByExtension=function(Oe){Oe=Oe.toLowerCase();for(var ge=0;ge<W.modeInfo.length;ge++){var J=W.modeInfo[ge];if(J.ext){for(var N=0;N<J.ext.length;N++)if(J.ext[N]==Oe)return J}}},W.findModeByFileName=function(Oe){for(var ge=0;ge<W.modeInfo.length;ge++){var J=W.modeInfo[ge];if(J.file&&J.file.test(Oe))return J}var N=Oe.lastIndexOf("."),A=N>-1&&Oe.substring(N+1,Oe.length);if(A)return W.findModeByExtension(A)},W.findModeByName=function(Oe){Oe=Oe.toLowerCase();for(var ge=0;ge<W.modeInfo.length;ge++){var J=W.modeInfo[ge];if(J.name.toLowerCase()==Oe)return J;if(J.alias){for(var N=0;N<J.alias.length;N++)if(J.alias[N].toLowerCase()==Oe)return J}}}})},"9Bee":function(qe,Ie,f){"use strict";var W=f("k1fw"),be=f("tJVT"),le=f("q1tI"),Oe=f.n(le),ge=f("vg9a"),J=f("DlQD"),N=f.n(J),A=f("rUJ1");function w(m,x){var F=m.match(/^(\s+)(?:```)/);if(F===null)return x;var ae=F[1];return x.split(`
|
|
`).map(function(xe){var oe=xe.match(/^\s+/);if(oe===null)return xe;var ye=Object(be.a)(oe,1),$=ye[0];return $.length>=ae.length?xe.slice(ae.length):xe}).join(`
|
|
`)}var H=[],X=["<ul>"],ie=new N.a.Renderer,ue=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function K(){H.length=0,X=["<ul>"]}var P={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function U(m,x,F,ae){if(x>=m.length||m[x].level<=F)return x;var xe=m[x];ae.push("<li><a href='#"+xe.anchor+"'>"+xe.text+"</a>"),x++;var oe=[];return x=U(m,x,xe.level,oe),oe.length>0&&(ae.push("<ul>"),oe.forEach(function(ye){ae.push(ye)}),ae.push("</ul>")),ae.push("</li>"),x=U(m,x,F,ae),x}function j(){return U(H,0,0,X),X.push("</ul>"),X.join("")}var B={heading:function(x){var F=ue.exec(x);if(F)return{type:"heading",raw:F[0],depth:F[1].length,text:F[2]}},fences:function(x){var F=this.rules.block.fences.exec(x);if(F){var ae=F[0],xe=w(ae,F[3]||""),oe=F[2]?F[2].trim():F[2];if(["latex","katex","math"].indexOf(oe)>=0){var ye=Fe(),$=xe;xe=ye,ce[ye]={type:"block",expression:$}}return{type:"code",raw:ae,lang:oe,text:xe}}}},ne=/(?:\${2})([^\n`]+?)(?:\${2})/gi,ke=0,Fe=function(){return"__special_katext_id_".concat(ke++,"__")},ce={};function we(){return ce}function Me(){ke=0,ce={}}function de(m){return m=m.replace(ne,function(x,F){var ae=Fe();return ce[ae]={type:"inline",expression:F},ae}),m}var he=ie.listitem;ie.listitem=function(m){return he(de(m))};var Te=ie.paragraph;ie.paragraph=function(m){return Te(de(m))};var se=ie.tablecell;ie.tablecell=function(m,x){return se(de(m),x)},ie.code=function(m,x,F){var ae=(x||"").match(/\S*/)[0];return ae?["latex","katex","math"].indexOf(ae)>=0?"<p class='editormd-tex'>".concat(m,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(x,'">').concat(F?m:Object(A.escape)(m,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(F?m:Object(A.escape)(m,!0))+"</code></pre>"},ie.heading=function(m,x,F){var ae=this.options.headerPrefix+F.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return H.push({anchor:ae,level:x,text:m}),"<h"+x+' id="'+ae+'">'+m+"</h"+x+">"},N.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),N.a.use({tokenizer:B,renderer:ie});var y=N.a,V=f("SJMd"),M=f("ulZh"),v=f.n(M),ee=f("m3rI"),I=f("Oy/b"),O=f("p5ED"),C=/<pre[^>]*>/g;function u(m){var x=document.createElement("div");return x.innerHTML=m,x.childNodes.length===0?"":x.childNodes[0].nodeValue}var l=Ie.a=function(m){var x=m.value,F=x===void 0?"":x,ae=m.className,xe=m.showTextOnly,oe=m.showLines,ye=m.style,$=ye===void 0?{}:ye,q=m.stylesPrev,z=q===void 0?{}:q,Y=String(F),p=Object(le.useState)(""),T=Object(be.a)(p,2),b=T[0],re=T[1],fe=Object(le.useMemo)(function(){try{var Ce=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,_e=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ve=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Y=Y.replace(Ce,"("+ee.a.API_SERVER+"/api/attachments/").replace(_e,'"'+ee.a.API_SERVER+"/api/attachments/").replace(ve,'"'+ee.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
|
|
`),Y=Y.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
`)}catch(We){}var Ee=y(Y),Ue=we();if(Y.match(/\[TOC\]/)&&(Ee=Ee.replace("<p>[TOC]</p>",j()),K()),Ee=Ee.replace(/(__special_katext_id_\d+__)/g,function(We,ze){var Qe=Ue[ze],$e=Qe.type,Ye=Qe.expression;return Object(I.renderToString)(u(Ye)||"",{displayMode:$e==="block",throwOnError:!1,output:"html"})}),Ee=Ee.replace(/▁/g,"\u2581\u2581\u2581"),Me(),xe){var Pe=document.createElement("div");return Pe.innerHTML=Ee,Pe.innerText}return setTimeout(function(){return Ae()},500),Ee},[Y]),G=Object(le.useRef)();P.WebkitLineClamp=oe,oe&&($=Object(W.a)(Object(W.a)({},$),P));function pe(Ce){var _e=Ce.target;if(_e.tagName.toUpperCase()==="A"){var ve=_e.getAttribute("href");if(ve.indexOf("office")>-1)Ce.preventDefault(),re(ve);else if(ve.startsWith("#")){Ce.preventDefault();var Ee=document.getElementById(ve.replace("#",""));Ee&&Ee.scrollIntoView(!0)}}}var Ae=function(){var _e,ve=(_e=G.current)===null||_e===void 0?void 0:_e.querySelectorAll("video");ve==null||ve.forEach(function(Ee){if(Ee.oncontextmenu=function(){return!1},Ee.src.indexOf(".m3u8")>-1&&!Ee.canPlayType("application/vnd.apple.mpegurl")){if(v.a.isSupported()){var Ue=new v.a;Ue.loadSource(Ee.src),Ue.attachMedia(Ee)}}})};return Object(le.useEffect)(function(){if(G.current&&fe&&(fe.match(C)&&window.PR.prettyPrint()),G.current)return G.current.addEventListener("click",pe),function(){G.current.removeEventListener("click",pe),Me(),K()}},[fe,G.current,pe]),Oe.a.createElement(Oe.a.Fragment,null,Oe.a.createElement("div",{ref:G,style:Object(W.a)({},$),className:"".concat(ae||""," markdown-body "),dangerouslySetInnerHTML:{__html:fe}}),Oe.a.createElement(O.a,{close:!0,data:b,type:b!=null&&b.length?"office":"",style:Object(W.a)({},z),onClose:function(){return re("")}}))}},"9VGf":function(qe,Ie,f){"use strict";f.d(Ie,"a",function(){return le});var W=f("q1tI"),be=f.n(W);function le(Oe,ge){var J=Object(W.useRef)();Object(W.useEffect)(function(){J.current=Oe}),Object(W.useEffect)(function(){function N(){J.current()}if(ge!==null){var A=setInterval(N,ge);return function(){return clearInterval(A)}}},[ge])}},Bd2K:function(qe,Ie,f){(function(W){W(f("VrN/"),f("osHv"))})(function(W){W.defineOption("autoCloseTags",!1,function(w,H,X){if(X!=W.Init&&X&&w.removeKeyMap("autoCloseTags"),!H)return;var ie={name:"autoCloseTags"};(typeof H!="object"||H.whenClosing!==!1)&&(ie["'/'"]=function(ue){return J(ue)}),(typeof H!="object"||H.whenOpening!==!1)&&(ie["'>'"]=function(ue){return Oe(ue)}),w.addKeyMap(ie)});var be=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],le=["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 Oe(w){if(w.getOption("disableInput"))return W.Pass;for(var H=w.listSelections(),X=[],ie=w.getOption("autoCloseTags"),ue=0;ue<H.length;ue++){if(!H[ue].empty())return W.Pass;var K=H[ue].head,P=w.getTokenAt(K),U=W.innerMode(w.getMode(),P.state),j=U.state,B=U.mode.xmlCurrentTag&&U.mode.xmlCurrentTag(j),ne=B&&B.name;if(!ne)return W.Pass;var ke=U.mode.configuration=="html",Fe=typeof ie=="object"&&ie.dontCloseTags||ke&&be,ce=typeof ie=="object"&&ie.indentTags||ke&≤P.end>K.ch&&(ne=ne.slice(0,ne.length-P.end+K.ch));var we=ne.toLowerCase();if(!ne||P.type=="string"&&(P.end!=K.ch||!/[\"\']/.test(P.string.charAt(P.string.length-1))||P.string.length==1)||P.type=="tag"&&B.close||P.string.indexOf("/")==K.ch-P.start-1||Fe&&N(Fe,we)>-1||A(w,U.mode.xmlCurrentContext&&U.mode.xmlCurrentContext(j)||[],ne,K,!0))return W.Pass;var Me=typeof ie=="object"&&ie.emptyTags;if(Me&&N(Me,ne)>-1){X[ue]={text:"/>",newPos:W.Pos(K.line,K.ch+2)};continue}var de=ce&&N(ce,we)>-1;X[ue]={indent:de,text:">"+(de?`
|
|
|
|
`:"")+"</"+ne+">",newPos:de?W.Pos(K.line+1,0):W.Pos(K.line,K.ch+1)}}for(var he=typeof ie=="object"&&ie.dontIndentOnAutoClose,ue=H.length-1;ue>=0;ue--){var Te=X[ue];w.replaceRange(Te.text,H[ue].head,H[ue].anchor,"+insert");var se=w.listSelections().slice(0);se[ue]={head:Te.newPos,anchor:Te.newPos},w.setSelections(se),!he&&Te.indent&&(w.indentLine(Te.newPos.line,null,!0),w.indentLine(Te.newPos.line+1,null,!0))}}function ge(w,H){for(var X=w.listSelections(),ie=[],ue=H?"/":"</",K=w.getOption("autoCloseTags"),P=typeof K=="object"&&K.dontIndentOnSlash,U=0;U<X.length;U++){if(!X[U].empty())return W.Pass;var j=X[U].head,B=w.getTokenAt(j),ne=W.innerMode(w.getMode(),B.state),ke=ne.state;if(H&&(B.type=="string"||B.string.charAt(0)!="<"||B.start!=j.ch-1))return W.Pass;var Fe,ce=ne.mode.name!="xml"&&w.getMode().name=="htmlmixed";if(ce&&ne.mode.name=="javascript")Fe=ue+"script";else if(ce&&ne.mode.name=="css")Fe=ue+"style";else{var we=ne.mode.xmlCurrentContext&&ne.mode.xmlCurrentContext(ke);if(!we||we.length&&A(w,we,we[we.length-1],j))return W.Pass;Fe=ue+we[we.length-1]}w.getLine(j.line).charAt(B.end)!=">"&&(Fe+=">"),ie[U]=Fe}if(w.replaceSelections(ie),X=w.listSelections(),!P)for(var U=0;U<X.length;U++)(U==X.length-1||X[U].head.line<X[U+1].head.line)&&w.indentLine(X[U].head.line)}function J(w){return w.getOption("disableInput")?W.Pass:ge(w,!0)}W.commands.closeTag=function(w){return ge(w)};function N(w,H){if(w.indexOf)return w.indexOf(H);for(var X=0,ie=w.length;X<ie;++X)if(w[X]==H)return X;return-1}function A(w,H,X,ie,ue){if(!W.scanForClosingTag)return!1;var K=Math.min(w.lastLine()+1,ie.line+500),P=W.scanForClosingTag(w,ie,null,K);if(!P||P.tag!=X)return!1;for(var U=ue?1:0,j=H.length-1;j>=0&&H[j]==X;j--)++U;ie=P.to;for(var j=1;j<U;j++){var B=W.scanForClosingTag(w,ie,null,K);if(!B||B.tag!=X)return!1;ie=B.to}return!0}})},BjJ7:function(qe,Ie,f){"use strict";f.d(Ie,"d",function(){return be}),f.d(Ie,"c",function(){return le}),f.d(Ie,"e",function(){return Oe}),f.d(Ie,"b",function(){return ge}),f.d(Ie,"a",function(){return N});var W=f("m3rI");function be(A){var w=!0;if(A.length>0){for(var H=0;H<A.length;H++)if(A[H].compile_success==0||!A[H].compile_success){w=!1;break}}else w=!1;return w}function le(A){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",H=[],X=0;X<A.length;X++){var ie=A[X],ue=w?"".concat(w,"/").concat(ie.name):"".concat(ie.name);H.push({title:ie.name,isLeaf:!(ie.type==="tree"),key:ue})}return H}function Oe(A,w,H){for(var X=0;X<A.length;X++){var ie=A[X];if(ie.key===w){ie.children=H;break}ie.children&&Oe(ie.children,w,H)}return A}function ge(A,w,H){var X;return function(){var ie=this,ue=arguments,K=function(){X=null,H||A.apply(ie,ue)},P=H&&!X;clearTimeout(X),X=setTimeout(K,w),P&&A.apply(ie,ue)}}var J=!0,N=W.a.API_SERVER},"C+DQ":function(qe,Ie,f){},DlQD:function(qe,Ie,f){(function(W,be){qe.exports=be()})(this,function(){"use strict";function W(k,L){for(var R=0;R<L.length;R++){var h=L[R];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(k,h.key,h)}}function be(k,L,R){return L&&W(k.prototype,L),R&&W(k,R),k}function le(k,L){if(!k)return;if(typeof k=="string")return Oe(k,L);var R=Object.prototype.toString.call(k).slice(8,-1);if(R==="Object"&&k.constructor&&(R=k.constructor.name),R==="Map"||R==="Set")return Array.from(k);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return Oe(k,L)}function Oe(k,L){(L==null||L>k.length)&&(L=k.length);for(var R=0,h=new Array(L);R<L;R++)h[R]=k[R];return h}function ge(k,L){var R;if(typeof Symbol=="undefined"||k[Symbol.iterator]==null){if(Array.isArray(k)||(R=le(k))||L&&k&&typeof k.length=="number"){R&&(k=R);var h=0;return function(){return h>=k.length?{done:!0}:{done:!1,value:k[h++]}}}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 R=k[Symbol.iterator](),R.next.bind(R)}function J(k,L){return L={exports:{}},k(L,L.exports),L.exports}var N=J(function(k){function L(){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 R(h){k.exports.defaults=h}k.exports={defaults:L(),getDefaults:L,changeDefaults:R}}),A=N.defaults,w=N.getDefaults,H=N.changeDefaults,X=/[&<>"']/,ie=/[&<>"']/g,ue=/[<>"']|&(?!#?\w+;)/,K=/[<>"']|&(?!#?\w+;)/g,P={"&":"&","<":"<",">":">",'"':""","'":"'"},U=function(L){return P[L]};function j(k,L){if(L){if(X.test(k))return k.replace(ie,U)}else if(ue.test(k))return k.replace(K,U);return k}var B=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ne(k){return k.replace(B,function(L,R){return R=R.toLowerCase(),R==="colon"?":":R.charAt(0)==="#"?R.charAt(1)==="x"?String.fromCharCode(parseInt(R.substring(2),16)):String.fromCharCode(+R.substring(1)):""})}var ke=/(^|[^\[])\^/g;function Fe(k,L){k=k.source||k,L=L||"";var R={replace:function(g,_){return _=_.source||_,_=_.replace(ke,"$1"),k=k.replace(g,_),R},getRegex:function(){return new RegExp(k,L)}};return R}var ce=/[^\w:]/g,we=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Me(k,L,R){if(k){var h;try{h=decodeURIComponent(ne(R)).replace(ce,"").toLowerCase()}catch(g){return null}if(h.indexOf("javascript:")===0||h.indexOf("vbscript:")===0||h.indexOf("data:")===0)return null}L&&!we.test(R)&&(R=y(L,R));try{R=encodeURI(R).replace(/%25/g,"%")}catch(g){return null}return R}var de={},he=/^[^:]+:\/*[^/]*$/,Te=/^([^:]+:)[\s\S]*$/,se=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(k,L){de[" "+k]||(he.test(k)?de[" "+k]=k+"/":de[" "+k]=ee(k,"/",!0)),k=de[" "+k];var R=k.indexOf(":")===-1;return L.substring(0,2)==="//"?R?L:k.replace(Te,"$1")+L:L.charAt(0)==="/"?R?L:k.replace(se,"$1")+L:k+L}var V={exec:function(){}};function M(k){for(var L=1,R,h;L<arguments.length;L++){R=arguments[L];for(h in R)Object.prototype.hasOwnProperty.call(R,h)&&(k[h]=R[h])}return k}function v(k,L){var R=k.replace(/\|/g,function(_,E,Q){for(var me=!1,je=E;--je>=0&&Q[je]==="\\";)me=!me;return me?"|":" |"}),h=R.split(/ \|/),g=0;if(h.length>L)h.splice(L);else for(;h.length<L;)h.push("");for(;g<h.length;g++)h[g]=h[g].trim().replace(/\\\|/g,"|");return h}function ee(k,L,R){var h=k.length;if(h===0)return"";for(var g=0;g<h;){var _=k.charAt(h-g-1);if(_===L&&!R)g++;else if(_!==L&&R)g++;else break}return k.substr(0,h-g)}function I(k,L){if(k.indexOf(L[1])===-1)return-1;for(var R=k.length,h=0,g=0;g<R;g++)if(k[g]==="\\")g++;else if(k[g]===L[0])h++;else if(k[g]===L[1]&&(h--,h<0))return g;return-1}function O(k){k&&k.sanitize&&!k.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 C={escape:j,unescape:ne,edit:Fe,cleanUrl:Me,resolveUrl:y,noopTest:V,merge:M,splitCells:v,rtrim:ee,findClosingBracket:I,checkSanitizeDeprecation:O},u=N.defaults,l=C.rtrim,m=C.splitCells,x=C.escape,F=C.findClosingBracket;function ae(k,L,R){var h=L.href,g=L.title?x(L.title):null,_=k[1].replace(/\\([\[\]])/g,"$1");return k[0].charAt(0)!=="!"?{type:"link",raw:R,href:h,title:g,text:_}:{type:"image",raw:R,href:h,title:g,text:x(_)}}function xe(k,L){var R=k.match(/^(\s+)(?:```)/);if(R===null)return L;var h=R[1];return L.split(`
|
|
`).map(function(g){var _=g.match(/^\s+/);if(_===null)return g;var E=_[0];return E.length>=h.length?g.slice(h.length):g}).join(`
|
|
`)}var oe=function(){function k(R){this.options=R||u}var L=k.prototype;return L.space=function(h){var g=this.rules.block.newline.exec(h);if(g)return g[0].length>1?{type:"space",raw:g[0]}:{raw:`
|
|
`}},L.code=function(h,g){var _=this.rules.block.code.exec(h);if(_){var E=g[g.length-1];if(E&&E.type==="paragraph")return{raw:_[0],text:_[0].trimRight()};var Q=_[0].replace(/^ {4}/gm,"");return{type:"code",raw:_[0],codeBlockStyle:"indented",text:this.options.pedantic?Q:l(Q,`
|
|
`)}}},L.fences=function(h){var g=this.rules.block.fences.exec(h);if(g){var _=g[0],E=xe(_,g[3]||"");return{type:"code",raw:_,lang:g[2]?g[2].trim():g[2],text:E}}},L.heading=function(h){var g=this.rules.block.heading.exec(h);if(g)return{type:"heading",raw:g[0],depth:g[1].length,text:g[2]}},L.nptable=function(h){var g=this.rules.block.nptable.exec(h);if(g){var _={type:"table",header:m(g[1].replace(/^ *| *\| *$/g,"")),align:g[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:g[3]?g[3].replace(/\n$/,"").split(`
|
|
`):[],raw:g[0]};if(_.header.length===_.align.length){var E=_.align.length,Q;for(Q=0;Q<E;Q++)/^ *-+: *$/.test(_.align[Q])?_.align[Q]="right":/^ *:-+: *$/.test(_.align[Q])?_.align[Q]="center":/^ *:-+ *$/.test(_.align[Q])?_.align[Q]="left":_.align[Q]=null;for(E=_.cells.length,Q=0;Q<E;Q++)_.cells[Q]=m(_.cells[Q],_.header.length);return _}}},L.hr=function(h){var g=this.rules.block.hr.exec(h);if(g)return{type:"hr",raw:g[0]}},L.blockquote=function(h){var g=this.rules.block.blockquote.exec(h);if(g){var _=g[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:g[0],text:_}}},L.list=function(h){var g=this.rules.block.list.exec(h);if(g){for(var _=g[0],E=g[2],Q=E.length>1,me=E[E.length-1]===")",je={type:"list",raw:_,ordered:Q,start:Q?+E.slice(0,-1):"",loose:!1,items:[]},rt=g[0].match(this.rules.block.item),ft=!1,ot,Pt,pt,lt,Bt,bt,Vt,Wt=rt.length,mt=0;mt<Wt;mt++)ot=rt[mt],_=ot,Pt=ot.length,ot=ot.replace(/^ *([*+-]|\d+[.)]) */,""),~ot.indexOf(`
|
|
`)&&(Pt-=ot.length,ot=this.options.pedantic?ot.replace(/^ {1,4}/gm,""):ot.replace(new RegExp("^ {1,"+Pt+"}","gm"),"")),mt!==Wt-1&&(pt=this.rules.block.bullet.exec(rt[mt+1])[0],(Q?pt.length===1||!me&&pt[pt.length-1]===")":pt.length>1||this.options.smartLists&&pt!==E)&&(lt=rt.slice(mt+1).join(`
|
|
`),je.raw=je.raw.substring(0,je.raw.length-lt.length),mt=Wt-1)),Bt=ft||/\n\n(?!\s*$)/.test(ot),mt!==Wt-1&&(ft=ot.charAt(ot.length-1)===`
|
|
`,Bt||(Bt=ft)),Bt&&(je.loose=!0),bt=/^\[[ xX]\] /.test(ot),Vt=void 0,bt&&(Vt=ot[1]!==" ",ot=ot.replace(/^\[[ xX]\] +/,"")),je.items.push({type:"list_item",raw:_,task:bt,checked:Vt,loose:Bt,text:ot});return je}},L.html=function(h){var g=this.rules.block.html.exec(h);if(g)return{type:this.options.sanitize?"paragraph":"html",raw:g[0],pre:!this.options.sanitizer&&(g[1]==="pre"||g[1]==="script"||g[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(g[0]):x(g[0]):g[0]}},L.def=function(h){var g=this.rules.block.def.exec(h);if(g){g[3]&&(g[3]=g[3].substring(1,g[3].length-1));var _=g[1].toLowerCase().replace(/\s+/g," ");return{tag:_,raw:g[0],href:g[2],title:g[3]}}},L.table=function(h){var g=this.rules.block.table.exec(h);if(g){var _={type:"table",header:m(g[1].replace(/^ *| *\| *$/g,"")),align:g[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:g[3]?g[3].replace(/\n$/,"").split(`
|
|
`):[]};if(_.header.length===_.align.length){_.raw=g[0];var E=_.align.length,Q;for(Q=0;Q<E;Q++)/^ *-+: *$/.test(_.align[Q])?_.align[Q]="right":/^ *:-+: *$/.test(_.align[Q])?_.align[Q]="center":/^ *:-+ *$/.test(_.align[Q])?_.align[Q]="left":_.align[Q]=null;for(E=_.cells.length,Q=0;Q<E;Q++)_.cells[Q]=m(_.cells[Q].replace(/^ *\| *| *\| *$/g,""),_.header.length);return _}}},L.lheading=function(h){var g=this.rules.block.lheading.exec(h);if(g)return{type:"heading",raw:g[0],depth:g[2].charAt(0)==="="?1:2,text:g[1]}},L.paragraph=function(h){var g=this.rules.block.paragraph.exec(h);if(g)return{type:"paragraph",raw:g[0],text:g[1].charAt(g[1].length-1)===`
|
|
`?g[1].slice(0,-1):g[1]}},L.text=function(h,g){var _=this.rules.block.text.exec(h);if(_){var E=g[g.length-1];return E&&E.type==="text"?{raw:_[0],text:_[0]}:{type:"text",raw:_[0],text:_[0]}}},L.escape=function(h){var g=this.rules.inline.escape.exec(h);if(g)return{type:"escape",raw:g[0],text:x(g[1])}},L.tag=function(h,g,_){var E=this.rules.inline.tag.exec(h);if(E)return!g&&/^<a /i.test(E[0])?g=!0:g&&/^<\/a>/i.test(E[0])&&(g=!1),!_&&/^<(pre|code|kbd|script)(\s|>)/i.test(E[0])?_=!0:_&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(E[0])&&(_=!1),{type:this.options.sanitize?"text":"html",raw:E[0],inLink:g,inRawBlock:_,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(E[0]):x(E[0]):E[0]}},L.link=function(h){var g=this.rules.inline.link.exec(h);if(g){var _=F(g[2],"()");if(_>-1){var E=g[0].indexOf("!")===0?5:4,Q=E+g[1].length+_;g[2]=g[2].substring(0,_),g[0]=g[0].substring(0,Q).trim(),g[3]=""}var me=g[2],je="";if(this.options.pedantic){var rt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(me);rt?(me=rt[1],je=rt[3]):je=""}else je=g[3]?g[3].slice(1,-1):"";me=me.trim().replace(/^<([\s\S]*)>$/,"$1");var ft=ae(g,{href:me&&me.replace(this.rules.inline._escapes,"$1"),title:je&&je.replace(this.rules.inline._escapes,"$1")},g[0]);return ft}},L.reflink=function(h,g){var _;if((_=this.rules.inline.reflink.exec(h))||(_=this.rules.inline.nolink.exec(h))){var E=(_[2]||_[1]).replace(/\s+/g," ");if(E=g[E.toLowerCase()],!E||!E.href){var Q=_[0].charAt(0);return{type:"text",raw:Q,text:Q}}var me=ae(_,E,_[0]);return me}},L.strong=function(h,g,_){_===void 0&&(_="");var E=this.rules.inline.strong.start.exec(h);if(E&&(!E[1]||E[1]&&(_===""||this.rules.inline.punctuation.exec(_)))){g=g.slice(-1*h.length);var Q=E[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Q.lastIndex=0;for(var me;(E=Q.exec(g))!=null;)if(me=this.rules.inline.strong.middle.exec(g.slice(0,E.index+3)),me)return{type:"strong",raw:h.slice(0,me[0].length),text:h.slice(2,me[0].length-2)}}},L.em=function(h,g,_){_===void 0&&(_="");var E=this.rules.inline.em.start.exec(h);if(E&&(!E[1]||E[1]&&(_===""||this.rules.inline.punctuation.exec(_)))){g=g.slice(-1*h.length);var Q=E[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Q.lastIndex=0;for(var me;(E=Q.exec(g))!=null;)if(me=this.rules.inline.em.middle.exec(g.slice(0,E.index+2)),me)return{type:"em",raw:h.slice(0,me[0].length),text:h.slice(1,me[0].length-1)}}},L.codespan=function(h){var g=this.rules.inline.code.exec(h);if(g){var _=g[2].replace(/\n/g," "),E=/[^ ]/.test(_),Q=_.startsWith(" ")&&_.endsWith(" ");return E&&Q&&(_=_.substring(1,_.length-1)),_=x(_,!0),{type:"codespan",raw:g[0],text:_}}},L.br=function(h){var g=this.rules.inline.br.exec(h);if(g)return{type:"br",raw:g[0]}},L.del=function(h){var g=this.rules.inline.del.exec(h);if(g)return{type:"del",raw:g[0],text:g[1]}},L.autolink=function(h,g){var _=this.rules.inline.autolink.exec(h);if(_){var E,Q;return _[2]==="@"?(E=x(this.options.mangle?g(_[1]):_[1]),Q="mailto:"+E):(E=x(_[1]),Q=E),{type:"link",raw:_[0],text:E,href:Q,tokens:[{type:"text",raw:E,text:E}]}}},L.url=function(h,g){var _;if(_=this.rules.inline.url.exec(h)){var E,Q;if(_[2]==="@")E=x(this.options.mangle?g(_[0]):_[0]),Q="mailto:"+E;else{var me;do me=_[0],_[0]=this.rules.inline._backpedal.exec(_[0])[0];while(me!==_[0]);E=x(_[0]),_[1]==="www."?Q="http://"+E:Q=E}return{type:"link",raw:_[0],text:E,href:Q,tokens:[{type:"text",raw:E,text:E}]}}},L.inlineText=function(h,g,_){var E=this.rules.inline.text.exec(h);if(E){var Q;return g?Q=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(E[0]):x(E[0]):E[0]:Q=x(this.options.smartypants?_(E[0]):E[0]),{type:"text",raw:E[0],text:Q}}},k}(),ye=C.noopTest,$=C.edit,q=C.merge,z={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:ye,table:ye,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};z._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,z._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,z.def=$(z.def).replace("label",z._label).replace("title",z._title).getRegex(),z.bullet=/(?:[*+-]|\d{1,9}[.)])/,z.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,z.item=$(z.item,"gm").replace(/bull/g,z.bullet).getRegex(),z.list=$(z.list).replace(/bull/g,z.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+z.def.source+")").getRegex(),z._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",z._comment=/<!--(?!-?>)[\s\S]*?-->/,z.html=$(z.html,"i").replace("comment",z._comment).replace("tag",z._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),z.paragraph=$(z._paragraph).replace("hr",z.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",z._tag).getRegex(),z.blockquote=$(z.blockquote).replace("paragraph",z.paragraph).getRegex(),z.normal=q({},z),z.gfm=q({},z.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*|$)"}),z.gfm.nptable=$(z.gfm.nptable).replace("hr",z.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",z._tag).getRegex(),z.gfm.table=$(z.gfm.table).replace("hr",z.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",z._tag).getRegex(),z.pedantic=q({},z.normal,{html:$(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",z._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:ye,paragraph:$(z.normal._paragraph).replace("hr",z.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",z.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Y={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ye,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:ye,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Y._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Y.punctuation=$(Y.punctuation).replace(/punctuation/g,Y._punctuation).getRegex(),Y._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Y._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Y.em.start=$(Y.em.start).replace(/punctuation/g,Y._punctuation).getRegex(),Y.em.middle=$(Y.em.middle).replace(/punctuation/g,Y._punctuation).replace(/overlapSkip/g,Y._overlapSkip).getRegex(),Y.em.endAst=$(Y.em.endAst,"g").replace(/punctuation/g,Y._punctuation).getRegex(),Y.em.endUnd=$(Y.em.endUnd,"g").replace(/punctuation/g,Y._punctuation).getRegex(),Y.strong.start=$(Y.strong.start).replace(/punctuation/g,Y._punctuation).getRegex(),Y.strong.middle=$(Y.strong.middle).replace(/punctuation/g,Y._punctuation).replace(/blockSkip/g,Y._blockSkip).getRegex(),Y.strong.endAst=$(Y.strong.endAst,"g").replace(/punctuation/g,Y._punctuation).getRegex(),Y.strong.endUnd=$(Y.strong.endUnd,"g").replace(/punctuation/g,Y._punctuation).getRegex(),Y.blockSkip=$(Y._blockSkip,"g").getRegex(),Y.overlapSkip=$(Y._overlapSkip,"g").getRegex(),Y._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Y._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Y._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])?)+(?![-_])/,Y.autolink=$(Y.autolink).replace("scheme",Y._scheme).replace("email",Y._email).getRegex(),Y._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Y.tag=$(Y.tag).replace("comment",z._comment).replace("attribute",Y._attribute).getRegex(),Y._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Y._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Y._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Y.link=$(Y.link).replace("label",Y._label).replace("href",Y._href).replace("title",Y._title).getRegex(),Y.reflink=$(Y.reflink).replace("label",Y._label).getRegex(),Y.reflinkSearch=$(Y.reflinkSearch,"g").replace("reflink",Y.reflink).replace("nolink",Y.nolink).getRegex(),Y.normal=q({},Y),Y.pedantic=q({},Y.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:$(/^!?\[(label)\]\((.*?)\)/).replace("label",Y._label).getRegex(),reflink:$(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y._label).getRegex()}),Y.gfm=q({},Y.normal,{escape:$(Y.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),Y.gfm.url=$(Y.gfm.url,"i").replace("email",Y.gfm._extended_email).getRegex(),Y.breaks=q({},Y.gfm,{br:$(Y.br).replace("{2,}","*").getRegex(),text:$(Y.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var p={block:z,inline:Y},T=N.defaults,b=p.block,re=p.inline;function fe(k){return k.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 G(k){var L="",R,h,g=k.length;for(R=0;R<g;R++)h=k.charCodeAt(R),Math.random()>.5&&(h="x"+h.toString(16)),L+="&#"+h+";";return L}var pe=function(){function k(R){this.tokens=[],this.tokens.links=Object.create(null),this.options=R||T,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var h={block:b.normal,inline:re.normal};this.options.pedantic?(h.block=b.pedantic,h.inline=re.pedantic):this.options.gfm&&(h.block=b.gfm,this.options.breaks?h.inline=re.breaks:h.inline=re.gfm),this.tokenizer.rules=h}k.lex=function(h,g){var _=new k(g);return _.lex(h)};var L=k.prototype;return L.lex=function(h){return h=h.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(h,this.tokens,!0),this.inline(this.tokens),this.tokens},L.blockTokens=function(h,g,_){g===void 0&&(g=[]),_===void 0&&(_=!0),h=h.replace(/^ +$/gm,"");for(var E,Q,me,je;h;){if(E=this.tokenizer.space(h)){h=h.substring(E.raw.length),E.type&&g.push(E);continue}if(E=this.tokenizer.code(h,g)){h=h.substring(E.raw.length),E.type?g.push(E):(je=g[g.length-1],je.raw+=`
|
|
`+E.raw,je.text+=`
|
|
`+E.text);continue}if(E=this.tokenizer.fences(h)){h=h.substring(E.raw.length),g.push(E);continue}if(E=this.tokenizer.heading(h)){h=h.substring(E.raw.length),g.push(E);continue}if(E=this.tokenizer.nptable(h)){h=h.substring(E.raw.length),g.push(E);continue}if(E=this.tokenizer.hr(h)){h=h.substring(E.raw.length),g.push(E);continue}if(E=this.tokenizer.blockquote(h)){h=h.substring(E.raw.length),E.tokens=this.blockTokens(E.text,[],_),g.push(E);continue}if(E=this.tokenizer.list(h)){for(h=h.substring(E.raw.length),me=E.items.length,Q=0;Q<me;Q++)E.items[Q].tokens=this.blockTokens(E.items[Q].text,[],!1);g.push(E);continue}if(E=this.tokenizer.html(h)){h=h.substring(E.raw.length),g.push(E);continue}if(_&&(E=this.tokenizer.def(h))){h=h.substring(E.raw.length),this.tokens.links[E.tag]||(this.tokens.links[E.tag]={href:E.href,title:E.title});continue}if(E=this.tokenizer.table(h)){h=h.substring(E.raw.length),g.push(E);continue}if(E=this.tokenizer.lheading(h)){h=h.substring(E.raw.length),g.push(E);continue}if(_&&(E=this.tokenizer.paragraph(h))){h=h.substring(E.raw.length),g.push(E);continue}if(E=this.tokenizer.text(h,g)){h=h.substring(E.raw.length),E.type?g.push(E):(je=g[g.length-1],je.raw+=`
|
|
`+E.raw,je.text+=`
|
|
`+E.text);continue}if(h){var rt="Infinite loop on byte: "+h.charCodeAt(0);if(this.options.silent){console.error(rt);break}else throw new Error(rt)}}return g},L.inline=function(h){var g,_,E,Q,me,je,rt=h.length;for(g=0;g<rt;g++){je=h[g];switch(je.type){case"paragraph":case"text":case"heading":{je.tokens=[],this.inlineTokens(je.text,je.tokens);break}case"table":{for(je.tokens={header:[],cells:[]},Q=je.header.length,_=0;_<Q;_++)je.tokens.header[_]=[],this.inlineTokens(je.header[_],je.tokens.header[_]);for(Q=je.cells.length,_=0;_<Q;_++)for(me=je.cells[_],je.tokens.cells[_]=[],E=0;E<me.length;E++)je.tokens.cells[_][E]=[],this.inlineTokens(me[E],je.tokens.cells[_][E]);break}case"blockquote":{this.inline(je.tokens);break}case"list":{for(Q=je.items.length,_=0;_<Q;_++)this.inline(je.items[_].tokens);break}}}return h},L.inlineTokens=function(h,g,_,E,Q){g===void 0&&(g=[]),_===void 0&&(_=!1),E===void 0&&(E=!1),Q===void 0&&(Q="");var me,je=h,rt;if(this.tokens.links){var ft=Object.keys(this.tokens.links);if(ft.length>0)for(;(rt=this.tokenizer.rules.inline.reflinkSearch.exec(je))!=null;)ft.includes(rt[0].slice(rt[0].lastIndexOf("[")+1,-1))&&(je=je.slice(0,rt.index)+"["+"a".repeat(rt[0].length-2)+"]"+je.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(rt=this.tokenizer.rules.inline.blockSkip.exec(je))!=null;)je=je.slice(0,rt.index)+"["+"a".repeat(rt[0].length-2)+"]"+je.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;h;){if(me=this.tokenizer.escape(h)){h=h.substring(me.raw.length),g.push(me);continue}if(me=this.tokenizer.tag(h,_,E)){h=h.substring(me.raw.length),_=me.inLink,E=me.inRawBlock,g.push(me);continue}if(me=this.tokenizer.link(h)){h=h.substring(me.raw.length),me.type==="link"&&(me.tokens=this.inlineTokens(me.text,[],!0,E)),g.push(me);continue}if(me=this.tokenizer.reflink(h,this.tokens.links)){h=h.substring(me.raw.length),me.type==="link"&&(me.tokens=this.inlineTokens(me.text,[],!0,E)),g.push(me);continue}if(me=this.tokenizer.strong(h,je,Q)){h=h.substring(me.raw.length),me.tokens=this.inlineTokens(me.text,[],_,E),g.push(me);continue}if(me=this.tokenizer.em(h,je,Q)){h=h.substring(me.raw.length),me.tokens=this.inlineTokens(me.text,[],_,E),g.push(me);continue}if(me=this.tokenizer.codespan(h)){h=h.substring(me.raw.length),g.push(me);continue}if(me=this.tokenizer.br(h)){h=h.substring(me.raw.length),g.push(me);continue}if(me=this.tokenizer.del(h)){h=h.substring(me.raw.length),me.tokens=this.inlineTokens(me.text,[],_,E),g.push(me);continue}if(me=this.tokenizer.autolink(h,G)){h=h.substring(me.raw.length),g.push(me);continue}if(!_&&(me=this.tokenizer.url(h,G))){h=h.substring(me.raw.length),g.push(me);continue}if(me=this.tokenizer.inlineText(h,E,fe)){h=h.substring(me.raw.length),Q=me.raw.slice(-1),g.push(me);continue}if(h){var ot="Infinite loop on byte: "+h.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return g},be(k,null,[{key:"rules",get:function(){return{block:b,inline:re}}}]),k}(),Ae=N.defaults,Ce=C.cleanUrl,_e=C.escape,ve=function(){function k(R){this.options=R||Ae}var L=k.prototype;return L.code=function(h,g,_){var E=(g||"").match(/\S*/)[0];if(this.options.highlight){var Q=this.options.highlight(h,E);Q!=null&&Q!==h&&(_=!0,h=Q)}return E?'<pre><code class="'+this.options.langPrefix+_e(E,!0)+'">'+(_?h:_e(h,!0))+`</code></pre>
|
|
`:"<pre><code>"+(_?h:_e(h,!0))+`</code></pre>
|
|
`},L.blockquote=function(h){return`<blockquote>
|
|
`+h+`</blockquote>
|
|
`},L.html=function(h){return h},L.heading=function(h,g,_,E){return this.options.headerIds?"<h"+g+' id="'+this.options.headerPrefix+E.slug(_)+'">'+h+"</h"+g+`>
|
|
`:"<h"+g+">"+h+"</h"+g+`>
|
|
`},L.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},L.list=function(h,g,_){var E=g?"ol":"ul",Q=g&&_!==1?' start="'+_+'"':"";return"<"+E+Q+`>
|
|
`+h+"</"+E+`>
|
|
`},L.listitem=function(h){return"<li>"+h+`</li>
|
|
`},L.checkbox=function(h){return"<input "+(h?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},L.paragraph=function(h){return"<p>"+h+`</p>
|
|
`},L.table=function(h,g){return g&&(g="<tbody>"+g+"</tbody>"),`<table>
|
|
<thead>
|
|
`+h+`</thead>
|
|
`+g+`</table>
|
|
`},L.tablerow=function(h){return`<tr>
|
|
`+h+`</tr>
|
|
`},L.tablecell=function(h,g){var _=g.header?"th":"td",E=g.align?"<"+_+' align="'+g.align+'">':"<"+_+">";return E+h+"</"+_+`>
|
|
`},L.strong=function(h){return"<strong>"+h+"</strong>"},L.em=function(h){return"<em>"+h+"</em>"},L.codespan=function(h){return"<code>"+h+"</code>"},L.br=function(){return this.options.xhtml?"<br/>":"<br>"},L.del=function(h){return"<del>"+h+"</del>"},L.link=function(h,g,_){if(h=Ce(this.options.sanitize,this.options.baseUrl,h),h===null)return _;var E='<a href="'+_e(h)+'"';return g&&(E+=' title="'+g+'"'),E+=">"+_+"</a>",E},L.image=function(h,g,_){if(h=Ce(this.options.sanitize,this.options.baseUrl,h),h===null)return _;var E='<img src="'+h+'" alt="'+_+'"';return g&&(E+=' title="'+g+'"'),E+=this.options.xhtml?"/>":">",E},L.text=function(h){return h},k}(),Ee=function(){function k(){}var L=k.prototype;return L.strong=function(h){return h},L.em=function(h){return h},L.codespan=function(h){return h},L.del=function(h){return h},L.html=function(h){return h},L.text=function(h){return h},L.link=function(h,g,_){return""+_},L.image=function(h,g,_){return""+_},L.br=function(){return""},k}(),Ue=function(){function k(){this.seen={}}var L=k.prototype;return L.slug=function(h){var g=h.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(g)){var _=g;do this.seen[_]++,g=_+"-"+this.seen[_];while(this.seen.hasOwnProperty(g))}return this.seen[g]=0,g},k}(),Pe=N.defaults,We=C.unescape,ze=function(){function k(R){this.options=R||Pe,this.options.renderer=this.options.renderer||new ve,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ee,this.slugger=new Ue}k.parse=function(h,g){var _=new k(g);return _.parse(h)};var L=k.prototype;return L.parse=function(h,g){g===void 0&&(g=!0);var _="",E,Q,me,je,rt,ft,ot,Pt,pt,lt,Bt,bt,Vt,Wt,mt,wn,Xn,un,Cn=h.length;for(E=0;E<Cn;E++){lt=h[E];switch(lt.type){case"space":continue;case"hr":{_+=this.renderer.hr();continue}case"heading":{_+=this.renderer.heading(this.parseInline(lt.tokens),lt.depth,We(this.parseInline(lt.tokens,this.textRenderer)),this.slugger);continue}case"code":{_+=this.renderer.code(lt.text,lt.lang,lt.escaped);continue}case"table":{for(Pt="",ot="",je=lt.header.length,Q=0;Q<je;Q++)ot+=this.renderer.tablecell(this.parseInline(lt.tokens.header[Q]),{header:!0,align:lt.align[Q]});for(Pt+=this.renderer.tablerow(ot),pt="",je=lt.cells.length,Q=0;Q<je;Q++){for(ft=lt.tokens.cells[Q],ot="",rt=ft.length,me=0;me<rt;me++)ot+=this.renderer.tablecell(this.parseInline(ft[me]),{header:!1,align:lt.align[me]});pt+=this.renderer.tablerow(ot)}_+=this.renderer.table(Pt,pt);continue}case"blockquote":{pt=this.parse(lt.tokens),_+=this.renderer.blockquote(pt);continue}case"list":{for(Bt=lt.ordered,bt=lt.start,Vt=lt.loose,je=lt.items.length,pt="",Q=0;Q<je;Q++)mt=lt.items[Q],wn=mt.checked,Xn=mt.task,Wt="",mt.task&&(un=this.renderer.checkbox(wn),Vt?mt.tokens.length>0&&mt.tokens[0].type==="text"?(mt.tokens[0].text=un+" "+mt.tokens[0].text,mt.tokens[0].tokens&&mt.tokens[0].tokens.length>0&&mt.tokens[0].tokens[0].type==="text"&&(mt.tokens[0].tokens[0].text=un+" "+mt.tokens[0].tokens[0].text)):mt.tokens.unshift({type:"text",text:un}):Wt+=un),Wt+=this.parse(mt.tokens,Vt),pt+=this.renderer.listitem(Wt,Xn,wn);_+=this.renderer.list(pt,Bt,bt);continue}case"html":{_+=this.renderer.html(lt.text);continue}case"paragraph":{_+=this.renderer.paragraph(this.parseInline(lt.tokens));continue}case"text":{for(pt=lt.tokens?this.parseInline(lt.tokens):lt.text;E+1<Cn&&h[E+1].type==="text";)lt=h[++E],pt+=`
|
|
`+(lt.tokens?this.parseInline(lt.tokens):lt.text);_+=g?this.renderer.paragraph(pt):pt;continue}default:{var pn='Token with "'+lt.type+'" type was not found.';if(this.options.silent){console.error(pn);return}else throw new Error(pn)}}}return _},L.parseInline=function(h,g){g=g||this.renderer;var _="",E,Q,me=h.length;for(E=0;E<me;E++){Q=h[E];switch(Q.type){case"escape":{_+=g.text(Q.text);break}case"html":{_+=g.html(Q.text);break}case"link":{_+=g.link(Q.href,Q.title,this.parseInline(Q.tokens,g));break}case"image":{_+=g.image(Q.href,Q.title,Q.text);break}case"strong":{_+=g.strong(this.parseInline(Q.tokens,g));break}case"em":{_+=g.em(this.parseInline(Q.tokens,g));break}case"codespan":{_+=g.codespan(Q.text);break}case"br":{_+=g.br();break}case"del":{_+=g.del(this.parseInline(Q.tokens,g));break}case"text":{_+=g.text(Q.text);break}default:{var je='Token with "'+Q.type+'" type was not found.';if(this.options.silent){console.error(je);return}else throw new Error(je)}}}return _},k}(),Qe=C.merge,$e=C.checkSanitizeDeprecation,Ye=C.escape,Se=N.getDefaults,it=N.changeDefaults,Je=N.defaults;function De(k,L,R){if(typeof k=="undefined"||k===null)throw new Error("marked(): input parameter is undefined or null");if(typeof k!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(k)+", string expected");if(typeof L=="function"&&(R=L,L=null),L=Qe({},De.defaults,L||{}),$e(L),R){var h=L.highlight,g;try{g=pe.lex(k,L)}catch(me){return R(me)}var _=function(je){var rt;if(!je)try{rt=ze.parse(g,L)}catch(ft){je=ft}return L.highlight=h,je?R(je):R(null,rt)};if(!h||h.length<3)return _();if(delete L.highlight,!g.length)return _();var E=0;De.walkTokens(g,function(me){me.type==="code"&&(E++,setTimeout(function(){h(me.text,me.lang,function(je,rt){if(je)return _(je);rt!=null&&rt!==me.text&&(me.text=rt,me.escaped=!0),E--,E===0&&_()})},0))}),E===0&&_();return}try{var Q=pe.lex(k,L);return L.walkTokens&&De.walkTokens(Q,L.walkTokens),ze.parse(Q,L)}catch(me){if(me.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,L.silent)return"<p>An error occurred:</p><pre>"+Ye(me.message+"",!0)+"</pre>";throw me}}De.options=De.setOptions=function(k){return Qe(De.defaults,k),it(De.defaults),De},De.getDefaults=Se,De.defaults=Je,De.use=function(k){var L=Qe({},k);if(k.renderer&&function(){var h=De.defaults.renderer||new ve,g=function(Q){var me=h[Q];h[Q]=function(){for(var je=arguments.length,rt=new Array(je),ft=0;ft<je;ft++)rt[ft]=arguments[ft];var ot=k.renderer[Q].apply(h,rt);return ot===!1&&(ot=me.apply(h,rt)),ot}};for(var _ in k.renderer)g(_);L.renderer=h}(),k.tokenizer&&function(){var h=De.defaults.tokenizer||new oe,g=function(Q){var me=h[Q];h[Q]=function(){for(var je=arguments.length,rt=new Array(je),ft=0;ft<je;ft++)rt[ft]=arguments[ft];var ot=k.tokenizer[Q].apply(h,rt);return ot===!1&&(ot=me.apply(h,rt)),ot}};for(var _ in k.tokenizer)g(_);L.tokenizer=h}(),k.walkTokens){var R=De.defaults.walkTokens;L.walkTokens=function(h){k.walkTokens(h),R&&R(h)}}De.setOptions(L)},De.walkTokens=function(k,L){for(var R=ge(k),h;!(h=R()).done;){var g=h.value;L(g);switch(g.type){case"table":{for(var _=ge(g.tokens.header),E;!(E=_()).done;){var Q=E.value;De.walkTokens(Q,L)}for(var me=ge(g.tokens.cells),je;!(je=me()).done;)for(var rt=je.value,ft=ge(rt),ot;!(ot=ft()).done;){var Pt=ot.value;De.walkTokens(Pt,L)}break}case"list":{De.walkTokens(g.items,L);break}default:g.tokens&&De.walkTokens(g.tokens,L)}}},De.Parser=ze,De.parser=ze.parse,De.Renderer=ve,De.TextRenderer=Ee,De.Lexer=pe,De.lexer=pe.lex,De.Tokenizer=oe,De.Slugger=Ue,De.parse=De;var He=De;return He})},ELLl:function(qe,Ie,f){(function(W){W(f("VrN/"))})(function(W){var be={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},le=W.Pos;W.defineOption("autoCloseBrackets",!1,function(P,U,j){j&&j!=W.Init&&(P.removeKeyMap(ge),P.state.closeBrackets=null),U&&(J(Oe(U,"pairs")),P.state.closeBrackets=U,P.addKeyMap(ge))});function Oe(P,U){return U=="pairs"&&typeof P=="string"?P:typeof P=="object"&&P[U]!=null?P[U]:be[U]}var ge={Backspace:w,Enter:H};function J(P){for(var U=0;U<P.length;U++){var j=P.charAt(U),B="'"+j+"'";ge[B]||(ge[B]=N(j))}}J(be.pairs+"`");function N(P){return function(U){return ie(U,P)}}function A(P){var U=P.state.closeBrackets;if(!U||U.override)return U;var j=P.getModeAt(P.getCursor());return j.closeBrackets||U}function w(P){var U=A(P);if(!U||P.getOption("disableInput"))return W.Pass;for(var j=Oe(U,"pairs"),B=P.listSelections(),ne=0;ne<B.length;ne++){if(!B[ne].empty())return W.Pass;var ke=ue(P,B[ne].head);if(!ke||j.indexOf(ke)%2!=0)return W.Pass}for(var ne=B.length-1;ne>=0;ne--){var Fe=B[ne].head;P.replaceRange("",le(Fe.line,Fe.ch-1),le(Fe.line,Fe.ch+1),"+delete")}}function H(P){var U=A(P),j=U&&Oe(U,"explode");if(!j||P.getOption("disableInput"))return W.Pass;for(var B=P.listSelections(),ne=0;ne<B.length;ne++){if(!B[ne].empty())return W.Pass;var ke=ue(P,B[ne].head);if(!ke||j.indexOf(ke)%2!=0)return W.Pass}P.operation(function(){var Fe=P.lineSeparator()||`
|
|
`;P.replaceSelection(Fe+Fe,null),P.execCommand("goCharLeft"),B=P.listSelections();for(var ce=0;ce<B.length;ce++){var we=B[ce].head.line;P.indentLine(we,null,!0),P.indentLine(we+1,null,!0)}})}function X(P){var U=W.cmpPos(P.anchor,P.head)>0;return{anchor:new le(P.anchor.line,P.anchor.ch+(U?-1:1)),head:new le(P.head.line,P.head.ch+(U?1:-1))}}function ie(P,U){var j=A(P);if(!j||P.getOption("disableInput"))return W.Pass;var B=Oe(j,"pairs"),ne=B.indexOf(U);if(ne==-1)return W.Pass;for(var ke=Oe(j,"closeBefore"),Fe=Oe(j,"triples"),ce=B.charAt(ne+1)==U,we=P.listSelections(),Me=ne%2==0,de,he=0;he<we.length;he++){var Te=we[he],se=Te.head,y,V=P.getRange(se,le(se.line,se.ch+1));if(Me&&!Te.empty())y="surround";else if((ce||!Me)&&V==U)ce&&K(P,se)?y="both":Fe.indexOf(U)>=0&&P.getRange(se,le(se.line,se.ch+3))==U+U+U?y="skipThree":y="skip";else if(ce&&se.ch>1&&Fe.indexOf(U)>=0&&P.getRange(le(se.line,se.ch-2),se)==U+U){if(se.ch>2&&/\bstring/.test(P.getTokenTypeAt(le(se.line,se.ch-2))))return W.Pass;y="addFour"}else if(ce){var M=se.ch==0?" ":P.getRange(le(se.line,se.ch-1),se);if(!W.isWordChar(V)&&M!=U&&!W.isWordChar(M))y="both";else return W.Pass}else if(Me&&(V.length===0||/\s/.test(V)||ke.indexOf(V)>-1))y="both";else return W.Pass;if(!de)de=y;else if(de!=y)return W.Pass}var v=ne%2?B.charAt(ne-1):U,ee=ne%2?U:B.charAt(ne+1);P.operation(function(){if(de=="skip")P.execCommand("goCharRight");else if(de=="skipThree")for(var I=0;I<3;I++)P.execCommand("goCharRight");else if(de=="surround"){for(var O=P.getSelections(),I=0;I<O.length;I++)O[I]=v+O[I]+ee;P.replaceSelections(O,"around"),O=P.listSelections().slice();for(var I=0;I<O.length;I++)O[I]=X(O[I]);P.setSelections(O)}else de=="both"?(P.replaceSelection(v+ee,null),P.triggerElectric(v+ee),P.execCommand("goCharLeft")):de=="addFour"&&(P.replaceSelection(v+v+v+v,"before"),P.execCommand("goCharRight"))})}function ue(P,U){var j=P.getRange(le(U.line,U.ch-1),le(U.line,U.ch+1));return j.length==2?j:null}function K(P,U){var j=P.getTokenAt(le(U.line,U.ch+1));return/\bstring/.test(j.type)&&j.start==U.ch&&(U.ch==0||!/\bstring/.test(P.getTokenTypeAt(U)))}})},GfqC:function(qe,Ie,f){"use strict";var W=f("q1tI"),be=f.n(W),le=f("TSYQ"),Oe=f.n(le);function ge(C,u){var l="cannot "+C.method+" "+C.action+" "+u.status+"'",m=new Error(l);return m.status=u.status,m.method=C.method,m.url=C.action,m}function J(C){var u=C.responseText||C.response;if(!u)return u;try{return JSON.parse(u)}catch(l){return u}}function N(C){var u=new XMLHttpRequest;C.onProgress&&u.upload&&(u.upload.onprogress=function(F){F.total>0&&(F.percent=F.loaded/F.total*100),C.onProgress(F)});var l=new FormData;C.data&&Object.keys(C.data).forEach(function(x){var F=C.data[x];if(Array.isArray(F)){F.forEach(function(ae){l.append(x+"[]",ae)});return}l.append(x,C.data[x])}),C.file instanceof Blob?l.append(C.filename,C.file,C.file.name):l.append(C.filename,C.file),u.onerror=function(F){C.onError(F)},u.onload=function(){return u.status<200||u.status>=300?C.onError(ge(C,u),J(u)):C.onSuccess(J(u),u)},u.open(C.method,C.action,!0),C.withCredentials&&"withCredentials"in u&&(u.withCredentials=!0);var m=C.headers||{};return m["X-Requested-With"]!==null&&u.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(m).forEach(function(x){m[x]!==null&&u.setRequestHeader(x,m[x])}),u.send(l),{abort:function(){u.abort()}}}var A=+new Date,w=0;function H(){return"rc-upload-"+A+"-"+ ++w}function X(C,u){return C.indexOf(u,C.length-u.length)!==-1}var ie=function(C,u){if(C&&u){var l=Array.isArray(u)?u:u.split(","),m=C.name||"",x=C.type||"",F=x.replace(/\/.*$/,"");return l.some(function(ae){var xe=ae.trim();return xe.charAt(0)==="."?X(m.toLowerCase(),xe.toLowerCase()):/\/\*$/.test(xe)?F===xe.replace(/\/.*$/,""):x===xe})}return!0};function ue(C,u){var l=C.createReader(),m=[];function x(){l.readEntries(function(F){var ae=Array.prototype.slice.apply(F);m=m.concat(ae);var xe=!ae.length;xe?u(m):x()})}x()}var K=function(u,l,m){var x=function F(ae,xe){xe=xe||"",ae.isFile?ae.file(function(oe){m(oe)&&(ae.fullPath&&!oe.webkitRelativePath&&(Object.defineProperties(oe,{webkitRelativePath:{writable:!0}}),oe.webkitRelativePath=ae.fullPath.replace(/^\//,""),Object.defineProperties(oe,{webkitRelativePath:{writable:!1}})),l([oe]))}):ae.isDirectory&&ue(ae,function(oe){oe.forEach(function(ye){F(ye,""+xe+ae.name+"/")})})};u.forEach(function(F){x(F.webkitGetAsEntry())})},P=K,U=Object.assign||function(C){for(var u=1;u<arguments.length;u++){var l=arguments[u];for(var m in l)Object.prototype.hasOwnProperty.call(l,m)&&(C[m]=l[m])}return C},j=function(){function C(u,l){var m=[],x=!0,F=!1,ae=void 0;try{for(var xe=u[Symbol.iterator](),oe;!(x=(oe=xe.next()).done)&&!(m.push(oe.value),l&&m.length===l);x=!0);}catch(ye){F=!0,ae=ye}finally{try{!x&&xe.return&&xe.return()}finally{if(F)throw ae}}return m}return function(u,l){if(Array.isArray(u))return u;if(Symbol.iterator in Object(u))return C(u,l);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),B=function(){function C(u,l){for(var m=0;m<l.length;m++){var x=l[m];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(u,x.key,x)}}return function(u,l,m){return l&&C(u.prototype,l),m&&C(u,m),u}}();function ne(C,u,l){return u in C?Object.defineProperty(C,u,{value:l,enumerable:!0,configurable:!0,writable:!0}):C[u]=l,C}function ke(C,u){var l={};for(var m in C){if(u.indexOf(m)>=0)continue;if(!Object.prototype.hasOwnProperty.call(C,m))continue;l[m]=C[m]}return l}function Fe(C,u){if(!(C instanceof u))throw new TypeError("Cannot call a class as a function")}function ce(C,u){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:C}function we(C,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);C.prototype=Object.create(u&&u.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(C,u):C.__proto__=u)}var Me=function(u){return Object.keys(u).reduce(function(l,m){return(m.substr(0,5)==="data-"||m.substr(0,5)==="aria-"||m==="role")&&(l[m]=u[m]),l},{})},de=function(C){we(u,C);function u(){var l,m,x,F;Fe(this,u);for(var ae=arguments.length,xe=Array(ae),oe=0;oe<ae;oe++)xe[oe]=arguments[oe];return F=(m=(x=ce(this,(l=u.__proto__||Object.getPrototypeOf(u)).call.apply(l,[this].concat(xe))),x),x.state={uid:H()},x.reqs={},x.onChange=function(ye){var $=ye.target.files;x.uploadFiles($),x.reset()},x.onClick=function(ye){var $=x.fileInput;if(!$)return;var q=x.props,z=q.children,Y=q.onClick;z&&z.type==="button"&&($.parentNode.focus(),$.parentNode.querySelector("button").blur()),$.click(),Y&&Y(ye)},x.onKeyDown=function(ye){ye.key==="Enter"&&x.onClick()},x.onFileDrop=function(ye){var $=x.props.multiple;if(ye.preventDefault(),ye.type==="dragover")return;if(x.props.directory)P(Array.prototype.slice.call(ye.dataTransfer.items),x.uploadFiles,function(z){return ie(z,x.props.accept)});else{var q=Array.prototype.slice.call(ye.dataTransfer.files).filter(function(z){return ie(z,x.props.accept)});$===!1&&(q=q.slice(0,1)),x.uploadFiles(q)}},x.uploadFiles=function(ye){var $=Array.prototype.slice.call(ye);$.map(function(q){return q.uid=H(),q}).forEach(function(q){x.upload(q,$)})},x.saveFileInput=function(ye){x.fileInput=ye},m),ce(x,F)}return B(u,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(m,x){var F=this,ae=this.props;if(!ae.beforeUpload)return setTimeout(function(){return F.post(m)},0);var xe=ae.beforeUpload(m,x);xe&&xe.then?xe.then(function(oe){var ye=Object.prototype.toString.call(oe);return ye==="[object File]"||ye==="[object Blob]"?F.post(oe):F.post(m)}).catch(function(oe){console.log(oe)}):xe!==!1&&setTimeout(function(){return F.post(m)},0);return}},{key:"post",value:function(m){var x=this;if(!this._isMounted)return;var F=this.props,ae=F.onStart,xe=F.onProgress,oe=F.transformFile,ye=oe===void 0?function($){return $}:oe;new Promise(function($){var q=F.action;return typeof q=="function"&&(q=q(m)),$(q)}).then(function($){var q=m.uid,z=F.customRequest||N,Y=Promise.resolve(ye(m)).then(function(p){var T=F.data;return typeof T=="function"&&(T=T(p)),Promise.all([p,T])}).catch(function(p){console.error(p)});Y.then(function(p){var T=j(p,2),b=T[0],re=T[1],fe={action:$,filename:F.name,data:re,file:b,headers:F.headers,withCredentials:F.withCredentials,method:F.method||"post",onProgress:xe?function(G){xe(G,m)}:null,onSuccess:function(pe,Ae){delete x.reqs[q],F.onSuccess(pe,m,Ae)},onError:function(pe,Ae){delete x.reqs[q],F.onError(pe,Ae,m)}};ae(m),x.reqs[q]=z(fe)})})}},{key:"reset",value:function(){this.setState({uid:H()})}},{key:"abort",value:function(m){var x=this.reqs;if(m){var F=m;m&&m.uid&&(F=m.uid),x[F]&&x[F].abort&&x[F].abort(),delete x[F]}else Object.keys(x).forEach(function(ae){x[ae]&&x[ae].abort&&x[ae].abort(),delete x[ae]})}},{key:"render",value:function(){var m,x=this.props,F=x.component,ae=x.prefixCls,xe=x.className,oe=x.disabled,ye=x.id,$=x.style,q=x.multiple,z=x.accept,Y=x.children,p=x.directory,T=x.openFileDialogOnClick,b=x.onMouseEnter,re=x.onMouseLeave,fe=ke(x,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),G=Oe()((m={},ne(m,ae,!0),ne(m,ae+"-disabled",oe),ne(m,xe,xe),m)),pe=oe?{}:{onClick:T?this.onClick:function(){},onKeyDown:T?this.onKeyDown:function(){},onMouseEnter:b,onMouseLeave:re,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return be.a.createElement(F,U({},pe,{className:G,role:"button",style:$}),be.a.createElement("input",U({},Me(fe),{id:ye,type:"file",ref:this.saveFileInput,onClick:function(Ce){return Ce.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:z,directory:p?"directory":null,webkitdirectory:p?"webkitdirectory":null,multiple:q,onChange:this.onChange})),Y)}}]),u}(W.Component),he=de,Te=Object.assign||function(C){for(var u=1;u<arguments.length;u++){var l=arguments[u];for(var m in l)Object.prototype.hasOwnProperty.call(l,m)&&(C[m]=l[m])}return C},se=function(){function C(u,l){for(var m=0;m<l.length;m++){var x=l[m];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(u,x.key,x)}}return function(u,l,m){return l&&C(u.prototype,l),m&&C(u,m),u}}();function y(C,u){if(!(C instanceof u))throw new TypeError("Cannot call a class as a function")}function V(C,u){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:C}function M(C,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);C.prototype=Object.create(u&&u.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(C,u):C.__proto__=u)}function v(){}var ee=function(C){M(u,C);function u(){var l,m,x,F;y(this,u);for(var ae=arguments.length,xe=Array(ae),oe=0;oe<ae;oe++)xe[oe]=arguments[oe];return F=(m=(x=V(this,(l=u.__proto__||Object.getPrototypeOf(u)).call.apply(l,[this].concat(xe))),x),x.saveUploader=function(ye){x.uploader=ye},m),V(x,F)}return se(u,[{key:"abort",value:function(m){this.uploader.abort(m)}},{key:"render",value:function(){return be.a.createElement(he,Te({},this.props,{ref:this.saveUploader}))}}]),u}(W.Component);ee.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:v,onError:v,onSuccess:v,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var I=ee,O=Ie.a=I},Gytx:function(qe,Ie){qe.exports=function(W,be,le,Oe){var ge=le?le.call(Oe,W,be):void 0;if(ge!==void 0)return!!ge;if(W===be)return!0;if(typeof W!="object"||!W||typeof be!="object"||!be)return!1;var J=Object.keys(W),N=Object.keys(be);if(J.length!==N.length)return!1;for(var A=Object.prototype.hasOwnProperty.bind(be),w=0;w<J.length;w++){var H=J[w];if(!A(H))return!1;var X=W[H],ie=be[H];if(ge=le?le.call(Oe,X,ie,H):void 0,ge===!1||ge===void 0&&X!==ie)return!1}return!0}},HmJG:function(qe,Ie,f){},IE1O:function(qe,Ie,f){"use strict";f.d(Ie,"a",function(){return Me});var W=f("2qtc"),be=f("kLXV"),le=f("DZo9"),Oe=f("8z0m"),ge=f("+L6B"),J=f("2/Rp"),N=f("5NDa"),A=f("5rEg"),w=f("miYZ"),H=f("tsqr"),X=f("9og8"),ie=f("y8nQ"),ue=f("Vl3Y"),K=f("tJVT"),P=f("WmNS"),U=f.n(P),j=f("q1tI"),B=f.n(j),ne=f("KeLC"),ke=f.n(ne),Fe=f("m3rI"),ce=f("jN4g"),we=function(he){var Te,se,y,V,M=he.visible,v=he.onOk,ee=he.onCancel,I=he.title,O=I===void 0?"\u9009\u62E9\u8BA4\u8BC1\u56E2\u961F\u6559\u5E08":I,C=ue.a.useForm(),u=Object(K.a)(C,1),l=u[0],m=Object(j.useState)(!1),x=Object(K.a)(m,2),F=x[0],ae=x[1],xe=Object(j.useState)([]),oe=Object(K.a)(xe,2),ye=oe[0],$=oe[1],q=Object(j.useState)([]),z=Object(K.a)(q,2),Y=z[0],p=z[1],T=Object(j.useState)(!1),b=Object(K.a)(T,2),re=b[0],fe=b[1];Object(j.useEffect)(function(){if(M!=null&&M.name){var Ue,Pe,We,ze;l.setFieldsValue({name:M==null?void 0:M.name});var Qe=M!=null&&(Ue=M.cover_url)!==null&&Ue!==void 0&&Ue.includes("attachments")?[{response:{id:M==null||((Pe=M.cover_url)===null||Pe===void 0)?void 0:Pe.split("/")[3]}}]:[],$e=M!=null&&(We=M.backbground_image_url)!==null&&We!==void 0&&We.includes("attachments")?[{response:{id:M==null||((ze=M.backbground_image_url)===null||ze===void 0)?void 0:ze.split("/")[3]}}]:[];$(Qe),p($e)}},[M]);var G=function(){l.submit()},pe=function(){ee()},Ae=function(){var Ue=Object(X.a)(U.a.mark(function Pe(We){var ze,Qe,$e,Ye,Se;return U.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:ae(!0),console.log(ye,Y,3333),Se={name:We==null?void 0:We.name,cover_id:(ye==null||((ze=ye[0])===null||ze===void 0||((Qe=ze.response)===null||Qe===void 0))?void 0:Qe.id)||"",backbground_image_id:(Y==null||(($e=Y[0])===null||$e===void 0||((Ye=$e.response)===null||Ye===void 0))?void 0:Ye.id)||""},v(Se);case 4:case"end":return Je.stop()}},Pe)}));return function(We){return Ue.apply(this,arguments)}}(),Ce=function(Pe,We){var ze=["uploading","done","removed"];ze.includes(Pe.file.status)&&(Pe.file.status==="uploading"&&fe(!0),Pe.file.status==="done"&&fe(!1),We===1?$(Pe.fileList):p(Pe.fileList))},_e=function(Pe,We){We===1?$([]):p([])},ve=function(Pe,We){var ze=Pe.type==="image/jpeg"||Pe.type==="image/png";if(!ze)return H.b.error("\u8BF7\u4E0A\u4F20jpg\u6216png\u7684\u56FE\u7247!"),!1;var Qe=Pe.size/1024/1024>2;return Qe?(H.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E2MB"),!1):(We===1?$([]):p([]),!0)},Ee=function(Pe){var We,ze,Qe,$e;return B.a.createElement("div",{className:ke.a.img},B.a.createElement("img",{src:Fe.a.API_SERVER+"/api/attachments/"+(Pe===1?ye==null||((We=ye[0])===null||We===void 0||((ze=We.response)===null||ze===void 0))?void 0:ze.id:Y==null||((Qe=Y[0])===null||Qe===void 0||(($e=Qe.response)===null||$e===void 0))?void 0:$e.id),alt:"avatar",style:{width:"100%"}}),B.a.createElement("div",null,B.a.createElement(ce.a,{onClick:function(){Pe===1?$([]):p([])},style:{fontSize:"16px",color:"red"}})))};return B.a.createElement(be.a,{title:O,visible:M,onOk:G,centered:!0,onCancel:pe,confirmLoading:F,okButtonProps:{disabled:re},width:686,afterClose:function(){ae(!1),$([]),p([]),l.resetFields()},okText:M!=null&&M.name?"\u786E\u8BA4":"\u786E\u8BA4\u65B0\u5EFA",cancelText:"\u53D6\u6D88"},B.a.createElement(ue.a,{form:l,colon:!1,onFinish:Ae,labelCol:{span:4},wrapperCol:{span:18},className:ke.a.form},B.a.createElement(ue.a.Item,{label:"\u793E\u533A\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u793E\u533A\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u793E\u533A\u540D\u79F0"},{max:60,message:"\u53EA\u80FD\u8F93\u516560\u4E2A\u5B57\u7B26"}]},B.a.createElement(A.a,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u793E\u533A\u540D\u79F0"})),B.a.createElement(ue.a.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",valuePropName:"fileList"},B.a.createElement("div",{className:ke.a.upload},ye!=null&&(Te=ye[0])!==null&&Te!==void 0&&(se=Te.response)!==null&&se!==void 0&&se.id?Ee(1):B.a.createElement(Oe.a,{fileList:ye,action:"".concat(Fe.a.API_SERVER,"/api/attachments.json"),onChange:function(Pe){return Ce(Pe,1)},onRemove:function(Pe){return _e(Pe,1)},beforeUpload:function(Pe){return ve(Pe,1)},withCredentials:!0,accept:"image/*"},B.a.createElement(J.a,null,B.a.createElement("i",{className:"iconfont icon-shangchuantupian2 mr10"}),"\u4E0A\u4F20\u56FE\u7247")),B.a.createElement("aside",null,"\u4EC5\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u7528278*225\u50CF\u7D20\uFF1B\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002"))),B.a.createElement(ue.a.Item,{name:"backbground_image_id",label:"\u8BE6\u60C5\u9876\u90E8\u80CC\u666F",valuePropName:"fileList"},B.a.createElement("div",{className:ke.a.upload},Y!=null&&(y=Y[0])!==null&&y!==void 0&&(V=y.response)!==null&&V!==void 0&&V.id?Ee(2):B.a.createElement(Oe.a,{fileList:Y,action:"".concat(Fe.a.API_SERVER,"/api/attachments.json"),onChange:function(Pe){return Ce(Pe,2)},onRemove:function(Pe){return _e(Pe,2)},beforeUpload:function(Pe){return ve(Pe,2)},withCredentials:!0,accept:"image/*"},B.a.createElement(J.a,null,B.a.createElement("i",{className:"iconfont icon-shangchuantupian2 mr10"}),"\u4E0A\u4F20\u56FE\u7247")),B.a.createElement("aside",null,"\u4EC5\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u75281920*220\u50CF\u7D20\uFF1B\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002")))))},Me=function(he){var Te,se,y,V,M=he.data,v=he.onOk,ee=ue.a.useForm(),I=Object(K.a)(ee,1),O=I[0],C=Object(j.useState)(!1),u=Object(K.a)(C,2),l=u[0],m=u[1],x=Object(j.useState)([]),F=Object(K.a)(x,2),ae=F[0],xe=F[1],oe=Object(j.useState)([]),ye=Object(K.a)(oe,2),$=ye[0],q=ye[1],z=Object(j.useState)(!1),Y=Object(K.a)(z,2),p=Y[0],T=Y[1];Object(j.useEffect)(function(){if(M!=null&&M.name){var Ce,_e,ve,Ee;O.setFieldsValue({name:M==null?void 0:M.name});var Ue=M!=null&&(Ce=M.cover_url)!==null&&Ce!==void 0&&Ce.includes("attachments")?[{response:{id:M==null||((_e=M.cover_url)===null||_e===void 0)?void 0:_e.split("/")[3]}}]:[],Pe=M!=null&&(ve=M.backbground_image_url)!==null&&ve!==void 0&&ve.includes("attachments")?[{response:{id:M==null||((Ee=M.backbground_image_url)===null||Ee===void 0)?void 0:Ee.split("/")[3]}}]:[];xe(Ue),q(Pe)}},[M]);var b=function(){O.submit()},re=function(){var Ce=Object(X.a)(U.a.mark(function _e(ve){var Ee,Ue,Pe,We,ze;return U.a.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:m(!0),ze={name:ve==null?void 0:ve.name,cover_id:(ae==null||((Ee=ae[0])===null||Ee===void 0||((Ue=Ee.response)===null||Ue===void 0))?void 0:Ue.id)||"",backbground_image_id:($==null||((Pe=$[0])===null||Pe===void 0||((We=Pe.response)===null||We===void 0))?void 0:We.id)||""},v(ze,function(){m(!1)});case 3:case"end":return $e.stop()}},_e)}));return function(ve){return Ce.apply(this,arguments)}}(),fe=function(_e,ve){var Ee=["uploading","done","removed"];Ee.includes(_e.file.status)&&(_e.file.status==="uploading"&&T(!0),_e.file.status==="done"&&T(!1),ve===1?xe(_e.fileList):q(_e.fileList))},G=function(_e,ve){ve===1?xe([]):q([])},pe=function(_e,ve){var Ee=_e.type==="image/jpeg"||_e.type==="image/png";if(!Ee)return H.b.error("\u8BF7\u4E0A\u4F20jpg\u6216png\u7684\u56FE\u7247!"),!1;var Ue=_e.size/1024/1024>2;return Ue?(H.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E2MB"),!1):(ve===1?xe([]):q([]),!0)},Ae=function(_e){var ve,Ee,Ue,Pe;return B.a.createElement("div",{className:ke.a.img},B.a.createElement("img",{src:Fe.a.API_SERVER+"/api/attachments/"+(_e===1?ae==null||((ve=ae[0])===null||ve===void 0||((Ee=ve.response)===null||Ee===void 0))?void 0:Ee.id:$==null||((Ue=$[0])===null||Ue===void 0||((Pe=Ue.response)===null||Pe===void 0))?void 0:Pe.id),alt:"avatar",style:{width:"100%"}}),B.a.createElement("div",null,B.a.createElement(ce.a,{onClick:function(){_e===1?xe([]):q([])},style:{fontSize:"16px",color:"red"}})))};return B.a.createElement(ue.a,{form:O,colon:!1,onFinish:re,labelCol:{span:3},wrapperCol:{span:19},className:ke.a.form},B.a.createElement(ue.a.Item,{label:"\u793E\u533A\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u793E\u533A\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u793E\u533A\u540D\u79F0"},{max:60,message:"\u53EA\u80FD\u8F93\u516560\u4E2A\u5B57\u7B26"}]},B.a.createElement(A.a,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u793E\u533A\u540D\u79F0"})),B.a.createElement(ue.a.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",valuePropName:"fileList"},B.a.createElement("div",{className:ke.a.upload},ae!=null&&(Te=ae[0])!==null&&Te!==void 0&&(se=Te.response)!==null&&se!==void 0&&se.id?Ae(1):B.a.createElement(Oe.a,{fileList:ae,action:"".concat(Fe.a.API_SERVER,"/api/attachments.json"),onChange:function(_e){return fe(_e,1)},onRemove:function(_e){return G(_e,1)},beforeUpload:function(_e){return pe(_e,1)},withCredentials:!0,accept:"image/*"},B.a.createElement(J.a,null,B.a.createElement("i",{className:"iconfont icon-shangchuantupian2 mr10"}),"\u4E0A\u4F20\u56FE\u7247")),B.a.createElement("aside",null,"\u4EC5\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u7528278*225\u50CF\u7D20\uFF1B\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002"))),B.a.createElement(ue.a.Item,{name:"backbground_image_id",label:"\u8BE6\u60C5\u9876\u90E8\u80CC\u666F",valuePropName:"fileList"},B.a.createElement("div",{className:ke.a.upload},$!=null&&(y=$[0])!==null&&y!==void 0&&(V=y.response)!==null&&V!==void 0&&V.id?Ae(2):B.a.createElement(Oe.a,{fileList:$,action:"".concat(Fe.a.API_SERVER,"/api/attachments.json"),onChange:function(_e){return fe(_e,2)},onRemove:function(_e){return G(_e,2)},beforeUpload:function(_e){return pe(_e,2)},withCredentials:!0,accept:"image/*"},B.a.createElement(J.a,null,B.a.createElement("i",{className:"iconfont icon-shangchuantupian2 mr10"}),"\u4E0A\u4F20\u56FE\u7247")),B.a.createElement("aside",null,"\u4EC5\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u75281920*220\u50CF\u7D20\uFF1B\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002"))),B.a.createElement(J.a,{disabled:p,loading:l,type:"primary",onClick:b,style:{marginLeft:120}},"\u786E\u8BA4"))};Ie.b=we},KeLC:function(qe,Ie,f){qe.exports={flex_box_center:"flex_box_center___WC8D3",flex_space_between:"flex_space_between___1oJuS",flex_box_vertical_center:"flex_box_vertical_center___wHVAB",flex_box_center_end:"flex_box_center_end___2rX0l",flex_box_column:"flex_box_column___Iu_rf",form:"form___RRVwq",upload:"upload___2PzlY",img:"img___qC8f0"}},LdHM:function(qe,Ie,f){"use strict";f.d(Ie,"b",function(){return ke}),f.d(Ie,"a",function(){return ce});var W=f("1OyB"),be=f("vuIU"),le=f("Ji7U"),Oe=f("LK+K"),ge=f("q1tI"),J=f("rePB"),N=f("Ff2n"),A=f("ODXe"),w=f("4IlW"),H=f("bX4T"),X=f("YrtM"),ie=f("TSYQ"),ue=f.n(ie),K=f("+nKL"),P=f("8OUc"),U=function(m,x){var F=m.prefixCls,ae=m.id,xe=m.flattenOptions,oe=m.childrenAsData,ye=m.values,$=m.searchValue,q=m.multiple,z=m.defaultActiveFirstOption,Y=m.height,p=m.itemHeight,T=m.notFoundContent,b=m.open,re=m.menuItemSelectedIcon,fe=m.virtual,G=m.onSelect,pe=m.onToggleOpen,Ae=m.onActiveValue,Ce=m.onScroll,_e=m.onMouseEnter,ve="".concat(F,"-item"),Ee=Object(X.a)(function(){return xe},[b,xe],function(He,k){return k[0]&&He[1]!==k[1]}),Ue=ge.useRef(null),Pe=function(k){k.preventDefault()},We=function(k){Ue.current&&Ue.current.scrollTo({index:k})},ze=function(k){for(var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,R=Ee.length,h=0;h<R;h+=1){var g=(k+h*L+R)%R,_=Ee[g],E=_.group,Q=_.data;if(!E&&!Q.disabled)return g}return-1},Qe=ge.useState(function(){return ze(0)}),$e=Object(A.a)(Qe,2),Ye=$e[0],Se=$e[1],it=function(k){Se(k);var L=Ee[k];if(!L){Ae(null,-1);return}Ae(L.data.value,k)};ge.useEffect(function(){it(z!==!1?ze(0):-1)},[Ee.length,$]),ge.useEffect(function(){var He=setTimeout(function(){if(!q&&b&&ye.size===1){var k=Array.from(ye)[0],L=Ee.findIndex(function(R){var h=R.data;return h.value===k});it(L),We(L)}});return function(){return clearTimeout(He)}},[b]);var Je=function(k){k!==void 0&&G(k,{selected:!ye.has(k)}),q||pe(!1)};if(ge.useImperativeHandle(x,function(){return{onKeyDown:function(k){var L=k.which;switch(L){case w.a.UP:case w.a.DOWN:{var R=0;if(L===w.a.UP?R=-1:L===w.a.DOWN&&(R=1),R!==0){var h=ze(Ye+R,R);We(h),it(h)}break}case w.a.ENTER:{var g=Ee[Ye];g&&!g.data.disabled?Je(g.data.value):Je(void 0),b&&k.preventDefault();break}case w.a.ESC:pe(!1)}},onKeyUp:function(){},scrollTo:function(k){We(k)}}}),Ee.length===0)return ge.createElement("div",{role:"listbox",id:"".concat(ae,"_list"),className:"".concat(ve,"-empty"),onMouseDown:Pe},T);function De(He){var k=Ee[He];if(!k)return null;var L=k.data||{},R=L.value,h=L.label,g=L.children,_=Object(H.a)(L,!0),E=oe?g:h;return k?ge.createElement("div",Object.assign({"aria-label":typeof E=="string"?E:null},_,{key:He,role:"option",id:"".concat(ae,"_list_").concat(He),"aria-selected":ye.has(R)}),R):null}return ge.createElement(ge.Fragment,null,ge.createElement("div",{role:"listbox",id:"".concat(ae,"_list"),style:{height:0,width:0,overflow:"hidden"}},De(Ye-1),De(Ye),De(Ye+1)),ge.createElement(K.a,{itemKey:"key",ref:Ue,data:Ee,height:Y,itemHeight:p,fullHeight:!1,onMouseDown:Pe,onScroll:Ce,virtual:fe,onMouseEnter:_e},function(He,k){var L,R=He.group,h=He.groupOption,g=He.data,_=g.label,E=g.key;if(R)return ge.createElement("div",{className:ue()(ve,"".concat(ve,"-group"))},_!==void 0?_:E);var Q=g.disabled,me=g.value,je=g.title,rt=g.children,ft=g.style,ot=g.className,Pt=Object(N.a)(g,["disabled","value","title","children","style","className"]),pt=ye.has(me),lt="".concat(ve,"-option"),Bt=ue()(ve,lt,ot,(L={},Object(J.a)(L,"".concat(lt,"-grouped"),h),Object(J.a)(L,"".concat(lt,"-active"),Ye===k&&!Q),Object(J.a)(L,"".concat(lt,"-disabled"),Q),Object(J.a)(L,"".concat(lt,"-selected"),pt),L)),bt=oe?rt:_,Vt=!re||typeof re=="function"||pt;return ge.createElement("div",Object.assign({},Pt,{"aria-selected":pt,className:Bt,title:je,onMouseMove:function(){if(Ye===k||Q)return;it(k)},onClick:function(){Q||Je(me)},style:ft}),ge.createElement("div",{className:"".concat(lt,"-content")},bt||me),ge.isValidElement(re)||pt,Vt&&ge.createElement(P.a,{className:"".concat(ve,"-option-state"),customizeIcon:re,customizeIconProps:{isSelected:pt}},pt?"\u2713":null))}))},j=ge.forwardRef(U);j.displayName="OptionList";var B=j,ne=function(){return null};ne.isSelectOption=!0;var ke=ne,Fe=function(){return null};Fe.isSelectOptGroup=!0;var ce=Fe,we=f("VTBJ"),Me=f("Zm9Q");function de(l){var m=l.key,x=l.props,F=x.children,ae=x.value,xe=Object(N.a)(x,["children","value"]);return Object(we.a)({key:m,value:ae!==void 0?ae:m,children:F},xe)}function he(l){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Me.a)(l).map(function(x,F){if(!ge.isValidElement(x)||!x.type)return null;var ae=x.type.isSelectOptGroup,xe=x.key,oe=x.props,ye=oe.children,$=Object(N.a)(oe,["children"]);return m||!ae?de(x):Object(we.a)(Object(we.a)({key:"__RC_SELECT_GRP__".concat(xe===null?F:xe,"__"),label:xe},$),{},{options:he(ye)})}).filter(function(x){return x})}var Te=f("2Qr1"),se=f("qNPg"),y=f("U8pU"),V=f("Kwbf"),M=f("WKfj");function v(l){var m=l.mode,x=l.options,F=l.children,ae=l.backfill,xe=l.allowClear,oe=l.placeholder,ye=l.getInputElement,$=l.showSearch,q=l.onSearch,z=l.defaultOpen,Y=l.autoFocus,p=l.labelInValue,T=l.value,b=l.inputValue,re=l.optionLabelProp,fe=m==="multiple"||m==="tags",G=$!==void 0?$:fe||m==="combobox",pe=x||he(F);if(Object(V.a)(m!=="tags"||pe.every(function(ve){return!ve.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),m==="tags"||m==="combobox"){var Ae=pe.some(function(ve){return ve.options?ve.options.some(function(Ee){return typeof("value"in Ee?Ee.value:Ee.key)=="number"}):typeof("value"in ve?ve.value:ve.key)=="number"});Object(V.a)(!Ae,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(V.a)(m!=="combobox"||!re,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(V.a)(m==="combobox"||!ae,"`backfill` only works with `combobox` mode."),Object(V.a)(m==="combobox"||!ye,"`getInputElement` only work with `combobox` mode."),Object(V.b)(m!=="combobox"||!ye||!xe||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),q&&!G&&m!=="combobox"&&m!=="tags"&&Object(V.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(V.b)(!z||Y,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),T!=null){var Ce=Object(M.d)(T);Object(V.a)(!p||Ce.every(function(ve){return Object(y.a)(ve)==="object"&&("key"in ve||"value"in ve)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(V.a)(!fe||Array.isArray(T),"`value` should be array when `mode` is `multiple` or `tags`")}if(F){var _e=null;Object(Me.a)(F).some(function(ve){if(!ge.isValidElement(ve)||!ve.type)return!1;var Ee=ve.type;if(Ee.isSelectOption)return!1;if(Ee.isSelectOptGroup){var Ue=Object(Me.a)(ve.props.children).every(function(Pe){return!ge.isValidElement(Pe)||!ve.type||Pe.type.isSelectOption?!0:(_e=Pe.type,!1)});return!Ue}return _e=Ee,!0}),_e&&Object(V.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(_e.displayName||_e.name||_e,"`.")),Object(V.a)(b===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var ee=v,I=Object(se.a)({prefixCls:"rc-select",components:{optionList:B},convertChildrenToData:he,flattenOptions:Te.d,getLabeledValue:Te.e,filterOptions:Te.b,isValueDisabled:Te.g,findValueOption:Te.c,warningProps:ee,fillOptionsWithMissingValue:Te.a}),O=function(l){Object(le.a)(x,l);var m=Object(Oe.a)(x);function x(){var F;return Object(W.a)(this,x),F=m.apply(this,arguments),F.selectRef=ge.createRef(),F.focus=function(){F.selectRef.current.focus()},F.blur=function(){F.selectRef.current.blur()},F}return Object(be.a)(x,[{key:"render",value:function(){return ge.createElement(I,Object.assign({ref:this.selectRef},this.props))}}]),x}(ge.Component);O.Option=ke,O.OptGroup=ce;var C=O,u=Ie.c=C},M8RZ:function(qe,Ie,f){"use strict";f.d(Ie,"a",function(){return w});var W=f("fWQN"),be=f("mtLc"),le=f("yKVA"),Oe=f("879j"),ge=f("q1tI"),J=f.n(ge),N=f("i8i4"),A=f.n(N),w=function(H){Object(le.a)(ie,H);var X=Object(Oe.a)(ie);function ie(ue){var K;Object(W.a)(this,ie),K=X.call(this,ue);var P=window.document;return K.node=P.createElement("div"),P.body.appendChild(K.node),K}return Object(be.a)(ie,[{key:"render",value:function(){var K=this.props.children;return Object(N.createPortal)(K,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),ie}(J.a.Component)},NLgs:function(qe,Ie,f){"use strict";f.d(Ie,"e",function(){return Fe}),f.d(Ie,"f",function(){return ce}),f.d(Ie,"d",function(){return Me}),f.d(Ie,"c",function(){return de}),f.d(Ie,"a",function(){return he}),f.d(Ie,"b",function(){return Te});var W=f("miYZ"),be=f("tsqr"),le=f("9og8"),Oe=f("2qtc"),ge=f("kLXV"),J=f("WmNS"),N=f.n(J),A=f("q1tI"),w=f.n(A),H=f("9kvl"),X=f("xKgJ"),ie=f("1vsH"),ue=f("RCxd"),K=f("mOS8"),P=f.n(K),U=f("1ZF9"),j=f.n(U),B=f("WdTA"),ne=f.n(B),ke=f("m3rI"),Fe=function(y){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(ce(y)&&we(V))},ce=function(y){return Object(X.p)()?!0:(y({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},we=function(){var y,V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,M=Object(H.c)()._store.getState(),v=M.user;return(y=v.userInfo)!==null&&y!==void 0&&y.profile_completed?!0:(ge.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:V?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){H.d.push("/account/profile/edit")}}),!1)},Me=function(){var y,V=Object(H.c)()._store.getState(),M=V.user;return(y=M.userInfo)!==null&&y!==void 0&&y.professional_certification?!0:(ge.a.confirm({title:"\u63D0\u793A",centered:!0,content:w.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(ie.Q)("/account/certification")}}),!1)},de=function(){return Object(X.a)()?!0:(ge.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:w.a.createElement("div",{className:"tc",style:{marginLeft:-38}},w.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u626B\u7801\u52A0\u7FA4@\u7FA4\u7BA1\u7406\u5458\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650\u54E6\uFF01"),w.a.createElement("img",{src:Object(X.t)()?ne.a:"".concat(ke.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},he=function(y,V){return y?!0:(ge.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:w.a.createElement("div",null,w.a.createElement("p",null,V||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),w.a.createElement("div",{style:{marginLeft:"110px"}},w.a.createElement("img",{src:j.a,width:200}),w.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(ie.Q)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},Te=function(y){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",M=Object(H.c)()._store.getState(),v=M.shixunsDetail.detail;return(v==null?void 0:v.public)===2||(v==null?void 0:v.public)===1||(v==null?void 0:v.shixun_status)===3?(ge.a.info({centered:!0,icon:w.a.createElement(ue.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:w.a.createElement("div",{className:"tc",style:{marginLeft:-38}},w.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},w.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(v==null?void 0:v.public)===2?"\u5DF2\u516C\u5F00":(v==null?void 0:v.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",V,"\u3002"),w.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),w.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:P.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(v==null?void 0:v.shixun_status)===2?(ge.a.confirm({centered:!0,icon:w.a.createElement(ue.a,null),title:"\u63D0\u793A",content:w.a.createElement("div",null,w.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",V,"\u3002"),w.a.createElement("br",null),w.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){ge.a.confirm({width:440,centered:!0,icon:w.a.createElement(ue.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var I=Object(le.a)(N.a.mark(function C(){var u;return N.a.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,y({type:"shixunsDetail/cancelRelease",payload:{id:v==null?void 0:v.identifier}});case 2:u=m.sent,u.status!==401&&(be.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),y({type:"shixunsDetail/getShixunsDetail",payload:{id:v==null?void 0:v.identifier}}),y({type:"practiceSetting/getCommonData",payload:{id:v==null?void 0:v.identifier}}));case 4:case"end":return m.stop()}},C)}));function O(){return I.apply(this,arguments)}return O}()})}}),!0):!1}},OLES:function(qe,Ie,f){"use strict";var W=f("U8pU"),be=f("VTBJ"),le=f("Ff2n"),Oe=f("q1tI"),ge=f("uciX"),J=f("7ixt"),N=function(ue){var K=ue.overlay,P=ue.prefixCls,U=ue.id,j=ue.overlayInnerStyle;return Oe.createElement("div",{className:"".concat(P,"-inner"),id:U,role:"tooltip",style:j},typeof K=="function"?K():K)},A=N,w=function(ue,K){var P=ue.overlayClassName,U=ue.trigger,j=U===void 0?["hover"]:U,B=ue.mouseEnterDelay,ne=B===void 0?0:B,ke=ue.mouseLeaveDelay,Fe=ke===void 0?.1:ke,ce=ue.overlayStyle,we=ue.prefixCls,Me=we===void 0?"rc-tooltip":we,de=ue.children,he=ue.onVisibleChange,Te=ue.afterVisibleChange,se=ue.transitionName,y=ue.animation,V=ue.placement,M=V===void 0?"right":V,v=ue.align,ee=v===void 0?{}:v,I=ue.destroyTooltipOnHide,O=I===void 0?!1:I,C=ue.defaultVisible,u=ue.getTooltipContainer,l=ue.overlayInnerStyle,m=Object(le.a)(ue,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),x=Object(Oe.useRef)(null);Object(Oe.useImperativeHandle)(K,function(){return x.current});var F=Object(be.a)({},m);"visible"in ue&&(F.popupVisible=ue.visible);var ae=function(){var q=ue.arrowContent,z=q===void 0?null:q,Y=ue.overlay,p=ue.id;return[Oe.createElement("div",{className:"".concat(Me,"-arrow"),key:"arrow"},z),Oe.createElement(A,{key:"content",prefixCls:Me,id:p,overlay:Y,overlayInnerStyle:l})]},xe=!1,oe=!1;if(typeof O=="boolean")xe=O;else if(O&&Object(W.a)(O)==="object"){var ye=O.keepParent;xe=ye===!0,oe=ye===!1}return Oe.createElement(ge.a,Object.assign({popupClassName:P,prefixCls:Me,popup:ae,action:j,builtinPlacements:J.a,popupPlacement:M,ref:x,popupAlign:ee,getPopupContainer:u,onPopupVisibleChange:he,afterPopupVisibleChange:Te,popupTransitionName:se,popupAnimation:y,defaultPopupVisible:C,destroyPopupOnHide:xe,autoDestroy:oe,mouseLeaveDelay:Fe,popupStyle:ce,mouseEnterDelay:ne},F),de)},H=Object(Oe.forwardRef)(w),X=Ie.a=H},Ot1p:function(qe,Ie,f){"use strict";var W=f("2qtc"),be=f("kLXV"),le=f("rAM+"),Oe=f("miYZ"),ge=f("tsqr"),J=f("tJVT"),N=f("jrin"),A=f("q1tI"),w=f.n(A),H=f("VrN/"),X=f.n(H),ie=f("bdgK"),ue=f("p77/"),K=f("Bd2K"),P=f("ELLl"),U=f("19Vz"),j=f("lZu9"),B=f("+NIl"),ne=f("kSUc"),ke=f("9Bee"),Fe=function(k){var L=k.value,R=L===void 0?"":L,h=k.className,g=k.showTextOnly,_=k.showLines,E=k.style,Q=E===void 0?{}:E,me=Object(A.useMemo)(function(){return""},[R]);return w.a.createElement(w.a.Fragment,null,w.a.createElement("div",{dangerouslySetInnerHTML:{__html:me}}))},ce=f("0Owb"),we=f("dejd"),Me=f("C+DQ"),de=[{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 he(k){var L=k.onActionCallback,R=k.title,h=k.icon,g=k.actionName,_=k.className,E=_===void 0?"":_,Q=k.children;function me(){L(g)}return w.a.createElement("a",{title:R,className:E,onClick:me},w.a.createElement("i",{className:"md-iconfont ".concat(h)}),Q)}var Te=function(k){var L=k.watch,R=k.showNullButton,h=k.onActionCallback,g=k.fullScreen,_=k.insertTemp,E=k.hidetoolBar,Q=[].concat(de,[{title:"".concat(L?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(L?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return w.a.createElement("ul",{className:"markdown-toolbar-container"},!E&&Q.map(function(me,je){return w.a.createElement("li",{key:je},me.actionName?w.a.createElement(he,Object(ce.a)({},me,{onActionCallback:h})):w.a.createElement("span",{className:"v-line"}))}),R?w.a.createElement("li",null,w.a.createElement(he,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:h},w.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,_&&w.a.createElement("li",null,w.a.createElement(he,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(_),onActionCallback:h},w.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),w.a.createElement("li",{className:"btn-full-screen"},w.a.createElement(he,{icon:"".concat(g?"icon-shrink":"icon-enlarge"),title:g?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:h})))},se=f("M8RZ"),y=f("+L6B"),V=f("2/Rp"),M=f("y8nQ"),v=f("Vl3Y"),ee=f("5NDa"),I=f("5rEg"),O={labelCol:{span:4},wrapperCol:{span:20}},C=function(k){var L=k.callback,R=k.onCancel;function h(g){L(g)}return w.a.createElement(v.a,Object(ce.a)({},O,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:h}),w.a.createElement(v.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},w.a.createElement(I.a,null)),w.a.createElement(v.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},w.a.createElement(I.a,null)),w.a.createElement("div",{className:"flex-container flex-end"},w.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.a.createElement(V.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))},u=f("7ahc"),l=f("HmJG"),m=f("BjJ7"),x=v.a.useForm,F={width:280,marginRight:10},ae={labelCol:{span:5},wrapperCol:{span:19}},xe=function(k){var L=k.callback,R=k.onCancel,h=x(),g=Object(J.a)(h,1),_=g[0];function E(je){L(je)}function Q(je,rt){_.setFieldsValue({src:"/api/attachments/".concat(je.id),type:rt.type})}function me(je){var rt=je.target.files[0];ye(rt,Q)}return w.a.createElement(v.a,Object(ce.a)({form:_},ae,{className:"upload-image-panel",onFinish:E}),w.a.createElement(v.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},w.a.createElement("div",{className:"flex-container"},w.a.createElement(v.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},w.a.createElement(I.a,{style:F})),w.a.createElement(oe,{onFileChange:me}))),w.a.createElement(v.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},w.a.createElement(I.a,{style:{width:264}})),w.a.createElement(v.a.Item,{style:{textAlign:"right"}},w.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.a.createElement(V.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function oe(k){var L=k.onFileChange;return w.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",w.a.createElement("input",{type:"file",onChange:L}))}function ye(k,L){if(!k)throw new String("\u6CA1\u6709\u6587\u4EF6");var R=new FormData;R.append("editormd-image-file",k),R.append("file_param_name","editormd-image-file"),R.append("byxhr","true");var h=new window.XMLHttpRequest;h.withCredentials=!0,h.addEventListener("load",function(g){L(JSON.parse(g.target.responseText),k)},!1),h.addEventListener("error",function(g){console.error(g)},!1),h.open("POST","".concat(m.a,"/api/attachments.json")),h.send(R)}var $=f("giR+"),q=f("fyUT"),z=f("7Kak"),Y=f("9yH6"),p=Y.a.Group,T={margin:"0 8px"},b=function(k){var L=k.callback,R=k.onCancel;function h(g){L(g)}return w.a.createElement(v.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:h},w.a.createElement("div",{className:"flex-container"},w.a.createElement("span",{style:T},"\u5355\u5143\u683C\u6570\uFF1A"),w.a.createElement("span",{style:T},"\u884C\u6570"),w.a.createElement(v.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},w.a.createElement(q.a,null)),w.a.createElement("span",{style:T},"\u5217\u6570"),w.a.createElement(v.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},w.a.createElement(q.a,null))),w.a.createElement("div",{className:"flex-container",style:{marginTop:12}},w.a.createElement("span",{style:T},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),w.a.createElement(v.a.Item,{name:"align"},w.a.createElement(p,null,w.a.createElement(Y.a,{value:"default"},w.a.createElement("i",{className:"fa fa-align-justify"})),w.a.createElement(Y.a,{value:"left"},w.a.createElement("i",{className:"fa fa-align-left"})),w.a.createElement(Y.a,{value:"center"},w.a.createElement("i",{className:"fa fa-align-center"})),w.a.createElement(Y.a,{value:"right"},w.a.createElement("i",{className:"fa fa-align-right"}))))),w.a.createElement("div",{className:"flex-container flex-end"},w.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.a.createElement(V.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))},re=f("m3rI"),fe="link",G="upload-image",pe="code-block",Ae="add-table",Ce="------------",_e={default:Ce,left:":".concat(Ce),center:":".concat(Ce,":"),right:"".concat(Ce,":")},ve=f("9VGf"),Ee,Ue;function Pe(){}var We=0,ze=1e4,Qe="\u2581",$e=`
|
|
**\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 Ye(k){return/^\d+$/.test(k)?"".concat(k,"px"):k}var Se=navigator.platform.toUpperCase().indexOf("MAC")>=0,it=Se?"Cmd":"Ctrl",Je=(Ee={},Object(N.a)(Ee,it+"-B","bold"),Object(N.a)(Ee,it+"-I","italic"),Ee),De=(Ue={},Object(N.a)(Ue,fe,"\u6DFB\u52A0\u94FE\u63A5"),Object(N.a)(Ue,pe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(N.a)(Ue,G,"\u6DFB\u52A0\u56FE\u7247"),Object(N.a)(Ue,Ae,"\u6DFB\u52A0\u8868\u683C"),Ue),He=Ie.a=function(k){var L=k.defaultValue,R=L===void 0?"":L,h=k.onChange,g=k.width,_=g===void 0?"100%":g,E=k.height,Q=E===void 0?400:E,me=k.miniToolbar,je=me===void 0?!1:me,rt=k.isFocus,ft=rt===void 0?!1:rt,ot=k.watch,Pt=k.insertTemp,pt=k.mode,lt=pt===void 0?"markdown":pt,Bt=k.id,bt=Bt===void 0?"markdown-editor-id":Bt,Vt=k.showResizeBar,Wt=Vt===void 0?!1:Vt,mt=k.noStorage,wn=mt===void 0?!1:mt,Xn=k.showNullButton,un=Xn===void 0?!1:Xn,Cn=k.hidetoolBar,pn=Cn===void 0?!1:Cn,bi=k.fullScreen,cn=bi===void 0?!1:bi,$n=k.onBlur,dr=k.onCMBeforeChange,St=k.onFullScreen,et=k.className,Sn=et===void 0?"":et,fr=k.disablePaste,dn=fr===void 0?!1:fr,gt=k.placeholder,On=gt===void 0?"":gt,Mn=k.values,Vn=Mn===void 0?"":Mn,Ne=Object(A.useState)(null),ut=Object(J.a)(Ne,2),Ke=ut[0],Ir=ut[1],hr=Object(A.useState)(R),Yn=Object(J.a)(hr,2),Jn=Yn[0],st=Yn[1],Zi=Object(A.useState)(ot),Ur=Object(J.a)(Zi,2),fn=Ur[0],on=Ur[1],yi=Object(A.useState)(cn),Fr=Object(J.a)(yi,2),nn=Fr[0],pr=Fr[1],_i=Object(A.useState)(""),mr=Object(J.a)(_i,2),kn=mr[0],Tn=mr[1],xi=Object(A.useState)(0),Br=Object(J.a)(xi,2),Zn=Br[0],Wr=Br[1],Ei=Object(A.useState)(Q),hn=Object(J.a)(Ei,2),wi=hn[0],Ci=hn[1],gr=Object(A.useState)(!1),Rn=Object(J.a)(gr,2),Ia=Rn[0],zr=Rn[1],Qn=Object(A.useRef)(),Hr=Object(A.useRef)(),Pn=Object(A.useRef)(),qn=Object(A.useRef)();Object(A.useEffect)(function(){st(Vn),Ke==null||Ke.setValue(Vn)},[Vn]),Object(A.useEffect)(function(){St==null||St(nn)},[nn]),Object(A.useEffect)(function(){if(Qn.current){var tt=X.a.fromTextArea(Qn.current,{mode:lt,lineNumbers:!je,lineWrapping:!0,value:R,autoCloseTags:!0,autoCloseBrackets:!0});ft&&tt.focus();function ct(dt,_t){if(dn){_t.preventDefault();return}var xt=_t.clipboardData;if(xt){var wt=xt.types.toString(),Lt=xt.items,Ot=["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"];if(wt==="Files"||xt.types.indexOf("Files")>-1){if(_t.preventDefault(),lt=="stex")return;try{var Kt,mn=Lt[1];((Kt=Lt[0])===null||Kt===void 0?void 0:Kt.kind)==="file"&&(mn=Lt[0]);var Ct=mn.getAsFile(),jn=Ct.name.split(".").pop();ye(Ct,function(Gt){if(Gt.id){var Nn,In,br;(Ct==null||((Nn=Ct.type)===null||Nn===void 0)?void 0:Nn.indexOf("image"))>-1?tt.replaceSelection(".concat(Gt.content_type,")")):(Ct==null||((In=Ct.type)===null||In===void 0)?void 0:In.indexOf("video"))>-1?tt.replaceSelection('<video width="100%" controls src="'.concat(re.a.API_SERVER,"/api/attachments/").concat(Gt.id,'"></video>')):(Ct==null||((br=Ct.type)===null||br===void 0)?void 0:br.indexOf("pdf"))>-1?tt.replaceSelection('<a href="'.concat(re.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Ct.type,'&disposition=inline" target="_blank">').concat(Ct.name,"</a>")):Ot.includes(jn)?tt.replaceSelection('<a href="'.concat(re.a.API_SERVER,"/api/attachments/").concat(Gt.id,'?type=office&disposition=inline" target="_blank">').concat(Ct.name,"</a>")):tt.replaceSelection("[".concat(Ct.name,"](").concat(re.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,")"))}else(Gt==null?void 0:Gt.status)===401&&(document.location.href="/user/login")})}catch(Gt){ge.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return tt.on("paste",ct),Ir(tt),function(){tt.off("paste",ct)}}},[]);var Si=Object(A.useCallback)(function(){if(Hr.current)try{}catch(tt){console.log(tt,"---- to set md editor body height")}},[wi,Hr,nn]);Object(A.useEffect)(function(){function tt(){var dt=new ie.default(function(_t){var xt=Object(le.a)(_t),wt;try{for(xt.s();!(wt=xt.n()).done;){var Lt=wt.value;(Lt.target.offsetHeight>0||Lt.target.offsetWidth>0)&&(Si(),Ke.setSize("100%","100%"),Ke.refresh())}}catch(Ot){xt.e(Ot)}finally{xt.f()}});return dt.observe(Qn.current.parentElement),dt}if(Ke){var ct=tt();return function(){ct.unobserve(Qn.current.parentElement)}}},[Ke,Si]),Object(A.useEffect)(function(){if(Ke){for(var tt=[],ct=function(){var Lt=_t[dt];xt=Object(J.a)(Lt,2);var Ot=xt[0],Kt=xt[1],mn=Object(N.a)({},Ot,function(){Kr(Kt)});tt.push(mn),Ke.addKeyMap(mn)},dt=0,_t=Object.entries(Je);dt<_t.length;dt++){var xt;ct()}return function(){var wt=Object(le.a)(tt),Lt;try{for(wt.s();!(Lt=wt.n()).done;){var Ot=Lt.value;Ke.removeKeyMap(Ot)}}catch(Kt){wt.e(Kt)}finally{wt.f()}}}},[Ke]),Object(A.useEffect)(function(){cn!==nn&&pr(cn)},[cn]),Object(ve.a)(function(){if(!wn&&Zn>0){var tt=new Date().getTime(),ct=window.sessionStorage.getItem(bt);tt>=Zn+ze&&(!ct||ct!==Jn)&&(window.sessionStorage.setItem(bt,Jn),zr(!0))}},ze),Object(A.useEffect)(function(){on(ot)},[Ke,ot]),Object(A.useEffect)(function(){Ke&&(ft&&Ke.focus())},[Ke,ft]),Object(A.useEffect)(function(){if(fn&&Ke){var tt=Ke.getScrollerElement();function ct(dt){var _t=dt.target;if(qn.current){var xt=_t.scrollTop/_t.scrollHeight;qn.current.scrollTop=qn.current.scrollHeight*xt}}return tt.addEventListener("scroll",ct),function(){tt.removeEventListener("scroll",ct)}}},[Ke,fn]),Object(A.useEffect)(function(){if(Ke&&dr){function tt(ct,dt){dr(ct,dt)}return Ke.on("beforeChange",tt),function(){Ke.off("beforeChange",tt)}}},[Ke,dr]),Object(A.useEffect)(function(){if(Ke&&$n){function tt(){$n(Ke.getValue())}return Ke.on("blur",tt),function(){Ke.off("blur",tt)}}},[Ke,$n]),Object(A.useEffect)(function(){if(Ke){function tt(ct){var dt=ct.getValue();st(dt),Wr(new Date().getTime()),ct.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),h&&h(dt)}return Ke.on("change",tt),function(){Ke.off("change",tt)}}},[Ke,h]),Object(A.useEffect)(function(){Ke&&(R==null?(Ke.setValue(""),st("")):R!==Ke.getValue()&&(Ke.setValue(R),st(R),Ke.setCursor(Ke.lineCount(),0)))},[Ke,R]);var Kr=Object(A.useCallback)(function(tt){var ct=Ke.getCursor(),dt=Ke.getSelection(),_t=dt.split(`
|
|
`);switch(tt){case"bold":return Ke.replaceSelection("**"+dt+"**"),dt===""&&Ke.setCursor(ct.line,ct.ch+2),Ke.focus();case"italic":return Ke.replaceSelection("*"+dt+"*"),dt===""&&Ke.setCursor(ct.line,ct.ch+1),Ke.focus();case"code":return Ke.replaceSelection("`"+dt+"`"),dt===""&&Ke.setCursor(ct.line,ct.ch+1),Ke.focus();case"inline-latex":return Ke.replaceSelection("`$$"+dt+"$$`"),dt===""&&Ke.setCursor(ct.line,ct.ch+3),Ke.focus();case"latex":return Ke.replaceSelection("```latex\n"+dt+"\n```"),Ke.setCursor(ct.line+1,dt.length+1),Ke.focus();case"line-break":return Ke.replaceSelection(`<br/>
|
|
`),Ke.focus();case"list-ul":return dt===""?Ke.replaceSelection("- "+dt):Ke.replaceSelection(_t.map(function(xt){return xt===""?"":"- ".concat(xt)}).join(`
|
|
`)),Ke.focus();case"list-ol":return dt===""?Ke.replaceSelection("1. "+dt):Ke.replaceSelection(_t.map(function(xt,wt){return xt===""?"":"".concat(wt+1,". ").concat(xt)}).join(`
|
|
`)),Ke.focus();case"add-null-ch":return dt===""&&Ke.setCursor(ct.line,ct.ch+1),Ke.replaceSelection(Qe),Ke.focus();case"inster-template-1":return dt===""&&Ke.setCursor(ct.line,ct.ch),Ke.replaceSelection($e),Ke.focus();case"eraser":return Ke.setValue(""),Ke.focus();case"trigger-watch":return on(!fn),Ke.focus();case"trigger-full-screen":return pr(!nn),Ke.focus();case fe:Tn(fe);return;case pe:Tn(pe);return;case G:Tn(G);return;case Ae:Tn(Ae);return;default:throw new Error}},[Ke,fn,nn]),er=Object(A.useCallback)(function(tt){Tn("");switch(kn){case fe:var ct=tt.title,dt=tt.link;return Ke.replaceSelection("[".concat(ct,"](").concat(dt,")")),Ke.focus();case pe:var _t=tt.language,xt=tt.content;return Ke.replaceSelection(["```"+_t,xt,"```"].join(`
|
|
`)),Ke.focus();case G:var wt=tt.src,Lt=tt.alt;return Ke.replaceSelection(".concat(wt,' "').concat(Lt,'" )')),Ke.focus();case Ae:for(var Ot=tt.row,Kt=tt.col,mn=tt.align,Ct=`
|
|
`,jn=0;jn<Ot;jn++){for(var Gt=[],Nn=[],In=0;In<Kt;In++)jn===1&&Nn.push(_e[mn]),Gt.push(" ");jn===1&&(Ct+="| ".concat(Nn.join(" | "),` |
|
|
`)),Ct+="| ".concat(Gt.join(Kt===1?"":" | "),` |
|
|
`)}return Ke.replaceSelection(Ct+`
|
|
`),Ke.focus();default:throw new Error}},[Ke,kn]),vr=Object(A.useMemo)(function(){switch(kn){case fe:return w.a.createElement(C,{callback:er,onCancel:yn});case pe:return w.a.createElement(u.b,{callback:er,onCancel:yn});case G:return w.a.createElement(xe,{callback:er,onCancel:yn});case Ae:return w.a.createElement(b,{callback:er,onCancel:yn});default:return null}},[kn]);function yn(){Tn("")}Object(A.useEffect)(function(){if(Pn.current){var tt=Pn.current,ct=!1,dt=0;function _t(Lt){ct=!0,dt=Lt.pageY}function xt(){ct=!1}function wt(Lt){if(ct){var Ot=Lt.pageY-dt;Ot<0&&(Ot=0),Ot>300&&(Ot=300);var Kt=Q+Ot+"px";Ci(Kt)}}return tt.addEventListener("mousedown",_t),document.addEventListener("mousemove",wt),document.addEventListener("mouseup",xt),function(){tt.removeEventListener("mousedown",_t),document.removeEventListener("mousemove",wt),document.removeEventListener("mouseup",xt)}}},[Ke,Pn]),Object(A.useEffect)(function(){Ci(Q)},[Q]);var Gr=Ye(_),Oi=Ye(wi),ki={width:Gr,height:Oi},Xr=Object(A.useMemo)(function(){if(Zn){var tt=new Date(Zn),ct=tt.getHours(),dt=tt.getMinutes(),_t=tt.getSeconds();return ct=ct<10?"0"+ct:ct,dt=dt<10?"0"+dt:dt,_t=_t<10?"0"+_t:_t,"".concat(ct,":").concat(dt,":").concat(_t)}return 0},[Zn]);function Ua(){window.sessionStorage.removeItem(bt),zr(!1),Wr(0)}function Qi(){zr(!1),Wr(0),Ke.setValue(window.sessionStorage.getItem(bt))}return w.a.createElement(A.Fragment,null,w.a.createElement("div",{className:"markdown-editor-wrapper",ref:Hr},w.a.createElement("div",{className:"markdown-editor-container ".concat(Sn," ").concat(fn?"on-preview":""," ").concat(je?"mini":""," ").concat(nn?"full-screen":""),style:ki},w.a.createElement(Te,{insertTemp:Pt,watch:fn,fullScreen:nn,showNullButton:un,onActionCallback:Kr,hidetoolBar:pn}),w.a.createElement("div",{className:"markdown-editor-body"},w.a.createElement("div",{className:"codemirror-container"},w.a.createElement("textarea",{ref:Qn,placeholder:On})),fn?w.a.createElement("div",{ref:qn,className:"preview-container"},lt==="stex"&&w.a.createElement(Fe,{value:Jn}),lt!=="stex"&&w.a.createElement(ke.a,{value:Jn})):null))),Wt?w.a.createElement("a",{ref:Pn,className:"editor-resize"}):null,w.a.createElement(se.a,null,De[kn]?w.a.createElement(be.a,{centered:!0,title:De[kn],visible:!0,onCancel:yn,footer:null},vr):null))}},SJMd:function(qe,Ie){/**
|
|
* @license
|
|
* Copyright (C) 2006 Google Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/var f,W,be,le=!1,Oe,ge;window.PR_SHOULD_USE_CONTINUATION=!0;var J,N;(function(){var A=window,w=["break,continue,do,else,for,if,return,while"],H=[w,"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"],X=[H,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],ie=[X,"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"],ue=[X,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],K=[X,"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"],P="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=[X,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],j="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",B=[w,"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"],ne=[w,"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"],ke=[w,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Fe=[ie,K,ue,U,j,B,ne,ke],ce=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,we="str",Me="kwd",de="com",he="typ",Te="lit",se="pun",y="pln",V="tag",M="dec",v="src",ee="atn",I="atv",O="nocode",C="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function u(G){for(var pe=0,Ae=!1,Ce=!1,_e=0,ve=G.length;_e<ve;++_e){var Ee=G[_e];if(Ee.ignoreCase)Ce=!0;else if(/[a-z]/i.test(Ee.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ae=!0,Ce=!1;break}}var Ue={b:8,t:9,n:10,v:11,f:12,r:13};function Pe(Ye){var Se=Ye.charCodeAt(0);if(Se!==92)return Se;var it=Ye.charAt(1);return Se=Ue[it],Se||("0"<=it&&it<="7"?parseInt(Ye.substring(1),8):it==="u"||it==="x"?parseInt(Ye.substring(2),16):Ye.charCodeAt(1))}function We(Ye){if(Ye<32)return(Ye<16?"\\x0":"\\x")+Ye.toString(16);var Se=String.fromCharCode(Ye);return Se==="\\"||Se==="-"||Se==="]"||Se==="^"?"\\"+Se:Se}function ze(Ye){var Se=Ye.substring(1,Ye.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=[],Je=Se[0]==="^",De=["["];Je&&De.push("^");for(var He=Je?1:0,k=Se.length;He<k;++He){var L=Se[He];if(/\\[bdsw]/i.test(L))De.push(L);else{var R=Pe(L),h;He+2<k&&Se[He+1]==="-"?(h=Pe(Se[He+2]),He+=2):h=R,it.push([R,h]),h<65||R>122||(h<65||R>90||it.push([Math.max(65,R)|32,Math.min(h,90)|32]),h<97||R>122||it.push([Math.max(97,R)&~32,Math.min(h,122)&~32]))}}it.sort(function(Q,me){return Q[0]-me[0]||me[1]-Q[1]});for(var g=[],_=[],He=0;He<it.length;++He){var E=it[He];E[0]<=_[1]+1?_[1]=Math.max(_[1],E[1]):g.push(_=E)}for(var He=0;He<g.length;++He){var E=g[He];De.push(We(E[0])),E[1]>E[0]&&(E[1]+1>E[0]&&De.push("-"),De.push(We(E[1])))}return De.push("]"),De.join("")}function Qe(Ye){for(var Se=Ye.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,Je=[],De=0,He=0;De<it;++De){var k=Se[De];if(k==="(")++He;else if(k.charAt(0)==="\\"){var L=+k.substring(1);L&&(L<=He?Je[L]=-1:Se[De]=We(L))}}for(var De=1;De<Je.length;++De)Je[De]===-1&&(Je[De]=++pe);for(var De=0,He=0;De<it;++De){var k=Se[De];if(k==="(")++He,Je[He]||(Se[De]="(?:");else if(k.charAt(0)==="\\"){var L=+k.substring(1);L&&L<=He&&(Se[De]="\\"+Je[L])}}for(var De=0;De<it;++De)Se[De]==="^"&&Se[De+1]!=="^"&&(Se[De]="");if(Ye.ignoreCase&&Ae)for(var De=0;De<it;++De){var k=Se[De],R=k.charAt(0);k.length>=2&&R==="["?Se[De]=ze(k):R!=="\\"&&(Se[De]=k.replace(/[a-zA-Z]/g,function(_){var E=_.charCodeAt(0);return"["+String.fromCharCode(E&~32,E|32)+"]"}))}return Se.join("")}for(var $e=[],_e=0,ve=G.length;_e<ve;++_e){var Ee=G[_e];if(Ee.global||Ee.multiline)throw new Error(""+Ee);$e.push("(?:"+Qe(Ee)+")")}return new RegExp($e.join("|"),Ce?"gi":"g")}function l(G,pe){var Ae=/(?:^|\s)nocode(?:\s|$)/,Ce=[],_e=0,ve=[],Ee=0;function Ue(Pe){var We=Pe.nodeType;if(We==1){if(Ae.test(Pe.className))return;for(var ze=Pe.firstChild;ze;ze=ze.nextSibling)Ue(ze);var Qe=Pe.nodeName.toLowerCase();(Qe==="br"||Qe==="li")&&(Ce[Ee]=`
|
|
`,ve[Ee<<1]=_e++,ve[Ee++<<1|1]=Pe)}else if(We==3||We==4){var $e=Pe.nodeValue;$e.length&&(pe?$e=$e.replace(/\r\n?/g,`
|
|
`):$e=$e.replace(/[ \t\r\n]+/g," "),Ce[Ee]=$e,ve[Ee<<1]=_e,_e+=$e.length,ve[Ee++<<1|1]=Pe)}}return Ue(G),{sourceCode:Ce.join("").replace(/\n$/,""),spans:ve}}function m(G,pe,Ae,Ce,_e){if(!Ae)return;var ve={sourceNode:G,pre:1,langExtension:null,numberLines:null,sourceCode:Ae,spans:null,basePos:pe,decorations:null};Ce(ve),_e.push.apply(_e,ve.decorations)}var x=/\S/;function F(G){for(var pe=void 0,Ae=G.firstChild;Ae;Ae=Ae.nextSibling){var Ce=Ae.nodeType;pe=Ce===1?pe?G:Ae:Ce===3&&x.test(Ae.nodeValue)?G:pe}return pe===G?void 0:pe}function ae(G,pe){var Ae={},Ce;(function(){for(var Ee=G.concat(pe),Ue=[],Pe={},We=0,ze=Ee.length;We<ze;++We){var Qe=Ee[We],$e=Qe[3];if($e)for(var Ye=$e.length;--Ye>=0;)Ae[$e.charAt(Ye)]=Qe;var Se=Qe[1],it=""+Se;Pe.hasOwnProperty(it)||(Ue.push(Se),Pe[it]=null)}Ue.push(/[\0-\uffff]/),Ce=u(Ue)})();var _e=pe.length,ve=function(Ee){for(var Ue=Ee.sourceCode,Pe=Ee.basePos,We=Ee.sourceNode,ze=[Pe,y],Qe=0,$e=Ue.match(Ce)||[],Ye={},Se=0,it=$e.length;Se<it;++Se){var Je=$e[Se],De=Ye[Je],He=void 0,k;if(typeof De=="string")k=!1;else{var L=Ae[Je.charAt(0)];if(L)He=Je.match(L[1]),De=L[0];else{for(var R=0;R<_e;++R)if(L=pe[R],He=Je.match(L[1]),He){De=L[0];break}He||(De=y)}k=De.length>=5&&De.substring(0,5)==="lang-",k&&!(He&&typeof He[1]=="string")&&(k=!1,De=v),k||(Ye[Je]=De)}var h=Qe;if(Qe+=Je.length,!k)ze.push(Pe+h,De);else{var g=He[1],_=Je.indexOf(g),E=_+g.length;He[2]&&(E=Je.length-He[2].length,_=E-g.length);var Q=De.substring(5);m(We,Pe+h,Je.substring(0,_),ve,ze),m(We,Pe+h+_,g,Y(Q,g),ze),m(We,Pe+h+E,Je.substring(E),ve,ze)}}Ee.decorations=ze};return ve}function xe(G){var pe=[],Ae=[];G.tripleQuotedStrings?pe.push([we,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):G.multiLineStrings?pe.push([we,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):pe.push([we,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),G.verbatimStrings&&Ae.push([we,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ce=G.hashComments;Ce&&(G.cStyleComments?(Ce>1?pe.push([de,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):pe.push([de,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ae.push([we,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):pe.push([de,/^#[^\r\n]*/,null,"#"])),G.cStyleComments&&(Ae.push([de,/^\/\/[^\r\n]*/,null]),Ae.push([de,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var _e=G.regexLiterals;if(_e){var ve=_e>1?"":`
|
|
\r`,Ee=ve?".":"[\\S\\s]",Ue="/(?=[^/*"+ve+"])(?:[^/\\x5B\\x5C"+ve+"]|\\x5C"+Ee+"|\\x5B(?:[^\\x5C\\x5D"+ve+"]|\\x5C"+Ee+")*(?:\\x5D|$))+/";Ae.push(["lang-regex",RegExp("^"+C+"("+Ue+")")])}var Pe=G.types;Pe&&Ae.push([he,Pe]);var We=(""+G.keywords).replace(/^ | $/g,"");We.length&&Ae.push([Me,new RegExp("^(?:"+We.replace(/[\s,]+/g,"|")+")\\b"),null]),pe.push([y,/^\s+/,null,` \r
|
|
\xA0`]);var ze="^.[^\\s\\w.$@'\"`/\\\\]*";return G.regexLiterals&&(ze+="(?!s*/)"),Ae.push([Te,/^@[a-z_$][a-z_$@0-9]*/i,null],[he,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[y,/^[a-z_$][a-z_$@0-9]*/i,null],[Te,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[y,/^\\[\s\S]?/,null],[se,new RegExp(ze),null]),ae(pe,Ae)}var oe=xe({keywords:Fe,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ye(G,pe,Ae){for(var Ce=/(?:^|\s)nocode(?:\s|$)/,_e=/\r\n?|\n/,ve=G.ownerDocument,Ee=ve.createElement("li");G.firstChild;)Ee.appendChild(G.firstChild);var Ue=[Ee];function Pe(Se){var it=Se.nodeType;if(it==1&&!Ce.test(Se.className))if(Se.nodeName==="br")We(Se),Se.parentNode&&Se.parentNode.removeChild(Se);else for(var Je=Se.firstChild;Je;Je=Je.nextSibling)Pe(Je);else if((it==3||it==4)&&Ae){var De=Se.nodeValue,He=De.match(_e);if(He){var k=De.substring(0,He.index);Se.nodeValue=k;var L=De.substring(He.index+He[0].length);if(L){var R=Se.parentNode;R.insertBefore(ve.createTextNode(L),Se.nextSibling)}We(Se),k||Se.parentNode.removeChild(Se)}}}function We(Se){for(;!Se.nextSibling;)if(Se=Se.parentNode,!Se)return;function it(He,k){var L=k?He.cloneNode(!1):He,R=He.parentNode;if(R){var h=it(R,1),g=He.nextSibling;h.appendChild(L);for(var _=g;_;_=g)g=_.nextSibling,h.appendChild(_)}return L}for(var Je=it(Se.nextSibling,0),De;(De=Je.parentNode)&&De.nodeType===1;)Je=De;Ue.push(Je)}for(var ze=0;ze<Ue.length;++ze)Pe(Ue[ze]);pe===(pe|0)&&Ue[0].setAttribute("value",pe);var Qe=ve.createElement("ol");Qe.className="linenums";for(var $e=Math.max(0,pe-1|0)||0,ze=0,Ye=Ue.length;ze<Ye;++ze)Ee=Ue[ze],Ee.className="L"+(ze+$e)%10,Ee.firstChild||Ee.appendChild(ve.createTextNode("\xA0")),Qe.appendChild(Ee);G.appendChild(Qe)}function $(G){var pe=/\bMSIE\s(\d+)/.exec(navigator.userAgent);pe=pe&&+pe[1]<=8;var Ae=/\n/g,Ce=G.sourceCode,_e=Ce.length,ve=0,Ee=G.spans,Ue=Ee.length,Pe=0,We=G.decorations,ze=We.length,Qe=0;We[ze]=_e;var $e,Ye;for(Ye=$e=0;Ye<ze;)We[Ye]!==We[Ye+2]?(We[$e++]=We[Ye++],We[$e++]=We[Ye++]):Ye+=2;for(ze=$e,Ye=$e=0;Ye<ze;){for(var Se=We[Ye],it=We[Ye+1],Je=Ye+2;Je+2<=ze&&We[Je+1]===it;)Je+=2;We[$e++]=Se,We[$e++]=it,Ye=Je}ze=We.length=$e;var De=G.sourceNode,He="";De&&(He=De.style.display,De.style.display="none");try{for(var k=null;Pe<Ue;){var L=Ee[Pe],R=Ee[Pe+2]||_e,h=We[Qe+2]||_e,Je=Math.min(R,h),g=Ee[Pe+1],_;if(g.nodeType!==1&&(_=Ce.substring(ve,Je))){pe&&(_=_.replace(Ae,"\r")),g.nodeValue=_;var E=g.ownerDocument,Q=E.createElement("span");Q.className=We[Qe+1];var me=g.parentNode;me.replaceChild(Q,g),Q.appendChild(g),ve<R&&(Ee[Pe+1]=g=E.createTextNode(Ce.substring(Je,R)),me.insertBefore(g,Q.nextSibling))}ve=Je,ve>=R&&(Pe+=2),ve>=h&&(Qe+=2)}}finally{De&&(De.style.display=He)}}var q={};function z(G,pe){for(var Ae=pe.length;--Ae>=0;){var Ce=pe[Ae];q.hasOwnProperty(Ce)?A.console&&console.warn("cannot override language handler %s",Ce):q[Ce]=G}}function Y(G,pe){return G&&q.hasOwnProperty(G)||(G=/^\s*</.test(pe)?"default-markup":"default-code"),q[G]}z(oe,["default-code"]),z(ae([],[[y,/^[^<?]+/],[M,/^<!\w[^>]*(?:>|$)/],[de,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[se,/^(?:<[%?]|[%?]>)/],["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"]),z(ae([[y,/^[\s]+/,null,` \r
|
|
`],[I,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[V,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[ee,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[se,/^[=<>\/]+/],["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"]),z(ae([],[[I,/^[\s\S]+/]]),["uq.val"]),z(xe({keywords:ie,hashComments:!0,cStyleComments:!0,types:ce}),["c","cc","cpp","cxx","cyc","m"]),z(xe({keywords:"null,true,false"}),["json"]),z(xe({keywords:K,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:ce}),["cs"]),z(xe({keywords:ue,cStyleComments:!0}),["java"]),z(xe({keywords:ke,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),z(xe({keywords:B,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),z(xe({keywords:j,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),z(xe({keywords:ne,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),z(xe({keywords:U,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),z(xe({keywords:P,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),z(ae([],[[we,/^[\s\S]+/]]),["regex"]);function p(G){var pe=G.langExtension;try{var Ae=l(G.sourceNode,G.pre),Ce=Ae.sourceCode;G.sourceCode=Ce,G.spans=Ae.spans,G.basePos=0,Y(pe,Ce)(G),$(G)}catch(_e){A.console&&console.log(_e&&_e.stack||_e)}}function T(G,pe,Ae){var Ce=Ae||!1,_e=pe||null,ve=document.createElement("div");ve.innerHTML="<pre>"+G+"</pre>",ve=ve.firstChild,Ce&&ye(ve,Ce,!0);var Ee={langExtension:_e,numberLines:Ce,sourceNode:ve,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return p(Ee),ve.innerHTML}function b(G,pe){var Ae=pe||document.body,Ce=Ae.ownerDocument||document;function _e(L){return Ae.getElementsByTagName(L)}for(var ve=[_e("pre"),_e("code"),_e("xmp")],Ee=[],Ue=0;Ue<ve.length;++Ue)for(var Pe=0,We=ve[Ue].length;Pe<We;++Pe)Ee.push(ve[Ue][Pe]);ve=null;var ze=Date;ze.now||(ze={now:function(){return+new Date}});var Qe=0,$e=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ye=/\bprettyprint\b/,Se=/\bprettyprinted\b/,it=/pre|xmp/i,Je=/^code$/i,De=/^(?:pre|code|xmp)$/i,He={};function k(){for(var L=A.PR_SHOULD_USE_CONTINUATION?ze.now()+250:Infinity;Qe<Ee.length&&ze.now()<L;Qe++){for(var R=Ee[Qe],h=He,g=R;g=g.previousSibling;){var _=g.nodeType,E=(_===7||_===8)&&g.nodeValue;if(E?!/^\??prettify\b/.test(E):_!==3||/\S/.test(g.nodeValue))break;if(E){h={},E.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Wt,mt,wn){h[mt]=wn});break}}var Q=R.className;if((h!==He||Ye.test(Q))&&!Se.test(Q)){for(var me=!1,je=R.parentNode;je;je=je.parentNode){var rt=je.tagName;if(De.test(rt)&&je.className&&Ye.test(je.className)){me=!0;break}}if(!me){R.className+=" prettyprinted";var ft=h.lang;if(!ft){ft=Q.match($e);var ot;!ft&&(ot=F(R))&&Je.test(ot.tagName)&&(ft=ot.className.match($e)),ft&&(ft=ft[1])}var Pt;if(it.test(R.tagName))Pt=1;else{var pt=R.currentStyle,lt=Ce.defaultView,Bt=pt?pt.whiteSpace:lt&<.getComputedStyle?lt.getComputedStyle(R,null).getPropertyValue("white-space"):0;Pt=Bt&&Bt.substring(0,3)==="pre"}var bt=h.linenums;(bt=bt==="true"||+bt)||(bt=Q.match(/\blinenums\b(?::(\d+))?/),bt=bt?bt[1]&&bt[1].length?+bt[1]:!0:!1),bt&&ye(R,bt,Pt);var Vt={langExtension:ft,sourceNode:R,numberLines:bt,pre:Pt,sourceCode:null,basePos:null,spans:null,decorations:null};p(Vt)}}}Qe<Ee.length?A.setTimeout(k,250):typeof G=="function"&&G()}k()}var re=A.PR={createSimpleLexer:ae,registerLangHandler:z,sourceDecorator:xe,PR_ATTRIB_NAME:ee,PR_ATTRIB_VALUE:I,PR_COMMENT:de,PR_DECLARATION:M,PR_KEYWORD:Me,PR_LITERAL:Te,PR_NOCODE:O,PR_PLAIN:y,PR_PUNCTUATION:se,PR_SOURCE:v,PR_STRING:we,PR_TAG:V,PR_TYPE:he,prettyPrintOne:le?A.prettyPrintOne=T:J=T,prettyPrint:N=le?A.prettyPrint=b:N=b},fe=A.define;typeof fe=="function"&&fe.amd&&fe("google-code-prettify",[],function(){return re})})()},"VrN/":function(qe,Ie,f){(function(W,be){qe.exports=be()})(this,function(){"use strict";var W=navigator.userAgent,be=navigator.platform,le=/gecko\/\d/i.test(W),Oe=/MSIE \d/.test(W),ge=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(W),J=/Edge\/(\d+)/.exec(W),N=Oe||ge||J,A=N&&(Oe?document.documentMode||6:+(J||ge)[1]),w=!J&&/WebKit\//.test(W),H=w&&/Qt\/\d+\.\d+/.test(W),X=!J&&/Chrome\//.test(W),ie=/Opera\//.test(W),ue=/Apple Computer/.test(navigator.vendor),K=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(W),P=/PhantomJS/.test(W),U=!J&&/AppleWebKit/.test(W)&&/Mobile\/\w+/.test(W),j=/Android/.test(W),B=U||j||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(W),ne=U||/Mac/.test(be),ke=/\bCrOS\b/.test(W),Fe=/win/i.test(be),ce=ie&&W.match(/Version\/(\d*\.\d*)/);ce&&(ce=Number(ce[1])),ce&&ce>=15&&(ie=!1,w=!0);var we=ne&&(H||ie&&(ce==null||ce<12.11)),Me=le||N&&A>=9;function de(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var he=function(e,t){var r=e.className,n=de(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function Te(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function se(e,t){return Te(e).appendChild(t)}function y(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function V(e,t,r,n){var i=y(e,t,r,n);return i.setAttribute("role","presentation"),i}var M;document.createRange?M=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:M=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function v(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 I(e,t){var r=e.className;de(t).test(r)||(e.className+=(r?" ":"")+t)}function O(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!de(r[n]).test(t)&&(t+=" "+r[n]);return t}var C=function(e){e.select()};U?C=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:N&&(C=function(e){try{e.select()}catch(t){}});function u(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function l(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function m(e,t,r,n,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,o=i||0;;){var s=e.indexOf(" ",a);if(s<0||s>=t)return o+(t-a);o+=s-a,o+=r-o%r,a=s+1}}var x=function(){this.id=null,this.f=null,this.time=0,this.handler=u(this.onTimeout,this)};x.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},x.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function F(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var ae=50,xe={toString:function(){return"CodeMirror.Pass"}},oe={scroll:!1},ye={origin:"*mouse"},$={origin:"+move"};function q(e,t,r){for(var n=0,i=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var o=a-n;if(a==e.length||i+o>=t)return n+Math.min(o,t-i);if(i+=a-n,i+=r-i%r,n=a+1,i>=t)return n}}var z=[""];function Y(e){for(;z.length<=e;)z.push(p(z)+" ");return z[e]}function p(e){return e[e.length-1]}function T(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function b(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function re(){}function fe(e,t){var r;return Object.create?r=Object.create(e):(re.prototype=e,r=new re),t&&l(t,r),r}var G=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function pe(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||G.test(e))}function Ae(e,t){return t?t.source.indexOf("\\w")>-1&&pe(e)?!0:t.test(e):pe(e)}function Ce(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var _e=/[\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 ve(e){return e.charCodeAt(0)>=768&&_e.test(e)}function Ee(e,t,r){for(;(r<0?t>0:t<e.length)&&ve(e.charAt(t));)t+=r;return t}function Ue(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,a=n<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:r;e(a)?r=a:t=a+n}}function Pe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<r&&o.to>t||t==r&&o.to==t)&&(n(Math.max(o.from,t),Math.min(o.to,r),o.level==1?"rtl":"ltr",a),i=!0)}i||n(t,r,"ltr")}var We=null;function ze(e,t,r){var n;We=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&r=="before"?n=i:We=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:We=i)}return n!=null?n:We}var Qe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(d){return d<=247?e.charAt(d):1424<=d&&d<=1524?"R":1536<=d&&d<=1785?t.charAt(d-1536):1774<=d&&d<=2220?"r":8192<=d&&d<=8203?"w":d==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function c(d,S,D){this.level=d,this.from=S,this.to=D}return function(d,S){var D=S=="ltr"?"L":"R";if(d.length==0||S=="ltr"&&!n.test(d))return!1;for(var te=d.length,Z=[],Le=0;Le<te;++Le)Z.push(r(d.charCodeAt(Le)));for(var Re=0,Be=D;Re<te;++Re){var Ge=Z[Re];Ge=="m"?Z[Re]=Be:Be=Ge}for(var Ve=0,Xe=D;Ve<te;++Ve){var Ze=Z[Ve];Ze=="1"&&Xe=="r"?Z[Ve]="n":a.test(Ze)&&(Xe=Ze,Ze=="r"&&(Z[Ve]="R"))}for(var at=1,nt=Z[0];at<te-1;++at){var ht=Z[at];ht=="+"&&nt=="1"&&Z[at+1]=="1"?Z[at]="1":ht==","&&nt==Z[at+1]&&(nt=="1"||nt=="n")&&(Z[at]=nt),nt=ht}for(var Et=0;Et<te;++Et){var Ut=Z[Et];if(Ut==",")Z[Et]="N";else if(Ut=="%"){var Tt=void 0;for(Tt=Et+1;Tt<te&&Z[Tt]=="%";++Tt);for(var an=Et&&Z[Et-1]=="!"||Tt<te&&Z[Tt]=="1"?"1":"N",qt=Et;qt<Tt;++qt)Z[qt]=an;Et=Tt-1}}for(var Mt=0,en=D;Mt<te;++Mt){var Ht=Z[Mt];en=="L"&&Ht=="1"?Z[Mt]="L":a.test(Ht)&&(en=Ht)}for(var jt=0;jt<te;++jt)if(i.test(Z[jt])){var Rt=void 0;for(Rt=jt+1;Rt<te&&i.test(Z[Rt]);++Rt);for(var At=(jt?Z[jt-1]:D)=="L",tn=(Rt<te?Z[Rt]:D)=="L",jr=At==tn?At?"L":"R":D,Gn=jt;Gn<Rt;++Gn)Z[Gn]=jr;jt=Rt-1}for(var $t=[],En,Ft=0;Ft<te;)if(o.test(Z[Ft])){var ja=Ft;for(++Ft;Ft<te&&o.test(Z[Ft]);++Ft);$t.push(new c(0,ja,Ft))}else{var Dn=Ft,ur=$t.length,cr=S=="rtl"?1:0;for(++Ft;Ft<te&&Z[Ft]!="L";++Ft);for(var Jt=Dn;Jt<Ft;)if(s.test(Z[Jt])){Dn<Jt&&($t.splice(ur,0,new c(1,Dn,Jt)),ur+=cr);var Nr=Jt;for(++Jt;Jt<Ft&&s.test(Z[Jt]);++Jt);$t.splice(ur,0,new c(2,Nr,Jt)),ur+=cr,Dn=Jt}else++Jt;Dn<Ft&&$t.splice(ur,0,new c(1,Dn,Ft))}return S=="ltr"&&($t[0].level==1&&(En=d.match(/^\s+/))&&($t[0].from=En[0].length,$t.unshift(new c(0,0,En[0].length))),p($t).level==1&&(En=d.match(/\s+$/))&&(p($t).to-=En[0].length,$t.push(new c(0,te-En[0].length,te)))),S=="rtl"?$t.reverse():$t}}();function $e(e,t){var r=e.order;return r==null&&(r=e.order=Qe(e.text,t)),r}var Ye=[],Se=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Ye).concat(r)}};function it(e,t){return e._handlers&&e._handlers[t]||Ye}function Je(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var a=F(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function De(e,t){var r=it(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function He(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),De(e,r||t.type,e,t),_(t)||t.codemirrorIgnore}function k(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)F(r,t[n])==-1&&r.push(t[n])}function L(e,t){return it(e,t).length>0}function R(e){e.prototype.on=function(t,r){Se(this,t,r)},e.prototype.off=function(t,r){Je(this,t,r)}}function h(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function g(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function _(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function E(e){h(e),g(e)}function Q(e){return e.target||e.srcElement}function me(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ne&&e.ctrlKey&&t==1&&(t=3),t}var je=function(){if(N&&A<9)return!1;var e=y("div");return"draggable"in e||"dragDrop"in e}(),rt;function ft(e){if(rt==null){var t=y("span","\u200B");se(e,y("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(rt=t.offsetWidth<=1&&t.offsetHeight>2&&!(N&&A<8))}var r=rt?y("span","\u200B"):y("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var ot;function Pt(e){if(ot!=null)return ot;var t=se(e,document.createTextNode("A\u062EA")),r=M(t,0,1).getBoundingClientRect(),n=M(t,1,2).getBoundingClientRect();return Te(e),!r||r.left==r.right?!1:ot=n.right-r.right<3}var pt=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
|
|
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=a.indexOf("\r");o!=-1?(r.push(a.slice(0,o)),t+=o+1):(r.push(a),t=i+1)}return r}: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(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Bt=function(){var e=y("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),bt=null;function Vt(e){if(bt!=null)return bt;var t=se(e,y("span","x")),r=t.getBoundingClientRect(),n=M(t,0,1).getBoundingClientRect();return bt=Math.abs(r.left-n.left)>1}var Wt={},mt={};function wn(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wt[e]=t}function Xn(e,t){mt[e]=t}function un(e){if(typeof e=="string"&&mt.hasOwnProperty(e))e=mt[e];else if(e&&typeof e.name=="string"&&mt.hasOwnProperty(e.name)){var t=mt[e.name];typeof t=="string"&&(t={name:t}),e=fe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return un("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return un("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Cn(e,t){t=un(t);var r=Wt[t.name];if(!r)return Cn(e,"text/plain");var n=r(e,t);if(pn.hasOwnProperty(t.name)){var i=pn[t.name];for(var a in i){if(!i.hasOwnProperty(a))continue;n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=i[a]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)n[o]=t.modeProps[o];return n}var pn={};function bi(e,t){var r=pn.hasOwnProperty(e)?pn[e]:pn[e]={};l(t,r)}function cn(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function $n(e,t){for(var r;e.innerMode&&!(r=e.innerMode(t),!r||r.mode==e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function dr(e,t,r){return e.startState?e.startState(t,r):!0}var St=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};St.prototype.eol=function(){return this.pos>=this.string.length},St.prototype.sol=function(){return this.pos==this.lineStart},St.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},St.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},St.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},St.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},St.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},St.prototype.skipToEnd=function(){this.pos=this.string.length},St.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},St.prototype.backUp=function(e){this.pos-=e},St.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=m(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?m(this.string,this.lineStart,this.tabSize):0)},St.prototype.indentation=function(){return m(this.string,null,this.tabSize)-(this.lineStart?m(this.string,this.lineStart,this.tabSize):0)},St.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(o){return r?o.toLowerCase():o},i=this.string.substr(this.pos,e.length);if(n(i)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},St.prototype.current=function(){return this.string.slice(this.start,this.pos)},St.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},St.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},St.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function et(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],a=i.chunkSize();if(t<a){r=i;break}t-=a}return r.lines[t]}function Sn(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(a){var o=a.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function fr(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function dn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function gt(e){if(e.parent==null)return null;for(var t=e.parent,r=F(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;!(n.children[i]==t);++i)r+=n.children[i].chunkSize();return r+t.first}function On(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],a=i.height;if(t<a){e=i;continue e}t-=a,r+=i.chunkSize()}return r}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o],c=s.height;if(t<c)break;t-=c}return r+o}function Mn(e,t){return t>=e.first&&t<e.first+e.size}function Vn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Ne(e,t,r){if(r===void 0&&(r=null),!(this instanceof Ne))return new Ne(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ut(e,t){return e.line-t.line||e.ch-t.ch}function Ke(e,t){return e.sticky==t.sticky&&ut(e,t)==0}function Ir(e){return Ne(e.line,e.ch)}function hr(e,t){return ut(e,t)<0?t:e}function Yn(e,t){return ut(e,t)<0?e:t}function Jn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function st(e,t){if(t.line<e.first)return Ne(e.first,0);var r=e.first+e.size-1;return t.line>r?Ne(r,et(e,r).text.length):Zi(t,et(e,t.line).text.length)}function Zi(e,t){var r=e.ch;return r==null||r>t?Ne(e.line,t):r<0?Ne(e.line,0):e}function Ur(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=st(e,t[n]);return r}var fn=function(e,t){this.state=e,this.lookAhead=t},on=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};on.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},on.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}},on.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},on.fromSaved=function(e,t,r){return t instanceof fn?new on(e,cn(e.mode,t.state),r,t.lookAhead):new on(e,cn(e.mode,t),r)},on.prototype.save=function(e){var t=e!==!1?cn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new fn(t,this.maxLookAhead):t};function yi(e,t,r,n){var i=[e.state.modeGen],a={};Br(e,t.text,e.doc.mode,r,function(d,S){return i.push(d,S)},a,n);for(var o=r.state,s=function(d){r.baseTokens=i;var S=e.state.overlays[d],D=1,te=0;r.state=!0,Br(e,t.text,S.mode,r,function(Z,Le){for(var Re=D;te<Z;){var Be=i[D];Be>Z&&i.splice(D,1,Z,i[D+1],Be),D+=2,te=Math.min(Z,Be)}if(!Le)return;if(S.opaque)i.splice(Re,D-Re,Z,"overlay "+Le),D=Re+2;else for(;Re<D;Re+=2){var Ge=i[Re+1];i[Re+1]=(Ge?Ge+" ":"")+"overlay "+Le}},a),r.state=o,r.baseTokens=null,r.baseTokenPos=1},c=0;c<e.state.overlays.length;++c)s(c);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function Fr(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=nn(e,gt(t)),i=t.text.length>e.options.maxHighlightLength&&cn(e.doc.mode,n.state),a=yi(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function nn(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new on(n,!0,t);var a=Zn(e,t,r),o=a>n.first&&et(n,a-1).stateAfter,s=o?on.fromSaved(n,o,a):new on(n,dr(n.mode),a);return n.iter(a,t,function(c){pr(e,c.text,s);var d=s.line;c.stateAfter=d==t-1||d%5==0||d>=i.viewFrom&&d<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function pr(e,t,r,n){var i=e.doc.mode,a=new St(t,e.options.tabSize,r);for(a.start=a.pos=n||0,t==""&&_i(i,r.state);!a.eol();)mr(i,a,r.state),a.start=a.pos}function _i(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=$n(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function mr(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=$n(e,r).mode);var a=e.token(t,r);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var kn=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Tn(e,t,r,n){var i=e.doc,a=i.mode,o;t=st(i,t);var s=et(i,t.line),c=nn(e,t.line,r),d=new St(s.text,e.options.tabSize,c),S;for(n&&(S=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=mr(a,d,c.state),n&&S.push(new kn(d,o,cn(i.mode,c.state)));return n?S:new kn(d,o,c.state)}function xi(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Br(e,t,r,n,i,a,o){var s=r.flattenSpans;s==null&&(s=e.options.flattenSpans);var c=0,d=null,S=new St(t,e.options.tabSize,n),D,te=e.options.addModeClass&&[null];for(t==""&&xi(_i(r,n.state),a);!S.eol();){if(S.pos>e.options.maxHighlightLength?(s=!1,o&&pr(e,t,n,S.pos),S.pos=t.length,D=null):D=xi(mr(r,S,n.state,te),a),te){var Z=te[0].name;Z&&(D="m-"+(D?Z+" "+D:Z))}if(!s||d!=D){for(;c<S.start;)c=Math.min(S.start,c+5e3),i(c,d);d=D}S.start=S.pos}for(;c<S.pos;){var Le=Math.min(S.pos,c+5e3);i(Le,d),c=Le}}function Zn(e,t,r){for(var n,i,a=e.doc,o=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var c=et(a,s-1),d=c.stateAfter;if(d&&(!r||s+(d instanceof fn?d.lookAhead:0)<=a.modeFrontier))return s;var S=m(c.text,null,e.options.tabSize);(i==null||n>S)&&(i=s-1,n=S)}return i}function Wr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,n=t-1;n>r;n--){var i=et(e,n).stateAfter;if(i&&(!(i instanceof fn)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Ei=!1,hn=!1;function wi(){Ei=!0}function Ci(){hn=!0}function gr(e,t,r){this.marker=e,this.from=t,this.to=r}function Rn(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Ia(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function zr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Qn(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,s=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(s||a.from==t&&o.type=="bookmark"&&(!r||!a.marker.insertLeft)){var c=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new gr(o,a.from,c?null:a.to))}}return n}function Hr(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,s=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(s||a.from==t&&o.type=="bookmark"&&(!r||a.marker.insertLeft)){var c=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new gr(o,c?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Pn(e,t){if(t.full)return null;var r=Mn(e,t.from.line)&&et(e,t.from.line).markedSpans,n=Mn(e,t.to.line)&&et(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,a=t.to.ch,o=ut(t.from,t.to)==0,s=Qn(r,i,o),c=Hr(n,a,o),d=t.text.length==1,S=p(t.text).length+(d?i:0);if(s)for(var D=0;D<s.length;++D){var te=s[D];if(te.to==null){var Z=Rn(c,te.marker);Z?d&&(te.to=Z.to==null?null:Z.to+S):te.to=i}}if(c)for(var Le=0;Le<c.length;++Le){var Re=c[Le];if(Re.to!=null&&(Re.to+=S),Re.from==null){var Be=Rn(s,Re.marker);Be||(Re.from=S,d&&(s||(s=[])).push(Re))}else Re.from+=S,d&&(s||(s=[])).push(Re)}s&&(s=qn(s)),c&&c!=s&&(c=qn(c));var Ge=[s];if(!d){var Ve=t.text.length-2,Xe;if(Ve>0&&s)for(var Ze=0;Ze<s.length;++Ze)s[Ze].to==null&&(Xe||(Xe=[])).push(new gr(s[Ze].marker,null,null));for(var at=0;at<Ve;++at)Ge.push(Xe);Ge.push(c)}return Ge}function qn(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Si(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(Z){if(Z.markedSpans)for(var Le=0;Le<Z.markedSpans.length;++Le){var Re=Z.markedSpans[Le].marker;Re.readOnly&&(!n||F(n,Re)==-1)&&(n||(n=[])).push(Re)}}),!n)return null;for(var i=[{from:t,to:r}],a=0;a<n.length;++a)for(var o=n[a],s=o.find(0),c=0;c<i.length;++c){var d=i[c];if(ut(d.to,s.from)<0||ut(d.from,s.to)>0)continue;var S=[c,1],D=ut(d.from,s.from),te=ut(d.to,s.to);(D<0||!o.inclusiveLeft&&!D)&&S.push({from:d.from,to:s.from}),(te>0||!o.inclusiveRight&&!te)&&S.push({from:s.to,to:d.to}),i.splice.apply(i,S),c+=S.length-3}return i}function Kr(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function er(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function vr(e){return e.inclusiveLeft?-1:0}function yn(e){return e.inclusiveRight?1:0}function Gr(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),a=ut(n.from,i.from)||vr(e)-vr(t);if(a)return-a;var o=ut(n.to,i.to)||yn(e)-yn(t);return o||t.id-e.id}function Oi(e,t){var r=hn&&e.markedSpans,n;if(r)for(var i=void 0,a=0;a<r.length;++a)i=r[a],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||Gr(n,i.marker)<0)&&(n=i.marker);return n}function ki(e){return Oi(e,!0)}function Xr(e){return Oi(e,!1)}function Ua(e,t){var r=hn&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var a=r[i];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!n||Gr(n,a.marker)<0)&&(n=a.marker)}return n}function Qi(e,t,r,n,i){var a=et(e,t),o=hn&&a.markedSpans;if(o)for(var s=0;s<o.length;++s){var c=o[s];if(!c.marker.collapsed)continue;var d=c.marker.find(0),S=ut(d.from,r)||vr(c.marker)-vr(i),D=ut(d.to,n)||yn(c.marker)-yn(i);if(S>=0&&D<=0||S<=0&&D>=0)continue;if(S<=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?ut(d.to,r)>=0:ut(d.to,r)>0)||S>=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?ut(d.from,n)<=0:ut(d.from,n)<0))return!0}}function tt(e){for(var t;t=ki(e);)e=t.find(-1,!0).line;return e}function ct(e){for(var t;t=Xr(e);)e=t.find(1,!0).line;return e}function dt(e){for(var t,r;t=Xr(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function _t(e,t){var r=et(e,t),n=tt(r);return r==n?t:gt(n)}function xt(e,t){if(t>e.lastLine())return t;var r=et(e,t),n;if(!wt(e,r))return t;for(;n=Xr(r);)r=n.find(1,!0).line;return gt(r)+1}function wt(e,t){var r=hn&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i){if(n=r[i],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&Lt(e,t,n))return!0}}function Lt(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Lt(e,n.line,Rn(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if(i=t.markedSpans[a],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Lt(e,t,i))return!0}function Ot(e){e=tt(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var a=r.parent;a;r=a,a=r.parent)for(var o=0;o<a.children.length;++o){var s=a.children[o];if(s==r)break;t+=s.height}return t}function Kt(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=ki(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Xr(n);){var a=r.find(0,!0);t-=n.text.length-a.from.ch,n=a.to.line,t+=n.text.length-a.to.ch}return t}function mn(e){var t=e.display,r=e.doc;t.maxLine=et(r,r.first),t.maxLineLength=Kt(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=Kt(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var Ct=function(e,t,r){this.text=e,er(this,t),this.height=r?r(this):1};Ct.prototype.lineNo=function(){return gt(this)},R(Ct);function jn(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Kr(e),er(e,r);var i=n?n(e):1;i!=e.height&&dn(e,i)}function Gt(e){e.parent=null,Kr(e)}var Nn={},In={};function br(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?In:Nn;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Fa(e,t){var r=V("span",null,null,w?"padding-right: .1px":null),n={pre:V("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;n.pos=0,n.addToken=Ss,Pt(e.display.measure)&&(o=$e(a,e.doc.direction))&&(n.addToken=ks(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&>(a);Ts(a,n,Fr(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=O(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=O(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(ft(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(w){var c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return De(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=O(n.pre.className,n.textClass||"")),n}function Cs(e){var t=y("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ss(e,t,r,n,i,a,o){if(!t)return;var s=e.splitSpaces?Os(t,e.trailingSpace):t,c=e.cm.state.specialChars,d=!1,S;if(!c.test(t))e.col+=t.length,S=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,S),N&&A<9&&(d=!0),e.pos+=t.length;else{S=document.createDocumentFragment();for(var D=0;;){c.lastIndex=D;var te=c.exec(t),Z=te?te.index-D:t.length-D;if(Z){var Le=document.createTextNode(s.slice(D,D+Z));N&&A<9?S.appendChild(y("span",[Le])):S.appendChild(Le),e.map.push(e.pos,e.pos+Z,Le),e.col+=Z,e.pos+=Z}if(!te)break;D+=Z+1;var Re=void 0;if(te[0]==" "){var Be=e.cm.options.tabSize,Ge=Be-e.col%Be;Re=S.appendChild(y("span",Y(Ge),"cm-tab")),Re.setAttribute("role","presentation"),Re.setAttribute("cm-text"," "),e.col+=Ge}else te[0]=="\r"||te[0]==`
|
|
`?(Re=S.appendChild(y("span",te[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Re.setAttribute("cm-text",te[0]),e.col+=1):(Re=e.cm.options.specialCharPlaceholder(te[0]),Re.setAttribute("cm-text",te[0]),N&&A<9?S.appendChild(y("span",[Re])):S.appendChild(Re),e.col+=1);e.map.push(e.pos,e.pos+1,Re),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,r||n||i||d||a||o){var Ve=r||"";n&&(Ve+=n),i&&(Ve+=i);var Xe=y("span",[S],Ve,a);if(o)for(var Ze in o)o.hasOwnProperty(Ze)&&Ze!="style"&&Ze!="class"&&Xe.setAttribute(Ze,o[Ze]);return e.content.appendChild(Xe)}e.content.appendChild(S)}function Os(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var a=e.charAt(i);a==" "&&r&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a="\xA0"),n+=a,r=a==" "}return n}function ks(e,t){return function(r,n,i,a,o,s,c){i=i?i+" cm-force-border":"cm-force-border";for(var d=r.pos,S=d+n.length;;){for(var D=void 0,te=0;te<t.length&&!(D=t[te],D.to>d&&D.from<=d);te++);if(D.to>=S)return e(r,n,i,a,o,s,c);e(r,n.slice(0,D.to-d),i,a,null,s,c),a=null,n=n.slice(D.to-d),d=D.to}}}function Ba(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Ts(e,t,r){var n=e.markedSpans,i=e.text,a=0;if(!n){for(var o=1;o<r.length;o+=2)t.addToken(t,i.slice(a,a=r[o]),br(r[o+1],t.cm.options));return}for(var s=i.length,c=0,d=1,S="",D,te,Z=0,Le,Re,Be,Ge,Ve;;){if(Z==c){Le=Re=Be=te="",Ve=null,Ge=null,Z=Infinity;for(var Xe=[],Ze=void 0,at=0;at<n.length;++at){var nt=n[at],ht=nt.marker;if(ht.type=="bookmark"&&nt.from==c&&ht.widgetNode)Xe.push(ht);else if(nt.from<=c&&(nt.to==null||nt.to>c||ht.collapsed&&nt.to==c&&nt.from==c)){if(nt.to!=null&&nt.to!=c&&Z>nt.to&&(Z=nt.to,Re=""),ht.className&&(Le+=" "+ht.className),ht.css&&(te=(te?te+";":"")+ht.css),ht.startStyle&&nt.from==c&&(Be+=" "+ht.startStyle),ht.endStyle&&nt.to==Z&&(Ze||(Ze=[])).push(ht.endStyle,nt.to),ht.title&&((Ve||(Ve={})).title=ht.title),ht.attributes)for(var Et in ht.attributes)(Ve||(Ve={}))[Et]=ht.attributes[Et];ht.collapsed&&(!Ge||Gr(Ge.marker,ht)<0)&&(Ge=nt)}else nt.from>c&&Z>nt.from&&(Z=nt.from)}if(Ze)for(var Ut=0;Ut<Ze.length;Ut+=2)Ze[Ut+1]==Z&&(Re+=" "+Ze[Ut]);if(!Ge||Ge.from==c)for(var Tt=0;Tt<Xe.length;++Tt)Ba(t,0,Xe[Tt]);if(Ge&&(Ge.from||0)==c){if(Ba(t,(Ge.to==null?s+1:Ge.to)-c,Ge.marker,Ge.from==null),Ge.to==null)return;Ge.to==c&&(Ge=!1)}}if(c>=s)break;for(var an=Math.min(s,Z);;){if(S){var qt=c+S.length;if(!Ge){var Mt=qt>an?S.slice(0,an-c):S;t.addToken(t,Mt,D?D+Le:Le,Be,c+Mt.length==Z?Re:"",te,Ve)}if(qt>=an){S=S.slice(an-c),c=an;break}c=qt,Be=""}S=i.slice(a,a=r[d++]),D=br(r[d++],t.cm.options)}}}function Wa(e,t,r){this.line=t,this.rest=dt(t),this.size=this.rest?gt(p(this.rest))-r+1:1,this.node=this.text=null,this.hidden=wt(e,t)}function Ti(e,t,r){for(var n=[],i,a=t;a<r;a=i){var o=new Wa(e.doc,et(e.doc,a),a);i=a+o.size,n.push(o)}return n}var yr=null;function As(e){yr?yr.ops.push(e):e.ownsGroup=yr={ops:[e],delayedCallbacks:[]}}function Ls(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Ds(e,t){var r=e.ownsGroup;if(!r)return;try{Ls(r)}finally{yr=null,t(r)}}var $r=null;function zt(e,t){var r=it(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),i;yr?i=yr.delayedCallbacks:$r?i=$r:(i=$r=[],setTimeout(Ms,0));for(var a=function(s){i.push(function(){return r[s].apply(null,n)})},o=0;o<r.length;++o)a(o)}function Ms(){var e=$r;$r=null;for(var t=0;t<e.length;++t)e[t]()}function za(e,t,r,n){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Ps(e,t):a=="gutter"?Ka(e,t,r,n):a=="class"?qi(e,t):a=="widget"&&js(e,t,n)}t.changes=null}function Vr(e){return e.node==e.text&&(e.node=y("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),N&&A<8&&(e.node.style.zIndex=2)),e.node}function Rs(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=Vr(t);t.background=n.insertBefore(y("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ha(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Fa(e,t)}function Ps(e,t){var r=t.text.className,n=Ha(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,qi(e,t)):r&&(t.text.className=r)}function qi(e,t){Rs(e,t),t.line.wrapClass?Vr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Ka(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=Vr(t);t.gutterBackground=y("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=Vr(t),s=t.gutter=y("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=s.appendChild(y("div",Vn(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var c=0;c<e.display.gutterSpecs.length;++c){var d=e.display.gutterSpecs[c].className,S=a.hasOwnProperty(d)&&a[d];S&&s.appendChild(y("div",[S],"CodeMirror-gutter-elt","left: "+n.gutterLeft[d]+"px; width: "+n.gutterWidth[d]+"px"))}}}function js(e,t,r){t.alignable&&(t.alignable=null);for(var n=de("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Ga(e,t,r)}function Ns(e,t,r,n){var i=Ha(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),qi(e,t),Ka(e,t,r,n),Ga(e,t,n),t.node}function Ga(e,t,r){if(Xa(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Xa(e,t.rest[n],t,r,!1)}function Xa(e,t,r,n,i){if(!t.widgets)return;for(var a=Vr(r),o=0,s=t.widgets;o<s.length;++o){var c=s[o],d=y("div",[c.node],"CodeMirror-linewidget"+(c.className?" "+c.className:""));c.handleMouseEvents||d.setAttribute("cm-ignore-events","true"),Is(c,d,r,n),e.display.input.setUneditable(d),i&&c.above?a.insertBefore(d,r.gutter||r.text):a.appendChild(d),zt(c,"redraw")}}function Is(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Yr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!v(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),se(t.display.measure,y("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function An(e,t){for(var r=Q(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function Ai(e){return e.lineSpace.offsetTop}function ea(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function $a(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=se(e.measure,y("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function _n(e){return ae-e.display.nativeBarWidth}function tr(e){return e.display.scroller.clientWidth-_n(e)-e.display.barWidth}function ta(e){return e.display.scroller.clientHeight-_n(e)-e.display.barHeight}function Us(e,t,r){var n=e.options.lineWrapping,i=n&&tr(e);if(!t.measure.heights||n&&t.measure.width!=i){var a=t.measure.heights=[];if(n){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var c=o[s],d=o[s+1];Math.abs(c.bottom-d.bottom)>2&&a.push((c.bottom+d.top)/2-r.top)}}a.push(r.bottom-r.top)}}function Va(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(gt(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fs(e,t){t=tt(t);var r=gt(t),n=e.display.externalMeasured=new Wa(e.doc,t,r);n.lineN=r;var i=n.built=Fa(e,n);return n.text=i.pre,se(e.display.lineMeasure,i.pre),n}function Ya(e,t,r,n){return xn(e,_r(e,t),r,n)}function na(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ir(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function _r(e,t){var r=gt(t),n=na(e,r);n&&!n.text?n=null:n&&n.changes&&(za(e,n,r,la(e)),e.curOp.forceUpdate=!0),n||(n=Fs(e,t));var i=Va(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function xn(e,t,r,n,i){t.before&&(r=-1);var a=r+(n||""),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Us(e,t.view,t.rect),t.hasHeights=!0),o=Ws(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Ja={left:0,right:0,top:0,bottom:0};function Za(e,t,r){for(var n,i,a,o,s,c,d=0;d<e.length;d+=3)if(s=e[d],c=e[d+1],t<s?(i=0,a=1,o="left"):t<c?(i=t-s,a=i+1):(d==e.length-3||t==c&&e[d+3]>t)&&(a=c-s,i=a-1,t>=c&&(o="right")),i!=null){if(n=e[d+2],s==c&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&i==0)for(;d&&e[d-2]==e[d-3]&&e[d-1].insertLeft;)n=e[(d-=3)+2],o="left";if(r=="right"&&i==c-s)for(;d<e.length-3&&e[d+3]==e[d+4]&&!e[d+5].insertLeft;)n=e[(d+=3)+2],o="right";break}return{node:n,start:i,end:a,collapse:o,coverStart:s,coverEnd:c}}function Bs(e,t){var r=Ja;if(t=="left")for(var n=0;n<e.length&&!((r=e[n]).left!=r.right);n++);else for(var i=e.length-1;i>=0&&!((r=e[i]).left!=r.right);i--);return r}function Ws(e,t,r,n){var i=Za(t.map,r,n),a=i.node,o=i.start,s=i.end,c=i.collapse,d;if(a.nodeType==3){for(var S=0;S<4;S++){for(;o&&ve(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+s<i.coverEnd&&ve(t.line.text.charAt(i.coverStart+s));)++s;if(N&&A<9&&o==0&&s==i.coverEnd-i.coverStart?d=a.parentNode.getBoundingClientRect():d=Bs(M(a,o,s).getClientRects(),n),d.left||d.right||o==0)break;s=o,o=o-1,c="right"}N&&A<11&&(d=zs(e.display.measure,d))}else{o>0&&(c=n="right");var D;e.options.lineWrapping&&(D=a.getClientRects()).length>1?d=D[n=="right"?D.length-1:0]:d=a.getBoundingClientRect()}if(N&&A<9&&!o&&(!d||!d.left&&!d.right)){var te=a.parentNode.getClientRects()[0];te?d={left:te.left,right:te.left+Er(e.display),top:te.top,bottom:te.bottom}:d=Ja}for(var Z=d.top-t.rect.top,Le=d.bottom-t.rect.top,Re=(Z+Le)/2,Be=t.view.measure.heights,Ge=0;Ge<Be.length-1&&!(Re<Be[Ge]);Ge++);var Ve=Ge?Be[Ge-1]:0,Xe=Be[Ge],Ze={left:(c=="right"?d.right:d.left)-t.rect.left,right:(c=="left"?d.left:d.right)-t.rect.left,top:Ve,bottom:Xe};return!d.left&&!d.right&&(Ze.bogus=!0),e.options.singleCursorHeightPerLine||(Ze.rtop=Z,Ze.rbottom=Le),Ze}function zs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Vt(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Qa(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 qa(e){e.display.externalMeasure=null,Te(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Qa(e.display.view[t])}function Jr(e){qa(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function eo(){return X&&j?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function to(){return X&&j?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ra(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Yr(e.widgets[r]));return t}function Li(e,t,r,n,i){if(!i){var a=ra(t);r.top+=a,r.bottom+=a}if(n=="line")return r;n||(n="local");var o=Ot(t);if(n=="local"?o+=Ai(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(n=="window"?0:to());var c=s.left+(n=="window"?0:eo());r.left+=c,r.right+=c}return r.top+=o,r.bottom+=o,r}function no(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=eo(),i-=to();else if(r=="local"||!r){var a=e.display.sizer.getBoundingClientRect();n+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:n-o.left,top:i-o.top}}function ia(e,t,r,n,i){return n||(n=et(e.doc,t.line)),Li(e,n,Ya(e,n,t.ch,i),r)}function gn(e,t,r,n,i,a){n=n||et(e.doc,t.line),i||(i=_r(e,n));function o(Le,Re){var Be=xn(e,i,Le,Re?"right":"left",a);return Re?Be.left=Be.right:Be.right=Be.left,Li(e,n,Be,r)}var s=$e(n,e.doc.direction),c=t.ch,d=t.sticky;if(c>=n.text.length?(c=n.text.length,d="before"):c<=0&&(c=0,d="after"),!s)return o(d=="before"?c-1:c,d=="before");function S(Le,Re,Be){var Ge=s[Re],Ve=Ge.level==1;return o(Be?Le-1:Le,Ve!=Be)}var D=ze(s,c,d),te=We,Z=S(c,D,d=="before");return te!=null&&(Z.other=S(c,te,d!="before")),Z}function ro(e,t){var r=0;t=st(e.doc,t),e.options.lineWrapping||(r=Er(e.display)*t.ch);var n=et(e.doc,t.line),i=Ot(n)+Ai(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function aa(e,t,r,n,i){var a=Ne(e,t,r);return a.xRel=i,n&&(a.outside=n),a}function oa(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return aa(n.first,0,null,-1,-1);var i=On(n,r),a=n.first+n.size-1;if(i>a)return aa(n.first+n.size-1,et(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=et(n,i);;){var s=Hs(e,o,i,t,r),c=Ua(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!c)return s;var d=c.find(1);if(d.line==i)return d;o=et(n,i=d.line)}}function io(e,t,r,n){n-=ra(t);var i=t.text.length,a=Ue(function(o){return xn(e,r,o-1).bottom<=n},i,0);return i=Ue(function(o){return xn(e,r,o).top>n},a,i),{begin:a,end:i}}function ao(e,t,r,n){r||(r=_r(e,t));var i=Li(e,t,xn(e,r,n),"line").top;return io(e,t,r,i)}function sa(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Hs(e,t,r,n,i){i-=Ot(t);var a=_r(e,t),o=ra(t),s=0,c=t.text.length,d=!0,S=$e(t,e.doc.direction);if(S){var D=(e.options.lineWrapping?Gs:Ks)(e,t,r,a,S,n,i);d=D.level!=1,s=d?D.from:D.to-1,c=d?D.to:D.from-1}var te=null,Z=null,Le=Ue(function(at){var nt=xn(e,a,at);return nt.top+=o,nt.bottom+=o,sa(nt,n,i,!1)?(nt.top<=i&&nt.left<=n&&(te=at,Z=nt),!0):!1},s,c),Re,Be,Ge=!1;if(Z){var Ve=n-Z.left<Z.right-n,Xe=Ve==d;Le=te+(Xe?0:1),Be=Xe?"after":"before",Re=Ve?Z.left:Z.right}else{!d&&(Le==c||Le==s)&&Le++,Be=Le==0?"after":Le==t.text.length?"before":xn(e,a,Le-(d?1:0)).bottom+o<=i==d?"after":"before";var Ze=gn(e,Ne(r,Le,Be),"line",t,a);Re=Ze.left,Ge=i<Ze.top?-1:i>=Ze.bottom?1:0}return Le=Ee(t.text,Le,1),aa(r,Le,Be,Ge,n-Re)}function Ks(e,t,r,n,i,a,o){var s=Ue(function(D){var te=i[D],Z=te.level!=1;return sa(gn(e,Ne(r,Z?te.to:te.from,Z?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),c=i[s];if(s>0){var d=c.level!=1,S=gn(e,Ne(r,d?c.from:c.to,d?"after":"before"),"line",t,n);sa(S,a,o,!0)&&S.top>o&&(c=i[s-1])}return c}function Gs(e,t,r,n,i,a,o){var s=io(e,t,n,o),c=s.begin,d=s.end;/\s/.test(t.text.charAt(d-1))&&d--;for(var S=null,D=null,te=0;te<i.length;te++){var Z=i[te];if(Z.from>=d||Z.to<=c)continue;var Le=Z.level!=1,Re=xn(e,n,Le?Math.min(d,Z.to)-1:Math.max(c,Z.from)).right,Be=Re<a?a-Re+1e9:Re-a;(!S||D>Be)&&(S=Z,D=Be)}return S||(S=i[i.length-1]),S.from<c&&(S={from:c,to:S.to,level:S.level}),S.to>d&&(S={from:S.from,to:d,level:S.level}),S}var nr;function xr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(nr==null){nr=y("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)nr.appendChild(document.createTextNode("x")),nr.appendChild(y("br"));nr.appendChild(document.createTextNode("x"))}se(e.measure,nr);var r=nr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),Te(e.measure),r||1}function Er(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=y("span","xxxxxxxxxx"),r=y("pre",[t],"CodeMirror-line-like");se(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function la(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;r[s]=a.offsetLeft+a.clientLeft+i,n[s]=a.clientWidth}return{fixedPos:ua(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function ua(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function oo(e){var t=xr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Er(e.display)-3);return function(i){if(wt(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return r?a+(Math.ceil(i.text.length/n)||1)*t:a+t}}function ca(e){var t=e.doc,r=oo(e);t.iter(function(n){var i=r(n);i!=n.height&&dn(n,i)})}function rr(e,t,r,n){var i=e.display;if(!r&&Q(t).getAttribute("cm-not-content")=="true")return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch(D){return null}var c=oa(e,a,o),d;if(n&&c.xRel>0&&(d=et(e.doc,c.line).text).length==c.ch){var S=m(d,d.length,e.options.tabSize)-d.length;c=Ne(c.line,Math.max(0,Math.round((a-$a(e.display).left)/Er(e.display))-S))}return c}function ir(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function Zt(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)hn&&_t(e.doc,t)<i.viewTo&&Fn(e);else if(r<=i.viewFrom)hn&&xt(e.doc,r+n)>i.viewFrom?Fn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Fn(e);else if(t<=i.viewFrom){var a=Di(e,r,r+n,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=n):Fn(e)}else if(r>=i.viewTo){var o=Di(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Fn(e)}else{var s=Di(e,t,t,-1),c=Di(e,r,r+n,1);s&&c?(i.view=i.view.slice(0,s.index).concat(Ti(e,s.lineN,c.lineN)).concat(i.view.slice(c.index)),i.viewTo+=n):Fn(e)}var d=i.externalMeasured;d&&(r<d.lineN?d.lineN+=n:t<d.lineN+d.size&&(i.externalMeasured=null))}function Un(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var a=n.view[ir(e,t)];if(a.node==null)return;var o=a.changes||(a.changes=[]);F(o,r)==-1&&o.push(r)}function Fn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Di(e,t,r,n){var i=ir(e,t),a,o=e.display.view;if(!hn||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var s=e.display.viewFrom,c=0;c<i;c++)s+=o[c].size;if(s!=t){if(n>0){if(i==o.length-1)return null;a=s+o[i].size-t,i++}else a=s-t;t+=a,r+=a}for(;_t(e.doc,r)!=r;){if(i==(n<0?0:o.length-1))return null;r+=n*o[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function Xs(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Ti(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Ti(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(ir(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Ti(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,ir(e,r)))),n.viewTo=r}function so(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function Zr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function lo(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),a=n.selection=document.createDocumentFragment(),o=0;o<r.sel.ranges.length;o++){if(!t&&o==r.sel.primIndex)continue;var s=r.sel.ranges[o];if(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)continue;var c=s.empty();(c||e.options.showCursorWhenSelecting)&&uo(e,s.head,i),c||$s(e,s,a)}return n}function uo(e,t,r){var n=gn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(y("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var a=r.appendChild(y("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Mi(e,t){return e.top-t.top||e.left-t.left}function $s(e,t,r){var n=e.display,i=e.doc,a=document.createDocumentFragment(),o=$a(e.display),s=o.left,c=Math.max(n.sizerWidth,tr(e)-n.sizer.offsetLeft)-o.right,d=i.direction=="ltr";function S(Xe,Ze,at,nt){Ze<0&&(Ze=0),Ze=Math.round(Ze),nt=Math.round(nt),a.appendChild(y("div",null,"CodeMirror-selected","position: absolute; left: "+Xe+`px;
|
|
top: `+Ze+"px; width: "+(at==null?c-Xe:at)+`px;
|
|
height: `+(nt-Ze)+"px"))}function D(Xe,Ze,at){var nt=et(i,Xe),ht=nt.text.length,Et,Ut;function Tt(Mt,en){return ia(e,Ne(Xe,Mt),"div",nt,en)}function an(Mt,en,Ht){var jt=ao(e,nt,null,Mt),Rt=en=="ltr"==(Ht=="after")?"left":"right",At=Ht=="after"?jt.begin:jt.end-(/\s/.test(nt.text.charAt(jt.end-1))?2:1);return Tt(At,Rt)[Rt]}var qt=$e(nt,i.direction);return Pe(qt,Ze||0,at==null?ht:at,function(Mt,en,Ht,jt){var Rt=Ht=="ltr",At=Tt(Mt,Rt?"left":"right"),tn=Tt(en-1,Rt?"right":"left"),jr=Ze==null&&Mt==0,Gn=at==null&&en==ht,$t=jt==0,En=!qt||jt==qt.length-1;if(tn.top-At.top<=3){var Ft=(d?jr:Gn)&&$t,ja=(d?Gn:jr)&&En,Dn=Ft?s:(Rt?At:tn).left,ur=ja?c:(Rt?tn:At).right;S(Dn,At.top,ur-Dn,At.bottom)}else{var cr,Jt,Nr,Na;Rt?(cr=d&&jr&&$t?s:At.left,Jt=d?c:an(Mt,Ht,"before"),Nr=d?s:an(en,Ht,"after"),Na=d&&Gn&&En?c:tn.right):(cr=d?an(Mt,Ht,"before"):s,Jt=!d&&jr&&$t?c:At.right,Nr=!d&&Gn&&En?s:tn.left,Na=d?an(en,Ht,"after"):c),S(cr,At.top,Jt-cr,At.bottom),At.bottom<tn.top&&S(s,At.bottom,null,tn.top),S(Nr,tn.top,Na-Nr,tn.bottom)}(!Et||Mi(At,Et)<0)&&(Et=At),Mi(tn,Et)<0&&(Et=tn),(!Ut||Mi(At,Ut)<0)&&(Ut=At),Mi(tn,Ut)<0&&(Ut=tn)}),{start:Et,end:Ut}}var te=t.from(),Z=t.to();if(te.line==Z.line)D(te.line,te.ch,Z.ch);else{var Le=et(i,te.line),Re=et(i,Z.line),Be=tt(Le)==tt(Re),Ge=D(te.line,te.ch,Be?Le.text.length+1:null).end,Ve=D(Z.line,Be?0:null,Z.ch).start;Be&&(Ge.top<Ve.top-2?(S(Ge.right,Ge.top,null,Ge.bottom),S(s,Ve.top,Ve.left,Ve.bottom)):S(Ge.right,Ge.top,Ve.left-Ge.right,Ge.bottom)),Ge.bottom<Ve.top&&S(s,Ge.bottom,null,Ve.top)}r.appendChild(a)}function da(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||wr(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function co(e){e.state.focused||(e.display.input.focus(),fa(e))}function fo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,wr(e))},100)}function fa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(De(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),w&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),da(e)}function wr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(De(e,"blur",e,t),e.state.focused=!1,he(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Ri(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],a=e.options.lineWrapping,o=void 0,s=0;if(i.hidden)continue;if(N&&A<8){var c=i.node.offsetTop+i.node.offsetHeight;o=c-r,r=c}else{var d=i.node.getBoundingClientRect();o=d.bottom-d.top,!a&&i.text.firstChild&&(s=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var S=i.line.height-o;if((S>.005||S<-.005)&&(dn(i.line,o),ho(i.line),i.rest))for(var D=0;D<i.rest.length;D++)ho(i.rest[D]);if(s>e.display.sizerWidth){var te=Math.ceil(s/Er(e.display));te>e.display.maxLineLength&&(e.display.maxLineLength=te,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function ho(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Pi(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Ai(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,a=On(t,n),o=On(t,i);if(r&&r.ensure){var s=r.ensure.from.line,c=r.ensure.to.line;s<a?(a=s,o=On(t,Ot(et(t,s))+e.wrapper.clientHeight)):Math.min(c,t.lastLine())>=o&&(a=On(t,Ot(et(t,c))-e.wrapper.clientHeight),o=c)}return{from:a,to:Math.max(o,a+1)}}function Vs(e,t){if(He(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!P){var a=y("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-r.viewOffset-Ai(e.display))+`px;
|
|
height: `+(t.bottom-t.top+_n(e)+r.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}function Ys(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?Ne(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Ne(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=gn(e,t),c=!r||r==t?s:gn(e,r);i={left:Math.min(s.left,c.left),top:Math.min(s.top,c.top)-n,right:Math.max(s.left,c.left),bottom:Math.max(s.bottom,c.bottom)+n};var d=ha(e,i),S=e.doc.scrollTop,D=e.doc.scrollLeft;if(d.scrollTop!=null&&(qr(e,d.scrollTop),Math.abs(e.doc.scrollTop-S)>1&&(o=!0)),d.scrollLeft!=null&&(ar(e,d.scrollLeft),Math.abs(e.doc.scrollLeft-D)>1&&(o=!0)),!o)break}return i}function Js(e,t){var r=ha(e,t);r.scrollTop!=null&&qr(e,r.scrollTop),r.scrollLeft!=null&&ar(e,r.scrollLeft)}function ha(e,t){var r=e.display,n=xr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,a=ta(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+ea(r),c=t.top<n,d=t.bottom>s-n;if(t.top<i)o.scrollTop=c?0:t.top;else if(t.bottom>i+a){var S=Math.min(t.top,(d?s:t.bottom)-a);S!=i&&(o.scrollTop=S)}var D=e.options.fixedGutter?0:r.gutters.offsetWidth,te=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-D,Z=tr(e)-r.gutters.offsetWidth,Le=t.right-t.left>Z;return Le&&(t.right=t.left+Z),t.left<10?o.scrollLeft=0:t.left<te?o.scrollLeft=Math.max(0,t.left+D-(Le?0:10)):t.right>Z+te-3&&(o.scrollLeft=t.right+(Le?0:10)-Z),o}function pa(e,t){if(t==null)return;ji(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Cr(e){ji(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Qr(e,t,r){(t!=null||r!=null)&&ji(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Zs(e,t){ji(e),e.curOp.scrollToPos=t}function ji(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=ro(e,t.from),n=ro(e,t.to);po(e,r,n,t.margin)}}function po(e,t,r,n){var i=ha(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Qr(e,i.scrollLeft,i.scrollTop)}function qr(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;le||ga(e,{top:t}),mo(e,t,!0),le&&ga(e),ni(e,100)}function mo(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function ar(e,t,r,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,_o(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ei(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+ea(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+_n(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var or=function(e,t,r){this.cm=r;var n=this.vert=y("div",[y("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=y("div",[y("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),Se(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Se(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,N&&A<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};or.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},or.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},or.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},or.prototype.zeroWidthHack=function(){var e=ne&&!K?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new x,this.disableVert=new x},or.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),a=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},or.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ti=function(){};ti.prototype.update=function(){return{bottom:0,right:0}},ti.prototype.setScrollLeft=function(){},ti.prototype.setScrollTop=function(){},ti.prototype.clear=function(){};function Sr(e,t){t||(t=ei(e));var r=e.display.barWidth,n=e.display.barHeight;go(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Ri(e),go(e,ei(e)),r=e.display.barWidth,n=e.display.barHeight}function go(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var vo={native:or,null:ti};function bo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&he(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new vo[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,r){r=="horizontal"?ar(e,t):qr(e,t)},e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function sr(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:++Qs},As(e.curOp)}function lr(e){var t=e.curOp;t&&Ds(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;qs(r)})}function qs(e){for(var t=e.ops,r=0;r<t.length;r++)el(t[r]);for(var n=0;n<t.length;n++)tl(t[n]);for(var i=0;i<t.length;i++)nl(t[i]);for(var a=0;a<t.length;a++)rl(t[a]);for(var o=0;o<t.length;o++)il(t[o])}function el(e){var t=e.cm,r=t.display;ol(t),e.updateMaxLine&&mn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ni(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&ma(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Ri(t),e.barMeasure=ei(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ya(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+_n(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ar(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==ee();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Sr(t,e.barMeasure),e.updatedDisplay&&ba(t,e.barMeasure),e.selectionChanged&&da(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&co(e.cm)}function il(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&yo(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&mo(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ar(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ys(t,st(n,e.scrollToPos.from),st(n,e.scrollToPos.to),e.scrollToPos.margin);Vs(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var s=0;s<a.length;++s)a[s].lines.length||De(a[s],"hide");if(o)for(var c=0;c<o.length;++c)o[c].lines.length&&De(o[c],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&De(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function rn(e,t){if(e.curOp)return t();sr(e);try{return t()}finally{lr(e)}}function Nt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);sr(e);try{return t.apply(e,arguments)}finally{lr(e)}}}function Yt(e){return function(){if(this.curOp)return e.apply(this,arguments);sr(this);try{return e.apply(this,arguments)}finally{lr(this)}}}function It(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);sr(t);try{return e.apply(this,arguments)}finally{lr(t)}}}function ni(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,u(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=nn(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?cn(t.mode,n.state):null,c=yi(e,a,n,!0);s&&(n.state=s),a.styles=c.styles;var d=a.styleClasses,S=c.classes;S?a.styleClasses=S:d&&(a.styleClasses=null);for(var D=!o||o.length!=a.styles.length||d!=S&&(!d||!S||d.bgClass!=S.bgClass||d.textClass!=S.textClass),te=0;!D&&te<o.length;++te)D=o[te]!=a.styles[te];D&&i.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&pr(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ni(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&rn(e,function(){for(var a=0;a<i.length;a++)Un(e,i[a],"text")})}var Ni=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Pi(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=tr(e),this.force=r,this.dims=la(e),this.events=[]};Ni.prototype.signal=function(e,t){L(e,t)&&this.events.push(arguments)},Ni.prototype.finish=function(){for(var e=0;e<this.events.length;e++)De.apply(null,this.events[e])};function ol(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=_n(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=_n(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=ee();if(!t||!v(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&v(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function ll(e){if(!e||!e.activeElt||e.activeElt==ee())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&v(document.body,e.anchorNode)&&v(document.body,e.focusNode)){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function ma(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Fn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&so(e)==0)return!1;xo(e)&&(Fn(e),t.dims=la(e));var i=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<a&&a-r.viewFrom<20&&(a=Math.max(n.first,r.viewFrom)),r.viewTo>o&&r.viewTo-o<20&&(o=Math.min(i,r.viewTo)),hn&&(a=_t(e.doc,a),o=xt(e.doc,o));var s=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Xs(e,a,o),r.viewOffset=Ot(et(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var c=so(e);if(!s&&c==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var d=sl(e);return c>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(d),Te(r.cursorDiv),Te(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ni(e,400)),r.updateLineNumbers=null,!0}function yo(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==tr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+ea(e.display)-ta(e),r.top)}),t.visible=Pi(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Pi(e.display,e.doc,r));if(!ma(e,t))break;Ri(e);var i=ei(e);Zr(e),Sr(e,i),ba(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ga(e,t){var r=new Ni(e,t);if(ma(e,r)){Ri(e),yo(e,r);var n=ei(e);Zr(e),Sr(e,n),ba(e,n),r.finish()}}function ul(e,t,r){var n=e.display,i=e.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function s(Le){var Re=Le.nextSibling;return w&&ne&&e.display.currentWheelTarget==Le?Le.style.display="none":Le.parentNode.removeChild(Le),Re}for(var c=n.view,d=n.viewFrom,S=0;S<c.length;S++){var D=c[S];if(!D.hidden)if(!D.node||D.node.parentNode!=a){var te=Ns(e,D,d,r);a.insertBefore(te,o)}else{for(;o!=D.node;)o=s(o);var Z=i&&t!=null&&t<=d&&D.lineNumber;D.changes&&(F(D.changes,"gutter")>-1&&(Z=!1),za(e,D,d,r)),Z&&(Te(D.lineNumber),D.lineNumber.appendChild(document.createTextNode(Vn(e.options,d)))),o=D.node.nextSibling}d+=D.size}for(;o;)o=s(o)}function va(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ba(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+_n(e)+"px"}function _o(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=ua(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=n+"px",o=0;o<r.length;o++)if(!r[o].hidden){e.options.fixedGutter&&(r[o].gutter&&(r[o].gutter.style.left=a),r[o].gutterBackground&&(r[o].gutterBackground.style.left=a));var s=r[o].alignable;if(s)for(var c=0;c<s.length;c++)s[c].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}function xo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Vn(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(y("div",[y("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-o)+1,n.lineNumWidth=n.lineNumInnerWidth+o,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",va(e.display),!0}return!1}function ya(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var a=e[i],o=null;if(typeof a!="string"&&(o=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:a,style:o})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Eo(e){var t=e.gutters,r=e.gutterSpecs;Te(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],a=i.className,o=i.style,s=t.appendChild(y("div",null,"CodeMirror-gutter "+a));o&&(s.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",va(e)}function ri(e){Eo(e.display),Zt(e),_o(e)}function cl(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=y("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=y("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=V("div",null,"CodeMirror-code"),i.selectionDiv=y("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=y("div",null,"CodeMirror-cursors"),i.measure=y("div",null,"CodeMirror-measure"),i.lineMeasure=y("div",null,"CodeMirror-measure"),i.lineSpace=V("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=V("div",[i.lineSpace],"CodeMirror-lines");i.mover=y("div",[a],null,"position: relative"),i.sizer=y("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=y("div",null,null,"position: absolute; height: "+ae+"px; width: 1px;"),i.gutters=y("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=y("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=y("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),N&&A<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!w&&!(le&&B)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=ya(n.gutters,n.lineNumbers),Eo(i),r.init(i)}var Ii=0,sn=null;N?sn=-.53:le?sn=15:X?sn=-.7:ue&&(sn=-1/3);function wo(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function dl(e){var t=wo(e);return t.x*=sn,t.y*=sn,t}function Co(e,t){var r=wo(t),n=r.x,i=r.y,a=e.display,o=a.scroller,s=o.scrollWidth>o.clientWidth,c=o.scrollHeight>o.clientHeight;if(!(n&&s||i&&c))return;if(i&&ne&&w){e:for(var d=t.target,S=a.view;d!=o;d=d.parentNode)for(var D=0;D<S.length;D++)if(S[D].node==d){e.display.currentWheelTarget=d;break e}}if(n&&!le&&!ie&&sn!=null){i&&c&&qr(e,Math.max(0,o.scrollTop+i*sn)),ar(e,Math.max(0,o.scrollLeft+n*sn)),(!i||i&&c)&&h(t),a.wheelStartX=null;return}if(i&&sn!=null){var te=i*sn,Z=e.doc.scrollTop,Le=Z+a.wrapper.clientHeight;te<0?Z=Math.max(0,Z+te-50):Le=Math.min(e.doc.height,Le+te+50),ga(e,{top:Z,bottom:Le})}Ii<20&&(a.wheelStartX==null?(a.wheelStartX=o.scrollLeft,a.wheelStartY=o.scrollTop,a.wheelDX=n,a.wheelDY=i,setTimeout(function(){if(a.wheelStartX==null)return;var Re=o.scrollLeft-a.wheelStartX,Be=o.scrollTop-a.wheelStartY,Ge=Be&&a.wheelDY&&Be/a.wheelDY||Re&&a.wheelDX&&Re/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!Ge)return;sn=(sn*Ii+Ge)/(Ii+1),++Ii},200)):(a.wheelDX+=n,a.wheelDY+=i))}var ln=function(e,t){this.ranges=e,this.primIndex=t};ln.prototype.primary=function(){return this.ranges[this.primIndex]},ln.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!Ke(r.anchor,n.anchor)||!Ke(r.head,n.head))return!1}return!0},ln.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new vt(Ir(this.ranges[t].anchor),Ir(this.ranges[t].head));return new ln(e,this.primIndex)},ln.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ln.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ut(t,n.from())>=0&&ut(e,n.to())<=0)return r}return-1};var vt=function(e,t){this.anchor=e,this.head=t};vt.prototype.from=function(){return Yn(this.anchor,this.head)},vt.prototype.to=function(){return hr(this.anchor,this.head)},vt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function vn(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(te,Z){return ut(te.from(),Z.from())}),r=F(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],c=ut(s.to(),o.from());if(n&&!o.empty()?c>0:c>=0){var d=Yn(s.from(),o.from()),S=hr(s.to(),o.to()),D=s.empty()?o.from()==o.head:s.from()==s.head;a<=r&&--r,t.splice(--a,2,new vt(D?S:d,D?d:S))}}return new ln(t,r)}function Bn(e,t){return new ln([new vt(e,t||e)],0)}function Wn(e){return e.text?Ne(e.from.line+e.text.length-1,p(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function So(e,t){if(ut(e,t.from)<0)return e;if(ut(e,t.to)<=0)return Wn(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Wn(t).ch-t.to.ch),Ne(r,n)}function _a(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new vt(So(i.anchor,t),So(i.head,t)))}return vn(e.cm,r,e.sel.primIndex)}function Oo(e,t,r){return e.line==t.line?Ne(r.line,e.ch-t.ch+r.ch):Ne(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=Ne(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],c=Oo(s.from,i,a),d=Oo(Wn(s),i,a);if(i=s.to,a=d,r=="around"){var S=e.sel.ranges[o],D=ut(S.head,S.anchor)<0;n[o]=new vt(D?d:c,D?c:d)}else n[o]=new vt(c,c)}return new ln(n,e.sel.primIndex)}function xa(e){e.doc.mode=Cn(e.options,e.doc.modeOption),ii(e)}function ii(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,ni(e,100),e.state.modeGen++,e.curOp&&Zt(e)}function ko(e,t){return t.from.ch==0&&t.to.ch==0&&p(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ea(e,t,r,n){function i(Ve){return r?r[Ve]:null}function a(Ve,Xe,Ze){jn(Ve,Xe,Ze,n),zt(Ve,"change",Ve,t)}function o(Ve,Xe){for(var Ze=[],at=Ve;at<Xe;++at)Ze.push(new Ct(d[at],i(at),n));return Ze}var s=t.from,c=t.to,d=t.text,S=et(e,s.line),D=et(e,c.line),te=p(d),Z=i(d.length-1),Le=c.line-s.line;if(t.full)e.insert(0,o(0,d.length)),e.remove(d.length,e.size-d.length);else if(ko(e,t)){var Re=o(0,d.length-1);a(D,D.text,Z),Le&&e.remove(s.line,Le),Re.length&&e.insert(s.line,Re)}else if(S==D)if(d.length==1)a(S,S.text.slice(0,s.ch)+te+S.text.slice(c.ch),Z);else{var Be=o(1,d.length-1);Be.push(new Ct(te+S.text.slice(c.ch),Z,n)),a(S,S.text.slice(0,s.ch)+d[0],i(0)),e.insert(s.line+1,Be)}else if(d.length==1)a(S,S.text.slice(0,s.ch)+d[0]+D.text.slice(c.ch),i(0)),e.remove(s.line+1,Le);else{a(S,S.text.slice(0,s.ch)+d[0],i(0)),a(D,te+D.text.slice(c.ch),Z);var Ge=o(1,d.length-1);Le>1&&e.remove(s.line+1,Le-1),e.insert(s.line+1,Ge)}zt(e,"change",e,t)}function zn(e,t,r){function n(i,a,o){if(i.linked)for(var s=0;s<i.linked.length;++s){var c=i.linked[s];if(c.doc==a)continue;var d=o&&c.sharedHist;if(r&&!d)continue;t(c.doc,d),n(c.doc,i,d)}}n(e,null,!0)}function To(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ca(e),xa(e),Ao(e),e.options.lineWrapping||mn(e),e.options.mode=t.modeOption,Zt(e)}function Ao(e){(e.doc.direction=="rtl"?I:he)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){rn(e,function(){Ao(e),Zt(e)})}function Ui(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 wa(e,t){var r={from:Ir(t.from),to:Wn(t),text:Sn(e,t.from,t.to)};return Mo(e,r,t.from.line,t.to.line+1),zn(e,function(n){return Mo(n,r,t.from.line,t.to.line+1)},!0),r}function Lo(e){for(;e.length;){var t=p(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Lo(e.done),p(e.done);if(e.done.length&&!p(e.done).ranges)return p(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),p(e.done)}function Do(e,t,r,n){var i=e.history;i.undone.length=0;var a=+new Date,o,s;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=pl(i,i.lastOp==n)))s=p(o.changes),ut(t.from,t.to)==0&&ut(t.from,s.to)==0?s.to=Wn(t):o.changes.push(wa(e,t));else{var c=p(i.done);for((!c||!c.ranges)&&Fi(e.sel,i.done),o={changes:[wa(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,s||De(e,"historyAdded")}function ml(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,n){var i=e.history,a=n&&n.origin;r==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||ml(e,a,p(i.done),t))?i.done[i.done.length-1]=t:Fi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&Lo(i.undone)}function Fi(e,t){var r=p(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Mo(e,t,r,n){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(o){o.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=o.markedSpans),++a})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function bl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(vl(r[i]));return n}function Ro(e,t){var r=bl(e,t),n=Pn(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var a=r[i],o=n[i];if(a&&o){e:for(var s=0;s<o.length;++s){for(var c=o[s],d=0;d<a.length;++d)if(a[d].marker==c.marker)continue e;a.push(c)}}else o&&(r[i]=o)}return r}function Or(e,t,r){for(var n=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){n.push(r?ln.prototype.deepCopy.call(a):a);continue}var o=a.changes,s=[];n.push({changes:s});for(var c=0;c<o.length;++c){var d=o[c],S=void 0;if(s.push({from:d.from,to:d.to,text:d.text}),t)for(var D in d)(S=D.match(/^spans_(\d+)$/))&&(F(t,Number(S[1]))>-1&&(p(s)[D]=d[D],delete d[D]))}}return n}function Ca(e,t,r,n){if(n){var i=e.anchor;if(r){var a=ut(t,i)<0;a!=ut(r,i)<0?(i=t,t=r):a!=ut(t,r)<0&&(t=r)}return new vt(i,t)}else return new vt(r||t,t)}function Bi(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),Xt(e,new ln([Ca(e.sel.primary(),t,r,i)],0),n)}function Po(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)n[a]=Ca(e.sel.ranges[a],t[a],null,i);var o=vn(e.cm,n,e.sel.primIndex);Xt(e,o,r)}function Sa(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Xt(e,vn(e.cm,i,e.sel.primIndex),n)}function jo(e,t,r,n){Xt(e,Bn(t,r),n)}function yl(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var a=0;a<i.length;a++)this.ranges[a]=new vt(st(e,i[a].anchor),st(e,i[a].head))},origin:r&&r.origin};return De(e,"beforeSelectionChange",e,n),e.cm&&De(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?vn(e.cm,n.ranges,n.ranges.length-1):t}function No(e,t,r){var n=e.history.done,i=p(n);i&&i.ranges?(n[n.length-1]=t,Wi(e,t,r)):Xt(e,t,r)}function Xt(e,t,r){Wi(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Wi(e,t,r){(L(e,"beforeSelectionChange")||e.cm&&L(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(ut(t.primary().head,e.sel.primary().head)<0?-1:1);Io(e,Fo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Cr(e.cm)}function Io(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,k(e.cm)),zt(e,"cursorActivity",e)}function Uo(e){Io(e,Fo(e,e.sel,null,!1))}function Fo(e,t,r,n){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],c=zi(e,o.anchor,s&&s.anchor,r,n),d=zi(e,o.head,s&&s.head,r,n);(i||c!=o.anchor||d!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new vt(c,d))}return i?vn(e.cm,i,t.primIndex):t}function kr(e,t,r,n,i){var a=et(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var s=a.markedSpans[o],c=s.marker,d="selectLeft"in c?!c.selectLeft:c.inclusiveLeft,S="selectRight"in c?!c.selectRight:c.inclusiveRight;if((s.from==null||(d?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(S?s.to>=t.ch:s.to>t.ch))){if(i&&(De(c,"beforeCursorEnter"),c.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!c.atomic)continue;if(r){var D=c.find(n<0?1:-1),te=void 0;if((n<0?S:d)&&(D=Bo(e,D,-n,D&&D.line==t.line?a:null)),D&&D.line==t.line&&(te=ut(D,r))&&(n<0?te<0:te>0))return kr(e,D,t,n,i)}var Z=c.find(n<0?-1:1);return(n<0?d:S)&&(Z=Bo(e,Z,n,Z.line==t.line?a:null)),Z?kr(e,Z,t,n,i):null}}return t}function zi(e,t,r,n,i){var a=n||1,o=kr(e,t,r,a,i)||!i&&kr(e,t,r,a,!0)||kr(e,t,r,-a,i)||!i&&kr(e,t,r,-a,!0);return o||(e.cantEdit=!0,Ne(e.first,0))}function Bo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?st(e,Ne(t.line-1)):null:r>0&&t.ch==(n||et(e,t.line)).text.length?t.line<e.first+e.size-1?Ne(t.line+1,0):null:new Ne(t.line,t.ch+r)}function Wo(e){e.setSelection(Ne(e.firstLine(),0),Ne(e.lastLine()),oe)}function zo(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,a,o,s){i&&(n.from=st(e,i)),a&&(n.to=st(e,a)),o&&(n.text=o),s!==void 0&&(n.origin=s)}),De(e,"beforeChange",e,n),e.cm&&De(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 Tr(e,t,r){if(e.cm){if(!e.cm.curOp)return Nt(e.cm,Tr)(e,t,r);if(e.cm.state.suppressEdits)return}if((L(e,"beforeChange")||e.cm&&L(e.cm,"beforeChange"))&&(t=zo(e,t,!0),!t))return;var n=Ei&&!r&&Si(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Ho(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Ho(e,t)}function Ho(e,t){if(t.text.length==1&&t.text[0]==""&&ut(t.from,t.to)==0)return;var r=_a(e,t);Do(e,t,r,e.cm?e.cm.curOp.id:NaN),ai(e,t,r,Pn(e,t));var n=[];zn(e,function(i,a){!a&&F(n,i.history)==-1&&($o(i.history,t),n.push(i.history)),ai(i,t,null,Pn(i,t))})}function Hi(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var i=e.history,a,o=e.sel,s=t=="undo"?i.done:i.undone,c=t=="undo"?i.undone:i.done,d=0;d<s.length&&!(a=s[d],r?a.ranges&&!a.equals(e.sel):!a.ranges);d++);if(d==s.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=s.pop(),a.ranges){if(Fi(a,c),r&&!a.equals(e.sel)){Xt(e,a,{clearRedo:!1});return}o=a}else if(n){s.push(a);return}else break;var S=[];Fi(o,c),c.push({changes:S,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var D=L(e,"beforeChange")||e.cm&&L(e.cm,"beforeChange"),te=function(Re){var Be=a.changes[Re];if(Be.origin=t,D&&!zo(e,Be,!1))return s.length=0,{};S.push(wa(e,Be));var Ge=Re?_a(e,Be):p(s);ai(e,Be,Ge,Ro(e,Be)),!Re&&e.cm&&e.cm.scrollIntoView({from:Be.from,to:Wn(Be)});var Ve=[];zn(e,function(Xe,Ze){!Ze&&F(Ve,Xe.history)==-1&&($o(Xe.history,Be),Ve.push(Xe.history)),ai(Xe,Be,null,Ro(Xe,Be))})},Z=a.changes.length-1;Z>=0;--Z){var Le=te(Z);if(Le)return Le.v}}function Ko(e,t){if(t==0)return;if(e.first+=t,e.sel=new ln(T(e.sel.ranges,function(i){return new vt(Ne(i.anchor.line+t,i.anchor.ch),Ne(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){Zt(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Un(e.cm,n,"gutter")}}function ai(e,t,r,n){if(e.cm&&!e.cm.curOp)return Nt(e.cm,ai)(e,t,r,n);if(t.to.line<e.first){Ko(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Ko(e,i),t={from:Ne(e.first,0),to:Ne(t.to.line+i,t.to.ch),text:[p(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:Ne(a,et(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Sn(e,t.from,t.to),r||(r=_a(e,t)),e.cm?_l(e.cm,t,n):Ea(e,t,n),Wi(e,r,oe),e.cantEdit&&zi(e,Ne(e.firstLine(),0))&&(e.cantEdit=!1)}function _l(e,t,r){var n=e.doc,i=e.display,a=t.from,o=t.to,s=!1,c=a.line;e.options.lineWrapping||(c=gt(tt(et(n,a.line))),n.iter(c,o.line+1,function(Z){if(Z==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&k(e),Ea(n,t,r,oo(e)),e.options.lineWrapping||(n.iter(c,a.line+t.text.length,function(Z){var Le=Kt(Z);Le>i.maxLineLength&&(i.maxLine=Z,i.maxLineLength=Le,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),Wr(n,a.line),ni(e,400);var d=t.text.length-(o.line-a.line)-1;t.full?Zt(e):a.line==o.line&&t.text.length==1&&!ko(e.doc,t)?Un(e,a.line,"text"):Zt(e,a.line,o.line+1,d);var S=L(e,"changes"),D=L(e,"change");if(D||S){var te={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};D&&zt(e,"change",e,te),S&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(te)}e.display.selForContextMenu=null}function Ar(e,t,r,n,i){var a;n||(n=r),ut(n,r)<0&&(a=[n,r],r=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Tr(e,{from:r,to:n,text:t,origin:i})}function Go(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Xo(e,t,r,n){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var s=0;s<a.ranges.length;s++)Go(a.ranges[s].anchor,t,r,n),Go(a.ranges[s].head,t,r,n);continue}for(var c=0;c<a.changes.length;++c){var d=a.changes[c];if(r<d.from.line)d.from=Ne(d.from.line+n,d.from.ch),d.to=Ne(d.to.line+n,d.to.ch);else if(t<=d.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function $o(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Xo(e.done,r,n,i),Xo(e.undone,r,n,i)}function oi(e,t,r,n){var i=t,a=t;return typeof t=="number"?a=et(e,Jn(e,t)):i=gt(t),i==null?null:(n(a,i)&&e.cm&&Un(e.cm,i,r),a)}function si(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}si.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Gt(i),zt(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function li(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}li.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var a=Math.min(t,i-e),o=n.height;if(n.removeInner(e,a),this.height-=o-n.height,i==a&&(this.children.splice(r--,1),n.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof si))){var s=[];this.collapse(s),this.children=[new si(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,s=o;s<i.lines.length;){var c=new si(i.lines.slice(s,s+=25));i.height-=c.height,this.children.splice(++n,0,c),c.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new li(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=F(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new li(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,r))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var ui=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};ui.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=gt(r);if(n==null||!t)return;for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var a=Yr(this);dn(r,Math.max(0,r.height-a)),e&&(rn(e,function(){Vo(e,r,-a),Un(e,n,"widget")}),zt(e,"lineWidgetCleared",e,this,n))},ui.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Yr(this)-t;if(!i)return;wt(this.doc,n)||dn(n,n.height+i),r&&rn(r,function(){r.curOp.forceUpdate=!0,Vo(r,n,i),zt(r,"lineWidgetChanged",r,e,gt(n))})},R(ui);function Vo(e,t,r){Ot(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&pa(e,r)}function xl(e,t,r,n){var i=new ui(e,r,n),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),oi(e,t,"widget",function(o){var s=o.widgets||(o.widgets=[]);if(i.insertAt==null?s.push(i):s.splice(Math.min(s.length-1,Math.max(0,i.insertAt)),0,i),i.line=o,a&&!wt(e,o)){var c=Ot(o)<e.scrollTop;dn(o,o.height+Yr(i)),c&&pa(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&zt(a,"lineWidgetAdded",a,i,typeof t=="number"?t:gt(t)),i}var Yo=0,Hn=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Yo};Hn.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&sr(e),L(this,"clear")){var r=this.find();r&&zt(this,"clear",r.from,r.to)}for(var n=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],s=Rn(o.markedSpans,this);e&&!this.collapsed?Un(e,gt(o),"text"):e&&(s.to!=null&&(i=gt(o)),s.from!=null&&(n=gt(o))),o.markedSpans=Ia(o.markedSpans,s),s.from==null&&this.collapsed&&!wt(this.doc,o)&&e&&dn(o,xr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var d=tt(this.lines[c]),S=Kt(d);S>e.display.maxLineLength&&(e.display.maxLine=d,e.display.maxLineLength=S,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Zt(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Uo(e.doc)),e&&zt(e,"markerCleared",e,this,n,i),t&&lr(e),this.parent&&this.parent.clear()},Hn.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var a=this.lines[i],o=Rn(a.markedSpans,this);if(o.from!=null&&(r=Ne(t?a:gt(a),o.from),e==-1))return r;if(o.to!=null&&(n=Ne(t?a:gt(a),o.to),e==1))return n}return r&&{from:r,to:n}},Hn.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;rn(n,function(){var i=t.line,a=gt(t.line),o=na(n,a);if(o&&(Qa(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!wt(r.doc,i)&&r.height!=null){var s=r.height;r.height=null;var c=Yr(r)-s;c&&dn(i,i.height+c)}zt(n,"markerChanged",n,e)})},Hn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||F(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Hn.prototype.detachLine=function(e){if(this.lines.splice(F(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},R(Hn);function Lr(e,t,r,n,i){if(n&&n.shared)return El(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Nt(e.cm,Lr)(e,t,r,n,i);var a=new Hn(e,i),o=ut(t,r);if(n&&l(n,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=V("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Qi(e,t.line,t,r,a)||t.line!=r.line&&Qi(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ci()}a.addToHistory&&Do(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s=t.line,c=e.cm,d;if(e.iter(s,r.line+1,function(D){c&&a.collapsed&&!c.options.lineWrapping&&tt(D)==c.display.maxLine&&(d=!0),a.collapsed&&s!=t.line&&dn(D,0),zr(D,new gr(a,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),a.collapsed&&e.iter(t.line,r.line+1,function(D){wt(e,D)&&dn(D,0)}),a.clearOnEnter&&Se(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(wi(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Yo,a.atomic=!0),c){if(d&&(c.curOp.updateMaxLine=!0),a.collapsed)Zt(c,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var S=t.line;S<=r.line;S++)Un(c,S,"text");a.atomic&&Uo(c.doc),zt(c,"markerAdded",c,a)}return a}var ci=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};ci.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();zt(this,"clear")},ci.prototype.find=function(e,t){return this.primary.find(e,t)},R(ci);function El(e,t,r,n,i){n=l(n),n.shared=!1;var a=[Lr(e,t,r,n,i)],o=a[0],s=n.widgetNode;return zn(e,function(c){s&&(n.widgetNode=s.cloneNode(!0)),a.push(Lr(c,st(c,t),st(c,r),n,i));for(var d=0;d<c.linked.length;++d)if(c.linked[d].isParent)return;o=p(a)}),new ci(a,o)}function Jo(e){return e.findMarks(Ne(e.first,0),e.clipPos(Ne(e.lastLine())),function(t){return t.parent})}function wl(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(ut(a,o)){var s=Lr(e,a,o,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function Cl(e){for(var t=function(n){var i=e[n],a=[i.primary.doc];zn(i.primary.doc,function(c){return a.push(c)});for(var o=0;o<i.markers.length;o++){var s=i.markers[o];F(a,s.doc)==-1&&(s.parent=null,i.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,Qt=function(e,t,r,n,i){if(!(this instanceof Qt))return new Qt(e,t,r,n,i);r==null&&(r=0),li.call(this,[new si([new Ct("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var a=Ne(r,0);this.sel=Bn(a),this.history=new Ui(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ea(this,{from:a,to:a,text:e}),Xt(this,Bn(a),oe)};Qt.prototype=fe(li.prototype,{constructor:Qt,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=fr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:It(function(e){var t=Ne(this.first,0),r=this.first+this.size-1;Tr(this,{from:t,to:Ne(r,et(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Qr(this.cm,0,0),Xt(this,Bn(t),oe)}),replaceRange:function(e,t,r,n){t=st(this,t),r=r?st(this,r):t,Ar(this,e,t,r,n)},getRange:function(e,t,r){var n=Sn(this,st(this,e),st(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Mn(this,e))return et(this,e)},getLineNumber:function(e){return gt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=et(this,e)),tt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:It(function(e,t,r){jo(this,st(this,typeof e=="number"?Ne(e,t||0):e),null,r)}),setSelection:It(function(e,t,r){jo(this,st(this,e),st(this,t||e),r)}),extendSelection:It(function(e,t,r){Bi(this,st(this,e),t&&st(this,t),r)}),extendSelections:It(function(e,t){Po(this,Ur(this,e),t)}),extendSelectionsBy:It(function(e,t){var r=T(this.sel.ranges,e);Po(this,Ur(this,r),t)}),setSelections:It(function(e,t,r){if(!e.length)return;for(var n=[],i=0;i<e.length;i++)n[i]=new vt(st(this,e[i].anchor),st(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Xt(this,vn(this.cm,n,t),r)}),addSelection:It(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new vt(st(this,e),st(this,t||e))),Xt(this,vn(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=Sn(this,t[n].from(),t[n].to());r=r?r.concat(i):i}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Sn(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:It(function(e,t,r){for(var n=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];n[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:r}}for(var s=t&&t!="end"&&fl(this,n,t),c=n.length-1;c>=0;c--)Tr(this,n[c]);s?No(this,s):this.cm&&Cr(this.cm)}),undo:It(function(){Hi(this,"undo")}),redo:It(function(){Hi(this,"redo")}),undoSelection:It(function(){Hi(this,"undo",!0)}),redoSelection:It(function(){Hi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Ui(this.history.maxGeneration),zn(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:Or(this.history.done),undone:Or(this.history.undone)}},setHistory:function(e){var t=this.history=new Ui(this.history.maxGeneration);t.done=Or(e.done.slice(0),null,!0),t.undone=Or(e.undone.slice(0),null,!0)},setGutterMarker:It(function(e,t,r){return oi(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&Ce(i)&&(n.gutterMarkers=null),!0})}),clearGutter:It(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&oi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Ce(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Mn(this,e))return null;if(t=e,e=et(this,e),!e)return null}else if(t=gt(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:It(function(e,t,r){return oi(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(de(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:It(function(e,t,r){return oi(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=n[i];if(a)if(r==null)n[i]=null;else{var o=a.match(de(r));if(!o)return!1;var s=o.index+o[0].length;n[i]=a.slice(0,o.index)+(!o.index||s==a.length?"":" ")+a.slice(s)||null}else return!1;return!0})}),addLineWidget:It(function(e,t,r){return xl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Lr(this,st(this,e),st(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=st(this,e),Lr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=st(this,e);var t=[],r=et(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=st(this,e),t=st(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;s<o.length;s++){var c=o[s];!(c.to!=null&&i==e.line&&e.ch>=c.to||c.from==null&&i!=e.line||c.from!=null&&i==t.line&&c.from>=t.ch)&&(!r||r(c.marker))&&n.push(c.marker.parent||c.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var a=i.text.length+n;if(a>e)return t=e,!0;e-=a,++r}),st(this,Ne(r,t))},indexFromPos:function(e){e=st(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new Qt(fr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new Qt(fr(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wl(n,Jo(this)),n},unlinkDoc:function(e){if(e instanceof kt&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Cl(Jo(this));break}if(e.history==this.history){var n=[e.id];zn(e,function(i){return n.push(i.id)},!0),e.history=new Ui(null),e.history.done=Or(this.history.done,n),e.history.undone=Or(this.history.undone,n)}},iterLinkedDocs:function(e){zn(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:It(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&hl(this.cm)})}),Qt.prototype.eachLine=Qt.prototype.iter;var Zo=0;function Ol(e){var t=this;if(Qo(t),He(t,e)||An(t.display,e))return;h(e),N&&(Zo=+new Date);var r=rr(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,a=Array(i),o=0,s=function(){++o==i&&Nt(t,function(){r=st(t.doc,r);var Z={from:r,to:r,text:t.doc.splitLines(a.filter(function(Le){return Le!=null}).join(t.doc.lineSeparator())),origin:"paste"};Tr(t.doc,Z),No(t.doc,Bn(st(t.doc,r),st(t.doc,Wn(Z))))})()},c=function(Z,Le){if(t.options.allowDropFileTypes&&F(t.options.allowDropFileTypes,Z.type)==-1){s();return}var Re=new FileReader;Re.onerror=function(){return s()},Re.onload=function(){var Be=Re.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Be)){s();return}a[Le]=Be,s()},Re.readAsText(Z)},d=0;d<n.length;d++)c(n[d],d);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var S=e.dataTransfer.getData("Text");if(S){var D;if(t.state.draggingText&&!t.state.draggingText.copy&&(D=t.listSelections()),Wi(t.doc,Bn(r,r)),D)for(var te=0;te<D.length;++te)Ar(t.doc,"",D[te].anchor,D[te].head,"drag");t.replaceSelection(S,"around","paste"),t.display.input.focus()}}catch(Z){}}}function kl(e,t){if(N&&(!e.state.draggingText||+new Date-Zo<100)){E(t);return}if(He(e,t)||An(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!ue){var r=y("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ie&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),ie&&r.parentNode.removeChild(r)}}function Tl(e,t){var r=rr(e,t);if(!r)return;var n=document.createDocumentFragment();uo(e,r,n),e.display.dragCursor||(e.display.dragCursor=y("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),se(e.display.dragCursor,n)}function Qo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function qo(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var a=0;a<r.length;a++)e(r[a])})}var es=!1;function Al(){if(es)return;Ll(),es=!0}function Ll(){var e;Se(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,qo(Dl)},100))}),Se(window,"blur",function(){return qo(wr)})}function Dl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Kn={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"},di=0;di<10;di++)Kn[di+48]=Kn[di+96]=String(di);for(var Ki=65;Ki<=90;Ki++)Kn[Ki]=String.fromCharCode(Ki);for(var fi=1;fi<=12;fi++)Kn[fi+111]=Kn[fi+63235]="F"+fi;var Ln={};Ln.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"},Ln.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"},Ln.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"},Ln.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"]},Ln.default=ne?Ln.macDefault:Ln.pcDefault;function Ml(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,a,o=0;o<t.length-1;o++){var s=t[o];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))i=!0;else throw new Error("Unrecognized modifier name: "+s)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Rl(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=T(r.split(" "),Ml),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(" "),o=n):(s=i.slice(0,a+1).join(" "),o="...");var c=t[s];if(!c)t[s]=o;else if(c!=o)throw new Error("Inconsistent bindings for "+s)}delete e[r]}for(var d in t)e[d]=t[d];return e}function Dr(e,t,r,n){t=Gi(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&r(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Dr(e,t.fallthrough,r,n);for(var a=0;a<t.fallthrough.length;a++){var o=Dr(e,t.fallthrough[a],r,n);if(o)return o}}}function ts(e){var t=typeof e=="string"?e:Kn[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function ns(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(we?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(we?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function rs(e,t){if(ie&&e.keyCode==34&&e.char)return!1;var r=Kn[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),ns(r,e,t))}function Gi(e){return typeof e=="string"?Ln[e]:e}function Mr(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var a=t(r[i]);n.length&&ut(a.from,p(n).to)<=0;){var o=n.pop();if(ut(o.from,a.from)<0){a.from=o.from;break}}n.push(a)}rn(e,function(){for(var s=n.length-1;s>=0;s--)Ar(e.doc,"",n[s].from,n[s].to,"+delete");Cr(e)})}function Oa(e,t,r){var n=Ee(e.text,t+r,r);return n<0||n>e.text.length?null:n}function ka(e,t,r){var n=Oa(e,t.ch,r);return n==null?null:new Ne(t.line,n,r<0?"after":"before")}function Ta(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=$e(r,t.doc.direction);if(a){var o=i<0?p(a):a[0],s=i<0==(o.level==1),c=s?"after":"before",d;if(o.level>0||t.doc.direction=="rtl"){var S=_r(t,r);d=i<0?r.text.length-1:0;var D=xn(t,S,d).top;d=Ue(function(te){return xn(t,S,te).top==D},i<0==(o.level==1)?o.from:o.to-1,d),c=="before"&&(d=Oa(r,d,1))}else d=i<0?o.to:o.from;return new Ne(n,d,c)}}return new Ne(n,i<0?r.text.length:0,i<0?"before":"after")}function Pl(e,t,r,n){var i=$e(t,e.doc.direction);if(!i)return ka(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var a=ze(i,r.ch,r.sticky),o=i[a];if(e.doc.direction=="ltr"&&o.level%2==0&&(n>0?o.to>r.ch:o.from<r.ch))return ka(t,r,n);var s=function(Ge,Ve){return Oa(t,Ge instanceof Ne?Ge.ch:Ge,Ve)},c,d=function(Ge){return e.options.lineWrapping?(c=c||_r(e,t),ao(e,t,c,Ge)):{begin:0,end:t.text.length}},S=d(r.sticky=="before"?s(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var D=o.level==1==n<0,te=s(r,D?1:-1);if(te!=null&&(D?te<=o.to&&te<=S.end:te>=o.from&&te>=S.begin)){var Z=D?"before":"after";return new Ne(r.line,te,Z)}}var Le=function(Ge,Ve,Xe){for(var Ze=function(Et,Ut){return Ut?new Ne(r.line,s(Et,1),"before"):new Ne(r.line,Et,"after")};Ge>=0&&Ge<i.length;Ge+=Ve){var at=i[Ge],nt=Ve>0==(at.level!=1),ht=nt?Xe.begin:s(Xe.end,-1);if(at.from<=ht&&ht<at.to)return Ze(ht,nt);if(ht=nt?at.from:s(at.to,-1),Xe.begin<=ht&&ht<Xe.end)return Ze(ht,nt)}},Re=Le(a+n,n,S);if(Re)return Re;var Be=n>0?S.end:s(S.begin,-1);return Be!=null&&!(n>0&&Be==t.text.length)&&(Re=Le(n>0?0:i.length-1,n,d(Be)),Re)?Re:null}var hi={selectAll:Wo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),oe)},killLine:function(e){return Mr(e,function(t){if(t.empty()){var r=et(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Ne(t.head.line+1,0)}:{from:t.head,to:Ne(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Mr(e,function(t){return{from:Ne(t.from().line,0),to:st(e.doc,Ne(t.to().line+1,0))}})},delLineLeft:function(e){return Mr(e,function(t){return{from:Ne(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Mr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Mr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Ne(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Ne(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return is(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return as(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return jl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},$)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},$)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?as(e,t.head):n},$)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var a=r[i].from(),o=m(e.getLine(a.line),a.ch,n);t.push(Y(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return rn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var i=t[n].head,a=et(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new Ne(i.line,i.ch-1)),i.ch>0)i=new Ne(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Ne(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=et(e.doc,i.line-1).text;o&&(i=new Ne(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Ne(i.line-1,o.length-1),i,"+transpose"))}}r.push(new vt(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return rn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Cr(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function is(e,t){var r=et(e.doc,t),n=tt(r);return n!=r&&(t=gt(n)),Ta(!0,e,n,t,1)}function jl(e,t){var r=et(e.doc,t),n=ct(r);return n!=r&&(t=gt(n)),Ta(!0,e,r,t,-1)}function as(e,t){var r=is(e,t.line),n=et(e.doc,r.line),i=$e(n,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(r.ch,n.text.search(/\S/)),o=t.line==r.line&&t.ch<=a&&t.ch;return Ne(r.line,o?0:a,r.sticky)}return r}function Xi(e,t,r){if(typeof t=="string"&&(t=hi[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=xe}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function Nl(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Dr(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Dr(t,e.options.extraKeys,r,e)||Dr(t,e.options.keyMap,r,e)}var Il=new x;function pi(e,t,r,n){var i=e.state.keySeq;if(i){if(ts(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Il.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),os(e,i+" "+t,r,n))return!0}return os(e,t,r,n)}function os(e,t,r,n){var i=Nl(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&zt(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(h(r),da(e)),!!i}function ss(e,t){var r=rs(t,!0);return r?t.shiftKey&&!e.state.keySeq?pi(e,"Shift-"+r,t,function(n){return Xi(e,n,!0)})||pi(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Xi(e,n)}):pi(e,r,t,function(n){return Xi(e,n)}):!1}function Ul(e,t,r){return pi(e,"'"+r+"'",t,function(n){return Xi(e,n,!0)})}var Aa=null;function ls(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=ee(),He(t,e))return;N&&A<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ss(t,e);ie&&(Aa=n?r:null,!n&&r==88&&!Bt&&(ne?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),le&&!ne&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;I(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(he(t,"CodeMirror-crosshair"),Je(document,"keyup",r),Je(document,"mouseover",r))}Se(document,"keyup",r),Se(document,"mouseover",r)}function us(e){e.keyCode==16&&(this.doc.sel.shift=!1),He(this,e)}function cs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(An(t.display,e)||He(t,e)||e.ctrlKey&&!e.altKey||ne&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(ie&&r==Aa){Aa=null,h(e);return}if(ie&&(!e.which||e.which<10)&&ss(t,e))return;var i=String.fromCharCode(n==null?r:n);if(i=="\b")return;if(Ul(t,e,i))return;t.display.input.onKeyPress(e)}var Bl=400,La=function(e,t,r){this.time=e,this.pos=t,this.button=r};La.prototype.compare=function(e,t,r){return this.time+Bl>e&&ut(t,this.pos)==0&&r==this.button};var mi,gi;function Wl(e,t){var r=+new Date;return gi&&gi.compare(r,e,t)?(mi=gi=null,"triple"):mi&&mi.compare(r,e,t)?(gi=new La(r,e,t),mi=null,"double"):(mi=new La(r,e,t),gi=null,"single")}function ds(e){var t=this,r=t.display;if(He(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,An(r,e)){w||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Da(t,e))return;var n=rr(t,e),i=me(e),a=n?Wl(n,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),n&&zl(t,i,n,a,e))return;i==1?n?Kl(t,n,a,e):Q(e)==r.scroller&&h(e):i==2?(n&&Bi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(Me?t.display.input.onContextMenu(e):fo(t))}function zl(e,t,r,n,i){var a="Click";return n=="double"?a="Double"+a:n=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,pi(e,ns(a,i),i,function(o){if(typeof o=="string"&&(o=hi[o]),!o)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=o(e,r)!=xe}finally{e.state.suppressEdits=!1}return s})}function Hl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=ke?r.shiftKey&&r.metaKey:r.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=ne?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(ne?r.altKey:r.ctrlKey)),i}function Kl(e,t,r,n){N?setTimeout(u(co,e),0):e.curOp.focus=ee();var i=Hl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&je&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(ut((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(ut(o.to(),t)>0||t.xRel<0)?Gl(e,n,t,i):Xl(e,n,t,i)}function Gl(e,t,r,n){var i=e.display,a=!1,o=Nt(e,function(d){w&&(i.scroller.draggable=!1),e.state.draggingText=!1,Je(i.wrapper.ownerDocument,"mouseup",o),Je(i.wrapper.ownerDocument,"mousemove",s),Je(i.scroller,"dragstart",c),Je(i.scroller,"drop",o),a||(h(d),n.addNew||Bi(e.doc,r,null,null,n.extend),w&&!ue||N&&A==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),s=function(d){a=a||Math.abs(t.clientX-d.clientX)+Math.abs(t.clientY-d.clientY)>=10},c=function(){return a=!0};w&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),Se(i.wrapper.ownerDocument,"mouseup",o),Se(i.wrapper.ownerDocument,"mousemove",s),Se(i.scroller,"dragstart",c),Se(i.scroller,"drop",o),fo(e),setTimeout(function(){return i.input.focus()},20)}function fs(e,t,r){if(r=="char")return new vt(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new vt(Ne(t.line,0),st(e.doc,Ne(t.line+1,0)));var n=r(e,t);return new vt(n.from,n.to)}function Xl(e,t,r,n){var i=e.display,a=e.doc;h(t);var o,s,c=a.sel,d=c.ranges;if(n.addNew&&!n.extend?(s=a.sel.contains(r),s>-1?o=d[s]:o=new vt(r,r)):(o=a.sel.primary(),s=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new vt(r,r)),r=rr(e,t,!0,!0),s=-1;else{var S=fs(e,r,n.unit);n.extend?o=Ca(o,S.anchor,S.head,n.extend):o=S}n.addNew?s==-1?(s=d.length,Xt(a,vn(e,d.concat([o]),s),{scroll:!1,origin:"*mouse"})):d.length>1&&d[s].empty()&&n.unit=="char"&&!n.extend?(Xt(a,vn(e,d.slice(0,s).concat(d.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),c=a.sel):Sa(a,s,o,ye):(s=0,Xt(a,new ln([o],0),ye),c=a.sel);var D=r;function te(Xe){if(ut(D,Xe)==0)return;if(D=Xe,n.unit=="rectangle"){for(var Ze=[],at=e.options.tabSize,nt=m(et(a,r.line).text,r.ch,at),ht=m(et(a,Xe.line).text,Xe.ch,at),Et=Math.min(nt,ht),Ut=Math.max(nt,ht),Tt=Math.min(r.line,Xe.line),an=Math.min(e.lastLine(),Math.max(r.line,Xe.line));Tt<=an;Tt++){var qt=et(a,Tt).text,Mt=q(qt,Et,at);Et==Ut?Ze.push(new vt(Ne(Tt,Mt),Ne(Tt,Mt))):qt.length>Mt&&Ze.push(new vt(Ne(Tt,Mt),Ne(Tt,q(qt,Ut,at))))}Ze.length||Ze.push(new vt(r,r)),Xt(a,vn(e,c.ranges.slice(0,s).concat(Ze),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Xe)}else{var en=o,Ht=fs(e,Xe,n.unit),jt=en.anchor,Rt;ut(Ht.anchor,jt)>0?(Rt=Ht.head,jt=Yn(en.from(),Ht.anchor)):(Rt=Ht.anchor,jt=hr(en.to(),Ht.head));var At=c.ranges.slice(0);At[s]=$l(e,new vt(st(a,jt),Rt)),Xt(a,vn(e,At,s),ye)}}var Z=i.wrapper.getBoundingClientRect(),Le=0;function Re(Xe){var Ze=++Le,at=rr(e,Xe,!0,n.unit=="rectangle");if(!at)return;if(ut(at,D)!=0){e.curOp.focus=ee(),te(at);var nt=Pi(i,a);(at.line>=nt.to||at.line<nt.from)&&setTimeout(Nt(e,function(){Le==Ze&&Re(Xe)}),150)}else{var ht=Xe.clientY<Z.top?-20:Xe.clientY>Z.bottom?20:0;ht&&setTimeout(Nt(e,function(){if(Le!=Ze)return;i.scroller.scrollTop+=ht,Re(Xe)}),50)}}function Be(Xe){e.state.selectingText=!1,Le=Infinity,Xe&&(h(Xe),i.input.focus()),Je(i.wrapper.ownerDocument,"mousemove",Ge),Je(i.wrapper.ownerDocument,"mouseup",Ve),a.history.lastSelOrigin=null}var Ge=Nt(e,function(Xe){Xe.buttons===0||!me(Xe)?Be(Xe):Re(Xe)}),Ve=Nt(e,Be);e.state.selectingText=Ve,Se(i.wrapper.ownerDocument,"mousemove",Ge),Se(i.wrapper.ownerDocument,"mouseup",Ve)}function $l(e,t){var r=t.anchor,n=t.head,i=et(e.doc,r.line);if(ut(r,n)==0&&r.sticky==n.sticky)return t;var a=$e(i);if(!a)return t;var o=ze(a,r.ch,r.sticky),s=a[o];if(s.from!=r.ch&&s.to!=r.ch)return t;var c=o+(s.from==r.ch==(s.level!=1)?0:1);if(c==0||c==a.length)return t;var d;if(n.line!=r.line)d=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var S=ze(a,n.ch,n.sticky),D=S-o||(n.ch-r.ch)*(s.level==1?-1:1);S==c-1||S==c?d=D<0:d=D>0}var te=a[c+(d?-1:0)],Z=d==(te.level==1),Le=Z?te.from:te.to,Re=Z?"after":"before";return r.ch==Le&&r.sticky==Re?t:new vt(new Ne(r.line,Le,Re),n)}function hs(e,t,r,n){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(te){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&h(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!L(e,r))return _(t);a-=s.top-o.viewOffset;for(var c=0;c<e.display.gutterSpecs.length;++c){var d=o.gutters.childNodes[c];if(d&&d.getBoundingClientRect().right>=i){var S=On(e.doc,a),D=e.display.gutterSpecs[c];return De(e,r,e,S,D.className,t),_(t)}}}function Da(e,t){return hs(e,t,"gutterClick",!0)}function ps(e,t){if(An(e.display,t)||Vl(e,t))return;if(He(e,t,"contextmenu"))return;Me||e.display.input.onContextMenu(t)}function Vl(e,t){return L(e,"gutterContextMenu")?hs(e,t,"gutterContextMenu",!1):!1}function ms(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Jr(e)}var Rr={toString:function(){return"CodeMirror.Init"}},gs={},$i={};function Yl(e){var t=e.optionHandlers;function r(n,i,a,o){e.defaults[n]=i,a&&(t[n]=o?function(s,c,d){d!=Rr&&a(s,c,d)}:a)}e.defineOption=r,e.Init=Rr,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,xa(n)},!0),r("indentUnit",2,xa,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){ii(n),Jr(n),Zt(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!i)return;var a=[],o=n.doc.first;n.doc.iter(function(c){for(var d=0;;){var S=c.text.indexOf(i,d);if(S==-1)break;d=S+i.length,a.push(Ne(o,S))}o++});for(var s=a.length-1;s>=0;s--)Ar(n.doc,i,a[s],Ne(a[s].line,a[s].ch+i.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,a){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Rr&&n.refresh()}),r("specialCharPlaceholder",Cs,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",B?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,i){return n.getInputField().spellcheck=i},!0),r("autocorrect",!1,function(n,i){return n.getInputField().autocorrect=i},!0),r("autocapitalize",!1,function(n,i){return n.getInputField().autocapitalize=i},!0),r("rtlMoveVisually",!Fe),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){ms(n),ri(n)},!0),r("keyMap","default",function(n,i,a){var o=Gi(i),s=a!=Rr&&Gi(a);s&&s.detach&&s.detach(n,o),o.attach&&o.attach(n,s||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Zl,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=ya(i,n.options.lineNumbers),ri(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?ua(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Sr(n)},!0),r("scrollbarStyle","native",function(n){bo(n),Sr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=ya(n.options.gutters,i),ri(n)},!0),r("firstLineNumber",1,ri,!0),r("lineNumberFormatter",function(n){return n},ri,!0),r("showCursorWhenSelecting",!1,Zr,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(wr(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Zr,!0),r("singleCursorHeightPerLine",!0,Zr,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,ii,!0),r("addModeClass",!1,ii,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,ii,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Jl(e,t,r){var n=r&&r!=Rr;if(!t!=!n){var i=e.display.dragFunctions,a=t?Se:Je;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function Zl(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(he(e.display.wrapper,"CodeMirror-wrap"),mn(e)),ca(e),Zt(e),Jr(e),setTimeout(function(){return Sr(e)},100)}function kt(e,t){var r=this;if(!(this instanceof kt))return new kt(e,t);this.options=t=t?l(t):{},l(gs,t,!1);var n=t.value;typeof n=="string"?n=new Qt(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new kt.inputStyles[t.inputStyle](this),a=this.display=new cl(e,n,i,t);a.wrapper.CodeMirror=this,ms(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),bo(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 x,keySeq:null,specialChars:null},t.autofocus&&!B&&a.input.focus(),N&&A<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ql(this),Al(),sr(this),this.curOp.forceUpdate=!0,To(this,n),t.autofocus&&!B||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&fa(r)},20):wr(this);for(var o in $i)$i.hasOwnProperty(o)&&$i[o](this,t[o],Rr);xo(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Ma.length;++s)Ma[s](this);lr(this),w&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}kt.defaults=gs,kt.optionHandlers=$i;function Ql(e){var t=e.display;Se(t.scroller,"mousedown",Nt(e,ds)),N&&A<11?Se(t.scroller,"dblclick",Nt(e,function(c){if(He(e,c))return;var d=rr(e,c);if(!d||Da(e,c)||An(e.display,c))return;h(c);var S=e.findWordAt(d);Bi(e.doc,S.anchor,S.head)})):Se(t.scroller,"dblclick",function(c){return He(e,c)||h(c)}),Se(t.scroller,"contextmenu",function(c){return ps(e,c)}),Se(t.input.getField(),"contextmenu",function(c){t.scroller.contains(c.target)||ps(e,c)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function a(c){if(c.touches.length!=1)return!1;var d=c.touches[0];return d.radiusX<=1&&d.radiusY<=1}function o(c,d){if(d.left==null)return!0;var S=d.left-c.left,D=d.top-c.top;return S*S+D*D>20*20}Se(t.scroller,"touchstart",function(c){if(!He(e,c)&&!a(c)&&!Da(e,c)){t.input.ensurePolled(),clearTimeout(r);var d=+new Date;t.activeTouch={start:d,moved:!1,prev:d-n.end<=300?n:null},c.touches.length==1&&(t.activeTouch.left=c.touches[0].pageX,t.activeTouch.top=c.touches[0].pageY)}}),Se(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Se(t.scroller,"touchend",function(c){var d=t.activeTouch;if(d&&!An(t,c)&&d.left!=null&&!d.moved&&new Date-d.start<300){var S=e.coordsChar(t.activeTouch,"page"),D;!d.prev||o(d,d.prev)?D=new vt(S,S):!d.prev.prev||o(d,d.prev.prev)?D=e.findWordAt(S):D=new vt(Ne(S.line,0),st(e.doc,Ne(S.line+1,0))),e.setSelection(D.anchor,D.head),e.focus(),h(c)}i()}),Se(t.scroller,"touchcancel",i),Se(t.scroller,"scroll",function(){t.scroller.clientHeight&&(qr(e,t.scroller.scrollTop),ar(e,t.scroller.scrollLeft,!0),De(e,"scroll",e))}),Se(t.scroller,"mousewheel",function(c){return Co(e,c)}),Se(t.scroller,"DOMMouseScroll",function(c){return Co(e,c)}),Se(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(c){He(e,c)||E(c)},over:function(c){He(e,c)||(Tl(e,c),E(c))},start:function(c){return kl(e,c)},drop:Nt(e,Ol),leave:function(c){He(e,c)||Qo(e)}};var s=t.input.getField();Se(s,"keyup",function(c){return us.call(e,c)}),Se(s,"keydown",Nt(e,ls)),Se(s,"keypress",Nt(e,cs)),Se(s,"focus",function(c){return fa(e,c)}),Se(s,"blur",function(c){return wr(e,c)})}var Ma=[];kt.defineInitHook=function(e){return Ma.push(e)};function vi(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=nn(e,t).state:r="prev");var o=e.options.tabSize,s=et(i,t),c=m(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var d=s.text.match(/^\s*/)[0],S;if(!n&&!/\S/.test(s.text))S=0,r="not";else if(r=="smart"&&(S=i.mode.indent(a,s.text.slice(d.length),s.text),S==xe||S>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?S=m(et(i,t-1).text,null,o):S=0:r=="add"?S=c+e.options.indentUnit:r=="subtract"?S=c-e.options.indentUnit:typeof r=="number"&&(S=c+r),S=Math.max(0,S);var D="",te=0;if(e.options.indentWithTabs)for(var Z=Math.floor(S/o);Z;--Z)te+=o,D+=" ";if(te<S&&(D+=Y(S-te)),D!=d)return Ar(i,D,Ne(t,0),Ne(t,d.length),"+input"),s.stateAfter=null,!0;for(var Le=0;Le<i.sel.ranges.length;Le++){var Re=i.sel.ranges[Le];if(Re.head.line==t&&Re.head.ch<d.length){var Be=Ne(t,d.length);Sa(i,Le,new vt(Be,Be));break}}}var bn=null;function Vi(e){bn=e}function Ra(e,t,r,n,i){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var o=+new Date-200,s=i=="paste"||e.state.pasteIncoming>o,c=pt(t),d=null;if(s&&n.ranges.length>1)if(bn&&bn.text.join(`
|
|
`)==t){if(n.ranges.length%bn.text.length==0){d=[];for(var S=0;S<bn.text.length;S++)d.push(a.splitLines(bn.text[S]))}}else c.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(d=T(c,function(Ge){return[Ge]}));for(var D=e.curOp.updateInput,te=n.ranges.length-1;te>=0;te--){var Z=n.ranges[te],Le=Z.from(),Re=Z.to();Z.empty()&&(r&&r>0?Le=Ne(Le.line,Le.ch-r):e.state.overwrite&&!s?Re=Ne(Re.line,Math.min(et(a,Re.line).text.length,Re.ch+p(c).length)):s&&bn&&bn.lineWise&&bn.text.join(`
|
|
`)==c.join(`
|
|
`)&&(Le=Re=Ne(Le.line,0)));var Be={from:Le,to:Re,text:d?d[te%d.length]:c,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};Tr(e.doc,Be),zt(e,"inputRead",e,Be)}t&&!s&&bs(e,t),Cr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=D),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function vs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&rn(t,function(){return Ra(t,r,0,null,"paste")}),!0}function bs(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)continue;var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=vi(e,i.head.line,"smart");break}}else a.electricInput&&(a.electricInput.test(et(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=vi(e,i.head.line,"smart")));o&&zt(e,"electricInput",e,i.head.line)}}function ys(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,a={anchor:Ne(i,0),head:Ne(i+1,0)};r.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:r}}function _s(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function xs(){var e=y("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=y("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return w?e.style.width="1000px":e.setAttribute("wrap","off"),U&&(e.style.border="1px solid black"),_s(e),t}function ql(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var a=this.options,o=a[n];if(a[n]==i&&n!="mode")return;a[n]=i,t.hasOwnProperty(n)&&Nt(this,t[n])(this,i,o),De(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,i){this.state.keyMaps[i?"push":"unshift"](Gi(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,a=0;a<i.length;++a)if(i[a]==n||i[a].name==n)return i.splice(a,1),!0},addOverlay:Yt(function(n,i){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");b(this.state.overlays,{mode:a,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(o){return o.priority}),this.state.modeGen++,Zt(this)}),removeOverlay:Yt(function(n){for(var i=this.state.overlays,a=0;a<i.length;++a){var o=i[a].modeSpec;if(o==n||typeof n=="string"&&o.name==n){i.splice(a,1),this.state.modeGen++,Zt(this);return}}}),indentLine:Yt(function(n,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Mn(this.doc,n)&&vi(this,n,i,a)}),indentSelection:Yt(function(n){for(var i=this.doc.sel.ranges,a=-1,o=0;o<i.length;o++){var s=i[o];if(s.empty())s.head.line>a&&(vi(this,s.head.line,n,!0),a=s.head.line,o==this.doc.sel.primIndex&&Cr(this));else{var c=s.from(),d=s.to(),S=Math.max(a,c.line);a=Math.min(this.lastLine(),d.line-(d.ch?0:1))+1;for(var D=S;D<a;++D)vi(this,D,n);var te=this.doc.sel.ranges;c.ch==0&&i.length==te.length&&te[o].from().ch>0&&Sa(this.doc,o,new vt(c,te[o].to()),oe)}}}),getTokenAt:function(n,i){return Tn(this,n,i)},getLineTokens:function(n,i){return Tn(this,Ne(n),i,!0)},getTokenTypeAt:function(n){n=st(this.doc,n);var i=Fr(this,et(this.doc,n.line)),a=0,o=(i.length-1)/2,s=n.ch,c;if(s==0)c=i[2];else for(;;){var d=a+o>>1;if((d?i[d*2-1]:0)>=s)o=d;else if(i[d*2+1]<s)a=d+1;else{c=i[d*2+2];break}}var S=c?c.indexOf("overlay "):-1;return S<0?c:S==0?null:c.slice(0,S-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var a=[];if(!r.hasOwnProperty(i))return a;var o=r[i],s=this.getModeAt(n);if(typeof s[i]=="string")o[s[i]]&&a.push(o[s[i]]);else if(s[i])for(var c=0;c<s[i].length;c++){var d=o[s[i][c]];d&&a.push(d)}else s.helperType&&o[s.helperType]?a.push(o[s.helperType]):o[s.name]&&a.push(o[s.name]);for(var S=0;S<o._global.length;S++){var D=o._global[S];D.pred(s,this)&&F(a,D.val)==-1&&a.push(D.val)}return a},getStateAfter:function(n,i){var a=this.doc;return n=Jn(a,n==null?a.first+a.size-1:n),nn(this,n+1,i).state},cursorCoords:function(n,i){var a,o=this.doc.sel.primary();return n==null?a=o.head:typeof n=="object"?a=st(this.doc,n):a=n?o.from():o.to(),gn(this,a,i||"page")},charCoords:function(n,i){return ia(this,st(this.doc,n),i||"page")},coordsChar:function(n,i){return n=no(this,n,i||"page"),oa(this,n.left,n.top)},lineAtHeight:function(n,i){return n=no(this,{top:n,left:0},i||"page").top,On(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,a){var o=!1,s;if(typeof n=="number"){var c=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>c&&(n=c,o=!0),s=et(this.doc,n)}else s=n;return Li(this,s,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-Ot(s):0)},defaultTextHeight:function(){return xr(this.display)},defaultCharWidth:function(){return Er(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,a,o,s){var c=this.display;n=gn(this,st(this.doc,n));var d=n.bottom,S=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),c.sizer.appendChild(i),o=="over")d=n.top;else if(o=="above"||o=="near"){var D=Math.max(c.wrapper.clientHeight,this.doc.height),te=Math.max(c.sizer.clientWidth,c.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>D)&&n.top>i.offsetHeight?d=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=D&&(d=n.bottom),S+i.offsetWidth>te&&(S=te-i.offsetWidth)}i.style.top=d+"px",i.style.left=i.style.right="",s=="right"?(S=c.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(s=="left"?S=0:s=="middle"&&(S=(c.sizer.clientWidth-i.offsetWidth)/2),i.style.left=S+"px"),a&&Js(this,{left:S,top:d,right:S+i.offsetWidth,bottom:d+i.offsetHeight})},triggerOnKeyDown:Yt(ls),triggerOnKeyPress:Yt(cs),triggerOnKeyUp:us,triggerOnMouseDown:Yt(ds),execCommand:function(n){if(hi.hasOwnProperty(n))return hi[n].call(null,this)},triggerElectric:Yt(function(n){bs(this,n)}),findPosH:function(n,i,a,o){var s=1;i<0&&(s=-1,i=-i);for(var c=st(this.doc,n),d=0;d<i&&!(c=Pa(this.doc,c,s,a,o),c.hitSide);++d);return c},moveH:Yt(function(n,i){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?Pa(a.doc,o.head,n,i,a.options.rtlMoveVisually):n<0?o.from():o.to()},$)}),deleteH:Yt(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Mr(this,function(s){var c=Pa(o,s.head,n,i,!1);return n<0?{from:c,to:s.head}:{from:s.head,to:c}})}),findPosV:function(n,i,a,o){var s=1,c=o;i<0&&(s=-1,i=-i);for(var d=st(this.doc,n),S=0;S<i;++S){var D=gn(this,d,"div");if(c==null?c=D.left:D.left=c,d=Es(this,D,s,a),d.hitSide)break}return d},moveV:Yt(function(n,i){var a=this,o=this.doc,s=[],c=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(S){if(c)return n<0?S.from():S.to();var D=gn(a,S.head,"div");S.goalColumn!=null&&(D.left=S.goalColumn),s.push(D.left);var te=Es(a,D,n,i);return i=="page"&&S==o.sel.primary()&&pa(a,ia(a,te,"div").top-D.top),te},$),s.length)for(var d=0;d<o.sel.ranges.length;d++)o.sel.ranges[d].goalColumn=s[d]}),findWordAt:function(n){var i=this.doc,a=et(i,n.line).text,o=n.ch,s=n.ch;if(a){var c=this.getHelper(n,"wordChars");(n.sticky=="before"||s==a.length)&&o?--o:++s;for(var d=a.charAt(o),S=Ae(d,c)?function(D){return Ae(D,c)}:/\s/.test(d)?function(D){return/\s/.test(D)}:function(D){return!/\s/.test(D)&&!Ae(D)};o>0&&S(a.charAt(o-1));)--o;for(;s<a.length&&S(a.charAt(s));)++s}return new vt(Ne(n.line,o),Ne(n.line,s))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?I(this.display.cursorDiv,"CodeMirror-overwrite"):he(this.display.cursorDiv,"CodeMirror-overwrite"),De(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==ee()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Yt(function(n,i){Qr(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-_n(this)-this.display.barHeight,width:n.scrollWidth-_n(this)-this.display.barWidth,clientHeight:ta(this),clientWidth:tr(this)}},scrollIntoView:Yt(function(n,i){n==null?(n={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof n=="number"?n={from:Ne(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?Zs(this,n):po(this,n.from,n.to,n.margin)}),setSize:Yt(function(n,i){var a=this,o=function(c){return typeof c=="number"||/^\d+$/.test(String(c))?c+"px":c};n!=null&&(this.display.wrapper.style.width=o(n)),i!=null&&(this.display.wrapper.style.height=o(i)),this.options.lineWrapping&&qa(this);var s=this.display.viewFrom;this.doc.iter(s,this.display.viewTo,function(c){if(c.widgets){for(var d=0;d<c.widgets.length;d++)if(c.widgets[d].noHScroll){Un(a,s,"widget");break}}++s}),this.curOp.forceUpdate=!0,De(this,"refresh",this)}),operation:function(n){return rn(this,n)},startOperation:function(){return sr(this)},endOperation:function(){return lr(this)},refresh:Yt(function(){var n=this.display.cachedTextHeight;Zt(this),this.curOp.forceUpdate=!0,Jr(this),Qr(this,this.doc.scrollLeft,this.doc.scrollTop),va(this.display),(n==null||Math.abs(n-xr(this.display))>.5||this.options.lineWrapping)&&ca(this),De(this,"refresh",this)}),swapDoc:Yt(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),To(this,n),Jr(this),this.display.input.reset(),Qr(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,zt(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},R(e),e.registerHelper=function(n,i,a){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=a},e.registerGlobalHelper=function(n,i,a,o){e.registerHelper(n,i,o),r[n]._global.push({pred:a,val:o})}}function Pa(e,t,r,n,i){var a=t,o=r,s=et(e,t.line),c=i&&e.direction=="rtl"?-r:r;function d(){var Ve=t.line+c;return Ve<e.first||Ve>=e.first+e.size?!1:(t=new Ne(Ve,t.ch,t.sticky),s=et(e,Ve))}function S(Ve){var Xe;if(n=="codepoint"){var Ze=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Ze)?Xe=null:Xe=new Ne(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(Ze>=55296&&Ze<56320?2:1))),-r)}else i?Xe=Pl(e.cm,s,t,r):Xe=ka(s,t,r);if(Xe==null)if(!Ve&&d())t=Ta(i,e.cm,s,t.line,c);else return!1;else t=Xe;return!0}if(n=="char"||n=="codepoint")S();else if(n=="column")S(!0);else if(n=="word"||n=="group")for(var D=null,te=n=="group",Z=e.cm&&e.cm.getHelper(t,"wordChars"),Le=!0;!(r<0&&!S(!Le));Le=!1){var Re=s.text.charAt(t.ch)||`
|
|
`,Be=Ae(Re,Z)?"w":te&&Re==`
|
|
`?"n":!te||/\s/.test(Re)?null:"p";if(te&&!Le&&!Be&&(Be="s"),D&&D!=Be){r<0&&(r=1,S(),t.sticky="after");break}if(Be&&(D=Be),r>0&&!S(!Le))break}var Ge=zi(e,t,a,o,!0);return Ke(a,Ge)&&(Ge.hitSide=!0),Ge}function Es(e,t,r,n){var i=e.doc,a=t.left,o;if(n=="page"){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*xr(e.display),3);o=(r>0?t.bottom:t.top)+r*c}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(var d;!(d=oa(e,a,o),!d.outside);){if(r<0?o<=0:o>=i.height){d.hitSide=!0;break}o+=r*5}return d}var yt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new x,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};yt.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;_s(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(s){for(var c=s.target;c;c=c.parentNode){if(c==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(c.className))break}return!1}Se(i,"paste",function(s){if(!a(s)||He(n,s)||vs(s,n))return;A<=11&&setTimeout(Nt(n,function(){return t.updateFromDOM()}),20)}),Se(i,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),Se(i,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),Se(i,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Se(i,"touchstart",function(){return r.forceCompositionEnd()}),Se(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(s){if(!a(s)||He(n,s))return;if(n.somethingSelected())Vi({lineWise:!1,text:n.getSelections()}),s.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var c=ys(n);Vi({lineWise:!0,text:c.text}),s.type=="cut"&&n.operation(function(){n.setSelections(c.ranges,0,oe),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var d=bn.text.join(`
|
|
`);if(s.clipboardData.setData("Text",d),s.clipboardData.getData("Text")==d){s.preventDefault();return}}var S=xs(),D=S.firstChild;n.display.lineSpace.insertBefore(S,n.display.lineSpace.firstChild),D.value=bn.text.join(`
|
|
`);var te=document.activeElement;C(D),setTimeout(function(){n.display.lineSpace.removeChild(S),te.focus(),te==i&&r.showPrimarySelection()},50)}Se(i,"copy",o),Se(i,"cut",o)},yt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},yt.prototype.prepareSelection=function(){var e=lo(this.cm,!1);return e.focus=document.activeElement==this.div,e},yt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},yt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},yt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var a=Yi(t,e.anchorNode,e.anchorOffset),o=Yi(t,e.focusNode,e.focusOffset);if(a&&!a.bad&&o&&!o.bad&&ut(Yn(a,o),n)==0&&ut(hr(a,o),i)==0)return;var s=t.display.view,c=n.line>=t.display.viewFrom&&ws(t,n)||{node:s[0].measure.map[2],offset:0},d=i.line<t.display.viewTo&&ws(t,i);if(!d){var S=s[s.length-1].measure,D=S.maps?S.maps[S.maps.length-1]:S.map;d={node:D[D.length-1],offset:D[D.length-2]-D[D.length-3]}}if(!c||!d){e.removeAllRanges();return}var te=e.rangeCount&&e.getRangeAt(0),Z;try{Z=M(c.node,c.offset,d.offset,d.node)}catch(Le){}Z&&(!le&&t.state.focused?(e.collapse(c.node,c.offset),Z.collapsed||(e.removeAllRanges(),e.addRange(Z))):(e.removeAllRanges(),e.addRange(Z)),te&&e.anchorNode==null?e.addRange(te):le&&this.startGracePeriod()),this.rememberSelection()},yt.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)},yt.prototype.showMultipleSelections=function(e){se(this.cm.display.cursorDiv,e.cursors),se(this.cm.display.selectionDiv,e.selection)},yt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},yt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return v(this.div,t)},yt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},yt.prototype.blur=function(){this.div.blur()},yt.prototype.getField=function(){return this.div},yt.prototype.supportsTouch=function(){return!0},yt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():rn(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)},yt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},yt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(j&&X&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var r=Yi(t,e.anchorNode,e.anchorOffset),n=Yi(t,e.focusNode,e.focusOffset);r&&n&&rn(t,function(){Xt(t.doc,Bn(r,n),oe),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},yt.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=Ne(n.line-1,et(e.doc,n.line-1).length)),i.ch==et(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Ne(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,s;n.line==t.viewFrom||(a=ir(e,n.line))==0?(o=gt(t.view[0].line),s=t.view[0].node):(o=gt(t.view[a].line),s=t.view[a-1].node.nextSibling);var c=ir(e,i.line),d,S;if(c==t.view.length-1?(d=t.viewTo-1,S=t.lineDiv.lastChild):(d=gt(t.view[c+1].line)-1,S=t.view[c+1].node.previousSibling),!s)return!1;for(var D=e.doc.splitLines(tu(e,s,S,o,d)),te=Sn(e.doc,Ne(o,0),Ne(d,et(e.doc,d).text.length));D.length>1&&te.length>1;)if(p(D)==p(te))D.pop(),te.pop(),d--;else if(D[0]==te[0])D.shift(),te.shift(),o++;else break;for(var Z=0,Le=0,Re=D[0],Be=te[0],Ge=Math.min(Re.length,Be.length);Z<Ge&&Re.charCodeAt(Z)==Be.charCodeAt(Z);)++Z;for(var Ve=p(D),Xe=p(te),Ze=Math.min(Ve.length-(D.length==1?Z:0),Xe.length-(te.length==1?Z:0));Le<Ze&&Ve.charCodeAt(Ve.length-Le-1)==Xe.charCodeAt(Xe.length-Le-1);)++Le;if(D.length==1&&te.length==1&&o==n.line)for(;Z&&Z>n.ch&&Ve.charCodeAt(Ve.length-Le-1)==Xe.charCodeAt(Xe.length-Le-1);)Z--,Le++;D[D.length-1]=Ve.slice(0,Ve.length-Le).replace(/^\u200b+/,""),D[0]=D[0].slice(Z).replace(/\u200b+$/,"");var at=Ne(o,Z),nt=Ne(d,te.length?p(te).length-Le:0);if(D.length>1||D[0]||ut(at,nt))return Ar(e.doc,D,at,nt,"+input"),!0},yt.prototype.ensurePolled=function(){this.forceCompositionEnd()},yt.prototype.reset=function(){this.forceCompositionEnd()},yt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},yt.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)},yt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&rn(this.cm,function(){return Zt(e.cm)})},yt.prototype.setUneditable=function(e){e.contentEditable="false"},yt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Nt(this.cm,Ra)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},yt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},yt.prototype.onContextMenu=function(){},yt.prototype.resetPosition=function(){},yt.prototype.needsContentAttribute=!0;function ws(e,t){var r=na(e,t.line);if(!r||r.hidden)return null;var n=et(e.doc,t.line),i=Va(r,n,t.line),a=$e(n,e.doc.direction),o="left";if(a){var s=ze(a,t.ch);o=s%2?"right":"left"}var c=Za(i.map,t.ch,o);return c.offset=c.collapse=="right"?c.end:c.start,c}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Pr(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,i){var a="",o=!1,s=e.doc.lineSeparator(),c=!1;function d(Z){return function(Le){return Le.id==Z}}function S(){o&&(a+=s,c&&(a+=s),o=c=!1)}function D(Z){Z&&(S(),a+=Z)}function te(Z){if(Z.nodeType==1){var Le=Z.getAttribute("cm-text");if(Le){D(Le);return}var Re=Z.getAttribute("cm-marker"),Be;if(Re){var Ge=e.findMarks(Ne(n,0),Ne(i+1,0),d(+Re));Ge.length&&(Be=Ge[0].find(0))&&D(Sn(e.doc,Be.from,Be.to).join(s));return}if(Z.getAttribute("contenteditable")=="false")return;var Ve=/^(pre|div|p|li|table|br)$/i.test(Z.nodeName);if(!/^br$/i.test(Z.nodeName)&&Z.textContent.length==0)return;Ve&&S();for(var Xe=0;Xe<Z.childNodes.length;Xe++)te(Z.childNodes[Xe]);/^(pre|p)$/i.test(Z.nodeName)&&(c=!0),Ve&&(o=!0)}else Z.nodeType==3&&D(Z.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(te(t),t==r);)t=t.nextSibling,c=!1;return a}function Yi(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Pr(e.clipPos(Ne(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==n)return nu(a,t,r)}}function nu(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!v(n,t))return Pr(Ne(gt(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var a=e.rest?p(e.rest):e.line;return Pr(Ne(gt(a),a.text.length),i)}var o=t.nodeType==3?t:null,s=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,r&&(r=o.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var c=e.measure,d=c.maps;function S(Be,Ge,Ve){for(var Xe=-1;Xe<(d?d.length:0);Xe++)for(var Ze=Xe<0?c.map:d[Xe],at=0;at<Ze.length;at+=3){var nt=Ze[at+2];if(nt==Be||nt==Ge){var ht=gt(Xe<0?e.line:e.rest[Xe]),Et=Ze[at]+Ve;return(Ve<0||nt!=Be)&&(Et=Ze[at+(Ve?1:0)]),Ne(ht,Et)}}}var D=S(o,s,r);if(D)return Pr(D,i);for(var te=s.nextSibling,Z=o?o.nodeValue.length-r:0;te;te=te.nextSibling){if(D=S(te,te.firstChild,0),D)return Pr(Ne(D.line,D.ch-Z),i);Z+=te.textContent.length}for(var Le=s.previousSibling,Re=r;Le;Le=Le.previousSibling){if(D=S(Le,Le.firstChild,-1),D)return Pr(Ne(D.line,D.ch+Re),i);Re+=Le.textContent.length}}var Dt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new x,this.hasSelection=!1,this.composing=null};Dt.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),U&&(i.style.width="0px"),Se(i,"input",function(){N&&A>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),Se(i,"paste",function(o){if(He(n,o)||vs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(He(n,o))return;if(n.somethingSelected())Vi({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var s=ys(n);Vi({lineWise:!0,text:s.text}),o.type=="cut"?n.setSelections(s.ranges,null,oe):(r.prevInput="",i.value=s.text.join(`
|
|
`),C(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}Se(i,"cut",a),Se(i,"copy",a),Se(e.scroller,"paste",function(o){if(An(e,o)||He(n,o))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var s=new Event("paste");s.clipboardData=o.clipboardData,i.dispatchEvent(s)}),Se(e.lineSpace,"selectstart",function(o){An(e,o)||h(o)}),Se(i,"compositionstart",function(){var o=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:o,range:n.markText(o,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Se(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Dt.prototype.createField=function(e){this.wrapper=xs(),this.textarea=this.wrapper.firstChild},Dt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Dt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=lo(e);if(e.options.moveInputWithCursor){var i=gn(e,r.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return n},Dt.prototype.showSelection=function(e){var t=this.cm,r=t.display;se(r.cursorDiv,e.cursors),se(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Dt.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&C(this.textarea),N&&A>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",N&&A>=9&&(this.hasSelection=null))},Dt.prototype.getField=function(){return this.textarea},Dt.prototype.supportsTouch=function(){return!1},Dt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!B||ee()!=this.textarea))try{this.textarea.focus()}catch(e){}},Dt.prototype.blur=function(){this.textarea.blur()},Dt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Dt.prototype.receivedFocus=function(){this.slowPoll()},Dt.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()})},Dt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},Dt.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||lt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(N&&A>=9&&this.hasSelection===i||ne&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,s=Math.min(n.length,i.length);o<s&&n.charCodeAt(o)==i.charCodeAt(o);)++o;return rn(t,function(){Ra(t,i.slice(o),n.length-o,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
|
`)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Dt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Dt.prototype.onKeyPress=function(){N&&A>=9&&(this.hasSelection=null),this.fastPoll()},Dt.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=rr(r,e),o=n.scroller.scrollTop;if(!a||ie)return;var s=r.options.resetSelectionOnContextMenu;s&&r.doc.sel.contains(a)==-1&&Nt(r,Xt)(r.doc,Bn(a),oe);var c=i.style.cssText,d=t.wrapper.style.cssText,S=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-S.top-5)+"px; left: "+(e.clientX-S.left-5)+`px;
|
|
z-index: 1000; background: `+(N?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var D;w&&(D=window.scrollY),n.input.focus(),w&&window.scrollTo(null,D),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=Z,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function te(){if(i.selectionStart!=null){var Re=r.somethingSelected(),Be="\u200B"+(Re?i.value:"");i.value="\u21DA",i.value=Be,t.prevInput=Re?"":"\u200B",i.selectionStart=1,i.selectionEnd=Be.length,n.selForContextMenu=r.doc.sel}}function Z(){if(t.contextMenuPending!=Z)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=c,N&&A<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!N||N&&A<9)&&te();var Re=0,Be=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Nt(r,Wo)(r):Re++<10?n.detectingSelectAll=setTimeout(Be,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Be,200)}}if(N&&A>=9&&te(),Me){E(e);var Le=function(){Je(window,"mouseup",Le),setTimeout(Z,20)};Se(window,"mouseup",Le)}else setTimeout(Z,50)},Dt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Dt.prototype.setUneditable=function(){},Dt.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?l(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=ee();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(Se(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){n(),a.submit=i,a.submit(),a.submit=o}}catch(c){}}t.finishInit=function(c){c.save=n,c.getTextArea=function(){return e},c.toTextArea=function(){c.toTextArea=isNaN,n(),e.parentNode.removeChild(c.getWrapperElement()),e.style.display="",e.form&&(Je(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var s=kt(function(c){return e.parentNode.insertBefore(c,e.nextSibling)},t);return s}function iu(e){e.off=Je,e.on=Se,e.wheelEventPixels=dl,e.Doc=Qt,e.splitLines=pt,e.countColumn=m,e.findColumn=q,e.isWordChar=pe,e.Pass=xe,e.signal=De,e.Line=Ct,e.changeEnd=Wn,e.scrollbarModel=vo,e.Pos=Ne,e.cmpPos=ut,e.modes=Wt,e.mimeModes=mt,e.resolveMode=un,e.getMode=Cn,e.modeExtensions=pn,e.extendMode=bi,e.copyState=cn,e.startState=dr,e.innerMode=$n,e.commands=hi,e.keyMap=Ln,e.keyName=rs,e.isModifierKey=ts,e.lookupKey=Dr,e.normalizeKeyMap=Rl,e.StringStream=St,e.SharedTextMarker=ci,e.TextMarker=Hn,e.LineWidget=ui,e.e_preventDefault=h,e.e_stopPropagation=g,e.e_stop=E,e.addClass=I,e.contains=v,e.rmClass=he,e.keyNames=Kn}Yl(kt),ql(kt);var au="iter insert remove copy getEditor constructor".split(" ");for(var Ji in Qt.prototype)Qt.prototype.hasOwnProperty(Ji)&&F(au,Ji)<0&&(kt.prototype[Ji]=function(e){return function(){return e.apply(this.doc,arguments)}}(Qt.prototype[Ji]));return R(Qt),kt.inputStyles={textarea:Dt,contenteditable:yt},kt.defineMode=function(e){!kt.defaults.mode&&e!="null"&&(kt.defaults.mode=e),wn.apply(this,arguments)},kt.defineMIME=Xn,kt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),kt.defineMIME("text/plain","null"),kt.defineExtension=function(e,t){kt.prototype[e]=t},kt.defineDocExtension=function(e,t){Qt.prototype[e]=t},kt.fromTextArea=ru,iu(kt),kt.version="5.58.2",kt})},WdTA:function(qe,Ie,f){qe.exports=f.p+"static/studnetqun.598eeb43.png"},Y1PL:function(qe,Ie,f){"use strict";f.r(Ie),f.d(Ie,"ResizableTextArea",function(){return F});var W=f("wx14"),be=f("1OyB"),le=f("vuIU"),Oe=f("Ji7U"),ge=f("LK+K"),J=f("q1tI"),N=f("VTBJ"),A=f("rePB"),w=f("Zm9Q"),H=f("Kwbf"),X=f("c+Xe"),ie=f("m+aA"),ue=f("bdgK"),K=new Map;function P(oe){oe.forEach(function(ye){var $,q=ye.target;($=K.get(q))===null||$===void 0||$.forEach(function(z){return z(q)})})}var U=new ue.default(P),j=null,B=null;function ne(oe,ye){K.has(oe)||(K.set(oe,new Set),U.observe(oe)),K.get(oe).add(ye)}function ke(oe,ye){K.has(oe)&&(K.get(oe).delete(ye),K.get(oe).size||(U.unobserve(oe),K.delete(oe)))}var Fe=function(oe){Object(Oe.a)($,oe);var ye=Object(ge.a)($);function $(){return Object(be.a)(this,$),ye.apply(this,arguments)}return Object(le.a)($,[{key:"render",value:function(){return this.props.children}}]),$}(J.Component),ce=J.createContext(null);function we(oe){var ye=oe.children,$=oe.onBatchResize,q=J.useRef(0),z=J.useRef([]),Y=J.useContext(ce),p=J.useCallback(function(T,b,re){q.current+=1;var fe=q.current;z.current.push({size:T,element:b,data:re}),Promise.resolve().then(function(){fe===q.current&&($==null||$(z.current),z.current=[])}),Y==null||Y(T,b,re)},[$,Y]);return J.createElement(ce.Provider,{value:p},ye)}function Me(oe){var ye=oe.children,$=oe.disabled,q=J.useRef(null),z=J.useRef(null),Y=J.useContext(ce),p=J.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),T=J.isValidElement(ye)&&Object(X.c)(ye),b=T?ye.ref:null,re=J.useMemo(function(){return Object(X.a)(b,q)},[b,q]),fe=J.useRef(oe);fe.current=oe;var G=J.useCallback(function(pe){var Ae=fe.current,Ce=Ae.onResize,_e=Ae.data,ve=pe.getBoundingClientRect(),Ee=ve.width,Ue=ve.height,Pe=pe.offsetWidth,We=pe.offsetHeight,ze=Math.floor(Ee),Qe=Math.floor(Ue);if(p.current.width!==ze||p.current.height!==Qe||p.current.offsetWidth!==Pe||p.current.offsetHeight!==We){var $e={width:ze,height:Qe,offsetWidth:Pe,offsetHeight:We};p.current=$e;var Ye=Pe===Math.round(Ee)?Ee:Pe,Se=We===Math.round(Ue)?Ue:We,it=Object(N.a)(Object(N.a)({},$e),{},{offsetWidth:Ye,offsetHeight:Se});Y==null||Y(it,pe,_e),Ce&&Promise.resolve().then(function(){Ce(it,pe)})}},[]);return J.useEffect(function(){var pe=Object(ie.a)(q.current)||Object(ie.a)(z.current);return pe&&!$&&ne(pe,G),function(){return ke(pe,G)}},[q.current,$]),J.createElement(Fe,{ref:z},T?J.cloneElement(ye,{ref:re}):ye)}var de="rc-observer-key";function he(oe){var ye=oe.children,$=Object(w.a)(ye);return $.map(function(q,z){var Y=(q==null?void 0:q.key)||"".concat(de,"-").concat(z);return J.createElement(Me,Object(W.a)({},oe,{key:Y}),q)})}he.Collection=we;var Te=he,se=f("bT9E"),y=f("TSYQ"),V=f.n(y),M=`
|
|
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
|
|
`,v=["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={},I;function O(oe){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(ye&&ee[$])return ee[$];var q=window.getComputedStyle(oe),z=q.getPropertyValue("box-sizing")||q.getPropertyValue("-moz-box-sizing")||q.getPropertyValue("-webkit-box-sizing"),Y=parseFloat(q.getPropertyValue("padding-bottom"))+parseFloat(q.getPropertyValue("padding-top")),p=parseFloat(q.getPropertyValue("border-bottom-width"))+parseFloat(q.getPropertyValue("border-top-width")),T=v.map(function(re){return"".concat(re,":").concat(q.getPropertyValue(re))}).join(";"),b={sizingStyle:T,paddingSize:Y,borderSize:p,boxSizing:z};return ye&&$&&(ee[$]=b),b}function C(oe){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;I||(I=document.createElement("textarea"),I.setAttribute("tab-index","-1"),I.setAttribute("aria-hidden","true"),document.body.appendChild(I)),oe.getAttribute("wrap")?I.setAttribute("wrap",oe.getAttribute("wrap")):I.removeAttribute("wrap");var z=O(oe,ye),Y=z.paddingSize,p=z.borderSize,T=z.boxSizing,b=z.sizingStyle;I.setAttribute("style","".concat(b,";").concat(M)),I.value=oe.value||oe.placeholder||"";var re=Number.MIN_SAFE_INTEGER,fe=Number.MAX_SAFE_INTEGER,G=I.scrollHeight,pe;if(T==="border-box"?G+=p:T==="content-box"&&(G-=Y),$!==null||q!==null){I.value=" ";var Ae=I.scrollHeight-Y;$!==null&&(re=Ae*$,T==="border-box"&&(re=re+Y+p),G=Math.max(re,G)),q!==null&&(fe=Ae*q,T==="border-box"&&(fe=fe+Y+p),pe=G>fe?"":"hidden",G=Math.min(fe,G))}return{height:G,minHeight:re,maxHeight:fe,overflowY:pe,resize:"none"}}var u=f("Gytx"),l=f.n(u),m;(function(oe){oe[oe.NONE=0]="NONE",oe[oe.RESIZING=1]="RESIZING",oe[oe.RESIZED=2]="RESIZED"})(m||(m={}));var x=function(oe){Object(Oe.a)($,oe);var ye=Object(ge.a)($);function $(q){var z;return Object(be.a)(this,$),z=ye.call(this,q),z.nextFrameActionId=void 0,z.resizeFrameId=void 0,z.textArea=void 0,z.saveTextArea=function(Y){z.textArea=Y},z.handleResize=function(Y){var p=z.state.resizeStatus,T=z.props,b=T.autoSize,re=T.onResize;if(p!==m.NONE)return;typeof re=="function"&&re(Y),b&&z.resizeOnNextFrame()},z.resizeOnNextFrame=function(){cancelAnimationFrame(z.nextFrameActionId),z.nextFrameActionId=requestAnimationFrame(z.resizeTextarea)},z.resizeTextarea=function(){var Y=z.props.autoSize;if(!Y||!z.textArea)return;var p=Y.minRows,T=Y.maxRows,b=C(z.textArea,!1,p,T);z.setState({textareaStyles:b,resizeStatus:m.RESIZING},function(){cancelAnimationFrame(z.resizeFrameId),z.resizeFrameId=requestAnimationFrame(function(){z.setState({resizeStatus:m.RESIZED},function(){z.resizeFrameId=requestAnimationFrame(function(){z.setState({resizeStatus:m.NONE}),z.fixFirefoxAutoScroll()})})})})},z.renderTextArea=function(){var Y=z.props,p=Y.prefixCls,T=p===void 0?"rc-textarea":p,b=Y.autoSize,re=Y.onResize,fe=Y.className,G=Y.disabled,pe=z.state,Ae=pe.textareaStyles,Ce=pe.resizeStatus,_e=Object(se.a)(z.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ve=V()(T,fe,Object(A.a)({},"".concat(T,"-disabled"),G));"value"in _e&&(_e.value=_e.value||"");var Ee=Object(N.a)(Object(N.a)(Object(N.a)({},z.props.style),Ae),Ce===m.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return J.createElement(Te,{onResize:z.handleResize,disabled:!(b||re)},J.createElement("textarea",Object(W.a)({},_e,{className:ve,style:Ee,ref:z.saveTextArea})))},z.state={textareaStyles:{},resizeStatus:m.NONE},z}return Object(le.a)($,[{key:"componentDidUpdate",value:function(z){(z.value!==this.props.value||!l()(z.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 z=this.textArea.selectionStart,Y=this.textArea.selectionEnd;this.textArea.setSelectionRange(z,Y)}}catch(p){}}},{key:"render",value:function(){return this.renderTextArea()}}]),$}(J.Component),F=x,ae=function(oe){Object(Oe.a)($,oe);var ye=Object(ge.a)($);function $(q){var z;Object(be.a)(this,$),z=ye.call(this,q),z.resizableTextArea=void 0,z.focus=function(){z.resizableTextArea.textArea.focus()},z.saveTextArea=function(p){z.resizableTextArea=p},z.handleChange=function(p){var T=z.props.onChange;z.setValue(p.target.value,function(){z.resizableTextArea.resizeTextarea()}),T&&T(p)},z.handleKeyDown=function(p){var T=z.props,b=T.onPressEnter,re=T.onKeyDown;p.keyCode===13&&b&&b(p),re&&re(p)};var Y=typeof q.value=="undefined"||q.value===null?q.defaultValue:q.value;return z.state={value:Y},z}return Object(le.a)($,[{key:"setValue",value:function(z,Y){"value"in this.props||this.setState({value:z},Y)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return J.createElement(F,Object(W.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(z){return"value"in z?{value:z.value}:null}}]),$}(J.Component),xe=Ie.default=ae},ZW9T:function(qe,Ie,f){"use strict";f.d(Ie,"a",function(){return Fe});var W=f("k1fw"),be=f("miYZ"),le=f("tsqr"),Oe=f("rAM+"),ge=f("tJVT"),J=f("PpiC"),N=f("q1tI"),A=f.n(N),w=f("bdgK");function H(ce,we,Me,de,he){var Te=we.getWordUntilPosition(Me),se={startLineNumber:Me.lineNumber,endLineNumber:Me.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},y=de.map(function(V){return{label:V,kind:ce.languages.CompletionItemKind.Keyword,insertText:V,insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se}});return he.map(function(V){y.push(Object(W.a)(Object(W.a)({},V),{},{range:se}))}),y}var X=function(ce){var we={label:"ifelse",kind:ce.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet},Me=["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"];ce.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(se,y){var V=H(ce,se,y,Me,[we]);return{suggestions:V}}});var de=["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"];ce.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(se,y){var V=[{label:"print",kind:ce.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet}],M=H(ce,se,y,de,V);return{suggestions:M}}});var he=["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"];ce.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(se,y){var V=[we,{label:"main",kind:ce.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:ce.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet}],M=H(ce,se,y,he,V);return{suggestions:M}}})},ie="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",ue=f("LvDl");function K(ce){return/^\d+$/.test(ce)?"".concat(ce,"px"):ce}function P(){}var U=!1,j={"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 B(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],we=ce;if(Array.isArray(ce)){for(var Me=0;Me<ce.length;Me++){var de=j[ce[Me]];if(de)return de}return we[0]}return j[we]||we}var ne=null,ke=Ie.b=function(ce){var we=ce.width,Me=we===void 0?"100%":we,de=ce.height,he=de===void 0?"100%":de,Te=ce.value,se=ce.language,y=se===void 0?"javascript":se,V=ce.style,M=V===void 0?{}:V,v=ce.options,ee=v===void 0?{}:v,I=ce.overrideServices,O=I===void 0?{}:I,C=ce.theme,u=C===void 0?"vs-dark":C,l=ce.onEditBlur,m=ce.onSave,x=ce.autoHeight,F=x===void 0?!1:x,ae=ce.forbidCopy,xe=ae===void 0?!1:ae,oe=ce.onChange,ye=oe===void 0?P:oe,$=ce.editorDidMount,q=$===void 0?P:$,z=ce.onFocus,Y=z===void 0?P:z,p=ce.filename,T=p===void 0?"educoder.txt":p,b=Object(J.a)(ce,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),re=Object(N.useRef)(),fe=Object(N.useRef)({}),G=Object(N.useRef)(),pe=Object(N.useRef)(!1),Ae=Object(N.useRef)(),Ce=Object(N.useState)(!1),_e=Object(ge.a)(Ce,2),ve=_e[0],Ee=_e[1];function Ue(){var _;return re.current&&(_=new w.default(function(E){var Q=Object(Oe.a)(E),me;try{for(Q.s();!(me=Q.n()).done;){var je=me.value;(je.target.offsetHeight>0||je.target.offsetWidth>0)&&fe.current.instance.layout()}}catch(rt){Q.e(rt)}finally{Q.f()}}),_.observe(re.current)),_}function Pe(){le.b.warn(decodeURIComponent(ie))}var We=function(){var E=fe.current.instance;if(Te!=null&&E&&ve){var Q=E.getModel();Q&&Te!==Q.getValue()&&(U=!0,Q.setValue(Te),E.layout(),U=!1)}};Object(N.useEffect)(function(){G.current&&clearTimeout(G.current),G.current=setTimeout(function(){We()},500)},[Te,ve,fe.current]);function ze(){var _=fe.current.instance;if(_){var E=_.getSelection(),Q=fe.current.pastePos||{},me=new ne.Range(Q.startLineNumber||E.endLineNumber,Q.startColumn||E.endColumn,Q.endLineNumber||E.endLineNumber,Q.endColumn||E.endColumn);setTimeout(function(){_.executeEdits("",[{range:me,text:""}])},300)}}function Qe(_){(window.navigator.platform.match("Mac")?_.metaKey:_.ctrlKey)&&_.keyCode==83&&(_.preventDefault(),m())}var $e=function(){if(F&&fe.current.instance){var E=fe.current.instance.getContentHeight();h(E<he?he:E)}else h(he)};function Ye(_){var E=document.createEvent("MouseEvents");E.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),_.dispatchEvent(E)}function Se(_,E){var Q=window.URL||window.webkitURL||window,me=new Blob([E]),je=document.createElementNS("http://www.w3.org/1999/xhtml","a");je.href=Q.createObjectURL(me),je.download=_,Ye(je)}Object(N.useEffect)(function(){$e()},[$e]),Object(N.useEffect)(function(){re.current&&!ve&&f.e(27).then(f.t.bind(null,"M/lh",7)).then(function(_){try{ne=_,fe.current.instance=ne.editor.create(re.current,{value:Te,language:B(y),theme:u,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},O);var E=fe.current.instance;if(q(E,ne),setTimeout(function(){$e(),fe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Se(T||"educoder.txt",E.getValue())}})},500),fe.current.subscription=E.onDidChangeModelContent(function(me){pe.current?clearTimeout(Ae.current):($e(),ye(E.getValue(),me)),Ae.current=setTimeout(function(){pe.current=!1},500)}),window.Monaco||X(ne),xe&&(E.addCommand(ne.KeyMod.CtrlCmd|ne.KeyMod.Shift|ne.KeyCode.KEY_V,function(){return Pe(),null}),E.addCommand(ne.KeyMod.CtrlCmd|ne.KeyCode.KEY_C,function(){return Pe(),null})),window.Monaco=ne,l&&E.onDidBlurEditorWidget(function(){l(E.getValue())}),Y&&E.onDidFocusEditorText(function(){Y(E.getValue())}),xe){E.addCommand(ne.KeyMod.CtrlCmd|ne.KeyCode.KEY_V,function(){return Pe(),null}),E.onDidPaste(function(me){fe.current.pastePos=me});try{window.addEventListener("paste",ze)}catch(me){}}var Q=Ue();return Ee(!0),function(){var me=fe.current.instance;me.dispose();var je=me.getModel();je&&je.dispose(),fe.current.subscription&&fe.current.subscription.dispose(),xe&&window.removeEventListener("paste",ze),Q.unobserve(re.current)}}catch(me){}})},[]),Object(N.useEffect)(function(){var _=fe.current.instance;if(_&&ve)return document.addEventListener("keydown",Qe,!1),function(){document.removeEventListener("keydown",Qe)}},[m,ve]),Object(N.useEffect)(function(){var _=fe.current.instance;if(_&&ve){var E=B(y);ne.editor.setModelLanguage(_.getModel(),E),console.log("language:",y,_.getModel(),E)}},[y,ve]),Object(N.useEffect)(function(){var _=fe.current.instance;_&&ve&&ne.editor.setTheme(u)},[u,ve]),Object(N.useEffect)(function(){var _=fe.current.instance;_&&ve&&(_.updateOptions(Object(W.a)({},ee)),setTimeout(function(){_.getModel().updateOptions(Object(W.a)({},ee))},200))},[JSON.stringify(ee),ve]),Object(N.useEffect)(function(){var _=fe.current.instance;_&&ve&&_.layout()},[Me,he,ve]);var it=Object(N.useState)(K(Me)),Je=Object(ge.a)(it,2),De=Je[0],He=Je[1],k=Object(N.useState)(K(he)),L=Object(ge.a)(k,2),R=L[0],h=L[1],g=Object(W.a)(Object(W.a)({},M),{},{width:De,height:R});return A.a.createElement("div",{className:"my-monaco-editor",ref:re,style:g})};function Fe(ce){var we=ce.width,Me=we===void 0?"100%":we,de=ce.height,he=de===void 0?"100%":de,Te=ce.original,se=ce.modified,y=ce.language,V=ce.options,M=V===void 0?{}:V,v=Object(N.useRef)(),ee=Object(N.useState)(null),I=Object(ge.a)(ee,2),O=I[0],C=I[1];function u(F){var ae;return v.current&&(ae=new w.default(function(xe){var oe=Object(Oe.a)(xe),ye;try{for(oe.s();!(ye=oe.n()).done;){var $=ye.value;($.target.offsetHeight>0||$.target.offsetWidth>0)&&F.layout()}}catch(q){oe.e(q)}finally{oe.f()}}),ae.observe(v.current)),ae}Object(N.useEffect)(function(){v.current&&f.e(27).then(f.t.bind(null,"M/lh",7)).then(function(F){ne=F;var ae=ne.editor.createDiffEditor(v.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},M),{},{wordWrap:!0}));C(ae);var xe=u(ae);return function(){ae.dispose();var oe=ae.getModel();oe&&oe.dispose(),xe.unobserve(v.current)}})},[]),Object(N.useEffect)(function(){O&&O.setModel({original:ne.editor.createModel(Te,y),modified:ne.editor.createModel(se,y)})},[Te,se,y,O]);var l=K(Me),m=K(he),x={width:l,height:m};return A.a.createElement("div",{className:"my-diff-editor",ref:v,style:x})}},ZpRC:function(qe,Ie,f){"use strict";function W(X){return typeof X=="object"&&X!=null&&X.nodeType===1}function be(X,ie){return(!ie||X!=="hidden")&&X!=="visible"&&X!=="clip"}function le(X,ie){if(X.clientHeight<X.scrollHeight||X.clientWidth<X.scrollWidth){var ue=getComputedStyle(X,null);return be(ue.overflowY,ie)||be(ue.overflowX,ie)||function(K){var P=function(U){if(!U.ownerDocument||!U.ownerDocument.defaultView)return null;try{return U.ownerDocument.defaultView.frameElement}catch(j){return null}}(K);return!!P&&(P.clientHeight<K.scrollHeight||P.clientWidth<K.scrollWidth)}(X)}return!1}function Oe(X,ie,ue,K,P,U,j,B){return U<X&&j>ie||U>X&&j<ie?0:U<=X&&B<=ue||j>=ie&&B>=ue?U-X-K:j>ie&&B<ue||U<X&&B>ue?j-ie+P:0}var ge=function(X,ie){var ue=window,K=ie.scrollMode,P=ie.block,U=ie.inline,j=ie.boundary,B=ie.skipOverflowHiddenElements,ne=typeof j=="function"?j:function(Ae){return Ae!==j};if(!W(X))throw new TypeError("Invalid target");for(var ke=document.scrollingElement||document.documentElement,Fe=[],ce=X;W(ce)&&ne(ce);){if((ce=ce.parentElement)===ke){Fe.push(ce);break}ce!=null&&ce===document.body&&le(ce)&&!le(document.documentElement)||ce!=null&&le(ce,B)&&Fe.push(ce)}for(var we=ue.visualViewport?ue.visualViewport.width:innerWidth,Me=ue.visualViewport?ue.visualViewport.height:innerHeight,de=window.scrollX||pageXOffset,he=window.scrollY||pageYOffset,Te=X.getBoundingClientRect(),se=Te.height,y=Te.width,V=Te.top,M=Te.right,v=Te.bottom,ee=Te.left,I=P==="start"||P==="nearest"?V:P==="end"?v:V+se/2,O=U==="center"?ee+y/2:U==="end"?M:ee,C=[],u=0;u<Fe.length;u++){var l=Fe[u],m=l.getBoundingClientRect(),x=m.height,F=m.width,ae=m.top,xe=m.right,oe=m.bottom,ye=m.left;if(K==="if-needed"&&V>=0&&ee>=0&&v<=Me&&M<=we&&V>=ae&&v<=oe&&ee>=ye&&M<=xe)return C;var $=getComputedStyle(l),q=parseInt($.borderLeftWidth,10),z=parseInt($.borderTopWidth,10),Y=parseInt($.borderRightWidth,10),p=parseInt($.borderBottomWidth,10),T=0,b=0,re="offsetWidth"in l?l.offsetWidth-l.clientWidth-q-Y:0,fe="offsetHeight"in l?l.offsetHeight-l.clientHeight-z-p:0;if(ke===l)T=P==="start"?I:P==="end"?I-Me:P==="nearest"?Oe(he,he+Me,Me,z,p,he+I,he+I+se,se):I-Me/2,b=U==="start"?O:U==="center"?O-we/2:U==="end"?O-we:Oe(de,de+we,we,q,Y,de+O,de+O+y,y),T=Math.max(0,T+he),b=Math.max(0,b+de);else{T=P==="start"?I-ae-z:P==="end"?I-oe+p+fe:P==="nearest"?Oe(ae,oe,x,z,p+fe,I,I+se,se):I-(ae+x/2)+fe/2,b=U==="start"?O-ye-q:U==="center"?O-(ye+F/2)+re/2:U==="end"?O-xe+Y+re:Oe(ye,xe,F,q,Y+re,O,O+y,y);var G=l.scrollLeft,pe=l.scrollTop;I+=pe-(T=Math.max(0,Math.min(pe+T,l.scrollHeight-x+fe))),O+=G-(b=Math.max(0,Math.min(G+b,l.scrollWidth-F+re)))}C.push({el:l,top:T,left:b})}return C};function J(X){return X===Object(X)&&Object.keys(X).length!==0}function N(X,ie){ie===void 0&&(ie="auto");var ue="scrollBehavior"in document.body.style;X.forEach(function(K){var P=K.el,U=K.top,j=K.left;P.scroll&&ue?P.scroll({top:U,left:j,behavior:ie}):(P.scrollTop=U,P.scrollLeft=j)})}function A(X){return X===!1?{block:"end",inline:"nearest"}:J(X)?X:{block:"start",inline:"nearest"}}function w(X,ie){var ue=!X.ownerDocument.documentElement.contains(X);if(J(ie)&&typeof ie.behavior=="function")return ie.behavior(ue?[]:ge(X,ie));if(ue)return;var K=A(ie);return N(ge(X,K),K.behavior)}var H=Ie.a=w},Zss7:function(qe,Ie,f){var W;(function(be){var le=/^\s+/,Oe=/\s+$/,ge=0,J=be.round,N=be.min,A=be.max,w=be.random;function H(p,T){if(p=p||"",T=T||{},p instanceof H)return p;if(!(this instanceof H))return new H(p,T);var b=X(p);this._originalInput=p,this._r=b.r,this._g=b.g,this._b=b.b,this._a=b.a,this._roundA=J(100*this._a)/100,this._format=T.format||b.format,this._gradientType=T.gradientType,this._r<1&&(this._r=J(this._r)),this._g<1&&(this._g=J(this._g)),this._b<1&&(this._b=J(this._b)),this._ok=b.ok,this._tc_id=ge++}H.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var p=this.toRgb();return(p.r*299+p.g*587+p.b*114)/1e3},getLuminance:function(){var p=this.toRgb(),T,b,re,fe,G,pe;return T=p.r/255,b=p.g/255,re=p.b/255,T<=.03928?fe=T/12.92:fe=be.pow((T+.055)/1.055,2.4),b<=.03928?G=b/12.92:G=be.pow((b+.055)/1.055,2.4),re<=.03928?pe=re/12.92:pe=be.pow((re+.055)/1.055,2.4),.2126*fe+.7152*G+.0722*pe},setAlpha:function(p){return this._a=C(p),this._roundA=J(100*this._a)/100,this},toHsv:function(){var p=P(this._r,this._g,this._b);return{h:p.h*360,s:p.s,v:p.v,a:this._a}},toHsvString:function(){var p=P(this._r,this._g,this._b),T=J(p.h*360),b=J(p.s*100),re=J(p.v*100);return this._a==1?"hsv("+T+", "+b+"%, "+re+"%)":"hsva("+T+", "+b+"%, "+re+"%, "+this._roundA+")"},toHsl:function(){var p=ue(this._r,this._g,this._b);return{h:p.h*360,s:p.s,l:p.l,a:this._a}},toHslString:function(){var p=ue(this._r,this._g,this._b),T=J(p.h*360),b=J(p.s*100),re=J(p.l*100);return this._a==1?"hsl("+T+", "+b+"%, "+re+"%)":"hsla("+T+", "+b+"%, "+re+"%, "+this._roundA+")"},toHex:function(p){return j(this._r,this._g,this._b,p)},toHexString:function(p){return"#"+this.toHex(p)},toHex8:function(p){return B(this._r,this._g,this._b,this._a,p)},toHex8String:function(p){return"#"+this.toHex8(p)},toRgb:function(){return{r:J(this._r),g:J(this._g),b:J(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+J(this._r)+", "+J(this._g)+", "+J(this._b)+")":"rgba("+J(this._r)+", "+J(this._g)+", "+J(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:J(u(this._r,255)*100)+"%",g:J(u(this._g,255)*100)+"%",b:J(u(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+J(u(this._r,255)*100)+"%, "+J(u(this._g,255)*100)+"%, "+J(u(this._b,255)*100)+"%)":"rgba("+J(u(this._r,255)*100)+"%, "+J(u(this._g,255)*100)+"%, "+J(u(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:I[j(this._r,this._g,this._b,!0)]||!1},toFilter:function(p){var T="#"+ne(this._r,this._g,this._b,this._a),b=T,re=this._gradientType?"GradientType = 1, ":"";if(p){var fe=H(p);b="#"+ne(fe._r,fe._g,fe._b,fe._a)}return"progid:DXImageTransform.Microsoft.gradient("+re+"startColorstr="+T+",endColorstr="+b+")"},toString:function(p){var T=!!p;p=p||this._format;var b=!1,re=this._a<1&&this._a>=0,fe=!T&&re&&(p==="hex"||p==="hex6"||p==="hex3"||p==="hex4"||p==="hex8"||p==="name");return fe?p==="name"&&this._a===0?this.toName():this.toRgbString():(p==="rgb"&&(b=this.toRgbString()),p==="prgb"&&(b=this.toPercentageRgbString()),(p==="hex"||p==="hex6")&&(b=this.toHexString()),p==="hex3"&&(b=this.toHexString(!0)),p==="hex4"&&(b=this.toHex8String(!0)),p==="hex8"&&(b=this.toHex8String()),p==="name"&&(b=this.toName()),p==="hsl"&&(b=this.toHslString()),p==="hsv"&&(b=this.toHsvString()),b||this.toHexString())},clone:function(){return H(this.toString())},_applyModification:function(p,T){var b=p.apply(null,[this].concat([].slice.call(T)));return this._r=b._r,this._g=b._g,this._b=b._b,this.setAlpha(b._a),this},lighten:function(){return this._applyModification(we,arguments)},brighten:function(){return this._applyModification(Me,arguments)},darken:function(){return this._applyModification(de,arguments)},desaturate:function(){return this._applyModification(ke,arguments)},saturate:function(){return this._applyModification(Fe,arguments)},greyscale:function(){return this._applyModification(ce,arguments)},spin:function(){return this._applyModification(he,arguments)},_applyCombination:function(p,T){return p.apply(null,[this].concat([].slice.call(T)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(Te,arguments)},monochromatic:function(){return this._applyCombination(v,arguments)},splitcomplement:function(){return this._applyCombination(V,arguments)},triad:function(){return this._applyCombination(se,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},H.fromRatio=function(p,T){if(typeof p=="object"){var b={};for(var re in p)p.hasOwnProperty(re)&&(re==="a"?b[re]=p[re]:b[re]=xe(p[re]));p=b}return H(p,T)};function X(p){var T={r:0,g:0,b:0},b=1,re=null,fe=null,G=null,pe=!1,Ae=!1;return typeof p=="string"&&(p=z(p)),typeof p=="object"&&(q(p.r)&&q(p.g)&&q(p.b)?(T=ie(p.r,p.g,p.b),pe=!0,Ae=String(p.r).substr(-1)==="%"?"prgb":"rgb"):q(p.h)&&q(p.s)&&q(p.v)?(re=xe(p.s),fe=xe(p.v),T=U(p.h,re,fe),pe=!0,Ae="hsv"):q(p.h)&&q(p.s)&&q(p.l)&&(re=xe(p.s),G=xe(p.l),T=K(p.h,re,G),pe=!0,Ae="hsl"),p.hasOwnProperty("a")&&(b=p.a)),b=C(b),{ok:pe,format:p.format||Ae,r:N(255,A(T.r,0)),g:N(255,A(T.g,0)),b:N(255,A(T.b,0)),a:b}}function ie(p,T,b){return{r:u(p,255)*255,g:u(T,255)*255,b:u(b,255)*255}}function ue(p,T,b){p=u(p,255),T=u(T,255),b=u(b,255);var re=A(p,T,b),fe=N(p,T,b),G,pe,Ae=(re+fe)/2;if(re==fe)G=pe=0;else{var Ce=re-fe;pe=Ae>.5?Ce/(2-re-fe):Ce/(re+fe);switch(re){case p:G=(T-b)/Ce+(T<b?6:0);break;case T:G=(b-p)/Ce+2;break;case b:G=(p-T)/Ce+4;break}G/=6}return{h:G,s:pe,l:Ae}}function K(p,T,b){var re,fe,G;p=u(p,360),T=u(T,100),b=u(b,100);function pe(_e,ve,Ee){return Ee<0&&(Ee+=1),Ee>1&&(Ee-=1),Ee<1/6?_e+(ve-_e)*6*Ee:Ee<1/2?ve:Ee<2/3?_e+(ve-_e)*(2/3-Ee)*6:_e}if(T===0)re=fe=G=b;else{var Ae=b<.5?b*(1+T):b+T-b*T,Ce=2*b-Ae;re=pe(Ce,Ae,p+1/3),fe=pe(Ce,Ae,p),G=pe(Ce,Ae,p-1/3)}return{r:re*255,g:fe*255,b:G*255}}function P(p,T,b){p=u(p,255),T=u(T,255),b=u(b,255);var re=A(p,T,b),fe=N(p,T,b),G,pe,Ae=re,Ce=re-fe;if(pe=re===0?0:Ce/re,re==fe)G=0;else{switch(re){case p:G=(T-b)/Ce+(T<b?6:0);break;case T:G=(b-p)/Ce+2;break;case b:G=(p-T)/Ce+4;break}G/=6}return{h:G,s:pe,v:Ae}}function U(p,T,b){p=u(p,360)*6,T=u(T,100),b=u(b,100);var re=be.floor(p),fe=p-re,G=b*(1-T),pe=b*(1-fe*T),Ae=b*(1-(1-fe)*T),Ce=re%6,_e=[b,pe,G,G,Ae,b][Ce],ve=[Ae,b,b,pe,G,G][Ce],Ee=[G,G,Ae,b,b,pe][Ce];return{r:_e*255,g:ve*255,b:Ee*255}}function j(p,T,b,re){var fe=[ae(J(p).toString(16)),ae(J(T).toString(16)),ae(J(b).toString(16))];return re&&fe[0].charAt(0)==fe[0].charAt(1)&&fe[1].charAt(0)==fe[1].charAt(1)&&fe[2].charAt(0)==fe[2].charAt(1)?fe[0].charAt(0)+fe[1].charAt(0)+fe[2].charAt(0):fe.join("")}function B(p,T,b,re,fe){var G=[ae(J(p).toString(16)),ae(J(T).toString(16)),ae(J(b).toString(16)),ae(oe(re))];return fe&&G[0].charAt(0)==G[0].charAt(1)&&G[1].charAt(0)==G[1].charAt(1)&&G[2].charAt(0)==G[2].charAt(1)&&G[3].charAt(0)==G[3].charAt(1)?G[0].charAt(0)+G[1].charAt(0)+G[2].charAt(0)+G[3].charAt(0):G.join("")}function ne(p,T,b,re){var fe=[ae(oe(re)),ae(J(p).toString(16)),ae(J(T).toString(16)),ae(J(b).toString(16))];return fe.join("")}H.equals=function(p,T){return!p||!T?!1:H(p).toRgbString()==H(T).toRgbString()},H.random=function(){return H.fromRatio({r:w(),g:w(),b:w()})};function ke(p,T){T=T===0?0:T||10;var b=H(p).toHsl();return b.s-=T/100,b.s=l(b.s),H(b)}function Fe(p,T){T=T===0?0:T||10;var b=H(p).toHsl();return b.s+=T/100,b.s=l(b.s),H(b)}function ce(p){return H(p).desaturate(100)}function we(p,T){T=T===0?0:T||10;var b=H(p).toHsl();return b.l+=T/100,b.l=l(b.l),H(b)}function Me(p,T){T=T===0?0:T||10;var b=H(p).toRgb();return b.r=A(0,N(255,b.r-J(255*-(T/100)))),b.g=A(0,N(255,b.g-J(255*-(T/100)))),b.b=A(0,N(255,b.b-J(255*-(T/100)))),H(b)}function de(p,T){T=T===0?0:T||10;var b=H(p).toHsl();return b.l-=T/100,b.l=l(b.l),H(b)}function he(p,T){var b=H(p).toHsl(),re=(b.h+T)%360;return b.h=re<0?360+re:re,H(b)}function Te(p){var T=H(p).toHsl();return T.h=(T.h+180)%360,H(T)}function se(p){var T=H(p).toHsl(),b=T.h;return[H(p),H({h:(b+120)%360,s:T.s,l:T.l}),H({h:(b+240)%360,s:T.s,l:T.l})]}function y(p){var T=H(p).toHsl(),b=T.h;return[H(p),H({h:(b+90)%360,s:T.s,l:T.l}),H({h:(b+180)%360,s:T.s,l:T.l}),H({h:(b+270)%360,s:T.s,l:T.l})]}function V(p){var T=H(p).toHsl(),b=T.h;return[H(p),H({h:(b+72)%360,s:T.s,l:T.l}),H({h:(b+216)%360,s:T.s,l:T.l})]}function M(p,T,b){T=T||6,b=b||30;var re=H(p).toHsl(),fe=360/b,G=[H(p)];for(re.h=(re.h-(fe*T>>1)+720)%360;--T;)re.h=(re.h+fe)%360,G.push(H(re));return G}function v(p,T){T=T||6;for(var b=H(p).toHsv(),re=b.h,fe=b.s,G=b.v,pe=[],Ae=1/T;T--;)pe.push(H({h:re,s:fe,v:G})),G=(G+Ae)%1;return pe}H.mix=function(p,T,b){b=b===0?0:b||50;var re=H(p).toRgb(),fe=H(T).toRgb(),G=b/100,pe={r:(fe.r-re.r)*G+re.r,g:(fe.g-re.g)*G+re.g,b:(fe.b-re.b)*G+re.b,a:(fe.a-re.a)*G+re.a};return H(pe)},H.readability=function(p,T){var b=H(p),re=H(T);return(be.max(b.getLuminance(),re.getLuminance())+.05)/(be.min(b.getLuminance(),re.getLuminance())+.05)},H.isReadable=function(p,T,b){var re=H.readability(p,T),fe,G;G=!1,fe=Y(b);switch(fe.level+fe.size){case"AAsmall":case"AAAlarge":G=re>=4.5;break;case"AAlarge":G=re>=3;break;case"AAAsmall":G=re>=7;break}return G},H.mostReadable=function(p,T,b){var re=null,fe=0,G,pe,Ae,Ce;b=b||{},pe=b.includeFallbackColors,Ae=b.level,Ce=b.size;for(var _e=0;_e<T.length;_e++)G=H.readability(p,T[_e]),G>fe&&(fe=G,re=H(T[_e]));return H.isReadable(p,re,{level:Ae,size:Ce})||!pe?re:(b.includeFallbackColors=!1,H.mostReadable(p,["#fff","#000"],b))};var ee=H.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},I=H.hexNames=O(ee);function O(p){var T={};for(var b in p)p.hasOwnProperty(b)&&(T[p[b]]=b);return T}function C(p){return p=parseFloat(p),(isNaN(p)||p<0||p>1)&&(p=1),p}function u(p,T){x(p)&&(p="100%");var b=F(p);return p=N(T,A(0,parseFloat(p))),b&&(p=parseInt(p*T,10)/100),be.abs(p-T)<1e-6?1:p%T/parseFloat(T)}function l(p){return N(1,A(0,p))}function m(p){return parseInt(p,16)}function x(p){return typeof p=="string"&&p.indexOf(".")!=-1&&parseFloat(p)===1}function F(p){return typeof p=="string"&&p.indexOf("%")!=-1}function ae(p){return p.length==1?"0"+p:""+p}function xe(p){return p<=1&&(p=p*100+"%"),p}function oe(p){return be.round(parseFloat(p)*255).toString(16)}function ye(p){return m(p)/255}var $=function(){var p="[-\\+]?\\d+%?",T="[-\\+]?\\d*\\.\\d+%?",b="(?:"+T+")|(?:"+p+")",re="[\\s|\\(]+("+b+")[,|\\s]+("+b+")[,|\\s]+("+b+")\\s*\\)?",fe="[\\s|\\(]+("+b+")[,|\\s]+("+b+")[,|\\s]+("+b+")[,|\\s]+("+b+")\\s*\\)?";return{CSS_UNIT:new RegExp(b),rgb:new RegExp("rgb"+re),rgba:new RegExp("rgba"+fe),hsl:new RegExp("hsl"+re),hsla:new RegExp("hsla"+fe),hsv:new RegExp("hsv"+re),hsva:new RegExp("hsva"+fe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function q(p){return!!$.CSS_UNIT.exec(p)}function z(p){p=p.replace(le,"").replace(Oe,"").toLowerCase();var T=!1;if(ee[p])p=ee[p],T=!0;else if(p=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var b;return(b=$.rgb.exec(p))?{r:b[1],g:b[2],b:b[3]}:(b=$.rgba.exec(p))?{r:b[1],g:b[2],b:b[3],a:b[4]}:(b=$.hsl.exec(p))?{h:b[1],s:b[2],l:b[3]}:(b=$.hsla.exec(p))?{h:b[1],s:b[2],l:b[3],a:b[4]}:(b=$.hsv.exec(p))?{h:b[1],s:b[2],v:b[3]}:(b=$.hsva.exec(p))?{h:b[1],s:b[2],v:b[3],a:b[4]}:(b=$.hex8.exec(p))?{r:m(b[1]),g:m(b[2]),b:m(b[3]),a:ye(b[4]),format:T?"name":"hex8"}:(b=$.hex6.exec(p))?{r:m(b[1]),g:m(b[2]),b:m(b[3]),format:T?"name":"hex"}:(b=$.hex4.exec(p))?{r:m(b[1]+""+b[1]),g:m(b[2]+""+b[2]),b:m(b[3]+""+b[3]),a:ye(b[4]+""+b[4]),format:T?"name":"hex8"}:(b=$.hex3.exec(p))?{r:m(b[1]+""+b[1]),g:m(b[2]+""+b[2]),b:m(b[3]+""+b[3]),format:T?"name":"hex"}:!1}function Y(p){var T,b;return p=p||{level:"AA",size:"small"},T=(p.level||"AA").toUpperCase(),b=(p.size||"small").toLowerCase(),T!=="AA"&&T!=="AAA"&&(T="AA"),b!=="small"&&b!=="large"&&(b="small"),{level:T,size:b}}qe.exports?qe.exports=H:!(W=function(){return H}.call(Ie,f,Ie,qe),W!==void 0&&(qe.exports=W))})(Math)},bT9E:function(qe,Ie,f){"use strict";f.d(Ie,"a",function(){return be});var W=f("VTBJ");function be(le,Oe){var ge=Object(W.a)({},le);return Array.isArray(Oe)&&Oe.forEach(function(J){delete ge[J]}),ge}},c5Ni:function(qe,Ie,f){},dejd:function(qe,Ie,f){},dmUQ:function(qe,Ie,f){"use strict";var W=f("Ff2n"),be=f("rePB"),le=f("1OyB"),Oe=f("vuIU"),ge=f("Ji7U"),J=f("md7G"),N=f("foSv"),A=f("q1tI"),w=f.n(A),H=f("TSYQ"),X=f.n(H),ie=f("4IlW");function ue(se,y){var V=Object.keys(se);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(se);y&&(M=M.filter(function(v){return Object.getOwnPropertyDescriptor(se,v).enumerable})),V.push.apply(V,M)}return V}function K(se){for(var y=1;y<arguments.length;y++){var V=arguments[y]!=null?arguments[y]:{};y%2?ue(Object(V),!0).forEach(function(M){Object(be.a)(se,M,V[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(se,Object.getOwnPropertyDescriptors(V)):ue(Object(V)).forEach(function(M){Object.defineProperty(se,M,Object.getOwnPropertyDescriptor(V,M))})}return se}function P(se){var y=U();return function(){var M=Object(N.a)(se),v;if(y){var ee=Object(N.a)(this).constructor;v=Reflect.construct(M,arguments,ee)}else v=M.apply(this,arguments);return Object(J.a)(this,v)}}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(se){return!1}}function j(){}function B(se){se.preventDefault()}var ne=function(y){return y.replace(/[^\w.-]+/g,"")},ke=200,Fe=600,ce=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,we=function(y){return y!=null},Me=function(y,V){return V===y||typeof V=="number"&&typeof y=="number"&&isNaN(V)&&isNaN(y)},de=function(se){Object(ge.a)(V,se);var y=P(V);function V(M){var v;Object(le.a)(this,V),v=y.call(this,M),v.onKeyDown=function(O){var C=v.props,u=C.onKeyDown,l=C.onPressEnter;if(O.keyCode===ie.a.UP){var m=v.getRatio(O);v.up(O,m,null),v.stop()}else if(O.keyCode===ie.a.DOWN){var x=v.getRatio(O);v.down(O,x,null),v.stop()}else O.keyCode===ie.a.ENTER&&l&&l(O);if(v.recordCursorPosition(),v.lastKeyCode=O.keyCode,u){for(var F=arguments.length,ae=new Array(F>1?F-1:0),xe=1;xe<F;xe++)ae[xe-1]=arguments[xe];u.apply(void 0,[O].concat(ae))}},v.onKeyUp=function(O){var C=v.props.onKeyUp;if(v.stop(),v.recordCursorPosition(),C){for(var u=arguments.length,l=new Array(u>1?u-1:0),m=1;m<u;m++)l[m-1]=arguments[m];C.apply(void 0,[O].concat(l))}},v.onChange=function(O){var C=v.props.onChange;v.state.focused&&(v.inputting=!0),v.rawInput=v.props.parser(v.getValueFromEvent(O)),v.setState({inputValue:v.rawInput}),C(v.toNumber(v.rawInput))},v.onMouseUp=function(){var O=v.props.onMouseUp;v.recordCursorPosition(),O&&O.apply(void 0,arguments)},v.onFocus=function(){var O;v.setState({focused:!0}),(O=v.props).onFocus.apply(O,arguments)},v.onBlur=function(){var O=v.props.onBlur;v.inputting=!1,v.setState({focused:!1});var C=v.getCurrentValidValue(v.state.inputValue),u=v.setValue(C,j);if(O){var l=v.input.value,m=v.getInputDisplayValue({focus:!1,value:u});v.input.value=m&&Number(m),O.apply(void 0,arguments),v.input.value=l}},v.getRatio=function(O){var C=1;return O.metaKey||O.ctrlKey?C=.1:O.shiftKey&&(C=10),C},v.getFullNum=function(O){return isNaN(O)?O:/e/i.test(String(O))?Number(O).toFixed(18).replace(/\.?0+$/,""):O},v.getPrecision=function(O){if(we(v.props.precision))return v.props.precision;var C=String(O);if(C.indexOf("e-")>=0)return parseInt(C.slice(C.indexOf("e-")+2),10);var u=0;return C.indexOf(".")>=0&&(u=C.length-C.indexOf(".")-1),u},v.getInputDisplayValue=function(O){var C=O||v.state,u=C.focused,l=C.inputValue,m=C.value,x;u?x=l:x=v.toPrecisionAsStep(m),x==null&&(x="");var F=v.formatWrapper(x);return we(v.props.decimalSeparator)&&(F=F.toString().replace(".",v.props.decimalSeparator)),F},v.recordCursorPosition=function(){try{v.cursorStart=v.input.selectionStart,v.cursorEnd=v.input.selectionEnd,v.currentValue=v.input.value,v.cursorBefore=v.input.value.substring(0,v.cursorStart),v.cursorAfter=v.input.value.substring(v.cursorEnd)}catch(O){}},v.restoreByAfter=function(O){if(O===void 0)return!1;var C=v.input.value,u=C.lastIndexOf(O);if(u===-1)return!1;var l=v.cursorBefore.length;return v.lastKeyCode===ie.a.DELETE&&v.cursorBefore.charAt(l-1)===O[0]?(v.fixCaret(l,l),!0):u+O.length===C.length?(v.fixCaret(u,u),!0):!1},v.partRestoreByAfter=function(O){return O===void 0?!1:Array.prototype.some.call(O,function(C,u){var l=O.substring(u);return v.restoreByAfter(l)})},v.isNotCompleteNumber=function(O){return isNaN(O)||O===""||O===null||O&&O.toString().indexOf(".")===O.toString().length-1},v.stop=function(){v.autoStepTimer&&clearTimeout(v.autoStepTimer)},v.down=function(O,C,u){v.pressingUpOrDown=!0,v.step("down",O,C,u)},v.up=function(O,C,u){v.pressingUpOrDown=!0,v.step("up",O,C,u)},v.saveInput=function(O){v.input=O};var ee=M.value;ee===void 0&&(ee=M.defaultValue),v.state={focused:M.autoFocus};var I=v.getValidValue(v.toNumber(ee));return v.state=K(K({},v.state),{},{inputValue:v.toPrecisionAsStep(I),value:I}),v}return Object(Oe.a)(V,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(v){var ee=this.props,I=ee.value,O=ee.onChange,C=ee.max,u=ee.min,l=this.state.focused;if(v){if(!Me(v.value,I)||!Me(v.max,C)||!Me(v.min,u)){var m=l?I:this.getValidValue(I),x;this.pressingUpOrDown?x=m:this.inputting?x=this.rawInput:x=this.toPrecisionAsStep(m),this.setState({value:m,inputValue:x})}var F="value"in this.props?I:this.state.value;"max"in this.props&&v.max!==C&&typeof F=="number"&&F>C&&O&&O(C),"min"in this.props&&v.min!==u&&typeof F=="number"&&F<u&&O&&O(u)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ae=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===ie.a.BACKSPACE?ae=this.cursorStart-1:this.lastKeyCode===ie.a.DELETE&&(ae=this.cursorStart):ae=this.input.value.length,this.fixCaret(ae,ae)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case ie.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case ie.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(xe){}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(v){var ee=v;return ee===""?ee="":this.isNotCompleteNumber(parseFloat(ee))?ee=this.state.value:ee=this.getValidValue(ee),this.toNumber(ee)}},{key:"getValueFromEvent",value:function(v){var ee=v.target.value.trim().replace(/。/g,".");return we(this.props.decimalSeparator)&&(ee=ee.replace(this.props.decimalSeparator,".")),ee}},{key:"getValidValue",value:function(v){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,O=parseFloat(v);return isNaN(O)?v:(O<ee&&(O=ee),O>I&&(O=I),O)}},{key:"setValue",value:function(v,ee){var I=this.props.precision,O=this.isNotCompleteNumber(parseFloat(v))?null:parseFloat(v),C=this.state.value,u=C===void 0?null:C,l=this.state.inputValue,m=l===void 0?null:l,x=typeof O=="number"?O.toFixed(I):"".concat(O),F=O!==u||x!=="".concat(m);return"value"in this.props?(m=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:m},ee)):this.setState({value:O,inputValue:this.toPrecisionAsStep(v)},ee),F&&this.props.onChange(O),O}},{key:"getMaxPrecision",value:function(v){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,I=this.props,O=I.precision,C=I.step;if(we(O))return O;var u=this.getPrecision(ee),l=this.getPrecision(C),m=this.getPrecision(v);return v?Math.max(m,u+l):u+l}},{key:"getPrecisionFactor",value:function(v){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,I=this.getMaxPrecision(v,ee);return Math.pow(10,I)}},{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(v){return this.props.formatter?this.props.formatter(v):v}},{key:"toPrecisionAsStep",value:function(v){if(this.isNotCompleteNumber(v)||v==="")return v;var ee=Math.abs(this.getMaxPrecision(v));return isNaN(ee)?v.toString():Number(v).toFixed(ee)}},{key:"toNumber",value:function(v){var ee=this.props.precision,I=this.state.focused,O=v&&v.length>16&&I;return this.isNotCompleteNumber(v)||O?v:we(ee)?Math.round(v*Math.pow(10,ee))/Math.pow(10,ee):Number(v)}},{key:"upStep",value:function(v,ee){var I=this.props.step,O=this.getPrecisionFactor(v,ee),C=Math.abs(this.getMaxPrecision(v,ee)),u=((O*v+O*I*ee)/O).toFixed(C);return this.toNumber(u)}},{key:"downStep",value:function(v,ee){var I=this.props.step,O=this.getPrecisionFactor(v,ee),C=Math.abs(this.getMaxPrecision(v,ee)),u=((O*v-O*I*ee)/O).toFixed(C);return this.toNumber(u)}},{key:"step",value:function(v,ee){var I=this,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=arguments.length>3?arguments[3]:void 0;this.stop(),ee&&(ee.persist(),ee.preventDefault());var u=this.props;if(u.disabled)return;var l=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(l))return;var m=this["".concat(v,"Step")](l,O),x=m>u.max||m<u.min;if(m>u.max?m=u.max:m<u.min&&(m=u.min),this.setValue(m,null),this.setState({focused:!0},function(){I.pressingUpOrDown=!1}),x)return;this.autoStepTimer=setTimeout(function(){I[v](ee,O,!0)},C?ke:Fe)}},{key:"fixCaret",value:function(v,ee){if(v===void 0||ee===void 0||!this.input||!this.input.value)return;try{var I=this.input.selectionStart,O=this.input.selectionEnd;(v!==I||ee!==O)&&this.input.setSelectionRange(v,ee)}catch(C){}}},{key:"render",value:function(){var v,ee=this.props,I=ee.prefixCls,O=ee.disabled,C=ee.readOnly,u=ee.useTouch,l=ee.autoComplete,m=ee.upHandler,x=ee.downHandler,F=ee.className,ae=ee.max,xe=ee.min,oe=ee.style,ye=ee.title,$=ee.onMouseEnter,q=ee.onMouseLeave,z=ee.onMouseOver,Y=ee.onMouseOut,p=ee.required,T=ee.onClick,b=ee.tabIndex,re=ee.type,fe=ee.placeholder,G=ee.id,pe=ee.inputMode,Ae=ee.pattern,Ce=ee.step,_e=ee.maxLength,ve=ee.autoFocus,Ee=ee.name,Ue=ee.onPaste,Pe=ee.onInput,We=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"]),ze=this.state,Qe=ze.value,$e=ze.focused,Ye=X()(I,(v={},Object(be.a)(v,F,!!F),Object(be.a)(v,"".concat(I,"-disabled"),O),Object(be.a)(v,"".concat(I,"-focused"),$e),v)),Se={};Object.keys(We).forEach(function(E){(E.substr(0,5)==="data-"||E.substr(0,5)==="aria-"||E==="role")&&(Se[E]=We[E])});var it=!C&&!O,Je=this.getInputDisplayValue(null),De=(Qe||Qe===0)&&(isNaN(Qe)||Number(Qe)>=ae),He=(Qe||Qe===0)&&(isNaN(Qe)||Number(Qe)<=xe),k=De||O||C,L=He||O||C,R=X()("".concat(I,"-handler"),"".concat(I,"-handler-up"),Object(be.a)({},"".concat(I,"-handler-up-disabled"),k)),h=X()("".concat(I,"-handler"),"".concat(I,"-handler-down"),Object(be.a)({},"".concat(I,"-handler-down-disabled"),L)),g=u?{onTouchStart:k?j:this.up,onTouchEnd:this.stop}:{onMouseDown:k?j:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},_=u?{onTouchStart:L?j:this.down,onTouchEnd:this.stop}:{onMouseDown:L?j:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return w.a.createElement("div",{className:Ye,style:oe,title:ye,onMouseEnter:$,onMouseLeave:q,onMouseOver:z,onMouseOut:Y,onFocus:function(){return null},onBlur:function(){return null}},w.a.createElement("div",{className:"".concat(I,"-handler-wrap")},w.a.createElement("span",Object.assign({unselectable:"on"},g,{role:"button","aria-label":"Increase Value","aria-disabled":k,className:R}),m||w.a.createElement("span",{unselectable:"on",className:"".concat(I,"-handler-up-inner"),onClick:B})),w.a.createElement("span",Object.assign({unselectable:"on"},_,{role:"button","aria-label":"Decrease Value","aria-disabled":L,className:h}),x||w.a.createElement("span",{unselectable:"on",className:"".concat(I,"-handler-down-inner"),onClick:B}))),w.a.createElement("div",{className:"".concat(I,"-input-wrap")},w.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":xe,"aria-valuemax":ae,"aria-valuenow":Qe,required:p,type:re,placeholder:fe,onPaste:Ue,onClick:T,onMouseUp:this.onMouseUp,className:"".concat(I,"-input"),tabIndex:b,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:it?this.onKeyDown:j,onKeyUp:it?this.onKeyUp:j,autoFocus:ve,maxLength:_e,readOnly:C,disabled:O,max:ae,min:xe,step:Ce,name:Ee,title:ye,id:G,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Je),pattern:Ae,inputMode:pe,onInput:Pe},Se))))}}]),V}(w.a.Component);de.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:ce,min:-ce,step:1,style:{},onChange:j,onKeyDown:j,onPressEnter:j,onFocus:j,onBlur:j,parser:ne,required:!1,autoComplete:"off"};var he=de,Te=Ie.a=he},gHQ5:function(qe,Ie,f){"use strict";f.r(Ie);var W=f("+L6B"),be=f("2/Rp"),le=f("5NDa"),Oe=f("5rEg"),ge=f("k1fw"),J=f("9og8"),N=f("y8nQ"),A=f("Vl3Y"),w=f("tJVT"),H=f("CiB2"),X=f("WmNS"),ie=f.n(X),ue=f("q1tI"),K=f.n(ue),P=f("3vs6"),U=f("l3Yi"),j=f.n(U),B=f("Ot1p"),ne=f("500L"),ke=f("ErOA"),Fe=f("Ty5D"),ce=f("9kvl"),we=function(de){var he;Object(H.a)(de);var Te=Object(ue.useState)({}),se=Object(w.a)(Te,2),y=se[0],V=se[1],M=A.a.useForm(),v=Object(w.a)(M,1),ee=v[0],I=Object(ue.useState)(!0),O=Object(w.a)(I,2),C=O[0],u=O[1],l=Object(ue.useState)(!1),m=Object(w.a)(l,2),x=m[0],F=m[1],ae=Object(ue.useState)(!1),xe=Object(w.a)(ae,2),oe=xe[0],ye=xe[1],$=Object(Fe.i)(),q=$==null?void 0:$.virtual_spacesId;Object(ue.useEffect)(function(){$!=null&&$.id?z():ye(!0)},[]);var z=function(){var p=Object(J.a)(ie.a.mark(function T(){var b,re;return ie.a.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.next=2,Object(ke.a)("/api/virtual_classrooms/".concat(q,"/syllabuses/").concat($==null?void 0:$.id,"/edit.json"),{method:"get"});case 2:b=G.sent,b&&(re={title:b.title,description:b.description,attachment_ids:Object(ne.a)(b.attachments)},console.log(re,"formData"),ee.setFieldsValue(Object(ge.a)({},re)),V(Object(ge.a)({},re)),ye(!0));case 4:case"end":return G.stop()}},T)}));return function(){return p.apply(this,arguments)}}(),Y=function(){var p=Object(J.a)(ie.a.mark(function T(b){var re,fe,G,pe,Ae;return ie.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(fe=Object(ge.a)({},y),fe.attachment_ids&&(fe.attachment_ids=fe==null||((G=fe.attachment_ids)===null||G===void 0)?void 0:G.map(function(ve){return ve.response.id})),F(!0),!($!=null&&$.id)){_e.next=9;break}return _e.next=6,Object(ke.a)("/api/virtual_classrooms/".concat(q,"/syllabuses/").concat($==null?void 0:$.id,".json"),{method:"put",body:Object(ge.a)({},fe)});case 6:pe=_e.sent,_e.next=12;break;case 9:return _e.next=11,Object(ke.a)("/api/virtual_classrooms/".concat(q,"/syllabuses.json"),{method:"post",body:Object(ge.a)({},fe)});case 11:pe=_e.sent;case 12:(re=pe)!==null&&re!==void 0&&re.virtual_classroom_id&&ce.d.push("/vspaces/".concat(q,"/syllabuses/").concat((Ae=pe)===null||Ae===void 0?void 0:Ae.id,"/detail")),F(!1);case 14:case"end":return _e.stop()}},T)}));return function(b){return p.apply(this,arguments)}}();return K.a.createElement("div",{className:j.a.wrap},K.a.createElement(P.a,null),K.a.createElement("div",{className:j.a.form},K.a.createElement("div",{className:j.a.title},K.a.createElement("span",{onClick:function(){return ce.d.push("/vspaces/".concat(q,"/syllabuses"))}},K.a.createElement("i",{className:"iconfont icon-zuoshangjiaofanhui"}),"\u8FD4\u56DE"),K.a.createElement("span",null,"\u65B0\u5EFA\u6559\u5B66\u5927\u7EB2")),K.a.createElement(A.a,{colon:!1,form:ee,scrollToFirstError:!0,onValuesChange:function(){V(Object(ge.a)({},ee.getFieldsValue()))},onFinish:Y},K.a.createElement(A.a.Item,{name:"title",label:"\u5927\u7EB2\u6807\u9898",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5927\u7EB2\u6807\u9898"}]},K.a.createElement(Oe.a,{maxLength:60,suffix:"".concat(((he=y.title)===null||he===void 0?void 0:he.length)||0,"/60"),placeholder:"\u8BF7\u8F93\u5165\u5927\u7EB2\u6807\u9898"})),K.a.createElement("div",{style:{margin:"20px 0 12px 10px"}},"\u5927\u7EB2\u5185\u5BB9"),K.a.createElement(A.a.Item,{className:"ml10",name:"description",rules:[{max:5e4,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u523650000\u4E2A\u5B57\u7B26"}]},K.a.createElement(B.a,{watch:!0,defaultValue:y.description})),K.a.createElement(A.a.Item,{className:"ml10",name:"attachment_ids",label:"\u9644\u4EF6"},oe&&K.a.createElement(ne.b,{className:j.a.file,title:K.a.createElement("span",null,K.a.createElement("i",{className:"iconfont icon-shangchuan1 font14 mr5"}),"\u4E0A\u4F20\u9644\u4EF6")})),K.a.createElement("div",{style:{textAlign:"right"}},K.a.createElement(A.a.Item,null,K.a.createElement(be.a,{onClick:function(){return ce.d.push("/vspaces/".concat(q,"/syllabuses"))},className:"mr10"},"\u53D6\u6D88"),K.a.createElement(be.a,{type:"primary",htmlType:"submit",loading:x},"\u786E\u8BA4"))))))};Ie.default=we},h78n:function(qe,Ie,f){"use strict";f.d(Ie,"a",function(){return v});var W=f("q1tI"),be=f.n(W),le=f("TSYQ"),Oe=f.n(le),ge={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},J=function(O){var C=O.map(function(){return Object(W.useRef)()}),u=Object(W.useRef)();return Object(W.useEffect)(function(){var l=Date.now(),m=!1;Object.keys(C).forEach(function(x){var F=C[x].current;if(!F)return;m=!0;var ae=F.style;ae.transitionDuration=".3s, .3s, .3s, .06s",u.current&&l-u.current<100&&(ae.transitionDuration="0s, 0s")}),m&&(u.current=Date.now())}),[C]};function N(){return N=Object.assign||function(I){for(var O=1;O<arguments.length;O++){var C=arguments[O];for(var u in C)Object.prototype.hasOwnProperty.call(C,u)&&(I[u]=C[u])}return I},N.apply(this,arguments)}function A(I,O){return ue(I)||ie(I,O)||H(I,O)||w()}function w(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H(I,O){if(!I)return;if(typeof I=="string")return X(I,O);var C=Object.prototype.toString.call(I).slice(8,-1);if(C==="Object"&&I.constructor&&(C=I.constructor.name),C==="Map"||C==="Set")return Array.from(I);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return X(I,O)}function X(I,O){(O==null||O>I.length)&&(O=I.length);for(var C=0,u=new Array(O);C<O;C++)u[C]=I[C];return u}function ie(I,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(I)))return;var C=[],u=!0,l=!1,m=void 0;try{for(var x=I[Symbol.iterator](),F;!(u=(F=x.next()).done)&&!(C.push(F.value),O&&C.length===O);u=!0);}catch(ae){l=!0,m=ae}finally{try{!u&&x.return!=null&&x.return()}finally{if(l)throw m}}return C}function ue(I){if(Array.isArray(I))return I}function K(I,O){if(I==null)return{};var C=P(I,O),u,l;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(I);for(l=0;l<m.length;l++){if(u=m[l],O.indexOf(u)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(I,u))continue;C[u]=I[u]}}return C}function P(I,O){if(I==null)return{};var C={},u=Object.keys(I),l,m;for(m=0;m<u.length;m++){if(l=u[m],O.indexOf(l)>=0)continue;C[l]=I[l]}return C}var U=function(O){var C=O.className,u=O.percent,l=O.prefixCls,m=O.strokeColor,x=O.strokeLinecap,F=O.strokeWidth,ae=O.style,xe=O.trailColor,oe=O.trailWidth,ye=O.transition,$=K(O,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete $.gapPosition;var q=Array.isArray(u)?u:[u],z=Array.isArray(m)?m:[m],Y=J(q),p=A(Y,1),T=p[0],b=F/2,re=100-F/2,fe="M ".concat(x==="round"?b:0,",").concat(b,`
|
|
L `).concat(x==="round"?re:100,",").concat(b),G="0 0 100 ".concat(F),pe=0;return be.a.createElement("svg",N({className:Oe()("".concat(l,"-line"),C),viewBox:G,preserveAspectRatio:"none",style:ae},$),be.a.createElement("path",{className:"".concat(l,"-line-trail"),d:fe,strokeLinecap:x,stroke:xe,strokeWidth:oe||F,fillOpacity:"0"}),q.map(function(Ae,Ce){var _e={strokeDasharray:"".concat(Ae,"px, 100px"),strokeDashoffset:"-".concat(pe,"px"),transition:ye||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ve=z[Ce]||z[z.length-1];return pe+=Ae,be.a.createElement("path",{key:Ce,className:"".concat(l,"-line-path"),d:fe,strokeLinecap:x,stroke:ve,strokeWidth:F,fillOpacity:"0",ref:T[Ce],style:_e})}))};U.defaultProps=ge;var j=U;function B(){return B=Object.assign||function(I){for(var O=1;O<arguments.length;O++){var C=arguments[O];for(var u in C)Object.prototype.hasOwnProperty.call(C,u)&&(I[u]=C[u])}return I},B.apply(this,arguments)}function ne(I,O){return Me(I)||we(I,O)||Fe(I,O)||ke()}function ke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fe(I,O){if(!I)return;if(typeof I=="string")return ce(I,O);var C=Object.prototype.toString.call(I).slice(8,-1);if(C==="Object"&&I.constructor&&(C=I.constructor.name),C==="Map"||C==="Set")return Array.from(I);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return ce(I,O)}function ce(I,O){(O==null||O>I.length)&&(O=I.length);for(var C=0,u=new Array(O);C<O;C++)u[C]=I[C];return u}function we(I,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(I)))return;var C=[],u=!0,l=!1,m=void 0;try{for(var x=I[Symbol.iterator](),F;!(u=(F=x.next()).done)&&!(C.push(F.value),O&&C.length===O);u=!0);}catch(ae){l=!0,m=ae}finally{try{!u&&x.return!=null&&x.return()}finally{if(l)throw m}}return C}function Me(I){if(Array.isArray(I))return I}function de(I,O){if(I==null)return{};var C=he(I,O),u,l;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(I);for(l=0;l<m.length;l++){if(u=m[l],O.indexOf(u)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(I,u))continue;C[u]=I[u]}}return C}function he(I,O){if(I==null)return{};var C={},u=Object.keys(I),l,m;for(m=0;m<u.length;m++){if(l=u[m],O.indexOf(l)>=0)continue;C[l]=I[l]}return C}var Te=0;function se(I){return+I.replace("%","")}function y(I){return Array.isArray(I)?I:[I]}function V(I,O,C,u){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,m=arguments.length>5?arguments[5]:void 0,x=50-u/2,F=0,ae=-x,xe=0,oe=-2*x;switch(m){case"left":F=-x,ae=0,xe=2*x,oe=0;break;case"right":F=x,ae=0,xe=-2*x,oe=0;break;case"bottom":ae=x,oe=2*x;break;default:}var ye="M 50,50 m ".concat(F,",").concat(ae,`
|
|
a `).concat(x,",").concat(x," 0 1 1 ").concat(xe,",").concat(-oe,`
|
|
a `).concat(x,",").concat(x," 0 1 1 ").concat(-xe,",").concat(oe),$=Math.PI*2*x,q={stroke:C,strokeDasharray:"".concat(O/100*($-l),"px ").concat($,"px"),strokeDashoffset:"-".concat(l/2+I/100*($-l),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ye,pathStyle:q}}var M=function(O){var C=O.prefixCls,u=O.strokeWidth,l=O.trailWidth,m=O.gapDegree,x=O.gapPosition,F=O.trailColor,ae=O.strokeLinecap,xe=O.style,oe=O.className,ye=O.strokeColor,$=O.percent,q=de(O,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),z=Object(W.useMemo)(function(){return Te+=1,Te},[]),Y=V(0,100,F,u,m,x),p=Y.pathString,T=Y.pathStyle,b=y($),re=y(ye),fe=re.find(function(_e){return Object.prototype.toString.call(_e)==="[object Object]"}),G=J(b),pe=ne(G,1),Ae=pe[0],Ce=function(){var ve=0;return b.map(function(Ee,Ue){var Pe=re[Ue]||re[re.length-1],We=Object.prototype.toString.call(Pe)==="[object Object]"?"url(#".concat(C,"-gradient-").concat(z,")"):"",ze=V(ve,Ee,Pe,u,m,x);return ve+=Ee,be.a.createElement("path",{key:Ue,className:"".concat(C,"-circle-path"),d:ze.pathString,stroke:We,strokeLinecap:ae,strokeWidth:u,opacity:Ee===0?0:1,fillOpacity:"0",style:ze.pathStyle,ref:Ae[Ue]})})};return be.a.createElement("svg",B({className:Oe()("".concat(C,"-circle"),oe),viewBox:"0 0 100 100",style:xe},q),fe&&be.a.createElement("defs",null,be.a.createElement("linearGradient",{id:"".concat(C,"-gradient-").concat(z),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(fe).sort(function(_e,ve){return se(_e)-se(ve)}).map(function(_e,ve){return be.a.createElement("stop",{key:ve,offset:_e,stopColor:fe[_e]})}))),be.a.createElement("path",{className:"".concat(C,"-circle-trail"),d:p,stroke:F,strokeLinecap:ae,strokeWidth:l||u,fillOpacity:"0",style:T}),Ce().reverse())};M.defaultProps=ge;var v=M,ee={Line:j,Circle:v}},kSUc:function(qe,Ie,f){},l3Yi:function(qe,Ie,f){qe.exports={flex_box_center:"flex_box_center___354pw",flex_space_between:"flex_space_between___10PE2",flex_box_vertical_center:"flex_box_vertical_center___YT9_A",flex_box_center_end:"flex_box_center_end___1qNoU",flex_box_column:"flex_box_column___2E4_8",wrap:"wrap___1umYZ",form:"form___2x_Sk",title:"title___idVlc",file:"file___1g_02"}},lZu9:function(qe,Ie,f){(function(W){W(f("VrN/"),f("1eCo"),f("8EBN"))})(function(W){"use strict";W.defineMode("markdown",function(be,le){var Oe=W.getMode(be,"text/html"),ge=Oe.name=="null";function J(u){if(W.findModeByName){var l=W.findModeByName(u);l&&(u=l.mime||l.mimes[0])}var m=W.getMode(be,u);return m.name=="null"?null:m}le.highlightFormatting===void 0&&(le.highlightFormatting=!1),le.maxBlockquoteDepth===void 0&&(le.maxBlockquoteDepth=0),le.taskLists===void 0&&(le.taskLists=!1),le.strikethrough===void 0&&(le.strikethrough=!1),le.emoji===void 0&&(le.emoji=!1),le.fencedCodeBlockHighlighting===void 0&&(le.fencedCodeBlockHighlighting=!0),le.fencedCodeBlockDefaultMode===void 0&&(le.fencedCodeBlockDefaultMode="text/plain"),le.xml===void 0&&(le.xml=!0),le.tokenTypeOverrides===void 0&&(le.tokenTypeOverrides={});var N={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 A in N)N.hasOwnProperty(A)&&le.tokenTypeOverrides[A]&&(N[A]=le.tokenTypeOverrides[A]);var w=/^([*\-_])(?:\s*\1){2,}\s*$/,H=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,X=/^\[(x| )\](?=\s)/i,ie=le.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ue=/^ {0,3}(?:\={1,}|-{2,})\s*$/,K=/^[^#!\[\]*_\\<>` "'(~:]+/,P=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,U=/^\s*\[[^\]]+?\]:.*$/,j=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,B=" ";function ne(u,l,m){return l.f=l.inline=m,m(u,l)}function ke(u,l,m){return l.f=l.block=m,m(u,l)}function Fe(u){return!u||!/\S/.test(u.string)}function ce(u){if(u.linkTitle=!1,u.linkHref=!1,u.linkText=!1,u.em=!1,u.strong=!1,u.strikethrough=!1,u.quote=0,u.indentedCode=!1,u.f==Me){var l=ge;if(!l){var m=W.innerMode(Oe,u.htmlState);l=m.mode.name=="xml"&&m.state.tagStart===null&&!m.state.context&&m.state.tokenize.isInText}l&&(u.f=se,u.block=we,u.htmlState=null)}return u.trailingSpace=0,u.trailingSpaceNewLine=!1,u.prevLine=u.thisLine,u.thisLine={stream:null},null}function we(u,l){var m=u.column()===l.indentation,x=Fe(l.prevLine.stream),F=l.indentedCode,ae=l.prevLine.hr,xe=l.list!==!1,oe=(l.listStack[l.listStack.length-1]||0)+3;l.indentedCode=!1;var ye=l.indentation;if(l.indentationDiff===null&&(l.indentationDiff=l.indentation,xe)){for(l.list=null;ye<l.listStack[l.listStack.length-1];)l.listStack.pop(),l.listStack.length?l.indentation=l.listStack[l.listStack.length-1]:l.list=!1;l.list!==!1&&(l.indentationDiff=ye-l.listStack[l.listStack.length-1])}var $=!x&&!ae&&!l.prevLine.header&&(!xe||!F)&&!l.prevLine.fencedCodeEnd,q=(l.list===!1||ae||x)&&l.indentation<=oe&&u.match(w),z=null;if(l.indentationDiff>=4&&(F||l.prevLine.fencedCodeEnd||l.prevLine.header||x))return u.skipToEnd(),l.indentedCode=!0,N.code;if(u.eatSpace())return null;if(m&&l.indentation<=oe&&(z=u.match(ie))&&z[1].length<=6)return l.quote=0,l.header=z[1].length,l.thisLine.header=!0,le.highlightFormatting&&(l.formatting="header"),l.f=l.inline,he(l);if(l.indentation<=oe&&u.eat(">"))return l.quote=m?1:l.quote+1,le.highlightFormatting&&(l.formatting="quote"),u.eatSpace(),he(l);if(!q&&!l.setext&&m&&l.indentation<=oe&&(z=u.match(H))){var Y=z[1]?"ol":"ul";return l.indentation=ye+u.current().length,l.list=!0,l.quote=0,l.listStack.push(l.indentation),l.em=!1,l.strong=!1,l.code=!1,l.strikethrough=!1,le.taskLists&&u.match(X,!1)&&(l.taskList=!0),l.f=l.inline,le.highlightFormatting&&(l.formatting=["list","list-"+Y]),he(l)}else{if(m&&l.indentation<=oe&&(z=u.match(P,!0)))return l.quote=0,l.fencedEndRE=new RegExp(z[1]+"+ *$"),l.localMode=le.fencedCodeBlockHighlighting&&J(z[2]||le.fencedCodeBlockDefaultMode),l.localMode&&(l.localState=W.startState(l.localMode)),l.f=l.block=de,le.highlightFormatting&&(l.formatting="code-block"),l.code=-1,he(l);if(l.setext||(!$||!xe)&&!l.quote&&l.list===!1&&!l.code&&!q&&!U.test(u.string)&&(z=u.lookAhead(1))&&(z=z.match(ue)))return l.setext?(l.header=l.setext,l.setext=0,u.skipToEnd(),le.highlightFormatting&&(l.formatting="header")):(l.header=z[0].charAt(0)=="="?1:2,l.setext=l.header),l.thisLine.header=!0,l.f=l.inline,he(l);if(q)return u.skipToEnd(),l.hr=!0,l.thisLine.hr=!0,N.hr;if(u.peek()==="[")return ne(u,l,ee)}return ne(u,l,l.inline)}function Me(u,l){var m=Oe.token(u,l.htmlState);if(!ge){var x=W.innerMode(Oe,l.htmlState);(x.mode.name=="xml"&&x.state.tagStart===null&&!x.state.context&&x.state.tokenize.isInText||l.md_inside&&u.current().indexOf(">")>-1)&&(l.f=se,l.block=we,l.htmlState=null)}return m}function de(u,l){var m=l.listStack[l.listStack.length-1]||0,x=l.indentation<m,F=m+3;if(l.fencedEndRE&&l.indentation<=F&&(x||u.match(l.fencedEndRE))){le.highlightFormatting&&(l.formatting="code-block");var ae;return x||(ae=he(l)),l.localMode=l.localState=null,l.block=we,l.f=se,l.fencedEndRE=null,l.code=0,l.thisLine.fencedCodeEnd=!0,x?ke(u,l,l.block):ae}else return l.localMode?l.localMode.token(u,l.localState):(u.skipToEnd(),N.code)}function he(u){var l=[];if(u.formatting){l.push(N.formatting),typeof u.formatting=="string"&&(u.formatting=[u.formatting]);for(var m=0;m<u.formatting.length;m++)l.push(N.formatting+"-"+u.formatting[m]),u.formatting[m]==="header"&&l.push(N.formatting+"-"+u.formatting[m]+"-"+u.header),u.formatting[m]==="quote"&&(!le.maxBlockquoteDepth||le.maxBlockquoteDepth>=u.quote?l.push(N.formatting+"-"+u.formatting[m]+"-"+u.quote):l.push("error"))}if(u.taskOpen)return l.push("meta"),l.length?l.join(" "):null;if(u.taskClosed)return l.push("property"),l.length?l.join(" "):null;if(u.linkHref?l.push(N.linkHref,"url"):(u.strong&&l.push(N.strong),u.em&&l.push(N.em),u.strikethrough&&l.push(N.strikethrough),u.emoji&&l.push(N.emoji),u.linkText&&l.push(N.linkText),u.code&&l.push(N.code),u.image&&l.push(N.image),u.imageAltText&&l.push(N.imageAltText,"link"),u.imageMarker&&l.push(N.imageMarker)),u.header&&l.push(N.header,N.header+"-"+u.header),u.quote&&(l.push(N.quote),!le.maxBlockquoteDepth||le.maxBlockquoteDepth>=u.quote?l.push(N.quote+"-"+u.quote):l.push(N.quote+"-"+le.maxBlockquoteDepth)),u.list!==!1){var x=(u.listStack.length-1)%3;x?x===1?l.push(N.list2):l.push(N.list3):l.push(N.list1)}return u.trailingSpaceNewLine?l.push("trailing-space-new-line"):u.trailingSpace&&l.push("trailing-space-"+(u.trailingSpace%2?"a":"b")),l.length?l.join(" "):null}function Te(u,l){return u.match(K,!0)?he(l):void 0}function se(u,l){var m=l.text(u,l);if(typeof m!="undefined")return m;if(l.list)return l.list=null,he(l);if(l.taskList){var x=u.match(X,!0)[1]===" ";return x?l.taskOpen=!0:l.taskClosed=!0,le.highlightFormatting&&(l.formatting="task"),l.taskList=!1,he(l)}if(l.taskOpen=!1,l.taskClosed=!1,l.header&&u.match(/^#+$/,!0))return le.highlightFormatting&&(l.formatting="header"),he(l);var F=u.next();if(l.linkTitle){l.linkTitle=!1;var ae=F;F==="("&&(ae=")"),ae=(ae+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var xe="^\\s*(?:[^"+ae+"\\\\]+|\\\\\\\\|\\\\.)"+ae;if(u.match(new RegExp(xe),!0))return N.linkHref}if(F==="`"){var oe=l.formatting;le.highlightFormatting&&(l.formatting="code"),u.eatWhile("`");var ye=u.current().length;if(l.code==0&&(!l.quote||ye==1))return l.code=ye,he(l);if(ye==l.code){var $=he(l);return l.code=0,$}else return l.formatting=oe,he(l)}else if(l.code)return he(l);if(F==="\\"&&(u.next(),le.highlightFormatting)){var q=he(l),z=N.formatting+"-escape";return q?q+" "+z:z}if(F==="!"&&u.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return l.imageMarker=!0,l.image=!0,le.highlightFormatting&&(l.formatting="image"),he(l);if(F==="["&&l.imageMarker&&u.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return l.imageMarker=!1,l.imageAltText=!0,le.highlightFormatting&&(l.formatting="image"),he(l);if(F==="]"&&l.imageAltText){le.highlightFormatting&&(l.formatting="image");var q=he(l);return l.imageAltText=!1,l.image=!1,l.inline=l.f=V,q}if(F==="["&&!l.image)return l.linkText&&u.match(/^.*?\]/)||(l.linkText=!0,le.highlightFormatting&&(l.formatting="link")),he(l);if(F==="]"&&l.linkText){le.highlightFormatting&&(l.formatting="link");var q=he(l);return l.linkText=!1,l.inline=l.f=u.match(/\(.*?\)| ?\[.*?\]/,!1)?V:se,q}if(F==="<"&&u.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){l.f=l.inline=y,le.highlightFormatting&&(l.formatting="link");var q=he(l);return q?q+=" ":q="",q+N.linkInline}if(F==="<"&&u.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){l.f=l.inline=y,le.highlightFormatting&&(l.formatting="link");var q=he(l);return q?q+=" ":q="",q+N.linkEmail}if(le.xml&&F==="<"&&u.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Y=u.string.indexOf(">",u.pos);if(Y!=-1){var p=u.string.substring(u.start,Y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(p)&&(l.md_inside=!0)}return u.backUp(1),l.htmlState=W.startState(Oe),ke(u,l,Me)}if(le.xml&&F==="<"&&u.match(/^\/\w*?>/))return l.md_inside=!1,"tag";if(F==="*"||F==="_"){for(var T=1,b=u.pos==1?" ":u.string.charAt(u.pos-2);T<3&&u.eat(F);)T++;var re=u.peek()||" ",fe=!/\s/.test(re)&&(!j.test(re)||/\s/.test(b)||j.test(b)),G=!/\s/.test(b)&&(!j.test(b)||/\s/.test(re)||j.test(re)),pe=null,Ae=null;if(T%2&&(!l.em&&fe&&(F==="*"||!G||j.test(b))?pe=!0:l.em==F&&G&&(F==="*"||!fe||j.test(re))&&(pe=!1)),T>1&&(!l.strong&&fe&&(F==="*"||!G||j.test(b))?Ae=!0:l.strong==F&&G&&(F==="*"||!fe||j.test(re))&&(Ae=!1)),Ae!=null||pe!=null){le.highlightFormatting&&(l.formatting=pe==null?"strong":Ae==null?"em":"strong em"),pe===!0&&(l.em=F),Ae===!0&&(l.strong=F);var $=he(l);return pe===!1&&(l.em=!1),Ae===!1&&(l.strong=!1),$}}else if(F===" "&&(u.eat("*")||u.eat("_"))){if(u.peek()===" ")return he(l);u.backUp(1)}if(le.strikethrough){if(F==="~"&&u.eatWhile(F)){if(l.strikethrough){le.highlightFormatting&&(l.formatting="strikethrough");var $=he(l);return l.strikethrough=!1,$}else if(u.match(/^[^\s]/,!1))return l.strikethrough=!0,le.highlightFormatting&&(l.formatting="strikethrough"),he(l)}else if(F===" "&&u.match(/^~~/,!0)){if(u.peek()===" ")return he(l);u.backUp(2)}}if(le.emoji&&F===":"&&u.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){l.emoji=!0,le.highlightFormatting&&(l.formatting="emoji");var Ce=he(l);return l.emoji=!1,Ce}return F===" "&&(u.match(/^ +$/,!1)?l.trailingSpace++:l.trailingSpace&&(l.trailingSpaceNewLine=!0)),he(l)}function y(u,l){var m=u.next();if(m===">"){l.f=l.inline=se,le.highlightFormatting&&(l.formatting="link");var x=he(l);return x?x+=" ":x="",x+N.linkInline}return u.match(/^[^>]+/,!0),N.linkInline}function V(u,l){if(u.eatSpace())return null;var m=u.next();return m==="("||m==="["?(l.f=l.inline=v(m==="("?")":"]"),le.highlightFormatting&&(l.formatting="link-string"),l.linkHref=!0,he(l)):"error"}var M={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function v(u){return function(l,m){var x=l.next();if(x===u){m.f=m.inline=se,le.highlightFormatting&&(m.formatting="link-string");var F=he(m);return m.linkHref=!1,F}return l.match(M[u]),m.linkHref=!0,he(m)}}function ee(u,l){return u.match(/^([^\]\\]|\\.)*\]:/,!1)?(l.f=I,u.next(),le.highlightFormatting&&(l.formatting="link"),l.linkText=!0,he(l)):ne(u,l,se)}function I(u,l){if(u.match(/^\]:/,!0)){l.f=l.inline=O,le.highlightFormatting&&(l.formatting="link");var m=he(l);return l.linkText=!1,m}return u.match(/^([^\]\\]|\\.)+/,!0),N.linkText}function O(u,l){return u.eatSpace()?null:(u.match(/^[^\s]+/,!0),u.peek()===void 0?l.linkTitle=!0:u.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),l.f=l.inline=se,N.linkHref+" url")}var C={startState:function(){return{f:we,prevLine:{stream:null},thisLine:{stream:null},block:we,htmlState:null,indentation:0,inline:se,text:Te,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(u){return{f:u.f,prevLine:u.prevLine,thisLine:u.thisLine,block:u.block,htmlState:u.htmlState&&W.copyState(Oe,u.htmlState),indentation:u.indentation,localMode:u.localMode,localState:u.localMode?W.copyState(u.localMode,u.localState):null,inline:u.inline,text:u.text,formatting:!1,linkText:u.linkText,linkTitle:u.linkTitle,linkHref:u.linkHref,code:u.code,em:u.em,strong:u.strong,strikethrough:u.strikethrough,emoji:u.emoji,header:u.header,setext:u.setext,hr:u.hr,taskList:u.taskList,list:u.list,listStack:u.listStack.slice(0),quote:u.quote,indentedCode:u.indentedCode,trailingSpace:u.trailingSpace,trailingSpaceNewLine:u.trailingSpaceNewLine,md_inside:u.md_inside,fencedEndRE:u.fencedEndRE}},token:function(u,l){if(l.formatting=!1,u!=l.thisLine.stream){if(l.header=0,l.hr=!1,u.match(/^\s*$/,!0))return ce(l),null;if(l.prevLine=l.thisLine,l.thisLine={stream:u},l.taskList=!1,l.trailingSpace=0,l.trailingSpaceNewLine=!1,!l.localState&&(l.f=l.block,l.f!=Me)){var m=u.match(/^\s*/,!0)[0].replace(/\t/g,B).length;if(l.indentation=m,l.indentationDiff=null,m>0)return null}}return l.f(u,l)},innerMode:function(u){return u.block==Me?{state:u.htmlState,mode:Oe}:u.localState?{state:u.localState,mode:u.localMode}:{state:u,mode:C}},indent:function(u,l,m){return u.block==Me&&Oe.indent?Oe.indent(u.htmlState,l,m):u.localState&&u.localMode.indent?u.localMode.indent(u.localState,l,m):W.Pass},blankLine:ce,getType:he,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return C},"xml"),W.defineMIME("text/markdown","markdown"),W.defineMIME("text/x-markdown","markdown")})},mOS8:function(qe,Ie,f){qe.exports=f.p+"static/403Qrcode.6c17b6f4.png"},osHv:function(qe,Ie,f){(function(W){W(f("VrN/"))})(function(W){"use strict";var be=W.Pos;function le(j,B){return j.line-B.line||j.ch-B.ch}var Oe="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",ge=Oe+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",J=new RegExp("<(/?)(["+Oe+"]["+ge+"]*)","g");function N(j,B,ne,ke){this.line=B,this.ch=ne,this.cm=j,this.text=j.getLine(B),this.min=ke?Math.max(ke.from,j.firstLine()):j.firstLine(),this.max=ke?Math.min(ke.to-1,j.lastLine()):j.lastLine()}function A(j,B){var ne=j.cm.getTokenTypeAt(be(j.line,B));return ne&&/\btag\b/.test(ne)}function w(j){return j.line>=j.max?void 0:(j.ch=0,j.text=j.cm.getLine(++j.line),!0)}function H(j){return j.line<=j.min?void 0:(j.text=j.cm.getLine(--j.line),j.ch=j.text.length,!0)}function X(j){for(;;){var B=j.text.indexOf(">",j.ch);if(B==-1){if(w(j))continue;return}if(!A(j,B+1)){j.ch=B+1;continue}var ne=j.text.lastIndexOf("/",B),ke=ne>-1&&!/\S/.test(j.text.slice(ne+1,B));return j.ch=B+1,ke?"selfClose":"regular"}}function ie(j){for(;;){var B=j.ch?j.text.lastIndexOf("<",j.ch-1):-1;if(B==-1){if(H(j))continue;return}if(!A(j,B+1)){j.ch=B;continue}J.lastIndex=B,j.ch=B;var ne=J.exec(j.text);if(ne&&ne.index==B)return ne}}function ue(j){for(;;){J.lastIndex=j.ch;var B=J.exec(j.text);if(!B){if(w(j))continue;return}if(!A(j,B.index+1)){j.ch=B.index+1;continue}return j.ch=B.index+B[0].length,B}}function K(j){for(;;){var B=j.ch?j.text.lastIndexOf(">",j.ch-1):-1;if(B==-1){if(H(j))continue;return}if(!A(j,B+1)){j.ch=B;continue}var ne=j.text.lastIndexOf("/",B),ke=ne>-1&&!/\S/.test(j.text.slice(ne+1,B));return j.ch=B+1,ke?"selfClose":"regular"}}function P(j,B){for(var ne=[];;){var ke=ue(j),Fe,ce=j.line,we=j.ch-(ke?ke[0].length:0);if(!ke||!(Fe=X(j)))return;if(Fe=="selfClose")continue;if(ke[1]){for(var Me=ne.length-1;Me>=0;--Me)if(ne[Me]==ke[2]){ne.length=Me;break}if(Me<0&&(!B||B==ke[2]))return{tag:ke[2],from:be(ce,we),to:be(j.line,j.ch)}}else ne.push(ke[2])}}function U(j,B){for(var ne=[];;){var ke=K(j);if(!ke)return;if(ke=="selfClose"){ie(j);continue}var Fe=j.line,ce=j.ch,we=ie(j);if(!we)return;if(we[1])ne.push(we[2]);else{for(var Me=ne.length-1;Me>=0;--Me)if(ne[Me]==we[2]){ne.length=Me;break}if(Me<0&&(!B||B==we[2]))return{tag:we[2],from:be(j.line,j.ch),to:be(Fe,ce)}}}}W.registerHelper("fold","xml",function(j,B){for(var ne=new N(j,B.line,0);;){var ke=ue(ne);if(!ke||ne.line!=B.line)return;var Fe=X(ne);if(!Fe)return;if(!ke[1]&&Fe!="selfClose"){var ce=be(ne.line,ne.ch),we=P(ne,ke[2]);return we&&le(we.from,ce)>0?{from:ce,to:we.from}:null}}}),W.findMatchingTag=function(j,B,ne){var ke=new N(j,B.line,B.ch,ne);if(ke.text.indexOf(">")==-1&&ke.text.indexOf("<")==-1)return;var Fe=X(ke),ce=Fe&&be(ke.line,ke.ch),we=Fe&&ie(ke);if(!Fe||!we||le(ke,B)>0)return;var Me={from:be(ke.line,ke.ch),to:ce,tag:we[2]};return Fe=="selfClose"?{open:Me,close:null,at:"open"}:we[1]?{open:U(ke,we[2]),close:Me,at:"close"}:(ke=new N(j,ce.line,ce.ch,ne),{open:Me,close:P(ke,we[2]),at:"open"})},W.findEnclosingTag=function(j,B,ne,ke){for(var Fe=new N(j,B.line,B.ch,ne);;){var ce=U(Fe,ke);if(!ce)break;var we=new N(j,B.line,B.ch,ne),Me=P(we,ce.tag);if(Me)return{open:ce,close:Me}}},W.scanForClosingTag=function(j,B,ne,ke){var Fe=new N(j,B.line,B.ch,ke?{from:0,to:ke}:null);return P(Fe,ne)}})},p5ED:function(qe,Ie,f){"use strict";var W=f("+L6B"),be=f("2/Rp"),le=f("5Dmo"),Oe=f("3S7+"),ge=f("k1fw"),J=f("tJVT"),N=f("q1tI"),A=f.n(N),w=f("vHTk"),H=f.n(w),X=f("yEEn"),ie=f("ZW9T"),ue=f("1vsH");Ie.a=function(K){var P=K.name,U=K.data,j=K.theme,B=K.type,ne=K.filename,ke=K.monacoEditor,Fe=K.className,ce=K.style,we=K.close,Me=K.onClose,de=K.hasMask,he=Object(N.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),Te=Object(J.a)(he,2),se=Te[0],y=Te[1],V=Object(N.useState)(""),M=Object(J.a)(V,2),v=M[0],ee=M[1],I=Object(N.useRef)();ne&&(ke.filename=ne),Object(N.useEffect)(function(){var u,l,m=(u=document.cookie)===null||u===void 0||((l=u.replace(/\s/g,""))===null||l===void 0)?void 0:l.split(";");m==null||m.map(function(x){var F=x.split("=");F[0]==="_educoder_session"&&ee(F[1])})},[]);var O=function(){if(U.startsWith("http")||U.startsWith("/")){C();return}Object(ue.x)(ne||"educoder",U,ne)},C=function(){Object(ue.v)(ne||P,U)};return console.log("data:",U,"fileanme:",ne," name:",P),A.a.createElement("div",{style:Object(ge.a)({},ce||{}),className:"".concat(de&&H.a.bgBlack," ").concat(B?H.a.wrp:"hide")},we&&A.a.createElement("div",{className:H.a.close,ref:I},A.a.createElement(Oe.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return I.current}},A.a.createElement("span",{onClick:C},A.a.createElement("i",{className:"icon-quxiaozhiding"}))),A.a.createElement(Oe.a,{title:"\u5173\u95ED",getPopupContainer:function(){return I.current}},A.a.createElement("span",{className:"",onClick:Me},A.a.createElement("i",{className:"icon-guanbi1"})))),A.a.createElement("div",{className:"".concat(H.a[Fe]," ").concat(Fe," ").concat(H.a.monaco," ").concat(B==="txt"?"show":"hide")},B==="txt"&&A.a.createElement(ie.b,ke)),B==="audio"&&A.a.createElement("audio",{src:"".concat(U!=null&&U.startsWith("/")||(U==null?void 0:U.indexOf("https://"))>-1?U:"data:audio/mp3;base64,").concat(U),autoPlay:!0}),B==="video"&&A.a.createElement(A.a.Fragment,null,U!=null&&U.startsWith("/")?A.a.createElement("video",{controls:!0,src:"".concat(U),autoPlay:!0}):A.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(U),autoPlay:!0})),B==="pdf"&&A.a.createElement("embed",{className:H.a.embed,src:U}),B==="image"&&A.a.createElement(A.a.Fragment,null,A.a.createElement("img",{src:"".concat(U!=null&&U.startsWith("/")||(U==null?void 0:U.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(U)})),B==="other"&&A.a.createElement("div",null,A.a.createElement(be.a,{type:"primary",size:"large",onClick:O},A.a.createElement(X.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(B==="download"||B==="office")&&A.a.createElement(be.a,{type:"primary",size:"large",onClick:O},A.a.createElement(X.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(qe,Ie,f){},"rAM+":function(qe,Ie,f){"use strict";f.d(Ie,"a",function(){return be});var W=f("Qw5x");function be(le,Oe){var ge;if(typeof Symbol=="undefined"||le[Symbol.iterator]==null){if(Array.isArray(le)||(ge=Object(W.a)(le))||Oe&&le&&typeof le.length=="number"){ge&&(le=ge);var J=0,N=function(){};return{s:N,n:function(){return J>=le.length?{done:!0}:{done:!1,value:le[J++]}},e:function(ie){throw ie},f:N}}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 A=!0,w=!1,H;return{s:function(){ge=le[Symbol.iterator]()},n:function(){var ie=ge.next();return A=ie.done,ie},e:function(ie){w=!0,H=ie},f:function(){try{!A&&ge.return!=null&&ge.return()}finally{if(w)throw H}}}}},rUJ1:function(qe,Ie){const f=/[&<>"']/,W=/[&<>"']/g,be=/[<>"']|&(?!#?\w+;)/,le=/[<>"']|&(?!#?\w+;)/g,Oe={"&":"&","<":"<",">":">",'"':""","'":"'"},ge=de=>Oe[de];function J(de,he){if(he){if(f.test(de))return de.replace(W,ge)}else if(be.test(de))return de.replace(le,ge);return de}const N=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function A(de){return de.replace(N,(he,Te)=>(Te=Te.toLowerCase(),Te==="colon"?":":Te.charAt(0)==="#"?Te.charAt(1)==="x"?String.fromCharCode(parseInt(Te.substring(2),16)):String.fromCharCode(+Te.substring(1)):""))}const w=/(^|[^\[])\^/g;function H(de,he){de=de.source||de,he=he||"";const Te={replace:(se,y)=>(y=y.source||y,y=y.replace(w,"$1"),de=de.replace(se,y),Te),getRegex:()=>new RegExp(de,he)};return Te}const X=/[^\w:]/g,ie=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ue(de,he,Te){if(de){let se;try{se=decodeURIComponent(A(Te)).replace(X,"").toLowerCase()}catch(y){return null}if(se.indexOf("javascript:")===0||se.indexOf("vbscript:")===0||se.indexOf("data:")===0)return null}he&&!ie.test(Te)&&(Te=B(he,Te));try{Te=encodeURI(Te).replace(/%25/g,"%")}catch(se){return null}return Te}const K={},P=/^[^:]+:\/*[^/]*$/,U=/^([^:]+:)[\s\S]*$/,j=/^([^:]+:\/*[^/]*)[\s\S]*$/;function B(de,he){K[" "+de]||(P.test(de)?K[" "+de]=de+"/":K[" "+de]=ce(de,"/",!0)),de=K[" "+de];const Te=de.indexOf(":")===-1;return he.substring(0,2)==="//"?Te?he:de.replace(U,"$1")+he:he.charAt(0)==="/"?Te?he:de.replace(j,"$1")+he:de+he}const ne={exec:function(){}};function ke(de){let he=1,Te,se;for(;he<arguments.length;he++){Te=arguments[he];for(se in Te)Object.prototype.hasOwnProperty.call(Te,se)&&(de[se]=Te[se])}return de}function Fe(de,he){const Te=de.replace(/\|/g,(V,M,v)=>{let ee=!1,I=M;for(;--I>=0&&v[I]==="\\";)ee=!ee;return ee?"|":" |"}),se=Te.split(/ \|/);let y=0;if(se.length>he)se.splice(he);else for(;se.length<he;)se.push("");for(;y<se.length;y++)se[y]=se[y].trim().replace(/\\\|/g,"|");return se}function ce(de,he,Te){const se=de.length;if(se===0)return"";let y=0;for(;y<se;){const V=de.charAt(se-y-1);if(V===he&&!Te)y++;else if(V!==he&&Te)y++;else break}return de.substr(0,se-y)}function we(de,he){if(de.indexOf(he[1])===-1)return-1;const Te=de.length;let se=0,y=0;for(;y<Te;y++)if(de[y]==="\\")y++;else if(de[y]===he[0])se++;else if(de[y]===he[1]&&(se--,se<0))return y;return-1}function Me(de){de&&de.sanitize&&!de.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")}qe.exports={escape:J,unescape:A,edit:H,cleanUrl:ue,resolveUrl:B,noopTest:ne,merge:ke,splitCells:Fe,rtrim:ce,findClosingBracket:we,checkSanitizeDeprecation:Me}},ttuQ:function(qe,Ie,f){qe.exports={bg:"bg___3F6Km",name:"name___1NsJT",member:"member___2pzzt"}},vHTk:function(qe,Ie,f){qe.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wzkS:function(qe,Ie,f){"use strict";f.d(Ie,"c",function(){return ge}),f.d(Ie,"b",function(){return J}),f.d(Ie,"d",function(){return N}),f.d(Ie,"a",function(){return w}),f.d(Ie,"e",function(){return H});var W=f("9og8"),be=f("WmNS"),le=f.n(be),Oe=f("ErOA");function ge(X){return Object(Oe.c)("libraries/".concat(X,".json"))}function J(){return Object(Oe.c)("library_tags.json")}function N(X){return A.apply(this,arguments)}function A(){return A=Object(W.a)(le.a.mark(function X(ie){var ue;return le.a.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,Object(Oe.b)("attachments/".concat(ie,".json"));case 2:return ue=P.sent,P.abrupt("return",ue.status===0);case 4:case"end":return P.stop()}},X)})),A.apply(this,arguments)}function w(X){return Object(Oe.f)("libraries.json",X)}function H(X,ie){return Object(Oe.g)("libraries/".concat(X,".json"),ie)}},y5JW:function(qe,Ie,f){"use strict";f.d(Ie,"c",function(){return U}),f.d(Ie,"a",function(){return j});var W=f("DZo9"),be=f("8z0m"),le=f("+L6B"),Oe=f("2/Rp"),ge=f("9og8"),J=f("k1fw"),N=f("oBTY"),A=f("miYZ"),w=f("tsqr"),H=f("WmNS"),X=f.n(H),ie=f("q1tI"),ue=f.n(ie),K=f("m3rI"),P=f("wzkS"),U="\u3000\u3000";function j(B){var ne=["Bytes","KB","MB","GB","TB"];if(B==0)return"0 Byte";var ke=parseInt(""+Math.floor(Math.log(B)/Math.log(1024)),10);return(B/Math.pow(1024,ke)).toFixed(1)+" "+ne[ke]}Ie.b=function(B){var ne=B.value,ke=ne===void 0?[]:ne,Fe=B.action,ce=B.onChange,we=B.className,Me=B.maxSize,de=Me===void 0?150:Me,he=B.title,Te=he===void 0?"\u6587\u4EF6\u4E0A\u4F20":he,se=B.accept,y=se===void 0?null:se,V={multiple:!1,fileList:ke,accept:y,withCredentials:!0,beforeUpload:function(ee){var I=ee.size/1024/1024;return I<de?!0:(w.b.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(de,"MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20")),Promise.reject())},action:"".concat(K.a.API_SERVER,"/api/attachments.json"),onChange:function(ee){var I=Object(N.a)(ee.fileList);I=I.map(function(O){return O.name.indexOf(U)===-1&&(O.name="".concat(O.name).concat(U).concat(j(O.size))),Object(J.a)({},O)}),ce(I)},onRemove:function(){var v=Object(ge.a)(X.a.mark(function I(O){var C,u,l;return X.a.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(C=O.size/1024/1024,!(O.status==="uploading")){x.next=3;break}return x.abrupt("return",!0);case 3:if(C<de){x.next=7;break}return x.abrupt("return",!0);case 7:if(u=O.response?O.response.id:O.uid,!u){x.next=15;break}return x.next=11,Object(P.d)(O.response?O.response.id:O.id);case 11:return l=x.sent,x.abrupt("return",l);case 15:return x.abrupt("return",!0);case 16:case"end":return x.stop()}},I)}));function ee(I){return v.apply(this,arguments)}return ee}()};function M(v){v.preventDefault(),v.stopPropagation()}return ue.a.createElement("div",{className:"single-upload ".concat(we||"")},ue.a.createElement(be.a,V,ue.a.createElement(Oe.a,{type:"primary",title:ke.length>0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:ke.length>0,ghost:!0},Te),ue.a.createElement("span",{onClick:M,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",de,"M) ")))}}}]);
|